aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
committerHsuan Lee <hsuan@cobinhood.com>2019-01-19 18:42:04 +0800
commit7ae38906926dc09bc10670c361af0d2bf0050426 (patch)
tree5fb10ae366b987db09e4ddb4bc3ba0f75404ad08
parentb5fd3c72a08aaa6957917d74c333387a16edf66b (diff)
downloaddexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.gz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.bz2
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.lz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.xz
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.tar.zst
dexon-sol-tools-7ae38906926dc09bc10670c361af0d2bf0050426.zip
Update dependency packages
-rw-r--r--.circleci/config.yml8
-rw-r--r--.github/autolabeler.yml2
-rw-r--r--README.md10
-rw-r--r--contracts/.solhint.json21
-rw-r--r--contracts/TESTING.md48
-rw-r--r--contracts/examples/CHANGELOG.json56
-rw-r--r--contracts/examples/CHANGELOG.md26
-rw-r--r--contracts/examples/README.md56
-rw-r--r--contracts/examples/compiler.json22
-rw-r--r--contracts/examples/contracts/ExchangeWrapper/ExchangeWrapper.sol100
-rw-r--r--contracts/examples/contracts/Validator/Validator.sol56
-rw-r--r--contracts/examples/contracts/Wallet/Wallet.sol65
-rw-r--r--contracts/examples/contracts/Whitelist/Whitelist.sol136
-rw-r--r--contracts/examples/package.json81
-rw-r--r--contracts/examples/src/artifacts/index.ts13
-rw-r--r--contracts/examples/src/index.ts2
-rw-r--r--contracts/examples/src/wrappers/index.ts4
-rw-r--r--contracts/examples/tsconfig.json16
-rw-r--r--contracts/examples/tslint.json6
-rw-r--r--contracts/extensions/CHANGELOG.json74
-rw-r--r--contracts/extensions/CHANGELOG.md32
-rw-r--r--contracts/extensions/DEPLOYS.json31
-rw-r--r--contracts/extensions/README.md69
-rw-r--r--contracts/extensions/compiler.json22
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/BalanceThresholdFilter.sol45
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/MixinBalanceThresholdFilterCore.sol135
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/MixinExchangeCalldata.sol103
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IBalanceThresholdFilterCore.sol55
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IThresholdAsset.sol31
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol54
-rw-r--r--contracts/extensions/contracts/BalanceThresholdFilter/mixins/MExchangeCalldata.sol56
-rw-r--r--contracts/extensions/contracts/DutchAuction/DutchAuction.sol205
-rw-r--r--contracts/extensions/contracts/Forwarder/Forwarder.sol50
-rw-r--r--contracts/extensions/contracts/Forwarder/MixinAssets.sol143
-rw-r--r--contracts/extensions/contracts/Forwarder/MixinExchangeWrapper.sol260
-rw-r--r--contracts/extensions/contracts/Forwarder/MixinForwarderCore.sol214
-rw-r--r--contracts/extensions/contracts/Forwarder/MixinWeth.sol113
-rw-r--r--contracts/extensions/contracts/Forwarder/interfaces/IAssets.sol34
-rw-r--r--contracts/extensions/contracts/Forwarder/interfaces/IForwarder.sol30
-rw-r--r--contracts/extensions/contracts/Forwarder/interfaces/IForwarderCore.sol80
-rw-r--r--contracts/extensions/contracts/Forwarder/libs/LibConstants.sol62
-rw-r--r--contracts/extensions/contracts/Forwarder/libs/LibForwarderErrors.sol34
-rw-r--r--contracts/extensions/contracts/Forwarder/mixins/MAssets.sol53
-rw-r--r--contracts/extensions/contracts/Forwarder/mixins/MExchangeWrapper.sol87
-rw-r--r--contracts/extensions/contracts/Forwarder/mixins/MWeth.sol41
-rw-r--r--contracts/extensions/contracts/OrderMatcher/MixinAssets.sol195
-rw-r--r--contracts/extensions/contracts/OrderMatcher/MixinMatchOrders.sol86
-rw-r--r--contracts/extensions/contracts/OrderMatcher/OrderMatcher.sol38
-rw-r--r--contracts/extensions/contracts/OrderMatcher/interfaces/IAssets.sol43
-rw-r--r--contracts/extensions/contracts/OrderMatcher/interfaces/IMatchOrders.sol43
-rw-r--r--contracts/extensions/contracts/OrderMatcher/interfaces/IOrderMatcher.sol31
-rw-r--r--contracts/extensions/contracts/OrderMatcher/libs/LibConstants.sol56
-rw-r--r--contracts/extensions/contracts/OrderMatcher/mixins/MAssets.sol71
-rw-r--r--contracts/extensions/contracts/OrderValidator/OrderValidator.sol218
-rw-r--r--contracts/extensions/package.json93
-rw-r--r--contracts/extensions/src/artifacts/index.ts15
-rw-r--r--contracts/extensions/src/index.ts2
-rw-r--r--contracts/extensions/src/wrappers/index.ts5
-rw-r--r--contracts/extensions/test/extensions/balance_threshold_filter.ts1644
-rw-r--r--contracts/extensions/test/extensions/dutch_auction.ts378
-rw-r--r--contracts/extensions/test/extensions/forwarder.ts1291
-rw-r--r--contracts/extensions/test/extensions/order_matcher.ts818
-rw-r--r--contracts/extensions/test/extensions/order_validator.ts609
-rw-r--r--contracts/extensions/test/global_hooks.ts17
-rw-r--r--contracts/extensions/test/utils/balance_threshold_wrapper.ts283
-rw-r--r--contracts/extensions/test/utils/dutch_auction_test_wrapper.ts62
-rw-r--r--contracts/extensions/test/utils/forwarder_wrapper.ts124
-rw-r--r--contracts/extensions/tsconfig.json17
-rw-r--r--contracts/extensions/tslint.json6
-rw-r--r--contracts/interfaces/CHANGELOG.json56
-rw-r--r--contracts/interfaces/CHANGELOG.md26
-rw-r--r--contracts/interfaces/README.md72
-rw-r--r--contracts/interfaces/compiler.json35
-rw-r--r--contracts/interfaces/contracts/protocol/AssetProxy/IAssetData.sol44
-rw-r--r--contracts/interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol46
-rw-r--r--contracts/interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol52
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol37
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IExchange.sol38
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IExchangeCore.sol60
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IMatchOrders.sol44
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/ISignatureValidator.sol57
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/ITransactions.sol35
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IValidator.sol37
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IWallet.sol35
-rw-r--r--contracts/interfaces/contracts/protocol/Exchange/IWrapperFunctions.sol160
-rw-r--r--contracts/interfaces/package.json57
-rw-r--r--contracts/interfaces/src/artifacts/index.ts29
-rw-r--r--contracts/interfaces/src/index.ts2
-rw-r--r--contracts/interfaces/src/wrappers/index.ts12
-rw-r--r--contracts/interfaces/tsconfig.json24
-rw-r--r--contracts/interfaces/tslint.json6
-rw-r--r--contracts/libs/CHANGELOG.json56
-rw-r--r--contracts/libs/CHANGELOG.md26
-rw-r--r--contracts/libs/README.md70
-rw-r--r--contracts/libs/compiler.json31
-rw-r--r--contracts/libs/contracts/libs/LibAbiEncoder.sol215
-rw-r--r--contracts/libs/contracts/libs/LibAddressArray.sol84
-rw-r--r--contracts/libs/contracts/libs/LibAssetProxyErrors.sol38
-rw-r--r--contracts/libs/contracts/libs/LibConstants.sol49
-rw-r--r--contracts/libs/contracts/libs/LibEIP712.sol87
-rw-r--r--contracts/libs/contracts/libs/LibExchangeErrors.sol70
-rw-r--r--contracts/libs/contracts/libs/LibExchangeSelectors.sol152
-rw-r--r--contracts/libs/contracts/libs/LibFillResults.sol53
-rw-r--r--contracts/libs/contracts/libs/LibMath.sol253
-rw-r--r--contracts/libs/contracts/libs/LibOrder.sol145
-rw-r--r--contracts/libs/contracts/test/TestLibs/TestLibs.sol152
-rw-r--r--contracts/libs/package.json89
-rw-r--r--contracts/libs/src/artifacts/index.ts17
-rw-r--r--contracts/libs/src/index.ts2
-rw-r--r--contracts/libs/src/wrappers/index.ts6
-rw-r--r--contracts/libs/test/exchange/libs.ts125
-rw-r--r--contracts/libs/test/global_hooks.ts17
-rw-r--r--contracts/libs/tsconfig.json18
-rw-r--r--contracts/libs/tslint.json6
-rw-r--r--contracts/multisig/CHANGELOG.json56
-rw-r--r--contracts/multisig/CHANGELOG.md26
-rw-r--r--contracts/multisig/README.md70
-rw-r--r--contracts/multisig/compiler.json22
-rw-r--r--contracts/multisig/contracts/multisig/MultiSigWallet.sol393
-rw-r--r--contracts/multisig/contracts/multisig/MultiSigWalletWithTimeLock.sol127
-rw-r--r--contracts/multisig/contracts/test/TestRejectEther/TestRejectEther.sol23
-rw-r--r--contracts/multisig/package.json84
-rw-r--r--contracts/multisig/src/artifacts/index.ts11
-rw-r--r--contracts/multisig/src/index.ts2
-rw-r--r--contracts/multisig/src/wrappers/index.ts2
-rw-r--r--contracts/multisig/test/global_hooks.ts19
-rw-r--r--contracts/multisig/test/multi_sig_with_time_lock.ts349
-rw-r--r--contracts/multisig/test/utils/multi_sig_wrapper.ts54
-rw-r--r--contracts/multisig/tsconfig.json15
-rw-r--r--contracts/multisig/tslint.json6
-rw-r--r--contracts/protocol/CHANGELOG.json65
-rw-r--r--contracts/protocol/CHANGELOG.md28
-rw-r--r--contracts/protocol/DEPLOYS.json92
-rw-r--r--contracts/protocol/README.md74
-rw-r--r--contracts/protocol/compiler.json34
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol184
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxy/ERC721Proxy.sol171
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxy/MixinAuthorizable.sol117
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxy/MultiAssetProxy.sol306
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxy/mixins/MAuthorizable.sol41
-rw-r--r--contracts/protocol/contracts/protocol/AssetProxyOwner/AssetProxyOwner.sol108
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/Exchange.sol53
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinAssetProxyDispatcher.sol174
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinExchangeCore.sol529
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinMatchOrders.sol335
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinSignatureValidator.sol324
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinTransactions.sol152
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/MixinWrapperFunctions.sol426
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MAssetProxyDispatcher.sol45
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MExchangeCore.sol157
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MMatchOrders.sol58
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MSignatureValidator.sol75
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MTransactions.sol58
-rw-r--r--contracts/protocol/contracts/protocol/Exchange/mixins/MWrapperFunctions.sol41
-rw-r--r--contracts/protocol/contracts/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol37
-rw-r--r--contracts/protocol/contracts/test/TestAssetProxyOwner/TestAssetProxyOwner.sol58
-rw-r--r--contracts/protocol/contracts/test/TestExchangeInternals/TestExchangeInternals.sol191
-rw-r--r--contracts/protocol/contracts/test/TestSignatureValidator/TestSignatureValidator.sol45
-rw-r--r--contracts/protocol/contracts/test/TestStaticCallReceiver/TestStaticCallReceiver.sol81
-rw-r--r--contracts/protocol/package.json93
-rw-r--r--contracts/protocol/src/artifacts/index.ts27
-rw-r--r--contracts/protocol/src/index.ts3
-rw-r--r--contracts/protocol/src/wrappers/index.ts10
-rw-r--r--contracts/protocol/test/asset_proxy/authorizable.ts211
-rw-r--r--contracts/protocol/test/asset_proxy/proxies.ts1285
-rw-r--r--contracts/protocol/test/exchange/core.ts1157
-rw-r--r--contracts/protocol/test/exchange/dispatcher.ts284
-rw-r--r--contracts/protocol/test/exchange/fill_order.ts314
-rw-r--r--contracts/protocol/test/exchange/internal.ts472
-rw-r--r--contracts/protocol/test/exchange/match_orders.ts1284
-rw-r--r--contracts/protocol/test/exchange/signature_validator.ts526
-rw-r--r--contracts/protocol/test/exchange/transactions.ts466
-rw-r--r--contracts/protocol/test/exchange/wrapper.ts1461
-rw-r--r--contracts/protocol/test/global_hooks.ts17
-rw-r--r--contracts/protocol/test/multisig/asset_proxy_owner.ts506
-rw-r--r--contracts/protocol/test/utils/asset_proxy_owner_wrapper.ts70
-rw-r--r--contracts/protocol/test/utils/asset_wrapper.ts222
-rw-r--r--contracts/protocol/test/utils/erc20_wrapper.ts179
-rw-r--r--contracts/protocol/test/utils/erc721_wrapper.ts236
-rw-r--r--contracts/protocol/test/utils/exchange_wrapper.ts292
-rw-r--r--contracts/protocol/test/utils/fill_order_combinatorial_utils.ts928
-rw-r--r--contracts/protocol/test/utils/index.ts3
-rw-r--r--contracts/protocol/test/utils/match_order_tester.ts564
-rw-r--r--contracts/protocol/test/utils/order_factory_from_scenario.ts294
-rw-r--r--contracts/protocol/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts19
-rw-r--r--contracts/protocol/test/utils/simple_order_filled_cancelled_fetcher.ts31
-rw-r--r--contracts/protocol/test/utils/types.ts8
-rw-r--r--contracts/protocol/tsconfig.json23
-rw-r--r--contracts/protocol/tslint.json6
-rw-r--r--contracts/test-utils/CHANGELOG.json57
-rw-r--r--contracts/test-utils/CHANGELOG.md26
-rw-r--r--contracts/test-utils/README.md73
-rw-r--r--contracts/test-utils/package.json77
-rw-r--r--contracts/test-utils/src/abstract_asset_wrapper.ts3
-rw-r--r--contracts/test-utils/src/address_utils.ts11
-rw-r--r--contracts/test-utils/src/assertions.ts199
-rw-r--r--contracts/test-utils/src/block_timestamp.ts43
-rw-r--r--contracts/test-utils/src/chai_setup.ts13
-rw-r--r--contracts/test-utils/src/combinatorial_utils.ts113
-rw-r--r--contracts/test-utils/src/constants.ts68
-rw-r--r--contracts/test-utils/src/coverage.ts21
-rw-r--r--contracts/test-utils/src/formatters.ts68
-rw-r--r--contracts/test-utils/src/global_hooks.ts15
-rw-r--r--contracts/test-utils/src/index.ts55
-rw-r--r--contracts/test-utils/src/log_decoder.ts51
-rw-r--r--contracts/test-utils/src/order_factory.ts38
-rw-r--r--contracts/test-utils/src/order_utils.ts58
-rw-r--r--contracts/test-utils/src/profiler.ts27
-rw-r--r--contracts/test-utils/src/revert_trace.ts21
-rw-r--r--contracts/test-utils/src/signing_utils.ts29
-rw-r--r--contracts/test-utils/src/test_with_reference.ts139
-rw-r--r--contracts/test-utils/src/transaction_factory.ts37
-rw-r--r--contracts/test-utils/src/type_encoding_utils.ts21
-rw-r--r--contracts/test-utils/src/types.ts243
-rw-r--r--contracts/test-utils/src/web3_wrapper.ts85
-rw-r--r--contracts/test-utils/test/test_with_reference.ts63
-rw-r--r--contracts/test-utils/tsconfig.json7
-rw-r--r--contracts/test-utils/tsconfig.lint.json7
-rw-r--r--contracts/test-utils/tslint.json6
-rw-r--r--contracts/tokens/.solhintignore3
-rw-r--r--contracts/tokens/CHANGELOG.json56
-rw-r--r--contracts/tokens/CHANGELOG.md26
-rw-r--r--contracts/tokens/DEPLOYS.json16
-rw-r--r--contracts/tokens/README.md74
-rw-r--r--contracts/tokens/compiler.json44
-rw-r--r--contracts/tokens/contracts/test/DummyERC20Token/DummyERC20Token.sol77
-rw-r--r--contracts/tokens/contracts/test/DummyERC20Token/DummyMultipleReturnERC20Token.sol69
-rw-r--r--contracts/tokens/contracts/test/DummyERC20Token/DummyNoReturnERC20Token.sol115
-rw-r--r--contracts/tokens/contracts/test/DummyERC721Receiver/DummyERC721Receiver.sol67
-rw-r--r--contracts/tokens/contracts/test/DummyERC721Receiver/InvalidERC721Receiver.sol66
-rw-r--r--contracts/tokens/contracts/test/DummyERC721Token/DummyERC721Token.sol63
-rw-r--r--contracts/tokens/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol188
-rw-r--r--contracts/tokens/contracts/tokens/ERC20Token/ERC20Token.sol148
-rw-r--r--contracts/tokens/contracts/tokens/ERC20Token/IERC20Token.sol87
-rw-r--r--contracts/tokens/contracts/tokens/ERC20Token/MintableERC20Token.sol60
-rw-r--r--contracts/tokens/contracts/tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol70
-rw-r--r--contracts/tokens/contracts/tokens/ERC721Token/ERC721Token.sol277
-rw-r--r--contracts/tokens/contracts/tokens/ERC721Token/IERC721Receiver.sol44
-rw-r--r--contracts/tokens/contracts/tokens/ERC721Token/IERC721Token.sol158
-rw-r--r--contracts/tokens/contracts/tokens/ERC721Token/MintableERC721Token.sol82
-rw-r--r--contracts/tokens/contracts/tokens/EtherToken/IEtherToken.sol33
-rw-r--r--contracts/tokens/contracts/tokens/EtherToken/WETH9.sol758
-rw-r--r--contracts/tokens/contracts/tokens/ZRXToken/ERC20Token_v1.sol44
-rw-r--r--contracts/tokens/contracts/tokens/ZRXToken/Token_v1.sol39
-rw-r--r--contracts/tokens/contracts/tokens/ZRXToken/UnlimitedAllowanceToken_v1.sol52
-rw-r--r--contracts/tokens/contracts/tokens/ZRXToken/ZRXToken.sol41
-rw-r--r--contracts/tokens/package.json91
-rw-r--r--contracts/tokens/src/artifacts/index.ts50
-rw-r--r--contracts/tokens/src/index.ts2
-rw-r--r--contracts/tokens/src/wrappers/index.ts21
-rw-r--r--contracts/tokens/test/erc721_token.ts282
-rw-r--r--contracts/tokens/test/global_hooks.ts17
-rw-r--r--contracts/tokens/test/unlimited_allowance_token.ts194
-rw-r--r--contracts/tokens/test/weth9.ts142
-rw-r--r--contracts/tokens/test/zrx_token.ts203
-rw-r--r--contracts/tokens/tsconfig.json33
-rw-r--r--contracts/tokens/tslint.json6
-rw-r--r--contracts/utils/CHANGELOG.json56
-rw-r--r--contracts/utils/CHANGELOG.md26
-rw-r--r--contracts/utils/README.md70
-rw-r--r--contracts/utils/compiler.json22
-rw-r--r--contracts/utils/contracts/test/TestConstants/TestConstants.sol57
-rw-r--r--contracts/utils/contracts/test/TestLibBytes/TestLibBytes.sol269
-rw-r--r--contracts/utils/contracts/utils/LibBytes/LibBytes.sol567
-rw-r--r--contracts/utils/contracts/utils/Ownable/IOwnable.sol8
-rw-r--r--contracts/utils/contracts/utils/Ownable/Ownable.sol33
-rw-r--r--contracts/utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol45
-rw-r--r--contracts/utils/contracts/utils/SafeMath/SafeMath.sol87
-rw-r--r--contracts/utils/package.json87
-rw-r--r--contracts/utils/src/artifacts/index.ts19
-rw-r--r--contracts/utils/src/index.ts2
-rw-r--r--contracts/utils/src/wrappers/index.ts2
-rw-r--r--contracts/utils/test/global_hooks.ts17
-rw-r--r--contracts/utils/test/lib_bytes.ts875
-rw-r--r--contracts/utils/test/libs.ts34
-rw-r--r--contracts/utils/tsconfig.json19
-rw-r--r--contracts/utils/tslint.json6
-rw-r--r--lerna.json2
-rw-r--r--package.json10
-rw-r--r--packages/0x.js/.npmignore10
-rw-r--r--packages/0x.js/CHANGELOG.json1425
-rw-r--r--packages/0x.js/CHANGELOG.md531
-rw-r--r--packages/0x.js/README.md102
-rw-r--r--packages/0x.js/coverage/.gitkeep0
-rw-r--r--packages/0x.js/package.json94
-rw-r--r--packages/0x.js/src/index.ts124
-rw-r--r--packages/0x.js/tsconfig.json8
-rw-r--r--packages/0x.js/tslint.json3
-rw-r--r--packages/0x.js/typedoc-tsconfig.json7
-rw-r--r--packages/0x.js/webpack.config.js63
-rw-r--r--packages/abi-gen-templates/CHANGELOG.json38
-rw-r--r--packages/abi-gen-templates/CHANGELOG.md18
-rw-r--r--packages/abi-gen-templates/README.md17
-rw-r--r--packages/abi-gen-templates/contract.handlebars91
-rw-r--r--packages/abi-gen-templates/package.json20
-rw-r--r--packages/abi-gen-templates/partials/call.handlebars3
-rw-r--r--packages/abi-gen-templates/partials/callAsync.handlebars23
-rw-r--r--packages/abi-gen-templates/partials/event.handlebars5
-rw-r--r--packages/abi-gen-templates/partials/params.handlebars3
-rw-r--r--packages/abi-gen-templates/partials/return_type.handlebars10
-rw-r--r--packages/abi-gen-templates/partials/tx.handlebars53
-rw-r--r--packages/abi-gen-templates/partials/typed_params.handlebars3
-rw-r--r--packages/abi-gen-wrappers/CHANGELOG.json132
-rw-r--r--packages/abi-gen-wrappers/CHANGELOG.md58
-rw-r--r--packages/abi-gen-wrappers/README.md73
-rw-r--r--packages/abi-gen-wrappers/package.json50
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/asset_proxy_owner.ts1494
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc20_token.ts828
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dummy_erc721_token.ts1006
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/dutch_auction.ts250
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_proxy.ts530
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc20_token.ts433
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_proxy.ts530
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/erc721_token.ts668
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/exchange.ts2279
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/forwarder.ts523
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_validator.ts96
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/i_wallet.ts94
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/multi_asset_proxy.ts669
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/order_validator.ts288
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/weth9.ts668
-rw-r--r--packages/abi-gen-wrappers/src/generated-wrappers/zrx_token.ts511
-rw-r--r--packages/abi-gen-wrappers/src/index.ts16
-rw-r--r--packages/abi-gen-wrappers/tsconfig.json8
-rw-r--r--packages/abi-gen-wrappers/tslint.json3
-rw-r--r--packages/abi-gen/.npmignore6
-rw-r--r--packages/abi-gen/CHANGELOG.json398
-rw-r--r--packages/abi-gen/CHANGELOG.md169
-rw-r--r--packages/abi-gen/README.md104
-rwxr-xr-xpackages/abi-gen/bin/abi-gen.js2
-rw-r--r--packages/abi-gen/coverage/.gitkeep0
-rw-r--r--packages/abi-gen/package.json68
-rw-r--r--packages/abi-gen/src/globals.d.ts6
-rw-r--r--packages/abi-gen/src/index.ts152
-rw-r--r--packages/abi-gen/src/types.ts24
-rw-r--r--packages/abi-gen/src/utils.ts119
-rw-r--r--packages/abi-gen/test/utils_test.ts86
-rw-r--r--packages/abi-gen/tsconfig.json8
-rw-r--r--packages/abi-gen/tslint.json3
-rw-r--r--packages/assert/.npmignore7
-rw-r--r--packages/assert/CHANGELOG.json373
-rw-r--r--packages/assert/CHANGELOG.md164
-rw-r--r--packages/assert/README.md77
-rw-r--r--packages/assert/coverage/.gitkeep0
-rw-r--r--packages/assert/package.json56
-rw-r--r--packages/assert/src/globals.d.ts6
-rw-r--r--packages/assert/src/index.ts97
-rw-r--r--packages/assert/test/assert_test.ts255
-rw-r--r--packages/assert/tsconfig.json8
-rw-r--r--packages/assert/tslint.json3
-rw-r--r--packages/asset-buyer/.npmignore8
-rw-r--r--packages/asset-buyer/CHANGELOG.json243
-rw-r--r--packages/asset-buyer/CHANGELOG.md94
-rw-r--r--packages/asset-buyer/README.md83
-rw-r--r--packages/asset-buyer/package.json74
-rw-r--r--packages/asset-buyer/src/asset_buyer.ts365
-rw-r--r--packages/asset-buyer/src/constants.ts40
-rw-r--r--packages/asset-buyer/src/errors.ts22
-rw-r--r--packages/asset-buyer/src/globals.d.ts6
-rw-r--r--packages/asset-buyer/src/index.ts29
-rw-r--r--packages/asset-buyer/src/order_providers/basic_order_provider.ts41
-rw-r--r--packages/asset-buyer/src/order_providers/standard_relayer_api_order_provider.ts111
-rw-r--r--packages/asset-buyer/src/types.ts142
-rw-r--r--packages/asset-buyer/src/utils/assert.ts39
-rw-r--r--packages/asset-buyer/src/utils/asset_data_utils.ts12
-rw-r--r--packages/asset-buyer/src/utils/buy_quote_calculator.ts221
-rw-r--r--packages/asset-buyer/src/utils/calculate_liquidity.ts34
-rw-r--r--packages/asset-buyer/src/utils/order_provider_response_processor.ts171
-rw-r--r--packages/asset-buyer/src/utils/order_utils.ts74
-rw-r--r--packages/asset-buyer/test/asset_buyer_test.ts212
-rw-r--r--packages/asset-buyer/test/buy_quote_calculator_test.ts295
-rw-r--r--packages/asset-buyer/test/utils/chai_setup.ts13
-rw-r--r--packages/asset-buyer/test/utils/mocks.ts68
-rw-r--r--packages/asset-buyer/test/utils/test_helpers.ts26
-rw-r--r--packages/asset-buyer/tsconfig.json8
-rw-r--r--packages/asset-buyer/tslint.json3
-rw-r--r--packages/asset-buyer/typedoc-tsconfig.json7
-rw-r--r--packages/base-contract/.npmignore6
-rw-r--r--packages/base-contract/CHANGELOG.json370
-rw-r--r--packages/base-contract/CHANGELOG.md161
-rw-r--r--packages/base-contract/README.md63
-rw-r--r--packages/base-contract/coverage/.gitkeep0
-rw-r--r--packages/base-contract/package.json53
-rw-r--r--packages/base-contract/src/globals.d.ts6
-rw-r--r--packages/base-contract/src/index.ts174
-rw-r--r--packages/base-contract/src/utils.ts25
-rw-r--r--packages/base-contract/test/base_contract_test.ts114
-rw-r--r--packages/base-contract/test/utils_test.ts108
-rw-r--r--packages/base-contract/tsconfig.json8
-rw-r--r--packages/base-contract/tslint.json3
-rw-r--r--packages/connect/.npmignore8
-rw-r--r--packages/connect/CHANGELOG.json471
-rw-r--r--packages/connect/CHANGELOG.md201
-rw-r--r--packages/connect/README.md74
-rw-r--r--packages/connect/coverage/.gitkeep0
-rw-r--r--packages/connect/package.json86
-rw-r--r--packages/connect/src/globals.d.ts4
-rw-r--r--packages/connect/src/http_client.ts210
-rw-r--r--packages/connect/src/index.ts20
-rw-r--r--packages/connect/src/orders_channel_factory.ts29
-rw-r--r--packages/connect/src/types.ts48
-rw-r--r--packages/connect/src/utils/assert.ts25
-rw-r--r--packages/connect/src/utils/orders_channel_message_parser.ts37
-rw-r--r--packages/connect/src/utils/relayer_response_json_parsers.ts50
-rw-r--r--packages/connect/src/utils/type_converters.ts26
-rw-r--r--packages/connect/src/ws_orders_channel.ts102
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/asset_pairs.json21
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/asset_pairs.ts25
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fee_recipients.json10
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/fee_recipients.ts12
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.json19
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order/0xabc67323774bdbd24d94f977fa9ac94a50f016026fd13f42990861238897721f.ts21
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order_config.json6
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/order_config.ts10
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orderbook.json54
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orderbook.ts58
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orders.json26
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/orders.ts30
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/unknown_orders_channel_message.ts10
-rw-r--r--packages/connect/test/fixtures/standard_relayer_api/update_orders_channel_message.ts17
-rw-r--r--packages/connect/test/http_client_test.ts193
-rw-r--r--packages/connect/test/orders_channel_factory_test.ts34
-rw-r--r--packages/connect/test/orders_channel_message_parsers_test.ts59
-rw-r--r--packages/connect/test/ws_orders_channel_test.ts49
-rw-r--r--packages/connect/tsconfig.json8
-rw-r--r--packages/connect/tslint.json3
-rw-r--r--packages/connect/typedoc-tsconfig.json7
-rw-r--r--packages/contract-addresses/CHANGELOG.json73
-rw-r--r--packages/contract-addresses/CHANGELOG.md35
-rw-r--r--packages/contract-addresses/README.md68
-rw-r--r--packages/contract-addresses/package.json37
-rw-r--r--packages/contract-addresses/src/index.ts98
-rw-r--r--packages/contract-addresses/tsconfig.json8
-rw-r--r--packages/contract-addresses/tslint.json3
-rw-r--r--packages/contract-artifacts/CHANGELOG.json60
-rw-r--r--packages/contract-artifacts/CHANGELOG.md30
-rw-r--r--packages/contract-artifacts/README.md67
-rw-r--r--packages/contract-artifacts/artifacts/AssetProxyOwner.json699
-rw-r--r--packages/contract-artifacts/artifacts/DummyERC20Token.json328
-rw-r--r--packages/contract-artifacts/artifacts/DummyERC721Token.json375
-rw-r--r--packages/contract-artifacts/artifacts/DutchAuction.json310
-rw-r--r--packages/contract-artifacts/artifacts/ERC20Proxy.json195
-rw-r--r--packages/contract-artifacts/artifacts/ERC20Token.json189
-rw-r--r--packages/contract-artifacts/artifacts/ERC721Proxy.json195
-rw-r--r--packages/contract-artifacts/artifacts/ERC721Token.json268
-rw-r--r--packages/contract-artifacts/artifacts/Exchange.json1981
-rw-r--r--packages/contract-artifacts/artifacts/Forwarder.json447
-rw-r--r--packages/contract-artifacts/artifacts/IValidator.json41
-rw-r--r--packages/contract-artifacts/artifacts/IWallet.json37
-rw-r--r--packages/contract-artifacts/artifacts/MultiAssetProxy.json263
-rw-r--r--packages/contract-artifacts/artifacts/OrderValidator.json572
-rw-r--r--packages/contract-artifacts/artifacts/WETH9.json293
-rw-r--r--packages/contract-artifacts/artifacts/ZRXToken.json227
-rw-r--r--packages/contract-artifacts/package.json33
-rw-r--r--packages/contract-artifacts/src/index.ts35
-rw-r--r--packages/contract-artifacts/tsconfig.json27
-rw-r--r--packages/contract-artifacts/tslint.json3
-rw-r--r--packages/contract-wrappers/.npmignore11
-rw-r--r--packages/contract-wrappers/CHANGELOG.json414
-rw-r--r--packages/contract-wrappers/CHANGELOG.md164
-rw-r--r--packages/contract-wrappers/README.md89
-rw-r--r--packages/contract-wrappers/coverage/.gitkeep0
-rw-r--r--packages/contract-wrappers/package.json92
-rw-r--r--packages/contract-wrappers/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts11
-rw-r--r--packages/contract-wrappers/src/contract_wrappers.ts171
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/contract_wrapper.ts198
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/dutch_auction_wrapper.ts182
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc20_proxy_wrapper.ts77
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc20_token_wrapper.ts443
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc721_proxy_wrapper.ts77
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/erc721_token_wrapper.ts470
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/ether_token_wrapper.ts211
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/exchange_wrapper.ts1231
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/forwarder_wrapper.ts254
-rw-r--r--packages/contract-wrappers/src/contract_wrappers/order_validator_wrapper.ts185
-rw-r--r--packages/contract-wrappers/src/fetchers/asset_balance_and_proxy_allowance_fetcher.ts91
-rw-r--r--packages/contract-wrappers/src/fetchers/order_filled_cancelled_fetcher.ts39
-rw-r--r--packages/contract-wrappers/src/index.ts101
-rw-r--r--packages/contract-wrappers/src/schemas/contract_wrappers_config_schema.ts25
-rw-r--r--packages/contract-wrappers/src/schemas/method_opts_schema.ts7
-rw-r--r--packages/contract-wrappers/src/schemas/order_tx_opts_schema.ts8
-rw-r--r--packages/contract-wrappers/src/schemas/tx_opts_schema.ts9
-rw-r--r--packages/contract-wrappers/src/schemas/validate_order_fillable_opts_schema.ts7
-rw-r--r--packages/contract-wrappers/src/types.ts218
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts90
-rw-r--r--packages/contract-wrappers/src/utils/calldata_optimization_utils.ts44
-rw-r--r--packages/contract-wrappers/src/utils/constants.ts19
-rw-r--r--packages/contract-wrappers/src/utils/contract_addresses.ts15
-rw-r--r--packages/contract-wrappers/src/utils/decorators.ts110
-rw-r--r--packages/contract-wrappers/src/utils/exchange_transfer_simulator.ts111
-rw-r--r--packages/contract-wrappers/src/utils/filter_utils.ts87
-rw-r--r--packages/contract-wrappers/src/utils/transaction_encoder.ts281
-rw-r--r--packages/contract-wrappers/src/utils/utils.ts23
-rw-r--r--packages/contract-wrappers/test/calldata_optimization_utils_test.ts59
-rw-r--r--packages/contract-wrappers/test/dutch_auction_wrapper_test.ts128
-rw-r--r--packages/contract-wrappers/test/erc20_proxy_wrapper_test.ts39
-rw-r--r--packages/contract-wrappers/test/erc20_wrapper_test.ts634
-rw-r--r--packages/contract-wrappers/test/erc721_proxy_wrapper_test.ts39
-rw-r--r--packages/contract-wrappers/test/erc721_wrapper_test.ts466
-rw-r--r--packages/contract-wrappers/test/ether_token_wrapper_test.ts437
-rw-r--r--packages/contract-wrappers/test/exchange_wrapper_test.ts528
-rw-r--r--packages/contract-wrappers/test/forwarder_wrapper_test.ts167
-rw-r--r--packages/contract-wrappers/test/global_hooks.ts6
-rw-r--r--packages/contract-wrappers/test/order_validator_wrapper_test.ts146
-rw-r--r--packages/contract-wrappers/test/revert_validation_test.ts115
-rw-r--r--packages/contract-wrappers/test/subscription_test.ts75
-rw-r--r--packages/contract-wrappers/test/transaction_encoder_test.ts210
-rw-r--r--packages/contract-wrappers/test/utils/chai_setup.ts13
-rw-r--r--packages/contract-wrappers/test/utils/constants.ts19
-rw-r--r--packages/contract-wrappers/test/utils/dutch_auction_utils.ts153
-rw-r--r--packages/contract-wrappers/test/utils/migrate.ts18
-rw-r--r--packages/contract-wrappers/test/utils/token_utils.ts35
-rw-r--r--packages/contract-wrappers/test/utils/web3_wrapper.ts12
-rw-r--r--packages/contract-wrappers/tsconfig.json8
-rw-r--r--packages/contract-wrappers/tslint.json3
-rw-r--r--packages/contract-wrappers/typedoc-tsconfig.json7
-rw-r--r--packages/dev-tools-pages/.gitignore1
-rw-r--r--packages/dev-tools-pages/README.md88
-rw-r--r--packages/dev-tools-pages/assets/crawl.html17
-rw-r--r--packages/dev-tools-pages/assets/favicons/compiler.icobin6518 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/favicons/cov.icobin6518 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/favicons/profiler.icobin6518 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/favicons/trace.icobin6518 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2bin11248 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2bin11232 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/images/og-compiler.pngbin14494 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/images/og-cov.pngbin13336 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/images/og-profiler.pngbin13717 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/images/og-trace.pngbin13670 -> 0 bytes
-rw-r--r--packages/dev-tools-pages/assets/index.html14
-rw-r--r--packages/dev-tools-pages/package.json78
-rw-r--r--packages/dev-tools-pages/pages.js72
-rw-r--r--packages/dev-tools-pages/ts/components/animations/compiler/data.json1
-rw-r--r--packages/dev-tools-pages/ts/components/animations/compiler/index.tsx11
-rw-r--r--packages/dev-tools-pages/ts/components/animations/cov/data.json1
-rw-r--r--packages/dev-tools-pages/ts/components/animations/cov/index.tsx11
-rw-r--r--packages/dev-tools-pages/ts/components/animations/index.tsx93
-rw-r--r--packages/dev-tools-pages/ts/components/animations/profiler/data.json1
-rw-r--r--packages/dev-tools-pages/ts/components/animations/profiler/index.tsx11
-rw-r--r--packages/dev-tools-pages/ts/components/animations/trace/data.json1
-rw-r--r--packages/dev-tools-pages/ts/components/animations/trace/index.tsx11
-rw-r--r--packages/dev-tools-pages/ts/components/base.tsx26
-rw-r--r--packages/dev-tools-pages/ts/components/breakout.tsx12
-rw-r--r--packages/dev-tools-pages/ts/components/button.tsx52
-rw-r--r--packages/dev-tools-pages/ts/components/call_to_action.tsx40
-rw-r--r--packages/dev-tools-pages/ts/components/code.tsx197
-rw-r--r--packages/dev-tools-pages/ts/components/compiler.tsx94
-rw-r--r--packages/dev-tools-pages/ts/components/container.tsx13
-rw-r--r--packages/dev-tools-pages/ts/components/content-block.tsx78
-rw-r--r--packages/dev-tools-pages/ts/components/content.tsx31
-rw-r--r--packages/dev-tools-pages/ts/components/footer.tsx137
-rw-r--r--packages/dev-tools-pages/ts/components/header.tsx76
-rw-r--r--packages/dev-tools-pages/ts/components/hero.tsx63
-rw-r--r--packages/dev-tools-pages/ts/components/inline-code.tsx20
-rw-r--r--packages/dev-tools-pages/ts/components/intro.tsx70
-rw-r--r--packages/dev-tools-pages/ts/components/list.tsx50
-rw-r--r--packages/dev-tools-pages/ts/components/tabs.tsx66
-rw-r--r--packages/dev-tools-pages/ts/components/trace.tsx213
-rw-r--r--packages/dev-tools-pages/ts/components/typography.tsx33
-rw-r--r--packages/dev-tools-pages/ts/context/compiler.tsx20
-rw-r--r--packages/dev-tools-pages/ts/context/coverage.tsx20
-rw-r--r--packages/dev-tools-pages/ts/context/index.tsx22
-rw-r--r--packages/dev-tools-pages/ts/context/profiler.tsx20
-rw-r--r--packages/dev-tools-pages/ts/context/trace.tsx20
-rw-r--r--packages/dev-tools-pages/ts/globalStyles.tsx87
-rw-r--r--packages/dev-tools-pages/ts/globals.d.ts24
-rw-r--r--packages/dev-tools-pages/ts/highlight.tsx67
-rw-r--r--packages/dev-tools-pages/ts/icons/exact-location.svg1
-rw-r--r--packages/dev-tools-pages/ts/icons/logos/0x.svg1
-rw-r--r--packages/dev-tools-pages/ts/icons/logos/compiler.svg3
-rw-r--r--packages/dev-tools-pages/ts/icons/logos/cov.svg3
-rw-r--r--packages/dev-tools-pages/ts/icons/logos/profiler.svg3
-rw-r--r--packages/dev-tools-pages/ts/icons/logos/trace.svg1
-rw-r--r--packages/dev-tools-pages/ts/icons/no-location.svg1
-rw-r--r--packages/dev-tools-pages/ts/icons/time-consuming.svg1
-rw-r--r--packages/dev-tools-pages/ts/icons/time-saving.svg1
-rw-r--r--packages/dev-tools-pages/ts/pages/compiler.tsx182
-rw-r--r--packages/dev-tools-pages/ts/pages/coverage.tsx179
-rw-r--r--packages/dev-tools-pages/ts/pages/profiler.tsx176
-rw-r--r--packages/dev-tools-pages/ts/pages/trace.tsx147
-rw-r--r--packages/dev-tools-pages/ts/variables.tsx34
-rw-r--r--packages/dev-tools-pages/tsconfig.json22
-rw-r--r--packages/dev-tools-pages/tslint.json10
-rw-r--r--packages/dev-tools-pages/webpack.config.js115
-rw-r--r--packages/dev-utils/.npmignore7
-rw-r--r--packages/dev-utils/CHANGELOG.json408
-rw-r--r--packages/dev-utils/CHANGELOG.md175
-rw-r--r--packages/dev-utils/README.md95
-rw-r--r--packages/dev-utils/coverage/.gitkeep0
-rw-r--r--packages/dev-utils/package.json57
-rw-r--r--packages/dev-utils/src/blockchain_lifecycle.ts98
-rw-r--r--packages/dev-utils/src/callback_error_reporter.ts77
-rw-r--r--packages/dev-utils/src/constants.ts6
-rw-r--r--packages/dev-utils/src/env.ts26
-rw-r--r--packages/dev-utils/src/globals.d.ts6
-rw-r--r--packages/dev-utils/src/index.ts5
-rw-r--r--packages/dev-utils/src/web3_factory.ts71
-rw-r--r--packages/dev-utils/test/.npmignore5
-rw-r--r--packages/dev-utils/test/blockchain_lifecycle_test.ts26
-rw-r--r--packages/dev-utils/test/rpc_test.ts43
-rw-r--r--packages/dev-utils/tsconfig.json8
-rw-r--r--packages/dev-utils/tslint.json6
-rw-r--r--packages/devnet/Dockerfile25
-rw-r--r--packages/devnet/README.md110
-rw-r--r--packages/devnet/genesis.json60
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-08.903003751Z--5409ed021d9299bf6814279a6a1411a7e866a6311
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-09.794553183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb1
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-10.696351411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f841
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-11.479938556Z--e834ec434daba538cd1b9fe1582052b880bd7e631
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-12.260348580Z--78dc5d2d739606d31509c31d654056a45185ecb61
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.178294829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f8721
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.960499696Z--06cef8e666768cc40cc78cf93d9611019ddcb6281
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-14.757010386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d1
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-15.554233052Z--7457d5e02197480db681d3fdf256c7aca21bdc121
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-11T21-29-16.342711541Z--91c987bf62d25945db517bdaa840a6c6613744021
-rw-r--r--packages/devnet/node0/keystore/UTC--2018-05-15T21-50-24.532037737Z--e8816898d851d5b61b7f950627d04d794c07ca371
-rw-r--r--packages/devnet/node0/password.txt11
-rwxr-xr-xpackages/devnet/run.sh25
-rw-r--r--packages/ethereum-types/.npmignore6
-rw-r--r--packages/ethereum-types/CHANGELOG.json201
-rw-r--r--packages/ethereum-types/CHANGELOG.md88
-rw-r--r--packages/ethereum-types/README.md61
-rw-r--r--packages/ethereum-types/package.json45
-rw-r--r--packages/ethereum-types/src/globals.d.ts6
-rw-r--r--packages/ethereum-types/src/index.ts521
-rw-r--r--packages/ethereum-types/tsconfig.json9
-rw-r--r--packages/ethereum-types/tslint.json3
-rw-r--r--packages/ethereum-types/typedoc-tsconfig.json8
-rw-r--r--packages/fill-scenarios/.npmignore6
-rw-r--r--packages/fill-scenarios/CHANGELOG.json307
-rw-r--r--packages/fill-scenarios/CHANGELOG.md135
-rw-r--r--packages/fill-scenarios/README.md63
-rw-r--r--packages/fill-scenarios/package.json46
-rw-r--r--packages/fill-scenarios/src/constants.ts4
-rw-r--r--packages/fill-scenarios/src/fill_scenarios.ts296
-rw-r--r--packages/fill-scenarios/src/index.ts1
-rw-r--r--packages/fill-scenarios/tsconfig.json8
-rw-r--r--packages/fill-scenarios/tslint.json3
-rw-r--r--packages/instant/.DS_Storebin8196 -> 0 bytes
-rw-r--r--packages/instant/.dogfood.discharge.json13
-rw-r--r--packages/instant/.env_example7
-rw-r--r--packages/instant/.gitignore4
-rw-r--r--packages/instant/.npmignore6
-rw-r--r--packages/instant/.production.discharge.json13
-rw-r--r--packages/instant/.staging.discharge.json13
-rw-r--r--packages/instant/CHANGELOG.json29
-rw-r--r--packages/instant/CHANGELOG.md10
-rw-r--r--packages/instant/README.md110
-rw-r--r--packages/instant/jest.config.js10
-rw-r--r--packages/instant/package.json104
-rw-r--r--packages/instant/public/external.css29
-rw-r--r--packages/instant/public/index.html207
-rw-r--r--packages/instant/src/assets/icons/ae.svg4
-rw-r--r--packages/instant/src/assets/icons/agi.svg5
-rw-r--r--packages/instant/src/assets/icons/ant.svg5
-rw-r--r--packages/instant/src/assets/icons/ast.svg4
-rw-r--r--packages/instant/src/assets/icons/bat.svg3
-rw-r--r--packages/instant/src/assets/icons/cvc.svg4
-rw-r--r--packages/instant/src/assets/icons/dai.svg5
-rw-r--r--packages/instant/src/assets/icons/dgd.svg5
-rw-r--r--packages/instant/src/assets/icons/dgx.svg4
-rw-r--r--packages/instant/src/assets/icons/dnt.svg4
-rw-r--r--packages/instant/src/assets/icons/fun.svg4
-rw-r--r--packages/instant/src/assets/icons/gno.svg6
-rw-r--r--packages/instant/src/assets/icons/gnt.svg3
-rw-r--r--packages/instant/src/assets/icons/knc.svg6
-rw-r--r--packages/instant/src/assets/icons/link.svg6
-rw-r--r--packages/instant/src/assets/icons/lpt.svg8
-rw-r--r--packages/instant/src/assets/icons/mana.svg8
-rw-r--r--packages/instant/src/assets/icons/mkr.svg4
-rw-r--r--packages/instant/src/assets/icons/mln.svg4
-rw-r--r--packages/instant/src/assets/icons/omg.svg3
-rw-r--r--packages/instant/src/assets/icons/powr.svg6
-rw-r--r--packages/instant/src/assets/icons/ren.svg12
-rw-r--r--packages/instant/src/assets/icons/rep.svg7
-rw-r--r--packages/instant/src/assets/icons/req.svg3
-rw-r--r--packages/instant/src/assets/icons/salt.svg3
-rw-r--r--packages/instant/src/assets/icons/snt.svg4
-rw-r--r--packages/instant/src/assets/icons/spank.svg6
-rw-r--r--packages/instant/src/assets/icons/wax.svg4
-rw-r--r--packages/instant/src/assets/icons/zil.svg3
-rw-r--r--packages/instant/src/assets/icons/zrx.svg6
-rw-r--r--packages/instant/src/assets/powered_by_0x.svg17
-rw-r--r--packages/instant/src/components/amount_placeholder.tsx34
-rw-r--r--packages/instant/src/components/animations/full_rotation.tsx21
-rw-r--r--packages/instant/src/components/animations/position_animation.tsx107
-rw-r--r--packages/instant/src/components/animations/pulse.tsx15
-rw-r--r--packages/instant/src/components/animations/slide_animation.tsx34
-rw-r--r--packages/instant/src/components/buy_button.tsx120
-rw-r--r--packages/instant/src/components/buy_order_progress.tsx35
-rw-r--r--packages/instant/src/components/buy_order_state_buttons.tsx75
-rw-r--r--packages/instant/src/components/coinbase_wallet_logo.tsx23
-rw-r--r--packages/instant/src/components/css_reset.tsx32
-rw-r--r--packages/instant/src/components/erc20_asset_amount_input.tsx166
-rw-r--r--packages/instant/src/components/erc20_token_selector.tsx176
-rw-r--r--packages/instant/src/components/install_wallet_panel_content.tsx75
-rw-r--r--packages/instant/src/components/instant_heading.tsx149
-rw-r--r--packages/instant/src/components/meta_mask_logo.tsx80
-rw-r--r--packages/instant/src/components/order_details.tsx230
-rw-r--r--packages/instant/src/components/payment_method.tsx110
-rw-r--r--packages/instant/src/components/payment_method_dropdown.tsx60
-rw-r--r--packages/instant/src/components/placing_order_button.tsx18
-rw-r--r--packages/instant/src/components/scaling_amount_input.tsx92
-rw-r--r--packages/instant/src/components/scaling_input.tsx165
-rw-r--r--packages/instant/src/components/search_input.tsx29
-rw-r--r--packages/instant/src/components/secondary_button.tsx27
-rw-r--r--packages/instant/src/components/section_header.tsx21
-rw-r--r--packages/instant/src/components/sliding_error.tsx100
-rw-r--r--packages/instant/src/components/sliding_panel.tsx73
-rw-r--r--packages/instant/src/components/standard_panel_content.tsx75
-rw-r--r--packages/instant/src/components/standard_sliding_panel.tsx29
-rw-r--r--packages/instant/src/components/time_counter.tsx78
-rw-r--r--packages/instant/src/components/timed_progress_bar.tsx106
-rw-r--r--packages/instant/src/components/ui/button.tsx87
-rw-r--r--packages/instant/src/components/ui/circle.tsx26
-rw-r--r--packages/instant/src/components/ui/container.tsx104
-rw-r--r--packages/instant/src/components/ui/dropdown.tsx147
-rw-r--r--packages/instant/src/components/ui/flex.tsx38
-rw-r--r--packages/instant/src/components/ui/icon.tsx129
-rw-r--r--packages/instant/src/components/ui/input.tsx46
-rw-r--r--packages/instant/src/components/ui/overlay.tsx36
-rw-r--r--packages/instant/src/components/ui/spinner.tsx30
-rw-r--r--packages/instant/src/components/ui/text.tsx71
-rw-r--r--packages/instant/src/components/wallet_prompt.tsx49
-rw-r--r--packages/instant/src/components/zero_ex_instant.tsx21
-rw-r--r--packages/instant/src/components/zero_ex_instant_container.tsx112
-rw-r--r--packages/instant/src/components/zero_ex_instant_overlay.tsx53
-rw-r--r--packages/instant/src/components/zero_ex_instant_provider.tsx156
-rw-r--r--packages/instant/src/constants.ts79
-rw-r--r--packages/instant/src/containers/available_erc20_token_selector.ts45
-rw-r--r--packages/instant/src/containers/connected_account_payment_method.ts94
-rw-r--r--packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx35
-rw-r--r--packages/instant/src/containers/current_standard_sliding_panel.ts31
-rw-r--r--packages/instant/src/containers/latest_buy_quote_order_details.ts41
-rw-r--r--packages/instant/src/containers/latest_error.tsx68
-rw-r--r--packages/instant/src/containers/selected_asset_buy_order_progress.ts13
-rw-r--r--packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts113
-rw-r--r--packages/instant/src/containers/selected_asset_instant_heading.ts34
-rw-r--r--packages/instant/src/containers/selected_asset_theme_provider.ts32
-rw-r--r--packages/instant/src/containers/selected_erc20_asset_amount_input.ts122
-rw-r--r--packages/instant/src/data/asset_data_network_mapping.ts66
-rw-r--r--packages/instant/src/data/asset_meta_data_map.ts202
-rw-r--r--packages/instant/src/globals.d.ts12
-rw-r--r--packages/instant/src/index.ts2
-rw-r--r--packages/instant/src/index.umd.ts169
-rw-r--r--packages/instant/src/redux/actions.ts76
-rw-r--r--packages/instant/src/redux/analytics_middleware.ts108
-rw-r--r--packages/instant/src/redux/async_data.ts120
-rw-r--r--packages/instant/src/redux/reducer.ts297
-rw-r--r--packages/instant/src/redux/store.ts15
-rw-r--r--packages/instant/src/style/fonts.ts10
-rw-r--r--packages/instant/src/style/media.ts51
-rw-r--r--packages/instant/src/style/theme.ts56
-rw-r--r--packages/instant/src/style/util.ts11
-rw-r--r--packages/instant/src/style/z_index.ts9
-rw-r--r--packages/instant/src/types.ts206
-rw-r--r--packages/instant/src/util/address.ts6
-rw-r--r--packages/instant/src/util/analytics.ts248
-rw-r--r--packages/instant/src/util/assert.ts55
-rw-r--r--packages/instant/src/util/asset.ts146
-rw-r--r--packages/instant/src/util/asset_buyer_factory.ts17
-rw-r--r--packages/instant/src/util/buy_quote_updater.ts61
-rw-r--r--packages/instant/src/util/coinbase_api.ts11
-rw-r--r--packages/instant/src/util/env.ts77
-rw-r--r--packages/instant/src/util/error_flasher.ts26
-rw-r--r--packages/instant/src/util/error_reporter.ts79
-rw-r--r--packages/instant/src/util/etherscan.ts30
-rw-r--r--packages/instant/src/util/format.ts76
-rw-r--r--packages/instant/src/util/gas_price_estimator.ts65
-rw-r--r--packages/instant/src/util/heap.ts116
-rw-r--r--packages/instant/src/util/heartbeater.ts35
-rw-r--r--packages/instant/src/util/heartbeater_factory.ts30
-rw-r--r--packages/instant/src/util/maybe_big_number.ts25
-rw-r--r--packages/instant/src/util/provider_factory.ts34
-rw-r--r--packages/instant/src/util/provider_state_factory.ts90
-rw-r--r--packages/instant/src/util/time.ts39
-rw-r--r--packages/instant/src/util/util.ts6
-rw-r--r--packages/instant/test/components/zero_ex_instant.test.tsx15
-rw-r--r--packages/instant/test/util/asset.test.ts114
-rw-r--r--packages/instant/test/util/format.test.ts117
-rw-r--r--packages/instant/test/util/time.test.ts48
-rw-r--r--packages/instant/tsconfig.json14
-rw-r--r--packages/instant/tslint.json9
-rw-r--r--packages/instant/typedoc-tsconfig.json7
-rw-r--r--packages/instant/webpack.config.js176
-rw-r--r--packages/json-schemas/.npmignore8
-rw-r--r--packages/json-schemas/CHANGELOG.json381
-rw-r--r--packages/json-schemas/CHANGELOG.md163
-rw-r--r--packages/json-schemas/README.md83
-rw-r--r--packages/json-schemas/coverage/.gitkeep0
-rw-r--r--packages/json-schemas/package.json68
-rw-r--r--packages/json-schemas/schemas/address_schema.json5
-rw-r--r--packages/json-schemas/schemas/asset_pairs_request_opts_schema.json8
-rw-r--r--packages/json-schemas/schemas/block_param_schema.json11
-rw-r--r--packages/json-schemas/schemas/block_range_schema.json8
-rw-r--r--packages/json-schemas/schemas/call_data_schema.json27
-rw-r--r--packages/json-schemas/schemas/ec_signature_parameter_schema.json5
-rw-r--r--packages/json-schemas/schemas/ec_signature_schema.json14
-rw-r--r--packages/json-schemas/schemas/eip712_typed_data_schema.json28
-rw-r--r--packages/json-schemas/schemas/hex_schema.json5
-rw-r--r--packages/json-schemas/schemas/index_filter_values_schema.json7
-rw-r--r--packages/json-schemas/schemas/js_number_schema.json5
-rw-r--r--packages/json-schemas/schemas/number_schema.json5
-rw-r--r--packages/json-schemas/schemas/order_cancel_schema.json12
-rw-r--r--packages/json-schemas/schemas/order_config_request_schema.json24
-rw-r--r--packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json12
-rw-r--r--packages/json-schemas/schemas/order_fill_requests_schema.json12
-rw-r--r--packages/json-schemas/schemas/order_hash_schema.json5
-rw-r--r--packages/json-schemas/schemas/order_schema.json34
-rw-r--r--packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json52
-rw-r--r--packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json10
-rw-r--r--packages/json-schemas/schemas/orderbook_request_schema.json9
-rw-r--r--packages/json-schemas/schemas/orders_request_opts_schema.json19
-rw-r--r--packages/json-schemas/schemas/orders_schema.json5
-rw-r--r--packages/json-schemas/schemas/paged_request_opts_schema.json8
-rw-r--r--packages/json-schemas/schemas/paginated_collection_schema.json10
-rw-r--r--packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json13
-rw-r--r--packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json12
-rw-r--r--packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json11
-rw-r--r--packages/json-schemas/schemas/relayer_api_error_response_schema.json21
-rw-r--r--packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json16
-rw-r--r--packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json24
-rw-r--r--packages/json-schemas/schemas/relayer_api_order_config_response_schema.json11
-rw-r--r--packages/json-schemas/schemas/relayer_api_order_schema.json9
-rw-r--r--packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json9
-rw-r--r--packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json14
-rw-r--r--packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json11
-rw-r--r--packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json11
-rw-r--r--packages/json-schemas/schemas/relayer_api_orders_response_schema.json13
-rw-r--r--packages/json-schemas/schemas/relayer_api_orders_schema.json5
-rw-r--r--packages/json-schemas/schemas/request_opts_schema.json7
-rw-r--r--packages/json-schemas/schemas/signed_order_schema.json12
-rw-r--r--packages/json-schemas/schemas/signed_orders_schema.json5
-rw-r--r--packages/json-schemas/schemas/token_schema.json11
-rw-r--r--packages/json-schemas/schemas/tx_data_schema.json26
-rw-r--r--packages/json-schemas/schemas/whole_number_schema.json12
-rw-r--r--packages/json-schemas/schemas/zero_ex_transaction_schema.json10
-rw-r--r--packages/json-schemas/src/index.ts4
-rw-r--r--packages/json-schemas/src/schema_validator.ts61
-rw-r--r--packages/json-schemas/src/schemas.ts95
-rw-r--r--packages/json-schemas/test/schema_test.ts872
-rw-r--r--packages/json-schemas/tsconfig.json57
-rw-r--r--packages/json-schemas/tslint.json3
-rw-r--r--packages/json-schemas/typedoc-tsconfig.json7
-rw-r--r--packages/metacoin/README.md97
-rw-r--r--packages/metacoin/compiler.json15
-rw-r--r--packages/metacoin/contracts/Metacoin.sol40
-rw-r--r--packages/metacoin/coverage/.gitkeep0
-rw-r--r--packages/metacoin/package.json64
-rw-r--r--packages/metacoin/src/global.d.ts4
-rw-r--r--packages/metacoin/test/global_hooks.ts15
-rw-r--r--packages/metacoin/test/metacoin_test.ts120
-rw-r--r--packages/metacoin/test/utils/chai_setup.ts13
-rw-r--r--packages/metacoin/test/utils/config.ts12
-rw-r--r--packages/metacoin/test/utils/coverage.ts21
-rw-r--r--packages/metacoin/test/utils/profiler.ts27
-rw-r--r--packages/metacoin/test/utils/web3_wrapper.ts76
-rw-r--r--packages/metacoin/tsconfig.json16
-rw-r--r--packages/metacoin/tslint.json3
-rw-r--r--packages/migrations/.gitignore2
-rw-r--r--packages/migrations/CHANGELOG.json340
-rw-r--r--packages/migrations/CHANGELOG.md148
-rw-r--r--packages/migrations/Dockerfile15
-rw-r--r--packages/migrations/README.md100
-rwxr-xr-xpackages/migrations/bin/0x-migrate.js2
-rw-r--r--packages/migrations/package.json72
-rw-r--r--packages/migrations/src/cli.ts38
-rw-r--r--packages/migrations/src/index.ts11
-rw-r--r--packages/migrations/src/migrate.ts23
-rw-r--r--packages/migrations/src/migrate_snapshot.ts32
-rw-r--r--packages/migrations/src/migration.ts232
-rw-r--r--packages/migrations/src/types.ts29
-rw-r--r--packages/migrations/src/utils/constants.ts18
-rw-r--r--packages/migrations/src/utils/provider_factory.ts39
-rw-r--r--packages/migrations/src/utils/token_info.ts62
-rw-r--r--packages/migrations/tsconfig.json8
-rw-r--r--packages/migrations/tslint.json3
-rw-r--r--packages/migrations/typedoc-tsconfig.json7
-rw-r--r--packages/monorepo-scripts/src/prepublish_checks.ts22
-rw-r--r--packages/order-utils/.npmignore7
-rw-r--r--packages/order-utils/CHANGELOG.json424
-rw-r--r--packages/order-utils/CHANGELOG.md172
-rw-r--r--packages/order-utils/README.md65
-rw-r--r--packages/order-utils/coverage/.gitkeep0
-rw-r--r--packages/order-utils/package.json76
-rw-r--r--packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts23
-rw-r--r--packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts11
-rw-r--r--packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts23
-rw-r--r--packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts13
-rw-r--r--packages/order-utils/src/assert.ts37
-rw-r--r--packages/order-utils/src/asset_data_utils.ts308
-rw-r--r--packages/order-utils/src/constants.ts109
-rw-r--r--packages/order-utils/src/crypto.ts47
-rw-r--r--packages/order-utils/src/eip712_utils.ts83
-rw-r--r--packages/order-utils/src/exchange_transfer_simulator.ts153
-rw-r--r--packages/order-utils/src/index.ts63
-rw-r--r--packages/order-utils/src/market_utils.ts162
-rw-r--r--packages/order-utils/src/order_factory.ts122
-rw-r--r--packages/order-utils/src/order_hash.ts58
-rw-r--r--packages/order-utils/src/order_state_utils.ts346
-rw-r--r--packages/order-utils/src/order_validation_utils.ts257
-rw-r--r--packages/order-utils/src/parsing_utils.ts27
-rw-r--r--packages/order-utils/src/rate_utils.ts48
-rw-r--r--packages/order-utils/src/remaining_fillable_calculator.ts86
-rw-r--r--packages/order-utils/src/salt.ts18
-rw-r--r--packages/order-utils/src/signature_utils.ts417
-rw-r--r--packages/order-utils/src/sorting_utils.ts54
-rw-r--r--packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts140
-rw-r--r--packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts113
-rw-r--r--packages/order-utils/src/types.ts66
-rw-r--r--packages/order-utils/src/utils.ts22
-rw-r--r--packages/order-utils/test/assert_test.ts34
-rw-r--r--packages/order-utils/test/asset_data_utils_test.ts110
-rw-r--r--packages/order-utils/test/eip712_utils_test.ts44
-rw-r--r--packages/order-utils/test/exchange_transfer_simulator_test.ts174
-rw-r--r--packages/order-utils/test/market_utils_test.ts267
-rw-r--r--packages/order-utils/test/order_hash_test.ts77
-rw-r--r--packages/order-utils/test/order_state_utils_test.ts145
-rw-r--r--packages/order-utils/test/order_validation_utils_test.ts70
-rw-r--r--packages/order-utils/test/rate_utils_test.ts55
-rw-r--r--packages/order-utils/test/remaining_fillable_calculator_test.ts246
-rw-r--r--packages/order-utils/test/signature_utils_test.ts324
-rw-r--r--packages/order-utils/test/sorting_utils_test.ts67
-rw-r--r--packages/order-utils/test/utils/chai_setup.ts13
-rw-r--r--packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts25
-rw-r--r--packages/order-utils/test/utils/test_order_factory.ts33
-rw-r--r--packages/order-utils/test/utils/web3_wrapper.ts8
-rw-r--r--packages/order-utils/tsconfig.json8
-rw-r--r--packages/order-utils/tslint.json3
-rw-r--r--packages/order-utils/typedoc-tsconfig.json7
-rw-r--r--packages/order-watcher/.npmignore9
-rw-r--r--packages/order-watcher/CHANGELOG.json385
-rw-r--r--packages/order-watcher/CHANGELOG.md162
-rw-r--r--packages/order-watcher/Dockerfile13
-rw-r--r--packages/order-watcher/README.md167
-rw-r--r--packages/order-watcher/coverage/.gitkeep0
-rw-r--r--packages/order-watcher/package.json89
-rw-r--r--packages/order-watcher/src/index.ts25
-rw-r--r--packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts54
-rw-r--r--packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts243
-rw-r--r--packages/order-watcher/src/order_watcher/event_watcher.ts158
-rw-r--r--packages/order-watcher/src/order_watcher/expiration_watcher.ts89
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts490
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher_web_socket_server.ts200
-rw-r--r--packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts13
-rw-r--r--packages/order-watcher/src/server.ts44
-rw-r--r--packages/order-watcher/src/types.ts97
-rw-r--r--packages/order-watcher/src/utils/assert.ts23
-rw-r--r--packages/order-watcher/src/utils/utils.ts11
-rw-r--r--packages/order-watcher/test/expiration_watcher_test.ts199
-rw-r--r--packages/order-watcher/test/global_hooks.ts6
-rw-r--r--packages/order-watcher/test/order_watcher_test.ts887
-rw-r--r--packages/order-watcher/test/order_watcher_web_socket_server_test.ts312
-rw-r--r--packages/order-watcher/test/utils/chai_setup.ts13
-rw-r--r--packages/order-watcher/test/utils/constants.ts5
-rw-r--r--packages/order-watcher/test/utils/migrate.ts18
-rw-r--r--packages/order-watcher/test/utils/web3_wrapper.ts8
-rw-r--r--packages/order-watcher/tsconfig.json8
-rw-r--r--packages/order-watcher/tslint.json6
-rw-r--r--packages/order-watcher/typedoc-tsconfig.json7
-rw-r--r--packages/pipeline/.npmignore7
-rw-r--r--packages/pipeline/README.md184
-rw-r--r--packages/pipeline/coverage/.gitkeep0
-rw-r--r--packages/pipeline/migrations/1542070840010-InitialSchema.ts187
-rw-r--r--packages/pipeline/migrations/1542147915364-NewSraOrderTimestampFormat.ts48
-rw-r--r--packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts13
-rw-r--r--packages/pipeline/migrations/1542234704666-ConvertBigNumberToNumeric.ts53
-rw-r--r--packages/pipeline/migrations/1542249766882-AddHomepageUrlToRelayers.ts14
-rw-r--r--packages/pipeline/migrations/1542401122477-MakeTakerAddressNullable.ts17
-rw-r--r--packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts60
-rw-r--r--packages/pipeline/migrations/1543434472116-TokenOrderbookSnapshots.ts30
-rw-r--r--packages/pipeline/migrations/1543446690436-CreateDexTrades.ts41
-rw-r--r--packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts17
-rw-r--r--packages/pipeline/migrations/1543983324954-ConvertTransactionGasPriceToBigNumber.ts19
-rw-r--r--packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts26
-rw-r--r--packages/pipeline/migrations/1544131658904-TokenOrderbookSnapshotAddOrderType.ts33
-rw-r--r--packages/pipeline/migrations/1545440485644-CreateCopperTables.ts103
-rw-r--r--packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts21
-rw-r--r--packages/pipeline/package.json66
-rw-r--r--packages/pipeline/src/data_sources/bloxy/index.ts133
-rw-r--r--packages/pipeline/src/data_sources/contract-wrappers/erc20_events.ts45
-rw-r--r--packages/pipeline/src/data_sources/contract-wrappers/exchange_events.ts59
-rw-r--r--packages/pipeline/src/data_sources/contract-wrappers/utils.ts67
-rw-r--r--packages/pipeline/src/data_sources/copper/index.ts126
-rw-r--r--packages/pipeline/src/data_sources/ddex/index.ts77
-rw-r--r--packages/pipeline/src/data_sources/idex/index.ts82
-rw-r--r--packages/pipeline/src/data_sources/oasis/index.ts103
-rw-r--r--packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts110
-rw-r--r--packages/pipeline/src/data_sources/paradex/index.ts92
-rw-r--r--packages/pipeline/src/data_sources/relayer-registry/index.ts33
-rw-r--r--packages/pipeline/src/data_sources/trusted_tokens/index.ts29
-rw-r--r--packages/pipeline/src/data_sources/web3/index.ts22
-rw-r--r--packages/pipeline/src/entities/block.ts13
-rw-r--r--packages/pipeline/src/entities/copper_activity.ts41
-rw-r--r--packages/pipeline/src/entities/copper_activity_type.ts17
-rw-r--r--packages/pipeline/src/entities/copper_custom_field.ts15
-rw-r--r--packages/pipeline/src/entities/copper_lead.ts38
-rw-r--r--packages/pipeline/src/entities/copper_opportunity.ts45
-rw-r--r--packages/pipeline/src/entities/dex_trade.ts54
-rw-r--r--packages/pipeline/src/entities/erc20_approval_event.ts26
-rw-r--r--packages/pipeline/src/entities/exchange_cancel_event.ts51
-rw-r--r--packages/pipeline/src/entities/exchange_cancel_up_to_event.ts26
-rw-r--r--packages/pipeline/src/entities/exchange_fill_event.ts60
-rw-r--r--packages/pipeline/src/entities/index.ts25
-rw-r--r--packages/pipeline/src/entities/ohlcv_external.ts30
-rw-r--r--packages/pipeline/src/entities/relayer.ts21
-rw-r--r--packages/pipeline/src/entities/sra_order.ts63
-rw-r--r--packages/pipeline/src/entities/sra_order_observed_timestamp.ts35
-rw-r--r--packages/pipeline/src/entities/token_metadata.ts22
-rw-r--r--packages/pipeline/src/entities/token_order.ts28
-rw-r--r--packages/pipeline/src/entities/transaction.ts19
-rw-r--r--packages/pipeline/src/ormconfig.ts54
-rw-r--r--packages/pipeline/src/parsers/bloxy/index.ts53
-rw-r--r--packages/pipeline/src/parsers/copper/index.ts259
-rw-r--r--packages/pipeline/src/parsers/ddex_orders/index.ts69
-rw-r--r--packages/pipeline/src/parsers/events/erc20_events.ts34
-rw-r--r--packages/pipeline/src/parsers/events/exchange_events.ts145
-rw-r--r--packages/pipeline/src/parsers/events/index.ts2
-rw-r--r--packages/pipeline/src/parsers/idex_orders/index.ts81
-rw-r--r--packages/pipeline/src/parsers/oasis_orders/index.ts71
-rw-r--r--packages/pipeline/src/parsers/ohlcv_external/crypto_compare.ts38
-rw-r--r--packages/pipeline/src/parsers/paradex_orders/index.ts66
-rw-r--r--packages/pipeline/src/parsers/relayer_registry/index.ts37
-rw-r--r--packages/pipeline/src/parsers/sra_orders/index.ts68
-rw-r--r--packages/pipeline/src/parsers/token_metadata/index.ts46
-rw-r--r--packages/pipeline/src/parsers/utils.ts28
-rw-r--r--packages/pipeline/src/parsers/web3/index.ts49
-rw-r--r--packages/pipeline/src/scripts/pull_competing_dex_trades.ts52
-rw-r--r--packages/pipeline/src/scripts/pull_copper.ts130
-rw-r--r--packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts55
-rw-r--r--packages/pipeline/src/scripts/pull_erc20_events.ts96
-rw-r--r--packages/pipeline/src/scripts/pull_exchange_events.ts146
-rw-r--r--packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts63
-rw-r--r--packages/pipeline/src/scripts/pull_missing_blocks.ts91
-rw-r--r--packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts58
-rw-r--r--packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts96
-rw-r--r--packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts87
-rw-r--r--packages/pipeline/src/scripts/pull_radar_relay_orders.ts62
-rw-r--r--packages/pipeline/src/scripts/pull_trusted_tokens.ts48
-rw-r--r--packages/pipeline/src/scripts/update_relayer_info.ts34
-rw-r--r--packages/pipeline/src/types.ts9
-rw-r--r--packages/pipeline/src/utils/constants.ts3
-rw-r--r--packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts116
-rw-r--r--packages/pipeline/src/utils/index.ts53
-rw-r--r--packages/pipeline/src/utils/transformers/asset_proxy_id_types.ts20
-rw-r--r--packages/pipeline/src/utils/transformers/big_number.ts16
-rw-r--r--packages/pipeline/src/utils/transformers/index.ts3
-rw-r--r--packages/pipeline/src/utils/transformers/number_to_bigint.ts31
-rw-r--r--packages/pipeline/test/data_sources/contract-wrappers/utils_test.ts109
-rw-r--r--packages/pipeline/test/data_sources/ohlcv_external/crypto_compare_test.ts47
-rw-r--r--packages/pipeline/test/db_global_hooks.ts9
-rw-r--r--packages/pipeline/test/db_setup.ts174
-rw-r--r--packages/pipeline/test/entities/block_test.ts23
-rw-r--r--packages/pipeline/test/entities/copper_test.ts54
-rw-r--r--packages/pipeline/test/entities/dex_trades_test.ts60
-rw-r--r--packages/pipeline/test/entities/erc20_approval_events_test.ts29
-rw-r--r--packages/pipeline/test/entities/exchange_cancel_event_test.ts57
-rw-r--r--packages/pipeline/test/entities/exchange_cancel_up_to_event_test.ts29
-rw-r--r--packages/pipeline/test/entities/exchange_fill_event_test.ts62
-rw-r--r--packages/pipeline/test/entities/ohlcv_external_test.ts35
-rw-r--r--packages/pipeline/test/entities/relayer_test.ts55
-rw-r--r--packages/pipeline/test/entities/sra_order_test.ts84
-rw-r--r--packages/pipeline/test/entities/token_metadata_test.ts39
-rw-r--r--packages/pipeline/test/entities/token_order_test.ts31
-rw-r--r--packages/pipeline/test/entities/transaction_test.ts26
-rw-r--r--packages/pipeline/test/entities/util.ts25
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_activity_types.json24
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_activity_types.ts16
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.json38
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.ts39
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_activities.json242
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_activities.ts305
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_leads.json577
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_leads.ts229
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.json662
-rw-r--r--packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.ts425
-rw-r--r--packages/pipeline/test/fixtures/copper/parsed_entities.ts5
-rw-r--r--packages/pipeline/test/parsers/bloxy/index_test.ts98
-rw-r--r--packages/pipeline/test/parsers/copper/index_test.ts87
-rw-r--r--packages/pipeline/test/parsers/ddex_orders/index_test.ts52
-rw-r--r--packages/pipeline/test/parsers/events/erc20_events_test.ts54
-rw-r--r--packages/pipeline/test/parsers/events/exchange_events_test.ts79
-rw-r--r--packages/pipeline/test/parsers/idex_orders/index_test.ts87
-rw-r--r--packages/pipeline/test/parsers/oasis_orders/index_test.ts49
-rw-r--r--packages/pipeline/test/parsers/ohlcv_external/crypto_compare_test.ts62
-rw-r--r--packages/pipeline/test/parsers/paradex_orders/index_test.ts54
-rw-r--r--packages/pipeline/test/parsers/sra_orders/index_test.ts69
-rw-r--r--packages/pipeline/test/parsers/utils/index_test.ts30
-rw-r--r--packages/pipeline/test/utils/chai_setup.ts13
-rw-r--r--packages/pipeline/tsconfig.json18
-rw-r--r--packages/pipeline/tslint.json3
-rw-r--r--packages/pipeline/typedoc-tsconfig.json10
-rw-r--r--packages/react-docs/.npmignore6
-rw-r--r--packages/react-docs/CHANGELOG.json407
-rw-r--r--packages/react-docs/CHANGELOG.md176
-rw-r--r--packages/react-docs/README.md96
-rw-r--r--packages/react-docs/package.json61
-rw-r--r--packages/react-docs/src/components/badge.tsx55
-rw-r--r--packages/react-docs/src/components/comment.tsx22
-rw-r--r--packages/react-docs/src/components/custom_enum.tsx33
-rw-r--r--packages/react-docs/src/components/doc_reference.tsx318
-rw-r--r--packages/react-docs/src/components/enum.tsx23
-rw-r--r--packages/react-docs/src/components/event_definition.tsx89
-rw-r--r--packages/react-docs/src/components/interface.tsx89
-rw-r--r--packages/react-docs/src/components/property_block.tsx78
-rw-r--r--packages/react-docs/src/components/signature.tsx164
-rw-r--r--packages/react-docs/src/components/signature_block.tsx153
-rw-r--r--packages/react-docs/src/components/source_link.tsx21
-rw-r--r--packages/react-docs/src/components/type.tsx271
-rw-r--r--packages/react-docs/src/components/type_definition.tsx188
-rw-r--r--packages/react-docs/src/docs_info.ts118
-rw-r--r--packages/react-docs/src/globals.d.ts6
-rw-r--r--packages/react-docs/src/index.ts23
-rw-r--r--packages/react-docs/src/types.ts66
-rw-r--r--packages/react-docs/src/utils/constants.ts10
-rw-r--r--packages/react-docs/src/utils/typedoc_utils.ts507
-rw-r--r--packages/react-docs/tsconfig.json14
-rw-r--r--packages/react-docs/tslint.json9
-rw-r--r--packages/react-shared/.npmignore6
-rw-r--r--packages/react-shared/CHANGELOG.json370
-rw-r--r--packages/react-shared/CHANGELOG.md164
-rw-r--r--packages/react-shared/README.md63
-rw-r--r--packages/react-shared/package.json65
-rw-r--r--packages/react-shared/src/components/anchor_title.tsx74
-rw-r--r--packages/react-shared/src/components/link.tsx150
-rw-r--r--packages/react-shared/src/components/markdown_code_block.tsx24
-rw-r--r--packages/react-shared/src/components/markdown_link_block.tsx47
-rw-r--r--packages/react-shared/src/components/markdown_paragraph_block.tsx10
-rw-r--r--packages/react-shared/src/components/markdown_section.tsx106
-rw-r--r--packages/react-shared/src/components/section_header.tsx73
-rw-r--r--packages/react-shared/src/globals.d.ts6
-rw-r--r--packages/react-shared/src/index.ts12
-rw-r--r--packages/react-shared/src/types.ts33
-rw-r--r--packages/react-shared/src/utils/colors.ts59
-rw-r--r--packages/react-shared/src/utils/constants.ts19
-rw-r--r--packages/react-shared/src/utils/utils.ts52
-rw-r--r--packages/react-shared/tsconfig.json13
-rw-r--r--packages/react-shared/tslint.json9
-rw-r--r--packages/sol-compiler/README.md14
-rw-r--r--packages/sol-compiler/package.json9
-rw-r--r--packages/sol-compiler/src/compiler.ts2
-rw-r--r--packages/sol-compiler/src/solc/bin_paths.ts49
-rw-r--r--packages/sol-compiler/src/utils/compiler.ts2
-rw-r--r--packages/sol-compiler/src/utils/constants.ts2
-rw-r--r--packages/sol-coverage/CHANGELOG.json2
-rw-r--r--packages/sol-coverage/CHANGELOG.md2
-rw-r--r--packages/sol-coverage/README.md12
-rw-r--r--packages/sol-coverage/package.json6
-rw-r--r--packages/sol-coverage/src/coverage_subprovider.ts2
-rw-r--r--packages/sol-coverage/src/index.ts4
-rw-r--r--packages/sol-doc/package.json4
-rw-r--r--packages/sol-doc/src/sol_doc.ts2
-rw-r--r--packages/sol-profiler/CHANGELOG.json2
-rw-r--r--packages/sol-profiler/CHANGELOG.md2
-rw-r--r--packages/sol-profiler/README.md12
-rw-r--r--packages/sol-profiler/package.json6
-rw-r--r--packages/sol-profiler/src/index.ts4
-rw-r--r--packages/sol-profiler/src/profiler_subprovider.ts2
-rw-r--r--packages/sol-resolver/CHANGELOG.json297
-rw-r--r--packages/sol-resolver/CHANGELOG.md129
-rw-r--r--packages/sol-resolver/README.md67
-rw-r--r--packages/sol-resolver/package.json40
-rw-r--r--packages/sol-resolver/src/globals.d.ts7
-rw-r--r--packages/sol-resolver/src/index.ts10
-rw-r--r--packages/sol-resolver/src/resolvers/enumerable_resolver.ts7
-rw-r--r--packages/sol-resolver/src/resolvers/fallthrough_resolver.ts21
-rw-r--r--packages/sol-resolver/src/resolvers/fs_resolver.ts16
-rw-r--r--packages/sol-resolver/src/resolvers/name_resolver.ts66
-rw-r--r--packages/sol-resolver/src/resolvers/npm_resolver.ts42
-rw-r--r--packages/sol-resolver/src/resolvers/relative_fs_resolver.ts23
-rw-r--r--packages/sol-resolver/src/resolvers/resolver.ts14
-rw-r--r--packages/sol-resolver/src/resolvers/spy_resolver.ts25
-rw-r--r--packages/sol-resolver/src/resolvers/url_resolver.ts18
-rw-r--r--packages/sol-resolver/src/types.ts9
-rw-r--r--packages/sol-resolver/tsconfig.json8
-rw-r--r--packages/sol-resolver/tslint.json3
-rw-r--r--packages/sol-trace/CHANGELOG.json2
-rw-r--r--packages/sol-trace/CHANGELOG.md2
-rw-r--r--packages/sol-trace/package.json6
-rw-r--r--packages/sol-trace/src/index.ts4
-rw-r--r--packages/sol-trace/src/revert_trace_subprovider.ts2
-rw-r--r--packages/sol-tracing-utils/README.md6
-rw-r--r--packages/sol-tracing-utils/package.json8
-rw-r--r--packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts2
-rw-r--r--packages/sol-tracing-utils/src/trace_collection_subprovider.ts2
-rw-r--r--packages/sra-spec/.discharge.json13
-rw-r--r--packages/sra-spec/.gitignore1
-rw-r--r--packages/sra-spec/.npmignore8
-rw-r--r--packages/sra-spec/CHANGELOG.json188
-rw-r--r--packages/sra-spec/CHANGELOG.md83
-rw-r--r--packages/sra-spec/README.md93
-rw-r--r--packages/sra-spec/build_scripts/buildJson.ts7
-rw-r--r--packages/sra-spec/package.json63
-rw-r--r--packages/sra-spec/public/index.html24
-rw-r--r--packages/sra-spec/src/api.ts310
-rw-r--r--packages/sra-spec/src/errors.ts24
-rw-r--r--packages/sra-spec/src/examples/errors.ts11
-rw-r--r--packages/sra-spec/src/examples/index.ts21
-rw-r--r--packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts22
-rw-r--r--packages/sra-spec/src/examples/relayerApiFeeRecipientsResponse.ts10
-rw-r--r--packages/sra-spec/src/examples/relayerApiOrder.ts20
-rw-r--r--packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts11
-rw-r--r--packages/sra-spec/src/examples/relayerApiOrderConfigResponse.ts6
-rw-r--r--packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts56
-rw-r--r--packages/sra-spec/src/examples/relayerApiOrdersResponse.ts27
-rw-r--r--packages/sra-spec/src/examples/signedOrder.ts17
-rw-r--r--packages/sra-spec/src/headers.ts20
-rw-r--r--packages/sra-spec/src/index.ts1
-rw-r--r--packages/sra-spec/src/json-schemas.ts65
-rw-r--r--packages/sra-spec/src/md/index.ts5
-rw-r--r--packages/sra-spec/src/md/introduction.md210
-rw-r--r--packages/sra-spec/src/parameters.ts39
-rw-r--r--packages/sra-spec/src/responses.ts24
-rw-r--r--packages/sra-spec/tsconfig.json8
-rw-r--r--packages/sra-spec/tslint.json3
-rw-r--r--packages/subproviders/README.md8
-rw-r--r--packages/subproviders/package.json4
-rw-r--r--packages/subproviders/src/subproviders/ganache.ts2
-rw-r--r--packages/testnet-faucets/Dockerfile13
-rw-r--r--packages/testnet-faucets/README.md153
-rw-r--r--packages/testnet-faucets/gulpfile.js91
-rw-r--r--packages/testnet-faucets/package.json50
-rw-r--r--packages/testnet-faucets/src/ts/configs.ts7
-rw-r--r--packages/testnet-faucets/src/ts/constants.ts5
-rw-r--r--packages/testnet-faucets/src/ts/dispatch_queue.ts53
-rw-r--r--packages/testnet-faucets/src/ts/dispense_asset_tasks.ts73
-rw-r--r--packages/testnet-faucets/src/ts/error_reporter.ts37
-rw-r--r--packages/testnet-faucets/src/ts/global.d.ts6
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts200
-rw-r--r--packages/testnet-faucets/src/ts/parameter_transformer.ts28
-rw-r--r--packages/testnet-faucets/src/ts/rpc_urls.ts12
-rw-r--r--packages/testnet-faucets/src/ts/server.ts52
-rw-r--r--packages/testnet-faucets/src/ts/tokens.ts44
-rw-r--r--packages/testnet-faucets/tsconfig.json9
-rw-r--r--packages/testnet-faucets/tslint.json3
-rw-r--r--packages/tslint-config/.npmignore7
-rw-r--r--packages/tslint-config/CHANGELOG.json283
-rw-r--r--packages/tslint-config/CHANGELOG.md124
-rw-r--r--packages/tslint-config/README.md71
-rw-r--r--packages/tslint-config/package.json52
-rw-r--r--packages/tslint-config/rules/asyncSuffixRule.ts10
-rw-r--r--packages/tslint-config/rules/booleanNamingRule.ts69
-rw-r--r--packages/tslint-config/rules/customNoMagicNumbersRule.ts79
-rw-r--r--packages/tslint-config/rules/enumNamingRule.ts60
-rw-r--r--packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts61
-rw-r--r--packages/tslint-config/rules/walkers/async_suffix.ts35
-rw-r--r--packages/tslint-config/test/enumNamingSpec.spec.ts88
-rw-r--r--packages/tslint-config/test/lintrunner.ts23
-rw-r--r--packages/tslint-config/tsconfig.json8
-rw-r--r--packages/tslint-config/tslint.json130
-rw-r--r--packages/types/.npmignore6
-rw-r--r--packages/types/CHANGELOG.json420
-rw-r--r--packages/types/CHANGELOG.md171
-rw-r--r--packages/types/README.md69
-rw-r--r--packages/types/package.json40
-rw-r--r--packages/types/src/globals.d.ts6
-rw-r--r--packages/types/src/index.ts687
-rw-r--r--packages/types/tsconfig.json8
-rw-r--r--packages/types/tslint.json3
-rw-r--r--packages/typescript-typings/package.json10
-rw-r--r--packages/typescript-typings/types/@ledgerhq/index.d.ts45
-rw-r--r--packages/typescript-typings/types/async-child-process/index.d.ts1
-rw-r--r--packages/typescript-typings/types/chai-as-promised/index.d.ts266
-rw-r--r--packages/typescript-typings/types/chai-bignumber/index.d.ts1
-rw-r--r--packages/typescript-typings/types/chai/index.d.ts1257
-rw-r--r--packages/typescript-typings/types/dirty-chai/index.d.ts1
-rw-r--r--packages/typescript-typings/types/dsolc/index.d.ts (renamed from packages/typescript-typings/types/solc/index.d.ts)2
-rw-r--r--packages/typescript-typings/types/es6-promisify/index.d.ts1
-rw-r--r--packages/typescript-typings/types/ethereumjs-abi/index.d.ts7
-rw-r--r--packages/typescript-typings/types/ethereumjs-util/index.d.ts100
-rw-r--r--packages/typescript-typings/types/ganache-core/index.d.ts23
-rw-r--r--packages/typescript-typings/types/json-rpc-error/index.d.ts8
-rw-r--r--packages/typescript-typings/types/keccak/index.d.ts1
-rw-r--r--packages/typescript-typings/types/openapi-schema-validation/index.d.ts1
-rw-r--r--packages/typescript-typings/types/promisify-child-process/index.d.ts1
-rw-r--r--packages/typescript-typings/types/publish-release/index.d.ts1
-rw-r--r--packages/typescript-typings/types/react-highlight/index.d.ts1
-rw-r--r--packages/typescript-typings/types/react-popper/index.d.ts49
-rw-r--r--packages/typescript-typings/types/react-tooltip/index.d.ts1
-rw-r--r--packages/typescript-typings/types/react-typist/index.d.ts1
-rw-r--r--packages/typescript-typings/types/request-promise-native/index.d.ts1
-rw-r--r--packages/typescript-typings/types/rollbar/index.d.ts1
-rw-r--r--packages/typescript-typings/types/semver-diff/index.d.ts1
-rw-r--r--packages/typescript-typings/types/semver-sort/index.d.ts3
-rw-r--r--packages/typescript-typings/types/to-snake-case/index.d.ts4
-rw-r--r--packages/typescript-typings/types/truffle-hdwalet-provider/index.d.ts11
-rw-r--r--packages/typescript-typings/types/web3-eth-abi/index.d.ts3
-rw-r--r--packages/typescript-typings/types/web3/index.d.ts231
-rw-r--r--packages/utils/.npmignore6
-rw-r--r--packages/utils/CHANGELOG.json423
-rw-r--r--packages/utils/CHANGELOG.md179
-rw-r--r--packages/utils/README.md84
-rw-r--r--packages/utils/coverage/.gitkeep0
-rw-r--r--packages/utils/package.json64
-rw-r--r--packages/utils/src/abi_decoder.ts113
-rw-r--r--packages/utils/src/abi_encoder/abstract_data_types/data_type.ts76
-rw-r--r--packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts19
-rw-r--r--packages/utils/src/abi_encoder/abstract_data_types/types/blob.ts40
-rw-r--r--packages/utils/src/abi_encoder/abstract_data_types/types/pointer.ts54
-rw-r--r--packages/utils/src/abi_encoder/abstract_data_types/types/set.ts224
-rw-r--r--packages/utils/src/abi_encoder/calldata/blocks/blob.ts20
-rw-r--r--packages/utils/src/abi_encoder/calldata/blocks/pointer.ts61
-rw-r--r--packages/utils/src/abi_encoder/calldata/blocks/set.ts47
-rw-r--r--packages/utils/src/abi_encoder/calldata/calldata.ts245
-rw-r--r--packages/utils/src/abi_encoder/calldata/calldata_block.ts77
-rw-r--r--packages/utils/src/abi_encoder/calldata/iterator.ts114
-rw-r--r--packages/utils/src/abi_encoder/calldata/raw_calldata.ts82
-rw-r--r--packages/utils/src/abi_encoder/evm_data_type_factory.ts165
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/address.ts50
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/array.ts74
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/bool.ts53
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/dynamic_bytes.ts72
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/int.ts63
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/method.ts85
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/pointer.ts21
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/static_bytes.ts78
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/string.ts59
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/tuple.ts34
-rw-r--r--packages/utils/src/abi_encoder/evm_data_types/uint.ts62
-rw-r--r--packages/utils/src/abi_encoder/index.ts16
-rw-r--r--packages/utils/src/abi_encoder/utils/constants.ts17
-rw-r--r--packages/utils/src/abi_encoder/utils/math.ts113
-rw-r--r--packages/utils/src/abi_encoder/utils/queue.ts39
-rw-r--r--packages/utils/src/abi_encoder/utils/rules.ts8
-rw-r--r--packages/utils/src/abi_encoder/utils/signature_parser.ts101
-rw-r--r--packages/utils/src/abi_utils.ts229
-rw-r--r--packages/utils/src/address_utils.ts46
-rw-r--r--packages/utils/src/class_utils.ts18
-rw-r--r--packages/utils/src/configured_bignumber.ts37
-rw-r--r--packages/utils/src/constants.ts1
-rw-r--r--packages/utils/src/error_utils.ts5
-rw-r--r--packages/utils/src/fetch_async.ts40
-rw-r--r--packages/utils/src/globals.d.ts6
-rw-r--r--packages/utils/src/index.ts13
-rw-r--r--packages/utils/src/interval_utils.ts39
-rw-r--r--packages/utils/src/log_utils.ts13
-rw-r--r--packages/utils/src/promisify.ts19
-rw-r--r--packages/utils/src/sign_typed_data_utils.ts83
-rw-r--r--packages/utils/test/abi_encoder/abi_samples/method_abis.ts780
-rw-r--r--packages/utils/test/abi_encoder/abi_samples/optimizer_abis.ts340
-rw-r--r--packages/utils/test/abi_encoder/abi_samples/return_value_abis.ts99
-rw-r--r--packages/utils/test/abi_encoder/evm_data_types_test.ts1168
-rw-r--r--packages/utils/test/abi_encoder/methods_test.ts385
-rw-r--r--packages/utils/test/abi_encoder/optimizer_test.ts269
-rw-r--r--packages/utils/test/abi_encoder/return_values_test.ts77
-rw-r--r--packages/utils/test/abi_encoder/signature_tests.ts0
-rw-r--r--packages/utils/test/abi_utils_test.ts19
-rw-r--r--packages/utils/test/sign_typed_data_utils_test.ts163
-rw-r--r--packages/utils/test/utils/chai_setup.ts13
-rw-r--r--packages/utils/tsconfig.json8
-rw-r--r--packages/utils/tslint.json3
-rw-r--r--packages/verdaccio/Dockerfile3
-rw-r--r--packages/verdaccio/README.md18
-rw-r--r--packages/verdaccio/conf.yaml71
-rw-r--r--packages/web3-wrapper/.npmignore6
-rw-r--r--packages/web3-wrapper/CHANGELOG.json489
-rw-r--r--packages/web3-wrapper/CHANGELOG.md190
-rw-r--r--packages/web3-wrapper/README.md71
-rw-r--r--packages/web3-wrapper/coverage/.gitkeep0
-rw-r--r--packages/web3-wrapper/package.json69
-rw-r--r--packages/web3-wrapper/src/globals.d.ts6
-rw-r--r--packages/web3-wrapper/src/index.ts60
-rw-r--r--packages/web3-wrapper/src/marshaller.ts230
-rw-r--r--packages/web3-wrapper/src/types.ts92
-rw-r--r--packages/web3-wrapper/src/utils.ts54
-rw-r--r--packages/web3-wrapper/src/web3_wrapper.ts703
-rw-r--r--packages/web3-wrapper/test/utils/chai_setup.ts13
-rw-r--r--packages/web3-wrapper/test/web3_wrapper_test.ts169
-rw-r--r--packages/web3-wrapper/tsconfig.json8
-rw-r--r--packages/web3-wrapper/tslint.json3
-rw-r--r--packages/web3-wrapper/typedoc-tsconfig.json7
-rw-r--r--packages/website/.gitignore1
-rw-r--r--packages/website/README.md69
-rw-r--r--packages/website/contracts/Mintable.json189
-rw-r--r--packages/website/less/all.less146
-rw-r--r--packages/website/less/normalize.less349
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/async.md26
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/errors.md1
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/installation.md31
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/introduction.md1
-rw-r--r--packages/website/md/docs/0xjs/0.0.1/versioning.md1
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/async.md31
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/installation.md40
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/introduction.md1
-rw-r--r--packages/website/md/docs/0xjs/1.0.1/versioning.md1
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/async.md26
-rw-r--r--packages/website/md/docs/0xjs/2.0.0/installation.md38
-rw-r--r--packages/website/md/docs/asset_buyer/installation.md17
-rw-r--r--packages/website/md/docs/asset_buyer/introduction.md1
-rw-r--r--packages/website/md/docs/asset_buyer/usage.md39
-rw-r--r--packages/website/md/docs/connect/1/installation.md15
-rw-r--r--packages/website/md/docs/connect/1/introduction.md1
-rw-r--r--packages/website/md/docs/connect/2/introduction.md1
-rw-r--r--packages/website/md/docs/connect/3/installation.md15
-rw-r--r--packages/website/md/docs/contract_wrappers/1/installation.md11
-rw-r--r--packages/website/md/docs/contract_wrappers/1/introduction.md1
-rw-r--r--packages/website/md/docs/contract_wrappers/2/installation.md11
-rw-r--r--packages/website/md/docs/ethereum_types/installation.md11
-rw-r--r--packages/website/md/docs/ethereum_types/introduction.md1
-rw-r--r--packages/website/md/docs/json_schemas/1/installation.md17
-rw-r--r--packages/website/md/docs/json_schemas/1/introduction.md3
-rw-r--r--packages/website/md/docs/json_schemas/1/schemas.md28
-rw-r--r--packages/website/md/docs/json_schemas/1/usage.md14
-rw-r--r--packages/website/md/docs/json_schemas/2/schemas.md40
-rw-r--r--packages/website/md/docs/json_schemas/3/installation.md17
-rw-r--r--packages/website/md/docs/json_schemas/3/introduction.md3
-rw-r--r--packages/website/md/docs/json_schemas/3/schemas.md41
-rw-r--r--packages/website/md/docs/json_schemas/3/usage.md14
-rw-r--r--packages/website/md/docs/migrations/1/installation.md17
-rw-r--r--packages/website/md/docs/migrations/1/introduction.md1
-rw-r--r--packages/website/md/docs/order_utils/1/installation.md17
-rw-r--r--packages/website/md/docs/order_utils/1/introduction.md1
-rw-r--r--packages/website/md/docs/order_utils/2/installation.md17
-rw-r--r--packages/website/md/docs/order_utils/2/introduction.md1
-rw-r--r--packages/website/md/docs/order_watcher/1/installation.md17
-rw-r--r--packages/website/md/docs/order_watcher/1/introduction.md1
-rw-r--r--packages/website/md/docs/order_watcher/2/installation.md17
-rw-r--r--packages/website/md/docs/order_watcher/2/introduction.md1
-rw-r--r--packages/website/md/docs/smart_contracts/1/introduction.md1
-rw-r--r--packages/website/md/docs/smart_contracts/2/introduction.md6
-rw-r--r--packages/website/md/docs/sol-compiler/1/installation.md23
-rw-r--r--packages/website/md/docs/sol-compiler/1/introduction.md8
-rw-r--r--packages/website/md/docs/sol-compiler/1/usage.md24
-rw-r--r--packages/website/md/docs/sol-compiler/2/installation.md23
-rw-r--r--packages/website/md/docs/sol-compiler/2/usage.md24
-rw-r--r--packages/website/md/docs/sol_coverage/installation.md17
-rw-r--r--packages/website/md/docs/sol_coverage/introduction.md1
-rw-r--r--packages/website/md/docs/sol_coverage/usage.md74
-rw-r--r--packages/website/md/docs/sol_profiler/installation.md17
-rw-r--r--packages/website/md/docs/sol_profiler/introduction.md1
-rw-r--r--packages/website/md/docs/sol_profiler/usage.md74
-rw-r--r--packages/website/md/docs/sol_trace/installation.md17
-rw-r--r--packages/website/md/docs/sol_trace/introduction.md1
-rw-r--r--packages/website/md/docs/sol_trace/usage.md62
-rw-r--r--packages/website/md/docs/subproviders/1/installation.md15
-rw-r--r--packages/website/md/docs/subproviders/1/introduction.md1
-rw-r--r--packages/website/md/docs/subproviders/1/ledger_node_hid.md17
-rw-r--r--packages/website/md/docs/subproviders/2/installation.md15
-rw-r--r--packages/website/md/docs/web3_wrapper/1/installation.md25
-rw-r--r--packages/website/md/docs/web3_wrapper/1/introduction.md1
-rw-r--r--packages/website/md/docs/web3_wrapper/2/installation.md25
-rw-r--r--packages/website/package.json128
-rw-r--r--packages/website/public/css/basscss.min.css1
-rw-r--r--packages/website/public/css/basscss_responsive_custom.css106
-rw-r--r--packages/website/public/css/basscss_responsive_margin.css453
-rw-r--r--packages/website/public/css/basscss_responsive_padding.css134
-rw-r--r--packages/website/public/css/basscss_responsive_type_scale.css35
-rw-r--r--packages/website/public/css/formular.css45
-rw-r--r--packages/website/public/css/github-gist.css71
-rwxr-xr-xpackages/website/public/css/material-design-iconic-font.min.css1
-rw-r--r--packages/website/public/css/roboto.css89
-rw-r--r--packages/website/public/css/roboto_mono.css69
-rw-r--r--packages/website/public/fonts/Formular-Light.woffbin44630 -> 0 bytes
-rw-r--r--packages/website/public/fonts/Formular-Light.woff2bin34337 -> 0 bytes
-rw-r--r--packages/website/public/fonts/Formular-Regular.woffbin45102 -> 0 bytes
-rw-r--r--packages/website/public/fonts/Formular-Regular.woff2bin34607 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Material-Design-Iconic-Font.eotbin42495 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Material-Design-Iconic-Font.svg787
-rwxr-xr-xpackages/website/public/fonts/Material-Design-Iconic-Font.ttfbin99212 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Material-Design-Iconic-Font.woffbin50312 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Material-Design-Iconic-Font.woff2bin38384 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Black.ttfbin171480 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-BlackItalic.ttfbin177552 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Bold.ttfbin170760 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-BoldItalic.ttfbin174952 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Italic.ttfbin173932 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Light.ttfbin170420 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-LightItalic.ttfbin176616 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Medium.ttfbin172064 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-MediumItalic.ttfbin176864 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Regular.ttfbin171676 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-Thin.ttfbin171904 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/Roboto-ThinItalic.ttfbin176300 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Bold.ttfbin114752 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-BoldItalic.ttfbin122808 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Italic.ttfbin120832 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Light.ttfbin118976 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-LightItalic.ttfbin127568 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Medium.ttfbin114696 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-MediumItalic.ttfbin123640 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Regular.ttfbin114624 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-Thin.ttfbin118132 -> 0 bytes
-rwxr-xr-xpackages/website/public/fonts/RobotoMono-ThinItalic.ttfbin121456 -> 0 bytes
-rw-r--r--packages/website/public/gifs/genesis.gifbin735849 -> 0 bytes
-rw-r--r--packages/website/public/images/0x-instant/0x-instant-widgets.pngbin64041 -> 0 bytes
-rw-r--r--packages/website/public/images/0x-instant/0x-instant-widgets@2x.pngbin190593 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-1.pngbin27160 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-2.pngbin47878 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-3.pngbin27505 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-4.pngbin30727 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-5.pngbin144454 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/0x-instant/widget-6.pngbin28382 -> 0 bytes
-rw-r--r--packages/website/public/images/0x_logo.pngbin64503 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/about/about-office.pngbin474673 -> 0 bytes
-rw-r--r--packages/website/public/images/banner/bottomofcta.pngbin15803 -> 0 bytes
-rw-r--r--packages/website/public/images/banner/topofcta.pngbin13342 -> 0 bytes
-rw-r--r--packages/website/public/images/clients/bamboo.svg17
-rw-r--r--packages/website/public/images/clients/emoon.svg8
-rw-r--r--packages/website/public/images/clients/ercdex.svg16
-rw-r--r--packages/website/public/images/clients/godsUnchained.svg16
-rw-r--r--packages/website/public/images/clients/instex.svg40
-rw-r--r--packages/website/public/images/clients/laketrade.svg13
-rw-r--r--packages/website/public/images/clients/ledgerdex.svg19
-rw-r--r--packages/website/public/images/clients/openrelay.svg22
-rw-r--r--packages/website/public/images/clients/paradex.svg9
-rw-r--r--packages/website/public/images/clients/radar-relay.svg13
-rw-r--r--packages/website/public/images/clients/sharkrelay.svg32
-rw-r--r--packages/website/public/images/clients/starbitex.svg22
-rw-r--r--packages/website/public/images/clients/tokenjar.svg13
-rw-r--r--packages/website/public/images/clients/veil.svg4
-rw-r--r--packages/website/public/images/coinbase_wallet_logo.pngbin103648 -> 0 bytes
-rw-r--r--packages/website/public/images/developers/logo/0x.svg24
-rw-r--r--packages/website/public/images/developers/logo/docs.svg6
-rw-r--r--packages/website/public/images/developers/tutorials/0x_order_basics.svg1
-rw-r--r--packages/website/public/images/developers/tutorials/build_a_relayer.svg3
-rw-r--r--packages/website/public/images/developers/tutorials/build_a_trading_bot.svg6
-rw-r--r--packages/website/public/images/developers/tutorials/develop_on_ethereum.svg4
-rw-r--r--packages/website/public/images/developers/tutorials/integrate_0x_instant.svg3
-rw-r--r--packages/website/public/images/developers/tutorials/use_shared_liquidity.svg3
-rw-r--r--packages/website/public/images/doc_icons/connect.pngbin289 -> 0 bytes
-rw-r--r--packages/website/public/images/doc_icons/contracts.pngbin930 -> 0 bytes
-rw-r--r--packages/website/public/images/doc_icons/docs.pngbin578 -> 0 bytes
-rw-r--r--packages/website/public/images/doc_icons/wiki.pngbin760 -> 0 bytes
-rw-r--r--packages/website/public/images/doc_icons/zeroExJs.pngbin1209 -> 0 bytes
-rw-r--r--packages/website/public/images/eth_dollar.svg29
-rw-r--r--packages/website/public/images/eth_token.svg20
-rw-r--r--packages/website/public/images/eth_token_erc20.svg22
-rw-r--r--packages/website/public/images/ether.pngbin4235 -> 0 bytes
-rw-r--r--packages/website/public/images/ether_alt.svg7
-rw-r--r--packages/website/public/images/events/berlin.jpgbin108690 -> 0 bytes
-rw-r--r--packages/website/public/images/events/event-sample.jpgbin24594 -> 0 bytes
-rw-r--r--packages/website/public/images/events/london.jpgbin138979 -> 0 bytes
-rw-r--r--packages/website/public/images/events/sf.jpgbin108324 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/favicon/favicon-2-16x16.pngbin684 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/favicon/favicon-2-32x32.pngbin1567 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/favicon/favicon.icobin5430 -> 0 bytes
-rw-r--r--packages/website/public/images/jobs/map@2x.pngbin27904 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/0x_chips.pngbin170875 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/0x_homepage.svg341
-rw-r--r--packages/website/public/images/landing/aragon.pngbin4738 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/augur.pngbin4935 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/currency.pngbin3348 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/dharma.pngbin4754 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/digital_goods.pngbin3880 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/distributed_network.pngbin37483 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/ethfinex.pngbin6733 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/exchange_everywhere.pngbin7084 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/fund_management_icon.pngbin5552 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/gnosis.pngbin4888 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/governance_icon.pngbin6230 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/hero_chip_image.pngbin256493 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/lendroid.pngbin4305 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/liquidity.pngbin22140 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/loans_icon.pngbin5900 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/maker.pngbin3501 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/melonport.pngbin4841 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/open_source.pngbin14696 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/paradex.pngbin6904 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/prediction_market_icon.pngbin6211 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/amadeus.pngbin6156 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/anx.pngbin5836 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/aragon.pngbin4642 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/auctus.pngbin3751 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/augur.pngbin4618 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/blocknet.pngbin4697 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/chronobank.pngbin6209 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/ddex.pngbin5504 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/decent_ex.pngbin5100 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/dextroid.pngbin5609 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/dharma.pngbin5429 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/district0x.pngbin5515 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/dydx.pngbin4191 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/ercdex.pngbin3929 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/ethfinex.pngbin5486 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/ethix.pngbin3438 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/idt.pngbin3154 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/imToken.pngbin4933 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/lendroid.pngbin4866 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/maker.pngbin3951 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/melonport.pngbin5186 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/open_relay.pngbin6149 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/paradex.pngbin5725 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/radar_relay.pngbin5748 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/status.pngbin4287 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/project_logos/the_ocean.pngbin6322 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/radar_relay.pngbin6650 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/relayer_diagram.pngbin111870 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/stable_tokens_icon.pngbin5853 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/stocks.pngbin2098 -> 0 bytes
-rw-r--r--packages/website/public/images/landing/tokenized_world.pngbin109220 -> 0 bytes
-rw-r--r--packages/website/public/images/launch_kit/0x_cupboard.svg53
-rw-r--r--packages/website/public/images/launch_kit/enable_trading.svg9
-rw-r--r--packages/website/public/images/launch_kit/fork.svg4
-rw-r--r--packages/website/public/images/launch_kit/in_game_marketplace.svg15
-rw-r--r--packages/website/public/images/launch_kit/local_market.svg12
-rw-r--r--packages/website/public/images/launch_kit/secondary_market.svg6
-rw-r--r--packages/website/public/images/launch_kit/shared_liquidity.svg20
-rw-r--r--packages/website/public/images/ledger_icon.pngbin4885 -> 0 bytes
-rw-r--r--packages/website/public/images/lock_icon.svg3
-rw-r--r--packages/website/public/images/logos/FBG.pngbin73781 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/aragon.pngbin5501 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/augur.pngbin5051 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/blockchain_capital.pngbin12366 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/chronobank.pngbin5615 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/dharma.pngbin5015 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/district0x.pngbin5537 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/jen_advisors.pngbin158434 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/maker.pngbin3791 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/melonport.pngbin5218 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/openANX.pngbin4973 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/pantera_capital.pngbin8437 -> 0 bytes
-rw-r--r--packages/website/public/images/logos/polychain_capital.pngbin21279 -> 0 bytes
-rw-r--r--packages/website/public/images/metamask_icon.pngbin5728 -> 0 bytes
-rw-r--r--packages/website/public/images/metamask_or_parity.pngbin22907 -> 0 bytes
-rw-r--r--packages/website/public/images/network_icons/kovan.pngbin244 -> 0 bytes
-rw-r--r--packages/website/public/images/network_icons/mainnet.pngbin205 -> 0 bytes
-rw-r--r--packages/website/public/images/network_icons/rinkeby.pngbin126 -> 0 bytes
-rw-r--r--packages/website/public/images/network_icons/ropsten.pngbin251 -> 0 bytes
-rw-r--r--packages/website/public/images/og_image.pngbin51927 -> 0 bytes
-rw-r--r--packages/website/public/images/press/logo-forbes.pngbin2420 -> 0 bytes
-rw-r--r--packages/website/public/images/press/logo-fortune.pngbin1800 -> 0 bytes
-rw-r--r--packages/website/public/images/press/logo-techcrunch.pngbin2332 -> 0 bytes
-rw-r--r--packages/website/public/images/press/logo-venturebeat.pngbin2660 -> 0 bytes
-rw-r--r--packages/website/public/images/protocol_logo_black.pngbin4031 -> 0 bytes
-rw-r--r--packages/website/public/images/protocol_logo_white.pngbin3931 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo.pngbin6758 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_1.pngbin7951 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_2.1.pngbin4942 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_2.2.pngbin5115 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_2.3.pngbin8685 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_2.pngbin6479 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_3.pngbin7888 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_4.pngbin9083 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/relayer-logos/logo_5.pngbin5768 -> 0 bytes
-rw-r--r--packages/website/public/images/relayer_fallback.pngbin4707 -> 0 bytes
-rw-r--r--packages/website/public/images/setup_account_icon.svg3
-rw-r--r--packages/website/public/images/social/discord.pngbin858 -> 0 bytes
-rw-r--r--packages/website/public/images/social/discourse.pngbin1454 -> 0 bytes
-rw-r--r--packages/website/public/images/social/github.pngbin1154 -> 0 bytes
-rw-r--r--packages/website/public/images/social/medium.pngbin890 -> 0 bytes
-rw-r--r--packages/website/public/images/social/reddit.pngbin1168 -> 0 bytes
-rw-r--r--packages/website/public/images/social/slack.pngbin1311 -> 0 bytes
-rw-r--r--packages/website/public/images/social/twitter.pngbin901 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/advisors/davids.jpgbin25263 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/advisors/frede.jpgbin17015 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/advisors/joeyk.jpgbin23496 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/advisors/lindax.jpgbin20576 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/advisors/olafc.jpgbin18024 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/alexb.jpgbin17441 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/alexv.jpgbin16969 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/amirb.jpgbin21075 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/benb.jpgbin17571 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/blake.jpgbin17515 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/brandonm.jpgbin18765 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/chrisk.jpgbin16316 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/clayr.jpgbin17222 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/eugenea.jpgbin23527 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/fabiob.jpgbin15358 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/francesco.jpgbin17467 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/greg.jpgbin21163 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/jacobe.jpgbin28977 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/jasons.jpgbin20455 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/leonidL.jpgbin14413 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/mattt.jpgbin18348 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/melo.jpgbin19188 -> 0 bytes
-rw-r--r--packages/website/public/images/team/oshirob.pngbin522249 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/peterz.jpgbin30404 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/rahuls.jpgbin21412 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/remcoB.jpgbin24435 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/steveK.jpgbin39082 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/toms.jpgbin13682 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/weijew.jpgbin22031 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/willw.jpgbin25440 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/xianny.jpgbin29992 -> 0 bytes
-rwxr-xr-xpackages/website/public/images/team/zack.jpgbin19292 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/1ST.pngbin7872 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ABYSS.pngbin13633 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ADT.pngbin10747 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/AE.pngbin12322 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/AION.pngbin2777 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/AIR.pngbin20802 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ANT.pngbin42477 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/APCC.pngbin19592 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/APPC.pngbin19592 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ARN.pngbin16200 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ART.pngbin12430 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/AST.pngbin14169 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/BAT.pngbin6188 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/BCAP.pngbin7787 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/BCPT.pngbin10283 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/BNT.pngbin4011 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/BRM.pngbin18794 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/CAG.pngbin11062 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/CAN.pngbin10234 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/CAT.pngbin23361 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/CFI.pngbin11105 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/CVC.pngbin10700 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DAI.pngbin6926 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DATA.pngbin13313 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DEB.pngbin13991 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DGD.pngbin23282 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DIVX.pngbin5110 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/DNT.pngbin10054 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/EDG.pngbin2712 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/EDU.pngbin13535 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ELEC.pngbin11379 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/EMONT.pngbin10523 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ENG.pngbin6767 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ENTR.pngbin3951 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/EOS.pngbin6979 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/EVE.pngbin5895 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/FUN.pngbin14973 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/GEE.pngbin10235 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/GEN.pngbin5280 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/GET.pngbin11930 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/GNO.pngbin16559 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/GNT.pngbin2990 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/HGT.pngbin5709 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/HOT.pngbin4578 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ICN.pngbin3962 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/IND.pngbin4583 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/J8T.pngbin10835 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/JET.pngbin18374 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/KIN.pngbin6075 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/KNC.pngbin8396 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/LINK.pngbin11267 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/LOOM.pngbin9491 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/LUN.pngbin13648 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MANA.pngbin17411 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MCO.pngbin6487 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MKR.pngbin6967 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MLN.pngbin3408 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MOD.pngbin7088 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MORPH.pngbin8919 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MOT.pngbin6069 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/MTL.pngbin3540 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NANJ.pngbin11577 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NAVI.pngbin6827 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NCT.pngbin5462 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NDC.pngbin20972 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NEXO.pngbin4689 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/NMR.pngbin21822 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/OAX.pngbin6331 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/OCC.pngbin7774 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/OMG.pngbin5311 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/OMX.pngbin7320 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/PAL.pngbin13196 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/PAY.pngbin7276 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/PKT.pngbin5900 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/PLAY.pngbin3226 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/PLU.pngbin51829 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/POLY.pngbin9350 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/QTUM.pngbin32496 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/REN.pngbin17682 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/REP.pngbin13905 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/REQ.pngbin4476 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/RFR.pngbin8319 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/RLC.pngbin9856 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ROL.pngbin16279 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/RVT.pngbin9294 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SALT.pngbin5912 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SAN.pngbin7569 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SIG.pngbin9885 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SNGLS.pngbin8475 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SNT.pngbin6530 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SPANK.pngbin16743 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SPN.pngbin4760 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SS.pngbin2576 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/STORJ.pngbin8117 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SUB.pngbin15424 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SWT.pngbin1215 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/SXDT.pngbin4323 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TAAS.pngbin14580 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TIME.pngbin33752 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TKN.pngbin3743 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TRL.pngbin447936 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TRST.pngbin26306 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/TRX.pngbin7941 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/UPP.pngbin7700 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/VSL.pngbin17717 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/WAND.pngbin9201 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/WETH.pngbin7584 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/WINGS.pngbin3822 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/WTC.pngbin8234 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/WYV.pngbin9261 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/XAUR.pngbin5150 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/XNK.pngbin4117 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/XSC.pngbin17956 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/XYO.pngbin13793 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ZIL.pngbin4444 -> 0 bytes
-rw-r--r--packages/website/public/images/token_icons/ZRX.pngbin17905 -> 0 bytes
-rw-r--r--packages/website/public/images/toshi_logo.jpgbin4611 -> 0 bytes
-rw-r--r--packages/website/public/images/trade_arrows.pngbin1740 -> 0 bytes
-rw-r--r--packages/website/public/images/unlock-mm.pngbin21137 -> 0 bytes
-rw-r--r--packages/website/public/images/wrapped_eth_gray.pngbin7649 -> 0 bytes
-rw-r--r--packages/website/public/images/zrx_ecosystem.svg158
-rw-r--r--packages/website/public/images/zrx_pie_chart.pngbin54185 -> 0 bytes
-rw-r--r--packages/website/public/images/zrx_token.pngbin16534 -> 0 bytes
-rw-r--r--packages/website/public/index.html134
-rw-r--r--packages/website/public/js/rollbar.umd.min.js2
-rw-r--r--packages/website/public/pdfs/0x_white_paper.pdfbin319570 -> 0 bytes
-rw-r--r--packages/website/translations/chinese.json102
-rw-r--r--packages/website/translations/english.json112
-rw-r--r--packages/website/translations/korean.json102
-rw-r--r--packages/website/translations/russian.json102
-rw-r--r--packages/website/translations/spanish.json102
-rw-r--r--packages/website/ts/blockchain.ts953
-rw-r--r--packages/website/ts/blockchain_watcher.ts86
-rw-r--r--packages/website/ts/components/aboutPageLayout.tsx70
-rw-r--r--packages/website/ts/components/animatedChatIcon.tsx103
-rw-r--r--packages/website/ts/components/animatedCompassIcon.tsx53
-rw-r--r--packages/website/ts/components/banner.tsx144
-rw-r--r--packages/website/ts/components/blockIconLink.tsx84
-rw-r--r--packages/website/ts/components/button.tsx104
-rw-r--r--packages/website/ts/components/chapter_link.tsx15
-rw-r--r--packages/website/ts/components/definition.tsx139
-rw-r--r--packages/website/ts/components/dialogs/blockchain_err_dialog.tsx166
-rw-r--r--packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx194
-rw-r--r--packages/website/ts/components/dialogs/ledger_config_dialog.tsx307
-rw-r--r--packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx36
-rw-r--r--packages/website/ts/components/dialogs/send_dialog.tsx137
-rw-r--r--packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx93
-rw-r--r--packages/website/ts/components/documentation/docs_logo.tsx37
-rw-r--r--packages/website/ts/components/documentation/docs_top_bar.tsx108
-rw-r--r--packages/website/ts/components/documentation/overview_content.tsx134
-rw-r--r--packages/website/ts/components/documentation/sidebar_header.tsx60
-rw-r--r--packages/website/ts/components/documentation/tutorial_button.tsx59
-rw-r--r--packages/website/ts/components/documentation/version_drop_down.tsx80
-rw-r--r--packages/website/ts/components/dropdowns/developers_drop_down.tsx162
-rw-r--r--packages/website/ts/components/dropdowns/dropdown_developers.tsx184
-rw-r--r--packages/website/ts/components/dropdowns/dropdown_products.tsx48
-rw-r--r--packages/website/ts/components/dropdowns/network_drop_down.tsx40
-rw-r--r--packages/website/ts/components/eth_weth_conversion_button.tsx128
-rw-r--r--packages/website/ts/components/eth_wrappers.tsx448
-rw-r--r--packages/website/ts/components/fill_order.tsx661
-rw-r--r--packages/website/ts/components/fill_order_json.tsx73
-rw-r--r--packages/website/ts/components/fill_warning_dialog.tsx46
-rw-r--r--packages/website/ts/components/flash_messages/asset_send_completed.tsx34
-rw-r--r--packages/website/ts/components/flash_messages/transaction_submitted.tsx26
-rw-r--r--packages/website/ts/components/footer.tsx168
-rw-r--r--packages/website/ts/components/generate_order/asset_picker.tsx284
-rw-r--r--packages/website/ts/components/generate_order/generate_order_form.tsx385
-rw-r--r--packages/website/ts/components/generate_order/new_token_form.tsx229
-rw-r--r--packages/website/ts/components/hamburger.tsx68
-rw-r--r--packages/website/ts/components/header.tsx249
-rw-r--r--packages/website/ts/components/hero.tsx143
-rw-r--r--packages/website/ts/components/heroAnimation.tsx123
-rw-r--r--packages/website/ts/components/heroImage.tsx27
-rw-r--r--packages/website/ts/components/icon.tsx66
-rw-r--r--packages/website/ts/components/image.tsx17
-rw-r--r--packages/website/ts/components/inputs/address_input.tsx71
-rw-r--r--packages/website/ts/components/inputs/allowance_state_toggle.tsx160
-rw-r--r--packages/website/ts/components/inputs/balance_bounded_input.tsx139
-rw-r--r--packages/website/ts/components/inputs/eth_amount_input.tsx65
-rw-r--r--packages/website/ts/components/inputs/expiration_input.tsx100
-rw-r--r--packages/website/ts/components/inputs/hash_input.tsx68
-rw-r--r--packages/website/ts/components/inputs/identicon_address_input.tsx52
-rw-r--r--packages/website/ts/components/inputs/token_amount_input.tsx152
-rw-r--r--packages/website/ts/components/inputs/token_input.tsx103
-rw-r--r--packages/website/ts/components/link.tsx61
-rw-r--r--packages/website/ts/components/logo.tsx38
-rw-r--r--packages/website/ts/components/meta_tags.tsx25
-rw-r--r--packages/website/ts/components/mobileNav.tsx112
-rw-r--r--packages/website/ts/components/modals/input.tsx92
-rw-r--r--packages/website/ts/components/modals/modal_contact.tsx390
-rw-r--r--packages/website/ts/components/nested_sidebar_menu.tsx101
-rw-r--r--packages/website/ts/components/newLayout.tsx134
-rw-r--r--packages/website/ts/components/newsletter_form.tsx191
-rw-r--r--packages/website/ts/components/old_footer.tsx228
-rw-r--r--packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx40
-rw-r--r--packages/website/ts/components/onboarding/congrats_onboarding_step.tsx15
-rw-r--r--packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx42
-rw-r--r--packages/website/ts/components/onboarding/intro_onboarding_step.tsx30
-rw-r--r--packages/website/ts/components/onboarding/onboarding_card.tsx115
-rw-r--r--packages/website/ts/components/onboarding/onboarding_flow.tsx182
-rw-r--r--packages/website/ts/components/onboarding/onboarding_tooltip.tsx30
-rw-r--r--packages/website/ts/components/onboarding/portal_onboarding_flow.tsx281
-rw-r--r--packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx30
-rw-r--r--packages/website/ts/components/onboarding/unlock_wallet_onboarding_step.tsx8
-rw-r--r--packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx88
-rw-r--r--packages/website/ts/components/order_json.tsx179
-rw-r--r--packages/website/ts/components/portal/back_button.tsx40
-rw-r--r--packages/website/ts/components/portal/drawer_menu.tsx77
-rw-r--r--packages/website/ts/components/portal/loading.tsx21
-rw-r--r--packages/website/ts/components/portal/menu.tsx120
-rw-r--r--packages/website/ts/components/portal/portal.tsx749
-rw-r--r--packages/website/ts/components/portal/section.tsx14
-rw-r--r--packages/website/ts/components/portal/text_header.tsx16
-rw-r--r--packages/website/ts/components/relayer_index/relayer_grid_tile.tsx148
-rw-r--r--packages/website/ts/components/relayer_index/relayer_index.tsx126
-rw-r--r--packages/website/ts/components/relayer_index/relayer_top_tokens.tsx61
-rw-r--r--packages/website/ts/components/sections/landing/about.tsx81
-rw-r--r--packages/website/ts/components/sections/landing/clients.tsx110
-rw-r--r--packages/website/ts/components/sections/landing/cta.tsx29
-rw-r--r--packages/website/ts/components/sections/landing/hero.tsx31
-rw-r--r--packages/website/ts/components/send_button.tsx94
-rw-r--r--packages/website/ts/components/siteWrap.tsx146
-rw-r--r--packages/website/ts/components/slider/slider.tsx177
-rw-r--r--packages/website/ts/components/text.tsx77
-rw-r--r--packages/website/ts/components/token_balances.tsx658
-rw-r--r--packages/website/ts/components/top_bar/provider_display.tsx154
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx279
-rw-r--r--packages/website/ts/components/top_bar/top_bar_menu_item.tsx47
-rw-r--r--packages/website/ts/components/track_token_confirmation.tsx61
-rw-r--r--packages/website/ts/components/trade_history/trade_history.tsx132
-rw-r--r--packages/website/ts/components/trade_history/trade_history_item.tsx176
-rw-r--r--packages/website/ts/components/ui/account_connection.tsx40
-rw-r--r--packages/website/ts/components/ui/alert.tsx25
-rw-r--r--packages/website/ts/components/ui/allowance_state_view.tsx51
-rw-r--r--packages/website/ts/components/ui/balance.tsx27
-rw-r--r--packages/website/ts/components/ui/button.tsx105
-rw-r--r--packages/website/ts/components/ui/check_mark.tsx31
-rw-r--r--packages/website/ts/components/ui/circle.tsx16
-rw-r--r--packages/website/ts/components/ui/container.tsx100
-rw-r--r--packages/website/ts/components/ui/copy_icon.tsx78
-rw-r--r--packages/website/ts/components/ui/custom_menu_item.tsx50
-rw-r--r--packages/website/ts/components/ui/drop_down.tsx139
-rw-r--r--packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx31
-rw-r--r--packages/website/ts/components/ui/ethereum_address.tsx30
-rw-r--r--packages/website/ts/components/ui/etherscan_icon.tsx39
-rw-r--r--packages/website/ts/components/ui/fake_text_field.tsx34
-rw-r--r--packages/website/ts/components/ui/flash_message.tsx40
-rw-r--r--packages/website/ts/components/ui/help_tooltip.tsx22
-rw-r--r--packages/website/ts/components/ui/icon_button.tsx64
-rw-r--r--packages/website/ts/components/ui/identicon.tsx48
-rw-r--r--packages/website/ts/components/ui/image.tsx49
-rw-r--r--packages/website/ts/components/ui/input_label.tsx25
-rw-r--r--packages/website/ts/components/ui/island.tsx29
-rw-r--r--packages/website/ts/components/ui/lifecycle_raised_button.tsx102
-rw-r--r--packages/website/ts/components/ui/multi_select.tsx66
-rw-r--r--packages/website/ts/components/ui/overlay.tsx32
-rw-r--r--packages/website/ts/components/ui/party.tsx141
-rw-r--r--packages/website/ts/components/ui/pointer.tsx72
-rw-r--r--packages/website/ts/components/ui/required_label.tsx15
-rw-r--r--packages/website/ts/components/ui/retry.tsx32
-rw-r--r--packages/website/ts/components/ui/simple_menu.tsx88
-rw-r--r--packages/website/ts/components/ui/spinner.tsx54
-rw-r--r--packages/website/ts/components/ui/swap_icon.tsx41
-rw-r--r--packages/website/ts/components/ui/text.tsx79
-rw-r--r--packages/website/ts/components/ui/token_icon.tsx34
-rw-r--r--packages/website/ts/components/visual_order.tsx73
-rw-r--r--packages/website/ts/components/wallet/body_overlay.tsx136
-rw-r--r--packages/website/ts/components/wallet/null_token_row.tsx41
-rw-r--r--packages/website/ts/components/wallet/placeholder.tsx25
-rw-r--r--packages/website/ts/components/wallet/standard_icon_row.tsx44
-rw-r--r--packages/website/ts/components/wallet/wallet.tsx527
-rw-r--r--packages/website/ts/components/wallet/wrap_ether_item.tsx230
-rw-r--r--packages/website/ts/constants/.gitkeep0
-rw-r--r--packages/website/ts/constants/animations.tsx18
-rw-r--r--packages/website/ts/constants/cssReset.js50
-rw-r--r--packages/website/ts/constants/globalStyle.tsx107
-rw-r--r--packages/website/ts/constants/utilities.tsx22
-rw-r--r--packages/website/ts/containers/asset_buyer_documentation.ts46
-rw-r--r--packages/website/ts/containers/connect_documentation.ts51
-rw-r--r--packages/website/ts/containers/contract_wrappers_documentation.ts46
-rw-r--r--packages/website/ts/containers/docs_home.ts32
-rw-r--r--packages/website/ts/containers/ethereum_types_documentation.ts42
-rw-r--r--packages/website/ts/containers/faq.ts28
-rw-r--r--packages/website/ts/containers/generate_order_form.ts48
-rw-r--r--packages/website/ts/containers/inputs/allowance_state_toggle.ts42
-rw-r--r--packages/website/ts/containers/inputs/eth_amount_input.ts36
-rw-r--r--packages/website/ts/containers/json_schemas_documentation.ts71
-rw-r--r--packages/website/ts/containers/migrations_documentation.ts67
-rw-r--r--packages/website/ts/containers/not_found.ts28
-rw-r--r--packages/website/ts/containers/order_utils_documentation.ts47
-rw-r--r--packages/website/ts/containers/order_watcher_documentation.ts47
-rw-r--r--packages/website/ts/containers/portal.ts93
-rw-r--r--packages/website/ts/containers/portal_onboarding_flow.ts68
-rw-r--r--packages/website/ts/containers/smart_contracts_documentation.ts97
-rw-r--r--packages/website/ts/containers/sol_compiler_documentation.ts51
-rw-r--r--packages/website/ts/containers/sol_coverage_documentation.ts44
-rw-r--r--packages/website/ts/containers/sol_profiler_documentation.ts44
-rw-r--r--packages/website/ts/containers/sol_trace_documentation.ts44
-rw-r--r--packages/website/ts/containers/subproviders_documentation.ts50
-rw-r--r--packages/website/ts/containers/web3_wrapper_documentation.ts46
-rw-r--r--packages/website/ts/containers/wiki.ts31
-rw-r--r--packages/website/ts/containers/zero_ex_js_documentation.ts78
-rw-r--r--packages/website/ts/globals.d.ts33
-rwxr-xr-xpackages/website/ts/icons/illustrations/0x.svg14
-rwxr-xr-xpackages/website/ts/icons/illustrations/buildBusiness.svg6
-rw-r--r--packages/website/ts/icons/illustrations/checkmark.svg1
-rw-r--r--packages/website/ts/icons/illustrations/code-repo.svg7
-rw-r--r--packages/website/ts/icons/illustrations/coin.svg1
-rw-r--r--packages/website/ts/icons/illustrations/consistently-ship.svg6
-rw-r--r--packages/website/ts/icons/illustrations/customize.svg1
-rwxr-xr-xpackages/website/ts/icons/illustrations/decentralisedLoans.svg13
-rwxr-xr-xpackages/website/ts/icons/illustrations/description.svg21
-rwxr-xr-xpackages/website/ts/icons/illustrations/descriptionBolt.svg4
-rwxr-xr-xpackages/website/ts/icons/illustrations/descriptionCoin.svg9
-rwxr-xr-xpackages/website/ts/icons/illustrations/descriptionCopy.svg7
-rwxr-xr-xpackages/website/ts/icons/illustrations/descriptionFlask.svg7
-rwxr-xr-xpackages/website/ts/icons/illustrations/eficientDesign.svg11
-rw-r--r--packages/website/ts/icons/illustrations/eth-based-tokens.svg6
-rwxr-xr-xpackages/website/ts/icons/illustrations/extensibleArchitecture.svg11
-rwxr-xr-xpackages/website/ts/icons/illustrations/flexibleIntegration.svg12
-rwxr-xr-xpackages/website/ts/icons/illustrations/flexibleIntegration0xInstant.svg17
-rwxr-xr-xpackages/website/ts/icons/illustrations/flexibleOrders.svg4
-rwxr-xr-xpackages/website/ts/icons/illustrations/gamingAndCollectibles.svg18
-rwxr-xr-xpackages/website/ts/icons/illustrations/generateRevenueForYourBusiness-large.svg28
-rwxr-xr-xpackages/website/ts/icons/illustrations/getInTouch.svg13
-rw-r--r--packages/website/ts/icons/illustrations/getStarted.svg13
-rw-r--r--packages/website/ts/icons/illustrations/launchKit.svg18
-rwxr-xr-xpackages/website/ts/icons/illustrations/launchKit_versionB.svg7
-rwxr-xr-xpackages/website/ts/icons/illustrations/legalResources.svg4
-rw-r--r--packages/website/ts/icons/illustrations/logo-mark.svg6
-rw-r--r--packages/website/ts/icons/illustrations/logo-outlined.svg14
-rw-r--r--packages/website/ts/icons/illustrations/long-term-impact.svg9
-rw-r--r--packages/website/ts/icons/illustrations/low-cost.svg30
-rwxr-xr-xpackages/website/ts/icons/illustrations/marketingDesignHelp.svg11
-rwxr-xr-xpackages/website/ts/icons/illustrations/milestoneGrants.svg7
-rwxr-xr-xpackages/website/ts/icons/illustrations/networkedLiquidity-small.svg20
-rwxr-xr-xpackages/website/ts/icons/illustrations/networkedLiquidity.svg28
-rwxr-xr-xpackages/website/ts/icons/illustrations/orderBooks.svg8
-rwxr-xr-xpackages/website/ts/icons/illustrations/predictionMarkets.svg7
-rw-r--r--packages/website/ts/icons/illustrations/protocol.svg1
-rw-r--r--packages/website/ts/icons/illustrations/ready-to-build.svg1
-rwxr-xr-xpackages/website/ts/icons/illustrations/recruitingSupport.svg7
-rw-r--r--packages/website/ts/icons/illustrations/right-thing.svg6
-rwxr-xr-xpackages/website/ts/icons/illustrations/robustSmartContracts.svg6
-rw-r--r--packages/website/ts/icons/illustrations/rocketship.svg9
-rwxr-xr-xpackages/website/ts/icons/illustrations/secureTrading.svg15
-rw-r--r--packages/website/ts/icons/illustrations/social-discord.svg3
-rw-r--r--packages/website/ts/icons/illustrations/social-fb.svg3
-rw-r--r--packages/website/ts/icons/illustrations/social-github.svg3
-rw-r--r--packages/website/ts/icons/illustrations/social-newsletter.svg3
-rw-r--r--packages/website/ts/icons/illustrations/social-reddit.svg3
-rw-r--r--packages/website/ts/icons/illustrations/social-twitter.svg3
-rwxr-xr-xpackages/website/ts/icons/illustrations/stableTokens.svg10
-rwxr-xr-xpackages/website/ts/icons/illustrations/standardForExchange.svg12
-rw-r--r--packages/website/ts/icons/illustrations/support.svg1
-rwxr-xr-xpackages/website/ts/icons/illustrations/supportForAllEthereumStandards-large.svg28
-rwxr-xr-xpackages/website/ts/icons/illustrations/supportForAllEthereumStandards.svg21
-rwxr-xr-xpackages/website/ts/icons/illustrations/techSupport.svg13
-rw-r--r--packages/website/ts/icons/illustrations/tokens.svg1
-rwxr-xr-xpackages/website/ts/icons/illustrations/vcIntroductions.svg11
-rw-r--r--packages/website/ts/icons/logo-with-type.svg1
-rw-r--r--packages/website/ts/index.tsx222
-rw-r--r--packages/website/ts/lazy_component.tsx66
-rw-r--r--packages/website/ts/local_storage/local_storage.ts45
-rw-r--r--packages/website/ts/local_storage/state_storage.ts16
-rw-r--r--packages/website/ts/local_storage/tracked_token_storage.ts71
-rw-r--r--packages/website/ts/local_storage/trade_history_storage.tsx94
-rw-r--r--packages/website/ts/pages/about/jobs.tsx238
-rw-r--r--packages/website/ts/pages/about/mission.tsx97
-rw-r--r--packages/website/ts/pages/about/press.tsx94
-rw-r--r--packages/website/ts/pages/about/team.tsx291
-rw-r--r--packages/website/ts/pages/community.tsx289
-rw-r--r--packages/website/ts/pages/documentation/developers_page.tsx201
-rw-r--r--packages/website/ts/pages/documentation/doc_page.tsx216
-rw-r--r--packages/website/ts/pages/documentation/docs_home.tsx469
-rw-r--r--packages/website/ts/pages/ecosystem.tsx128
-rw-r--r--packages/website/ts/pages/faq/faq.tsx453
-rw-r--r--packages/website/ts/pages/faq/question.tsx50
-rw-r--r--packages/website/ts/pages/fullscreen_message.tsx30
-rw-r--r--packages/website/ts/pages/instant.tsx255
-rw-r--r--packages/website/ts/pages/instant/code_demo.tsx183
-rw-r--r--packages/website/ts/pages/instant/config_generator.tsx329
-rw-r--r--packages/website/ts/pages/instant/config_generator_address_input.tsx84
-rw-r--r--packages/website/ts/pages/instant/configurator.tsx104
-rw-r--r--packages/website/ts/pages/instant/fee_percentage_slider.tsx80
-rw-r--r--packages/website/ts/pages/instant/rc-slider.css295
-rw-r--r--packages/website/ts/pages/instant/select.tsx74
-rw-r--r--packages/website/ts/pages/landing.tsx44
-rw-r--r--packages/website/ts/pages/launch_kit.tsx125
-rw-r--r--packages/website/ts/pages/market_maker.tsx162
-rw-r--r--packages/website/ts/pages/not_found.tsx25
-rw-r--r--packages/website/ts/pages/why.tsx302
-rw-r--r--packages/website/ts/pages/wiki/wiki.tsx198
-rw-r--r--packages/website/ts/redux/analyticsMiddleware.ts36
-rw-r--r--packages/website/ts/redux/dispatcher.ts227
-rw-r--r--packages/website/ts/redux/reducer.ts361
-rw-r--r--packages/website/ts/redux/store.ts24
-rw-r--r--packages/website/ts/schemas/metadata_schema.ts9
-rw-r--r--packages/website/ts/schemas/portal_order_schema.ts9
-rw-r--r--packages/website/ts/schemas/portal_token_metadata.ts10
-rw-r--r--packages/website/ts/schemas/validator.ts11
-rw-r--r--packages/website/ts/style/colors.ts32
-rw-r--r--packages/website/ts/style/keyframes.ts22
-rw-r--r--packages/website/ts/style/media.ts14
-rw-r--r--packages/website/ts/style/theme.ts17
-rw-r--r--packages/website/ts/style/z_index.ts6
-rw-r--r--packages/website/ts/types.ts667
-rw-r--r--packages/website/ts/utils/analytics.ts89
-rw-r--r--packages/website/ts/utils/backend_client.ts61
-rw-r--r--packages/website/ts/utils/configs.ts49
-rw-r--r--packages/website/ts/utils/constants.ts130
-rw-r--r--packages/website/ts/utils/doc_utils.ts85
-rw-r--r--packages/website/ts/utils/documentation_container.ts35
-rw-r--r--packages/website/ts/utils/error_reporter.ts54
-rw-r--r--packages/website/ts/utils/fake_token_registry.ts879
-rw-r--r--packages/website/ts/utils/fetch_utils.ts48
-rw-r--r--packages/website/ts/utils/mui_theme.ts32
-rw-r--r--packages/website/ts/utils/order_parser.ts50
-rw-r--r--packages/website/ts/utils/token_address_overrides.ts24
-rw-r--r--packages/website/ts/utils/translate.ts101
-rw-r--r--packages/website/ts/utils/utils.ts483
-rw-r--r--packages/website/ts/vendor/u2f_api.js760
-rw-r--r--packages/website/tsconfig.json28
-rw-r--r--packages/website/tslint.json11
-rw-r--r--packages/website/webpack.config.js150
-rwxr-xr-xpython-packages/cmd_pkgs_in_dep_order.py25
-rw-r--r--python-packages/contract_addresses/.discharge.json13
-rw-r--r--python-packages/contract_addresses/README.md39
-rwxr-xr-xpython-packages/contract_addresses/setup.py181
-rw-r--r--python-packages/contract_addresses/src/conf.py54
-rw-r--r--python-packages/contract_addresses/src/doc_static/.gitkeep0
-rw-r--r--python-packages/contract_addresses/src/index.rst25
-rw-r--r--python-packages/contract_addresses/src/zero_ex/__init__.py2
-rw-r--r--python-packages/contract_addresses/src/zero_ex/contract_addresses/__init__.py93
-rw-r--r--python-packages/contract_addresses/src/zero_ex/contract_addresses/py.typed0
-rw-r--r--python-packages/contract_addresses/stubs/distutils/__init__.pyi0
-rw-r--r--python-packages/contract_addresses/stubs/distutils/command/__init__.pyi0
-rw-r--r--python-packages/contract_addresses/stubs/distutils/command/clean.pyi7
-rw-r--r--python-packages/contract_addresses/stubs/setuptools/__init__.pyi8
-rw-r--r--python-packages/contract_addresses/stubs/setuptools/command/__init__.pyi0
-rw-r--r--python-packages/contract_addresses/stubs/setuptools/command/test.pyi3
-rw-r--r--python-packages/contract_addresses/tox.ini12
-rw-r--r--python-packages/contract_artifacts/.discharge.json13
-rw-r--r--python-packages/contract_artifacts/.pylintrc3
-rw-r--r--python-packages/contract_artifacts/README.md39
-rwxr-xr-xpython-packages/contract_artifacts/setup.py188
-rw-r--r--python-packages/contract_artifacts/src/conf.py54
-rw-r--r--python-packages/contract_artifacts/src/doc_static/.gitkeep0
-rw-r--r--python-packages/contract_artifacts/src/index.rst18
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/__init__.py2
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/__init__.py35
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/AssetProxyOwner.json699
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC20Token.json328
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC721Token.json375
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DutchAuction.json310
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Proxy.json195
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Token.json189
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Proxy.json195
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Token.json268
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Exchange.json1981
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Forwarder.json447
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IValidator.json41
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IWallet.json37
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/MultiAssetProxy.json263
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/OrderValidator.json572
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/WETH9.json293
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ZRXToken.json227
-rw-r--r--python-packages/contract_artifacts/src/zero_ex/contract_artifacts/py.typed0
-rw-r--r--python-packages/contract_artifacts/stubs/distutils/__init__.pyi0
-rw-r--r--python-packages/contract_artifacts/stubs/distutils/command/__init__.pyi0
-rw-r--r--python-packages/contract_artifacts/stubs/distutils/command/clean.pyi7
-rw-r--r--python-packages/contract_artifacts/stubs/setuptools/__init__.pyi8
-rw-r--r--python-packages/contract_artifacts/stubs/setuptools/command/__init__.pyi0
-rw-r--r--python-packages/contract_artifacts/stubs/setuptools/command/test.pyi3
-rw-r--r--python-packages/contract_artifacts/tox.ini12
-rw-r--r--python-packages/contract_demo/.discharge.json13
-rw-r--r--python-packages/contract_demo/README.md39
-rwxr-xr-xpython-packages/contract_demo/setup.py146
-rw-r--r--python-packages/contract_demo/stubs/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/command/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/command/clean.pyi7
-rw-r--r--python-packages/contract_demo/stubs/distutils/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/distutils/command/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/distutils/command/clean.pyi7
-rw-r--r--python-packages/contract_demo/stubs/eth_utils/__init__.pyi4
-rw-r--r--python-packages/contract_demo/stubs/pytest/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/setuptools/__init__.pyi8
-rw-r--r--python-packages/contract_demo/stubs/setuptools/command/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/setuptools/command/test.pyi3
-rw-r--r--python-packages/contract_demo/stubs/web3/__init__.pyi2
-rw-r--r--python-packages/contract_demo/stubs/web3/utils/__init__.pyi0
-rw-r--r--python-packages/contract_demo/stubs/web3/utils/datatypes.pyi3
-rw-r--r--python-packages/contract_demo/test/__init__.py1
-rw-r--r--python-packages/contract_demo/test/conf.py54
-rw-r--r--python-packages/contract_demo/test/doc_static/.gitkeep0
-rw-r--r--python-packages/contract_demo/test/index.rst18
-rw-r--r--python-packages/contract_demo/test/test_exchange.py65
-rwxr-xr-xpython-packages/install13
-rwxr-xr-xpython-packages/install_editable13
-rw-r--r--python-packages/json_schemas/.discharge.json13
-rw-r--r--python-packages/json_schemas/.pylintrc3
-rw-r--r--python-packages/json_schemas/README.md43
-rwxr-xr-xpython-packages/json_schemas/setup.py200
-rw-r--r--python-packages/json_schemas/src/conf.py54
-rw-r--r--python-packages/json_schemas/src/doc_static/.gitkeep0
-rw-r--r--python-packages/json_schemas/src/index.rst18
-rw-r--r--python-packages/json_schemas/src/zero_ex/__init__.py2
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py83
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/py.typed0
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/address_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/asset_pairs_request_opts_schema.json8
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_param_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_range_schema.json8
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/call_data_schema.json27
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_parameter_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_schema.json14
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/eip712_typed_data_schema.json28
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/hex_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/index_filter_values_schema.json7
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/js_number_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/number_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_cancel_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_config_request_schema.json24
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_or_kill_requests_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_requests_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_hash_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_schema.json34
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_request_schema.json52
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_utf8_message_schema.json10
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orderbook_request_schema.json9
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_request_opts_schema.json19
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paged_request_opts_schema.json8
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paginated_collection_schema.json10
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_response_schema.json13
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_trade_info_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_error_response_schema.json21
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_fee_recipients_response_schema.json16
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_payload_schema.json24
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_response_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_schema.json9
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orderbook_response_schema.json9
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json14
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_update_response_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_response_schema.json13
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/request_opts_schema.json7
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_order_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_orders_schema.json5
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/token_schema.json11
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/tx_data_schema.json26
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/whole_number_schema.json12
-rw-r--r--python-packages/json_schemas/src/zero_ex/json_schemas/schemas/zero_ex_transaction_schema.json10
-rw-r--r--python-packages/json_schemas/stubs/distutils/__init__.pyi0
-rw-r--r--python-packages/json_schemas/stubs/distutils/command/__init__.pyi0
-rw-r--r--python-packages/json_schemas/stubs/distutils/command/clean.pyi7
-rw-r--r--python-packages/json_schemas/stubs/jsonschema/__init__.pyi11
-rw-r--r--python-packages/json_schemas/stubs/jsonschema/exceptions.pyi0
-rw-r--r--python-packages/json_schemas/stubs/pytest/__init__.pyi0
-rw-r--r--python-packages/json_schemas/stubs/pytest/raises.pyi1
-rw-r--r--python-packages/json_schemas/stubs/setuptools/__init__.pyi8
-rw-r--r--python-packages/json_schemas/stubs/setuptools/command/__init__.pyi0
-rw-r--r--python-packages/json_schemas/stubs/setuptools/command/test.pyi3
-rw-r--r--python-packages/json_schemas/stubs/stringcase/__init__.pyi2
-rw-r--r--python-packages/json_schemas/test/__init__.py1
-rw-r--r--python-packages/json_schemas/test/test_json_schemas.py42
-rw-r--r--python-packages/json_schemas/tox.ini25
-rwxr-xr-xpython-packages/lint13
-rw-r--r--python-packages/order_utils/.discharge.json13
-rw-r--r--python-packages/order_utils/.pylintrc3
-rw-r--r--python-packages/order_utils/LICENSE13
-rw-r--r--python-packages/order_utils/README.md45
-rw-r--r--python-packages/order_utils/package.json17
-rwxr-xr-xpython-packages/order_utils/setup.py230
-rw-r--r--python-packages/order_utils/src/conf.py55
-rw-r--r--python-packages/order_utils/src/doc_static/.gitkeep0
-rw-r--r--python-packages/order_utils/src/doc_templates/.gitkeep0
-rw-r--r--python-packages/order_utils/src/index.rst36
-rw-r--r--python-packages/order_utils/src/zero_ex/__init__.py2
-rw-r--r--python-packages/order_utils/src/zero_ex/dev_utils/__init__.py1
-rw-r--r--python-packages/order_utils/src/zero_ex/dev_utils/abi_utils.py101
-rw-r--r--python-packages/order_utils/src/zero_ex/dev_utils/type_assertions.py87
-rw-r--r--python-packages/order_utils/src/zero_ex/order_utils/__init__.py535
-rw-r--r--python-packages/order_utils/src/zero_ex/order_utils/asset_data_utils.py141
-rw-r--r--python-packages/order_utils/src/zero_ex/order_utils/py.typed0
-rw-r--r--python-packages/order_utils/stubs/distutils/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/distutils/command/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/distutils/command/clean.pyi7
-rw-r--r--python-packages/order_utils/stubs/pytest/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/pytest/raises.pyi1
-rw-r--r--python-packages/order_utils/stubs/setuptools/__init__.pyi8
-rw-r--r--python-packages/order_utils/stubs/setuptools/command/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/setuptools/command/test.pyi3
-rw-r--r--python-packages/order_utils/stubs/sha3/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/web3/__init__.pyi28
-rw-r--r--python-packages/order_utils/stubs/web3/__init___BASE_31011.pyi26
-rw-r--r--python-packages/order_utils/stubs/web3/exceptions.pyi2
-rw-r--r--python-packages/order_utils/stubs/web3/providers/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/web3/providers/base.pyi2
-rw-r--r--python-packages/order_utils/stubs/web3/utils/__init__.pyi0
-rw-r--r--python-packages/order_utils/stubs/web3/utils/datatypes.pyi3
-rw-r--r--python-packages/order_utils/test/__init__.py1
-rw-r--r--python-packages/order_utils/test/test_abi_utils.py53
-rw-r--r--python-packages/order_utils/test/test_asset_data_utils.py72
-rw-r--r--python-packages/order_utils/test/test_generate_order_hash_hex.py14
-rw-r--r--python-packages/order_utils/test/test_signature_utils.py128
-rw-r--r--python-packages/order_utils/tox.ini25
-rw-r--r--python-packages/sra_client/README.md332
-rw-r--r--python-packages/sra_client/docs/DefaultApi.md397
-rw-r--r--python-packages/sra_client/docs/OrderSchema.md21
-rw-r--r--python-packages/sra_client/docs/PaginatedCollectionSchema.md11
-rw-r--r--python-packages/sra_client/docs/RelayerApiAssetDataPairsResponseSchema.md9
-rw-r--r--python-packages/sra_client/docs/RelayerApiAssetDataTradeInfoSchema.md12
-rw-r--r--python-packages/sra_client/docs/RelayerApiErrorResponseSchema.md11
-rw-r--r--python-packages/sra_client/docs/RelayerApiErrorResponseSchemaValidationErrors.md11
-rw-r--r--python-packages/sra_client/docs/RelayerApiFeeRecipientsResponseSchema.md9
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrderConfigPayloadSchema.md16
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrderConfigResponseSchema.md12
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrderSchema.md10
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrderbookResponseSchema.md10
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribePayloadSchema.md16
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribeSchema.md12
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrdersChannelUpdateSchema.md12
-rw-r--r--python-packages/sra_client/docs/RelayerApiOrdersResponseSchema.md9
-rw-r--r--python-packages/sra_client/docs/SignedOrderSchema.md9
-rwxr-xr-xpython-packages/sra_client/generate.sh26
-rw-r--r--python-packages/sra_client/openapi-generator-cli-config.json4
-rw-r--r--python-packages/sra_client/requirements.txt5
-rwxr-xr-xpython-packages/sra_client/setup.py77
-rw-r--r--python-packages/sra_client/sra_client/__init__.py59
-rw-r--r--python-packages/sra_client/sra_client/api/__init__.py6
-rw-r--r--python-packages/sra_client/sra_client/api/default_api.py976
-rw-r--r--python-packages/sra_client/sra_client/api_client.py730
-rw-r--r--python-packages/sra_client/sra_client/configuration.py225
-rw-r--r--python-packages/sra_client/sra_client/models/__init__.py49
-rw-r--r--python-packages/sra_client/sra_client/models/order_schema.py550
-rw-r--r--python-packages/sra_client/sra_client/models/paginated_collection_schema.py161
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_asset_data_pairs_response_schema.py107
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_asset_data_trade_info_schema.py209
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_error_response_schema.py176
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_error_response_schema_validation_errors.py171
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_fee_recipients_response_schema.py107
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_order_config_payload_schema.py372
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_order_config_response_schema.py228
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_order_schema.py134
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_orderbook_response_schema.py137
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_payload_schema.py344
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_schema.py211
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_orders_channel_update_schema.py211
-rw-r--r--python-packages/sra_client/sra_client/models/relayer_api_orders_response_schema.py107
-rw-r--r--python-packages/sra_client/sra_client/models/signed_order_schema.py113
-rw-r--r--python-packages/sra_client/sra_client/rest.py421
-rw-r--r--python-packages/sra_client/test-requirements.txt5
-rw-r--r--python-packages/sra_client/test/__init__.py0
-rw-r--r--python-packages/sra_client/test/test_default_api.py35
-rw-r--r--python-packages/sra_client/tox.ini24
-rwxr-xr-xpython-packages/test13
-rw-r--r--tsconfig.json3
-rw-r--r--yarn.lock8300
2336 files changed, 1020 insertions, 189587 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index f64017b56..63c25f77e 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -117,10 +117,10 @@ jobs:
- run: yarn wsrun test:circleci @0x/metacoin
- run: yarn wsrun test:circleci @0x/order-utils
- run: yarn wsrun test:circleci @0x/order-watcher
- - run: yarn wsrun test:circleci @0x/sol-compiler
- - run: yarn wsrun test:circleci @0x/sol-tracing-utils
- - run: yarn wsrun test:circleci @0x/sol-doc
- - run: yarn wsrun test:circleci @0x/subproviders
+ - run: yarn wsrun test:circleci @dexon-foundation/sol-compiler
+ - run: yarn wsrun test:circleci @dexon-foundation/sol-tracing-utils
+ - run: yarn wsrun test:circleci @dexon-foundation/sol-doc
+ - run: yarn wsrun test:circleci @dexon-foundation/subproviders
- run: yarn wsrun test:circleci @0x/web3-wrapper
- run: yarn wsrun test:circleci @0x/utils
- run: yarn wsrun test:circleci @0x/instant
diff --git a/.github/autolabeler.yml b/.github/autolabeler.yml
index 321ec18a4..8d038f372 100644
--- a/.github/autolabeler.yml
+++ b/.github/autolabeler.yml
@@ -1,5 +1,4 @@
python: ['python-packages']
-contracts: ['contracts']
sol-doc: ['packages/sol-doc']
sol-resolver: ['packages/sol-resolver']
sra-spec: ['packages/sra-spec']
@@ -27,7 +26,6 @@ react-shared: ['packages/react-shared']
assert: ['packages/assert']
base-contract: ['packages/base-contract']
typescript-typings: ['packages/typescript-typings']
-0x.js: ['packages/0x.js']
abi-gen-wrappers: ['packages/abi-gen-wrappers']
metacoin: ['packages/metacoin']
contract-artifacts: ['packages/contract-artifacts']
diff --git a/README.md b/README.md
index 12f9df7f8..b6b7f5370 100644
--- a/README.md
+++ b/README.md
@@ -56,13 +56,13 @@ Visit our [developer portal](https://0xproject.com/docs/order-utils) for a compr
| Package | Version | Description |
| -------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [`@0x/web3-wrapper`](/packages/web3-wrapper) | [![npm](https://img.shields.io/npm/v/@0x/web3-wrapper.svg)](https://www.npmjs.com/package/@0x/web3-wrapper) | An Ethereum JSON RPC client |
-| [`@0x/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-compiler.svg)](https://www.npmjs.com/package/@0x/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. |
-| [`@0x/sol-coverage`](/packages/sol-coverage) | [![npm](https://img.shields.io/npm/v/@0x/sol-coverage.svg)](https://www.npmjs.com/package/@0x/sol-coverage) | A solidity test coverage tool |
-| [`@0x/sol-profiler`](/packages/sol-profiler) | [![npm](https://img.shields.io/npm/v/@0x/sol-profiler.svg)](https://www.npmjs.com/package/@0x/sol-profiler) | A solidity gas cost profiler |
+| [`@dexon-foundation/sol-compiler`](/packages/sol-compiler) | [![npm](https://img.shields.io/npm/v/@dexon-foundation/sol-compiler.svg)](https://www.npmjs.com/package/@dexon-foundation/sol-compiler) | A wrapper around solc-js that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more. |
+| [`@dexon-foundation/sol-coverage`](/packages/sol-coverage) | [![npm](https://img.shields.io/npm/v/@dexon-foundation/sol-coverage.svg)](https://www.npmjs.com/package/@dexon-foundation/sol-coverage) | A solidity test coverage tool |
+| [`@dexon-foundation/sol-profiler`](/packages/sol-profiler) | [![npm](https://img.shields.io/npm/v/@dexon-foundation/sol-profiler.svg)](https://www.npmjs.com/package/@dexon-foundation/sol-profiler) | A solidity gas cost profiler |
| [`@0x/sol-trace`](/packages/sol-trace) | [![npm](https://img.shields.io/npm/v/@0x/sol-trace.svg)](https://www.npmjs.com/package/@0x/sol-trace) | A solidity stack trace tool |
| [`@0x/sol-resolver`](/packages/sol-resolver) | [![npm](https://img.shields.io/npm/v/@0x/sol-resolver.svg)](https://www.npmjs.com/package/@0x/sol-resolver) | Import resolver for smart contracts dependencies |
-| [`@0x/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@0x/subproviders.svg)](https://www.npmjs.com/package/@0x/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) |
-| [`@0x/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@0x/sol-doc.svg)](https://www.npmjs.com/package/@0x/sol-doc) | Solidity documentation generator |
+| [`@dexon-foundation/subproviders`](/packages/subproviders) | [![npm](https://img.shields.io/npm/v/@dexon-foundation/subproviders.svg)](https://www.npmjs.com/package/@dexon-foundation/subproviders) | Web3 provider middlewares (e.g. LedgerSubprovider) |
+| [`@dexon-foundation/sol-doc`](/packages/sol-doc) | [![npm](https://img.shields.io/npm/v/@dexon-foundation/sol-doc.svg)](https://www.npmjs.com/package/@dexon-foundation/sol-doc) | Solidity documentation generator |
#### Utilities
diff --git a/contracts/.solhint.json b/contracts/.solhint.json
deleted file mode 100644
index 3090d981a..000000000
--- a/contracts/.solhint.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "extends": "default",
- "rules": {
- "avoid-low-level-calls": false,
- "avoid-tx-origin": "warn",
- "bracket-align": false,
- "code-complexity": false,
- "compiler-fixed": false,
- "const-name-snakecase": "error",
- "expression-indent": "error",
- "function-max-lines": false,
- "func-order": "error",
- "indent": ["error", 4],
- "max-line-length": ["warn", 160],
- "no-inline-assembly": false,
- "quotes": ["error", "double"],
- "separate-by-one-line-in-contract": "error",
- "space-after-comma": "error",
- "statement-indent": "error"
- }
-}
diff --git a/contracts/TESTING.md b/contracts/TESTING.md
deleted file mode 100644
index 3e6888c04..000000000
--- a/contracts/TESTING.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# Contracts testing options
-
-## Revert stack traces
-
-If you want to see helpful stack traces (incl. line number, code snippet) for smart contract reverts, run the tests with:
-
-```
-yarn test:trace
-```
-
-**Note:** This currently slows down the test runs and is therefore not enabled by default.
-
-## Backing Ethereum node
-
-By default, our tests run against an in-process [Ganache](https://github.com/trufflesuite/ganache-core) instance. In order to run the tests against [Geth](https://github.com/ethereum/go-ethereum), first follow the instructions in the README for the devnet package to start the devnet Geth node. Then run:
-
-```bash
-TEST_PROVIDER=geth yarn test
-```
-
-## Code coverage
-
-In order to see the Solidity code coverage output generated by `@0x/sol-coverage`, run:
-
-```
-yarn test:coverage
-```
-
-## Gas profiler
-
-In order to profile the gas costs for a specific smart contract call/transaction, you can run the tests in `profiler` mode.
-
-**Note:** Traces emitted by ganache have incorrect gas costs so we recommend using Geth for profiling.
-
-```
-TEST_PROVIDER=geth yarn test:profiler
-```
-
-You'll see a warning that you need to explicitly enable and disable the profiler before and after the block of code you want to profile.
-
-```typescript
-import { profiler } from './utils/profiler';
-profiler.start();
-// Some call to a smart contract
-profiler.stop();
-```
-
-Without explicitly starting and stopping the profiler, the profiler output will be too busy, and therefore unusable.
diff --git a/contracts/examples/CHANGELOG.json b/contracts/examples/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/examples/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/examples/CHANGELOG.md b/contracts/examples/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/examples/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/examples/README.md b/contracts/examples/README.md
deleted file mode 100644
index ca23d0974..000000000
--- a/contracts/examples/README.md
+++ /dev/null
@@ -1,56 +0,0 @@
-## Contract examples
-
-Example smart contracts that interact with 0x protocol.
-
-## Usage
-
-Contracts can be found in the [contracts](./contracts) directory.
-This package contains example implementations of contracts that interact with the protocol but are _not_ intended for use in production. Examples include [filter](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#filter-contracts) contracts, a [Wallet](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#wallet) contract, and a [Validator](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#validator) contract, among others.
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-examples yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-examples yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/contracts/examples/compiler.json b/contracts/examples/compiler.json
deleted file mode 100644
index 375fa0c55..000000000
--- a/contracts/examples/compiler.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": ["ExchangeWrapper", "Validator", "Wallet", "Whitelist"]
-}
diff --git a/contracts/examples/contracts/ExchangeWrapper/ExchangeWrapper.sol b/contracts/examples/contracts/ExchangeWrapper/ExchangeWrapper.sol
deleted file mode 100644
index d98136922..000000000
--- a/contracts/examples/contracts/ExchangeWrapper/ExchangeWrapper.sol
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-
-
-contract ExchangeWrapper {
-
- // Exchange contract.
- // solhint-disable-next-line var-name-mixedcase
- IExchange internal EXCHANGE;
-
- constructor (address _exchange)
- public
- {
- EXCHANGE = IExchange(_exchange);
- }
-
- /// @dev Cancels all orders created by sender with a salt less than or equal to the targetOrderEpoch
- /// and senderAddress equal to this contract.
- /// @param targetOrderEpoch Orders created with a salt less or equal to this value will be cancelled.
- /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.
- /// @param makerSignature Proof that maker wishes to call this function with given params.
- function cancelOrdersUpTo(
- uint256 targetOrderEpoch,
- uint256 salt,
- bytes makerSignature
- )
- external
- {
- address makerAddress = msg.sender;
-
- // Encode arguments into byte array.
- bytes memory data = abi.encodeWithSelector(
- EXCHANGE.cancelOrdersUpTo.selector,
- targetOrderEpoch
- );
-
- // Call `cancelOrdersUpTo` via `executeTransaction`.
- EXCHANGE.executeTransaction(
- salt,
- makerAddress,
- data,
- makerSignature
- );
- }
-
- /// @dev Fills an order using `msg.sender` as the taker.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.
- /// @param orderSignature Proof that order has been created by maker.
- /// @param takerSignature Proof that taker wishes to call this function with given params.
- function fillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- uint256 salt,
- bytes memory orderSignature,
- bytes memory takerSignature
- )
- public
- {
- address takerAddress = msg.sender;
-
- // Encode arguments into byte array.
- bytes memory data = abi.encodeWithSelector(
- EXCHANGE.fillOrder.selector,
- order,
- takerAssetFillAmount,
- orderSignature
- );
-
- // Call `fillOrder` via `executeTransaction`.
- EXCHANGE.executeTransaction(
- salt,
- takerAddress,
- data,
- takerSignature
- );
- }
-}
diff --git a/contracts/examples/contracts/Validator/Validator.sol b/contracts/examples/contracts/Validator/Validator.sol
deleted file mode 100644
index e488a9ca7..000000000
--- a/contracts/examples/contracts/Validator/Validator.sol
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IValidator.sol";
-
-
-contract Validator is
- IValidator
-{
-
- // The single valid signer for this wallet.
- // solhint-disable-next-line var-name-mixedcase
- address internal VALID_SIGNER;
-
- /// @dev constructs a new `Validator` with a single valid signer.
- /// @param validSigner The sole, valid signer.
- constructor (address validSigner) public {
- VALID_SIGNER = validSigner;
- }
-
- /// @dev Verifies that a signature is valid. `signer` must match `VALID_SIGNER`.
- /// @param hash Message hash that is signed.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof of signing.
- /// @return Validity of signature.
- // solhint-disable no-unused-vars
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external
- view
- returns (bool isValid)
- {
- return (signerAddress == VALID_SIGNER);
- }
- // solhint-enable no-unused-vars
-}
diff --git a/contracts/examples/contracts/Wallet/Wallet.sol b/contracts/examples/contracts/Wallet/Wallet.sol
deleted file mode 100644
index 8edc74eb3..000000000
--- a/contracts/examples/contracts/Wallet/Wallet.sol
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IWallet.sol";
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-contract Wallet is
- IWallet
-{
- using LibBytes for bytes;
-
- // The owner of this wallet.
- // solhint-disable-next-line var-name-mixedcase
- address internal WALLET_OWNER;
-
- /// @dev constructs a new `Wallet` with a single owner.
- /// @param walletOwner The owner of this wallet.
- constructor (address walletOwner) public {
- WALLET_OWNER = walletOwner;
- }
-
- /// @dev Validates an EIP712 signature.
- /// The signer must match the owner of this wallet.
- /// @param hash Message hash that is signed.
- /// @param eip712Signature Proof of signing.
- /// @return Validity of signature.
- function isValidSignature(
- bytes32 hash,
- bytes eip712Signature
- )
- external
- view
- returns (bool isValid)
- {
- require(
- eip712Signature.length == 65,
- "LENGTH_65_REQUIRED"
- );
-
- uint8 v = uint8(eip712Signature[0]);
- bytes32 r = eip712Signature.readBytes32(1);
- bytes32 s = eip712Signature.readBytes32(33);
- address recoveredAddress = ecrecover(hash, v, r, s);
- isValid = WALLET_OWNER == recoveredAddress;
- return isValid;
- }
-}
diff --git a/contracts/examples/contracts/Whitelist/Whitelist.sol b/contracts/examples/contracts/Whitelist/Whitelist.sol
deleted file mode 100644
index 2a3d33738..000000000
--- a/contracts/examples/contracts/Whitelist/Whitelist.sol
+++ /dev/null
@@ -1,136 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-
-
-contract Whitelist is
- Ownable
-{
-
- // Mapping of address => whitelist status.
- mapping (address => bool) public isWhitelisted;
-
- // Exchange contract.
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
- bytes internal TX_ORIGIN_SIGNATURE;
- // solhint-enable var-name-mixedcase
-
- byte constant internal VALIDATOR_SIGNATURE_BYTE = "\x05";
-
- constructor (address _exchange)
- public
- {
- EXCHANGE = IExchange(_exchange);
- TX_ORIGIN_SIGNATURE = abi.encodePacked(address(this), VALIDATOR_SIGNATURE_BYTE);
- }
-
- /// @dev Adds or removes an address from the whitelist.
- /// @param target Address to add or remove from whitelist.
- /// @param isApproved Whitelist status to assign to address.
- function updateWhitelistStatus(
- address target,
- bool isApproved
- )
- external
- onlyOwner
- {
- isWhitelisted[target] = isApproved;
- }
-
- /// @dev Verifies signer is same as signer of current Ethereum transaction.
- /// NOTE: This function can currently be used to validate signatures coming from outside of this contract.
- /// Extra safety checks can be added for a production contract.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- // solhint-disable no-unused-vars
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external
- view
- returns (bool isValid)
- {
- // solhint-disable-next-line avoid-tx-origin
- return signerAddress == tx.origin;
- }
- // solhint-enable no-unused-vars
-
- /// @dev Fills an order using `msg.sender` as the taker.
- /// The transaction will revert if both the maker and taker are not whitelisted.
- /// Orders should specify this contract as the `senderAddress` in order to gaurantee
- /// that both maker and taker have been whitelisted.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param salt Arbitrary value to gaurantee uniqueness of 0x transaction hash.
- /// @param orderSignature Proof that order has been created by maker.
- function fillOrderIfWhitelisted(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- uint256 salt,
- bytes memory orderSignature
- )
- public
- {
- address takerAddress = msg.sender;
-
- // This contract must be the entry point for the transaction.
- require(
- // solhint-disable-next-line avoid-tx-origin
- takerAddress == tx.origin,
- "INVALID_SENDER"
- );
-
- // Check if maker is on the whitelist.
- require(
- isWhitelisted[order.makerAddress],
- "MAKER_NOT_WHITELISTED"
- );
-
- // Check if taker is on the whitelist.
- require(
- isWhitelisted[takerAddress],
- "TAKER_NOT_WHITELISTED"
- );
-
- // Encode arguments into byte array.
- bytes memory data = abi.encodeWithSelector(
- EXCHANGE.fillOrder.selector,
- order,
- takerAssetFillAmount,
- orderSignature
- );
-
- // Call `fillOrder` via `executeTransaction`.
- EXCHANGE.executeTransaction(
- salt,
- takerAddress,
- data,
- TX_ORIGIN_SIGNATURE
- );
- }
-}
diff --git a/contracts/examples/package.json b/contracts/examples/package.json
deleted file mode 100644
index 845ea0636..000000000
--- a/contracts/examples/package.json
+++ /dev/null
@@ -1,81 +0,0 @@
-{
- "name": "@0x/contracts-examples",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract examples of 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(ExchangeWrapper|Validator|Wallet|Whitelist).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/contracts/examples/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.6",
- "@0x/contracts-libs": "^1.0.6",
- "@0x/contracts-multisig": "^1.0.6",
- "@0x/contracts-tokens": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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",
- "@types/js-combinatorics": "^0.5.29",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/examples/src/artifacts/index.ts b/contracts/examples/src/artifacts/index.ts
deleted file mode 100644
index c921fbf89..000000000
--- a/contracts/examples/src/artifacts/index.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as ExchangeWrapper from '../../generated-artifacts/ExchangeWrapper.json';
-import * as Validator from '../../generated-artifacts/Validator.json';
-import * as Wallet from '../../generated-artifacts/Wallet.json';
-import * as Whitelist from '../../generated-artifacts/Whitelist.json';
-
-export const artifacts = {
- ExchangeWrapper: ExchangeWrapper as ContractArtifact,
- Validator: Validator as ContractArtifact,
- Wallet: Wallet as ContractArtifact,
- Whitelist: Whitelist as ContractArtifact,
-};
diff --git a/contracts/examples/src/index.ts b/contracts/examples/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/examples/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/examples/src/wrappers/index.ts b/contracts/examples/src/wrappers/index.ts
deleted file mode 100644
index dc67277d7..000000000
--- a/contracts/examples/src/wrappers/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export * from '../../generated-wrappers/exchange_wrapper';
-export * from '../../generated-wrappers/validator';
-export * from '../../generated-wrappers/wallet';
-export * from '../../generated-wrappers/whitelist';
diff --git a/contracts/examples/tsconfig.json b/contracts/examples/tsconfig.json
deleted file mode 100644
index 63245da1e..000000000
--- a/contracts/examples/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/ExchangeWrapper.json",
- "./generated-artifacts/Validator.json",
- "./generated-artifacts/Wallet.json",
- "./generated-artifacts/Whitelist.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/examples/tslint.json b/contracts/examples/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/examples/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/extensions/CHANGELOG.json b/contracts/extensions/CHANGELOG.json
deleted file mode 100644
index 920fef05a..000000000
--- a/contracts/extensions/CHANGELOG.json
+++ /dev/null
@@ -1,74 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.2.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.2.0",
- "changes": [
- {
- "note": "Added Dutch Auction Wrapper",
- "pr": 1465
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Added Balance Threshold Filter",
- "pr": 1383
- },
- {
- "note": "Add OrderMatcher",
- "pr": 1117
- },
- {
- "note": "Add OrderValidator",
- "pr": 1464
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/extensions/CHANGELOG.md b/contracts/extensions/CHANGELOG.md
deleted file mode 100644
index 94ffdfb67..000000000
--- a/contracts/extensions/CHANGELOG.md
+++ /dev/null
@@ -1,32 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.2.3 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.2.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.2.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.2.0 - _January 9, 2019_
-
- * Added Dutch Auction Wrapper (#1465)
-
-## v1.1.0 - _Invalid date_
-
- * Added Balance Threshold Filter (#1383)
- * Add OrderMatcher (#1117)
- * Add OrderValidator (#1464)
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/extensions/DEPLOYS.json b/contracts/extensions/DEPLOYS.json
deleted file mode 100644
index 1a093bf77..000000000
--- a/contracts/extensions/DEPLOYS.json
+++ /dev/null
@@ -1,31 +0,0 @@
-[
- {
- "name": "Forwarder",
- "version": "1.1.0",
- "changes": [
- {
- "note": "Round up when calculating remaining amounts in marketBuy functions",
- "pr": 1162,
- "networks": {
- "1": "0x5468a1dc173652ee28d249c271fa9933144746b1",
- "3": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
- "42": "0x17992e4ffb22730138e4b62aaa6367fa9d3699a6"
- }
- }
- ]
- },
- {
- "name": "Forwarder",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x7afc2d5107af94c462a194d2c21b5bdd238709d6",
- "3": "0x3983e204b12b3c02fb0638caf2cd406a62e0ead3",
- "42": "0xd85e2fa7e7e252b27b01bf0d65c946959d2f45b8"
- }
- }
- ]
- }
-]
diff --git a/contracts/extensions/README.md b/contracts/extensions/README.md
deleted file mode 100644
index 820f6e78a..000000000
--- a/contracts/extensions/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-## Contract extensions
-
-Smart contracts that implement extensions for the 0x protocol.
-
-## Usage
-
-Contract extensions of the protocol can be found in the [contracts](./contracts) directory. This directory contains contracts that interact with the 2.0.0 contracts and will be used in production, such as the [Forwarder](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarder-specification.md) contract.
-
-## Bug bounty
-
-A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-extensions yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-extensions yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/extensions/compiler.json b/contracts/extensions/compiler.json
deleted file mode 100644
index 2bb468724..000000000
--- a/contracts/extensions/compiler.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": ["BalanceThresholdFilter", "DutchAuction", "Forwarder", "OrderMatcher", "OrderValidator"]
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/BalanceThresholdFilter.sol b/contracts/extensions/contracts/BalanceThresholdFilter/BalanceThresholdFilter.sol
deleted file mode 100644
index 16cacd461..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/BalanceThresholdFilter.sol
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "./interfaces/IThresholdAsset.sol";
-import "./MixinBalanceThresholdFilterCore.sol";
-
-
-contract BalanceThresholdFilter is
- MixinBalanceThresholdFilterCore
-{
-
- /// @dev Constructs BalanceThresholdFilter.
- /// @param exchange Address of 0x exchange.
- /// @param thresholdAsset The asset that must be held by makers/takers.
- /// @param balanceThreshold The minimum balance of `thresholdAsset` that must be held by makers/takers.
- constructor(
- address exchange,
- address thresholdAsset,
- uint256 balanceThreshold
- )
- public
- {
- EXCHANGE = IExchange(exchange);
- THRESHOLD_ASSET = IThresholdAsset(thresholdAsset);
- BALANCE_THRESHOLD = balanceThreshold;
- }
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/MixinBalanceThresholdFilterCore.sol b/contracts/extensions/contracts/BalanceThresholdFilter/MixinBalanceThresholdFilterCore.sol
deleted file mode 100644
index da050bf72..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/MixinBalanceThresholdFilterCore.sol
+++ /dev/null
@@ -1,135 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-libs/contracts/libs/LibExchangeSelectors.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "./mixins/MBalanceThresholdFilterCore.sol";
-import "./MixinExchangeCalldata.sol";
-
-
-contract MixinBalanceThresholdFilterCore is
- MBalanceThresholdFilterCore,
- MixinExchangeCalldata,
- LibOrder,
- LibExchangeSelectors
-{
-
- /// @dev Executes an Exchange transaction iff the maker and taker meet
- /// the hold at least `BALANCE_THRESHOLD` of the asset `THRESHOLD_ASSET` OR
- /// the exchange function is a cancellation.
- /// Supported Exchange functions:
- /// batchFillOrders
- /// batchFillOrdersNoThrow
- /// batchFillOrKillOrders
- /// fillOrder
- /// fillOrderNoThrow
- /// fillOrKillOrder
- /// marketBuyOrders
- /// marketBuyOrdersNoThrow
- /// marketSellOrders
- /// marketSellOrdersNoThrow
- /// matchOrders
- /// cancelOrder
- /// batchCancelOrders
- /// cancelOrdersUpTo
- /// Trying to call any other exchange function will throw.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param signedExchangeTransaction AbiV2 encoded calldata.
- /// @param signature Proof of signer transaction by signer.
- function executeTransaction(
- uint256 salt,
- address signerAddress,
- bytes signedExchangeTransaction,
- bytes signature
- )
- external
- {
- // Get accounts whose balances must be validated
- address[] memory addressesToValidate = getAddressesToValidate(signerAddress);
-
- // Validate account balances
- uint256 balanceThreshold = BALANCE_THRESHOLD;
- IThresholdAsset thresholdAsset = THRESHOLD_ASSET;
- for (uint256 i = 0; i < addressesToValidate.length; ++i) {
- uint256 addressBalance = thresholdAsset.balanceOf(addressesToValidate[i]);
- require(
- addressBalance >= balanceThreshold,
- "AT_LEAST_ONE_ADDRESS_DOES_NOT_MEET_BALANCE_THRESHOLD"
- );
- }
- emit ValidatedAddresses(addressesToValidate);
-
- // All addresses are valid. Execute exchange function.
- EXCHANGE.executeTransaction(
- salt,
- signerAddress,
- signedExchangeTransaction,
- signature
- );
- }
-
- /// @dev Constructs an array of addresses to be validated.
- /// Addresses depend on which Exchange function is to be called
- /// (defined by `signedExchangeTransaction` above).
- /// @param signerAddress Address of transaction signer.
- /// @return addressesToValidate Array of addresses to validate.
- function getAddressesToValidate(address signerAddress)
- internal pure
- returns (address[] memory addressesToValidate)
- {
- bytes4 exchangeFunctionSelector = bytes4(exchangeCalldataload(0));
- // solhint-disable expression-indent
- if (
- exchangeFunctionSelector == BATCH_FILL_ORDERS_SELECTOR ||
- exchangeFunctionSelector == BATCH_FILL_ORDERS_NO_THROW_SELECTOR ||
- exchangeFunctionSelector == BATCH_FILL_OR_KILL_ORDERS_SELECTOR ||
- exchangeFunctionSelector == MARKET_BUY_ORDERS_SELECTOR ||
- exchangeFunctionSelector == MARKET_BUY_ORDERS_NO_THROW_SELECTOR ||
- exchangeFunctionSelector == MARKET_SELL_ORDERS_SELECTOR ||
- exchangeFunctionSelector == MARKET_SELL_ORDERS_NO_THROW_SELECTOR
- ) {
- addressesToValidate = loadMakerAddressesFromOrderArray(0);
- addressesToValidate = addressesToValidate.append(signerAddress);
- } else if (
- exchangeFunctionSelector == FILL_ORDER_SELECTOR ||
- exchangeFunctionSelector == FILL_ORDER_NO_THROW_SELECTOR ||
- exchangeFunctionSelector == FILL_OR_KILL_ORDER_SELECTOR
- ) {
- address makerAddress = loadMakerAddressFromOrder(0);
- addressesToValidate = addressesToValidate.append(makerAddress);
- addressesToValidate = addressesToValidate.append(signerAddress);
- } else if (exchangeFunctionSelector == MATCH_ORDERS_SELECTOR) {
- address leftMakerAddress = loadMakerAddressFromOrder(0);
- addressesToValidate = addressesToValidate.append(leftMakerAddress);
- address rightMakerAddress = loadMakerAddressFromOrder(1);
- addressesToValidate = addressesToValidate.append(rightMakerAddress);
- addressesToValidate = addressesToValidate.append(signerAddress);
- } else if (
- exchangeFunctionSelector != CANCEL_ORDER_SELECTOR &&
- exchangeFunctionSelector != BATCH_CANCEL_ORDERS_SELECTOR &&
- exchangeFunctionSelector != CANCEL_ORDERS_UP_TO_SELECTOR
- ) {
- revert("INVALID_OR_BLOCKED_EXCHANGE_SELECTOR");
- }
- // solhint-enable expression-indent
- return addressesToValidate;
- }
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/MixinExchangeCalldata.sol b/contracts/extensions/contracts/BalanceThresholdFilter/MixinExchangeCalldata.sol
deleted file mode 100644
index a15e95a9d..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/MixinExchangeCalldata.sol
+++ /dev/null
@@ -1,103 +0,0 @@
-
- /*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./mixins/MExchangeCalldata.sol";
-import "@0x/contracts-libs/contracts/libs/LibAddressArray.sol";
-
-
-contract MixinExchangeCalldata is
- MExchangeCalldata
-{
-
- using LibAddressArray for address[];
-
- /// @dev Emulates the `calldataload` opcode on the embedded Exchange calldata,
- /// which is accessed through `signedExchangeTransaction`.
- /// @param offset Offset into the Exchange calldata.
- /// @return value Corresponding 32 byte value stored at `offset`.
- function exchangeCalldataload(uint256 offset)
- internal pure
- returns (bytes32 value)
- {
- assembly {
- // Pointer to exchange transaction
- // 0x04 for calldata selector
- // 0x40 to access `signedExchangeTransaction`, which is the third parameter
- let exchangeTxPtr := calldataload(0x44)
-
- // Offset into Exchange calldata
- // We compute this by adding 0x24 to the `exchangeTxPtr` computed above.
- // 0x04 for calldata selector
- // 0x20 for length field of `signedExchangeTransaction`
- let exchangeCalldataOffset := add(exchangeTxPtr, add(0x24, offset))
- value := calldataload(exchangeCalldataOffset)
- }
- return value;
- }
-
- /// @dev Convenience function that skips the 4 byte selector when loading
- /// from the embedded Exchange calldata.
- /// @param offset Offset into the Exchange calldata (minus the 4 byte selector)
- /// @return value Corresponding 32 byte value stored at `offset` + 4.
- function loadExchangeData(uint256 offset)
- internal pure
- returns (bytes32 value)
- {
- value = exchangeCalldataload(offset + 4);
- return value;
- }
-
- /// @dev Extracts the maker address from an order stored in the Exchange calldata
- /// (which is embedded in `signedExchangeTransaction`).
- /// @param orderParamIndex Index of the order in the Exchange function's signature.
- /// @return makerAddress The extracted maker address.
- function loadMakerAddressFromOrder(uint256 orderParamIndex)
- internal pure
- returns (address makerAddress)
- {
- uint256 orderOffsetInBytes = orderParamIndex * 32;
- uint256 orderPtr = uint256(loadExchangeData(orderOffsetInBytes));
- makerAddress = address(loadExchangeData(orderPtr));
- return makerAddress;
- }
-
- /// @dev Extracts the maker addresses from an array of orders stored in the Exchange calldata
- /// (which is embedded in `signedExchangeTransaction`).
- /// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
- /// @return makerAddresses The extracted maker addresses.
- function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
- internal pure
- returns (address[] makerAddresses)
- {
- uint256 orderArrayOffsetInBytes = orderArrayParamIndex * 32;
- uint256 orderArrayPtr = uint256(loadExchangeData(orderArrayOffsetInBytes));
- uint256 orderArrayLength = uint256(loadExchangeData(orderArrayPtr));
- uint256 orderArrayLengthInBytes = orderArrayLength * 32;
- uint256 orderArrayElementPtr = orderArrayPtr + 32;
- uint256 orderArrayElementEndPtr = orderArrayElementPtr + orderArrayLengthInBytes;
- for (uint orderPtrOffset = orderArrayElementPtr; orderPtrOffset < orderArrayElementEndPtr; orderPtrOffset += 32) {
- uint256 orderPtr = uint256(loadExchangeData(orderPtrOffset));
- address makerAddress = address(loadExchangeData(orderPtr + orderArrayElementPtr));
- makerAddresses = makerAddresses.append(makerAddress);
- }
- return makerAddresses;
- }
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IBalanceThresholdFilterCore.sol b/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IBalanceThresholdFilterCore.sol
deleted file mode 100644
index 4a1bf1fb2..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IBalanceThresholdFilterCore.sol
+++ /dev/null
@@ -1,55 +0,0 @@
-
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IBalanceThresholdFilterCore {
-
- /// @dev Executes an Exchange transaction iff the maker and taker meet
- /// the hold at least `BALANCE_THRESHOLD` of the asset `THRESHOLD_ASSET` OR
- /// the exchange function is a cancellation.
- /// Supported Exchange functions:
- /// - batchFillOrders
- /// - batchFillOrdersNoThrow
- /// - batchFillOrKillOrders
- /// - fillOrder
- /// - fillOrderNoThrow
- /// - fillOrKillOrder
- /// - marketBuyOrders
- /// - marketBuyOrdersNoThrow
- /// - marketSellOrders
- /// - marketSellOrdersNoThrow
- /// - matchOrders
- /// - cancelOrder
- /// - batchCancelOrders
- /// - cancelOrdersUpTo
- /// Trying to call any other exchange function will throw.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param signedExchangeTransaction AbiV2 encoded calldata.
- /// @param signature Proof of signer transaction by signer.
- function executeTransaction(
- uint256 salt,
- address signerAddress,
- bytes signedExchangeTransaction,
- bytes signature
- )
- external;
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IThresholdAsset.sol b/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IThresholdAsset.sol
deleted file mode 100644
index f78f9c2de..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/interfaces/IThresholdAsset.sol
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IThresholdAsset {
-
- /// @param _owner The address from which the balance will be retrieved
- /// @return Balance of owner
- function balanceOf(address _owner)
- external
- view
- returns (uint256);
-
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol b/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
deleted file mode 100644
index 074686e8d..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MBalanceThresholdFilterCore.sol
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "../interfaces/IThresholdAsset.sol";
-import "../interfaces/IBalanceThresholdFilterCore.sol";
-
-
-contract MBalanceThresholdFilterCore is
- IBalanceThresholdFilterCore
-{
-
- // Points to 0x exchange contract
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
-
- // The asset that must be held by makers/takers
- IThresholdAsset internal THRESHOLD_ASSET;
-
- // The minimum balance of `THRESHOLD_ASSET` that must be held by makers/takers
- uint256 internal BALANCE_THRESHOLD;
- // solhint-enable var-name-mixedcase
-
- // Addresses that hold at least `BALANCE_THRESHOLD` of `THRESHOLD_ASSET`
- event ValidatedAddresses (
- address[] addresses
- );
-
- /// @dev Constructs an array of addresses to be validated.
- /// Addresses depend on which Exchange function is to be called
- /// (defined by `signedExchangeTransaction` above).
- /// @param signerAddress Address of transaction signer.
- /// @return addressesToValidate Array of addresses to validate.
- function getAddressesToValidate(address signerAddress)
- internal pure
- returns (address[] memory addressesToValidate);
-}
diff --git a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MExchangeCalldata.sol b/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MExchangeCalldata.sol
deleted file mode 100644
index 40536d820..000000000
--- a/contracts/extensions/contracts/BalanceThresholdFilter/mixins/MExchangeCalldata.sol
+++ /dev/null
@@ -1,56 +0,0 @@
-
- /*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract MExchangeCalldata {
-
- /// @dev Emulates the `calldataload` opcode on the embedded Exchange calldata,
- /// which is accessed through `signedExchangeTransaction`.
- /// @param offset Offset into the Exchange calldata.
- /// @return value Corresponding 32 byte value stored at `offset`.
- function exchangeCalldataload(uint256 offset)
- internal pure
- returns (bytes32 value);
-
- /// @dev Convenience function that skips the 4 byte selector when loading
- /// from the embedded Exchange calldata.
- /// @param offset Offset into the Exchange calldata (minus the 4 byte selector)
- /// @return value Corresponding 32 byte value stored at `offset` + 4.
- function loadExchangeData(uint256 offset)
- internal pure
- returns (bytes32 value);
-
- /// @dev Extracts the maker address from an order stored in the Exchange calldata
- /// (which is embedded in `signedExchangeTransaction`).
- /// @param orderParamIndex Index of the order in the Exchange function's signature.
- /// @return makerAddress The extracted maker address.
- function loadMakerAddressFromOrder(uint256 orderParamIndex)
- internal pure
- returns (address makerAddress);
-
- /// @dev Extracts the maker addresses from an array of orders stored in the Exchange calldata
- /// (which is embedded in `signedExchangeTransaction`).
- /// @param orderArrayParamIndex Index of the order array in the Exchange function's signature
- /// @return makerAddresses The extracted maker addresses.
- function loadMakerAddressesFromOrderArray(uint256 orderArrayParamIndex)
- internal pure
- returns (address[] makerAddresses);
-}
diff --git a/contracts/extensions/contracts/DutchAuction/DutchAuction.sol b/contracts/extensions/contracts/DutchAuction/DutchAuction.sol
deleted file mode 100644
index 9c9f3990a..000000000
--- a/contracts/extensions/contracts/DutchAuction/DutchAuction.sol
+++ /dev/null
@@ -1,205 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
-
-
-contract DutchAuction is
- SafeMath
-{
- using LibBytes for bytes;
-
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
-
- struct AuctionDetails {
- uint256 beginTimeSeconds; // Auction begin unix timestamp: sellOrder.makerAssetData
- uint256 endTimeSeconds; // Auction end unix timestamp: sellOrder.expiryTimeSeconds
- uint256 beginAmount; // Auction begin amount: sellOrder.makerAssetData
- uint256 endAmount; // Auction end amount: sellOrder.takerAssetAmount
- uint256 currentAmount; // Calculated amount given block.timestamp
- uint256 currentTimeSeconds; // block.timestamp
- }
-
- constructor (address _exchange)
- public
- {
- EXCHANGE = IExchange(_exchange);
- }
-
- /// @dev 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.
- /// sellOrder.expiryTimeSeconds is the end time of the auction.
- /// sellOrder.takerAssetAmount is the end amount of the auction (lowest possible amount).
- /// sellOrder.makerAssetData is the ABI encoded Asset Proxy data with the following data appended
- /// buyOrder.makerAssetData is the buyers bid on the auction, must meet the amount for the current block timestamp
- /// (uint256 beginTimeSeconds, uint256 beginAmount).
- /// This function reverts in the following scenarios:
- /// * Auction has not started (auctionDetails.currentTimeSeconds < auctionDetails.beginTimeSeconds)
- /// * Auction has expired (auctionDetails.endTimeSeconds < auctionDetails.currentTimeSeconds)
- /// * Amount is invalid: Buy order amount is too low (buyOrder.makerAssetAmount < auctionDetails.currentAmount)
- /// * Amount is invalid: Invalid begin amount (auctionDetails.beginAmount > auctionDetails.endAmount)
- /// * Any failure in the 0x Match Orders
- /// @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 buySignature Proof that order was created by the buyer.
- /// @param sellSignature Proof that order was created by the seller.
- /// @return matchedFillResults amounts filled and fees paid by maker and taker of matched orders.
- function matchOrders(
- LibOrder.Order memory buyOrder,
- LibOrder.Order memory sellOrder,
- bytes memory buySignature,
- bytes memory sellSignature
- )
- public
- returns (LibFillResults.MatchedFillResults memory matchedFillResults)
- {
- AuctionDetails memory auctionDetails = getAuctionDetails(sellOrder);
- // Ensure the auction has not yet started
- require(
- auctionDetails.currentTimeSeconds >= auctionDetails.beginTimeSeconds,
- "AUCTION_NOT_STARTED"
- );
- // Ensure the auction has not expired. This will fail later in 0x but we can save gas by failing early
- require(
- sellOrder.expirationTimeSeconds > auctionDetails.currentTimeSeconds,
- "AUCTION_EXPIRED"
- );
- // Validate the buyer amount is greater than the current auction amount
- require(
- buyOrder.makerAssetAmount >= auctionDetails.currentAmount,
- "INVALID_AMOUNT"
- );
- // Match orders, maximally filling `buyOrder`
- matchedFillResults = EXCHANGE.matchOrders(
- buyOrder,
- sellOrder,
- buySignature,
- sellSignature
- );
- // The difference in sellOrder.takerAssetAmount and current amount is given as spread to the matcher
- // This may include additional spread from the buyOrder.makerAssetAmount and the currentAmount.
- // e.g currentAmount is 30, sellOrder.takerAssetAmount is 10 and buyOrder.makerAssetamount is 40.
- // 10 (40-30) is returned to the buyer, 20 (30-10) sent to the seller and 10 has previously
- // been transferred to the seller during matchOrders
- uint256 leftMakerAssetSpreadAmount = matchedFillResults.leftMakerAssetSpreadAmount;
- if (leftMakerAssetSpreadAmount > 0) {
- // ERC20 Asset data itself is encoded as follows:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 1 * 32 | function parameters: |
- // | | 4 | 12 | 1. token address padding |
- // | | 16 | 20 | 2. token address |
- bytes memory assetData = sellOrder.takerAssetData;
- address token = assetData.readAddress(16);
- // Calculate the excess from the buy order. This can occur if the buyer sends in a higher
- // amount than the calculated current amount
- uint256 buyerExcessAmount = safeSub(buyOrder.makerAssetAmount, auctionDetails.currentAmount);
- uint256 sellerExcessAmount = safeSub(leftMakerAssetSpreadAmount, buyerExcessAmount);
- // Return the difference between auctionDetails.currentAmount and sellOrder.takerAssetAmount
- // to the seller
- if (sellerExcessAmount > 0) {
- IERC20Token(token).transfer(sellOrder.makerAddress, sellerExcessAmount);
- }
- // Return the difference between buyOrder.makerAssetAmount and auctionDetails.currentAmount
- // to the buyer
- if (buyerExcessAmount > 0) {
- IERC20Token(token).transfer(buyOrder.makerAddress, buyerExcessAmount);
- }
- }
- return matchedFillResults;
- }
-
- /// @dev Calculates the Auction Details for the given order
- /// @param order The sell order
- /// @return AuctionDetails
- function getAuctionDetails(
- LibOrder.Order memory order
- )
- public
- returns (AuctionDetails memory auctionDetails)
- {
- uint256 makerAssetDataLength = order.makerAssetData.length;
- // It is unknown the encoded data of makerAssetData, we assume the last 64 bytes
- // are the Auction Details encoding.
- // Auction Details is encoded as follows:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Params | | 2 * 32 | parameters: |
- // | | -64 | 32 | 1. auction begin unix timestamp |
- // | | -32 | 32 | 2. auction begin begin amount |
- // ERC20 asset data length is 4+32, 64 for auction details results in min length 100
- require(
- makerAssetDataLength >= 100,
- "INVALID_ASSET_DATA"
- );
- uint256 auctionBeginTimeSeconds = order.makerAssetData.readUint256(makerAssetDataLength - 64);
- uint256 auctionBeginAmount = order.makerAssetData.readUint256(makerAssetDataLength - 32);
- // Ensure the auction has a valid begin time
- require(
- order.expirationTimeSeconds > auctionBeginTimeSeconds,
- "INVALID_BEGIN_TIME"
- );
- uint256 auctionDurationSeconds = order.expirationTimeSeconds-auctionBeginTimeSeconds;
- // Ensure the auction goes from high to low
- uint256 minAmount = order.takerAssetAmount;
- require(
- auctionBeginAmount > minAmount,
- "INVALID_AMOUNT"
- );
- uint256 amountDelta = auctionBeginAmount-minAmount;
- // solhint-disable-next-line not-rely-on-time
- uint256 timestamp = block.timestamp;
- auctionDetails.beginTimeSeconds = auctionBeginTimeSeconds;
- auctionDetails.endTimeSeconds = order.expirationTimeSeconds;
- auctionDetails.beginAmount = auctionBeginAmount;
- auctionDetails.endAmount = minAmount;
- auctionDetails.currentTimeSeconds = timestamp;
-
- uint256 remainingDurationSeconds = order.expirationTimeSeconds-timestamp;
- if (timestamp < auctionBeginTimeSeconds) {
- // If the auction has not yet begun the current amount is the auctionBeginAmount
- auctionDetails.currentAmount = auctionBeginAmount;
- } else if (timestamp >= order.expirationTimeSeconds) {
- // If the auction has ended the current amount is the minAmount.
- // Auction end time is guaranteed by 0x Exchange due to the order expiration
- auctionDetails.currentAmount = minAmount;
- } else {
- auctionDetails.currentAmount = safeAdd(
- minAmount,
- safeDiv(
- safeMul(remainingDurationSeconds, amountDelta),
- auctionDurationSeconds
- )
- );
- }
- return auctionDetails;
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/Forwarder.sol b/contracts/extensions/contracts/Forwarder/Forwarder.sol
deleted file mode 100644
index 94dec40ed..000000000
--- a/contracts/extensions/contracts/Forwarder/Forwarder.sol
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./MixinWeth.sol";
-import "./MixinForwarderCore.sol";
-import "./libs/LibConstants.sol";
-import "./MixinAssets.sol";
-import "./MixinExchangeWrapper.sol";
-
-
-// solhint-disable no-empty-blocks
-contract Forwarder is
- LibConstants,
- MixinWeth,
- MixinAssets,
- MixinExchangeWrapper,
- MixinForwarderCore
-{
- constructor (
- address _exchange,
- bytes memory _zrxAssetData,
- bytes memory _wethAssetData
- )
- public
- LibConstants(
- _exchange,
- _zrxAssetData,
- _wethAssetData
- )
- MixinForwarderCore()
- {}
-}
diff --git a/contracts/extensions/contracts/Forwarder/MixinAssets.sol b/contracts/extensions/contracts/Forwarder/MixinAssets.sol
deleted file mode 100644
index 116cdf267..000000000
--- a/contracts/extensions/contracts/Forwarder/MixinAssets.sol
+++ /dev/null
@@ -1,143 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
-import "./libs/LibConstants.sol";
-import "./mixins/MAssets.sol";
-
-
-contract MixinAssets is
- Ownable,
- LibConstants,
- MAssets
-{
- using LibBytes for bytes;
-
- bytes4 constant internal ERC20_TRANSFER_SELECTOR = bytes4(keccak256("transfer(address,uint256)"));
-
- /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to
- /// function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be
- /// used to withdraw assets that were accidentally sent to this contract.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of ERC20 token to withdraw.
- function withdrawAsset(
- bytes assetData,
- uint256 amount
- )
- external
- onlyOwner
- {
- transferAssetToSender(assetData, amount);
- }
-
- /// @dev Transfers given amount of asset to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferAssetToSender(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- bytes4 proxyId = assetData.readBytes4(0);
-
- if (proxyId == ERC20_DATA_ID) {
- transferERC20Token(assetData, amount);
- } else if (proxyId == ERC721_DATA_ID) {
- transferERC721Token(assetData, amount);
- } else {
- revert("UNSUPPORTED_ASSET_PROXY");
- }
- }
-
- /// @dev Decodes ERC20 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- address token = assetData.readAddress(16);
-
- // Transfer tokens.
- // We do a raw call so we can check the success separate
- // from the return data.
- bool success = token.call(abi.encodeWithSelector(
- ERC20_TRANSFER_SELECTOR,
- msg.sender,
- amount
- ));
- require(
- success,
- "TRANSFER_FAILED"
- );
-
- // Check return data.
- // If there is no return data, we assume the token incorrectly
- // does not return a bool. In this case we expect it to revert
- // on failure, which was handled above.
- // If the token does return data, we require that it is a single
- // value that evaluates to true.
- assembly {
- if returndatasize {
- success := 0
- if eq(returndatasize, 32) {
- // First 64 bytes of memory are reserved scratch space
- returndatacopy(0, 0, 32)
- success := mload(0)
- }
- }
- }
- require(
- success,
- "TRANSFER_FAILED"
- );
- }
-
- /// @dev Decodes ERC721 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- require(
- amount == 1,
- "INVALID_AMOUNT"
- );
- // Decode asset data.
- address token = assetData.readAddress(16);
- uint256 tokenId = assetData.readUint256(36);
-
- // Perform transfer.
- IERC721Token(token).transferFrom(
- address(this),
- msg.sender,
- tokenId
- );
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/MixinExchangeWrapper.sol b/contracts/extensions/contracts/Forwarder/MixinExchangeWrapper.sol
deleted file mode 100644
index cab26741d..000000000
--- a/contracts/extensions/contracts/Forwarder/MixinExchangeWrapper.sol
+++ /dev/null
@@ -1,260 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./libs/LibConstants.sol";
-import "./mixins/MExchangeWrapper.sol";
-import "@0x/contracts-libs/contracts/libs/LibAbiEncoder.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-
-
-contract MixinExchangeWrapper is
- LibAbiEncoder,
- LibFillResults,
- LibMath,
- LibConstants,
- MExchangeWrapper
-{
- /// @dev Fills the input order.
- /// Returns false if the transaction would otherwise revert.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderNoThrow(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (FillResults memory fillResults)
- {
- // ABI encode calldata for `fillOrder`
- bytes memory fillOrderCalldata = abiEncodeFillOrder(
- order,
- takerAssetFillAmount,
- signature
- );
-
- address exchange = address(EXCHANGE);
-
- // Call `fillOrder` and handle any exceptions gracefully
- assembly {
- let success := call(
- gas, // forward all gas
- exchange, // call address of Exchange contract
- 0, // transfer 0 wei
- add(fillOrderCalldata, 32), // pointer to start of input (skip array length in first 32 bytes)
- mload(fillOrderCalldata), // length of input
- fillOrderCalldata, // write output over input
- 128 // output size is 128 bytes
- )
- if success {
- mstore(fillResults, mload(fillOrderCalldata))
- mstore(add(fillResults, 32), mload(add(fillOrderCalldata, 32)))
- mstore(add(fillResults, 64), mload(add(fillOrderCalldata, 64)))
- mstore(add(fillResults, 96), mload(add(fillOrderCalldata, 96)))
- }
- }
- // fillResults values will be 0 by default if call was unsuccessful
- return fillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of WETH has been sold by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param wethSellAmount Desired amount of WETH to sell.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellWeth(
- LibOrder.Order[] memory orders,
- uint256 wethSellAmount,
- bytes[] memory signatures
- )
- internal
- returns (FillResults memory totalFillResults)
- {
- bytes memory makerAssetData = orders[0].makerAssetData;
- bytes memory wethAssetData = WETH_ASSET_DATA;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being bought by taker is the same for each order.
- // We assume that asset being sold by taker is WETH for each order.
- orders[i].makerAssetData = makerAssetData;
- orders[i].takerAssetData = wethAssetData;
-
- // Calculate the remaining amount of WETH to sell
- uint256 remainingTakerAssetFillAmount = safeSub(wethSellAmount, totalFillResults.takerAssetFilledAmount);
-
- // Attempt to sell the remaining amount of WETH
- FillResults memory singleFillResults = fillOrderNoThrow(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of takerAsset has been sold
- if (totalFillResults.takerAssetFilledAmount >= wethSellAmount) {
- break;
- }
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.
- /// Returns false if the transaction would otherwise revert.
- /// The asset being sold by taker must always be WETH.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyExactAmountWithWeth(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- internal
- returns (FillResults memory totalFillResults)
- {
- bytes memory makerAssetData = orders[0].makerAssetData;
- bytes memory wethAssetData = WETH_ASSET_DATA;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being bought by taker is the same for each order.
- // We assume that asset being sold by taker is WETH for each order.
- orders[i].makerAssetData = makerAssetData;
- orders[i].takerAssetData = wethAssetData;
-
- // Calculate the remaining amount of makerAsset to buy
- uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
-
- // Convert the remaining amount of makerAsset to buy into remaining amount
- // of takerAsset to sell, assuming entire amount can be sold in the current order.
- // We round up because the exchange rate computed by fillOrder rounds in favor
- // of the Maker. In this case we want to overestimate the amount of takerAsset.
- uint256 remainingTakerAssetFillAmount = getPartialAmountCeil(
- orders[i].takerAssetAmount,
- orders[i].makerAssetAmount,
- remainingMakerAssetFillAmount
- );
-
- // Attempt to sell the remaining amount of takerAsset
- FillResults memory singleFillResults = fillOrderNoThrow(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of makerAsset has been bought
- uint256 makerAssetFilledAmount = totalFillResults.makerAssetFilledAmount;
- if (makerAssetFilledAmount >= makerAssetFillAmount) {
- break;
- }
- }
-
- require(
- makerAssetFilledAmount >= makerAssetFillAmount,
- "COMPLETE_FILL_FAILED"
- );
- return totalFillResults;
- }
-
- /// @dev Buys zrxBuyAmount of ZRX fee tokens, taking into account ZRX fees for each order. This will guarantee
- /// that at least zrxBuyAmount of ZRX is purchased (sometimes slightly over due to rounding issues).
- /// It is possible that a request to buy 200 ZRX will require purchasing 202 ZRX
- /// as 2 ZRX is required to purchase the 200 ZRX fee tokens. This guarantees at least 200 ZRX for future purchases.
- /// The asset being sold by taker must always be WETH.
- /// @param orders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset.
- /// @param zrxBuyAmount Desired amount of ZRX to buy.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return totalFillResults Amounts filled and fees paid by maker and taker.
- function marketBuyExactZrxWithWeth(
- LibOrder.Order[] memory orders,
- uint256 zrxBuyAmount,
- bytes[] memory signatures
- )
- internal
- returns (FillResults memory totalFillResults)
- {
- // Do nothing if zrxBuyAmount == 0
- if (zrxBuyAmount == 0) {
- return totalFillResults;
- }
-
- bytes memory zrxAssetData = ZRX_ASSET_DATA;
- bytes memory wethAssetData = WETH_ASSET_DATA;
- uint256 zrxPurchased = 0;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // All of these are ZRX/WETH, so we can drop the respective assetData from calldata.
- orders[i].makerAssetData = zrxAssetData;
- orders[i].takerAssetData = wethAssetData;
-
- // Calculate the remaining amount of ZRX to buy.
- uint256 remainingZrxBuyAmount = safeSub(zrxBuyAmount, zrxPurchased);
-
- // Convert the remaining amount of ZRX to buy into remaining amount
- // of WETH to sell, assuming entire amount can be sold in the current order.
- // We round up because the exchange rate computed by fillOrder rounds in favor
- // of the Maker. In this case we want to overestimate the amount of takerAsset.
- uint256 remainingWethSellAmount = getPartialAmountCeil(
- orders[i].takerAssetAmount,
- safeSub(orders[i].makerAssetAmount, orders[i].takerFee), // our exchange rate after fees
- remainingZrxBuyAmount
- );
-
- // Attempt to sell the remaining amount of WETH.
- FillResults memory singleFillResult = fillOrderNoThrow(
- orders[i],
- remainingWethSellAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker.
- addFillResults(totalFillResults, singleFillResult);
- zrxPurchased = safeSub(totalFillResults.makerAssetFilledAmount, totalFillResults.takerFeePaid);
-
- // Stop execution if the entire amount of ZRX has been bought.
- if (zrxPurchased >= zrxBuyAmount) {
- break;
- }
- }
-
- require(
- zrxPurchased >= zrxBuyAmount,
- "COMPLETE_FILL_FAILED"
- );
- return totalFillResults;
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/MixinForwarderCore.sol b/contracts/extensions/contracts/Forwarder/MixinForwarderCore.sol
deleted file mode 100644
index 11c0147a5..000000000
--- a/contracts/extensions/contracts/Forwarder/MixinForwarderCore.sol
+++ /dev/null
@@ -1,214 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./libs/LibConstants.sol";
-import "./mixins/MWeth.sol";
-import "./mixins/MAssets.sol";
-import "./mixins/MExchangeWrapper.sol";
-import "./interfaces/IForwarderCore.sol";
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-
-
-contract MixinForwarderCore is
- LibFillResults,
- LibMath,
- LibConstants,
- MWeth,
- MAssets,
- MExchangeWrapper,
- IForwarderCore
-{
- using LibBytes for bytes;
-
- /// @dev Constructor approves ERC20 proxy to transfer ZRX and WETH on this contract's behalf.
- constructor ()
- public
- {
- address proxyAddress = EXCHANGE.getAssetProxy(ERC20_DATA_ID);
- require(
- proxyAddress != address(0),
- "UNREGISTERED_ASSET_PROXY"
- );
- ETHER_TOKEN.approve(proxyAddress, MAX_UINT);
- ZRX_TOKEN.approve(proxyAddress, MAX_UINT);
- }
-
- /// @dev 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 orders Array of order specifications used containing desired makerAsset and WETH as takerAsset.
- /// @param signatures Proofs that orders have been created by makers.
- /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.
- /// @param feeSignatures Proofs that feeOrders have been created by makers.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- /// @return Amounts filled and fees paid by maker and taker for both sets of orders.
- function marketSellOrdersWithEth(
- LibOrder.Order[] memory orders,
- bytes[] memory signatures,
- LibOrder.Order[] memory feeOrders,
- bytes[] memory feeSignatures,
- uint256 feePercentage,
- address feeRecipient
- )
- public
- payable
- returns (
- FillResults memory orderFillResults,
- FillResults memory feeOrderFillResults
- )
- {
- // Convert ETH to WETH.
- convertEthToWeth();
-
- uint256 wethSellAmount;
- uint256 zrxBuyAmount;
- uint256 makerAssetAmountPurchased;
- if (orders[0].makerAssetData.equals(ZRX_ASSET_DATA)) {
- // Calculate amount of WETH that won't be spent on ETH fees.
- wethSellAmount = getPartialAmountFloor(
- PERCENTAGE_DENOMINATOR,
- safeAdd(PERCENTAGE_DENOMINATOR, feePercentage),
- msg.value
- );
- // Market sell available WETH.
- // ZRX fees are paid with this contract's balance.
- orderFillResults = marketSellWeth(
- orders,
- wethSellAmount,
- signatures
- );
- // The fee amount must be deducted from the amount transfered back to sender.
- makerAssetAmountPurchased = safeSub(orderFillResults.makerAssetFilledAmount, orderFillResults.takerFeePaid);
- } else {
- // 5% of WETH is reserved for filling feeOrders and paying feeRecipient.
- wethSellAmount = getPartialAmountFloor(
- MAX_WETH_FILL_PERCENTAGE,
- PERCENTAGE_DENOMINATOR,
- msg.value
- );
- // Market sell 95% of WETH.
- // ZRX fees are payed with this contract's balance.
- orderFillResults = marketSellWeth(
- orders,
- wethSellAmount,
- signatures
- );
- // Buy back all ZRX spent on fees.
- zrxBuyAmount = orderFillResults.takerFeePaid;
- feeOrderFillResults = marketBuyExactZrxWithWeth(
- feeOrders,
- zrxBuyAmount,
- feeSignatures
- );
- makerAssetAmountPurchased = orderFillResults.makerAssetFilledAmount;
- }
-
- // Transfer feePercentage of total ETH spent on primary orders to feeRecipient.
- // Refund remaining ETH to msg.sender.
- transferEthFeeAndRefund(
- orderFillResults.takerAssetFilledAmount,
- feeOrderFillResults.takerAssetFilledAmount,
- feePercentage,
- feeRecipient
- );
-
- // Transfer purchased assets to msg.sender.
- transferAssetToSender(orders[0].makerAssetData, makerAssetAmountPurchased);
- }
-
- /// @dev Attempt to purchase makerAssetFillAmount of makerAsset by selling ETH provided with transaction.
- /// Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.
- /// Any ETH not spent will be refunded to sender.
- /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset.
- /// @param makerAssetFillAmount Desired amount of makerAsset to purchase.
- /// @param signatures Proofs that orders have been created by makers.
- /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.
- /// @param feeSignatures Proofs that feeOrders have been created by makers.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- /// @return Amounts filled and fees paid by maker and taker for both sets of orders.
- function marketBuyOrdersWithEth(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures,
- LibOrder.Order[] memory feeOrders,
- bytes[] memory feeSignatures,
- uint256 feePercentage,
- address feeRecipient
- )
- public
- payable
- returns (
- FillResults memory orderFillResults,
- FillResults memory feeOrderFillResults
- )
- {
- // Convert ETH to WETH.
- convertEthToWeth();
-
- uint256 zrxBuyAmount;
- uint256 makerAssetAmountPurchased;
- if (orders[0].makerAssetData.equals(ZRX_ASSET_DATA)) {
- // If the makerAsset is ZRX, it is not necessary to pay fees out of this
- // contracts's ZRX balance because fees are factored into the price of the order.
- orderFillResults = marketBuyExactZrxWithWeth(
- orders,
- makerAssetFillAmount,
- signatures
- );
- // The fee amount must be deducted from the amount transfered back to sender.
- makerAssetAmountPurchased = safeSub(orderFillResults.makerAssetFilledAmount, orderFillResults.takerFeePaid);
- } else {
- // Attemp to purchase desired amount of makerAsset.
- // ZRX fees are payed with this contract's balance.
- orderFillResults = marketBuyExactAmountWithWeth(
- orders,
- makerAssetFillAmount,
- signatures
- );
- // Buy back all ZRX spent on fees.
- zrxBuyAmount = orderFillResults.takerFeePaid;
- feeOrderFillResults = marketBuyExactZrxWithWeth(
- feeOrders,
- zrxBuyAmount,
- feeSignatures
- );
- makerAssetAmountPurchased = orderFillResults.makerAssetFilledAmount;
- }
-
- // Transfer feePercentage of total ETH spent on primary orders to feeRecipient.
- // Refund remaining ETH to msg.sender.
- transferEthFeeAndRefund(
- orderFillResults.takerAssetFilledAmount,
- feeOrderFillResults.takerAssetFilledAmount,
- feePercentage,
- feeRecipient
- );
-
- // Transfer purchased assets to msg.sender.
- transferAssetToSender(orders[0].makerAssetData, makerAssetAmountPurchased);
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/MixinWeth.sol b/contracts/extensions/contracts/Forwarder/MixinWeth.sol
deleted file mode 100644
index 25a35f47b..000000000
--- a/contracts/extensions/contracts/Forwarder/MixinWeth.sol
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-import "./libs/LibConstants.sol";
-import "./mixins/MWeth.sol";
-
-
-contract MixinWeth is
- LibMath,
- LibConstants,
- MWeth
-{
- /// @dev Default payabale function, this allows us to withdraw WETH
- function ()
- public
- payable
- {
- require(
- msg.sender == address(ETHER_TOKEN),
- "DEFAULT_FUNCTION_WETH_CONTRACT_ONLY"
- );
- }
-
- /// @dev Converts message call's ETH value into WETH.
- function convertEthToWeth()
- internal
- {
- require(
- msg.value > 0,
- "INVALID_MSG_VALUE"
- );
- ETHER_TOKEN.deposit.value(msg.value)();
- }
-
- /// @dev Transfers feePercentage of WETH spent on primary orders to feeRecipient.
- /// Refunds any excess ETH to msg.sender.
- /// @param wethSoldExcludingFeeOrders Amount of WETH sold when filling primary orders.
- /// @param wethSoldForZrx Amount of WETH sold when purchasing ZRX required for primary order fees.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- function transferEthFeeAndRefund(
- uint256 wethSoldExcludingFeeOrders,
- uint256 wethSoldForZrx,
- uint256 feePercentage,
- address feeRecipient
- )
- internal
- {
- // Ensure feePercentage is less than 5%.
- require(
- feePercentage <= MAX_FEE_PERCENTAGE,
- "FEE_PERCENTAGE_TOO_LARGE"
- );
-
- // Ensure that no extra WETH owned by this contract has been sold.
- uint256 wethSold = safeAdd(wethSoldExcludingFeeOrders, wethSoldForZrx);
- require(
- wethSold <= msg.value,
- "OVERSOLD_WETH"
- );
-
- // Calculate amount of WETH that hasn't been sold.
- uint256 wethRemaining = safeSub(msg.value, wethSold);
-
- // Calculate ETH fee to pay to feeRecipient.
- uint256 ethFee = getPartialAmountFloor(
- feePercentage,
- PERCENTAGE_DENOMINATOR,
- wethSoldExcludingFeeOrders
- );
-
- // Ensure fee is less than amount of WETH remaining.
- require(
- ethFee <= wethRemaining,
- "INSUFFICIENT_ETH_REMAINING"
- );
-
- // Do nothing if no WETH remaining
- if (wethRemaining > 0) {
- // Convert remaining WETH to ETH
- ETHER_TOKEN.withdraw(wethRemaining);
-
- // Pay ETH to feeRecipient
- if (ethFee > 0) {
- feeRecipient.transfer(ethFee);
- }
-
- // Refund remaining ETH to msg.sender.
- uint256 ethRefund = safeSub(wethRemaining, ethFee);
- if (ethRefund > 0) {
- msg.sender.transfer(ethRefund);
- }
- }
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/interfaces/IAssets.sol b/contracts/extensions/contracts/Forwarder/interfaces/IAssets.sol
deleted file mode 100644
index cebfd3706..000000000
--- a/contracts/extensions/contracts/Forwarder/interfaces/IAssets.sol
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IAssets {
-
- /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to
- /// function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be
- /// used to withdraw assets that were accidentally sent to this contract.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of ERC20 token to withdraw.
- function withdrawAsset(
- bytes assetData,
- uint256 amount
- )
- external;
-}
diff --git a/contracts/extensions/contracts/Forwarder/interfaces/IForwarder.sol b/contracts/extensions/contracts/Forwarder/interfaces/IForwarder.sol
deleted file mode 100644
index 6ce8a1d31..000000000
--- a/contracts/extensions/contracts/Forwarder/interfaces/IForwarder.sol
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./IForwarderCore.sol";
-import "./IAssets.sol";
-
-
-// solhint-disable no-empty-blocks
-contract IForwarder is
- IForwarderCore,
- IAssets
-{}
diff --git a/contracts/extensions/contracts/Forwarder/interfaces/IForwarderCore.sol b/contracts/extensions/contracts/Forwarder/interfaces/IForwarderCore.sol
deleted file mode 100644
index 7f62722e7..000000000
--- a/contracts/extensions/contracts/Forwarder/interfaces/IForwarderCore.sol
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-
-
-contract IForwarderCore {
-
- /// @dev 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 orders Array of order specifications used containing desired makerAsset and WETH as takerAsset.
- /// @param signatures Proofs that orders have been created by makers.
- /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.
- /// @param feeSignatures Proofs that feeOrders have been created by makers.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- /// @return Amounts filled and fees paid by maker and taker for both sets of orders.
- function marketSellOrdersWithEth(
- LibOrder.Order[] memory orders,
- bytes[] memory signatures,
- LibOrder.Order[] memory feeOrders,
- bytes[] memory feeSignatures,
- uint256 feePercentage,
- address feeRecipient
- )
- public
- payable
- returns (
- LibFillResults.FillResults memory orderFillResults,
- LibFillResults.FillResults memory feeOrderFillResults
- );
-
- /// @dev Attempt to purchase makerAssetFillAmount of makerAsset by selling ETH provided with transaction.
- /// Any ZRX required to pay fees for primary orders will automatically be purchased by this contract.
- /// Any ETH not spent will be refunded to sender.
- /// @param orders Array of order specifications used containing desired makerAsset and WETH as takerAsset.
- /// @param makerAssetFillAmount Desired amount of makerAsset to purchase.
- /// @param signatures Proofs that orders have been created by makers.
- /// @param feeOrders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset. Used to purchase ZRX for primary order fees.
- /// @param feeSignatures Proofs that feeOrders have been created by makers.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- /// @return Amounts filled and fees paid by maker and taker for both sets of orders.
- function marketBuyOrdersWithEth(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures,
- LibOrder.Order[] memory feeOrders,
- bytes[] memory feeSignatures,
- uint256 feePercentage,
- address feeRecipient
- )
- public
- payable
- returns (
- LibFillResults.FillResults memory orderFillResults,
- LibFillResults.FillResults memory feeOrderFillResults
- );
-}
diff --git a/contracts/extensions/contracts/Forwarder/libs/LibConstants.sol b/contracts/extensions/contracts/Forwarder/libs/LibConstants.sol
deleted file mode 100644
index 0d2f6e36d..000000000
--- a/contracts/extensions/contracts/Forwarder/libs/LibConstants.sol
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-tokens/contracts/tokens/EtherToken/IEtherToken.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-
-
-contract LibConstants {
-
- using LibBytes for bytes;
-
- bytes4 constant internal ERC20_DATA_ID = bytes4(keccak256("ERC20Token(address)"));
- bytes4 constant internal ERC721_DATA_ID = bytes4(keccak256("ERC721Token(address,uint256)"));
- uint256 constant internal MAX_UINT = 2**256 - 1;
- uint256 constant internal PERCENTAGE_DENOMINATOR = 10**18;
- uint256 constant internal MAX_FEE_PERCENTAGE = 5 * PERCENTAGE_DENOMINATOR / 100; // 5%
- uint256 constant internal MAX_WETH_FILL_PERCENTAGE = 95 * PERCENTAGE_DENOMINATOR / 100; // 95%
-
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
- IEtherToken internal ETHER_TOKEN;
- IERC20Token internal ZRX_TOKEN;
- bytes internal ZRX_ASSET_DATA;
- bytes internal WETH_ASSET_DATA;
- // solhint-enable var-name-mixedcase
-
- constructor (
- address _exchange,
- bytes memory _zrxAssetData,
- bytes memory _wethAssetData
- )
- public
- {
- EXCHANGE = IExchange(_exchange);
- ZRX_ASSET_DATA = _zrxAssetData;
- WETH_ASSET_DATA = _wethAssetData;
-
- address etherToken = _wethAssetData.readAddress(16);
- address zrxToken = _zrxAssetData.readAddress(16);
- ETHER_TOKEN = IEtherToken(etherToken);
- ZRX_TOKEN = IERC20Token(zrxToken);
- }
-}
diff --git a/contracts/extensions/contracts/Forwarder/libs/LibForwarderErrors.sol b/contracts/extensions/contracts/Forwarder/libs/LibForwarderErrors.sol
deleted file mode 100644
index 7a95b78a0..000000000
--- a/contracts/extensions/contracts/Forwarder/libs/LibForwarderErrors.sol
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-// solhint-disable
-pragma solidity ^0.4.24;
-
-
-/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.
-contract LibForwarderErrors {
- string constant FEE_PERCENTAGE_TOO_LARGE = "FEE_PROPORTION_TOO_LARGE"; // Provided fee percentage greater than 5%.
- string constant INSUFFICIENT_ETH_REMAINING = "INSUFFICIENT_ETH_REMAINING"; // Not enough ETH remaining to pay feeRecipient.
- string constant OVERSOLD_WETH = "OVERSOLD_WETH"; // More WETH sold than provided with current message call.
- string constant COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired purchase amount not completely filled (required for ZRX fees only).
- string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer failed.
- string constant UNSUPPORTED_ASSET_PROXY = "UNSUPPORTED_ASSET_PROXY"; // Proxy in assetData not supported.
- string constant DEFAULT_FUNCTION_WETH_CONTRACT_ONLY = "DEFAULT_FUNCTION_WETH_CONTRACT_ONLY"; // Fallback function may only be used for WETH withdrawals.
- string constant INVALID_MSG_VALUE = "INVALID_MSG_VALUE"; // msg.value must be greater than 0.
- string constant INVALID_AMOUNT = "INVALID_AMOUNT"; // Amount must equal 1.
-}
diff --git a/contracts/extensions/contracts/Forwarder/mixins/MAssets.sol b/contracts/extensions/contracts/Forwarder/mixins/MAssets.sol
deleted file mode 100644
index 1757b37fb..000000000
--- a/contracts/extensions/contracts/Forwarder/mixins/MAssets.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "../interfaces/IAssets.sol";
-
-
-contract MAssets is
- IAssets
-{
- /// @dev Transfers given amount of asset to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferAssetToSender(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Decodes ERC20 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Decodes ERC721 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-}
diff --git a/contracts/extensions/contracts/Forwarder/mixins/MExchangeWrapper.sol b/contracts/extensions/contracts/Forwarder/mixins/MExchangeWrapper.sol
deleted file mode 100644
index 143f888b1..000000000
--- a/contracts/extensions/contracts/Forwarder/mixins/MExchangeWrapper.sol
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-
-
-contract MExchangeWrapper {
-
- /// @dev Fills the input order.
- /// Returns false if the transaction would otherwise revert.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderNoThrow(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (LibFillResults.FillResults memory fillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of WETH has been sold by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param wethSellAmount Desired amount of WETH to sell.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellWeth(
- LibOrder.Order[] memory orders,
- uint256 wethSellAmount,
- bytes[] memory signatures
- )
- internal
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.
- /// Returns false if the transaction would otherwise revert.
- /// The asset being sold by taker must always be WETH.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyExactAmountWithWeth(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- internal
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Buys zrxBuyAmount of ZRX fee tokens, taking into account ZRX fees for each order. This will guarantee
- /// that at least zrxBuyAmount of ZRX is purchased (sometimes slightly over due to rounding issues).
- /// It is possible that a request to buy 200 ZRX will require purchasing 202 ZRX
- /// as 2 ZRX is required to purchase the 200 ZRX fee tokens. This guarantees at least 200 ZRX for future purchases.
- /// The asset being sold by taker must always be WETH.
- /// @param orders Array of order specifications containing ZRX as makerAsset and WETH as takerAsset.
- /// @param zrxBuyAmount Desired amount of ZRX to buy.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return totalFillResults Amounts filled and fees paid by maker and taker.
- function marketBuyExactZrxWithWeth(
- LibOrder.Order[] memory orders,
- uint256 zrxBuyAmount,
- bytes[] memory signatures
- )
- internal
- returns (LibFillResults.FillResults memory totalFillResults);
-}
diff --git a/contracts/extensions/contracts/Forwarder/mixins/MWeth.sol b/contracts/extensions/contracts/Forwarder/mixins/MWeth.sol
deleted file mode 100644
index 15d66942f..000000000
--- a/contracts/extensions/contracts/Forwarder/mixins/MWeth.sol
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract MWeth {
-
- /// @dev Converts message call's ETH value into WETH.
- function convertEthToWeth()
- internal;
-
- /// @dev Transfers feePercentage of WETH spent on primary orders to feeRecipient.
- /// Refunds any excess ETH to msg.sender.
- /// @param wethSoldExcludingFeeOrders Amount of WETH sold when filling primary orders.
- /// @param wethSoldForZrx Amount of WETH sold when purchasing ZRX required for primary order fees.
- /// @param feePercentage Percentage of WETH sold that will payed as fee to forwarding contract feeRecipient.
- /// @param feeRecipient Address that will receive ETH when orders are filled.
- function transferEthFeeAndRefund(
- uint256 wethSoldExcludingFeeOrders,
- uint256 wethSoldForZrx,
- uint256 feePercentage,
- address feeRecipient
- )
- internal;
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/MixinAssets.sol b/contracts/extensions/contracts/OrderMatcher/MixinAssets.sol
deleted file mode 100644
index f0f91cfc0..000000000
--- a/contracts/extensions/contracts/OrderMatcher/MixinAssets.sol
+++ /dev/null
@@ -1,195 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
-import "./mixins/MAssets.sol";
-import "./libs/LibConstants.sol";
-
-
-contract MixinAssets is
- MAssets,
- Ownable,
- LibConstants
-{
- using LibBytes for bytes;
-
- /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to
- /// function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be
- /// used to withdraw assets that were accidentally sent to this contract.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to withdraw.
- function withdrawAsset(
- bytes assetData,
- uint256 amount
- )
- external
- onlyOwner
- {
- transferAssetToSender(assetData, amount);
- }
-
- /// @dev Approves or disapproves an AssetProxy to spend asset.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveAssetProxy(
- bytes assetData,
- uint256 amount
- )
- external
- onlyOwner
- {
- bytes4 proxyId = assetData.readBytes4(0);
-
- if (proxyId == ERC20_DATA_ID) {
- approveERC20Token(assetData, amount);
- } else if (proxyId == ERC721_DATA_ID) {
- approveERC721Token(assetData, amount);
- } else {
- revert("UNSUPPORTED_ASSET_PROXY");
- }
- }
-
- /// @dev Transfers given amount of asset to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferAssetToSender(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- bytes4 proxyId = assetData.readBytes4(0);
-
- if (proxyId == ERC20_DATA_ID) {
- transferERC20Token(assetData, amount);
- } else if (proxyId == ERC721_DATA_ID) {
- transferERC721Token(assetData, amount);
- } else {
- revert("UNSUPPORTED_ASSET_PROXY");
- }
- }
-
- /// @dev Decodes ERC20 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- // 4 byte id + 12 0 bytes before ABI encoded token address.
- address token = assetData.readAddress(16);
-
- // Transfer tokens.
- // We do a raw call so we can check the success separate
- // from the return data.
- bool success = token.call(abi.encodeWithSelector(
- ERC20_TRANSFER_SELECTOR,
- msg.sender,
- amount
- ));
- require(
- success,
- "TRANSFER_FAILED"
- );
-
- // Check return data.
- // If there is no return data, we assume the token incorrectly
- // does not return a bool. In this case we expect it to revert
- // on failure, which was handled above.
- // If the token does return data, we require that it is a single
- // value that evaluates to true.
- assembly {
- if returndatasize {
- success := 0
- if eq(returndatasize, 32) {
- // First 64 bytes of memory are reserved scratch space
- returndatacopy(0, 0, 32)
- success := mload(0)
- }
- }
- }
- require(
- success,
- "TRANSFER_FAILED"
- );
- }
-
- /// @dev Decodes ERC721 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- require(
- amount == 1,
- "INVALID_AMOUNT"
- );
- // Decode asset data.
- // 4 byte id + 12 0 bytes before ABI encoded token address.
- address token = assetData.readAddress(16);
- // 4 byte id + 32 byte ABI encoded token address before token id.
- uint256 tokenId = assetData.readUint256(36);
-
- // Perform transfer.
- IERC721Token(token).transferFrom(
- address(this),
- msg.sender,
- tokenId
- );
- }
-
- /// @dev Sets approval for ERC20 AssetProxy.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- address token = assetData.readAddress(16);
- require(
- IERC20Token(token).approve(ERC20_PROXY_ADDRESS, amount),
- "APPROVAL_FAILED"
- );
- }
-
- /// @dev Sets approval for ERC721 AssetProxy.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal
- {
- address token = assetData.readAddress(16);
- bool approval = amount >= 1;
- IERC721Token(token).setApprovalForAll(ERC721_PROXY_ADDRESS, approval);
- }
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/MixinMatchOrders.sol b/contracts/extensions/contracts/OrderMatcher/MixinMatchOrders.sol
deleted file mode 100644
index 1787deb59..000000000
--- a/contracts/extensions/contracts/OrderMatcher/MixinMatchOrders.sol
+++ /dev/null
@@ -1,86 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./libs/LibConstants.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-
-
-contract MixinMatchOrders is
- Ownable,
- LibConstants
-{
- /// @dev 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 is then used to fill the right order as much as possible.
- /// This results in a spread being taken in terms of both assets. The spread is held within this contract.
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftSignature Proof that order was created by the left maker.
- /// @param rightSignature Proof that order was created by the right maker.
- function matchOrders(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- bytes memory leftSignature,
- bytes memory rightSignature
- )
- public
- onlyOwner
- {
- // Match orders, maximally filling `leftOrder`
- LibFillResults.MatchedFillResults memory matchedFillResults = EXCHANGE.matchOrders(
- leftOrder,
- rightOrder,
- leftSignature,
- rightSignature
- );
-
- uint256 leftMakerAssetSpreadAmount = matchedFillResults.leftMakerAssetSpreadAmount;
- uint256 rightOrderTakerAssetAmount = rightOrder.takerAssetAmount;
-
- // Do not attempt to call `fillOrder` if no spread was taken or `rightOrder` has been completely filled
- if (leftMakerAssetSpreadAmount == 0 || matchedFillResults.right.takerAssetFilledAmount == rightOrderTakerAssetAmount) {
- return;
- }
-
- // The `assetData` fields of the `rightOrder` could have been null for the `matchOrders` call. We reassign them before calling `fillOrder`.
- rightOrder.makerAssetData = leftOrder.takerAssetData;
- rightOrder.takerAssetData = leftOrder.makerAssetData;
-
- // Query `rightOrder` info to check if it has been completely filled
- // We need to make this check in case the `rightOrder` was partially filled before the `matchOrders` call
- LibOrder.OrderInfo memory orderInfo = EXCHANGE.getOrderInfo(rightOrder);
-
- // Do not attempt to call `fillOrder` if order has been completely filled
- if (orderInfo.orderTakerAssetFilledAmount == rightOrderTakerAssetAmount) {
- return;
- }
-
- // We do not need to pass in a signature since it was already validated in the `matchOrders` call
- EXCHANGE.fillOrder(
- rightOrder,
- leftMakerAssetSpreadAmount,
- ""
- );
- }
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/OrderMatcher.sol b/contracts/extensions/contracts/OrderMatcher/OrderMatcher.sol
deleted file mode 100644
index 4879b7bca..000000000
--- a/contracts/extensions/contracts/OrderMatcher/OrderMatcher.sol
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "./libs/LibConstants.sol";
-import "./MixinMatchOrders.sol";
-import "./MixinAssets.sol";
-
-
-// solhint-disable no-empty-blocks
-contract OrderMatcher is
- MixinMatchOrders,
- MixinAssets
-{
- constructor (address _exchange)
- public
- LibConstants(_exchange)
- Ownable()
- {}
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/interfaces/IAssets.sol b/contracts/extensions/contracts/OrderMatcher/interfaces/IAssets.sol
deleted file mode 100644
index 9fcc0023a..000000000
--- a/contracts/extensions/contracts/OrderMatcher/interfaces/IAssets.sol
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IAssets {
-
- /// @dev Withdraws assets from this contract. The contract requires a ZRX balance in order to
- /// function optimally, and this function allows the ZRX to be withdrawn by owner. It may also be
- /// used to withdraw assets that were accidentally sent to this contract.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to withdraw.
- function withdrawAsset(
- bytes assetData,
- uint256 amount
- )
- external;
-
- /// @dev Approves or disapproves an AssetProxy to spend asset.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveAssetProxy(
- bytes assetData,
- uint256 amount
- )
- external;
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/interfaces/IMatchOrders.sol b/contracts/extensions/contracts/OrderMatcher/interfaces/IMatchOrders.sol
deleted file mode 100644
index 1443c73b9..000000000
--- a/contracts/extensions/contracts/OrderMatcher/interfaces/IMatchOrders.sol
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-
-
-contract IMatchOrders {
-
- /// @dev 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 is then used to fill the right order as much as possible.
- /// This results in a spread being taken in terms of both assets. The spread is held within this contract.
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftSignature Proof that order was created by the left maker.
- /// @param rightSignature Proof that order was created by the right maker.
- function matchOrders(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- bytes memory leftSignature,
- bytes memory rightSignature
- )
- public;
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/interfaces/IOrderMatcher.sol b/contracts/extensions/contracts/OrderMatcher/interfaces/IOrderMatcher.sol
deleted file mode 100644
index 75f26dca6..000000000
--- a/contracts/extensions/contracts/OrderMatcher/interfaces/IOrderMatcher.sol
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contract-utils/contracts/utils/Ownable/IOwnable.sol";
-import "./IMatchOrders.sol";
-import "./IAssets.sol";
-
-
-// solhint-disable no-empty-blocks
-contract IOrderMatcher is
- IOwnable,
- IMatchOrders,
- IAssets
-{}
diff --git a/contracts/extensions/contracts/OrderMatcher/libs/LibConstants.sol b/contracts/extensions/contracts/OrderMatcher/libs/LibConstants.sol
deleted file mode 100644
index c1a86a9c7..000000000
--- a/contracts/extensions/contracts/OrderMatcher/libs/LibConstants.sol
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-
-
-contract LibConstants {
-
- // bytes4(keccak256("transfer(address,uint256)"))
- bytes4 constant internal ERC20_TRANSFER_SELECTOR = 0xa9059cbb;
- // bytes4(keccak256("ERC20Token(address)"))
- bytes4 constant internal ERC20_DATA_ID = 0xf47261b0;
- // bytes4(keccak256("ERC721Token(address,uint256)"))
- bytes4 constant internal ERC721_DATA_ID = 0x02571792;
-
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
- address internal ERC20_PROXY_ADDRESS;
- address internal ERC721_PROXY_ADDRESS;
- // solhint-enable var-name-mixedcase
-
- constructor (address _exchange)
- public
- {
- EXCHANGE = IExchange(_exchange);
-
- ERC20_PROXY_ADDRESS = EXCHANGE.getAssetProxy(ERC20_DATA_ID);
- require(
- ERC20_PROXY_ADDRESS != address(0),
- "UNREGISTERED_ASSET_PROXY"
- );
-
- ERC721_PROXY_ADDRESS = EXCHANGE.getAssetProxy(ERC721_DATA_ID);
- require(
- ERC721_PROXY_ADDRESS != address(0),
- "UNREGISTERED_ASSET_PROXY"
- );
- }
-}
diff --git a/contracts/extensions/contracts/OrderMatcher/mixins/MAssets.sol b/contracts/extensions/contracts/OrderMatcher/mixins/MAssets.sol
deleted file mode 100644
index 6ea7a3290..000000000
--- a/contracts/extensions/contracts/OrderMatcher/mixins/MAssets.sol
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "../interfaces/IAssets.sol";
-
-
-contract MAssets is
- IAssets
-{
- /// @dev Transfers given amount of asset to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferAssetToSender(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Decodes ERC20 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Decodes ERC721 assetData and transfers given amount to sender.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to transfer to sender.
- function transferERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Sets approval for ERC20 AssetProxy.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveERC20Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-
- /// @dev Sets approval for ERC721 AssetProxy.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param amount Amount of asset to approve for respective proxy.
- function approveERC721Token(
- bytes memory assetData,
- uint256 amount
- )
- internal;
-}
diff --git a/contracts/extensions/contracts/OrderValidator/OrderValidator.sol b/contracts/extensions/contracts/OrderValidator/OrderValidator.sol
deleted file mode 100644
index 33dd1326c..000000000
--- a/contracts/extensions/contracts/OrderValidator/OrderValidator.sol
+++ /dev/null
@@ -1,218 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-import "@0x/contracts-tokens/contracts/tokens/ERC721Token/IERC721Token.sol";
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-contract OrderValidator {
-
- using LibBytes for bytes;
-
- bytes4 constant internal ERC20_DATA_ID = bytes4(keccak256("ERC20Token(address)"));
- bytes4 constant internal ERC721_DATA_ID = bytes4(keccak256("ERC721Token(address,uint256)"));
-
- struct TraderInfo {
- uint256 makerBalance; // Maker's balance of makerAsset
- uint256 makerAllowance; // Maker's allowance to corresponding AssetProxy
- uint256 takerBalance; // Taker's balance of takerAsset
- uint256 takerAllowance; // Taker's allowance to corresponding AssetProxy
- uint256 makerZrxBalance; // Maker's balance of ZRX
- uint256 makerZrxAllowance; // Maker's allowance of ZRX to ERC20Proxy
- uint256 takerZrxBalance; // Taker's balance of ZRX
- uint256 takerZrxAllowance; // Taker's allowance of ZRX to ERC20Proxy
- }
-
- // solhint-disable var-name-mixedcase
- IExchange internal EXCHANGE;
- bytes internal ZRX_ASSET_DATA;
- // solhint-enable var-name-mixedcase
-
- constructor (address _exchange, bytes memory _zrxAssetData)
- public
- {
- EXCHANGE = IExchange(_exchange);
- ZRX_ASSET_DATA = _zrxAssetData;
- }
-
- /// @dev Fetches information for order and maker/taker of order.
- /// @param order The order structure.
- /// @param takerAddress Address that will be filling the order.
- /// @return OrderInfo and TraderInfo instances for given order.
- function getOrderAndTraderInfo(LibOrder.Order memory order, address takerAddress)
- public
- view
- returns (LibOrder.OrderInfo memory orderInfo, TraderInfo memory traderInfo)
- {
- orderInfo = EXCHANGE.getOrderInfo(order);
- traderInfo = getTraderInfo(order, takerAddress);
- return (orderInfo, traderInfo);
- }
-
- /// @dev Fetches information for all passed in orders and the makers/takers of each order.
- /// @param orders Array of order specifications.
- /// @param takerAddresses Array of taker addresses corresponding to each order.
- /// @return Arrays of OrderInfo and TraderInfo instances that correspond to each order.
- function getOrdersAndTradersInfo(LibOrder.Order[] memory orders, address[] memory takerAddresses)
- public
- view
- returns (LibOrder.OrderInfo[] memory ordersInfo, TraderInfo[] memory tradersInfo)
- {
- ordersInfo = EXCHANGE.getOrdersInfo(orders);
- tradersInfo = getTradersInfo(orders, takerAddresses);
- return (ordersInfo, tradersInfo);
- }
-
- /// @dev Fetches balance and allowances for maker and taker of order.
- /// @param order The order structure.
- /// @param takerAddress Address that will be filling the order.
- /// @return Balances and allowances of maker and taker of order.
- function getTraderInfo(LibOrder.Order memory order, address takerAddress)
- public
- view
- returns (TraderInfo memory traderInfo)
- {
- (traderInfo.makerBalance, traderInfo.makerAllowance) = getBalanceAndAllowance(order.makerAddress, order.makerAssetData);
- (traderInfo.takerBalance, traderInfo.takerAllowance) = getBalanceAndAllowance(takerAddress, order.takerAssetData);
- bytes memory zrxAssetData = ZRX_ASSET_DATA;
- (traderInfo.makerZrxBalance, traderInfo.makerZrxAllowance) = getBalanceAndAllowance(order.makerAddress, zrxAssetData);
- (traderInfo.takerZrxBalance, traderInfo.takerZrxAllowance) = getBalanceAndAllowance(takerAddress, zrxAssetData);
- return traderInfo;
- }
-
- /// @dev Fetches balances and allowances of maker and taker for each provided order.
- /// @param orders Array of order specifications.
- /// @param takerAddresses Array of taker addresses corresponding to each order.
- /// @return Array of balances and allowances for maker and taker of each order.
- function getTradersInfo(LibOrder.Order[] memory orders, address[] memory takerAddresses)
- public
- view
- returns (TraderInfo[] memory)
- {
- uint256 ordersLength = orders.length;
- TraderInfo[] memory tradersInfo = new TraderInfo[](ordersLength);
- for (uint256 i = 0; i != ordersLength; i++) {
- tradersInfo[i] = getTraderInfo(orders[i], takerAddresses[i]);
- }
- return tradersInfo;
- }
-
- /// @dev Fetches token balances and allowances of an address to given assetProxy. Supports ERC20 and ERC721.
- /// @param target Address to fetch balances and allowances of.
- /// @param assetData Encoded data that can be decoded by a specified proxy contract when transferring asset.
- /// @return Balance of asset and allowance set to given proxy of asset.
- /// For ERC721 tokens, these values will always be 1 or 0.
- function getBalanceAndAllowance(address target, bytes memory assetData)
- public
- view
- returns (uint256 balance, uint256 allowance)
- {
- bytes4 assetProxyId = assetData.readBytes4(0);
- address token = assetData.readAddress(16);
- address assetProxy = EXCHANGE.getAssetProxy(assetProxyId);
-
- if (assetProxyId == ERC20_DATA_ID) {
- // Query balance
- balance = IERC20Token(token).balanceOf(target);
-
- // Query allowance
- allowance = IERC20Token(token).allowance(target, assetProxy);
- } else if (assetProxyId == ERC721_DATA_ID) {
- uint256 tokenId = assetData.readUint256(36);
-
- // Query owner of tokenId
- address owner = getERC721TokenOwner(token, tokenId);
-
- // Set balance to 1 if tokenId is owned by target
- balance = target == owner ? 1 : 0;
-
- // Check if ERC721Proxy is approved to spend tokenId
- bool isApproved = IERC721Token(token).isApprovedForAll(target, assetProxy);
-
- // Set alowance to 1 if ERC721Proxy is approved to spend tokenId
- allowance = isApproved ? 1 : 0;
- } else {
- revert("UNSUPPORTED_ASSET_PROXY");
- }
- return (balance, allowance);
- }
-
- /// @dev Fetches token balances and allowances of an address for each given assetProxy. Supports ERC20 and ERC721.
- /// @param target Address to fetch balances and allowances of.
- /// @param assetData Array of encoded byte arrays that can be decoded by a specified proxy contract when transferring asset.
- /// @return Balances and allowances of assets.
- /// For ERC721 tokens, these values will always be 1 or 0.
- function getBalancesAndAllowances(address target, bytes[] memory assetData)
- public
- view
- returns (uint256[] memory, uint256[] memory)
- {
- uint256 length = assetData.length;
- uint256[] memory balances = new uint256[](length);
- uint256[] memory allowances = new uint256[](length);
- for (uint256 i = 0; i != length; i++) {
- (balances[i], allowances[i]) = getBalanceAndAllowance(target, assetData[i]);
- }
- return (balances, allowances);
- }
-
- /// @dev Calls `token.ownerOf(tokenId)`, but returns a null owner instead of reverting on an unowned token.
- /// @param token Address of ERC721 token.
- /// @param tokenId The identifier for the specific NFT.
- /// @return Owner of tokenId or null address if unowned.
- function getERC721TokenOwner(address token, uint256 tokenId)
- public
- view
- returns (address owner)
- {
- assembly {
- // load free memory pointer
- let cdStart := mload(64)
-
- // bytes4(keccak256(ownerOf(uint256))) = 0x6352211e
- mstore(cdStart, 0x6352211e00000000000000000000000000000000000000000000000000000000)
- mstore(add(cdStart, 4), tokenId)
-
- // staticcall `ownerOf(tokenId)`
- // `ownerOf` will revert if tokenId is not owned
- let success := staticcall(
- gas, // forward all gas
- token, // call token contract
- cdStart, // start of calldata
- 36, // length of input is 36 bytes
- cdStart, // write output over input
- 32 // size of output is 32 bytes
- )
-
- // Success implies that tokenId is owned
- // Copy owner from return data if successful
- if success {
- owner := mload(cdStart)
- }
- }
-
- // Owner initialized to address(0), no need to modify if call is unsuccessful
- return owner;
- }
-}
diff --git a/contracts/extensions/package.json b/contracts/extensions/package.json
deleted file mode 100644
index 14492af8f..000000000
--- a/contracts/extensions/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "name": "@0x/contracts-extensions",
- "version": "1.2.3",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract extensions of 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(BalanceThresholdFilter|DutchAuction|Forwarder|OrderMatcher|OrderValidator).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/contracts/extensions/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contract-wrappers": "^5.0.1",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.6",
- "@0x/contracts-libs": "^1.0.6",
- "@0x/contracts-protocol": "^2.2.3",
- "@0x/contracts-tokens": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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",
- "@types/js-combinatorics": "^0.5.29",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/extensions/src/artifacts/index.ts b/contracts/extensions/src/artifacts/index.ts
deleted file mode 100644
index 329d0f3f3..000000000
--- a/contracts/extensions/src/artifacts/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as BalanceThresholdFilter from '../../generated-artifacts/BalanceThresholdFilter.json';
-import * as DutchAuction from '../../generated-artifacts/DutchAuction.json';
-import * as Forwarder from '../../generated-artifacts/Forwarder.json';
-import * as OrderMatcher from '../../generated-artifacts/OrderMatcher.json';
-import * as OrderValidator from '../../generated-artifacts/OrderValidator.json';
-
-export const artifacts = {
- BalanceThresholdFilter: BalanceThresholdFilter as ContractArtifact,
- DutchAuction: DutchAuction as ContractArtifact,
- Forwarder: Forwarder as ContractArtifact,
- OrderMatcher: OrderMatcher as ContractArtifact,
- OrderValidator: OrderValidator as ContractArtifact,
-};
diff --git a/contracts/extensions/src/index.ts b/contracts/extensions/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/extensions/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/extensions/src/wrappers/index.ts b/contracts/extensions/src/wrappers/index.ts
deleted file mode 100644
index 65aec3ccd..000000000
--- a/contracts/extensions/src/wrappers/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export * from '../../generated-wrappers/balance_threshold_filter';
-export * from '../../generated-wrappers/dutch_auction';
-export * from '../../generated-wrappers/forwarder';
-export * from '../../generated-wrappers/order_matcher';
-export * from '../../generated-wrappers/order_validator';
diff --git a/contracts/extensions/test/extensions/balance_threshold_filter.ts b/contracts/extensions/test/extensions/balance_threshold_filter.ts
deleted file mode 100644
index adeb7c422..000000000
--- a/contracts/extensions/test/extensions/balance_threshold_filter.ts
+++ /dev/null
@@ -1,1644 +0,0 @@
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { Order, RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import {
- artifacts as protocolArtifacts,
- ERC20Wrapper,
- ERC721Wrapper,
- ExchangeContract,
- ExchangeWrapper,
-} from '@0x/contracts-protocol';
-import {
- chaiSetup,
- constants,
- ContractName,
- ERC20BalancesByOwner,
- expectTransactionFailedAsync,
- OrderFactory,
- OrderStatus,
- provider,
- TransactionFactory,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { DummyERC20TokenContract } from '@0x/contracts-tokens';
-
-import { BalanceThresholdFilterContract } from '../../generated-wrappers/balance_threshold_filter';
-import { artifacts } from '../../src/artifacts';
-import { BalanceThresholdWrapper } from '../utils/balance_threshold_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-const DECIMALS_DEFAULT = 18;
-
-interface ValidatedAddressesLog {
- args: { addresses: string[] };
-}
-
-describe(ContractName.BalanceThresholdFilter, () => {
- const takerAssetAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(500), DECIMALS_DEFAULT);
- const makerAssetAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), DECIMALS_DEFAULT);
- const takerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(250), DECIMALS_DEFAULT);
-
- let validMakerAddress: string;
- let validMakerAddress2: string;
- let owner: string;
- let validTakerAddress: string;
- let feeRecipientAddress: string;
- let invalidAddress: string;
- let defaultMakerAssetAddress: string;
- let defaultTakerAssetAddress: string;
- let zrxAssetData: string;
- let zrxToken: DummyERC20TokenContract;
- let exchangeInstance: ExchangeContract;
- let exchangeWrapper: ExchangeWrapper;
-
- let orderFactory: OrderFactory;
- let orderFactory2: OrderFactory;
- let invalidOrderFactory: OrderFactory;
- let erc20Wrapper: ERC20Wrapper;
- let erc20Balances: ERC20BalancesByOwner;
- let erc20TakerBalanceThresholdWrapper: BalanceThresholdWrapper;
- let erc721TakerBalanceThresholdWrapper: BalanceThresholdWrapper;
- let erc721MakerBalanceThresholdWrapper: BalanceThresholdWrapper;
- let erc721NonValidBalanceThresholdWrapper: BalanceThresholdWrapper;
-
- let defaultOrderParams: Partial<Order>;
- let validSignedOrder: SignedOrder;
- let validSignedOrder2: SignedOrder;
-
- let erc721BalanceThresholdFilterInstance: BalanceThresholdFilterContract;
- let erc20BalanceThresholdFilterInstance: BalanceThresholdFilterContract;
-
- const assertValidatedAddressesLog = async (
- txReceipt: TransactionReceiptWithDecodedLogs,
- expectedValidatedAddresses: string[],
- ) => {
- expect(txReceipt.logs.length).to.be.gte(1);
- const validatedAddressesLog = (txReceipt.logs[0] as any) as ValidatedAddressesLog;
- const validatedAddresses = validatedAddressesLog.args.addresses;
- // @HACK-hysz: Nested addresses are not translated to lower-case but this will change once
- // the new ABI Encoder/Decoder is used by the contract templates.
- const validatedAddressesNormalized: string[] = [];
- _.each(validatedAddresses, address => {
- const normalizedAddress = _.toLower(address);
- validatedAddressesNormalized.push(normalizedAddress);
- });
- expect(validatedAddressesNormalized).to.be.deep.equal(expectedValidatedAddresses);
- };
-
- before(async () => {
- // Create accounts
- await blockchainLifecycle.startAsync();
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([
- owner,
- validMakerAddress,
- validMakerAddress2,
- validTakerAddress,
- feeRecipientAddress,
- invalidAddress,
- ] = accounts);
- const takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(validTakerAddress)];
- const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(validMakerAddress)];
- const secondMakerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(validMakerAddress2)];
- const invalidAddressPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(invalidAddress)];
- // Create wrappers
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- const validAddresses = _.cloneDeepWith(usedAddresses);
- _.remove(validAddresses, (address: string) => {
- return address === invalidAddress;
- });
- const erc721Wrapper = new ERC721Wrapper(provider, validAddresses, owner);
- // Deploy ERC20 tokens
- const numDummyErc20ToDeploy = 4;
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let erc20BalanceThresholdAsset: DummyERC20TokenContract;
- [erc20TokenA, erc20TokenB, zrxToken, erc20BalanceThresholdAsset] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- defaultMakerAssetAddress = erc20TokenA.address;
- defaultTakerAssetAddress = erc20TokenB.address;
- zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- // Create proxies
- const erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
- // Deploy Exchange contract
- exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
- // Register proxies
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
- from: owner,
- });
- // Deploy Balance Threshold Filters
- // One uses an ERC721 token as its balance threshold asset; the other uses an ERC20
- const erc721alanceThreshold = new BigNumber(1);
- await erc721Wrapper.deployProxyAsync();
- const [erc721BalanceThresholdAsset] = await erc721Wrapper.deployDummyTokensAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- erc721BalanceThresholdFilterInstance = await BalanceThresholdFilterContract.deployFrom0xArtifactAsync(
- artifacts.BalanceThresholdFilter,
- provider,
- txDefaults,
- exchangeInstance.address,
- erc721BalanceThresholdAsset.address,
- erc721alanceThreshold,
- );
- const erc20BalanceThreshold = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 10);
- erc20BalanceThresholdFilterInstance = await BalanceThresholdFilterContract.deployFrom0xArtifactAsync(
- artifacts.BalanceThresholdFilter,
- provider,
- txDefaults,
- exchangeInstance.address,
- erc20BalanceThresholdAsset.address,
- erc20BalanceThreshold,
- );
- // Default order parameters
- defaultOrderParams = {
- exchangeAddress: exchangeInstance.address,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- makerAssetAmount,
- takerAssetAmount,
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), DECIMALS_DEFAULT),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(150), DECIMALS_DEFAULT),
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- };
- // Create two order factories with valid makers (who meet the threshold balance), and
- // one factory for an invalid address (that does not meet the threshold balance)
- // Valid order factory #1
- const defaultOrderParams1 = {
- makerAddress: validMakerAddress,
- ...defaultOrderParams,
- };
- orderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams1);
- // Valid order factory #2
- const defaultOrderParams2 = {
- makerAddress: validMakerAddress2,
- ...defaultOrderParams,
- };
- orderFactory2 = new OrderFactory(secondMakerPrivateKey, defaultOrderParams2);
- // Invalid order factory
- const defaultNonValidOrderParams = {
- makerAddress: invalidAddress,
- ...defaultOrderParams,
- };
- invalidOrderFactory = new OrderFactory(invalidAddressPrivateKey, defaultNonValidOrderParams);
- // Create Balance Thresold Wrappers
- erc20TakerBalanceThresholdWrapper = new BalanceThresholdWrapper(
- erc20BalanceThresholdFilterInstance,
- exchangeInstance,
- new TransactionFactory(takerPrivateKey, exchangeInstance.address),
- provider,
- );
- erc721TakerBalanceThresholdWrapper = new BalanceThresholdWrapper(
- erc721BalanceThresholdFilterInstance,
- exchangeInstance,
- new TransactionFactory(takerPrivateKey, exchangeInstance.address),
- provider,
- );
- erc721MakerBalanceThresholdWrapper = new BalanceThresholdWrapper(
- erc721BalanceThresholdFilterInstance,
- exchangeInstance,
- new TransactionFactory(makerPrivateKey, exchangeInstance.address),
- provider,
- );
- erc721NonValidBalanceThresholdWrapper = new BalanceThresholdWrapper(
- erc721BalanceThresholdFilterInstance,
- exchangeInstance,
- new TransactionFactory(invalidAddressPrivateKey, exchangeInstance.address),
- provider,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('General Sanity Checks', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both maker/taker when both maker and taker exceed the balance threshold of an ERC20 token', async () => {
- const validSignedOrderERC20Sender = await orderFactory.newSignedOrderAsync({
- ...defaultOrderParams,
- makerAddress: validMakerAddress,
- senderAddress: erc20TakerBalanceThresholdWrapper.getBalanceThresholdAddress(),
- });
- // Execute a valid fill
- const txReceipt = await erc20TakerBalanceThresholdWrapper.fillOrderAsync(
- validSignedOrderERC20Sender,
- validTakerAddress,
- { takerAssetFillAmount },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [validSignedOrder.makerAddress, validTakerAddress];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- it('should revert if the Exchange transaction function is not supported', async () => {
- // Create signed order without the fillOrder function selector
- const salt = new BigNumber(0);
- const badSelectorHex = '0x00000000';
- const signatureHex = '0x';
- // Call valid forwarder
- return expectTransactionFailedAsync(
- erc721BalanceThresholdFilterInstance.executeTransaction.sendTransactionAsync(
- salt,
- validTakerAddress,
- badSelectorHex,
- signatureHex,
- ),
- RevertReason.InvalidOrBlockedExchangeSelector,
- );
- });
- it('should revert if senderAddress is not set to the valid forwarding contract', async () => {
- // Create signed order with incorrect senderAddress
- const notBalanceThresholdFilterAddress = zrxToken.address;
- const signedOrderWithBadSenderAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: notBalanceThresholdFilterAddress,
- });
- // Call valid forwarder
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.fillOrderAsync(signedOrderWithBadSenderAddress, validTakerAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.FailedExecution,
- );
- });
- });
-
- describe('batchFillOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both maker and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const txReceipt = await erc721TakerBalanceThresholdWrapper.batchFillOrdersAsync(orders, validTakerAddress, {
- takerAssetFillAmounts,
- });
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const cumulativeTakerAssetFillAmount = takerAssetFillAmount.times(2);
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount)
- .times(2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
-
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount.times(2)),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.times(2).plus(takerFeePaid)),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.batchFillOrdersAsync(orders, validTakerAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.batchFillOrdersAsync(orders, invalidAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('batchFillOrdersNoThrow', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both maker and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const txReceipt = await erc721TakerBalanceThresholdWrapper.batchFillOrdersNoThrowAsync(
- orders,
- validTakerAddress,
- {
- takerAssetFillAmounts,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const cumulativeTakerAssetFillAmount = takerAssetFillAmount.times(2);
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount)
- .times(2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
-
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount.times(2)),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.times(2).plus(takerFeePaid)),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.batchFillOrdersNoThrowAsync(orders, validTakerAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.batchFillOrdersNoThrowAsync(orders, invalidAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('batchFillOrKillOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both makers and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const txReceipt = await erc721TakerBalanceThresholdWrapper.batchFillOrKillOrdersAsync(
- orders,
- validTakerAddress,
- { takerAssetFillAmounts },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const cumulativeTakerAssetFillAmount = takerAssetFillAmount.times(2);
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount)
- .times(2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
-
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount.times(2)),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.times(2).plus(takerFeePaid)),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.batchFillOrKillOrdersAsync(orders, validTakerAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, takerAssetFillAmount];
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.batchFillOrKillOrdersAsync(orders, invalidAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if one takerAssetFillAmount is not fully filled', async () => {
- const tooBigTakerAssetFillAmount = validSignedOrder.takerAssetAmount.times(2);
- const orders = [validSignedOrder, validSignedOrder2];
- const takerAssetFillAmounts = [takerAssetFillAmount, tooBigTakerAssetFillAmount];
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.batchFillOrKillOrdersAsync(orders, validTakerAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.FailedExecution,
- );
- });
- });
-
- describe('fillOrder', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both maker/taker when both maker and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const txReceipt = await erc721TakerBalanceThresholdWrapper.fillOrderAsync(
- validSignedOrder,
- validTakerAddress,
- { takerAssetFillAmount },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [validSignedOrder.makerAddress, validTakerAddress];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- it('should revert if maker does not meet the balance threshold', async () => {
- // Create signed order with non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- makerAddress: invalidAddress,
- });
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.fillOrderAsync(signedOrderWithBadMakerAddress, validTakerAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.fillOrderAsync(validSignedOrder, invalidAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('fillOrderNoThrow', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both maker/taker when both maker and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const txReceipt = await erc721TakerBalanceThresholdWrapper.fillOrderNoThrowAsync(
- validSignedOrder,
- validTakerAddress,
- {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [validSignedOrder.makerAddress, validTakerAddress];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- it('should revert if maker does not meet the balance threshold', async () => {
- // Create signed order with non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- makerAddress: invalidAddress,
- });
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.fillOrderNoThrowAsync(
- signedOrderWithBadMakerAddress,
- validTakerAddress,
- { takerAssetFillAmount },
- ),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.fillOrderNoThrowAsync(validSignedOrder, invalidAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('fillOrKillOrder', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both maker/taker when both maker and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const takerAssetFillAmount_ = validSignedOrder.takerAssetAmount;
- const txReceipt = await erc721TakerBalanceThresholdWrapper.fillOrKillOrderAsync(
- validSignedOrder,
- validTakerAddress,
- { takerAssetFillAmount: takerAssetFillAmount_ },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [validSignedOrder.makerAddress, validTakerAddress];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount_
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid = validSignedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(validSignedOrder.makerAssetAmount);
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount_),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount_),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- it('should revert if maker does not meet the balance threshold', async () => {
- // Create signed order with non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- makerAddress: invalidAddress,
- });
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.fillOrKillOrderAsync(
- signedOrderWithBadMakerAddress,
- validTakerAddress,
- { takerAssetFillAmount },
- ),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.fillOrKillOrderAsync(validSignedOrder, invalidAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if takerAssetFillAmount is not fully filled', async () => {
- const tooBigTakerAssetFillAmount = validSignedOrder.takerAssetAmount.times(2);
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.fillOrKillOrderAsync(validSignedOrder, validTakerAddress, {
- takerAssetFillAmount: tooBigTakerAssetFillAmount,
- }),
- RevertReason.FailedExecution,
- );
- });
- });
-
- describe('marketSellOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both makers and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const cumulativeTakerAssetFillAmount = validSignedOrder.takerAssetAmount.plus(takerAssetFillAmount);
- const txReceipt = await erc721TakerBalanceThresholdWrapper.marketSellOrdersAsync(
- orders,
- validTakerAddress,
- { takerAssetFillAmount: cumulativeTakerAssetFillAmount },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount2 = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid2 = validSignedOrder2.makerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid2 = validSignedOrder2.takerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee.plus(takerFeePaid2);
- const cumulativeMakerAssetFillAmount = validSignedOrder.makerAssetAmount.plus(makerAssetFillAmount2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(validSignedOrder.makerAssetAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(validSignedOrder.takerAssetAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(validSignedOrder.makerFee),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount2),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid2),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(cumulativeMakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address]
- .plus(validSignedOrder.makerFee)
- .plus(makerFeePaid2)
- .plus(takerFeePaid),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.marketSellOrdersAsync(orders, validTakerAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.marketSellOrdersAsync(orders, invalidAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('marketSellOrdersNoThrow', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both makers and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const cumulativeTakerAssetFillAmount = validSignedOrder.takerAssetAmount.plus(takerAssetFillAmount);
- const txReceipt = await erc721TakerBalanceThresholdWrapper.marketSellOrdersNoThrowAsync(
- orders,
- validTakerAddress,
- {
- takerAssetFillAmount: cumulativeTakerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount2 = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const makerFeePaid2 = validSignedOrder2.makerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid2 = validSignedOrder2.takerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee.plus(takerFeePaid2);
- const cumulativeMakerAssetFillAmount = validSignedOrder.makerAssetAmount.plus(makerAssetFillAmount2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(validSignedOrder.makerAssetAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(validSignedOrder.takerAssetAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(validSignedOrder.makerFee),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount2),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid2),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(cumulativeMakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address]
- .plus(validSignedOrder.makerFee)
- .plus(makerFeePaid2)
- .plus(takerFeePaid),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.marketSellOrdersNoThrowAsync(orders, validTakerAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.marketSellOrdersNoThrowAsync(orders, invalidAddress, {
- takerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('marketBuyOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both makers and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const cumulativeTakerAssetFillAmount = validSignedOrder.takerAssetAmount.plus(takerAssetFillAmount);
- const makerAssetFillAmount2 = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const cumulativeMakerAssetFillAmount = validSignedOrder.makerAssetAmount.plus(makerAssetFillAmount2);
- const txReceipt = await erc721TakerBalanceThresholdWrapper.marketBuyOrdersAsync(orders, validTakerAddress, {
- makerAssetFillAmount: cumulativeMakerAssetFillAmount,
- });
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerFeePaid2 = validSignedOrder2.makerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid2 = validSignedOrder2.takerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee.plus(takerFeePaid2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(validSignedOrder.makerAssetAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(validSignedOrder.takerAssetAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(validSignedOrder.makerFee),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount2),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid2),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(cumulativeMakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address]
- .plus(validSignedOrder.makerFee)
- .plus(makerFeePaid2)
- .plus(takerFeePaid),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- const dummyMakerAssetFillAmount = new BigNumber(0);
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.marketBuyOrdersAsync(orders, validTakerAddress, {
- makerAssetFillAmount: dummyMakerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- const dummyMakerAssetFillAmount = new BigNumber(0);
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.marketBuyOrdersAsync(orders, invalidAddress, {
- makerAssetFillAmount: dummyMakerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('marketBuyOrdersNoThrowAsync', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('should transfer the correct amounts and validate both makers/taker when both makers and taker meet the balance threshold', async () => {
- // Execute a valid fill
- const orders = [validSignedOrder, validSignedOrder2];
- const cumulativeTakerAssetFillAmount = validSignedOrder.takerAssetAmount.plus(takerAssetFillAmount);
- const makerAssetFillAmount2 = takerAssetFillAmount
- .times(validSignedOrder.makerAssetAmount)
- .dividedToIntegerBy(validSignedOrder.takerAssetAmount);
- const cumulativeMakerAssetFillAmount = validSignedOrder.makerAssetAmount.plus(makerAssetFillAmount2);
- const txReceipt = await erc721TakerBalanceThresholdWrapper.marketBuyOrdersNoThrowAsync(
- orders,
- validTakerAddress,
- {
- makerAssetFillAmount: cumulativeMakerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- },
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- validSignedOrder.makerAddress,
- validSignedOrder2.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerFeePaid2 = validSignedOrder2.makerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid2 = validSignedOrder2.takerFee
- .times(makerAssetFillAmount2)
- .dividedToIntegerBy(validSignedOrder2.makerAssetAmount);
- const takerFeePaid = validSignedOrder.takerFee.plus(takerFeePaid2);
- // Maker #1
- expect(newBalances[validMakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultMakerAssetAddress].minus(validSignedOrder.makerAssetAmount),
- );
- expect(newBalances[validMakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][defaultTakerAssetAddress].plus(validSignedOrder.takerAssetAmount),
- );
- expect(newBalances[validMakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress][zrxToken.address].minus(validSignedOrder.makerFee),
- );
- // Maker #2
- expect(newBalances[validMakerAddress2][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultMakerAssetAddress].minus(makerAssetFillAmount2),
- );
- expect(newBalances[validMakerAddress2][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[validMakerAddress2][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validMakerAddress2][zrxToken.address].minus(makerFeePaid2),
- );
- // Taker
- expect(newBalances[validTakerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultTakerAssetAddress].minus(cumulativeTakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(cumulativeMakerAssetFillAmount),
- );
- expect(newBalances[validTakerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address].minus(takerFeePaid),
- );
- // Fee recipient
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address]
- .plus(validSignedOrder.makerFee)
- .plus(makerFeePaid2)
- .plus(takerFeePaid),
- );
- });
- it('should revert if one maker does not meet the balance threshold', async () => {
- // Create order set with one non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- makerAddress: invalidAddress,
- });
- const orders = [validSignedOrder, signedOrderWithBadMakerAddress];
- // Execute transaction
- const dummyMakerAssetFillAmount = new BigNumber(0);
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.marketBuyOrdersNoThrowAsync(orders, validTakerAddress, {
- makerAssetFillAmount: dummyMakerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- const orders = [validSignedOrder, validSignedOrder2];
- const dummyMakerAssetFillAmount = new BigNumber(0);
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.marketBuyOrdersNoThrowAsync(orders, invalidAddress, {
- makerAssetFillAmount: dummyMakerAssetFillAmount,
- }),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('matchOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('Should transfer correct amounts when both makers and taker meet the balance threshold', async () => {
- // Test values/results taken from Match Orders test:
- // 'Should transfer correct amounts when right order is fully filled and values pass isRoundingErrorFloor but fail isRoundingErrorCeil'
- // Create orders to match
- const signedOrderLeft = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(17), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(98), 0),
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- feeRecipientAddress,
- });
- const signedOrderRight = await orderFactory2.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- feeRecipientAddress,
- });
- // Compute expected transfer amounts
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('76.4705882352941176'), 16), // 76.47%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber('76.5306122448979591'), 16), // 76.53%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- const txReceipt = await erc721TakerBalanceThresholdWrapper.matchOrdersAsync(
- signedOrderLeft,
- signedOrderRight,
- validTakerAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses = [
- signedOrderLeft.makerAddress,
- signedOrderRight.makerAddress,
- validTakerAddress,
- ];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check balances
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(
- newBalances[signedOrderLeft.makerAddress][defaultMakerAssetAddress],
- 'Checking left maker egress ERC20 account balance',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderLeft.makerAddress][defaultMakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(
- newBalances[signedOrderRight.makerAddress][defaultTakerAssetAddress],
- 'Checking right maker ingress ERC20 account balance',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderRight.makerAddress][defaultTakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(
- newBalances[validTakerAddress][defaultMakerAssetAddress],
- 'Checking taker ingress ERC20 account balance',
- ).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][defaultMakerAssetAddress].plus(
- expectedTransferAmounts.amountReceivedByTaker,
- ),
- );
- expect(
- newBalances[signedOrderLeft.makerAddress][defaultTakerAssetAddress],
- 'Checking left maker ingress ERC20 account balance',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderLeft.makerAddress][defaultTakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(
- newBalances[signedOrderRight.makerAddress][defaultMakerAssetAddress],
- 'Checking right maker egress ERC20 account balance',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderRight.makerAddress][defaultMakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- // Paid fees
- expect(
- newBalances[signedOrderLeft.makerAddress][zrxToken.address],
- 'Checking left maker egress ERC20 account fees',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderLeft.makerAddress][zrxToken.address].minus(
- expectedTransferAmounts.feePaidByLeftMaker,
- ),
- );
- expect(
- newBalances[signedOrderRight.makerAddress][zrxToken.address],
- 'Checking right maker egress ERC20 account fees',
- ).to.be.bignumber.equal(
- erc20Balances[signedOrderRight.makerAddress][zrxToken.address].minus(
- expectedTransferAmounts.feePaidByRightMaker,
- ),
- );
- expect(
- newBalances[validTakerAddress][zrxToken.address],
- 'Checking taker egress ERC20 account fees',
- ).to.be.bignumber.equal(
- erc20Balances[validTakerAddress][zrxToken.address]
- .minus(expectedTransferAmounts.feePaidByTakerLeft)
- .minus(expectedTransferAmounts.feePaidByTakerRight),
- );
- // Received fees
- expect(
- newBalances[signedOrderLeft.feeRecipientAddress][zrxToken.address],
- 'Checking left fee recipient ingress ERC20 account fees',
- ).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address]
- .plus(expectedTransferAmounts.feePaidByLeftMaker)
- .plus(expectedTransferAmounts.feePaidByRightMaker)
- .plus(expectedTransferAmounts.feePaidByTakerLeft)
- .plus(expectedTransferAmounts.feePaidByTakerRight),
- );
- });
- it('should revert if left maker does not meet the balance threshold', async () => {
- // Create signed order with non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- makerAddress: invalidAddress,
- });
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.matchOrdersAsync(
- validSignedOrder,
- signedOrderWithBadMakerAddress,
- validTakerAddress,
- ),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if right maker does not meet the balance threshold', async () => {
- // Create signed order with non-valid maker address
- const signedOrderWithBadMakerAddress = await orderFactory.newSignedOrderAsync({
- senderAddress: erc721BalanceThresholdFilterInstance.address,
- makerAddress: invalidAddress,
- });
- // Execute transaction
- return expectTransactionFailedAsync(
- erc721TakerBalanceThresholdWrapper.matchOrdersAsync(
- signedOrderWithBadMakerAddress,
- validSignedOrder,
- validTakerAddress,
- ),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- it('should revert if taker does not meet the balance threshold', async () => {
- return expectTransactionFailedAsync(
- erc721NonValidBalanceThresholdWrapper.matchOrdersAsync(
- validSignedOrder,
- validSignedOrder,
- invalidAddress,
- ),
- RevertReason.AtLeastOneAddressDoesNotMeetBalanceThreshold,
- );
- });
- });
-
- describe('cancelOrder', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- validSignedOrder = await orderFactory.newSignedOrderAsync();
- validSignedOrder2 = await orderFactory2.newSignedOrderAsync();
- });
- it('Should successfully cancel order if maker meets balance threshold', async () => {
- // Verify order is not cancelled
- const orderInfoBeforeCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- validSignedOrder,
- );
- expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- // Cancel
- const txReceipt = await erc721MakerBalanceThresholdWrapper.cancelOrderAsync(
- validSignedOrder,
- validSignedOrder.makerAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- const orderInfoAfterCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- validSignedOrder,
- );
- expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- });
- it('Should successfully cancel order if maker does not meet balance threshold', async () => {
- // Create order where maker does not meet balance threshold
- const signedOrderWithBadMakerAddress = await invalidOrderFactory.newSignedOrderAsync({});
- // Verify order is not cancelled
- const orderInfoBeforeCancelling = await erc721NonValidBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrderWithBadMakerAddress,
- );
- expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- // Cancel
- const txReceipt = await erc721NonValidBalanceThresholdWrapper.cancelOrderAsync(
- signedOrderWithBadMakerAddress,
- signedOrderWithBadMakerAddress.makerAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- const orderInfoAfterCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrderWithBadMakerAddress,
- );
- expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- });
- });
-
- describe('batchCancelOrders', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- });
- it('Should successfully batch cancel orders if maker meets balance threshold', async () => {
- // Create orders to cancel
- const validSignedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- ];
- // Verify orders are not cancelled
- _.each(validSignedOrders, async signedOrder => {
- const orderInfoBeforeCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- });
- // Cancel
- const txReceipt = await erc721MakerBalanceThresholdWrapper.batchCancelOrdersAsync(
- validSignedOrders,
- validSignedOrders[0].makerAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- _.each(validSignedOrders, async signedOrder => {
- const orderInfoAfterCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- });
- });
- it('Should successfully batch cancel order if maker does not meet balance threshold', async () => {
- // Create orders to cancel
- const invalidSignedOrders = [
- await invalidOrderFactory.newSignedOrderAsync(),
- await invalidOrderFactory.newSignedOrderAsync(),
- await invalidOrderFactory.newSignedOrderAsync(),
- ];
- // Verify orders are not cancelled
- _.each(invalidSignedOrders, async signedOrder => {
- const orderInfoBeforeCancelling = await erc721NonValidBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- });
- // Cancel
- const txReceipt = await erc721NonValidBalanceThresholdWrapper.batchCancelOrdersAsync(
- invalidSignedOrders,
- invalidAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- _.each(invalidSignedOrders, async signedOrder => {
- const orderInfoAfterCancelling = await erc721NonValidBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- });
- });
- });
-
- describe('cancelOrdersUpTo', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- });
- it('Should successfully batch cancel orders if maker meets balance threshold', async () => {
- // Create orders to cancel
- const validSignedOrders = [
- await orderFactory.newSignedOrderAsync({ salt: new BigNumber(0) }),
- await orderFactory.newSignedOrderAsync({ salt: new BigNumber(1) }),
- await orderFactory.newSignedOrderAsync({ salt: new BigNumber(2) }),
- ];
- // Verify orders are not cancelled
- _.each(validSignedOrders, async signedOrder => {
- const orderInfoBeforeCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- });
- // Cancel
- const cancelOrdersUpToThisSalt = new BigNumber(1);
- const txReceipt = await erc721MakerBalanceThresholdWrapper.cancelOrdersUpToAsync(
- cancelOrdersUpToThisSalt,
- validSignedOrders[0].makerAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- _.each(validSignedOrders, async (signedOrder, salt: number) => {
- const orderInfoAfterCancelling = await erc721MakerBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- const saltAsBigNumber = new BigNumber(salt);
- if (saltAsBigNumber.isLessThanOrEqualTo(cancelOrdersUpToThisSalt)) {
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- } else {
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- }
- });
- });
- it('Should successfully batch cancel order if maker does not meet balance threshold', async () => {
- // Create orders to cancel
- const invalidSignedOrders = [
- await invalidOrderFactory.newSignedOrderAsync({ salt: new BigNumber(0) }),
- await invalidOrderFactory.newSignedOrderAsync({ salt: new BigNumber(1) }),
- await invalidOrderFactory.newSignedOrderAsync({ salt: new BigNumber(2) }),
- ];
- // Verify orders are not cancelled
- _.each(invalidSignedOrders, async signedOrder => {
- const orderInfoBeforeCancelling = await erc721NonValidBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- return expect(orderInfoBeforeCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- });
- // Cancel
- const cancelOrdersUpToThisSalt = new BigNumber(1);
- const txReceipt = await erc721NonValidBalanceThresholdWrapper.cancelOrdersUpToAsync(
- cancelOrdersUpToThisSalt,
- invalidAddress,
- );
- // Assert validated addresses
- const expectedValidatedAddresseses: string[] = [];
- await assertValidatedAddressesLog(txReceipt, expectedValidatedAddresseses);
- // Check that order was cancelled
- _.each(invalidSignedOrders, async (signedOrder, salt: number) => {
- const orderInfoAfterCancelling = await erc721NonValidBalanceThresholdWrapper.getOrderInfoAsync(
- signedOrder,
- );
- const saltAsBigNumber = new BigNumber(salt);
- if (saltAsBigNumber.isLessThanOrEqualTo(cancelOrdersUpToThisSalt)) {
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Cancelled);
- } else {
- return expect(orderInfoAfterCancelling.orderStatus).to.be.equal(OrderStatus.Fillable);
- }
- });
- });
- });
-});
-// tslint:disable:max-file-line-count
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/extensions/test/extensions/dutch_auction.ts b/contracts/extensions/test/extensions/dutch_auction.ts
deleted file mode 100644
index 22b3caa16..000000000
--- a/contracts/extensions/test/extensions/dutch_auction.ts
+++ /dev/null
@@ -1,378 +0,0 @@
-import { DutchAuctionWrapper } from '@0x/contract-wrappers';
-import {
- artifacts as protocolArtifacts,
- ERC20Wrapper,
- ERC721Wrapper,
- ExchangeContract,
- ExchangeWrapper,
-} from '@0x/contracts-protocol';
-import {
- chaiSetup,
- constants,
- ContractName,
- ERC20BalancesByOwner,
- expectTransactionFailedAsync,
- getLatestBlockTimestampAsync,
- OrderFactory,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC721TokenContract,
- WETH9Contract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
-import { RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { DutchAuctionContract } from '../../generated-wrappers/dutch_auction';
-import { artifacts } from '../../src/artifacts';
-import { DutchAuctionTestWrapper } from '../utils/dutch_auction_test_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-const DECIMALS_DEFAULT = 18;
-
-describe(ContractName.DutchAuction, () => {
- let makerAddress: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddress: string;
- let defaultMakerAssetAddress: string;
-
- let zrxToken: DummyERC20TokenContract;
- let erc20TokenA: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let dutchAuctionContract: DutchAuctionContract;
- let wethContract: WETH9Contract;
-
- let sellerOrderFactory: OrderFactory;
- let buyerOrderFactory: OrderFactory;
- let erc20Wrapper: ERC20Wrapper;
- let erc20Balances: ERC20BalancesByOwner;
- let currentBlockTimestamp: number;
- let auctionBeginTimeSeconds: BigNumber;
- let auctionEndTimeSeconds: BigNumber;
- let auctionBeginAmount: BigNumber;
- let auctionEndAmount: BigNumber;
- let sellOrder: SignedOrder;
- let buyOrder: SignedOrder;
- let erc721MakerAssetIds: BigNumber[];
- const tenMinutesInSeconds = 10 * 60;
-
- let dutchAuctionTestWrapper: DutchAuctionTestWrapper;
- let defaultERC20MakerAssetData: string;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 2;
- [erc20TokenA, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- const erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- const erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- const erc721Proxy = await erc721Wrapper.deployProxyAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
-
- wethContract = await WETH9Contract.deployFrom0xArtifactAsync(tokensArtifacts.WETH9, provider, txDefaults);
- erc20Wrapper.addDummyTokenContract(wethContract as any);
-
- const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- const exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
-
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
- from: owner,
- });
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
- from: owner,
- });
-
- const dutchAuctionInstance = await DutchAuctionContract.deployFrom0xArtifactAsync(
- artifacts.DutchAuction,
- provider,
- txDefaults,
- exchangeInstance.address,
- );
- dutchAuctionContract = new DutchAuctionContract(
- dutchAuctionInstance.abi,
- dutchAuctionInstance.address,
- provider,
- );
- dutchAuctionTestWrapper = new DutchAuctionTestWrapper(dutchAuctionInstance, provider);
-
- defaultMakerAssetAddress = erc20TokenA.address;
- const defaultTakerAssetAddress = wethContract.address;
-
- // Set up taker WETH balance and allowance
- await web3Wrapper.awaitTransactionSuccessAsync(
- await wethContract.deposit.sendTransactionAsync({
- from: takerAddress,
- value: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), DECIMALS_DEFAULT),
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await wethContract.approve.sendTransactionAsync(
- erc20Proxy.address,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- { from: takerAddress },
- ),
- );
- web3Wrapper.abiDecoder.addABI(exchangeInstance.abi);
- web3Wrapper.abiDecoder.addABI(zrxToken.abi);
- erc20Wrapper.addTokenOwnerAddress(dutchAuctionContract.address);
-
- currentBlockTimestamp = await getLatestBlockTimestampAsync();
- // Default auction begins 10 minutes ago
- auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp).minus(tenMinutesInSeconds);
- // Default auction ends 10 from now
- auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp).plus(tenMinutesInSeconds);
- auctionBeginAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(10), DECIMALS_DEFAULT);
- auctionEndAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT);
-
- // Default sell order and buy order are exact mirrors
- const sellerDefaultOrderParams = {
- salt: generatePseudoRandomSalt(),
- exchangeAddress: exchangeInstance.address,
- makerAddress,
- feeRecipientAddress,
- // taker address or sender address should be set to the ducth auction contract
- takerAddress: dutchAuctionContract.address,
- makerAssetData: DutchAuctionWrapper.encodeDutchAuctionAssetData(
- assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- ),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), DECIMALS_DEFAULT),
- takerAssetAmount: auctionEndAmount,
- expirationTimeSeconds: auctionEndTimeSeconds,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- };
- // Default buy order is for the auction begin price
- const buyerDefaultOrderParams = {
- ...sellerDefaultOrderParams,
- makerAddress: takerAddress,
- makerAssetData: sellerDefaultOrderParams.takerAssetData,
- takerAssetData: sellerDefaultOrderParams.makerAssetData,
- makerAssetAmount: auctionBeginAmount,
- takerAssetAmount: sellerDefaultOrderParams.makerAssetAmount,
- };
- const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- const takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
- sellerOrderFactory = new OrderFactory(makerPrivateKey, sellerDefaultOrderParams);
- buyerOrderFactory = new OrderFactory(takerPrivateKey, buyerDefaultOrderParams);
- defaultERC20MakerAssetData = assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress);
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- sellOrder = await sellerOrderFactory.newSignedOrderAsync();
- buyOrder = await buyerOrderFactory.newSignedOrderAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('matchOrders', () => {
- it('should be worth the begin price at the begining of the auction', async () => {
- auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp + 2);
- const makerAssetData = DutchAuctionWrapper.encodeDutchAuctionAssetData(
- defaultERC20MakerAssetData,
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- );
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({ makerAssetData });
- const auctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- expect(auctionDetails.currentTimeSeconds).to.be.bignumber.lte(auctionBeginTimeSeconds);
- expect(auctionDetails.currentAmount).to.be.bignumber.equal(auctionBeginAmount);
- expect(auctionDetails.beginAmount).to.be.bignumber.equal(auctionBeginAmount);
- });
- it('should be be worth the end price at the end of the auction', async () => {
- auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds * 2);
- auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds);
- const makerAssetData = DutchAuctionWrapper.encodeDutchAuctionAssetData(
- defaultERC20MakerAssetData,
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- );
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- makerAssetData,
- expirationTimeSeconds: auctionEndTimeSeconds,
- });
- const auctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- expect(auctionDetails.currentTimeSeconds).to.be.bignumber.gte(auctionEndTimeSeconds);
- expect(auctionDetails.currentAmount).to.be.bignumber.equal(auctionEndAmount);
- expect(auctionDetails.beginAmount).to.be.bignumber.equal(auctionBeginAmount);
- });
- it('should match orders at current amount and send excess to buyer', async () => {
- const beforeAuctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- buyOrder = await buyerOrderFactory.newSignedOrderAsync({
- makerAssetAmount: beforeAuctionDetails.currentAmount.times(2),
- });
- await dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress);
- const afterAuctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[dutchAuctionContract.address][wethContract.address]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- // HACK gte used here due to a bug in ganache where the timestamp can change
- // between multiple calls to the same block. Which can move the amount in our case
- // ref: https://github.com/trufflesuite/ganache-core/issues/111
- expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
- erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
- );
- expect(newBalances[takerAddress][wethContract.address]).to.be.bignumber.gte(
- erc20Balances[takerAddress][wethContract.address].minus(beforeAuctionDetails.currentAmount),
- );
- });
- it('maker fees on sellOrder are paid to the fee receipient', async () => {
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- makerFee: new BigNumber(1),
- });
- await dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress);
- const afterAuctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
- erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(sellOrder.makerFee),
- );
- });
- it('maker fees on buyOrder are paid to the fee receipient', async () => {
- buyOrder = await buyerOrderFactory.newSignedOrderAsync({
- makerFee: new BigNumber(1),
- });
- await dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const afterAuctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
- erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(buyOrder.makerFee),
- );
- });
- it('should revert when auction expires', async () => {
- auctionBeginTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds * 2);
- auctionEndTimeSeconds = new BigNumber(currentBlockTimestamp - tenMinutesInSeconds);
- const makerAssetData = DutchAuctionWrapper.encodeDutchAuctionAssetData(
- defaultERC20MakerAssetData,
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- );
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- expirationTimeSeconds: auctionEndTimeSeconds,
- makerAssetData,
- });
- return expectTransactionFailedAsync(
- dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress),
- RevertReason.AuctionExpired,
- );
- });
- it('cannot be filled for less than the current price', async () => {
- buyOrder = await buyerOrderFactory.newSignedOrderAsync({
- makerAssetAmount: sellOrder.takerAssetAmount,
- });
- return expectTransactionFailedAsync(
- dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress),
- RevertReason.AuctionInvalidAmount,
- );
- });
- it('auction begin amount must be higher than final amount ', async () => {
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- takerAssetAmount: auctionBeginAmount.plus(1),
- });
- return expectTransactionFailedAsync(
- dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress),
- RevertReason.AuctionInvalidAmount,
- );
- });
- it('begin time is less than end time', async () => {
- auctionBeginTimeSeconds = new BigNumber(auctionEndTimeSeconds).plus(tenMinutesInSeconds);
- const makerAssetData = DutchAuctionWrapper.encodeDutchAuctionAssetData(
- defaultERC20MakerAssetData,
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- );
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- expirationTimeSeconds: auctionEndTimeSeconds,
- makerAssetData,
- });
- return expectTransactionFailedAsync(
- dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress),
- RevertReason.AuctionInvalidBeginTime,
- );
- });
- it('asset data contains auction parameters', async () => {
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- });
- return expectTransactionFailedAsync(
- dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress),
- RevertReason.InvalidAssetData,
- );
- });
-
- describe('ERC721', () => {
- it('should match orders when ERC721', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- const erc721MakerAssetData = assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId);
- const makerAssetData = DutchAuctionWrapper.encodeDutchAuctionAssetData(
- erc721MakerAssetData,
- auctionBeginTimeSeconds,
- auctionBeginAmount,
- );
- sellOrder = await sellerOrderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData,
- });
- buyOrder = await buyerOrderFactory.newSignedOrderAsync({
- takerAssetAmount: new BigNumber(1),
- takerAssetData: sellOrder.makerAssetData,
- });
- await dutchAuctionTestWrapper.matchOrdersAsync(buyOrder, sellOrder, takerAddress);
- const afterAuctionDetails = await dutchAuctionTestWrapper.getAuctionDetailsAsync(sellOrder);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- // HACK gte used here due to a bug in ganache where the timestamp can change
- // between multiple calls to the same block. Which can move the amount in our case
- // ref: https://github.com/trufflesuite/ganache-core/issues/111
- expect(newBalances[makerAddress][wethContract.address]).to.be.bignumber.gte(
- erc20Balances[makerAddress][wethContract.address].plus(afterAuctionDetails.currentAmount),
- );
- const newOwner = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(newOwner).to.be.bignumber.equal(takerAddress);
- });
- });
- });
-});
diff --git a/contracts/extensions/test/extensions/forwarder.ts b/contracts/extensions/test/extensions/forwarder.ts
deleted file mode 100644
index 69939ed04..000000000
--- a/contracts/extensions/test/extensions/forwarder.ts
+++ /dev/null
@@ -1,1291 +0,0 @@
-import {
- artifacts as protocolArtifacts,
- ERC20Wrapper,
- ERC721Wrapper,
- ExchangeContract,
- ExchangeWrapper,
-} from '@0x/contracts-protocol';
-import {
- chaiSetup,
- constants,
- ContractName,
- ERC20BalancesByOwner,
- expectContractCreationFailedAsync,
- expectTransactionFailedAsync,
- OrderFactory,
- provider,
- sendTransactionResult,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokenArtifacts,
- DummyERC20TokenContract,
- DummyERC721TokenContract,
- WETH9Contract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-
-import { ForwarderContract } from '../../generated-wrappers/forwarder';
-import { artifacts } from '../../src/artifacts';
-
-import { ForwarderWrapper } from '../utils/forwarder_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-const DECIMALS_DEFAULT = 18;
-const MAX_WETH_FILL_PERCENTAGE = 95;
-
-describe(ContractName.Forwarder, () => {
- let makerAddress: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddress: string;
- let defaultMakerAssetAddress: string;
- let zrxAssetData: string;
- let wethAssetData: string;
-
- let weth: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let erc20TokenA: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let forwarderContract: ForwarderContract;
- let wethContract: WETH9Contract;
- let forwarderWrapper: ForwarderWrapper;
- let exchangeWrapper: ExchangeWrapper;
-
- let orderWithoutFee: SignedOrder;
- let orderWithFee: SignedOrder;
- let feeOrder: SignedOrder;
- let orderFactory: OrderFactory;
- let erc20Wrapper: ERC20Wrapper;
- let erc20Balances: ERC20BalancesByOwner;
- let tx: TransactionReceiptWithDecodedLogs;
-
- let erc721MakerAssetIds: BigNumber[];
- let takerEthBalanceBefore: BigNumber;
- let feePercentage: BigNumber;
- let gasPrice: BigNumber;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = accounts);
-
- const txHash = await web3Wrapper.sendTransactionAsync({ from: accounts[0], to: accounts[0], value: 0 });
- const transaction = await web3Wrapper.getTransactionByHashAsync(txHash);
- gasPrice = new BigNumber(transaction.gasPrice);
-
- const erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- const erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- const erc721Proxy = await erc721Wrapper.deployProxyAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
-
- wethContract = await WETH9Contract.deployFrom0xArtifactAsync(tokenArtifacts.WETH9, provider, txDefaults);
- weth = new DummyERC20TokenContract(wethContract.abi, wethContract.address, provider);
- erc20Wrapper.addDummyTokenContract(weth);
-
- wethAssetData = assetDataUtils.encodeERC20AssetData(wethContract.address);
- zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- exchangeWrapper = new ExchangeWrapper(exchangeInstance, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
-
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
- from: owner,
- });
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeInstance.address, {
- from: owner,
- });
-
- defaultMakerAssetAddress = erc20TokenA.address;
- const defaultTakerAssetAddress = wethContract.address;
- const defaultOrderParams = {
- exchangeAddress: exchangeInstance.address,
- makerAddress,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), DECIMALS_DEFAULT),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), DECIMALS_DEFAULT),
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), DECIMALS_DEFAULT),
- };
- const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- orderFactory = new OrderFactory(privateKey, defaultOrderParams);
-
- const forwarderInstance = await ForwarderContract.deployFrom0xArtifactAsync(
- artifacts.Forwarder,
- provider,
- txDefaults,
- exchangeInstance.address,
- zrxAssetData,
- wethAssetData,
- );
- forwarderContract = new ForwarderContract(forwarderInstance.abi, forwarderInstance.address, provider);
- forwarderWrapper = new ForwarderWrapper(forwarderContract, provider);
- const zrxDepositAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 18);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transfer.sendTransactionAsync(forwarderContract.address, zrxDepositAmount),
- );
- erc20Wrapper.addTokenOwnerAddress(forwarderInstance.address);
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- takerEthBalanceBefore = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- orderWithoutFee = await orderFactory.newSignedOrderAsync();
- feeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- orderWithFee = await orderFactory.newSignedOrderAsync({
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('constructor', () => {
- it('should revert if assetProxy is unregistered', async () => {
- const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- return expectContractCreationFailedAsync(
- (ForwarderContract.deployFrom0xArtifactAsync(
- artifacts.Forwarder,
- provider,
- txDefaults,
- exchangeInstance.address,
- zrxAssetData,
- wethAssetData,
- ) as any) as sendTransactionResult,
- RevertReason.UnregisteredAssetProxy,
- );
- });
- });
- describe('marketSellOrdersWithEth without extra fees', () => {
- it('should fill a single order', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const ethValue = orderWithoutFee.takerAssetAmount.dividedToIntegerBy(2);
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithoutFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getPercentageOfValue(
- ethValue,
- MAX_WETH_FILL_PERCENTAGE,
- );
- const makerAssetFillAmount = primaryTakerAssetFillAmount
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fill multiple orders', async () => {
- const secondOrderWithoutFee = await orderFactory.newSignedOrderAsync();
- const ordersWithoutFee = [orderWithoutFee, secondOrderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const ethValue = ordersWithoutFee[0].takerAssetAmount.plus(
- ordersWithoutFee[1].takerAssetAmount.dividedToIntegerBy(2),
- );
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithoutFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getPercentageOfValue(
- ethValue,
- MAX_WETH_FILL_PERCENTAGE,
- );
- const firstTakerAssetFillAmount = ordersWithoutFee[0].takerAssetAmount;
- const secondTakerAssetFillAmount = primaryTakerAssetFillAmount.minus(firstTakerAssetFillAmount);
-
- const makerAssetFillAmount = ordersWithoutFee[0].makerAssetAmount.plus(
- ordersWithoutFee[1].makerAssetAmount
- .times(secondTakerAssetFillAmount)
- .dividedToIntegerBy(ordersWithoutFee[1].takerAssetAmount),
- );
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fill the order and pay ZRX fees from a single feeOrder', async () => {
- const ordersWithFee = [orderWithFee];
- const feeOrders = [feeOrder];
- const ethValue = orderWithFee.takerAssetAmount.dividedToIntegerBy(2);
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getPercentageOfValue(
- ethValue,
- MAX_WETH_FILL_PERCENTAGE,
- );
- const makerAssetFillAmount = primaryTakerAssetFillAmount
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- const feeAmount = ForwarderWrapper.getPercentageOfValue(
- orderWithFee.takerFee.dividedToIntegerBy(2),
- MAX_WETH_FILL_PERCENTAGE,
- );
- const wethSpentOnFeeOrders = ForwarderWrapper.getWethForFeeOrders(feeAmount, feeOrders);
- const totalEthSpent = primaryTakerAssetFillAmount
- .plus(wethSpentOnFeeOrders)
- .plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount).plus(wethSpentOnFeeOrders),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fill the orders and pay ZRX from multiple feeOrders', async () => {
- const ordersWithFee = [orderWithFee];
- const ethValue = orderWithFee.takerAssetAmount;
- const makerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const makerAssetAmount = orderWithFee.takerFee.dividedToIntegerBy(2);
- const takerAssetAmount = feeOrder.takerAssetAmount
- .times(makerAssetAmount)
- .dividedToIntegerBy(feeOrder.makerAssetAmount);
-
- const firstFeeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- });
- const secondFeeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- });
- const feeOrders = [firstFeeOrder, secondFeeOrder];
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getPercentageOfValue(
- ethValue,
- MAX_WETH_FILL_PERCENTAGE,
- );
- const makerAssetFillAmount = primaryTakerAssetFillAmount
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- const feeAmount = ForwarderWrapper.getPercentageOfValue(orderWithFee.takerFee, MAX_WETH_FILL_PERCENTAGE);
- const wethSpentOnFeeOrders = ForwarderWrapper.getWethForFeeOrders(feeAmount, feeOrders);
- const totalEthSpent = primaryTakerAssetFillAmount
- .plus(wethSpentOnFeeOrders)
- .plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount).plus(wethSpentOnFeeOrders),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fill the order when token is ZRX with fees', async () => {
- orderWithFee = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- const ordersWithFee = [orderWithFee];
- const feeOrders: SignedOrder[] = [];
- const ethValue = orderWithFee.takerAssetAmount.dividedToIntegerBy(2);
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAssetFillAmount = orderWithFee.makerAssetAmount.dividedToIntegerBy(2);
- const totalEthSpent = ethValue.plus(gasPrice.times(tx.gasUsed));
- const takerFeePaid = orderWithFee.takerFee.dividedToIntegerBy(2);
- const makerFeePaid = orderWithFee.makerFee.dividedToIntegerBy(2);
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount).minus(makerFeePaid),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount).minus(takerFeePaid),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(ethValue),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[forwarderContract.address][zrxToken.address],
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should refund remaining ETH if amount is greater than takerAssetAmount', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const ethValue = orderWithoutFee.takerAssetAmount.times(2);
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithoutFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const totalEthSpent = orderWithoutFee.takerAssetAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- });
- it('should revert if ZRX cannot be fully repurchased', async () => {
- orderWithFee = await orderFactory.newSignedOrderAsync({
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), DECIMALS_DEFAULT),
- });
- const ordersWithFee = [orderWithFee];
- feeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- const feeOrders = [feeOrder];
- const ethValue = orderWithFee.takerAssetAmount;
- return expectTransactionFailedAsync(
- forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- }),
- RevertReason.CompleteFillFailed,
- );
- });
- it('should not fill orders with different makerAssetData than the first order', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- const erc721SignedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- });
- const erc20SignedOrder = await orderFactory.newSignedOrderAsync();
- const ordersWithoutFee = [erc20SignedOrder, erc721SignedOrder];
- const feeOrders: SignedOrder[] = [];
- const ethValue = erc20SignedOrder.takerAssetAmount.plus(erc721SignedOrder.takerAssetAmount);
-
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(ordersWithoutFee, feeOrders, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const totalEthSpent = erc20SignedOrder.takerAssetAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- });
- });
- describe('marketSellOrdersWithEth with extra fees', () => {
- it('should fill the order and send fee to feeRecipient', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const ethValue = orderWithoutFee.takerAssetAmount.div(2);
-
- const baseFeePercentage = 2;
- feePercentage = ForwarderWrapper.getPercentageOfValue(constants.PERCENTAGE_DENOMINATOR, baseFeePercentage);
- const feeRecipientEthBalanceBefore = await web3Wrapper.getBalanceInWeiAsync(feeRecipientAddress);
- tx = await forwarderWrapper.marketSellOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- {
- value: ethValue,
- from: takerAddress,
- },
- { feePercentage, feeRecipient: feeRecipientAddress },
- );
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const feeRecipientEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(feeRecipientAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getPercentageOfValue(
- ethValue,
- MAX_WETH_FILL_PERCENTAGE,
- );
- const makerAssetFillAmount = primaryTakerAssetFillAmount
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- const ethSpentOnFee = ForwarderWrapper.getPercentageOfValue(primaryTakerAssetFillAmount, baseFeePercentage);
- const totalEthSpent = primaryTakerAssetFillAmount.plus(ethSpentOnFee).plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(feeRecipientEthBalanceAfter).to.be.bignumber.equal(feeRecipientEthBalanceBefore.plus(ethSpentOnFee));
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fail if the fee is set too high', async () => {
- const ethValue = orderWithoutFee.takerAssetAmount.div(2);
- const baseFeePercentage = 6;
- feePercentage = ForwarderWrapper.getPercentageOfValue(ethValue, baseFeePercentage);
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- await expectTransactionFailedAsync(
- forwarderWrapper.marketSellOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- { from: takerAddress, value: ethValue, gasPrice },
- { feePercentage, feeRecipient: feeRecipientAddress },
- ),
- RevertReason.FeePercentageTooLarge,
- );
- });
- it('should fail if there is not enough ETH remaining to pay the fee', async () => {
- const ethValue = orderWithoutFee.takerAssetAmount.div(2);
- const baseFeePercentage = 5;
- feePercentage = ForwarderWrapper.getPercentageOfValue(constants.PERCENTAGE_DENOMINATOR, baseFeePercentage);
- const ordersWithFee = [orderWithFee];
- const feeOrders = [feeOrder];
- await expectTransactionFailedAsync(
- forwarderWrapper.marketSellOrdersWithEthAsync(
- ordersWithFee,
- feeOrders,
- { from: takerAddress, value: ethValue, gasPrice },
- { feePercentage, feeRecipient: feeRecipientAddress },
- ),
- RevertReason.InsufficientEthRemaining,
- );
- });
- });
- describe('marketBuyOrdersWithEth without extra fees', () => {
- it('should buy the exact amount of makerAsset in a single order', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount.dividedToIntegerBy(2);
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should buy the exact amount of makerAsset in multiple orders', async () => {
- const secondOrderWithoutFee = await orderFactory.newSignedOrderAsync();
- const ordersWithoutFee = [orderWithoutFee, secondOrderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = ordersWithoutFee[0].makerAssetAmount.plus(
- ordersWithoutFee[1].makerAssetAmount.dividedToIntegerBy(2),
- );
- const ethValue = ordersWithoutFee[0].takerAssetAmount.plus(
- ordersWithoutFee[1].takerAssetAmount.dividedToIntegerBy(2),
- );
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should buy the exact amount of makerAsset and return excess ETH', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount;
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ethValue.dividedToIntegerBy(2);
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should buy the exact amount of makerAsset and pay ZRX from feeOrders', async () => {
- const ordersWithFee = [orderWithFee];
- const feeOrders = [feeOrder];
- const makerAssetFillAmount = orderWithFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithFee.takerAssetAmount;
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = orderWithFee.takerAssetAmount.dividedToIntegerBy(2);
- const feeAmount = orderWithFee.takerFee.dividedToIntegerBy(2);
- const wethSpentOnFeeOrders = ForwarderWrapper.getWethForFeeOrders(feeAmount, feeOrders);
- const totalEthSpent = primaryTakerAssetFillAmount
- .plus(wethSpentOnFeeOrders)
- .plus(gasPrice.times(tx.gasUsed));
-
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount).plus(wethSpentOnFeeOrders),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should buy slightly greater than makerAssetAmount when buying ZRX', async () => {
- orderWithFee = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- const ordersWithFee = [orderWithFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithFee.takerAssetAmount;
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ForwarderWrapper.getWethForFeeOrders(
- makerAssetFillAmount,
- ordersWithFee,
- );
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- const makerAssetFilledAmount = orderWithFee.makerAssetAmount
- .times(primaryTakerAssetFillAmount)
- .dividedToIntegerBy(orderWithFee.takerAssetAmount);
- const takerFeePaid = orderWithFee.takerFee
- .times(primaryTakerAssetFillAmount)
- .dividedToIntegerBy(orderWithFee.takerAssetAmount);
- const makerFeePaid = orderWithFee.makerFee
- .times(primaryTakerAssetFillAmount)
- .dividedToIntegerBy(orderWithFee.takerAssetAmount);
- const totalZrxPurchased = makerAssetFilledAmount.minus(takerFeePaid);
- // Up to 1 wei worth of ZRX will be overbought per order
- const maxOverboughtZrx = new BigNumber(1)
- .times(orderWithFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithFee.takerAssetAmount);
-
- expect(totalZrxPurchased).to.be.bignumber.gte(makerAssetFillAmount);
- expect(totalZrxPurchased).to.be.bignumber.lte(makerAssetFillAmount.plus(maxOverboughtZrx));
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFilledAmount).minus(makerFeePaid),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(totalZrxPurchased),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[forwarderContract.address][zrxToken.address],
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should revert if the amount of ETH sent is too low to fill the makerAssetAmount', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount.dividedToIntegerBy(4);
- return expectTransactionFailedAsync(
- forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- }),
- RevertReason.CompleteFillFailed,
- );
- });
- it('should buy an ERC721 asset from a single order', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = new BigNumber(1);
- const ethValue = orderWithFee.takerAssetAmount;
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- from: takerAddress,
- value: ethValue,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newOwner = await erc721Token.ownerOf.callAsync(makerAssetId);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- expect(newOwner).to.be.bignumber.equal(takerAddress);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should revert if buying an ERC721 asset when later orders contain different makerAssetData', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- });
- const differentMakerAssetDataOrder = await orderFactory.newSignedOrderAsync();
- const ordersWithoutFee = [orderWithoutFee, differentMakerAssetDataOrder];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = new BigNumber(1).plus(differentMakerAssetDataOrder.makerAssetAmount);
- const ethValue = orderWithFee.takerAssetAmount;
- return expectTransactionFailedAsync(
- forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- }),
- RevertReason.CompleteFillFailed,
- );
- });
- it('should buy an ERC721 asset and pay ZRX fees from a single fee order', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- orderWithFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- const ordersWithFee = [orderWithFee];
- const feeOrders = [feeOrder];
- const makerAssetFillAmount = orderWithFee.makerAssetAmount;
- const primaryTakerAssetFillAmount = orderWithFee.takerAssetAmount;
- const feeAmount = orderWithFee.takerFee;
- const wethSpentOnFeeOrders = ForwarderWrapper.getWethForFeeOrders(feeAmount, feeOrders);
- const ethValue = primaryTakerAssetFillAmount.plus(wethSpentOnFeeOrders);
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newOwner = await erc721Token.ownerOf.callAsync(makerAssetId);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const totalEthSpent = ethValue.plus(gasPrice.times(tx.gasUsed));
-
- expect(newOwner).to.be.bignumber.equal(takerAddress);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount).plus(wethSpentOnFeeOrders),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should buy an ERC721 asset and pay ZRX fees from multiple fee orders', async () => {
- const makerAssetId = erc721MakerAssetIds[0];
- orderWithFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), DECIMALS_DEFAULT),
- });
- const ordersWithFee = [orderWithFee];
- const makerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const makerAssetAmount = orderWithFee.takerFee.dividedToIntegerBy(2);
- const takerAssetAmount = feeOrder.takerAssetAmount
- .times(makerAssetAmount)
- .dividedToIntegerBy(feeOrder.makerAssetAmount);
-
- const firstFeeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- });
- const secondFeeOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- });
- const feeOrders = [firstFeeOrder, secondFeeOrder];
-
- const makerAssetFillAmount = orderWithFee.makerAssetAmount;
- const primaryTakerAssetFillAmount = orderWithFee.takerAssetAmount;
- const feeAmount = orderWithFee.takerFee;
- const wethSpentOnFeeOrders = ForwarderWrapper.getWethForFeeOrders(feeAmount, feeOrders);
- const ethValue = primaryTakerAssetFillAmount.plus(wethSpentOnFeeOrders);
-
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newOwner = await erc721Token.ownerOf.callAsync(makerAssetId);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const totalEthSpent = ethValue.plus(gasPrice.times(tx.gasUsed));
-
- expect(newOwner).to.be.bignumber.equal(takerAddress);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount).plus(wethSpentOnFeeOrders),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('Should buy slightly greater MakerAsset when exchange rate is rounded', async () => {
- // The 0x Protocol contracts round the exchange rate in favor of the Maker.
- // In this case, the taker must round up how much they're going to spend, which
- // in turn increases the amount of MakerAsset being purchased.
- // Example:
- // The taker wants to buy 5 units of the MakerAsset at a rate of 3M/2T.
- // For every 2 units of TakerAsset, the taker will receive 3 units of MakerAsset.
- // To purchase 5 units, the taker must spend 10/3 = 3.33 units of TakerAssset.
- // However, the Taker can only spend whole units.
- // Spending floor(10/3) = 3 units will yield a profit of Floor(3*3/2) = Floor(4.5) = 4 units of MakerAsset.
- // Spending ceil(10/3) = 4 units will yield a profit of Floor(4*3/2) = 6 units of MakerAsset.
- //
- // The forwarding contract will opt for the second option, which overbuys, to ensure the taker
- // receives at least the amount of MakerAsset they requested.
- //
- // Construct test case using values from example above
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber('30'),
- takerAssetAmount: new BigNumber('20'),
- makerAssetData: assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const desiredMakerAssetFillAmount = new BigNumber('5');
- const makerAssetFillAmount = new BigNumber('6');
- const ethValue = new BigNumber('4');
- // Execute test case
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- desiredMakerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- );
- // Fetch end balances and construct expected outputs
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- // Validate test case
- expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('Should buy slightly greater MakerAsset when exchange rate is rounded, and MakerAsset is ZRX', async () => {
- // See the test case above for a detailed description of this case.
- // The difference here is that the MakerAsset is ZRX. We expect the same result as above,
- // but this tests a different code path.
- //
- // Construct test case using values from example above
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber('30'),
- takerAssetAmount: new BigNumber('20'),
- makerAssetData: zrxAssetData,
- takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const desiredMakerAssetFillAmount = new BigNumber('5');
- const makerAssetFillAmount = new BigNumber('6');
- const ethValue = new BigNumber('4');
- // Execute test case
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- desiredMakerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- );
- // Fetch end balances and construct expected outputs
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- // Validate test case
- expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('Should buy slightly greater MakerAsset when exchange rate is rounded (Regression Test)', async () => {
- // Order taken from a transaction on mainnet that failed due to a rounding error.
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber('268166666666666666666'),
- takerAssetAmount: new BigNumber('219090625878836371'),
- makerAssetData: assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- // The taker will receive more than the desired amount of makerAsset due to rounding
- const desiredMakerAssetFillAmount = new BigNumber('5000000000000000000');
- const ethValue = new BigNumber('4084971271824171');
- const makerAssetFillAmount = ethValue
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- // Execute test case
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- desiredMakerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- );
- // Fetch end balances and construct expected outputs
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- // Validate test case
- expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('Should buy slightly greater MakerAsset when exchange rate is rounded, and MakerAsset is ZRX (Regression Test)', async () => {
- // Order taken from a transaction on mainnet that failed due to a rounding error.
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber('268166666666666666666'),
- takerAssetAmount: new BigNumber('219090625878836371'),
- makerAssetData: zrxAssetData,
- takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- // The taker will receive more than the desired amount of makerAsset due to rounding
- const desiredMakerAssetFillAmount = new BigNumber('5000000000000000000');
- const ethValue = new BigNumber('4084971271824171');
- const makerAssetFillAmount = ethValue
- .times(orderWithoutFee.makerAssetAmount)
- .dividedToIntegerBy(orderWithoutFee.takerAssetAmount);
- // Execute test case
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- desiredMakerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- );
- // Fetch end balances and construct expected outputs
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- // Validate test case
- expect(makerAssetFillAmount).to.be.bignumber.greaterThan(desiredMakerAssetFillAmount);
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('Should buy correct MakerAsset when exchange rate is NOT rounded, and MakerAsset is ZRX (Regression Test)', async () => {
- // An extra unit of TakerAsset was sent to the exchange contract to account for rounding errors, in Forwarder v1.
- // Specifically, the takerFillAmount was calculated using Floor(desiredMakerAmount * exchangeRate) + 1
- // We have since changed this to be Ceil(desiredMakerAmount * exchangeRate)
- // These calculations produce different results when `desiredMakerAmount * exchangeRate` is an integer.
- //
- // This test verifies that `ceil` is sufficient:
- // Let TakerAssetAmount = MakerAssetAmount * 2
- // -> exchangeRate = TakerAssetAmount / MakerAssetAmount = (2*MakerAssetAmount)/MakerAssetAmount = 2
- // .: desiredMakerAmount * exchangeRate is an integer.
- //
- // Construct test case using values from example above
- orderWithoutFee = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber('30'),
- takerAssetAmount: new BigNumber('60'),
- makerAssetData: zrxAssetData,
- takerAssetData: assetDataUtils.encodeERC20AssetData(weth.address),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- });
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = new BigNumber('5');
- const ethValue = new BigNumber('10');
- // Execute test case
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(ordersWithoutFee, feeOrders, makerAssetFillAmount, {
- value: ethValue,
- from: takerAddress,
- });
- // Fetch end balances and construct expected outputs
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const primaryTakerAssetFillAmount = ethValue;
- const totalEthSpent = primaryTakerAssetFillAmount.plus(gasPrice.times(tx.gasUsed));
- // Validate test case
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('marketBuyOrdersWithEth with extra fees', () => {
- it('should buy an asset and send fee to feeRecipient', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount;
-
- const baseFeePercentage = 2;
- feePercentage = ForwarderWrapper.getPercentageOfValue(constants.PERCENTAGE_DENOMINATOR, baseFeePercentage);
- const feeRecipientEthBalanceBefore = await web3Wrapper.getBalanceInWeiAsync(feeRecipientAddress);
- tx = await forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- makerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- { feePercentage, feeRecipient: feeRecipientAddress },
- );
- const takerEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(takerAddress);
- const forwarderEthBalance = await web3Wrapper.getBalanceInWeiAsync(forwarderContract.address);
- const feeRecipientEthBalanceAfter = await web3Wrapper.getBalanceInWeiAsync(feeRecipientAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const primaryTakerAssetFillAmount = orderWithoutFee.takerAssetAmount.dividedToIntegerBy(2);
- const ethSpentOnFee = ForwarderWrapper.getPercentageOfValue(primaryTakerAssetFillAmount, baseFeePercentage);
- const totalEthSpent = primaryTakerAssetFillAmount.plus(ethSpentOnFee).plus(gasPrice.times(tx.gasUsed));
-
- expect(feeRecipientEthBalanceAfter).to.be.bignumber.equal(feeRecipientEthBalanceBefore.plus(ethSpentOnFee));
- expect(takerEthBalanceAfter).to.be.bignumber.equal(takerEthBalanceBefore.minus(totalEthSpent));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][weth.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][weth.address].plus(primaryTakerAssetFillAmount),
- );
- expect(newBalances[forwarderContract.address][weth.address]).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(newBalances[forwarderContract.address][defaultMakerAssetAddress]).to.be.bignumber.equal(
- constants.ZERO_AMOUNT,
- );
- expect(forwarderEthBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should fail if the fee is set too high', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount;
-
- const baseFeePercentage = 6;
- feePercentage = ForwarderWrapper.getPercentageOfValue(constants.PERCENTAGE_DENOMINATOR, baseFeePercentage);
- await expectTransactionFailedAsync(
- forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- makerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- { feePercentage, feeRecipient: feeRecipientAddress },
- ),
- RevertReason.FeePercentageTooLarge,
- );
- });
- it('should fail if there is not enough ETH remaining to pay the fee', async () => {
- const ordersWithoutFee = [orderWithoutFee];
- const feeOrders: SignedOrder[] = [];
- const makerAssetFillAmount = orderWithoutFee.makerAssetAmount.dividedToIntegerBy(2);
- const ethValue = orderWithoutFee.takerAssetAmount.dividedToIntegerBy(2);
-
- const baseFeePercentage = 2;
- feePercentage = ForwarderWrapper.getPercentageOfValue(constants.PERCENTAGE_DENOMINATOR, baseFeePercentage);
- await expectTransactionFailedAsync(
- forwarderWrapper.marketBuyOrdersWithEthAsync(
- ordersWithoutFee,
- feeOrders,
- makerAssetFillAmount,
- {
- value: ethValue,
- from: takerAddress,
- },
- { feePercentage, feeRecipient: feeRecipientAddress },
- ),
- RevertReason.InsufficientEthRemaining,
- );
- });
- });
- describe('withdrawAsset', () => {
- it('should allow owner to withdraw ERC20 tokens', async () => {
- const zrxWithdrawAmount = erc20Balances[forwarderContract.address][zrxToken.address];
- await forwarderWrapper.withdrawAssetAsync(zrxAssetData, zrxWithdrawAmount, { from: owner });
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[owner][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[owner][zrxToken.address].plus(zrxWithdrawAmount),
- );
- expect(newBalances[forwarderContract.address][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[forwarderContract.address][zrxToken.address].minus(zrxWithdrawAmount),
- );
- });
- it('should revert if not called by owner', async () => {
- const zrxWithdrawAmount = erc20Balances[forwarderContract.address][zrxToken.address];
- await expectTransactionFailedAsync(
- forwarderWrapper.withdrawAssetAsync(zrxAssetData, zrxWithdrawAmount, { from: makerAddress }),
- RevertReason.OnlyContractOwner,
- );
- });
- });
-});
-// tslint:disable:max-file-line-count
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/extensions/test/extensions/order_matcher.ts b/contracts/extensions/test/extensions/order_matcher.ts
deleted file mode 100644
index acb46ced4..000000000
--- a/contracts/extensions/test/extensions/order_matcher.ts
+++ /dev/null
@@ -1,818 +0,0 @@
-import {
- artifacts as protocolArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ExchangeContract,
- ExchangeFillEventArgs,
- ExchangeWrapper,
-} from '@0x/contracts-protocol';
-import {
- chaiSetup,
- constants,
- ERC20BalancesByOwner,
- expectContractCreationFailedAsync,
- expectTransactionFailedAsync,
- LogDecoder,
- OrderFactory,
- provider,
- sendTransactionResult,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { artifacts as tokenArtifacts, DummyERC20TokenContract, DummyERC721TokenContract } from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { OrderMatcherContract } from '../../generated-wrappers/order_matcher';
-import { artifacts } from '../../src/artifacts';
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-chaiSetup.configure();
-const expect = chai.expect;
-// tslint:disable:no-unnecessary-type-assertion
-describe('OrderMatcher', () => {
- let makerAddressLeft: string;
- let makerAddressRight: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddressLeft: string;
- let feeRecipientAddressRight: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let exchange: ExchangeContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
- let orderMatcher: OrderMatcherContract;
-
- let erc20BalancesByOwner: ERC20BalancesByOwner;
- let exchangeWrapper: ExchangeWrapper;
- let erc20Wrapper: ERC20Wrapper;
- let orderFactoryLeft: OrderFactory;
- let orderFactoryRight: OrderFactory;
-
- let leftMakerAssetData: string;
- let leftTakerAssetData: string;
- let defaultERC20MakerAssetAddress: string;
- let defaultERC20TakerAssetAddress: string;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- // Create accounts
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- // Hack(albrow): Both Prettier and TSLint insert a trailing comma below
- // but that is invalid syntax as of TypeScript version >= 2.8. We don't
- // have the right fine-grained configuration options in TSLint,
- // Prettier, or TypeScript, to reconcile this, so we will just have to
- // wait for them to sort it out. We disable TSLint and Prettier for
- // this part of the code for now. This occurs several times in this
- // file. See https://github.com/prettier/prettier/issues/4624.
- // prettier-ignore
- const usedAddresses = ([
- owner,
- makerAddressLeft,
- makerAddressRight,
- takerAddress,
- feeRecipientAddressLeft,
- // tslint:disable-next-line:trailing-comma
- feeRecipientAddressRight
- ] = _.slice(accounts, 0, 6));
- // Create wrappers
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- // Deploy ERC20 token & ERC20 proxy
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
- // Deploy ERC721 proxy
- erc721Proxy = await ERC721ProxyContract.deployFrom0xArtifactAsync(
- protocolArtifacts.ERC721Proxy,
- provider,
- txDefaults,
- );
- // Depoy exchange
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
- exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
- // Authorize ERC20 trades by exchange
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Deploy OrderMatcher
- orderMatcher = await OrderMatcherContract.deployFrom0xArtifactAsync(
- artifacts.OrderMatcher,
- provider,
- txDefaults,
- exchange.address,
- );
- // Set default addresses
- defaultERC20MakerAssetAddress = erc20TokenA.address;
- defaultERC20TakerAssetAddress = erc20TokenB.address;
- leftMakerAssetData = assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress);
- leftTakerAssetData = assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress);
- // Set OrderMatcher balances and allowances
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenA.setBalance.sendTransactionAsync(orderMatcher.address, constants.INITIAL_ERC20_BALANCE, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenB.setBalance.sendTransactionAsync(orderMatcher.address, constants.INITIAL_ERC20_BALANCE, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(
- leftMakerAssetData,
- constants.INITIAL_ERC20_ALLOWANCE,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(
- leftTakerAssetData,
- constants.INITIAL_ERC20_ALLOWANCE,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Create default order parameters
- const defaultOrderParamsLeft = {
- ...constants.STATIC_ORDER_PARAMS,
- makerAddress: makerAddressLeft,
- exchangeAddress: exchange.address,
- makerAssetData: leftMakerAssetData,
- takerAssetData: leftTakerAssetData,
- feeRecipientAddress: feeRecipientAddressLeft,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- };
- const defaultOrderParamsRight = {
- ...constants.STATIC_ORDER_PARAMS,
- makerAddress: makerAddressRight,
- exchangeAddress: exchange.address,
- makerAssetData: leftTakerAssetData,
- takerAssetData: leftMakerAssetData,
- feeRecipientAddress: feeRecipientAddressRight,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- };
- const privateKeyLeft = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddressLeft)];
- orderFactoryLeft = new OrderFactory(privateKeyLeft, defaultOrderParamsLeft);
- const privateKeyRight = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddressRight)];
- orderFactoryRight = new OrderFactory(privateKeyRight, defaultOrderParamsRight);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('constructor', () => {
- it('should revert if assetProxy is unregistered', async () => {
- const exchangeInstance = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- constants.NULL_BYTES,
- );
- return expectContractCreationFailedAsync(
- (OrderMatcherContract.deployFrom0xArtifactAsync(
- artifacts.OrderMatcher,
- provider,
- txDefaults,
- exchangeInstance.address,
- ) as any) as sendTransactionResult,
- RevertReason.UnregisteredAssetProxy,
- );
- });
- });
- describe('matchOrders', () => {
- beforeEach(async () => {
- erc20BalancesByOwner = await erc20Wrapper.getBalancesAsync();
- });
- it('should revert if not called by owner', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: takerAddress,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- RevertReason.OnlyContractOwner,
- );
- });
- it('should transfer the correct amounts when orders completely fill each other', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: signedOrderLeft.makerAssetAmount,
- amountBoughtByLeftMaker: signedOrderLeft.takerAssetAmount,
- // Right Maker
- amountSoldByRightMaker: signedOrderRight.makerAssetAmount,
- amountBoughtByRightMaker: signedOrderRight.takerAssetAmount,
- // Taker
- leftMakerAssetSpreadAmount: signedOrderLeft.makerAssetAmount.minus(signedOrderRight.takerAssetAmount),
- };
- const initialLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const newErc20Balances = await erc20Wrapper.getBalancesAsync();
- expect(newErc20Balances[makerAddressLeft][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20MakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20TakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(newErc20Balances[makerAddressLeft][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20TakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20MakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- expect(newLeftMakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftMakerAssetTakerBalance.plus(expectedTransferAmounts.leftMakerAssetSpreadAmount),
- );
- });
- it('should transfer the correct amounts when orders completely fill each other and taker doesnt take a profit', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: signedOrderLeft.makerAssetAmount,
- amountBoughtByLeftMaker: signedOrderLeft.takerAssetAmount,
- // Right Maker
- amountSoldByRightMaker: signedOrderRight.makerAssetAmount,
- amountBoughtByRightMaker: signedOrderRight.takerAssetAmount,
- };
- const initialLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const newErc20Balances = await erc20Wrapper.getBalancesAsync();
- expect(newErc20Balances[makerAddressLeft][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20MakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20TakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(newErc20Balances[makerAddressLeft][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20TakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20MakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- expect(newLeftMakerAssetTakerBalance).to.be.bignumber.equal(initialLeftMakerAssetTakerBalance);
- });
- it('should transfer the correct amounts when left order is completely filled and right order would be partially filled', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(20), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: signedOrderLeft.makerAssetAmount,
- amountBoughtByLeftMaker: signedOrderLeft.takerAssetAmount,
- // Right Maker
- amountSoldByRightMaker: signedOrderRight.makerAssetAmount,
- amountBoughtByRightMaker: signedOrderRight.takerAssetAmount,
- // Taker
- leftMakerAssetSpreadAmount: signedOrderLeft.makerAssetAmount.minus(signedOrderRight.takerAssetAmount),
- leftTakerAssetSpreadAmount: signedOrderRight.makerAssetAmount.minus(signedOrderLeft.takerAssetAmount),
- };
- const initialLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const initialLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- // Match signedOrderLeft with signedOrderRight
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const newLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- const newErc20Balances = await erc20Wrapper.getBalancesAsync();
- expect(newErc20Balances[makerAddressLeft][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20MakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20TakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(newErc20Balances[makerAddressLeft][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20TakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20MakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- expect(newLeftMakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftMakerAssetTakerBalance.plus(expectedTransferAmounts.leftMakerAssetSpreadAmount),
- );
- expect(newLeftTakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftTakerAssetTakerBalance.plus(expectedTransferAmounts.leftTakerAssetSpreadAmount),
- );
- });
- it('should not call fillOrder when rightOrder is completely filled after matchOrders call and orders were never partially filled', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokenArtifacts, ...protocolArtifacts });
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- );
- const fillLogs = _.filter(
- txReceipt.logs,
- log => (log as LogWithDecodedArgs<ExchangeFillEventArgs>).event === 'Fill',
- );
- // Only 2 Fill logs should exist for `matchOrders` call. `fillOrder` should not have been called and should not have emitted a Fill event.
- expect(fillLogs.length).to.be.equal(2);
- });
- it('should not call fillOrder when rightOrder is completely filled after matchOrders call and orders were initially partially filled', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- await exchangeWrapper.fillOrderAsync(signedOrderLeft, takerAddress, {
- takerAssetFillAmount: signedOrderLeft.takerAssetAmount.dividedToIntegerBy(5),
- });
- await exchangeWrapper.fillOrderAsync(signedOrderRight, takerAddress, {
- takerAssetFillAmount: signedOrderRight.takerAssetAmount.dividedToIntegerBy(5),
- });
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokenArtifacts, ...protocolArtifacts });
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- );
- const fillLogs = _.filter(
- txReceipt.logs,
- log => (log as LogWithDecodedArgs<ExchangeFillEventArgs>).event === 'Fill',
- );
- // Only 2 Fill logs should exist for `matchOrders` call. `fillOrder` should not have been called and should not have emitted a Fill event.
- expect(fillLogs.length).to.be.equal(2);
- });
- it('should only take a spread in rightMakerAsset if entire leftMakerAssetSpread amount can be used to fill rightOrder after matchOrders call', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(0.9), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(990), 18),
- });
- const initialLeftMakerAssetSpreadAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1.09), 18);
- const leftTakerAssetSpreadAmount = initialLeftMakerAssetSpreadAmount
- .times(signedOrderRight.makerAssetAmount)
- .dividedToIntegerBy(signedOrderRight.takerAssetAmount);
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: signedOrderLeft.makerAssetAmount,
- amountBoughtByLeftMaker: signedOrderLeft.takerAssetAmount,
- // Right Maker
- amountSoldByRightMaker: signedOrderLeft.takerAssetAmount.plus(leftTakerAssetSpreadAmount),
- amountBoughtByRightMaker: signedOrderLeft.makerAssetAmount,
- // Taker
- leftMakerAssetSpreadAmount: constants.ZERO_AMOUNT,
- leftTakerAssetSpreadAmount,
- };
- const initialLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const initialLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- // Match signedOrderLeft with signedOrderRight
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const newLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- const newErc20Balances = await erc20Wrapper.getBalancesAsync();
- expect(newErc20Balances[makerAddressLeft][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20MakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20TakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(newErc20Balances[makerAddressLeft][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20TakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20MakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- expect(newLeftMakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftMakerAssetTakerBalance.plus(expectedTransferAmounts.leftMakerAssetSpreadAmount),
- );
- expect(newLeftTakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftTakerAssetTakerBalance.plus(expectedTransferAmounts.leftTakerAssetSpreadAmount),
- );
- });
- it("should succeed if rightOrder's makerAssetData and takerAssetData are not provided", async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(20), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: signedOrderLeft.makerAssetAmount,
- amountBoughtByLeftMaker: signedOrderLeft.takerAssetAmount,
- // Right Maker
- amountSoldByRightMaker: signedOrderRight.makerAssetAmount,
- amountBoughtByRightMaker: signedOrderRight.takerAssetAmount,
- // Taker
- leftMakerAssetSpreadAmount: signedOrderLeft.makerAssetAmount.minus(signedOrderRight.takerAssetAmount),
- leftTakerAssetSpreadAmount: signedOrderRight.makerAssetAmount.minus(signedOrderLeft.takerAssetAmount),
- };
- const initialLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const initialLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- // Match signedOrderLeft with signedOrderRight
- signedOrderRight.makerAssetData = constants.NULL_BYTES;
- signedOrderRight.takerAssetData = constants.NULL_BYTES;
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newLeftMakerAssetTakerBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- const newLeftTakerAssetTakerBalance = await erc20TokenB.balanceOf.callAsync(orderMatcher.address);
- const newErc20Balances = await erc20Wrapper.getBalancesAsync();
- expect(newErc20Balances[makerAddressLeft][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20MakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20TakerAssetAddress].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- ),
- );
- expect(newErc20Balances[makerAddressLeft][defaultERC20TakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressLeft][defaultERC20TakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- ),
- );
- expect(newErc20Balances[makerAddressRight][defaultERC20MakerAssetAddress]).to.be.bignumber.equal(
- erc20BalancesByOwner[makerAddressRight][defaultERC20MakerAssetAddress].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- ),
- );
- expect(newLeftMakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftMakerAssetTakerBalance.plus(expectedTransferAmounts.leftMakerAssetSpreadAmount),
- );
- expect(newLeftTakerAssetTakerBalance).to.be.bignumber.equal(
- initialLeftTakerAssetTakerBalance.plus(expectedTransferAmounts.leftTakerAssetSpreadAmount),
- );
- });
- it('should revert with the correct reason if matchOrders call reverts', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- });
- signedOrderRight.signature = `0xff${signedOrderRight.signature.slice(4)}`;
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- RevertReason.InvalidOrderSignature,
- );
- });
- it('should revert with the correct reason if fillOrder call reverts', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(20), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 18),
- });
- // Matcher will not have enough allowance to fill rightOrder
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(leftMakerAssetData, constants.ZERO_AMOUNT, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const data = exchange.matchOrders.getABIEncodedTransactionData(
- signedOrderLeft,
- signedOrderRight,
- signedOrderLeft.signature,
- signedOrderRight.signature,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- data,
- to: orderMatcher.address,
- from: owner,
- gas: constants.MAX_MATCH_ORDERS_GAS,
- }),
- RevertReason.TransferFailed,
- );
- });
- });
- describe('withdrawAsset', () => {
- it('should allow owner to withdraw ERC20 tokens', async () => {
- const erc20AWithdrawAmount = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- expect(erc20AWithdrawAmount).to.be.bignumber.gt(constants.ZERO_AMOUNT);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.withdrawAsset.sendTransactionAsync(leftMakerAssetData, erc20AWithdrawAmount, {
- from: owner,
- }),
- );
- const newBalance = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- expect(newBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should allow owner to withdraw ERC721 tokens', async () => {
- const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- tokenArtifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- const tokenId = new BigNumber(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(orderMatcher.address, tokenId, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const assetData = assetDataUtils.encodeERC721AssetData(erc721Token.address, tokenId);
- const withdrawAmount = new BigNumber(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.withdrawAsset.sendTransactionAsync(assetData, withdrawAmount, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const erc721Owner = await erc721Token.ownerOf.callAsync(tokenId);
- expect(erc721Owner).to.be.equal(owner);
- });
- it('should revert if not called by owner', async () => {
- const erc20AWithdrawAmount = await erc20TokenA.balanceOf.callAsync(orderMatcher.address);
- expect(erc20AWithdrawAmount).to.be.bignumber.gt(constants.ZERO_AMOUNT);
- await expectTransactionFailedAsync(
- orderMatcher.withdrawAsset.sendTransactionAsync(leftMakerAssetData, erc20AWithdrawAmount, {
- from: takerAddress,
- }),
- RevertReason.OnlyContractOwner,
- );
- });
- });
- describe('approveAssetProxy', () => {
- it('should be able to set an allowance for ERC20 tokens', async () => {
- const allowance = new BigNumber(55465465426546);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(leftMakerAssetData, allowance, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newAllowance = await erc20TokenA.allowance.callAsync(orderMatcher.address, erc20Proxy.address);
- expect(newAllowance).to.be.bignumber.equal(allowance);
- });
- it('should be able to approve an ERC721 token by passing in allowance = 1', async () => {
- const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- tokenArtifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- const assetData = assetDataUtils.encodeERC721AssetData(erc721Token.address, constants.ZERO_AMOUNT);
- const allowance = new BigNumber(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(assetData, allowance, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = await erc721Token.isApprovedForAll.callAsync(orderMatcher.address, erc721Proxy.address);
- expect(isApproved).to.be.equal(true);
- });
- it('should be able to approve an ERC721 token by passing in allowance > 1', async () => {
- const erc721Token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- tokenArtifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- const assetData = assetDataUtils.encodeERC721AssetData(erc721Token.address, constants.ZERO_AMOUNT);
- const allowance = new BigNumber(2);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await orderMatcher.approveAssetProxy.sendTransactionAsync(assetData, allowance, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = await erc721Token.isApprovedForAll.callAsync(orderMatcher.address, erc721Proxy.address);
- expect(isApproved).to.be.equal(true);
- });
- it('should revert if not called by owner', async () => {
- const approval = new BigNumber(1);
- await expectTransactionFailedAsync(
- orderMatcher.approveAssetProxy.sendTransactionAsync(leftMakerAssetData, approval, {
- from: takerAddress,
- }),
- RevertReason.OnlyContractOwner,
- );
- });
- });
-});
-// tslint:disable:max-file-line-count
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/extensions/test/extensions/order_validator.ts b/contracts/extensions/test/extensions/order_validator.ts
deleted file mode 100644
index 7d8675f36..000000000
--- a/contracts/extensions/test/extensions/order_validator.ts
+++ /dev/null
@@ -1,609 +0,0 @@
-import {
- artifacts as protocolArtifacts,
- ERC20ProxyContract,
- ERC20Wrapper,
- ERC721ProxyContract,
- ERC721Wrapper,
- ExchangeContract,
- ExchangeWrapper,
-} from '@0x/contracts-protocol';
-import {
- chaiSetup,
- constants,
- OrderFactory,
- OrderStatus,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { DummyERC20TokenContract, DummyERC721TokenContract } from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { OrderValidatorContract } from '../../generated-wrappers/order_validator';
-import { artifacts } from '../../src/artifacts/index';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('OrderValidator', () => {
- let makerAddress: string;
- let owner: string;
- let takerAddress: string;
- let erc20AssetData: string;
- let erc721AssetData: string;
-
- let erc20Token: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let exchange: ExchangeContract;
- let orderValidator: OrderValidatorContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
-
- let signedOrder: SignedOrder;
- let signedOrder2: SignedOrder;
- let orderFactory: OrderFactory;
-
- const tokenId = new BigNumber(123456789);
- const tokenId2 = new BigNumber(987654321);
- const ERC721_BALANCE = new BigNumber(1);
- const ERC721_ALLOWANCE = new BigNumber(1);
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, makerAddress, takerAddress] = _.slice(accounts, 0, 3));
-
- const erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- const erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 2;
- [erc20Token, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
-
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
-
- const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- protocolArtifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- const exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
-
- orderValidator = await OrderValidatorContract.deployFrom0xArtifactAsync(
- artifacts.OrderValidator,
- provider,
- txDefaults,
- exchange.address,
- zrxAssetData,
- );
-
- erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20Token.address);
- erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721Token.address, tokenId);
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- exchangeAddress: exchange.address,
- makerAddress,
- feeRecipientAddress: constants.NULL_ADDRESS,
- makerAssetData: erc20AssetData,
- takerAssetData: erc721AssetData,
- };
- const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- orderFactory = new OrderFactory(privateKey, defaultOrderParams);
- });
-
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('getBalanceAndAllowance', () => {
- describe('getERC721TokenOwner', async () => {
- it('should return the null address when tokenId is not owned', async () => {
- const tokenOwner = await orderValidator.getERC721TokenOwner.callAsync(makerAddress, tokenId);
- expect(tokenOwner).to.be.equal(constants.NULL_ADDRESS);
- });
- it('should return the owner address when tokenId is owned', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const tokenOwner = await orderValidator.getERC721TokenOwner.callAsync(erc721Token.address, tokenId);
- expect(tokenOwner).to.be.equal(makerAddress);
- });
- });
- describe('ERC20 assetData', () => {
- it('should return the correct balances and allowances when both values are 0', async () => {
- const [newBalance, newAllowance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc20AssetData,
- );
- expect(constants.ZERO_AMOUNT).to.be.bignumber.equal(newBalance);
- expect(constants.ZERO_AMOUNT).to.be.bignumber.equal(newAllowance);
- });
- it('should return the correct balance and allowance when both values are non-zero', async () => {
- const balance = new BigNumber(123);
- const allowance = new BigNumber(456);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, balance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, allowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [newBalance, newAllowance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc20AssetData,
- );
- expect(balance).to.be.bignumber.equal(newBalance);
- expect(allowance).to.be.bignumber.equal(newAllowance);
- });
- });
- describe('ERC721 assetData', () => {
- it('should return a balance of 0 when the tokenId is not owned by target', async () => {
- const [newBalance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc721AssetData,
- );
- expect(newBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return an allowance of 0 when no approval is set', async () => {
- const [, newAllowance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc721AssetData,
- );
- expect(newAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return a balance of 1 when the tokenId is owned by target', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [newBalance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc721AssetData,
- );
- expect(newBalance).to.be.bignumber.equal(ERC721_BALANCE);
- });
- it('should return an allowance of 1 when ERC721Proxy is approved for all', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [, newAllowance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc721AssetData,
- );
- expect(newAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- });
- it('should return an allowance of 0 when ERC721Proxy is approved for specific tokenId', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.approve.sendTransactionAsync(erc721Proxy.address, tokenId, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [, newAllowance] = await orderValidator.getBalanceAndAllowance.callAsync(
- makerAddress,
- erc721AssetData,
- );
- expect(newAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- });
- describe('getBalancesAndAllowances', () => {
- it('should return the correct balances and allowances when all values are 0', async () => {
- const [
- [erc20Balance, erc721Balance],
- [erc20Allowance, erc721Allowance],
- ] = await orderValidator.getBalancesAndAllowances.callAsync(makerAddress, [
- erc20AssetData,
- erc721AssetData,
- ]);
- expect(erc20Balance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(erc721Balance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(erc20Allowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(erc721Allowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return the correct balances and allowances when balances and allowances are non-zero', async () => {
- const balance = new BigNumber(123);
- const allowance = new BigNumber(456);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, balance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, allowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(makerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [
- [erc20Balance, erc721Balance],
- [erc20Allowance, erc721Allowance],
- ] = await orderValidator.getBalancesAndAllowances.callAsync(makerAddress, [
- erc20AssetData,
- erc721AssetData,
- ]);
- expect(erc20Balance).to.be.bignumber.equal(balance);
- expect(erc721Balance).to.be.bignumber.equal(ERC721_BALANCE);
- expect(erc20Allowance).to.be.bignumber.equal(allowance);
- expect(erc721Allowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- });
- });
- describe('getTraderInfo', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should return the correct info when no balances or allowances are set', async () => {
- const traderInfo = await orderValidator.getTraderInfo.callAsync(signedOrder, takerAddress);
- expect(traderInfo.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return the correct info when balances and allowances are set', async () => {
- const makerBalance = new BigNumber(123);
- const makerAllowance = new BigNumber(456);
- const makerZrxBalance = new BigNumber(789);
- const takerZrxAllowance = new BigNumber(987);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, makerBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, makerAllowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.setBalance.sendTransactionAsync(makerAddress, makerZrxBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(erc20Proxy.address, takerZrxAllowance, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const traderInfo = await orderValidator.getTraderInfo.callAsync(signedOrder, takerAddress);
- expect(traderInfo.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo.takerBalance).to.be.bignumber.equal(ERC721_BALANCE);
- expect(traderInfo.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- });
- });
- describe('getTradersInfo', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- signedOrder2 = await orderFactory.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, tokenId2),
- });
- });
- it('should return the correct info when no balances or allowances have been set', async () => {
- const orders = [signedOrder, signedOrder2];
- const takers = [takerAddress, takerAddress];
- const [traderInfo1, traderInfo2] = await orderValidator.getTradersInfo.callAsync(orders, takers);
- expect(traderInfo1.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return the correct info when balances and allowances are set', async () => {
- const makerBalance = new BigNumber(123);
- const makerAllowance = new BigNumber(456);
- const makerZrxBalance = new BigNumber(789);
- const takerZrxAllowance = new BigNumber(987);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, makerBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, makerAllowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.setBalance.sendTransactionAsync(makerAddress, makerZrxBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(erc20Proxy.address, takerZrxAllowance, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId2),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const orders = [signedOrder, signedOrder2];
- const takers = [takerAddress, takerAddress];
- const [traderInfo1, traderInfo2] = await orderValidator.getTradersInfo.callAsync(orders, takers);
-
- expect(traderInfo1.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo1.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo1.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo1.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo1.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- expect(traderInfo2.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo2.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo2.takerBalance).to.be.bignumber.equal(ERC721_BALANCE);
- expect(traderInfo2.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo2.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo2.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- });
- });
- describe('getOrderAndTraderInfo', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should return the correct info when no balances or allowances are set', async () => {
- const [orderInfo, traderInfo] = await orderValidator.getOrderAndTraderInfo.callAsync(
- signedOrder,
- takerAddress,
- );
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- expect(orderInfo.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return the correct info when balances and allowances are set', async () => {
- const makerBalance = new BigNumber(123);
- const makerAllowance = new BigNumber(456);
- const makerZrxBalance = new BigNumber(789);
- const takerZrxAllowance = new BigNumber(987);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, makerBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, makerAllowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.setBalance.sendTransactionAsync(makerAddress, makerZrxBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(erc20Proxy.address, takerZrxAllowance, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const [orderInfo, traderInfo] = await orderValidator.getOrderAndTraderInfo.callAsync(
- signedOrder,
- takerAddress,
- );
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- expect(orderInfo.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo.takerBalance).to.be.bignumber.equal(ERC721_BALANCE);
- expect(traderInfo.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- });
- });
- describe('getOrdersAndTradersInfo', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- signedOrder2 = await orderFactory.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, tokenId2),
- });
- });
- it('should return the correct info when no balances or allowances have been set', async () => {
- const orders = [signedOrder, signedOrder2];
- const takers = [takerAddress, takerAddress];
- const [
- [orderInfo1, orderInfo2],
- [traderInfo1, traderInfo2],
- ] = await orderValidator.getOrdersAndTradersInfo.callAsync(orders, takers);
- const expectedOrderHash1 = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedOrderHash2 = orderHashUtils.getOrderHashHex(signedOrder2);
- expect(orderInfo1.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo1.orderHash).to.be.equal(expectedOrderHash1);
- expect(orderInfo1.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(orderInfo2.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo2.orderHash).to.be.equal(expectedOrderHash2);
- expect(orderInfo2.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('should return the correct info when balances and allowances are set', async () => {
- const makerBalance = new BigNumber(123);
- const makerAllowance = new BigNumber(456);
- const makerZrxBalance = new BigNumber(789);
- const takerZrxAllowance = new BigNumber(987);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.setBalance.sendTransactionAsync(makerAddress, makerBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Token.approve.sendTransactionAsync(erc20Proxy.address, makerAllowance, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.setBalance.sendTransactionAsync(makerAddress, makerZrxBalance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(erc20Proxy.address, takerZrxAllowance, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.setApprovalForAll.sendTransactionAsync(erc721Proxy.address, isApproved, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Token.mint.sendTransactionAsync(takerAddress, tokenId2),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const orders = [signedOrder, signedOrder2];
- const takers = [takerAddress, takerAddress];
- const [
- [orderInfo1, orderInfo2],
- [traderInfo1, traderInfo2],
- ] = await orderValidator.getOrdersAndTradersInfo.callAsync(orders, takers);
- const expectedOrderHash1 = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedOrderHash2 = orderHashUtils.getOrderHashHex(signedOrder2);
- expect(orderInfo1.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo1.orderHash).to.be.equal(expectedOrderHash1);
- expect(orderInfo1.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(orderInfo2.orderStatus).to.be.equal(OrderStatus.Fillable);
- expect(orderInfo2.orderHash).to.be.equal(expectedOrderHash2);
- expect(orderInfo2.orderTakerAssetFilledAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo1.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo1.takerBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo1.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo1.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo1.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- expect(traderInfo2.makerBalance).to.be.bignumber.equal(makerBalance);
- expect(traderInfo2.makerAllowance).to.be.bignumber.equal(makerAllowance);
- expect(traderInfo2.takerBalance).to.be.bignumber.equal(ERC721_BALANCE);
- expect(traderInfo2.takerAllowance).to.be.bignumber.equal(ERC721_ALLOWANCE);
- expect(traderInfo2.makerZrxBalance).to.be.bignumber.equal(makerZrxBalance);
- expect(traderInfo2.makerZrxAllowance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxBalance).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- expect(traderInfo2.takerZrxAllowance).to.be.bignumber.equal(takerZrxAllowance);
- });
- });
-});
-// tslint:disable:max-file-line-count
diff --git a/contracts/extensions/test/global_hooks.ts b/contracts/extensions/test/global_hooks.ts
deleted file mode 100644
index f8ace376a..000000000
--- a/contracts/extensions/test/global_hooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-before('start web3 provider', () => {
- provider.start();
-});
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/extensions/test/utils/balance_threshold_wrapper.ts b/contracts/extensions/test/utils/balance_threshold_wrapper.ts
deleted file mode 100644
index 28a4ef011..000000000
--- a/contracts/extensions/test/utils/balance_threshold_wrapper.ts
+++ /dev/null
@@ -1,283 +0,0 @@
-import { artifacts as protocolArtifacts, ExchangeContract } from '@0x/contracts-protocol';
-import {
- FillResults,
- formatters,
- LogDecoder,
- OrderInfo,
- orderUtils,
- TransactionFactory,
-} from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BalanceThresholdFilterContract } from '../../generated-wrappers/balance_threshold_filter';
-import { artifacts } from '../../src/artifacts';
-
-export class BalanceThresholdWrapper {
- private readonly _balanceThresholdFilter: BalanceThresholdFilterContract;
- private readonly _signerTransactionFactory: TransactionFactory;
- private readonly _exchange: ExchangeContract;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _logDecoder: LogDecoder;
- constructor(
- balanceThresholdFilter: BalanceThresholdFilterContract,
- exchangeContract: ExchangeContract,
- signerTransactionFactory: TransactionFactory,
- provider: Provider,
- ) {
- this._balanceThresholdFilter = balanceThresholdFilter;
- this._exchange = exchangeContract;
- this._signerTransactionFactory = signerTransactionFactory;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, {
- ...artifacts,
- ...tokensArtifacts,
- ...protocolArtifacts,
- });
- }
- public async fillOrderAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const data = this._exchange.fillOrder.getABIEncodedTransactionData(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async fillOrKillOrderAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const data = this._exchange.fillOrKillOrder.getABIEncodedTransactionData(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async fillOrderNoThrowAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber; gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const data = this._exchange.fillOrderNoThrow.getABIEncodedTransactionData(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- const txReceipt = this._executeTransactionAsync(data, from, opts.gas);
- return txReceipt;
- }
- public async batchFillOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const data = this._exchange.batchFillOrders.getABIEncodedTransactionData(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async batchFillOrKillOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const data = this._exchange.batchFillOrKillOrders.getABIEncodedTransactionData(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async batchFillOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[]; gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const data = this._exchange.batchFillOrKillOrders.getABIEncodedTransactionData(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from, opts.gas);
- return txReceipt;
- }
- public async marketSellOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmount: BigNumber },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
- const data = this._exchange.marketSellOrders.getABIEncodedTransactionData(
- params.orders,
- params.takerAssetFillAmount,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async marketSellOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmount: BigNumber; gas?: number },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
- const data = this._exchange.marketSellOrdersNoThrow.getABIEncodedTransactionData(
- params.orders,
- params.takerAssetFillAmount,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from, opts.gas);
- return txReceipt;
- }
- public async marketBuyOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { makerAssetFillAmount: BigNumber },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
- const data = this._exchange.marketBuyOrders.getABIEncodedTransactionData(
- params.orders,
- params.makerAssetFillAmount,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async marketBuyOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { makerAssetFillAmount: BigNumber; gas?: number },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
- const data = this._exchange.marketBuyOrdersNoThrow.getABIEncodedTransactionData(
- params.orders,
- params.makerAssetFillAmount,
- params.signatures,
- );
- const txReceipt = this._executeTransactionAsync(data, from, opts.gas);
- return txReceipt;
- }
- public async cancelOrderAsync(signedOrder: SignedOrder, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createCancel(signedOrder);
- const data = this._exchange.cancelOrder.getABIEncodedTransactionData(params.order);
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async batchCancelOrdersAsync(
- orders: SignedOrder[],
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchCancel(orders);
- const data = this._exchange.batchCancelOrders.getABIEncodedTransactionData(params.orders);
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async cancelOrdersUpToAsync(salt: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const data = this._exchange.cancelOrdersUpTo.getABIEncodedTransactionData(salt);
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async getTakerAssetFilledAmountAsync(orderHashHex: string): Promise<BigNumber> {
- const filledAmount = await this._exchange.filled.callAsync(orderHashHex);
- return filledAmount;
- }
- public async isCancelledAsync(orderHashHex: string): Promise<boolean> {
- const isCancelled = await this._exchange.cancelled.callAsync(orderHashHex);
- return isCancelled;
- }
- public async getOrderEpochAsync(makerAddress: string, senderAddress: string): Promise<BigNumber> {
- const orderEpoch = await this._exchange.orderEpoch.callAsync(makerAddress, senderAddress);
- return orderEpoch;
- }
- public async getOrderInfoAsync(signedOrder: SignedOrder): Promise<OrderInfo> {
- const orderInfo = await this._exchange.getOrderInfo.callAsync(signedOrder);
- return orderInfo;
- }
- public async getOrdersInfoAsync(signedOrders: SignedOrder[]): Promise<OrderInfo[]> {
- const ordersInfo = (await this._exchange.getOrdersInfo.callAsync(signedOrders)) as OrderInfo[];
- return ordersInfo;
- }
- public async matchOrdersAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createMatchOrders(signedOrderLeft, signedOrderRight);
- const data = await this._exchange.matchOrders.getABIEncodedTransactionData(
- params.left,
- params.right,
- params.leftSignature,
- params.rightSignature,
- );
- const txReceipt = this._executeTransactionAsync(data, from);
- return txReceipt;
- }
- public async getFillOrderResultsAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<FillResults> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const fillResults = await this._exchange.fillOrder.callAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- { from },
- );
- return fillResults;
- }
- public abiEncodeFillOrder(signedOrder: SignedOrder, opts: { takerAssetFillAmount?: BigNumber } = {}): string {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const data = this._exchange.fillOrder.getABIEncodedTransactionData(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- return data;
- }
- public getBalanceThresholdAddress(): string {
- return this._balanceThresholdFilter.address;
- }
- public getExchangeAddress(): string {
- return this._exchange.address;
- }
- private async _executeTransactionAsync(
- abiEncodedExchangeTxData: string,
- from: string,
- gas?: number,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const signedExchangeTx = this._signerTransactionFactory.newSignedTransaction(abiEncodedExchangeTxData);
- const txOpts = _.isUndefined(gas) ? { from } : { from, gas };
- const txHash = await this._balanceThresholdFilter.executeTransaction.sendTransactionAsync(
- signedExchangeTx.salt,
- signedExchangeTx.signerAddress,
- signedExchangeTx.data,
- signedExchangeTx.signature,
- txOpts,
- );
- const txReceipt = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return txReceipt;
- }
-}
diff --git a/contracts/extensions/test/utils/dutch_auction_test_wrapper.ts b/contracts/extensions/test/utils/dutch_auction_test_wrapper.ts
deleted file mode 100644
index c1e2f2070..000000000
--- a/contracts/extensions/test/utils/dutch_auction_test_wrapper.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { artifacts as protocolArtifacts } from '@0x/contracts-protocol';
-import { LogDecoder } from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { DutchAuctionDetails, SignedOrder } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { DutchAuctionContract } from '../../generated-wrappers/dutch_auction';
-import { artifacts } from '../../src/artifacts';
-
-export class DutchAuctionTestWrapper {
- private readonly _dutchAuctionContract: DutchAuctionContract;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _logDecoder: LogDecoder;
-
- constructor(contractInstance: DutchAuctionContract, provider: Provider) {
- this._dutchAuctionContract = contractInstance;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, {
- ...artifacts,
- ...tokensArtifacts,
- ...protocolArtifacts,
- });
- }
- /**
- * 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 from Address the transaction is being sent from.
- * @return Transaction receipt with decoded logs.
- */
- public async matchOrdersAsync(
- buyOrder: SignedOrder,
- sellOrder: SignedOrder,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._dutchAuctionContract.matchOrders.sendTransactionAsync(
- buyOrder,
- sellOrder,
- buyOrder.signature,
- sellOrder.signature,
- {
- from,
- },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- /**
- * Calculates 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<DutchAuctionDetails> {
- const auctionDetails = await this._dutchAuctionContract.getAuctionDetails.callAsync(sellOrder);
- return auctionDetails;
- }
-}
diff --git a/contracts/extensions/test/utils/forwarder_wrapper.ts b/contracts/extensions/test/utils/forwarder_wrapper.ts
deleted file mode 100644
index 4a43be04a..000000000
--- a/contracts/extensions/test/utils/forwarder_wrapper.ts
+++ /dev/null
@@ -1,124 +0,0 @@
-import { artifacts as protocolArtifacts } from '@0x/contracts-protocol';
-import { constants, formatters, LogDecoder, MarketSellOrders } from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TransactionReceiptWithDecodedLogs, TxDataPayable } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ForwarderContract } from '../../generated-wrappers/forwarder';
-import { artifacts } from '../../src/artifacts';
-
-export class ForwarderWrapper {
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _forwarderContract: ForwarderContract;
- private readonly _logDecoder: LogDecoder;
- public static getPercentageOfValue(value: BigNumber, percentage: number): BigNumber {
- const numerator = constants.PERCENTAGE_DENOMINATOR.times(percentage).dividedToIntegerBy(100);
- const newValue = value.times(numerator).dividedToIntegerBy(constants.PERCENTAGE_DENOMINATOR);
- return newValue;
- }
- public static getWethForFeeOrders(feeAmount: BigNumber, feeOrders: SignedOrder[]): BigNumber {
- let wethAmount = new BigNumber(0);
- let remainingFeeAmount = feeAmount;
- _.forEach(feeOrders, feeOrder => {
- const feeAvailable = feeOrder.makerAssetAmount.minus(feeOrder.takerFee);
- if (!remainingFeeAmount.isZero() && feeAvailable.gt(remainingFeeAmount)) {
- wethAmount = wethAmount.plus(
- feeOrder.takerAssetAmount
- .times(remainingFeeAmount)
- .dividedBy(feeAvailable)
- .integerValue(BigNumber.ROUND_CEIL),
- );
- remainingFeeAmount = new BigNumber(0);
- } else if (!remainingFeeAmount.isZero()) {
- wethAmount = wethAmount.plus(feeOrder.takerAssetAmount);
- remainingFeeAmount = remainingFeeAmount.minus(feeAvailable);
- }
- });
- return wethAmount;
- }
- private static _createOptimizedOrders(signedOrders: SignedOrder[]): MarketSellOrders {
- _.forEach(signedOrders, (signedOrder, index) => {
- signedOrder.takerAssetData = constants.NULL_BYTES;
- if (index > 0) {
- signedOrder.makerAssetData = constants.NULL_BYTES;
- }
- });
- const params = formatters.createMarketSellOrders(signedOrders, constants.ZERO_AMOUNT);
- return params;
- }
- private static _createOptimizedZrxOrders(signedOrders: SignedOrder[]): MarketSellOrders {
- _.forEach(signedOrders, signedOrder => {
- signedOrder.makerAssetData = constants.NULL_BYTES;
- signedOrder.takerAssetData = constants.NULL_BYTES;
- });
- const params = formatters.createMarketSellOrders(signedOrders, constants.ZERO_AMOUNT);
- return params;
- }
- constructor(contractInstance: ForwarderContract, provider: Provider) {
- this._forwarderContract = contractInstance;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, {
- ...artifacts,
- ...tokensArtifacts,
- ...protocolArtifacts,
- });
- }
- public async marketSellOrdersWithEthAsync(
- orders: SignedOrder[],
- feeOrders: SignedOrder[],
- txData: TxDataPayable,
- opts: { feePercentage?: BigNumber; feeRecipient?: string } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = ForwarderWrapper._createOptimizedOrders(orders);
- const feeParams = ForwarderWrapper._createOptimizedZrxOrders(feeOrders);
- const feePercentage = _.isUndefined(opts.feePercentage) ? constants.ZERO_AMOUNT : opts.feePercentage;
- const feeRecipient = _.isUndefined(opts.feeRecipient) ? constants.NULL_ADDRESS : opts.feeRecipient;
- const txHash = await this._forwarderContract.marketSellOrdersWithEth.sendTransactionAsync(
- params.orders,
- params.signatures,
- feeParams.orders,
- feeParams.signatures,
- feePercentage,
- feeRecipient,
- txData,
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async marketBuyOrdersWithEthAsync(
- orders: SignedOrder[],
- feeOrders: SignedOrder[],
- makerAssetFillAmount: BigNumber,
- txData: TxDataPayable,
- opts: { feePercentage?: BigNumber; feeRecipient?: string } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = ForwarderWrapper._createOptimizedOrders(orders);
- const feeParams = ForwarderWrapper._createOptimizedZrxOrders(feeOrders);
- const feePercentage = _.isUndefined(opts.feePercentage) ? constants.ZERO_AMOUNT : opts.feePercentage;
- const feeRecipient = _.isUndefined(opts.feeRecipient) ? constants.NULL_ADDRESS : opts.feeRecipient;
- const txHash = await this._forwarderContract.marketBuyOrdersWithEth.sendTransactionAsync(
- params.orders,
- makerAssetFillAmount,
- params.signatures,
- feeParams.orders,
- feeParams.signatures,
- feePercentage,
- feeRecipient,
- txData,
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async withdrawAssetAsync(
- assetData: string,
- amount: BigNumber,
- txData: TxDataPayable,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._forwarderContract.withdrawAsset.sendTransactionAsync(assetData, amount, txData);
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
-}
diff --git a/contracts/extensions/tsconfig.json b/contracts/extensions/tsconfig.json
deleted file mode 100644
index ed9b4fbe1..000000000
--- a/contracts/extensions/tsconfig.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/BalanceThresholdFilter.json",
- "./generated-artifacts/DutchAuction.json",
- "./generated-artifacts/Forwarder.json",
- "./generated-artifacts/OrderMatcher.json",
- "./generated-artifacts/OrderValidator.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/extensions/tslint.json b/contracts/extensions/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/extensions/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/interfaces/CHANGELOG.json b/contracts/interfaces/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/interfaces/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/interfaces/CHANGELOG.md b/contracts/interfaces/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/interfaces/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/interfaces/README.md b/contracts/interfaces/README.md
deleted file mode 100644
index 81dd4c3ac..000000000
--- a/contracts/interfaces/README.md
+++ /dev/null
@@ -1,72 +0,0 @@
-## Contract interfaces
-
-Smart contract interfaces of the 0x protocol.
-
-## Usage
-
-Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [protocol](./contracts/protocol)
- - This directory contains the contract interfaces that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
-
-## Bug bounty
-
-A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-interfaces yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-interfaces yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/interfaces/compiler.json b/contracts/interfaces/compiler.json
deleted file mode 100644
index 38a232541..000000000
--- a/contracts/interfaces/compiler.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": [
- "IAssetData",
- "IAssetProxy",
- "IAuthorizable",
- "IAssetProxyDispatcher",
- "IExchange",
- "IExchangeCore",
- "IMatchOrders",
- "ISignatureValidator",
- "ITransactions",
- "IValidator",
- "IWallet",
- "IWrapperFunctions"
- ]
-}
diff --git a/contracts/interfaces/contracts/protocol/AssetProxy/IAssetData.sol b/contracts/interfaces/contracts/protocol/AssetProxy/IAssetData.sol
deleted file mode 100644
index a130e615f..000000000
--- a/contracts/interfaces/contracts/protocol/AssetProxy/IAssetData.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-// solhint-disable
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-
-// @dev Interface of the asset proxy's assetData.
-// The asset proxies take an ABI encoded `bytes assetData` as argument.
-// This argument is ABI encoded as one of the methods of this interface.
-interface IAssetData {
-
- function ERC20Token(address tokenContract)
- external;
-
- function ERC721Token(
- address tokenContract,
- uint256 tokenId
- )
- external;
-
- function MultiAsset(
- uint256[] amounts,
- bytes[] nestedAssetData
- )
- external;
-
-}
diff --git a/contracts/interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol b/contracts/interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol
deleted file mode 100644
index 706412dd0..000000000
--- a/contracts/interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./IAuthorizable.sol";
-
-
-contract IAssetProxy is
- IAuthorizable
-{
- /// @dev Transfers assets. Either succeeds or throws.
- /// @param assetData Byte array encoded for the respective asset proxy.
- /// @param from Address to transfer asset from.
- /// @param to Address to transfer asset to.
- /// @param amount Amount of asset to transfer.
- function transferFrom(
- bytes assetData,
- address from,
- address to,
- uint256 amount
- )
- external;
-
- /// @dev Gets the proxy id associated with the proxy address.
- /// @return Proxy id.
- function getProxyId()
- external
- pure
- returns (bytes4);
-}
diff --git a/contracts/interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol b/contracts/interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol
deleted file mode 100644
index 202173998..000000000
--- a/contracts/interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/Ownable/IOwnable.sol";
-
-
-contract IAuthorizable is
- IOwnable
-{
- /// @dev Authorizes an address.
- /// @param target Address to authorize.
- function addAuthorizedAddress(address target)
- external;
-
- /// @dev Removes authorizion of an address.
- /// @param target Address to remove authorization from.
- function removeAuthorizedAddress(address target)
- external;
-
- /// @dev Removes authorizion of an address.
- /// @param target Address to remove authorization from.
- /// @param index Index of target in authorities array.
- function removeAuthorizedAddressAtIndex(
- address target,
- uint256 index
- )
- external;
-
- /// @dev Gets all authorized addresses.
- /// @return Array of authorized addresses.
- function getAuthorizedAddresses()
- external
- view
- returns (address[] memory);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol b/contracts/interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol
deleted file mode 100644
index b73881c07..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IAssetProxyDispatcher {
-
- /// @dev Registers an asset proxy to its asset proxy id.
- /// Once an asset proxy is registered, it cannot be unregistered.
- /// @param assetProxy Address of new asset proxy to register.
- function registerAssetProxy(address assetProxy)
- external;
-
- /// @dev Gets an asset proxy.
- /// @param assetProxyId Id of the asset proxy.
- /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.
- function getAssetProxy(bytes4 assetProxyId)
- external
- view
- returns (address);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IExchange.sol b/contracts/interfaces/contracts/protocol/Exchange/IExchange.sol
deleted file mode 100644
index 866e4c194..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IExchange.sol
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./IExchangeCore.sol";
-import "./IMatchOrders.sol";
-import "./ISignatureValidator.sol";
-import "./ITransactions.sol";
-import "./IAssetProxyDispatcher.sol";
-import "./IWrapperFunctions.sol";
-
-
-// solhint-disable no-empty-blocks
-contract IExchange is
- IExchangeCore,
- IMatchOrders,
- ISignatureValidator,
- ITransactions,
- IAssetProxyDispatcher,
- IWrapperFunctions
-{}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IExchangeCore.sol b/contracts/interfaces/contracts/protocol/Exchange/IExchangeCore.sol
deleted file mode 100644
index ab4a62408..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IExchangeCore.sol
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-
-
-contract IExchangeCore {
-
- /// @dev 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 Orders created with a salt less or equal to this value will be cancelled.
- function cancelOrdersUpTo(uint256 targetOrderEpoch)
- external;
-
- /// @dev Fills the input order.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- returns (LibFillResults.FillResults memory fillResults);
-
- /// @dev After calling, the order can not be filled anymore.
- /// @param order Order struct containing order specifications.
- function cancelOrder(LibOrder.Order memory order)
- public;
-
- /// @dev Gets information about an order: status, hash, and amount filled.
- /// @param order Order to gather information on.
- /// @return OrderInfo Information about the order and its state.
- /// See LibOrder.OrderInfo for a complete description.
- function getOrderInfo(LibOrder.Order memory order)
- public
- view
- returns (LibOrder.OrderInfo memory orderInfo);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IMatchOrders.sol b/contracts/interfaces/contracts/protocol/Exchange/IMatchOrders.sol
deleted file mode 100644
index 5df46ea80..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IMatchOrders.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-
-
-contract IMatchOrders {
-
- /// @dev 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 (who matched the two orders).
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftSignature Proof that order was created by the left maker.
- /// @param rightSignature Proof that order was created by the right maker.
- /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders.
- function matchOrders(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- bytes memory leftSignature,
- bytes memory rightSignature
- )
- public
- returns (LibFillResults.MatchedFillResults memory matchedFillResults);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/ISignatureValidator.sol b/contracts/interfaces/contracts/protocol/Exchange/ISignatureValidator.sol
deleted file mode 100644
index c5a4a57e1..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/ISignatureValidator.sol
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract ISignatureValidator {
-
- /// @dev 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 signerAddress Address that should have signed the given hash.
- /// @param signature Proof that the hash has been signed by signer.
- function preSign(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external;
-
- /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf.
- /// @param validatorAddress Address of Validator contract.
- /// @param approval Approval or disapproval of Validator contract.
- function setSignatureValidatorApproval(
- address validatorAddress,
- bool approval
- )
- external;
-
- /// @dev Verifies that a signature is valid.
- /// @param hash Message hash that is signed.
- /// @param signerAddress Address of signer.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes memory signature
- )
- public
- view
- returns (bool isValid);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/ITransactions.sol b/contracts/interfaces/contracts/protocol/Exchange/ITransactions.sol
deleted file mode 100644
index aaaee389f..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/ITransactions.sol
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-pragma solidity ^0.4.24;
-
-
-contract ITransactions {
-
- /// @dev Executes an exchange method call in the context of signer.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param data AbiV2 encoded calldata.
- /// @param signature Proof of signer transaction by signer.
- function executeTransaction(
- uint256 salt,
- address signerAddress,
- bytes data,
- bytes signature
- )
- external;
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IValidator.sol b/contracts/interfaces/contracts/protocol/Exchange/IValidator.sol
deleted file mode 100644
index d214e54dd..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IValidator.sol
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IValidator {
-
- /// @dev Verifies that a signature is valid.
- /// @param hash Message hash that is signed.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external
- view
- returns (bool isValid);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IWallet.sol b/contracts/interfaces/contracts/protocol/Exchange/IWallet.sol
deleted file mode 100644
index c2db4a5b1..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IWallet.sol
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IWallet {
-
- /// @dev Verifies that a signature is valid.
- /// @param hash Message hash that is signed.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- function isValidSignature(
- bytes32 hash,
- bytes signature
- )
- external
- view
- returns (bool isValid);
-}
diff --git a/contracts/interfaces/contracts/protocol/Exchange/IWrapperFunctions.sol b/contracts/interfaces/contracts/protocol/Exchange/IWrapperFunctions.sol
deleted file mode 100644
index 0eeaa874b..000000000
--- a/contracts/interfaces/contracts/protocol/Exchange/IWrapperFunctions.sol
+++ /dev/null
@@ -1,160 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-
-
-contract IWrapperFunctions {
-
- /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
- /// @param order LibOrder.Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- function fillOrKillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- returns (LibFillResults.FillResults memory fillResults);
-
- /// @dev Fills an order with specified parameters and ECDSA signature.
- /// Returns false if the transaction would otherwise revert.
- /// @param order LibOrder.Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderNoThrow(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- returns (LibFillResults.FillResults memory fillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrder.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function batchFillOrders(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrKill.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function batchFillOrKillOrders(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Fills an order with specified parameters and ECDSA signature.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function batchFillOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellOrders(
- LibOrder.Order[] memory orders,
- uint256 takerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256 takerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyOrders(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (LibFillResults.FillResults memory totalFillResults);
-
- /// @dev Synchronously cancels multiple orders in a single transaction.
- /// @param orders Array of order specifications.
- function batchCancelOrders(LibOrder.Order[] memory orders)
- public;
-
- /// @dev Fetches information for all passed in orders
- /// @param orders Array of order specifications.
- /// @return Array of OrderInfo instances that correspond to each order.
- function getOrdersInfo(LibOrder.Order[] memory orders)
- public
- view
- returns (LibOrder.OrderInfo[] memory);
-}
diff --git a/contracts/interfaces/package.json b/contracts/interfaces/package.json
deleted file mode 100644
index c67c25df3..000000000
--- a/contracts/interfaces/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "@0x/contracts-interfaces",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract interfaces of 0x protocol",
- "main": "lib/src/index.js",
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(IAssetData|IAssetProxy|IAuthorizable|IAssetProxyDispatcher|IExchange|IExchangeCore|IMatchOrders|ISignatureValidator|ITransactions|IValidator|IWallet|IWrapperFunctions).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/contracts/interfaces/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/tslint-config": "^2.0.2",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-libs": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/interfaces/src/artifacts/index.ts b/contracts/interfaces/src/artifacts/index.ts
deleted file mode 100644
index 5a2a37d8a..000000000
--- a/contracts/interfaces/src/artifacts/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as IAssetData from '../../generated-artifacts/IAssetData.json';
-import * as IAssetProxy from '../../generated-artifacts/IAssetProxy.json';
-import * as IAssetProxyDispatcher from '../../generated-artifacts/IAssetProxyDispatcher.json';
-import * as IAuthorizable from '../../generated-artifacts/IAuthorizable.json';
-import * as IExchange from '../../generated-artifacts/IExchange.json';
-import * as IExchangeCore from '../../generated-artifacts/IExchangeCore.json';
-import * as IMatchOrders from '../../generated-artifacts/IMatchOrders.json';
-import * as ISignatureValidator from '../../generated-artifacts/ISignatureValidator.json';
-import * as ITransactions from '../../generated-artifacts/ITransactions.json';
-import * as IValidator from '../../generated-artifacts/IValidator.json';
-import * as IWallet from '../../generated-artifacts/IWallet.json';
-import * as IWrapperFunctions from '../../generated-artifacts/IWrapperFunctions.json';
-
-export const artifacts = {
- IAssetProxyDispatcher: IAssetProxyDispatcher as ContractArtifact,
- IAuthorizable: IAuthorizable as ContractArtifact,
- IExchange: IExchange as ContractArtifact,
- IExchangeCore: IExchangeCore as ContractArtifact,
- IMatchOrders: IMatchOrders as ContractArtifact,
- ISignatureValidator: ISignatureValidator as ContractArtifact,
- ITransactions: ITransactions as ContractArtifact,
- IWrapperFunctions: IWrapperFunctions as ContractArtifact,
- IAssetData: IAssetData as ContractArtifact,
- IAssetProxy: IAssetProxy as ContractArtifact,
- IValidator: IValidator as ContractArtifact,
- IWallet: IWallet as ContractArtifact,
-};
diff --git a/contracts/interfaces/src/index.ts b/contracts/interfaces/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/interfaces/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/interfaces/src/wrappers/index.ts b/contracts/interfaces/src/wrappers/index.ts
deleted file mode 100644
index f7f72fada..000000000
--- a/contracts/interfaces/src/wrappers/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export * from '../../generated-wrappers/i_asset_data';
-export * from '../../generated-wrappers/i_asset_proxy';
-export * from '../../generated-wrappers/i_asset_proxy_dispatcher';
-export * from '../../generated-wrappers/i_exchange';
-export * from '../../generated-wrappers/i_exchange_core';
-export * from '../../generated-wrappers/i_match_orders';
-export * from '../../generated-wrappers/i_signature_validator';
-export * from '../../generated-wrappers/i_transactions';
-export * from '../../generated-wrappers/i_authorizable';
-export * from '../../generated-wrappers/i_wrapper_functions';
-export * from '../../generated-wrappers/i_validator';
-export * from '../../generated-wrappers/i_wallet';
diff --git a/contracts/interfaces/tsconfig.json b/contracts/interfaces/tsconfig.json
deleted file mode 100644
index 90b7d41bb..000000000
--- a/contracts/interfaces/tsconfig.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/IAssetData.json",
- "./generated-artifacts/IAssetProxy.json",
- "./generated-artifacts/IAuthorizable.json",
- "./generated-artifacts/IAssetProxyDispatcher.json",
- "./generated-artifacts/IExchange.json",
- "./generated-artifacts/IExchangeCore.json",
- "./generated-artifacts/IMatchOrders.json",
- "./generated-artifacts/ISignatureValidator.json",
- "./generated-artifacts/ITransactions.json",
- "./generated-artifacts/IValidator.json",
- "./generated-artifacts/IWallet.json",
- "./generated-artifacts/IWrapperFunctions.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/interfaces/tslint.json b/contracts/interfaces/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/interfaces/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/libs/CHANGELOG.json b/contracts/libs/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/libs/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/libs/CHANGELOG.md b/contracts/libs/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/libs/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/libs/README.md b/contracts/libs/README.md
deleted file mode 100644
index cfa631679..000000000
--- a/contracts/libs/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-## Contracts libs
-
-Smart contracts libs used in the 0x protocol.
-
-## Usage
-
-Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [libs](./contracts/protocol)
- - This directory contains the libs.
-- [test](./contracts/test)
- - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-libs yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-libs yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/libs/compiler.json b/contracts/libs/compiler.json
deleted file mode 100644
index 349d3063b..000000000
--- a/contracts/libs/compiler.json
+++ /dev/null
@@ -1,31 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": [
- "TestLibs",
- "LibOrder",
- "LibMath",
- "LibFillResults",
- "LibAbiEncoder",
- "LibEIP712",
- "LibAssetProxyErrors",
- "LibConstants"
- ]
-}
diff --git a/contracts/libs/contracts/libs/LibAbiEncoder.sol b/contracts/libs/contracts/libs/LibAbiEncoder.sol
deleted file mode 100644
index 5422bfeec..000000000
--- a/contracts/libs/contracts/libs/LibAbiEncoder.sol
+++ /dev/null
@@ -1,215 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "./LibOrder.sol";
-
-
-contract LibAbiEncoder {
-
- /// @dev ABI encodes calldata for `fillOrder`.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return ABI encoded calldata for `fillOrder`.
- function abiEncodeFillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- pure
- returns (bytes memory fillOrderCalldata)
- {
- // We need to call MExchangeCore.fillOrder using a delegatecall in
- // assembly so that we can intercept a call that throws. For this, we
- // need the input encoded in memory in the Ethereum ABIv2 format [1].
-
- // | Area | Offset | Length | Contents |
- // | -------- |--------|---------|-------------------------------------------- |
- // | Header | 0x00 | 4 | function selector |
- // | Params | | 3 * 32 | function parameters: |
- // | | 0x00 | | 1. offset to order (*) |
- // | | 0x20 | | 2. takerAssetFillAmount |
- // | | 0x40 | | 3. offset to signature (*) |
- // | Data | | 12 * 32 | order: |
- // | | 0x000 | | 1. senderAddress |
- // | | 0x020 | | 2. makerAddress |
- // | | 0x040 | | 3. takerAddress |
- // | | 0x060 | | 4. feeRecipientAddress |
- // | | 0x080 | | 5. makerAssetAmount |
- // | | 0x0A0 | | 6. takerAssetAmount |
- // | | 0x0C0 | | 7. makerFeeAmount |
- // | | 0x0E0 | | 8. takerFeeAmount |
- // | | 0x100 | | 9. expirationTimeSeconds |
- // | | 0x120 | | 10. salt |
- // | | 0x140 | | 11. Offset to makerAssetData (*) |
- // | | 0x160 | | 12. Offset to takerAssetData (*) |
- // | | 0x180 | 32 | makerAssetData Length |
- // | | 0x1A0 | ** | makerAssetData Contents |
- // | | 0x1C0 | 32 | takerAssetData Length |
- // | | 0x1E0 | ** | takerAssetData Contents |
- // | | 0x200 | 32 | signature Length |
- // | | 0x220 | ** | signature Contents |
-
- // * Offsets are calculated from the beginning of the current area: Header, Params, Data:
- // An offset stored in the Params area is calculated from the beginning of the Params section.
- // An offset stored in the Data area is calculated from the beginning of the Data section.
-
- // ** The length of dynamic array contents are stored in the field immediately preceeding the contents.
-
- // [1]: https://solidity.readthedocs.io/en/develop/abi-spec.html
-
- assembly {
-
- // Areas below may use the following variables:
- // 1. <area>Start -- Start of this area in memory
- // 2. <area>End -- End of this area in memory. This value may
- // be precomputed (before writing contents),
- // or it may be computed as contents are written.
- // 3. <area>Offset -- Current offset into area. If an area's End
- // is precomputed, this variable tracks the
- // offsets of contents as they are written.
-
- /////// Setup Header Area ///////
- // Load free memory pointer
- fillOrderCalldata := mload(0x40)
- // bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"))
- // = 0xb4be83d5
- // Leave 0x20 bytes to store the length
- mstore(add(fillOrderCalldata, 0x20), 0xb4be83d500000000000000000000000000000000000000000000000000000000)
- let headerAreaEnd := add(fillOrderCalldata, 0x24)
-
- /////// Setup Params Area ///////
- // This area is preallocated and written to later.
- // This is because we need to fill in offsets that have not yet been calculated.
- let paramsAreaStart := headerAreaEnd
- let paramsAreaEnd := add(paramsAreaStart, 0x60)
- let paramsAreaOffset := paramsAreaStart
-
- /////// Setup Data Area ///////
- let dataAreaStart := paramsAreaEnd
- let dataAreaEnd := dataAreaStart
-
- // Offset from the source data we're reading from
- let sourceOffset := order
- // arrayLenBytes and arrayLenWords track the length of a dynamically-allocated bytes array.
- let arrayLenBytes := 0
- let arrayLenWords := 0
-
- /////// Write order Struct ///////
- // Write memory location of Order, relative to the start of the
- // parameter list, then increment the paramsAreaOffset respectively.
- mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart))
- paramsAreaOffset := add(paramsAreaOffset, 0x20)
-
- // Write values for each field in the order
- // It would be nice to use a loop, but we save on gas by writing
- // the stores sequentially.
- mstore(dataAreaEnd, mload(sourceOffset)) // makerAddress
- mstore(add(dataAreaEnd, 0x20), mload(add(sourceOffset, 0x20))) // takerAddress
- mstore(add(dataAreaEnd, 0x40), mload(add(sourceOffset, 0x40))) // feeRecipientAddress
- mstore(add(dataAreaEnd, 0x60), mload(add(sourceOffset, 0x60))) // senderAddress
- mstore(add(dataAreaEnd, 0x80), mload(add(sourceOffset, 0x80))) // makerAssetAmount
- mstore(add(dataAreaEnd, 0xA0), mload(add(sourceOffset, 0xA0))) // takerAssetAmount
- mstore(add(dataAreaEnd, 0xC0), mload(add(sourceOffset, 0xC0))) // makerFeeAmount
- mstore(add(dataAreaEnd, 0xE0), mload(add(sourceOffset, 0xE0))) // takerFeeAmount
- mstore(add(dataAreaEnd, 0x100), mload(add(sourceOffset, 0x100))) // expirationTimeSeconds
- mstore(add(dataAreaEnd, 0x120), mload(add(sourceOffset, 0x120))) // salt
- mstore(add(dataAreaEnd, 0x140), mload(add(sourceOffset, 0x140))) // Offset to makerAssetData
- mstore(add(dataAreaEnd, 0x160), mload(add(sourceOffset, 0x160))) // Offset to takerAssetData
- dataAreaEnd := add(dataAreaEnd, 0x180)
- sourceOffset := add(sourceOffset, 0x180)
-
- // Write offset to <order.makerAssetData>
- mstore(add(dataAreaStart, mul(10, 0x20)), sub(dataAreaEnd, dataAreaStart))
-
- // Calculate length of <order.makerAssetData>
- sourceOffset := mload(add(order, 0x140)) // makerAssetData
- arrayLenBytes := mload(sourceOffset)
- sourceOffset := add(sourceOffset, 0x20)
- arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
-
- // Write length of <order.makerAssetData>
- mstore(dataAreaEnd, arrayLenBytes)
- dataAreaEnd := add(dataAreaEnd, 0x20)
-
- // Write contents of <order.makerAssetData>
- for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
- mstore(dataAreaEnd, mload(sourceOffset))
- dataAreaEnd := add(dataAreaEnd, 0x20)
- sourceOffset := add(sourceOffset, 0x20)
- }
-
- // Write offset to <order.takerAssetData>
- mstore(add(dataAreaStart, mul(11, 0x20)), sub(dataAreaEnd, dataAreaStart))
-
- // Calculate length of <order.takerAssetData>
- sourceOffset := mload(add(order, 0x160)) // takerAssetData
- arrayLenBytes := mload(sourceOffset)
- sourceOffset := add(sourceOffset, 0x20)
- arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
-
- // Write length of <order.takerAssetData>
- mstore(dataAreaEnd, arrayLenBytes)
- dataAreaEnd := add(dataAreaEnd, 0x20)
-
- // Write contents of <order.takerAssetData>
- for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
- mstore(dataAreaEnd, mload(sourceOffset))
- dataAreaEnd := add(dataAreaEnd, 0x20)
- sourceOffset := add(sourceOffset, 0x20)
- }
-
- /////// Write takerAssetFillAmount ///////
- mstore(paramsAreaOffset, takerAssetFillAmount)
- paramsAreaOffset := add(paramsAreaOffset, 0x20)
-
- /////// Write signature ///////
- // Write offset to paramsArea
- mstore(paramsAreaOffset, sub(dataAreaEnd, paramsAreaStart))
-
- // Calculate length of signature
- sourceOffset := signature
- arrayLenBytes := mload(sourceOffset)
- sourceOffset := add(sourceOffset, 0x20)
- arrayLenWords := div(add(arrayLenBytes, 0x1F), 0x20)
-
- // Write length of signature
- mstore(dataAreaEnd, arrayLenBytes)
- dataAreaEnd := add(dataAreaEnd, 0x20)
-
- // Write contents of signature
- for {let i := 0} lt(i, arrayLenWords) {i := add(i, 1)} {
- mstore(dataAreaEnd, mload(sourceOffset))
- dataAreaEnd := add(dataAreaEnd, 0x20)
- sourceOffset := add(sourceOffset, 0x20)
- }
-
- // Set length of calldata
- mstore(fillOrderCalldata, sub(dataAreaEnd, add(fillOrderCalldata, 0x20)))
-
- // Increment free memory pointer
- mstore(0x40, dataAreaEnd)
- }
-
- return fillOrderCalldata;
- }
-}
diff --git a/contracts/libs/contracts/libs/LibAddressArray.sol b/contracts/libs/contracts/libs/LibAddressArray.sol
deleted file mode 100644
index 997ce85fa..000000000
--- a/contracts/libs/contracts/libs/LibAddressArray.sol
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-library LibAddressArray {
-
- /// @dev Append a new address to an array of addresses.
- /// The `addressArray` may need to be reallocated to make space
- /// for the new address. Because of this we return the resulting
- /// memory location of `addressArray`.
- /// @param addressToAppend Address to append.
- /// @return Array of addresses: [... addressArray, addressToAppend]
- function append(address[] memory addressArray, address addressToAppend)
- internal pure
- returns (address[])
- {
- // Get stats on address array and free memory
- uint256 freeMemPtr = 0;
- uint256 addressArrayBeginPtr = 0;
- uint256 addressArrayEndPtr = 0;
- uint256 addressArrayLength = addressArray.length;
- uint256 addressArrayMemSizeInBytes = 32 + (32 * addressArrayLength);
- assembly {
- freeMemPtr := mload(0x40)
- addressArrayBeginPtr := addressArray
- addressArrayEndPtr := add(addressArray, addressArrayMemSizeInBytes)
- }
-
- // Cases for `freeMemPtr`:
- // `freeMemPtr` == `addressArrayEndPtr`: Nothing occupies memory after `addressArray`
- // `freeMemPtr` > `addressArrayEndPtr`: Some value occupies memory after `addressArray`
- // `freeMemPtr` < `addressArrayEndPtr`: Memory has not been managed properly.
- require(
- freeMemPtr >= addressArrayEndPtr,
- "INVALID_FREE_MEMORY_PTR"
- );
-
- // If free memory begins at the end of `addressArray`
- // then we can append `addressToAppend` directly.
- // Otherwise, we must copy the array to free memory
- // before appending new values to it.
- if (freeMemPtr > addressArrayEndPtr) {
- LibBytes.memCopy(freeMemPtr, addressArrayBeginPtr, addressArrayMemSizeInBytes);
- assembly {
- addressArray := freeMemPtr
- addressArrayBeginPtr := addressArray
- }
- }
-
- // Append `addressToAppend`
- addressArrayLength += 1;
- addressArrayMemSizeInBytes += 32;
- addressArrayEndPtr = addressArrayBeginPtr + addressArrayMemSizeInBytes;
- freeMemPtr = addressArrayEndPtr;
- assembly {
- // Store new array length
- mstore(addressArray, addressArrayLength)
-
- // Update `freeMemPtr`
- mstore(0x40, freeMemPtr)
- }
- addressArray[addressArrayLength - 1] = addressToAppend;
- return addressArray;
- }
-}
diff --git a/contracts/libs/contracts/libs/LibAssetProxyErrors.sol b/contracts/libs/contracts/libs/LibAssetProxyErrors.sol
deleted file mode 100644
index 96c48b5e3..000000000
--- a/contracts/libs/contracts/libs/LibAssetProxyErrors.sol
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-// solhint-disable
-pragma solidity ^0.4.24;
-
-
-/// @dev This contract documents the revert reasons used in the AssetProxy contracts.
-/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.
-contract LibAssetProxyErrors {
-
- /// Authorizable errors ///
- string constant SENDER_NOT_AUTHORIZED = "SENDER_NOT_AUTHORIZED"; // Sender not authorized to call this method.
- string constant TARGET_NOT_AUTHORIZED = "TARGET_NOT_AUTHORIZED"; // Target address not authorized to call this method.
- string constant TARGET_ALREADY_AUTHORIZED = "TARGET_ALREADY_AUTHORIZED"; // Target address must not already be authorized.
- string constant INDEX_OUT_OF_BOUNDS = "INDEX_OUT_OF_BOUNDS"; // Specified array index is out of bounds.
- string constant AUTHORIZED_ADDRESS_MISMATCH = "AUTHORIZED_ADDRESS_MISMATCH"; // Address at index does not match given target address.
-
- /// Transfer errors ///
- string constant INVALID_AMOUNT = "INVALID_AMOUNT"; // Transfer amount must equal 1.
- string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Transfer failed.
- string constant LENGTH_GREATER_THAN_131_REQUIRED = "LENGTH_GREATER_THAN_131_REQUIRED"; // Byte array must have a length greater than 0.
-}
diff --git a/contracts/libs/contracts/libs/LibConstants.sol b/contracts/libs/contracts/libs/LibConstants.sol
deleted file mode 100644
index 3efa3e1b3..000000000
--- a/contracts/libs/contracts/libs/LibConstants.sol
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-// solhint-disable max-line-length
-contract LibConstants {
-
- // Asset data for ZRX token. Used for fee transfers.
- // @TODO: Hardcode constant when we deploy. Currently
- // not constant to make testing easier.
-
- // The proxyId for ZRX_ASSET_DATA is bytes4(keccak256("ERC20Token(address)")) = 0xf47261b0
-
- // Kovan ZRX address is 0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570.
- // The ABI encoded proxyId and address is 0xf47261b00000000000000000000000006ff6c0ff1d68b964901f986d4c9fa3ac68346570
- // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xf6\xc0\xff\x1d\x68\xb9\x64\x90\x1f\x98\x6d\x4c\x9f\xa3\xac\x68\x34\x65\x70";
-
- // Mainnet ZRX address is 0xe41d2489571d322189246dafa5ebde1f4699f498.
- // The ABI encoded proxyId and address is 0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498
- // bytes constant public ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x1d\x24\x89\x57\x1d\x32\x21\x89\x24\x6d\xaf\xa5\xeb\xde\x1f\x46\x99\xf4\x98";
-
- // solhint-disable-next-line var-name-mixedcase
- bytes public ZRX_ASSET_DATA;
-
- // @TODO: Remove when we deploy.
- constructor (bytes memory zrxAssetData)
- public
- {
- ZRX_ASSET_DATA = zrxAssetData;
- }
-}
-// solhint-enable max-line-length
diff --git a/contracts/libs/contracts/libs/LibEIP712.sol b/contracts/libs/contracts/libs/LibEIP712.sol
deleted file mode 100644
index 3a85ab3c0..000000000
--- a/contracts/libs/contracts/libs/LibEIP712.sol
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract LibEIP712 {
-
- // EIP191 header for EIP712 prefix
- string constant internal EIP191_HEADER = "\x19\x01";
-
- // EIP712 Domain Name value
- string constant internal EIP712_DOMAIN_NAME = "0x Protocol";
-
- // EIP712 Domain Version value
- string constant internal EIP712_DOMAIN_VERSION = "2";
-
- // Hash of the EIP712 Domain Separator Schema
- bytes32 constant internal EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH = keccak256(abi.encodePacked(
- "EIP712Domain(",
- "string name,",
- "string version,",
- "address verifyingContract",
- ")"
- ));
-
- // Hash of the EIP712 Domain Separator data
- // solhint-disable-next-line var-name-mixedcase
- bytes32 public EIP712_DOMAIN_HASH;
-
- constructor ()
- public
- {
- EIP712_DOMAIN_HASH = keccak256(abi.encodePacked(
- EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH,
- keccak256(bytes(EIP712_DOMAIN_NAME)),
- keccak256(bytes(EIP712_DOMAIN_VERSION)),
- bytes32(address(this))
- ));
- }
-
- /// @dev Calculates EIP712 encoding for a hash struct in this EIP712 Domain.
- /// @param hashStruct The EIP712 hash struct.
- /// @return EIP712 hash applied to this EIP712 Domain.
- function hashEIP712Message(bytes32 hashStruct)
- internal
- view
- returns (bytes32 result)
- {
- bytes32 eip712DomainHash = EIP712_DOMAIN_HASH;
-
- // Assembly for more efficient computing:
- // keccak256(abi.encodePacked(
- // EIP191_HEADER,
- // EIP712_DOMAIN_HASH,
- // hashStruct
- // ));
-
- assembly {
- // Load free memory pointer
- let memPtr := mload(64)
-
- mstore(memPtr, 0x1901000000000000000000000000000000000000000000000000000000000000) // EIP191 header
- mstore(add(memPtr, 2), eip712DomainHash) // EIP712 domain hash
- mstore(add(memPtr, 34), hashStruct) // Hash of struct
-
- // Compute hash
- result := keccak256(memPtr, 66)
- }
- return result;
- }
-}
diff --git a/contracts/libs/contracts/libs/LibExchangeErrors.sol b/contracts/libs/contracts/libs/LibExchangeErrors.sol
deleted file mode 100644
index a160242c9..000000000
--- a/contracts/libs/contracts/libs/LibExchangeErrors.sol
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-// solhint-disable
-pragma solidity ^0.4.24;
-
-
-/// @dev This contract documents the revert reasons used in the Exchange contract.
-/// This contract is intended to serve as a reference, but is not actually used for efficiency reasons.
-contract LibExchangeErrors {
-
- /// Order validation errors ///
- string constant ORDER_UNFILLABLE = "ORDER_UNFILLABLE"; // Order cannot be filled.
- string constant INVALID_MAKER = "INVALID_MAKER"; // Invalid makerAddress.
- string constant INVALID_TAKER = "INVALID_TAKER"; // Invalid takerAddress.
- string constant INVALID_SENDER = "INVALID_SENDER"; // Invalid `msg.sender`.
- string constant INVALID_ORDER_SIGNATURE = "INVALID_ORDER_SIGNATURE"; // Signature validation failed.
-
- /// fillOrder validation errors ///
- string constant INVALID_TAKER_AMOUNT = "INVALID_TAKER_AMOUNT"; // takerAssetFillAmount cannot equal 0.
- string constant ROUNDING_ERROR = "ROUNDING_ERROR"; // Rounding error greater than 0.1% of takerAssetFillAmount.
-
- /// Signature validation errors ///
- string constant INVALID_SIGNATURE = "INVALID_SIGNATURE"; // Signature validation failed.
- string constant SIGNATURE_ILLEGAL = "SIGNATURE_ILLEGAL"; // Signature type is illegal.
- string constant SIGNATURE_UNSUPPORTED = "SIGNATURE_UNSUPPORTED"; // Signature type unsupported.
-
- /// cancelOrdersUptTo errors ///
- string constant INVALID_NEW_ORDER_EPOCH = "INVALID_NEW_ORDER_EPOCH"; // Specified salt must be greater than or equal to existing orderEpoch.
-
- /// fillOrKillOrder errors ///
- string constant COMPLETE_FILL_FAILED = "COMPLETE_FILL_FAILED"; // Desired takerAssetFillAmount could not be completely filled.
-
- /// matchOrders errors ///
- string constant NEGATIVE_SPREAD_REQUIRED = "NEGATIVE_SPREAD_REQUIRED"; // Matched orders must have a negative spread.
-
- /// Transaction errors ///
- string constant REENTRANCY_ILLEGAL = "REENTRANCY_ILLEGAL"; // Recursive reentrancy is not allowed.
- string constant INVALID_TX_HASH = "INVALID_TX_HASH"; // Transaction has already been executed.
- string constant INVALID_TX_SIGNATURE = "INVALID_TX_SIGNATURE"; // Signature validation failed.
- string constant FAILED_EXECUTION = "FAILED_EXECUTION"; // Transaction execution failed.
-
- /// registerAssetProxy errors ///
- string constant ASSET_PROXY_ALREADY_EXISTS = "ASSET_PROXY_ALREADY_EXISTS"; // AssetProxy with same id already exists.
-
- /// dispatchTransferFrom errors ///
- string constant ASSET_PROXY_DOES_NOT_EXIST = "ASSET_PROXY_DOES_NOT_EXIST"; // No assetProxy registered at given id.
- string constant TRANSFER_FAILED = "TRANSFER_FAILED"; // Asset transfer unsuccesful.
-
- /// Length validation errors ///
- string constant LENGTH_GREATER_THAN_0_REQUIRED = "LENGTH_GREATER_THAN_0_REQUIRED"; // Byte array must have a length greater than 0.
- string constant LENGTH_GREATER_THAN_3_REQUIRED = "LENGTH_GREATER_THAN_3_REQUIRED"; // Byte array must have a length greater than 3.
- string constant LENGTH_0_REQUIRED = "LENGTH_0_REQUIRED"; // Byte array must have a length of 0.
- string constant LENGTH_65_REQUIRED = "LENGTH_65_REQUIRED"; // Byte array must have a length of 65.
-}
diff --git a/contracts/libs/contracts/libs/LibExchangeSelectors.sol b/contracts/libs/contracts/libs/LibExchangeSelectors.sol
deleted file mode 100644
index 71640c609..000000000
--- a/contracts/libs/contracts/libs/LibExchangeSelectors.sol
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract LibExchangeSelectors {
-
- // solhint-disable max-line-length
- // allowedValidators
- bytes4 constant public ALLOWED_VALIDATORS_SELECTOR = 0x7b8e3514;
- bytes4 constant public ALLOWED_VALIDATORS_SELECTOR_GENERATOR = bytes4(keccak256("allowedValidators(address,address)"));
-
- // assetProxies
- bytes4 constant public ASSET_PROXIES_SELECTOR = 0x3fd3c997;
- bytes4 constant public ASSET_PROXIES_SELECTOR_GENERATOR = bytes4(keccak256("assetProxies(bytes4)"));
-
- // batchCancelOrders
- bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR = 0x4ac14782;
- bytes4 constant public BATCH_CANCEL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchCancelOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
-
- // batchFillOrKillOrders
- bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR = 0x4d0ae546;
- bytes4 constant public BATCH_FILL_OR_KILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrKillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
-
- // batchFillOrders
- bytes4 constant public BATCH_FILL_ORDERS_SELECTOR = 0x297bb70b;
- bytes4 constant public BATCH_FILL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
-
- // batchFillOrdersNoThrow
- bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR = 0x50dde190;
- bytes4 constant public BATCH_FILL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("batchFillOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256[],bytes[])"));
-
- // cancelOrder
- bytes4 constant public CANCEL_ORDER_SELECTOR = 0xd46b02c3;
- bytes4 constant public CANCEL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
-
- // cancelOrdersUpTo
- bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR = 0x4f9559b1;
- bytes4 constant public CANCEL_ORDERS_UP_TO_SELECTOR_GENERATOR = bytes4(keccak256("cancelOrdersUpTo(uint256)"));
-
- // cancelled
- bytes4 constant public CANCELLED_SELECTOR = 0x2ac12622;
- bytes4 constant public CANCELLED_SELECTOR_GENERATOR = bytes4(keccak256("cancelled(bytes32)"));
-
- // currentContextAddress
- bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR = 0xeea086ba;
- bytes4 constant public CURRENT_CONTEXT_ADDRESS_SELECTOR_GENERATOR = bytes4(keccak256("currentContextAddress()"));
-
- // executeTransaction
- bytes4 constant public EXECUTE_TRANSACTION_SELECTOR = 0xbfc8bfce;
- bytes4 constant public EXECUTE_TRANSACTION_SELECTOR_GENERATOR = bytes4(keccak256("executeTransaction(uint256,address,bytes,bytes)"));
-
- // fillOrKillOrder
- bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR = 0x64a3bc15;
- bytes4 constant public FILL_OR_KILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrKillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
-
- // fillOrder
- bytes4 constant public FILL_ORDER_SELECTOR = 0xb4be83d5;
- bytes4 constant public FILL_ORDER_SELECTOR_GENERATOR = bytes4(keccak256("fillOrder((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
-
- // fillOrderNoThrow
- bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR = 0x3e228bae;
- bytes4 constant public FILL_ORDER_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("fillOrderNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes),uint256,bytes)"));
-
- // filled
- bytes4 constant public FILLED_SELECTOR = 0x288cdc91;
- bytes4 constant public FILLED_SELECTOR_GENERATOR = bytes4(keccak256("filled(bytes32)"));
-
- // getAssetProxy
- bytes4 constant public GET_ASSET_PROXY_SELECTOR = 0x60704108;
- bytes4 constant public GET_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("getAssetProxy(bytes4)"));
-
- // getOrderInfo
- bytes4 constant public GET_ORDER_INFO_SELECTOR = 0xc75e0a81;
- bytes4 constant public GET_ORDER_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrderInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes))"));
-
- // getOrdersInfo
- bytes4 constant public GET_ORDERS_INFO_SELECTOR = 0x7e9d74dc;
- bytes4 constant public GET_ORDERS_INFO_SELECTOR_GENERATOR = bytes4(keccak256("getOrdersInfo((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[])"));
-
- // isValidSignature
- bytes4 constant public IS_VALID_SIGNATURE_SELECTOR = 0x93634702;
- bytes4 constant public IS_VALID_SIGNATURE_SELECTOR_GENERATOR = bytes4(keccak256("isValidSignature(bytes32,address,bytes)"));
-
- // marketBuyOrders
- bytes4 constant public MARKET_BUY_ORDERS_SELECTOR = 0xe5fa431b;
- bytes4 constant public MARKET_BUY_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
-
- // marketBuyOrdersNoThrow
- bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR = 0xa3e20380;
- bytes4 constant public MARKET_BUY_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketBuyOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
-
- // marketSellOrders
- bytes4 constant public MARKET_SELL_ORDERS_SELECTOR = 0x7e1d9808;
- bytes4 constant public MARKET_SELL_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrders((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
-
- // marketSellOrdersNoThrow
- bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR = 0xdd1c7d18;
- bytes4 constant public MARKET_SELL_ORDERS_NO_THROW_SELECTOR_GENERATOR = bytes4(keccak256("marketSellOrdersNoThrow((address,address,address,address,uint256,uint256,uint256,uint256,uint256,uint256,bytes,bytes)[],uint256,bytes[])"));
-
- // matchOrders
- bytes4 constant public MATCH_ORDERS_SELECTOR = 0x3c28d861;
- bytes4 constant public MATCH_ORDERS_SELECTOR_GENERATOR = bytes4(keccak256("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)"));
-
- // orderEpoch
- bytes4 constant public ORDER_EPOCH_SELECTOR = 0xd9bfa73e;
- bytes4 constant public ORDER_EPOCH_SELECTOR_GENERATOR = bytes4(keccak256("orderEpoch(address,address)"));
-
- // owner
- bytes4 constant public OWNER_SELECTOR = 0x8da5cb5b;
- bytes4 constant public OWNER_SELECTOR_GENERATOR = bytes4(keccak256("owner()"));
-
- // preSign
- bytes4 constant public PRE_SIGN_SELECTOR = 0x3683ef8e;
- bytes4 constant public PRE_SIGN_SELECTOR_GENERATOR = bytes4(keccak256("preSign(bytes32,address,bytes)"));
-
- // preSigned
- bytes4 constant public PRE_SIGNED_SELECTOR = 0x82c174d0;
- bytes4 constant public PRE_SIGNED_SELECTOR_GENERATOR = bytes4(keccak256("preSigned(bytes32,address)"));
-
- // registerAssetProxy
- bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR = 0xc585bb93;
- bytes4 constant public REGISTER_ASSET_PROXY_SELECTOR_GENERATOR = bytes4(keccak256("registerAssetProxy(address)"));
-
- // setSignatureValidatorApproval
- bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR = 0x77fcce68;
- bytes4 constant public SET_SIGNATURE_VALIDATOR_APPROVAL_SELECTOR_GENERATOR = bytes4(keccak256("setSignatureValidatorApproval(address,bool)"));
-
- // transactions
- bytes4 constant public TRANSACTIONS_SELECTOR = 0x642f2eaf;
- bytes4 constant public TRANSACTIONS_SELECTOR_GENERATOR = bytes4(keccak256("transactions(bytes32)"));
-
- // transferOwnership
- bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR = 0xf2fde38b;
- bytes4 constant public TRANSFER_OWNERSHIP_SELECTOR_GENERATOR = bytes4(keccak256("transferOwnership(address)"));
-} \ No newline at end of file
diff --git a/contracts/libs/contracts/libs/LibFillResults.sol b/contracts/libs/contracts/libs/LibFillResults.sol
deleted file mode 100644
index 74b7f7984..000000000
--- a/contracts/libs/contracts/libs/LibFillResults.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
-
-
-contract LibFillResults is
- SafeMath
-{
- struct FillResults {
- uint256 makerAssetFilledAmount; // Total amount of makerAsset(s) filled.
- uint256 takerAssetFilledAmount; // Total amount of takerAsset(s) filled.
- uint256 makerFeePaid; // Total amount of ZRX paid by maker(s) to feeRecipient(s).
- uint256 takerFeePaid; // Total amount of ZRX paid by taker to feeRecipients(s).
- }
-
- struct MatchedFillResults {
- FillResults left; // Amounts filled and fees paid of left order.
- FillResults right; // Amounts filled and fees paid of right order.
- uint256 leftMakerAssetSpreadAmount; // Spread between price of left and right order, denominated in the left order's makerAsset, paid to taker.
- }
-
- /// @dev Adds properties of both FillResults instances.
- /// Modifies the first FillResults instance specified.
- /// @param totalFillResults Fill results instance that will be added onto.
- /// @param singleFillResults Fill results instance that will be added to totalFillResults.
- function addFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)
- internal
- pure
- {
- totalFillResults.makerAssetFilledAmount = safeAdd(totalFillResults.makerAssetFilledAmount, singleFillResults.makerAssetFilledAmount);
- totalFillResults.takerAssetFilledAmount = safeAdd(totalFillResults.takerAssetFilledAmount, singleFillResults.takerAssetFilledAmount);
- totalFillResults.makerFeePaid = safeAdd(totalFillResults.makerFeePaid, singleFillResults.makerFeePaid);
- totalFillResults.takerFeePaid = safeAdd(totalFillResults.takerFeePaid, singleFillResults.takerFeePaid);
- }
-}
diff --git a/contracts/libs/contracts/libs/LibMath.sol b/contracts/libs/contracts/libs/LibMath.sol
deleted file mode 100644
index f14b1b34d..000000000
--- a/contracts/libs/contracts/libs/LibMath.sol
+++ /dev/null
@@ -1,253 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
-
-
-contract LibMath is
- SafeMath
-{
- /// @dev Calculates partial value given a numerator and denominator rounded down.
- /// Reverts if rounding error is >= 0.1%
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target rounded down.
- function safeGetPartialAmountFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (uint256 partialAmount)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- require(
- !isRoundingErrorFloor(
- numerator,
- denominator,
- target
- ),
- "ROUNDING_ERROR"
- );
-
- partialAmount = safeDiv(
- safeMul(numerator, target),
- denominator
- );
- return partialAmount;
- }
-
- /// @dev Calculates partial value given a numerator and denominator rounded down.
- /// Reverts if rounding error is >= 0.1%
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target rounded up.
- function safeGetPartialAmountCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (uint256 partialAmount)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- require(
- !isRoundingErrorCeil(
- numerator,
- denominator,
- target
- ),
- "ROUNDING_ERROR"
- );
-
- // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):
- // ceil(a / b) = floor((a + b - 1) / b)
- // To implement `ceil(a / b)` using safeDiv.
- partialAmount = safeDiv(
- safeAdd(
- safeMul(numerator, target),
- safeSub(denominator, 1)
- ),
- denominator
- );
- return partialAmount;
- }
-
- /// @dev Calculates partial value given a numerator and denominator rounded down.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target rounded down.
- function getPartialAmountFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (uint256 partialAmount)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- partialAmount = safeDiv(
- safeMul(numerator, target),
- denominator
- );
- return partialAmount;
- }
-
- /// @dev Calculates partial value given a numerator and denominator rounded down.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target rounded up.
- function getPartialAmountCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (uint256 partialAmount)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- // safeDiv computes `floor(a / b)`. We use the identity (a, b integer):
- // ceil(a / b) = floor((a + b - 1) / b)
- // To implement `ceil(a / b)` using safeDiv.
- partialAmount = safeDiv(
- safeAdd(
- safeMul(numerator, target),
- safeSub(denominator, 1)
- ),
- denominator
- );
- return partialAmount;
- }
-
- /// @dev Checks if rounding error >= 0.1% when rounding down.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to multiply with numerator/denominator.
- /// @return Rounding error is present.
- function isRoundingErrorFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (bool isError)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- // The absolute rounding error is the difference between the rounded
- // value and the ideal value. The relative rounding error is the
- // absolute rounding error divided by the absolute value of the
- // ideal value. This is undefined when the ideal value is zero.
- //
- // The ideal value is `numerator * target / denominator`.
- // Let's call `numerator * target % denominator` the remainder.
- // The absolute error is `remainder / denominator`.
- //
- // When the ideal value is zero, we require the absolute error to
- // be zero. Fortunately, this is always the case. The ideal value is
- // zero iff `numerator == 0` and/or `target == 0`. In this case the
- // remainder and absolute error are also zero.
- if (target == 0 || numerator == 0) {
- return false;
- }
-
- // Otherwise, we want the relative rounding error to be strictly
- // less than 0.1%.
- // The relative error is `remainder / (numerator * target)`.
- // We want the relative error less than 1 / 1000:
- // remainder / (numerator * denominator) < 1 / 1000
- // or equivalently:
- // 1000 * remainder < numerator * target
- // so we have a rounding error iff:
- // 1000 * remainder >= numerator * target
- uint256 remainder = mulmod(
- target,
- numerator,
- denominator
- );
- isError = safeMul(1000, remainder) >= safeMul(numerator, target);
- return isError;
- }
-
- /// @dev Checks if rounding error >= 0.1% when rounding up.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to multiply with numerator/denominator.
- /// @return Rounding error is present.
- function isRoundingErrorCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- internal
- pure
- returns (bool isError)
- {
- require(
- denominator > 0,
- "DIVISION_BY_ZERO"
- );
-
- // See the comments in `isRoundingError`.
- if (target == 0 || numerator == 0) {
- // When either is zero, the ideal value and rounded value are zero
- // and there is no rounding error. (Although the relative error
- // is undefined.)
- return false;
- }
- // Compute remainder as before
- uint256 remainder = mulmod(
- target,
- numerator,
- denominator
- );
- remainder = safeSub(denominator, remainder) % denominator;
- isError = safeMul(1000, remainder) >= safeMul(numerator, target);
- return isError;
- }
-}
diff --git a/contracts/libs/contracts/libs/LibOrder.sol b/contracts/libs/contracts/libs/LibOrder.sol
deleted file mode 100644
index fcf5da5fb..000000000
--- a/contracts/libs/contracts/libs/LibOrder.sol
+++ /dev/null
@@ -1,145 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./LibEIP712.sol";
-
-
-contract LibOrder is
- LibEIP712
-{
- // Hash for the EIP712 Order Schema
- bytes32 constant internal EIP712_ORDER_SCHEMA_HASH = keccak256(abi.encodePacked(
- "Order(",
- "address makerAddress,",
- "address takerAddress,",
- "address feeRecipientAddress,",
- "address senderAddress,",
- "uint256 makerAssetAmount,",
- "uint256 takerAssetAmount,",
- "uint256 makerFee,",
- "uint256 takerFee,",
- "uint256 expirationTimeSeconds,",
- "uint256 salt,",
- "bytes makerAssetData,",
- "bytes takerAssetData",
- ")"
- ));
-
- // A valid order remains fillable until it is expired, fully filled, or cancelled.
- // An order's state is unaffected by external factors, like account balances.
- enum OrderStatus {
- INVALID, // Default value
- INVALID_MAKER_ASSET_AMOUNT, // Order does not have a valid maker asset amount
- INVALID_TAKER_ASSET_AMOUNT, // Order does not have a valid taker asset amount
- FILLABLE, // Order is fillable
- EXPIRED, // Order has already expired
- FULLY_FILLED, // Order is fully filled
- CANCELLED // Order has been cancelled
- }
-
- // solhint-disable max-line-length
- struct Order {
- address makerAddress; // Address that created the order.
- address takerAddress; // Address that is allowed to fill the order. If set to 0, any address is allowed to fill the order.
- address feeRecipientAddress; // Address that will recieve fees when order is filled.
- address senderAddress; // Address that is allowed to call Exchange contract methods that affect this order. If set to 0, any address is allowed to call these methods.
- uint256 makerAssetAmount; // Amount of makerAsset being offered by maker. Must be greater than 0.
- uint256 takerAssetAmount; // Amount of takerAsset being bid on by maker. Must be greater than 0.
- uint256 makerFee; // Amount of ZRX paid to feeRecipient by maker when order is filled. If set to 0, no transfer of ZRX from maker to feeRecipient will be attempted.
- uint256 takerFee; // Amount of ZRX paid to feeRecipient by taker when order is filled. If set to 0, no transfer of ZRX from taker to feeRecipient will be attempted.
- uint256 expirationTimeSeconds; // Timestamp in seconds at which order expires.
- uint256 salt; // Arbitrary number to facilitate uniqueness of the order's hash.
- bytes makerAssetData; // Encoded data that can be decoded by a specified proxy contract when transferring makerAsset. The last byte references the id of this proxy.
- bytes takerAssetData; // Encoded data that can be decoded by a specified proxy contract when transferring takerAsset. The last byte references the id of this proxy.
- }
- // solhint-enable max-line-length
-
- struct OrderInfo {
- uint8 orderStatus; // Status that describes order's validity and fillability.
- bytes32 orderHash; // EIP712 hash of the order (see LibOrder.getOrderHash).
- uint256 orderTakerAssetFilledAmount; // Amount of order that has already been filled.
- }
-
- /// @dev Calculates Keccak-256 hash of the order.
- /// @param order The order structure.
- /// @return Keccak-256 EIP712 hash of the order.
- function getOrderHash(Order memory order)
- internal
- view
- returns (bytes32 orderHash)
- {
- orderHash = hashEIP712Message(hashOrder(order));
- return orderHash;
- }
-
- /// @dev Calculates EIP712 hash of the order.
- /// @param order The order structure.
- /// @return EIP712 hash of the order.
- function hashOrder(Order memory order)
- internal
- pure
- returns (bytes32 result)
- {
- bytes32 schemaHash = EIP712_ORDER_SCHEMA_HASH;
- bytes32 makerAssetDataHash = keccak256(order.makerAssetData);
- bytes32 takerAssetDataHash = keccak256(order.takerAssetData);
-
- // Assembly for more efficiently computing:
- // keccak256(abi.encodePacked(
- // EIP712_ORDER_SCHEMA_HASH,
- // bytes32(order.makerAddress),
- // bytes32(order.takerAddress),
- // bytes32(order.feeRecipientAddress),
- // bytes32(order.senderAddress),
- // order.makerAssetAmount,
- // order.takerAssetAmount,
- // order.makerFee,
- // order.takerFee,
- // order.expirationTimeSeconds,
- // order.salt,
- // keccak256(order.makerAssetData),
- // keccak256(order.takerAssetData)
- // ));
-
- assembly {
- // Calculate memory addresses that will be swapped out before hashing
- let pos1 := sub(order, 32)
- let pos2 := add(order, 320)
- let pos3 := add(order, 352)
-
- // Backup
- let temp1 := mload(pos1)
- let temp2 := mload(pos2)
- let temp3 := mload(pos3)
-
- // Hash in place
- mstore(pos1, schemaHash)
- mstore(pos2, makerAssetDataHash)
- mstore(pos3, takerAssetDataHash)
- result := keccak256(pos1, 416)
-
- // Restore
- mstore(pos1, temp1)
- mstore(pos2, temp2)
- mstore(pos3, temp3)
- }
- return result;
- }
-}
diff --git a/contracts/libs/contracts/test/TestLibs/TestLibs.sol b/contracts/libs/contracts/test/TestLibs/TestLibs.sol
deleted file mode 100644
index bd5f9f9da..000000000
--- a/contracts/libs/contracts/test/TestLibs/TestLibs.sol
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "../../libs/LibMath.sol";
-import "../../libs/LibOrder.sol";
-import "../../libs/LibFillResults.sol";
-import "../../libs/LibAbiEncoder.sol";
-
-
-contract TestLibs is
- LibMath,
- LibOrder,
- LibFillResults,
- LibAbiEncoder
-{
- function publicAbiEncodeFillOrder(
- Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- pure
- returns (bytes memory fillOrderCalldata)
- {
- fillOrderCalldata = abiEncodeFillOrder(
- order,
- takerAssetFillAmount,
- signature
- );
- return fillOrderCalldata;
- }
-
- function publicGetPartialAmountFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- partialAmount = getPartialAmountFloor(
- numerator,
- denominator,
- target
- );
- return partialAmount;
- }
-
- function publicGetPartialAmountCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- partialAmount = getPartialAmountCeil(
- numerator,
- denominator,
- target
- );
- return partialAmount;
- }
-
- function publicIsRoundingErrorFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (bool isError)
- {
- isError = isRoundingErrorFloor(
- numerator,
- denominator,
- target
- );
- return isError;
- }
-
- function publicIsRoundingErrorCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (bool isError)
- {
- isError = isRoundingErrorCeil(
- numerator,
- denominator,
- target
- );
- return isError;
- }
-
- function publicGetOrderHash(Order memory order)
- public
- view
- returns (bytes32 orderHash)
- {
- orderHash = getOrderHash(order);
- return orderHash;
- }
-
- function getOrderSchemaHash()
- public
- pure
- returns (bytes32)
- {
- return EIP712_ORDER_SCHEMA_HASH;
- }
-
- function getDomainSeparatorSchemaHash()
- public
- pure
- returns (bytes32)
- {
- return EIP712_DOMAIN_SEPARATOR_SCHEMA_HASH;
- }
-
- function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)
- public
- pure
- returns (FillResults memory)
- {
- addFillResults(totalFillResults, singleFillResults);
- return totalFillResults;
- }
-}
diff --git a/contracts/libs/package.json b/contracts/libs/package.json
deleted file mode 100644
index b28ec3774..000000000
--- a/contracts/libs/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "name": "@0x/contracts-libs",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract libs of 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(LibMath|LibOrder|LibFillResults|LibAbiEncoder|TestLibs|LibEIP712).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/contracts/libs/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-multisig": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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",
- "@types/js-combinatorics": "^0.5.29",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/libs/src/artifacts/index.ts b/contracts/libs/src/artifacts/index.ts
deleted file mode 100644
index 3955bbe2b..000000000
--- a/contracts/libs/src/artifacts/index.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as LibAbiEncoder from '../../generated-artifacts/LibAbiEncoder.json';
-import * as LibEIP721 from '../../generated-artifacts/LibEIP712.json';
-import * as LibFillResults from '../../generated-artifacts/LibFillResults.json';
-import * as LibMath from '../../generated-artifacts/LibMath.json';
-import * as LibOrder from '../../generated-artifacts/LibOrder.json';
-import * as TestLibs from '../../generated-artifacts/TestLibs.json';
-
-export const artifacts = {
- TestLibs: TestLibs as ContractArtifact,
- LibAbiEncoder: LibAbiEncoder as ContractArtifact,
- LibFillResults: LibFillResults as ContractArtifact,
- LibMath: LibMath as ContractArtifact,
- LibOrder: LibOrder as ContractArtifact,
- LibEIP721: LibEIP721 as ContractArtifact,
-};
diff --git a/contracts/libs/src/index.ts b/contracts/libs/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/libs/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/libs/src/wrappers/index.ts b/contracts/libs/src/wrappers/index.ts
deleted file mode 100644
index baaae6e34..000000000
--- a/contracts/libs/src/wrappers/index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export * from '../../generated-wrappers/test_libs';
-export * from '../../generated-wrappers/lib_abi_encoder';
-export * from '../../generated-wrappers/lib_fill_results';
-export * from '../../generated-wrappers/lib_math';
-export * from '../../generated-wrappers/lib_order';
-export * from '../../generated-wrappers/lib_e_i_p712';
diff --git a/contracts/libs/test/exchange/libs.ts b/contracts/libs/test/exchange/libs.ts
deleted file mode 100644
index 44ff6a844..000000000
--- a/contracts/libs/test/exchange/libs.ts
+++ /dev/null
@@ -1,125 +0,0 @@
-import {
- addressUtils,
- chaiSetup,
- constants,
- OrderFactory,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-
-import { TestLibsContract } from '../../generated-wrappers/test_libs';
-import { artifacts } from '../../src/artifacts';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('Exchange libs', () => {
- let signedOrder: SignedOrder;
- let orderFactory: OrderFactory;
- let libs: TestLibsContract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const makerAddress = accounts[0];
- libs = await TestLibsContract.deployFrom0xArtifactAsync(artifacts.TestLibs, provider, txDefaults);
-
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- exchangeAddress: libs.address,
- makerAddress,
- feeRecipientAddress: addressUtils.generatePseudoRandomAddress(),
- makerAssetData: assetDataUtils.encodeERC20AssetData(addressUtils.generatePseudoRandomAddress()),
- takerAssetData: assetDataUtils.encodeERC20AssetData(addressUtils.generatePseudoRandomAddress()),
- };
- const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- orderFactory = new OrderFactory(privateKey, defaultOrderParams);
- });
-
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- // Note(albrow): These tests are designed to be supplemental to the
- // combinatorial tests in test/exchange/internal. They test specific edge
- // cases that are not covered by the combinatorial tests.
- describe('LibMath', () => {
- describe('isRoundingError', () => {
- it('should return true if there is a rounding error of 0.1%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(999);
- const target = new BigNumber(50);
- // rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1%
- const isRoundingError = await libs.publicIsRoundingErrorFloor.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
- it('should return false if there is a rounding of 0.09%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(9991);
- const target = new BigNumber(500);
- // rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09%
- const isRoundingError = await libs.publicIsRoundingErrorFloor.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
- it('should return true if there is a rounding error of 0.11%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(9989);
- const target = new BigNumber(500);
- // rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011%
- const isRoundingError = await libs.publicIsRoundingErrorFloor.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
- });
- describe('isRoundingErrorCeil', () => {
- it('should return true if there is a rounding error of 0.1%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(1001);
- const target = new BigNumber(50);
- // rounding error = (ceil(20*50/1001) - (20*50/1001)) / (20*50/1001) = 0.1%
- const isRoundingError = await libs.publicIsRoundingErrorCeil.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
- it('should return false if there is a rounding of 0.09%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(10009);
- const target = new BigNumber(500);
- // rounding error = (ceil(20*500/10009) - (20*500/10009)) / (20*500/10009) = 0.09%
- const isRoundingError = await libs.publicIsRoundingErrorCeil.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
- it('should return true if there is a rounding error of 0.11%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(10011);
- const target = new BigNumber(500);
- // rounding error = (ceil(20*500/10011) - (20*500/10011)) / (20*500/10011) = 0.11%
- const isRoundingError = await libs.publicIsRoundingErrorCeil.callAsync(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
- });
- });
-
- describe('LibOrder', () => {
- describe('getOrderHash', () => {
- it('should output the correct orderHash', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- const orderHashHex = await libs.publicGetOrderHash.callAsync(signedOrder);
- expect(orderHashUtils.getOrderHashHex(signedOrder)).to.be.equal(orderHashHex);
- });
- });
- });
-});
diff --git a/contracts/libs/test/global_hooks.ts b/contracts/libs/test/global_hooks.ts
deleted file mode 100644
index f8ace376a..000000000
--- a/contracts/libs/test/global_hooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-before('start web3 provider', () => {
- provider.start();
-});
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/libs/tsconfig.json b/contracts/libs/tsconfig.json
deleted file mode 100644
index 27ca35085..000000000
--- a/contracts/libs/tsconfig.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/TestLibs.json",
- "./generated-artifacts/LibOrder.json",
- "./generated-artifacts/LibFillResults.json",
- "./generated-artifacts/LibAbiEncoder.json",
- "./generated-artifacts/LibEIP712.json",
- "./generated-artifacts/LibMath.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/libs/tslint.json b/contracts/libs/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/libs/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/multisig/CHANGELOG.json b/contracts/multisig/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/multisig/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/multisig/CHANGELOG.md b/contracts/multisig/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/multisig/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/multisig/README.md b/contracts/multisig/README.md
deleted file mode 100644
index e29f46251..000000000
--- a/contracts/multisig/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-## MultisSig Contracts
-
-MultiSig smart contracts
-
-## Usage
-
-Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [multisig](./contracts/multisig)
- - This directory contains the [Gnosis MultiSigWallet](https://github.com/gnosis/MultiSigWallet) and a custom extension that adds a timelock to transactions within the MultiSigWallet.
-- [test](./contracts/test)
- - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-multisig yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-multisig yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/multisig/compiler.json b/contracts/multisig/compiler.json
deleted file mode 100644
index 5a1f689e2..000000000
--- a/contracts/multisig/compiler.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": ["MultiSigWallet", "MultiSigWalletWithTimeLock", "TestRejectEther"]
-}
diff --git a/contracts/multisig/contracts/multisig/MultiSigWallet.sol b/contracts/multisig/contracts/multisig/MultiSigWallet.sol
deleted file mode 100644
index 516e7391c..000000000
--- a/contracts/multisig/contracts/multisig/MultiSigWallet.sol
+++ /dev/null
@@ -1,393 +0,0 @@
-// solhint-disable
-pragma solidity ^0.4.15;
-
-
-/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
-/// @author Stefan George - <stefan.george@consensys.net>
-contract MultiSigWallet {
-
- /*
- * Events
- */
- event Confirmation(address indexed sender, uint indexed transactionId);
- event Revocation(address indexed sender, uint indexed transactionId);
- event Submission(uint indexed transactionId);
- event Execution(uint indexed transactionId);
- event ExecutionFailure(uint indexed transactionId);
- event Deposit(address indexed sender, uint value);
- event OwnerAddition(address indexed owner);
- event OwnerRemoval(address indexed owner);
- event RequirementChange(uint required);
-
- /*
- * Constants
- */
- uint constant public MAX_OWNER_COUNT = 50;
-
- /*
- * Storage
- */
- mapping (uint => Transaction) public transactions;
- mapping (uint => mapping (address => bool)) public confirmations;
- mapping (address => bool) public isOwner;
- address[] public owners;
- uint public required;
- uint public transactionCount;
-
- struct Transaction {
- address destination;
- uint value;
- bytes data;
- bool executed;
- }
-
- /*
- * Modifiers
- */
- modifier onlyWallet() {
- require(msg.sender == address(this));
- _;
- }
-
- modifier ownerDoesNotExist(address owner) {
- require(!isOwner[owner]);
- _;
- }
-
- modifier ownerExists(address owner) {
- require(isOwner[owner]);
- _;
- }
-
- modifier transactionExists(uint transactionId) {
- require(transactions[transactionId].destination != 0);
- _;
- }
-
- modifier confirmed(uint transactionId, address owner) {
- require(confirmations[transactionId][owner]);
- _;
- }
-
- modifier notConfirmed(uint transactionId, address owner) {
- require(!confirmations[transactionId][owner]);
- _;
- }
-
- modifier notExecuted(uint transactionId) {
- require(!transactions[transactionId].executed);
- _;
- }
-
- modifier notNull(address _address) {
- require(_address != 0);
- _;
- }
-
- modifier validRequirement(uint ownerCount, uint _required) {
- require(ownerCount <= MAX_OWNER_COUNT
- && _required <= ownerCount
- && _required != 0
- && ownerCount != 0);
- _;
- }
-
- /// @dev Fallback function allows to deposit ether.
- function()
- payable
- {
- if (msg.value > 0)
- Deposit(msg.sender, msg.value);
- }
-
- /*
- * Public functions
- */
- /// @dev Contract constructor sets initial owners and required number of confirmations.
- /// @param _owners List of initial owners.
- /// @param _required Number of required confirmations.
- function MultiSigWallet(address[] _owners, uint _required)
- public
- validRequirement(_owners.length, _required)
- {
- for (uint i=0; i<_owners.length; i++) {
- require(!isOwner[_owners[i]] && _owners[i] != 0);
- isOwner[_owners[i]] = true;
- }
- owners = _owners;
- required = _required;
- }
-
- /// @dev Allows to add a new owner. Transaction has to be sent by wallet.
- /// @param owner Address of new owner.
- function addOwner(address owner)
- public
- onlyWallet
- ownerDoesNotExist(owner)
- notNull(owner)
- validRequirement(owners.length + 1, required)
- {
- isOwner[owner] = true;
- owners.push(owner);
- OwnerAddition(owner);
- }
-
- /// @dev Allows to remove an owner. Transaction has to be sent by wallet.
- /// @param owner Address of owner.
- function removeOwner(address owner)
- public
- onlyWallet
- ownerExists(owner)
- {
- isOwner[owner] = false;
- for (uint i=0; i<owners.length - 1; i++)
- if (owners[i] == owner) {
- owners[i] = owners[owners.length - 1];
- break;
- }
- owners.length -= 1;
- if (required > owners.length)
- changeRequirement(owners.length);
- OwnerRemoval(owner);
- }
-
- /// @dev Allows to replace an owner with a new owner. Transaction has to be sent by wallet.
- /// @param owner Address of owner to be replaced.
- /// @param newOwner Address of new owner.
- function replaceOwner(address owner, address newOwner)
- public
- onlyWallet
- ownerExists(owner)
- ownerDoesNotExist(newOwner)
- {
- for (uint i=0; i<owners.length; i++)
- if (owners[i] == owner) {
- owners[i] = newOwner;
- break;
- }
- isOwner[owner] = false;
- isOwner[newOwner] = true;
- OwnerRemoval(owner);
- OwnerAddition(newOwner);
- }
-
- /// @dev Allows to change the number of required confirmations. Transaction has to be sent by wallet.
- /// @param _required Number of required confirmations.
- function changeRequirement(uint _required)
- public
- onlyWallet
- validRequirement(owners.length, _required)
- {
- required = _required;
- RequirementChange(_required);
- }
-
- /// @dev Allows an owner to submit and confirm a transaction.
- /// @param destination Transaction target address.
- /// @param value Transaction ether value.
- /// @param data Transaction data payload.
- /// @return Returns transaction ID.
- function submitTransaction(address destination, uint value, bytes data)
- public
- returns (uint transactionId)
- {
- transactionId = addTransaction(destination, value, data);
- confirmTransaction(transactionId);
- }
-
- /// @dev Allows an owner to confirm a transaction.
- /// @param transactionId Transaction ID.
- function confirmTransaction(uint transactionId)
- public
- ownerExists(msg.sender)
- transactionExists(transactionId)
- notConfirmed(transactionId, msg.sender)
- {
- confirmations[transactionId][msg.sender] = true;
- Confirmation(msg.sender, transactionId);
- executeTransaction(transactionId);
- }
-
- /// @dev Allows an owner to revoke a confirmation for a transaction.
- /// @param transactionId Transaction ID.
- function revokeConfirmation(uint transactionId)
- public
- ownerExists(msg.sender)
- confirmed(transactionId, msg.sender)
- notExecuted(transactionId)
- {
- confirmations[transactionId][msg.sender] = false;
- Revocation(msg.sender, transactionId);
- }
-
- /// @dev Allows anyone to execute a confirmed transaction.
- /// @param transactionId Transaction ID.
- function executeTransaction(uint transactionId)
- public
- ownerExists(msg.sender)
- confirmed(transactionId, msg.sender)
- notExecuted(transactionId)
- {
- if (isConfirmed(transactionId)) {
- Transaction storage txn = transactions[transactionId];
- txn.executed = true;
- if (external_call(txn.destination, txn.value, txn.data.length, txn.data))
- Execution(transactionId);
- else {
- ExecutionFailure(transactionId);
- txn.executed = false;
- }
- }
- }
-
- // call has been separated into its own function in order to take advantage
- // of the Solidity's code generator to produce a loop that copies tx.data into memory.
- function external_call(address destination, uint value, uint dataLength, bytes data) internal returns (bool) {
- bool result;
- assembly {
- let x := mload(0x40) // "Allocate" memory for output (0x40 is where "free memory" pointer is stored by convention)
- let d := add(data, 32) // First 32 bytes are the padded length of data, so exclude that
- result := call(
- sub(gas, 34710), // 34710 is the value that solidity is currently emitting
- // It includes callGas (700) + callVeryLow (3, to pay for SUB) + callValueTransferGas (9000) +
- // callNewAccountGas (25000, in case the destination address does not exist and needs creating)
- destination,
- value,
- d,
- dataLength, // Size of the input (in bytes) - this is what fixes the padding problem
- x,
- 0 // Output is ignored, therefore the output size is zero
- )
- }
- return result;
- }
-
- /// @dev Returns the confirmation status of a transaction.
- /// @param transactionId Transaction ID.
- /// @return Confirmation status.
- function isConfirmed(uint transactionId)
- public
- constant
- returns (bool)
- {
- uint count = 0;
- for (uint i=0; i<owners.length; i++) {
- if (confirmations[transactionId][owners[i]])
- count += 1;
- if (count == required)
- return true;
- }
- }
-
- /*
- * Internal functions
- */
- /// @dev Adds a new transaction to the transaction mapping, if transaction does not exist yet.
- /// @param destination Transaction target address.
- /// @param value Transaction ether value.
- /// @param data Transaction data payload.
- /// @return Returns transaction ID.
- function addTransaction(address destination, uint value, bytes data)
- internal
- notNull(destination)
- returns (uint transactionId)
- {
- transactionId = transactionCount;
- transactions[transactionId] = Transaction({
- destination: destination,
- value: value,
- data: data,
- executed: false
- });
- transactionCount += 1;
- Submission(transactionId);
- }
-
- /*
- * Web3 call functions
- */
- /// @dev Returns number of confirmations of a transaction.
- /// @param transactionId Transaction ID.
- /// @return Number of confirmations.
- function getConfirmationCount(uint transactionId)
- public
- constant
- returns (uint count)
- {
- for (uint i=0; i<owners.length; i++)
- if (confirmations[transactionId][owners[i]])
- count += 1;
- }
-
- /// @dev Returns total number of transactions after filers are applied.
- /// @param pending Include pending transactions.
- /// @param executed Include executed transactions.
- /// @return Total number of transactions after filters are applied.
- function getTransactionCount(bool pending, bool executed)
- public
- constant
- returns (uint count)
- {
- for (uint i=0; i<transactionCount; i++)
- if ( pending && !transactions[i].executed
- || executed && transactions[i].executed)
- count += 1;
- }
-
- /// @dev Returns list of owners.
- /// @return List of owner addresses.
- function getOwners()
- public
- constant
- returns (address[])
- {
- return owners;
- }
-
- /// @dev Returns array with owner addresses, which confirmed transaction.
- /// @param transactionId Transaction ID.
- /// @return Returns array of owner addresses.
- function getConfirmations(uint transactionId)
- public
- constant
- returns (address[] _confirmations)
- {
- address[] memory confirmationsTemp = new address[](owners.length);
- uint count = 0;
- uint i;
- for (i=0; i<owners.length; i++)
- if (confirmations[transactionId][owners[i]]) {
- confirmationsTemp[count] = owners[i];
- count += 1;
- }
- _confirmations = new address[](count);
- for (i=0; i<count; i++)
- _confirmations[i] = confirmationsTemp[i];
- }
-
- /// @dev Returns list of transaction IDs in defined range.
- /// @param from Index start position of transaction array.
- /// @param to Index end position of transaction array.
- /// @param pending Include pending transactions.
- /// @param executed Include executed transactions.
- /// @return Returns array of transaction IDs.
- function getTransactionIds(uint from, uint to, bool pending, bool executed)
- public
- constant
- returns (uint[] _transactionIds)
- {
- uint[] memory transactionIdsTemp = new uint[](transactionCount);
- uint count = 0;
- uint i;
- for (i=0; i<transactionCount; i++)
- if ( pending && !transactions[i].executed
- || executed && transactions[i].executed)
- {
- transactionIdsTemp[count] = i;
- count += 1;
- }
- _transactionIds = new uint[](to - from);
- for (i=from; i<to; i++)
- _transactionIds[i - from] = transactionIdsTemp[i];
- }
-} \ No newline at end of file
diff --git a/contracts/multisig/contracts/multisig/MultiSigWalletWithTimeLock.sol b/contracts/multisig/contracts/multisig/MultiSigWalletWithTimeLock.sol
deleted file mode 100644
index 9513d3b30..000000000
--- a/contracts/multisig/contracts/multisig/MultiSigWalletWithTimeLock.sol
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "./MultiSigWallet.sol";
-
-
-/// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.
-/// @author Amir Bandeali - <amir@0xProject.com>
-// solhint-disable not-rely-on-time
-contract MultiSigWalletWithTimeLock is
- MultiSigWallet
-{
- event ConfirmationTimeSet(uint256 indexed transactionId, uint256 confirmationTime);
- event TimeLockChange(uint256 secondsTimeLocked);
-
- uint256 public secondsTimeLocked;
-
- mapping (uint256 => uint256) public confirmationTimes;
-
- modifier notFullyConfirmed(uint256 transactionId) {
- require(
- !isConfirmed(transactionId),
- "TX_FULLY_CONFIRMED"
- );
- _;
- }
-
- modifier fullyConfirmed(uint256 transactionId) {
- require(
- isConfirmed(transactionId),
- "TX_NOT_FULLY_CONFIRMED"
- );
- _;
- }
-
- modifier pastTimeLock(uint256 transactionId) {
- require(
- block.timestamp >= confirmationTimes[transactionId] + secondsTimeLocked,
- "TIME_LOCK_INCOMPLETE"
- );
- _;
- }
-
- /// @dev Contract constructor sets initial owners, required number of confirmations, and time lock.
- /// @param _owners List of initial owners.
- /// @param _required Number of required confirmations.
- /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.
- constructor (
- address[] _owners,
- uint256 _required,
- uint256 _secondsTimeLocked
- )
- public
- MultiSigWallet(_owners, _required)
- {
- secondsTimeLocked = _secondsTimeLocked;
- }
-
- /// @dev Changes the duration of the time lock for transactions.
- /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.
- function changeTimeLock(uint256 _secondsTimeLocked)
- public
- onlyWallet
- {
- secondsTimeLocked = _secondsTimeLocked;
- emit TimeLockChange(_secondsTimeLocked);
- }
-
- /// @dev Allows an owner to confirm a transaction.
- /// @param transactionId Transaction ID.
- function confirmTransaction(uint256 transactionId)
- public
- ownerExists(msg.sender)
- transactionExists(transactionId)
- notConfirmed(transactionId, msg.sender)
- notFullyConfirmed(transactionId)
- {
- confirmations[transactionId][msg.sender] = true;
- emit Confirmation(msg.sender, transactionId);
- if (isConfirmed(transactionId)) {
- setConfirmationTime(transactionId, block.timestamp);
- }
- }
-
- /// @dev Allows anyone to execute a confirmed transaction.
- /// @param transactionId Transaction ID.
- function executeTransaction(uint256 transactionId)
- public
- notExecuted(transactionId)
- fullyConfirmed(transactionId)
- pastTimeLock(transactionId)
- {
- Transaction storage txn = transactions[transactionId];
- txn.executed = true;
- if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) {
- emit Execution(transactionId);
- } else {
- emit ExecutionFailure(transactionId);
- txn.executed = false;
- }
- }
-
- /// @dev Sets the time of when a submission first passed.
- function setConfirmationTime(uint256 transactionId, uint256 confirmationTime)
- internal
- {
- confirmationTimes[transactionId] = confirmationTime;
- emit ConfirmationTimeSet(transactionId, confirmationTime);
- }
-}
diff --git a/contracts/multisig/contracts/test/TestRejectEther/TestRejectEther.sol b/contracts/multisig/contracts/test/TestRejectEther/TestRejectEther.sol
deleted file mode 100644
index e523f591d..000000000
--- a/contracts/multisig/contracts/test/TestRejectEther/TestRejectEther.sol
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-
-// solhint-disable no-empty-blocks
-contract TestRejectEther {}
diff --git a/contracts/multisig/package.json b/contracts/multisig/package.json
deleted file mode 100644
index 1c3911cbc..000000000
--- a/contracts/multisig/package.json
+++ /dev/null
@@ -1,84 +0,0 @@
-{
- "name": "@0x/contracts-multisig",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Multisig contracts used by 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-wrappers",
- "generate_contract_wrappers": "abi-gen --abis ${npm_package_config_abis} --template ../../packages/abi-gen-templates/contract.handlebars --partials '../../packages/abi-gen-templates/partials/**/*.handlebars' --output generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(MultiSigWallet|MultiSigWalletWithTimeLock|TestRejectEther).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/contracts/multisig/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/ethereumjs-abi": "^0.6.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.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",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@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",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/multisig/src/artifacts/index.ts b/contracts/multisig/src/artifacts/index.ts
deleted file mode 100644
index 7cf47be01..000000000
--- a/contracts/multisig/src/artifacts/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as MultiSigWallet from '../../generated-artifacts/MultiSigWallet.json';
-import * as MultiSigWalletWithTimeLock from '../../generated-artifacts/MultiSigWalletWithTimeLock.json';
-import * as TestRejectEther from '../../generated-artifacts/TestRejectEther.json';
-
-export const artifacts = {
- TestRejectEther: TestRejectEther as ContractArtifact,
- MultiSigWallet: MultiSigWallet as ContractArtifact,
- MultiSigWalletWithTimeLock: MultiSigWalletWithTimeLock as ContractArtifact,
-};
diff --git a/contracts/multisig/src/index.ts b/contracts/multisig/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/multisig/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/multisig/src/wrappers/index.ts b/contracts/multisig/src/wrappers/index.ts
deleted file mode 100644
index 69abd62f2..000000000
--- a/contracts/multisig/src/wrappers/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from '../../generated-wrappers/multi_sig_wallet';
-export * from '../../generated-wrappers/multi_sig_wallet_with_time_lock';
diff --git a/contracts/multisig/test/global_hooks.ts b/contracts/multisig/test/global_hooks.ts
deleted file mode 100644
index 68eb4f8d5..000000000
--- a/contracts/multisig/test/global_hooks.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-
-before('start web3 provider engine', () => {
- provider.start();
-});
-
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/multisig/test/multi_sig_with_time_lock.ts b/contracts/multisig/test/multi_sig_with_time_lock.ts
deleted file mode 100644
index 31c215505..000000000
--- a/contracts/multisig/test/multi_sig_with_time_lock.ts
+++ /dev/null
@@ -1,349 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- expectTransactionFailedWithoutReasonAsync,
- increaseTimeAndMineBlockAsync,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import {
- MultiSigWalletWithTimeLockConfirmationEventArgs,
- MultiSigWalletWithTimeLockConfirmationTimeSetEventArgs,
- MultiSigWalletWithTimeLockContract,
- MultiSigWalletWithTimeLockExecutionEventArgs,
- MultiSigWalletWithTimeLockExecutionFailureEventArgs,
- MultiSigWalletWithTimeLockSubmissionEventArgs,
-} from '../generated-wrappers/multi_sig_wallet_with_time_lock';
-import { TestRejectEtherContract } from '../generated-wrappers/test_reject_ether';
-import { artifacts } from '../src/artifacts';
-
-import { MultiSigWrapper } from './utils/multi_sig_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('MultiSigWalletWithTimeLock', () => {
- let owners: string[];
- let notOwner: string;
- const REQUIRED_APPROVALS = new BigNumber(2);
- const SECONDS_TIME_LOCKED = new BigNumber(1000000);
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- owners = [accounts[0], accounts[1], accounts[2]];
- notOwner = accounts[3];
- });
-
- let multiSig: MultiSigWalletWithTimeLockContract;
- let multiSigWrapper: MultiSigWrapper;
-
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('external_call', () => {
- it('should be internal', async () => {
- const secondsTimeLocked = new BigNumber(0);
- multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
- artifacts.MultiSigWalletWithTimeLock,
- provider,
- txDefaults,
- owners,
- REQUIRED_APPROVALS,
- secondsTimeLocked,
- );
- expect(_.isUndefined((multiSig as any).external_call)).to.be.equal(true);
- });
- });
- describe('confirmTransaction', () => {
- let txId: BigNumber;
- beforeEach(async () => {
- const secondsTimeLocked = new BigNumber(0);
- multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
- artifacts.MultiSigWalletWithTimeLock,
- provider,
- txDefaults,
- owners,
- REQUIRED_APPROVALS,
- secondsTimeLocked,
- );
- multiSigWrapper = new MultiSigWrapper(multiSig, provider);
- const destination = notOwner;
- const data = constants.NULL_BYTES;
- const txReceipt = await multiSigWrapper.submitTransactionAsync(destination, data, owners[0]);
- txId = (txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>).args
- .transactionId;
- });
- it('should revert if called by a non-owner', async () => {
- await expectTransactionFailedWithoutReasonAsync(multiSigWrapper.confirmTransactionAsync(txId, notOwner));
- });
- it('should revert if transaction does not exist', async () => {
- const nonexistentTxId = new BigNumber(123456789);
- await expectTransactionFailedWithoutReasonAsync(
- multiSigWrapper.confirmTransactionAsync(nonexistentTxId, owners[1]),
- );
- });
- it('should revert if transaction is already confirmed by caller', async () => {
- await expectTransactionFailedWithoutReasonAsync(multiSigWrapper.confirmTransactionAsync(txId, owners[0]));
- });
- it('should confirm transaction for caller and log a Confirmation event', async () => {
- const txReceipt = await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockConfirmationEventArgs>;
- expect(log.event).to.be.equal('Confirmation');
- expect(log.args.sender).to.be.equal(owners[1]);
- expect(log.args.transactionId).to.be.bignumber.equal(txId);
- });
- it('should revert if fully confirmed', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await expectTransactionFailedAsync(
- multiSigWrapper.confirmTransactionAsync(txId, owners[2]),
- RevertReason.TxFullyConfirmed,
- );
- });
- it('should set the confirmation time of the transaction if it becomes fully confirmed', async () => {
- const txReceipt = await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- const blockNum = await web3Wrapper.getBlockNumberAsync();
- const timestamp = new BigNumber(await web3Wrapper.getBlockTimestampAsync(blockNum));
- const log = txReceipt.logs[1] as LogWithDecodedArgs<MultiSigWalletWithTimeLockConfirmationTimeSetEventArgs>;
- expect(log.args.confirmationTime).to.be.bignumber.equal(timestamp);
- expect(log.args.transactionId).to.be.bignumber.equal(txId);
- });
- });
- describe('executeTransaction', () => {
- let txId: BigNumber;
- const secondsTimeLocked = new BigNumber(1000000);
- beforeEach(async () => {
- multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
- artifacts.MultiSigWalletWithTimeLock,
- provider,
- txDefaults,
- owners,
- REQUIRED_APPROVALS,
- secondsTimeLocked,
- );
- multiSigWrapper = new MultiSigWrapper(multiSig, provider);
- const destination = notOwner;
- const data = constants.NULL_BYTES;
- const txReceipt = await multiSigWrapper.submitTransactionAsync(destination, data, owners[0]);
- txId = (txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>).args
- .transactionId;
- });
- it('should revert if transaction has not been fully confirmed', async () => {
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- await expectTransactionFailedAsync(
- multiSigWrapper.executeTransactionAsync(txId, owners[1]),
- RevertReason.TxNotFullyConfirmed,
- );
- });
- it('should revert if time lock has not passed', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await expectTransactionFailedAsync(
- multiSigWrapper.executeTransactionAsync(txId, owners[1]),
- RevertReason.TimeLockIncomplete,
- );
- });
- it('should execute a transaction and log an Execution event if successful and called by owner', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- const txReceipt = await multiSigWrapper.executeTransactionAsync(txId, owners[1]);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockExecutionEventArgs>;
- expect(log.event).to.be.equal('Execution');
- expect(log.args.transactionId).to.be.bignumber.equal(txId);
- });
- it('should execute a transaction and log an Execution event if successful and called by non-owner', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- const txReceipt = await multiSigWrapper.executeTransactionAsync(txId, notOwner);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockExecutionEventArgs>;
- expect(log.event).to.be.equal('Execution');
- expect(log.args.transactionId).to.be.bignumber.equal(txId);
- });
- it('should revert if a required confirmation is revoked before executeTransaction is called', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- await multiSigWrapper.revokeConfirmationAsync(txId, owners[0]);
- await expectTransactionFailedAsync(
- multiSigWrapper.executeTransactionAsync(txId, owners[1]),
- RevertReason.TxNotFullyConfirmed,
- );
- });
- it('should revert if transaction has been executed', async () => {
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- const txReceipt = await multiSigWrapper.executeTransactionAsync(txId, owners[1]);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockExecutionEventArgs>;
- expect(log.args.transactionId).to.be.bignumber.equal(txId);
- await expectTransactionFailedWithoutReasonAsync(multiSigWrapper.executeTransactionAsync(txId, owners[1]));
- });
- it("should log an ExecutionFailure event and not update the transaction's execution state if unsuccessful", async () => {
- const contractWithoutFallback = await TestRejectEtherContract.deployFrom0xArtifactAsync(
- artifacts.TestRejectEther,
- provider,
- txDefaults,
- );
- const data = constants.NULL_BYTES;
- const value = new BigNumber(10);
- const submissionTxReceipt = await multiSigWrapper.submitTransactionAsync(
- contractWithoutFallback.address,
- data,
- owners[0],
- { value },
- );
- const newTxId = (submissionTxReceipt.logs[0] as LogWithDecodedArgs<
- MultiSigWalletWithTimeLockSubmissionEventArgs
- >).args.transactionId;
- await multiSigWrapper.confirmTransactionAsync(newTxId, owners[1]);
- await increaseTimeAndMineBlockAsync(secondsTimeLocked.toNumber());
- const txReceipt = await multiSigWrapper.executeTransactionAsync(newTxId, owners[1]);
- const executionFailureLog = txReceipt.logs[0] as LogWithDecodedArgs<
- MultiSigWalletWithTimeLockExecutionFailureEventArgs
- >;
- expect(executionFailureLog.event).to.be.equal('ExecutionFailure');
- expect(executionFailureLog.args.transactionId).to.be.bignumber.equal(newTxId);
- });
- });
- describe('changeTimeLock', () => {
- describe('initially non-time-locked', async () => {
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before('deploy a wallet', async () => {
- const secondsTimeLocked = new BigNumber(0);
- multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
- artifacts.MultiSigWalletWithTimeLock,
- provider,
- txDefaults,
- owners,
- REQUIRED_APPROVALS,
- secondsTimeLocked,
- );
- multiSigWrapper = new MultiSigWrapper(multiSig, provider);
- });
-
- it('should throw when not called by wallet', async () => {
- return expectTransactionFailedWithoutReasonAsync(
- multiSig.changeTimeLock.sendTransactionAsync(SECONDS_TIME_LOCKED, { from: owners[0] }),
- );
- });
-
- it('should throw without enough confirmations', async () => {
- const destination = multiSig.address;
- const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED);
- const res = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]);
- const log = res.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>;
- const txId = log.args.transactionId;
- return expectTransactionFailedAsync(
- multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }),
- RevertReason.TxNotFullyConfirmed,
- );
- });
-
- it('should set confirmation time with enough confirmations', async () => {
- const destination = multiSig.address;
- const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED);
- const subRes = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]);
- const subLog = subRes.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>;
- const txId = subLog.args.transactionId;
-
- const confirmRes = await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- expect(confirmRes.logs).to.have.length(2);
-
- const blockNum = await web3Wrapper.getBlockNumberAsync();
- const blockInfo = await web3Wrapper.getBlockIfExistsAsync(blockNum);
- if (_.isUndefined(blockInfo)) {
- throw new Error(`Unexpectedly failed to fetch block at #${blockNum}`);
- }
- const timestamp = new BigNumber(blockInfo.timestamp);
- const confirmationTimeBigNum = new BigNumber(await multiSig.confirmationTimes.callAsync(txId));
-
- expect(timestamp).to.be.bignumber.equal(confirmationTimeBigNum);
- });
-
- it('should be executable with enough confirmations and secondsTimeLocked of 0', async () => {
- const destination = multiSig.address;
- const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(SECONDS_TIME_LOCKED);
- const subRes = await multiSigWrapper.submitTransactionAsync(destination, changeTimeLockData, owners[0]);
- const subLog = subRes.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>;
- const txId = subLog.args.transactionId;
-
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- await multiSigWrapper.executeTransactionAsync(txId, owners[1]);
-
- const secondsTimeLocked = new BigNumber(await multiSig.secondsTimeLocked.callAsync());
- expect(secondsTimeLocked).to.be.bignumber.equal(SECONDS_TIME_LOCKED);
- });
- });
- describe('initially time-locked', async () => {
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- let txId: BigNumber;
- const newSecondsTimeLocked = new BigNumber(0);
- before('deploy a wallet, submit transaction to change timelock, and confirm the transaction', async () => {
- multiSig = await MultiSigWalletWithTimeLockContract.deployFrom0xArtifactAsync(
- artifacts.MultiSigWalletWithTimeLock,
- provider,
- txDefaults,
- owners,
- REQUIRED_APPROVALS,
- SECONDS_TIME_LOCKED,
- );
- multiSigWrapper = new MultiSigWrapper(multiSig, provider);
-
- const changeTimeLockData = multiSig.changeTimeLock.getABIEncodedTransactionData(newSecondsTimeLocked);
- const res = await multiSigWrapper.submitTransactionAsync(
- multiSig.address,
- changeTimeLockData,
- owners[0],
- );
- const log = res.logs[0] as LogWithDecodedArgs<MultiSigWalletWithTimeLockSubmissionEventArgs>;
- txId = log.args.transactionId;
- await multiSigWrapper.confirmTransactionAsync(txId, owners[1]);
- });
-
- it('should throw if it has enough confirmations but is not past the time lock', async () => {
- return expectTransactionFailedAsync(
- multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }),
- RevertReason.TimeLockIncomplete,
- );
- });
-
- it('should execute if it has enough confirmations and is past the time lock', async () => {
- await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber());
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiSig.executeTransaction.sendTransactionAsync(txId, { from: owners[0] }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const secondsTimeLocked = new BigNumber(await multiSig.secondsTimeLocked.callAsync());
- expect(secondsTimeLocked).to.be.bignumber.equal(newSecondsTimeLocked);
- });
- });
- });
-});
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/multisig/test/utils/multi_sig_wrapper.ts b/contracts/multisig/test/utils/multi_sig_wrapper.ts
deleted file mode 100644
index 086143613..000000000
--- a/contracts/multisig/test/utils/multi_sig_wrapper.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { LogDecoder } from '@0x/contracts-test-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { MultiSigWalletContract } from '../../generated-wrappers/multi_sig_wallet';
-import { artifacts } from '../../src/artifacts';
-
-export class MultiSigWrapper {
- private readonly _multiSig: MultiSigWalletContract;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _logDecoder: LogDecoder;
- constructor(multiSigContract: MultiSigWalletContract, provider: Provider) {
- this._multiSig = multiSigContract;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, artifacts);
- }
- public async submitTransactionAsync(
- destination: string,
- data: string,
- from: string,
- opts: { value?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const value = _.isUndefined(opts.value) ? new BigNumber(0) : opts.value;
- const txHash = await this._multiSig.submitTransaction.sendTransactionAsync(destination, value, data, {
- from,
- });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async confirmTransactionAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._multiSig.confirmTransaction.sendTransactionAsync(txId, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async revokeConfirmationAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._multiSig.revokeConfirmation.sendTransactionAsync(txId, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async executeTransactionAsync(
- txId: BigNumber,
- from: string,
- opts: { gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._multiSig.executeTransaction.sendTransactionAsync(txId, {
- from,
- gas: opts.gas,
- });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
-}
diff --git a/contracts/multisig/tsconfig.json b/contracts/multisig/tsconfig.json
deleted file mode 100644
index 6f381620e..000000000
--- a/contracts/multisig/tsconfig.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/MultiSigWallet.json",
- "./generated-artifacts/MultiSigWalletWithTimeLock.json",
- "./generated-artifacts/TestRejectEther.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/multisig/tslint.json b/contracts/multisig/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/multisig/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/protocol/CHANGELOG.json b/contracts/protocol/CHANGELOG.json
deleted file mode 100644
index 0d513cc17..000000000
--- a/contracts/protocol/CHANGELOG.json
+++ /dev/null
@@ -1,65 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "2.2.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "2.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "2.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.2.0",
- "changes": [
- {
- "note": "Added LibAddressArray",
- "pr": 1383
- },
- {
- "note": "Add validation and comments to MultiAssetProxy",
- "pr": 1455
- },
- {
- "note": "Move OrderValidator to extensions",
- "pr": 1464
- }
- ],
- "timestamp": 1547040760
- },
- {
- "timestamp": 1544741676,
- "version": "2.1.59",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/protocol/CHANGELOG.md b/contracts/protocol/CHANGELOG.md
deleted file mode 100644
index 779eb68a7..000000000
--- a/contracts/protocol/CHANGELOG.md
+++ /dev/null
@@ -1,28 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.2.3 - _January 17, 2019_
-
- * Dependencies updated
-
-## v2.2.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v2.2.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v2.2.0 - _January 9, 2019_
-
- * Added LibAddressArray (#1383)
- * Add validation and comments to MultiAssetProxy (#1455)
- * Move OrderValidator to extensions (#1464)
-
-## v2.1.59 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/protocol/DEPLOYS.json b/contracts/protocol/DEPLOYS.json
deleted file mode 100644
index 5c24ae59c..000000000
--- a/contracts/protocol/DEPLOYS.json
+++ /dev/null
@@ -1,92 +0,0 @@
-[
- {
- "name": "MultiAssetProxy",
- "version": "1.0.0",
- "changes": [
- {
- "note": "Add MultiAssetProxy implementation",
- "pr": 1224
- }
- ]
- },
- {
- "name": "OrderValidator",
- "version": "1.0.0",
- "changes": [
- {
- "note": "remove `getApproved` check from ERC721 approval query",
- "pr": 1149
- }
- ]
- },
- {
- "name": "OrderValidator",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x9463e518dea6810309563c81d5266c1b1d149138",
- "3": "0x90431a90516ab49af23a0530e04e8c7836e7122f",
- "42": "0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d"
- }
- }
- ]
- },
- {
- "name": "Exchange",
- "version": "2.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x4f833a24e1f95d70f028921e27040ca56e09ab0b",
- "3": "0x4530c0483a1633c7a1c97d2c53721caff2caaaaf",
- "42": "0x35dd2932454449b14cee11a94d3674a936d5d7b2"
- }
- }
- ]
- },
- {
- "name": "ERC20Proxy",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
- "3": "0xb1408f4c245a23c31b98d2c626777d4c0d766caa",
- "42": "0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e"
- }
- }
- ]
- },
- {
- "name": "ERC721Proxy",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x208e41fb445f1bb1b6780d58356e81405f3e6127",
- "3": "0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4",
- "42": "0x2a9127c745688a165106c11cd4d647d2220af821"
- }
- }
- ]
- },
- {
- "name": "AssetProxyOwner",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v2 deploy",
- "networks": {
- "1": "0x17992e4ffb22730138e4b62aaa6367fa9d3699a6",
- "3": "0xf5fa5b5fed2727a0e44ac67f6772e97977aa358b",
- "42": "0x2c824d2882baa668e0d5202b1e7f2922278703f8"
- }
- }
- ]
- }
-]
diff --git a/contracts/protocol/README.md b/contracts/protocol/README.md
deleted file mode 100644
index dc1f32c98..000000000
--- a/contracts/protocol/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-## Contracts
-
-Smart contracts that implement the 0x protocol. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [CHANGELOG](./CHANGELOG.json) of this package.
-
-## Usage
-
-Contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [protocol](./contracts/protocol)
- - This directory contains the contracts that make up version 2.0.0. A full specification can be found [here](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md).
-- [test](./contracts/test)
- - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
-
-## Bug bounty
-
-A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-protocol yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-protocol yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/protocol/compiler.json b/contracts/protocol/compiler.json
deleted file mode 100644
index 10e5bb0a1..000000000
--- a/contracts/protocol/compiler.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": [
- "AssetProxyOwner",
- "ERC20Proxy",
- "ERC721Proxy",
- "Exchange",
- "MixinAuthorizable",
- "MultiAssetProxy",
- "TestAssetProxyOwner",
- "TestAssetProxyDispatcher",
- "TestExchangeInternals",
- "TestSignatureValidator",
- "TestStaticCallReceiver"
- ]
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol b/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol
deleted file mode 100644
index 258443bca..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxy/ERC20Proxy.sol
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "./MixinAuthorizable.sol";
-
-
-contract ERC20Proxy is
- MixinAuthorizable
-{
- // Id of this proxy.
- bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC20Token(address)"));
-
- // solhint-disable-next-line payable-fallback
- function ()
- external
- {
- assembly {
- // The first 4 bytes of calldata holds the function selector
- let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)
-
- // `transferFrom` will be called with the following parameters:
- // assetData Encoded byte array.
- // from Address to transfer asset from.
- // to Address to transfer asset to.
- // amount Amount of asset to transfer.
- // bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
- if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {
-
- // To lookup a value in a mapping, we load from the storage location keccak256(k, p),
- // where k is the key left padded to 32 bytes and p is the storage slot
- let start := mload(64)
- mstore(start, and(caller, 0xffffffffffffffffffffffffffffffffffffffff))
- mstore(add(start, 32), authorized_slot)
-
- // Revert if authorized[msg.sender] == false
- if iszero(sload(keccak256(start, 64))) {
- // Revert with `Error("SENDER_NOT_AUTHORIZED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // `transferFrom`.
- // The function is marked `external`, so no abi decodeding is done for
- // us. Instead, we expect the `calldata` memory to contain the
- // following:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 4 * 32 | function parameters: |
- // | | 4 | | 1. offset to assetData (*) |
- // | | 36 | | 2. from |
- // | | 68 | | 3. to |
- // | | 100 | | 4. amount |
- // | Data | | | assetData: |
- // | | 132 | 32 | assetData Length |
- // | | 164 | ** | assetData Contents |
- //
- // (*): offset is computed from start of function parameters, so offset
- // by an additional 4 bytes in the calldata.
- //
- // (**): see table below to compute length of assetData Contents
- //
- // WARNING: The ABIv2 specification allows additional padding between
- // the Params and Data section. This will result in a larger
- // offset to assetData.
-
- // Asset data itself is encoded as follows:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 1 * 32 | function parameters: |
- // | | 4 | 12 + 20 | 1. token address |
-
- // We construct calldata for the `token.transferFrom` ABI.
- // The layout of this calldata is in the table below.
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 3 * 32 | function parameters: |
- // | | 4 | | 1. from |
- // | | 36 | | 2. to |
- // | | 68 | | 3. amount |
-
- /////// Read token address from calldata ///////
- // * The token address is stored in `assetData`.
- //
- // * The "offset to assetData" is stored at offset 4 in the calldata (table 1).
- // [assetDataOffsetFromParams = calldataload(4)]
- //
- // * Notes that the "offset to assetData" is relative to the "Params" area of calldata;
- // add 4 bytes to account for the length of the "Header" area (table 1).
- // [assetDataOffsetFromHeader = assetDataOffsetFromParams + 4]
- //
- // * The "token address" is offset 32+4=36 bytes into "assetData" (tables 1 & 2).
- // [tokenOffset = assetDataOffsetFromHeader + 36 = calldataload(4) + 4 + 36]
- let token := calldataload(add(calldataload(4), 40))
-
- /////// Setup Header Area ///////
- // This area holds the 4-byte `transferFrom` selector.
- // Any trailing data in transferFromSelector will be
- // overwritten in the next `mstore` call.
- mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
-
- /////// Setup Params Area ///////
- // We copy the fields `from`, `to` and `amount` in bulk
- // from our own calldata to the new calldata.
- calldatacopy(4, 36, 96)
-
- /////// Call `token.transferFrom` using the calldata ///////
- let success := call(
- gas, // forward all gas
- token, // call address of token contract
- 0, // don't send any ETH
- 0, // pointer to start of input
- 100, // length of input
- 0, // write output over input
- 32 // output size should be 32 bytes
- )
-
- /////// Check return data. ///////
- // If there is no return data, we assume the token incorrectly
- // does not return a bool. In this case we expect it to revert
- // on failure, which was handled above.
- // If the token does return data, we require that it is a single
- // nonzero 32 bytes value.
- // So the transfer succeeded if the call succeeded and either
- // returned nothing, or returned a non-zero 32 byte value.
- success := and(success, or(
- iszero(returndatasize),
- and(
- eq(returndatasize, 32),
- gt(mload(0), 0)
- )
- ))
- if success {
- return(0, 0)
- }
-
- // Revert with `Error("TRANSFER_FAILED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // Revert if undefined function is called
- revert(0, 0)
- }
- }
-
- /// @dev Gets the proxy id associated with the proxy address.
- /// @return Proxy id.
- function getProxyId()
- external
- pure
- returns (bytes4)
- {
- return PROXY_ID;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxy/ERC721Proxy.sol b/contracts/protocol/contracts/protocol/AssetProxy/ERC721Proxy.sol
deleted file mode 100644
index 65b664b8b..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxy/ERC721Proxy.sol
+++ /dev/null
@@ -1,171 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "./MixinAuthorizable.sol";
-
-
-contract ERC721Proxy is
- MixinAuthorizable
-{
- // Id of this proxy.
- bytes4 constant internal PROXY_ID = bytes4(keccak256("ERC721Token(address,uint256)"));
-
- // solhint-disable-next-line payable-fallback
- function ()
- external
- {
- assembly {
- // The first 4 bytes of calldata holds the function selector
- let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)
-
- // `transferFrom` will be called with the following parameters:
- // assetData Encoded byte array.
- // from Address to transfer asset from.
- // to Address to transfer asset to.
- // amount Amount of asset to transfer.
- // bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
- if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {
-
- // To lookup a value in a mapping, we load from the storage location keccak256(k, p),
- // where k is the key left padded to 32 bytes and p is the storage slot
- let start := mload(64)
- mstore(start, and(caller, 0xffffffffffffffffffffffffffffffffffffffff))
- mstore(add(start, 32), authorized_slot)
-
- // Revert if authorized[msg.sender] == false
- if iszero(sload(keccak256(start, 64))) {
- // Revert with `Error("SENDER_NOT_AUTHORIZED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // `transferFrom`.
- // The function is marked `external`, so no abi decodeding is done for
- // us. Instead, we expect the `calldata` memory to contain the
- // following:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 4 * 32 | function parameters: |
- // | | 4 | | 1. offset to assetData (*) |
- // | | 36 | | 2. from |
- // | | 68 | | 3. to |
- // | | 100 | | 4. amount |
- // | Data | | | assetData: |
- // | | 132 | 32 | assetData Length |
- // | | 164 | ** | assetData Contents |
- //
- // (*): offset is computed from start of function parameters, so offset
- // by an additional 4 bytes in the calldata.
- //
- // (**): see table below to compute length of assetData Contents
- //
- // WARNING: The ABIv2 specification allows additional padding between
- // the Params and Data section. This will result in a larger
- // offset to assetData.
-
- // Asset data itself is encoded as follows:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 2 * 32 | function parameters: |
- // | | 4 | 12 + 20 | 1. token address |
- // | | 36 | | 2. tokenId |
-
- // We construct calldata for the `token.transferFrom` ABI.
- // The layout of this calldata is in the table below.
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 3 * 32 | function parameters: |
- // | | 4 | | 1. from |
- // | | 36 | | 2. to |
- // | | 68 | | 3. tokenId |
-
- // There exists only 1 of each token.
- // require(amount == 1, "INVALID_AMOUNT")
- if sub(calldataload(100), 1) {
- // Revert with `Error("INVALID_AMOUNT")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000e494e56414c49445f414d4f554e540000000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- /////// Setup Header Area ///////
- // This area holds the 4-byte `transferFrom` selector.
- // Any trailing data in transferFromSelector will be
- // overwritten in the next `mstore` call.
- mstore(0, 0x23b872dd00000000000000000000000000000000000000000000000000000000)
-
- /////// Setup Params Area ///////
- // We copy the fields `from` and `to` in bulk
- // from our own calldata to the new calldata.
- calldatacopy(4, 36, 64)
-
- // Copy `tokenId` field from our own calldata to the new calldata.
- let assetDataOffset := calldataload(4)
- calldatacopy(68, add(assetDataOffset, 72), 32)
-
- /////// Call `token.transferFrom` using the calldata ///////
- let token := calldataload(add(assetDataOffset, 40))
- let success := call(
- gas, // forward all gas
- token, // call address of token contract
- 0, // don't send any ETH
- 0, // pointer to start of input
- 100, // length of input
- 0, // write output to null
- 0 // output size is 0 bytes
- )
- if success {
- return(0, 0)
- }
-
- // Revert with `Error("TRANSFER_FAILED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000f5452414e534645525f4641494c454400000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // Revert if undefined function is called
- revert(0, 0)
- }
- }
-
- /// @dev Gets the proxy id associated with the proxy address.
- /// @return Proxy id.
- function getProxyId()
- external
- pure
- returns (bytes4)
- {
- return PROXY_ID;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxy/MixinAuthorizable.sol b/contracts/protocol/contracts/protocol/AssetProxy/MixinAuthorizable.sol
deleted file mode 100644
index b610ef709..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxy/MixinAuthorizable.sol
+++ /dev/null
@@ -1,117 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "./mixins/MAuthorizable.sol";
-
-
-contract MixinAuthorizable is
- Ownable,
- MAuthorizable
-{
- /// @dev Only authorized addresses can invoke functions with this modifier.
- modifier onlyAuthorized {
- require(
- authorized[msg.sender],
- "SENDER_NOT_AUTHORIZED"
- );
- _;
- }
-
- mapping (address => bool) public authorized;
- address[] public authorities;
-
- /// @dev Authorizes an address.
- /// @param target Address to authorize.
- function addAuthorizedAddress(address target)
- external
- onlyOwner
- {
- require(
- !authorized[target],
- "TARGET_ALREADY_AUTHORIZED"
- );
-
- authorized[target] = true;
- authorities.push(target);
- emit AuthorizedAddressAdded(target, msg.sender);
- }
-
- /// @dev Removes authorizion of an address.
- /// @param target Address to remove authorization from.
- function removeAuthorizedAddress(address target)
- external
- onlyOwner
- {
- require(
- authorized[target],
- "TARGET_NOT_AUTHORIZED"
- );
-
- delete authorized[target];
- for (uint256 i = 0; i < authorities.length; i++) {
- if (authorities[i] == target) {
- authorities[i] = authorities[authorities.length - 1];
- authorities.length -= 1;
- break;
- }
- }
- emit AuthorizedAddressRemoved(target, msg.sender);
- }
-
- /// @dev Removes authorizion of an address.
- /// @param target Address to remove authorization from.
- /// @param index Index of target in authorities array.
- function removeAuthorizedAddressAtIndex(
- address target,
- uint256 index
- )
- external
- onlyOwner
- {
- require(
- authorized[target],
- "TARGET_NOT_AUTHORIZED"
- );
- require(
- index < authorities.length,
- "INDEX_OUT_OF_BOUNDS"
- );
- require(
- authorities[index] == target,
- "AUTHORIZED_ADDRESS_MISMATCH"
- );
-
- delete authorized[target];
- authorities[index] = authorities[authorities.length - 1];
- authorities.length -= 1;
- emit AuthorizedAddressRemoved(target, msg.sender);
- }
-
- /// @dev Gets all authorized addresses.
- /// @return Array of authorized addresses.
- function getAuthorizedAddresses()
- external
- view
- returns (address[] memory)
- {
- return authorities;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxy/MultiAssetProxy.sol b/contracts/protocol/contracts/protocol/AssetProxy/MultiAssetProxy.sol
deleted file mode 100644
index 5f559163c..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxy/MultiAssetProxy.sol
+++ /dev/null
@@ -1,306 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../Exchange/MixinAssetProxyDispatcher.sol";
-import "./MixinAuthorizable.sol";
-
-
-contract MultiAssetProxy is
- MixinAssetProxyDispatcher,
- MixinAuthorizable
-{
- // Id of this proxy.
- bytes4 constant internal PROXY_ID = bytes4(keccak256("MultiAsset(uint256[],bytes[])"));
-
- // solhint-disable-next-line payable-fallback
- function ()
- external
- {
- // NOTE: The below assembly assumes that clients do some input validation and that the input is properly encoded according to the AbiV2 specification.
- // It is technically possible for inputs with very large lengths and offsets to cause overflows. However, this would make the calldata prohibitively
- // expensive and we therefore do not check for overflows in these scenarios.
- assembly {
- // The first 4 bytes of calldata holds the function selector
- let selector := and(calldataload(0), 0xffffffff00000000000000000000000000000000000000000000000000000000)
-
- // `transferFrom` will be called with the following parameters:
- // assetData Encoded byte array.
- // from Address to transfer asset from.
- // to Address to transfer asset to.
- // amount Amount of asset to transfer.
- // bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
- if eq(selector, 0xa85e59e400000000000000000000000000000000000000000000000000000000) {
-
- // To lookup a value in a mapping, we load from the storage location keccak256(k, p),
- // where k is the key left padded to 32 bytes and p is the storage slot
- mstore(0, caller)
- mstore(32, authorized_slot)
-
- // Revert if authorized[msg.sender] == false
- if iszero(sload(keccak256(0, 64))) {
- // Revert with `Error("SENDER_NOT_AUTHORIZED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001553454e4445525f4e4f545f415554484f52495a454400000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // `transferFrom`.
- // The function is marked `external`, so no abi decoding is done for
- // us. Instead, we expect the `calldata` memory to contain the
- // following:
- //
- // | Area | Offset | Length | Contents |
- // |----------|--------|---------|-------------------------------------|
- // | Header | 0 | 4 | function selector |
- // | Params | | 4 * 32 | function parameters: |
- // | | 4 | | 1. offset to assetData (*) |
- // | | 36 | | 2. from |
- // | | 68 | | 3. to |
- // | | 100 | | 4. amount |
- // | Data | | | assetData: |
- // | | 132 | 32 | assetData Length |
- // | | 164 | ** | assetData Contents |
- //
- // (*): offset is computed from start of function parameters, so offset
- // by an additional 4 bytes in the calldata.
- //
- // (**): see table below to compute length of assetData Contents
- //
- // WARNING: The ABIv2 specification allows additional padding between
- // the Params and Data section. This will result in a larger
- // offset to assetData.
-
- // Load offset to `assetData`
- let assetDataOffset := calldataload(4)
-
- // Asset data itself is encoded as follows:
- //
- // | Area | Offset | Length | Contents |
- // |----------|-------------|---------|-------------------------------------|
- // | Header | 0 | 4 | assetProxyId |
- // | Params | | 2 * 32 | function parameters: |
- // | | 4 | | 1. offset to amounts (*) |
- // | | 36 | | 2. offset to nestedAssetData (*) |
- // | Data | | | amounts: |
- // | | 68 | 32 | amounts Length |
- // | | 100 | a | amounts Contents |
- // | | | | nestedAssetData: |
- // | | 100 + a | 32 | nestedAssetData Length |
- // | | 132 + a | b | nestedAssetData Contents (offsets) |
- // | | 132 + a + b | | nestedAssetData[0, ..., len] |
-
- // In order to find the offset to `amounts`, we must add:
- // 4 (function selector)
- // + assetDataOffset
- // + 32 (assetData len)
- // + 4 (assetProxyId)
- let amountsOffset := calldataload(add(assetDataOffset, 40))
-
- // In order to find the offset to `nestedAssetData`, we must add:
- // 4 (function selector)
- // + assetDataOffset
- // + 32 (assetData len)
- // + 4 (assetProxyId)
- // + 32 (amounts offset)
- let nestedAssetDataOffset := calldataload(add(assetDataOffset, 72))
-
- // In order to find the start of the `amounts` contents, we must add:
- // 4 (function selector)
- // + assetDataOffset
- // + 32 (assetData len)
- // + 4 (assetProxyId)
- // + amountsOffset
- // + 32 (amounts len)
- let amountsContentsStart := add(assetDataOffset, add(amountsOffset, 72))
-
- // Load number of elements in `amounts`
- let amountsLen := calldataload(sub(amountsContentsStart, 32))
-
- // In order to find the start of the `nestedAssetData` contents, we must add:
- // 4 (function selector)
- // + assetDataOffset
- // + 32 (assetData len)
- // + 4 (assetProxyId)
- // + nestedAssetDataOffset
- // + 32 (nestedAssetData len)
- let nestedAssetDataContentsStart := add(assetDataOffset, add(nestedAssetDataOffset, 72))
-
- // Load number of elements in `nestedAssetData`
- let nestedAssetDataLen := calldataload(sub(nestedAssetDataContentsStart, 32))
-
- // Revert if number of elements in `amounts` differs from number of elements in `nestedAssetData`
- if sub(amountsLen, nestedAssetDataLen) {
- // Revert with `Error("LENGTH_MISMATCH")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000f4c454e4754485f4d49534d4154434800000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // Copy `transferFrom` selector, offset to `assetData`, `from`, and `to` from calldata to memory
- calldatacopy(
- 0, // memory can safely be overwritten from beginning
- 0, // start of calldata
- 100 // length of selector (4) and 3 params (32 * 3)
- )
-
- // Overwrite existing offset to `assetData` with our own
- mstore(4, 128)
-
- // Load `amount`
- let amount := calldataload(100)
-
- // Calculate number of bytes in `amounts` contents
- let amountsByteLen := mul(amountsLen, 32)
-
- // Initialize `assetProxyId` and `assetProxy` to 0
- let assetProxyId := 0
- let assetProxy := 0
-
- // Loop through `amounts` and `nestedAssetData`, calling `transferFrom` for each respective element
- for {let i := 0} lt(i, amountsByteLen) {i := add(i, 32)} {
-
- // Calculate the total amount
- let amountsElement := calldataload(add(amountsContentsStart, i))
- let totalAmount := mul(amountsElement, amount)
-
- // Revert if `amount` != 0 and multiplication resulted in an overflow
- if iszero(or(
- iszero(amount),
- eq(div(totalAmount, amount), amountsElement)
- )) {
- // Revert with `Error("UINT256_OVERFLOW")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001055494e543235365f4f564552464c4f57000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // Write `totalAmount` to memory
- mstore(100, totalAmount)
-
- // Load offset to `nestedAssetData[i]`
- let nestedAssetDataElementOffset := calldataload(add(nestedAssetDataContentsStart, i))
-
- // In order to find the start of the `nestedAssetData[i]` contents, we must add:
- // 4 (function selector)
- // + assetDataOffset
- // + 32 (assetData len)
- // + 4 (assetProxyId)
- // + nestedAssetDataOffset
- // + 32 (nestedAssetData len)
- // + nestedAssetDataElementOffset
- // + 32 (nestedAssetDataElement len)
- let nestedAssetDataElementContentsStart := add(assetDataOffset, add(nestedAssetDataOffset, add(nestedAssetDataElementOffset, 104)))
-
- // Load length of `nestedAssetData[i]`
- let nestedAssetDataElementLenStart := sub(nestedAssetDataElementContentsStart, 32)
- let nestedAssetDataElementLen := calldataload(nestedAssetDataElementLenStart)
-
- // Revert if the `nestedAssetData` does not contain a 4 byte `assetProxyId`
- if lt(nestedAssetDataElementLen, 4) {
- // Revert with `Error("LENGTH_GREATER_THAN_3_REQUIRED")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001e4c454e4754485f475245415445525f5448414e5f335f524551554952)
- mstore(96, 0x4544000000000000000000000000000000000000000000000000000000000000)
- revert(0, 100)
- }
-
- // Load AssetProxy id
- let currentAssetProxyId := and(
- calldataload(nestedAssetDataElementContentsStart),
- 0xffffffff00000000000000000000000000000000000000000000000000000000
- )
-
- // Only load `assetProxy` if `currentAssetProxyId` does not equal `assetProxyId`
- // We do not need to check if `currentAssetProxyId` is 0 since `assetProxy` is also initialized to 0
- if sub(currentAssetProxyId, assetProxyId) {
- // Update `assetProxyId`
- assetProxyId := currentAssetProxyId
- // To lookup a value in a mapping, we load from the storage location keccak256(k, p),
- // where k is the key left padded to 32 bytes and p is the storage slot
- mstore(132, assetProxyId)
- mstore(164, assetProxies_slot)
- assetProxy := sload(keccak256(132, 64))
- }
-
- // Revert if AssetProxy with given id does not exist
- if iszero(assetProxy) {
- // Revert with `Error("ASSET_PROXY_DOES_NOT_EXIST")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000001a41535345545f50524f58595f444f45535f4e4f545f45584953540000)
- mstore(96, 0)
- revert(0, 100)
- }
-
- // Copy `nestedAssetData[i]` from calldata to memory
- calldatacopy(
- 132, // memory slot after `amounts[i]`
- nestedAssetDataElementLenStart, // location of `nestedAssetData[i]` in calldata
- add(nestedAssetDataElementLen, 32) // `nestedAssetData[i].length` plus 32 byte length
- )
-
- // call `assetProxy.transferFrom`
- let success := call(
- gas, // forward all gas
- assetProxy, // call address of asset proxy
- 0, // don't send any ETH
- 0, // pointer to start of input
- add(164, nestedAssetDataElementLen), // length of input
- 0, // write output over memory that won't be reused
- 0 // don't copy output to memory
- )
-
- // Revert with reason given by AssetProxy if `transferFrom` call failed
- if iszero(success) {
- returndatacopy(
- 0, // copy to memory at 0
- 0, // copy from return data at 0
- returndatasize() // copy all return data
- )
- revert(0, returndatasize())
- }
- }
-
- // Return if no `transferFrom` calls reverted
- return(0, 0)
- }
-
- // Revert if undefined function is called
- revert(0, 0)
- }
- }
-
- /// @dev Gets the proxy id associated with the proxy address.
- /// @return Proxy id.
- function getProxyId()
- external
- pure
- returns (bytes4)
- {
- return PROXY_ID;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxy/mixins/MAuthorizable.sol b/contracts/protocol/contracts/protocol/AssetProxy/mixins/MAuthorizable.sol
deleted file mode 100644
index 6c3f70500..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxy/mixins/MAuthorizable.sol
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/AssetProxy/IAuthorizable.sol";
-
-
-contract MAuthorizable is
- IAuthorizable
-{
- // Event logged when a new address is authorized.
- event AuthorizedAddressAdded(
- address indexed target,
- address indexed caller
- );
-
- // Event logged when a currently authorized address is unauthorized.
- event AuthorizedAddressRemoved(
- address indexed target,
- address indexed caller
- );
-
- /// @dev Only authorized addresses can invoke functions with this modifier.
- modifier onlyAuthorized { revert(); _; }
-}
diff --git a/contracts/protocol/contracts/protocol/AssetProxyOwner/AssetProxyOwner.sol b/contracts/protocol/contracts/protocol/AssetProxyOwner/AssetProxyOwner.sol
deleted file mode 100644
index bfc7b5a66..000000000
--- a/contracts/protocol/contracts/protocol/AssetProxyOwner/AssetProxyOwner.sol
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-multisig/contracts/multisig/MultiSigWalletWithTimeLock.sol";
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-contract AssetProxyOwner is
- MultiSigWalletWithTimeLock
-{
- using LibBytes for bytes;
-
- event AssetProxyRegistration(address assetProxyContract, bool isRegistered);
-
- // Mapping of AssetProxy contract address =>
- // if this contract is allowed to call the AssetProxy's `removeAuthorizedAddressAtIndex` method without a time lock.
- mapping (address => bool) public isAssetProxyRegistered;
-
- bytes4 constant internal REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR = bytes4(keccak256("removeAuthorizedAddressAtIndex(address,uint256)"));
-
- /// @dev Function will revert if the transaction does not call `removeAuthorizedAddressAtIndex`
- /// on an approved AssetProxy contract.
- modifier validRemoveAuthorizedAddressAtIndexTx(uint256 transactionId) {
- Transaction storage txn = transactions[transactionId];
- require(
- isAssetProxyRegistered[txn.destination],
- "UNREGISTERED_ASSET_PROXY"
- );
- require(
- txn.data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR,
- "INVALID_FUNCTION_SELECTOR"
- );
- _;
- }
-
- /// @dev Contract constructor sets initial owners, required number of confirmations,
- /// time lock, and list of AssetProxy addresses.
- /// @param _owners List of initial owners.
- /// @param _assetProxyContracts Array of AssetProxy contract addresses.
- /// @param _required Number of required confirmations.
- /// @param _secondsTimeLocked Duration needed after a transaction is confirmed and before it becomes executable, in seconds.
- constructor (
- address[] memory _owners,
- address[] memory _assetProxyContracts,
- uint256 _required,
- uint256 _secondsTimeLocked
- )
- public
- MultiSigWalletWithTimeLock(_owners, _required, _secondsTimeLocked)
- {
- for (uint256 i = 0; i < _assetProxyContracts.length; i++) {
- address assetProxy = _assetProxyContracts[i];
- require(
- assetProxy != address(0),
- "INVALID_ASSET_PROXY"
- );
- isAssetProxyRegistered[assetProxy] = true;
- }
- }
-
- /// @dev Registers or deregisters an AssetProxy to be able to execute
- /// `removeAuthorizedAddressAtIndex` without a timelock.
- /// @param assetProxyContract Address of AssetProxy contract.
- /// @param isRegistered Status of approval for AssetProxy contract.
- function registerAssetProxy(address assetProxyContract, bool isRegistered)
- public
- onlyWallet
- notNull(assetProxyContract)
- {
- isAssetProxyRegistered[assetProxyContract] = isRegistered;
- emit AssetProxyRegistration(assetProxyContract, isRegistered);
- }
-
- /// @dev Allows execution of `removeAuthorizedAddressAtIndex` without time lock.
- /// @param transactionId Transaction ID.
- function executeRemoveAuthorizedAddressAtIndex(uint256 transactionId)
- public
- notExecuted(transactionId)
- fullyConfirmed(transactionId)
- validRemoveAuthorizedAddressAtIndexTx(transactionId)
- {
- Transaction storage txn = transactions[transactionId];
- txn.executed = true;
- if (external_call(txn.destination, txn.value, txn.data.length, txn.data)) {
- emit Execution(transactionId);
- } else {
- emit ExecutionFailure(transactionId);
- txn.executed = false;
- }
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/Exchange.sol b/contracts/protocol/contracts/protocol/Exchange/Exchange.sol
deleted file mode 100644
index 65ca742ea..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/Exchange.sol
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibConstants.sol";
-import "./MixinExchangeCore.sol";
-import "./MixinSignatureValidator.sol";
-import "./MixinWrapperFunctions.sol";
-import "./MixinAssetProxyDispatcher.sol";
-import "./MixinTransactions.sol";
-import "./MixinMatchOrders.sol";
-
-
-// solhint-disable no-empty-blocks
-contract Exchange is
- MixinExchangeCore,
- MixinMatchOrders,
- MixinSignatureValidator,
- MixinTransactions,
- MixinAssetProxyDispatcher,
- MixinWrapperFunctions
-{
- string constant public VERSION = "2.0.1-alpha";
-
- // Mixins are instantiated in the order they are inherited
- constructor (bytes memory _zrxAssetData)
- public
- LibConstants(_zrxAssetData) // @TODO: Remove when we deploy.
- MixinExchangeCore()
- MixinMatchOrders()
- MixinSignatureValidator()
- MixinTransactions()
- MixinAssetProxyDispatcher()
- MixinWrapperFunctions()
- {}
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinAssetProxyDispatcher.sol b/contracts/protocol/contracts/protocol/Exchange/MixinAssetProxyDispatcher.sol
deleted file mode 100644
index 2922a8c1a..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinAssetProxyDispatcher.sol
+++ /dev/null
@@ -1,174 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "./mixins/MAssetProxyDispatcher.sol";
-import "@0x/contracts-interfaces/contracts/protocol/AssetProxy/IAssetProxy.sol";
-
-
-contract MixinAssetProxyDispatcher is
- Ownable,
- MAssetProxyDispatcher
-{
- // Mapping from Asset Proxy Id's to their respective Asset Proxy
- mapping (bytes4 => IAssetProxy) public assetProxies;
-
- /// @dev Registers an asset proxy to its asset proxy id.
- /// Once an asset proxy is registered, it cannot be unregistered.
- /// @param assetProxy Address of new asset proxy to register.
- function registerAssetProxy(address assetProxy)
- external
- onlyOwner
- {
- IAssetProxy assetProxyContract = IAssetProxy(assetProxy);
-
- // Ensure that no asset proxy exists with current id.
- bytes4 assetProxyId = assetProxyContract.getProxyId();
- address currentAssetProxy = assetProxies[assetProxyId];
- require(
- currentAssetProxy == address(0),
- "ASSET_PROXY_ALREADY_EXISTS"
- );
-
- // Add asset proxy and log registration.
- assetProxies[assetProxyId] = assetProxyContract;
- emit AssetProxyRegistered(
- assetProxyId,
- assetProxy
- );
- }
-
- /// @dev Gets an asset proxy.
- /// @param assetProxyId Id of the asset proxy.
- /// @return The asset proxy registered to assetProxyId. Returns 0x0 if no proxy is registered.
- function getAssetProxy(bytes4 assetProxyId)
- external
- view
- returns (address)
- {
- return assetProxies[assetProxyId];
- }
-
- /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws.
- /// @param assetData Byte array encoded for the asset.
- /// @param from Address to transfer token from.
- /// @param to Address to transfer token to.
- /// @param amount Amount of token to transfer.
- function dispatchTransferFrom(
- bytes memory assetData,
- address from,
- address to,
- uint256 amount
- )
- internal
- {
- // Do nothing if no amount should be transferred.
- if (amount > 0 && from != to) {
- // Ensure assetData length is valid
- require(
- assetData.length > 3,
- "LENGTH_GREATER_THAN_3_REQUIRED"
- );
-
- // Lookup assetProxy. We do not use `LibBytes.readBytes4` for gas efficiency reasons.
- bytes4 assetProxyId;
- assembly {
- assetProxyId := and(mload(
- add(assetData, 32)),
- 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000
- )
- }
- address assetProxy = assetProxies[assetProxyId];
-
- // Ensure that assetProxy exists
- require(
- assetProxy != address(0),
- "ASSET_PROXY_DOES_NOT_EXIST"
- );
-
- // We construct calldata for the `assetProxy.transferFrom` ABI.
- // The layout of this calldata is in the table below.
- //
- // | Area | Offset | Length | Contents |
- // | -------- |--------|---------|-------------------------------------------- |
- // | Header | 0 | 4 | function selector |
- // | Params | | 4 * 32 | function parameters: |
- // | | 4 | | 1. offset to assetData (*) |
- // | | 36 | | 2. from |
- // | | 68 | | 3. to |
- // | | 100 | | 4. amount |
- // | Data | | | assetData: |
- // | | 132 | 32 | assetData Length |
- // | | 164 | ** | assetData Contents |
-
- assembly {
- /////// Setup State ///////
- // `cdStart` is the start of the calldata for `assetProxy.transferFrom` (equal to free memory ptr).
- let cdStart := mload(64)
- // `dataAreaLength` is the total number of words needed to store `assetData`
- // As-per the ABI spec, this value is padded up to the nearest multiple of 32,
- // and includes 32-bytes for length.
- let dataAreaLength := and(add(mload(assetData), 63), 0xFFFFFFFFFFFE0)
- // `cdEnd` is the end of the calldata for `assetProxy.transferFrom`.
- let cdEnd := add(cdStart, add(132, dataAreaLength))
-
-
- /////// Setup Header Area ///////
- // This area holds the 4-byte `transferFromSelector`.
- // bytes4(keccak256("transferFrom(bytes,address,address,uint256)")) = 0xa85e59e4
- mstore(cdStart, 0xa85e59e400000000000000000000000000000000000000000000000000000000)
-
- /////// Setup Params Area ///////
- // Each parameter is padded to 32-bytes. The entire Params Area is 128 bytes.
- // Notes:
- // 1. The offset to `assetData` is the length of the Params Area (128 bytes).
- // 2. A 20-byte mask is applied to addresses to zero-out the unused bytes.
- mstore(add(cdStart, 4), 128)
- mstore(add(cdStart, 36), and(from, 0xffffffffffffffffffffffffffffffffffffffff))
- mstore(add(cdStart, 68), and(to, 0xffffffffffffffffffffffffffffffffffffffff))
- mstore(add(cdStart, 100), amount)
-
- /////// Setup Data Area ///////
- // This area holds `assetData`.
- let dataArea := add(cdStart, 132)
- // solhint-disable-next-line no-empty-blocks
- for {} lt(dataArea, cdEnd) {} {
- mstore(dataArea, mload(assetData))
- dataArea := add(dataArea, 32)
- assetData := add(assetData, 32)
- }
-
- /////// Call `assetProxy.transferFrom` using the constructed calldata ///////
- let success := call(
- gas, // forward all gas
- assetProxy, // call address of asset proxy
- 0, // don't send any ETH
- cdStart, // pointer to start of input
- sub(cdEnd, cdStart), // length of input
- cdStart, // write output over input
- 512 // reserve 512 bytes for output
- )
- if iszero(success) {
- revert(cdStart, returndatasize())
- }
- }
- }
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinExchangeCore.sol b/contracts/protocol/contracts/protocol/Exchange/MixinExchangeCore.sol
deleted file mode 100644
index 72bcebc62..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinExchangeCore.sol
+++ /dev/null
@@ -1,529 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol";
-import "@0x/contracts-libs/contracts/libs/LibConstants.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-import "./mixins/MExchangeCore.sol";
-import "./mixins/MSignatureValidator.sol";
-import "./mixins/MTransactions.sol";
-import "./mixins/MAssetProxyDispatcher.sol";
-
-
-contract MixinExchangeCore is
- ReentrancyGuard,
- LibConstants,
- LibMath,
- LibOrder,
- LibFillResults,
- MAssetProxyDispatcher,
- MExchangeCore,
- MSignatureValidator,
- MTransactions
-{
- // Mapping of orderHash => amount of takerAsset already bought by maker
- mapping (bytes32 => uint256) public filled;
-
- // Mapping of orderHash => cancelled
- mapping (bytes32 => bool) public cancelled;
-
- // Mapping of makerAddress => senderAddress => lowest salt an order can have in order to be fillable
- // Orders with specified senderAddress and with a salt less than their epoch are considered cancelled
- mapping (address => mapping (address => uint256)) public orderEpoch;
-
- /// @dev 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 Orders created with a salt less or equal to this value will be cancelled.
- function cancelOrdersUpTo(uint256 targetOrderEpoch)
- external
- nonReentrant
- {
- address makerAddress = getCurrentContextAddress();
- // If this function is called via `executeTransaction`, we only update the orderEpoch for the makerAddress/msg.sender combination.
- // This allows external filter contracts to add rules to how orders are cancelled via this function.
- address senderAddress = makerAddress == msg.sender ? address(0) : msg.sender;
-
- // orderEpoch is initialized to 0, so to cancelUpTo we need salt + 1
- uint256 newOrderEpoch = targetOrderEpoch + 1;
- uint256 oldOrderEpoch = orderEpoch[makerAddress][senderAddress];
-
- // Ensure orderEpoch is monotonically increasing
- require(
- newOrderEpoch > oldOrderEpoch,
- "INVALID_NEW_ORDER_EPOCH"
- );
-
- // Update orderEpoch
- orderEpoch[makerAddress][senderAddress] = newOrderEpoch;
- emit CancelUpTo(
- makerAddress,
- senderAddress,
- newOrderEpoch
- );
- }
-
- /// @dev Fills the input order.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrder(
- Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- nonReentrant
- returns (FillResults memory fillResults)
- {
- fillResults = fillOrderInternal(
- order,
- takerAssetFillAmount,
- signature
- );
- return fillResults;
- }
-
- /// @dev After calling, the order can not be filled anymore.
- /// Throws if order is invalid or sender does not have permission to cancel.
- /// @param order Order to cancel. Order must be OrderStatus.FILLABLE.
- function cancelOrder(Order memory order)
- public
- nonReentrant
- {
- cancelOrderInternal(order);
- }
-
- /// @dev Gets information about an order: status, hash, and amount filled.
- /// @param order Order to gather information on.
- /// @return OrderInfo Information about the order and its state.
- /// See LibOrder.OrderInfo for a complete description.
- function getOrderInfo(Order memory order)
- public
- view
- returns (OrderInfo memory orderInfo)
- {
- // Compute the order hash
- orderInfo.orderHash = getOrderHash(order);
-
- // Fetch filled amount
- orderInfo.orderTakerAssetFilledAmount = filled[orderInfo.orderHash];
-
- // If order.makerAssetAmount is zero, we also reject the order.
- // While the Exchange contract handles them correctly, they create
- // edge cases in the supporting infrastructure because they have
- // an 'infinite' price when computed by a simple division.
- if (order.makerAssetAmount == 0) {
- orderInfo.orderStatus = uint8(OrderStatus.INVALID_MAKER_ASSET_AMOUNT);
- return orderInfo;
- }
-
- // If order.takerAssetAmount is zero, then the order will always
- // be considered filled because 0 == takerAssetAmount == orderTakerAssetFilledAmount
- // Instead of distinguishing between unfilled and filled zero taker
- // amount orders, we choose not to support them.
- if (order.takerAssetAmount == 0) {
- orderInfo.orderStatus = uint8(OrderStatus.INVALID_TAKER_ASSET_AMOUNT);
- return orderInfo;
- }
-
- // Validate order availability
- if (orderInfo.orderTakerAssetFilledAmount >= order.takerAssetAmount) {
- orderInfo.orderStatus = uint8(OrderStatus.FULLY_FILLED);
- return orderInfo;
- }
-
- // Validate order expiration
- // solhint-disable-next-line not-rely-on-time
- if (block.timestamp >= order.expirationTimeSeconds) {
- orderInfo.orderStatus = uint8(OrderStatus.EXPIRED);
- return orderInfo;
- }
-
- // Check if order has been cancelled
- if (cancelled[orderInfo.orderHash]) {
- orderInfo.orderStatus = uint8(OrderStatus.CANCELLED);
- return orderInfo;
- }
- if (orderEpoch[order.makerAddress][order.senderAddress] > order.salt) {
- orderInfo.orderStatus = uint8(OrderStatus.CANCELLED);
- return orderInfo;
- }
-
- // All other statuses are ruled out: order is Fillable
- orderInfo.orderStatus = uint8(OrderStatus.FILLABLE);
- return orderInfo;
- }
-
- /// @dev Fills the input order.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderInternal(
- Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (FillResults memory fillResults)
- {
- // Fetch order info
- OrderInfo memory orderInfo = getOrderInfo(order);
-
- // Fetch taker address
- address takerAddress = getCurrentContextAddress();
-
- // Assert that the order is fillable by taker
- assertFillableOrder(
- order,
- orderInfo,
- takerAddress,
- signature
- );
-
- // Get amount of takerAsset to fill
- uint256 remainingTakerAssetAmount = safeSub(order.takerAssetAmount, orderInfo.orderTakerAssetFilledAmount);
- uint256 takerAssetFilledAmount = min256(takerAssetFillAmount, remainingTakerAssetAmount);
-
- // Validate context
- assertValidFill(
- order,
- orderInfo,
- takerAssetFillAmount,
- takerAssetFilledAmount,
- fillResults.makerAssetFilledAmount
- );
-
- // Compute proportional fill amounts
- fillResults = calculateFillResults(order, takerAssetFilledAmount);
-
- // Update exchange internal state
- updateFilledState(
- order,
- takerAddress,
- orderInfo.orderHash,
- orderInfo.orderTakerAssetFilledAmount,
- fillResults
- );
-
- // Settle order
- settleOrder(
- order,
- takerAddress,
- fillResults
- );
-
- return fillResults;
- }
-
- /// @dev After calling, the order can not be filled anymore.
- /// Throws if order is invalid or sender does not have permission to cancel.
- /// @param order Order to cancel. Order must be OrderStatus.FILLABLE.
- function cancelOrderInternal(Order memory order)
- internal
- {
- // Fetch current order status
- OrderInfo memory orderInfo = getOrderInfo(order);
-
- // Validate context
- assertValidCancel(order, orderInfo);
-
- // Perform cancel
- updateCancelledState(order, orderInfo.orderHash);
- }
-
- /// @dev Updates state with results of a fill order.
- /// @param order that was filled.
- /// @param takerAddress Address of taker who filled the order.
- /// @param orderTakerAssetFilledAmount Amount of order already filled.
- function updateFilledState(
- Order memory order,
- address takerAddress,
- bytes32 orderHash,
- uint256 orderTakerAssetFilledAmount,
- FillResults memory fillResults
- )
- internal
- {
- // Update state
- filled[orderHash] = safeAdd(orderTakerAssetFilledAmount, fillResults.takerAssetFilledAmount);
-
- // Log order
- emit Fill(
- order.makerAddress,
- order.feeRecipientAddress,
- takerAddress,
- msg.sender,
- fillResults.makerAssetFilledAmount,
- fillResults.takerAssetFilledAmount,
- fillResults.makerFeePaid,
- fillResults.takerFeePaid,
- orderHash,
- order.makerAssetData,
- order.takerAssetData
- );
- }
-
- /// @dev Updates state with results of cancelling an order.
- /// State is only updated if the order is currently fillable.
- /// Otherwise, updating state would have no effect.
- /// @param order that was cancelled.
- /// @param orderHash Hash of order that was cancelled.
- function updateCancelledState(
- Order memory order,
- bytes32 orderHash
- )
- internal
- {
- // Perform cancel
- cancelled[orderHash] = true;
-
- // Log cancel
- emit Cancel(
- order.makerAddress,
- order.feeRecipientAddress,
- msg.sender,
- orderHash,
- order.makerAssetData,
- order.takerAssetData
- );
- }
-
- /// @dev Validates context for fillOrder. Succeeds or throws.
- /// @param order to be filled.
- /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.
- /// @param takerAddress Address of order taker.
- /// @param signature Proof that the orders was created by its maker.
- function assertFillableOrder(
- Order memory order,
- OrderInfo memory orderInfo,
- address takerAddress,
- bytes memory signature
- )
- internal
- view
- {
- // An order can only be filled if its status is FILLABLE.
- require(
- orderInfo.orderStatus == uint8(OrderStatus.FILLABLE),
- "ORDER_UNFILLABLE"
- );
-
- // Validate sender is allowed to fill this order
- if (order.senderAddress != address(0)) {
- require(
- order.senderAddress == msg.sender,
- "INVALID_SENDER"
- );
- }
-
- // Validate taker is allowed to fill this order
- if (order.takerAddress != address(0)) {
- require(
- order.takerAddress == takerAddress,
- "INVALID_TAKER"
- );
- }
-
- // Validate Maker signature (check only if first time seen)
- if (orderInfo.orderTakerAssetFilledAmount == 0) {
- require(
- isValidSignature(
- orderInfo.orderHash,
- order.makerAddress,
- signature
- ),
- "INVALID_ORDER_SIGNATURE"
- );
- }
- }
-
- /// @dev Validates context for fillOrder. Succeeds or throws.
- /// @param order to be filled.
- /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.
- /// @param takerAssetFillAmount Desired amount of order to fill by taker.
- /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
- /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered.
- function assertValidFill(
- Order memory order,
- OrderInfo memory orderInfo,
- uint256 takerAssetFillAmount, // TODO: use FillResults
- uint256 takerAssetFilledAmount,
- uint256 makerAssetFilledAmount
- )
- internal
- view
- {
- // Revert if fill amount is invalid
- // TODO: reconsider necessity for v2.1
- require(
- takerAssetFillAmount != 0,
- "INVALID_TAKER_AMOUNT"
- );
-
- // Make sure taker does not pay more than desired amount
- // NOTE: This assertion should never fail, it is here
- // as an extra defence against potential bugs.
- require(
- takerAssetFilledAmount <= takerAssetFillAmount,
- "TAKER_OVERPAY"
- );
-
- // Make sure order is not overfilled
- // NOTE: This assertion should never fail, it is here
- // as an extra defence against potential bugs.
- require(
- safeAdd(orderInfo.orderTakerAssetFilledAmount, takerAssetFilledAmount) <= order.takerAssetAmount,
- "ORDER_OVERFILL"
- );
-
- // Make sure order is filled at acceptable price.
- // The order has an implied price from the makers perspective:
- // order price = order.makerAssetAmount / order.takerAssetAmount
- // i.e. the number of makerAsset maker is paying per takerAsset. The
- // maker is guaranteed to get this price or a better (lower) one. The
- // actual price maker is getting in this fill is:
- // fill price = makerAssetFilledAmount / takerAssetFilledAmount
- // We need `fill price <= order price` for the fill to be fair to maker.
- // This amounts to:
- // makerAssetFilledAmount order.makerAssetAmount
- // ------------------------ <= -----------------------
- // takerAssetFilledAmount order.takerAssetAmount
- // or, equivalently:
- // makerAssetFilledAmount * order.takerAssetAmount <=
- // order.makerAssetAmount * takerAssetFilledAmount
- // NOTE: This assertion should never fail, it is here
- // as an extra defence against potential bugs.
- require(
- safeMul(makerAssetFilledAmount, order.takerAssetAmount)
- <=
- safeMul(order.makerAssetAmount, takerAssetFilledAmount),
- "INVALID_FILL_PRICE"
- );
- }
-
- /// @dev Validates context for cancelOrder. Succeeds or throws.
- /// @param order to be cancelled.
- /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.
- function assertValidCancel(
- Order memory order,
- OrderInfo memory orderInfo
- )
- internal
- view
- {
- // Ensure order is valid
- // An order can only be cancelled if its status is FILLABLE.
- require(
- orderInfo.orderStatus == uint8(OrderStatus.FILLABLE),
- "ORDER_UNFILLABLE"
- );
-
- // Validate sender is allowed to cancel this order
- if (order.senderAddress != address(0)) {
- require(
- order.senderAddress == msg.sender,
- "INVALID_SENDER"
- );
- }
-
- // Validate transaction signed by maker
- address makerAddress = getCurrentContextAddress();
- require(
- order.makerAddress == makerAddress,
- "INVALID_MAKER"
- );
- }
-
- /// @dev Calculates amounts filled and fees paid by maker and taker.
- /// @param order to be filled.
- /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
- /// @return fillResults Amounts filled and fees paid by maker and taker.
- function calculateFillResults(
- Order memory order,
- uint256 takerAssetFilledAmount
- )
- internal
- pure
- returns (FillResults memory fillResults)
- {
- // Compute proportional transfer amounts
- fillResults.takerAssetFilledAmount = takerAssetFilledAmount;
- fillResults.makerAssetFilledAmount = safeGetPartialAmountFloor(
- takerAssetFilledAmount,
- order.takerAssetAmount,
- order.makerAssetAmount
- );
- fillResults.makerFeePaid = safeGetPartialAmountFloor(
- fillResults.makerAssetFilledAmount,
- order.makerAssetAmount,
- order.makerFee
- );
- fillResults.takerFeePaid = safeGetPartialAmountFloor(
- takerAssetFilledAmount,
- order.takerAssetAmount,
- order.takerFee
- );
-
- return fillResults;
- }
-
- /// @dev Settles an order by transferring assets between counterparties.
- /// @param order Order struct containing order specifications.
- /// @param takerAddress Address selling takerAsset and buying makerAsset.
- /// @param fillResults Amounts to be filled and fees paid by maker and taker.
- function settleOrder(
- LibOrder.Order memory order,
- address takerAddress,
- LibFillResults.FillResults memory fillResults
- )
- private
- {
- bytes memory zrxAssetData = ZRX_ASSET_DATA;
- dispatchTransferFrom(
- order.makerAssetData,
- order.makerAddress,
- takerAddress,
- fillResults.makerAssetFilledAmount
- );
- dispatchTransferFrom(
- order.takerAssetData,
- takerAddress,
- order.makerAddress,
- fillResults.takerAssetFilledAmount
- );
- dispatchTransferFrom(
- zrxAssetData,
- order.makerAddress,
- order.feeRecipientAddress,
- fillResults.makerFeePaid
- );
- dispatchTransferFrom(
- zrxAssetData,
- takerAddress,
- order.feeRecipientAddress,
- fillResults.takerFeePaid
- );
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinMatchOrders.sol b/contracts/protocol/contracts/protocol/Exchange/MixinMatchOrders.sol
deleted file mode 100644
index 2627b82fd..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinMatchOrders.sol
+++ /dev/null
@@ -1,335 +0,0 @@
-/*
- Copyright 2018 ZeroEx Intl.
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
- http://www.apache.org/licenses/LICENSE-2.0
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol";
-import "@0x/contracts-libs/contracts/libs/LibConstants.sol";
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "./mixins/MExchangeCore.sol";
-import "./mixins/MMatchOrders.sol";
-import "./mixins/MTransactions.sol";
-import "./mixins/MAssetProxyDispatcher.sol";
-
-
-contract MixinMatchOrders is
- ReentrancyGuard,
- LibConstants,
- LibMath,
- MAssetProxyDispatcher,
- MExchangeCore,
- MMatchOrders,
- MTransactions
-{
- /// @dev 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 (who matched the two orders).
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftSignature Proof that order was created by the left maker.
- /// @param rightSignature Proof that order was created by the right maker.
- /// @return matchedFillResults Amounts filled and fees paid by maker and taker of matched orders.
- function matchOrders(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- bytes memory leftSignature,
- bytes memory rightSignature
- )
- public
- nonReentrant
- returns (LibFillResults.MatchedFillResults memory matchedFillResults)
- {
- // We assume that rightOrder.takerAssetData == leftOrder.makerAssetData and rightOrder.makerAssetData == leftOrder.takerAssetData.
- // If this assumption isn't true, the match will fail at signature validation.
- rightOrder.makerAssetData = leftOrder.takerAssetData;
- rightOrder.takerAssetData = leftOrder.makerAssetData;
-
- // Get left & right order info
- LibOrder.OrderInfo memory leftOrderInfo = getOrderInfo(leftOrder);
- LibOrder.OrderInfo memory rightOrderInfo = getOrderInfo(rightOrder);
-
- // Fetch taker address
- address takerAddress = getCurrentContextAddress();
-
- // Either our context is valid or we revert
- assertFillableOrder(
- leftOrder,
- leftOrderInfo,
- takerAddress,
- leftSignature
- );
- assertFillableOrder(
- rightOrder,
- rightOrderInfo,
- takerAddress,
- rightSignature
- );
- assertValidMatch(leftOrder, rightOrder);
-
- // Compute proportional fill amounts
- matchedFillResults = calculateMatchedFillResults(
- leftOrder,
- rightOrder,
- leftOrderInfo.orderTakerAssetFilledAmount,
- rightOrderInfo.orderTakerAssetFilledAmount
- );
-
- // Validate fill contexts
- assertValidFill(
- leftOrder,
- leftOrderInfo,
- matchedFillResults.left.takerAssetFilledAmount,
- matchedFillResults.left.takerAssetFilledAmount,
- matchedFillResults.left.makerAssetFilledAmount
- );
- assertValidFill(
- rightOrder,
- rightOrderInfo,
- matchedFillResults.right.takerAssetFilledAmount,
- matchedFillResults.right.takerAssetFilledAmount,
- matchedFillResults.right.makerAssetFilledAmount
- );
-
- // Update exchange state
- updateFilledState(
- leftOrder,
- takerAddress,
- leftOrderInfo.orderHash,
- leftOrderInfo.orderTakerAssetFilledAmount,
- matchedFillResults.left
- );
- updateFilledState(
- rightOrder,
- takerAddress,
- rightOrderInfo.orderHash,
- rightOrderInfo.orderTakerAssetFilledAmount,
- matchedFillResults.right
- );
-
- // Settle matched orders. Succeeds or throws.
- settleMatchedOrders(
- leftOrder,
- rightOrder,
- takerAddress,
- matchedFillResults
- );
-
- return matchedFillResults;
- }
-
- /// @dev Validates context for matchOrders. Succeeds or throws.
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- function assertValidMatch(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder
- )
- internal
- pure
- {
- // Make sure there is a profitable spread.
- // There is a profitable spread iff the cost per unit bought (OrderA.MakerAmount/OrderA.TakerAmount) for each order is greater
- // than the profit per unit sold of the matched order (OrderB.TakerAmount/OrderB.MakerAmount).
- // This is satisfied by the equations below:
- // <leftOrder.makerAssetAmount> / <leftOrder.takerAssetAmount> >= <rightOrder.takerAssetAmount> / <rightOrder.makerAssetAmount>
- // AND
- // <rightOrder.makerAssetAmount> / <rightOrder.takerAssetAmount> >= <leftOrder.takerAssetAmount> / <leftOrder.makerAssetAmount>
- // These equations can be combined to get the following:
- require(
- safeMul(leftOrder.makerAssetAmount, rightOrder.makerAssetAmount) >=
- safeMul(leftOrder.takerAssetAmount, rightOrder.takerAssetAmount),
- "NEGATIVE_SPREAD_REQUIRED"
- );
- }
-
- /// @dev Calculates fill amounts for the matched orders.
- /// 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 leftOrder order goes to the taker (who matched the two orders).
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled.
- /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled.
- /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders.
- function calculateMatchedFillResults(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- uint256 leftOrderTakerAssetFilledAmount,
- uint256 rightOrderTakerAssetFilledAmount
- )
- internal
- pure
- returns (LibFillResults.MatchedFillResults memory matchedFillResults)
- {
- // Derive maker asset amounts for left & right orders, given store taker assert amounts
- uint256 leftTakerAssetAmountRemaining = safeSub(leftOrder.takerAssetAmount, leftOrderTakerAssetFilledAmount);
- uint256 leftMakerAssetAmountRemaining = safeGetPartialAmountFloor(
- leftOrder.makerAssetAmount,
- leftOrder.takerAssetAmount,
- leftTakerAssetAmountRemaining
- );
- uint256 rightTakerAssetAmountRemaining = safeSub(rightOrder.takerAssetAmount, rightOrderTakerAssetFilledAmount);
- uint256 rightMakerAssetAmountRemaining = safeGetPartialAmountFloor(
- rightOrder.makerAssetAmount,
- rightOrder.takerAssetAmount,
- rightTakerAssetAmountRemaining
- );
-
- // Calculate fill results for maker and taker assets: at least one order will be fully filled.
- // The maximum amount the left maker can buy is `leftTakerAssetAmountRemaining`
- // The maximum amount the right maker can sell is `rightMakerAssetAmountRemaining`
- // We have two distinct cases for calculating the fill results:
- // Case 1.
- // If the left maker can buy more than the right maker can sell, then only the right order is fully filled.
- // If the left maker can buy exactly what the right maker can sell, then both orders are fully filled.
- // Case 2.
- // If the left maker cannot buy more than the right maker can sell, then only the left order is fully filled.
- if (leftTakerAssetAmountRemaining >= rightMakerAssetAmountRemaining) {
- // Case 1: Right order is fully filled
- matchedFillResults.right.makerAssetFilledAmount = rightMakerAssetAmountRemaining;
- matchedFillResults.right.takerAssetFilledAmount = rightTakerAssetAmountRemaining;
- matchedFillResults.left.takerAssetFilledAmount = matchedFillResults.right.makerAssetFilledAmount;
- // Round down to ensure the maker's exchange rate does not exceed the price specified by the order.
- // We favor the maker when the exchange rate must be rounded.
- matchedFillResults.left.makerAssetFilledAmount = safeGetPartialAmountFloor(
- leftOrder.makerAssetAmount,
- leftOrder.takerAssetAmount,
- matchedFillResults.left.takerAssetFilledAmount
- );
- } else {
- // Case 2: Left order is fully filled
- matchedFillResults.left.makerAssetFilledAmount = leftMakerAssetAmountRemaining;
- matchedFillResults.left.takerAssetFilledAmount = leftTakerAssetAmountRemaining;
- matchedFillResults.right.makerAssetFilledAmount = matchedFillResults.left.takerAssetFilledAmount;
- // Round up to ensure the maker's exchange rate does not exceed the price specified by the order.
- // We favor the maker when the exchange rate must be rounded.
- matchedFillResults.right.takerAssetFilledAmount = safeGetPartialAmountCeil(
- rightOrder.takerAssetAmount,
- rightOrder.makerAssetAmount,
- matchedFillResults.right.makerAssetFilledAmount
- );
- }
-
- // Calculate amount given to taker
- matchedFillResults.leftMakerAssetSpreadAmount = safeSub(
- matchedFillResults.left.makerAssetFilledAmount,
- matchedFillResults.right.takerAssetFilledAmount
- );
-
- // Compute fees for left order
- matchedFillResults.left.makerFeePaid = safeGetPartialAmountFloor(
- matchedFillResults.left.makerAssetFilledAmount,
- leftOrder.makerAssetAmount,
- leftOrder.makerFee
- );
- matchedFillResults.left.takerFeePaid = safeGetPartialAmountFloor(
- matchedFillResults.left.takerAssetFilledAmount,
- leftOrder.takerAssetAmount,
- leftOrder.takerFee
- );
-
- // Compute fees for right order
- matchedFillResults.right.makerFeePaid = safeGetPartialAmountFloor(
- matchedFillResults.right.makerAssetFilledAmount,
- rightOrder.makerAssetAmount,
- rightOrder.makerFee
- );
- matchedFillResults.right.takerFeePaid = safeGetPartialAmountFloor(
- matchedFillResults.right.takerAssetFilledAmount,
- rightOrder.takerAssetAmount,
- rightOrder.takerFee
- );
-
- // Return fill results
- return matchedFillResults;
- }
-
- /// @dev Settles matched order by transferring appropriate funds between order makers, taker, and fee recipient.
- /// @param leftOrder First matched order.
- /// @param rightOrder Second matched order.
- /// @param takerAddress Address that matched the orders. The taker receives the spread between orders as profit.
- /// @param matchedFillResults Struct holding amounts to transfer between makers, taker, and fee recipients.
- function settleMatchedOrders(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- address takerAddress,
- LibFillResults.MatchedFillResults memory matchedFillResults
- )
- private
- {
- bytes memory zrxAssetData = ZRX_ASSET_DATA;
- // Order makers and taker
- dispatchTransferFrom(
- leftOrder.makerAssetData,
- leftOrder.makerAddress,
- rightOrder.makerAddress,
- matchedFillResults.right.takerAssetFilledAmount
- );
- dispatchTransferFrom(
- rightOrder.makerAssetData,
- rightOrder.makerAddress,
- leftOrder.makerAddress,
- matchedFillResults.left.takerAssetFilledAmount
- );
- dispatchTransferFrom(
- leftOrder.makerAssetData,
- leftOrder.makerAddress,
- takerAddress,
- matchedFillResults.leftMakerAssetSpreadAmount
- );
-
- // Maker fees
- dispatchTransferFrom(
- zrxAssetData,
- leftOrder.makerAddress,
- leftOrder.feeRecipientAddress,
- matchedFillResults.left.makerFeePaid
- );
- dispatchTransferFrom(
- zrxAssetData,
- rightOrder.makerAddress,
- rightOrder.feeRecipientAddress,
- matchedFillResults.right.makerFeePaid
- );
-
- // Taker fees
- if (leftOrder.feeRecipientAddress == rightOrder.feeRecipientAddress) {
- dispatchTransferFrom(
- zrxAssetData,
- takerAddress,
- leftOrder.feeRecipientAddress,
- safeAdd(
- matchedFillResults.left.takerFeePaid,
- matchedFillResults.right.takerFeePaid
- )
- );
- } else {
- dispatchTransferFrom(
- zrxAssetData,
- takerAddress,
- leftOrder.feeRecipientAddress,
- matchedFillResults.left.takerFeePaid
- );
- dispatchTransferFrom(
- zrxAssetData,
- takerAddress,
- rightOrder.feeRecipientAddress,
- matchedFillResults.right.takerFeePaid
- );
- }
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinSignatureValidator.sol b/contracts/protocol/contracts/protocol/Exchange/MixinSignatureValidator.sol
deleted file mode 100644
index b40aa1412..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinSignatureValidator.sol
+++ /dev/null
@@ -1,324 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "@0x/contracts-utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol";
-import "./mixins/MSignatureValidator.sol";
-import "./mixins/MTransactions.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IWallet.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IValidator.sol";
-
-
-contract MixinSignatureValidator is
- ReentrancyGuard,
- MSignatureValidator,
- MTransactions
-{
- using LibBytes for bytes;
-
- // Mapping of hash => signer => signed
- mapping (bytes32 => mapping (address => bool)) public preSigned;
-
- // Mapping of signer => validator => approved
- mapping (address => mapping (address => bool)) public allowedValidators;
-
- /// @dev 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 signerAddress Address that should have signed the given hash.
- /// @param signature Proof that the hash has been signed by signer.
- function preSign(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external
- {
- if (signerAddress != msg.sender) {
- require(
- isValidSignature(
- hash,
- signerAddress,
- signature
- ),
- "INVALID_SIGNATURE"
- );
- }
- preSigned[hash][signerAddress] = true;
- }
-
- /// @dev Approves/unnapproves a Validator contract to verify signatures on signer's behalf.
- /// @param validatorAddress Address of Validator contract.
- /// @param approval Approval or disapproval of Validator contract.
- function setSignatureValidatorApproval(
- address validatorAddress,
- bool approval
- )
- external
- nonReentrant
- {
- address signerAddress = getCurrentContextAddress();
- allowedValidators[signerAddress][validatorAddress] = approval;
- emit SignatureValidatorApproval(
- signerAddress,
- validatorAddress,
- approval
- );
- }
-
- /// @dev Verifies that a hash has been signed by the given signer.
- /// @param hash Any 32 byte hash.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof that the hash has been signed by signer.
- /// @return True if the address recovered from the provided signature matches the input signer address.
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes memory signature
- )
- public
- view
- returns (bool isValid)
- {
- require(
- signature.length > 0,
- "LENGTH_GREATER_THAN_0_REQUIRED"
- );
-
- // Pop last byte off of signature byte array.
- uint8 signatureTypeRaw = uint8(signature.popLastByte());
-
- // Ensure signature is supported
- require(
- signatureTypeRaw < uint8(SignatureType.NSignatureTypes),
- "SIGNATURE_UNSUPPORTED"
- );
-
- SignatureType signatureType = SignatureType(signatureTypeRaw);
-
- // Variables are not scoped in Solidity.
- uint8 v;
- bytes32 r;
- bytes32 s;
- address recovered;
-
- // Always illegal signature.
- // This is always an implicit option since a signer can create a
- // signature array with invalid type or length. We may as well make
- // it an explicit option. This aids testing and analysis. It is
- // also the initialization value for the enum type.
- if (signatureType == SignatureType.Illegal) {
- revert("SIGNATURE_ILLEGAL");
-
- // Always invalid signature.
- // Like Illegal, this is always implicitly available and therefore
- // offered explicitly. It can be implicitly created by providing
- // a correctly formatted but incorrect signature.
- } else if (signatureType == SignatureType.Invalid) {
- require(
- signature.length == 0,
- "LENGTH_0_REQUIRED"
- );
- isValid = false;
- return isValid;
-
- // Signature using EIP712
- } else if (signatureType == SignatureType.EIP712) {
- require(
- signature.length == 65,
- "LENGTH_65_REQUIRED"
- );
- v = uint8(signature[0]);
- r = signature.readBytes32(1);
- s = signature.readBytes32(33);
- recovered = ecrecover(
- hash,
- v,
- r,
- s
- );
- isValid = signerAddress == recovered;
- return isValid;
-
- // Signed using web3.eth_sign
- } else if (signatureType == SignatureType.EthSign) {
- require(
- signature.length == 65,
- "LENGTH_65_REQUIRED"
- );
- v = uint8(signature[0]);
- r = signature.readBytes32(1);
- s = signature.readBytes32(33);
- recovered = ecrecover(
- keccak256(abi.encodePacked(
- "\x19Ethereum Signed Message:\n32",
- hash
- )),
- v,
- r,
- s
- );
- isValid = signerAddress == recovered;
- return isValid;
-
- // Signature verified by wallet contract.
- // If used with an order, the maker of the order is the wallet contract.
- } else if (signatureType == SignatureType.Wallet) {
- isValid = isValidWalletSignature(
- hash,
- signerAddress,
- signature
- );
- return isValid;
-
- // Signature verified by validator contract.
- // If used with an order, the maker of the order can still be an EOA.
- // A signature using this type should be encoded as:
- // | Offset | Length | Contents |
- // | 0x00 | x | Signature to validate |
- // | 0x00 + x | 20 | Address of validator contract |
- // | 0x14 + x | 1 | Signature type is always "\x06" |
- } else if (signatureType == SignatureType.Validator) {
- // Pop last 20 bytes off of signature byte array.
- address validatorAddress = signature.popLast20Bytes();
-
- // Ensure signer has approved validator.
- if (!allowedValidators[signerAddress][validatorAddress]) {
- return false;
- }
- isValid = isValidValidatorSignature(
- validatorAddress,
- hash,
- signerAddress,
- signature
- );
- return isValid;
-
- // Signer signed hash previously using the preSign function.
- } else if (signatureType == SignatureType.PreSigned) {
- isValid = preSigned[hash][signerAddress];
- return isValid;
- }
-
- // Anything else is illegal (We do not return false because
- // the signature may actually be valid, just not in a format
- // that we currently support. In this case returning false
- // may lead the caller to incorrectly believe that the
- // signature was invalid.)
- revert("SIGNATURE_UNSUPPORTED");
- }
-
- /// @dev Verifies signature using logic defined by Wallet contract.
- /// @param hash Any 32 byte hash.
- /// @param walletAddress Address that should have signed the given hash
- /// and defines its own signature verification method.
- /// @param signature Proof that the hash has been signed by signer.
- /// @return True if signature is valid for given wallet..
- function isValidWalletSignature(
- bytes32 hash,
- address walletAddress,
- bytes signature
- )
- internal
- view
- returns (bool isValid)
- {
- bytes memory callData = abi.encodeWithSelector(
- IWallet(walletAddress).isValidSignature.selector,
- hash,
- signature
- );
- assembly {
- let cdStart := add(callData, 32)
- let success := staticcall(
- gas, // forward all gas
- walletAddress, // address of Wallet contract
- cdStart, // pointer to start of input
- mload(callData), // length of input
- cdStart, // write output over input
- 32 // output size is 32 bytes
- )
-
- switch success
- case 0 {
- // Revert with `Error("WALLET_ERROR")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000c57414c4c45545f4552524f5200000000000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
- case 1 {
- // Signature is valid if call did not revert and returned true
- isValid := mload(cdStart)
- }
- }
- return isValid;
- }
-
- /// @dev Verifies signature using logic defined by Validator contract.
- /// @param validatorAddress Address of validator contract.
- /// @param hash Any 32 byte hash.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof that the hash has been signed by signer.
- /// @return True if the address recovered from the provided signature matches the input signer address.
- function isValidValidatorSignature(
- address validatorAddress,
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- internal
- view
- returns (bool isValid)
- {
- bytes memory callData = abi.encodeWithSelector(
- IValidator(signerAddress).isValidSignature.selector,
- hash,
- signerAddress,
- signature
- );
- assembly {
- let cdStart := add(callData, 32)
- let success := staticcall(
- gas, // forward all gas
- validatorAddress, // address of Validator contract
- cdStart, // pointer to start of input
- mload(callData), // length of input
- cdStart, // write output over input
- 32 // output size is 32 bytes
- )
-
- switch success
- case 0 {
- // Revert with `Error("VALIDATOR_ERROR")`
- mstore(0, 0x08c379a000000000000000000000000000000000000000000000000000000000)
- mstore(32, 0x0000002000000000000000000000000000000000000000000000000000000000)
- mstore(64, 0x0000000f56414c494441544f525f4552524f5200000000000000000000000000)
- mstore(96, 0)
- revert(0, 100)
- }
- case 1 {
- // Signature is valid if call did not revert and returned true
- isValid := mload(cdStart)
- }
- }
- return isValid;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinTransactions.sol b/contracts/protocol/contracts/protocol/Exchange/MixinTransactions.sol
deleted file mode 100644
index 1ac5b1a5e..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinTransactions.sol
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-libs/contracts/libs/LibExchangeErrors.sol";
-import "./mixins/MSignatureValidator.sol";
-import "./mixins/MTransactions.sol";
-import "@0x/contracts-libs/contracts/libs/LibEIP712.sol";
-
-
-contract MixinTransactions is
- LibEIP712,
- MSignatureValidator,
- MTransactions
-{
- // Mapping of transaction hash => executed
- // This prevents transactions from being executed more than once.
- mapping (bytes32 => bool) public transactions;
-
- // Address of current transaction signer
- address public currentContextAddress;
-
- /// @dev Executes an exchange method call in the context of signer.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param data AbiV2 encoded calldata.
- /// @param signature Proof of signer transaction by signer.
- function executeTransaction(
- uint256 salt,
- address signerAddress,
- bytes data,
- bytes signature
- )
- external
- {
- // Prevent reentrancy
- require(
- currentContextAddress == address(0),
- "REENTRANCY_ILLEGAL"
- );
-
- bytes32 transactionHash = hashEIP712Message(hashZeroExTransaction(
- salt,
- signerAddress,
- data
- ));
-
- // Validate transaction has not been executed
- require(
- !transactions[transactionHash],
- "INVALID_TX_HASH"
- );
-
- // Transaction always valid if signer is sender of transaction
- if (signerAddress != msg.sender) {
- // Validate signature
- require(
- isValidSignature(
- transactionHash,
- signerAddress,
- signature
- ),
- "INVALID_TX_SIGNATURE"
- );
-
- // Set the current transaction signer
- currentContextAddress = signerAddress;
- }
-
- // Execute transaction
- transactions[transactionHash] = true;
- require(
- address(this).delegatecall(data),
- "FAILED_EXECUTION"
- );
-
- // Reset current transaction signer if it was previously updated
- if (signerAddress != msg.sender) {
- currentContextAddress = address(0);
- }
- }
-
- /// @dev Calculates EIP712 hash of the Transaction.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param data AbiV2 encoded calldata.
- /// @return EIP712 hash of the Transaction.
- function hashZeroExTransaction(
- uint256 salt,
- address signerAddress,
- bytes memory data
- )
- internal
- pure
- returns (bytes32 result)
- {
- bytes32 schemaHash = EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH;
- bytes32 dataHash = keccak256(data);
-
- // Assembly for more efficiently computing:
- // keccak256(abi.encodePacked(
- // EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH,
- // salt,
- // bytes32(signerAddress),
- // keccak256(data)
- // ));
-
- assembly {
- // Load free memory pointer
- let memPtr := mload(64)
-
- mstore(memPtr, schemaHash) // hash of schema
- mstore(add(memPtr, 32), salt) // salt
- mstore(add(memPtr, 64), and(signerAddress, 0xffffffffffffffffffffffffffffffffffffffff)) // signerAddress
- mstore(add(memPtr, 96), dataHash) // hash of data
-
- // Compute hash
- result := keccak256(memPtr, 128)
- }
- return result;
- }
-
- /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`).
- /// If calling a fill function, this address will represent the taker.
- /// If calling a cancel function, this address will represent the maker.
- /// @return Signer of 0x transaction if entry point is `executeTransaction`.
- /// `msg.sender` if entry point is any other function.
- function getCurrentContextAddress()
- internal
- view
- returns (address)
- {
- address currentContextAddress_ = currentContextAddress;
- address contextAddress = currentContextAddress_ == address(0) ? msg.sender : currentContextAddress_;
- return contextAddress;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/MixinWrapperFunctions.sol b/contracts/protocol/contracts/protocol/Exchange/MixinWrapperFunctions.sol
deleted file mode 100644
index 6fc6ee999..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/MixinWrapperFunctions.sol
+++ /dev/null
@@ -1,426 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol";
-import "@0x/contracts-libs/contracts/libs/LibMath.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-libs/contracts/libs/LibAbiEncoder.sol";
-import "./mixins/MExchangeCore.sol";
-import "./mixins/MWrapperFunctions.sol";
-
-
-contract MixinWrapperFunctions is
- ReentrancyGuard,
- LibMath,
- LibFillResults,
- LibAbiEncoder,
- MExchangeCore,
- MWrapperFunctions
-{
- /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- function fillOrKillOrder(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- nonReentrant
- returns (FillResults memory fillResults)
- {
- fillResults = fillOrKillOrderInternal(
- order,
- takerAssetFillAmount,
- signature
- );
- return fillResults;
- }
-
- /// @dev Fills the input order.
- /// Returns false if the transaction would otherwise revert.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderNoThrow(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- public
- returns (FillResults memory fillResults)
- {
- // ABI encode calldata for `fillOrder`
- bytes memory fillOrderCalldata = abiEncodeFillOrder(
- order,
- takerAssetFillAmount,
- signature
- );
-
- // Delegate to `fillOrder` and handle any exceptions gracefully
- assembly {
- let success := delegatecall(
- gas, // forward all gas
- address, // call address of this contract
- add(fillOrderCalldata, 32), // pointer to start of input (skip array length in first 32 bytes)
- mload(fillOrderCalldata), // length of input
- fillOrderCalldata, // write output over input
- 128 // output size is 128 bytes
- )
- if success {
- mstore(fillResults, mload(fillOrderCalldata))
- mstore(add(fillResults, 32), mload(add(fillOrderCalldata, 32)))
- mstore(add(fillResults, 64), mload(add(fillOrderCalldata, 64)))
- mstore(add(fillResults, 96), mload(add(fillOrderCalldata, 96)))
- }
- }
- // fillResults values will be 0 by default if call was unsuccessful
- return fillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrder.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.
- function batchFillOrders(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- nonReentrant
- returns (FillResults memory totalFillResults)
- {
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
- FillResults memory singleFillResults = fillOrderInternal(
- orders[i],
- takerAssetFillAmounts[i],
- signatures[i]
- );
- addFillResults(totalFillResults, singleFillResults);
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrKill.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.
- function batchFillOrKillOrders(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- nonReentrant
- returns (FillResults memory totalFillResults)
- {
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
- FillResults memory singleFillResults = fillOrKillOrderInternal(
- orders[i],
- takerAssetFillAmounts[i],
- signatures[i]
- );
- addFillResults(totalFillResults, singleFillResults);
- }
- return totalFillResults;
- }
-
- /// @dev Fills an order with specified parameters and ECDSA signature.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmounts Array of desired amounts of takerAsset to sell in orders.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- /// NOTE: makerAssetFilledAmount and takerAssetFilledAmount may include amounts filled of different assets.
- function batchFillOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256[] memory takerAssetFillAmounts,
- bytes[] memory signatures
- )
- public
- returns (FillResults memory totalFillResults)
- {
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
- FillResults memory singleFillResults = fillOrderNoThrow(
- orders[i],
- takerAssetFillAmounts[i],
- signatures[i]
- );
- addFillResults(totalFillResults, singleFillResults);
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signatures Proofs that orders have been created by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellOrders(
- LibOrder.Order[] memory orders,
- uint256 takerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- nonReentrant
- returns (FillResults memory totalFillResults)
- {
- bytes memory takerAssetData = orders[0].takerAssetData;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being sold by taker is the same for each order.
- // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders.
- orders[i].takerAssetData = takerAssetData;
-
- // Calculate the remaining amount of takerAsset to sell
- uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
-
- // Attempt to sell the remaining amount of takerAsset
- FillResults memory singleFillResults = fillOrderInternal(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of takerAsset has been sold
- if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) {
- break;
- }
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of takerAsset is sold by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketSellOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256 takerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (FillResults memory totalFillResults)
- {
- bytes memory takerAssetData = orders[0].takerAssetData;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being sold by taker is the same for each order.
- // Rather than passing this in as calldata, we use the takerAssetData from the first order in all later orders.
- orders[i].takerAssetData = takerAssetData;
-
- // Calculate the remaining amount of takerAsset to sell
- uint256 remainingTakerAssetFillAmount = safeSub(takerAssetFillAmount, totalFillResults.takerAssetFilledAmount);
-
- // Attempt to sell the remaining amount of takerAsset
- FillResults memory singleFillResults = fillOrderNoThrow(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of takerAsset has been sold
- if (totalFillResults.takerAssetFilledAmount >= takerAssetFillAmount) {
- break;
- }
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple calls of fillOrder until total amount of makerAsset is bought by taker.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyOrders(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- nonReentrant
- returns (FillResults memory totalFillResults)
- {
- bytes memory makerAssetData = orders[0].makerAssetData;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being bought by taker is the same for each order.
- // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders.
- orders[i].makerAssetData = makerAssetData;
-
- // Calculate the remaining amount of makerAsset to buy
- uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
-
- // Convert the remaining amount of makerAsset to buy into remaining amount
- // of takerAsset to sell, assuming entire amount can be sold in the current order
- uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(
- orders[i].takerAssetAmount,
- orders[i].makerAssetAmount,
- remainingMakerAssetFillAmount
- );
-
- // Attempt to sell the remaining amount of takerAsset
- FillResults memory singleFillResults = fillOrderInternal(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of makerAsset has been bought
- if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) {
- break;
- }
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously executes multiple fill orders in a single transaction until total amount is bought by taker.
- /// Returns false if the transaction would otherwise revert.
- /// @param orders Array of order specifications.
- /// @param makerAssetFillAmount Desired amount of makerAsset to buy.
- /// @param signatures Proofs that orders have been signed by makers.
- /// @return Amounts filled and fees paid by makers and taker.
- function marketBuyOrdersNoThrow(
- LibOrder.Order[] memory orders,
- uint256 makerAssetFillAmount,
- bytes[] memory signatures
- )
- public
- returns (FillResults memory totalFillResults)
- {
- bytes memory makerAssetData = orders[0].makerAssetData;
-
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
-
- // We assume that asset being bought by taker is the same for each order.
- // Rather than passing this in as calldata, we copy the makerAssetData from the first order onto all later orders.
- orders[i].makerAssetData = makerAssetData;
-
- // Calculate the remaining amount of makerAsset to buy
- uint256 remainingMakerAssetFillAmount = safeSub(makerAssetFillAmount, totalFillResults.makerAssetFilledAmount);
-
- // Convert the remaining amount of makerAsset to buy into remaining amount
- // of takerAsset to sell, assuming entire amount can be sold in the current order
- uint256 remainingTakerAssetFillAmount = getPartialAmountFloor(
- orders[i].takerAssetAmount,
- orders[i].makerAssetAmount,
- remainingMakerAssetFillAmount
- );
-
- // Attempt to sell the remaining amount of takerAsset
- FillResults memory singleFillResults = fillOrderNoThrow(
- orders[i],
- remainingTakerAssetFillAmount,
- signatures[i]
- );
-
- // Update amounts filled and fees paid by maker and taker
- addFillResults(totalFillResults, singleFillResults);
-
- // Stop execution if the entire amount of makerAsset has been bought
- if (totalFillResults.makerAssetFilledAmount >= makerAssetFillAmount) {
- break;
- }
- }
- return totalFillResults;
- }
-
- /// @dev Synchronously cancels multiple orders in a single transaction.
- /// @param orders Array of order specifications.
- function batchCancelOrders(LibOrder.Order[] memory orders)
- public
- nonReentrant
- {
- uint256 ordersLength = orders.length;
- for (uint256 i = 0; i != ordersLength; i++) {
- cancelOrderInternal(orders[i]);
- }
- }
-
- /// @dev Fetches information for all passed in orders.
- /// @param orders Array of order specifications.
- /// @return Array of OrderInfo instances that correspond to each order.
- function getOrdersInfo(LibOrder.Order[] memory orders)
- public
- view
- returns (LibOrder.OrderInfo[] memory)
- {
- uint256 ordersLength = orders.length;
- LibOrder.OrderInfo[] memory ordersInfo = new LibOrder.OrderInfo[](ordersLength);
- for (uint256 i = 0; i != ordersLength; i++) {
- ordersInfo[i] = getOrderInfo(orders[i]);
- }
- return ordersInfo;
- }
-
- /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- function fillOrKillOrderInternal(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (FillResults memory fillResults)
- {
- fillResults = fillOrderInternal(
- order,
- takerAssetFillAmount,
- signature
- );
- require(
- fillResults.takerAssetFilledAmount == takerAssetFillAmount,
- "COMPLETE_FILL_FAILED"
- );
- return fillResults;
- }
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MAssetProxyDispatcher.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MAssetProxyDispatcher.sol
deleted file mode 100644
index 05c2c4c0b..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MAssetProxyDispatcher.sol
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IAssetProxyDispatcher.sol";
-
-
-contract MAssetProxyDispatcher is
- IAssetProxyDispatcher
-{
- // Logs registration of new asset proxy
- event AssetProxyRegistered(
- bytes4 id, // Id of new registered AssetProxy.
- address assetProxy // Address of new registered AssetProxy.
- );
-
- /// @dev Forwards arguments to assetProxy and calls `transferFrom`. Either succeeds or throws.
- /// @param assetData Byte array encoded for the asset.
- /// @param from Address to transfer token from.
- /// @param to Address to transfer token to.
- /// @param amount Amount of token to transfer.
- function dispatchTransferFrom(
- bytes memory assetData,
- address from,
- address to,
- uint256 amount
- )
- internal;
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MExchangeCore.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MExchangeCore.sol
deleted file mode 100644
index 09dc491cd..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MExchangeCore.sol
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchangeCore.sol";
-
-
-contract MExchangeCore is
- IExchangeCore
-{
- // Fill event is emitted whenever an order is filled.
- event Fill(
- address indexed makerAddress, // Address that created the order.
- address indexed feeRecipientAddress, // Address that received fees.
- address takerAddress, // Address that filled the order.
- address senderAddress, // Address that called the Exchange contract (msg.sender).
- uint256 makerAssetFilledAmount, // Amount of makerAsset sold by maker and bought by taker.
- uint256 takerAssetFilledAmount, // Amount of takerAsset sold by taker and bought by maker.
- uint256 makerFeePaid, // Amount of ZRX paid to feeRecipient by maker.
- uint256 takerFeePaid, // Amount of ZRX paid to feeRecipient by taker.
- bytes32 indexed orderHash, // EIP712 hash of order (see LibOrder.getOrderHash).
- bytes makerAssetData, // Encoded data specific to makerAsset.
- bytes takerAssetData // Encoded data specific to takerAsset.
- );
-
- // Cancel event is emitted whenever an individual order is cancelled.
- event Cancel(
- address indexed makerAddress, // Address that created the order.
- address indexed feeRecipientAddress, // Address that would have recieved fees if order was filled.
- address senderAddress, // Address that called the Exchange contract (msg.sender).
- bytes32 indexed orderHash, // EIP712 hash of order (see LibOrder.getOrderHash).
- bytes makerAssetData, // Encoded data specific to makerAsset.
- bytes takerAssetData // Encoded data specific to takerAsset.
- );
-
- // CancelUpTo event is emitted whenever `cancelOrdersUpTo` is executed succesfully.
- event CancelUpTo(
- address indexed makerAddress, // Orders cancelled must have been created by this address.
- address indexed senderAddress, // Orders cancelled must have a `senderAddress` equal to this address.
- uint256 orderEpoch // Orders with specified makerAddress and senderAddress with a salt less than this value are considered cancelled.
- );
-
- /// @dev Fills the input order.
- /// @param order Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- /// @return Amounts filled and fees paid by maker and taker.
- function fillOrderInternal(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (LibFillResults.FillResults memory fillResults);
-
- /// @dev After calling, the order can not be filled anymore.
- /// @param order Order struct containing order specifications.
- function cancelOrderInternal(LibOrder.Order memory order)
- internal;
-
- /// @dev Updates state with results of a fill order.
- /// @param order that was filled.
- /// @param takerAddress Address of taker who filled the order.
- /// @param orderTakerAssetFilledAmount Amount of order already filled.
- /// @return fillResults Amounts filled and fees paid by maker and taker.
- function updateFilledState(
- LibOrder.Order memory order,
- address takerAddress,
- bytes32 orderHash,
- uint256 orderTakerAssetFilledAmount,
- LibFillResults.FillResults memory fillResults
- )
- internal;
-
- /// @dev Updates state with results of cancelling an order.
- /// State is only updated if the order is currently fillable.
- /// Otherwise, updating state would have no effect.
- /// @param order that was cancelled.
- /// @param orderHash Hash of order that was cancelled.
- function updateCancelledState(
- LibOrder.Order memory order,
- bytes32 orderHash
- )
- internal;
-
- /// @dev Validates context for fillOrder. Succeeds or throws.
- /// @param order to be filled.
- /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.
- /// @param takerAddress Address of order taker.
- /// @param signature Proof that the orders was created by its maker.
- function assertFillableOrder(
- LibOrder.Order memory order,
- LibOrder.OrderInfo memory orderInfo,
- address takerAddress,
- bytes memory signature
- )
- internal
- view;
-
- /// @dev Validates context for fillOrder. Succeeds or throws.
- /// @param order to be filled.
- /// @param orderInfo Status, orderHash, and amount already filled of order.
- /// @param takerAssetFillAmount Desired amount of order to fill by taker.
- /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
- /// @param makerAssetFilledAmount Amount of makerAsset that will be transfered.
- function assertValidFill(
- LibOrder.Order memory order,
- LibOrder.OrderInfo memory orderInfo,
- uint256 takerAssetFillAmount,
- uint256 takerAssetFilledAmount,
- uint256 makerAssetFilledAmount
- )
- internal
- view;
-
- /// @dev Validates context for cancelOrder. Succeeds or throws.
- /// @param order to be cancelled.
- /// @param orderInfo OrderStatus, orderHash, and amount already filled of order.
- function assertValidCancel(
- LibOrder.Order memory order,
- LibOrder.OrderInfo memory orderInfo
- )
- internal
- view;
-
- /// @dev Calculates amounts filled and fees paid by maker and taker.
- /// @param order to be filled.
- /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
- /// @return fillResults Amounts filled and fees paid by maker and taker.
- function calculateFillResults(
- LibOrder.Order memory order,
- uint256 takerAssetFilledAmount
- )
- internal
- pure
- returns (LibFillResults.FillResults memory fillResults);
-
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MMatchOrders.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MMatchOrders.sol
deleted file mode 100644
index 56ee895c4..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MMatchOrders.sol
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IMatchOrders.sol";
-
-
-contract MMatchOrders is
- IMatchOrders
-{
- /// @dev Validates context for matchOrders. Succeeds or throws.
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- function assertValidMatch(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder
- )
- internal
- pure;
-
- /// @dev Calculates fill amounts for the matched orders.
- /// 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 leftOrder order goes to the taker (who matched the two orders).
- /// @param leftOrder First order to match.
- /// @param rightOrder Second order to match.
- /// @param leftOrderTakerAssetFilledAmount Amount of left order already filled.
- /// @param rightOrderTakerAssetFilledAmount Amount of right order already filled.
- /// @param matchedFillResults Amounts to fill and fees to pay by maker and taker of matched orders.
- function calculateMatchedFillResults(
- LibOrder.Order memory leftOrder,
- LibOrder.Order memory rightOrder,
- uint256 leftOrderTakerAssetFilledAmount,
- uint256 rightOrderTakerAssetFilledAmount
- )
- internal
- pure
- returns (LibFillResults.MatchedFillResults memory matchedFillResults);
-
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MSignatureValidator.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MSignatureValidator.sol
deleted file mode 100644
index 6407760d4..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MSignatureValidator.sol
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/ISignatureValidator.sol";
-
-
-contract MSignatureValidator is
- ISignatureValidator
-{
- event SignatureValidatorApproval(
- address indexed signerAddress, // Address that approves or disapproves a contract to verify signatures.
- address indexed validatorAddress, // Address of signature validator contract.
- bool approved // Approval or disapproval of validator contract.
- );
-
- // Allowed signature types.
- enum SignatureType {
- Illegal, // 0x00, default value
- Invalid, // 0x01
- EIP712, // 0x02
- EthSign, // 0x03
- Wallet, // 0x04
- Validator, // 0x05
- PreSigned, // 0x06
- NSignatureTypes // 0x07, number of signature types. Always leave at end.
- }
-
- /// @dev Verifies signature using logic defined by Wallet contract.
- /// @param hash Any 32 byte hash.
- /// @param walletAddress Address that should have signed the given hash
- /// and defines its own signature verification method.
- /// @param signature Proof that the hash has been signed by signer.
- /// @return True if the address recovered from the provided signature matches the input signer address.
- function isValidWalletSignature(
- bytes32 hash,
- address walletAddress,
- bytes signature
- )
- internal
- view
- returns (bool isValid);
-
- /// @dev Verifies signature using logic defined by Validator contract.
- /// @param validatorAddress Address of validator contract.
- /// @param hash Any 32 byte hash.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof that the hash has been signed by signer.
- /// @return True if the address recovered from the provided signature matches the input signer address.
- function isValidValidatorSignature(
- address validatorAddress,
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- internal
- view
- returns (bool isValid);
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MTransactions.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MTransactions.sol
deleted file mode 100644
index 04dd716d7..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MTransactions.sol
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/ITransactions.sol";
-
-
-contract MTransactions is
- ITransactions
-{
- // Hash for the EIP712 ZeroEx Transaction Schema
- bytes32 constant internal EIP712_ZEROEX_TRANSACTION_SCHEMA_HASH = keccak256(abi.encodePacked(
- "ZeroExTransaction(",
- "uint256 salt,",
- "address signerAddress,",
- "bytes data",
- ")"
- ));
-
- /// @dev Calculates EIP712 hash of the Transaction.
- /// @param salt Arbitrary number to ensure uniqueness of transaction hash.
- /// @param signerAddress Address of transaction signer.
- /// @param data AbiV2 encoded calldata.
- /// @return EIP712 hash of the Transaction.
- function hashZeroExTransaction(
- uint256 salt,
- address signerAddress,
- bytes memory data
- )
- internal
- pure
- returns (bytes32 result);
-
- /// @dev The current function will be called in the context of this address (either 0x transaction signer or `msg.sender`).
- /// If calling a fill function, this address will represent the taker.
- /// If calling a cancel function, this address will represent the maker.
- /// @return Signer of 0x transaction if entry point is `executeTransaction`.
- /// `msg.sender` if entry point is any other function.
- function getCurrentContextAddress()
- internal
- view
- returns (address);
-}
diff --git a/contracts/protocol/contracts/protocol/Exchange/mixins/MWrapperFunctions.sol b/contracts/protocol/contracts/protocol/Exchange/mixins/MWrapperFunctions.sol
deleted file mode 100644
index 2ff3b8790..000000000
--- a/contracts/protocol/contracts/protocol/Exchange/mixins/MWrapperFunctions.sol
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-import "@0x/contracts-libs/contracts/libs/LibFillResults.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IWrapperFunctions.sol";
-
-
-contract MWrapperFunctions is
- IWrapperFunctions
-{
- /// @dev Fills the input order. Reverts if exact takerAssetFillAmount not filled.
- /// @param order LibOrder.Order struct containing order specifications.
- /// @param takerAssetFillAmount Desired amount of takerAsset to sell.
- /// @param signature Proof that order has been created by maker.
- function fillOrKillOrderInternal(
- LibOrder.Order memory order,
- uint256 takerAssetFillAmount,
- bytes memory signature
- )
- internal
- returns (LibFillResults.FillResults memory fillResults);
-}
diff --git a/contracts/protocol/contracts/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol b/contracts/protocol/contracts/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol
deleted file mode 100644
index ad71fc9a1..000000000
--- a/contracts/protocol/contracts/test/TestAssetProxyDispatcher/TestAssetProxyDispatcher.sol
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../protocol/Exchange/MixinAssetProxyDispatcher.sol";
-
-
-contract TestAssetProxyDispatcher is
- MixinAssetProxyDispatcher
-{
- function publicDispatchTransferFrom(
- bytes memory assetData,
- address from,
- address to,
- uint256 amount
- )
- public
- {
- dispatchTransferFrom(assetData, from, to, amount);
- }
-}
diff --git a/contracts/protocol/contracts/test/TestAssetProxyOwner/TestAssetProxyOwner.sol b/contracts/protocol/contracts/test/TestAssetProxyOwner/TestAssetProxyOwner.sol
deleted file mode 100644
index 52c66cb56..000000000
--- a/contracts/protocol/contracts/test/TestAssetProxyOwner/TestAssetProxyOwner.sol
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../protocol/AssetProxyOwner/AssetProxyOwner.sol";
-
-
-// solhint-disable no-empty-blocks
-contract TestAssetProxyOwner is
- AssetProxyOwner
-{
- constructor (
- address[] memory _owners,
- address[] memory _assetProxyContracts,
- uint256 _required,
- uint256 _secondsTimeLocked
- )
- public
- AssetProxyOwner(_owners, _assetProxyContracts, _required, _secondsTimeLocked)
- {}
-
- function testValidRemoveAuthorizedAddressAtIndexTx(uint256 id)
- public
- view
- validRemoveAuthorizedAddressAtIndexTx(id)
- returns (bool)
- {
- // Do nothing. We expect reverts through the modifier
- return true;
- }
-
- /// @dev Compares first 4 bytes of byte array to `removeAuthorizedAddressAtIndex` function selector.
- /// @param data Transaction data.
- /// @return Successful if data is a call to `removeAuthorizedAddressAtIndex`.
- function isFunctionRemoveAuthorizedAddressAtIndex(bytes memory data)
- public
- pure
- returns (bool)
- {
- return data.readBytes4(0) == REMOVE_AUTHORIZED_ADDRESS_AT_INDEX_SELECTOR;
- }
-}
diff --git a/contracts/protocol/contracts/test/TestExchangeInternals/TestExchangeInternals.sol b/contracts/protocol/contracts/test/TestExchangeInternals/TestExchangeInternals.sol
deleted file mode 100644
index 27187f8f8..000000000
--- a/contracts/protocol/contracts/test/TestExchangeInternals/TestExchangeInternals.sol
+++ /dev/null
@@ -1,191 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "../../protocol/Exchange/Exchange.sol";
-
-
-// solhint-disable no-empty-blocks
-contract TestExchangeInternals is
- Exchange
-{
- constructor ()
- public
- Exchange("")
- {}
-
- /// @dev Adds properties of both FillResults instances.
- /// Modifies the first FillResults instance specified.
- /// Note that this function has been modified from the original
- // internal version to return the FillResults.
- /// @param totalFillResults Fill results instance that will be added onto.
- /// @param singleFillResults Fill results instance that will be added to totalFillResults.
- /// @return newTotalFillResults The result of adding singleFillResults to totalFilResults.
- function publicAddFillResults(FillResults memory totalFillResults, FillResults memory singleFillResults)
- public
- pure
- returns (FillResults memory)
- {
- addFillResults(totalFillResults, singleFillResults);
- return totalFillResults;
- }
-
- /// @dev Calculates amounts filled and fees paid by maker and taker.
- /// @param order to be filled.
- /// @param takerAssetFilledAmount Amount of takerAsset that will be filled.
- /// @return fillResults Amounts filled and fees paid by maker and taker.
- function publicCalculateFillResults(
- Order memory order,
- uint256 takerAssetFilledAmount
- )
- public
- pure
- returns (FillResults memory fillResults)
- {
- return calculateFillResults(order, takerAssetFilledAmount);
- }
-
- /// @dev Calculates partial value given a numerator and denominator.
- /// Reverts if rounding error is >= 0.1%
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target.
- function publicSafeGetPartialAmountFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- return safeGetPartialAmountFloor(numerator, denominator, target);
- }
-
- /// @dev Calculates partial value given a numerator and denominator.
- /// Reverts if rounding error is >= 0.1%
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target.
- function publicSafeGetPartialAmountCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- return safeGetPartialAmountCeil(numerator, denominator, target);
- }
-
- /// @dev Calculates partial value given a numerator and denominator.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target.
- function publicGetPartialAmountFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- return getPartialAmountFloor(numerator, denominator, target);
- }
-
- /// @dev Calculates partial value given a numerator and denominator.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to calculate partial of.
- /// @return Partial value of target.
- function publicGetPartialAmountCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (uint256 partialAmount)
- {
- return getPartialAmountCeil(numerator, denominator, target);
- }
-
- /// @dev Checks if rounding error >= 0.1%.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to multiply with numerator/denominator.
- /// @return Rounding error is present.
- function publicIsRoundingErrorFloor(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (bool isError)
- {
- return isRoundingErrorFloor(numerator, denominator, target);
- }
-
- /// @dev Checks if rounding error >= 0.1%.
- /// @param numerator Numerator.
- /// @param denominator Denominator.
- /// @param target Value to multiply with numerator/denominator.
- /// @return Rounding error is present.
- function publicIsRoundingErrorCeil(
- uint256 numerator,
- uint256 denominator,
- uint256 target
- )
- public
- pure
- returns (bool isError)
- {
- return isRoundingErrorCeil(numerator, denominator, target);
- }
-
- /// @dev Updates state with results of a fill order.
- /// @param order that was filled.
- /// @param takerAddress Address of taker who filled the order.
- /// @param orderTakerAssetFilledAmount Amount of order already filled.
- /// @return fillResults Amounts filled and fees paid by maker and taker.
- function publicUpdateFilledState(
- Order memory order,
- address takerAddress,
- bytes32 orderHash,
- uint256 orderTakerAssetFilledAmount,
- FillResults memory fillResults
- )
- public
- {
- updateFilledState(
- order,
- takerAddress,
- orderHash,
- orderTakerAssetFilledAmount,
- fillResults
- );
- }
-}
diff --git a/contracts/protocol/contracts/test/TestSignatureValidator/TestSignatureValidator.sol b/contracts/protocol/contracts/test/TestSignatureValidator/TestSignatureValidator.sol
deleted file mode 100644
index ea3e2de59..000000000
--- a/contracts/protocol/contracts/test/TestSignatureValidator/TestSignatureValidator.sol
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../protocol/Exchange/MixinSignatureValidator.sol";
-import "../../protocol/Exchange/MixinTransactions.sol";
-
-
-contract TestSignatureValidator is
- MixinSignatureValidator,
- MixinTransactions
-{
- function publicIsValidSignature(
- bytes32 hash,
- address signer,
- bytes memory signature
- )
- public
- view
- returns (bool isValid)
- {
- isValid = isValidSignature(
- hash,
- signer,
- signature
- );
- return isValid;
- }
-}
diff --git a/contracts/protocol/contracts/test/TestStaticCallReceiver/TestStaticCallReceiver.sol b/contracts/protocol/contracts/test/TestStaticCallReceiver/TestStaticCallReceiver.sol
deleted file mode 100644
index d08da7303..000000000
--- a/contracts/protocol/contracts/test/TestStaticCallReceiver/TestStaticCallReceiver.sol
+++ /dev/null
@@ -1,81 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-tokens/contracts/tokens/ERC20Token/IERC20Token.sol";
-
-
-// solhint-disable no-unused-vars
-contract TestStaticCallReceiver {
-
- uint256 internal state = 1;
-
- /// @dev Updates state and returns true. Intended to be used with `Validator` signature type.
- /// @param hash Message hash that is signed.
- /// @param signerAddress Address that should have signed the given hash.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- function isValidSignature(
- bytes32 hash,
- address signerAddress,
- bytes signature
- )
- external
- returns (bool isValid)
- {
- updateState();
- return true;
- }
-
- /// @dev Updates state and returns true. Intended to be used with `Wallet` signature type.
- /// @param hash Message hash that is signed.
- /// @param signature Proof of signing.
- /// @return Validity of order signature.
- function isValidSignature(
- bytes32 hash,
- bytes signature
- )
- external
- returns (bool isValid)
- {
- updateState();
- return true;
- }
-
- /// @dev Approves an ERC20 token to spend tokens from this address.
- /// @param token Address of ERC20 token.
- /// @param spender Address that will spend tokens.
- /// @param value Amount of tokens spender is approved to spend.
- function approveERC20(
- address token,
- address spender,
- uint256 value
- )
- external
- {
- IERC20Token(token).approve(spender, value);
- }
-
- /// @dev Increments state variable.
- function updateState()
- internal
- {
- state++;
- }
-}
diff --git a/contracts/protocol/package.json b/contracts/protocol/package.json
deleted file mode 100644
index d1ef70a70..000000000
--- a/contracts/protocol/package.json
+++ /dev/null
@@ -1,93 +0,0 @@
-{
- "name": "@0x/contracts-protocol",
- "version": "2.2.3",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract components of 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(AssetProxyOwner|ERC20Proxy|ERC721Proxy|Exchange|MixinAuthorizable|MultiAssetProxy|TestSignatureValidator|TestAssetProxyOwner|TestAssetProxyDispatcher|TestExchangeInternals|TestStaticCallReceiver).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/contracts/protocol/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-examples": "^1.0.6",
- "@0x/contracts-interfaces": "^1.0.6",
- "@0x/contracts-libs": "^1.0.6",
- "@0x/contracts-multisig": "^1.0.6",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/contracts-tokens": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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",
- "@types/js-combinatorics": "^0.5.29",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/protocol/src/artifacts/index.ts b/contracts/protocol/src/artifacts/index.ts
deleted file mode 100644
index c5d12f10b..000000000
--- a/contracts/protocol/src/artifacts/index.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as AssetProxyOwner from '../../generated-artifacts/AssetProxyOwner.json';
-import * as ERC20Proxy from '../../generated-artifacts/ERC20Proxy.json';
-import * as ERC721Proxy from '../../generated-artifacts/ERC721Proxy.json';
-import * as Exchange from '../../generated-artifacts/Exchange.json';
-import * as MixinAuthorizable from '../../generated-artifacts/MixinAuthorizable.json';
-import * as MultiAssetProxy from '../../generated-artifacts/MultiAssetProxy.json';
-import * as TestAssetProxyDispatcher from '../../generated-artifacts/TestAssetProxyDispatcher.json';
-import * as TestAssetProxyOwner from '../../generated-artifacts/TestAssetProxyOwner.json';
-import * as TestExchangeInternals from '../../generated-artifacts/TestExchangeInternals.json';
-import * as TestSignatureValidator from '../../generated-artifacts/TestSignatureValidator.json';
-import * as TestStaticCallReceiver from '../../generated-artifacts/TestStaticCallReceiver.json';
-
-export const artifacts = {
- AssetProxyOwner: AssetProxyOwner as ContractArtifact,
- ERC20Proxy: ERC20Proxy as ContractArtifact,
- ERC721Proxy: ERC721Proxy as ContractArtifact,
- Exchange: Exchange as ContractArtifact,
- MixinAuthorizable: MixinAuthorizable as ContractArtifact,
- MultiAssetProxy: MultiAssetProxy as ContractArtifact,
- TestAssetProxyDispatcher: TestAssetProxyDispatcher as ContractArtifact,
- TestAssetProxyOwner: TestAssetProxyOwner as ContractArtifact,
- TestExchangeInternals: TestExchangeInternals as ContractArtifact,
- TestSignatureValidator: TestSignatureValidator as ContractArtifact,
- TestStaticCallReceiver: TestStaticCallReceiver as ContractArtifact,
-};
diff --git a/contracts/protocol/src/index.ts b/contracts/protocol/src/index.ts
deleted file mode 100644
index ba813e7ca..000000000
--- a/contracts/protocol/src/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
-export * from '../test/utils';
diff --git a/contracts/protocol/src/wrappers/index.ts b/contracts/protocol/src/wrappers/index.ts
deleted file mode 100644
index 01b121054..000000000
--- a/contracts/protocol/src/wrappers/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export * from '../../generated-wrappers/asset_proxy_owner';
-export * from '../../generated-wrappers/erc20_proxy';
-export * from '../../generated-wrappers/erc721_proxy';
-export * from '../../generated-wrappers/exchange';
-export * from '../../generated-wrappers/mixin_authorizable';
-export * from '../../generated-wrappers/test_asset_proxy_dispatcher';
-export * from '../../generated-wrappers/test_asset_proxy_owner';
-export * from '../../generated-wrappers/test_exchange_internals';
-export * from '../../generated-wrappers/test_signature_validator';
-export * from '../../generated-wrappers/test_static_call_receiver';
diff --git a/contracts/protocol/test/asset_proxy/authorizable.ts b/contracts/protocol/test/asset_proxy/authorizable.ts
deleted file mode 100644
index 853d18be0..000000000
--- a/contracts/protocol/test/asset_proxy/authorizable.ts
+++ /dev/null
@@ -1,211 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { MixinAuthorizableContract } from '../../generated-wrappers/mixin_authorizable';
-import { artifacts } from '../../src/artifacts';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('Authorizable', () => {
- let owner: string;
- let notOwner: string;
- let address: string;
- let authorizable: MixinAuthorizableContract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- [owner, address, notOwner] = _.slice(accounts, 0, 3);
- authorizable = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
- artifacts.MixinAuthorizable,
- provider,
- txDefaults,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('addAuthorizedAddress', () => {
- it('should throw if not called by owner', async () => {
- return expectTransactionFailedAsync(
- authorizable.addAuthorizedAddress.sendTransactionAsync(notOwner, { from: notOwner }),
- RevertReason.OnlyContractOwner,
- );
- });
- it('should allow owner to add an authorized address', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isAuthorized = await authorizable.authorized.callAsync(address);
- expect(isAuthorized).to.be.true();
- });
- it('should throw if owner attempts to authorize a duplicate address', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- return expectTransactionFailedAsync(
- authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- RevertReason.TargetAlreadyAuthorized,
- );
- });
- });
-
- describe('removeAuthorizedAddress', () => {
- it('should throw if not called by owner', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddress.sendTransactionAsync(address, {
- from: notOwner,
- }),
- RevertReason.OnlyContractOwner,
- );
- });
-
- it('should allow owner to remove an authorized address', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.removeAuthorizedAddress.sendTransactionAsync(address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isAuthorized = await authorizable.authorized.callAsync(address);
- expect(isAuthorized).to.be.false();
- });
-
- it('should throw if owner attempts to remove an address that is not authorized', async () => {
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddress.sendTransactionAsync(address, {
- from: owner,
- }),
- RevertReason.TargetNotAuthorized,
- );
- });
- });
-
- describe('removeAuthorizedAddressAtIndex', () => {
- it('should throw if not called by owner', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const index = new BigNumber(0);
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, {
- from: notOwner,
- }),
- RevertReason.OnlyContractOwner,
- );
- });
- it('should throw if index is >= authorities.length', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const index = new BigNumber(1);
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, {
- from: owner,
- }),
- RevertReason.IndexOutOfBounds,
- );
- });
- it('should throw if owner attempts to remove an address that is not authorized', async () => {
- const index = new BigNumber(0);
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, {
- from: owner,
- }),
- RevertReason.TargetNotAuthorized,
- );
- });
- it('should throw if address at index does not match target', async () => {
- const address1 = address;
- const address2 = notOwner;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address1, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address2, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const address1Index = new BigNumber(0);
- return expectTransactionFailedAsync(
- authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address2, address1Index, {
- from: owner,
- }),
- RevertReason.AuthorizedAddressMismatch,
- );
- });
- it('should allow owner to remove an authorized address', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const index = new BigNumber(0);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.removeAuthorizedAddressAtIndex.sendTransactionAsync(address, index, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const isAuthorized = await authorizable.authorized.callAsync(address);
- expect(isAuthorized).to.be.false();
- });
- });
-
- describe('getAuthorizedAddresses', () => {
- it('should return all authorized addresses', async () => {
- const initial = await authorizable.getAuthorizedAddresses.callAsync();
- expect(initial).to.have.length(0);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.addAuthorizedAddress.sendTransactionAsync(address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const afterAdd = await authorizable.getAuthorizedAddresses.callAsync();
- expect(afterAdd).to.have.length(1);
- expect(afterAdd).to.include(address);
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await authorizable.removeAuthorizedAddress.sendTransactionAsync(address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const afterRemove = await authorizable.getAuthorizedAddresses.callAsync();
- expect(afterRemove).to.have.length(0);
- });
- });
-});
diff --git a/contracts/protocol/test/asset_proxy/proxies.ts b/contracts/protocol/test/asset_proxy/proxies.ts
deleted file mode 100644
index c34be9c6a..000000000
--- a/contracts/protocol/test/asset_proxy/proxies.ts
+++ /dev/null
@@ -1,1285 +0,0 @@
-import { artifacts as interfacesArtifacts, IAssetDataContract, IAssetProxyContract } from '@0x/contracts-interfaces';
-import {
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- expectTransactionFailedWithoutReasonAsync,
- LogDecoder,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC20TokenTransferEventArgs,
- DummyERC721ReceiverContract,
- DummyERC721TokenContract,
- DummyMultipleReturnERC20TokenContract,
- DummyNoReturnERC20TokenContract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { MultiAssetProxyContract } from '../../generated-wrappers/multi_asset_proxy';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ERC721Wrapper } from '../utils/erc721_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-const assetProxyInterface = new IAssetProxyContract(
- interfacesArtifacts.IAssetProxy.compilerOutput.abi,
- constants.NULL_ADDRESS,
- provider,
-);
-const assetDataInterface = new IAssetDataContract(
- interfacesArtifacts.IAssetData.compilerOutput.abi,
- constants.NULL_ADDRESS,
- provider,
-);
-
-// tslint:disable:no-unnecessary-type-assertion
-describe('Asset Transfer Proxies', () => {
- let owner: string;
- let notAuthorized: string;
- let authorized: string;
- let fromAddress: string;
- let toAddress: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let erc721TokenA: DummyERC721TokenContract;
- let erc721TokenB: DummyERC721TokenContract;
- let erc721Receiver: DummyERC721ReceiverContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
- let noReturnErc20Token: DummyNoReturnERC20TokenContract;
- let multipleReturnErc20Token: DummyMultipleReturnERC20TokenContract;
- let multiAssetProxy: MultiAssetProxyContract;
-
- let erc20Wrapper: ERC20Wrapper;
- let erc721Wrapper: ERC721Wrapper;
- let erc721AFromTokenId: BigNumber;
- let erc721BFromTokenId: BigNumber;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, notAuthorized, authorized, fromAddress, toAddress] = _.slice(accounts, 0, 5));
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
-
- // Deploy AssetProxies
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
- multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
- artifacts.MultiAssetProxy,
- provider,
- txDefaults,
- );
-
- // Configure ERC20Proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Configure ERC721Proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Configure MultiAssetProxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.addAuthorizedAddress.sendTransactionAsync(authorized, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Deploy and configure ERC20 tokens
- const numDummyErc20ToDeploy = 2;
- [erc20TokenA, erc20TokenB] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyNoReturnERC20Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- constants.DUMMY_TOKEN_DECIMALS,
- constants.DUMMY_TOKEN_TOTAL_SUPPLY,
- );
- multipleReturnErc20Token = await DummyMultipleReturnERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyMultipleReturnERC20Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- constants.DUMMY_TOKEN_DECIMALS,
- constants.DUMMY_TOKEN_TOTAL_SUPPLY,
- );
-
- await erc20Wrapper.setBalancesAndAllowancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await noReturnErc20Token.setBalance.sendTransactionAsync(fromAddress, constants.INITIAL_ERC20_BALANCE),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await noReturnErc20Token.approve.sendTransactionAsync(
- erc20Proxy.address,
- constants.INITIAL_ERC20_ALLOWANCE,
- { from: fromAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multipleReturnErc20Token.setBalance.sendTransactionAsync(
- fromAddress,
- constants.INITIAL_ERC20_BALANCE,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multipleReturnErc20Token.approve.sendTransactionAsync(
- erc20Proxy.address,
- constants.INITIAL_ERC20_ALLOWANCE,
- { from: fromAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Deploy and configure ERC721 tokens and receiver
- [erc721TokenA, erc721TokenB] = await erc721Wrapper.deployDummyTokensAsync();
- erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC721Receiver,
- provider,
- txDefaults,
- );
-
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721AFromTokenId = erc721Balances[fromAddress][erc721TokenA.address][0];
- erc721BFromTokenId = erc721Balances[fromAddress][erc721TokenB.address][0];
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('ERC20Proxy', () => {
- it('should revert if undefined function is called', async () => {
- const undefinedSelector = '0x01020304';
- await expectTransactionFailedWithoutReasonAsync(
- web3Wrapper.sendTransactionAsync({
- from: owner,
- to: erc20Proxy.address,
- value: constants.ZERO_AMOUNT,
- data: undefinedSelector,
- }),
- );
- });
- it('should have an id of 0xf47261b0', async () => {
- const proxyId = await erc20Proxy.getProxyId.callAsync();
- const expectedProxyId = '0xf47261b0';
- expect(proxyId).to.equal(expectedProxyId);
- });
- describe('transferFrom', () => {
- it('should successfully transfer tokens', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- // Perform a transfer from fromAddress to toAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(amount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(amount),
- );
- });
-
- it('should successfully transfer tokens that do not return a value', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(noReturnErc20Token.address);
- // Perform a transfer from fromAddress to toAddress
- const initialFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress);
- const initialToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress);
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress);
- const newToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress);
- expect(newFromBalance).to.be.bignumber.equal(initialFromBalance.minus(amount));
- expect(newToBalance).to.be.bignumber.equal(initialToBalance.plus(amount));
- });
-
- it('should successfully transfer tokens and ignore extra assetData', async () => {
- // Construct ERC20 asset data
- const extraData = '0102030405060708';
- const encodedAssetData = `${assetDataUtils.encodeERC20AssetData(erc20TokenA.address)}${extraData}`;
- // Perform a transfer from fromAddress to toAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(amount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(amount),
- );
- });
-
- it('should do nothing if transferring 0 amount of a token', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- // Perform a transfer from fromAddress to toAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = new BigNumber(0);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address],
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address],
- );
- });
-
- it('should revert if allowances are too low', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- // Create allowance less than transfer amount. Set allowance on proxy.
- const allowance = new BigNumber(0);
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenA.approve.sendTransactionAsync(erc20Proxy.address, allowance, {
- from: fromAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- // Perform a transfer; expect this to fail.
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.TransferFailed,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.deep.equal(erc20Balances);
- });
-
- it('should revert if allowances are too low and token does not return a value', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(noReturnErc20Token.address);
- // Create allowance less than transfer amount. Set allowance on proxy.
- const allowance = new BigNumber(0);
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await noReturnErc20Token.approve.sendTransactionAsync(erc20Proxy.address, allowance, {
- from: fromAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const initialFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress);
- const initialToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress);
- // Perform a transfer; expect this to fail.
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.TransferFailed,
- );
- const newFromBalance = await noReturnErc20Token.balanceOf.callAsync(fromAddress);
- const newToBalance = await noReturnErc20Token.balanceOf.callAsync(toAddress);
- expect(newFromBalance).to.be.bignumber.equal(initialFromBalance);
- expect(newToBalance).to.be.bignumber.equal(initialToBalance);
- });
-
- it('should revert if caller is not authorized', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: notAuthorized,
- }),
- RevertReason.SenderNotAuthorized,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.deep.equal(erc20Balances);
- });
-
- it('should revert if token returns more than 32 bytes', async () => {
- // Construct ERC20 asset data
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(multipleReturnErc20Token.address);
- const amount = new BigNumber(10);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- const initialFromBalance = await multipleReturnErc20Token.balanceOf.callAsync(fromAddress);
- const initialToBalance = await multipleReturnErc20Token.balanceOf.callAsync(toAddress);
- // Perform a transfer; expect this to fail.
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc20Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.TransferFailed,
- );
- const newFromBalance = await multipleReturnErc20Token.balanceOf.callAsync(fromAddress);
- const newToBalance = await multipleReturnErc20Token.balanceOf.callAsync(toAddress);
- expect(newFromBalance).to.be.bignumber.equal(initialFromBalance);
- expect(newToBalance).to.be.bignumber.equal(initialToBalance);
- });
- });
- });
-
- describe('ERC721Proxy', () => {
- it('should revert if undefined function is called', async () => {
- const undefinedSelector = '0x01020304';
- await expectTransactionFailedWithoutReasonAsync(
- web3Wrapper.sendTransactionAsync({
- from: owner,
- to: erc721Proxy.address,
- value: constants.ZERO_AMOUNT,
- data: undefinedSelector,
- }),
- );
- });
- it('should have an id of 0x02571792', async () => {
- const proxyId = await erc721Proxy.getProxyId.callAsync();
- const expectedProxyId = '0x02571792';
- expect(proxyId).to.equal(expectedProxyId);
- });
- describe('transferFrom', () => {
- it('should successfully transfer tokens', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(1);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.bignumber.equal(toAddress);
- });
-
- it('should successfully transfer tokens and ignore extra assetData', async () => {
- // Construct ERC721 asset data
- const extraData = '0102030405060708';
- const encodedAssetData = `${assetDataUtils.encodeERC721AssetData(
- erc721TokenA.address,
- erc721AFromTokenId,
- )}${extraData}`;
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(1);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.bignumber.equal(toAddress);
- });
-
- it('should not call onERC721Received when transferring to a smart contract', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(1);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- erc721Receiver.address,
- amount,
- );
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
- const tx = await logDecoder.getTxWithDecodedLogsAsync(
- await web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- gas: constants.MAX_TRANSFER_FROM_GAS,
- }),
- );
- // Verify that no log was emitted by erc721 receiver
- expect(tx.logs.length).to.be.equal(1);
- // Verify transfer was successful
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.bignumber.equal(erc721Receiver.address);
- });
-
- it('should revert if transferring 0 amount of a token', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(0);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.InvalidAmount,
- );
- const newOwner = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwner).to.be.equal(ownerFromAsset);
- });
-
- it('should revert if transferring > 1 amount of a token', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(500);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.InvalidAmount,
- );
- const newOwner = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwner).to.be.equal(ownerFromAsset);
- });
-
- it('should revert if allowances are too low', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Remove transfer approval for fromAddress.
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721TokenA.approve.sendTransactionAsync(constants.NULL_ADDRESS, erc721AFromTokenId, {
- from: fromAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Perform a transfer; expect this to fail.
- const amount = new BigNumber(1);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: authorized,
- }),
- RevertReason.TransferFailed,
- );
- const newOwner = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwner).to.be.equal(ownerFromAsset);
- });
-
- it('should revert if caller is not authorized', async () => {
- // Construct ERC721 asset data
- const encodedAssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- // Verify pre-condition
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- // Perform a transfer from fromAddress to toAddress
- const amount = new BigNumber(1);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- encodedAssetData,
- fromAddress,
- toAddress,
- amount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: erc721Proxy.address,
- data,
- from: notAuthorized,
- }),
- RevertReason.SenderNotAuthorized,
- );
- const newOwner = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwner).to.be.equal(ownerFromAsset);
- });
- });
- });
- describe('MultiAssetProxy', () => {
- it('should revert if undefined function is called', async () => {
- const undefinedSelector = '0x01020304';
- await expectTransactionFailedWithoutReasonAsync(
- web3Wrapper.sendTransactionAsync({
- from: owner,
- to: multiAssetProxy.address,
- value: constants.ZERO_AMOUNT,
- data: undefinedSelector,
- }),
- );
- });
- it('should have an id of 0x94cfcdd7', async () => {
- const proxyId = await multiAssetProxy.getProxyId.callAsync();
- // first 4 bytes of `keccak256('MultiAsset(uint256[],bytes[])')`
- const expectedProxyId = '0x94cfcdd7';
- expect(proxyId).to.equal(expectedProxyId);
- });
- describe('transferFrom', () => {
- it('should transfer a single ERC20 token', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const amounts = [erc20Amount];
- const nestedAssetData = [erc20AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalAmount = inputAmount.times(erc20Amount);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
- );
- });
- it('should dispatch an ERC20 transfer when input amount is 0', async () => {
- const inputAmount = constants.ZERO_AMOUNT;
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const amounts = [erc20Amount];
- const nestedAssetData = [erc20AssetData];
- const assetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const logDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
- const tx = await logDecoder.getTxWithDecodedLogsAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- );
- expect(tx.logs.length).to.be.equal(1);
- const log = tx.logs[0] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>;
- const transferEventName = 'Transfer';
- expect(log.event).to.equal(transferEventName);
- expect(log.args._value).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.deep.equal(erc20Balances);
- });
- it('should successfully transfer multiple of the same ERC20 token', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount1 = new BigNumber(10);
- const erc20Amount2 = new BigNumber(20);
- const erc20AssetData1 = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc20AssetData2 = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const amounts = [erc20Amount1, erc20Amount2];
- const nestedAssetData = [erc20AssetData1, erc20AssetData2];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalAmount = inputAmount.times(erc20Amount1).plus(inputAmount.times(erc20Amount2));
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
- );
- });
- it('should successfully transfer multiple different ERC20 tokens', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount1 = new BigNumber(10);
- const erc20Amount2 = new BigNumber(20);
- const erc20AssetData1 = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc20AssetData2 = assetDataUtils.encodeERC20AssetData(erc20TokenB.address);
- const amounts = [erc20Amount1, erc20Amount2];
- const nestedAssetData = [erc20AssetData1, erc20AssetData2];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalErc20AAmount = inputAmount.times(erc20Amount1);
- const totalErc20BAmount = inputAmount.times(erc20Amount2);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
- );
- expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
- );
- expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
- );
- });
- it('should transfer a single ERC721 token', async () => {
- const inputAmount = new BigNumber(1);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc721Amount];
- const nestedAssetData = [erc721AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.equal(toAddress);
- });
- it('should successfully transfer multiple of the same ERC721 token', async () => {
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- const erc721AFromTokenId2 = erc721Balances[fromAddress][erc721TokenA.address][1];
- const erc721AssetData1 = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const erc721AssetData2 = assetDataUtils.encodeERC721AssetData(
- erc721TokenA.address,
- erc721AFromTokenId2,
- );
- const inputAmount = new BigNumber(1);
- const erc721Amount = new BigNumber(1);
- const amounts = [erc721Amount, erc721Amount];
- const nestedAssetData = [erc721AssetData1, erc721AssetData2];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const ownerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset1).to.be.equal(fromAddress);
- const ownerFromAsset2 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId2);
- expect(ownerFromAsset2).to.be.equal(fromAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- gas: constants.MAX_TRANSFER_FROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newOwnerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- const newOwnerFromAsset2 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId2);
- expect(newOwnerFromAsset1).to.be.equal(toAddress);
- expect(newOwnerFromAsset2).to.be.equal(toAddress);
- });
- it('should successfully transfer multiple different ERC721 tokens', async () => {
- const erc721AssetData1 = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const erc721AssetData2 = assetDataUtils.encodeERC721AssetData(erc721TokenB.address, erc721BFromTokenId);
- const inputAmount = new BigNumber(1);
- const erc721Amount = new BigNumber(1);
- const amounts = [erc721Amount, erc721Amount];
- const nestedAssetData = [erc721AssetData1, erc721AssetData2];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const ownerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset1).to.be.equal(fromAddress);
- const ownerFromAsset2 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId);
- expect(ownerFromAsset2).to.be.equal(fromAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- gas: constants.MAX_TRANSFER_FROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newOwnerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- const newOwnerFromAsset2 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId);
- expect(newOwnerFromAsset1).to.be.equal(toAddress);
- expect(newOwnerFromAsset2).to.be.equal(toAddress);
- });
- it('should successfully transfer a combination of ERC20 and ERC721 tokens', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalAmount = inputAmount.times(erc20Amount);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
- );
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.equal(toAddress);
- });
- it('should successfully transfer tokens and ignore extra assetData', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- const extraData = '0102030405060708';
- const assetData = `${assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData)}${extraData}`;
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const ownerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset).to.be.equal(fromAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalAmount = inputAmount.times(erc20Amount);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalAmount),
- );
- const newOwnerFromAsset = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(newOwnerFromAsset).to.be.equal(toAddress);
- });
- it('should successfully transfer correct amounts when the `amount` > 1', async () => {
- const inputAmount = new BigNumber(100);
- const erc20Amount1 = new BigNumber(10);
- const erc20Amount2 = new BigNumber(20);
- const erc20AssetData1 = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc20AssetData2 = assetDataUtils.encodeERC20AssetData(erc20TokenB.address);
- const amounts = [erc20Amount1, erc20Amount2];
- const nestedAssetData = [erc20AssetData1, erc20AssetData2];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalErc20AAmount = inputAmount.times(erc20Amount1);
- const totalErc20BAmount = inputAmount.times(erc20Amount2);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
- );
- expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
- );
- expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
- );
- });
- it('should successfully transfer a large amount of tokens', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount1 = new BigNumber(10);
- const erc20Amount2 = new BigNumber(20);
- const erc20AssetData1 = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc20AssetData2 = assetDataUtils.encodeERC20AssetData(erc20TokenB.address);
- const erc721Amount = new BigNumber(1);
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- const erc721AFromTokenId2 = erc721Balances[fromAddress][erc721TokenA.address][1];
- const erc721BFromTokenId2 = erc721Balances[fromAddress][erc721TokenB.address][1];
- const erc721AssetData1 = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const erc721AssetData2 = assetDataUtils.encodeERC721AssetData(
- erc721TokenA.address,
- erc721AFromTokenId2,
- );
- const erc721AssetData3 = assetDataUtils.encodeERC721AssetData(erc721TokenB.address, erc721BFromTokenId);
- const erc721AssetData4 = assetDataUtils.encodeERC721AssetData(
- erc721TokenB.address,
- erc721BFromTokenId2,
- );
- const amounts = [erc721Amount, erc20Amount1, erc721Amount, erc20Amount2, erc721Amount, erc721Amount];
- const nestedAssetData = [
- erc721AssetData1,
- erc20AssetData1,
- erc721AssetData2,
- erc20AssetData2,
- erc721AssetData3,
- erc721AssetData4,
- ];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- const ownerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- expect(ownerFromAsset1).to.be.equal(fromAddress);
- const ownerFromAsset2 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId2);
- expect(ownerFromAsset2).to.be.equal(fromAddress);
- const ownerFromAsset3 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId);
- expect(ownerFromAsset3).to.be.equal(fromAddress);
- const ownerFromAsset4 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId2);
- expect(ownerFromAsset4).to.be.equal(fromAddress);
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- gas: constants.MAX_EXECUTE_TRANSACTION_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const newOwnerFromAsset1 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId);
- const newOwnerFromAsset2 = await erc721TokenA.ownerOf.callAsync(erc721AFromTokenId2);
- const newOwnerFromAsset3 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId);
- const newOwnerFromAsset4 = await erc721TokenB.ownerOf.callAsync(erc721BFromTokenId2);
- expect(newOwnerFromAsset1).to.be.equal(toAddress);
- expect(newOwnerFromAsset2).to.be.equal(toAddress);
- expect(newOwnerFromAsset3).to.be.equal(toAddress);
- expect(newOwnerFromAsset4).to.be.equal(toAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const totalErc20AAmount = inputAmount.times(erc20Amount1);
- const totalErc20BAmount = inputAmount.times(erc20Amount2);
- expect(newBalances[fromAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenA.address].minus(totalErc20AAmount),
- );
- expect(newBalances[toAddress][erc20TokenA.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenA.address].plus(totalErc20AAmount),
- );
- expect(newBalances[fromAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[fromAddress][erc20TokenB.address].minus(totalErc20BAmount),
- );
- expect(newBalances[toAddress][erc20TokenB.address]).to.be.bignumber.equal(
- erc20Balances[toAddress][erc20TokenB.address].plus(totalErc20BAmount),
- );
- });
- it('should revert if a single transfer fails', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- // 2 is an invalid erc721 amount
- const erc721Amount = new BigNumber(2);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- RevertReason.InvalidAmount,
- );
- });
- it('should revert if an AssetProxy is not registered', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const invalidProxyId = '0x12345678';
- const invalidErc721AssetData = `${invalidProxyId}${erc721AssetData.slice(10)}`;
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, invalidErc721AssetData];
- // HACK: This is used to get around validation built into assetDataUtils
- const assetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- RevertReason.AssetProxyDoesNotExist,
- );
- });
- it('should revert if the length of `amounts` does not match the length of `nestedAssetData`', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc20Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- // HACK: This is used to get around validation built into assetDataUtils
- const assetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- RevertReason.LengthMismatch,
- );
- });
- it('should revert if amounts multiplication results in an overflow', async () => {
- const inputAmount = new BigNumber(2).pow(128);
- const erc20Amount = new BigNumber(2).pow(128);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const amounts = [erc20Amount];
- const nestedAssetData = [erc20AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- RevertReason.Uint256Overflow,
- );
- });
- it('should revert if an element of `nestedAssetData` is < 4 bytes long', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = '0x123456';
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- // HACK: This is used to get around validation built into assetDataUtils
- const assetData = assetDataInterface.MultiAsset.getABIEncodedTransactionData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: authorized,
- }),
- RevertReason.LengthGreaterThan3Required,
- );
- });
- it('should revert if caller is not authorized', async () => {
- const inputAmount = new BigNumber(1);
- const erc20Amount = new BigNumber(10);
- const erc20AssetData = assetDataUtils.encodeERC20AssetData(erc20TokenA.address);
- const erc721Amount = new BigNumber(1);
- const erc721AssetData = assetDataUtils.encodeERC721AssetData(erc721TokenA.address, erc721AFromTokenId);
- const amounts = [erc20Amount, erc721Amount];
- const nestedAssetData = [erc20AssetData, erc721AssetData];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const data = assetProxyInterface.transferFrom.getABIEncodedTransactionData(
- assetData,
- fromAddress,
- toAddress,
- inputAmount,
- );
- await expectTransactionFailedAsync(
- web3Wrapper.sendTransactionAsync({
- to: multiAssetProxy.address,
- data,
- from: notAuthorized,
- }),
- RevertReason.SenderNotAuthorized,
- );
- });
- });
- });
-});
-// tslint:enable:no-unnecessary-type-assertion
-// tslint:disable:max-file-line-count
diff --git a/contracts/protocol/test/exchange/core.ts b/contracts/protocol/test/exchange/core.ts
deleted file mode 100644
index f88be1c94..000000000
--- a/contracts/protocol/test/exchange/core.ts
+++ /dev/null
@@ -1,1157 +0,0 @@
-import {
- chaiSetup,
- constants,
- ERC20BalancesByOwner,
- expectTransactionFailedAsync,
- getLatestBlockTimestampAsync,
- increaseTimeAndMineBlockAsync,
- OrderFactory,
- OrderStatus,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC20TokenTransferEventArgs,
- DummyERC721TokenContract,
- DummyNoReturnERC20TokenContract,
- ReentrantERC20TokenContract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { RevertReason, SignatureType, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import ethUtil = require('ethereumjs-util');
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { ExchangeCancelEventArgs, ExchangeContract } from '../../generated-wrappers/exchange';
-import { MultiAssetProxyContract } from '../../generated-wrappers/multi_asset_proxy';
-import { TestStaticCallReceiverContract } from '../../generated-wrappers/test_static_call_receiver';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ERC721Wrapper } from '../utils/erc721_wrapper';
-import { ExchangeWrapper } from '../utils/exchange_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('Exchange core', () => {
- let makerAddress: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddress: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let noReturnErc20Token: DummyNoReturnERC20TokenContract;
- let reentrantErc20Token: ReentrantERC20TokenContract;
- let exchange: ExchangeContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
- let multiAssetProxy: MultiAssetProxyContract;
- let maliciousWallet: TestStaticCallReceiverContract;
- let maliciousValidator: TestStaticCallReceiverContract;
-
- let signedOrder: SignedOrder;
- let erc20Balances: ERC20BalancesByOwner;
- let exchangeWrapper: ExchangeWrapper;
- let erc20Wrapper: ERC20Wrapper;
- let erc721Wrapper: ERC721Wrapper;
- let orderFactory: OrderFactory;
-
- let erc721MakerAssetIds: BigNumber[];
- let erc721TakerAssetIds: BigNumber[];
-
- let defaultMakerAssetAddress: string;
- let defaultTakerAssetAddress: string;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = _.slice(accounts, 0, 4));
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
-
- // Deploy AssetProxies, Exchange, tokens, and malicious contracts
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
- multiAssetProxy = await MultiAssetProxyContract.deployFrom0xArtifactAsync(
- artifacts.MultiAssetProxy,
- provider,
- txDefaults,
- );
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
- maliciousWallet = maliciousValidator = await TestStaticCallReceiverContract.deployFrom0xArtifactAsync(
- artifacts.TestStaticCallReceiver,
- provider,
- txDefaults,
- );
- reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.ReentrantERC20Token,
- provider,
- txDefaults,
- exchange.address,
- );
-
- // Configure ERC20Proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Configure ERC721Proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Configure MultiAssetProxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- // Configure Exchange
- exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(multiAssetProxy.address, owner);
-
- // Configure ERC20 tokens
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- // Configure ERC721 tokens
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721MakerAssetIds = erc721Balances[makerAddress][erc721Token.address];
- erc721TakerAssetIds = erc721Balances[takerAddress][erc721Token.address];
-
- // Configure order defaults
- defaultMakerAssetAddress = erc20TokenA.address;
- defaultTakerAssetAddress = erc20TokenB.address;
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- exchangeAddress: exchange.address,
- makerAddress,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- };
- const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- orderFactory = new OrderFactory(privateKey, defaultOrderParams);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('fillOrder', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
-
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow fillOrder to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('fillOrder reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should throw if signature is invalid', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
-
- const v = ethUtil.toBuffer(signedOrder.signature.slice(0, 4));
- const invalidR = ethUtil.sha3('invalidR');
- const invalidS = ethUtil.sha3('invalidS');
- const signatureType = ethUtil.toBuffer(`0x${signedOrder.signature.slice(-2)}`);
- const invalidSigBuff = Buffer.concat([v, invalidR, invalidS, signatureType]);
- const invalidSigHex = `0x${invalidSigBuff.toString('hex')}`;
- signedOrder.signature = invalidSigHex;
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
- RevertReason.InvalidOrderSignature,
- );
- });
-
- it('should throw if no value is filled', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should revert if `isValidSignature` tries to update state when SignatureType=Wallet', async () => {
- const maliciousMakerAddress = maliciousWallet.address;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenA.setBalance.sendTransactionAsync(
- maliciousMakerAddress,
- constants.INITIAL_ERC20_BALANCE,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await maliciousWallet.approveERC20.sendTransactionAsync(
- erc20TokenA.address,
- erc20Proxy.address,
- constants.INITIAL_ERC20_ALLOWANCE,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAddress: maliciousMakerAddress,
- makerFee: constants.ZERO_AMOUNT,
- });
- signedOrder.signature = `0x0${SignatureType.Wallet}`;
- await expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
- RevertReason.WalletError,
- );
- });
-
- it('should revert if `isValidSignature` tries to update state when SignatureType=Validator', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.setSignatureValidatorApproval.sendTransactionAsync(
- maliciousValidator.address,
- isApproved,
- { from: makerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- signedOrder.signature = `${maliciousValidator.address}0${SignatureType.Validator}`;
- await expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress),
- RevertReason.ValidatorError,
- );
- });
-
- it('should not emit transfer events for transfers where from == to', async () => {
- const txReceipt = await exchangeWrapper.fillOrderAsync(signedOrder, makerAddress);
- const logs = txReceipt.logs;
- const transferLogs = _.filter(
- logs,
- log => (log as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).event === 'Transfer',
- );
- expect(transferLogs.length).to.be.equal(2);
- expect((transferLogs[0] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).address).to.be.equal(
- zrxToken.address,
- );
- expect((transferLogs[0] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._from).to.be.equal(
- makerAddress,
- );
- expect((transferLogs[0] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._to).to.be.equal(
- feeRecipientAddress,
- );
- expect(
- (transferLogs[0] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._value,
- ).to.be.bignumber.equal(signedOrder.makerFee);
- expect((transferLogs[1] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).address).to.be.equal(
- zrxToken.address,
- );
- expect((transferLogs[1] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._from).to.be.equal(
- makerAddress,
- );
- expect((transferLogs[1] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._to).to.be.equal(
- feeRecipientAddress,
- );
- expect(
- (transferLogs[1] as LogWithDecodedArgs<DummyERC20TokenTransferEventArgs>).args._value,
- ).to.be.bignumber.equal(signedOrder.takerFee);
- });
- });
-
- describe('Testing exchange of ERC20 tokens with no return values', () => {
- before(async () => {
- noReturnErc20Token = await DummyNoReturnERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyNoReturnERC20Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- constants.DUMMY_TOKEN_DECIMALS,
- constants.DUMMY_TOKEN_TOTAL_SUPPLY,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await noReturnErc20Token.setBalance.sendTransactionAsync(makerAddress, constants.INITIAL_ERC20_BALANCE),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await noReturnErc20Token.approve.sendTransactionAsync(
- erc20Proxy.address,
- constants.INITIAL_ERC20_ALLOWANCE,
- { from: makerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- });
- it('should transfer the correct amounts when makerAssetAmount === takerAssetAmount', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(noReturnErc20Token.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
-
- const initialMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const initialFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
-
- const finalMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const finalFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(initialMakerBalanceA.minus(signedOrder.makerAssetAmount));
- expect(finalMakerBalanceB).to.be.bignumber.equal(initialMakerBalanceB.plus(signedOrder.takerAssetAmount));
- expect(finalTakerBalanceA).to.be.bignumber.equal(initialTakerBalanceA.plus(signedOrder.makerAssetAmount));
- expect(finalTakerBalanceB).to.be.bignumber.equal(initialTakerBalanceB.minus(signedOrder.takerAssetAmount));
- expect(finalMakerZrxBalance).to.be.bignumber.equal(initialMakerZrxBalance.minus(signedOrder.makerFee));
- expect(finalTakerZrxBalance).to.be.bignumber.equal(initialTakerZrxBalance.minus(signedOrder.takerFee));
- expect(finalFeeRecipientZrxBalance).to.be.bignumber.equal(
- initialFeeRecipientZrxBalance.plus(signedOrder.makerFee.plus(signedOrder.takerFee)),
- );
- });
- it('should transfer the correct amounts when makerAssetAmount > takerAssetAmount', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(noReturnErc20Token.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
-
- const initialMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const initialFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
-
- const finalMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const finalFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(initialMakerBalanceA.minus(signedOrder.makerAssetAmount));
- expect(finalMakerBalanceB).to.be.bignumber.equal(initialMakerBalanceB.plus(signedOrder.takerAssetAmount));
- expect(finalTakerBalanceA).to.be.bignumber.equal(initialTakerBalanceA.plus(signedOrder.makerAssetAmount));
- expect(finalTakerBalanceB).to.be.bignumber.equal(initialTakerBalanceB.minus(signedOrder.takerAssetAmount));
- expect(finalMakerZrxBalance).to.be.bignumber.equal(initialMakerZrxBalance.minus(signedOrder.makerFee));
- expect(finalTakerZrxBalance).to.be.bignumber.equal(initialTakerZrxBalance.minus(signedOrder.takerFee));
- expect(finalFeeRecipientZrxBalance).to.be.bignumber.equal(
- initialFeeRecipientZrxBalance.plus(signedOrder.makerFee.plus(signedOrder.takerFee)),
- );
- });
- it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(noReturnErc20Token.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- });
-
- const initialMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const initialFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
-
- const finalMakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await noReturnErc20Token.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const finalFeeRecipientZrxBalance = await zrxToken.balanceOf.callAsync(feeRecipientAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(initialMakerBalanceA.minus(signedOrder.makerAssetAmount));
- expect(finalMakerBalanceB).to.be.bignumber.equal(initialMakerBalanceB.plus(signedOrder.takerAssetAmount));
- expect(finalTakerBalanceA).to.be.bignumber.equal(initialTakerBalanceA.plus(signedOrder.makerAssetAmount));
- expect(finalTakerBalanceB).to.be.bignumber.equal(initialTakerBalanceB.minus(signedOrder.takerAssetAmount));
- expect(finalMakerZrxBalance).to.be.bignumber.equal(initialMakerZrxBalance.minus(signedOrder.makerFee));
- expect(finalTakerZrxBalance).to.be.bignumber.equal(initialTakerZrxBalance.minus(signedOrder.takerFee));
- expect(finalFeeRecipientZrxBalance).to.be.bignumber.equal(
- initialFeeRecipientZrxBalance.plus(signedOrder.makerFee.plus(signedOrder.takerFee)),
- );
- });
- });
-
- describe('cancelOrder', () => {
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
-
- it('should throw if not sent by maker', async () => {
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrderAsync(signedOrder, takerAddress),
- RevertReason.InvalidMaker,
- );
- });
-
- it('should throw if makerAssetAmount is 0', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(0),
- });
-
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should throw if takerAssetAmount is 0', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- takerAssetAmount: new BigNumber(0),
- });
-
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should be able to cancel a full order', async () => {
- await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount: signedOrder.takerAssetAmount.div(2),
- }),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should log 1 event with correct arguments', async () => {
- const res = await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
- expect(res.logs).to.have.length(1);
-
- const log = res.logs[0] as LogWithDecodedArgs<ExchangeCancelEventArgs>;
- const logArgs = log.args;
-
- expect(signedOrder.makerAddress).to.be.equal(logArgs.makerAddress);
- expect(signedOrder.makerAddress).to.be.equal(logArgs.senderAddress);
- expect(signedOrder.feeRecipientAddress).to.be.equal(logArgs.feeRecipientAddress);
- expect(signedOrder.makerAssetData).to.be.equal(logArgs.makerAssetData);
- expect(signedOrder.takerAssetData).to.be.equal(logArgs.takerAssetData);
- expect(orderHashUtils.getOrderHashHex(signedOrder)).to.be.equal(logArgs.orderHash);
- });
-
- it('should throw if already cancelled', async () => {
- await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should throw if order is expired', async () => {
- const currentTimestamp = await getLatestBlockTimestampAsync();
- signedOrder = await orderFactory.newSignedOrderAsync({
- expirationTimeSeconds: new BigNumber(currentTimestamp).minus(10),
- });
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should throw if rounding error is greater than 0.1%', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1001),
- takerAssetAmount: new BigNumber(3),
- });
-
- const fillTakerAssetAmount1 = new BigNumber(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount: fillTakerAssetAmount1,
- });
-
- const fillTakerAssetAmount2 = new BigNumber(1);
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount: fillTakerAssetAmount2,
- }),
- RevertReason.RoundingError,
- );
- });
- });
-
- describe('cancelOrdersUpTo', () => {
- it('should fail to set orderEpoch less than current orderEpoch', async () => {
- const orderEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
- const lesserOrderEpoch = new BigNumber(0);
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrdersUpToAsync(lesserOrderEpoch, makerAddress),
- RevertReason.InvalidNewOrderEpoch,
- );
- });
-
- it('should fail to set orderEpoch equal to existing orderEpoch', async () => {
- const orderEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress),
- RevertReason.InvalidNewOrderEpoch,
- );
- });
-
- it('should cancel only orders with a orderEpoch less than existing orderEpoch', async () => {
- // Cancel all transactions with a orderEpoch less than 1
- const orderEpoch = new BigNumber(1);
- await exchangeWrapper.cancelOrdersUpToAsync(orderEpoch, makerAddress);
-
- // Create 3 orders with orderEpoch values: 0,1,2,3
- // Since we cancelled with orderEpoch=1, orders with orderEpoch<=1 will not be processed
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- const signedOrders = [
- await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(9), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(9), 18),
- salt: new BigNumber(0),
- }),
- await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(79), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(79), 18),
- salt: new BigNumber(1),
- }),
- await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(979), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(979), 18),
- salt: new BigNumber(2),
- }),
- await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(7979), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(7979), 18),
- salt: new BigNumber(3),
- }),
- ];
- await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const fillMakerAssetAmount = signedOrders[2].makerAssetAmount.plus(signedOrders[3].makerAssetAmount);
- const fillTakerAssetAmount = signedOrders[2].takerAssetAmount.plus(signedOrders[3].takerAssetAmount);
- const makerFee = signedOrders[2].makerFee.plus(signedOrders[3].makerFee);
- const takerFee = signedOrders[2].takerFee.plus(signedOrders[3].takerFee);
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(fillMakerAssetAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(fillTakerAssetAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(fillTakerAssetAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(fillMakerAssetAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
- });
-
- describe('Testing Exchange of ERC721 Tokens', () => {
- it('should throw when maker does not own the token with id makerAssetId', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721TakerAssetIds[0];
- const takerAssetId = erc721TakerAssetIds[1];
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- });
- // Verify pre-conditions
- const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(initialOwnerMakerAsset).to.be.bignumber.not.equal(makerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.equal(takerAddress);
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }),
- RevertReason.TransferFailed,
- );
- });
-
- it('should throw when taker does not own the token with id takerAssetId', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721MakerAssetIds[0];
- const takerAssetId = erc721MakerAssetIds[1];
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- });
- // Verify pre-conditions
- const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(initialOwnerMakerAsset).to.be.bignumber.equal(makerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.not.equal(takerAddress);
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }),
- RevertReason.TransferFailed,
- );
- });
-
- it('should throw when makerAssetAmount is greater than 1', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721MakerAssetIds[0];
- const takerAssetId = erc721TakerAssetIds[0];
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(2),
- takerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- });
- // Verify pre-conditions
- const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(initialOwnerMakerAsset).to.be.bignumber.equal(makerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.equal(takerAddress);
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }),
- RevertReason.InvalidAmount,
- );
- });
-
- it('should throw when takerAssetAmount is greater than 1', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721MakerAssetIds[0];
- const takerAssetId = erc721TakerAssetIds[0];
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: new BigNumber(500),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- });
- // Verify pre-conditions
- const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(initialOwnerMakerAsset).to.be.bignumber.equal(makerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.equal(takerAddress);
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }),
- RevertReason.InvalidAmount,
- );
- });
-
- it('should throw on partial fill', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721MakerAssetIds[0];
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- });
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount }),
- RevertReason.RoundingError,
- );
- });
- });
-
- describe('Testing exchange of multiple assets', () => {
- it('should allow multiple assets to be exchanged for a single asset', async () => {
- const makerAmounts = [new BigNumber(10), new BigNumber(20)];
- const makerNestedAssetData = [
- assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- assetDataUtils.encodeERC20AssetData(erc20TokenB.address),
- ];
- const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData);
- const makerAssetAmount = new BigNumber(1);
- const takerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const takerAssetAmount = new BigNumber(10);
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- takerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- });
-
- const initialMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
-
- const finalMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(
- initialMakerBalanceA.minus(makerAmounts[0].times(makerAssetAmount)),
- );
- expect(finalMakerBalanceB).to.be.bignumber.equal(
- initialMakerBalanceB.minus(makerAmounts[1].times(makerAssetAmount)),
- );
- expect(finalMakerZrxBalance).to.be.bignumber.equal(initialMakerZrxBalance.plus(takerAssetAmount));
- expect(finalTakerBalanceA).to.be.bignumber.equal(
- initialTakerBalanceA.plus(makerAmounts[0].times(makerAssetAmount)),
- );
- expect(finalTakerBalanceB).to.be.bignumber.equal(
- initialTakerBalanceB.plus(makerAmounts[1].times(makerAssetAmount)),
- );
- expect(finalTakerZrxBalance).to.be.bignumber.equal(initialTakerZrxBalance.minus(takerAssetAmount));
- });
- it('should allow multiple assets to be exchanged for multiple assets', async () => {
- const makerAmounts = [new BigNumber(10), new BigNumber(20)];
- const makerNestedAssetData = [
- assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- assetDataUtils.encodeERC20AssetData(erc20TokenB.address),
- ];
- const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData);
- const makerAssetAmount = new BigNumber(1);
- const takerAmounts = [new BigNumber(10), new BigNumber(1)];
- const takerAssetId = erc721TakerAssetIds[0];
- const takerNestedAssetData = [
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- ];
- const takerAssetData = assetDataUtils.encodeMultiAssetData(takerAmounts, takerNestedAssetData);
- const takerAssetAmount = new BigNumber(1);
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- takerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- });
-
- const initialMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.equal(takerAddress);
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
-
- const finalMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
- const finalOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(
- initialMakerBalanceA.minus(makerAmounts[0].times(makerAssetAmount)),
- );
- expect(finalMakerBalanceB).to.be.bignumber.equal(
- initialMakerBalanceB.minus(makerAmounts[1].times(makerAssetAmount)),
- );
- expect(finalMakerZrxBalance).to.be.bignumber.equal(
- initialMakerZrxBalance.plus(takerAmounts[0].times(takerAssetAmount)),
- );
- expect(finalTakerBalanceA).to.be.bignumber.equal(
- initialTakerBalanceA.plus(makerAmounts[0].times(makerAssetAmount)),
- );
- expect(finalTakerBalanceB).to.be.bignumber.equal(
- initialTakerBalanceB.plus(makerAmounts[1].times(makerAssetAmount)),
- );
- expect(finalTakerZrxBalance).to.be.bignumber.equal(
- initialTakerZrxBalance.minus(takerAmounts[0].times(takerAssetAmount)),
- );
- expect(finalOwnerTakerAsset).to.be.equal(makerAddress);
- });
- it('should allow an order selling multiple assets to be partially filled', async () => {
- const makerAmounts = [new BigNumber(10), new BigNumber(20)];
- const makerNestedAssetData = [
- assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- assetDataUtils.encodeERC20AssetData(erc20TokenB.address),
- ];
- const makerAssetData = assetDataUtils.encodeMultiAssetData(makerAmounts, makerNestedAssetData);
- const makerAssetAmount = new BigNumber(30);
- const takerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const takerAssetAmount = new BigNumber(10);
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- takerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- });
-
- const initialMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- const takerAssetFillAmount = takerAssetAmount.dividedToIntegerBy(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount,
- });
-
- const finalMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(
- initialMakerBalanceA.minus(
- makerAmounts[0].times(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalMakerBalanceB).to.be.bignumber.equal(
- initialMakerBalanceB.minus(
- makerAmounts[1].times(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalMakerZrxBalance).to.be.bignumber.equal(
- initialMakerZrxBalance.plus(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- );
- expect(finalTakerBalanceA).to.be.bignumber.equal(
- initialTakerBalanceA.plus(
- makerAmounts[0].times(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalTakerBalanceB).to.be.bignumber.equal(
- initialTakerBalanceB.plus(
- makerAmounts[1].times(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalTakerZrxBalance).to.be.bignumber.equal(
- initialTakerZrxBalance.minus(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- );
- });
- it('should allow an order buying multiple assets to be partially filled', async () => {
- const takerAmounts = [new BigNumber(10), new BigNumber(20)];
- const takerNestedAssetData = [
- assetDataUtils.encodeERC20AssetData(erc20TokenA.address),
- assetDataUtils.encodeERC20AssetData(erc20TokenB.address),
- ];
- const takerAssetData = assetDataUtils.encodeMultiAssetData(takerAmounts, takerNestedAssetData);
- const takerAssetAmount = new BigNumber(30);
- const makerAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const makerAssetAmount = new BigNumber(10);
- signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData,
- takerAssetData,
- makerAssetAmount,
- takerAssetAmount,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- });
-
- const initialMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const initialMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const initialMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const initialTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const initialTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const initialTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- const takerAssetFillAmount = takerAssetAmount.dividedToIntegerBy(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount,
- });
-
- const finalMakerBalanceA = await erc20TokenA.balanceOf.callAsync(makerAddress);
- const finalMakerBalanceB = await erc20TokenB.balanceOf.callAsync(makerAddress);
- const finalMakerZrxBalance = await zrxToken.balanceOf.callAsync(makerAddress);
- const finalTakerBalanceA = await erc20TokenA.balanceOf.callAsync(takerAddress);
- const finalTakerBalanceB = await erc20TokenB.balanceOf.callAsync(takerAddress);
- const finalTakerZrxBalance = await zrxToken.balanceOf.callAsync(takerAddress);
-
- expect(finalMakerBalanceA).to.be.bignumber.equal(
- initialMakerBalanceA.plus(
- takerAmounts[0].times(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalMakerBalanceB).to.be.bignumber.equal(
- initialMakerBalanceB.plus(
- takerAmounts[1].times(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalMakerZrxBalance).to.be.bignumber.equal(
- initialMakerZrxBalance.minus(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- );
- expect(finalTakerBalanceA).to.be.bignumber.equal(
- initialTakerBalanceA.minus(
- takerAmounts[0].times(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalTakerBalanceB).to.be.bignumber.equal(
- initialTakerBalanceB.minus(
- takerAmounts[1].times(
- takerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- ),
- );
- expect(finalTakerZrxBalance).to.be.bignumber.equal(
- initialTakerZrxBalance.plus(
- makerAssetAmount.times(takerAssetFillAmount).dividedToIntegerBy(takerAssetAmount),
- ),
- );
- });
- });
-
- describe('getOrderInfo', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
- it('should return the correct orderInfo for an unfilled valid order', async () => {
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Fillable;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for a fully filled order', async () => {
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount;
- const expectedOrderStatus = OrderStatus.FullyFilled;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for a partially filled order', async () => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount });
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = takerAssetFillAmount;
- const expectedOrderStatus = OrderStatus.Fillable;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for a cancelled and unfilled order', async () => {
- await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Cancelled;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for a cancelled and partially filled order', async () => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount });
- await exchangeWrapper.cancelOrderAsync(signedOrder, makerAddress);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = takerAssetFillAmount;
- const expectedOrderStatus = OrderStatus.Cancelled;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for an expired and unfilled order', async () => {
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const timeUntilExpiration = signedOrder.expirationTimeSeconds.minus(currentTimestamp).toNumber();
- await increaseTimeAndMineBlockAsync(timeUntilExpiration);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Expired;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for an expired and partially filled order', async () => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, { takerAssetFillAmount });
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const timeUntilExpiration = signedOrder.expirationTimeSeconds.minus(currentTimestamp).toNumber();
- await increaseTimeAndMineBlockAsync(timeUntilExpiration);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = takerAssetFillAmount;
- const expectedOrderStatus = OrderStatus.Expired;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for an expired and fully filled order', async () => {
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress);
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const timeUntilExpiration = signedOrder.expirationTimeSeconds.minus(currentTimestamp).toNumber();
- await increaseTimeAndMineBlockAsync(timeUntilExpiration);
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount;
- // FULLY_FILLED takes precedence over EXPIRED
- const expectedOrderStatus = OrderStatus.FullyFilled;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for an order with a makerAssetAmount of 0', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({ makerAssetAmount: new BigNumber(0) });
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.InvalidMakerAssetAmount;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- it('should return the correct orderInfo for an order with a takerAssetAmount of 0', async () => {
- signedOrder = await orderFactory.newSignedOrderAsync({ takerAssetAmount: new BigNumber(0) });
- const orderInfo = await exchangeWrapper.getOrderInfoAsync(signedOrder);
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.InvalidTakerAssetAmount;
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
-});
-// tslint:disable:max-file-line-count
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/protocol/test/exchange/dispatcher.ts b/contracts/protocol/test/exchange/dispatcher.ts
deleted file mode 100644
index eca1b38f1..000000000
--- a/contracts/protocol/test/exchange/dispatcher.ts
+++ /dev/null
@@ -1,284 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- LogDecoder,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { DummyERC20TokenContract } from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { AssetProxyId, RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import {
- TestAssetProxyDispatcherAssetProxyRegisteredEventArgs,
- TestAssetProxyDispatcherContract,
-} from '../../generated-wrappers/test_asset_proxy_dispatcher';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ERC721Wrapper } from '../utils/erc721_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('AssetProxyDispatcher', () => {
- let owner: string;
- let notOwner: string;
- let makerAddress: string;
- let takerAddress: string;
-
- let zrxToken: DummyERC20TokenContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
- let assetProxyDispatcher: TestAssetProxyDispatcherContract;
-
- let erc20Wrapper: ERC20Wrapper;
- let erc721Wrapper: ERC721Wrapper;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- // Setup accounts & addresses
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, notOwner, makerAddress, takerAddress] = _.slice(accounts, 0, 4));
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 1;
- [zrxToken] = await erc20Wrapper.deployDummyTokensAsync(numDummyErc20ToDeploy, constants.DUMMY_TOKEN_DECIMALS);
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
-
- assetProxyDispatcher = await TestAssetProxyDispatcherContract.deployFrom0xArtifactAsync(
- artifacts.TestAssetProxyDispatcher,
- provider,
- txDefaults,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(assetProxyDispatcher.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('registerAssetProxy', () => {
- it('should record proxy upon registration', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
- expect(proxyAddress).to.be.equal(erc20Proxy.address);
- });
-
- it('should be able to record multiple proxies', async () => {
- // Record first proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- let proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
- expect(proxyAddress).to.be.equal(erc20Proxy.address);
- // Record another proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc721Proxy.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC721);
- expect(proxyAddress).to.be.equal(erc721Proxy.address);
- });
-
- it('should throw if a proxy with the same id is already registered', async () => {
- // Initial registration
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
- expect(proxyAddress).to.be.equal(erc20Proxy.address);
- // Deploy a new version of the ERC20 Transfer Proxy contract
- const newErc20TransferProxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC20Proxy,
- provider,
- txDefaults,
- );
- // Register new ERC20 Transfer Proxy contract
- return expectTransactionFailedAsync(
- assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(newErc20TransferProxy.address, {
- from: owner,
- }),
- RevertReason.AssetProxyAlreadyExists,
- );
- });
-
- it('should throw if requesting address is not owner', async () => {
- return expectTransactionFailedAsync(
- assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: notOwner }),
- RevertReason.OnlyContractOwner,
- );
- });
-
- it('should log an event with correct arguments when an asset proxy is registered', async () => {
- const logDecoder = new LogDecoder(web3Wrapper, artifacts);
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- );
- const logs = txReceipt.logs;
- const log = logs[0] as LogWithDecodedArgs<TestAssetProxyDispatcherAssetProxyRegisteredEventArgs>;
- expect(log.args.id).to.equal(AssetProxyId.ERC20);
- expect(log.args.assetProxy).to.equal(erc20Proxy.address);
- });
- });
-
- describe('getAssetProxy', () => {
- it('should return correct address of registered proxy', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
- expect(proxyAddress).to.be.equal(erc20Proxy.address);
- });
-
- it('should return NULL address if requesting non-existent proxy', async () => {
- const proxyAddress = await assetProxyDispatcher.getAssetProxy.callAsync(AssetProxyId.ERC20);
- expect(proxyAddress).to.be.equal(constants.NULL_ADDRESS);
- });
- });
-
- describe('dispatchTransferFrom', () => {
- it('should dispatch transfer to registered proxy', async () => {
- // Register ERC20 proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Construct metadata for ERC20 proxy
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
-
- // Perform a transfer from makerAddress to takerAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = new BigNumber(10);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync(
- encodedAssetData,
- makerAddress,
- takerAddress,
- amount,
- { from: owner },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Verify transfer was successful
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(amount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].plus(amount),
- );
- });
-
- it('should not dispatch a transfer if amount == 0', async () => {
- // Register ERC20 proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Construct metadata for ERC20 proxy
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
-
- // Perform a transfer from makerAddress to takerAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = constants.ZERO_AMOUNT;
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync(
- encodedAssetData,
- makerAddress,
- takerAddress,
- amount,
- { from: owner },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- expect(txReceipt.logs.length).to.be.equal(0);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.deep.equal(erc20Balances);
- });
-
- it('should not dispatch a transfer if from == to', async () => {
- // Register ERC20 proxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Construct metadata for ERC20 proxy
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
-
- // Perform a transfer from makerAddress to takerAddress
- const erc20Balances = await erc20Wrapper.getBalancesAsync();
- const amount = new BigNumber(10);
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(
- await assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync(
- encodedAssetData,
- makerAddress,
- makerAddress,
- amount,
- { from: owner },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- expect(txReceipt.logs.length).to.be.equal(0);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.deep.equal(erc20Balances);
- });
-
- it('should throw if dispatching to unregistered proxy', async () => {
- // Construct metadata for ERC20 proxy
- const encodedAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- // Perform a transfer from makerAddress to takerAddress
- const amount = new BigNumber(10);
- return expectTransactionFailedAsync(
- assetProxyDispatcher.publicDispatchTransferFrom.sendTransactionAsync(
- encodedAssetData,
- makerAddress,
- takerAddress,
- amount,
- { from: owner },
- ),
- RevertReason.AssetProxyDoesNotExist,
- );
- });
- });
-});
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/protocol/test/exchange/fill_order.ts b/contracts/protocol/test/exchange/fill_order.ts
deleted file mode 100644
index 2bdbe4855..000000000
--- a/contracts/protocol/test/exchange/fill_order.ts
+++ /dev/null
@@ -1,314 +0,0 @@
-import {
- AllowanceAmountScenario,
- AssetDataScenario,
- BalanceAmountScenario,
- chaiSetup,
- ExpirationTimeSecondsScenario,
- FeeRecipientAddressScenario,
- FillScenario,
- OrderAssetAmountScenario,
- provider,
- TakerAssetFillAmountScenario,
- TakerScenario,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import * as _ from 'lodash';
-
-import {
- FillOrderCombinatorialUtils,
- fillOrderCombinatorialUtilsFactoryAsync,
-} from '../utils/fill_order_combinatorial_utils';
-
-chaiSetup.configure();
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-const defaultFillScenario = {
- orderScenario: {
- takerScenario: TakerScenario.Unspecified,
- feeRecipientScenario: FeeRecipientAddressScenario.EthUserAddress,
- makerAssetAmountScenario: OrderAssetAmountScenario.Large,
- takerAssetAmountScenario: OrderAssetAmountScenario.Large,
- makerFeeScenario: OrderAssetAmountScenario.Large,
- takerFeeScenario: OrderAssetAmountScenario.Large,
- expirationTimeSecondsScenario: ExpirationTimeSecondsScenario.InFuture,
- makerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals,
- takerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount,
- makerStateScenario: {
- traderAssetBalance: BalanceAmountScenario.Higher,
- traderAssetAllowance: AllowanceAmountScenario.Higher,
- zrxFeeBalance: BalanceAmountScenario.Higher,
- zrxFeeAllowance: AllowanceAmountScenario.Higher,
- },
- takerStateScenario: {
- traderAssetBalance: BalanceAmountScenario.Higher,
- traderAssetAllowance: AllowanceAmountScenario.Higher,
- zrxFeeBalance: BalanceAmountScenario.Higher,
- zrxFeeAllowance: AllowanceAmountScenario.Higher,
- },
-};
-
-describe('FillOrder Tests', () => {
- let fillOrderCombinatorialUtils: FillOrderCombinatorialUtils;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- fillOrderCombinatorialUtils = await fillOrderCombinatorialUtilsFactoryAsync(web3Wrapper, txDefaults);
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('fillOrder', () => {
- const test = (fillScenarios: FillScenario[]) => {
- _.forEach(fillScenarios, fillScenario => {
- const description = `Combinatorial OrderFill: ${JSON.stringify(fillScenario)}`;
- it(description, async () => {
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- });
- };
-
- const allFillScenarios = FillOrderCombinatorialUtils.generateFillOrderCombinations();
- describe('Combinatorially generated fills orders', () => test(allFillScenarios));
-
- it('should transfer the correct amounts when makerAssetAmount === takerAssetAmount', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should transfer the correct amounts when makerAssetAmount > takerAssetAmount', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- takerAssetAmountScenario: OrderAssetAmountScenario.Small,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetAmountScenario: OrderAssetAmountScenario.Small,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should transfer the correct amounts when makerAssetAmount < takerAssetAmount with zero decimals', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetAmountScenario: OrderAssetAmountScenario.Small,
- makerAssetDataScenario: AssetDataScenario.ERC20ZeroDecimals,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should transfer the correct amounts when taker is specified and order is claimed by taker', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- takerScenario: TakerScenario.CorrectlySpecified,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should fill remaining value if takerAssetFillAmount > remaining takerAssetAmount', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- it('should throw when taker is specified and order is claimed by other', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- takerScenario: TakerScenario.IncorrectlySpecified,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if makerAssetAmount is 0', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetAmountScenario: OrderAssetAmountScenario.Zero,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if takerAssetAmount is 0', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- takerAssetAmountScenario: OrderAssetAmountScenario.Zero,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if takerAssetFillAmount is 0', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.Zero,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if an order is expired', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- expirationTimeSecondsScenario: ExpirationTimeSecondsScenario.InPast,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if maker erc20Balances are too low to fill order', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- makerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetBalance: BalanceAmountScenario.TooLow,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if taker erc20Balances are too low to fill order', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- takerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetBalance: BalanceAmountScenario.TooLow,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if maker allowances are too low to fill order', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- makerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetAllowance: AllowanceAmountScenario.TooLow,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should throw if taker allowances are too low to fill order', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- takerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetAllowance: AllowanceAmountScenario.TooLow,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- });
-
- describe('Testing exchange of ERC721 Tokens', () => {
- it('should successfully exchange a single token between the maker and taker (via fillOrder)', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetDataScenario: AssetDataScenario.ERC721,
- takerAssetDataScenario: AssetDataScenario.ERC721,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should successfully fill order when makerAsset is ERC721 and takerAsset is ERC20', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetDataScenario: AssetDataScenario.ERC721,
- takerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario, true);
- });
-
- it('should successfully fill order when makerAsset is ERC20 and takerAsset is ERC721', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals,
- takerAssetDataScenario: AssetDataScenario.ERC721,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should successfully fill order when makerAsset is ERC721 and approveAll is set for it', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetDataScenario: AssetDataScenario.ERC721,
- takerAssetDataScenario: AssetDataScenario.ERC20NonZRXEighteenDecimals,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- makerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetAllowance: AllowanceAmountScenario.Unlimited,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
-
- it('should successfully fill order when makerAsset and takerAsset are ERC721 and approveAll is set for them', async () => {
- const fillScenario = {
- ...defaultFillScenario,
- orderScenario: {
- ...defaultFillScenario.orderScenario,
- makerAssetDataScenario: AssetDataScenario.ERC721,
- takerAssetDataScenario: AssetDataScenario.ERC721,
- },
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- makerStateScenario: {
- ...defaultFillScenario.makerStateScenario,
- traderAssetAllowance: AllowanceAmountScenario.Unlimited,
- },
- takerStateScenario: {
- ...defaultFillScenario.takerStateScenario,
- traderAssetAllowance: AllowanceAmountScenario.Unlimited,
- },
- };
- await fillOrderCombinatorialUtils.testFillOrderScenarioAsync(provider, fillScenario);
- });
- });
-});
diff --git a/contracts/protocol/test/exchange/internal.ts b/contracts/protocol/test/exchange/internal.ts
deleted file mode 100644
index 6ff1fdc2f..000000000
--- a/contracts/protocol/test/exchange/internal.ts
+++ /dev/null
@@ -1,472 +0,0 @@
-import {
- bytes32Values,
- chaiSetup,
- constants,
- FillResults,
- getRevertReasonOrErrorMessageForSendTransactionAsync,
- provider,
- testCombinatoriallyWithReferenceFuncAsync,
- txDefaults,
- uint256Values,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { Order, RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { TestExchangeInternalsContract } from '../../generated-wrappers/test_exchange_internals';
-import { artifacts } from '../../src/artifacts';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-const MAX_UINT256 = new BigNumber(2).pow(256).minus(1);
-
-const emptyOrder: Order = {
- senderAddress: constants.NULL_ADDRESS,
- makerAddress: constants.NULL_ADDRESS,
- takerAddress: constants.NULL_ADDRESS,
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- makerAssetAmount: new BigNumber(0),
- takerAssetAmount: new BigNumber(0),
- makerAssetData: '0x',
- takerAssetData: '0x',
- salt: new BigNumber(0),
- exchangeAddress: constants.NULL_ADDRESS,
- feeRecipientAddress: constants.NULL_ADDRESS,
- expirationTimeSeconds: new BigNumber(0),
-};
-
-const emptySignedOrder: SignedOrder = {
- ...emptyOrder,
- signature: '',
-};
-
-const overflowErrorForCall = new Error(RevertReason.Uint256Overflow);
-
-describe('Exchange core internal functions', () => {
- let testExchange: TestExchangeInternalsContract;
- let overflowErrorForSendTransaction: Error | undefined;
- let divisionByZeroErrorForCall: Error | undefined;
- let roundingErrorForCall: Error | undefined;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- testExchange = await TestExchangeInternalsContract.deployFrom0xArtifactAsync(
- artifacts.TestExchangeInternals,
- provider,
- txDefaults,
- );
- overflowErrorForSendTransaction = new Error(
- await getRevertReasonOrErrorMessageForSendTransactionAsync(RevertReason.Uint256Overflow),
- );
- divisionByZeroErrorForCall = new Error(RevertReason.DivisionByZero);
- roundingErrorForCall = new Error(RevertReason.RoundingError);
- });
- // Note(albrow): Don't forget to add beforeEach and afterEach calls to reset
- // the blockchain state for any tests which modify it!
-
- async function referenceIsRoundingErrorFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<boolean> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- if (numerator.eq(0)) {
- return false;
- }
- if (target.eq(0)) {
- return false;
- }
- const product = numerator.multipliedBy(target);
- const remainder = product.mod(denominator);
- const remainderTimes1000 = remainder.multipliedBy('1000');
- const isError = remainderTimes1000.gte(product);
- if (product.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- if (remainderTimes1000.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- return isError;
- }
-
- async function referenceIsRoundingErrorCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<boolean> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- if (numerator.eq(0)) {
- return false;
- }
- if (target.eq(0)) {
- return false;
- }
- const product = numerator.multipliedBy(target);
- const remainder = product.mod(denominator);
- const error = denominator.minus(remainder).mod(denominator);
- const errorTimes1000 = error.multipliedBy('1000');
- const isError = errorTimes1000.gte(product);
- if (product.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- if (errorTimes1000.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- return isError;
- }
-
- async function referenceSafeGetPartialAmountFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- const isRoundingError = await referenceIsRoundingErrorFloorAsync(numerator, denominator, target);
- if (isRoundingError) {
- throw roundingErrorForCall;
- }
- const product = numerator.multipliedBy(target);
- if (product.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- return product.dividedToIntegerBy(denominator);
- }
-
- describe('addFillResults', async () => {
- function makeFillResults(value: BigNumber): FillResults {
- return {
- makerAssetFilledAmount: value,
- takerAssetFilledAmount: value,
- makerFeePaid: value,
- takerFeePaid: value,
- };
- }
- async function referenceAddFillResultsAsync(
- totalValue: BigNumber,
- singleValue: BigNumber,
- ): Promise<FillResults> {
- // Note(albrow): Here, each of totalFillResults and
- // singleFillResults will consist of fields with the same values.
- // This should be safe because none of the fields in a given
- // FillResults are ever used together in a mathemetical operation.
- // They are only used with the corresponding field from *the other*
- // FillResults, which are different.
- const totalFillResults = makeFillResults(totalValue);
- const singleFillResults = makeFillResults(singleValue);
- // HACK(albrow): _.mergeWith mutates the first argument! To
- // workaround this we use _.cloneDeep.
- return _.mergeWith(
- _.cloneDeep(totalFillResults),
- singleFillResults,
- (totalVal: BigNumber, singleVal: BigNumber) => {
- const newTotal = totalVal.plus(singleVal);
- if (newTotal.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- return newTotal;
- },
- );
- }
- async function testAddFillResultsAsync(totalValue: BigNumber, singleValue: BigNumber): Promise<FillResults> {
- const totalFillResults = makeFillResults(totalValue);
- const singleFillResults = makeFillResults(singleValue);
- return testExchange.publicAddFillResults.callAsync(totalFillResults, singleFillResults);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'addFillResults',
- referenceAddFillResultsAsync,
- testAddFillResultsAsync,
- [uint256Values, uint256Values],
- );
- });
-
- describe('calculateFillResults', async () => {
- function makeOrder(
- makerAssetAmount: BigNumber,
- takerAssetAmount: BigNumber,
- makerFee: BigNumber,
- takerFee: BigNumber,
- ): Order {
- return {
- ...emptyOrder,
- makerAssetAmount,
- takerAssetAmount,
- makerFee,
- takerFee,
- };
- }
- async function referenceCalculateFillResultsAsync(
- orderTakerAssetAmount: BigNumber,
- takerAssetFilledAmount: BigNumber,
- otherAmount: BigNumber,
- ): Promise<FillResults> {
- // Note(albrow): Here we are re-using the same value (otherAmount)
- // for order.makerAssetAmount, order.makerFee, and order.takerFee.
- // This should be safe because they are never used with each other
- // in any mathematical operation in either the reference TypeScript
- // implementation or the Solidity implementation of
- // calculateFillResults.
- const makerAssetFilledAmount = await referenceSafeGetPartialAmountFloorAsync(
- takerAssetFilledAmount,
- orderTakerAssetAmount,
- otherAmount,
- );
- const order = makeOrder(otherAmount, orderTakerAssetAmount, otherAmount, otherAmount);
- const orderMakerAssetAmount = order.makerAssetAmount;
- return {
- makerAssetFilledAmount,
- takerAssetFilledAmount,
- makerFeePaid: await referenceSafeGetPartialAmountFloorAsync(
- makerAssetFilledAmount,
- orderMakerAssetAmount,
- otherAmount,
- ),
- takerFeePaid: await referenceSafeGetPartialAmountFloorAsync(
- takerAssetFilledAmount,
- orderTakerAssetAmount,
- otherAmount,
- ),
- };
- }
- async function testCalculateFillResultsAsync(
- orderTakerAssetAmount: BigNumber,
- takerAssetFilledAmount: BigNumber,
- otherAmount: BigNumber,
- ): Promise<FillResults> {
- const order = makeOrder(otherAmount, orderTakerAssetAmount, otherAmount, otherAmount);
- return testExchange.publicCalculateFillResults.callAsync(order, takerAssetFilledAmount);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'calculateFillResults',
- referenceCalculateFillResultsAsync,
- testCalculateFillResultsAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('getPartialAmountFloor', async () => {
- async function referenceGetPartialAmountFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- const product = numerator.multipliedBy(target);
- if (product.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- return product.dividedToIntegerBy(denominator);
- }
- async function testGetPartialAmountFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- return testExchange.publicGetPartialAmountFloor.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'getPartialAmountFloor',
- referenceGetPartialAmountFloorAsync,
- testGetPartialAmountFloorAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('getPartialAmountCeil', async () => {
- async function referenceGetPartialAmountCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- const product = numerator.multipliedBy(target);
- const offset = product.plus(denominator.minus(1));
- if (offset.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- const result = offset.dividedToIntegerBy(denominator);
- if (product.mod(denominator).eq(0)) {
- expect(result.multipliedBy(denominator)).to.be.bignumber.eq(product);
- } else {
- expect(result.multipliedBy(denominator)).to.be.bignumber.gt(product);
- }
- return result;
- }
- async function testGetPartialAmountCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- return testExchange.publicGetPartialAmountCeil.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'getPartialAmountCeil',
- referenceGetPartialAmountCeilAsync,
- testGetPartialAmountCeilAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('safeGetPartialAmountFloor', async () => {
- async function testSafeGetPartialAmountFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- return testExchange.publicSafeGetPartialAmountFloor.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'safeGetPartialAmountFloor',
- referenceSafeGetPartialAmountFloorAsync,
- testSafeGetPartialAmountFloorAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('safeGetPartialAmountCeil', async () => {
- async function referenceSafeGetPartialAmountCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- if (denominator.eq(0)) {
- throw divisionByZeroErrorForCall;
- }
- const isRoundingError = await referenceIsRoundingErrorCeilAsync(numerator, denominator, target);
- if (isRoundingError) {
- throw roundingErrorForCall;
- }
- const product = numerator.multipliedBy(target);
- const offset = product.plus(denominator.minus(1));
- if (offset.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForCall;
- }
- const result = offset.dividedToIntegerBy(denominator);
- if (product.mod(denominator).eq(0)) {
- expect(result.multipliedBy(denominator)).to.be.bignumber.eq(product);
- } else {
- expect(result.multipliedBy(denominator)).to.be.bignumber.gt(product);
- }
- return result;
- }
- async function testSafeGetPartialAmountCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<BigNumber> {
- return testExchange.publicSafeGetPartialAmountCeil.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'safeGetPartialAmountCeil',
- referenceSafeGetPartialAmountCeilAsync,
- testSafeGetPartialAmountCeilAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('isRoundingErrorFloor', async () => {
- async function testIsRoundingErrorFloorAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<boolean> {
- return testExchange.publicIsRoundingErrorFloor.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'isRoundingErrorFloor',
- referenceIsRoundingErrorFloorAsync,
- testIsRoundingErrorFloorAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('isRoundingErrorCeil', async () => {
- async function testIsRoundingErrorCeilAsync(
- numerator: BigNumber,
- denominator: BigNumber,
- target: BigNumber,
- ): Promise<boolean> {
- return testExchange.publicIsRoundingErrorCeil.callAsync(numerator, denominator, target);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'isRoundingErrorCeil',
- referenceIsRoundingErrorCeilAsync,
- testIsRoundingErrorCeilAsync,
- [uint256Values, uint256Values, uint256Values],
- );
- });
-
- describe('updateFilledState', async () => {
- // Note(albrow): Since updateFilledState modifies the state by calling
- // sendTransaction, we must reset the state after each test.
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- async function referenceUpdateFilledStateAsync(
- takerAssetFilledAmount: BigNumber,
- orderTakerAssetFilledAmount: BigNumber,
- // tslint:disable-next-line:no-unused-variable
- orderHash: string,
- ): Promise<BigNumber> {
- const totalFilledAmount = takerAssetFilledAmount.plus(orderTakerAssetFilledAmount);
- if (totalFilledAmount.isGreaterThan(MAX_UINT256)) {
- throw overflowErrorForSendTransaction;
- }
- return totalFilledAmount;
- }
- async function testUpdateFilledStateAsync(
- takerAssetFilledAmount: BigNumber,
- orderTakerAssetFilledAmount: BigNumber,
- orderHash: string,
- ): Promise<BigNumber> {
- const fillResults = {
- makerAssetFilledAmount: new BigNumber(0),
- takerAssetFilledAmount,
- makerFeePaid: new BigNumber(0),
- takerFeePaid: new BigNumber(0),
- };
- await web3Wrapper.awaitTransactionSuccessAsync(
- await testExchange.publicUpdateFilledState.sendTransactionAsync(
- emptySignedOrder,
- constants.NULL_ADDRESS,
- orderHash,
- orderTakerAssetFilledAmount,
- fillResults,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- return testExchange.filled.callAsync(orderHash);
- }
- await testCombinatoriallyWithReferenceFuncAsync(
- 'updateFilledState',
- referenceUpdateFilledStateAsync,
- testUpdateFilledStateAsync,
- [uint256Values, uint256Values, bytes32Values],
- );
- });
-});
diff --git a/contracts/protocol/test/exchange/match_orders.ts b/contracts/protocol/test/exchange/match_orders.ts
deleted file mode 100644
index 8e943c237..000000000
--- a/contracts/protocol/test/exchange/match_orders.ts
+++ /dev/null
@@ -1,1284 +0,0 @@
-import {
- chaiSetup,
- constants,
- ERC20BalancesByOwner,
- ERC721TokenIdsByOwner,
- expectTransactionFailedAsync,
- OrderFactory,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC721TokenContract,
- ReentrantERC20TokenContract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { ExchangeContract } from '../../generated-wrappers/exchange';
-import { TestExchangeInternalsContract } from '../../generated-wrappers/test_exchange_internals';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ERC721Wrapper } from '../utils/erc721_wrapper';
-import { ExchangeWrapper } from '../utils/exchange_wrapper';
-import { MatchOrderTester } from '../utils/match_order_tester';
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('matchOrders', () => {
- let makerAddressLeft: string;
- let makerAddressRight: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddressLeft: string;
- let feeRecipientAddressRight: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let reentrantErc20Token: ReentrantERC20TokenContract;
- let exchange: ExchangeContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
-
- let erc20BalancesByOwner: ERC20BalancesByOwner;
- let erc721TokenIdsByOwner: ERC721TokenIdsByOwner;
- let exchangeWrapper: ExchangeWrapper;
- let erc20Wrapper: ERC20Wrapper;
- let erc721Wrapper: ERC721Wrapper;
- let orderFactoryLeft: OrderFactory;
- let orderFactoryRight: OrderFactory;
-
- let erc721LeftMakerAssetIds: BigNumber[];
- let erc721RightMakerAssetIds: BigNumber[];
-
- let defaultERC20MakerAssetAddress: string;
- let defaultERC20TakerAssetAddress: string;
- let defaultERC721AssetAddress: string;
-
- let matchOrderTester: MatchOrderTester;
-
- let testExchange: TestExchangeInternalsContract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- // Create accounts
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- // Hack(albrow): Both Prettier and TSLint insert a trailing comma below
- // but that is invalid syntax as of TypeScript version >= 2.8. We don't
- // have the right fine-grained configuration options in TSLint,
- // Prettier, or TypeScript, to reconcile this, so we will just have to
- // wait for them to sort it out. We disable TSLint and Prettier for
- // this part of the code for now. This occurs several times in this
- // file. See https://github.com/prettier/prettier/issues/4624.
- // prettier-ignore
- const usedAddresses = ([
- owner,
- makerAddressLeft,
- makerAddressRight,
- takerAddress,
- feeRecipientAddressLeft,
- // tslint:disable-next-line:trailing-comma
- feeRecipientAddressRight
- ] = _.slice(accounts, 0, 6));
- // Create wrappers
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
- // Deploy ERC20 token & ERC20 proxy
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
- // Deploy ERC721 token and proxy
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721LeftMakerAssetIds = erc721Balances[makerAddressLeft][erc721Token.address];
- erc721RightMakerAssetIds = erc721Balances[makerAddressRight][erc721Token.address];
- // Depoy exchange
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
- exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
- // Authorize ERC20 and ERC721 trades by exchange
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.ReentrantERC20Token,
- provider,
- txDefaults,
- exchange.address,
- );
-
- // Set default addresses
- defaultERC20MakerAssetAddress = erc20TokenA.address;
- defaultERC20TakerAssetAddress = erc20TokenB.address;
- defaultERC721AssetAddress = erc721Token.address;
- // Create default order parameters
- const defaultOrderParamsLeft = {
- ...constants.STATIC_ORDER_PARAMS,
- makerAddress: makerAddressLeft,
- exchangeAddress: exchange.address,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- feeRecipientAddress: feeRecipientAddressLeft,
- };
- const defaultOrderParamsRight = {
- ...constants.STATIC_ORDER_PARAMS,
- makerAddress: makerAddressRight,
- exchangeAddress: exchange.address,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- feeRecipientAddress: feeRecipientAddressRight,
- };
- const privateKeyLeft = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddressLeft)];
- orderFactoryLeft = new OrderFactory(privateKeyLeft, defaultOrderParamsLeft);
- const privateKeyRight = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddressRight)];
- orderFactoryRight = new OrderFactory(privateKeyRight, defaultOrderParamsRight);
- // Set match order tester
- matchOrderTester = new MatchOrderTester(exchangeWrapper, erc20Wrapper, erc721Wrapper, zrxToken.address);
- testExchange = await TestExchangeInternalsContract.deployFrom0xArtifactAsync(
- artifacts.TestExchangeInternals,
- provider,
- txDefaults,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('matchOrders', () => {
- beforeEach(async () => {
- erc20BalancesByOwner = await erc20Wrapper.getBalancesAsync();
- erc721TokenIdsByOwner = await erc721Wrapper.getBalancesAsync();
- });
-
- it('Should transfer correct amounts when right order is fully filled and values pass isRoundingErrorFloor but fail isRoundingErrorCeil', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(17), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(98), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- // Assert is rounding error ceil & not rounding error floor
- // These assertions are taken from MixinMatchOrders::calculateMatchedFillResults
- // The rounding error is derived computating how much the left maker will sell.
- const numerator = signedOrderLeft.makerAssetAmount;
- const denominator = signedOrderLeft.takerAssetAmount;
- const target = signedOrderRight.makerAssetAmount;
- const isRoundingErrorCeil = await testExchange.publicIsRoundingErrorCeil.callAsync(
- numerator,
- denominator,
- target,
- );
- expect(isRoundingErrorCeil).to.be.true();
- const isRoundingErrorFloor = await testExchange.publicIsRoundingErrorFloor.callAsync(
- numerator,
- denominator,
- target,
- );
- expect(isRoundingErrorFloor).to.be.false();
- // Match signedOrderLeft with signedOrderRight
- // Note that the left maker received a slightly better sell price.
- // This is intentional; see note in MixinMatchOrders.calculateMatchedFillResults.
- // Because the left maker received a slightly more favorable sell price, the fee
- // paid by the left taker is slightly higher than that paid by the left maker.
- // Fees can be thought of as a tax paid by the seller, derived from the sale price.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('76.4705882352941176'), 16), // 76.47%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(75), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber('76.5306122448979591'), 16), // 76.53%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should transfer correct amounts when left order is fully filled and values pass isRoundingErrorCeil but fail isRoundingErrorFloor', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(15), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(97), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(14), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- // Assert is rounding error floor & not rounding error ceil
- // These assertions are taken from MixinMatchOrders::calculateMatchedFillResults
- // The rounding error is derived computating how much the right maker will buy.
- const numerator = signedOrderRight.takerAssetAmount;
- const denominator = signedOrderRight.makerAssetAmount;
- const target = signedOrderLeft.takerAssetAmount;
- const isRoundingErrorFloor = await testExchange.publicIsRoundingErrorFloor.callAsync(
- numerator,
- denominator,
- target,
- );
- expect(isRoundingErrorFloor).to.be.true();
- const isRoundingErrorCeil = await testExchange.publicIsRoundingErrorCeil.callAsync(
- numerator,
- denominator,
- target,
- );
- expect(isRoundingErrorCeil).to.be.false();
- // Match signedOrderLeft with signedOrderRight
- // Note that the right maker received a slightly better purchase price.
- // This is intentional; see note in MixinMatchOrders.calculateMatchedFillResults.
- // Because the right maker received a slightly more favorable buy price, the fee
- // paid by the right taker is slightly higher than that paid by the right maker.
- // Fees can be thought of as a tax paid by the seller, derived from the sale price.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(15), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('92.7835051546391752'), 16), // 92.78%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber('92.8571428571428571'), 16), // 92.85%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should give right maker a better buy price when rounding', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(16), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(83), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(49), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- // Note:
- // The correct price buy price for the right maker would yield (49/83) * 22 = 12.988 units
- // of the left maker asset. This gets rounded up to 13, giving the right maker a better price.
- // Note:
- // The maker/taker fee percentage paid on the right order differs because
- // they received different sale prices. The right maker pays a
- // fee slightly lower than the right taker.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(16), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('26.5060240963855421'), 16), // 26.506%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber('26.5306122448979591'), 16), // 26.531%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should give left maker a better sell price when rounding', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(12), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(97), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- // Note:
- // The maker/taker fee percentage paid on the left order differs because
- // they received different sale prices. The left maker pays a fee
- // slightly lower than the left taker.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(11), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('91.6666666666666666'), 16), // 91.6%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber('91.7525773195876288'), 16), // 91.75%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should give right maker and right taker a favorable fee price when rounding', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(16), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(83), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(49), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 0),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 0),
- });
- // Note:
- // The maker/taker fee percentage paid on the right order differs because
- // they received different sale prices. The right maker pays a
- // fee slightly lower than the right taker.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(16), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(22), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(13), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2650), 0), // 2650.6 rounded down tro 2650
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(2653), 0), // 2653.1 rounded down to 2653
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should give left maker and left taker a favorable fee price when rounding', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(12), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(97), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 0),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 0),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- // Note:
- // The maker/taker fee percentage paid on the left order differs because
- // they received different sale prices. The left maker pays a
- // fee slightly lower than the left taker.
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(11), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(9166), 0), // 9166.6 rounded down to 9166
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(89), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(9175), 0), // 9175.2 rounded down to 9175
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should transfer correct amounts when right order fill amount deviates from amount derived by `Exchange.fillOrder`', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAddress: makerAddressLeft,
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1005), 0),
- feeRecipientAddress: feeRecipientAddressLeft,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2126), 0),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1063), 0),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1005), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- // Notes:
- // i.
- // The left order is fully filled by the right order, so the right maker must sell 1005 units of their asset to the left maker.
- // By selling 1005 units, the right maker should theoretically receive 502.5 units of the left maker's asset.
- // Since the transfer amount must be an integer, this value must be rounded down to 502 or up to 503.
- // ii.
- // If the right order were filled via `Exchange.fillOrder` the respective fill amounts would be [1004, 502] or [1006, 503].
- // It follows that we cannot trigger a sale of 1005 units of the right maker's asset through `Exchange.fillOrder`.
- // iii.
- // For an optimal match, the algorithm must choose either [1005, 502] or [1005, 503] as fill amounts for the right order.
- // The algorithm favors the right maker when the exchange rate must be rounded, so the final fill for the right order is [1005, 503].
- // iv.
- // The right maker fee differs from the right taker fee because their exchange rate differs.
- // The right maker always receives the better exchange and fee price.
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1005), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(503), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber('47.2718720602069614'), 16), // 47.27%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(497), 0),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber('47.3189087488240827'), 16), // 47.31%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow matchOrders to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAddress: makerAddressRight,
- takerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feeRecipientAddress: feeRecipientAddressRight,
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('matchOrders reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts when orders completely fill each other', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts when orders completely fill each other and taker doesnt take a profit', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts when left order is completely filled and right order is partially filled', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(20), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 16), // 50%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 16), // 50%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts when right order is completely filled and left order is partially filled', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match signedOrderLeft with signedOrderRight
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 16), // 10%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 16), // 10%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- // Match signedOrderLeft with signedOrderRight
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts when consecutive calls are used to completely fill the left order', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- let newERC20BalancesByOwner: ERC20BalancesByOwner;
- let newERC721TokenIdsByOwner: ERC721TokenIdsByOwner;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 16), // 10%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 16), // 10%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- // prettier-ignore
- [
- newERC20BalancesByOwner,
- // tslint:disable-next-line:trailing-comma
- newERC721TokenIdsByOwner
- ] = await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- // Construct second right order
- // Note: This order needs makerAssetAmount=90/takerAssetAmount=[anything <= 45] to fully fill the right order.
- // However, we use 100/50 to ensure a partial fill as we want to go down the "left fill"
- // branch in the contract twice for this test.
- const signedOrderRight2 = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18),
- });
- // Match signedOrderLeft with signedOrderRight2
- const leftTakerAssetFilledAmount = signedOrderRight.makerAssetAmount;
- const rightTakerAssetFilledAmount = new BigNumber(0);
- const expectedTransferAmounts2 = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(45), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 16), // 90% (10% paid earlier)
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(45), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 16), // 90%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 16), // 90% (10% paid earlier)
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(90), 16), // 90%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight2,
- takerAddress,
- newERC20BalancesByOwner,
- newERC721TokenIdsByOwner,
- expectedTransferAmounts2,
- leftTakerAssetFilledAmount,
- rightTakerAssetFilledAmount,
- );
- });
-
- it('should transfer the correct amounts when consecutive calls are used to completely fill the right order', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
-
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
- // Match orders
- let newERC20BalancesByOwner: ERC20BalancesByOwner;
- let newERC721TokenIdsByOwner: ERC721TokenIdsByOwner;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 16), // 4%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(6), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(4), 16), // 4%
- };
- // prettier-ignore
- [
- newERC20BalancesByOwner,
- // tslint:disable-next-line:trailing-comma
- newERC721TokenIdsByOwner
- ] = await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
-
- // Create second left order
- // Note: This order needs makerAssetAmount=96/takerAssetAmount=48 to fully fill the right order.
- // However, we use 100/50 to ensure a partial fill as we want to go down the "right fill"
- // branch in the contract twice for this test.
- const signedOrderLeft2 = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(50), 18),
- });
- // Match signedOrderLeft2 with signedOrderRight
- const leftTakerAssetFilledAmount = new BigNumber(0);
- const takerAmountReceived = newERC20BalancesByOwner[takerAddress][defaultERC20MakerAssetAddress].minus(
- erc20BalancesByOwner[takerAddress][defaultERC20MakerAssetAddress],
- );
- const rightTakerAssetFilledAmount = signedOrderLeft.makerAssetAmount.minus(takerAmountReceived);
- const expectedTransferAmounts2 = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(48), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 16), // 96%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(48), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 16), // 96%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 16), // 96%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(96), 16), // 96%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft2,
- signedOrderRight,
- takerAddress,
- newERC20BalancesByOwner,
- newERC721TokenIdsByOwner,
- expectedTransferAmounts2,
- leftTakerAssetFilledAmount,
- rightTakerAssetFilledAmount,
- );
- });
-
- it('should transfer the correct amounts if fee recipient is the same across both matched orders', async () => {
- const feeRecipientAddress = feeRecipientAddressLeft;
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feeRecipientAddress,
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feeRecipientAddress,
- });
- // Match orders
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts if taker is also the left order maker', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- takerAddress = signedOrderLeft.makerAddress;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts if taker is also the right order maker', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- takerAddress = signedOrderRight.makerAddress;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts if taker is also the left fee recipient', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- takerAddress = feeRecipientAddressLeft;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts if taker is also the right fee recipient', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- takerAddress = feeRecipientAddressRight;
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer the correct amounts if left maker is the left fee recipient and right maker is the right fee recipient', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('Should throw if left order is not fillable', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Cancel left order
- await exchangeWrapper.cancelOrderAsync(signedOrderLeft, signedOrderLeft.makerAddress);
- // Match orders
- return expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('Should throw if right order is not fillable', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Cancel right order
- await exchangeWrapper.cancelOrderAsync(signedOrderRight, signedOrderRight.makerAddress);
- // Match orders
- return expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should throw if there is not a positive spread', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- });
- // Match orders
- return expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- RevertReason.NegativeSpreadRequired,
- );
- });
-
- it('should throw if the left maker asset is not equal to the right taker asset ', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20TakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- return expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- // We are assuming assetData fields of the right order are the
- // reverse of the left order, rather than checking equality. This
- // saves a bunch of gas, but as a result if the assetData fields are
- // off then the failure ends up happening at signature validation
- RevertReason.InvalidOrderSignature,
- );
- });
-
- it('should throw if the right maker asset is not equal to the left taker asset', async () => {
- // Create orders to match
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultERC20MakerAssetAddress),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(5), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- });
- // Match orders
- return expectTransactionFailedAsync(
- exchangeWrapper.matchOrdersAsync(signedOrderLeft, signedOrderRight, takerAddress),
- RevertReason.InvalidOrderSignature,
- );
- });
-
- it('should transfer correct amounts when left order maker asset is an ERC721 token', async () => {
- // Create orders to match
- const erc721TokenToTransfer = erc721LeftMakerAssetIds[0];
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC721AssetData(defaultERC721AssetAddress, erc721TokenToTransfer),
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC721AssetData(defaultERC721AssetAddress, erc721TokenToTransfer),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: new BigNumber(1),
- });
- // Match orders
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(0), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 50%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
-
- it('should transfer correct amounts when right order maker asset is an ERC721 token', async () => {
- // Create orders to match
- const erc721TokenToTransfer = erc721RightMakerAssetIds[0];
- const signedOrderLeft = await orderFactoryLeft.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC721AssetData(defaultERC721AssetAddress, erc721TokenToTransfer),
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- takerAssetAmount: new BigNumber(1),
- });
- const signedOrderRight = await orderFactoryRight.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC721AssetData(defaultERC721AssetAddress, erc721TokenToTransfer),
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(8), 18),
- });
- // Match orders
- const expectedTransferAmounts = {
- // Left Maker
- amountSoldByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(10), 18),
- amountBoughtByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- feePaidByLeftMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Right Maker
- amountSoldByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 0),
- amountBoughtByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(8), 18),
- feePaidByRightMaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- // Taker
- amountReceivedByTaker: Web3Wrapper.toBaseUnitAmount(new BigNumber(2), 18),
- feePaidByTakerLeft: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- feePaidByTakerRight: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 16), // 100%
- };
- await matchOrderTester.matchOrdersAndAssertEffectsAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- });
- });
-}); // tslint:disable-line:max-file-line-count
diff --git a/contracts/protocol/test/exchange/signature_validator.ts b/contracts/protocol/test/exchange/signature_validator.ts
deleted file mode 100644
index 3f1786b5b..000000000
--- a/contracts/protocol/test/exchange/signature_validator.ts
+++ /dev/null
@@ -1,526 +0,0 @@
-import { artifacts as examplesArtifacts, ValidatorContract, WalletContract } from '@0x/contracts-examples';
-import {
- addressUtils,
- chaiSetup,
- constants,
- expectContractCallFailedAsync,
- LogDecoder,
- OrderFactory,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, orderHashUtils, signatureUtils } from '@0x/order-utils';
-import { RevertReason, SignatureType, SignedOrder } from '@0x/types';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import ethUtil = require('ethereumjs-util');
-
-import {
- artifacts,
- TestSignatureValidatorContract,
- TestSignatureValidatorSignatureValidatorApprovalEventArgs,
- TestStaticCallReceiverContract,
-} from '../../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('MixinSignatureValidator', () => {
- let signedOrder: SignedOrder;
- let orderFactory: OrderFactory;
- let signatureValidator: TestSignatureValidatorContract;
- let testWallet: WalletContract;
- let testValidator: ValidatorContract;
- let maliciousWallet: TestStaticCallReceiverContract;
- let maliciousValidator: TestStaticCallReceiverContract;
- let signerAddress: string;
- let signerPrivateKey: Buffer;
- let notSignerAddress: string;
- let notSignerPrivateKey: Buffer;
- let signatureValidatorLogDecoder: LogDecoder;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const makerAddress = accounts[0];
- signerAddress = makerAddress;
- notSignerAddress = accounts[1];
- signatureValidator = await TestSignatureValidatorContract.deployFrom0xArtifactAsync(
- artifacts.TestSignatureValidator,
- provider,
- txDefaults,
- );
- testWallet = await WalletContract.deployFrom0xArtifactAsync(
- examplesArtifacts.Wallet,
- provider,
- txDefaults,
- signerAddress,
- );
- testValidator = await ValidatorContract.deployFrom0xArtifactAsync(
- examplesArtifacts.Validator,
- provider,
- txDefaults,
- signerAddress,
- );
- maliciousWallet = maliciousValidator = await TestStaticCallReceiverContract.deployFrom0xArtifactAsync(
- artifacts.TestStaticCallReceiver,
- provider,
- txDefaults,
- );
- signatureValidatorLogDecoder = new LogDecoder(web3Wrapper, { ...artifacts, ...tokensArtifacts });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(testValidator.address, true, {
- from: signerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(
- maliciousValidator.address,
- true,
- {
- from: signerAddress,
- },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- exchangeAddress: signatureValidator.address,
- makerAddress,
- feeRecipientAddress: addressUtils.generatePseudoRandomAddress(),
- makerAssetData: assetDataUtils.encodeERC20AssetData(addressUtils.generatePseudoRandomAddress()),
- takerAssetData: assetDataUtils.encodeERC20AssetData(addressUtils.generatePseudoRandomAddress()),
- };
- signerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- notSignerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(notSignerAddress)];
- orderFactory = new OrderFactory(signerPrivateKey, defaultOrderParams);
- });
-
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('isValidSignature', () => {
- beforeEach(async () => {
- signedOrder = await orderFactory.newSignedOrderAsync();
- });
-
- it('should revert when signature is empty', async () => {
- const emptySignature = '0x';
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- return expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- emptySignature,
- ),
- RevertReason.LengthGreaterThan0Required,
- );
- });
-
- it('should revert when signature type is unsupported', async () => {
- const unsupportedSignatureType = SignatureType.NSignatureTypes;
- const unsupportedSignatureHex = `0x${Buffer.from([unsupportedSignatureType]).toString('hex')}`;
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- return expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- unsupportedSignatureHex,
- ),
- RevertReason.SignatureUnsupported,
- );
- });
-
- it('should revert when SignatureType=Illegal', async () => {
- const unsupportedSignatureHex = `0x${Buffer.from([SignatureType.Illegal]).toString('hex')}`;
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- return expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- unsupportedSignatureHex,
- ),
- RevertReason.SignatureIllegal,
- );
- });
-
- it('should return false when SignatureType=Invalid and signature has a length of zero', async () => {
- const signatureHex = `0x${Buffer.from([SignatureType.Invalid]).toString('hex')}`;
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should revert when SignatureType=Invalid and signature length is non-zero', async () => {
- const fillerData = ethUtil.toBuffer('0xdeadbeef');
- const signatureType = ethUtil.toBuffer(`0x${SignatureType.Invalid}`);
- const signatureBuffer = Buffer.concat([fillerData, signatureType]);
- const signatureHex = ethUtil.bufferToHex(signatureBuffer);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- return expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- signatureHex,
- ),
- RevertReason.Length0Required,
- );
- });
-
- it('should return true when SignatureType=EIP712 and signature is valid', async () => {
- // Create EIP712 signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
- const ecSignature = ethUtil.ecsign(orderHashBuffer, signerPrivateKey);
- // Create 0x signature from EIP712 signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.EIP712}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return false when SignatureType=EIP712 and signature is invalid', async () => {
- // Create EIP712 signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
- const ecSignature = ethUtil.ecsign(orderHashBuffer, signerPrivateKey);
- // Create 0x signature from EIP712 signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.EIP712}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature.
- // This will fail because `signerAddress` signed the message, but we're passing in `notSignerAddress`
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- notSignerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should return true when SignatureType=EthSign and signature is valid', async () => {
- // Create EthSign signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashWithEthSignPrefixHex = signatureUtils.addSignedMessagePrefix(orderHashHex);
- const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex);
- const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey);
- // Create 0x signature from EthSign signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.EthSign}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return false when SignatureType=EthSign and signature is invalid', async () => {
- // Create EthSign signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashWithEthSignPrefixHex = signatureUtils.addSignedMessagePrefix(orderHashHex);
- const orderHashWithEthSignPrefixBuffer = ethUtil.toBuffer(orderHashWithEthSignPrefixHex);
- const ecSignature = ethUtil.ecsign(orderHashWithEthSignPrefixBuffer, signerPrivateKey);
- // Create 0x signature from EthSign signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.EthSign}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature.
- // This will fail because `signerAddress` signed the message, but we're passing in `notSignerAddress`
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- notSignerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should return true when SignatureType=Wallet and signature is valid', async () => {
- // Create EIP712 signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
- const ecSignature = ethUtil.ecsign(orderHashBuffer, signerPrivateKey);
- // Create 0x signature from EIP712 signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.Wallet}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- testWallet.address,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return false when SignatureType=Wallet and signature is invalid', async () => {
- // Create EIP712 signature using a private key that does not belong to the wallet owner.
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
- const notWalletOwnerPrivateKey = notSignerPrivateKey;
- const ecSignature = ethUtil.ecsign(orderHashBuffer, notWalletOwnerPrivateKey);
- // Create 0x signature from EIP712 signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.Wallet}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- // Validate signature
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- testWallet.address,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should revert when `isValidSignature` attempts to update state and SignatureType=Wallet', async () => {
- // Create EIP712 signature
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const orderHashBuffer = ethUtil.toBuffer(orderHashHex);
- const ecSignature = ethUtil.ecsign(orderHashBuffer, signerPrivateKey);
- // Create 0x signature from EIP712 signature
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(`0x${SignatureType.Wallet}`),
- ]);
- const signatureHex = ethUtil.bufferToHex(signature);
- await expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- maliciousWallet.address,
- signatureHex,
- ),
- RevertReason.WalletError,
- );
- });
-
- it('should return true when SignatureType=Validator, signature is valid and validator is approved', async () => {
- const validatorAddress = ethUtil.toBuffer(`${testValidator.address}`);
- const signatureType = ethUtil.toBuffer(`0x${SignatureType.Validator}`);
- const signature = Buffer.concat([validatorAddress, signatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return false when SignatureType=Validator, signature is invalid and validator is approved', async () => {
- const validatorAddress = ethUtil.toBuffer(`${testValidator.address}`);
- const signatureType = ethUtil.toBuffer(`0x${SignatureType.Validator}`);
- const signature = Buffer.concat([validatorAddress, signatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- // This will return false because we signed the message with `signerAddress`, but
- // are validating against `notSignerAddress`
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- notSignerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should revert when `isValidSignature` attempts to update state and SignatureType=Validator', async () => {
- const validatorAddress = ethUtil.toBuffer(`${maliciousValidator.address}`);
- const signatureType = ethUtil.toBuffer(`0x${SignatureType.Validator}`);
- const signature = Buffer.concat([validatorAddress, signatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- await expectContractCallFailedAsync(
- signatureValidator.publicIsValidSignature.callAsync(orderHashHex, signerAddress, signatureHex),
- RevertReason.ValidatorError,
- );
- });
- it('should return false when SignatureType=Validator, signature is valid and validator is not approved', async () => {
- // Set approval of signature validator to false
- await web3Wrapper.awaitTransactionSuccessAsync(
- await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(
- testValidator.address,
- false,
- { from: signerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Validate signature
- const validatorAddress = ethUtil.toBuffer(`${testValidator.address}`);
- const signatureType = ethUtil.toBuffer(`0x${SignatureType.Validator}`);
- const signature = Buffer.concat([validatorAddress, signatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should return true when SignatureType=Presigned and signer has presigned hash', async () => {
- // Presign hash
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await signatureValidator.preSign.sendTransactionAsync(
- orderHashHex,
- signedOrder.makerAddress,
- signedOrder.signature,
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- // Validate presigned signature
- const signature = ethUtil.toBuffer(`0x${SignatureType.PreSigned}`);
- const signatureHex = ethUtil.bufferToHex(signature);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return false when SignatureType=Presigned and signer has not presigned hash', async () => {
- const signature = ethUtil.toBuffer(`0x${SignatureType.PreSigned}`);
- const signatureHex = ethUtil.bufferToHex(signature);
- const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- orderHashHex,
- signedOrder.makerAddress,
- signatureHex,
- );
- expect(isValidSignature).to.be.false();
- });
-
- it('should return true when message was signed by a Trezor One (firmware version 1.6.2)', async () => {
- // messageHash translates to 0x2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
- const messageHash = ethUtil.bufferToHex(ethUtil.toBuffer('++++++++++++++++++++++++++++++++'));
- const signer = '0xc28b145f10f0bcf0fc000e778615f8fd73490bad';
- const v = ethUtil.toBuffer('0x1c');
- const r = ethUtil.toBuffer('0x7b888b596ccf87f0bacab0dcb483124973f7420f169b4824d7a12534ac1e9832');
- const s = ethUtil.toBuffer('0x0c8e14f7edc01459e13965f1da56e0c23ed11e2cca932571eee1292178f90424');
- const trezorSignatureType = ethUtil.toBuffer(`0x${SignatureType.EthSign}`);
- const signature = Buffer.concat([v, r, s, trezorSignatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- messageHash,
- signer,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
-
- it('should return true when message was signed by a Trezor Model T (firmware version 2.0.7)', async () => {
- // messageHash translates to 0x2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b2b
- const messageHash = ethUtil.bufferToHex(ethUtil.toBuffer('++++++++++++++++++++++++++++++++'));
- const signer = '0x98ce6d9345e8ffa7d99ee0822272fae9d2c0e895';
- const v = ethUtil.toBuffer('0x1c');
- const r = ethUtil.toBuffer('0x423b71062c327f0ec4fe199b8da0f34185e59b4c1cb4cc23df86cac4a601fb3f');
- const s = ethUtil.toBuffer('0x53810d6591b5348b7ee08ee812c874b0fdfb942c9849d59512c90e295221091f');
- const trezorSignatureType = ethUtil.toBuffer(`0x${SignatureType.EthSign}`);
- const signature = Buffer.concat([v, r, s, trezorSignatureType]);
- const signatureHex = ethUtil.bufferToHex(signature);
- const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
- messageHash,
- signer,
- signatureHex,
- );
- expect(isValidSignature).to.be.true();
- });
- });
-
- describe('setSignatureValidatorApproval', () => {
- it('should emit a SignatureValidatorApprovalSet with correct args when a validator is approved', async () => {
- const approval = true;
- const res = await signatureValidatorLogDecoder.getTxWithDecodedLogsAsync(
- await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(
- testValidator.address,
- approval,
- {
- from: signerAddress,
- },
- ),
- );
- expect(res.logs.length).to.equal(1);
- const log = res.logs[0] as LogWithDecodedArgs<TestSignatureValidatorSignatureValidatorApprovalEventArgs>;
- const logArgs = log.args;
- expect(logArgs.signerAddress).to.equal(signerAddress);
- expect(logArgs.validatorAddress).to.equal(testValidator.address);
- expect(logArgs.approved).to.equal(approval);
- });
- it('should emit a SignatureValidatorApprovalSet with correct args when a validator is disapproved', async () => {
- const approval = false;
- const res = await signatureValidatorLogDecoder.getTxWithDecodedLogsAsync(
- await signatureValidator.setSignatureValidatorApproval.sendTransactionAsync(
- testValidator.address,
- approval,
- {
- from: signerAddress,
- },
- ),
- );
- expect(res.logs.length).to.equal(1);
- const log = res.logs[0] as LogWithDecodedArgs<TestSignatureValidatorSignatureValidatorApprovalEventArgs>;
- const logArgs = log.args;
- expect(logArgs.signerAddress).to.equal(signerAddress);
- expect(logArgs.validatorAddress).to.equal(testValidator.address);
- expect(logArgs.approved).to.equal(approval);
- });
- });
-});
-// tslint:disable:max-file-line-count
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/protocol/test/exchange/transactions.ts b/contracts/protocol/test/exchange/transactions.ts
deleted file mode 100644
index e8c775f3e..000000000
--- a/contracts/protocol/test/exchange/transactions.ts
+++ /dev/null
@@ -1,466 +0,0 @@
-import { artifacts as examplesArtifacts, ExchangeWrapperContract, WhitelistContract } from '@0x/contracts-examples';
-import {
- chaiSetup,
- constants,
- ERC20BalancesByOwner,
- expectTransactionFailedAsync,
- OrderFactory,
- orderUtils,
- provider,
- SignedTransaction,
- TransactionFactory,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { DummyERC20TokenContract } from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
-import { OrderWithoutExchangeAddress, RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ExchangeContract } from '../../generated-wrappers/exchange';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ExchangeWrapper } from '../utils/exchange_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('Exchange transactions', () => {
- let senderAddress: string;
- let owner: string;
- let makerAddress: string;
- let takerAddress: string;
- let feeRecipientAddress: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let exchange: ExchangeContract;
- let erc20Proxy: ERC20ProxyContract;
-
- let erc20Balances: ERC20BalancesByOwner;
- let signedOrder: SignedOrder;
- let signedTx: SignedTransaction;
- let orderWithoutExchangeAddress: OrderWithoutExchangeAddress;
- let orderFactory: OrderFactory;
- let makerTransactionFactory: TransactionFactory;
- let takerTransactionFactory: TransactionFactory;
- let exchangeWrapper: ExchangeWrapper;
- let erc20Wrapper: ERC20Wrapper;
-
- let defaultMakerTokenAddress: string;
- let defaultTakerTokenAddress: string;
- let makerPrivateKey: Buffer;
- let takerPrivateKey: Buffer;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, senderAddress, makerAddress, takerAddress, feeRecipientAddress] = _.slice(
- accounts,
- 0,
- 5,
- ));
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
- exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- defaultMakerTokenAddress = erc20TokenA.address;
- defaultTakerTokenAddress = erc20TokenB.address;
-
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- senderAddress,
- exchangeAddress: exchange.address,
- makerAddress,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerTokenAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerTokenAddress),
- };
- makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- takerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(takerAddress)];
- orderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams);
- makerTransactionFactory = new TransactionFactory(makerPrivateKey, exchange.address);
- takerTransactionFactory = new TransactionFactory(takerPrivateKey, exchange.address);
- });
- describe('executeTransaction', () => {
- describe('fillOrder', () => {
- let takerAssetFillAmount: BigNumber;
- beforeEach(async () => {
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- signedOrder = await orderFactory.newSignedOrderAsync();
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
-
- takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- const data = exchange.fillOrder.getABIEncodedTransactionData(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- signedOrder.signature,
- );
- signedTx = takerTransactionFactory.newSignedTransaction(data);
- });
-
- it('should throw if not called by specified sender', async () => {
- return expectTransactionFailedAsync(
- exchangeWrapper.executeTransactionAsync(signedTx, takerAddress),
- RevertReason.FailedExecution,
- );
- });
-
- it('should transfer the correct amounts when signed by taker and called by sender', async () => {
- await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFeePaid = signedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFeePaid = signedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- expect(newBalances[makerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[takerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
-
- it('should throw if the a 0x transaction with the same transactionHash has already been executed', async () => {
- await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.executeTransactionAsync(signedTx, senderAddress),
- RevertReason.InvalidTxHash,
- );
- });
-
- it('should reset the currentContextAddress', async () => {
- await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress);
- const currentContextAddress = await exchange.currentContextAddress.callAsync();
- expect(currentContextAddress).to.equal(constants.NULL_ADDRESS);
- });
- });
-
- describe('cancelOrder', () => {
- beforeEach(async () => {
- const data = exchange.cancelOrder.getABIEncodedTransactionData(orderWithoutExchangeAddress);
- signedTx = makerTransactionFactory.newSignedTransaction(data);
- });
-
- it('should throw if not called by specified sender', async () => {
- return expectTransactionFailedAsync(
- exchangeWrapper.executeTransactionAsync(signedTx, makerAddress),
- RevertReason.FailedExecution,
- );
- });
-
- it('should cancel the order when signed by maker and called by sender', async () => {
- await exchangeWrapper.executeTransactionAsync(signedTx, senderAddress);
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrderAsync(signedOrder, senderAddress),
- RevertReason.OrderUnfillable,
- );
- });
- });
-
- describe('cancelOrdersUpTo', () => {
- let exchangeWrapperContract: ExchangeWrapperContract;
-
- before(async () => {
- exchangeWrapperContract = await ExchangeWrapperContract.deployFrom0xArtifactAsync(
- examplesArtifacts.ExchangeWrapper,
- provider,
- txDefaults,
- exchange.address,
- );
- });
-
- it("should cancel an order if called from the order's sender", async () => {
- const orderSalt = new BigNumber(0);
- signedOrder = await orderFactory.newSignedOrderAsync({
- senderAddress: exchangeWrapperContract.address,
- salt: orderSalt,
- });
- const targetOrderEpoch = orderSalt.plus(1);
- const cancelData = exchange.cancelOrdersUpTo.getABIEncodedTransactionData(targetOrderEpoch);
- const signedCancelTx = makerTransactionFactory.newSignedTransaction(cancelData);
- await exchangeWrapperContract.cancelOrdersUpTo.sendTransactionAsync(
- targetOrderEpoch,
- signedCancelTx.salt,
- signedCancelTx.signature,
- {
- from: makerAddress,
- },
- );
-
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- const fillData = exchange.fillOrder.getABIEncodedTransactionData(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- signedOrder.signature,
- );
- const signedFillTx = takerTransactionFactory.newSignedTransaction(fillData);
- return expectTransactionFailedAsync(
- exchangeWrapperContract.fillOrder.sendTransactionAsync(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- signedFillTx.salt,
- signedOrder.signature,
- signedFillTx.signature,
- { from: takerAddress },
- ),
- RevertReason.FailedExecution,
- );
- });
-
- it("should not cancel an order if not called from the order's sender", async () => {
- const orderSalt = new BigNumber(0);
- signedOrder = await orderFactory.newSignedOrderAsync({
- senderAddress: exchangeWrapperContract.address,
- salt: orderSalt,
- });
- const targetOrderEpoch = orderSalt.plus(1);
- await exchangeWrapper.cancelOrdersUpToAsync(targetOrderEpoch, makerAddress);
-
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- const data = exchange.fillOrder.getABIEncodedTransactionData(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- signedOrder.signature,
- );
- signedTx = takerTransactionFactory.newSignedTransaction(data);
- await exchangeWrapperContract.fillOrder.sendTransactionAsync(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- signedTx.salt,
- signedOrder.signature,
- signedTx.signature,
- { from: takerAddress },
- );
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFillAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFeePaid = signedOrder.makerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFeePaid = signedOrder.takerFee
- .times(makerAssetFillAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- expect(newBalances[makerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[takerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- });
- });
-
- describe('Whitelist', () => {
- let whitelist: WhitelistContract;
- let whitelistOrderFactory: OrderFactory;
-
- before(async () => {
- whitelist = await WhitelistContract.deployFrom0xArtifactAsync(
- examplesArtifacts.Whitelist,
- provider,
- txDefaults,
- exchange.address,
- );
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.setSignatureValidatorApproval.sendTransactionAsync(whitelist.address, isApproved, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- senderAddress: whitelist.address,
- exchangeAddress: exchange.address,
- makerAddress,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerTokenAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerTokenAddress),
- };
- whitelistOrderFactory = new OrderFactory(makerPrivateKey, defaultOrderParams);
- });
-
- beforeEach(async () => {
- signedOrder = await whitelistOrderFactory.newSignedOrderAsync();
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- });
-
- it('should revert if maker has not been whitelisted', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await whitelist.updateWhitelistStatus.sendTransactionAsync(takerAddress, isApproved, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- const salt = generatePseudoRandomSalt();
- return expectTransactionFailedAsync(
- whitelist.fillOrderIfWhitelisted.sendTransactionAsync(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- salt,
- signedOrder.signature,
- { from: takerAddress },
- ),
- RevertReason.MakerNotWhitelisted,
- );
- });
-
- it('should revert if taker has not been whitelisted', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await whitelist.updateWhitelistStatus.sendTransactionAsync(makerAddress, isApproved, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- const salt = generatePseudoRandomSalt();
- return expectTransactionFailedAsync(
- whitelist.fillOrderIfWhitelisted.sendTransactionAsync(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- salt,
- signedOrder.signature,
- { from: takerAddress },
- ),
- RevertReason.TakerNotWhitelisted,
- );
- });
-
- it('should fill the order if maker and taker have been whitelisted', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await whitelist.updateWhitelistStatus.sendTransactionAsync(makerAddress, isApproved, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await whitelist.updateWhitelistStatus.sendTransactionAsync(takerAddress, isApproved, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- const salt = generatePseudoRandomSalt();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await whitelist.fillOrderIfWhitelisted.sendTransactionAsync(
- orderWithoutExchangeAddress,
- takerAssetFillAmount,
- salt,
- signedOrder.signature,
- { from: takerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAssetFillAmount = signedOrder.makerAssetAmount;
- const makerFeePaid = signedOrder.makerFee;
- const takerFeePaid = signedOrder.takerFee;
-
- expect(newBalances[makerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerTokenAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerTokenAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFeePaid),
- );
- expect(newBalances[takerAddress][defaultTakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerTokenAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerTokenAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerTokenAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFeePaid),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFeePaid.plus(takerFeePaid)),
- );
- });
- });
-});
diff --git a/contracts/protocol/test/exchange/wrapper.ts b/contracts/protocol/test/exchange/wrapper.ts
deleted file mode 100644
index 49ba5a2e5..000000000
--- a/contracts/protocol/test/exchange/wrapper.ts
+++ /dev/null
@@ -1,1461 +0,0 @@
-import {
- chaiSetup,
- constants,
- ERC20BalancesByOwner,
- expectTransactionFailedAsync,
- getLatestBlockTimestampAsync,
- increaseTimeAndMineBlockAsync,
- OrderFactory,
- OrderStatus,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import {
- artifacts as tokensArtifacts,
- DummyERC20TokenContract,
- DummyERC721TokenContract,
- ReentrantERC20TokenContract,
-} from '@0x/contracts-tokens';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { ExchangeContract } from '../../generated-wrappers/exchange';
-import { artifacts } from '../../src/artifacts';
-import { ERC20Wrapper } from '../utils/erc20_wrapper';
-import { ERC721Wrapper } from '../utils/erc721_wrapper';
-import { ExchangeWrapper } from '../utils/exchange_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('Exchange wrappers', () => {
- let makerAddress: string;
- let owner: string;
- let takerAddress: string;
- let feeRecipientAddress: string;
-
- let erc20TokenA: DummyERC20TokenContract;
- let erc20TokenB: DummyERC20TokenContract;
- let zrxToken: DummyERC20TokenContract;
- let erc721Token: DummyERC721TokenContract;
- let exchange: ExchangeContract;
- let erc20Proxy: ERC20ProxyContract;
- let erc721Proxy: ERC721ProxyContract;
- let reentrantErc20Token: ReentrantERC20TokenContract;
-
- let exchangeWrapper: ExchangeWrapper;
- let erc20Wrapper: ERC20Wrapper;
- let erc721Wrapper: ERC721Wrapper;
- let erc20Balances: ERC20BalancesByOwner;
- let orderFactory: OrderFactory;
-
- let erc721MakerAssetId: BigNumber;
- let erc721TakerAssetId: BigNumber;
-
- let defaultMakerAssetAddress: string;
- let defaultTakerAssetAddress: string;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const usedAddresses = ([owner, makerAddress, takerAddress, feeRecipientAddress] = _.slice(accounts, 0, 4));
-
- erc20Wrapper = new ERC20Wrapper(provider, usedAddresses, owner);
- erc721Wrapper = new ERC721Wrapper(provider, usedAddresses, owner);
-
- const numDummyErc20ToDeploy = 3;
- [erc20TokenA, erc20TokenB, zrxToken] = await erc20Wrapper.deployDummyTokensAsync(
- numDummyErc20ToDeploy,
- constants.DUMMY_TOKEN_DECIMALS,
- );
- erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- erc721Proxy = await erc721Wrapper.deployProxyAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
- erc721MakerAssetId = erc721Balances[makerAddress][erc721Token.address][0];
- erc721TakerAssetId = erc721Balances[takerAddress][erc721Token.address][0];
-
- exchange = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- );
- exchangeWrapper = new ExchangeWrapper(exchange, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, owner);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, owner);
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- reentrantErc20Token = await ReentrantERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.ReentrantERC20Token,
- provider,
- txDefaults,
- exchange.address,
- );
-
- defaultMakerAssetAddress = erc20TokenA.address;
- defaultTakerAssetAddress = erc20TokenB.address;
-
- const defaultOrderParams = {
- ...constants.STATIC_ORDER_PARAMS,
- exchangeAddress: exchange.address,
- makerAddress,
- feeRecipientAddress,
- makerAssetData: assetDataUtils.encodeERC20AssetData(defaultMakerAssetAddress),
- takerAssetData: assetDataUtils.encodeERC20AssetData(defaultTakerAssetAddress),
- };
- const privateKey = constants.TESTRPC_PRIVATE_KEYS[accounts.indexOf(makerAddress)];
- orderFactory = new OrderFactory(privateKey, defaultOrderParams);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- erc20Balances = await erc20Wrapper.getBalancesAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('fillOrKillOrder', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow fillOrKillOrder to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('fillOrKillOrder reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- });
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- await exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFilledAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFilledAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should throw if a signedOrder is expired', async () => {
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const signedOrder = await orderFactory.newSignedOrderAsync({
- expirationTimeSeconds: new BigNumber(currentTimestamp).minus(10),
- });
-
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress),
- RevertReason.OrderUnfillable,
- );
- });
-
- it('should throw if entire takerAssetFillAmount not filled', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync();
-
- await exchangeWrapper.fillOrderAsync(signedOrder, takerAddress, {
- takerAssetFillAmount: signedOrder.takerAssetAmount.div(2),
- });
-
- return expectTransactionFailedAsync(
- exchangeWrapper.fillOrKillOrderAsync(signedOrder, takerAddress),
- RevertReason.CompleteFillFailed,
- );
- });
- });
-
- describe('fillOrderNoThrow', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow fillOrderNoThrow to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(erc20Balances).to.deep.equal(newBalances);
- });
- });
- };
- describe('fillOrderNoThrow reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- });
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
-
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 250000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
-
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFilledAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFilledAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should not change erc20Balances if maker erc20Balances are too low to fill order', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18),
- });
-
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if taker erc20Balances are too low to fill order', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18),
- });
-
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if maker allowances are too low to fill order', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenA.approve.sendTransactionAsync(erc20Proxy.address, new BigNumber(0), {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenA.approve.sendTransactionAsync(erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, {
- from: makerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if taker allowances are too low to fill order', async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync();
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenB.approve.sendTransactionAsync(erc20Proxy.address, new BigNumber(0), {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20TokenB.approve.sendTransactionAsync(erc20Proxy.address, constants.INITIAL_ERC20_ALLOWANCE, {
- from: takerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if makerAssetAddress is ZRX, makerAssetAmount + makerFee > maker balance', async () => {
- const makerZRXBalance = new BigNumber(erc20Balances[makerAddress][zrxToken.address]);
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: makerZRXBalance,
- makerFee: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- });
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if makerAssetAddress is ZRX, makerAssetAmount + makerFee > maker allowance', async () => {
- const makerZRXAllowance = await zrxToken.allowance.callAsync(makerAddress, erc20Proxy.address);
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(makerZRXAllowance),
- makerFee: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- });
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if takerAssetAddress is ZRX, takerAssetAmount + takerFee > taker balance', async () => {
- const takerZRXBalance = new BigNumber(erc20Balances[takerAddress][zrxToken.address]);
- const signedOrder = await orderFactory.newSignedOrderAsync({
- takerAssetAmount: takerZRXBalance,
- takerFee: new BigNumber(1),
- takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- });
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not change erc20Balances if takerAssetAddress is ZRX, takerAssetAmount + takerFee > taker allowance', async () => {
- const takerZRXAllowance = await zrxToken.allowance.callAsync(takerAddress, erc20Proxy.address);
- const signedOrder = await orderFactory.newSignedOrderAsync({
- takerAssetAmount: new BigNumber(takerZRXAllowance),
- takerFee: new BigNumber(1),
- takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- });
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should successfully exchange ERC721 tokens', async () => {
- // Construct Exchange parameters
- const makerAssetId = erc721MakerAssetId;
- const takerAssetId = erc721TakerAssetId;
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetAmount: new BigNumber(1),
- takerAssetAmount: new BigNumber(1),
- makerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, makerAssetId),
- takerAssetData: assetDataUtils.encodeERC721AssetData(erc721Token.address, takerAssetId),
- });
- // Verify pre-conditions
- const initialOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(initialOwnerMakerAsset).to.be.bignumber.equal(makerAddress);
- const initialOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(initialOwnerTakerAsset).to.be.bignumber.equal(takerAddress);
- // Call Exchange
- const takerAssetFillAmount = signedOrder.takerAssetAmount;
- await exchangeWrapper.fillOrderNoThrowAsync(signedOrder, takerAddress, {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 280000,
- });
- // Verify post-conditions
- const newOwnerMakerAsset = await erc721Token.ownerOf.callAsync(makerAssetId);
- expect(newOwnerMakerAsset).to.be.bignumber.equal(takerAddress);
- const newOwnerTakerAsset = await erc721Token.ownerOf.callAsync(takerAssetId);
- expect(newOwnerTakerAsset).to.be.bignumber.equal(makerAddress);
- });
- });
-
- describe('batch functions', () => {
- let signedOrders: SignedOrder[];
- beforeEach(async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- ];
- });
-
- describe('batchFillOrders', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow batchFillOrders to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.batchFillOrdersAsync([signedOrder], takerAddress),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('batchFillOrders reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts', async () => {
- const takerAssetFillAmounts: BigNumber[] = [];
- const makerAssetAddress = erc20TokenA.address;
- const takerAssetAddress = erc20TokenB.address;
- _.forEach(signedOrders, signedOrder => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- takerAssetFillAmounts.push(takerAssetFillAmount);
- erc20Balances[makerAddress][makerAssetAddress] = erc20Balances[makerAddress][
- makerAssetAddress
- ].minus(makerAssetFilledAmount);
- erc20Balances[makerAddress][takerAssetAddress] = erc20Balances[makerAddress][
- takerAssetAddress
- ].plus(takerAssetFillAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- makerFee,
- );
- erc20Balances[takerAddress][makerAssetAddress] = erc20Balances[takerAddress][
- makerAssetAddress
- ].plus(makerAssetFilledAmount);
- erc20Balances[takerAddress][takerAssetAddress] = erc20Balances[takerAddress][
- takerAssetAddress
- ].minus(takerAssetFillAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(makerFee.plus(takerFee));
- });
-
- await exchangeWrapper.batchFillOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmounts,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
- });
-
- describe('batchFillOrKillOrders', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow batchFillOrKillOrders to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.batchFillOrKillOrdersAsync([signedOrder], takerAddress),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('batchFillOrKillOrders reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts', async () => {
- const takerAssetFillAmounts: BigNumber[] = [];
- const makerAssetAddress = erc20TokenA.address;
- const takerAssetAddress = erc20TokenB.address;
- _.forEach(signedOrders, signedOrder => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- takerAssetFillAmounts.push(takerAssetFillAmount);
- erc20Balances[makerAddress][makerAssetAddress] = erc20Balances[makerAddress][
- makerAssetAddress
- ].minus(makerAssetFilledAmount);
- erc20Balances[makerAddress][takerAssetAddress] = erc20Balances[makerAddress][
- takerAssetAddress
- ].plus(takerAssetFillAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- makerFee,
- );
- erc20Balances[takerAddress][makerAssetAddress] = erc20Balances[takerAddress][
- makerAssetAddress
- ].plus(makerAssetFilledAmount);
- erc20Balances[takerAddress][takerAssetAddress] = erc20Balances[takerAddress][
- takerAssetAddress
- ].minus(takerAssetFillAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(makerFee.plus(takerFee));
- });
-
- await exchangeWrapper.batchFillOrKillOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmounts,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should throw if a single signedOrder does not fill the expected amount', async () => {
- const takerAssetFillAmounts: BigNumber[] = [];
- _.forEach(signedOrders, signedOrder => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- takerAssetFillAmounts.push(takerAssetFillAmount);
- });
-
- await exchangeWrapper.fillOrKillOrderAsync(signedOrders[0], takerAddress);
-
- return expectTransactionFailedAsync(
- exchangeWrapper.batchFillOrKillOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmounts,
- }),
- RevertReason.OrderUnfillable,
- );
- });
- });
-
- describe('batchFillOrdersNoThrow', async () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow batchFillOrdersNoThrow to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.batchFillOrdersNoThrowAsync([signedOrder], takerAddress);
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(erc20Balances).to.deep.equal(newBalances);
- });
- });
- };
- describe('batchFillOrdersNoThrow reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should transfer the correct amounts', async () => {
- const takerAssetFillAmounts: BigNumber[] = [];
- const makerAssetAddress = erc20TokenA.address;
- const takerAssetAddress = erc20TokenB.address;
- _.forEach(signedOrders, signedOrder => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- takerAssetFillAmounts.push(takerAssetFillAmount);
- erc20Balances[makerAddress][makerAssetAddress] = erc20Balances[makerAddress][
- makerAssetAddress
- ].minus(makerAssetFilledAmount);
- erc20Balances[makerAddress][takerAssetAddress] = erc20Balances[makerAddress][
- takerAssetAddress
- ].plus(takerAssetFillAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- makerFee,
- );
- erc20Balances[takerAddress][makerAssetAddress] = erc20Balances[takerAddress][
- makerAssetAddress
- ].plus(makerAssetFilledAmount);
- erc20Balances[takerAddress][takerAssetAddress] = erc20Balances[takerAddress][
- takerAssetAddress
- ].minus(takerAssetFillAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(makerFee.plus(takerFee));
- });
-
- await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
- takerAssetFillAmounts,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not throw if an order is invalid and fill the remaining orders', async () => {
- const takerAssetFillAmounts: BigNumber[] = [];
- const makerAssetAddress = erc20TokenA.address;
- const takerAssetAddress = erc20TokenB.address;
-
- const invalidOrder = {
- ...signedOrders[0],
- signature: '0x00',
- };
- const validOrders = signedOrders.slice(1);
-
- takerAssetFillAmounts.push(invalidOrder.takerAssetAmount.div(2));
- _.forEach(validOrders, signedOrder => {
- const takerAssetFillAmount = signedOrder.takerAssetAmount.div(2);
- const makerAssetFilledAmount = takerAssetFillAmount
- .times(signedOrder.makerAssetAmount)
- .dividedToIntegerBy(signedOrder.takerAssetAmount);
- const makerFee = signedOrder.makerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- const takerFee = signedOrder.takerFee
- .times(makerAssetFilledAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
- takerAssetFillAmounts.push(takerAssetFillAmount);
- erc20Balances[makerAddress][makerAssetAddress] = erc20Balances[makerAddress][
- makerAssetAddress
- ].minus(makerAssetFilledAmount);
- erc20Balances[makerAddress][takerAssetAddress] = erc20Balances[makerAddress][
- takerAssetAddress
- ].plus(takerAssetFillAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- makerFee,
- );
- erc20Balances[takerAddress][makerAssetAddress] = erc20Balances[takerAddress][
- makerAssetAddress
- ].plus(makerAssetFilledAmount);
- erc20Balances[takerAddress][takerAssetAddress] = erc20Balances[takerAddress][
- takerAssetAddress
- ].minus(takerAssetFillAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(makerFee.plus(takerFee));
- });
-
- const newOrders = [invalidOrder, ...validOrders];
- await exchangeWrapper.batchFillOrdersNoThrowAsync(newOrders, takerAddress, {
- takerAssetFillAmounts,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 450000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
- });
-
- describe('marketSellOrders', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow marketSellOrders to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.marketSellOrdersAsync([signedOrder], takerAddress, {
- takerAssetFillAmount: signedOrder.takerAssetAmount,
- }),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('marketSellOrders reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should stop when the entire takerAssetFillAmount is filled', async () => {
- const takerAssetFillAmount = signedOrders[0].takerAssetAmount.plus(
- signedOrders[1].takerAssetAmount.div(2),
- );
- await exchangeWrapper.marketSellOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmount,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAssetFilledAmount = signedOrders[0].makerAssetAmount.plus(
- signedOrders[1].makerAssetAmount.dividedToIntegerBy(2),
- );
- const makerFee = signedOrders[0].makerFee.plus(signedOrders[1].makerFee.dividedToIntegerBy(2));
- const takerFee = signedOrders[0].takerFee.plus(signedOrders[1].takerFee.dividedToIntegerBy(2));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFilledAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFilledAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should fill all signedOrders if cannot fill entire takerAssetFillAmount', async () => {
- const takerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- _.forEach(signedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketSellOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmount,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should throw when a signedOrder does not use the same takerAssetAddress', async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- }),
- await orderFactory.newSignedOrderAsync(),
- ];
-
- return expectTransactionFailedAsync(
- exchangeWrapper.marketSellOrdersAsync(signedOrders, takerAddress, {
- takerAssetFillAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), 18),
- }),
- // We simply use the takerAssetData from the first order for all orders.
- // If they are not the same, the contract throws when validating the order signature
- RevertReason.InvalidOrderSignature,
- );
- });
- });
-
- describe('marketSellOrdersNoThrow', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow marketSellOrdersNoThrow to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.marketSellOrdersNoThrowAsync([signedOrder], takerAddress, {
- takerAssetFillAmount: signedOrder.takerAssetAmount,
- });
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(erc20Balances).to.deep.equal(newBalances);
- });
- });
- };
- describe('marketSellOrdersNoThrow reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should stop when the entire takerAssetFillAmount is filled', async () => {
- const takerAssetFillAmount = signedOrders[0].takerAssetAmount.plus(
- signedOrders[1].takerAssetAmount.div(2),
- );
- await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 6000000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAssetFilledAmount = signedOrders[0].makerAssetAmount.plus(
- signedOrders[1].makerAssetAmount.dividedToIntegerBy(2),
- );
- const makerFee = signedOrders[0].makerFee.plus(signedOrders[1].makerFee.dividedToIntegerBy(2));
- const takerFee = signedOrders[0].takerFee.plus(signedOrders[1].takerFee.dividedToIntegerBy(2));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFilledAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(takerAssetFillAmount),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(takerAssetFillAmount),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFilledAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should fill all signedOrders if cannot fill entire takerAssetFillAmount', async () => {
- const takerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- _.forEach(signedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not fill a signedOrder that does not use the same takerAssetAddress', async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync({
- takerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- }),
- ];
- const takerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- const filledSignedOrders = signedOrders.slice(0, -1);
- _.forEach(filledSignedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketSellOrdersNoThrowAsync(signedOrders, takerAddress, {
- takerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
- });
-
- describe('marketBuyOrders', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow marketBuyOrders to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await expectTransactionFailedAsync(
- exchangeWrapper.marketBuyOrdersAsync([signedOrder], takerAddress, {
- makerAssetFillAmount: signedOrder.makerAssetAmount,
- }),
- RevertReason.TransferFailed,
- );
- });
- });
- };
- describe('marketBuyOrders reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should stop when the entire makerAssetFillAmount is filled', async () => {
- const makerAssetFillAmount = signedOrders[0].makerAssetAmount.plus(
- signedOrders[1].makerAssetAmount.div(2),
- );
- await exchangeWrapper.marketBuyOrdersAsync(signedOrders, takerAddress, {
- makerAssetFillAmount,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAmountBought = signedOrders[0].takerAssetAmount.plus(
- signedOrders[1].takerAssetAmount.dividedToIntegerBy(2),
- );
- const makerFee = signedOrders[0].makerFee.plus(signedOrders[1].makerFee.dividedToIntegerBy(2));
- const takerFee = signedOrders[0].takerFee.plus(signedOrders[1].takerFee.dividedToIntegerBy(2));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(makerAmountBought),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(makerAmountBought),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should fill all signedOrders if cannot fill entire makerAssetFillAmount', async () => {
- const makerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- _.forEach(signedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketBuyOrdersAsync(signedOrders, takerAddress, {
- makerAssetFillAmount,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should throw when a signedOrder does not use the same makerAssetAddress', async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- }),
- await orderFactory.newSignedOrderAsync(),
- ];
-
- return expectTransactionFailedAsync(
- exchangeWrapper.marketBuyOrdersAsync(signedOrders, takerAddress, {
- makerAssetFillAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(1000), 18),
- }),
- RevertReason.InvalidOrderSignature,
- );
- });
- });
-
- describe('marketBuyOrdersNoThrow', () => {
- const reentrancyTest = (functionNames: string[]) => {
- _.forEach(functionNames, async (functionName: string, functionId: number) => {
- const description = `should not allow marketBuyOrdersNoThrow to reenter the Exchange contract via ${functionName}`;
- it(description, async () => {
- const signedOrder = await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(reentrantErc20Token.address),
- });
- await web3Wrapper.awaitTransactionSuccessAsync(
- await reentrantErc20Token.setCurrentFunction.sendTransactionAsync(functionId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await exchangeWrapper.marketBuyOrdersNoThrowAsync([signedOrder], takerAddress, {
- makerAssetFillAmount: signedOrder.makerAssetAmount,
- });
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(erc20Balances).to.deep.equal(newBalances);
- });
- });
- };
- describe('marketBuyOrdersNoThrow reentrancy tests', () => reentrancyTest(constants.FUNCTIONS_WITH_MUTEX));
-
- it('should stop when the entire makerAssetFillAmount is filled', async () => {
- const makerAssetFillAmount = signedOrders[0].makerAssetAmount.plus(
- signedOrders[1].makerAssetAmount.div(2),
- );
- await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
- makerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
-
- const makerAmountBought = signedOrders[0].takerAssetAmount.plus(
- signedOrders[1].takerAssetAmount.dividedToIntegerBy(2),
- );
- const makerFee = signedOrders[0].makerFee.plus(signedOrders[1].makerFee.dividedToIntegerBy(2));
- const takerFee = signedOrders[0].takerFee.plus(signedOrders[1].takerFee.dividedToIntegerBy(2));
- expect(newBalances[makerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultMakerAssetAddress].minus(makerAssetFillAmount),
- );
- expect(newBalances[makerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[makerAddress][defaultTakerAssetAddress].plus(makerAmountBought),
- );
- expect(newBalances[makerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[makerAddress][zrxToken.address].minus(makerFee),
- );
- expect(newBalances[takerAddress][defaultTakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultTakerAssetAddress].minus(makerAmountBought),
- );
- expect(newBalances[takerAddress][defaultMakerAssetAddress]).to.be.bignumber.equal(
- erc20Balances[takerAddress][defaultMakerAssetAddress].plus(makerAssetFillAmount),
- );
- expect(newBalances[takerAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[takerAddress][zrxToken.address].minus(takerFee),
- );
- expect(newBalances[feeRecipientAddress][zrxToken.address]).to.be.bignumber.equal(
- erc20Balances[feeRecipientAddress][zrxToken.address].plus(makerFee.plus(takerFee)),
- );
- });
-
- it('should fill all signedOrders if cannot fill entire makerAssetFillAmount', async () => {
- const makerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- _.forEach(signedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
- makerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
-
- it('should not fill a signedOrder that does not use the same makerAssetAddress', async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync({
- makerAssetData: assetDataUtils.encodeERC20AssetData(zrxToken.address),
- }),
- ];
-
- const makerAssetFillAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(100000), 18);
- const filledSignedOrders = signedOrders.slice(0, -1);
- _.forEach(filledSignedOrders, signedOrder => {
- erc20Balances[makerAddress][defaultMakerAssetAddress] = erc20Balances[makerAddress][
- defaultMakerAssetAddress
- ].minus(signedOrder.makerAssetAmount);
- erc20Balances[makerAddress][defaultTakerAssetAddress] = erc20Balances[makerAddress][
- defaultTakerAssetAddress
- ].plus(signedOrder.takerAssetAmount);
- erc20Balances[makerAddress][zrxToken.address] = erc20Balances[makerAddress][zrxToken.address].minus(
- signedOrder.makerFee,
- );
- erc20Balances[takerAddress][defaultMakerAssetAddress] = erc20Balances[takerAddress][
- defaultMakerAssetAddress
- ].plus(signedOrder.makerAssetAmount);
- erc20Balances[takerAddress][defaultTakerAssetAddress] = erc20Balances[takerAddress][
- defaultTakerAssetAddress
- ].minus(signedOrder.takerAssetAmount);
- erc20Balances[takerAddress][zrxToken.address] = erc20Balances[takerAddress][zrxToken.address].minus(
- signedOrder.takerFee,
- );
- erc20Balances[feeRecipientAddress][zrxToken.address] = erc20Balances[feeRecipientAddress][
- zrxToken.address
- ].plus(signedOrder.makerFee.plus(signedOrder.takerFee));
- });
- await exchangeWrapper.marketBuyOrdersNoThrowAsync(signedOrders, takerAddress, {
- makerAssetFillAmount,
- // HACK(albrow): We need to hardcode the gas estimate here because
- // the Geth gas estimator doesn't work with the way we use
- // delegatecall and swallow errors.
- gas: 600000,
- });
-
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(newBalances).to.be.deep.equal(erc20Balances);
- });
- });
-
- describe('batchCancelOrders', () => {
- it('should be able to cancel multiple signedOrders', async () => {
- const takerAssetCancelAmounts = _.map(signedOrders, signedOrder => signedOrder.takerAssetAmount);
- await exchangeWrapper.batchCancelOrdersAsync(signedOrders, makerAddress);
-
- await exchangeWrapper.batchFillOrdersNoThrowAsync(signedOrders, takerAddress, {
- takerAssetFillAmounts: takerAssetCancelAmounts,
- });
- const newBalances = await erc20Wrapper.getBalancesAsync();
- expect(erc20Balances).to.be.deep.equal(newBalances);
- });
- });
-
- describe('getOrdersInfo', () => {
- beforeEach(async () => {
- signedOrders = [
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- await orderFactory.newSignedOrderAsync(),
- ];
- });
- it('should get the correct information for multiple unfilled orders', async () => {
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Fillable;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple partially filled orders', async () => {
- const takerAssetFillAmounts = _.map(signedOrders, signedOrder => signedOrder.takerAssetAmount.div(2));
- await exchangeWrapper.batchFillOrdersAsync(signedOrders, takerAddress, { takerAssetFillAmounts });
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount.div(2);
- const expectedOrderStatus = OrderStatus.Fillable;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple fully filled orders', async () => {
- await exchangeWrapper.batchFillOrdersAsync(signedOrders, takerAddress);
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount;
- const expectedOrderStatus = OrderStatus.FullyFilled;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple cancelled and unfilled orders', async () => {
- await exchangeWrapper.batchCancelOrdersAsync(signedOrders, makerAddress);
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Cancelled;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple cancelled and partially filled orders', async () => {
- const takerAssetFillAmounts = _.map(signedOrders, signedOrder => signedOrder.takerAssetAmount.div(2));
- await exchangeWrapper.batchFillOrdersAsync(signedOrders, takerAddress, { takerAssetFillAmounts });
- await exchangeWrapper.batchCancelOrdersAsync(signedOrders, makerAddress);
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount.div(2);
- const expectedOrderStatus = OrderStatus.Cancelled;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple expired and unfilled orders', async () => {
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const timeUntilExpiration = signedOrders[0].expirationTimeSeconds.minus(currentTimestamp).toNumber();
- await increaseTimeAndMineBlockAsync(timeUntilExpiration);
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = new BigNumber(0);
- const expectedOrderStatus = OrderStatus.Expired;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for multiple expired and partially filled orders', async () => {
- const takerAssetFillAmounts = _.map(signedOrders, signedOrder => signedOrder.takerAssetAmount.div(2));
- await exchangeWrapper.batchFillOrdersAsync(signedOrders, takerAddress, { takerAssetFillAmounts });
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const timeUntilExpiration = signedOrders[0].expirationTimeSeconds.minus(currentTimestamp).toNumber();
- await increaseTimeAndMineBlockAsync(timeUntilExpiration);
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(3);
- _.forEach(signedOrders, (signedOrder, index) => {
- const expectedOrderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const expectedTakerAssetFilledAmount = signedOrder.takerAssetAmount.div(2);
- const expectedOrderStatus = OrderStatus.Expired;
- const orderInfo = ordersInfo[index];
- expect(orderInfo.orderHash).to.be.equal(expectedOrderHash);
- expect(orderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(expectedTakerAssetFilledAmount);
- expect(orderInfo.orderStatus).to.equal(expectedOrderStatus);
- });
- });
- it('should get the correct information for a mix of unfilled, partially filled, fully filled, cancelled, and expired orders', async () => {
- const unfilledOrder = await orderFactory.newSignedOrderAsync();
- const partiallyFilledOrder = await orderFactory.newSignedOrderAsync();
- await exchangeWrapper.fillOrderAsync(partiallyFilledOrder, takerAddress, {
- takerAssetFillAmount: partiallyFilledOrder.takerAssetAmount.div(2),
- });
- const fullyFilledOrder = await orderFactory.newSignedOrderAsync();
- await exchangeWrapper.fillOrderAsync(fullyFilledOrder, takerAddress);
- const cancelledOrder = await orderFactory.newSignedOrderAsync();
- await exchangeWrapper.cancelOrderAsync(cancelledOrder, makerAddress);
- const currentTimestamp = await getLatestBlockTimestampAsync();
- const expiredOrder = await orderFactory.newSignedOrderAsync({
- expirationTimeSeconds: new BigNumber(currentTimestamp),
- });
- signedOrders = [unfilledOrder, partiallyFilledOrder, fullyFilledOrder, cancelledOrder, expiredOrder];
- const ordersInfo = await exchangeWrapper.getOrdersInfoAsync(signedOrders);
- expect(ordersInfo.length).to.be.equal(5);
-
- const expectedUnfilledOrderHash = orderHashUtils.getOrderHashHex(unfilledOrder);
- const expectedUnfilledTakerAssetFilledAmount = new BigNumber(0);
- const expectedUnfilledOrderStatus = OrderStatus.Fillable;
- const unfilledOrderInfo = ordersInfo[0];
- expect(unfilledOrderInfo.orderHash).to.be.equal(expectedUnfilledOrderHash);
- expect(unfilledOrderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(
- expectedUnfilledTakerAssetFilledAmount,
- );
- expect(unfilledOrderInfo.orderStatus).to.be.equal(expectedUnfilledOrderStatus);
-
- const expectedPartialOrderHash = orderHashUtils.getOrderHashHex(partiallyFilledOrder);
- const expectedPartialTakerAssetFilledAmount = partiallyFilledOrder.takerAssetAmount.div(2);
- const expectedPartialOrderStatus = OrderStatus.Fillable;
- const partialOrderInfo = ordersInfo[1];
- expect(partialOrderInfo.orderHash).to.be.equal(expectedPartialOrderHash);
- expect(partialOrderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(
- expectedPartialTakerAssetFilledAmount,
- );
- expect(partialOrderInfo.orderStatus).to.be.equal(expectedPartialOrderStatus);
-
- const expectedFilledOrderHash = orderHashUtils.getOrderHashHex(fullyFilledOrder);
- const expectedFilledTakerAssetFilledAmount = fullyFilledOrder.takerAssetAmount;
- const expectedFilledOrderStatus = OrderStatus.FullyFilled;
- const filledOrderInfo = ordersInfo[2];
- expect(filledOrderInfo.orderHash).to.be.equal(expectedFilledOrderHash);
- expect(filledOrderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(
- expectedFilledTakerAssetFilledAmount,
- );
- expect(filledOrderInfo.orderStatus).to.be.equal(expectedFilledOrderStatus);
-
- const expectedCancelledOrderHash = orderHashUtils.getOrderHashHex(cancelledOrder);
- const expectedCancelledTakerAssetFilledAmount = new BigNumber(0);
- const expectedCancelledOrderStatus = OrderStatus.Cancelled;
- const cancelledOrderInfo = ordersInfo[3];
- expect(cancelledOrderInfo.orderHash).to.be.equal(expectedCancelledOrderHash);
- expect(cancelledOrderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(
- expectedCancelledTakerAssetFilledAmount,
- );
- expect(cancelledOrderInfo.orderStatus).to.be.equal(expectedCancelledOrderStatus);
-
- const expectedExpiredOrderHash = orderHashUtils.getOrderHashHex(expiredOrder);
- const expectedExpiredTakerAssetFilledAmount = new BigNumber(0);
- const expectedExpiredOrderStatus = OrderStatus.Expired;
- const expiredOrderInfo = ordersInfo[4];
- expect(expiredOrderInfo.orderHash).to.be.equal(expectedExpiredOrderHash);
- expect(expiredOrderInfo.orderTakerAssetFilledAmount).to.be.bignumber.equal(
- expectedExpiredTakerAssetFilledAmount,
- );
- expect(expiredOrderInfo.orderStatus).to.be.equal(expectedExpiredOrderStatus);
- });
- });
- });
-}); // tslint:disable-line:max-file-line-count
diff --git a/contracts/protocol/test/global_hooks.ts b/contracts/protocol/test/global_hooks.ts
deleted file mode 100644
index f8ace376a..000000000
--- a/contracts/protocol/test/global_hooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-before('start web3 provider', () => {
- provider.start();
-});
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/protocol/test/multisig/asset_proxy_owner.ts b/contracts/protocol/test/multisig/asset_proxy_owner.ts
deleted file mode 100644
index daebfb7fb..000000000
--- a/contracts/protocol/test/multisig/asset_proxy_owner.ts
+++ /dev/null
@@ -1,506 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectContractCallFailedAsync,
- expectContractCreationFailedAsync,
- expectTransactionFailedAsync,
- expectTransactionFailedWithoutReasonAsync,
- increaseTimeAndMineBlockAsync,
- provider,
- sendTransactionResult,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-
-import {
- AssetProxyOwnerAssetProxyRegistrationEventArgs,
- AssetProxyOwnerContract,
- AssetProxyOwnerExecutionEventArgs,
- AssetProxyOwnerExecutionFailureEventArgs,
- AssetProxyOwnerSubmissionEventArgs,
-} from '../../generated-wrappers/asset_proxy_owner';
-import { MixinAuthorizableContract } from '../../generated-wrappers/mixin_authorizable';
-import { TestAssetProxyOwnerContract } from '../../generated-wrappers/test_asset_proxy_owner';
-import { artifacts } from '../../src/artifacts';
-import { AssetProxyOwnerWrapper } from '../utils/asset_proxy_owner_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('AssetProxyOwner', () => {
- let owners: string[];
- let authorized: string;
- let notOwner: string;
- const REQUIRED_APPROVALS = new BigNumber(2);
- const SECONDS_TIME_LOCKED = new BigNumber(1000000);
-
- let erc20Proxy: MixinAuthorizableContract;
- let erc721Proxy: MixinAuthorizableContract;
- let testAssetProxyOwner: TestAssetProxyOwnerContract;
- let assetProxyOwnerWrapper: AssetProxyOwnerWrapper;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- owners = [accounts[0], accounts[1]];
- authorized = accounts[2];
- notOwner = accounts[3];
- const initialOwner = accounts[0];
- erc20Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
- artifacts.MixinAuthorizable,
- provider,
- txDefaults,
- );
- erc721Proxy = await MixinAuthorizableContract.deployFrom0xArtifactAsync(
- artifacts.MixinAuthorizable,
- provider,
- txDefaults,
- );
- const defaultAssetProxyContractAddresses: string[] = [];
- testAssetProxyOwner = await TestAssetProxyOwnerContract.deployFrom0xArtifactAsync(
- artifacts.TestAssetProxyOwner,
- provider,
- txDefaults,
- owners,
- defaultAssetProxyContractAddresses,
- REQUIRED_APPROVALS,
- SECONDS_TIME_LOCKED,
- );
- assetProxyOwnerWrapper = new AssetProxyOwnerWrapper(testAssetProxyOwner, provider);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.transferOwnership.sendTransactionAsync(testAssetProxyOwner.address, {
- from: initialOwner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.transferOwnership.sendTransactionAsync(testAssetProxyOwner.address, {
- from: initialOwner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('constructor', () => {
- it('should register passed in assetProxyContracts', async () => {
- const assetProxyContractAddresses = [erc20Proxy.address, erc721Proxy.address];
- const newMultiSig = await AssetProxyOwnerContract.deployFrom0xArtifactAsync(
- artifacts.AssetProxyOwner,
- provider,
- txDefaults,
- owners,
- assetProxyContractAddresses,
- REQUIRED_APPROVALS,
- SECONDS_TIME_LOCKED,
- );
- const isErc20ProxyRegistered = await newMultiSig.isAssetProxyRegistered.callAsync(erc20Proxy.address);
- const isErc721ProxyRegistered = await newMultiSig.isAssetProxyRegistered.callAsync(erc721Proxy.address);
- expect(isErc20ProxyRegistered).to.equal(true);
- expect(isErc721ProxyRegistered).to.equal(true);
- });
- it('should throw if a null address is included in assetProxyContracts', async () => {
- const assetProxyContractAddresses = [erc20Proxy.address, constants.NULL_ADDRESS];
- return expectContractCreationFailedAsync(
- (AssetProxyOwnerContract.deployFrom0xArtifactAsync(
- artifacts.AssetProxyOwner,
- provider,
- txDefaults,
- owners,
- assetProxyContractAddresses,
- REQUIRED_APPROVALS,
- SECONDS_TIME_LOCKED,
- ) as any) as sendTransactionResult,
- RevertReason.InvalidAssetProxy,
- );
- });
- });
-
- describe('isFunctionRemoveAuthorizedAddressAtIndex', () => {
- it('should return false if data is not for removeAuthorizedAddressAtIndex', async () => {
- const notRemoveAuthorizedAddressData = erc20Proxy.addAuthorizedAddress.getABIEncodedTransactionData(
- owners[0],
- );
-
- const isFunctionRemoveAuthorizedAddressAtIndex = await testAssetProxyOwner.isFunctionRemoveAuthorizedAddressAtIndex.callAsync(
- notRemoveAuthorizedAddressData,
- );
- expect(isFunctionRemoveAuthorizedAddressAtIndex).to.be.false();
- });
-
- it('should return true if data is for removeAuthorizedAddressAtIndex', async () => {
- const index = new BigNumber(0);
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- owners[0],
- index,
- );
- const isFunctionRemoveAuthorizedAddressAtIndex = await testAssetProxyOwner.isFunctionRemoveAuthorizedAddressAtIndex.callAsync(
- removeAuthorizedAddressAtIndexData,
- );
- expect(isFunctionRemoveAuthorizedAddressAtIndex).to.be.true();
- });
- });
-
- describe('registerAssetProxy', () => {
- it('should throw if not called by multisig', async () => {
- const isRegistered = true;
- return expectTransactionFailedWithoutReasonAsync(
- testAssetProxyOwner.registerAssetProxy.sendTransactionAsync(erc20Proxy.address, isRegistered, {
- from: owners[0],
- }),
- );
- });
-
- it('should register an address if called by multisig after timelock', async () => {
- const addressToRegister = erc20Proxy.address;
- const isRegistered = true;
- const registerAssetProxyData = testAssetProxyOwner.registerAssetProxy.getABIEncodedTransactionData(
- addressToRegister,
- isRegistered,
- );
- const submitTxRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- testAssetProxyOwner.address,
- registerAssetProxyData,
- owners[0],
- );
-
- const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber());
-
- const executeTxRes = await assetProxyOwnerWrapper.executeTransactionAsync(txId, owners[0]);
- const registerLog = executeTxRes.logs[0] as LogWithDecodedArgs<
- AssetProxyOwnerAssetProxyRegistrationEventArgs
- >;
- expect(registerLog.args.assetProxyContract).to.equal(addressToRegister);
- expect(registerLog.args.isRegistered).to.equal(isRegistered);
-
- const isAssetProxyRegistered = await testAssetProxyOwner.isAssetProxyRegistered.callAsync(
- addressToRegister,
- );
- expect(isAssetProxyRegistered).to.equal(isRegistered);
- });
-
- it('should fail if registering a null address', async () => {
- const addressToRegister = constants.NULL_ADDRESS;
- const isRegistered = true;
- const registerAssetProxyData = testAssetProxyOwner.registerAssetProxy.getABIEncodedTransactionData(
- addressToRegister,
- isRegistered,
- );
- const submitTxRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- testAssetProxyOwner.address,
- registerAssetProxyData,
- owners[0],
- );
- const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
- await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber());
-
- const executeTxRes = await assetProxyOwnerWrapper.executeTransactionAsync(txId, owners[0]);
- const failureLog = executeTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerExecutionFailureEventArgs>;
- expect(failureLog.args.transactionId).to.be.bignumber.equal(txId);
-
- const isAssetProxyRegistered = await testAssetProxyOwner.isAssetProxyRegistered.callAsync(
- addressToRegister,
- );
- expect(isAssetProxyRegistered).to.equal(false);
- });
- });
-
- describe('Calling removeAuthorizedAddressAtIndex', () => {
- const erc20Index = new BigNumber(0);
- const erc721Index = new BigNumber(1);
- before('authorize both proxies and register erc20 proxy', async () => {
- // Only register ERC20 proxy
- const addressToRegister = erc20Proxy.address;
- const isRegistered = true;
- const registerAssetProxyData = testAssetProxyOwner.registerAssetProxy.getABIEncodedTransactionData(
- addressToRegister,
- isRegistered,
- );
- const registerAssetProxySubmitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- testAssetProxyOwner.address,
- registerAssetProxyData,
- owners[0],
- );
- const registerAssetProxySubmitLog = registerAssetProxySubmitRes.logs[0] as LogWithDecodedArgs<
- AssetProxyOwnerSubmissionEventArgs
- >;
-
- const addAuthorizedAddressData = erc20Proxy.addAuthorizedAddress.getABIEncodedTransactionData(authorized);
- const erc20AddAuthorizedAddressSubmitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- addAuthorizedAddressData,
- owners[0],
- );
- const erc721AddAuthorizedAddressSubmitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc721Proxy.address,
- addAuthorizedAddressData,
- owners[0],
- );
- const erc20AddAuthorizedAddressSubmitLog = erc20AddAuthorizedAddressSubmitRes.logs[0] as LogWithDecodedArgs<
- AssetProxyOwnerSubmissionEventArgs
- >;
- const erc721AddAuthorizedAddressSubmitLog = erc721AddAuthorizedAddressSubmitRes
- .logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
-
- const registerAssetProxyTxId = registerAssetProxySubmitLog.args.transactionId;
- const erc20AddAuthorizedAddressTxId = erc20AddAuthorizedAddressSubmitLog.args.transactionId;
- const erc721AddAuthorizedAddressTxId = erc721AddAuthorizedAddressSubmitLog.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(registerAssetProxyTxId, owners[1]);
- await assetProxyOwnerWrapper.confirmTransactionAsync(erc20AddAuthorizedAddressTxId, owners[1]);
- await assetProxyOwnerWrapper.confirmTransactionAsync(erc721AddAuthorizedAddressTxId, owners[1]);
- await increaseTimeAndMineBlockAsync(SECONDS_TIME_LOCKED.toNumber());
- await assetProxyOwnerWrapper.executeTransactionAsync(registerAssetProxyTxId, owners[0]);
- await assetProxyOwnerWrapper.executeTransactionAsync(erc20AddAuthorizedAddressTxId, owners[0], {
- gas: constants.MAX_EXECUTE_TRANSACTION_GAS,
- });
- await assetProxyOwnerWrapper.executeTransactionAsync(erc721AddAuthorizedAddressTxId, owners[0], {
- gas: constants.MAX_EXECUTE_TRANSACTION_GAS,
- });
- });
-
- describe('validRemoveAuthorizedAddressAtIndexTx', () => {
- it('should revert if data is not for removeAuthorizedAddressAtIndex and proxy is registered', async () => {
- const notRemoveAuthorizedAddressData = erc20Proxy.addAuthorizedAddress.getABIEncodedTransactionData(
- authorized,
- );
- const submitTxRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- notRemoveAuthorizedAddressData,
- owners[0],
- );
- const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
- return expectContractCallFailedAsync(
- testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync(txId),
- RevertReason.InvalidFunctionSelector,
- );
- });
-
- it('should return true if data is for removeAuthorizedAddressAtIndex and proxy is registered', async () => {
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc20Index,
- );
- const submitTxRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
- const isValidRemoveAuthorizedAddressAtIndexTx = await testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync(
- txId,
- );
- expect(isValidRemoveAuthorizedAddressAtIndexTx).to.be.true();
- });
-
- it('should revert if data is for removeAuthorizedAddressAtIndex and proxy is not registered', async () => {
- const removeAuthorizedAddressAtIndexData = erc721Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc721Index,
- );
- const submitTxRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc721Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const log = submitTxRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
- return expectContractCallFailedAsync(
- testAssetProxyOwner.testValidRemoveAuthorizedAddressAtIndexTx.callAsync(txId),
- RevertReason.UnregisteredAssetProxy,
- );
- });
- });
-
- describe('executeRemoveAuthorizedAddressAtIndex', () => {
- it('should throw without the required confirmations', async () => {
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc20Index,
- );
- const res = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
-
- return expectTransactionFailedAsync(
- testAssetProxyOwner.executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(txId, {
- from: owners[1],
- }),
- RevertReason.TxNotFullyConfirmed,
- );
- });
-
- it('should throw if tx destination is not registered', async () => {
- const removeAuthorizedAddressAtIndexData = erc721Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc721Index,
- );
- const res = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc721Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
-
- return expectTransactionFailedAsync(
- testAssetProxyOwner.executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(txId, {
- from: owners[1],
- }),
- RevertReason.UnregisteredAssetProxy,
- );
- });
-
- it('should throw if tx data is not for removeAuthorizedAddressAtIndex', async () => {
- const newAuthorized = owners[1];
- const addAuthorizedAddressData = erc20Proxy.addAuthorizedAddress.getABIEncodedTransactionData(
- newAuthorized,
- );
- const res = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- addAuthorizedAddressData,
- owners[0],
- );
- const log = res.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = log.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
-
- return expectTransactionFailedAsync(
- testAssetProxyOwner.executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(txId, {
- from: owners[1],
- }),
- RevertReason.InvalidFunctionSelector,
- );
- });
-
- it('should execute removeAuthorizedAddressAtIndex for registered address if fully confirmed and called by owner', async () => {
- const isAuthorizedBefore = await erc20Proxy.authorized.callAsync(authorized);
- expect(isAuthorizedBefore).to.equal(true);
-
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc20Index,
- );
- const submitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const submitLog = submitRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = submitLog.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
-
- const execRes = await assetProxyOwnerWrapper.executeRemoveAuthorizedAddressAtIndexAsync(
- txId,
- owners[0],
- );
- const execLog = execRes.logs[1] as LogWithDecodedArgs<AssetProxyOwnerExecutionEventArgs>;
- expect(execLog.args.transactionId).to.be.bignumber.equal(txId);
-
- const tx = await testAssetProxyOwner.transactions.callAsync(txId);
- const isExecuted = tx[3];
- expect(isExecuted).to.equal(true);
-
- const isAuthorizedAfter = await erc20Proxy.authorized.callAsync(authorized);
- expect(isAuthorizedAfter).to.equal(false);
- });
-
- it('should execute removeAuthorizedAddressAtIndex for registered address if fully confirmed and called by non-owner', async () => {
- const isAuthorizedBefore = await erc20Proxy.authorized.callAsync(authorized);
- expect(isAuthorizedBefore).to.equal(true);
-
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc20Index,
- );
- const submitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const submitLog = submitRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = submitLog.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
-
- const execRes = await assetProxyOwnerWrapper.executeRemoveAuthorizedAddressAtIndexAsync(txId, notOwner);
- const execLog = execRes.logs[1] as LogWithDecodedArgs<AssetProxyOwnerExecutionEventArgs>;
- expect(execLog.args.transactionId).to.be.bignumber.equal(txId);
-
- const tx = await testAssetProxyOwner.transactions.callAsync(txId);
- const isExecuted = tx[3];
- expect(isExecuted).to.equal(true);
-
- const isAuthorizedAfter = await erc20Proxy.authorized.callAsync(authorized);
- expect(isAuthorizedAfter).to.equal(false);
- });
-
- it('should throw if already executed', async () => {
- const removeAuthorizedAddressAtIndexData = erc20Proxy.removeAuthorizedAddressAtIndex.getABIEncodedTransactionData(
- authorized,
- erc20Index,
- );
- const submitRes = await assetProxyOwnerWrapper.submitTransactionAsync(
- erc20Proxy.address,
- removeAuthorizedAddressAtIndexData,
- owners[0],
- );
- const submitLog = submitRes.logs[0] as LogWithDecodedArgs<AssetProxyOwnerSubmissionEventArgs>;
- const txId = submitLog.args.transactionId;
-
- await assetProxyOwnerWrapper.confirmTransactionAsync(txId, owners[1]);
-
- const execRes = await assetProxyOwnerWrapper.executeRemoveAuthorizedAddressAtIndexAsync(
- txId,
- owners[0],
- );
- const execLog = execRes.logs[1] as LogWithDecodedArgs<AssetProxyOwnerExecutionEventArgs>;
- expect(execLog.args.transactionId).to.be.bignumber.equal(txId);
-
- const tx = await testAssetProxyOwner.transactions.callAsync(txId);
- const isExecuted = tx[3];
- expect(isExecuted).to.equal(true);
-
- return expectTransactionFailedWithoutReasonAsync(
- testAssetProxyOwner.executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(txId, {
- from: owners[1],
- }),
- );
- });
- });
- });
-});
-// tslint:disable-line max-file-line-count
diff --git a/contracts/protocol/test/utils/asset_proxy_owner_wrapper.ts b/contracts/protocol/test/utils/asset_proxy_owner_wrapper.ts
deleted file mode 100644
index df23658d8..000000000
--- a/contracts/protocol/test/utils/asset_proxy_owner_wrapper.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { LogDecoder } from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { AssetProxyOwnerContract } from '../../generated-wrappers/asset_proxy_owner';
-import { artifacts } from '../../src/artifacts';
-
-export class AssetProxyOwnerWrapper {
- private readonly _assetProxyOwner: AssetProxyOwnerContract;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _logDecoder: LogDecoder;
- constructor(assetproxyOwnerContract: AssetProxyOwnerContract, provider: Provider) {
- this._assetProxyOwner = assetproxyOwnerContract;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...tokensArtifacts });
- }
- public async submitTransactionAsync(
- destination: string,
- data: string,
- from: string,
- opts: { value?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const value = _.isUndefined(opts.value) ? new BigNumber(0) : opts.value;
- const txHash = await this._assetProxyOwner.submitTransaction.sendTransactionAsync(destination, value, data, {
- from,
- });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async confirmTransactionAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._assetProxyOwner.confirmTransaction.sendTransactionAsync(txId, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async revokeConfirmationAsync(txId: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._assetProxyOwner.revokeConfirmation.sendTransactionAsync(txId, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async executeTransactionAsync(
- txId: BigNumber,
- from: string,
- opts: { gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._assetProxyOwner.executeTransaction.sendTransactionAsync(txId, {
- from,
- gas: opts.gas,
- });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async executeRemoveAuthorizedAddressAtIndexAsync(
- txId: BigNumber,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const txHash = await (this
- ._assetProxyOwner as AssetProxyOwnerContract).executeRemoveAuthorizedAddressAtIndex.sendTransactionAsync(
- txId,
- {
- from,
- },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
-}
diff --git a/contracts/protocol/test/utils/asset_wrapper.ts b/contracts/protocol/test/utils/asset_wrapper.ts
deleted file mode 100644
index e4090ad74..000000000
--- a/contracts/protocol/test/utils/asset_wrapper.ts
+++ /dev/null
@@ -1,222 +0,0 @@
-import { AbstractAssetWrapper, constants } from '@0x/contracts-test-utils';
-import { assetDataUtils } from '@0x/order-utils';
-import { AssetProxyId } from '@0x/types';
-import { BigNumber, errorUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { ERC20Wrapper } from './erc20_wrapper';
-import { ERC721Wrapper } from './erc721_wrapper';
-
-interface ProxyIdToAssetWrappers {
- [proxyId: string]: AbstractAssetWrapper;
-}
-
-/**
- * This class abstracts away the differences between ERC20 and ERC721 tokens so that
- * the logic that uses it does not need to care what standard a token belongs to.
- */
-export class AssetWrapper {
- private readonly _proxyIdToAssetWrappers: ProxyIdToAssetWrappers;
- constructor(assetWrappers: AbstractAssetWrapper[]) {
- this._proxyIdToAssetWrappers = {};
- _.each(assetWrappers, assetWrapper => {
- const proxyId = assetWrapper.getProxyId();
- this._proxyIdToAssetWrappers[proxyId] = assetWrapper;
- });
- }
- public async getBalanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
- const proxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (proxyId) {
- case AssetProxyId.ERC20: {
- const erc20Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC20Wrapper;
- const balance = await erc20Wrapper.getBalanceAsync(userAddress, assetData);
- return balance;
- }
- case AssetProxyId.ERC721: {
- const assetWrapper = this._proxyIdToAssetWrappers[proxyId] as ERC721Wrapper;
- const assetProxyData = assetDataUtils.decodeERC721AssetData(assetData);
- const isOwner = await assetWrapper.isOwnerAsync(
- userAddress,
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- const balance = isOwner ? new BigNumber(1) : new BigNumber(0);
- return balance;
- }
- default:
- throw errorUtils.spawnSwitchErr('proxyId', proxyId);
- }
- }
- public async setBalanceAsync(userAddress: string, assetData: string, desiredBalance: BigNumber): Promise<void> {
- const proxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (proxyId) {
- case AssetProxyId.ERC20: {
- const erc20Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC20Wrapper;
- await erc20Wrapper.setBalanceAsync(userAddress, assetData, desiredBalance);
- return;
- }
- case AssetProxyId.ERC721: {
- if (!desiredBalance.eq(0) && !desiredBalance.eq(1)) {
- throw new Error(`Balance for ERC721 token can only be set to 0 or 1. Got: ${desiredBalance}`);
- }
- const erc721Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC721Wrapper;
- const assetProxyData = assetDataUtils.decodeERC721AssetData(assetData);
- const doesTokenExist = erc721Wrapper.doesTokenExistAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- if (!doesTokenExist && desiredBalance.eq(1)) {
- await erc721Wrapper.mintAsync(assetProxyData.tokenAddress, assetProxyData.tokenId, userAddress);
- return;
- } else if (!doesTokenExist && desiredBalance.eq(0)) {
- return; // noop
- }
- const tokenOwner = await erc721Wrapper.ownerOfAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- if (userAddress !== tokenOwner && desiredBalance.eq(1)) {
- await erc721Wrapper.transferFromAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- tokenOwner,
- userAddress,
- );
- } else if (tokenOwner === userAddress && desiredBalance.eq(0)) {
- // Transfer token to someone else
- const userAddresses = await (erc721Wrapper as any)._web3Wrapper.getAvailableAddressesAsync();
- const nonOwner = _.find(userAddresses, a => a !== userAddress);
- await erc721Wrapper.transferFromAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- tokenOwner,
- nonOwner,
- );
- return;
- } else if (
- (userAddress !== tokenOwner && desiredBalance.eq(0)) ||
- (tokenOwner === userAddress && desiredBalance.eq(1))
- ) {
- return; // noop
- }
- break;
- }
- default:
- throw errorUtils.spawnSwitchErr('proxyId', proxyId);
- }
- }
- public async getProxyAllowanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
- const proxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (proxyId) {
- case AssetProxyId.ERC20: {
- const erc20Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC20Wrapper;
- const allowance = await erc20Wrapper.getProxyAllowanceAsync(userAddress, assetData);
- return allowance;
- }
- case AssetProxyId.ERC721: {
- const assetWrapper = this._proxyIdToAssetWrappers[proxyId] as ERC721Wrapper;
- const erc721ProxyData = assetDataUtils.decodeERC721AssetData(assetData);
- const isProxyApprovedForAll = await assetWrapper.isProxyApprovedForAllAsync(
- userAddress,
- erc721ProxyData.tokenAddress,
- );
- if (isProxyApprovedForAll) {
- return constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
- }
-
- const isProxyApproved = await assetWrapper.isProxyApprovedAsync(
- erc721ProxyData.tokenAddress,
- erc721ProxyData.tokenId,
- );
- const allowance = isProxyApproved ? new BigNumber(1) : new BigNumber(0);
- return allowance;
- }
- default:
- throw errorUtils.spawnSwitchErr('proxyId', proxyId);
- }
- }
- public async setProxyAllowanceAsync(
- userAddress: string,
- assetData: string,
- desiredAllowance: BigNumber,
- ): Promise<void> {
- const proxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (proxyId) {
- case AssetProxyId.ERC20: {
- const erc20Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC20Wrapper;
- await erc20Wrapper.setAllowanceAsync(userAddress, assetData, desiredAllowance);
- return;
- }
- case AssetProxyId.ERC721: {
- if (
- !desiredAllowance.eq(0) &&
- !desiredAllowance.eq(1) &&
- !desiredAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)
- ) {
- throw new Error(
- `Allowance for ERC721 token can only be set to 0, 1 or 2^256-1. Got: ${desiredAllowance}`,
- );
- }
- const erc721Wrapper = this._proxyIdToAssetWrappers[proxyId] as ERC721Wrapper;
- const assetProxyData = assetDataUtils.decodeERC721AssetData(assetData);
-
- const doesTokenExist = await erc721Wrapper.doesTokenExistAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- if (!doesTokenExist) {
- throw new Error(
- `Cannot setProxyAllowance on non-existent token: ${assetProxyData.tokenAddress} ${
- assetProxyData.tokenId
- }`,
- );
- }
- const isProxyApprovedForAll = await erc721Wrapper.isProxyApprovedForAllAsync(
- userAddress,
- assetProxyData.tokenAddress,
- );
- if (!isProxyApprovedForAll && desiredAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) {
- const isApproved = true;
- await erc721Wrapper.approveProxyForAllAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- isApproved,
- );
- } else if (isProxyApprovedForAll && desiredAllowance.eq(0)) {
- const isApproved = false;
- await erc721Wrapper.approveProxyForAllAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- isApproved,
- );
- } else if (isProxyApprovedForAll && desiredAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) {
- return; // Noop
- }
-
- const isProxyApproved = await erc721Wrapper.isProxyApprovedAsync(
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- if (!isProxyApproved && desiredAllowance.eq(1)) {
- await erc721Wrapper.approveProxyAsync(assetProxyData.tokenAddress, assetProxyData.tokenId);
- } else if (isProxyApproved && desiredAllowance.eq(0)) {
- // Remove approval
- await erc721Wrapper.approveAsync(
- constants.NULL_ADDRESS,
- assetProxyData.tokenAddress,
- assetProxyData.tokenId,
- );
- } else if (
- (!isProxyApproved && desiredAllowance.eq(0)) ||
- (isProxyApproved && desiredAllowance.eq(1))
- ) {
- return; // noop
- }
-
- break;
- }
- default:
- throw errorUtils.spawnSwitchErr('proxyId', proxyId);
- }
- }
-}
diff --git a/contracts/protocol/test/utils/erc20_wrapper.ts b/contracts/protocol/test/utils/erc20_wrapper.ts
deleted file mode 100644
index e5ab0e36c..000000000
--- a/contracts/protocol/test/utils/erc20_wrapper.ts
+++ /dev/null
@@ -1,179 +0,0 @@
-import { constants, ERC20BalancesByOwner, txDefaults } from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts, DummyERC20TokenContract } from '@0x/contracts-tokens';
-import { assetDataUtils } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ERC20ProxyContract } from '../../generated-wrappers/erc20_proxy';
-import { artifacts } from '../../src/artifacts';
-
-export class ERC20Wrapper {
- private readonly _tokenOwnerAddresses: string[];
- private readonly _contractOwnerAddress: string;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _provider: Provider;
- private readonly _dummyTokenContracts: DummyERC20TokenContract[];
- private _proxyContract?: ERC20ProxyContract;
- private _proxyIdIfExists?: string;
- /**
- * Instanitates an ERC20Wrapper
- * @param provider Web3 provider to use for all JSON RPC requests
- * @param tokenOwnerAddresses Addresses that we want to endow as owners for dummy ERC20 tokens
- * @param contractOwnerAddress Desired owner of the contract
- * Instance of ERC20Wrapper
- */
- constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
- this._dummyTokenContracts = [];
- this._web3Wrapper = new Web3Wrapper(provider);
- this._provider = provider;
- this._tokenOwnerAddresses = tokenOwnerAddresses;
- this._contractOwnerAddress = contractOwnerAddress;
- }
- public async deployDummyTokensAsync(
- numberToDeploy: number,
- decimals: BigNumber,
- ): Promise<DummyERC20TokenContract[]> {
- for (let i = 0; i < numberToDeploy; i++) {
- this._dummyTokenContracts.push(
- await DummyERC20TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC20Token,
- this._provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- decimals,
- constants.DUMMY_TOKEN_TOTAL_SUPPLY,
- ),
- );
- }
- return this._dummyTokenContracts;
- }
- public async deployProxyAsync(): Promise<ERC20ProxyContract> {
- this._proxyContract = await ERC20ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC20Proxy,
- this._provider,
- txDefaults,
- );
- this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
- return this._proxyContract;
- }
- public getProxyId(): string {
- this._validateProxyContractExistsOrThrow();
- return this._proxyIdIfExists as string;
- }
- public async setBalancesAndAllowancesAsync(): Promise<void> {
- this._validateDummyTokenContractsExistOrThrow();
- this._validateProxyContractExistsOrThrow();
- for (const dummyTokenContract of this._dummyTokenContracts) {
- for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await dummyTokenContract.setBalance.sendTransactionAsync(
- tokenOwnerAddress,
- constants.INITIAL_ERC20_BALANCE,
- { from: this._contractOwnerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await dummyTokenContract.approve.sendTransactionAsync(
- (this._proxyContract as ERC20ProxyContract).address,
- constants.INITIAL_ERC20_ALLOWANCE,
- { from: tokenOwnerAddress },
- ),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- }
- }
- public async getBalanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
- const tokenContract = this._getTokenContractFromAssetData(assetData);
- const balance = new BigNumber(await tokenContract.balanceOf.callAsync(userAddress));
- return balance;
- }
- public async setBalanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(assetData);
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.setBalance.sendTransactionAsync(userAddress, amount, {
- from: this._contractOwnerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async getProxyAllowanceAsync(userAddress: string, assetData: string): Promise<BigNumber> {
- const tokenContract = this._getTokenContractFromAssetData(assetData);
- const proxyAddress = (this._proxyContract as ERC20ProxyContract).address;
- const allowance = new BigNumber(await tokenContract.allowance.callAsync(userAddress, proxyAddress));
- return allowance;
- }
- public async setAllowanceAsync(userAddress: string, assetData: string, amount: BigNumber): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(assetData);
- const proxyAddress = (this._proxyContract as ERC20ProxyContract).address;
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.approve.sendTransactionAsync(proxyAddress, amount, {
- from: userAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async getBalancesAsync(): Promise<ERC20BalancesByOwner> {
- this._validateDummyTokenContractsExistOrThrow();
- const balancesByOwner: ERC20BalancesByOwner = {};
- const balances: BigNumber[] = [];
- const balanceInfo: Array<{ tokenOwnerAddress: string; tokenAddress: string }> = [];
- for (const dummyTokenContract of this._dummyTokenContracts) {
- for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
- balances.push(await dummyTokenContract.balanceOf.callAsync(tokenOwnerAddress));
- balanceInfo.push({
- tokenOwnerAddress,
- tokenAddress: dummyTokenContract.address,
- });
- }
- }
- _.forEach(balances, (balance, balanceIndex) => {
- const tokenAddress = balanceInfo[balanceIndex].tokenAddress;
- const tokenOwnerAddress = balanceInfo[balanceIndex].tokenOwnerAddress;
- if (_.isUndefined(balancesByOwner[tokenOwnerAddress])) {
- balancesByOwner[tokenOwnerAddress] = {};
- }
- const wrappedBalance = new BigNumber(balance);
- balancesByOwner[tokenOwnerAddress][tokenAddress] = wrappedBalance;
- });
- return balancesByOwner;
- }
- public addDummyTokenContract(dummy: DummyERC20TokenContract): void {
- if (!_.isUndefined(this._dummyTokenContracts)) {
- this._dummyTokenContracts.push(dummy);
- }
- }
- public addTokenOwnerAddress(address: string): void {
- this._tokenOwnerAddresses.push(address);
- }
- public getTokenOwnerAddresses(): string[] {
- return this._tokenOwnerAddresses;
- }
- public getTokenAddresses(): string[] {
- const tokenAddresses = _.map(this._dummyTokenContracts, dummyTokenContract => dummyTokenContract.address);
- return tokenAddresses;
- }
- private _getTokenContractFromAssetData(assetData: string): DummyERC20TokenContract {
- const erc20ProxyData = assetDataUtils.decodeERC20AssetData(assetData);
- const tokenAddress = erc20ProxyData.tokenAddress;
- const tokenContractIfExists = _.find(this._dummyTokenContracts, c => c.address === tokenAddress);
- if (_.isUndefined(tokenContractIfExists)) {
- throw new Error(`Token: ${tokenAddress} was not deployed through ERC20Wrapper`);
- }
- return tokenContractIfExists;
- }
- private _validateDummyTokenContractsExistOrThrow(): void {
- if (_.isUndefined(this._dummyTokenContracts)) {
- throw new Error('Dummy ERC20 tokens not yet deployed, please call "deployDummyTokensAsync"');
- }
- }
- private _validateProxyContractExistsOrThrow(): void {
- if (_.isUndefined(this._proxyContract)) {
- throw new Error('ERC20 proxy contract not yet deployed, please call "deployProxyAsync"');
- }
- }
-}
diff --git a/contracts/protocol/test/utils/erc721_wrapper.ts b/contracts/protocol/test/utils/erc721_wrapper.ts
deleted file mode 100644
index 1f658ce86..000000000
--- a/contracts/protocol/test/utils/erc721_wrapper.ts
+++ /dev/null
@@ -1,236 +0,0 @@
-import { constants, ERC721TokenIdsByOwner, txDefaults } from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts, DummyERC721TokenContract } from '@0x/contracts-tokens';
-import { generatePseudoRandomSalt } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ERC721ProxyContract } from '../../generated-wrappers/erc721_proxy';
-import { artifacts } from '../../src/artifacts';
-
-export class ERC721Wrapper {
- private readonly _tokenOwnerAddresses: string[];
- private readonly _contractOwnerAddress: string;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _provider: Provider;
- private readonly _dummyTokenContracts: DummyERC721TokenContract[];
- private _proxyContract?: ERC721ProxyContract;
- private _proxyIdIfExists?: string;
- private _initialTokenIdsByOwner: ERC721TokenIdsByOwner = {};
- constructor(provider: Provider, tokenOwnerAddresses: string[], contractOwnerAddress: string) {
- this._web3Wrapper = new Web3Wrapper(provider);
- this._provider = provider;
- this._dummyTokenContracts = [];
- this._tokenOwnerAddresses = tokenOwnerAddresses;
- this._contractOwnerAddress = contractOwnerAddress;
- }
- public async deployDummyTokensAsync(): Promise<DummyERC721TokenContract[]> {
- // tslint:disable-next-line:no-unused-variable
- for (const i of _.times(constants.NUM_DUMMY_ERC721_TO_DEPLOY)) {
- this._dummyTokenContracts.push(
- await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- tokensArtifacts.DummyERC721Token,
- this._provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- ),
- );
- }
- return this._dummyTokenContracts;
- }
- public async deployProxyAsync(): Promise<ERC721ProxyContract> {
- this._proxyContract = await ERC721ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC721Proxy,
- this._provider,
- txDefaults,
- );
- this._proxyIdIfExists = await this._proxyContract.getProxyId.callAsync();
- return this._proxyContract;
- }
- public getProxyId(): string {
- this._validateProxyContractExistsOrThrow();
- return this._proxyIdIfExists as string;
- }
- public async setBalancesAndAllowancesAsync(): Promise<void> {
- this._validateDummyTokenContractsExistOrThrow();
- this._validateProxyContractExistsOrThrow();
- this._initialTokenIdsByOwner = {};
- for (const dummyTokenContract of this._dummyTokenContracts) {
- for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
- // tslint:disable-next-line:no-unused-variable
- for (const i of _.times(constants.NUM_ERC721_TOKENS_TO_MINT)) {
- const tokenId = generatePseudoRandomSalt();
- await this.mintAsync(dummyTokenContract.address, tokenId, tokenOwnerAddress);
- if (_.isUndefined(this._initialTokenIdsByOwner[tokenOwnerAddress])) {
- this._initialTokenIdsByOwner[tokenOwnerAddress] = {
- [dummyTokenContract.address]: [],
- };
- }
- if (_.isUndefined(this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address])) {
- this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address] = [];
- }
- this._initialTokenIdsByOwner[tokenOwnerAddress][dummyTokenContract.address].push(tokenId);
-
- await this.approveProxyAsync(dummyTokenContract.address, tokenId);
- }
- }
- }
- }
- public async doesTokenExistAsync(tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const owner = await tokenContract.ownerOf.callAsync(tokenId);
- const doesExist = owner !== constants.NULL_ADDRESS;
- return doesExist;
- }
- public async approveProxyAsync(tokenAddress: string, tokenId: BigNumber): Promise<void> {
- const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
- await this.approveAsync(proxyAddress, tokenAddress, tokenId);
- }
- public async approveProxyForAllAsync(tokenAddress: string, tokenId: BigNumber, isApproved: boolean): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId);
- const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.setApprovalForAll.sendTransactionAsync(proxyAddress, isApproved, {
- from: tokenOwner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async approveAsync(to: string, tokenAddress: string, tokenId: BigNumber): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const tokenOwner = await this.ownerOfAsync(tokenAddress, tokenId);
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.approve.sendTransactionAsync(to, tokenId, {
- from: tokenOwner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async transferFromAsync(
- tokenAddress: string,
- tokenId: BigNumber,
- currentOwner: string,
- userAddress: string,
- ): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.transferFrom.sendTransactionAsync(currentOwner, userAddress, tokenId, {
- from: currentOwner,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async mintAsync(tokenAddress: string, tokenId: BigNumber, userAddress: string): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.mint.sendTransactionAsync(userAddress, tokenId, {
- from: this._contractOwnerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async burnAsync(tokenAddress: string, tokenId: BigNumber, owner: string): Promise<void> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- await this._web3Wrapper.awaitTransactionSuccessAsync(
- await tokenContract.burn.sendTransactionAsync(owner, tokenId, {
- from: this._contractOwnerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- }
- public async ownerOfAsync(tokenAddress: string, tokenId: BigNumber): Promise<string> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const owner = await tokenContract.ownerOf.callAsync(tokenId);
- return owner;
- }
- public async isOwnerAsync(userAddress: string, tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const tokenOwner = await tokenContract.ownerOf.callAsync(tokenId);
- const isOwner = tokenOwner === userAddress;
- return isOwner;
- }
- public async isProxyApprovedForAllAsync(userAddress: string, tokenAddress: string): Promise<boolean> {
- this._validateProxyContractExistsOrThrow();
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const operator = (this._proxyContract as ERC721ProxyContract).address;
- const didApproveAll = await tokenContract.isApprovedForAll.callAsync(userAddress, operator);
- return didApproveAll;
- }
- public async isProxyApprovedAsync(tokenAddress: string, tokenId: BigNumber): Promise<boolean> {
- this._validateProxyContractExistsOrThrow();
- const tokenContract = this._getTokenContractFromAssetData(tokenAddress);
- const approvedAddress = await tokenContract.getApproved.callAsync(tokenId);
- const proxyAddress = (this._proxyContract as ERC721ProxyContract).address;
- const isProxyAnApprovedOperator = approvedAddress === proxyAddress;
- return isProxyAnApprovedOperator;
- }
- public async getBalancesAsync(): Promise<ERC721TokenIdsByOwner> {
- this._validateDummyTokenContractsExistOrThrow();
- this._validateBalancesAndAllowancesSetOrThrow();
- const tokenIdsByOwner: ERC721TokenIdsByOwner = {};
- const tokenOwnerAddresses: string[] = [];
- const tokenInfo: Array<{ tokenId: BigNumber; tokenAddress: string }> = [];
- for (const dummyTokenContract of this._dummyTokenContracts) {
- for (const tokenOwnerAddress of this._tokenOwnerAddresses) {
- const initialTokenOwnerIds = this._initialTokenIdsByOwner[tokenOwnerAddress][
- dummyTokenContract.address
- ];
- for (const tokenId of initialTokenOwnerIds) {
- tokenOwnerAddresses.push(await dummyTokenContract.ownerOf.callAsync(tokenId));
- tokenInfo.push({
- tokenId,
- tokenAddress: dummyTokenContract.address,
- });
- }
- }
- }
- _.forEach(tokenOwnerAddresses, (tokenOwnerAddress, ownerIndex) => {
- const tokenAddress = tokenInfo[ownerIndex].tokenAddress;
- const tokenId = tokenInfo[ownerIndex].tokenId;
- if (_.isUndefined(tokenIdsByOwner[tokenOwnerAddress])) {
- tokenIdsByOwner[tokenOwnerAddress] = {
- [tokenAddress]: [],
- };
- }
- if (_.isUndefined(tokenIdsByOwner[tokenOwnerAddress][tokenAddress])) {
- tokenIdsByOwner[tokenOwnerAddress][tokenAddress] = [];
- }
- tokenIdsByOwner[tokenOwnerAddress][tokenAddress].push(tokenId);
- });
- return tokenIdsByOwner;
- }
- public getTokenOwnerAddresses(): string[] {
- return this._tokenOwnerAddresses;
- }
- public getTokenAddresses(): string[] {
- const tokenAddresses = _.map(this._dummyTokenContracts, dummyTokenContract => dummyTokenContract.address);
- return tokenAddresses;
- }
- private _getTokenContractFromAssetData(tokenAddress: string): DummyERC721TokenContract {
- const tokenContractIfExists = _.find(this._dummyTokenContracts, c => c.address === tokenAddress);
- if (_.isUndefined(tokenContractIfExists)) {
- throw new Error(`Token: ${tokenAddress} was not deployed through ERC20Wrapper`);
- }
- return tokenContractIfExists;
- }
- private _validateDummyTokenContractsExistOrThrow(): void {
- if (_.isUndefined(this._dummyTokenContracts)) {
- throw new Error('Dummy ERC721 tokens not yet deployed, please call "deployDummyTokensAsync"');
- }
- }
- private _validateProxyContractExistsOrThrow(): void {
- if (_.isUndefined(this._proxyContract)) {
- throw new Error('ERC721 proxy contract not yet deployed, please call "deployProxyAsync"');
- }
- }
- private _validateBalancesAndAllowancesSetOrThrow(): void {
- if (_.keys(this._initialTokenIdsByOwner).length === 0) {
- throw new Error(
- 'Dummy ERC721 balances and allowances not yet set, please call "setBalancesAndAllowancesAsync"',
- );
- }
- }
-}
diff --git a/contracts/protocol/test/utils/exchange_wrapper.ts b/contracts/protocol/test/utils/exchange_wrapper.ts
deleted file mode 100644
index 437882b41..000000000
--- a/contracts/protocol/test/utils/exchange_wrapper.ts
+++ /dev/null
@@ -1,292 +0,0 @@
-import {
- FillResults,
- formatters,
- LogDecoder,
- OrderInfo,
- orderUtils,
- SignedTransaction,
-} from '@0x/contracts-test-utils';
-import { artifacts as tokensArtifacts } from '@0x/contracts-tokens';
-import { SignedOrder } from '@0x/types';
-import { AbiEncoder, BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { MethodAbi, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { ExchangeContract } from '../../generated-wrappers/exchange';
-import { artifacts } from '../../src/artifacts';
-
-import { AbiDecodedFillOrderData } from './types';
-
-export class ExchangeWrapper {
- private readonly _exchange: ExchangeContract;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _logDecoder: LogDecoder;
- constructor(exchangeContract: ExchangeContract, provider: Provider) {
- this._exchange = exchangeContract;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._logDecoder = new LogDecoder(this._web3Wrapper, { ...artifacts, ...tokensArtifacts });
- }
- public async fillOrderAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const txHash = await this._exchange.fillOrder.sendTransactionAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- { from },
- );
- const txReceipt = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return txReceipt;
- }
- public async cancelOrderAsync(signedOrder: SignedOrder, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createCancel(signedOrder);
- const txHash = await this._exchange.cancelOrder.sendTransactionAsync(params.order, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async fillOrKillOrderAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const txHash = await this._exchange.fillOrKillOrder.sendTransactionAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async fillOrderNoThrowAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber; gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const txHash = await this._exchange.fillOrderNoThrow.sendTransactionAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- { from, gas: opts.gas },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async batchFillOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const txHash = await this._exchange.batchFillOrders.sendTransactionAsync(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async batchFillOrKillOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[] } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const txHash = await this._exchange.batchFillOrKillOrders.sendTransactionAsync(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async batchFillOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmounts?: BigNumber[]; gas?: number } = {},
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchFill(orders, opts.takerAssetFillAmounts);
- const txHash = await this._exchange.batchFillOrdersNoThrow.sendTransactionAsync(
- params.orders,
- params.takerAssetFillAmounts,
- params.signatures,
- { from, gas: opts.gas },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async marketSellOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmount: BigNumber },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
- const txHash = await this._exchange.marketSellOrders.sendTransactionAsync(
- params.orders,
- params.takerAssetFillAmount,
- params.signatures,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async marketSellOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { takerAssetFillAmount: BigNumber; gas?: number },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketSellOrders(orders, opts.takerAssetFillAmount);
- const txHash = await this._exchange.marketSellOrdersNoThrow.sendTransactionAsync(
- params.orders,
- params.takerAssetFillAmount,
- params.signatures,
- { from, gas: opts.gas },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async marketBuyOrdersAsync(
- orders: SignedOrder[],
- from: string,
- opts: { makerAssetFillAmount: BigNumber },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
- const txHash = await this._exchange.marketBuyOrders.sendTransactionAsync(
- params.orders,
- params.makerAssetFillAmount,
- params.signatures,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async marketBuyOrdersNoThrowAsync(
- orders: SignedOrder[],
- from: string,
- opts: { makerAssetFillAmount: BigNumber; gas?: number },
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createMarketBuyOrders(orders, opts.makerAssetFillAmount);
- const txHash = await this._exchange.marketBuyOrdersNoThrow.sendTransactionAsync(
- params.orders,
- params.makerAssetFillAmount,
- params.signatures,
- { from, gas: opts.gas },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async batchCancelOrdersAsync(
- orders: SignedOrder[],
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = formatters.createBatchCancel(orders);
- const txHash = await this._exchange.batchCancelOrders.sendTransactionAsync(params.orders, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async cancelOrdersUpToAsync(salt: BigNumber, from: string): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._exchange.cancelOrdersUpTo.sendTransactionAsync(salt, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async registerAssetProxyAsync(
- assetProxyAddress: string,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._exchange.registerAssetProxy.sendTransactionAsync(assetProxyAddress, { from });
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async executeTransactionAsync(
- signedTx: SignedTransaction,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const txHash = await this._exchange.executeTransaction.sendTransactionAsync(
- signedTx.salt,
- signedTx.signerAddress,
- signedTx.data,
- signedTx.signature,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async getTakerAssetFilledAmountAsync(orderHashHex: string): Promise<BigNumber> {
- const filledAmount = await this._exchange.filled.callAsync(orderHashHex);
- return filledAmount;
- }
- public async isCancelledAsync(orderHashHex: string): Promise<boolean> {
- const isCancelled = await this._exchange.cancelled.callAsync(orderHashHex);
- return isCancelled;
- }
- public async getOrderEpochAsync(makerAddress: string, senderAddress: string): Promise<BigNumber> {
- const orderEpoch = await this._exchange.orderEpoch.callAsync(makerAddress, senderAddress);
- return orderEpoch;
- }
- public async getOrderInfoAsync(signedOrder: SignedOrder): Promise<OrderInfo> {
- const orderInfo = await this._exchange.getOrderInfo.callAsync(signedOrder);
- return orderInfo;
- }
- public async getOrdersInfoAsync(signedOrders: SignedOrder[]): Promise<OrderInfo[]> {
- const ordersInfo = (await this._exchange.getOrdersInfo.callAsync(signedOrders)) as OrderInfo[];
- return ordersInfo;
- }
- public async matchOrdersAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- from: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const params = orderUtils.createMatchOrders(signedOrderLeft, signedOrderRight);
- const txHash = await this._exchange.matchOrders.sendTransactionAsync(
- params.left,
- params.right,
- params.leftSignature,
- params.rightSignature,
- { from },
- );
- const tx = await this._logDecoder.getTxWithDecodedLogsAsync(txHash);
- return tx;
- }
- public async getFillOrderResultsAsync(
- signedOrder: SignedOrder,
- from: string,
- opts: { takerAssetFillAmount?: BigNumber } = {},
- ): Promise<FillResults> {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const fillResults = await this._exchange.fillOrder.callAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- { from },
- );
- return fillResults;
- }
- public abiEncodeFillOrder(signedOrder: SignedOrder, opts: { takerAssetFillAmount?: BigNumber } = {}): string {
- const params = orderUtils.createFill(signedOrder, opts.takerAssetFillAmount);
- const data = this._exchange.fillOrder.getABIEncodedTransactionData(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- return data;
- }
- public abiDecodeFillOrder(data: string): AbiDecodedFillOrderData {
- // Lookup fillOrder ABI in exchange abi
- const fillOrderAbi = _.find(this._exchange.abi, { name: 'fillOrder' }) as MethodAbi;
- // Decode input data
- const abiEncoder = new AbiEncoder.Method(fillOrderAbi);
- const decodedData = abiEncoder.decode(data) as AbiDecodedFillOrderData;
- return decodedData;
- }
- public getExchangeAddress(): string {
- return this._exchange.address;
- }
-}
diff --git a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts b/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts
deleted file mode 100644
index c2f530e5b..000000000
--- a/contracts/protocol/test/utils/fill_order_combinatorial_utils.ts
+++ /dev/null
@@ -1,928 +0,0 @@
-import { artifacts as libsArtifacts, TestLibsContract } from '@0x/contracts-libs';
-import {
- AllowanceAmountScenario,
- AssetDataScenario,
- BalanceAmountScenario,
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- ExpirationTimeSecondsScenario,
- FeeRecipientAddressScenario,
- FillScenario,
- OrderAssetAmountScenario,
- orderUtils,
- signingUtils,
- TakerAssetFillAmountScenario,
- TakerScenario,
- TraderStateScenario,
-} from '@0x/contracts-test-utils';
-import {
- assetDataUtils,
- BalanceAndProxyAllowanceLazyStore,
- ExchangeTransferSimulator,
- orderHashUtils,
- OrderStateUtils,
- OrderValidationUtils,
-} from '@0x/order-utils';
-import { AssetProxyId, RevertReason, SignatureType, SignedOrder } from '@0x/types';
-import { BigNumber, errorUtils, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { LogWithDecodedArgs, Provider, TxData } from 'ethereum-types';
-import * as _ from 'lodash';
-import 'make-promises-safe';
-
-import { ExchangeContract, ExchangeFillEventArgs } from '../../generated-wrappers/exchange';
-import { artifacts } from '../../src/artifacts';
-
-import { AssetWrapper } from './asset_wrapper';
-import { ERC20Wrapper } from './erc20_wrapper';
-import { ERC721Wrapper } from './erc721_wrapper';
-import { ExchangeWrapper } from './exchange_wrapper';
-import { OrderFactoryFromScenario } from './order_factory_from_scenario';
-import { SimpleAssetBalanceAndProxyAllowanceFetcher } from './simple_asset_balance_and_proxy_allowance_fetcher';
-import { SimpleOrderFilledCancelledFetcher } from './simple_order_filled_cancelled_fetcher';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-/**
- * Instantiates a new instance of FillOrderCombinatorialUtils. Since this method has some
- * required async setup, a factory method is required.
- * @param web3Wrapper Web3Wrapper instance
- * @param txDefaults Default Ethereum tx options
- * @return FillOrderCombinatorialUtils instance
- */
-export async function fillOrderCombinatorialUtilsFactoryAsync(
- web3Wrapper: Web3Wrapper,
- txDefaults: Partial<TxData>,
-): Promise<FillOrderCombinatorialUtils> {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- const userAddresses = _.slice(accounts, 0, 5);
- const [ownerAddress, makerAddress, takerAddress] = userAddresses;
- const makerPrivateKey = constants.TESTRPC_PRIVATE_KEYS[userAddresses.indexOf(makerAddress)];
-
- const provider = web3Wrapper.getProvider();
- const erc20Wrapper = new ERC20Wrapper(provider, userAddresses, ownerAddress);
- const erc721Wrapper = new ERC721Wrapper(provider, userAddresses, ownerAddress);
-
- const erc20EighteenDecimalTokenCount = 3;
- const eighteenDecimals = new BigNumber(18);
- const [
- erc20EighteenDecimalTokenA,
- erc20EighteenDecimalTokenB,
- zrxToken,
- ] = await erc20Wrapper.deployDummyTokensAsync(erc20EighteenDecimalTokenCount, eighteenDecimals);
- const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
-
- const erc20FiveDecimalTokenCount = 2;
- const fiveDecimals = new BigNumber(5);
- const [erc20FiveDecimalTokenA, erc20FiveDecimalTokenB] = await erc20Wrapper.deployDummyTokensAsync(
- erc20FiveDecimalTokenCount,
- fiveDecimals,
- );
- const zeroDecimals = new BigNumber(0);
- const erc20ZeroDecimalTokenCount = 2;
- const [erc20ZeroDecimalTokenA, erc20ZeroDecimalTokenB] = await erc20Wrapper.deployDummyTokensAsync(
- erc20ZeroDecimalTokenCount,
- zeroDecimals,
- );
- const erc20Proxy = await erc20Wrapper.deployProxyAsync();
- await erc20Wrapper.setBalancesAndAllowancesAsync();
-
- const [erc721Token] = await erc721Wrapper.deployDummyTokensAsync();
- const erc721Proxy = await erc721Wrapper.deployProxyAsync();
- await erc721Wrapper.setBalancesAndAllowancesAsync();
- const erc721Balances = await erc721Wrapper.getBalancesAsync();
-
- const assetWrapper = new AssetWrapper([erc20Wrapper, erc721Wrapper]);
-
- const exchangeContract = await ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
- const exchangeWrapper = new ExchangeWrapper(exchangeContract, provider);
- await exchangeWrapper.registerAssetProxyAsync(erc20Proxy.address, ownerAddress);
- await exchangeWrapper.registerAssetProxyAsync(erc721Proxy.address, ownerAddress);
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, {
- from: ownerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchangeContract.address, {
- from: ownerAddress,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const orderFactory = new OrderFactoryFromScenario(
- userAddresses,
- zrxToken.address,
- [erc20EighteenDecimalTokenA.address, erc20EighteenDecimalTokenB.address],
- [erc20FiveDecimalTokenA.address, erc20FiveDecimalTokenB.address],
- [erc20ZeroDecimalTokenA.address, erc20ZeroDecimalTokenB.address],
- erc721Token,
- erc721Balances,
- exchangeContract.address,
- );
-
- const testLibsContract = await TestLibsContract.deployFrom0xArtifactAsync(
- libsArtifacts.TestLibs,
- provider,
- txDefaults,
- );
-
- const fillOrderCombinatorialUtils = new FillOrderCombinatorialUtils(
- orderFactory,
- ownerAddress,
- makerAddress,
- makerPrivateKey,
- takerAddress,
- zrxAssetData,
- exchangeWrapper,
- assetWrapper,
- testLibsContract,
- );
- return fillOrderCombinatorialUtils;
-}
-
-export class FillOrderCombinatorialUtils {
- public orderFactory: OrderFactoryFromScenario;
- public ownerAddress: string;
- public makerAddress: string;
- public makerPrivateKey: Buffer;
- public takerAddress: string;
- public zrxAssetData: string;
- public exchangeWrapper: ExchangeWrapper;
- public assetWrapper: AssetWrapper;
- public testLibsContract: TestLibsContract;
- public static generateFillOrderCombinations(): FillScenario[] {
- const takerScenarios = [
- TakerScenario.Unspecified,
- // TakerScenario.CorrectlySpecified,
- // TakerScenario.IncorrectlySpecified,
- ];
- const feeRecipientScenarios = [
- FeeRecipientAddressScenario.EthUserAddress,
- // FeeRecipientAddressScenario.BurnAddress,
- ];
- const makerAssetAmountScenario = [
- OrderAssetAmountScenario.Large,
- // OrderAssetAmountScenario.Zero,
- // OrderAssetAmountScenario.Small,
- ];
- const takerAssetAmountScenario = [
- OrderAssetAmountScenario.Large,
- // OrderAssetAmountScenario.Zero,
- // OrderAssetAmountScenario.Small,
- ];
- const makerFeeScenario = [
- OrderAssetAmountScenario.Large,
- // OrderAssetAmountScenario.Small,
- // OrderAssetAmountScenario.Zero,
- ];
- const takerFeeScenario = [
- OrderAssetAmountScenario.Large,
- // OrderAssetAmountScenario.Small,
- // OrderAssetAmountScenario.Zero,
- ];
- const expirationTimeSecondsScenario = [
- ExpirationTimeSecondsScenario.InFuture,
- ExpirationTimeSecondsScenario.InPast,
- ];
- const makerAssetDataScenario = [
- AssetDataScenario.ERC20FiveDecimals,
- AssetDataScenario.ERC20NonZRXEighteenDecimals,
- AssetDataScenario.ERC721,
- AssetDataScenario.ZRXFeeToken,
- ];
- const takerAssetDataScenario = [
- AssetDataScenario.ERC20FiveDecimals,
- AssetDataScenario.ERC20NonZRXEighteenDecimals,
- AssetDataScenario.ERC721,
- AssetDataScenario.ZRXFeeToken,
- ];
- const takerAssetFillAmountScenario = [
- TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount,
- // TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount,
- // TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount,
- ];
- const makerAssetBalanceScenario = [
- BalanceAmountScenario.Higher,
- // BalanceAmountScenario.Exact,
- // BalanceAmountScenario.TooLow,
- ];
- const makerAssetAllowanceScenario = [
- AllowanceAmountScenario.Higher,
- // AllowanceAmountScenario.Exact,
- // AllowanceAmountScenario.TooLow,
- // AllowanceAmountScenario.Unlimited,
- ];
- const makerZRXBalanceScenario = [
- BalanceAmountScenario.Higher,
- // BalanceAmountScenario.Exact,
- // BalanceAmountScenario.TooLow,
- ];
- const makerZRXAllowanceScenario = [
- AllowanceAmountScenario.Higher,
- // AllowanceAmountScenario.Exact,
- // AllowanceAmountScenario.TooLow,
- // AllowanceAmountScenario.Unlimited,
- ];
- const takerAssetBalanceScenario = [
- BalanceAmountScenario.Higher,
- // BalanceAmountScenario.Exact,
- // BalanceAmountScenario.TooLow,
- ];
- const takerAssetAllowanceScenario = [
- AllowanceAmountScenario.Higher,
- // AllowanceAmountScenario.Exact,
- // AllowanceAmountScenario.TooLow,
- // AllowanceAmountScenario.Unlimited,
- ];
- const takerZRXBalanceScenario = [
- BalanceAmountScenario.Higher,
- // BalanceAmountScenario.Exact,
- // BalanceAmountScenario.TooLow,
- ];
- const takerZRXAllowanceScenario = [
- AllowanceAmountScenario.Higher,
- // AllowanceAmountScenario.Exact,
- // AllowanceAmountScenario.TooLow,
- // AllowanceAmountScenario.Unlimited,
- ];
- const fillScenarioArrays = FillOrderCombinatorialUtils._getAllCombinations([
- takerScenarios,
- feeRecipientScenarios,
- makerAssetAmountScenario,
- takerAssetAmountScenario,
- makerFeeScenario,
- takerFeeScenario,
- expirationTimeSecondsScenario,
- makerAssetDataScenario,
- takerAssetDataScenario,
- takerAssetFillAmountScenario,
- makerAssetBalanceScenario,
- makerAssetAllowanceScenario,
- makerZRXBalanceScenario,
- makerZRXAllowanceScenario,
- takerAssetBalanceScenario,
- takerAssetAllowanceScenario,
- takerZRXBalanceScenario,
- takerZRXAllowanceScenario,
- ]);
-
- const fillScenarios = _.map(fillScenarioArrays, fillScenarioArray => {
- // tslint:disable:custom-no-magic-numbers
- const fillScenario: FillScenario = {
- orderScenario: {
- takerScenario: fillScenarioArray[0] as TakerScenario,
- feeRecipientScenario: fillScenarioArray[1] as FeeRecipientAddressScenario,
- makerAssetAmountScenario: fillScenarioArray[2] as OrderAssetAmountScenario,
- takerAssetAmountScenario: fillScenarioArray[3] as OrderAssetAmountScenario,
- makerFeeScenario: fillScenarioArray[4] as OrderAssetAmountScenario,
- takerFeeScenario: fillScenarioArray[5] as OrderAssetAmountScenario,
- expirationTimeSecondsScenario: fillScenarioArray[6] as ExpirationTimeSecondsScenario,
- makerAssetDataScenario: fillScenarioArray[7] as AssetDataScenario,
- takerAssetDataScenario: fillScenarioArray[8] as AssetDataScenario,
- },
- takerAssetFillAmountScenario: fillScenarioArray[9] as TakerAssetFillAmountScenario,
- makerStateScenario: {
- traderAssetBalance: fillScenarioArray[10] as BalanceAmountScenario,
- traderAssetAllowance: fillScenarioArray[11] as AllowanceAmountScenario,
- zrxFeeBalance: fillScenarioArray[12] as BalanceAmountScenario,
- zrxFeeAllowance: fillScenarioArray[13] as AllowanceAmountScenario,
- },
- takerStateScenario: {
- traderAssetBalance: fillScenarioArray[14] as BalanceAmountScenario,
- traderAssetAllowance: fillScenarioArray[15] as AllowanceAmountScenario,
- zrxFeeBalance: fillScenarioArray[16] as BalanceAmountScenario,
- zrxFeeAllowance: fillScenarioArray[17] as AllowanceAmountScenario,
- },
- };
- // tslint:enable:custom-no-magic-numbers
- return fillScenario;
- });
-
- return fillScenarios;
- }
- /**
- * Recursive implementation of generating all combinations of the supplied
- * string-containing arrays.
- */
- private static _getAllCombinations(arrays: string[][]): string[][] {
- // Base case
- if (arrays.length === 1) {
- const remainingValues = _.map(arrays[0], val => {
- return [val];
- });
- return remainingValues;
- } else {
- const result = [];
- const restOfArrays = arrays.slice(1);
- const allCombinationsOfRemaining = FillOrderCombinatorialUtils._getAllCombinations(restOfArrays); // recur with the rest of array
- // tslint:disable:prefer-for-of
- for (let i = 0; i < allCombinationsOfRemaining.length; i++) {
- for (let j = 0; j < arrays[0].length; j++) {
- result.push([arrays[0][j], ...allCombinationsOfRemaining[i]]);
- }
- }
- // tslint:enable:prefer-for-of
- return result;
- }
- }
- constructor(
- orderFactory: OrderFactoryFromScenario,
- ownerAddress: string,
- makerAddress: string,
- makerPrivateKey: Buffer,
- takerAddress: string,
- zrxAssetData: string,
- exchangeWrapper: ExchangeWrapper,
- assetWrapper: AssetWrapper,
- testLibsContract: TestLibsContract,
- ) {
- this.orderFactory = orderFactory;
- this.ownerAddress = ownerAddress;
- this.makerAddress = makerAddress;
- this.makerPrivateKey = makerPrivateKey;
- this.takerAddress = takerAddress;
- this.zrxAssetData = zrxAssetData;
- this.exchangeWrapper = exchangeWrapper;
- this.assetWrapper = assetWrapper;
- this.testLibsContract = testLibsContract;
- }
- public async testFillOrderScenarioAsync(
- provider: Provider,
- fillScenario: FillScenario,
- isVerbose: boolean = false,
- ): Promise<void> {
- // 1. Generate order
- const order = this.orderFactory.generateOrder(fillScenario.orderScenario);
-
- // 2. Sign order
- const orderHashBuff = orderHashUtils.getOrderHashBuffer(order);
- const signature = signingUtils.signMessage(orderHashBuff, this.makerPrivateKey, SignatureType.EthSign);
- const signedOrder = {
- ...order,
- signature: `0x${signature.toString('hex')}`,
- };
-
- const balanceAndProxyAllowanceFetcher = new SimpleAssetBalanceAndProxyAllowanceFetcher(this.assetWrapper);
- const orderFilledCancelledFetcher = new SimpleOrderFilledCancelledFetcher(
- this.exchangeWrapper,
- this.zrxAssetData,
- );
-
- // 3. Figure out fill amount
- const takerAssetFillAmount = await this._getTakerAssetFillAmountAsync(
- signedOrder,
- fillScenario.takerAssetFillAmountScenario,
- balanceAndProxyAllowanceFetcher,
- orderFilledCancelledFetcher,
- );
-
- // 4. Permutate the maker and taker balance/allowance scenarios
- await this._modifyTraderStateAsync(
- fillScenario.makerStateScenario,
- fillScenario.takerStateScenario,
- signedOrder,
- takerAssetFillAmount,
- );
-
- // 5. If I fill it by X, what are the resulting balances/allowances/filled amounts expected?
- const orderValidationUtils = new OrderValidationUtils(orderFilledCancelledFetcher, provider);
- const lazyStore = new BalanceAndProxyAllowanceLazyStore(balanceAndProxyAllowanceFetcher);
- const exchangeTransferSimulator = new ExchangeTransferSimulator(lazyStore);
-
- let fillRevertReasonIfExists;
- try {
- await orderValidationUtils.validateFillOrderThrowIfInvalidAsync(
- exchangeTransferSimulator,
- provider,
- signedOrder,
- takerAssetFillAmount,
- this.takerAddress,
- this.zrxAssetData,
- );
- if (isVerbose) {
- logUtils.log(`Expecting fillOrder to succeed.`);
- }
- } catch (err) {
- fillRevertReasonIfExists = err.message;
- if (isVerbose) {
- logUtils.log(`Expecting fillOrder to fail with:`);
- logUtils.log(err);
- }
- }
-
- // 6. Fill the order
- await this._fillOrderAndAssertOutcomeAsync(
- signedOrder,
- takerAssetFillAmount,
- lazyStore,
- fillRevertReasonIfExists,
- );
-
- await this._abiEncodeFillOrderAndAssertOutcomeAsync(signedOrder, takerAssetFillAmount);
- }
- private async _fillOrderAndAssertOutcomeAsync(
- signedOrder: SignedOrder,
- takerAssetFillAmount: BigNumber,
- lazyStore: BalanceAndProxyAllowanceLazyStore,
- fillRevertReasonIfExists: RevertReason | undefined,
- ): Promise<void> {
- if (!_.isUndefined(fillRevertReasonIfExists)) {
- return expectTransactionFailedAsync(
- this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, { takerAssetFillAmount }),
- fillRevertReasonIfExists,
- );
- }
-
- const makerAddress = signedOrder.makerAddress;
- const makerAssetData = signedOrder.makerAssetData;
- const takerAssetData = signedOrder.takerAssetData;
- const feeRecipient = signedOrder.feeRecipientAddress;
-
- const expMakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(makerAssetData, makerAddress);
- const expMakerAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(makerAssetData, makerAddress);
- const expTakerAssetBalanceOfMaker = await lazyStore.getBalanceAsync(takerAssetData, makerAddress);
- const expZRXAssetBalanceOfMaker = await lazyStore.getBalanceAsync(this.zrxAssetData, makerAddress);
- const expZRXAssetAllowanceOfMaker = await lazyStore.getProxyAllowanceAsync(this.zrxAssetData, makerAddress);
- const expTakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(takerAssetData, this.takerAddress);
- const expTakerAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync(takerAssetData, this.takerAddress);
- const expMakerAssetBalanceOfTaker = await lazyStore.getBalanceAsync(makerAssetData, this.takerAddress);
- const expZRXAssetBalanceOfTaker = await lazyStore.getBalanceAsync(this.zrxAssetData, this.takerAddress);
- const expZRXAssetAllowanceOfTaker = await lazyStore.getProxyAllowanceAsync(
- this.zrxAssetData,
- this.takerAddress,
- );
- const expZRXAssetBalanceOfFeeRecipient = await lazyStore.getBalanceAsync(this.zrxAssetData, feeRecipient);
-
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const alreadyFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash);
- const remainingTakerAmountToFill = signedOrder.takerAssetAmount.minus(alreadyFilledTakerAmount);
- const expFilledTakerAmount = takerAssetFillAmount.gt(remainingTakerAmountToFill)
- ? remainingTakerAmountToFill
- : alreadyFilledTakerAmount.plus(takerAssetFillAmount);
-
- const expFilledMakerAmount = orderUtils.getPartialAmountFloor(
- expFilledTakerAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerAssetAmount,
- );
- const expMakerFeePaid = orderUtils.getPartialAmountFloor(
- expFilledTakerAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerFee,
- );
- const expTakerFeePaid = orderUtils.getPartialAmountFloor(
- expFilledTakerAmount,
- signedOrder.takerAssetAmount,
- signedOrder.takerFee,
- );
- const fillResults = await this.exchangeWrapper.getFillOrderResultsAsync(signedOrder, this.takerAddress, {
- takerAssetFillAmount,
- });
- expect(fillResults.takerAssetFilledAmount).to.be.bignumber.equal(
- expFilledTakerAmount,
- 'takerAssetFilledAmount',
- );
- expect(fillResults.makerAssetFilledAmount).to.be.bignumber.equal(
- expFilledMakerAmount,
- 'makerAssetFilledAmount',
- );
- expect(fillResults.takerFeePaid).to.be.bignumber.equal(expTakerFeePaid, 'takerFeePaid');
- expect(fillResults.makerFeePaid).to.be.bignumber.equal(expMakerFeePaid, 'makerFeePaid');
-
- // - Let's fill the order!
- const txReceipt = await this.exchangeWrapper.fillOrderAsync(signedOrder, this.takerAddress, {
- takerAssetFillAmount,
- });
-
- const actFilledTakerAmount = await this.exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash);
- expect(actFilledTakerAmount).to.be.bignumber.equal(expFilledTakerAmount, 'filledTakerAmount');
-
- const exchangeLogs = _.filter(
- txReceipt.logs,
- txLog => txLog.address === this.exchangeWrapper.getExchangeAddress(),
- );
- expect(exchangeLogs.length).to.be.equal(1, 'logs length');
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const log = txReceipt.logs[0] as LogWithDecodedArgs<ExchangeFillEventArgs>;
- expect(log.args.makerAddress).to.be.equal(makerAddress, 'log.args.makerAddress');
- expect(log.args.takerAddress).to.be.equal(this.takerAddress, 'log.args.this.takerAddress');
- expect(log.args.feeRecipientAddress).to.be.equal(feeRecipient, 'log.args.feeRecipientAddress');
- expect(log.args.makerAssetFilledAmount).to.be.bignumber.equal(
- expFilledMakerAmount,
- 'log.args.makerAssetFilledAmount',
- );
- expect(log.args.takerAssetFilledAmount).to.be.bignumber.equal(
- expFilledTakerAmount,
- 'log.args.takerAssetFilledAmount',
- );
- expect(log.args.makerFeePaid).to.be.bignumber.equal(expMakerFeePaid, 'log.args.makerFeePaid');
- expect(log.args.takerFeePaid).to.be.bignumber.equal(expTakerFeePaid, 'logs.args.takerFeePaid');
- expect(log.args.orderHash).to.be.equal(orderHash, 'log.args.orderHash');
- expect(log.args.makerAssetData).to.be.equal(makerAssetData, 'log.args.makerAssetData');
- expect(log.args.takerAssetData).to.be.equal(takerAssetData, 'log.args.takerAssetData');
-
- const actMakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, makerAssetData);
- expect(actMakerAssetBalanceOfMaker).to.be.bignumber.equal(
- expMakerAssetBalanceOfMaker,
- 'makerAssetBalanceOfMaker',
- );
-
- const actMakerAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync(
- makerAddress,
- makerAssetData,
- );
- expect(actMakerAssetAllowanceOfMaker).to.be.bignumber.equal(
- expMakerAssetAllowanceOfMaker,
- 'makerAssetAllowanceOfMaker',
- );
-
- const actTakerAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, takerAssetData);
- expect(actTakerAssetBalanceOfMaker).to.be.bignumber.equal(
- expTakerAssetBalanceOfMaker,
- 'takerAssetBalanceOfMaker',
- );
-
- const actZRXAssetBalanceOfMaker = await this.assetWrapper.getBalanceAsync(makerAddress, this.zrxAssetData);
- expect(actZRXAssetBalanceOfMaker).to.be.bignumber.equal(expZRXAssetBalanceOfMaker, 'ZRXAssetBalanceOfMaker');
-
- const actZRXAssetAllowanceOfMaker = await this.assetWrapper.getProxyAllowanceAsync(
- makerAddress,
- this.zrxAssetData,
- );
- expect(actZRXAssetAllowanceOfMaker).to.be.bignumber.equal(
- expZRXAssetAllowanceOfMaker,
- 'ZRXAssetAllowanceOfMaker',
- );
-
- const actTakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, takerAssetData);
- expect(actTakerAssetBalanceOfTaker).to.be.bignumber.equal(
- expTakerAssetBalanceOfTaker,
- 'TakerAssetBalanceOfTaker',
- );
-
- const actTakerAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync(
- this.takerAddress,
- takerAssetData,
- );
-
- expect(actTakerAssetAllowanceOfTaker).to.be.bignumber.equal(
- expTakerAssetAllowanceOfTaker,
- 'TakerAssetAllowanceOfTaker',
- );
-
- const actMakerAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, makerAssetData);
- expect(actMakerAssetBalanceOfTaker).to.be.bignumber.equal(
- expMakerAssetBalanceOfTaker,
- 'MakerAssetBalanceOfTaker',
- );
-
- const actZRXAssetBalanceOfTaker = await this.assetWrapper.getBalanceAsync(this.takerAddress, this.zrxAssetData);
- expect(actZRXAssetBalanceOfTaker).to.be.bignumber.equal(expZRXAssetBalanceOfTaker, 'ZRXAssetBalanceOfTaker');
-
- const actZRXAssetAllowanceOfTaker = await this.assetWrapper.getProxyAllowanceAsync(
- this.takerAddress,
- this.zrxAssetData,
- );
- expect(actZRXAssetAllowanceOfTaker).to.be.bignumber.equal(
- expZRXAssetAllowanceOfTaker,
- 'ZRXAssetAllowanceOfTaker',
- );
-
- const actZRXAssetBalanceOfFeeRecipient = await this.assetWrapper.getBalanceAsync(
- feeRecipient,
- this.zrxAssetData,
- );
- expect(actZRXAssetBalanceOfFeeRecipient).to.be.bignumber.equal(
- expZRXAssetBalanceOfFeeRecipient,
- 'ZRXAssetBalanceOfFeeRecipient',
- );
- }
- private async _abiEncodeFillOrderAndAssertOutcomeAsync(
- signedOrder: SignedOrder,
- takerAssetFillAmount: BigNumber,
- ): Promise<void> {
- const params = orderUtils.createFill(signedOrder, takerAssetFillAmount);
- const abiDataEncodedByContract = await this.testLibsContract.publicAbiEncodeFillOrder.callAsync(
- params.order,
- params.takerAssetFillAmount,
- params.signature,
- );
- const paramsDecodedByClient = this.exchangeWrapper.abiDecodeFillOrder(abiDataEncodedByContract);
- expect(paramsDecodedByClient).to.be.deep.equal(params, 'ABIEncodedFillOrderData');
- }
- private async _getTakerAssetFillAmountAsync(
- signedOrder: SignedOrder,
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario,
- balanceAndProxyAllowanceFetcher: SimpleAssetBalanceAndProxyAllowanceFetcher,
- orderFilledCancelledFetcher: SimpleOrderFilledCancelledFetcher,
- ): Promise<BigNumber> {
- const orderStateUtils = new OrderStateUtils(balanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher);
- const fillableTakerAssetAmount = await orderStateUtils.getMaxFillableTakerAssetAmountAsync(
- signedOrder,
- this.takerAddress,
- );
-
- let takerAssetFillAmount;
- switch (takerAssetFillAmountScenario) {
- case TakerAssetFillAmountScenario.Zero:
- takerAssetFillAmount = new BigNumber(0);
- break;
-
- case TakerAssetFillAmountScenario.ExactlyRemainingFillableTakerAssetAmount:
- takerAssetFillAmount = fillableTakerAssetAmount;
- break;
-
- case TakerAssetFillAmountScenario.GreaterThanRemainingFillableTakerAssetAmount:
- takerAssetFillAmount = fillableTakerAssetAmount.plus(1);
- break;
-
- case TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount:
- const takerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.takerAssetData);
- const makerAssetProxyId = assetDataUtils.decodeAssetProxyId(signedOrder.makerAssetData);
- const isEitherAssetERC721 =
- takerAssetProxyId === AssetProxyId.ERC721 || makerAssetProxyId === AssetProxyId.ERC721;
- if (isEitherAssetERC721) {
- throw new Error(
- 'Cannot test `TakerAssetFillAmountScenario.LessThanRemainingFillableTakerAssetAmount` together with ERC721 assets since orders involving ERC721 must always be filled exactly.',
- );
- }
- takerAssetFillAmount = fillableTakerAssetAmount.div(2).integerValue(BigNumber.ROUND_FLOOR);
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('TakerAssetFillAmountScenario', takerAssetFillAmountScenario);
- }
-
- return takerAssetFillAmount;
- }
- private async _modifyTraderStateAsync(
- makerStateScenario: TraderStateScenario,
- takerStateScenario: TraderStateScenario,
- signedOrder: SignedOrder,
- takerAssetFillAmount: BigNumber,
- ): Promise<void> {
- const makerAssetFillAmount = orderUtils.getPartialAmountFloor(
- takerAssetFillAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerAssetAmount,
- );
- switch (makerStateScenario.traderAssetBalance) {
- case BalanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case BalanceAmountScenario.TooLow:
- if (makerAssetFillAmount.eq(0)) {
- throw new Error(`Cannot set makerAssetBalanceOfMaker TooLow if makerAssetFillAmount is 0`);
- }
- const tooLowBalance = makerAssetFillAmount.minus(1);
- await this.assetWrapper.setBalanceAsync(
- signedOrder.makerAddress,
- signedOrder.makerAssetData,
- tooLowBalance,
- );
- break;
-
- case BalanceAmountScenario.Exact:
- const exactBalance = makerAssetFillAmount;
- await this.assetWrapper.setBalanceAsync(
- signedOrder.makerAddress,
- signedOrder.makerAssetData,
- exactBalance,
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'makerStateScenario.traderAssetBalance',
- makerStateScenario.traderAssetBalance,
- );
- }
-
- const makerFee = orderUtils.getPartialAmountFloor(
- takerAssetFillAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerFee,
- );
- switch (makerStateScenario.zrxFeeBalance) {
- case BalanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case BalanceAmountScenario.TooLow:
- if (makerFee.eq(0)) {
- throw new Error(`Cannot set zrxAsserBalanceOfMaker TooLow if makerFee is 0`);
- }
- const tooLowBalance = makerFee.minus(1);
- await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, tooLowBalance);
- break;
-
- case BalanceAmountScenario.Exact:
- const exactBalance = makerFee;
- await this.assetWrapper.setBalanceAsync(signedOrder.makerAddress, this.zrxAssetData, exactBalance);
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('makerStateScenario.zrxFeeBalance', makerStateScenario.zrxFeeBalance);
- }
-
- switch (makerStateScenario.traderAssetAllowance) {
- case AllowanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case AllowanceAmountScenario.TooLow:
- const tooLowAllowance = makerAssetFillAmount.minus(1);
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- signedOrder.makerAssetData,
- tooLowAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Exact:
- const exactAllowance = makerAssetFillAmount;
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- signedOrder.makerAssetData,
- exactAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Unlimited:
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- signedOrder.makerAssetData,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'makerStateScenario.traderAssetAllowance',
- makerStateScenario.traderAssetAllowance,
- );
- }
-
- switch (makerStateScenario.zrxFeeAllowance) {
- case AllowanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case AllowanceAmountScenario.TooLow:
- const tooLowAllowance = makerFee.minus(1);
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- this.zrxAssetData,
- tooLowAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Exact:
- const exactAllowance = makerFee;
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- this.zrxAssetData,
- exactAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Unlimited:
- await this.assetWrapper.setProxyAllowanceAsync(
- signedOrder.makerAddress,
- this.zrxAssetData,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'makerStateScenario.zrxFeeAllowance',
- makerStateScenario.zrxFeeAllowance,
- );
- }
-
- switch (takerStateScenario.traderAssetBalance) {
- case BalanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case BalanceAmountScenario.TooLow:
- if (takerAssetFillAmount.eq(0)) {
- throw new Error(`Cannot set takerAssetBalanceOfTaker TooLow if takerAssetFillAmount is 0`);
- }
- const tooLowBalance = takerAssetFillAmount.minus(1);
- await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, tooLowBalance);
- break;
-
- case BalanceAmountScenario.Exact:
- const exactBalance = takerAssetFillAmount;
- await this.assetWrapper.setBalanceAsync(this.takerAddress, signedOrder.takerAssetData, exactBalance);
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'takerStateScenario.traderAssetBalance',
- takerStateScenario.traderAssetBalance,
- );
- }
-
- const takerFee = orderUtils.getPartialAmountFloor(
- takerAssetFillAmount,
- signedOrder.takerAssetAmount,
- signedOrder.takerFee,
- );
- switch (takerStateScenario.zrxFeeBalance) {
- case BalanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case BalanceAmountScenario.TooLow:
- if (takerFee.eq(0)) {
- throw new Error(`Cannot set zrxAssetBalanceOfTaker TooLow if takerFee is 0`);
- }
- const tooLowBalance = takerFee.minus(1);
- await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, tooLowBalance);
- break;
-
- case BalanceAmountScenario.Exact:
- const exactBalance = takerFee;
- await this.assetWrapper.setBalanceAsync(this.takerAddress, this.zrxAssetData, exactBalance);
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('takerStateScenario.zrxFeeBalance', takerStateScenario.zrxFeeBalance);
- }
-
- switch (takerStateScenario.traderAssetAllowance) {
- case AllowanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case AllowanceAmountScenario.TooLow:
- const tooLowAllowance = takerAssetFillAmount.minus(1);
- await this.assetWrapper.setProxyAllowanceAsync(
- this.takerAddress,
- signedOrder.takerAssetData,
- tooLowAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Exact:
- const exactAllowance = takerAssetFillAmount;
- await this.assetWrapper.setProxyAllowanceAsync(
- this.takerAddress,
- signedOrder.takerAssetData,
- exactAllowance,
- );
- break;
-
- case AllowanceAmountScenario.Unlimited:
- await this.assetWrapper.setProxyAllowanceAsync(
- this.takerAddress,
- signedOrder.takerAssetData,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'takerStateScenario.traderAssetAllowance',
- takerStateScenario.traderAssetAllowance,
- );
- }
-
- switch (takerStateScenario.zrxFeeAllowance) {
- case AllowanceAmountScenario.Higher:
- break; // Noop since this is already the default
-
- case AllowanceAmountScenario.TooLow:
- const tooLowAllowance = takerFee.minus(1);
- await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, tooLowAllowance);
- break;
-
- case AllowanceAmountScenario.Exact:
- const exactAllowance = takerFee;
- await this.assetWrapper.setProxyAllowanceAsync(this.takerAddress, this.zrxAssetData, exactAllowance);
- break;
-
- case AllowanceAmountScenario.Unlimited:
- await this.assetWrapper.setProxyAllowanceAsync(
- this.takerAddress,
- this.zrxAssetData,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr(
- 'takerStateScenario.zrxFeeAllowance',
- takerStateScenario.zrxFeeAllowance,
- );
- }
- }
-} // tslint:disable:max-file-line-count
diff --git a/contracts/protocol/test/utils/index.ts b/contracts/protocol/test/utils/index.ts
deleted file mode 100644
index 75cd88666..000000000
--- a/contracts/protocol/test/utils/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './exchange_wrapper';
-export * from './erc20_wrapper';
-export * from './erc721_wrapper';
diff --git a/contracts/protocol/test/utils/match_order_tester.ts b/contracts/protocol/test/utils/match_order_tester.ts
deleted file mode 100644
index 0ba8017c5..000000000
--- a/contracts/protocol/test/utils/match_order_tester.ts
+++ /dev/null
@@ -1,564 +0,0 @@
-import {
- chaiSetup,
- ERC20BalancesByOwner,
- ERC721TokenIdsByOwner,
- OrderInfo,
- OrderStatus,
- TransferAmountsByMatchOrders as TransferAmounts,
- TransferAmountsLoggedByMatchOrders as LoggedTransferAmounts,
-} from '@0x/contracts-test-utils';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { AssetProxyId, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { TransactionReceiptWithDecodedLogs } from '../../../../node_modules/ethereum-types';
-
-import { ERC20Wrapper } from './erc20_wrapper';
-import { ERC721Wrapper } from './erc721_wrapper';
-import { ExchangeWrapper } from './exchange_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-export class MatchOrderTester {
- private readonly _exchangeWrapper: ExchangeWrapper;
- private readonly _erc20Wrapper: ERC20Wrapper;
- private readonly _erc721Wrapper: ERC721Wrapper;
- private readonly _feeTokenAddress: string;
- /// @dev Checks values from the logs produced by Exchange.matchOrders against the expected transfer amounts.
- /// Values include the amounts transferred from the left/right makers and taker, along with
- /// the fees paid on each matched order. These are also the return values of MatchOrders.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param transactionReceipt Transaction receipt and logs produced by Exchange.matchOrders.
- /// @param takerAddress Address of taker (account that called Exchange.matchOrders)
- /// @param expectedTransferAmounts Expected amounts transferred as a result of order matching.
- private static async _assertLogsAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- transactionReceipt: TransactionReceiptWithDecodedLogs,
- takerAddress: string,
- expectedTransferAmounts: TransferAmounts,
- ): Promise<void> {
- // Should have two fill event logs -- one for each order.
- const transactionFillLogs = _.filter(transactionReceipt.logs, ['event', 'Fill']);
- expect(transactionFillLogs.length, 'Checking number of logs').to.be.equal(2);
- // First log is for left fill
- const leftLog = (transactionFillLogs[0] as any).args as LoggedTransferAmounts;
- expect(leftLog.makerAddress, 'Checking logged maker address of left order').to.be.equal(
- signedOrderLeft.makerAddress,
- );
- expect(leftLog.takerAddress, 'Checking logged taker address of right order').to.be.equal(takerAddress);
- const amountBoughtByLeftMaker = new BigNumber(leftLog.takerAssetFilledAmount);
- const amountSoldByLeftMaker = new BigNumber(leftLog.makerAssetFilledAmount);
- const feePaidByLeftMaker = new BigNumber(leftLog.makerFeePaid);
- const feePaidByTakerLeft = new BigNumber(leftLog.takerFeePaid);
- // Second log is for right fill
- const rightLog = (transactionFillLogs[1] as any).args as LoggedTransferAmounts;
- expect(rightLog.makerAddress, 'Checking logged maker address of right order').to.be.equal(
- signedOrderRight.makerAddress,
- );
- expect(rightLog.takerAddress, 'Checking loggerd taker address of right order').to.be.equal(takerAddress);
- const amountBoughtByRightMaker = new BigNumber(rightLog.takerAssetFilledAmount);
- const amountSoldByRightMaker = new BigNumber(rightLog.makerAssetFilledAmount);
- const feePaidByRightMaker = new BigNumber(rightLog.makerFeePaid);
- const feePaidByTakerRight = new BigNumber(rightLog.takerFeePaid);
- // Derive amount received by taker
- const amountReceivedByTaker = amountSoldByLeftMaker.minus(amountBoughtByRightMaker);
- // Assert log values - left order
- expect(amountBoughtByLeftMaker, 'Checking logged amount bought by left maker').to.be.bignumber.equal(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- );
- expect(amountSoldByLeftMaker, 'Checking logged amount sold by left maker').to.be.bignumber.equal(
- expectedTransferAmounts.amountSoldByLeftMaker,
- );
- expect(feePaidByLeftMaker, 'Checking logged fee paid by left maker').to.be.bignumber.equal(
- expectedTransferAmounts.feePaidByLeftMaker,
- );
- expect(feePaidByTakerLeft, 'Checking logged fee paid on left order by taker').to.be.bignumber.equal(
- expectedTransferAmounts.feePaidByTakerLeft,
- );
- // Assert log values - right order
- expect(amountBoughtByRightMaker, 'Checking logged amount bought by right maker').to.be.bignumber.equal(
- expectedTransferAmounts.amountBoughtByRightMaker,
- );
- expect(amountSoldByRightMaker, 'Checking logged amount sold by right maker').to.be.bignumber.equal(
- expectedTransferAmounts.amountSoldByRightMaker,
- );
- expect(feePaidByRightMaker, 'Checking logged fee paid by right maker').to.be.bignumber.equal(
- expectedTransferAmounts.feePaidByRightMaker,
- );
- expect(feePaidByTakerRight, 'Checking logged fee paid on right order by taker').to.be.bignumber.equal(
- expectedTransferAmounts.feePaidByTakerRight,
- );
- // Assert derived amount received by taker
- expect(amountReceivedByTaker, 'Checking logged amount received by taker').to.be.bignumber.equal(
- expectedTransferAmounts.amountReceivedByTaker,
- );
- }
- /// @dev Asserts all expected ERC20 and ERC721 account holdings match the real holdings.
- /// @param expectedERC20BalancesByOwner Expected ERC20 balances.
- /// @param realERC20BalancesByOwner Real ERC20 balances.
- /// @param expectedERC721TokenIdsByOwner Expected ERC721 token owners.
- /// @param realERC721TokenIdsByOwner Real ERC20 token owners.
- private static async _assertAllKnownBalancesAsync(
- expectedERC20BalancesByOwner: ERC20BalancesByOwner,
- realERC20BalancesByOwner: ERC20BalancesByOwner,
- expectedERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- realERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- ): Promise<void> {
- // ERC20 Balances
- const areERC20BalancesEqual = _.isEqual(expectedERC20BalancesByOwner, realERC20BalancesByOwner);
- expect(areERC20BalancesEqual, 'Checking all known ERC20 account balances').to.be.true();
- // ERC721 Token Ids
- const sortedExpectedNewERC721TokenIdsByOwner = _.mapValues(expectedERC721TokenIdsByOwner, tokenIdsByOwner => {
- _.mapValues(tokenIdsByOwner, tokenIds => {
- _.sortBy(tokenIds);
- });
- });
- const sortedNewERC721TokenIdsByOwner = _.mapValues(realERC721TokenIdsByOwner, tokenIdsByOwner => {
- _.mapValues(tokenIdsByOwner, tokenIds => {
- _.sortBy(tokenIds);
- });
- });
- const areERC721TokenIdsEqual = _.isEqual(
- sortedExpectedNewERC721TokenIdsByOwner,
- sortedNewERC721TokenIdsByOwner,
- );
- expect(areERC721TokenIdsEqual, 'Checking all known ERC721 account balances').to.be.true();
- }
- /// @dev Constructs new MatchOrderTester.
- /// @param exchangeWrapper Used to call to the Exchange.
- /// @param erc20Wrapper Used to fetch ERC20 balances.
- /// @param erc721Wrapper Used to fetch ERC721 token owners.
- /// @param feeTokenAddress Address of ERC20 fee token.
- constructor(
- exchangeWrapper: ExchangeWrapper,
- erc20Wrapper: ERC20Wrapper,
- erc721Wrapper: ERC721Wrapper,
- feeTokenAddress: string,
- ) {
- this._exchangeWrapper = exchangeWrapper;
- this._erc20Wrapper = erc20Wrapper;
- this._erc721Wrapper = erc721Wrapper;
- this._feeTokenAddress = feeTokenAddress;
- }
- /// @dev Matches two complementary orders and asserts results.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param takerAddress Address of taker (the address who matched the two orders)
- /// @param erc20BalancesByOwner Current ERC20 balances.
- /// @param erc721TokenIdsByOwner Current ERC721 token owners.
- /// @param expectedTransferAmounts Expected amounts transferred as a result of order matching.
- /// @param initialLeftOrderFilledAmount How much left order has been filled, prior to matching orders.
- /// @param initialRightOrderFilledAmount How much the right order has been filled, prior to matching orders.
- /// @return New ERC20 balances & ERC721 token owners.
- public async matchOrdersAndAssertEffectsAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- takerAddress: string,
- erc20BalancesByOwner: ERC20BalancesByOwner,
- erc721TokenIdsByOwner: ERC721TokenIdsByOwner,
- expectedTransferAmounts: TransferAmounts,
- initialLeftOrderFilledAmount: BigNumber = new BigNumber(0),
- initialRightOrderFilledAmount: BigNumber = new BigNumber(0),
- ): Promise<[ERC20BalancesByOwner, ERC721TokenIdsByOwner]> {
- // Assert initial order states
- await this._assertInitialOrderStatesAsync(
- signedOrderLeft,
- signedOrderRight,
- initialLeftOrderFilledAmount,
- initialRightOrderFilledAmount,
- );
- // Match left & right orders
- const transactionReceipt = await this._exchangeWrapper.matchOrdersAsync(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- );
- const newERC20BalancesByOwner = await this._erc20Wrapper.getBalancesAsync();
- const newERC721TokenIdsByOwner = await this._erc721Wrapper.getBalancesAsync();
- // Assert logs
- await MatchOrderTester._assertLogsAsync(
- signedOrderLeft,
- signedOrderRight,
- transactionReceipt,
- takerAddress,
- expectedTransferAmounts,
- );
- // Assert exchange state
- await this._assertExchangeStateAsync(
- signedOrderLeft,
- signedOrderRight,
- initialLeftOrderFilledAmount,
- initialRightOrderFilledAmount,
- expectedTransferAmounts,
- );
- // Assert balances of makers, taker, and fee recipients
- await this._assertBalancesAsync(
- signedOrderLeft,
- signedOrderRight,
- erc20BalancesByOwner,
- erc721TokenIdsByOwner,
- newERC20BalancesByOwner,
- newERC721TokenIdsByOwner,
- expectedTransferAmounts,
- takerAddress,
- );
- return [newERC20BalancesByOwner, newERC721TokenIdsByOwner];
- }
- /// @dev Asserts initial exchange state for the left and right orders.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param expectedOrderFilledAmountLeft How much left order has been filled, prior to matching orders.
- /// @param expectedOrderFilledAmountRight How much the right order has been filled, prior to matching orders.
- private async _assertInitialOrderStatesAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- expectedOrderFilledAmountLeft: BigNumber,
- expectedOrderFilledAmountRight: BigNumber,
- ): Promise<void> {
- // Assert left order initial state
- const orderTakerAssetFilledAmountLeft = await this._exchangeWrapper.getTakerAssetFilledAmountAsync(
- orderHashUtils.getOrderHashHex(signedOrderLeft),
- );
- expect(orderTakerAssetFilledAmountLeft, 'Checking inital state of left order').to.be.bignumber.equal(
- expectedOrderFilledAmountLeft,
- );
- // Assert right order initial state
- const orderTakerAssetFilledAmountRight = await this._exchangeWrapper.getTakerAssetFilledAmountAsync(
- orderHashUtils.getOrderHashHex(signedOrderRight),
- );
- expect(orderTakerAssetFilledAmountRight, 'Checking inital state of right order').to.be.bignumber.equal(
- expectedOrderFilledAmountRight,
- );
- }
- /// @dev Asserts the exchange state against the expected amounts transferred by from matching orders.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param initialLeftOrderFilledAmount How much left order has been filled, prior to matching orders.
- /// @param initialRightOrderFilledAmount How much the right order has been filled, prior to matching orders.
- /// @return TransferAmounts A struct containing the expected transfer amounts.
- private async _assertExchangeStateAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- initialLeftOrderFilledAmount: BigNumber,
- initialRightOrderFilledAmount: BigNumber,
- expectedTransferAmounts: TransferAmounts,
- ): Promise<void> {
- // Assert state for left order: amount bought by left maker
- let amountBoughtByLeftMaker = await this._exchangeWrapper.getTakerAssetFilledAmountAsync(
- orderHashUtils.getOrderHashHex(signedOrderLeft),
- );
- amountBoughtByLeftMaker = amountBoughtByLeftMaker.minus(initialLeftOrderFilledAmount);
- expect(amountBoughtByLeftMaker, 'Checking exchange state for left order').to.be.bignumber.equal(
- expectedTransferAmounts.amountBoughtByLeftMaker,
- );
- // Assert state for right order: amount bought by right maker
- let amountBoughtByRightMaker = await this._exchangeWrapper.getTakerAssetFilledAmountAsync(
- orderHashUtils.getOrderHashHex(signedOrderRight),
- );
- amountBoughtByRightMaker = amountBoughtByRightMaker.minus(initialRightOrderFilledAmount);
- expect(amountBoughtByRightMaker, 'Checking exchange state for right order').to.be.bignumber.equal(
- expectedTransferAmounts.amountBoughtByRightMaker,
- );
- // Assert left order status
- const maxAmountBoughtByLeftMaker = signedOrderLeft.takerAssetAmount.minus(initialLeftOrderFilledAmount);
- const leftOrderInfo: OrderInfo = await this._exchangeWrapper.getOrderInfoAsync(signedOrderLeft);
- const leftExpectedStatus = expectedTransferAmounts.amountBoughtByLeftMaker.isEqualTo(maxAmountBoughtByLeftMaker)
- ? OrderStatus.FullyFilled
- : OrderStatus.Fillable;
- expect(leftOrderInfo.orderStatus, 'Checking exchange status for left order').to.be.equal(leftExpectedStatus);
- // Assert right order status
- const maxAmountBoughtByRightMaker = signedOrderRight.takerAssetAmount.minus(initialRightOrderFilledAmount);
- const rightOrderInfo: OrderInfo = await this._exchangeWrapper.getOrderInfoAsync(signedOrderRight);
- const rightExpectedStatus = expectedTransferAmounts.amountBoughtByRightMaker.isEqualTo(
- maxAmountBoughtByRightMaker,
- )
- ? OrderStatus.FullyFilled
- : OrderStatus.Fillable;
- expect(rightOrderInfo.orderStatus, 'Checking exchange status for right order').to.be.equal(rightExpectedStatus);
- }
- /// @dev Asserts account balances after matching orders.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param initialERC20BalancesByOwner ERC20 balances prior to order matching.
- /// @param initialERC721TokenIdsByOwner ERC721 token owners prior to order matching.
- /// @param finalERC20BalancesByOwner ERC20 balances after order matching.
- /// @param finalERC721TokenIdsByOwner ERC721 token owners after order matching.
- /// @param expectedTransferAmounts Expected amounts transferred as a result of order matching.
- /// @param takerAddress Address of taker (account that called Exchange.matchOrders).
- private async _assertBalancesAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- initialERC20BalancesByOwner: ERC20BalancesByOwner,
- initialERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- finalERC20BalancesByOwner: ERC20BalancesByOwner,
- finalERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- expectedTransferAmounts: TransferAmounts,
- takerAddress: string,
- ): Promise<void> {
- let expectedERC20BalancesByOwner: ERC20BalancesByOwner;
- let expectedERC721TokenIdsByOwner: ERC721TokenIdsByOwner;
- [expectedERC20BalancesByOwner, expectedERC721TokenIdsByOwner] = this._calculateExpectedBalances(
- signedOrderLeft,
- signedOrderRight,
- takerAddress,
- initialERC20BalancesByOwner,
- initialERC721TokenIdsByOwner,
- expectedTransferAmounts,
- );
- // Assert balances of makers, taker, and fee recipients
- await this._assertMakerTakerAndFeeRecipientBalancesAsync(
- signedOrderLeft,
- signedOrderRight,
- expectedERC20BalancesByOwner,
- finalERC20BalancesByOwner,
- expectedERC721TokenIdsByOwner,
- finalERC721TokenIdsByOwner,
- takerAddress,
- );
- // Assert balances for all known accounts
- await MatchOrderTester._assertAllKnownBalancesAsync(
- expectedERC20BalancesByOwner,
- finalERC20BalancesByOwner,
- expectedERC721TokenIdsByOwner,
- finalERC721TokenIdsByOwner,
- );
- }
- /// @dev Calculates the expected balances of order makers, fee recipients, and the taker,
- /// as a result of matching two orders.
- /// @param signedOrderRight First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param takerAddress Address of taker (the address who matched the two orders)
- /// @param erc20BalancesByOwner Current ERC20 balances.
- /// @param erc721TokenIdsByOwner Current ERC721 token owners.
- /// @param expectedTransferAmounts Expected amounts transferred as a result of order matching.
- /// @return Expected ERC20 balances & ERC721 token owners after orders have been matched.
- private _calculateExpectedBalances(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- takerAddress: string,
- erc20BalancesByOwner: ERC20BalancesByOwner,
- erc721TokenIdsByOwner: ERC721TokenIdsByOwner,
- expectedTransferAmounts: TransferAmounts,
- ): [ERC20BalancesByOwner, ERC721TokenIdsByOwner] {
- const makerAddressLeft = signedOrderLeft.makerAddress;
- const makerAddressRight = signedOrderRight.makerAddress;
- const feeRecipientAddressLeft = signedOrderLeft.feeRecipientAddress;
- const feeRecipientAddressRight = signedOrderRight.feeRecipientAddress;
- // Operations are performed on copies of the balances
- const expectedNewERC20BalancesByOwner = _.cloneDeep(erc20BalancesByOwner);
- const expectedNewERC721TokenIdsByOwner = _.cloneDeep(erc721TokenIdsByOwner);
- // Left Maker Asset (Right Taker Asset)
- const makerAssetProxyIdLeft = assetDataUtils.decodeAssetProxyId(signedOrderLeft.makerAssetData);
- if (makerAssetProxyIdLeft === AssetProxyId.ERC20) {
- // Decode asset data
- const erc20AssetData = assetDataUtils.decodeERC20AssetData(signedOrderLeft.makerAssetData);
- const makerAssetAddressLeft = erc20AssetData.tokenAddress;
- const takerAssetAddressRight = makerAssetAddressLeft;
- // Left Maker
- expectedNewERC20BalancesByOwner[makerAddressLeft][makerAssetAddressLeft] = expectedNewERC20BalancesByOwner[
- makerAddressLeft
- ][makerAssetAddressLeft].minus(expectedTransferAmounts.amountSoldByLeftMaker);
- // Right Maker
- expectedNewERC20BalancesByOwner[makerAddressRight][
- takerAssetAddressRight
- ] = expectedNewERC20BalancesByOwner[makerAddressRight][takerAssetAddressRight].plus(
- expectedTransferAmounts.amountBoughtByRightMaker,
- );
- // Taker
- expectedNewERC20BalancesByOwner[takerAddress][makerAssetAddressLeft] = expectedNewERC20BalancesByOwner[
- takerAddress
- ][makerAssetAddressLeft].plus(expectedTransferAmounts.amountReceivedByTaker);
- } else if (makerAssetProxyIdLeft === AssetProxyId.ERC721) {
- // Decode asset data
- const erc721AssetData = assetDataUtils.decodeERC721AssetData(signedOrderLeft.makerAssetData);
- const makerAssetAddressLeft = erc721AssetData.tokenAddress;
- const makerAssetIdLeft = erc721AssetData.tokenId;
- const takerAssetAddressRight = makerAssetAddressLeft;
- const takerAssetIdRight = makerAssetIdLeft;
- // Left Maker
- _.remove(expectedNewERC721TokenIdsByOwner[makerAddressLeft][makerAssetAddressLeft], makerAssetIdLeft);
- // Right Maker
- expectedNewERC721TokenIdsByOwner[makerAddressRight][takerAssetAddressRight].push(takerAssetIdRight);
- // Taker: Since there is only 1 asset transferred, the taker does not receive any of the left maker asset.
- }
- // Left Taker Asset (Right Maker Asset)
- // Note: This exchange is only between the order makers: the Taker does not receive any of the left taker asset.
- const takerAssetProxyIdLeft = assetDataUtils.decodeAssetProxyId(signedOrderLeft.takerAssetData);
- if (takerAssetProxyIdLeft === AssetProxyId.ERC20) {
- // Decode asset data
- const erc20AssetData = assetDataUtils.decodeERC20AssetData(signedOrderLeft.takerAssetData);
- const takerAssetAddressLeft = erc20AssetData.tokenAddress;
- const makerAssetAddressRight = takerAssetAddressLeft;
- // Left Maker
- expectedNewERC20BalancesByOwner[makerAddressLeft][takerAssetAddressLeft] = expectedNewERC20BalancesByOwner[
- makerAddressLeft
- ][takerAssetAddressLeft].plus(expectedTransferAmounts.amountBoughtByLeftMaker);
- // Right Maker
- expectedNewERC20BalancesByOwner[makerAddressRight][
- makerAssetAddressRight
- ] = expectedNewERC20BalancesByOwner[makerAddressRight][makerAssetAddressRight].minus(
- expectedTransferAmounts.amountSoldByRightMaker,
- );
- } else if (takerAssetProxyIdLeft === AssetProxyId.ERC721) {
- // Decode asset data
- const erc721AssetData = assetDataUtils.decodeERC721AssetData(signedOrderRight.makerAssetData);
- const makerAssetAddressRight = erc721AssetData.tokenAddress;
- const makerAssetIdRight = erc721AssetData.tokenId;
- const takerAssetAddressLeft = makerAssetAddressRight;
- const takerAssetIdLeft = makerAssetIdRight;
- // Right Maker
- _.remove(expectedNewERC721TokenIdsByOwner[makerAddressRight][makerAssetAddressRight], makerAssetIdRight);
- // Left Maker
- expectedNewERC721TokenIdsByOwner[makerAddressLeft][takerAssetAddressLeft].push(takerAssetIdLeft);
- }
- // Left Maker Fees
- expectedNewERC20BalancesByOwner[makerAddressLeft][this._feeTokenAddress] = expectedNewERC20BalancesByOwner[
- makerAddressLeft
- ][this._feeTokenAddress].minus(expectedTransferAmounts.feePaidByLeftMaker);
- // Right Maker Fees
- expectedNewERC20BalancesByOwner[makerAddressRight][this._feeTokenAddress] = expectedNewERC20BalancesByOwner[
- makerAddressRight
- ][this._feeTokenAddress].minus(expectedTransferAmounts.feePaidByRightMaker);
- // Taker Fees
- expectedNewERC20BalancesByOwner[takerAddress][this._feeTokenAddress] = expectedNewERC20BalancesByOwner[
- takerAddress
- ][this._feeTokenAddress].minus(
- expectedTransferAmounts.feePaidByTakerLeft.plus(expectedTransferAmounts.feePaidByTakerRight),
- );
- // Left Fee Recipient Fees
- expectedNewERC20BalancesByOwner[feeRecipientAddressLeft][
- this._feeTokenAddress
- ] = expectedNewERC20BalancesByOwner[feeRecipientAddressLeft][this._feeTokenAddress].plus(
- expectedTransferAmounts.feePaidByLeftMaker.plus(expectedTransferAmounts.feePaidByTakerLeft),
- );
- // Right Fee Recipient Fees
- expectedNewERC20BalancesByOwner[feeRecipientAddressRight][
- this._feeTokenAddress
- ] = expectedNewERC20BalancesByOwner[feeRecipientAddressRight][this._feeTokenAddress].plus(
- expectedTransferAmounts.feePaidByRightMaker.plus(expectedTransferAmounts.feePaidByTakerRight),
- );
-
- return [expectedNewERC20BalancesByOwner, expectedNewERC721TokenIdsByOwner];
- }
- /// @dev Asserts ERC20 account balances and ERC721 token holdings that result from order matching.
- /// Specifically checks balances of makers, taker and fee recipients.
- /// @param signedOrderLeft First matched order.
- /// @param signedOrderRight Second matched order.
- /// @param expectedERC20BalancesByOwner Expected ERC20 balances.
- /// @param realERC20BalancesByOwner Real ERC20 balances.
- /// @param expectedERC721TokenIdsByOwner Expected ERC721 token owners.
- /// @param realERC721TokenIdsByOwner Real ERC20 token owners.
- /// @param takerAddress Address of taker (account that called Exchange.matchOrders).
- private async _assertMakerTakerAndFeeRecipientBalancesAsync(
- signedOrderLeft: SignedOrder,
- signedOrderRight: SignedOrder,
- expectedERC20BalancesByOwner: ERC20BalancesByOwner,
- realERC20BalancesByOwner: ERC20BalancesByOwner,
- expectedERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- realERC721TokenIdsByOwner: ERC721TokenIdsByOwner,
- takerAddress: string,
- ): Promise<void> {
- // Individual balance comparisons
- const makerAssetProxyIdLeft = assetDataUtils.decodeAssetProxyId(signedOrderLeft.makerAssetData);
- const makerERC20AssetDataLeft =
- makerAssetProxyIdLeft === AssetProxyId.ERC20
- ? assetDataUtils.decodeERC20AssetData(signedOrderLeft.makerAssetData)
- : assetDataUtils.decodeERC721AssetData(signedOrderLeft.makerAssetData);
- const makerAssetAddressLeft = makerERC20AssetDataLeft.tokenAddress;
- const makerAssetProxyIdRight = assetDataUtils.decodeAssetProxyId(signedOrderRight.makerAssetData);
- const makerERC20AssetDataRight =
- makerAssetProxyIdRight === AssetProxyId.ERC20
- ? assetDataUtils.decodeERC20AssetData(signedOrderRight.makerAssetData)
- : assetDataUtils.decodeERC721AssetData(signedOrderRight.makerAssetData);
- const makerAssetAddressRight = makerERC20AssetDataRight.tokenAddress;
- if (makerAssetProxyIdLeft === AssetProxyId.ERC20) {
- expect(
- realERC20BalancesByOwner[signedOrderLeft.makerAddress][makerAssetAddressLeft],
- 'Checking left maker egress ERC20 account balance',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[signedOrderLeft.makerAddress][makerAssetAddressLeft]);
- expect(
- realERC20BalancesByOwner[signedOrderRight.makerAddress][makerAssetAddressLeft],
- 'Checking right maker ingress ERC20 account balance',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[signedOrderRight.makerAddress][makerAssetAddressLeft]);
- expect(
- realERC20BalancesByOwner[takerAddress][makerAssetAddressLeft],
- 'Checking taker ingress ERC20 account balance',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[takerAddress][makerAssetAddressLeft]);
- } else if (makerAssetProxyIdLeft === AssetProxyId.ERC721) {
- expect(
- realERC721TokenIdsByOwner[signedOrderLeft.makerAddress][makerAssetAddressLeft].sort(),
- 'Checking left maker egress ERC721 account holdings',
- ).to.be.deep.equal(
- expectedERC721TokenIdsByOwner[signedOrderLeft.makerAddress][makerAssetAddressLeft].sort(),
- );
- expect(
- realERC721TokenIdsByOwner[signedOrderRight.makerAddress][makerAssetAddressLeft].sort(),
- 'Checking right maker ERC721 account holdings',
- ).to.be.deep.equal(
- expectedERC721TokenIdsByOwner[signedOrderRight.makerAddress][makerAssetAddressLeft].sort(),
- );
- expect(
- realERC721TokenIdsByOwner[takerAddress][makerAssetAddressLeft].sort(),
- 'Checking taker ingress ERC721 account holdings',
- ).to.be.deep.equal(expectedERC721TokenIdsByOwner[takerAddress][makerAssetAddressLeft].sort());
- } else {
- throw new Error(`Unhandled Asset Proxy ID: ${makerAssetProxyIdLeft}`);
- }
- if (makerAssetProxyIdRight === AssetProxyId.ERC20) {
- expect(
- realERC20BalancesByOwner[signedOrderLeft.makerAddress][makerAssetAddressRight],
- 'Checking left maker ingress ERC20 account balance',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[signedOrderLeft.makerAddress][makerAssetAddressRight]);
- expect(
- realERC20BalancesByOwner[signedOrderRight.makerAddress][makerAssetAddressRight],
- 'Checking right maker egress ERC20 account balance',
- ).to.be.bignumber.equal(
- expectedERC20BalancesByOwner[signedOrderRight.makerAddress][makerAssetAddressRight],
- );
- } else if (makerAssetProxyIdRight === AssetProxyId.ERC721) {
- expect(
- realERC721TokenIdsByOwner[signedOrderLeft.makerAddress][makerAssetAddressRight].sort(),
- 'Checking left maker ingress ERC721 account holdings',
- ).to.be.deep.equal(
- expectedERC721TokenIdsByOwner[signedOrderLeft.makerAddress][makerAssetAddressRight].sort(),
- );
- expect(
- realERC721TokenIdsByOwner[signedOrderRight.makerAddress][makerAssetAddressRight],
- 'Checking right maker agress ERC721 account holdings',
- ).to.be.deep.equal(expectedERC721TokenIdsByOwner[signedOrderRight.makerAddress][makerAssetAddressRight]);
- } else {
- throw new Error(`Unhandled Asset Proxy ID: ${makerAssetProxyIdRight}`);
- }
- // Paid fees
- expect(
- realERC20BalancesByOwner[signedOrderLeft.makerAddress][this._feeTokenAddress],
- 'Checking left maker egress ERC20 account fees',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[signedOrderLeft.makerAddress][this._feeTokenAddress]);
- expect(
- realERC20BalancesByOwner[signedOrderRight.makerAddress][this._feeTokenAddress],
- 'Checking right maker egress ERC20 account fees',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[signedOrderRight.makerAddress][this._feeTokenAddress]);
- expect(
- realERC20BalancesByOwner[takerAddress][this._feeTokenAddress],
- 'Checking taker egress ERC20 account fees',
- ).to.be.bignumber.equal(expectedERC20BalancesByOwner[takerAddress][this._feeTokenAddress]);
- // Received fees
- expect(
- realERC20BalancesByOwner[signedOrderLeft.feeRecipientAddress][this._feeTokenAddress],
- 'Checking left fee recipient ingress ERC20 account fees',
- ).to.be.bignumber.equal(
- expectedERC20BalancesByOwner[signedOrderLeft.feeRecipientAddress][this._feeTokenAddress],
- );
- expect(
- realERC20BalancesByOwner[signedOrderRight.feeRecipientAddress][this._feeTokenAddress],
- 'Checking right fee receipient ingress ERC20 account fees',
- ).to.be.bignumber.equal(
- expectedERC20BalancesByOwner[signedOrderRight.feeRecipientAddress][this._feeTokenAddress],
- );
- }
-} // tslint:disable-line:max-file-line-count
diff --git a/contracts/protocol/test/utils/order_factory_from_scenario.ts b/contracts/protocol/test/utils/order_factory_from_scenario.ts
deleted file mode 100644
index ecb4b2e28..000000000
--- a/contracts/protocol/test/utils/order_factory_from_scenario.ts
+++ /dev/null
@@ -1,294 +0,0 @@
-import {
- AssetDataScenario,
- constants,
- ERC721TokenIdsByOwner,
- ExpirationTimeSecondsScenario,
- FeeRecipientAddressScenario,
- OrderAssetAmountScenario,
- OrderScenario,
- TakerScenario,
-} from '@0x/contracts-test-utils';
-import { DummyERC721TokenContract } from '@0x/contracts-tokens';
-import { assetDataUtils, generatePseudoRandomSalt } from '@0x/order-utils';
-import { Order } from '@0x/types';
-import { BigNumber, errorUtils } from '@0x/utils';
-
-const TEN_UNITS_EIGHTEEN_DECIMALS = new BigNumber(10_000_000_000_000_000_000);
-const FIVE_UNITS_EIGHTEEN_DECIMALS = new BigNumber(5_000_000_000_000_000_000);
-const POINT_ONE_UNITS_EIGHTEEN_DECIMALS = new BigNumber(100_000_000_000_000_000);
-const POINT_ZERO_FIVE_UNITS_EIGHTEEN_DECIMALS = new BigNumber(50_000_000_000_000_000);
-const TEN_UNITS_FIVE_DECIMALS = new BigNumber(1_000_000);
-const FIVE_UNITS_FIVE_DECIMALS = new BigNumber(500_000);
-const TEN_UNITS_ZERO_DECIMALS = new BigNumber(10);
-const ONE_THOUSAND_UNITS_ZERO_DECIMALS = new BigNumber(1000);
-const ONE_NFT_UNIT = new BigNumber(1);
-
-export class OrderFactoryFromScenario {
- private readonly _userAddresses: string[];
- private readonly _zrxAddress: string;
- private readonly _nonZrxERC20EighteenDecimalTokenAddresses: string[];
- private readonly _erc20FiveDecimalTokenAddresses: string[];
- private readonly _erc20ZeroDecimalTokenAddresses: string[];
- private readonly _erc721Token: DummyERC721TokenContract;
- private readonly _erc721Balances: ERC721TokenIdsByOwner;
- private readonly _exchangeAddress: string;
- constructor(
- userAddresses: string[],
- zrxAddress: string,
- nonZrxERC20EighteenDecimalTokenAddresses: string[],
- erc20FiveDecimalTokenAddresses: string[],
- erc20ZeroDecimalTokenAddresses: string[],
- erc721Token: DummyERC721TokenContract,
- erc721Balances: ERC721TokenIdsByOwner,
- exchangeAddress: string,
- ) {
- this._userAddresses = userAddresses;
- this._zrxAddress = zrxAddress;
- this._nonZrxERC20EighteenDecimalTokenAddresses = nonZrxERC20EighteenDecimalTokenAddresses;
- this._erc20FiveDecimalTokenAddresses = erc20FiveDecimalTokenAddresses;
- this._erc20ZeroDecimalTokenAddresses = erc20ZeroDecimalTokenAddresses;
- this._erc721Token = erc721Token;
- this._erc721Balances = erc721Balances;
- this._exchangeAddress = exchangeAddress;
- }
- public generateOrder(orderScenario: OrderScenario): Order {
- const makerAddress = this._userAddresses[1];
- let takerAddress = this._userAddresses[2];
- const erc721MakerAssetIds = this._erc721Balances[makerAddress][this._erc721Token.address];
- const erc721TakerAssetIds = this._erc721Balances[takerAddress][this._erc721Token.address];
- let feeRecipientAddress;
- let makerAssetAmount;
- let takerAssetAmount;
- let makerFee;
- let takerFee;
- let expirationTimeSeconds;
- let makerAssetData;
- let takerAssetData;
-
- switch (orderScenario.feeRecipientScenario) {
- case FeeRecipientAddressScenario.BurnAddress:
- feeRecipientAddress = constants.NULL_ADDRESS;
- break;
- case FeeRecipientAddressScenario.EthUserAddress:
- feeRecipientAddress = this._userAddresses[4];
- break;
- default:
- throw errorUtils.spawnSwitchErr('FeeRecipientAddressScenario', orderScenario.feeRecipientScenario);
- }
-
- switch (orderScenario.makerAssetDataScenario) {
- case AssetDataScenario.ZRXFeeToken:
- makerAssetData = assetDataUtils.encodeERC20AssetData(this._zrxAddress);
- break;
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- makerAssetData = assetDataUtils.encodeERC20AssetData(this._nonZrxERC20EighteenDecimalTokenAddresses[0]);
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- makerAssetData = assetDataUtils.encodeERC20AssetData(this._erc20FiveDecimalTokenAddresses[0]);
- break;
- case AssetDataScenario.ERC721:
- makerAssetData = assetDataUtils.encodeERC721AssetData(
- this._erc721Token.address,
- erc721MakerAssetIds[0],
- );
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- makerAssetData = assetDataUtils.encodeERC20AssetData(this._erc20ZeroDecimalTokenAddresses[0]);
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.makerAssetDataScenario);
- }
-
- switch (orderScenario.takerAssetDataScenario) {
- case AssetDataScenario.ZRXFeeToken:
- takerAssetData = assetDataUtils.encodeERC20AssetData(this._zrxAddress);
- break;
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- takerAssetData = assetDataUtils.encodeERC20AssetData(this._nonZrxERC20EighteenDecimalTokenAddresses[1]);
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- takerAssetData = assetDataUtils.encodeERC20AssetData(this._erc20FiveDecimalTokenAddresses[1]);
- break;
- case AssetDataScenario.ERC721:
- takerAssetData = assetDataUtils.encodeERC721AssetData(
- this._erc721Token.address,
- erc721TakerAssetIds[0],
- );
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- takerAssetData = assetDataUtils.encodeERC20AssetData(this._erc20ZeroDecimalTokenAddresses[1]);
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.takerAssetDataScenario);
- }
-
- switch (orderScenario.makerAssetAmountScenario) {
- case OrderAssetAmountScenario.Large:
- switch (orderScenario.makerAssetDataScenario) {
- case AssetDataScenario.ZRXFeeToken:
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- makerAssetAmount = TEN_UNITS_EIGHTEEN_DECIMALS;
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- makerAssetAmount = TEN_UNITS_FIVE_DECIMALS;
- break;
- case AssetDataScenario.ERC721:
- makerAssetAmount = ONE_NFT_UNIT;
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- makerAssetAmount = ONE_THOUSAND_UNITS_ZERO_DECIMALS;
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.makerAssetDataScenario);
- }
- break;
- case OrderAssetAmountScenario.Small:
- switch (orderScenario.makerAssetDataScenario) {
- case AssetDataScenario.ZRXFeeToken:
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- makerAssetAmount = FIVE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- makerAssetAmount = FIVE_UNITS_FIVE_DECIMALS;
- break;
- case AssetDataScenario.ERC721:
- makerAssetAmount = ONE_NFT_UNIT;
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- makerAssetAmount = TEN_UNITS_ZERO_DECIMALS;
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.makerAssetDataScenario);
- }
- break;
- case OrderAssetAmountScenario.Zero:
- makerAssetAmount = new BigNumber(0);
- break;
- default:
- throw errorUtils.spawnSwitchErr('OrderAssetAmountScenario', orderScenario.makerAssetAmountScenario);
- }
-
- switch (orderScenario.takerAssetAmountScenario) {
- case OrderAssetAmountScenario.Large:
- switch (orderScenario.takerAssetDataScenario) {
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- case AssetDataScenario.ZRXFeeToken:
- takerAssetAmount = TEN_UNITS_EIGHTEEN_DECIMALS;
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- takerAssetAmount = TEN_UNITS_FIVE_DECIMALS;
- break;
- case AssetDataScenario.ERC721:
- takerAssetAmount = ONE_NFT_UNIT;
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- takerAssetAmount = ONE_THOUSAND_UNITS_ZERO_DECIMALS;
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.takerAssetDataScenario);
- }
- break;
- case OrderAssetAmountScenario.Small:
- switch (orderScenario.takerAssetDataScenario) {
- case AssetDataScenario.ERC20NonZRXEighteenDecimals:
- case AssetDataScenario.ZRXFeeToken:
- takerAssetAmount = FIVE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case AssetDataScenario.ERC20FiveDecimals:
- takerAssetAmount = FIVE_UNITS_FIVE_DECIMALS;
- break;
- case AssetDataScenario.ERC721:
- takerAssetAmount = ONE_NFT_UNIT;
- break;
- case AssetDataScenario.ERC20ZeroDecimals:
- takerAssetAmount = TEN_UNITS_ZERO_DECIMALS;
- break;
- default:
- throw errorUtils.spawnSwitchErr('AssetDataScenario', orderScenario.takerAssetDataScenario);
- }
- break;
- case OrderAssetAmountScenario.Zero:
- takerAssetAmount = new BigNumber(0);
- break;
- default:
- throw errorUtils.spawnSwitchErr('OrderAssetAmountScenario', orderScenario.takerAssetAmountScenario);
- }
-
- switch (orderScenario.makerFeeScenario) {
- case OrderAssetAmountScenario.Large:
- makerFee = POINT_ONE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case OrderAssetAmountScenario.Small:
- makerFee = POINT_ZERO_FIVE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case OrderAssetAmountScenario.Zero:
- makerFee = new BigNumber(0);
- break;
- default:
- throw errorUtils.spawnSwitchErr('OrderAssetAmountScenario', orderScenario.makerFeeScenario);
- }
-
- switch (orderScenario.takerFeeScenario) {
- case OrderAssetAmountScenario.Large:
- takerFee = POINT_ONE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case OrderAssetAmountScenario.Small:
- takerFee = POINT_ZERO_FIVE_UNITS_EIGHTEEN_DECIMALS;
- break;
- case OrderAssetAmountScenario.Zero:
- takerFee = new BigNumber(0);
- break;
- default:
- throw errorUtils.spawnSwitchErr('OrderAssetAmountScenario', orderScenario.takerFeeScenario);
- }
-
- switch (orderScenario.expirationTimeSecondsScenario) {
- case ExpirationTimeSecondsScenario.InFuture:
- expirationTimeSeconds = new BigNumber(2524604400); // Close to infinite
- break;
- case ExpirationTimeSecondsScenario.InPast:
- expirationTimeSeconds = new BigNumber(0); // Jan 1, 1970
- break;
- default:
- throw errorUtils.spawnSwitchErr(
- 'ExpirationTimeSecondsScenario',
- orderScenario.expirationTimeSecondsScenario,
- );
- }
-
- switch (orderScenario.takerScenario) {
- case TakerScenario.CorrectlySpecified:
- break; // noop since takerAddress is already specified
-
- case TakerScenario.IncorrectlySpecified:
- const notTaker = this._userAddresses[3];
- takerAddress = notTaker;
- break;
-
- case TakerScenario.Unspecified:
- takerAddress = constants.NULL_ADDRESS;
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('TakerScenario', orderScenario.takerScenario);
- }
-
- const order = {
- senderAddress: constants.NULL_ADDRESS,
- makerAddress,
- takerAddress,
- makerFee,
- takerFee,
- makerAssetAmount,
- takerAssetAmount,
- makerAssetData,
- takerAssetData,
- salt: generatePseudoRandomSalt(),
- exchangeAddress: this._exchangeAddress,
- feeRecipientAddress,
- expirationTimeSeconds,
- };
-
- return order;
- }
-}
diff --git a/contracts/protocol/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts b/contracts/protocol/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts
deleted file mode 100644
index 64b7dedbe..000000000
--- a/contracts/protocol/test/utils/simple_asset_balance_and_proxy_allowance_fetcher.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { AbstractBalanceAndProxyAllowanceFetcher } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-
-import { AssetWrapper } from './asset_wrapper';
-
-export class SimpleAssetBalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher {
- private readonly _assetWrapper: AssetWrapper;
- constructor(assetWrapper: AssetWrapper) {
- this._assetWrapper = assetWrapper;
- }
- public async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber> {
- const balance = await this._assetWrapper.getBalanceAsync(userAddress, assetData);
- return balance;
- }
- public async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber> {
- const proxyAllowance = await this._assetWrapper.getProxyAllowanceAsync(userAddress, assetData);
- return proxyAllowance;
- }
-}
diff --git a/contracts/protocol/test/utils/simple_order_filled_cancelled_fetcher.ts b/contracts/protocol/test/utils/simple_order_filled_cancelled_fetcher.ts
deleted file mode 100644
index af959e00e..000000000
--- a/contracts/protocol/test/utils/simple_order_filled_cancelled_fetcher.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { AbstractOrderFilledCancelledFetcher, orderHashUtils } from '@0x/order-utils';
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { ExchangeWrapper } from './exchange_wrapper';
-
-export class SimpleOrderFilledCancelledFetcher implements AbstractOrderFilledCancelledFetcher {
- private readonly _exchangeWrapper: ExchangeWrapper;
- private readonly _zrxAssetData: string;
- constructor(exchange: ExchangeWrapper, zrxAssetData: string) {
- this._exchangeWrapper = exchange;
- this._zrxAssetData = zrxAssetData;
- }
- public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
- const filledTakerAmount = new BigNumber(await this._exchangeWrapper.getTakerAssetFilledAmountAsync(orderHash));
- return filledTakerAmount;
- }
- public async isOrderCancelledAsync(signedOrder: SignedOrder): Promise<boolean> {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const isCancelled = await this._exchangeWrapper.isCancelledAsync(orderHash);
- const orderEpoch = await this._exchangeWrapper.getOrderEpochAsync(
- signedOrder.makerAddress,
- signedOrder.senderAddress,
- );
- const isCancelledByOrderEpoch = orderEpoch > signedOrder.salt;
- return isCancelled || isCancelledByOrderEpoch;
- }
- public getZRXAssetData(): string {
- return this._zrxAssetData;
- }
-}
diff --git a/contracts/protocol/test/utils/types.ts b/contracts/protocol/test/utils/types.ts
deleted file mode 100644
index 5f12635a7..000000000
--- a/contracts/protocol/test/utils/types.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-export interface AbiDecodedFillOrderData {
- order: SignedOrder;
- takerAssetFillAmount: BigNumber;
- signature: string;
-}
diff --git a/contracts/protocol/tsconfig.json b/contracts/protocol/tsconfig.json
deleted file mode 100644
index db872fc32..000000000
--- a/contracts/protocol/tsconfig.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/AssetProxyOwner.json",
- "./generated-artifacts/ERC20Proxy.json",
- "./generated-artifacts/ERC721Proxy.json",
- "./generated-artifacts/Exchange.json",
- "./generated-artifacts/MixinAuthorizable.json",
- "./generated-artifacts/MultiAssetProxy.json",
- "./generated-artifacts/TestAssetProxyDispatcher.json",
- "./generated-artifacts/TestAssetProxyOwner.json",
- "./generated-artifacts/TestExchangeInternals.json",
- "./generated-artifacts/TestSignatureValidator.json",
- "./generated-artifacts/TestStaticCallReceiver.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/protocol/tslint.json b/contracts/protocol/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/protocol/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/test-utils/CHANGELOG.json b/contracts/test-utils/CHANGELOG.json
deleted file mode 100644
index ae1575e43..000000000
--- a/contracts/test-utils/CHANGELOG.json
+++ /dev/null
@@ -1,57 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "2.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule",
- "pr": 1474
- }
- ],
- "timestamp": 1547561734
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- }
-]
diff --git a/contracts/test-utils/CHANGELOG.md b/contracts/test-utils/CHANGELOG.md
deleted file mode 100644
index 2ed0524a6..000000000
--- a/contracts/test-utils/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.0.1 - _January 17, 2019_
-
- * Dependencies updated
-
-## v2.0.0 - _January 15, 2019_
-
- * Renamed OrderStatus enum members to PascalCase to conform with tslint enum-naming rule (#1474)
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/test-utils/README.md b/contracts/test-utils/README.md
deleted file mode 100644
index 73fd93f45..000000000
--- a/contracts/test-utils/README.md
+++ /dev/null
@@ -1,73 +0,0 @@
-## Contracts test utils
-
-This package contains test utilities used by other smart contracts packages.
-
-## Usage
-
-```typescript
-import {
- chaiSetup,
- constants,
- expectContractCallFailedAsync,
- expectContractCreationFailedAsync,
- expectTransactionFailedAsync,
- expectTransactionFailedWithoutReasonAsync,
- increaseTimeAndMineBlockAsync,
- provider,
- sendTransactionResult,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-```
-
-## 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/contracts-test-utils yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-test-utils yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/contracts/test-utils/package.json b/contracts/test-utils/package.json
deleted file mode 100644
index b0f4713af..000000000
--- a/contracts/test-utils/package.json
+++ /dev/null
@@ -1,77 +0,0 @@
-{
- "name": "@0x/contracts-test-utils",
- "version": "2.0.1",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Test utils for 0x contracts",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "test": "yarn run_mocha",
- "test:coverage": "run-s build run_mocha coverage:report:text coverage:report:lcov",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "clean": "shx rm -rf lib",
- "lint": "tslint --format stylish --project tsconfig.lint.json",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test"
- },
- "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/contracts/test-utils/README.md",
- "devDependencies": {
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/dev-utils": "^1.0.24",
- "@0x/order-utils": "^3.1.2",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/sol-coverage": "^1.0.3",
- "@0x/sol-profiler": "^1.0.3",
- "@0x/sol-trace": "^1.0.3",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@0x/types": "^1.5.2",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "@types/bn.js": "^4.11.0",
- "@types/ethereumjs-abi": "^0.6.0",
- "@types/js-combinatorics": "^0.5.29",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "bn.js": "^4.11.8",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereum-types": "^1.1.6",
- "ethereumjs-abi": "0.6.5",
- "ethereumjs-util": "^5.1.1",
- "ethers": "~4.0.4",
- "js-combinatorics": "^0.5.3",
- "lodash": "^4.17.5",
- "make-promises-safe": "^1.1.0"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/test-utils/src/abstract_asset_wrapper.ts b/contracts/test-utils/src/abstract_asset_wrapper.ts
deleted file mode 100644
index 4b56a8502..000000000
--- a/contracts/test-utils/src/abstract_asset_wrapper.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export abstract class AbstractAssetWrapper {
- public abstract getProxyId(): string;
-}
diff --git a/contracts/test-utils/src/address_utils.ts b/contracts/test-utils/src/address_utils.ts
deleted file mode 100644
index 634da0c16..000000000
--- a/contracts/test-utils/src/address_utils.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { generatePseudoRandomSalt } from '@0x/order-utils';
-import { crypto } from '@0x/order-utils/lib/src/crypto';
-
-export const addressUtils = {
- generatePseudoRandomAddress(): string {
- const randomBigNum = generatePseudoRandomSalt();
- const randomBuff = crypto.solSHA3([randomBigNum]);
- const randomAddress = `0x${randomBuff.slice(0, 20).toString('hex')}`;
- return randomAddress;
- },
-};
diff --git a/contracts/test-utils/src/assertions.ts b/contracts/test-utils/src/assertions.ts
deleted file mode 100644
index f31651f4d..000000000
--- a/contracts/test-utils/src/assertions.ts
+++ /dev/null
@@ -1,199 +0,0 @@
-import { RevertReason } from '@0x/types';
-import { logUtils } from '@0x/utils';
-import { NodeType } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { TransactionReceipt, TransactionReceiptStatus, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { web3Wrapper } from './web3_wrapper';
-
-const expect = chai.expect;
-
-let nodeType: NodeType | undefined;
-
-// Represents the return value of a `sendTransaction` call. The Promise should
-// resolve with either a transaction receipt or a transaction hash.
-export type sendTransactionResult = Promise<TransactionReceipt | TransactionReceiptWithDecodedLogs | string>;
-
-/**
- * Returns ganacheError if the backing Ethereum node is Ganache and gethError
- * if it is Geth.
- * @param ganacheError the error to be returned if the backing node is Ganache.
- * @param gethError the error to be returned if the backing node is Geth.
- * @returns either the given ganacheError or gethError depending on the backing
- * node.
- */
-async function _getGanacheOrGethErrorAsync(ganacheError: string, gethError: string): Promise<string> {
- if (_.isUndefined(nodeType)) {
- nodeType = await web3Wrapper.getNodeTypeAsync();
- }
- switch (nodeType) {
- case NodeType.Ganache:
- return ganacheError;
- case NodeType.Geth:
- return gethError;
- default:
- throw new Error(`Unknown node type: ${nodeType}`);
- }
-}
-
-async function _getInsufficientFundsErrorMessageAsync(): Promise<string> {
- return _getGanacheOrGethErrorAsync("sender doesn't have enough funds", 'insufficient funds');
-}
-
-async function _getTransactionFailedErrorMessageAsync(): Promise<string> {
- return _getGanacheOrGethErrorAsync('revert', 'always failing transaction');
-}
-
-async function _getContractCallFailedErrorMessageAsync(): Promise<string> {
- return _getGanacheOrGethErrorAsync('revert', 'Contract call failed');
-}
-
-/**
- * Returns the expected error message for an 'invalid opcode' resulting from a
- * contract call. The exact error message depends on the backing Ethereum node.
- */
-export async function getInvalidOpcodeErrorMessageForCallAsync(): Promise<string> {
- return _getGanacheOrGethErrorAsync('invalid opcode', 'Contract call failed');
-}
-
-/**
- * Returns the expected error message for the given revert reason resulting from
- * a sendTransaction call. The exact error message depends on the backing
- * Ethereum node and whether it supports revert reasons.
- * @param reason a specific revert reason.
- * @returns the expected error message.
- */
-export async function getRevertReasonOrErrorMessageForSendTransactionAsync(reason: RevertReason): Promise<string> {
- return _getGanacheOrGethErrorAsync(reason, 'always failing transaction');
-}
-
-/**
- * Rejects if the given Promise does not reject with an error indicating
- * insufficient funds.
- * @param p a promise resulting from a contract call or sendTransaction call.
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectInsufficientFundsAsync<T>(p: Promise<T>): Promise<void> {
- const errMessage = await _getInsufficientFundsErrorMessageAsync();
- return expect(p).to.be.rejectedWith(errMessage);
-}
-
-/**
- * Resolves if the the sendTransaction call fails with the given revert reason.
- * However, since Geth does not support revert reasons for sendTransaction, this
- * falls back to expectTransactionFailedWithoutReasonAsync if the backing
- * Ethereum node is Geth.
- * @param p a Promise resulting from a sendTransaction call
- * @param reason a specific revert reason
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectTransactionFailedAsync(p: sendTransactionResult, reason: RevertReason): Promise<void> {
- // HACK(albrow): This dummy `catch` should not be necessary, but if you
- // remove it, there is an uncaught exception and the Node process will
- // forcibly exit. It's possible this is a false positive in
- // make-promises-safe.
- p.catch(e => {
- _.noop(e);
- });
-
- if (_.isUndefined(nodeType)) {
- nodeType = await web3Wrapper.getNodeTypeAsync();
- }
- switch (nodeType) {
- case NodeType.Ganache:
- return expect(p).to.be.rejectedWith(reason);
- case NodeType.Geth:
- logUtils.warn(
- 'WARNING: Geth does not support revert reasons for sendTransaction. This test will pass if the transaction fails for any reason.',
- );
- return expectTransactionFailedWithoutReasonAsync(p);
- default:
- throw new Error(`Unknown node type: ${nodeType}`);
- }
-}
-
-/**
- * Resolves if the transaction fails without a revert reason, or if the
- * corresponding transactionReceipt has a status of 0 or '0', indicating
- * failure.
- * @param p a Promise resulting from a sendTransaction call
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectTransactionFailedWithoutReasonAsync(p: sendTransactionResult): Promise<void> {
- return p
- .then(async result => {
- let txReceiptStatus: TransactionReceiptStatus;
- if (_.isString(result)) {
- // Result is a txHash. We need to make a web3 call to get the
- // receipt, then get the status from the receipt.
- const txReceipt = await web3Wrapper.awaitTransactionMinedAsync(result);
- txReceiptStatus = txReceipt.status;
- } else if ('status' in result) {
- // Result is a transaction receipt, so we can get the status
- // directly.
- txReceiptStatus = result.status;
- } else {
- throw new Error(`Unexpected result type: ${typeof result}`);
- }
- expect(_.toString(txReceiptStatus)).to.equal(
- '0',
- 'Expected transaction to fail but receipt had a non-zero status, indicating success',
- );
- })
- .catch(async err => {
- // If the promise rejects, we expect a specific error message,
- // depending on the backing Ethereum node type.
- const errMessage = await _getTransactionFailedErrorMessageAsync();
- expect(err.message).to.include(errMessage);
- });
-}
-
-/**
- * Resolves if the the contract call fails with the given revert reason.
- * @param p a Promise resulting from a contract call
- * @param reason a specific revert reason
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectContractCallFailedAsync<T>(p: Promise<T>, reason: RevertReason): Promise<void> {
- return expect(p).to.be.rejectedWith(reason);
-}
-
-/**
- * Resolves if the contract call fails without a revert reason.
- * @param p a Promise resulting from a contract call
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectContractCallFailedWithoutReasonAsync<T>(p: Promise<T>): Promise<void> {
- const errMessage = await _getContractCallFailedErrorMessageAsync();
- return expect(p).to.be.rejectedWith(errMessage);
-}
-
-/**
- * Resolves if the contract creation/deployment fails without a revert reason.
- * @param p a Promise resulting from a contract creation/deployment
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectContractCreationFailedAsync<T>(
- p: sendTransactionResult,
- reason: RevertReason,
-): Promise<void> {
- return expectTransactionFailedAsync(p, reason);
-}
-
-/**
- * Resolves if the contract creation/deployment fails without a revert reason.
- * @param p a Promise resulting from a contract creation/deployment
- * @returns a new Promise which will reject if the conditions are not met and
- * otherwise resolve with no value.
- */
-export async function expectContractCreationFailedWithoutReasonAsync<T>(p: Promise<T>): Promise<void> {
- const errMessage = await _getTransactionFailedErrorMessageAsync();
- return expect(p).to.be.rejectedWith(errMessage);
-}
diff --git a/contracts/test-utils/src/block_timestamp.ts b/contracts/test-utils/src/block_timestamp.ts
deleted file mode 100644
index 66c13eed1..000000000
--- a/contracts/test-utils/src/block_timestamp.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-import { web3Wrapper } from './web3_wrapper';
-
-let firstAccount: string | undefined;
-
-/**
- * Increases time by the given number of seconds and then mines a block so that
- * the current block timestamp has the offset applied.
- * @param seconds the number of seconds by which to incrase the time offset.
- * @returns a new Promise which will resolve with the new total time offset or
- * reject if the time could not be increased.
- */
-export async function increaseTimeAndMineBlockAsync(seconds: number): Promise<number> {
- if (_.isUndefined(firstAccount)) {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- firstAccount = accounts[0];
- }
-
- const offset = await web3Wrapper.increaseTimeAsync(seconds);
- // Note: we need to send a transaction after increasing time so
- // that a block is actually mined. The contract looks at the
- // last mined block for the timestamp.
- await web3Wrapper.awaitTransactionSuccessAsync(
- await web3Wrapper.sendTransactionAsync({ from: firstAccount, to: firstAccount, value: 0 }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- return offset;
-}
-
-/**
- * Returns the timestamp of the latest block in seconds since the Unix epoch.
- * @returns a new Promise which will resolve with the timestamp in seconds.
- */
-export async function getLatestBlockTimestampAsync(): Promise<number> {
- const currentBlockIfExists = await web3Wrapper.getBlockIfExistsAsync('latest');
- if (_.isUndefined(currentBlockIfExists)) {
- throw new Error(`Unable to fetch latest block.`);
- }
- return currentBlockIfExists.timestamp;
-}
diff --git a/contracts/test-utils/src/chai_setup.ts b/contracts/test-utils/src/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/contracts/test-utils/src/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/contracts/test-utils/src/combinatorial_utils.ts b/contracts/test-utils/src/combinatorial_utils.ts
deleted file mode 100644
index bb1b55b4d..000000000
--- a/contracts/test-utils/src/combinatorial_utils.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as combinatorics from 'js-combinatorics';
-
-import { testWithReferenceFuncAsync } from './test_with_reference';
-
-// A set of values corresponding to the uint256 type in Solidity. This set
-// contains some notable edge cases, including some values which will overflow
-// the uint256 type when used in different mathematical operations.
-export const uint256Values = [
- new BigNumber(0),
- new BigNumber(1),
- new BigNumber(2),
- // Non-trivial big number.
- new BigNumber(2).pow(64),
- // Max that does not overflow when squared.
- new BigNumber(2).pow(128).minus(1),
- // Min that does overflow when squared.
- new BigNumber(2).pow(128),
- // Max that does not overflow when doubled.
- new BigNumber(2).pow(255).minus(1),
- // Min that does overflow when doubled.
- new BigNumber(2).pow(255),
- // Max that does not overflow.
- new BigNumber(2).pow(256).minus(1),
-];
-
-// A set of values corresponding to the bytes32 type in Solidity.
-export const bytes32Values = [
- // Min
- '0x0000000000000000000000000000000000000000000000000000000000000000',
- '0x0000000000000000000000000000000000000000000000000000000000000001',
- '0x0000000000000000000000000000000000000000000000000000000000000002',
- // Non-trivial big number.
- '0x000000000000f000000000000000000000000000000000000000000000000000',
- // Max
- '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff',
-];
-
-export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, R>(
- name: string,
- referenceFunc: (p0: P0, p1: P1) => Promise<R>,
- testFunc: (p0: P0, p1: P1) => Promise<R>,
- allValues: [P0[], P1[]],
-): Promise<void>;
-export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, R>(
- name: string,
- referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
- allValues: [P0[], P1[], P2[]],
-): Promise<void>;
-export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, P3, R>(
- name: string,
- referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
- allValues: [P0[], P1[], P2[], P3[]],
-): Promise<void>;
-export async function testCombinatoriallyWithReferenceFuncAsync<P0, P1, P2, P3, P4, R>(
- name: string,
- referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
- allValues: [P0[], P1[], P2[], P3[], P4[]],
-): Promise<void>;
-
-/**
- * Uses combinatorics to test the behavior of a test function by comparing it to
- * the expected behavior (defined by a reference function) for a large number of
- * possible input values.
- *
- * First generates test cases by taking the cartesian product of the given
- * values. Each test case is a set of N values corresponding to the N arguments
- * for the test func and the reference func. For each test case, first the
- * reference function will be called to obtain an "expected result", or if the
- * reference function throws/rejects, an "expected error". Next, the test
- * function will be called to obtain an "actual result", or if the test function
- * throws/rejects, an "actual error". Each test case passes if at least one of
- * the following conditions is met:
- *
- * 1) Neither the reference function or the test function throw and the
- * "expected result" equals the "actual result".
- *
- * 2) Both the reference function and the test function throw and the "actual
- * error" message *contains* the "expected error" message.
- *
- * The first test case which does not meet one of these conditions will cause
- * the entire test to fail and this function will throw/reject.
- *
- * @param referenceFuncAsync a reference function implemented in pure
- * JavaScript/TypeScript which accepts N arguments and returns the "expected
- * result" or "expected error" for a given test case.
- * @param testFuncAsync a test function which, e.g., makes a call or sends a
- * transaction to a contract. It accepts the same N arguments returns the
- * "actual result" or "actual error" for a given test case.
- * @param values an array of N arrays. Each inner array is a set of possible
- * values which are passed into both the reference function and the test
- * function.
- * @return A Promise that resolves if the test passes and rejects if the test
- * fails, according to the rules described above.
- */
-export async function testCombinatoriallyWithReferenceFuncAsync(
- name: string,
- referenceFuncAsync: (...args: any[]) => Promise<any>,
- testFuncAsync: (...args: any[]) => Promise<any>,
- allValues: any[],
-): Promise<void> {
- const testCases = combinatorics.cartesianProduct(...allValues);
- let counter = 0;
- testCases.forEach(async testCase => {
- counter += 1;
- it(`${name} ${counter}/${testCases.length}`, async () => {
- await testWithReferenceFuncAsync(referenceFuncAsync, testFuncAsync, testCase as any);
- });
- });
-}
diff --git a/contracts/test-utils/src/constants.ts b/contracts/test-utils/src/constants.ts
deleted file mode 100644
index f631dc81a..000000000
--- a/contracts/test-utils/src/constants.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-const TESTRPC_PRIVATE_KEYS_STRINGS = [
- '0xf2f48ee19680706196e2e339e5da3491186e0c4c5030670656b0e0164837257d',
- '0x5d862464fe9303452126c8bc94274b8c5f9874cbd219789b3eb2128075a76f72',
- '0xdf02719c4df8b9b8ac7f551fcb5d9ef48fa27eef7a66453879f4d8fdc6e78fb1',
- '0xff12e391b79415e941a94de3bf3a9aee577aed0731e297d5cfa0b8a1e02fa1d0',
- '0x752dd9cf65e68cfaba7d60225cbdbc1f4729dd5e5507def72815ed0d8abc6249',
- '0xefb595a0178eb79a8df953f87c5148402a224cdf725e88c0146727c6aceadccd',
- '0x83c6d2cc5ddcf9711a6d59b417dc20eb48afd58d45290099e5987e3d768f328f',
- '0xbb2d3f7c9583780a7d3904a2f55d792707c345f21de1bacb2d389934d82796b2',
- '0xb2fd4d29c1390b71b8795ae81196bfd60293adf99f9d32a0aff06288fcdac55f',
- '0x23cb7121166b9a2f93ae0b7c05bde02eae50d64449b2cbb42bc84e9d38d6cc89',
-];
-
-export const constants = {
- BASE_16: 16,
- INVALID_OPCODE: 'invalid opcode',
- TESTRPC_NETWORK_ID: 50,
- // Note(albrow): In practice V8 and most other engines limit the minimum
- // interval for setInterval to 10ms. We still set it to 0 here in order to
- // ensure we always use the minimum interval.
- AWAIT_TRANSACTION_MINED_MS: 0,
- MAX_ETHERTOKEN_WITHDRAW_GAS: 43000,
- MAX_EXECUTE_TRANSACTION_GAS: 1000000,
- MAX_TOKEN_TRANSFERFROM_GAS: 80000,
- MAX_TOKEN_APPROVE_GAS: 60000,
- MAX_TRANSFER_FROM_GAS: 150000,
- MAX_MATCH_ORDERS_GAS: 400000,
- DUMMY_TOKEN_NAME: '',
- DUMMY_TOKEN_SYMBOL: '',
- DUMMY_TOKEN_DECIMALS: new BigNumber(18),
- DUMMY_TOKEN_TOTAL_SUPPLY: new BigNumber(0),
- NULL_BYTES: '0x',
- NUM_DUMMY_ERC20_TO_DEPLOY: 3,
- NUM_DUMMY_ERC721_TO_DEPLOY: 2,
- NUM_ERC721_TOKENS_TO_MINT: 2,
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- UNLIMITED_ALLOWANCE_IN_BASE_UNITS: new BigNumber(2).pow(256).minus(1),
- TESTRPC_PRIVATE_KEYS: _.map(TESTRPC_PRIVATE_KEYS_STRINGS, privateKeyString => ethUtil.toBuffer(privateKeyString)),
- INITIAL_ERC20_BALANCE: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 18),
- INITIAL_ERC20_ALLOWANCE: Web3Wrapper.toBaseUnitAmount(new BigNumber(10000), 18),
- STATIC_ORDER_PARAMS: {
- makerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(100), 18),
- takerAssetAmount: Web3Wrapper.toBaseUnitAmount(new BigNumber(200), 18),
- makerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- takerFee: Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18),
- },
- WORD_LENGTH: 32,
- ZERO_AMOUNT: new BigNumber(0),
- PERCENTAGE_DENOMINATOR: new BigNumber(10).pow(18),
- FUNCTIONS_WITH_MUTEX: [
- 'FILL_ORDER',
- 'FILL_OR_KILL_ORDER',
- 'BATCH_FILL_ORDERS',
- 'BATCH_FILL_OR_KILL_ORDERS',
- 'MARKET_BUY_ORDERS',
- 'MARKET_SELL_ORDERS',
- 'MATCH_ORDERS',
- 'CANCEL_ORDER',
- 'BATCH_CANCEL_ORDERS',
- 'CANCEL_ORDERS_UP_TO',
- 'SET_SIGNATURE_VALIDATOR_APPROVAL',
- ],
-};
diff --git a/contracts/test-utils/src/coverage.ts b/contracts/test-utils/src/coverage.ts
deleted file mode 100644
index f82288eec..000000000
--- a/contracts/test-utils/src/coverage.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-coverage';
-import * as _ from 'lodash';
-
-let coverageSubprovider: CoverageSubprovider;
-
-export const coverage = {
- getCoverageSubproviderSingleton(): CoverageSubprovider {
- if (_.isUndefined(coverageSubprovider)) {
- coverageSubprovider = coverage._getCoverageSubprovider();
- }
- return coverageSubprovider;
- },
- _getCoverageSubprovider(): CoverageSubprovider {
- const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter();
- const isVerbose = true;
- const subprovider = new CoverageSubprovider(solCompilerArtifactAdapter, defaultFromAddress, isVerbose);
- return subprovider;
- },
-};
diff --git a/contracts/test-utils/src/formatters.ts b/contracts/test-utils/src/formatters.ts
deleted file mode 100644
index 813eb45db..000000000
--- a/contracts/test-utils/src/formatters.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-import { orderUtils } from './order_utils';
-import { BatchCancelOrders, BatchFillOrders, MarketBuyOrders, MarketSellOrders } from './types';
-
-export const formatters = {
- createBatchFill(signedOrders: SignedOrder[], takerAssetFillAmounts: BigNumber[] = []): BatchFillOrders {
- const batchFill: BatchFillOrders = {
- orders: [],
- signatures: [],
- takerAssetFillAmounts,
- };
- _.forEach(signedOrders, signedOrder => {
- const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- batchFill.orders.push(orderWithoutExchangeAddress);
- batchFill.signatures.push(signedOrder.signature);
- if (takerAssetFillAmounts.length < signedOrders.length) {
- batchFill.takerAssetFillAmounts.push(signedOrder.takerAssetAmount);
- }
- });
- return batchFill;
- },
- createMarketSellOrders(signedOrders: SignedOrder[], takerAssetFillAmount: BigNumber): MarketSellOrders {
- const marketSellOrders: MarketSellOrders = {
- orders: [],
- signatures: [],
- takerAssetFillAmount,
- };
- _.forEach(signedOrders, (signedOrder, i) => {
- const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- if (i !== 0) {
- orderWithoutExchangeAddress.takerAssetData = constants.NULL_BYTES;
- }
- marketSellOrders.orders.push(orderWithoutExchangeAddress);
- marketSellOrders.signatures.push(signedOrder.signature);
- });
- return marketSellOrders;
- },
- createMarketBuyOrders(signedOrders: SignedOrder[], makerAssetFillAmount: BigNumber): MarketBuyOrders {
- const marketBuyOrders: MarketBuyOrders = {
- orders: [],
- signatures: [],
- makerAssetFillAmount,
- };
- _.forEach(signedOrders, (signedOrder, i) => {
- const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- if (i !== 0) {
- orderWithoutExchangeAddress.makerAssetData = constants.NULL_BYTES;
- }
- marketBuyOrders.orders.push(orderWithoutExchangeAddress);
- marketBuyOrders.signatures.push(signedOrder.signature);
- });
- return marketBuyOrders;
- },
- createBatchCancel(signedOrders: SignedOrder[]): BatchCancelOrders {
- const batchCancel: BatchCancelOrders = {
- orders: [],
- };
- _.forEach(signedOrders, signedOrder => {
- const orderWithoutExchangeAddress = orderUtils.getOrderWithoutExchangeAddress(signedOrder);
- batchCancel.orders.push(orderWithoutExchangeAddress);
- });
- return batchCancel;
- },
-};
diff --git a/contracts/test-utils/src/global_hooks.ts b/contracts/test-utils/src/global_hooks.ts
deleted file mode 100644
index 307dd0777..000000000
--- a/contracts/test-utils/src/global_hooks.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage } from './coverage';
-import { profiler } from './profiler';
-
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
-});
diff --git a/contracts/test-utils/src/index.ts b/contracts/test-utils/src/index.ts
deleted file mode 100644
index 7880de0bf..000000000
--- a/contracts/test-utils/src/index.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-export { AbstractAssetWrapper } from './abstract_asset_wrapper';
-export { chaiSetup } from './chai_setup';
-export { constants } from './constants';
-export {
- expectContractCallFailedAsync,
- expectContractCallFailedWithoutReasonAsync,
- expectContractCreationFailedAsync,
- expectContractCreationFailedWithoutReasonAsync,
- expectInsufficientFundsAsync,
- expectTransactionFailedAsync,
- sendTransactionResult,
- expectTransactionFailedWithoutReasonAsync,
- getInvalidOpcodeErrorMessageForCallAsync,
- getRevertReasonOrErrorMessageForSendTransactionAsync,
-} from './assertions';
-export { getLatestBlockTimestampAsync, increaseTimeAndMineBlockAsync } from './block_timestamp';
-export { provider, txDefaults, web3Wrapper } from './web3_wrapper';
-export { LogDecoder } from './log_decoder';
-export { formatters } from './formatters';
-export { signingUtils } from './signing_utils';
-export { orderUtils } from './order_utils';
-export { typeEncodingUtils } from './type_encoding_utils';
-export { profiler } from './profiler';
-export { coverage } from './coverage';
-export { addressUtils } from './address_utils';
-export { OrderFactory } from './order_factory';
-export { bytes32Values, testCombinatoriallyWithReferenceFuncAsync, uint256Values } from './combinatorial_utils';
-export { TransactionFactory } from './transaction_factory';
-export { testWithReferenceFuncAsync } from './test_with_reference';
-export {
- MarketBuyOrders,
- MarketSellOrders,
- ERC721TokenIdsByOwner,
- SignedTransaction,
- OrderStatus,
- AllowanceAmountScenario,
- AssetDataScenario,
- BalanceAmountScenario,
- ContractName,
- ExpirationTimeSecondsScenario,
- TransferAmountsLoggedByMatchOrders,
- TransferAmountsByMatchOrders,
- OrderScenario,
- TraderStateScenario,
- TransactionDataParams,
- Token,
- FillScenario,
- FeeRecipientAddressScenario,
- OrderAssetAmountScenario,
- TakerAssetFillAmountScenario,
- TakerScenario,
- OrderInfo,
- ERC20BalancesByOwner,
- FillResults,
-} from './types';
diff --git a/contracts/test-utils/src/log_decoder.ts b/contracts/test-utils/src/log_decoder.ts
deleted file mode 100644
index 54666ea5f..000000000
--- a/contracts/test-utils/src/log_decoder.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { AbiDecoder, BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import {
- AbiDefinition,
- ContractArtifact,
- DecodedLogArgs,
- LogEntry,
- LogWithDecodedArgs,
- RawLog,
- TransactionReceiptWithDecodedLogs,
-} from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-
-export class LogDecoder {
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _abiDecoder: AbiDecoder;
- public static wrapLogBigNumbers(log: any): any {
- const argNames = _.keys(log.args);
- for (const argName of argNames) {
- const isWeb3BigNumber = _.startsWith(log.args[argName].constructor.toString(), 'function BigNumber(');
- if (isWeb3BigNumber) {
- log.args[argName] = new BigNumber(log.args[argName]);
- }
- }
- }
- constructor(web3Wrapper: Web3Wrapper, artifacts: { [contractName: string]: ContractArtifact }) {
- this._web3Wrapper = web3Wrapper;
- const abiArrays: AbiDefinition[][] = [];
- _.forEach(artifacts, (artifact: ContractArtifact) => {
- const compilerOutput = artifact.compilerOutput;
- abiArrays.push(compilerOutput.abi);
- });
- this._abiDecoder = new AbiDecoder(abiArrays);
- }
- public decodeLogOrThrow<ArgsType extends DecodedLogArgs>(log: LogEntry): LogWithDecodedArgs<ArgsType> | RawLog {
- const logWithDecodedArgsOrLog = this._abiDecoder.tryToDecodeLogOrNoop(log);
- // tslint:disable-next-line:no-unnecessary-type-assertion
- if (_.isUndefined((logWithDecodedArgsOrLog as LogWithDecodedArgs<ArgsType>).args)) {
- throw new Error(`Unable to decode log: ${JSON.stringify(log)}`);
- }
- LogDecoder.wrapLogBigNumbers(logWithDecodedArgsOrLog);
- return logWithDecodedArgsOrLog;
- }
- public async getTxWithDecodedLogsAsync(txHash: string): Promise<TransactionReceiptWithDecodedLogs> {
- const tx = await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
- tx.logs = _.map(tx.logs, log => this.decodeLogOrThrow(log));
- return tx;
- }
-}
diff --git a/contracts/test-utils/src/order_factory.ts b/contracts/test-utils/src/order_factory.ts
deleted file mode 100644
index b0f435ff2..000000000
--- a/contracts/test-utils/src/order_factory.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils';
-import { Order, SignatureType, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { getLatestBlockTimestampAsync } from './block_timestamp';
-import { constants } from './constants';
-import { signingUtils } from './signing_utils';
-
-export class OrderFactory {
- private readonly _defaultOrderParams: Partial<Order>;
- private readonly _privateKey: Buffer;
- constructor(privateKey: Buffer, defaultOrderParams: Partial<Order>) {
- this._defaultOrderParams = defaultOrderParams;
- this._privateKey = privateKey;
- }
- public async newSignedOrderAsync(
- customOrderParams: Partial<Order> = {},
- signatureType: SignatureType = SignatureType.EthSign,
- ): Promise<SignedOrder> {
- const tenMinutesInSeconds = 10 * 60;
- const currentBlockTimestamp = await getLatestBlockTimestampAsync();
- const order = ({
- senderAddress: constants.NULL_ADDRESS,
- expirationTimeSeconds: new BigNumber(currentBlockTimestamp).plus(tenMinutesInSeconds),
- salt: generatePseudoRandomSalt(),
- takerAddress: constants.NULL_ADDRESS,
- ...this._defaultOrderParams,
- ...customOrderParams,
- } as any) as Order;
- const orderHashBuff = orderHashUtils.getOrderHashBuffer(order);
- const signature = signingUtils.signMessage(orderHashBuff, this._privateKey, signatureType);
- const signedOrder = {
- ...order,
- signature: `0x${signature.toString('hex')}`,
- };
- return signedOrder;
- }
-}
diff --git a/contracts/test-utils/src/order_utils.ts b/contracts/test-utils/src/order_utils.ts
deleted file mode 100644
index fd336bb47..000000000
--- a/contracts/test-utils/src/order_utils.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { OrderWithoutExchangeAddress, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { constants } from './constants';
-import { CancelOrder, MatchOrder } from './types';
-
-export const orderUtils = {
- getPartialAmountFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): BigNumber {
- const partialAmount = numerator
- .multipliedBy(target)
- .div(denominator)
- .integerValue(BigNumber.ROUND_FLOOR);
- return partialAmount;
- },
- createFill: (signedOrder: SignedOrder, takerAssetFillAmount?: BigNumber) => {
- const fill = {
- order: orderUtils.getOrderWithoutExchangeAddress(signedOrder),
- takerAssetFillAmount: takerAssetFillAmount || signedOrder.takerAssetAmount,
- signature: signedOrder.signature,
- };
- return fill;
- },
- createCancel(signedOrder: SignedOrder, takerAssetCancelAmount?: BigNumber): CancelOrder {
- const cancel = {
- order: orderUtils.getOrderWithoutExchangeAddress(signedOrder),
- takerAssetCancelAmount: takerAssetCancelAmount || signedOrder.takerAssetAmount,
- };
- return cancel;
- },
- getOrderWithoutExchangeAddress(signedOrder: SignedOrder): OrderWithoutExchangeAddress {
- const orderStruct = {
- senderAddress: signedOrder.senderAddress,
- makerAddress: signedOrder.makerAddress,
- takerAddress: signedOrder.takerAddress,
- feeRecipientAddress: signedOrder.feeRecipientAddress,
- makerAssetAmount: signedOrder.makerAssetAmount,
- takerAssetAmount: signedOrder.takerAssetAmount,
- makerFee: signedOrder.makerFee,
- takerFee: signedOrder.takerFee,
- expirationTimeSeconds: signedOrder.expirationTimeSeconds,
- salt: signedOrder.salt,
- makerAssetData: signedOrder.makerAssetData,
- takerAssetData: signedOrder.takerAssetData,
- };
- return orderStruct;
- },
- createMatchOrders(signedOrderLeft: SignedOrder, signedOrderRight: SignedOrder): MatchOrder {
- const fill = {
- left: orderUtils.getOrderWithoutExchangeAddress(signedOrderLeft),
- right: orderUtils.getOrderWithoutExchangeAddress(signedOrderRight),
- leftSignature: signedOrderLeft.signature,
- rightSignature: signedOrderRight.signature,
- };
- fill.right.makerAssetData = constants.NULL_BYTES;
- fill.right.takerAssetData = constants.NULL_BYTES;
- return fill;
- },
-};
diff --git a/contracts/test-utils/src/profiler.ts b/contracts/test-utils/src/profiler.ts
deleted file mode 100644
index 7f51c384f..000000000
--- a/contracts/test-utils/src/profiler.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-profiler';
-import * as _ from 'lodash';
-
-let profilerSubprovider: ProfilerSubprovider;
-
-export const profiler = {
- start(): void {
- profiler.getProfilerSubproviderSingleton().start();
- },
- stop(): void {
- profiler.getProfilerSubproviderSingleton().stop();
- },
- getProfilerSubproviderSingleton(): ProfilerSubprovider {
- if (_.isUndefined(profilerSubprovider)) {
- profilerSubprovider = profiler._getProfilerSubprovider();
- }
- return profilerSubprovider;
- },
- _getProfilerSubprovider(): ProfilerSubprovider {
- const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter();
- const isVerbose = true;
- const subprovider = new ProfilerSubprovider(solCompilerArtifactAdapter, defaultFromAddress, isVerbose);
- return subprovider;
- },
-};
diff --git a/contracts/test-utils/src/revert_trace.ts b/contracts/test-utils/src/revert_trace.ts
deleted file mode 100644
index 3a5778859..000000000
--- a/contracts/test-utils/src/revert_trace.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-import { RevertTraceSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-trace';
-import * as _ from 'lodash';
-
-let revertTraceSubprovider: RevertTraceSubprovider;
-
-export const revertTrace = {
- getRevertTraceSubproviderSingleton(): RevertTraceSubprovider {
- if (_.isUndefined(revertTraceSubprovider)) {
- revertTraceSubprovider = revertTrace._getRevertTraceSubprovider();
- }
- return revertTraceSubprovider;
- },
- _getRevertTraceSubprovider(): RevertTraceSubprovider {
- const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const solCompilerArtifactAdapter = new SolCompilerArtifactAdapter();
- const isVerbose = true;
- const subprovider = new RevertTraceSubprovider(solCompilerArtifactAdapter, defaultFromAddress, isVerbose);
- return subprovider;
- },
-};
diff --git a/contracts/test-utils/src/signing_utils.ts b/contracts/test-utils/src/signing_utils.ts
deleted file mode 100644
index 21f864bfa..000000000
--- a/contracts/test-utils/src/signing_utils.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { SignatureType } from '@0x/types';
-import * as ethUtil from 'ethereumjs-util';
-
-export const signingUtils = {
- signMessage(message: Buffer, privateKey: Buffer, signatureType: SignatureType): Buffer {
- if (signatureType === SignatureType.EthSign) {
- const prefixedMessage = ethUtil.hashPersonalMessage(message);
- const ecSignature = ethUtil.ecsign(prefixedMessage, privateKey);
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(signatureType),
- ]);
- return signature;
- } else if (signatureType === SignatureType.EIP712) {
- const ecSignature = ethUtil.ecsign(message, privateKey);
- const signature = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ecSignature.r,
- ecSignature.s,
- ethUtil.toBuffer(signatureType),
- ]);
- return signature;
- } else {
- throw new Error(`${signatureType} is not a valid signature type`);
- }
- },
-};
diff --git a/contracts/test-utils/src/test_with_reference.ts b/contracts/test-utils/src/test_with_reference.ts
deleted file mode 100644
index 75d15b0aa..000000000
--- a/contracts/test-utils/src/test_with_reference.ts
+++ /dev/null
@@ -1,139 +0,0 @@
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { chaiSetup } from './chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-class Value<T> {
- public value: T;
- constructor(value: T) {
- this.value = value;
- }
-}
-
-// tslint:disable-next-line: max-classes-per-file
-class ErrorMessage {
- public error: string;
- constructor(message: string) {
- this.error = message;
- }
-}
-
-type PromiseResult<T> = Value<T> | ErrorMessage;
-
-// TODO(albrow): This seems like a generic utility function that could exist in
-// lodash. We should replace it by a library implementation, or move it to our
-// own.
-async function evaluatePromiseAsync<T>(promise: Promise<T>): Promise<PromiseResult<T>> {
- try {
- return new Value<T>(await promise);
- } catch (e) {
- return new ErrorMessage(e.message);
- }
-}
-
-export async function testWithReferenceFuncAsync<P0, R>(
- referenceFunc: (p0: P0) => Promise<R>,
- testFunc: (p0: P0) => Promise<R>,
- values: [P0],
-): Promise<void>;
-export async function testWithReferenceFuncAsync<P0, P1, R>(
- referenceFunc: (p0: P0, p1: P1) => Promise<R>,
- testFunc: (p0: P0, p1: P1) => Promise<R>,
- values: [P0, P1],
-): Promise<void>;
-export async function testWithReferenceFuncAsync<P0, P1, P2, R>(
- referenceFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2) => Promise<R>,
- values: [P0, P1, P2],
-): Promise<void>;
-export async function testWithReferenceFuncAsync<P0, P1, P2, P3, R>(
- referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2, p3: P3) => Promise<R>,
- values: [P0, P1, P2, P3],
-): Promise<void>;
-export async function testWithReferenceFuncAsync<P0, P1, P2, P3, P4, R>(
- referenceFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
- testFunc: (p0: P0, p1: P1, p2: P2, p3: P3, p4: P4) => Promise<R>,
- values: [P0, P1, P2, P3, P4],
-): Promise<void>;
-
-/**
- * Tests the behavior of a test function by comparing it to the expected
- * behavior (defined by a reference function).
- *
- * First the reference function will be called to obtain an "expected result",
- * or if the reference function throws/rejects, an "expected error". Next, the
- * test function will be called to obtain an "actual result", or if the test
- * function throws/rejects, an "actual error". The test passes if at least one
- * of the following conditions is met:
- *
- * 1) Neither the reference function or the test function throw and the
- * "expected result" equals the "actual result".
- *
- * 2) Both the reference function and the test function throw and the "actual
- * error" message *contains* the "expected error" message.
- *
- * @param referenceFuncAsync a reference function implemented in pure
- * JavaScript/TypeScript which accepts N arguments and returns the "expected
- * result" or throws/rejects with the "expected error".
- * @param testFuncAsync a test function which, e.g., makes a call or sends a
- * transaction to a contract. It accepts the same N arguments returns the
- * "actual result" or throws/rejects with the "actual error".
- * @param values an array of N values, where each value corresponds in-order to
- * an argument to both the test function and the reference function.
- * @return A Promise that resolves if the test passes and rejects if the test
- * fails, according to the rules described above.
- */
-export async function testWithReferenceFuncAsync(
- referenceFuncAsync: (...args: any[]) => Promise<any>,
- testFuncAsync: (...args: any[]) => Promise<any>,
- values: any[],
-): Promise<void> {
- // Measure correct behaviour
- const expected = await evaluatePromiseAsync(referenceFuncAsync(...values));
-
- // Measure actual behaviour
- const actual = await evaluatePromiseAsync(testFuncAsync(...values));
-
- // Compare behaviour
- if (expected instanceof ErrorMessage) {
- // If we expected an error, check if the actual error message contains the
- // expected error message.
- if (!(actual instanceof ErrorMessage)) {
- throw new Error(
- `Expected error containing ${expected.error} but got no error\n\tTest case: ${_getTestCaseString(
- referenceFuncAsync,
- values,
- )}`,
- );
- }
- expect(actual.error).to.contain(
- expected.error,
- `${actual.error}\n\tTest case: ${_getTestCaseString(referenceFuncAsync, values)}`,
- );
- } else {
- // If we do not expect an error, compare actual and expected directly.
- expect(actual).to.deep.equal(expected, `Test case ${_getTestCaseString(referenceFuncAsync, values)}`);
- }
-}
-
-function _getTestCaseString(referenceFuncAsync: (...args: any[]) => Promise<any>, values: any[]): string {
- const paramNames = _getParameterNames(referenceFuncAsync);
- return JSON.stringify(_.zipObject(paramNames, values));
-}
-
-// Source: https://stackoverflow.com/questions/1007981/how-to-get-function-parameter-names-values-dynamically
-function _getParameterNames(func: (...args: any[]) => any): string[] {
- return _.toString(func)
- .replace(/[/][/].*$/gm, '') // strip single-line comments
- .replace(/\s+/g, '') // strip white space
- .replace(/[/][*][^/*]*[*][/]/g, '') // strip multi-line comments
- .split('){', 1)[0]
- .replace(/^[^(]*[(]/, '') // extract the parameters
- .replace(/=[^,]+/g, '') // strip any ES6 defaults
- .split(',')
- .filter(Boolean); // split & filter [""]
-}
diff --git a/contracts/test-utils/src/transaction_factory.ts b/contracts/test-utils/src/transaction_factory.ts
deleted file mode 100644
index dbab3ade4..000000000
--- a/contracts/test-utils/src/transaction_factory.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { eip712Utils, generatePseudoRandomSalt } from '@0x/order-utils';
-import { SignatureType } from '@0x/types';
-import { signTypedDataUtils } from '@0x/utils';
-import * as ethUtil from 'ethereumjs-util';
-
-import { signingUtils } from './signing_utils';
-import { SignedTransaction } from './types';
-
-export class TransactionFactory {
- private readonly _signerBuff: Buffer;
- private readonly _exchangeAddress: string;
- private readonly _privateKey: Buffer;
- constructor(privateKey: Buffer, exchangeAddress: string) {
- this._privateKey = privateKey;
- this._exchangeAddress = exchangeAddress;
- this._signerBuff = ethUtil.privateToAddress(this._privateKey);
- }
- public newSignedTransaction(data: string, signatureType: SignatureType = SignatureType.EthSign): SignedTransaction {
- const salt = generatePseudoRandomSalt();
- const signerAddress = `0x${this._signerBuff.toString('hex')}`;
- const executeTransactionData = {
- salt,
- signerAddress,
- data,
- };
-
- const typedData = eip712Utils.createZeroExTransactionTypedData(executeTransactionData, this._exchangeAddress);
- const eip712MessageBuffer = signTypedDataUtils.generateTypedDataHash(typedData);
- const signature = signingUtils.signMessage(eip712MessageBuffer, this._privateKey, signatureType);
- const signedTx = {
- exchangeAddress: this._exchangeAddress,
- signature: `0x${signature.toString('hex')}`,
- ...executeTransactionData,
- };
- return signedTx;
- }
-}
diff --git a/contracts/test-utils/src/type_encoding_utils.ts b/contracts/test-utils/src/type_encoding_utils.ts
deleted file mode 100644
index bfd9c9ef5..000000000
--- a/contracts/test-utils/src/type_encoding_utils.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import BN = require('bn.js');
-import ethUtil = require('ethereumjs-util');
-
-import { constants } from './constants';
-
-export const typeEncodingUtils = {
- encodeUint256(value: BigNumber): Buffer {
- const base = 10;
- const formattedValue = new BN(value.toString(base));
- const encodedValue = ethUtil.toBuffer(formattedValue);
- // tslint:disable-next-line:custom-no-magic-numbers
- const paddedValue = ethUtil.setLengthLeft(encodedValue, constants.WORD_LENGTH);
- return paddedValue;
- },
- decodeUint256(encodedValue: Buffer): BigNumber {
- const formattedValue = ethUtil.bufferToHex(encodedValue);
- const value = new BigNumber(formattedValue, constants.BASE_16);
- return value;
- },
-};
diff --git a/contracts/test-utils/src/types.ts b/contracts/test-utils/src/types.ts
deleted file mode 100644
index 60cb2b102..000000000
--- a/contracts/test-utils/src/types.ts
+++ /dev/null
@@ -1,243 +0,0 @@
-import { OrderWithoutExchangeAddress } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { AbiDefinition } from 'ethereum-types';
-
-export interface ERC20BalancesByOwner {
- [ownerAddress: string]: {
- [tokenAddress: string]: BigNumber;
- };
-}
-
-export interface ERC721TokenIdsByOwner {
- [ownerAddress: string]: {
- [tokenAddress: string]: BigNumber[];
- };
-}
-
-export interface SubmissionContractEventArgs {
- transactionId: BigNumber;
-}
-
-export interface BatchFillOrders {
- orders: OrderWithoutExchangeAddress[];
- signatures: string[];
- takerAssetFillAmounts: BigNumber[];
-}
-
-export interface MarketSellOrders {
- orders: OrderWithoutExchangeAddress[];
- signatures: string[];
- takerAssetFillAmount: BigNumber;
-}
-
-export interface MarketBuyOrders {
- orders: OrderWithoutExchangeAddress[];
- signatures: string[];
- makerAssetFillAmount: BigNumber;
-}
-
-export interface BatchCancelOrders {
- orders: OrderWithoutExchangeAddress[];
-}
-
-export interface CancelOrdersBefore {
- salt: BigNumber;
-}
-
-export interface TransactionDataParams {
- name: string;
- abi: AbiDefinition[];
- args: any[];
-}
-
-export interface MultiSigConfig {
- owners: string[];
- confirmationsRequired: number;
- secondsRequired: number;
-}
-
-export interface MultiSigConfigByNetwork {
- [networkName: string]: MultiSigConfig;
-}
-
-export interface Token {
- address?: string;
- name: string;
- symbol: string;
- decimals: number;
- ipfsHash: string;
- swarmHash: string;
-}
-
-export enum OrderStatus {
- Invalid,
- InvalidMakerAssetAmount,
- InvalidTakerAssetAmount,
- Fillable,
- Expired,
- FullyFilled,
- Cancelled,
-}
-
-export enum ContractName {
- TokenRegistry = 'TokenRegistry',
- MultiSigWalletWithTimeLock = 'MultiSigWalletWithTimeLock',
- Exchange = 'Exchange',
- ZRXToken = 'ZRXToken',
- DummyERC20Token = 'DummyERC20Token',
- EtherToken = 'WETH9',
- DutchAuction = 'DutchAuction',
- AssetProxyOwner = 'AssetProxyOwner',
- AccountLevels = 'AccountLevels',
- EtherDelta = 'EtherDelta',
- Arbitrage = 'Arbitrage',
- TestAssetDataDecoders = 'TestAssetDataDecoders',
- TestAssetProxyDispatcher = 'TestAssetProxyDispatcher',
- TestLibs = 'TestLibs',
- TestSignatureValidator = 'TestSignatureValidator',
- ERC20Proxy = 'ERC20Proxy',
- ERC721Proxy = 'ERC721Proxy',
- DummyERC721Receiver = 'DummyERC721Receiver',
- DummyERC721Token = 'DummyERC721Token',
- TestLibBytes = 'TestLibBytes',
- TestWallet = 'TestWallet',
- Authorizable = 'Authorizable',
- Whitelist = 'Whitelist',
- Forwarder = 'Forwarder',
- BalanceThresholdFilter = 'BalanceThresholdFilter',
-}
-
-export interface SignedTransaction {
- exchangeAddress: string;
- salt: BigNumber;
- signerAddress: string;
- data: string;
- signature: string;
-}
-
-export interface TransferAmountsByMatchOrders {
- // Left Maker
- amountBoughtByLeftMaker: BigNumber;
- amountSoldByLeftMaker: BigNumber;
- feePaidByLeftMaker: BigNumber;
- // Right Maker
- amountBoughtByRightMaker: BigNumber;
- amountSoldByRightMaker: BigNumber;
- feePaidByRightMaker: BigNumber;
- // Taker
- amountReceivedByTaker: BigNumber;
- feePaidByTakerLeft: BigNumber;
- feePaidByTakerRight: BigNumber;
-}
-
-export interface TransferAmountsLoggedByMatchOrders {
- makerAddress: string;
- takerAddress: string;
- makerAssetFilledAmount: string;
- takerAssetFilledAmount: string;
- makerFeePaid: string;
- takerFeePaid: string;
-}
-
-export interface OrderInfo {
- orderStatus: number;
- orderHash: string;
- orderTakerAssetFilledAmount: BigNumber;
-}
-
-export interface CancelOrder {
- order: OrderWithoutExchangeAddress;
- takerAssetCancelAmount: BigNumber;
-}
-
-export interface MatchOrder {
- left: OrderWithoutExchangeAddress;
- right: OrderWithoutExchangeAddress;
- leftSignature: string;
- rightSignature: string;
-}
-
-// Combinatorial testing types
-
-export enum FeeRecipientAddressScenario {
- BurnAddress = 'BURN_ADDRESS',
- EthUserAddress = 'ETH_USER_ADDRESS',
-}
-
-export enum OrderAssetAmountScenario {
- Zero = 'ZERO',
- Large = 'LARGE',
- Small = 'SMALL',
-}
-
-export enum TakerScenario {
- CorrectlySpecified = 'CORRECTLY_SPECIFIED',
- IncorrectlySpecified = 'INCORRECTLY_SPECIFIED',
- Unspecified = 'UNSPECIFIED',
-}
-
-export enum ExpirationTimeSecondsScenario {
- InPast = 'IN_PAST',
- InFuture = 'IN_FUTURE',
-}
-
-export enum AssetDataScenario {
- ERC20ZeroDecimals = 'ERC20_ZERO_DECIMALS',
- ZRXFeeToken = 'ZRX_FEE_TOKEN',
- ERC20FiveDecimals = 'ERC20_FIVE_DECIMALS',
- ERC20NonZRXEighteenDecimals = 'ERC20_NON_ZRX_EIGHTEEN_DECIMALS',
- ERC721 = 'ERC721',
-}
-
-export enum TakerAssetFillAmountScenario {
- Zero = 'ZERO',
- GreaterThanRemainingFillableTakerAssetAmount = 'GREATER_THAN_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
- LessThanRemainingFillableTakerAssetAmount = 'LESS_THAN_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
- ExactlyRemainingFillableTakerAssetAmount = 'EXACTLY_REMAINING_FILLABLE_TAKER_ASSET_AMOUNT',
-}
-
-export interface OrderScenario {
- takerScenario: TakerScenario;
- feeRecipientScenario: FeeRecipientAddressScenario;
- makerAssetAmountScenario: OrderAssetAmountScenario;
- takerAssetAmountScenario: OrderAssetAmountScenario;
- makerFeeScenario: OrderAssetAmountScenario;
- takerFeeScenario: OrderAssetAmountScenario;
- expirationTimeSecondsScenario: ExpirationTimeSecondsScenario;
- makerAssetDataScenario: AssetDataScenario;
- takerAssetDataScenario: AssetDataScenario;
-}
-
-export enum BalanceAmountScenario {
- Exact = 'EXACT',
- TooLow = 'TOO_LOW',
- Higher = 'HIGHER',
-}
-
-export enum AllowanceAmountScenario {
- Exact = 'EXACT',
- TooLow = 'TOO_LOW',
- Higher = 'HIGHER',
- Unlimited = 'UNLIMITED',
-}
-
-export interface TraderStateScenario {
- traderAssetBalance: BalanceAmountScenario;
- traderAssetAllowance: AllowanceAmountScenario;
- zrxFeeBalance: BalanceAmountScenario;
- zrxFeeAllowance: AllowanceAmountScenario;
-}
-
-export interface FillScenario {
- orderScenario: OrderScenario;
- takerAssetFillAmountScenario: TakerAssetFillAmountScenario;
- makerStateScenario: TraderStateScenario;
- takerStateScenario: TraderStateScenario;
-}
-
-export interface FillResults {
- makerAssetFilledAmount: BigNumber;
- takerAssetFilledAmount: BigNumber;
- makerFeePaid: BigNumber;
- takerFeePaid: BigNumber;
-}
diff --git a/contracts/test-utils/src/web3_wrapper.ts b/contracts/test-utils/src/web3_wrapper.ts
deleted file mode 100644
index cb33476f3..000000000
--- a/contracts/test-utils/src/web3_wrapper.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { devConstants, env, EnvVars, web3Factory } from '@0x/dev-utils';
-import { prependSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import { logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-import { coverage } from './coverage';
-import { profiler } from './profiler';
-import { revertTrace } from './revert_trace';
-
-enum ProviderType {
- Ganache = 'ganache',
- Geth = 'geth',
-}
-
-let testProvider: ProviderType;
-switch (process.env.TEST_PROVIDER) {
- case undefined:
- testProvider = ProviderType.Ganache;
- break;
- case 'ganache':
- testProvider = ProviderType.Ganache;
- break;
- case 'geth':
- testProvider = ProviderType.Geth;
- break;
- default:
- throw new Error(`Unknown TEST_PROVIDER: ${process.env.TEST_PROVIDER}`);
-}
-
-const ganacheTxDefaults = {
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- gas: devConstants.GAS_LIMIT,
-};
-const gethTxDefaults = {
- from: devConstants.TESTRPC_FIRST_ADDRESS,
-};
-export const txDefaults = testProvider === ProviderType.Ganache ? ganacheTxDefaults : gethTxDefaults;
-
-const gethConfigs = {
- shouldUseInProcessGanache: false,
- rpcUrl: 'http://localhost:8501',
- shouldUseFakeGasEstimate: false,
-};
-const ganacheConfigs = {
- shouldUseInProcessGanache: true,
-};
-const providerConfigs = testProvider === ProviderType.Ganache ? ganacheConfigs : gethConfigs;
-
-export const provider: Web3ProviderEngine = web3Factory.getRpcProvider(providerConfigs);
-provider.stop();
-const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
-const isProfilerEnabled = env.parseBoolean(EnvVars.SolidityProfiler);
-const isRevertTraceEnabled = env.parseBoolean(EnvVars.SolidityRevertTrace);
-const enabledSubproviderCount = _.filter(
- [isCoverageEnabled, isProfilerEnabled, isRevertTraceEnabled],
- _.identity.bind(_),
-).length;
-if (enabledSubproviderCount > 1) {
- throw new Error(`Only one of coverage, profiler, or revert trace subproviders can be enabled at a time`);
-}
-if (isCoverageEnabled) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- prependSubprovider(provider, coverageSubprovider);
-}
-if (isProfilerEnabled) {
- if (testProvider === ProviderType.Ganache) {
- logUtils.warn(
- "Gas costs in Ganache traces are incorrect and we don't recommend using it for profiling. Please switch to Geth",
- );
- process.exit(1);
- }
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- logUtils.log(
- "By default profilerSubprovider is stopped so that you don't get noise from setup code. Don't forget to start it before the code you want to profile and stop it afterwards",
- );
- profilerSubprovider.stop();
- prependSubprovider(provider, profilerSubprovider);
-}
-if (isRevertTraceEnabled) {
- const revertTraceSubprovider = revertTrace.getRevertTraceSubproviderSingleton();
- prependSubprovider(provider, revertTraceSubprovider);
-}
-
-export const web3Wrapper = new Web3Wrapper(provider);
diff --git a/contracts/test-utils/test/test_with_reference.ts b/contracts/test-utils/test/test_with_reference.ts
deleted file mode 100644
index 1c1211003..000000000
--- a/contracts/test-utils/test/test_with_reference.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import * as chai from 'chai';
-
-import { chaiSetup } from '../src/chai_setup';
-import { testWithReferenceFuncAsync } from '../src/test_with_reference';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-async function divAsync(x: number, y: number): Promise<number> {
- if (y === 0) {
- throw new Error('MathError: divide by zero');
- }
- return x / y;
-}
-
-// returns an async function that always returns the given value.
-function alwaysValueFunc(value: number): (x: number, y: number) => Promise<number> {
- return async (x: number, y: number) => value;
-}
-
-// returns an async function which always throws/rejects with the given error
-// message.
-function alwaysFailFunc(errMessage: string): (x: number, y: number) => Promise<number> {
- return async (x: number, y: number) => {
- throw new Error(errMessage);
- };
-}
-
-describe('testWithReferenceFuncAsync', () => {
- it('passes when both succeed and actual === expected', async () => {
- await testWithReferenceFuncAsync(alwaysValueFunc(0.5), divAsync, [1, 2]);
- });
-
- it('passes when both fail and actual error contains expected error', async () => {
- await testWithReferenceFuncAsync(alwaysFailFunc('divide by zero'), divAsync, [1, 0]);
- });
-
- it('fails when both succeed and actual !== expected', async () => {
- expect(testWithReferenceFuncAsync(alwaysValueFunc(3), divAsync, [1, 2])).to.be.rejectedWith(
- 'Test case {"x":1,"y":2}: expected { value: 0.5 } to deeply equal { value: 3 }',
- );
- });
-
- it('fails when both fail and actual error does not contain expected error', async () => {
- expect(
- testWithReferenceFuncAsync(alwaysFailFunc('Unexpected math error'), divAsync, [1, 0]),
- ).to.be.rejectedWith(
- 'MathError: divide by zero\n\tTest case: {"x":1,"y":0}: expected \'MathError: divide by zero\' to include \'Unexpected math error\'',
- );
- });
-
- it('fails when referenceFunc succeeds and testFunc fails', async () => {
- expect(testWithReferenceFuncAsync(alwaysValueFunc(0), divAsync, [1, 0])).to.be.rejectedWith(
- 'Test case {"x":1,"y":0}: expected { error: \'MathError: divide by zero\' } to deeply equal { value: 0 }',
- );
- });
-
- it('fails when referenceFunc fails and testFunc succeeds', async () => {
- expect(testWithReferenceFuncAsync(alwaysFailFunc('divide by zero'), divAsync, [1, 2])).to.be.rejectedWith(
- 'Expected error containing divide by zero but got no error\n\tTest case: {"x":1,"y":2}',
- );
- });
-});
diff --git a/contracts/test-utils/tsconfig.json b/contracts/test-utils/tsconfig.json
deleted file mode 100644
index e35816553..000000000
--- a/contracts/test-utils/tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/contracts/test-utils/tsconfig.lint.json b/contracts/test-utils/tsconfig.lint.json
deleted file mode 100644
index b557e706a..000000000
--- a/contracts/test-utils/tsconfig.lint.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- // This file is a workaround that issue: https://github.com/palantir/tslint/issues/4148#issuecomment-419872702
- "extends": "./tsconfig",
- "compilerOptions": {
- "composite": false
- }
-}
diff --git a/contracts/test-utils/tslint.json b/contracts/test-utils/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/test-utils/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/tokens/.solhintignore b/contracts/tokens/.solhintignore
deleted file mode 100644
index 1e33ec53b..000000000
--- a/contracts/tokens/.solhintignore
+++ /dev/null
@@ -1,3 +0,0 @@
-contracts/tokens/ZRXToken/ERC20Token_v1.sol
-contracts/tokens/ZRXToken/Token_v1.sol
-contracts/tokens/ZRXToken/UnlimitedAllowanceToken_v1.sol
diff --git a/contracts/tokens/CHANGELOG.json b/contracts/tokens/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/tokens/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/tokens/CHANGELOG.md b/contracts/tokens/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/tokens/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/tokens/DEPLOYS.json b/contracts/tokens/DEPLOYS.json
deleted file mode 100644
index 5ff58c035..000000000
--- a/contracts/tokens/DEPLOYS.json
+++ /dev/null
@@ -1,16 +0,0 @@
-[
- {
- "name": "ZRXToken",
- "version": "1.0.0",
- "changes": [
- {
- "note": "protocol v1 deploy",
- "networks": {
- "1": "0xe41d2489571d322189246dafa5ebde1f4699f498",
- "3": "0xff67881f8d12f372d91baae9752eb3631ff0ed00",
- "42": "0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa"
- }
- }
- ]
- }
-]
diff --git a/contracts/tokens/README.md b/contracts/tokens/README.md
deleted file mode 100644
index 2d1db92f0..000000000
--- a/contracts/tokens/README.md
+++ /dev/null
@@ -1,74 +0,0 @@
-## Token contracts
-
-Token smart contracts that are used in the 0x protocol. Addresses of the deployed contracts can be found in the 0x [wiki](https://0xproject.com/wiki#Deployed-Addresses) or the [CHANGELOG](./CHANGELOG.json) of this package.
-
-## Usage
-
-Token contracts that make up and interact with version 2.0.0 of the protocol can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [tokens](./contracts/tokens)
- - This directory contains implementations of different tokens and token standards, including [wETH](https://weth.io/), ZRX, [ERC20](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md), and [ERC721](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-721.md).
-- [test](./contracts/test)
- - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
-
-## Bug bounty
-
-A bug bounty for the 2.0.0 contracts is ongoing! Instructions can be found [here](https://0xproject.com/wiki#Bug-Bounty).
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-tokens yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-tokens yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/tokens/compiler.json b/contracts/tokens/compiler.json
deleted file mode 100644
index 498c5d826..000000000
--- a/contracts/tokens/compiler.json
+++ /dev/null
@@ -1,44 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": [
- "DummyERC20Token",
- "DummyMultipleReturnERC20Token",
- "DummyNoReturnERC20Token",
- "DummyERC721Receiver",
- "InvalidERC721Receiver",
- "DummyERC721Token",
- "ReentrantERC20Token",
- "ERC20Token",
- "IERC20Token",
- "MintableERC20Token",
- "UnlimitedAllowanceERC20Token",
- "ERC721Token",
- "IERC721Receiver",
- "IERC721Token",
- "MintableERC721Token",
- "IEtherToken",
- "WETH9",
- "ERC20Token_v1",
- "Token_v1",
- "UnlimitedAllowanceToken_v1",
- "ZRXToken"
- ]
-}
diff --git a/contracts/tokens/contracts/test/DummyERC20Token/DummyERC20Token.sol b/contracts/tokens/contracts/test/DummyERC20Token/DummyERC20Token.sol
deleted file mode 100644
index 33028db0c..000000000
--- a/contracts/tokens/contracts/test/DummyERC20Token/DummyERC20Token.sol
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-import "../../tokens/ERC20Token/MintableERC20Token.sol";
-
-
-contract DummyERC20Token is
- Ownable,
- MintableERC20Token
-{
- string public name;
- string public symbol;
- uint256 public decimals;
- uint256 public constant MAX_MINT_AMOUNT = 10000000000000000000000;
-
- constructor (
- string _name,
- string _symbol,
- uint256 _decimals,
- uint256 _totalSupply
- )
- public
- {
- name = _name;
- symbol = _symbol;
- decimals = _decimals;
- _totalSupply = _totalSupply;
- balances[msg.sender] = _totalSupply;
- }
-
- /// @dev Sets the balance of target address
- /// @param _target Address or which balance will be updated
- /// @param _value New balance of target address
- function setBalance(address _target, uint256 _value)
- external
- onlyOwner
- {
- uint256 currBalance = balances[_target];
- if (_value < currBalance) {
- _totalSupply = safeSub(_totalSupply, safeSub(currBalance, _value));
- } else {
- _totalSupply = safeAdd(_totalSupply, safeSub(_value, currBalance));
- }
- balances[_target] = _value;
- }
-
- /// @dev Mints new tokens for sender
- /// @param _value Amount of tokens to mint
- function mint(uint256 _value)
- external
- {
- require(
- _value <= MAX_MINT_AMOUNT,
- "VALUE_TOO_LARGE"
- );
-
- _mint(msg.sender, _value);
- }
-}
diff --git a/contracts/tokens/contracts/test/DummyERC20Token/DummyMultipleReturnERC20Token.sol b/contracts/tokens/contracts/test/DummyERC20Token/DummyMultipleReturnERC20Token.sol
deleted file mode 100644
index 733d4437e..000000000
--- a/contracts/tokens/contracts/test/DummyERC20Token/DummyMultipleReturnERC20Token.sol
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "./DummyERC20Token.sol";
-
-
-// solhint-disable no-empty-blocks
-contract DummyMultipleReturnERC20Token is
- DummyERC20Token
-{
- constructor (
- string _name,
- string _symbol,
- uint256 _decimals,
- uint256 _totalSupply
- )
- public
- DummyERC20Token(
- _name,
- _symbol,
- _decimals,
- _totalSupply
- )
- {}
-
- /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool)
- {
- emit Transfer(
- _from,
- _to,
- _value
- );
-
- // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return 64 bytes (equiavalent to true, true)
- assembly {
- mstore(0, 1)
- mstore(32, 1)
- return(0, 64)
- }
- }
-}
-
diff --git a/contracts/tokens/contracts/test/DummyERC20Token/DummyNoReturnERC20Token.sol b/contracts/tokens/contracts/test/DummyERC20Token/DummyNoReturnERC20Token.sol
deleted file mode 100644
index e16825a16..000000000
--- a/contracts/tokens/contracts/test/DummyERC20Token/DummyNoReturnERC20Token.sol
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "./DummyERC20Token.sol";
-
-
-// solhint-disable no-empty-blocks
-contract DummyNoReturnERC20Token is
- DummyERC20Token
-{
- constructor (
- string _name,
- string _symbol,
- uint256 _decimals,
- uint256 _totalSupply
- )
- public
- DummyERC20Token(
- _name,
- _symbol,
- _decimals,
- _totalSupply
- )
- {}
-
- /// @dev send `value` token to `to` from `msg.sender`
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- function transfer(address _to, uint256 _value)
- external
- returns (bool)
- {
- require(
- balances[msg.sender] >= _value,
- "ERC20_INSUFFICIENT_BALANCE"
- );
- require(
- balances[_to] + _value >= balances[_to],
- "UINT256_OVERFLOW"
- );
-
- balances[msg.sender] -= _value;
- balances[_to] += _value;
-
- emit Transfer(
- msg.sender,
- _to,
- _value
- );
-
- // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return no data
- assembly {
- return(0, 0)
- }
- }
-
- /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool)
- {
- require(
- balances[_from] >= _value,
- "ERC20_INSUFFICIENT_BALANCE"
- );
- require(
- allowed[_from][msg.sender] >= _value,
- "ERC20_INSUFFICIENT_ALLOWANCE"
- );
- require(
- balances[_to] + _value >= balances[_to],
- "UINT256_OVERFLOW"
- );
-
- balances[_to] += _value;
- balances[_from] -= _value;
- allowed[_from][msg.sender] -= _value;
-
- emit Transfer(
- _from,
- _to,
- _value
- );
-
- // HACK: This contract will not compile if we remove `returns (bool)`, so we manually return no data
- assembly {
- return(0, 0)
- }
- }
-}
-
diff --git a/contracts/tokens/contracts/test/DummyERC721Receiver/DummyERC721Receiver.sol b/contracts/tokens/contracts/test/DummyERC721Receiver/DummyERC721Receiver.sol
deleted file mode 100644
index 6c8371559..000000000
--- a/contracts/tokens/contracts/test/DummyERC721Receiver/DummyERC721Receiver.sol
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../tokens/ERC721Token/IERC721Receiver.sol";
-
-
-contract DummyERC721Receiver is
- IERC721Receiver
-{
- // Function selector for ERC721Receiver.onERC721Received
- // 0x150b7a02
- bytes4 constant internal ERC721_RECEIVED = bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
-
- event TokenReceived(
- address operator,
- address from,
- uint256 tokenId,
- bytes data
- );
-
- /// @notice Handle the receipt of an NFT
- /// @dev The ERC721 smart contract calls this function on the recipient
- /// after a `transfer`. This function MAY throw to revert and reject the
- /// transfer. Return of other than the magic value MUST result in the
- /// transaction being reverted.
- /// Note: the contract address is always the message sender.
- /// @param _operator The address which called `safeTransferFrom` function
- /// @param _from The address which previously owned the token
- /// @param _tokenId The NFT identifier which is being transferred
- /// @param _data Additional data with no specified format
- /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
- /// unless throwing
- function onERC721Received(
- address _operator,
- address _from,
- uint256 _tokenId,
- bytes _data
- )
- external
- returns (bytes4)
- {
- emit TokenReceived(
- _operator,
- _from,
- _tokenId,
- _data
- );
- return ERC721_RECEIVED;
- }
-}
diff --git a/contracts/tokens/contracts/test/DummyERC721Receiver/InvalidERC721Receiver.sol b/contracts/tokens/contracts/test/DummyERC721Receiver/InvalidERC721Receiver.sol
deleted file mode 100644
index 309633bf5..000000000
--- a/contracts/tokens/contracts/test/DummyERC721Receiver/InvalidERC721Receiver.sol
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../tokens/ERC721Token/IERC721Receiver.sol";
-
-
-contract InvalidERC721Receiver is
- IERC721Receiver
-{
- // Actual function signature is `onERC721Received(address,address,uint256,bytes)`
- bytes4 constant internal INVALID_ERC721_RECEIVED = bytes4(keccak256("onERC721Received(address,uint256,bytes)"));
-
- event TokenReceived(
- address operator,
- address from,
- uint256 tokenId,
- bytes data
- );
-
- /// @notice Handle the receipt of an NFT
- /// @dev The ERC721 smart contract calls this function on the recipient
- /// after a `transfer`. This function MAY throw to revert and reject the
- /// transfer. Return of other than the magic value MUST result in the
- /// transaction being reverted.
- /// Note: the contract address is always the message sender.
- /// @param _operator The address which called `safeTransferFrom` function
- /// @param _from The address which previously owned the token
- /// @param _tokenId The NFT identifier which is being transferred
- /// @param _data Additional data with no specified format
- /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
- /// unless throwing
- function onERC721Received(
- address _operator,
- address _from,
- uint256 _tokenId,
- bytes _data
- )
- external
- returns (bytes4)
- {
- emit TokenReceived(
- _operator,
- _from,
- _tokenId,
- _data
- );
- return INVALID_ERC721_RECEIVED;
- }
-}
diff --git a/contracts/tokens/contracts/test/DummyERC721Token/DummyERC721Token.sol b/contracts/tokens/contracts/test/DummyERC721Token/DummyERC721Token.sol
deleted file mode 100644
index 4c978b2df..000000000
--- a/contracts/tokens/contracts/test/DummyERC721Token/DummyERC721Token.sol
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "../../tokens/ERC721Token/MintableERC721Token.sol";
-import "@0x/contracts-utils/contracts/utils/Ownable/Ownable.sol";
-
-
-// solhint-disable no-empty-blocks
-contract DummyERC721Token is
- Ownable,
- MintableERC721Token
-{
- string public name;
- string public symbol;
-
- constructor (
- string _name,
- string _symbol
- )
- public
- {
- name = _name;
- symbol = _symbol;
- }
-
- /// @dev Function to mint a new token
- /// Reverts if the given token ID already exists
- /// @param _to Address of the beneficiary that will own the minted token
- /// @param _tokenId ID of the token to be minted by the msg.sender
- function mint(address _to, uint256 _tokenId)
- external
- {
- _mint(_to, _tokenId);
- }
-
- /// @dev Function to burn a token
- /// Reverts if the given token ID doesn't exist or not called by contract owner
- /// @param _owner Owner of token with given token ID
- /// @param _tokenId ID of the token to be burned by the msg.sender
- function burn(address _owner, uint256 _tokenId)
- external
- onlyOwner
- {
- _burn(_owner, _tokenId);
- }
-}
diff --git a/contracts/tokens/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol b/contracts/tokens/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol
deleted file mode 100644
index d8c65929d..000000000
--- a/contracts/tokens/contracts/test/ReentrantERC20Token/ReentrantERC20Token.sol
+++ /dev/null
@@ -1,188 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-pragma experimental ABIEncoderV2;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-import "../../tokens/ERC20Token/ERC20Token.sol";
-import "@0x/contracts-interfaces/contracts/protocol/Exchange/IExchange.sol";
-import "@0x/contracts-libs/contracts/libs/LibOrder.sol";
-
-
-// solhint-disable no-unused-vars
-contract ReentrantERC20Token is
- ERC20Token
-{
- using LibBytes for bytes;
-
- // solhint-disable-next-line var-name-mixedcase
- IExchange internal EXCHANGE;
-
- bytes internal constant REENTRANCY_ILLEGAL_REVERT_REASON = abi.encodeWithSelector(
- bytes4(keccak256("Error(string)")),
- "REENTRANCY_ILLEGAL"
- );
-
- // All of these functions are potentially vulnerable to reentrancy
- // We do not test any "noThrow" functions because `fillOrderNoThrow` makes a delegatecall to `fillOrder`
- enum ExchangeFunction {
- FILL_ORDER,
- FILL_OR_KILL_ORDER,
- BATCH_FILL_ORDERS,
- BATCH_FILL_OR_KILL_ORDERS,
- MARKET_BUY_ORDERS,
- MARKET_SELL_ORDERS,
- MATCH_ORDERS,
- CANCEL_ORDER,
- BATCH_CANCEL_ORDERS,
- CANCEL_ORDERS_UP_TO,
- SET_SIGNATURE_VALIDATOR_APPROVAL
- }
-
- uint8 internal currentFunctionId = 0;
-
- constructor (address _exchange)
- public
- {
- EXCHANGE = IExchange(_exchange);
- }
-
- /// @dev Set the current function that will be called when `transferFrom` is called.
- /// @param _currentFunctionId Id that corresponds to function name.
- function setCurrentFunction(uint8 _currentFunctionId)
- external
- {
- currentFunctionId = _currentFunctionId;
- }
-
- /// @dev A version of `transferFrom` that attempts to reenter the Exchange contract.
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool)
- {
- // This order would normally be invalid, but it will be used strictly for testing reentrnacy.
- // Any reentrancy checks will happen before any other checks that invalidate the order.
- LibOrder.Order memory order;
-
- // Initialize remaining null parameters
- bytes memory signature;
- LibOrder.Order[] memory orders;
- uint256[] memory takerAssetFillAmounts;
- bytes[] memory signatures;
- bytes memory callData;
-
- // Create callData for function that corresponds to currentFunctionId
- if (currentFunctionId == uint8(ExchangeFunction.FILL_ORDER)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.fillOrder.selector,
- order,
- 0,
- signature
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.FILL_OR_KILL_ORDER)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.fillOrKillOrder.selector,
- order,
- 0,
- signature
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.batchFillOrders.selector,
- orders,
- takerAssetFillAmounts,
- signatures
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_FILL_OR_KILL_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.batchFillOrKillOrders.selector,
- orders,
- takerAssetFillAmounts,
- signatures
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.MARKET_BUY_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.marketBuyOrders.selector,
- orders,
- 0,
- signatures
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.MARKET_SELL_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.marketSellOrders.selector,
- orders,
- 0,
- signatures
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.MATCH_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.matchOrders.selector,
- order,
- order,
- signature,
- signature
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDER)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.cancelOrder.selector,
- order
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.BATCH_CANCEL_ORDERS)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.batchCancelOrders.selector,
- orders
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.CANCEL_ORDERS_UP_TO)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.cancelOrdersUpTo.selector,
- 0
- );
- } else if (currentFunctionId == uint8(ExchangeFunction.SET_SIGNATURE_VALIDATOR_APPROVAL)) {
- callData = abi.encodeWithSelector(
- EXCHANGE.setSignatureValidatorApproval.selector,
- address(0),
- false
- );
- }
-
- // Call Exchange function, swallow error
- address(EXCHANGE).call(callData);
-
- // Revert reason is 100 bytes
- bytes memory returnData = new bytes(100);
-
- // Copy return data
- assembly {
- returndatacopy(add(returnData, 32), 0, 100)
- }
-
- // Revert if function reverted with REENTRANCY_ILLEGAL error
- require(!REENTRANCY_ILLEGAL_REVERT_REASON.equals(returnData));
-
- // Transfer will return true if function failed for any other reason
- return true;
- }
-} \ No newline at end of file
diff --git a/contracts/tokens/contracts/tokens/ERC20Token/ERC20Token.sol b/contracts/tokens/contracts/tokens/ERC20Token/ERC20Token.sol
deleted file mode 100644
index 190eead76..000000000
--- a/contracts/tokens/contracts/tokens/ERC20Token/ERC20Token.sol
+++ /dev/null
@@ -1,148 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./IERC20Token.sol";
-
-
-contract ERC20Token is
- IERC20Token
-{
- mapping (address => uint256) internal balances;
- mapping (address => mapping (address => uint256)) internal allowed;
-
- uint256 internal _totalSupply;
-
- /// @dev send `value` token to `to` from `msg.sender`
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return True if transfer was successful
- function transfer(address _to, uint256 _value)
- external
- returns (bool)
- {
- require(
- balances[msg.sender] >= _value,
- "ERC20_INSUFFICIENT_BALANCE"
- );
- require(
- balances[_to] + _value >= balances[_to],
- "UINT256_OVERFLOW"
- );
-
- balances[msg.sender] -= _value;
- balances[_to] += _value;
-
- emit Transfer(
- msg.sender,
- _to,
- _value
- );
-
- return true;
- }
-
- /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return True if transfer was successful
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool)
- {
- require(
- balances[_from] >= _value,
- "ERC20_INSUFFICIENT_BALANCE"
- );
- require(
- allowed[_from][msg.sender] >= _value,
- "ERC20_INSUFFICIENT_ALLOWANCE"
- );
- require(
- balances[_to] + _value >= balances[_to],
- "UINT256_OVERFLOW"
- );
-
- balances[_to] += _value;
- balances[_from] -= _value;
- allowed[_from][msg.sender] -= _value;
-
- emit Transfer(
- _from,
- _to,
- _value
- );
-
- return true;
- }
-
- /// @dev `msg.sender` approves `_spender` to spend `_value` tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @param _value The amount of wei to be approved for transfer
- /// @return Always true if the call has enough gas to complete execution
- function approve(address _spender, uint256 _value)
- external
- returns (bool)
- {
- allowed[msg.sender][_spender] = _value;
- emit Approval(
- msg.sender,
- _spender,
- _value
- );
- return true;
- }
-
- /// @dev Query total supply of token
- /// @return Total supply of token
- function totalSupply()
- external
- view
- returns (uint256)
- {
- return _totalSupply;
- }
-
- /// @dev Query the balance of owner
- /// @param _owner The address from which the balance will be retrieved
- /// @return Balance of owner
- function balanceOf(address _owner)
- external
- view
- returns (uint256)
- {
- return balances[_owner];
- }
-
- /// @param _owner The address of the account owning tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @return Amount of remaining tokens allowed to spent
- function allowance(address _owner, address _spender)
- external
- view
- returns (uint256)
- {
- return allowed[_owner][_spender];
- }
-}
diff --git a/contracts/tokens/contracts/tokens/ERC20Token/IERC20Token.sol b/contracts/tokens/contracts/tokens/ERC20Token/IERC20Token.sol
deleted file mode 100644
index 9f9b89585..000000000
--- a/contracts/tokens/contracts/tokens/ERC20Token/IERC20Token.sol
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IERC20Token {
-
- // solhint-disable no-simple-event-func-name
- event Transfer(
- address indexed _from,
- address indexed _to,
- uint256 _value
- );
-
- event Approval(
- address indexed _owner,
- address indexed _spender,
- uint256 _value
- );
-
- /// @dev send `value` token to `to` from `msg.sender`
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return True if transfer was successful
- function transfer(address _to, uint256 _value)
- external
- returns (bool);
-
- /// @dev send `value` token to `to` from `from` on the condition it is approved by `from`
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return True if transfer was successful
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool);
-
- /// @dev `msg.sender` approves `_spender` to spend `_value` tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @param _value The amount of wei to be approved for transfer
- /// @return Always true if the call has enough gas to complete execution
- function approve(address _spender, uint256 _value)
- external
- returns (bool);
-
- /// @dev Query total supply of token
- /// @return Total supply of token
- function totalSupply()
- external
- view
- returns (uint256);
-
- /// @param _owner The address from which the balance will be retrieved
- /// @return Balance of owner
- function balanceOf(address _owner)
- external
- view
- returns (uint256);
-
- /// @param _owner The address of the account owning tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @return Amount of remaining tokens allowed to spent
- function allowance(address _owner, address _spender)
- external
- view
- returns (uint256);
-}
diff --git a/contracts/tokens/contracts/tokens/ERC20Token/MintableERC20Token.sol b/contracts/tokens/contracts/tokens/ERC20Token/MintableERC20Token.sol
deleted file mode 100644
index a66031f03..000000000
--- a/contracts/tokens/contracts/tokens/ERC20Token/MintableERC20Token.sol
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
-import "./UnlimitedAllowanceERC20Token.sol";
-
-
-contract MintableERC20Token is
- SafeMath,
- UnlimitedAllowanceERC20Token
-{
- /// @dev Mints new tokens
- /// @param _to Address of the beneficiary that will own the minted token
- /// @param _value Amount of tokens to mint
- function _mint(address _to, uint256 _value)
- internal
- {
- balances[_to] = safeAdd(_value, balances[_to]);
- _totalSupply = safeAdd(_totalSupply, _value);
-
- emit Transfer(
- address(0),
- _to,
- _value
- );
- }
-
- /// @dev Mints new tokens
- /// @param _owner Owner of tokens that will be burned
- /// @param _value Amount of tokens to burn
- function _burn(address _owner, uint256 _value)
- internal
- {
- balances[_owner] = safeSub(balances[_owner], _value);
- _totalSupply = safeSub(_totalSupply, _value);
-
- emit Transfer(
- _owner,
- address(0),
- _value
- );
- }
-}
diff --git a/contracts/tokens/contracts/tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol b/contracts/tokens/contracts/tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol
deleted file mode 100644
index 869d16147..000000000
--- a/contracts/tokens/contracts/tokens/ERC20Token/UnlimitedAllowanceERC20Token.sol
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "../ERC20Token/ERC20Token.sol";
-
-
-contract UnlimitedAllowanceERC20Token is
- ERC20Token
-{
- uint256 constant internal MAX_UINT = 2**256 - 1;
-
- /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance. See https://github.com/ethereum/EIPs/issues/717
- /// @param _from Address to transfer from.
- /// @param _to Address to transfer to.
- /// @param _value Amount to transfer.
- /// @return Success of transfer.
- function transferFrom(
- address _from,
- address _to,
- uint256 _value
- )
- external
- returns (bool)
- {
- uint256 allowance = allowed[_from][msg.sender];
- require(
- balances[_from] >= _value,
- "ERC20_INSUFFICIENT_BALANCE"
- );
- require(
- allowance >= _value,
- "ERC20_INSUFFICIENT_ALLOWANCE"
- );
- require(
- balances[_to] + _value >= balances[_to],
- "UINT256_OVERFLOW"
- );
-
- balances[_to] += _value;
- balances[_from] -= _value;
- if (allowance < MAX_UINT) {
- allowed[_from][msg.sender] -= _value;
- }
-
- emit Transfer(
- _from,
- _to,
- _value
- );
-
- return true;
- }
-}
diff --git a/contracts/tokens/contracts/tokens/ERC721Token/ERC721Token.sol b/contracts/tokens/contracts/tokens/ERC721Token/ERC721Token.sol
deleted file mode 100644
index c46bd0af4..000000000
--- a/contracts/tokens/contracts/tokens/ERC721Token/ERC721Token.sol
+++ /dev/null
@@ -1,277 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./IERC721Token.sol";
-import "./IERC721Receiver.sol";
-import "@0x/contracts-utils/contracts/utils/SafeMath/SafeMath.sol";
-
-
-contract ERC721Token is
- IERC721Token,
- SafeMath
-{
- // Function selector for ERC721Receiver.onERC721Received
- // 0x150b7a02
- bytes4 constant internal ERC721_RECEIVED = bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"));
-
- // Mapping of tokenId => owner
- mapping (uint256 => address) internal owners;
-
- // Mapping of tokenId => approved address
- mapping (uint256 => address) internal approvals;
-
- // Mapping of owner => number of tokens owned
- mapping (address => uint256) internal balances;
-
- // Mapping of owner => operator => approved
- mapping (address => mapping (address => bool)) internal operatorApprovals;
-
- /// @notice Transfers the ownership of an NFT from one address to another address
- /// @dev Throws unless `msg.sender` is the current owner, an authorized
- /// operator, or the approved address for this NFT. Throws if `_from` is
- /// not the current owner. Throws if `_to` is the zero address. Throws if
- /// `_tokenId` is not a valid NFT. When transfer is complete, this function
- /// checks if `_to` is a smart contract (code size > 0). If so, it calls
- /// `onERC721Received` on `_to` and throws if the return value is not
- /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- /// @param _data Additional data with no specified format, sent in call to `_to`
- function safeTransferFrom(
- address _from,
- address _to,
- uint256 _tokenId,
- bytes _data
- )
- external
- {
- transferFrom(
- _from,
- _to,
- _tokenId
- );
-
- uint256 receiverCodeSize;
- assembly {
- receiverCodeSize := extcodesize(_to)
- }
- if (receiverCodeSize > 0) {
- bytes4 selector = IERC721Receiver(_to).onERC721Received(
- msg.sender,
- _from,
- _tokenId,
- _data
- );
- require(
- selector == ERC721_RECEIVED,
- "ERC721_INVALID_SELECTOR"
- );
- }
- }
-
- /// @notice Transfers the ownership of an NFT from one address to another address
- /// @dev This works identically to the other function with an extra data parameter,
- /// except this function just sets data to "".
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- function safeTransferFrom(
- address _from,
- address _to,
- uint256 _tokenId
- )
- external
- {
- transferFrom(
- _from,
- _to,
- _tokenId
- );
-
- uint256 receiverCodeSize;
- assembly {
- receiverCodeSize := extcodesize(_to)
- }
- if (receiverCodeSize > 0) {
- bytes4 selector = IERC721Receiver(_to).onERC721Received(
- msg.sender,
- _from,
- _tokenId,
- ""
- );
- require(
- selector == ERC721_RECEIVED,
- "ERC721_INVALID_SELECTOR"
- );
- }
- }
-
- /// @notice Change or reaffirm the approved address for an NFT
- /// @dev 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.
- /// @param _approved The new approved NFT controller
- /// @param _tokenId The NFT to approve
- function approve(address _approved, uint256 _tokenId)
- external
- {
- address owner = ownerOf(_tokenId);
- require(
- msg.sender == owner || isApprovedForAll(owner, msg.sender),
- "ERC721_INVALID_SENDER"
- );
-
- approvals[_tokenId] = _approved;
- emit Approval(
- owner,
- _approved,
- _tokenId
- );
- }
-
- /// @notice Enable or disable approval for a third party ("operator") to manage
- /// all of `msg.sender`'s assets
- /// @dev Emits the ApprovalForAll event. The contract MUST allow
- /// multiple operators per owner.
- /// @param _operator Address to add to the set of authorized operators
- /// @param _approved True if the operator is approved, false to revoke approval
- function setApprovalForAll(address _operator, bool _approved)
- external
- {
- operatorApprovals[msg.sender][_operator] = _approved;
- emit ApprovalForAll(
- msg.sender,
- _operator,
- _approved
- );
- }
-
- /// @notice Count all NFTs assigned to an owner
- /// @dev NFTs assigned to the zero address are considered invalid, and this
- /// function throws for queries about the zero address.
- /// @param _owner An address for whom to query the balance
- /// @return The number of NFTs owned by `_owner`, possibly zero
- function balanceOf(address _owner)
- external
- view
- returns (uint256)
- {
- require(
- _owner != address(0),
- "ERC721_ZERO_OWNER"
- );
- return balances[_owner];
- }
-
- /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
- /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
- /// THEY MAY BE PERMANENTLY LOST
- /// @dev Throws unless `msg.sender` is the current owner, an authorized
- /// operator, or the approved address for this NFT. Throws if `_from` is
- /// not the current owner. Throws if `_to` is the zero address. Throws if
- /// `_tokenId` is not a valid NFT.
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- function transferFrom(
- address _from,
- address _to,
- uint256 _tokenId
- )
- public
- {
- require(
- _to != address(0),
- "ERC721_ZERO_TO_ADDRESS"
- );
-
- address owner = ownerOf(_tokenId);
- require(
- _from == owner,
- "ERC721_OWNER_MISMATCH"
- );
-
- address spender = msg.sender;
- address approvedAddress = getApproved(_tokenId);
- require(
- spender == owner ||
- isApprovedForAll(owner, spender) ||
- approvedAddress == spender,
- "ERC721_INVALID_SPENDER"
- );
-
- if (approvedAddress != address(0)) {
- approvals[_tokenId] = address(0);
- }
-
- owners[_tokenId] = _to;
- balances[_from] = safeSub(balances[_from], 1);
- balances[_to] = safeAdd(balances[_to], 1);
-
- emit Transfer(
- _from,
- _to,
- _tokenId
- );
- }
-
- /// @notice Find the owner of an NFT
- /// @dev NFTs assigned to zero address are considered invalid, and queries
- /// about them do throw.
- /// @param _tokenId The identifier for an NFT
- /// @return The address of the owner of the NFT
- function ownerOf(uint256 _tokenId)
- public
- view
- returns (address)
- {
- address owner = owners[_tokenId];
- require(
- owner != address(0),
- "ERC721_ZERO_OWNER"
- );
- return owner;
- }
-
- /// @notice Get the approved address for a single NFT
- /// @dev Throws if `_tokenId` is not a valid NFT.
- /// @param _tokenId The NFT to find the approved address for
- /// @return The approved address for this NFT, or the zero address if there is none
- function getApproved(uint256 _tokenId)
- public
- view
- returns (address)
- {
- return approvals[_tokenId];
- }
-
- /// @notice Query if an address is an authorized operator for another address
- /// @param _owner The address that owns the NFTs
- /// @param _operator The address that acts on behalf of the owner
- /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
- function isApprovedForAll(address _owner, address _operator)
- public
- view
- returns (bool)
- {
- return operatorApprovals[_owner][_operator];
- }
-}
diff --git a/contracts/tokens/contracts/tokens/ERC721Token/IERC721Receiver.sol b/contracts/tokens/contracts/tokens/ERC721Token/IERC721Receiver.sol
deleted file mode 100644
index c3ad35ede..000000000
--- a/contracts/tokens/contracts/tokens/ERC721Token/IERC721Receiver.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IERC721Receiver {
-
- /// @notice Handle the receipt of an NFT
- /// @dev The ERC721 smart contract calls this function on the recipient
- /// after a `transfer`. This function MAY throw to revert and reject the
- /// transfer. Return of other than the magic value MUST result in the
- /// transaction being reverted.
- /// Note: the contract address is always the message sender.
- /// @param _operator The address which called `safeTransferFrom` function
- /// @param _from The address which previously owned the token
- /// @param _tokenId The NFT identifier which is being transferred
- /// @param _data Additional data with no specified format
- /// @return `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
- /// unless throwing
- function onERC721Received(
- address _operator,
- address _from,
- uint256 _tokenId,
- bytes _data
- )
- external
- returns (bytes4);
-}
diff --git a/contracts/tokens/contracts/tokens/ERC721Token/IERC721Token.sol b/contracts/tokens/contracts/tokens/ERC721Token/IERC721Token.sol
deleted file mode 100644
index 56a3314df..000000000
--- a/contracts/tokens/contracts/tokens/ERC721Token/IERC721Token.sol
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract IERC721Token {
-
- /// @dev This emits when ownership of any NFT changes by any mechanism.
- /// This event emits when NFTs are created (`from` == 0) and destroyed
- /// (`to` == 0). Exception: during contract creation, any number of NFTs
- /// may be created and assigned without emitting Transfer. At the time of
- /// any transfer, the approved address for that NFT (if any) is reset to none.
- event Transfer(
- address indexed _from,
- address indexed _to,
- uint256 indexed _tokenId
- );
-
- /// @dev This emits when the approved address for an NFT is changed or
- /// reaffirmed. The zero address indicates there is no approved address.
- /// When a Transfer event emits, this also indicates that the approved
- /// address for that NFT (if any) is reset to none.
- event Approval(
- address indexed _owner,
- address indexed _approved,
- uint256 indexed _tokenId
- );
-
- /// @dev This emits when an operator is enabled or disabled for an owner.
- /// The operator can manage all NFTs of the owner.
- event ApprovalForAll(
- address indexed _owner,
- address indexed _operator,
- bool _approved
- );
-
- /// @notice Transfers the ownership of an NFT from one address to another address
- /// @dev Throws unless `msg.sender` is the current owner, an authorized
- /// perator, or the approved address for this NFT. Throws if `_from` is
- /// not the current owner. Throws if `_to` is the zero address. Throws if
- /// `_tokenId` is not a valid NFT. When transfer is complete, this function
- /// checks if `_to` is a smart contract (code size > 0). If so, it calls
- /// `onERC721Received` on `_to` and throws if the return value is not
- /// `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`.
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- /// @param _data Additional data with no specified format, sent in call to `_to`
- function safeTransferFrom(
- address _from,
- address _to,
- uint256 _tokenId,
- bytes _data
- )
- external;
-
- /// @notice Transfers the ownership of an NFT from one address to another address
- /// @dev This works identically to the other function with an extra data parameter,
- /// except this function just sets data to "".
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- function safeTransferFrom(
- address _from,
- address _to,
- uint256 _tokenId
- )
- external;
-
- /// @notice Change or reaffirm the approved address for an NFT
- /// @dev 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.
- /// @param _approved The new approved NFT controller
- /// @param _tokenId The NFT to approve
- function approve(address _approved, uint256 _tokenId)
- external;
-
- /// @notice Enable or disable approval for a third party ("operator") to manage
- /// all of `msg.sender`'s assets
- /// @dev Emits the ApprovalForAll event. The contract MUST allow
- /// multiple operators per owner.
- /// @param _operator Address to add to the set of authorized operators
- /// @param _approved True if the operator is approved, false to revoke approval
- function setApprovalForAll(address _operator, bool _approved)
- external;
-
- /// @notice Count all NFTs assigned to an owner
- /// @dev NFTs assigned to the zero address are considered invalid, and this
- /// function throws for queries about the zero address.
- /// @param _owner An address for whom to query the balance
- /// @return The number of NFTs owned by `_owner`, possibly zero
- function balanceOf(address _owner)
- external
- view
- returns (uint256);
-
- /// @notice Transfer ownership of an NFT -- THE CALLER IS RESPONSIBLE
- /// TO CONFIRM THAT `_to` IS CAPABLE OF RECEIVING NFTS OR ELSE
- /// THEY MAY BE PERMANENTLY LOST
- /// @dev Throws unless `msg.sender` is the current owner, an authorized
- /// operator, or the approved address for this NFT. Throws if `_from` is
- /// not the current owner. Throws if `_to` is the zero address. Throws if
- /// `_tokenId` is not a valid NFT.
- /// @param _from The current owner of the NFT
- /// @param _to The new owner
- /// @param _tokenId The NFT to transfer
- function transferFrom(
- address _from,
- address _to,
- uint256 _tokenId
- )
- public;
-
- /// @notice Find the owner of an NFT
- /// @dev NFTs assigned to zero address are considered invalid, and queries
- /// about them do throw.
- /// @param _tokenId The identifier for an NFT
- /// @return The address of the owner of the NFT
- function ownerOf(uint256 _tokenId)
- public
- view
- returns (address);
-
- /// @notice Get the approved address for a single NFT
- /// @dev Throws if `_tokenId` is not a valid NFT.
- /// @param _tokenId The NFT to find the approved address for
- /// @return The approved address for this NFT, or the zero address if there is none
- function getApproved(uint256 _tokenId)
- public
- view
- returns (address);
-
- /// @notice Query if an address is an authorized operator for another address
- /// @param _owner The address that owns the NFTs
- /// @param _operator The address that acts on behalf of the owner
- /// @return True if `_operator` is an approved operator for `_owner`, false otherwise
- function isApprovedForAll(address _owner, address _operator)
- public
- view
- returns (bool);
-}
diff --git a/contracts/tokens/contracts/tokens/ERC721Token/MintableERC721Token.sol b/contracts/tokens/contracts/tokens/ERC721Token/MintableERC721Token.sol
deleted file mode 100644
index 27326d857..000000000
--- a/contracts/tokens/contracts/tokens/ERC721Token/MintableERC721Token.sol
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "./ERC721Token.sol";
-
-
-contract MintableERC721Token is
- ERC721Token
-{
- /// @dev Function to mint a new token
- /// Reverts if the given token ID already exists
- /// @param _to Address of the beneficiary that will own the minted token
- /// @param _tokenId ID of the token to be minted by the msg.sender
- function _mint(address _to, uint256 _tokenId)
- internal
- {
- require(
- _to != address(0),
- "ERC721_ZERO_TO_ADDRESS"
- );
-
- address owner = owners[_tokenId];
- require(
- owner == address(0),
- "ERC721_OWNER_ALREADY_EXISTS"
- );
-
- owners[_tokenId] = _to;
- balances[_to] = safeAdd(balances[_to], 1);
-
- emit Transfer(
- address(0),
- _to,
- _tokenId
- );
- }
-
- /// @dev Function to burn a token
- /// Reverts if the given token ID doesn't exist
- /// @param _owner Owner of token with given token ID
- /// @param _tokenId ID of the token to be burned by the msg.sender
- function _burn(address _owner, uint256 _tokenId)
- internal
- {
- require(
- _owner != address(0),
- "ERC721_ZERO_OWNER_ADDRESS"
- );
-
- address owner = owners[_tokenId];
- require(
- owner == _owner,
- "ERC721_OWNER_MISMATCH"
- );
-
- owners[_tokenId] = address(0);
- balances[_owner] = safeSub(balances[_owner], 1);
-
- emit Transfer(
- _owner,
- address(0),
- _tokenId
- );
- }
-}
diff --git a/contracts/tokens/contracts/tokens/EtherToken/IEtherToken.sol b/contracts/tokens/contracts/tokens/EtherToken/IEtherToken.sol
deleted file mode 100644
index 32baa3eb0..000000000
--- a/contracts/tokens/contracts/tokens/EtherToken/IEtherToken.sol
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-import "../ERC20Token/IERC20Token.sol";
-
-
-contract IEtherToken is
- IERC20Token
-{
- function deposit()
- public
- payable;
-
- function withdraw(uint256 amount)
- public;
-}
diff --git a/contracts/tokens/contracts/tokens/EtherToken/WETH9.sol b/contracts/tokens/contracts/tokens/EtherToken/WETH9.sol
deleted file mode 100644
index 17876b86d..000000000
--- a/contracts/tokens/contracts/tokens/EtherToken/WETH9.sol
+++ /dev/null
@@ -1,758 +0,0 @@
-// Copyright (C) 2015, 2016, 2017 Dapphub
-
-// This program is free software: you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation, either version 3 of the License, or
-// (at your option) any later version.
-
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-
-// You should have received a copy of the GNU General Public License
-// along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-// solhint-disable
-pragma solidity ^0.4.18;
-
-
-contract WETH9 {
- string public name = "Wrapped Ether";
- string public symbol = "WETH";
- uint8 public decimals = 18;
-
- event Approval(address indexed _owner, address indexed _spender, uint _value);
- event Transfer(address indexed _from, address indexed _to, uint _value);
- event Deposit(address indexed _owner, uint _value);
- event Withdrawal(address indexed _owner, uint _value);
-
- mapping (address => uint) public balanceOf;
- mapping (address => mapping (address => uint)) public allowance;
-
- function() public payable {
- deposit();
- }
- function deposit() public payable {
- balanceOf[msg.sender] += msg.value;
- Deposit(msg.sender, msg.value);
- }
- function withdraw(uint wad) public {
- require(balanceOf[msg.sender] >= wad);
- balanceOf[msg.sender] -= wad;
- msg.sender.transfer(wad);
- Withdrawal(msg.sender, wad);
- }
-
- function totalSupply() public view returns (uint) {
- return this.balance;
- }
-
- function approve(address guy, uint wad) public returns (bool) {
- allowance[msg.sender][guy] = wad;
- Approval(msg.sender, guy, wad);
- return true;
- }
-
- function transfer(address dst, uint wad) public returns (bool) {
- return transferFrom(msg.sender, dst, wad);
- }
-
- function transferFrom(address src, address dst, uint wad)
- public
- returns (bool)
- {
- require(balanceOf[src] >= wad);
-
- if (src != msg.sender && allowance[src][msg.sender] != uint(-1)) {
- require(allowance[src][msg.sender] >= wad);
- allowance[src][msg.sender] -= wad;
- }
-
- balanceOf[src] -= wad;
- balanceOf[dst] += wad;
-
- Transfer(src, dst, wad);
-
- return true;
- }
-}
-
-
-/*
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU General Public License is a free, copyleft license for
-software and other kinds of works.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-the GNU General Public License is intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users. We, the Free Software Foundation, use the
-GNU General Public License for most of our software; it applies also to
-any other work released this way by its authors. You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- To protect your rights, we need to prevent others from denying you
-these rights or asking you to surrender the rights. Therefore, you have
-certain responsibilities if you distribute copies of the software, or if
-you modify it: responsibilities to respect the freedom of others.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must pass on to the recipients the same
-freedoms that you received. You must make sure that they, too, receive
-or can get the source code. And you must show them these terms so they
-know their rights.
-
- Developers that use the GNU GPL protect your rights with two steps:
-(1) assert copyright on the software, and (2) offer you this License
-giving you legal permission to copy, distribute and/or modify it.
-
- For the developers' and authors' protection, the GPL clearly explains
-that there is no warranty for this free software. For both users' and
-authors' sake, the GPL requires that modified versions be marked as
-changed, so that their problems will not be attributed erroneously to
-authors of previous versions.
-
- Some devices are designed to deny users access to install or run
-modified versions of the software inside them, although the manufacturer
-can do so. This is fundamentally incompatible with the aim of
-protecting users' freedom to change the software. The systematic
-pattern of such abuse occurs in the area of products for individuals to
-use, which is precisely where it is most unacceptable. Therefore, we
-have designed this version of the GPL to prohibit the practice for those
-products. If such problems arise substantially in other domains, we
-stand ready to extend this provision to those domains in future versions
-of the GPL, as needed to protect the freedom of users.
-
- Finally, every program is threatened constantly by software patents.
-States should not allow patents to restrict development and use of
-software on general-purpose computers, but in those that do, we wish to
-avoid the special danger that patents applied to a free program could
-make it effectively proprietary. To prevent this, the GPL assures that
-patents cannot be used to render the program non-free.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Use with the GNU Affero General Public License.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU Affero General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the special requirements of the GNU Affero General Public License,
-section 13, concerning interaction through a network will apply to the
-combination as such.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- <one line to give the program's name and a brief idea of what it does.>
- Copyright (C) <year> <name of author>
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-Also add information on how to contact you by electronic and paper mail.
-
- If the program does terminal interaction, make it output a short
-notice like this when it starts in an interactive mode:
-
- <program> Copyright (C) <year> <name of author>
- This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, your program's commands
-might be different; for a GUI interface, you would use an "about box".
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU GPL, see
-<http://www.gnu.org/licenses/>.
-
- The GNU General Public License does not permit incorporating your program
-into proprietary programs. If your program is a subroutine library, you
-may consider it more useful to permit linking proprietary applications with
-the library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License. But first, please read
-<http://www.gnu.org/philosophy/why-not-lgpl.html>.
-
-*/
diff --git a/contracts/tokens/contracts/tokens/ZRXToken/ERC20Token_v1.sol b/contracts/tokens/contracts/tokens/ZRXToken/ERC20Token_v1.sol
deleted file mode 100644
index 4920c4aac..000000000
--- a/contracts/tokens/contracts/tokens/ZRXToken/ERC20Token_v1.sol
+++ /dev/null
@@ -1,44 +0,0 @@
-pragma solidity ^0.4.11;
-
-import { Token_v1 as Token } from "./Token_v1.sol";
-
-contract ERC20Token_v1 is Token {
-
- function transfer(address _to, uint _value) returns (bool) {
- //Default assumes totalSupply can't be over max (2^256 - 1).
- if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
- balances[msg.sender] -= _value;
- balances[_to] += _value;
- Transfer(msg.sender, _to, _value);
- return true;
- } else { return false; }
- }
-
- function transferFrom(address _from, address _to, uint _value) returns (bool) {
- if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {
- balances[_to] += _value;
- balances[_from] -= _value;
- allowed[_from][msg.sender] -= _value;
- Transfer(_from, _to, _value);
- return true;
- } else { return false; }
- }
-
- function balanceOf(address _owner) constant returns (uint) {
- return balances[_owner];
- }
-
- function approve(address _spender, uint _value) returns (bool) {
- allowed[msg.sender][_spender] = _value;
- Approval(msg.sender, _spender, _value);
- return true;
- }
-
- function allowance(address _owner, address _spender) constant returns (uint) {
- return allowed[_owner][_spender];
- }
-
- mapping (address => uint) balances;
- mapping (address => mapping (address => uint)) allowed;
- uint public totalSupply;
-}
diff --git a/contracts/tokens/contracts/tokens/ZRXToken/Token_v1.sol b/contracts/tokens/contracts/tokens/ZRXToken/Token_v1.sol
deleted file mode 100644
index de619fb7e..000000000
--- a/contracts/tokens/contracts/tokens/ZRXToken/Token_v1.sol
+++ /dev/null
@@ -1,39 +0,0 @@
-pragma solidity ^0.4.11;
-
-contract Token_v1 {
-
- /// @return total amount of tokens
- function totalSupply() constant returns (uint supply) {}
-
- /// @param _owner The address from which the balance will be retrieved
- /// @return The balance
- function balanceOf(address _owner) constant returns (uint balance) {}
-
- /// @notice send `_value` token to `_to` from `msg.sender`
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return Whether the transfer was successful or not
- function transfer(address _to, uint _value) returns (bool success) {}
-
- /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`
- /// @param _from The address of the sender
- /// @param _to The address of the recipient
- /// @param _value The amount of token to be transferred
- /// @return Whether the transfer was successful or not
- function transferFrom(address _from, address _to, uint _value) returns (bool success) {}
-
- /// @notice `msg.sender` approves `_addr` to spend `_value` tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @param _value The amount of wei to be approved for transfer
- /// @return Whether the approval was successful or not
- function approve(address _spender, uint _value) returns (bool success) {}
-
- /// @param _owner The address of the account owning tokens
- /// @param _spender The address of the account able to transfer the tokens
- /// @return Amount of remaining tokens allowed to spent
- function allowance(address _owner, address _spender) constant returns (uint remaining) {}
-
- event Transfer(address indexed _from, address indexed _to, uint _value);
- event Approval(address indexed _owner, address indexed _spender, uint _value);
-}
-
diff --git a/contracts/tokens/contracts/tokens/ZRXToken/UnlimitedAllowanceToken_v1.sol b/contracts/tokens/contracts/tokens/ZRXToken/UnlimitedAllowanceToken_v1.sol
deleted file mode 100644
index bf1b0335a..000000000
--- a/contracts/tokens/contracts/tokens/ZRXToken/UnlimitedAllowanceToken_v1.sol
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.11;
-
-import { ERC20Token_v1 as ERC20Token } from "./ERC20Token_v1.sol";
-
-contract UnlimitedAllowanceToken_v1 is ERC20Token {
-
- uint constant MAX_UINT = 2**256 - 1;
-
- /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.
- /// @param _from Address to transfer from.
- /// @param _to Address to transfer to.
- /// @param _value Amount to transfer.
- /// @return Success of transfer.
- function transferFrom(address _from, address _to, uint _value)
- public
- returns (bool)
- {
- uint allowance = allowed[_from][msg.sender];
- if (balances[_from] >= _value
- && allowance >= _value
- && balances[_to] + _value >= balances[_to]
- ) {
- balances[_to] += _value;
- balances[_from] -= _value;
- if (allowance < MAX_UINT) {
- allowed[_from][msg.sender] -= _value;
- }
- Transfer(_from, _to, _value);
- return true;
- } else {
- return false;
- }
- }
-}
diff --git a/contracts/tokens/contracts/tokens/ZRXToken/ZRXToken.sol b/contracts/tokens/contracts/tokens/ZRXToken/ZRXToken.sol
deleted file mode 100644
index 831e1822c..000000000
--- a/contracts/tokens/contracts/tokens/ZRXToken/ZRXToken.sol
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.11;
-
-// solhint-disable-next-line max-line-length
-import { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from "./UnlimitedAllowanceToken_v1.sol";
-
-
-contract ZRXToken is
- UnlimitedAllowanceToken
-{
-
- // solhint-disable const-name-snakecase
- uint8 constant public decimals = 18;
- uint256 public totalSupply = 10**27; // 1 billion tokens, 18 decimal places
- string constant public name = "0x Protocol Token";
- string constant public symbol = "ZRX";
- // solhint-enableconst-name-snakecase
-
- function ZRXToken()
- public
- {
- balances[msg.sender] = totalSupply;
- }
-}
diff --git a/contracts/tokens/package.json b/contracts/tokens/package.json
deleted file mode 100644
index bd0316919..000000000
--- a/contracts/tokens/package.json
+++ /dev/null
@@ -1,91 +0,0 @@
-{
- "name": "@0x/contracts-tokens",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Token contracts used by 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(DummyERC20Token|DummyMultipleReturnERC20Token|DummyNoReturnERC20Token|DummyERC721Receiver|InvalidERC721Receiver|DummyERC721Token|ReentrantERC20Token|ERC20Token|IERC20Token|MintableERC20Token|UnlimitedAllowanceERC20Token|ERC721Token|IERC721Receiver|IERC721Token|MintableERC721Token|IEtherToken|WETH9|ERC20Token_v1|Token_v1|UnlimitedAllowanceToken_v1|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/contracts/tokens/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-interfaces": "^1.0.6",
- "@0x/contracts-libs": "^1.0.6",
- "@0x/contracts-multisig": "^1.0.6",
- "@0x/contracts-utils": "^1.0.6",
- "@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",
- "@types/js-combinatorics": "^0.5.29",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/tokens/src/artifacts/index.ts b/contracts/tokens/src/artifacts/index.ts
deleted file mode 100644
index 977d01c3e..000000000
--- a/contracts/tokens/src/artifacts/index.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as DummyERC20Token from '../../generated-artifacts/DummyERC20Token.json';
-import * as DummyERC721Receiver from '../../generated-artifacts/DummyERC721Receiver.json';
-import * as DummyERC721Token from '../../generated-artifacts/DummyERC721Token.json';
-import * as DummyMultipleReturnERC20Token from '../../generated-artifacts/DummyMultipleReturnERC20Token.json';
-import * as DummyNoReturnERC20Token from '../../generated-artifacts/DummyNoReturnERC20Token.json';
-import * as ERC20Token from '../../generated-artifacts/ERC20Token.json';
-import * as ERC20Token_v1 from '../../generated-artifacts/ERC20Token_v1.json';
-import * as ERC721Token from '../../generated-artifacts/ERC721Token.json';
-import * as IERC20Token from '../../generated-artifacts/IERC20Token.json';
-import * as IERC721Receiver from '../../generated-artifacts/IERC721Receiver.json';
-import * as IERC721Token from '../../generated-artifacts/IERC721Token.json';
-import * as IEtherToken from '../../generated-artifacts/IEtherToken.json';
-import * as InvalidERC721Receiver from '../../generated-artifacts/InvalidERC721Receiver.json';
-import * as MintableERC20Token from '../../generated-artifacts/MintableERC20Token.json';
-import * as MintableERC721Token from '../../generated-artifacts/MintableERC721Token.json';
-import * as ReentrantERC20Token from '../../generated-artifacts/ReentrantERC20Token.json';
-import * as Token_v1 from '../../generated-artifacts/Token_v1.json';
-import * as UnlimitedAllowanceERC20Token from '../../generated-artifacts/UnlimitedAllowanceERC20Token.json';
-import * as UnlimitedAllowanceToken_v1 from '../../generated-artifacts/UnlimitedAllowanceToken_v1.json';
-import * as WETH9 from '../../generated-artifacts/WETH9.json';
-import * as ZRXToken from '../../generated-artifacts/ZRXToken.json';
-
-// tslint:disable:no-unnecessary-type-assertion
-export const artifacts = {
- DummyERC20Token: DummyERC20Token as ContractArtifact,
- DummyMultipleReturnERC20Token: DummyMultipleReturnERC20Token as ContractArtifact,
- DummyNoReturnERC20Token: DummyNoReturnERC20Token as ContractArtifact,
- DummyERC721Receiver: DummyERC721Receiver as ContractArtifact,
- InvalidERC721Receiver: InvalidERC721Receiver as ContractArtifact,
- DummyERC721Token: DummyERC721Token as ContractArtifact,
- ReentrantERC20Token: ReentrantERC20Token as ContractArtifact,
- ERC20Token: ERC20Token as ContractArtifact,
- IERC20Token: IERC20Token as ContractArtifact,
- MintableERC20Token: MintableERC20Token as ContractArtifact,
- UnlimitedAllowanceERC20Token: UnlimitedAllowanceERC20Token as ContractArtifact,
- ERC721Token: ERC721Token as ContractArtifact,
- IERC721Receiver: IERC721Receiver as ContractArtifact,
- IERC721Token: IERC721Token as ContractArtifact,
- MintableERC721Token: MintableERC721Token as ContractArtifact,
- IEtherToken: IEtherToken as ContractArtifact,
- WETH9: WETH9 as ContractArtifact,
- ERC20Token_v1: ERC20Token_v1 as ContractArtifact,
- Token_v1: Token_v1 as ContractArtifact,
- UnlimitedAllowanceToken_v1: UnlimitedAllowanceToken_v1 as ContractArtifact,
- // Note(albrow): "as any" hack still required here because ZRXToken does not
- // conform to the v2 artifact type.
- ZRXToken: (ZRXToken as any) as ContractArtifact,
-};
diff --git a/contracts/tokens/src/index.ts b/contracts/tokens/src/index.ts
deleted file mode 100644
index 91dd7e0e3..000000000
--- a/contracts/tokens/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './wrappers';
-export * from './artifacts';
diff --git a/contracts/tokens/src/wrappers/index.ts b/contracts/tokens/src/wrappers/index.ts
deleted file mode 100644
index 98bf26657..000000000
--- a/contracts/tokens/src/wrappers/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-export * from '../../generated-wrappers/zrx_token';
-export * from '../../generated-wrappers/weth9';
-export * from '../../generated-wrappers/unlimitedallowancetoken_v1';
-export * from '../../generated-wrappers/unlimited_allowance_erc20_token';
-export * from '../../generated-wrappers/token_v1';
-export * from '../../generated-wrappers/reentrant_erc20_token';
-export * from '../../generated-wrappers/mintable_erc721_token';
-export * from '../../generated-wrappers/mintable_erc20_token';
-export * from '../../generated-wrappers/invalid_erc721_receiver';
-export * from '../../generated-wrappers/i_ether_token';
-export * from '../../generated-wrappers/i_erc721_token';
-export * from '../../generated-wrappers/i_erc721_receiver';
-export * from '../../generated-wrappers/i_erc20_token';
-export * from '../../generated-wrappers/erc721_token';
-export * from '../../generated-wrappers/erc20token_v1';
-export * from '../../generated-wrappers/erc20_token';
-export * from '../../generated-wrappers/dummy_no_return_erc20_token';
-export * from '../../generated-wrappers/dummy_multiple_return_erc20_token';
-export * from '../../generated-wrappers/dummy_erc721_token';
-export * from '../../generated-wrappers/dummy_erc721_receiver';
-export * from '../../generated-wrappers/dummy_erc20_token';
diff --git a/contracts/tokens/test/erc721_token.ts b/contracts/tokens/test/erc721_token.ts
deleted file mode 100644
index 13332cd35..000000000
--- a/contracts/tokens/test/erc721_token.ts
+++ /dev/null
@@ -1,282 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectTransactionFailedAsync,
- expectTransactionFailedWithoutReasonAsync,
- LogDecoder,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-
-import {
- artifacts,
- DummyERC721ReceiverContract,
- DummyERC721ReceiverTokenReceivedEventArgs,
- DummyERC721TokenContract,
- DummyERC721TokenTransferEventArgs,
- InvalidERC721ReceiverContract,
-} from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('ERC721Token', () => {
- let owner: string;
- let spender: string;
- let token: DummyERC721TokenContract;
- let erc721Receiver: DummyERC721ReceiverContract;
- let logDecoder: LogDecoder;
- const tokenId = new BigNumber(1);
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- owner = accounts[0];
- spender = accounts[1];
- token = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- erc721Receiver = await DummyERC721ReceiverContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC721Receiver,
- provider,
- txDefaults,
- );
- logDecoder = new LogDecoder(web3Wrapper, artifacts);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.mint.sendTransactionAsync(owner, tokenId, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('transferFrom', () => {
- it('should revert if the tokenId is not owner', async () => {
- const from = owner;
- const to = erc721Receiver.address;
- const unownedTokenId = new BigNumber(2);
- await expectTransactionFailedAsync(
- token.transferFrom.sendTransactionAsync(from, to, unownedTokenId),
- RevertReason.Erc721ZeroOwner,
- );
- });
- it('should revert if transferring to a null address', async () => {
- const from = owner;
- const to = constants.NULL_ADDRESS;
- await expectTransactionFailedAsync(
- token.transferFrom.sendTransactionAsync(from, to, tokenId),
- RevertReason.Erc721ZeroToAddress,
- );
- });
- it('should revert if the from address does not own the token', async () => {
- const from = spender;
- const to = erc721Receiver.address;
- await expectTransactionFailedAsync(
- token.transferFrom.sendTransactionAsync(from, to, tokenId),
- RevertReason.Erc721OwnerMismatch,
- );
- });
- it('should revert if spender does not own the token, is not approved, and is not approved for all', async () => {
- const from = owner;
- const to = erc721Receiver.address;
- await expectTransactionFailedAsync(
- token.transferFrom.sendTransactionAsync(from, to, tokenId, { from: spender }),
- RevertReason.Erc721InvalidSpender,
- );
- });
- it('should transfer the token if called by owner', async () => {
- const from = owner;
- const to = erc721Receiver.address;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.transferFrom.sendTransactionAsync(from, to, tokenId),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- expect(log.args._from).to.be.equal(from);
- expect(log.args._to).to.be.equal(to);
- expect(log.args._tokenId).to.be.bignumber.equal(tokenId);
- });
- it('should transfer the token if spender is approved for all', async () => {
- const isApproved = true;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.setApprovalForAll.sendTransactionAsync(spender, isApproved),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const from = owner;
- const to = erc721Receiver.address;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.transferFrom.sendTransactionAsync(from, to, tokenId),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- expect(log.args._from).to.be.equal(from);
- expect(log.args._to).to.be.equal(to);
- expect(log.args._tokenId).to.be.bignumber.equal(tokenId);
- });
- it('should transfer the token if spender is individually approved', async () => {
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.approve.sendTransactionAsync(spender, tokenId),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const from = owner;
- const to = erc721Receiver.address;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.transferFrom.sendTransactionAsync(from, to, tokenId),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
-
- const approvedAddress = await token.getApproved.callAsync(tokenId);
- expect(approvedAddress).to.be.equal(constants.NULL_ADDRESS);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- expect(log.args._from).to.be.equal(from);
- expect(log.args._to).to.be.equal(to);
- expect(log.args._tokenId).to.be.bignumber.equal(tokenId);
- });
- });
- describe('safeTransferFrom without data', () => {
- it('should transfer token to a non-contract address if called by owner', async () => {
- const from = owner;
- const to = spender;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.safeTransferFrom1.sendTransactionAsync(from, to, tokenId),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- expect(log.args._from).to.be.equal(from);
- expect(log.args._to).to.be.equal(to);
- expect(log.args._tokenId).to.be.bignumber.equal(tokenId);
- });
- it('should revert if transferring to a contract address without onERC721Received', async () => {
- const contract = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- const from = owner;
- const to = contract.address;
- await expectTransactionFailedWithoutReasonAsync(
- token.safeTransferFrom1.sendTransactionAsync(from, to, tokenId),
- );
- });
- it('should revert if onERC721Received does not return the correct value', async () => {
- const invalidErc721Receiver = await InvalidERC721ReceiverContract.deployFrom0xArtifactAsync(
- artifacts.InvalidERC721Receiver,
- provider,
- txDefaults,
- );
- const from = owner;
- const to = invalidErc721Receiver.address;
- await expectTransactionFailedAsync(
- token.safeTransferFrom1.sendTransactionAsync(from, to, tokenId),
- RevertReason.Erc721InvalidSelector,
- );
- });
- it('should transfer to contract and call onERC721Received with correct return value', async () => {
- const from = owner;
- const to = erc721Receiver.address;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.safeTransferFrom1.sendTransactionAsync(from, to, tokenId),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const transferLog = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- const receiverLog = txReceipt.logs[1] as LogWithDecodedArgs<DummyERC721ReceiverTokenReceivedEventArgs>;
- expect(transferLog.args._from).to.be.equal(from);
- expect(transferLog.args._to).to.be.equal(to);
- expect(transferLog.args._tokenId).to.be.bignumber.equal(tokenId);
- expect(receiverLog.args.operator).to.be.equal(owner);
- expect(receiverLog.args.from).to.be.equal(from);
- expect(receiverLog.args.tokenId).to.be.bignumber.equal(tokenId);
- expect(receiverLog.args.data).to.be.equal(constants.NULL_BYTES);
- });
- });
- describe('safeTransferFrom with data', () => {
- const data = '0x0102030405060708090a0b0c0d0e0f';
- it('should transfer token to a non-contract address if called by owner', async () => {
- const from = owner;
- const to = spender;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.safeTransferFrom2.sendTransactionAsync(from, to, tokenId, data),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const log = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- expect(log.args._from).to.be.equal(from);
- expect(log.args._to).to.be.equal(to);
- expect(log.args._tokenId).to.be.bignumber.equal(tokenId);
- });
- it('should revert if transferring to a contract address without onERC721Received', async () => {
- const contract = await DummyERC721TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC721Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- );
- const from = owner;
- const to = contract.address;
- await expectTransactionFailedWithoutReasonAsync(
- token.safeTransferFrom2.sendTransactionAsync(from, to, tokenId, data),
- );
- });
- it('should revert if onERC721Received does not return the correct value', async () => {
- const invalidErc721Receiver = await InvalidERC721ReceiverContract.deployFrom0xArtifactAsync(
- artifacts.InvalidERC721Receiver,
- provider,
- txDefaults,
- );
- const from = owner;
- const to = invalidErc721Receiver.address;
- await expectTransactionFailedAsync(
- token.safeTransferFrom2.sendTransactionAsync(from, to, tokenId, data),
- RevertReason.Erc721InvalidSelector,
- );
- });
- it('should transfer to contract and call onERC721Received with correct return value', async () => {
- const from = owner;
- const to = erc721Receiver.address;
- const txReceipt = await logDecoder.getTxWithDecodedLogsAsync(
- await token.safeTransferFrom2.sendTransactionAsync(from, to, tokenId, data),
- );
- const newOwner = await token.ownerOf.callAsync(tokenId);
- expect(newOwner).to.be.equal(to);
- const transferLog = txReceipt.logs[0] as LogWithDecodedArgs<DummyERC721TokenTransferEventArgs>;
- const receiverLog = txReceipt.logs[1] as LogWithDecodedArgs<DummyERC721ReceiverTokenReceivedEventArgs>;
- expect(transferLog.args._from).to.be.equal(from);
- expect(transferLog.args._to).to.be.equal(to);
- expect(transferLog.args._tokenId).to.be.bignumber.equal(tokenId);
- expect(receiverLog.args.operator).to.be.equal(owner);
- expect(receiverLog.args.from).to.be.equal(from);
- expect(receiverLog.args.tokenId).to.be.bignumber.equal(tokenId);
- expect(receiverLog.args.data).to.be.equal(data);
- });
- });
-});
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/contracts/tokens/test/global_hooks.ts b/contracts/tokens/test/global_hooks.ts
deleted file mode 100644
index f8ace376a..000000000
--- a/contracts/tokens/test/global_hooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-before('start web3 provider', () => {
- provider.start();
-});
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/tokens/test/unlimited_allowance_token.ts b/contracts/tokens/test/unlimited_allowance_token.ts
deleted file mode 100644
index f0b8e53a4..000000000
--- a/contracts/tokens/test/unlimited_allowance_token.ts
+++ /dev/null
@@ -1,194 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectContractCallFailedAsync,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-
-import { artifacts, DummyERC20TokenContract } from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('UnlimitedAllowanceToken', () => {
- let owner: string;
- let spender: string;
- const MAX_MINT_VALUE = new BigNumber(10000000000000000000000);
- let token: DummyERC20TokenContract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- owner = accounts[0];
- spender = accounts[1];
- token = await DummyERC20TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC20Token,
- provider,
- txDefaults,
- constants.DUMMY_TOKEN_NAME,
- constants.DUMMY_TOKEN_SYMBOL,
- constants.DUMMY_TOKEN_DECIMALS,
- constants.DUMMY_TOKEN_TOTAL_SUPPLY,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.mint.sendTransactionAsync(MAX_MINT_VALUE, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('transfer', () => {
- it('should throw if owner has insufficient balance', async () => {
- const ownerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = ownerBalance.plus(1);
- return expectContractCallFailedAsync(
- token.transfer.callAsync(spender, amountToTransfer, { from: owner }),
- RevertReason.Erc20InsufficientBalance,
- );
- });
-
- it('should transfer balance from sender to receiver', async () => {
- const receiver = spender;
- const initOwnerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = new BigNumber(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.transfer.sendTransactionAsync(receiver, amountToTransfer, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const finalOwnerBalance = await token.balanceOf.callAsync(owner);
- const finalReceiverBalance = await token.balanceOf.callAsync(receiver);
-
- const expectedFinalOwnerBalance = initOwnerBalance.minus(amountToTransfer);
- const expectedFinalReceiverBalance = amountToTransfer;
- expect(finalOwnerBalance).to.be.bignumber.equal(expectedFinalOwnerBalance);
- expect(finalReceiverBalance).to.be.bignumber.equal(expectedFinalReceiverBalance);
- });
-
- it('should return true on a 0 value transfer', async () => {
- const didReturnTrue = await token.transfer.callAsync(spender, new BigNumber(0), {
- from: owner,
- });
- expect(didReturnTrue).to.be.true();
- });
- });
-
- describe('transferFrom', () => {
- it('should throw if owner has insufficient balance', async () => {
- const ownerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = ownerBalance.plus(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.approve.sendTransactionAsync(spender, amountToTransfer, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- return expectContractCallFailedAsync(
- token.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- }),
- RevertReason.Erc20InsufficientBalance,
- );
- });
-
- it('should throw if spender has insufficient allowance', async () => {
- const ownerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = ownerBalance;
-
- const spenderAllowance = await token.allowance.callAsync(owner, spender);
- const isSpenderAllowanceInsufficient = spenderAllowance.comparedTo(amountToTransfer) < 0;
- expect(isSpenderAllowanceInsufficient).to.be.true();
-
- return expectContractCallFailedAsync(
- token.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- }),
- RevertReason.Erc20InsufficientAllowance,
- );
- });
-
- it('should return true on a 0 value transfer', async () => {
- const amountToTransfer = new BigNumber(0);
- const didReturnTrue = await token.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- });
- expect(didReturnTrue).to.be.true();
- });
-
- it('should not modify spender allowance if spender allowance is 2^256 - 1', async () => {
- const initOwnerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = initOwnerBalance;
- const initSpenderAllowance = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.approve.sendTransactionAsync(spender, initSpenderAllowance, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newSpenderAllowance = await token.allowance.callAsync(owner, spender);
- expect(initSpenderAllowance).to.be.bignumber.equal(newSpenderAllowance);
- });
-
- it('should transfer the correct balances if spender has sufficient allowance', async () => {
- const initOwnerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = initOwnerBalance;
- const initSpenderAllowance = initOwnerBalance;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.approve.sendTransactionAsync(spender, initSpenderAllowance, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newOwnerBalance = await token.balanceOf.callAsync(owner);
- const newSpenderBalance = await token.balanceOf.callAsync(spender);
-
- expect(newOwnerBalance).to.be.bignumber.equal(0);
- expect(newSpenderBalance).to.be.bignumber.equal(initOwnerBalance);
- });
-
- it('should modify allowance if spender has sufficient allowance less than 2^256 - 1', async () => {
- const initOwnerBalance = await token.balanceOf.callAsync(owner);
- const amountToTransfer = initOwnerBalance;
- const initSpenderAllowance = initOwnerBalance;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.approve.sendTransactionAsync(spender, initSpenderAllowance, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await token.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newSpenderAllowance = await token.allowance.callAsync(owner, spender);
- expect(newSpenderAllowance).to.be.bignumber.equal(0);
- });
- });
-});
diff --git a/contracts/tokens/test/weth9.ts b/contracts/tokens/test/weth9.ts
deleted file mode 100644
index 6a3948e2c..000000000
--- a/contracts/tokens/test/weth9.ts
+++ /dev/null
@@ -1,142 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectInsufficientFundsAsync,
- expectTransactionFailedWithoutReasonAsync,
- provider,
- txDefaults,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-
-import { artifacts, WETH9Contract } from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('EtherToken', () => {
- let account: string;
- const gasPrice = Web3Wrapper.toBaseUnitAmount(new BigNumber(20), 9);
- let etherToken: WETH9Contract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- account = accounts[0];
-
- etherToken = await WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, {
- gasPrice,
- ...txDefaults,
- });
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('deposit', () => {
- it('should throw if caller attempts to deposit more Ether than caller balance', async () => {
- const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const ethToDeposit = initEthBalance.plus(1);
-
- return expectInsufficientFundsAsync(etherToken.deposit.sendTransactionAsync({ value: ethToDeposit }));
- });
-
- it('should convert deposited Ether to wrapped Ether tokens', async () => {
- const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const initEthTokenBalance = await etherToken.balanceOf.callAsync(account);
-
- const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1)));
-
- const txHash = await etherToken.deposit.sendTransactionAsync({ value: ethToDeposit });
- const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
- txHash,
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
- const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const finalEthTokenBalance = await etherToken.balanceOf.callAsync(account);
-
- expect(finalEthBalance).to.be.bignumber.equal(initEthBalance.minus(ethToDeposit.plus(ethSpentOnGas)));
- expect(finalEthTokenBalance).to.be.bignumber.equal(initEthTokenBalance.plus(ethToDeposit));
- });
- });
-
- describe('withdraw', () => {
- it('should throw if caller attempts to withdraw greater than caller balance', async () => {
- const initEthTokenBalance = await etherToken.balanceOf.callAsync(account);
- const ethTokensToWithdraw = initEthTokenBalance.plus(1);
-
- return expectTransactionFailedWithoutReasonAsync(
- etherToken.withdraw.sendTransactionAsync(ethTokensToWithdraw),
- );
- });
-
- it('should convert ether tokens to ether with sufficient balance', async () => {
- const ethToDeposit = new BigNumber(Web3Wrapper.toWei(new BigNumber(1)));
- await web3Wrapper.awaitTransactionSuccessAsync(
- await etherToken.deposit.sendTransactionAsync({ value: ethToDeposit }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const initEthTokenBalance = await etherToken.balanceOf.callAsync(account);
- const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const ethTokensToWithdraw = initEthTokenBalance;
- expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0);
- const txHash = await etherToken.withdraw.sendTransactionAsync(ethTokensToWithdraw, {
- gas: constants.MAX_ETHERTOKEN_WITHDRAW_GAS,
- });
- const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
- txHash,
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
- const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const finalEthTokenBalance = await etherToken.balanceOf.callAsync(account);
-
- expect(finalEthBalance).to.be.bignumber.equal(
- initEthBalance.plus(ethTokensToWithdraw.minus(ethSpentOnGas)),
- );
- expect(finalEthTokenBalance).to.be.bignumber.equal(initEthTokenBalance.minus(ethTokensToWithdraw));
- });
- });
-
- describe('fallback', () => {
- it('should convert sent ether to ether tokens', async () => {
- const initEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const initEthTokenBalance = await etherToken.balanceOf.callAsync(account);
-
- const ethToDeposit = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), 18);
-
- const txHash = await web3Wrapper.sendTransactionAsync({
- from: account,
- to: etherToken.address,
- value: ethToDeposit,
- gasPrice,
- });
-
- const receipt = await web3Wrapper.awaitTransactionSuccessAsync(
- txHash,
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
- const finalEthBalance = await web3Wrapper.getBalanceInWeiAsync(account);
- const finalEthTokenBalance = await etherToken.balanceOf.callAsync(account);
-
- expect(finalEthBalance).to.be.bignumber.equal(initEthBalance.minus(ethToDeposit.plus(ethSpentOnGas)));
- expect(finalEthTokenBalance).to.be.bignumber.equal(initEthTokenBalance.plus(ethToDeposit));
- });
- });
-});
diff --git a/contracts/tokens/test/zrx_token.ts b/contracts/tokens/test/zrx_token.ts
deleted file mode 100644
index 820b054e6..000000000
--- a/contracts/tokens/test/zrx_token.ts
+++ /dev/null
@@ -1,203 +0,0 @@
-import { chaiSetup, constants, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-
-import { artifacts, ZRXTokenContract } from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('ZRXToken', () => {
- let owner: string;
- let spender: string;
- let MAX_UINT: BigNumber;
- let zrxToken: ZRXTokenContract;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- owner = accounts[0];
- spender = accounts[1];
- zrxToken = await ZRXTokenContract.deployFrom0xArtifactAsync(artifacts.ZRXToken, provider, txDefaults);
- MAX_UINT = constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('constants', () => {
- it('should have 18 decimals', async () => {
- const decimals = new BigNumber(await zrxToken.decimals.callAsync());
- const expectedDecimals = 18;
- expect(decimals).to.be.bignumber.equal(expectedDecimals);
- });
-
- it('should have a total supply of 1 billion tokens', async () => {
- const totalSupply = new BigNumber(await zrxToken.totalSupply.callAsync());
- const expectedTotalSupply = 1000000000;
- expect(Web3Wrapper.toUnitAmount(totalSupply, 18)).to.be.bignumber.equal(expectedTotalSupply);
- });
-
- it('should be named 0x Protocol Token', async () => {
- const name = await zrxToken.name.callAsync();
- const expectedName = '0x Protocol Token';
- expect(name).to.be.equal(expectedName);
- });
-
- it('should have the symbol ZRX', async () => {
- const symbol = await zrxToken.symbol.callAsync();
- const expectedSymbol = 'ZRX';
- expect(symbol).to.be.equal(expectedSymbol);
- });
- });
-
- describe('constructor', () => {
- it('should initialize owner balance to totalSupply', async () => {
- const ownerBalance = await zrxToken.balanceOf.callAsync(owner);
- const totalSupply = new BigNumber(await zrxToken.totalSupply.callAsync());
- expect(totalSupply).to.be.bignumber.equal(ownerBalance);
- });
- });
-
- describe('transfer', () => {
- it('should transfer balance from sender to receiver', async () => {
- const receiver = spender;
- const initOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const amountToTransfer = new BigNumber(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transfer.sendTransactionAsync(receiver, amountToTransfer, { from: owner }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const finalOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const finalReceiverBalance = await zrxToken.balanceOf.callAsync(receiver);
-
- const expectedFinalOwnerBalance = initOwnerBalance.minus(amountToTransfer);
- const expectedFinalReceiverBalance = amountToTransfer;
- expect(finalOwnerBalance).to.be.bignumber.equal(expectedFinalOwnerBalance);
- expect(finalReceiverBalance).to.be.bignumber.equal(expectedFinalReceiverBalance);
- });
-
- it('should return true on a 0 value transfer', async () => {
- const didReturnTrue = await zrxToken.transfer.callAsync(spender, new BigNumber(0), {
- from: owner,
- });
- expect(didReturnTrue).to.be.true();
- });
- });
-
- describe('transferFrom', () => {
- it('should return false if owner has insufficient balance', async () => {
- const ownerBalance = await zrxToken.balanceOf.callAsync(owner);
- const amountToTransfer = ownerBalance.plus(1);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(spender, amountToTransfer, {
- from: owner,
- gas: constants.MAX_TOKEN_APPROVE_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- const didReturnTrue = await zrxToken.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- });
- expect(didReturnTrue).to.be.false();
- });
-
- it('should return false if spender has insufficient allowance', async () => {
- const ownerBalance = await zrxToken.balanceOf.callAsync(owner);
- const amountToTransfer = ownerBalance;
-
- const spenderAllowance = await zrxToken.allowance.callAsync(owner, spender);
- const isSpenderAllowanceInsufficient = spenderAllowance.comparedTo(amountToTransfer) < 0;
- expect(isSpenderAllowanceInsufficient).to.be.true();
-
- const didReturnTrue = await zrxToken.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- });
- expect(didReturnTrue).to.be.false();
- });
-
- it('should return true on a 0 value transfer', async () => {
- const amountToTransfer = new BigNumber(0);
- const didReturnTrue = await zrxToken.transferFrom.callAsync(owner, spender, amountToTransfer, {
- from: spender,
- });
- expect(didReturnTrue).to.be.true();
- });
-
- it('should not modify spender allowance if spender allowance is 2^256 - 1', async () => {
- const initOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const amountToTransfer = initOwnerBalance;
- const initSpenderAllowance = MAX_UINT;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(spender, initSpenderAllowance, {
- from: owner,
- gas: constants.MAX_TOKEN_APPROVE_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newSpenderAllowance = await zrxToken.allowance.callAsync(owner, spender);
- expect(initSpenderAllowance).to.be.bignumber.equal(newSpenderAllowance);
- });
-
- it('should transfer the correct balances if spender has sufficient allowance', async () => {
- const initOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const initSpenderBalance = await zrxToken.balanceOf.callAsync(spender);
- const amountToTransfer = initOwnerBalance;
- const initSpenderAllowance = initOwnerBalance;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(spender, initSpenderAllowance),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const newSpenderBalance = await zrxToken.balanceOf.callAsync(spender);
-
- expect(newOwnerBalance).to.be.bignumber.equal(0);
- expect(newSpenderBalance).to.be.bignumber.equal(initSpenderBalance.plus(initOwnerBalance));
- });
-
- it('should modify allowance if spender has sufficient allowance less than 2^256 - 1', async () => {
- const initOwnerBalance = await zrxToken.balanceOf.callAsync(owner);
- const amountToTransfer = initOwnerBalance;
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.approve.sendTransactionAsync(spender, amountToTransfer),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transferFrom.sendTransactionAsync(owner, spender, amountToTransfer, {
- from: spender,
- gas: constants.MAX_TOKEN_TRANSFERFROM_GAS,
- }),
- constants.AWAIT_TRANSACTION_MINED_MS,
- );
-
- const newSpenderAllowance = await zrxToken.allowance.callAsync(owner, spender);
- expect(newSpenderAllowance).to.be.bignumber.equal(0);
- });
- });
-});
diff --git a/contracts/tokens/tsconfig.json b/contracts/tokens/tsconfig.json
deleted file mode 100644
index 0d5f98cb8..000000000
--- a/contracts/tokens/tsconfig.json
+++ /dev/null
@@ -1,33 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/DummyERC20Token.json",
- "./generated-artifacts/DummyMultipleReturnERC20Token.json",
- "./generated-artifacts/DummyNoReturnERC20Token.json",
- "./generated-artifacts/DummyERC721Receiver.json",
- "./generated-artifacts/InvalidERC721Receiver.json",
- "./generated-artifacts/DummyERC721Token.json",
- "./generated-artifacts/ReentrantERC20Token.json",
- "./generated-artifacts/ERC20Token.json",
- "./generated-artifacts/IERC20Token.json",
- "./generated-artifacts/MintableERC20Token.json",
- "./generated-artifacts/UnlimitedAllowanceERC20Token.json",
- "./generated-artifacts/ERC721Token.json",
- "./generated-artifacts/IERC721Receiver.json",
- "./generated-artifacts/IERC721Token.json",
- "./generated-artifacts/MintableERC721Token.json",
- "./generated-artifacts/IEtherToken.json",
- "./generated-artifacts/WETH9.json",
- "./generated-artifacts/ERC20Token_v1.json",
- "./generated-artifacts/Token_v1.json",
- "./generated-artifacts/UnlimitedAllowanceToken_v1.json",
- "./generated-artifacts/ZRXToken.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/tokens/tslint.json b/contracts/tokens/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/tokens/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/contracts/utils/CHANGELOG.json b/contracts/utils/CHANGELOG.json
deleted file mode 100644
index 724ab1e4a..000000000
--- a/contracts/utils/CHANGELOG.json
+++ /dev/null
@@ -1,56 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1544741676,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/contracts/utils/CHANGELOG.md b/contracts/utils/CHANGELOG.md
deleted file mode 100644
index 59d0804da..000000000
--- a/contracts/utils/CHANGELOG.md
+++ /dev/null
@@ -1,26 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.6 - _January 17, 2019_
-
- * Dependencies updated
-
-## v1.0.5 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.4 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.3 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.2 - _December 13, 2018_
-
- * Dependencies updated
diff --git a/contracts/utils/README.md b/contracts/utils/README.md
deleted file mode 100644
index 2f872ddb5..000000000
--- a/contracts/utils/README.md
+++ /dev/null
@@ -1,70 +0,0 @@
-## Contracts utils
-
-Smart contracts utils used in the 0x protocol.
-
-## Usage
-
-Contracts can be found in the [contracts](./contracts) directory. The contents of this directory are broken down into the following subdirectories:
-
-- [utils](./contracts/utils)
- - This directory contains libraries and utils.
-- [test](./contracts/test)
- - This directory contains mocks and other contracts that are used solely for testing contracts within the other directories.
-
-## 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.
-
-For proposals regarding the 0x protocol's smart contract architecture, message format, or additional functionality, go to the [0x Improvement Proposals (ZEIPs)](https://github.com/0xProject/ZEIPs) repository and follow the contribution guidelines provided therein.
-
-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/contracts-utils yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/contracts-utils yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
-
-#### Testing options
-
-Contracts testing options like coverage, profiling, revert traces or backing node choosing - are described [here](../TESTING.md).
diff --git a/contracts/utils/compiler.json b/contracts/utils/compiler.json
deleted file mode 100644
index 1524c1eaa..000000000
--- a/contracts/utils/compiler.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "artifactsDir": "./generated-artifacts",
- "contractsDir": "./contracts",
- "compilerSettings": {
- "optimizer": {
- "enabled": true,
- "runs": 1000000
- },
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- },
- "contracts": ["TestConstants", "TestLibBytes", "LibBytes", "Ownable", "IOwnable", "ReentrancyGuard", "SafeMath"]
-}
diff --git a/contracts/utils/contracts/test/TestConstants/TestConstants.sol b/contracts/utils/contracts/test/TestConstants/TestConstants.sol
deleted file mode 100644
index 3c852173b..000000000
--- a/contracts/utils/contracts/test/TestConstants/TestConstants.sol
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-// solhint-disable max-line-length
-contract TestConstants {
-
- using LibBytes for bytes;
-
- bytes4 constant internal ERC20_PROXY_ID = bytes4(keccak256("ERC20Token(address)"));
-
- address constant internal KOVAN_ZRX_ADDRESS = 0x6Ff6C0Ff1d68b964901F986d4C9FA3ac68346570;
- bytes constant internal KOVAN_ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x6f\xf6\xc0\xff\x1d\x68\xb9\x64\x90\x1f\x98\x6d\x4c\x9f\xa3\xac\x68\x34\x65\x70";
-
- address constant internal MAINNET_ZRX_ADDRESS = 0xE41d2489571d322189246DaFA5ebDe1F4699F498;
- bytes constant public MAINNET_ZRX_ASSET_DATA = "\xf4\x72\x61\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\xe4\x1d\x24\x89\x57\x1d\x32\x21\x89\x24\x6d\xaf\xa5\xeb\xde\x1f\x46\x99\xf4\x98";
-
- function assertValidZrxAssetData()
- public
- pure
- returns (bool)
- {
- bytes memory kovanZrxAssetData = abi.encodeWithSelector(ERC20_PROXY_ID, KOVAN_ZRX_ADDRESS);
- require(
- kovanZrxAssetData.equals(KOVAN_ZRX_ASSET_DATA),
- "INVALID_KOVAN_ZRX_ASSET_DATA"
- );
-
- bytes memory mainetZrxAssetData = abi.encodeWithSelector(ERC20_PROXY_ID, MAINNET_ZRX_ADDRESS);
- require(
- mainetZrxAssetData.equals(MAINNET_ZRX_ASSET_DATA),
- "INVALID_MAINNET_ZRX_ASSET_DATA"
- );
-
- return true;
- }
-}
-// solhint-enable max-line-length \ No newline at end of file
diff --git a/contracts/utils/contracts/test/TestLibBytes/TestLibBytes.sol b/contracts/utils/contracts/test/TestLibBytes/TestLibBytes.sol
deleted file mode 100644
index 444a3e717..000000000
--- a/contracts/utils/contracts/test/TestLibBytes/TestLibBytes.sol
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity 0.4.24;
-
-import "@0x/contracts-utils/contracts/utils/LibBytes/LibBytes.sol";
-
-
-contract TestLibBytes {
-
- using LibBytes for bytes;
-
- /// @dev Pops the last byte off of a byte array by modifying its length.
- /// @param b Byte array that will be modified.
- /// @return The byte that was popped off.
- function publicPopLastByte(bytes memory b)
- public
- pure
- returns (bytes memory, bytes1 result)
- {
- result = b.popLastByte();
- return (b, result);
- }
-
- /// @dev Pops the last 20 bytes off of a byte array by modifying its length.
- /// @param b Byte array that will be modified.
- /// @return The 20 byte address that was popped off.
- function publicPopLast20Bytes(bytes memory b)
- public
- pure
- returns (bytes memory, address result)
- {
- result = b.popLast20Bytes();
- return (b, result);
- }
-
- /// @dev Tests equality of two byte arrays.
- /// @param lhs First byte array to compare.
- /// @param rhs Second byte array to compare.
- /// @return True if arrays are the same. False otherwise.
- function publicEquals(bytes memory lhs, bytes memory rhs)
- public
- pure
- returns (bool equal)
- {
- equal = lhs.equals(rhs);
- return equal;
- }
-
- function publicEqualsPop1(bytes memory lhs, bytes memory rhs)
- public
- pure
- returns (bool equal)
- {
- lhs.popLastByte();
- rhs.popLastByte();
- equal = lhs.equals(rhs);
- return equal;
- }
-
- /// @dev Performs a deep copy of a byte array onto another byte array of greater than or equal length.
- /// @param dest Byte array that will be overwritten with source bytes.
- /// @param source Byte array to copy onto dest bytes.
- function publicDeepCopyBytes(
- bytes memory dest,
- bytes memory source
- )
- public
- pure
- returns (bytes memory)
- {
- LibBytes.deepCopyBytes(dest, source);
- return dest;
- }
-
- /// @dev Reads an address from a position in a byte array.
- /// @param b Byte array containing an address.
- /// @param index Index in byte array of address.
- /// @return address from byte array.
- function publicReadAddress(
- bytes memory b,
- uint256 index
- )
- public
- pure
- returns (address result)
- {
- result = b.readAddress(index);
- return result;
- }
-
- /// @dev Writes an address into a specific position in a byte array.
- /// @param b Byte array to insert address into.
- /// @param index Index in byte array of address.
- /// @param input Address to put into byte array.
- function publicWriteAddress(
- bytes memory b,
- uint256 index,
- address input
- )
- public
- pure
- returns (bytes memory)
- {
- b.writeAddress(index, input);
- return b;
- }
-
- /// @dev Reads a bytes32 value from a position in a byte array.
- /// @param b Byte array containing a bytes32 value.
- /// @param index Index in byte array of bytes32 value.
- /// @return bytes32 value from byte array.
- function publicReadBytes32(
- bytes memory b,
- uint256 index
- )
- public
- pure
- returns (bytes32 result)
- {
- result = b.readBytes32(index);
- return result;
- }
-
- /// @dev Writes a bytes32 into a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input bytes32 to put into byte array.
- function publicWriteBytes32(
- bytes memory b,
- uint256 index,
- bytes32 input
- )
- public
- pure
- returns (bytes memory)
- {
- b.writeBytes32(index, input);
- return b;
- }
-
- /// @dev Reads a uint256 value from a position in a byte array.
- /// @param b Byte array containing a uint256 value.
- /// @param index Index in byte array of uint256 value.
- /// @return uint256 value from byte array.
- function publicReadUint256(
- bytes memory b,
- uint256 index
- )
- public
- pure
- returns (uint256 result)
- {
- result = b.readUint256(index);
- return result;
- }
-
- /// @dev Writes a uint256 into a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input uint256 to put into byte array.
- function publicWriteUint256(
- bytes memory b,
- uint256 index,
- uint256 input
- )
- public
- pure
- returns (bytes memory)
- {
- b.writeUint256(index, input);
- return b;
- }
-
- /// @dev Reads an unpadded bytes4 value from a position in a byte array.
- /// @param b Byte array containing a bytes4 value.
- /// @param index Index in byte array of bytes4 value.
- /// @return bytes4 value from byte array.
- function publicReadBytes4(
- bytes memory b,
- uint256 index
- )
- public
- pure
- returns (bytes4 result)
- {
- result = b.readBytes4(index);
- return result;
- }
-
- /// @dev Reads nested bytes from a specific position.
- /// @param b Byte array containing nested bytes.
- /// @param index Index of nested bytes.
- /// @return result Nested bytes.
- function publicReadBytesWithLength(
- bytes memory b,
- uint256 index
- )
- public
- pure
- returns (bytes memory result)
- {
- result = b.readBytesWithLength(index);
- return result;
- }
-
- /// @dev Inserts bytes at a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input bytes to insert.
- /// @return b Updated input byte array
- function publicWriteBytesWithLength(
- bytes memory b,
- uint256 index,
- bytes memory input
- )
- public
- pure
- returns (bytes memory)
- {
- b.writeBytesWithLength(index, input);
- return b;
- }
-
- /// @dev Copies a block of memory from one location to another.
- /// @param mem Memory contents we want to apply memCopy to
- /// @param dest Destination offset into <mem>.
- /// @param source Source offset into <mem>.
- /// @param length Length of bytes to copy from <source> to <dest>
- /// @return mem Memory contents after calling memCopy.
- function testMemcpy(
- bytes mem,
- uint256 dest,
- uint256 source,
- uint256 length
- )
- public // not external, we need input in memory
- pure
- returns (bytes)
- {
- // Sanity check. Overflows are not checked.
- require(source + length <= mem.length);
- require(dest + length <= mem.length);
-
- // Get pointer to memory contents
- uint256 offset = mem.contentAddress();
-
- // Execute memCopy adjusted for memory array location
- LibBytes.memCopy(offset + dest, offset + source, length);
-
- // Return modified memory contents
- return mem;
- }
-}
diff --git a/contracts/utils/contracts/utils/LibBytes/LibBytes.sol b/contracts/utils/contracts/utils/LibBytes/LibBytes.sol
deleted file mode 100644
index 4ee6228d5..000000000
--- a/contracts/utils/contracts/utils/LibBytes/LibBytes.sol
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-library LibBytes {
-
- using LibBytes for bytes;
-
- /// @dev Gets the memory address for a byte array.
- /// @param input Byte array to lookup.
- /// @return memoryAddress Memory address of byte array. This
- /// points to the header of the byte array which contains
- /// the length.
- function rawAddress(bytes memory input)
- internal
- pure
- returns (uint256 memoryAddress)
- {
- assembly {
- memoryAddress := input
- }
- return memoryAddress;
- }
-
- /// @dev Gets the memory address for the contents of a byte array.
- /// @param input Byte array to lookup.
- /// @return memoryAddress Memory address of the contents of the byte array.
- function contentAddress(bytes memory input)
- internal
- pure
- returns (uint256 memoryAddress)
- {
- assembly {
- memoryAddress := add(input, 32)
- }
- return memoryAddress;
- }
-
- /// @dev Copies `length` bytes from memory location `source` to `dest`.
- /// @param dest memory address to copy bytes to.
- /// @param source memory address to copy bytes from.
- /// @param length number of bytes to copy.
- function memCopy(
- uint256 dest,
- uint256 source,
- uint256 length
- )
- internal
- pure
- {
- if (length < 32) {
- // Handle a partial word by reading destination and masking
- // off the bits we are interested in.
- // This correctly handles overlap, zero lengths and source == dest
- assembly {
- let mask := sub(exp(256, sub(32, length)), 1)
- let s := and(mload(source), not(mask))
- let d := and(mload(dest), mask)
- mstore(dest, or(s, d))
- }
- } else {
- // Skip the O(length) loop when source == dest.
- if (source == dest) {
- return;
- }
-
- // For large copies we copy whole words at a time. The final
- // word is aligned to the end of the range (instead of after the
- // previous) to handle partial words. So a copy will look like this:
- //
- // ####
- // ####
- // ####
- // ####
- //
- // We handle overlap in the source and destination range by
- // changing the copying direction. This prevents us from
- // overwriting parts of source that we still need to copy.
- //
- // This correctly handles source == dest
- //
- if (source > dest) {
- assembly {
- // We subtract 32 from `sEnd` and `dEnd` because it
- // is easier to compare with in the loop, and these
- // are also the addresses we need for copying the
- // last bytes.
- length := sub(length, 32)
- let sEnd := add(source, length)
- let dEnd := add(dest, length)
-
- // Remember the last 32 bytes of source
- // This needs to be done here and not after the loop
- // because we may have overwritten the last bytes in
- // source already due to overlap.
- let last := mload(sEnd)
-
- // Copy whole words front to back
- // Note: the first check is always true,
- // this could have been a do-while loop.
- // solhint-disable-next-line no-empty-blocks
- for {} lt(source, sEnd) {} {
- mstore(dest, mload(source))
- source := add(source, 32)
- dest := add(dest, 32)
- }
-
- // Write the last 32 bytes
- mstore(dEnd, last)
- }
- } else {
- assembly {
- // We subtract 32 from `sEnd` and `dEnd` because those
- // are the starting points when copying a word at the end.
- length := sub(length, 32)
- let sEnd := add(source, length)
- let dEnd := add(dest, length)
-
- // Remember the first 32 bytes of source
- // This needs to be done here and not after the loop
- // because we may have overwritten the first bytes in
- // source already due to overlap.
- let first := mload(source)
-
- // Copy whole words back to front
- // We use a signed comparisson here to allow dEnd to become
- // negative (happens when source and dest < 32). Valid
- // addresses in local memory will never be larger than
- // 2**255, so they can be safely re-interpreted as signed.
- // Note: the first check is always true,
- // this could have been a do-while loop.
- // solhint-disable-next-line no-empty-blocks
- for {} slt(dest, dEnd) {} {
- mstore(dEnd, mload(sEnd))
- sEnd := sub(sEnd, 32)
- dEnd := sub(dEnd, 32)
- }
-
- // Write the first 32 bytes
- mstore(dest, first)
- }
- }
- }
- }
-
- /// @dev Returns a slices from a byte array.
- /// @param b The byte array to take a slice from.
- /// @param from The starting index for the slice (inclusive).
- /// @param to The final index for the slice (exclusive).
- /// @return result The slice containing bytes at indices [from, to)
- function slice(
- bytes memory b,
- uint256 from,
- uint256 to
- )
- internal
- pure
- returns (bytes memory result)
- {
- require(
- from <= to,
- "FROM_LESS_THAN_TO_REQUIRED"
- );
- require(
- to < b.length,
- "TO_LESS_THAN_LENGTH_REQUIRED"
- );
-
- // Create a new bytes structure and copy contents
- result = new bytes(to - from);
- memCopy(
- result.contentAddress(),
- b.contentAddress() + from,
- result.length
- );
- return result;
- }
-
- /// @dev Returns a slice from a byte array without preserving the input.
- /// @param b The byte array to take a slice from. Will be destroyed in the process.
- /// @param from The starting index for the slice (inclusive).
- /// @param to The final index for the slice (exclusive).
- /// @return result The slice containing bytes at indices [from, to)
- /// @dev When `from == 0`, the original array will match the slice. In other cases its state will be corrupted.
- function sliceDestructive(
- bytes memory b,
- uint256 from,
- uint256 to
- )
- internal
- pure
- returns (bytes memory result)
- {
- require(
- from <= to,
- "FROM_LESS_THAN_TO_REQUIRED"
- );
- require(
- to < b.length,
- "TO_LESS_THAN_LENGTH_REQUIRED"
- );
-
- // Create a new bytes structure around [from, to) in-place.
- assembly {
- result := add(b, from)
- mstore(result, sub(to, from))
- }
- return result;
- }
-
- /// @dev Pops the last byte off of a byte array by modifying its length.
- /// @param b Byte array that will be modified.
- /// @return The byte that was popped off.
- function popLastByte(bytes memory b)
- internal
- pure
- returns (bytes1 result)
- {
- require(
- b.length > 0,
- "GREATER_THAN_ZERO_LENGTH_REQUIRED"
- );
-
- // Store last byte.
- result = b[b.length - 1];
-
- assembly {
- // Decrement length of byte array.
- let newLen := sub(mload(b), 1)
- mstore(b, newLen)
- }
- return result;
- }
-
- /// @dev Pops the last 20 bytes off of a byte array by modifying its length.
- /// @param b Byte array that will be modified.
- /// @return The 20 byte address that was popped off.
- function popLast20Bytes(bytes memory b)
- internal
- pure
- returns (address result)
- {
- require(
- b.length >= 20,
- "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED"
- );
-
- // Store last 20 bytes.
- result = readAddress(b, b.length - 20);
-
- assembly {
- // Subtract 20 from byte array length.
- let newLen := sub(mload(b), 20)
- mstore(b, newLen)
- }
- return result;
- }
-
- /// @dev Tests equality of two byte arrays.
- /// @param lhs First byte array to compare.
- /// @param rhs Second byte array to compare.
- /// @return True if arrays are the same. False otherwise.
- function equals(
- bytes memory lhs,
- bytes memory rhs
- )
- internal
- pure
- returns (bool equal)
- {
- // Keccak gas cost is 30 + numWords * 6. This is a cheap way to compare.
- // We early exit on unequal lengths, but keccak would also correctly
- // handle this.
- return lhs.length == rhs.length && keccak256(lhs) == keccak256(rhs);
- }
-
- /// @dev Reads an address from a position in a byte array.
- /// @param b Byte array containing an address.
- /// @param index Index in byte array of address.
- /// @return address from byte array.
- function readAddress(
- bytes memory b,
- uint256 index
- )
- internal
- pure
- returns (address result)
- {
- require(
- b.length >= index + 20, // 20 is length of address
- "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED"
- );
-
- // Add offset to index:
- // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
- // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
- index += 20;
-
- // Read address from array memory
- assembly {
- // 1. Add index to address of bytes array
- // 2. Load 32-byte word from memory
- // 3. Apply 20-byte mask to obtain address
- result := and(mload(add(b, index)), 0xffffffffffffffffffffffffffffffffffffffff)
- }
- return result;
- }
-
- /// @dev Writes an address into a specific position in a byte array.
- /// @param b Byte array to insert address into.
- /// @param index Index in byte array of address.
- /// @param input Address to put into byte array.
- function writeAddress(
- bytes memory b,
- uint256 index,
- address input
- )
- internal
- pure
- {
- require(
- b.length >= index + 20, // 20 is length of address
- "GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED"
- );
-
- // Add offset to index:
- // 1. Arrays are prefixed by 32-byte length parameter (add 32 to index)
- // 2. Account for size difference between address length and 32-byte storage word (subtract 12 from index)
- index += 20;
-
- // Store address into array memory
- assembly {
- // The address occupies 20 bytes and mstore stores 32 bytes.
- // First fetch the 32-byte word where we'll be storing the address, then
- // apply a mask so we have only the bytes in the word that the address will not occupy.
- // Then combine these bytes with the address and store the 32 bytes back to memory with mstore.
-
- // 1. Add index to address of bytes array
- // 2. Load 32-byte word from memory
- // 3. Apply 12-byte mask to obtain extra bytes occupying word of memory where we'll store the address
- let neighbors := and(
- mload(add(b, index)),
- 0xffffffffffffffffffffffff0000000000000000000000000000000000000000
- )
-
- // Make sure input address is clean.
- // (Solidity does not guarantee this)
- input := and(input, 0xffffffffffffffffffffffffffffffffffffffff)
-
- // Store the neighbors and address into memory
- mstore(add(b, index), xor(input, neighbors))
- }
- }
-
- /// @dev Reads a bytes32 value from a position in a byte array.
- /// @param b Byte array containing a bytes32 value.
- /// @param index Index in byte array of bytes32 value.
- /// @return bytes32 value from byte array.
- function readBytes32(
- bytes memory b,
- uint256 index
- )
- internal
- pure
- returns (bytes32 result)
- {
- require(
- b.length >= index + 32,
- "GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED"
- );
-
- // Arrays are prefixed by a 256 bit length parameter
- index += 32;
-
- // Read the bytes32 from array memory
- assembly {
- result := mload(add(b, index))
- }
- return result;
- }
-
- /// @dev Writes a bytes32 into a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input bytes32 to put into byte array.
- function writeBytes32(
- bytes memory b,
- uint256 index,
- bytes32 input
- )
- internal
- pure
- {
- require(
- b.length >= index + 32,
- "GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED"
- );
-
- // Arrays are prefixed by a 256 bit length parameter
- index += 32;
-
- // Read the bytes32 from array memory
- assembly {
- mstore(add(b, index), input)
- }
- }
-
- /// @dev Reads a uint256 value from a position in a byte array.
- /// @param b Byte array containing a uint256 value.
- /// @param index Index in byte array of uint256 value.
- /// @return uint256 value from byte array.
- function readUint256(
- bytes memory b,
- uint256 index
- )
- internal
- pure
- returns (uint256 result)
- {
- result = uint256(readBytes32(b, index));
- return result;
- }
-
- /// @dev Writes a uint256 into a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input uint256 to put into byte array.
- function writeUint256(
- bytes memory b,
- uint256 index,
- uint256 input
- )
- internal
- pure
- {
- writeBytes32(b, index, bytes32(input));
- }
-
- /// @dev Reads an unpadded bytes4 value from a position in a byte array.
- /// @param b Byte array containing a bytes4 value.
- /// @param index Index in byte array of bytes4 value.
- /// @return bytes4 value from byte array.
- function readBytes4(
- bytes memory b,
- uint256 index
- )
- internal
- pure
- returns (bytes4 result)
- {
- require(
- b.length >= index + 4,
- "GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED"
- );
-
- // Arrays are prefixed by a 32 byte length field
- index += 32;
-
- // Read the bytes4 from array memory
- assembly {
- result := mload(add(b, index))
- // Solidity does not require us to clean the trailing bytes.
- // We do it anyway
- result := and(result, 0xFFFFFFFF00000000000000000000000000000000000000000000000000000000)
- }
- return result;
- }
-
- /// @dev Reads nested bytes from a specific position.
- /// @dev NOTE: the returned value overlaps with the input value.
- /// Both should be treated as immutable.
- /// @param b Byte array containing nested bytes.
- /// @param index Index of nested bytes.
- /// @return result Nested bytes.
- function readBytesWithLength(
- bytes memory b,
- uint256 index
- )
- internal
- pure
- returns (bytes memory result)
- {
- // Read length of nested bytes
- uint256 nestedBytesLength = readUint256(b, index);
- index += 32;
-
- // Assert length of <b> is valid, given
- // length of nested bytes
- require(
- b.length >= index + nestedBytesLength,
- "GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED"
- );
-
- // Return a pointer to the byte array as it exists inside `b`
- assembly {
- result := add(b, index)
- }
- return result;
- }
-
- /// @dev Inserts bytes at a specific position in a byte array.
- /// @param b Byte array to insert <input> into.
- /// @param index Index in byte array of <input>.
- /// @param input bytes to insert.
- function writeBytesWithLength(
- bytes memory b,
- uint256 index,
- bytes memory input
- )
- internal
- pure
- {
- // Assert length of <b> is valid, given
- // length of input
- require(
- b.length >= index + 32 + input.length, // 32 bytes to store length
- "GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED"
- );
-
- // Copy <input> into <b>
- memCopy(
- b.contentAddress() + index,
- input.rawAddress(), // includes length of <input>
- input.length + 32 // +32 bytes to store <input> length
- );
- }
-
- /// @dev Performs a deep copy of a byte array onto another byte array of greater than or equal length.
- /// @param dest Byte array that will be overwritten with source bytes.
- /// @param source Byte array to copy onto dest bytes.
- function deepCopyBytes(
- bytes memory dest,
- bytes memory source
- )
- internal
- pure
- {
- uint256 sourceLen = source.length;
- // Dest length must be >= source length, or some bytes would not be copied.
- require(
- dest.length >= sourceLen,
- "GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED"
- );
- memCopy(
- dest.contentAddress(),
- source.contentAddress(),
- sourceLen
- );
- }
-}
diff --git a/contracts/utils/contracts/utils/Ownable/IOwnable.sol b/contracts/utils/contracts/utils/Ownable/IOwnable.sol
deleted file mode 100644
index c0cbfddfd..000000000
--- a/contracts/utils/contracts/utils/Ownable/IOwnable.sol
+++ /dev/null
@@ -1,8 +0,0 @@
-pragma solidity ^0.4.24;
-
-
-contract IOwnable {
-
- function transferOwnership(address newOwner)
- public;
-}
diff --git a/contracts/utils/contracts/utils/Ownable/Ownable.sol b/contracts/utils/contracts/utils/Ownable/Ownable.sol
deleted file mode 100644
index aa74a72d2..000000000
--- a/contracts/utils/contracts/utils/Ownable/Ownable.sol
+++ /dev/null
@@ -1,33 +0,0 @@
-pragma solidity ^0.4.24;
-
-import "./IOwnable.sol";
-
-
-contract Ownable is
- IOwnable
-{
- address public owner;
-
- constructor ()
- public
- {
- owner = msg.sender;
- }
-
- modifier onlyOwner() {
- require(
- msg.sender == owner,
- "ONLY_CONTRACT_OWNER"
- );
- _;
- }
-
- function transferOwnership(address newOwner)
- public
- onlyOwner
- {
- if (newOwner != address(0)) {
- owner = newOwner;
- }
- }
-}
diff --git a/contracts/utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol b/contracts/utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol
deleted file mode 100644
index 1a02c88a4..000000000
--- a/contracts/utils/contracts/utils/ReentrancyGuard/ReentrancyGuard.sol
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
- Copyright 2018 ZeroEx Intl.
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
-*/
-
-pragma solidity ^0.4.24;
-
-
-contract ReentrancyGuard {
-
- // Locked state of mutex
- bool private locked = false;
-
- /// @dev Functions with this modifer cannot be reentered. The mutex will be locked
- /// before function execution and unlocked after.
- modifier nonReentrant() {
- // Ensure mutex is unlocked
- require(
- !locked,
- "REENTRANCY_ILLEGAL"
- );
-
- // Lock mutex before function call
- locked = true;
-
- // Perform function call
- _;
-
- // Unlock mutex after function call
- locked = false;
- }
-}
diff --git a/contracts/utils/contracts/utils/SafeMath/SafeMath.sol b/contracts/utils/contracts/utils/SafeMath/SafeMath.sol
deleted file mode 100644
index d7a4a603e..000000000
--- a/contracts/utils/contracts/utils/SafeMath/SafeMath.sol
+++ /dev/null
@@ -1,87 +0,0 @@
-pragma solidity ^0.4.24;
-
-
-contract SafeMath {
-
- function safeMul(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- if (a == 0) {
- return 0;
- }
- uint256 c = a * b;
- require(
- c / a == b,
- "UINT256_OVERFLOW"
- );
- return c;
- }
-
- function safeDiv(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- uint256 c = a / b;
- return c;
- }
-
- function safeSub(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- require(
- b <= a,
- "UINT256_UNDERFLOW"
- );
- return a - b;
- }
-
- function safeAdd(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- uint256 c = a + b;
- require(
- c >= a,
- "UINT256_OVERFLOW"
- );
- return c;
- }
-
- function max64(uint64 a, uint64 b)
- internal
- pure
- returns (uint256)
- {
- return a >= b ? a : b;
- }
-
- function min64(uint64 a, uint64 b)
- internal
- pure
- returns (uint256)
- {
- return a < b ? a : b;
- }
-
- function max256(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- return a >= b ? a : b;
- }
-
- function min256(uint256 a, uint256 b)
- internal
- pure
- returns (uint256)
- {
- return a < b ? a : b;
- }
-}
diff --git a/contracts/utils/package.json b/contracts/utils/package.json
deleted file mode 100644
index 4e45169fd..000000000
--- a/contracts/utils/package.json
+++ /dev/null
@@ -1,87 +0,0 @@
-{
- "name": "@0x/contracts-utils",
- "version": "1.0.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Smart contract utils of 0x protocol",
- "main": "lib/src/index.js",
- "directories": {
- "test": "test"
- },
- "scripts": {
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profiler": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "test:trace": "SOLIDITY_REVERT_TRACE=true run-s build run_mocha",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/**/*.js' --timeout 100000 --bail --exit",
- "compile": "sol-compiler",
- "watch": "sol-compiler -w",
- "clean": "shx rm -rf lib generated-artifacts generated-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 generated-wrappers --backend ethers",
- "lint": "tslint --format stylish --project . --exclude ./generated-wrappers/**/* --exclude ./generated-artifacts/**/* --exclude **/lib/**/* && yarn lint-contracts",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test",
- "lint-contracts": "solhint -c ../.solhint.json contracts/**/**/**/**/*.sol"
- },
- "config": {
- "abis": "generated-artifacts/@(IOwnable|Ownable|LibBytes|ReentrancyGuard|SafeMath|TestConstants|TestLibBytes).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/contracts/utils/README.md",
- "devDependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/contracts-test-utils": "^2.0.1",
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "@types/node": "*",
- "@types/yargs": "^10.0.0",
- "bn.js": "^4.11.8",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ethereumjs-abi": "0.6.5",
- "make-promises-safe": "^1.1.0",
- "mocha": "^4.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "solhint": "^1.4.1",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/base-contract": "^3.0.13",
- "@0x/contracts-multisig": "^1.0.6",
- "@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-util": "^5.1.1",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/contracts/utils/src/artifacts/index.ts b/contracts/utils/src/artifacts/index.ts
deleted file mode 100644
index a5c2b215c..000000000
--- a/contracts/utils/src/artifacts/index.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { ContractArtifact } from 'ethereum-types';
-
-import * as IOwnable from '../../generated-artifacts/IOwnable.json';
-import * as LibBytes from '../../generated-artifacts/LibBytes.json';
-import * as Ownable from '../../generated-artifacts/Ownable.json';
-import * as ReentrancyGuard from '../../generated-artifacts/ReentrancyGuard.json';
-import * as SafeMath from '../../generated-artifacts/SafeMath.json';
-import * as TestConstants from '../../generated-artifacts/TestConstants.json';
-import * as TestLibBytes from '../../generated-artifacts/TestLibBytes.json';
-
-export const artifacts = {
- TestConstants: TestConstants as ContractArtifact,
- TestLibBytes: TestLibBytes as ContractArtifact,
- IOwnable: IOwnable as ContractArtifact,
- LibBytes: LibBytes as ContractArtifact,
- Ownable: Ownable as ContractArtifact,
- SafeMath: SafeMath as ContractArtifact,
- ReentrancyGuard: ReentrancyGuard as ContractArtifact,
-};
diff --git a/contracts/utils/src/index.ts b/contracts/utils/src/index.ts
deleted file mode 100644
index d55f08ea2..000000000
--- a/contracts/utils/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from './artifacts';
-export * from './wrappers';
diff --git a/contracts/utils/src/wrappers/index.ts b/contracts/utils/src/wrappers/index.ts
deleted file mode 100644
index 823b7fa4b..000000000
--- a/contracts/utils/src/wrappers/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export * from '../../generated-wrappers/test_constants';
-export * from '../../generated-wrappers/test_lib_bytes';
diff --git a/contracts/utils/test/global_hooks.ts b/contracts/utils/test/global_hooks.ts
deleted file mode 100644
index f8ace376a..000000000
--- a/contracts/utils/test/global_hooks.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage, profiler, provider } from '@0x/contracts-test-utils';
-before('start web3 provider', () => {
- provider.start();
-});
-after('generate coverage report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
- provider.stop();
-});
diff --git a/contracts/utils/test/lib_bytes.ts b/contracts/utils/test/lib_bytes.ts
deleted file mode 100644
index 6fb859c67..000000000
--- a/contracts/utils/test/lib_bytes.ts
+++ /dev/null
@@ -1,875 +0,0 @@
-import {
- chaiSetup,
- constants,
- expectContractCallFailedAsync,
- provider,
- txDefaults,
- typeEncodingUtils,
- web3Wrapper,
-} from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { generatePseudoRandomSalt } from '@0x/order-utils';
-import { RevertReason } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import BN = require('bn.js');
-import * as chai from 'chai';
-import ethUtil = require('ethereumjs-util');
-import * as _ from 'lodash';
-
-import { TestLibBytesContract } from '../generated-wrappers/test_lib_bytes';
-import { artifacts } from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-// BUG: Ideally we would use Buffer.from(memory).toString('hex')
-// https://github.com/Microsoft/TypeScript/issues/23155
-const toHex = (buf: Uint8Array): string => buf.reduce((a, v) => a + `00${v.toString(16)}`.slice(-2), '0x');
-
-const fromHex = (str: string): Uint8Array => Uint8Array.from(Buffer.from(str.slice(2), 'hex'));
-
-describe('LibBytes', () => {
- let libBytes: TestLibBytesContract;
- const byteArrayShorterThan32Bytes = '0x012345';
- const byteArrayShorterThan20Bytes = byteArrayShorterThan32Bytes;
- const byteArrayLongerThan32Bytes =
- '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef';
- const byteArrayLongerThan32BytesFirstBytesSwapped =
- '0x2301456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef';
- const byteArrayLongerThan32BytesLastBytesSwapped =
- '0x0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef0123456789abefcd';
- let testAddress: string;
- let testAddressB: string;
- const testBytes32 = '0x102030405060708090a0b0c0d0e0f0102030405060708090a0b0c0d0e0f01020';
- const testBytes32B = '0x534877abd8443578526845cdfef020047528759477fedef87346527659aced32';
- const testUint256 = new BigNumber(testBytes32, 16);
- const testUint256B = new BigNumber(testBytes32B, 16);
- const testBytes4 = '0xabcdef12';
- const testByte = '0xab';
- let shortData: string;
- let shortTestBytes: string;
- let shortTestBytesAsBuffer: Buffer;
- let wordOfData: string;
- let wordOfTestBytes: string;
- let wordOfTestBytesAsBuffer: Buffer;
- let longData: string;
- let longTestBytes: string;
- let longTestBytesAsBuffer: Buffer;
-
- before(async () => {
- await blockchainLifecycle.startAsync();
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- before(async () => {
- // Setup accounts & addresses
- const accounts = await web3Wrapper.getAvailableAddressesAsync();
- testAddress = accounts[1];
- testAddressB = accounts[2];
- // Deploy LibBytes
- libBytes = await TestLibBytesContract.deployFrom0xArtifactAsync(artifacts.TestLibBytes, provider, txDefaults);
- // Verify lengths of test data
- const byteArrayShorterThan32BytesLength = ethUtil.toBuffer(byteArrayShorterThan32Bytes).byteLength;
- expect(byteArrayShorterThan32BytesLength).to.be.lessThan(32);
- const byteArrayLongerThan32BytesLength = ethUtil.toBuffer(byteArrayLongerThan32Bytes).byteLength;
- expect(byteArrayLongerThan32BytesLength).to.be.greaterThan(32);
- const testBytes32Length = ethUtil.toBuffer(testBytes32).byteLength;
- expect(testBytes32Length).to.be.equal(32);
- // Create short test bytes
- shortData = '0xffffaa';
- const encodedShortData = ethUtil.toBuffer(shortData);
- const shortDataLength = new BigNumber(encodedShortData.byteLength);
- const encodedShortDataLength = typeEncodingUtils.encodeUint256(shortDataLength);
- shortTestBytesAsBuffer = Buffer.concat([encodedShortDataLength, encodedShortData]);
- shortTestBytes = ethUtil.bufferToHex(shortTestBytesAsBuffer);
- // Create test bytes one word in length
- wordOfData = ethUtil.bufferToHex(typeEncodingUtils.encodeUint256(generatePseudoRandomSalt()));
- const encodedWordOfData = ethUtil.toBuffer(wordOfData);
- const wordOfDataLength = new BigNumber(encodedWordOfData.byteLength);
- const encodedWordOfDataLength = typeEncodingUtils.encodeUint256(wordOfDataLength);
- wordOfTestBytesAsBuffer = Buffer.concat([encodedWordOfDataLength, encodedWordOfData]);
- wordOfTestBytes = ethUtil.bufferToHex(wordOfTestBytesAsBuffer);
- // Create long test bytes (combines short test bytes with word of test bytes)
- longData = ethUtil.bufferToHex(Buffer.concat([encodedShortData, encodedWordOfData]));
- const longDataLength = new BigNumber(encodedShortData.byteLength + encodedWordOfData.byteLength);
- const encodedLongDataLength = typeEncodingUtils.encodeUint256(longDataLength);
- longTestBytesAsBuffer = Buffer.concat([encodedLongDataLength, encodedShortData, encodedWordOfData]);
- longTestBytes = ethUtil.bufferToHex(longTestBytesAsBuffer);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('popLastByte', () => {
- it('should revert if length is 0', async () => {
- return expectContractCallFailedAsync(
- libBytes.publicPopLastByte.callAsync(constants.NULL_BYTES),
- RevertReason.LibBytesGreaterThanZeroLengthRequired,
- );
- });
- it('should pop the last byte from the input and return it when array holds more than 1 byte', async () => {
- const [newBytes, poppedByte] = await libBytes.publicPopLastByte.callAsync(byteArrayLongerThan32Bytes);
- const expectedNewBytes = byteArrayLongerThan32Bytes.slice(0, -2);
- const expectedPoppedByte = `0x${byteArrayLongerThan32Bytes.slice(-2)}`;
- expect(newBytes).to.equal(expectedNewBytes);
- expect(poppedByte).to.equal(expectedPoppedByte);
- });
- it('should pop the last byte from the input and return it when array is exactly 1 byte', async () => {
- const [newBytes, poppedByte] = await libBytes.publicPopLastByte.callAsync(testByte);
- const expectedNewBytes = '0x';
- expect(newBytes).to.equal(expectedNewBytes);
- return expect(poppedByte).to.be.equal(testByte);
- });
- });
-
- describe('popLast20Bytes', () => {
- it('should revert if length is less than 20', async () => {
- return expectContractCallFailedAsync(
- libBytes.publicPopLast20Bytes.callAsync(byteArrayShorterThan20Bytes),
- RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
- );
- });
- it('should pop the last 20 bytes from the input and return it when array holds more than 20 bytes', async () => {
- const [newBytes, poppedAddress] = await libBytes.publicPopLast20Bytes.callAsync(byteArrayLongerThan32Bytes);
- const expectedNewBytes = byteArrayLongerThan32Bytes.slice(0, -40);
- const expectedPoppedAddress = `0x${byteArrayLongerThan32Bytes.slice(-40)}`;
- expect(newBytes).to.equal(expectedNewBytes);
- expect(poppedAddress).to.equal(expectedPoppedAddress);
- });
- it('should pop the last 20 bytes from the input and return it when array is exactly 20 bytes', async () => {
- const [newBytes, poppedAddress] = await libBytes.publicPopLast20Bytes.callAsync(testAddress);
- const expectedNewBytes = '0x';
- const expectedPoppedAddress = testAddress;
- expect(newBytes).to.equal(expectedNewBytes);
- expect(poppedAddress).to.equal(expectedPoppedAddress);
- });
- });
-
- describe('equals', () => {
- it('should return true if byte arrays are equal (both arrays < 32 bytes)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayShorterThan32Bytes,
- byteArrayShorterThan32Bytes,
- );
- return expect(isEqual).to.be.true();
- });
- it('should return true if byte arrays are equal (both arrays > 32 bytes)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayLongerThan32Bytes,
- byteArrayLongerThan32Bytes,
- );
- return expect(isEqual).to.be.true();
- });
- it('should return false if byte arrays are not equal (first array < 32 bytes, second array > 32 bytes)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayShorterThan32Bytes,
- byteArrayLongerThan32Bytes,
- );
- return expect(isEqual).to.be.false();
- });
- it('should return false if byte arrays are not equal (first array > 32 bytes, second array < 32 bytes)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayLongerThan32Bytes,
- byteArrayShorterThan32Bytes,
- );
- return expect(isEqual).to.be.false();
- });
- it('should return false if byte arrays are not equal (same length, but a byte in first word differs)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayLongerThan32BytesFirstBytesSwapped,
- byteArrayLongerThan32Bytes,
- );
- return expect(isEqual).to.be.false();
- });
- it('should return false if byte arrays are not equal (same length, but a byte in last word differs)', async () => {
- const isEqual = await libBytes.publicEquals.callAsync(
- byteArrayLongerThan32BytesLastBytesSwapped,
- byteArrayLongerThan32Bytes,
- );
- return expect(isEqual).to.be.false();
- });
-
- describe('should ignore trailing data', () => {
- it('should return true when both < 32 bytes', async () => {
- const isEqual = await libBytes.publicEqualsPop1.callAsync('0x0102', '0x0103');
- return expect(isEqual).to.be.true();
- });
- });
- });
-
- describe('deepCopyBytes', () => {
- it('should revert if dest is shorter than source', async () => {
- return expectContractCallFailedAsync(
- libBytes.publicDeepCopyBytes.callAsync(byteArrayShorterThan32Bytes, byteArrayLongerThan32Bytes),
- RevertReason.LibBytesGreaterOrEqualToSourceBytesLengthRequired,
- );
- });
- it('should overwrite dest with source if source and dest have equal length', async () => {
- const zeroedByteArrayLongerThan32Bytes = `0x${_.repeat('0', byteArrayLongerThan32Bytes.length - 2)}`;
- const zeroedBytesAfterCopy = await libBytes.publicDeepCopyBytes.callAsync(
- zeroedByteArrayLongerThan32Bytes,
- byteArrayLongerThan32Bytes,
- );
- return expect(zeroedBytesAfterCopy).to.be.equal(byteArrayLongerThan32Bytes);
- });
- it('should overwrite the leftmost len(source) bytes of dest if dest is larger than source', async () => {
- const zeroedByteArrayLongerThan32Bytes = `0x${_.repeat('0', byteArrayLongerThan32Bytes.length * 2)}`;
- const zeroedBytesAfterCopy = await libBytes.publicDeepCopyBytes.callAsync(
- zeroedByteArrayLongerThan32Bytes,
- byteArrayLongerThan32Bytes,
- );
- const copiedBytes = zeroedBytesAfterCopy.slice(0, byteArrayLongerThan32Bytes.length);
- return expect(copiedBytes).to.be.equal(byteArrayLongerThan32Bytes);
- });
- it('should not overwrite the rightmost bytes of dest if dest is larger than source', async () => {
- const zeroedByteArrayLongerThan32Bytes = `0x${_.repeat('0', byteArrayLongerThan32Bytes.length * 2)}`;
- const zeroedBytesAfterCopy = await libBytes.publicDeepCopyBytes.callAsync(
- zeroedByteArrayLongerThan32Bytes,
- byteArrayLongerThan32Bytes,
- );
- const expectedNotCopiedBytes = zeroedByteArrayLongerThan32Bytes.slice(byteArrayLongerThan32Bytes.length);
- const notCopiedBytes = zeroedBytesAfterCopy.slice(byteArrayLongerThan32Bytes.length);
- return expect(notCopiedBytes).to.be.equal(expectedNotCopiedBytes);
- });
- });
-
- describe('readAddress', () => {
- it('should successfully read address when the address takes up the whole array', async () => {
- const byteArray = ethUtil.addHexPrefix(testAddress);
- const testAddressOffset = new BigNumber(0);
- const address = await libBytes.publicReadAddress.callAsync(byteArray, testAddressOffset);
- return expect(address).to.be.equal(testAddress);
- });
- it('should successfully read address when it is offset in the array', async () => {
- const addressByteArrayBuffer = ethUtil.toBuffer(testAddress);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, addressByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testAddressOffset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const address = await libBytes.publicReadAddress.callAsync(combinedByteArray, testAddressOffset);
- return expect(address).to.be.equal(testAddress);
- });
- it('should fail if the byte array is too short to hold an address', async () => {
- const shortByteArray = '0xabcdef';
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadAddress.callAsync(shortByteArray, offset),
- RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold an address', async () => {
- const byteArray = testAddress;
- const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadAddress.callAsync(byteArray, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
- );
- });
- });
-
- describe('writeAddress', () => {
- it('should successfully write address when the address takes up the whole array', async () => {
- const byteArray = testAddress;
- const testAddressOffset = new BigNumber(0);
- const newByteArray = await libBytes.publicWriteAddress.callAsync(
- byteArray,
- testAddressOffset,
- testAddressB,
- );
- return expect(newByteArray).to.be.equal(testAddressB);
- });
- it('should successfully write address when it is offset in the array', async () => {
- const addressByteArrayBuffer = ethUtil.toBuffer(testAddress);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, addressByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testAddressOffset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const newByteArray = await libBytes.publicWriteAddress.callAsync(
- combinedByteArray,
- testAddressOffset,
- testAddressB,
- );
- const newByteArrayBuffer = ethUtil.toBuffer(newByteArray);
- const addressFromOffsetBuffer = newByteArrayBuffer.slice(prefixByteArrayBuffer.byteLength);
- const addressFromOffset = ethUtil.addHexPrefix(ethUtil.bufferToHex(addressFromOffsetBuffer));
- return expect(addressFromOffset).to.be.equal(testAddressB);
- });
- it('should fail if the byte array is too short to hold an address', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicWriteAddress.callAsync(byteArrayShorterThan20Bytes, offset, testAddress),
- RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold an address', async () => {
- const byteArray = byteArrayLongerThan32Bytes;
- const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicWriteAddress.callAsync(byteArray, badOffset, testAddress),
- RevertReason.LibBytesGreaterOrEqualTo20LengthRequired,
- );
- });
- });
-
- describe('readBytes32', () => {
- it('should successfully read bytes32 when the bytes32 takes up the whole array', async () => {
- const testBytes32Offset = new BigNumber(0);
- const bytes32 = await libBytes.publicReadBytes32.callAsync(testBytes32, testBytes32Offset);
- return expect(bytes32).to.be.equal(testBytes32);
- });
- it('should successfully read bytes32 when it is offset in the array', async () => {
- const bytes32ByteArrayBuffer = ethUtil.toBuffer(testBytes32);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, bytes32ByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testBytes32Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const bytes32 = await libBytes.publicReadBytes32.callAsync(combinedByteArray, testBytes32Offset);
- return expect(bytes32).to.be.equal(testBytes32);
- });
- it('should fail if the byte array is too short to hold a bytes32', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytes32.callAsync(byteArrayShorterThan32Bytes, offset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold a bytes32', async () => {
- const badOffset = new BigNumber(ethUtil.toBuffer(testBytes32).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytes32.callAsync(testBytes32, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- });
-
- describe('writeBytes32', () => {
- it('should successfully write bytes32 when the address takes up the whole array', async () => {
- const byteArray = testBytes32;
- const testBytes32Offset = new BigNumber(0);
- const newByteArray = await libBytes.publicWriteBytes32.callAsync(
- byteArray,
- testBytes32Offset,
- testBytes32B,
- );
- return expect(newByteArray).to.be.equal(testBytes32B);
- });
- it('should successfully write bytes32 when it is offset in the array', async () => {
- const bytes32ByteArrayBuffer = ethUtil.toBuffer(testBytes32);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, bytes32ByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testBytes32Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const newByteArray = await libBytes.publicWriteBytes32.callAsync(
- combinedByteArray,
- testBytes32Offset,
- testBytes32B,
- );
- const newByteArrayBuffer = ethUtil.toBuffer(newByteArray);
- const bytes32FromOffsetBuffer = newByteArrayBuffer.slice(prefixByteArrayBuffer.byteLength);
- const bytes32FromOffset = ethUtil.addHexPrefix(ethUtil.bufferToHex(bytes32FromOffsetBuffer));
- return expect(bytes32FromOffset).to.be.equal(testBytes32B);
- });
- it('should fail if the byte array is too short to hold a bytes32', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicWriteBytes32.callAsync(byteArrayShorterThan32Bytes, offset, testBytes32),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold a bytes32', async () => {
- const byteArray = byteArrayLongerThan32Bytes;
- const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicWriteBytes32.callAsync(byteArray, badOffset, testBytes32),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- });
-
- describe('readUint256', () => {
- it('should successfully read uint256 when the uint256 takes up the whole array', async () => {
- const formattedTestUint256 = new BN(testUint256.toString(10));
- const testUint256AsBuffer = ethUtil.toBuffer(formattedTestUint256);
- const byteArray = ethUtil.bufferToHex(testUint256AsBuffer);
- const testUint256Offset = new BigNumber(0);
- const uint256 = await libBytes.publicReadUint256.callAsync(byteArray, testUint256Offset);
- return expect(uint256).to.bignumber.equal(testUint256);
- });
- it('should successfully read uint256 when it is offset in the array', async () => {
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const formattedTestUint256 = new BN(testUint256.toString(10));
- const testUint256AsBuffer = ethUtil.toBuffer(formattedTestUint256);
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, testUint256AsBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testUint256Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const uint256 = await libBytes.publicReadUint256.callAsync(combinedByteArray, testUint256Offset);
- return expect(uint256).to.bignumber.equal(testUint256);
- });
- it('should fail if the byte array is too short to hold a uint256', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadUint256.callAsync(byteArrayShorterThan32Bytes, offset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold a uint256', async () => {
- const formattedTestUint256 = new BN(testUint256.toString(10));
- const testUint256AsBuffer = ethUtil.toBuffer(formattedTestUint256);
- const byteArray = ethUtil.bufferToHex(testUint256AsBuffer);
- const badOffset = new BigNumber(testUint256AsBuffer.byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadUint256.callAsync(byteArray, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- });
-
- describe('writeUint256', () => {
- it('should successfully write uint256 when the address takes up the whole array', async () => {
- const byteArray = testBytes32;
- const testUint256Offset = new BigNumber(0);
- const newByteArray = await libBytes.publicWriteUint256.callAsync(
- byteArray,
- testUint256Offset,
- testUint256B,
- );
- const newByteArrayAsUint256 = new BigNumber(newByteArray, 16);
- return expect(newByteArrayAsUint256).to.be.bignumber.equal(testUint256B);
- });
- it('should successfully write uint256 when it is offset in the array', async () => {
- const bytes32ByteArrayBuffer = ethUtil.toBuffer(testBytes32);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, bytes32ByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testUint256Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const newByteArray = await libBytes.publicWriteUint256.callAsync(
- combinedByteArray,
- testUint256Offset,
- testUint256B,
- );
- const newByteArrayBuffer = ethUtil.toBuffer(newByteArray);
- const uint256FromOffsetBuffer = newByteArrayBuffer.slice(prefixByteArrayBuffer.byteLength);
- const uint256FromOffset = new BigNumber(
- ethUtil.addHexPrefix(ethUtil.bufferToHex(uint256FromOffsetBuffer)),
- 16,
- );
- return expect(uint256FromOffset).to.be.bignumber.equal(testUint256B);
- });
- it('should fail if the byte array is too short to hold a uint256', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicWriteUint256.callAsync(byteArrayShorterThan32Bytes, offset, testUint256),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold a uint256', async () => {
- const byteArray = byteArrayLongerThan32Bytes;
- const badOffset = new BigNumber(ethUtil.toBuffer(byteArray).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicWriteUint256.callAsync(byteArray, badOffset, testUint256),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- });
-
- describe('readBytes4', () => {
- // AssertionError: expected promise to be rejected with an error including 'revert' but it was fulfilled with '0x08c379a0'
- it('should revert if byte array has a length < 4', async () => {
- const byteArrayLessThan4Bytes = '0x010101';
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytes4.callAsync(byteArrayLessThan4Bytes, offset),
- RevertReason.LibBytesGreaterOrEqualTo4LengthRequired,
- );
- });
- it('should return the first 4 bytes of a byte array of arbitrary length', async () => {
- const first4Bytes = await libBytes.publicReadBytes4.callAsync(byteArrayLongerThan32Bytes, new BigNumber(0));
- const expectedFirst4Bytes = byteArrayLongerThan32Bytes.slice(0, 10);
- expect(first4Bytes).to.equal(expectedFirst4Bytes);
- });
- it('should successfully read bytes4 when the bytes4 takes up the whole array', async () => {
- const testBytes4Offset = new BigNumber(0);
- const bytes4 = await libBytes.publicReadBytes4.callAsync(testBytes4, testBytes4Offset);
- return expect(bytes4).to.be.equal(testBytes4);
- });
- it('should successfully read bytes4 when it is offset in the array', async () => {
- const bytes4ByteArrayBuffer = ethUtil.toBuffer(testBytes4);
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, bytes4ByteArrayBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testBytes4Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const bytes4 = await libBytes.publicReadBytes4.callAsync(combinedByteArray, testBytes4Offset);
- return expect(bytes4).to.be.equal(testBytes4);
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold a bytes4', async () => {
- const badOffset = new BigNumber(ethUtil.toBuffer(testBytes4).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytes4.callAsync(testBytes4, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo4LengthRequired,
- );
- });
- });
-
- describe('readBytesWithLength', () => {
- it('should successfully read short, nested array of bytes when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(shortTestBytes, testBytesOffset);
- return expect(bytes).to.be.equal(shortData);
- });
- it('should successfully read short, nested array of bytes when it is offset in the array', async () => {
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, shortTestBytesAsBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testUint256Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(combinedByteArray, testUint256Offset);
- return expect(bytes).to.be.equal(shortData);
- });
- it('should successfully read a nested array of bytes - one word in length - when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(wordOfTestBytes, testBytesOffset);
- return expect(bytes).to.be.equal(wordOfData);
- });
- it('should successfully read a nested array of bytes - one word in length - when it is offset in the array', async () => {
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, wordOfTestBytesAsBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testUint256Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(combinedByteArray, testUint256Offset);
- return expect(bytes).to.be.equal(wordOfData);
- });
- it('should successfully read long, nested array of bytes when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(longTestBytes, testBytesOffset);
- return expect(bytes).to.be.equal(longData);
- });
- it('should successfully read long, nested array of bytes when it is offset in the array', async () => {
- const prefixByteArrayBuffer = ethUtil.toBuffer('0xabcdef');
- const combinedByteArrayBuffer = Buffer.concat([prefixByteArrayBuffer, longTestBytesAsBuffer]);
- const combinedByteArray = ethUtil.bufferToHex(combinedByteArrayBuffer);
- const testUint256Offset = new BigNumber(prefixByteArrayBuffer.byteLength);
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(combinedByteArray, testUint256Offset);
- return expect(bytes).to.be.equal(longData);
- });
- it('should fail if the byte array is too short to hold the length of a nested byte array', async () => {
- // The length of the nested array is 32 bytes. By storing less than 32 bytes, a length cannot be read.
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytesWithLength.callAsync(byteArrayShorterThan32Bytes, offset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if we store a nested byte array length, without a nested byte array', async () => {
- const offset = new BigNumber(0);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytesWithLength.callAsync(testBytes32, offset),
- RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold the length of a nested byte array', async () => {
- const badOffset = new BigNumber(ethUtil.toBuffer(byteArrayShorterThan32Bytes).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytesWithLength.callAsync(byteArrayShorterThan32Bytes, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold the nested byte array', async () => {
- const badOffset = new BigNumber(ethUtil.toBuffer(testBytes32).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicReadBytesWithLength.callAsync(testBytes32, badOffset),
- RevertReason.LibBytesGreaterOrEqualTo32LengthRequired,
- );
- });
- });
-
- describe('writeBytesWithLength', () => {
- it('should successfully write short, nested array of bytes when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(new Buffer(shortTestBytesAsBuffer.byteLength));
- const bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- testBytesOffset,
- shortData,
- );
- const bytesRead = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytesRead).to.be.equal(shortData);
- });
- it('should successfully write short, nested array of bytes when it is offset in the array', async () => {
- // Write a prefix to the array
- const prefixData = '0xabcdef';
- const prefixDataAsBuffer = ethUtil.toBuffer(prefixData);
- const prefixOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(
- new Buffer(prefixDataAsBuffer.byteLength + shortTestBytesAsBuffer.byteLength),
- );
- let bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- prefixOffset,
- prefixData,
- );
- // Write data after prefix
- const testBytesOffset = new BigNumber(prefixDataAsBuffer.byteLength);
- bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- bytesWritten,
- testBytesOffset,
- shortData,
- );
- // Read data after prefix and validate
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytes).to.be.equal(shortData);
- });
- it('should successfully write a nested array of bytes - one word in length - when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(new Buffer(wordOfTestBytesAsBuffer.byteLength));
- const bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- testBytesOffset,
- wordOfData,
- );
- const bytesRead = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytesRead).to.be.equal(wordOfData);
- });
- it('should successfully write a nested array of bytes - one word in length - when it is offset in the array', async () => {
- // Write a prefix to the array
- const prefixData = '0xabcdef';
- const prefixDataAsBuffer = ethUtil.toBuffer(prefixData);
- const prefixOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(
- new Buffer(prefixDataAsBuffer.byteLength + wordOfTestBytesAsBuffer.byteLength),
- );
- let bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- prefixOffset,
- prefixData,
- );
- // Write data after prefix
- const testBytesOffset = new BigNumber(prefixDataAsBuffer.byteLength);
- bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- bytesWritten,
- testBytesOffset,
- wordOfData,
- );
- // Read data after prefix and validate
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytes).to.be.equal(wordOfData);
- });
- it('should successfully write a long, nested bytes when it takes up the whole array', async () => {
- const testBytesOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(new Buffer(longTestBytesAsBuffer.byteLength));
- const bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- testBytesOffset,
- longData,
- );
- const bytesRead = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytesRead).to.be.equal(longData);
- });
- it('should successfully write long, nested array of bytes when it is offset in the array', async () => {
- // Write a prefix to the array
- const prefixData = '0xabcdef';
- const prefixDataAsBuffer = ethUtil.toBuffer(prefixData);
- const prefixOffset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(
- new Buffer(prefixDataAsBuffer.byteLength + longTestBytesAsBuffer.byteLength),
- );
- let bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(
- emptyByteArray,
- prefixOffset,
- prefixData,
- );
- // Write data after prefix
- const testBytesOffset = new BigNumber(prefixDataAsBuffer.byteLength);
- bytesWritten = await libBytes.publicWriteBytesWithLength.callAsync(bytesWritten, testBytesOffset, longData);
- // Read data after prefix and validate
- const bytes = await libBytes.publicReadBytesWithLength.callAsync(bytesWritten, testBytesOffset);
- return expect(bytes).to.be.equal(longData);
- });
- it('should fail if the byte array is too short to hold the length of a nested byte array', async () => {
- const offset = new BigNumber(0);
- const emptyByteArray = ethUtil.bufferToHex(new Buffer(1));
- return expectContractCallFailedAsync(
- libBytes.publicWriteBytesWithLength.callAsync(emptyByteArray, offset, longData),
- RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
- );
- });
- it('should fail if the length between the offset and end of the byte array is too short to hold the length of a nested byte array', async () => {
- const emptyByteArray = ethUtil.bufferToHex(new Buffer(shortTestBytesAsBuffer.byteLength));
- const badOffset = new BigNumber(ethUtil.toBuffer(shortTestBytesAsBuffer).byteLength);
- return expectContractCallFailedAsync(
- libBytes.publicWriteBytesWithLength.callAsync(emptyByteArray, badOffset, shortData),
- RevertReason.LibBytesGreaterOrEqualToNestedBytesLengthRequired,
- );
- });
- });
-
- describe('memCopy', () => {
- // Create memory 0x000102...FF
- const memSize = 256;
- // tslint:disable:no-shadowed-variable
- const memory = new Uint8Array(memSize).map((_, i) => i);
- const memHex = toHex(memory);
-
- // Reference implementation to test against
- const refMemcpy = (mem: Uint8Array, dest: number, source: number, length: number): Uint8Array =>
- Uint8Array.from(mem).copyWithin(dest, source, source + length);
-
- // Test vectors: destination, source, length, job description
- type Tests = Array<[number, number, number, string]>;
-
- const test = (tests: Tests) =>
- tests.forEach(([dest, source, length, job]) =>
- it(job, async () => {
- const expected = refMemcpy(memory, dest, source, length);
- const resultStr = await libBytes.testMemcpy.callAsync(
- memHex,
- new BigNumber(dest),
- new BigNumber(source),
- new BigNumber(length),
- );
- const result = fromHex(resultStr);
- expect(result).to.deep.equal(expected);
- }),
- );
-
- test([[0, 0, 0, 'copies zero bytes with overlap']]);
-
- describe('copies forward', () =>
- test([
- [128, 0, 0, 'zero bytes'],
- [128, 0, 1, 'one byte'],
- [128, 0, 11, 'eleven bytes'],
- [128, 0, 31, 'thirty-one bytes'],
- [128, 0, 32, 'one word'],
- [128, 0, 64, 'two words'],
- [128, 0, 96, 'three words'],
- [128, 0, 33, 'one word and one byte'],
- [128, 0, 72, 'two words and eight bytes'],
- [128, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward within one word', () =>
- test([
- [16, 0, 0, 'zero bytes'],
- [16, 0, 1, 'one byte'],
- [16, 0, 11, 'eleven bytes'],
- [16, 0, 16, 'sixteen bytes'],
- ]));
-
- describe('copies forward with one byte overlap', () =>
- test([
- [0, 0, 1, 'one byte'],
- [10, 0, 11, 'eleven bytes'],
- [30, 0, 31, 'thirty-one bytes'],
- [31, 0, 32, 'one word'],
- [32, 0, 33, 'one word and one byte'],
- [71, 0, 72, 'two words and eight bytes'],
- [99, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward with thirty-one bytes overlap', () =>
- test([
- [0, 0, 31, 'thirty-one bytes'],
- [1, 0, 32, 'one word'],
- [2, 0, 33, 'one word and one byte'],
- [41, 0, 72, 'two words and eight bytes'],
- [69, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward with one word overlap', () =>
- test([
- [0, 0, 32, 'one word'],
- [1, 0, 33, 'one word and one byte'],
- [41, 0, 72, 'two words and eight bytes'],
- [69, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward with one word and one byte overlap', () =>
- test([
- [0, 0, 33, 'one word and one byte'],
- [40, 0, 72, 'two words and eight bytes'],
- [68, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward with two words overlap', () =>
- test([
- [0, 0, 64, 'two words'],
- [8, 0, 72, 'two words and eight bytes'],
- [36, 0, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward within one word and one byte overlap', () =>
- test([[0, 0, 1, 'one byte'], [10, 0, 11, 'eleven bytes'], [15, 0, 16, 'sixteen bytes']]));
-
- describe('copies backward', () =>
- test([
- [0, 128, 0, 'zero bytes'],
- [0, 128, 1, 'one byte'],
- [0, 128, 11, 'eleven bytes'],
- [0, 128, 31, 'thirty-one bytes'],
- [0, 128, 32, 'one word'],
- [0, 128, 64, 'two words'],
- [0, 128, 96, 'three words'],
- [0, 128, 33, 'one word and one byte'],
- [0, 128, 72, 'two words and eight bytes'],
- [0, 128, 100, 'three words and four bytes'],
- ]));
-
- describe('copies backward within one word', () =>
- test([
- [0, 16, 0, 'zero bytes'],
- [0, 16, 1, 'one byte'],
- [0, 16, 11, 'eleven bytes'],
- [0, 16, 16, 'sixteen bytes'],
- ]));
-
- describe('copies backward with one byte overlap', () =>
- test([
- [0, 0, 1, 'one byte'],
- [0, 10, 11, 'eleven bytes'],
- [0, 30, 31, 'thirty-one bytes'],
- [0, 31, 32, 'one word'],
- [0, 32, 33, 'one word and one byte'],
- [0, 71, 72, 'two words and eight bytes'],
- [0, 99, 100, 'three words and four bytes'],
- ]));
-
- describe('copies backward with thirty-one bytes overlap', () =>
- test([
- [0, 0, 31, 'thirty-one bytes'],
- [0, 1, 32, 'one word'],
- [0, 2, 33, 'one word and one byte'],
- [0, 41, 72, 'two words and eight bytes'],
- [0, 69, 100, 'three words and four bytes'],
- ]));
-
- describe('copies backward with one word overlap', () =>
- test([
- [0, 0, 32, 'one word'],
- [0, 1, 33, 'one word and one byte'],
- [0, 41, 72, 'two words and eight bytes'],
- [0, 69, 100, 'three words and four bytes'],
- ]));
-
- describe('copies backward with one word and one byte overlap', () =>
- test([
- [0, 0, 33, 'one word and one byte'],
- [0, 40, 72, 'two words and eight bytes'],
- [0, 68, 100, 'three words and four bytes'],
- ]));
-
- describe('copies backward with two words overlap', () =>
- test([
- [0, 0, 64, 'two words'],
- [0, 8, 72, 'two words and eight bytes'],
- [0, 36, 100, 'three words and four bytes'],
- ]));
-
- describe('copies forward within one word and one byte overlap', () =>
- test([[0, 0, 1, 'one byte'], [0, 10, 11, 'eleven bytes'], [0, 15, 16, 'sixteen bytes']]));
- });
-});
-// tslint:disable:max-file-line-count
diff --git a/contracts/utils/test/libs.ts b/contracts/utils/test/libs.ts
deleted file mode 100644
index 81596b2e4..000000000
--- a/contracts/utils/test/libs.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { chaiSetup, provider, txDefaults, web3Wrapper } from '@0x/contracts-test-utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import * as chai from 'chai';
-
-import { TestConstantsContract } from '../generated-wrappers/test_constants';
-import { artifacts } from '../src';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('Libs', () => {
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
-
- describe('LibConstants', () => {
- describe('ZRX_ASSET_DATA', () => {
- it('should have the correct ZRX_ASSET_DATA', async () => {
- const testConstants = await TestConstantsContract.deployFrom0xArtifactAsync(
- artifacts.TestConstants,
- provider,
- txDefaults,
- );
- const isValid = await testConstants.assertValidZrxAssetData.callAsync();
- expect(isValid).to.be.equal(true);
- });
- });
- });
-});
diff --git a/contracts/utils/tsconfig.json b/contracts/utils/tsconfig.json
deleted file mode 100644
index 68251e6b0..000000000
--- a/contracts/utils/tsconfig.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./generated-wrappers/**/*"],
- "files": [
- "./generated-artifacts/TestConstants.json",
- "./generated-artifacts/TestLibBytes.json",
- "./generated-artifacts/IOwnable.json",
- "./generated-artifacts/Ownable.json",
- "./generated-artifacts/LibBytes.json",
- "./generated-artifacts/SafeMath.json",
- "./generated-artifacts/ReentrancyGuard.json"
- ],
- "exclude": ["./deploy/solc/solc_bin"]
-}
diff --git a/contracts/utils/tslint.json b/contracts/utils/tslint.json
deleted file mode 100644
index 1bb3ac2a2..000000000
--- a/contracts/utils/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false
- }
-}
diff --git a/lerna.json b/lerna.json
index fa9ef5aff..e2147be85 100644
--- a/lerna.json
+++ b/lerna.json
@@ -1,6 +1,6 @@
{
"lerna": "3.0.0-beta.23",
- "packages": ["packages/*", "contracts/*"],
+ "packages": ["packages/*"],
"version": "independent",
"command": {
"publish": {
diff --git a/package.json b/package.json
index 27675ddd3..00565415e 100644
--- a/package.json
+++ b/package.json
@@ -1,12 +1,11 @@
{
"private": true,
- "name": "0x-monorepo",
+ "name": "@dexon-foundation/sol-tools",
"engines": {
"node": ">=6.12"
},
"workspaces": [
- "packages/*",
- "contracts/*"
+ "packages/*"
],
"scripts": {
"ganache": "ganache-cli -p 8545 --gasLimit 10000000 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
@@ -18,11 +17,12 @@
"test:publish:circleci": "yarn npm-cli-login -u test -p test -e test@example.com -r http://localhost:4873 && IS_LOCAL_PUBLISH=true run-s script:publish test:installation:local",
"run:publish": "run-s install:all build:monorepo_scripts script:prepublish_checks rebuild:no_website script:publish",
"run:publish:local": "IS_LOCAL_PUBLISH=true yarn run:publish",
- "script:prepublish_checks": "node ./packages/monorepo-scripts/lib/prepublish_checks.js",
- "script:publish": "node ./packages/monorepo-scripts/lib/publish.js",
+ "script:prepublish_checks": "node ./node_modules/@0x/monorepo-scripts/lib/prepublish_checks.js",
+ "script:publish": "node ./node_modules/@0x/monorepo-scripts/lib/publish.js",
"install:all": "yarn install",
"wsrun": "wsrun",
"lerna": "lerna",
+ "publish": "lerna publish",
"build": "wsrun build $PKG --fast-exit -r --stages --exclude-missing",
"build:no_website": "wsrun build $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
"build:ci:no_website": "wsrun build:ci $PKG --fast-exit -r --stages --exclude @0x/website --exclude-missing",
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<A>` contain `LogWithDecodedArgs<A>` under log key instead of merging it in like web3 does",
- "pr": 234
- },
- {
- "note": "Rename `removed` to `isRemoved` in `DecodedLogEvent<A>`",
- "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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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<A>` contain `LogWithDecodedArgs<A>` under log key instead of merging it in like web3 does (#234)
- * Rename `removed` to `isRemoved` in `DecodedLogEvent<A>` (#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
-<script type="text/javascript" src="0x.js"></script>
-```
-
-## 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
--- a/packages/0x.js/coverage/.gitkeep
+++ /dev/null
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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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<TxData>,
- {{> 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<TxData>,
- {{> 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<TxData>) {
- 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<CallData> = {},
- 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<TxDataPayable> = {},
- {{/this.payable}}
- {{^this.payable}}
- txData: Partial<TxData> = {},
- {{/this.payable}}
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeOwner = {
- async sendTransactionAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public revokeConfirmation = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isOwner = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public confirmations = {
- async callAsync(
- index_0: BigNumber,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public executeRemoveAuthorizedAddressAtIndex = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public secondsTimeLocked = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getTransactionCount = {
- async callAsync(
- pending: boolean,
- executed: boolean,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public registerAssetProxy = {
- async sendTransactionAsync(
- assetProxyContract: string,
- isRegistered: boolean,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public addOwner = {
- async sendTransactionAsync(
- owner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isConfirmed = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public changeTimeLock = {
- async sendTransactionAsync(
- _secondsTimeLocked: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isAssetProxyRegistered = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getConfirmationCount = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transactions = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- 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<string[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getTransactionIds = {
- async callAsync(
- from: BigNumber,
- to: BigNumber,
- pending: boolean,
- executed: boolean,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber[]
- > {
- 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<BigNumber[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getConfirmations = {
- async callAsync(
- transactionId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- 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<string[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transactionCount = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public changeRequirement = {
- async sendTransactionAsync(
- _required: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public confirmTransaction = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public submitTransaction = {
- async sendTransactionAsync(
- destination: string,
- value: BigNumber,
- data: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public confirmationTimes = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public MAX_OWNER_COUNT = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public required = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public replaceOwner = {
- async sendTransactionAsync(
- owner: string,
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public executeTransaction = {
- async sendTransactionAsync(
- transactionId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _owners: string[],
- _assetProxyContracts: string[],
- _required: BigNumber,
- _secondsTimeLocked: BigNumber,
- ): Promise<AssetProxyOwnerContract> {
- 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<TxData>,
- _owners: string[],
- _assetProxyContracts: string[],
- _required: BigNumber,
- _secondsTimeLocked: BigNumber,
- ): Promise<AssetProxyOwnerContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public approve = {
- async sendTransactionAsync(
- _spender: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public totalSupply = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public decimals = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- _owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public symbol = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public mint = {
- async sendTransactionAsync(
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transfer = {
- async sendTransactionAsync(
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public allowance = {
- async callAsync(
- _owner: string,
- _spender: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public setBalance = {
- async sendTransactionAsync(
- _target: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public MAX_MINT_AMOUNT = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _name: string,
- _symbol: string,
- _decimals: BigNumber,
- _totalSupply: BigNumber,
- ): Promise<DummyERC20TokenContract> {
- 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<TxData>,
- _name: string,
- _symbol: string,
- _decimals: BigNumber,
- _totalSupply: BigNumber,
- ): Promise<DummyERC20TokenContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getApproved = {
- async callAsync(
- _tokenId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public approve = {
- async sendTransactionAsync(
- _approved: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public mint = {
- async sendTransactionAsync(
- _to: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public safeTransferFrom1 = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public ownerOf = {
- async callAsync(
- _tokenId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- _owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public symbol = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public burn = {
- async sendTransactionAsync(
- _owner: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public setApprovalForAll = {
- async sendTransactionAsync(
- _operator: string,
- _approved: boolean,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public safeTransferFrom2 = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- _data: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isApprovedForAll = {
- async callAsync(
- _owner: string,
- _operator: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _name: string,
- _symbol: string,
- ): Promise<DummyERC721TokenContract> {
- 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<TxData>,
- _name: string,
- _symbol: string,
- ): Promise<DummyERC721TokenContract> {
- 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<TxData>) {
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData>,
- _exchange: string,
- ): Promise<DutchAuctionContract> {
- 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<TxData>,
- _exchange: string,
- ): Promise<DutchAuctionContract> {
- 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<TxData>) {
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorities = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddress = {
- async sendTransactionAsync(
- target: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddressAtIndex = {
- async sendTransactionAsync(
- target: string,
- index: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getProxyId = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorized = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getAuthorizedAddresses = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- 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<string[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<ERC20ProxyContract> {
- 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<TxData>,
- ): Promise<ERC20ProxyContract> {
- 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<TxData>) {
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public totalSupply = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- _owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transfer = {
- async sendTransactionAsync(
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public allowance = {
- async callAsync(
- _owner: string,
- _spender: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<ERC20TokenContract> {
- 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<TxData>,
- ): Promise<ERC20TokenContract> {
- 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<TxData>) {
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorities = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddress = {
- async sendTransactionAsync(
- target: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddressAtIndex = {
- async sendTransactionAsync(
- target: string,
- index: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getProxyId = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorized = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getAuthorizedAddresses = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- 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<string[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<ERC721ProxyContract> {
- 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<TxData>,
- ): Promise<ERC721ProxyContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public approve = {
- async sendTransactionAsync(
- _approved: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public safeTransferFrom1 = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public ownerOf = {
- async callAsync(
- _tokenId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- _owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public setApprovalForAll = {
- async sendTransactionAsync(
- _operator: string,
- _approved: boolean,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public safeTransferFrom2 = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _tokenId: BigNumber,
- _data: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isApprovedForAll = {
- async callAsync(
- _owner: string,
- _operator: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<ERC721TokenContract> {
- 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<TxData>,
- ): Promise<ERC721TokenContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public preSign = {
- async sendTransactionAsync(
- hash: string,
- signerAddress: string,
- signature: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transactions = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public allowedValidators = {
- async callAsync(
- index_0: string,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>
- > {
- 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<Array<{orderStatus: number;orderHash: string;orderTakerAssetFilledAmount: BigNumber}>
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public preSigned = {
- async callAsync(
- index_0: string,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public isValidSignature = {
- async callAsync(
- hash: string,
- signerAddress: string,
- signature: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public registerAssetProxy = {
- async sendTransactionAsync(
- assetProxy: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public orderEpoch = {
- async callAsync(
- index_0: string,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public ZRX_ASSET_DATA = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public VERSION = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _zrxAssetData: string,
- ): Promise<ExchangeContract> {
- 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<TxData>,
- _zrxAssetData: string,
- ): Promise<ExchangeContract> {
- 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<TxData>) {
- 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<TxDataPayable> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(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<TxDataPayable> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- 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<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- _exchange: string,
- _zrxAssetData: string,
- _wethAssetData: string,
- ): Promise<ForwarderContract> {
- 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<TxData>,
- _exchange: string,
- _zrxAssetData: string,
- _wethAssetData: string,
- ): Promise<ForwarderContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<IValidatorContract> {
- 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<TxData>,
- ): Promise<IValidatorContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<IWalletContract> {
- 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<TxData>,
- ): Promise<IWalletContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public addAuthorizedAddress = {
- async sendTransactionAsync(
- target: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorities = {
- async callAsync(
- index_0: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getAssetProxy = {
- async callAsync(
- assetProxyId: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddress = {
- async sendTransactionAsync(
- target: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public owner = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public removeAuthorizedAddressAtIndex = {
- async sendTransactionAsync(
- target: string,
- index: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getProxyId = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public authorized = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public registerAssetProxy = {
- async sendTransactionAsync(
- assetProxy: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getAuthorizedAddresses = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string[]
- > {
- 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<string[]
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferOwnership = {
- async sendTransactionAsync(
- newOwner: string,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<MultiAssetProxyContract> {
- 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<TxData>,
- ): Promise<MultiAssetProxyContract> {
- 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<TxData>) {
- 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<CallData> = {},
- 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<CallData> = {},
- 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<CallData> = {},
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<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('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<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 getERC721TokenOwner = {
- async callAsync(
- token: string,
- tokenId: BigNumber,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public getBalancesAndAllowances = {
- async callAsync(
- target: string,
- assetData: string[],
- callData: Partial<CallData> = {},
- 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<CallData> = {},
- 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<TxData>,
- _exchange: string,
- _zrxAssetData: string,
- ): Promise<OrderValidatorContract> {
- 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<TxData>,
- _exchange: string,
- _zrxAssetData: string,
- ): Promise<OrderValidatorContract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public approve = {
- async sendTransactionAsync(
- guy: string,
- wad: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public totalSupply = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- src: string,
- dst: string,
- wad: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public withdraw = {
- async sendTransactionAsync(
- wad: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public decimals = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<number
- > {
- 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<number
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- index_0: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public symbol = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transfer = {
- async sendTransactionAsync(
- dst: string,
- wad: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public deposit = {
- async sendTransactionAsync(
- txData: Partial<TxDataPayable> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<void
- > {
- 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<void
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public allowance = {
- async callAsync(
- index_0: string,
- index_1: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<WETH9Contract> {
- 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<TxData>,
- ): Promise<WETH9Contract> {
- 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<TxData>) {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public approve = {
- async sendTransactionAsync(
- _spender: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public totalSupply = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transferFrom = {
- async sendTransactionAsync(
- _from: string,
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public decimals = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<number
- > {
- 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<number
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public balanceOf = {
- async callAsync(
- _owner: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public symbol = {
- async callAsync(
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<string
- > {
- 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<string
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public transfer = {
- async sendTransactionAsync(
- _to: string,
- _value: BigNumber,
- txData: Partial<TxData> = {},
- ): Promise<string> {
- 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<TxData> = {},
- ): Promise<number> {
- 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<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<boolean
- > {
- 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<boolean
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public allowance = {
- async callAsync(
- _owner: string,
- _spender: string,
- callData: Partial<CallData> = {},
- defaultBlock?: BlockParam,
- ): Promise<BigNumber
- > {
- 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<BigNumber
- >(rawCallResult);
- // tslint:enable boolean-naming
- return result;
- },
- };
- public static async deployFrom0xArtifactAsync(
- artifact: ContractArtifact | SimpleContractArtifact,
- provider: Provider,
- txDefaults: Partial<TxData>,
- ): Promise<ZRXTokenContract> {
- 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<TxData>,
- ): Promise<ZRXTokenContract> {
- 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<TxData>) {
- 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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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](<https://en.wikipedia.org/wiki/Glob_(programming)>) 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
--- a/packages/abi-gen/coverage/.gitkeep
+++ /dev/null
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<ContextData>(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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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
--- a/packages/assert/coverage/.gitkeep
+++ /dev/null
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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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<OrdersEntry> = {};
- /**
- * 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<AssetBuyerOpts> = {},
- ): 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<AssetBuyerOpts> = {},
- ): 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<AssetBuyerOpts> = {}) {
- 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<BuyQuoteRequestOpts> = {},
- ): Promise<BuyQuote> {
- 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<BuyQuoteRequestOpts> = {},
- ): Promise<BuyQuote> {
- 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<LiquidityRequestOpts> = {},
- ): Promise<LiquidityForAssetData> {
- 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<BuyQuoteExecutionOpts> = {},
- ): Promise<string> {
- 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<string[]> {
- 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<OrdersAndFillableAmounts> {
- // 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<OrderProviderResponse> {
- 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<string[]> {
- 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<OrderProviderResponse> {
- 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<string[]> {
- // 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<OrderProviderResponse>;
- getAvailableMakerAssetDatasAsync: (takerAssetData: string) => Promise<string[]>;
-}
-
-/**
- * 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<BuyQuoteRequestOpts, 'shouldForceOrderRefresh'>;
-
-/**
- * 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<OrdersAndFillableAmounts> {
- // 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<OrderProviderResponse> {
- return Promise.resolve({ orders: [] });
- }
- // tslint:disable-next-line:prefer-function-over-method
- public async getAvailableMakerAssetDatasAsync(takerAssetData: string): Promise<string[]> {
- return Promise.resolve([]);
- }
-}
-
-export const orderProviderMock = () => {
- return TypeMoq.Mock.ofType(OrderProviderClass, TypeMoq.MockBehavior.Strict);
-};
-
-export const mockAvailableAssetDatas = (
- mockOrderProvider: TypeMoq.IMock<OrderProviderClass>,
- 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<AssetBuyer> => {
- 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<AssetBuyer>,
- 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<AssetBuyer> => {
- 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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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
--- a/packages/base-contract/coverage/.gitkeep
+++ /dev/null
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<T extends Partial<TxData | TxDataPayable>>(
- txData: T,
- txDefaults: Partial<TxData>,
- estimateGasAsync?: (txData: T) => Promise<number>,
- ): Promise<TxData> {
- // 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<TxData>,
- ) {
- 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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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
--- a/packages/connect/coverage/.gitkeep
+++ /dev/null
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<AssetPairsResponse> {
- 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<OrdersResponse> {
- 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<APIOrder> {
- 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<OrderbookResponse> {
- 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<OrderConfigResponse> {
- 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<FeeRecipientsResponse> {
- 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<void> {
- 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<any> {
- 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<OrdersChannel> {
- assert.isUri('url', url);
- assert.isOrdersChannelHandler('handler', handler);
- return new Promise<OrdersChannel>((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<PaginatedCollection<AssetPairsItem>>;
- getOrdersAsync: (requestOpts?: OrdersRequestOpts & PagedRequestOpts) => Promise<PaginatedCollection<APIOrder>>;
- getOrderAsync: (orderHash: string) => Promise<APIOrder>;
- getOrderbookAsync: (request: OrderbookRequest, requestOpts?: PagedRequestOpts) => Promise<OrderbookResponse>;
- getOrderConfigAsync: (request: OrderConfigRequest) => Promise<OrderConfigResponse>;
- getFeeRecipientsAsync: (requestOpts?: PagedRequestOpts) => Promise<FeeRecipientsResponse>;
- submitOrderAsync: (signedOrder: SignedOrder) => Promise<void>;
-}
-
-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}&quoteAssetData=${
- 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&quoteAssetData=${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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-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
--- a/packages/contract-wrappers/coverage/.gitkeep
+++ /dev/null
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<BigNumber>;
- public abstract async getProxyAllowanceAsync(tokenAddress: string, userAddress: string): Promise<BigNumber>;
- 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<Block, Log> | undefined;
- private readonly _blockPollingIntervalMs: number;
- private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
- private readonly _filters: { [filterToken: string]: FilterObject };
- private readonly _filterCallbacks: {
- [filterToken: string]: EventCallback<ContractEventArgs>;
- };
- 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<ArgsType extends ContractEventArgs>(
- address: string,
- eventName: ContractEvents,
- indexFilterValues: IndexedFilterValues,
- abi: ContractAbi,
- callback: EventCallback<ArgsType>,
- isVerbose: boolean = false,
- ): string {
- const filter = filterUtils.getFilter(address, eventName, indexFilterValues, abi);
- if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
- this._startBlockAndLogStream(isVerbose);
- }
- const filterToken = filterUtils.generateUUID();
- this._filters[filterToken] = filter;
- this._filterCallbacks[filterToken] = callback as EventCallback<ContractEventArgs>;
- return filterToken;
- }
- protected async _getLogsAsync<ArgsType extends ContractEventArgs>(
- address: string,
- eventName: ContractEvents,
- blockRange: BlockRange,
- indexFilterValues: IndexedFilterValues,
- abi: ContractAbi,
- ): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- 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<ArgsType extends ContractEventArgs>(
- log: LogEntry,
- ): LogWithDecodedArgs<ArgsType> | RawLog {
- const abiDecoder = new AbiDecoder([this.abi]);
- const logWithDecodedArgs = abiDecoder.tryToDecodeLogOrNoop(log);
- return logWithDecodedArgs;
- }
- private _onLogStateChanged<ArgsType extends ContractEventArgs>(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<ArgsType>;
- 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<Block | null> {
- const shouldIncludeTransactionData = false;
- const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
- 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<Block | null> {
- const shouldIncludeTransactionData = false;
- const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
- 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<RawLogEntry[]> {
- const logs = await this._web3Wrapper.sendRawPayloadAsync<RawLogEntry[]>({
- 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<void> {
- 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<string> {
- // 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<DutchAuctionDetails> {
- // 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<DutchAuctionContract> {
- 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<AssetProxyId> {
- 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<boolean> {
- 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<string[]> {
- 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<BigNumber> {
- 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<string> {
- 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<string> {
- 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<BigNumber> {
- 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<BigNumber> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<ArgsType extends ERC20TokenEventArgs>(
- tokenAddress: string,
- eventName: ERC20TokenEvents,
- indexFilterValues: IndexedFilterValues,
- callback: EventCallback<ArgsType>,
- 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<ArgsType>(
- 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<ArgsType extends ERC20TokenEventArgs>(
- tokenAddress: string,
- eventName: ERC20TokenEvents,
- blockRange: BlockRange,
- indexFilterValues: IndexedFilterValues,
- ): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- 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<ArgsType>(
- normalizedTokenAddress,
- eventName,
- blockRange,
- indexFilterValues,
- ERC20Token.compilerOutput.abi,
- );
- return logs;
- }
- private async _getTokenContractAsync(tokenAddress: string): Promise<ERC20TokenContract> {
- 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<AssetProxyId> {
- 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<boolean> {
- 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<string[]> {
- 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<BigNumber> {
- 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<string> {
- 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<boolean> {
- 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<boolean> {
- 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<string | undefined> {
- 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<boolean> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<ArgsType extends ERC721TokenEventArgs>(
- tokenAddress: string,
- eventName: ERC721TokenEvents,
- indexFilterValues: IndexedFilterValues,
- callback: EventCallback<ArgsType>,
- 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<ArgsType>(
- 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<ArgsType extends ERC721TokenEventArgs>(
- tokenAddress: string,
- eventName: ERC721TokenEvents,
- blockRange: BlockRange,
- indexFilterValues: IndexedFilterValues,
- ): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- 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<ArgsType>(
- normalizedTokenAddress,
- eventName,
- blockRange,
- indexFilterValues,
- ERC721Token.compilerOutput.abi,
- );
- return logs;
- }
- private async _getTokenContractAsync(tokenAddress: string): Promise<ERC721TokenContract> {
- 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<string> {
- 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<string> {
- 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<ArgsType extends WETH9EventArgs>(
- etherTokenAddress: string,
- eventName: WETH9Events,
- blockRange: BlockRange,
- indexFilterValues: IndexedFilterValues,
- ): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- 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<ArgsType>(
- 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<ArgsType extends WETH9EventArgs>(
- etherTokenAddress: string,
- eventName: WETH9Events,
- indexFilterValues: IndexedFilterValues,
- callback: EventCallback<ArgsType>,
- 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<ArgsType>(
- 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<WETH9Contract> {
- 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<string> {
- 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<BigNumber> {
- 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<string> {
- 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<BigNumber> {
- 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<boolean> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<Order | SignedOrder>,
- orderTransactionOpts: OrderTransactionOpts = { shouldValidate: true },
- ): Promise<string> {
- 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<string> {
- 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<string> {
- 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<boolean> {
- 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<boolean> {
- 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<boolean> {
- 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<boolean> {
- 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<OrderInfo> {
- 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<Order | SignedOrder>,
- methodOpts: MethodOpts = {},
- ): Promise<OrderInfo[]> {
- 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<string> {
- 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<string> {
- 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<string> {
- 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<ArgsType extends ExchangeEventArgs>(
- eventName: ExchangeEvents,
- indexFilterValues: IndexedFilterValues,
- callback: EventCallback<ArgsType>,
- isVerbose: boolean = false,
- ): string {
- assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents);
- assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
- assert.isFunction('callback', callback);
- const subscriptionToken = this._subscribe<ArgsType>(
- 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<ArgsType extends ExchangeEventArgs>(
- eventName: ExchangeEvents,
- blockRange: BlockRange,
- indexFilterValues: IndexedFilterValues,
- ): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents);
- assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
- assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
- const logs = await this._getLogsAsync<ArgsType>(
- 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<void> {
- 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<void> {
- 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<TransactionEncoder> {
- const exchangeInstance = await this._getExchangeContractAsync();
- const encoder = new TransactionEncoder(exchangeInstance);
- return encoder;
- }
- // tslint:enable:no-unused-variable
- private async _getExchangeContractAsync(): Promise<ExchangeContract> {
- 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<string> {
- // 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<string> {
- // 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<ForwarderContract> {
- 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<OrderAndTraderInfo> {
- 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<OrderAndTraderInfo[]> {
- 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<TraderInfo> {
- 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<TraderInfo[]> {
- 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<BalanceAndAllowance> {
- 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<BalanceAndAllowance[]> {
- 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<string | undefined> {
- 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<OrderValidatorContract> {
- 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<BigNumber> {
- 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<BigNumber> {
- 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<BigNumber> {
- const filledTakerAmount = this._exchange.getFilledTakerAssetAmountAsync(orderHash, {
- defaultBlock: this._stateLayer,
- });
- return filledTakerAmount;
- }
- public async isOrderCancelledAsync(signedOrder: SignedOrder): Promise<boolean> {
- 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<ArgsType extends DecodedLogArgs> {
- isRemoved: boolean;
- log: LogWithDecodedArgs<ArgsType>;
-}
-
-export type EventCallback<ArgsType extends DecodedLogArgs> = (
- err: null | Error,
- log?: DecodedLogEvent<ArgsType>,
-) => 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<any>;
-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<void> {
- 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<void> {
- 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<SignedOrder>) => {
- 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<AsyncMethod>,
- ) => {
- 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<any> {
- 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<SyncMethod>,
- ) => {
- 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<void> {
- // 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<void> {
- 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<void> {
- 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<void> {
- 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<string | null> {
- const topics: Array<string | null> = [];
- 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<string[] | string | null>): 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<T extends object>(obj: T): Partial<T> {
- 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<ERC20TokenTransferEventArgs>) => {
- 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<ERC20TokenApprovalEventArgs>) => {
- 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<ERC20TokenApprovalEventArgs>) => {
- 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<ERC20TokenApprovalEventArgs>) => {
- 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<ERC20TokenApprovalEventArgs>(
- 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<ERC20TokenApprovalEventArgs>(
- 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<ERC721TokenTransferEventArgs>) => {
- 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<ERC721TokenApprovalEventArgs>) => {
- 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<ERC721TokenApprovalEventArgs>) => {
- 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<ERC721TokenApprovalForAllEventArgs>) => {
- 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<ERC721TokenApprovalForAllEventArgs>(
- 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<ERC721TokenApprovalForAllEventArgs>(
- 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<WETH9TransferEventArgs>) => {
- 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<WETH9ApprovalEventArgs>) => {
- 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<WETH9DepositEventArgs>) => {
- 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<WETH9WithdrawalEventArgs>) => {
- 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<WETH9ApprovalEventArgs>) => {
- 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<WETH9ApprovalEventArgs>) => {
- 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<WETH9ApprovalEventArgs>(
- 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<WETH9DepositEventArgs>(
- 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<WETH9ApprovalEventArgs>(
- 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<ExchangeFillEventArgs>) => {
- 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<ExchangeCancelEventArgs>) => {
- 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<ExchangeFillEventArgs>) => {
- 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<ExchangeFillEventArgs>) => {
- 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<ExchangeFillEventArgs>) => {
- 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<ExchangeFillEventArgs>(
- 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<void> {
- // HACK: Since the migrations take longer then our global mocha timeout limit
- // we manually increase it for this before hook.
- const mochaTestTimeoutMs = 50000;
- this.timeout(mochaTestTimeoutMs); // 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<ERC20TokenApprovalEventArgs>) =>
- _.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<void> => {
- 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<SignedOrder> {
- // 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<SignedOrder> {
- 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<void> {
- 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<void> {
- 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<void> {
- 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<ContractAddresses> {
- 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<BigNumber> {
- 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. `<Container>Stuff</Container>`: 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. `<Text>Look ma, text!</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 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="UTF-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
- <meta http-equiv="X-UA-Compatible" content="ie=edge" />
- <title>Test</title>
- </head>
- <body>
- <ul>
- <li><a href="/compiler">Compiler</a></li>
- <li><a href="/coverage">Coverage</a></li>
- <li><a href="/profiler">Profiler</a></li>
- <li><a href="/trace">Trace</a></li>
- </ul>
- </body>
-</html>
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
--- a/packages/dev-tools-pages/assets/favicons/compiler.ico
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/favicons/cov.ico
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/favicons/profiler.ico
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/favicons/trace.ico
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Bold-subset.woff2
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/fonts/MaisonNeue-Book-subset.woff2
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/images/og-compiler.png
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/images/og-cov.png
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/images/og-profiler.png
+++ /dev/null
Binary files 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
--- a/packages/dev-tools-pages/assets/images/og-trace.png
+++ /dev/null
Binary files 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 @@
-<!DOCTYPE html>
-<html lang="en">
-<head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="preload" href="/fonts/MaisonNeue-Book-subset.woff2" as="font" type="font/woff2" crossorigin>
- <link rel="preload" href="/fonts/MaisonNeue-Bold-subset.woff2" as="font" type="font/woff2" crossorigin>
- <title><%= htmlWebpackPlugin.options.title %></title>
-</head>
-<body>
- <div id="app"></div>
-</body>
-</html> \ 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<{}> = () => (
- <BaseAnimation animationData={animationData} width={2150} height={700} />
-);
-
-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<{}> = () => (
- <BaseAnimation animationData={animationData} width={1981} height={660} />
-);
-
-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<AnimationProps, AnimationState> {
- 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 (
- <Container height={height}>
- <InnerContainer>
- <Lottie
- width={width}
- height={height}
- options={{
- loop: true,
- autoplay: true,
- animationData,
- }}
- />
- </InnerContainer>
- </Container>
- );
- }
- 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<AnimationProps>`
- 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<{}> = () => (
- <BaseAnimation animationData={animationData} width={1985} height={657} />
-);
-
-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<{}> = () => (
- <BaseAnimation animationData={animationData} width={2241} height={610} />
-);
-
-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<BaseProps> = props => (
- <ThemeContext.Provider value={props.context}>
- <ThemeProvider theme={props.context}>
- <React.Fragment>
- <GlobalStyles colors={props.context.colors} />
- <Header />
- {props.children}
- <Footer />
- </React.Fragment>
- </ThemeProvider>
- </ThemeContext.Provider>
-);
-
-export { Base };
diff --git a/packages/dev-tools-pages/ts/components/breakout.tsx b/packages/dev-tools-pages/ts/components/breakout.tsx
deleted file mode 100644
index 505d8de41..000000000
--- a/packages/dev-tools-pages/ts/components/breakout.tsx
+++ /dev/null
@@ -1,12 +0,0 @@
-import styled from 'styled-components';
-
-import { media } from 'ts/variables';
-
-const Breakout = styled.div`
- ${media.small`
- margin-left: -2.5rem;
- width: calc(100% + 5rem);
- `};
-`;
-
-export { Breakout };
diff --git a/packages/dev-tools-pages/ts/components/button.tsx b/packages/dev-tools-pages/ts/components/button.tsx
deleted file mode 100644
index ae032eb05..000000000
--- a/packages/dev-tools-pages/ts/components/button.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import styled from 'styled-components';
-
-import { colors, media } from 'ts/variables';
-
-interface ButtonProps {
- large?: boolean;
-}
-
-const Button = styled.button<ButtonProps>`
- font-family: inherit;
- line-height: 1;
- font-weight: 500;
- white-space: nowrap;
- vertical-align: middle;
- background-color: ${props => props.theme.colors.secondary};
- color: ${colors.black};
- border: 0;
- border-radius: 5rem;
- display: inline-flex;
- justify-content: space-between;
- align-items: center;
-
- ${props =>
- props.large
- ? `
- font-size: 1rem;
- padding: 1.1875rem 2.375rem 1.0625rem;
- `
- : `
- font-size: .875rem;
- padding: .5625rem 1.25rem;
- `}
-
- :hover, :focus {
- background-color: ${props => props.theme.colors.secondary_alt};
- outline: 0;
- }
-
- ${media.small`
- font-size: .875rem;
- padding: .5625rem 1.25rem;
- `}
-
- ${props =>
- props.large &&
- media.small`
- font-size: 1rem;
- padding: 1rem 1.5rem .75rem;
- `}
-`;
-
-export { Button };
diff --git a/packages/dev-tools-pages/ts/components/call_to_action.tsx b/packages/dev-tools-pages/ts/components/call_to_action.tsx
deleted file mode 100644
index 3805a7c8c..000000000
--- a/packages/dev-tools-pages/ts/components/call_to_action.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ContextInterface, ThemeContext } from 'ts/context';
-
-import { Button } from './button';
-
-const CallToAction: React.StatelessComponent<ContextInterface> = ({ children }) => (
- <ThemeContext.Consumer>
- {({ docLink }: ContextInterface) => (
- <StyledCallToAction>
- <CallToActionContainer>
- <Button as="a" href={docLink} target="_blank" large={true}>
- Read the Docs
- </Button>
- </CallToActionContainer>
- {children}
- </StyledCallToAction>
- )}
- </ThemeContext.Consumer>
-);
-
-const StyledCallToAction = styled.section`
- text-align: center;
- padding-top: 0;
- padding-bottom: 1rem;
- padding-left: 2.5rem;
- padding-right: 2.5rem;
- min-height: min-content;
- max-height: 37.5rem;
- height: 20vh;
- position: relative;
-`;
-
-const CallToActionContainer = styled.div`
- margin: 0 auto;
- max-width: 590px;
-`;
-
-export { CallToAction };
diff --git a/packages/dev-tools-pages/ts/components/code.tsx b/packages/dev-tools-pages/ts/components/code.tsx
deleted file mode 100644
index 0f7d6a0cd..000000000
--- a/packages/dev-tools-pages/ts/components/code.tsx
+++ /dev/null
@@ -1,197 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from 'ts/variables';
-
-import { Button as BaseButton } from './button';
-
-const isTouch = Boolean(
- 'ontouchstart' in window ||
- (window as any).navigator.maxTouchPoints > 0 ||
- (window as any).navigator.msMaxTouchPoints > 0,
-);
-
-interface CodeProps {
- language?: string;
- isLight?: boolean;
- isDiff?: boolean;
- gutter?: Array<number | undefined>;
- gutterLength?: number;
- canCopy?: boolean;
- isEtc?: boolean;
-}
-
-interface CodeState {
- hlCode?: string;
- didCopy?: boolean;
-}
-
-const Button = styled(BaseButton)`
- opacity: ${isTouch ? '1' : '0'};
- position: absolute;
- top: 1rem;
- right: 1rem;
- transition: opacity 0.2s;
- :focus {
- opacity: 1;
- }
-`;
-
-const Container = styled.div`
- position: relative;
- &:hover ${Button} {
- opacity: 1;
- }
-`;
-
-const Base = styled.div<CodeProps>`
- font-size: 0.875rem;
- color: ${props => (_.isUndefined(props.language) ? colors.white : 'inherit')};
- background-color: ${props =>
- props.isLight ? 'rgba(255,255,255,.15)' : _.isUndefined(props.language) ? colors.black : '#F1F4F5'};
- white-space: ${props => (_.isUndefined(props.language) ? 'nowrap' : '')};
- position: relative;
-
- ${props =>
- props.isDiff
- ? `
- background-color: #E9ECED;
- display: flex;
- padding-top: 1.5rem;
- padding-bottom: 1.5rem;
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
- `
- : ``}
-`;
-
-const CodeDiff: React.StatelessComponent<any> = ({ gutterLength, ...props }) => <code {...props} />;
-const StyledCodeDiff = styled(CodeDiff)`
- ::before {
- content: '';
- width: calc(0.75rem + ${props => props.gutterLength}ch);
- background-color: #e2e5e6;
- position: absolute;
- top: 0;
- left: 0;
- bottom: 0;
- }
-
- [class^='line-'] {
- display: inline-block;
- width: 100%;
- position: relative;
- padding-right: 1.5rem;
- padding-left: calc(2.25rem + ${props => props.gutterLength}ch);
-
- ::before {
- content: attr(data-gutter);
-
- width: ${props => props.gutterLength};
- padding-left: 0.375rem;
- padding-right: 0.375rem;
- position: absolute;
- top: 50%;
- left: 0;
- transform: translateY(-50%);
- z-index: 1;
- }
- }
-
- .line-addition {
- background-color: rgba(0, 202, 105, 0.1);
- }
- .line-deletion {
- background-color: rgba(255, 0, 0, 0.07);
- }
-`;
-
-const StyledPre = styled.pre<CodeProps>`
- margin: 0;
- ${props =>
- !props.isDiff
- ? `
- padding: 1.5rem;
- overflow-x: auto;
- -webkit-overflow-scrolling: touch;
- `
- : ``};
-`;
-
-const StyledCopyInput = styled.textarea`
- opacity: 0;
- height: 0;
- position: absolute;
- top: 0;
- right: 0;
- z-index: -1;
-`;
-
-class Code extends React.Component<CodeProps, CodeState> {
- public state: CodeState = {};
- private readonly _code = React.createRef<HTMLTextAreaElement>();
- public componentDidMount(): void {
- // _onMountAsync is only setting state, so no point in handling the promise
- // tslint:disable-next-line:no-floating-promises
- this._onMountAsync();
- }
- public render(): React.ReactNode {
- const { language, isLight, isDiff, children, gutterLength, canCopy } = this.props;
- const { hlCode } = this.state;
- return (
- <Container>
- <Base language={language} isDiff={isDiff} isLight={isLight}>
- <StyledPre isDiff={isDiff}>
- {_.isUndefined(hlCode) ? (
- <code>{children}</code>
- ) : (
- <StyledCodeDiff
- gutterLength={gutterLength}
- dangerouslySetInnerHTML={hlCode ? { __html: this.state.hlCode } : null}
- />
- )}
- </StyledPre>
- {!('clipboard' in navigator) ? (
- <StyledCopyInput readOnly={true} aria-hidden="true" ref={this._code} value={children} />
- ) : null}
- </Base>
- {canCopy ? (
- <Button onClick={this._handleCopyAsync.bind(this)}>{this.state.didCopy ? 'Copied' : 'Copy'}</Button>
- ) : null}
- </Container>
- );
- }
- private async _onMountAsync(): Promise<void> {
- const { language, children, isDiff, gutter, isEtc } = this.props;
-
- const code = children as string;
-
- if (language !== undefined) {
- const { highlight } = await System.import(/* webpackChunkName: 'highlightjs' */ 'ts/highlight');
-
- this.setState({
- hlCode: highlight({ language, code, isDiff, gutter, isEtc }),
- });
- }
- }
- private async _handleCopyAsync(): Promise<void> {
- try {
- if ('clipboard' in navigator) {
- await (navigator as any).clipboard.writeText(this.props.children);
- this.setState({ didCopy: true });
- } else {
- const lastActive = document.activeElement as HTMLElement;
- this._code.current.focus();
- this._code.current.select();
- document.execCommand('copy');
- lastActive.focus();
- this.setState({ didCopy: true });
- }
- } catch (error) {
- this.setState({ didCopy: false });
- }
- }
-}
-
-export { Code };
diff --git a/packages/dev-tools-pages/ts/components/compiler.tsx b/packages/dev-tools-pages/ts/components/compiler.tsx
deleted file mode 100644
index c00e3a2b9..000000000
--- a/packages/dev-tools-pages/ts/components/compiler.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors, media } from 'ts/variables';
-
-import { Breakout } from './breakout';
-import { Container } from './container';
-import { InlineCode } from './inline-code';
-
-const Cards = styled.dl`
- column-count: 3;
- column-gap: 1.25rem;
-
- ${media.medium`
- column-count: 1;
- `};
-`;
-
-const Card = styled.div`
- background-color: ${colors.lightGray};
- padding: 3.125rem;
- padding-bottom: 2.5rem;
- display: inline-block;
- margin-bottom: 1.25rem;
- width: 100%;
-
- ${media.medium`
- padding: 1.875rem;
- `};
-`;
-
-const Dt = styled.dt`
- font-weight: 500;
- display: inline;
- ::after {
- content: '. ';
- }
-`;
-
-const Dd = styled.dd`
- display: inline;
- margin-left: 0;
-`;
-
-const cards = [
- {
- title: 'Project-centric',
- body: (
- <React.Fragment>
- Compiles an entire project instead of only individual <InlineCode isAlt={true}>.sol</InlineCode> files.
- </React.Fragment>
- ),
- },
- {
- title: 'Incremental builds',
- body: 'Only recompiles smart contracts that have been modified.',
- },
- {
- title: 'Customizable artifacts',
- body:
- 'Stores only the required compiler output in your artifacts, so you can have complete control over your bundle size.',
- },
- {
- title: 'Seamless',
- body: 'Fetches and caches the required compiler binaries for the Solidity versions you use.',
- },
- {
- title: 'Versioning',
- body:
- 'Compiles each contract with the Solidity version specified at the top of its file (it even supports version ranges!).',
- },
- {
- title: 'Watch mode',
- body: 'Have your contracts instantly recompile on file save.',
- },
-];
-
-const Compiler: React.StatelessComponent<{}> = () => (
- <Container>
- <Breakout>
- <Cards>
- {_.map(cards, card => (
- <Card key={card.title.split(' ').join('-')}>
- <Dt>{card.title}</Dt>
- <Dd>{card.body}</Dd>
- </Card>
- ))}
- </Cards>
- </Breakout>
- </Container>
-);
-
-export { Compiler };
diff --git a/packages/dev-tools-pages/ts/components/container.tsx b/packages/dev-tools-pages/ts/components/container.tsx
deleted file mode 100644
index 192d82af8..000000000
--- a/packages/dev-tools-pages/ts/components/container.tsx
+++ /dev/null
@@ -1,13 +0,0 @@
-import styled from 'styled-components';
-
-interface ContainerProps {
- wide?: boolean;
-}
-
-const Container = styled.div<ContainerProps>`
- max-width: 77.5rem;
- margin: 0 auto;
- width: ${props => (props.wide ? '100%' : 'calc(100% - 5rem)')};
-`;
-
-export { Container };
diff --git a/packages/dev-tools-pages/ts/components/content-block.tsx b/packages/dev-tools-pages/ts/components/content-block.tsx
deleted file mode 100644
index b800c5d44..000000000
--- a/packages/dev-tools-pages/ts/components/content-block.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ContextInterface } from 'ts/context';
-import { media } from 'ts/variables';
-
-import { Alpha, Beta } from './typography';
-
-const Base = styled.div`
- display: flex;
- align-items: flex-start;
- justify-content: space-between;
- :not(:last-of-type) {
- margin-bottom: 6.25rem;
- }
- ${Beta} {
- margin-bottom: 2.5rem;
- }
- ${media.small`
- display: block;
- :not(:last-of-type) {
- margin-bottom: 3.125rem;
- }
- `};
-`;
-
-const Content = styled.div`
- width: 66.693548387%;
- ${media.small`
- width: 100%;
- `};
-`;
-
-const Item = styled.div`
- p {
- max-width: 31.25rem;
- }
-
- &:not(:last-of-type) {
- margin-bottom: 2.5rem;
- ${media.small`
- margin-bottom: 1.875rem;
- `};
- }
-`;
-
-const StyledTitle = styled(Alpha)`
- color: ${props => props.color};
- ${media.small`
- & + div {
- margin-top: 1.5rem;
- }
- `};
-`;
-
-interface ContentBlockProps extends ContextInterface {
- title: string;
- main?: boolean;
- children?: React.ReactNode;
-}
-
-const ContentBlock: React.StatelessComponent<ContentBlockProps> = props => {
- const children = React.Children.map(props.children, child => {
- return <Item>{child}</Item>;
- });
-
- const Title = props.main ? StyledTitle : Beta;
-
- return (
- <Base>
- <Title color={props.colors}>{props.title}</Title>
- {_.isUndefined(children) ? null : <Content>{children}</Content>}
- </Base>
- );
-};
-
-export { ContentBlock };
diff --git a/packages/dev-tools-pages/ts/components/content.tsx b/packages/dev-tools-pages/ts/components/content.tsx
deleted file mode 100644
index b3c353f8a..000000000
--- a/packages/dev-tools-pages/ts/components/content.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { Container } from './container';
-
-const StyledMain = styled.div<MainProps>`
- padding-top: 6.25rem;
- padding-bottom: 6.25rem;
- ${props =>
- props.dark
- ? `
- background-color: #000;
- color: #fff;
- p:not([class]) {
- color: #CCC;
- }
- `
- : ''};
-`;
-
-interface MainProps {
- dark?: boolean;
-}
-
-const Content: React.StatelessComponent<MainProps> = props => (
- <StyledMain dark={props.dark}>
- <Container>{props.children}</Container>
- </StyledMain>
-);
-
-export { Content };
diff --git a/packages/dev-tools-pages/ts/components/footer.tsx b/packages/dev-tools-pages/ts/components/footer.tsx
deleted file mode 100644
index 7e44bf128..000000000
--- a/packages/dev-tools-pages/ts/components/footer.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { context as compiler } from 'ts/context/compiler';
-import { context as coverage } from 'ts/context/coverage';
-import { context as profiler } from 'ts/context/profiler';
-import { context as trace } from 'ts/context/trace';
-import MainIcon from 'ts/icons/logos/0x.svg';
-import { media } from 'ts/variables';
-
-import { Container } from './container';
-import { Alpha, Beta } from './typography';
-
-const tools = [trace, coverage, compiler, profiler];
-
-const Footer: React.StatelessComponent<{}> = () => (
- <StyledFooter>
- <Container>
- <Top>
- <Alpha>Other tools by 0x</Alpha>
- <List>
- {_.map(tools, ({ title, subtitle, icon, name }) => (
- <ListItem key={title}>
- <ListLink href={`https://sol-${name}.com`}>
- <Icon as={icon as 'svg'} />
- <div>
- <Beta>{title}</Beta>
- <p>{subtitle}</p>
- </div>
- </ListLink>
- </ListItem>
- ))}
- </List>
- </Top>
- <Media as="aside">
- <Icon as={MainIcon} />
- <Small>
- 0x is an open, permissionless protocol allowing for tokens to be traded on the Ethereum blockchain.
- Interested in joining our team?{' '}
- <a href="https://0x.org/careers" target="_blank">
- We're hiring
- </a>
- </Small>
- </Media>
- </Container>
- </StyledFooter>
-);
-
-const StyledFooter = styled.footer`
- background-color: ${props => props.theme.colors.secondary};
- padding-top: 6.25rem;
- padding-bottom: 5.4375rem;
-
- ${media.small`padding-top: 2.5rem;`};
-`;
-
-const Top = styled.div`
- display: flex;
- justify-content: space-between;
- margin-bottom: 9.375rem;
-
- ${media.medium`
- display: block;
- margin-bottom: 5.3125rem;
- `};
-
- ${Alpha} {
- ${media.medium`margin-bottom: 3.8125rem;`};
- }
-`;
-
-const Icon = styled.div`
- margin-right: 1.3125rem;
- flex-shrink: 0;
- ${media.small`margin-right: 0.9375rem`};
-`;
-
-const Media = styled.div`
- display: flex;
- align-items: center;
-
- ${Icon} {
- margin-top: 0.5rem;
- align-self: flex-start;
- }
-`;
-
-const List = styled.ul`
- list-style: none;
- margin: 0;
- padding: 0;
- width: 66.693548387%;
- display: flex;
- flex-wrap: wrap;
-
- ${media.medium`
- width: 100%;
- `};
-
- ${media.small`
- display: block;
- `};
-`;
-
-const ListItem = styled.li`
- margin-bottom: 3.3125rem;
- padding-right: 1rem;
- flex-basis: 50%;
- :nth-last-of-type(-n + 2) {
- margin-bottom: 0;
-
- ${media.small`margin-bottom: 1.875rem`};
- }
-
- ${media.small`
- margin-bottom: 1.875rem
- :last-of-type {
- margin-bottom: 0;
- }
- `};
-`;
-
-const ListLink = styled.a`
- display: flex;
- align-items: center;
- :hover {
- color: ${props => props.theme.colors.dark};
- }
-`;
-
-const Small = styled.small`
- font-size: 1em;
- max-width: 37.5rem;
-`;
-
-export { Footer };
diff --git a/packages/dev-tools-pages/ts/components/header.tsx b/packages/dev-tools-pages/ts/components/header.tsx
deleted file mode 100644
index 4d3a8685c..000000000
--- a/packages/dev-tools-pages/ts/components/header.tsx
+++ /dev/null
@@ -1,76 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ContextInterface, ThemeContext } from 'ts/context';
-import { media } from 'ts/variables';
-
-import { Container } from './container';
-import { Small } from './typography';
-
-const Header: React.StatelessComponent<{}> = () => (
- <ThemeContext.Consumer>
- {({ icon, title }: ContextInterface) => (
- <StyledHeader>
- <Container>
- <LogoMark>
- <Logo as={icon as 'svg'} />
- <Title>{title}</Title>
- </LogoMark>
-
- <Link as="a" href="https://0x.org/" target="_blank">
- Built by 0x
- </Link>
- </Container>
- </StyledHeader>
- )}
- </ThemeContext.Consumer>
-);
-
-const StyledHeader = styled.header`
- padding-top: 3.75rem;
- padding-bottom: 0.875rem;
- width: 100%;
- position: absolute;
- top: 0;
- left: 0;
- z-index: 2;
- ${Container} {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
-
- ${media.small`padding-top: 2.125rem;`};
-`;
-
-const LogoMark = styled.div`
- position: relative;
- height: 1.75rem;
- display: flex;
- align-items: center;
-`;
-
-const Logo = styled.div`
- color: ${props => props.theme.colors.main};
- width: 1.75rem;
- height: 100%;
-`;
-
-const Title = styled.h1`
- font-size: 1.5rem;
- line-height: 1;
- white-space: nowrap;
- margin-top: 2px;
- margin-bottom: 0;
- margin-left: 0.8125rem;
-
- ${media.small`font-size: 1.25rem;`};
-`;
-
-const Link = styled(Small)`
- :hover {
- text-decoration: underline;
- }
-`;
-
-export { Header };
diff --git a/packages/dev-tools-pages/ts/components/hero.tsx b/packages/dev-tools-pages/ts/components/hero.tsx
deleted file mode 100644
index e2977f3f2..000000000
--- a/packages/dev-tools-pages/ts/components/hero.tsx
+++ /dev/null
@@ -1,63 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ContextInterface, ThemeContext } from 'ts/context';
-import { media } from 'ts/variables';
-
-import { Button } from './button';
-import { Beta } from './typography';
-
-const Hero: React.StatelessComponent<ContextInterface> = ({ children }) => (
- <ThemeContext.Consumer>
- {({ subtitle, tagline, docLink }: ContextInterface) => (
- <StyledHero>
- <HeroContainer>
- <Subtitle>{subtitle}</Subtitle>
- <Tagline as="p">{tagline}</Tagline>
- <Button as="a" href={docLink} target="_blank" large={true}>
- Read the Docs
- </Button>
- </HeroContainer>
- {children}
- </StyledHero>
- )}
- </ThemeContext.Consumer>
-);
-
-const StyledHero = styled.section`
- text-align: center;
- padding-top: 9.375rem;
- padding-bottom: 2rem;
- padding-left: 2.5rem;
- padding-right: 2.5rem;
- min-height: min-content;
- max-height: 37.5rem;
- height: 80vh;
- position: relative;
-`;
-
-const HeroContainer = styled.div`
- margin: 0 auto;
- max-width: 590px;
-`;
-
-const Subtitle = styled.h2`
- font-size: 3.75rem;
- line-height: 1.16;
- margin-bottom: 1.5rem;
-
- ${media.small`
- font-size: 2.25rem;
- line-height: 1.1;
- margin-bottom: 1.375rem;
- `};
-`;
-
-const Tagline = styled(Beta)`
- margin-bottom: 2rem;
- ${media.small`
- margin-bottom: 1.25rem;
- `};
-`;
-
-export { Hero };
diff --git a/packages/dev-tools-pages/ts/components/inline-code.tsx b/packages/dev-tools-pages/ts/components/inline-code.tsx
deleted file mode 100644
index 561666b0f..000000000
--- a/packages/dev-tools-pages/ts/components/inline-code.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from '../variables';
-
-interface InlineCodeProps {
- isAlt?: boolean;
- children: React.ReactNode;
-}
-
-const Code: React.StatelessComponent<InlineCodeProps> = ({ isAlt, children, ...props }) => (
- <code {...props}>{children}</code>
-);
-
-const InlineCode = styled(Code)`
- background-color: ${props => (props.isAlt ? '#E5E8E9' : colors.blueGray)};
- padding: 0.3125rem;
-`;
-
-export { InlineCode };
diff --git a/packages/dev-tools-pages/ts/components/intro.tsx b/packages/dev-tools-pages/ts/components/intro.tsx
deleted file mode 100644
index a0e76ab17..000000000
--- a/packages/dev-tools-pages/ts/components/intro.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors, media } from 'ts/variables';
-
-import { Breakout } from './breakout';
-import { Container } from './container';
-import { Alpha, Lead } from './typography';
-
-const Main = styled.div`
- background-color: ${colors.lightGray};
- padding: 6.25rem;
- display: flex;
- justify-content: space-between;
-
- ${media.large`
- padding: 2.5rem;
- `};
- ${media.medium`
- display: block;
- `};
-`;
-
-const Title = styled(Alpha)`
- margin-bottom: 2.5rem;
-
- ${media.medium`margin-bottom: 2.25rem;`};
-`;
-
-const StyledIntroLead = styled(Lead)`
- max-width: 25.9375rem;
- margin-right: 2rem;
- ${media.medium`
- max-width: 100%;
- margin-bottom: 1.5625rem;
- `};
-`;
-
-const StyledIntroAside = styled.div`
- max-width: 32.5rem;
- position: relative;
- ${media.medium`
- max-width: 100%;
- `};
-`;
-
-interface IntroLeadProps {
- title: string;
-}
-
-const IntroLead: React.StatelessComponent<IntroLeadProps> = props => (
- <StyledIntroLead as="div">
- <Title>{props.title}</Title>
- {props.children}
- </StyledIntroLead>
-);
-
-const IntroAside: React.StatelessComponent<{}> = props => (
- <Breakout>
- <StyledIntroAside>{props.children}</StyledIntroAside>
- </Breakout>
-);
-
-const Intro: React.StatelessComponent<{}> = props => (
- <Container wide={true}>
- <Main>{props.children}</Main>
- </Container>
-);
-
-export { IntroLead, IntroAside, Intro };
diff --git a/packages/dev-tools-pages/ts/components/list.tsx b/packages/dev-tools-pages/ts/components/list.tsx
deleted file mode 100644
index ffa7c1cf3..000000000
--- a/packages/dev-tools-pages/ts/components/list.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { media } from 'ts/variables';
-
-const StyledList = styled.ul`
- list-style-type: none;
- margin: 0;
- padding: 0;
- position: relative;
-`;
-
-const StyledItem = styled.li`
- position: relative;
- padding-left: 1.625rem;
-
- :before {
- content: '';
- border: 1px solid black;
- width: 0.625rem;
- height: 0.625rem;
- display: inline-block;
- position: absolute;
- margin-top: 2px;
- top: 0.3125rem;
- left: 0;
- transform: rotate(45deg);
- }
- :not(:last-child) {
- margin-bottom: 0.5625rem;
- ${media.small`
- margin-bottom: 0.375rem;
- `};
- }
-`;
-
-interface ListProps {
- items?: [];
-}
-
-const List: React.StatelessComponent<ListProps> = props => (
- <StyledList>
- {props.children !== undefined
- ? props.children
- : _.map(props.items, (bullet, index) => <StyledItem key={index}>{bullet}</StyledItem>)}
- </StyledList>
-);
-
-export { List, StyledItem as ListItem };
diff --git a/packages/dev-tools-pages/ts/components/tabs.tsx b/packages/dev-tools-pages/ts/components/tabs.tsx
deleted file mode 100644
index fa2145208..000000000
--- a/packages/dev-tools-pages/ts/components/tabs.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import * as React from 'react';
-import { Tab, TabList, TabPanel, Tabs as ReactTabs } from 'react-tabs';
-import styled from 'styled-components';
-
-import { colors } from 'ts/variables';
-
-import { Breakout } from './breakout';
-
-const StyledTabList = styled(TabList)`
- text-transform: uppercase;
- list-style: none;
- margin: 0;
- padding: 0;
- overflow: hidden;
-`;
-
-const StyledTab = styled(Tab)`
- background-color: ${props => props.theme.colors.secondary};
- height: 2.5rem;
- padding-left: 1rem;
- padding-right: 1rem;
- display: flex;
- justify-content: space-around;
- align-items: center;
- float: left;
- &:not(:first-of-type) {
- margin-left: 0.25rem;
- }
-
- &[aria-selected='true'] {
- background-color: ${colors.gray};
- }
-
- &[aria-selected='false']:focus,
- &[aria-selected='false']:hover {
- background-color: ${props => props.theme.colors.secondary_alt};
- cursor: pointer;
- }
-`;
-
-const Tabs: React.StatelessComponent<{}> = props => (
- <Breakout>
- <ReactTabs>
- <StyledTabList>
- {React.Children.map(props.children, child => {
- const { title } = React.cloneElement(child as React.ReactElement<any>).props;
- return <StyledTab>{title}</StyledTab>;
- })}
- </StyledTabList>
-
- {React.Children.map(props.children, child => (
- <TabPanel>{child}</TabPanel>
- ))}
- </ReactTabs>
- </Breakout>
-);
-
-interface TabBlockProps {
- title: string;
-}
-
-const TabBlock: React.StatelessComponent<TabBlockProps> = props => <React.Fragment>{props.children}</React.Fragment>;
-
-const ContextTabs = Tabs;
-
-export { ContextTabs as Tabs, TabBlock };
diff --git a/packages/dev-tools-pages/ts/components/trace.tsx b/packages/dev-tools-pages/ts/components/trace.tsx
deleted file mode 100644
index 81f6db0ab..000000000
--- a/packages/dev-tools-pages/ts/components/trace.tsx
+++ /dev/null
@@ -1,213 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ContextInterface, ThemeContext } from 'ts/context';
-import ExactLocation from 'ts/icons/exact-location.svg';
-import NoLocation from 'ts/icons/no-location.svg';
-import TimeConsuming from 'ts/icons/time-consuming.svg';
-import TimeSaving from 'ts/icons/time-saving.svg';
-import { colors, media } from 'ts/variables';
-
-import { Breakout } from './breakout';
-import { Code } from './code';
-import { Container } from './container';
-import { Alpha, Gamma, Lead } from './typography';
-
-const Trace: React.StatelessComponent<{}> = () => (
- <ThemeContext.Consumer>
- {(props: ContextInterface) => (
- <StyledSection background={props.colors.secondary}>
- <Wrapper>
- <Block>
- <Alpha>The Issue</Alpha>
- <MainCopy>
- Every time an Ethereum transaction fails, it's extremely hard to trace down the
- troublemaking line of code. The only hint you'll get is a generic error.
- </MainCopy>
- <Breakout>
- <Code isLight={true}>Error: VM Exception while processing transaction: revert</Code>
- </Breakout>
-
- <List>
- <Item>
- <Copy dark={true}>
- <Gamma as="h3">No location</Gamma>
- <p>
- The error basically says "anything could have gone wrong here", which keeps you
- completely in the dark about its exact location.
- </p>
- </Copy>
- <Icon as={NoLocation} />
- </Item>
-
- <Item>
- <Copy dark={true}>
- <Gamma as="h3">Time-consuming</Gamma>
- <p>
- Working within a large code-base that contains many smart contracts, finding the
- failing line of code quickly becomes a daunting task.
- </p>
- </Copy>
- <Icon as={TimeConsuming} />
- </Item>
- </List>
- </Block>
-
- <Block background={props.colors.secondary}>
- <Alpha>The Fix</Alpha>
- <MainCopy>
- Sol-trace will give you full stack traces, including contract names, line numbers and code
- snippets, every time you encounter an error.
- </MainCopy>
- <Breakout>
- <Code isLight={true} language="javascript">
- {`contracts/src/2.0.0/protocol/Exchange/MixinSignatureValidator.sol:51:8
- require(
- isValidSignature(
- hash,
- signerAddress,
- signature
- ),
- "INVALID_SIGNATURE"
- )`}
- </Code>
- </Breakout>
-
- <List>
- <Item>
- <Copy>
- <Gamma as="h3">Exact location</Gamma>
- <p>
- It shows you the exact location of the offending line and where it was called
- from.
- </p>
- </Copy>
- <Icon as={ExactLocation} />
- </Item>
-
- <Item>
- <Copy>
- <Gamma as="h3">Time-saving</Gamma>
- <p>
- Turning "Your code failed somewhere, good luck debugging it" into "Your code
- failed on line X of contract Y", drastically improves the developer experience.
- </p>
- </Copy>
- <Icon as={TimeSaving} />
- </Item>
- </List>
- </Block>
- </Wrapper>
- </StyledSection>
- )}
- </ThemeContext.Consumer>
-);
-
-interface TraceProps {
- background?: string;
-}
-
-const StyledSection = styled.section<TraceProps>`
- max-width: 90rem;
- margin: 0 auto;
- background: linear-gradient(to right, ${colors.black} 50%, ${props => props.background} 50%);
- overflow: hidden;
- ${media.large`
- background: none
- padding-top: 0;
- padding-bottom: 0;
- `};
-`;
-
-const Wrapper = styled(Container)`
- display: flex;
-
- ${Alpha} {
- padding-bottom: 2.5rem;
-
- ${media.small`padding-bottom: 1.875rem;`};
- }
-
- ${media.large`
- display: block;
- width: 100%;
- `};
-`;
-
-const Block = styled.div<TraceProps>`
- width: 50%;
- background: ${props => (props.background ? props.background : colors.black)};
- color: ${props => (props.background ? 'inherit' : colors.white)};
- padding-top: 6.25rem;
- padding-bottom: 5.25rem;
-
- :first-of-type {
- padding-right: 6.25rem;
- }
- :last-of-type {
- padding-left: 6.25rem;
- }
-
- ${media.xlarge`
- :first-of-type {
- padding-right: 2.5rem;
- }
- :last-of-type {
- padding-left: 2.5rem;
- }
- `}
- ${media.large`
- width: 100%;
- padding: 2.5rem;
- `}
-
- ${media.small`
- padding-left: 1.875rem;
- padding-right: 1.875rem;
- `};
-`;
-
-const MainCopy = styled(Lead)`
- margin-bottom: 3.1875rem;
- ${media.small`
- margin-bottom: 1.125rem;
- `};
-`;
-
-const List = styled.ul`
- margin-top: 6.25rem;
- margin-bottom: 0;
- padding: 0;
-
- ${media.small`margin-top: 3.4375rem;`};
-`;
-
-const Item = styled.li`
- display: flex;
- align-items: center;
-
- :not(:last-child) {
- margin-bottom: 4.4375rem;
-
- ${media.small`margin-bottom: 3.4375rem;`};
- }
-`;
-
-const Copy = styled.div<{ dark: boolean }>`
- margin-right: 5.875rem;
- ${props =>
- props.dark &&
- `
- p {
- color: #ccc;
- }
- `}
-
- ${media.small`margin-right: 2.0625rem;`};
-`;
-
-const Icon = styled.div`
- flex-shrink: 0;
-`;
-
-export { Trace };
diff --git a/packages/dev-tools-pages/ts/components/typography.tsx b/packages/dev-tools-pages/ts/components/typography.tsx
deleted file mode 100644
index e4b13163a..000000000
--- a/packages/dev-tools-pages/ts/components/typography.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import styled from 'styled-components';
-
-import { media } from '../variables';
-
-const Alpha = styled.h2`
- font-size: 1.75rem;
- line-height: 1;
-
- ${media.small`font-size: 1.5rem;`};
-`;
-
-const Beta = styled.h3`
- font-size: 1.25rem;
- line-height: 1.65;
-`;
-
-const Gamma = styled.h4`
- font-size: 1rem;
-
- ${media.small`font-size: 0.875rem;`};
-`;
-
-const Lead = styled.p`
- font-size: 1.25rem;
- line-height: 1.6;
- ${media.small`font-size: 1rem;`};
-`;
-
-const Small = styled.p`
- font-size: 0.875rem;
-`;
-
-export { Alpha, Beta, Gamma, Lead, Small };
diff --git a/packages/dev-tools-pages/ts/context/compiler.tsx b/packages/dev-tools-pages/ts/context/compiler.tsx
deleted file mode 100644
index e4642c826..000000000
--- a/packages/dev-tools-pages/ts/context/compiler.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import Icon from 'ts/icons/logos/compiler.svg';
-
-import { ContextInterface } from './index';
-
-export const context: ContextInterface = {
- title: 'sol-compiler',
- name: 'compiler',
- docLink: 'https://0x.org/docs/sol-compiler',
- subtitle: 'Solidity compilation that just works',
- tagline: 'Seamlessly compile an entire solidity project and generate customisable artifacts',
- icon: Icon,
- colors: {
- main: '#1EADCD',
- secondary: '#D1F4FC',
- secondary_alt: '#C4F2FC',
- type: '#30C3E3',
- type_alt: '#16A9C9',
- dark: '#4B818D',
- },
-};
diff --git a/packages/dev-tools-pages/ts/context/coverage.tsx b/packages/dev-tools-pages/ts/context/coverage.tsx
deleted file mode 100644
index 3e44b6ec2..000000000
--- a/packages/dev-tools-pages/ts/context/coverage.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import Icon from 'ts/icons/logos/cov.svg';
-
-import { ContextInterface } from './index';
-
-export const context: ContextInterface = {
- title: 'sol-coverage',
- name: 'coverage',
- subtitle: 'Solidity code coverage',
- docLink: 'https://0x.org/docs/sol-coverage',
- tagline: 'Measure Solidity code coverage',
- icon: Icon,
- colors: {
- main: '#BB9200',
- secondary: '#F1DB8D',
- secondary_alt: '#F1D882',
- type: '#D7AE1B',
- type_alt: '#BD9406',
- dark: '#817033',
- },
-};
diff --git a/packages/dev-tools-pages/ts/context/index.tsx b/packages/dev-tools-pages/ts/context/index.tsx
deleted file mode 100644
index 97ccf5c16..000000000
--- a/packages/dev-tools-pages/ts/context/index.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { createContext } from 'react';
-
-interface ContextInterface {
- title?: string;
- name?: string;
- docLink?: string;
- subtitle?: string;
- tagline?: string;
- icon?: React.ReactNode;
- colors?: {
- main: string;
- secondary: string;
- secondary_alt: string;
- type: string;
- type_alt: string;
- dark: string;
- };
-}
-
-const ThemeContext = createContext({});
-
-export { ThemeContext, ContextInterface };
diff --git a/packages/dev-tools-pages/ts/context/profiler.tsx b/packages/dev-tools-pages/ts/context/profiler.tsx
deleted file mode 100644
index e2ddcb230..000000000
--- a/packages/dev-tools-pages/ts/context/profiler.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import Icon from 'ts/icons/logos/profiler.svg';
-
-import { ContextInterface } from './index';
-
-export const context: ContextInterface = {
- title: 'sol-profiler',
- name: 'profiler',
- docLink: 'https://0x.org/docs/sol-profiler',
- subtitle: 'Gas profiling for Solidity',
- tagline: "Implement data-guided optimizations by profiling your contract's gas usage",
- icon: Icon,
- colors: {
- main: '#FF7144',
- secondary: '#FED7CB',
- secondary_alt: '#FECEBE',
- type: '#EB8666',
- type_alt: '#D16745',
- dark: '#985C49',
- },
-};
diff --git a/packages/dev-tools-pages/ts/context/trace.tsx b/packages/dev-tools-pages/ts/context/trace.tsx
deleted file mode 100644
index 3c19661f2..000000000
--- a/packages/dev-tools-pages/ts/context/trace.tsx
+++ /dev/null
@@ -1,20 +0,0 @@
-import Icon from 'ts/icons/logos/trace.svg';
-
-import { ContextInterface } from './index';
-
-export const context: ContextInterface = {
- title: 'sol-trace',
- name: 'trace',
- subtitle: 'Human-readable stack traces',
- docLink: 'https://0x.org/docs/sol-trace',
- tagline: 'Immediately locate Solidity errors and rapidly debug failed transactions',
- icon: Icon,
- colors: {
- main: '#4F76FF',
- secondary: '#CDD8FF',
- secondary_alt: '#BFCDFF',
- type: '#7090FF',
- type_alt: '#355CE5',
- dark: '#2A4ABC',
- },
-};
diff --git a/packages/dev-tools-pages/ts/globalStyles.tsx b/packages/dev-tools-pages/ts/globalStyles.tsx
deleted file mode 100644
index 507497dd4..000000000
--- a/packages/dev-tools-pages/ts/globalStyles.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import hljsStyles from 'highlight.js/styles/github-gist.css';
-import { createGlobalStyle } from 'styled-components';
-import styledNormalize from 'styled-normalize';
-
-import { ContextInterface } from 'ts/context';
-import { media } from 'ts/variables';
-
-const GlobalStyles = createGlobalStyle<ContextInterface>`
- ${styledNormalize}
- ${hljsStyles}
-
- @font-face {
- font-family: "Maison Neue";
- src: url("/fonts/MaisonNeue-Book-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Book-subset.woff") format("woff");
- font-weight: 300;
- font-display: swap;
- unicode-range: U+20-7E;
- }
- @font-face {
- font-family: "Maison Neue";
- src: url("/fonts/MaisonNeue-Bold-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Bold-subset.woff") format("woff");
- font-weight: 500;
- font-display: swap;
- unicode-range: U+20-7E;
- }
- @font-face {
- font-family: "Maison Neue Mono";
- src: url("/fonts/MaisonNeue-Mono-subset.woff2") format("woff2"), url("/fonts/MaisonNeue-Mono-subset.woff") format("woff");
- font-weight: 300;
- font-display: optional;
- unicode-range: U+20-7E;
- }
-
- html {
- font-size: 100%;
- box-sizing: border-box;
- }
-
- *, *::before, *::after {
- box-sizing: inherit;
- }
-
- body {
- font-family: "Maison Neue", system-ui, sans-serif;
- font-weight: 300;
- font-size: 1rem;
- line-height: 1.8;
-
- ${media.small`font-size: 0.875rem;`};
- }
-
- a {
- color: inherit;
- text-decoration: none;
- }
-
- a:not([class]) {
- color: ${props => props.colors.type_alt};
- text-decoration: none;
-
- &:hover {
- color: ${props => props.colors.type_alt};
- }
- }
-
- h1, h2, h3, h4 {
- font-weight: 500;
- margin: 0;
- }
-
- p {
- margin-top: 0;
- margin-bottom: 1em;
- &:not([class]):last-of-type {
- margin-bottom: 0;
- }
- }
-
- code {
- font-family: "Maison Neue Mono", monospace;
- ${media.small`
- font-size: .75rem;
- `}
- }
-`;
-
-export { GlobalStyles };
diff --git a/packages/dev-tools-pages/ts/globals.d.ts b/packages/dev-tools-pages/ts/globals.d.ts
deleted file mode 100644
index bfe13ee71..000000000
--- a/packages/dev-tools-pages/ts/globals.d.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-declare module 'whatwg-fetch';
-declare module 'react-document-title';
-declare module 'highlight.js/lib/highlight';
-declare module 'highlight.js/lib/languages/javascript';
-declare module 'highlight.js/lib/languages/json';
-
-declare var System: any;
-
-declare module '*.json' {
- const json: any;
- /* tslint:disable */
- export default json;
- /* tslint:enable */
-}
-
-declare module '*.css' {
- const css: any;
- export default css;
-}
-
-declare module '*.svg' {
- const svg: any;
- export default svg;
-}
diff --git a/packages/dev-tools-pages/ts/highlight.tsx b/packages/dev-tools-pages/ts/highlight.tsx
deleted file mode 100644
index 02f4a753e..000000000
--- a/packages/dev-tools-pages/ts/highlight.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-import * as hljs from 'highlight.js/lib/highlight';
-import * as javascript from 'highlight.js/lib/languages/javascript';
-import * as json from 'highlight.js/lib/languages/json';
-import * as _ from 'lodash';
-
-hljs.registerLanguage('javascript', javascript);
-hljs.registerLanguage('json', json);
-
-interface PatchInterface {
- [key: string]: string;
-}
-
-const PATCH_TYPES: PatchInterface = {
- '+': 'addition',
- '-': 'deletion',
- '!': 'change',
-};
-
-function diffHighlight(language: string, code: any, gutter: any): string {
- return _.map(code.split(/\r?\n/g), (line: string, index: number) => {
- let type;
- let currentLine = line;
-
- if (/^-{3} [^-]+ -{4}$|^\*{3} [^*]+ \*{4}$|^@@ [^@]+ @@$/.test(currentLine)) {
- type = 'chunk';
- } else if (/^Index: |^[+\-*]{3}|^[*=]{5,}$/.test(currentLine)) {
- type = 'header';
- } else {
- type = PATCH_TYPES[currentLine[0]] || 'null';
- currentLine = currentLine.replace(/^[+\-! ]/, '');
- }
-
- const g = gutter[index];
-
- return `<span data-gutter="${g !== undefined ? `${g}x` : ''}" class="line-${type}">${
- hljs.highlight(language, currentLine).value
- }</span>`;
- }).join('\n');
-}
-
-interface HighlightProps {
- language: string;
- code: string;
- isDiff?: boolean;
- gutter?: [];
- isEtc?: boolean;
-}
-
-function highlight({ language, code, isDiff, gutter, isEtc }: HighlightProps): string {
- if (isDiff) {
- return diffHighlight(language, code, gutter);
- }
-
- const hlCode = hljs.highlight(language, code).value;
-
- if (!isEtc) {
- return hlCode;
- }
-
- const hc = hlCode.split(/\r?\n/g);
- hc.splice(1, 0, ' ...');
- hc.splice(hc.length - 1, 0, ' ...');
-
- return hc.join('\n');
-}
-
-export { highlight };
diff --git a/packages/dev-tools-pages/ts/icons/exact-location.svg b/packages/dev-tools-pages/ts/icons/exact-location.svg
deleted file mode 100644
index 4934cad58..000000000
--- a/packages/dev-tools-pages/ts/icons/exact-location.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M80 33.6772c0 5.1116-1.8855 10.4454-4.7935 15.617-2.9036 5.1637-6.7886 10.0987-10.6962 14.3941-3.9047 4.2922-7.8128 7.9248-10.746 10.4851-1.4659 1.2795-2.6866 2.2897-3.5393 2.9788-.2841.2296-.5273.4235-.725.5798-.1977-.1563-.4409-.3502-.725-.5798-.8527-.6891-2.0734-1.6993-3.5393-2.9788-2.9332-2.5603-6.8413-6.1929-10.746-10.4851-3.9076-4.2954-7.7926-9.2304-10.6962-14.3941C20.8855 44.1226 19 38.7888 19 33.6772 19 16.7294 32.6606 3 49.5 3 66.3394 3 80 16.7294 80 33.6772z" stroke="#fff" stroke-width="2"/><path d="M50 98V55M27.5 77H73" stroke="#000" stroke-width="2"/><circle cx="50" cy="34" r="10" stroke="#fff" stroke-width="2"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/icons/logos/0x.svg b/packages/dev-tools-pages/ts/icons/logos/0x.svg
deleted file mode 100644
index 1856389db..000000000
--- a/packages/dev-tools-pages/ts/icons/logos/0x.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="37" height="37" viewBox="0 0 37 37" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path d="M9.20465 34.4904c2.38415 1.3926 5.13725 2.2736 8.08905 2.4725 4.0871.2558 7.9188-.8242 11.1261-2.8704 1.5894-1.0232 3.0085-2.2737 4.229-3.7231-.9934-1.3926-2.0719-2.842-3.2072-4.3199-.3123-.3979-.6245-.7958-.9367-1.1937-1.1921 1.9042-2.9518 3.4389-4.9953 4.4052l-3.1789-3.0978-11.12605 8.3272zM2.44955 9.30988C1.08718 11.6972.235696 14.3971.0370167 17.3244-.218428 21.417.860116 25.2821 2.90368 28.4652c1.02177 1.5916 2.27062 3.0126 3.71814 4.2347 1.39075-.9947 2.83827-2.0747 4.31418-3.2115.3974-.3127.7947-.6253 1.1921-.9379-1.9017-1.2221-3.43434-2.9841-4.39936-5.0304l3.12206-3.1831L2.44955 9.30988zM27.7954 2.51741C25.4112 1.12481 22.6581.243776 19.7063.0448336 15.6192-.23937 11.7591.840605 8.55184 2.91529 6.96241 3.93843 5.54327 5.18893 4.32281 6.63837c.9934 1.3926 2.07194 2.84204 3.20725 4.31993.31221.3979.62442.7957.93663 1.1936 1.22046-1.9041 2.95181-3.43884 5.02371-4.40514l2.9802 2.87044 11.3248-8.09979zM34.5788 27.6126c1.334-2.3589 2.1855-5.0304 2.3842-7.9293.2554-4.0925-.8231-7.9293-2.8667-11.14077-1.0218-1.59154-2.2706-3.01256-3.7181-4.23464-1.3908.99472-2.8383 2.07469-4.3142 3.21151-.3974.31262-.7947.62525-1.1921.93787 1.9301 1.22208 3.4627 2.98413 4.4277 5.03043l.0284.0568-3.0085 3.1263 8.2593 10.9418z"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/icons/logos/compiler.svg b/packages/dev-tools-pages/ts/icons/logos/compiler.svg
deleted file mode 100644
index 43c338f29..000000000
--- a/packages/dev-tools-pages/ts/icons/logos/compiler.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M0 28V15V0H15H28V15V28H15H0ZM26 13V2H15V13H26ZM15 15H26V26H15V15ZM13 13V2H2V13H13ZM2 15H13V26H2V15Z" />
-</svg>
diff --git a/packages/dev-tools-pages/ts/icons/logos/cov.svg b/packages/dev-tools-pages/ts/icons/logos/cov.svg
deleted file mode 100644
index 2c4dffb83..000000000
--- a/packages/dev-tools-pages/ts/icons/logos/cov.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M0 0H28V28H0V0ZM2 2V26H26V16H12V2H2ZM14 2V14H26V2H14Z"/>
-</svg>
diff --git a/packages/dev-tools-pages/ts/icons/logos/profiler.svg b/packages/dev-tools-pages/ts/icons/logos/profiler.svg
deleted file mode 100644
index c3ea61294..000000000
--- a/packages/dev-tools-pages/ts/icons/logos/profiler.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M2 2H26V9H2V2ZM2 11V26H26V11H2ZM0 0H2H26H28V2V26V28H26H2H0V26V2V0Z" />
-</svg>
diff --git a/packages/dev-tools-pages/ts/icons/logos/trace.svg b/packages/dev-tools-pages/ts/icons/logos/trace.svg
deleted file mode 100644
index c207b24cb..000000000
--- a/packages/dev-tools-pages/ts/icons/logos/trace.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="28" height="28" viewBox="0 0 28 28" fill="currentColor" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10 15H2V2h24v13H10zm0 2H2v9h8v-9zm2 9h14v-9H12v9zm-2 2H0V0h28v28H10z"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/icons/no-location.svg b/packages/dev-tools-pages/ts/icons/no-location.svg
deleted file mode 100644
index 7df008ee1..000000000
--- a/packages/dev-tools-pages/ts/icons/no-location.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><path opacity=".5" d="M88.2609 41.4937c0 6.4322-2.3631 13.1253-5.9866 19.5928-3.6191 6.4597-8.4581 12.6276-13.3196 17.9909-4.8586 5.3602-9.7205 9.8958-13.3691 13.0921-1.8236 1.5975-3.3423 2.8589-4.4037 3.7198-.4285.3475-.7823.6297-1.0515.8423-.2692-.2126-.623-.4948-1.0514-.8423-1.0614-.8609-2.5802-2.1223-4.4038-3.7198-3.6486-3.1963-8.5105-7.7319-13.3691-13.0921-4.8614-5.3633-9.7004-11.5312-13.3196-17.9909C14.363 54.619 12 47.9259 12 41.4937 12 20.2255 29.0803 3 50.1304 3c21.0502 0 38.1305 17.2255 38.1305 38.4937z" stroke="#CDD8FF" stroke-width="2"/><circle opacity=".5" cx="50" cy="42" r="18" stroke="#CDD8FF" stroke-width="2"/><path d="M22.5 69.5L78 14" stroke="#fff" stroke-width="2"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/icons/time-consuming.svg b/packages/dev-tools-pages/ts/icons/time-consuming.svg
deleted file mode 100644
index 330723394..000000000
--- a/packages/dev-tools-pages/ts/icons/time-consuming.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><circle opacity=".5" cx="50" cy="50" r="42" stroke="#CDD8FF" stroke-width="2"/><path opacity=".5" d="M34.6621 79.4343c6.9918 3.5363 15.2613 4.61 23.4252 2.4225 8.1639-2.1875 14.7886-7.2521 19.0755-13.8105M33.8711 58c2.9454 5.9269 9.0615 10 16.129 10 1.5538 0 3.0617-.1969 4.5-.5671M30 25.0185C35.4784 20.6269 42.4324 18 50 18c13.4295 0 24.9268 8.2727 29.6739 20" stroke="#CDD8FF" stroke-width="2"/><path d="M35 64l17.5-12.5L37.5 9" stroke="#fff" stroke-width="2"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/icons/time-saving.svg b/packages/dev-tools-pages/ts/icons/time-saving.svg
deleted file mode 100644
index 935b1204e..000000000
--- a/packages/dev-tools-pages/ts/icons/time-saving.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="100" height="100" viewBox="0 0 100 100" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="49.9092" cy="49.7499" r="40.4824" transform="rotate(45 49.9092 49.7499)" stroke="#fff" stroke-width="2"/><path d="M21.5991 79.4236l8.5269-8.5269M71.3965 29.6267l8.5268-8.5268M69.6914 70.8967l8.5269 8.5269M20.5761 21.7819l9.2091 9.2091M9.01002 50.4736H21.0688M79.4334 50.4736h12.0588M49.0449 78.45v12.0588M49.0449 8.99112V22.0146" stroke="#fff" stroke-width="2"/><path d="M35.584 36.789l14.3252 14.3252 30.0146-30.0146" stroke="#000" stroke-width="2"/></svg> \ No newline at end of file
diff --git a/packages/dev-tools-pages/ts/pages/compiler.tsx b/packages/dev-tools-pages/ts/pages/compiler.tsx
deleted file mode 100644
index 407646add..000000000
--- a/packages/dev-tools-pages/ts/pages/compiler.tsx
+++ /dev/null
@@ -1,182 +0,0 @@
-import * as React from 'react';
-import { hydrate, render } from 'react-dom';
-import * as Loadable from 'react-loadable';
-
-import { context } from 'ts/context/compiler';
-
-import { Base } from 'ts/components/base';
-import { Breakout } from 'ts/components/breakout';
-import { CallToAction } from 'ts/components/call_to_action';
-import { Code } from 'ts/components/code';
-import { Compiler as CompilerComponent } from 'ts/components/compiler';
-import { Content } from 'ts/components/content';
-import { ContentBlock } from 'ts/components/content-block';
-import { Hero } from 'ts/components/hero';
-import { InlineCode } from 'ts/components/inline-code';
-import { Lead } from 'ts/components/typography';
-
-const Animation = Loadable({
- loader: () => System.import(/* webpackChunkName: 'compiler-animation' */ 'ts/components/animations/compiler'),
- loading: () => <div />,
- delay: 1000,
- render(loadable: { CompilerAnimation: any }): React.ReactNode {
- const Component = loadable.CompilerAnimation;
- return <Component />;
- },
-});
-
-const SOLIDITY_INPUT_FORMAT_DOCS =
- 'https://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description';
-
-const Compiler: React.StatelessComponent<{}> = () => (
- <Base context={context}>
- <Hero>
- <Animation />
- </Hero>
- <CompilerComponent />
- <Content>
- <ContentBlock main={true} title="Get started" />
- <ContentBlock title="Install">
- <Breakout>
- <Code canCopy={true}>npm install @0x/sol-compiler --g</Code>
- </Breakout>
- </ContentBlock>
-
- <ContentBlock title="Run">
- <Breakout>
- <Code canCopy={true}>cd /your_project_dir && sol-compiler</Code>
- </Breakout>
- </ContentBlock>
-
- <ContentBlock title="Configure">
- <p>
- Configure via a <InlineCode>compiler.json</InlineCode> file.
- </p>
- <Breakout>
- <Code canCopy={true}>mkdir compiler.json</Code>
- </Breakout>
- <p>Example of settings:</p>
- <Breakout>
- <Code language="json" canCopy={true}>
- {`{
- "contractsDir": "contracts",
- "artifactsDir": "artifacts",
- "contracts": "*",
- "compilerSettings": {
- "optimizer": { "enabled": false },
- "outputSelection": {
- "*": {
- "*": ["abi", "evm.bytecode.object"]
- }
- }
- }
-}`}
- </Code>
- </Breakout>
- </ContentBlock>
- </Content>
- <Content dark={true}>
- <ContentBlock main={true} title="Artifacts">
- <Lead>
- Sol compiler uses{' '}
- <a href={SOLIDITY_INPUT_FORMAT_DOCS} target="_blank">
- Solidity standard JSON input format
- </a>{' '}
- to specify what to include in the generated artifacts. This way, you have complete flexibility on
- what is included.
- </Lead>
- </ContentBlock>
-
- <ContentBlock title="Production">
- <p>
- In production, you want to optimize for a small bundle size, so your compiler.json config would
- instruct sol-compiler to only output the contract ABI.
- </p>
- <Breakout>
- <Code isLight={true} language="json" isEtc={true}>
- {`{
- "compilerSettings": {
- "outputSelection": {
- "*": {
- "*": ["abi"]
- }
- }
- }
-}`}
- </Code>
- </Breakout>
- <Breakout>
- <Code isLight={true} language="json" isEtc={true}>
- {`{
- "compilerOutput": {
- "abi": [...],
- },
-}`}
- </Code>
- </Breakout>
- </ContentBlock>
- <ContentBlock title="Development">
- <p>
- In development, you need to use profiler and other dev tools that require more information from the
- artifact. To do this, you can specify that the artifact also contain the bytecode, deployed bytecode
- and source maps.
- </p>
- <Breakout>
- <Code isLight={true} language="json" isEtc={true}>
- {`{
- "compilerSettings": {
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- }
-}`}
- </Code>
- </Breakout>
-
- <Breakout>
- <Code isLight={true} language="json" isEtc={true}>
- {`{
- "compilerOutput": {
- "abi": [...],
- "evm": {
- "bytecode": {
- "object": "0xdeadbeef",
- "sourceMap": "26:480:..."
- },
- "deployedBytecode": {
- "object": "0xdeadbeef",
- "sourceMap": "26:480:0..."
- }
- }
- }
- "sources": {
- "Migrations.sol": {
- "id": 0
- }
- },
-}`}
- </Code>
- </Breakout>
- </ContentBlock>
- </Content>
- <div style={{ paddingTop: '5rem' }}>
- <CallToAction />
- </div>
- </Base>
-);
-
-const root = document.getElementById('app');
-
-if (root.hasChildNodes()) {
- hydrate(<Compiler />, root);
-} else {
- render(<Compiler />, root);
-}
diff --git a/packages/dev-tools-pages/ts/pages/coverage.tsx b/packages/dev-tools-pages/ts/pages/coverage.tsx
deleted file mode 100644
index 575891f3b..000000000
--- a/packages/dev-tools-pages/ts/pages/coverage.tsx
+++ /dev/null
@@ -1,179 +0,0 @@
-import * as React from 'react';
-import { hydrate, render } from 'react-dom';
-import * as Loadable from 'react-loadable';
-
-import { context } from 'ts/context/coverage';
-
-import { Base } from 'ts/components/base';
-import { Breakout } from 'ts/components/breakout';
-import { CallToAction } from 'ts/components/call_to_action';
-import { Code } from 'ts/components/code';
-import { Content } from 'ts/components/content';
-import { ContentBlock } from 'ts/components/content-block';
-import { Hero } from 'ts/components/hero';
-import { InlineCode } from 'ts/components/inline-code';
-import { Intro, IntroAside, IntroLead } from 'ts/components/intro';
-import { List, ListItem } from 'ts/components/list';
-import { TabBlock, Tabs } from 'ts/components/tabs';
-
-const Animation = Loadable({
- loader: () => System.import(/* webpackChunkName: 'cov-animation' */ 'ts/components/animations/cov'),
- loading: () => <div />,
- delay: 1000,
- render(loadable: { CovAnimation: any }): React.ReactNode {
- const Component = loadable.CovAnimation;
- return <Component />;
- },
-});
-
-const Coverage: React.StatelessComponent<{}> = () => (
- <Base context={context}>
- <Hero>
- <Animation />
- </Hero>
- <Intro>
- <IntroLead title="Measure your tests">
- <p>
- When it comes to writing secure smart contracts, testing is one of the most important steps in the
- process. In order to quantify the robustness of your Solidity testing suite, you need to measure its
- code coverage.
- </p>
- </IntroLead>
- <IntroAside>
- <Code
- language="javascript"
- isDiff={true}
- gutterLength={2}
- gutter={[4, undefined, 4, 4, 4, undefined, 4, 2, 2, 2]}
- >
- {`+function executeTransaction(uint transactionId)
- public
-+ notExecuted(transactionId)
-+ fullyConfirmed(transactionId)
-+ pastTimeLock(transactionId)
-{
-+ Transaction storage tx = transactions[transactionId]
-+ tx.executed = true
-+ if (tx.destination.call.value(tx.value)(tx.data))
-+ Execution(transactionId)
- else {
-- ExecutionFailure(transactionId)
-- tx.executed = false
- }
-}`}
- </Code>
- </IntroAside>
- </Intro>
-
- <Content>
- <ContentBlock main={true} title="Get started" />
- <ContentBlock title="Prerequisites">
- <List>
- <ListItem>
- Use{' '}
- <a href="https://github.com/ethereum/go-ethereum" target="_blank">
- Geth
- </a>{' '}
- as a backing node. We recommend using our{' '}
- <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
- Devnet Docker container
- </a>{' '}
- which sets up a Geth node for testing purposes.{' '}
- <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
- Ganache support is a work in progress.
- </a>
- </ListItem>
- <ListItem>
- Understand and use{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- web3-provider-engine
- </a>
- .
- </ListItem>
- </List>
- </ContentBlock>
- <ContentBlock title="Installation">
- <Breakout>
- <Code canCopy={true}>npm install @0x/sol-coverage --save</Code>
- </Breakout>
-
- <p>
- Sol-coverage is a subprovider that needs to be prepended to your{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- provider engine
- </a>
- . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-coverage
- ships with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
- <a href="https://sol-compiler.com" target="_blank">
- Sol-compiler
- </a>{' '}
- and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="https://truffleframework.com/truffle" target="_blank">
- Truffle framework
- </a>{' '}
- (Also see our{' '}
- <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
- Truffle example project
- </a>{' '}
- for a complete walk-through). You can also write your own and support any artifact format.
- </p>
-
- <Tabs>
- <TabBlock title="Sol-compiler">
- <Code language="javascript" canCopy={true}>
- {`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
-
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`}
- </Code>
- </TabBlock>
- <TabBlock title="Truffle">
- <Code language="javascript" canCopy={true}>
- {`import { TruffleArtifactAdapter } from '@0x/sol-trace';
-
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
- </Code>
- </TabBlock>
- <TabBlock title="Custom">
- <Code language="javascript" canCopy={true}>
- {`import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
- </Code>
- </TabBlock>
- </Tabs>
- <p>
- Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>CoverageSubprovider</InlineCode> and append it to our provider engine.
- </p>
-
- <Breakout>
- <Code language="javascript" canCopy={true}>
- {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { CoverageSubprovider } from '@0x/sol-coverage';
-
-const defaultFromAddress = "..."; // Some ethereum address with test funds
-const coverageSubprovider = new CoverageSubprovider(artifactAdapter, defaultFromAddress);
-
-const providerEngine = new ProviderEngine();
-providerEngine.addProvider(coverageSubprovider);
-providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'}));
-providerEngine.start();`}
- </Code>
- </Breakout>
- </ContentBlock>
- </Content>
- <CallToAction />
- </Base>
-);
-
-const root = document.getElementById('app');
-
-if (root.hasChildNodes()) {
- hydrate(<Coverage />, root);
-} else {
- render(<Coverage />, root);
-}
diff --git a/packages/dev-tools-pages/ts/pages/profiler.tsx b/packages/dev-tools-pages/ts/pages/profiler.tsx
deleted file mode 100644
index 0bc4efa45..000000000
--- a/packages/dev-tools-pages/ts/pages/profiler.tsx
+++ /dev/null
@@ -1,176 +0,0 @@
-import * as React from 'react';
-import { hydrate, render } from 'react-dom';
-import * as Loadable from 'react-loadable';
-
-import { context } from 'ts/context/profiler';
-
-import { Base } from 'ts/components/base';
-import { Breakout } from 'ts/components/breakout';
-import { CallToAction } from 'ts/components/call_to_action';
-import { Code } from 'ts/components/code';
-import { Content } from 'ts/components/content';
-import { ContentBlock } from 'ts/components/content-block';
-import { Hero } from 'ts/components/hero';
-import { InlineCode } from 'ts/components/inline-code';
-import { Intro, IntroAside, IntroLead } from 'ts/components/intro';
-import { List, ListItem } from 'ts/components/list';
-import { TabBlock, Tabs } from 'ts/components/tabs';
-
-const Animation = Loadable({
- loader: () => System.import(/* webpackChunkName: 'profiler-animation' */ 'ts/components/animations/profiler'),
- loading: () => <div />,
- delay: 1000,
- render(loadable: { ProfilerAnimation: any }): React.ReactNode {
- const Component = loadable.ProfilerAnimation;
- return <Component />;
- },
-});
-
-const Profiler: React.StatelessComponent<{}> = () => (
- <Base context={context}>
- <Hero>
- <Animation />
- </Hero>
- <Intro>
- <IntroLead title="Outline gas usage">
- <p>
- Sol-profiler gathers line-by-line gas usage for any transaction submitted through your provider.
- This will help you find unexpected inefficiencies in parts of your smart contract, and take a
- data-driven approach to optimizing it.
- </p>
- </IntroLead>
- <IntroAside>
- <Code
- language="javascript"
- isDiff={true}
- gutterLength={6}
- gutter={[15, 15, undefined, 21747, 20303, 1435]}
- >
- {`+function() public payable {
-+ deposit();
-}
-+function deposit() public payabble {
-+ balanceOf[msg.sender] += msg.value;
-+ Deposit(msg.sender, msg.value);
-}
--function withdraw(uint wad) public {
-- require(balanceOf[msg.sender] >= wad);
-- balanceOf[msg.sender] -= wad;
-- msg.sender.transfer(wad);
-- Withdrawal(msg.sender, wad);
-}`}
- </Code>
- </IntroAside>
- </Intro>
- <Content>
- <ContentBlock main={true} title="Get started" />
- <ContentBlock title="Prerequisites">
- <List>
- <ListItem>
- Use{' '}
- <a href="https://github.com/ethereum/go-ethereum" target="_blank">
- Geth
- </a>{' '}
- as a backing node. We recommend using our{' '}
- <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
- Devnet Docker container
- </a>{' '}
- which sets up a Geth node for testing purposes.{' '}
- <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
- Ganache support is a work in progress.
- </a>
- </ListItem>
- <ListItem>
- Understand and use{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- web3-provider-engine
- </a>
- .
- </ListItem>
- </List>
- </ContentBlock>
- <ContentBlock title="Installation">
- <Breakout>
- <Code canCopy={true}>npm install @0x/sol-trace --save</Code>
- </Breakout>
-
- <p>
- Sol-trace is a subprovider that needs to be prepended to your{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- provider engine
- </a>
- . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
- with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
- <a href="https://sol-compiler.com" target="_blank">
- Sol-compiler
- </a>{' '}
- and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="https://truffleframework.com/truffle" target="_blank">
- Truffle framework
- </a>{' '}
- (Also see our{' '}
- <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
- Truffle example project
- </a>{' '}
- for a complete walk-through). You can also write your own and support any artifact format.
- </p>
-
- <Tabs>
- <TabBlock title="Sol-compiler">
- <Code language="javascript" canCopy={true}>
- {`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
-
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`}
- </Code>
- </TabBlock>
- <TabBlock title="Truffle">
- <Code language="javascript" canCopy={true}>
- {`import { TruffleArtifactAdapter } from '@0x/sol-trace';
-
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
- </Code>
- </TabBlock>
- <TabBlock title="Custom">
- <Code language="javascript" canCopy={true}>
- {`import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
- </Code>
- </TabBlock>
- </Tabs>
- <p>
- Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>ProfilerSubprovider</InlineCode> and append it to our provider engine.
- </p>
-
- <Breakout>
- <Code language="javascript" canCopy={true}>
- {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { ProfilerSubprovider } from '@0x/sol-profiler';
-
-const defaultFromAddress = "..."; // Some ethereum address with test funds
-const profilerSubprovider = new ProfilerSubprovider(artifactAdapter, defaultFromAddress);
-
-const providerEngine = new ProviderEngine();
-providerEngine.addProvider(profilerSubprovider);
-providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'}));
-providerEngine.start();`}
- </Code>
- </Breakout>
- </ContentBlock>
- </Content>
- <CallToAction />
- </Base>
-);
-
-const root = document.getElementById('app');
-
-if (root.hasChildNodes()) {
- hydrate(<Profiler />, root);
-} else {
- render(<Profiler />, root);
-}
diff --git a/packages/dev-tools-pages/ts/pages/trace.tsx b/packages/dev-tools-pages/ts/pages/trace.tsx
deleted file mode 100644
index cd6180fb9..000000000
--- a/packages/dev-tools-pages/ts/pages/trace.tsx
+++ /dev/null
@@ -1,147 +0,0 @@
-import * as React from 'react';
-import { hydrate, render } from 'react-dom';
-import * as Loadable from 'react-loadable';
-
-import { context } from 'ts/context/trace';
-
-import { Base } from 'ts/components/base';
-import { Breakout } from 'ts/components/breakout';
-import { CallToAction } from 'ts/components/call_to_action';
-import { Code } from 'ts/components/code';
-import { Content } from 'ts/components/content';
-import { ContentBlock } from 'ts/components/content-block';
-import { Hero } from 'ts/components/hero';
-import { InlineCode } from 'ts/components/inline-code';
-import { List, ListItem } from 'ts/components/list';
-import { TabBlock, Tabs } from 'ts/components/tabs';
-import { Trace as TraceComponent } from 'ts/components/trace';
-
-const Animation = Loadable({
- loader: () => System.import(/* webpackChunkName: 'trace-animation' */ 'ts/components/animations/trace'),
- loading: () => <div />,
- delay: 1000,
- render(loadable: { TraceAnimation: any }): React.ReactNode {
- const Component = loadable.TraceAnimation;
- return <Component />;
- },
-});
-
-const Trace: React.StatelessComponent<{}> = () => (
- <Base context={context}>
- <Hero>
- <Animation />
- </Hero>
- <TraceComponent />
- <Content>
- <ContentBlock main={true} title="Get started" />
- <ContentBlock title="Prerequisites">
- <List>
- <ListItem>
- Use{' '}
- <a href="https://github.com/ethereum/go-ethereum" target="_blank">
- Geth
- </a>{' '}
- as a backing node. We recommend using our{' '}
- <a href="https://hub.docker.com/r/0xorg/devnet" target="_blank">
- Devnet Docker container
- </a>{' '}
- which sets up a Geth node for testing purposes.{' '}
- <a href="https://github.com/0xProject/0x-monorepo/issues/1520" target="_blank">
- Ganache support is a work in progress.
- </a>
- </ListItem>
- <ListItem>
- Understand and use{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- web3-provider-engine
- </a>
- .
- </ListItem>
- </List>
- </ContentBlock>
- <ContentBlock title="Installation">
- <Breakout>
- <Code canCopy={true}>npm install @0x/sol-trace --save</Code>
- </Breakout>
-
- <p>
- Sol-trace is a subprovider that needs to be prepended to your{' '}
- <a href="https://github.com/MetaMask/provider-engine" target="_blank">
- provider engine
- </a>
- . Depending on your project setup, you will need to use a specific ArtifactAdapter. Sol-trace ships
- with the <InlineCode>SolCompilerArtifactAdapter</InlineCode> for use with{' '}
- <a href="https://sol-compiler.com" target="_blank">
- Sol-compiler
- </a>{' '}
- and <InlineCode>TruffleArtifactAdapter</InlineCode> for use with the{' '}
- <a href="https://truffleframework.com/truffle" target="_blank">
- Truffle framework
- </a>{' '}
- (Also see our{' '}
- <a href="https://github.com/0xProject/dev-tools-truffle-example" target="_blank">
- Truffle example project
- </a>{' '}
- for a complete walk-through). You can also write your own and support any artifact format.
- </p>
-
- <Tabs>
- <TabBlock title="Sol-compiler">
- <Code language="javascript" canCopy={true}>
- {`import { SolCompilerArtifactAdapter } from '@0x/sol-trace';
-
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);`}
- </Code>
- </TabBlock>
- <TabBlock title="Truffle">
- <Code language="javascript" canCopy={true}>
- {`import { TruffleArtifactAdapter } from '@0x/sol-trace';
-
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);`}
- </Code>
- </TabBlock>
- <TabBlock title="Custom">
- <Code language="javascript" canCopy={true}>
- {`import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);`}
- </Code>
- </TabBlock>
- </Tabs>
- <p>
- Now that we have an <InlineCode>artifactAdapter</InlineCode>, we can create a{' '}
- <InlineCode>revertTraceSubprovider</InlineCode> and append it to our provider engine.
- </p>
-
- <Breakout>
- <Code language="javascript" canCopy={true}>
- {`import { ProviderEngine, RpcSubprovider } from 'web3-provider-engine';
-import { RevertTraceSubprovider } from '@0x/sol-trace';
-
-const defaultFromAddress = "..."; // Some ethereum address with test funds
-const revertTraceSubprovider = new RevertTraceSubprovider(artifactAdapter, defaultFromAddress);
-
-const providerEngine = new ProviderEngine();
-providerEngine.addProvider(revertTraceSubprovider);
-providerEngine.addProvider(new RpcSubprovider({rpcUrl: 'http://localhost:8545'}));
-providerEngine.start();`}
- </Code>
- </Breakout>
- <p>Stack traces will now be printed whenever your contracts revert!</p>
- </ContentBlock>
- </Content>
- <CallToAction />
- </Base>
-);
-
-const root = document.getElementById('app');
-
-if (root.hasChildNodes()) {
- hydrate(<Trace />, root);
-} else {
- render(<Trace />, root);
-}
diff --git a/packages/dev-tools-pages/ts/variables.tsx b/packages/dev-tools-pages/ts/variables.tsx
deleted file mode 100644
index 5ea495036..000000000
--- a/packages/dev-tools-pages/ts/variables.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { css } from 'styled-components';
-
-const colors = {
- black: '#000000',
- white: '#FFFFFF',
- lightGray: '#F1F4F5',
- gray: '#F1F2F7',
- darkGray: '#E9ECED',
- darkestGray: '#E2E5E6',
- blueGray: '#ECEFF9',
-};
-
-interface SizesInterface {
- [key: string]: number;
-}
-
-const sizes: SizesInterface = {
- xlarge: 1420,
- large: 1000,
- medium: 900,
- small: 650,
-};
-
-const media = Object.keys(sizes).reduce((acc: any, label: string) => {
- acc[label] = (args: any) => css`
- @media (max-width: ${sizes[label] / 16}em) {
- ${css(args)};
- }
- `;
-
- return acc;
-}, {});
-
-export { colors, media };
diff --git a/packages/dev-tools-pages/tsconfig.json b/packages/dev-tools-pages/tsconfig.json
deleted file mode 100644
index 6421cd459..000000000
--- a/packages/dev-tools-pages/tsconfig.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "allowSyntheticDefaultImports": true,
- "outDir": "./transpiled/",
- "jsx": "react",
- "baseUrl": "./",
- "allowJs": true,
- "strictNullChecks": false,
- "noImplicitThis": false,
- // tsconfig.json at the monorepo root contains some options required for
- // project references which do not work for website. We override those
- // options here.
- "declaration": false,
- "declarationMap": false,
- "composite": false,
- "paths": {
- "*": ["node_modules/@types/*", "*"]
- }
- },
- "include": ["./ts/**/*"]
-}
diff --git a/packages/dev-tools-pages/tslint.json b/packages/dev-tools-pages/tslint.json
deleted file mode 100644
index 50f5be4f6..000000000
--- a/packages/dev-tools-pages/tslint.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "no-implicit-dependencies": false,
- "no-object-literal-type-assertion": false,
- "completed-docs": false,
- "prefer-function-over-method": false,
- "custom-no-magic-numbers": false
- }
-}
diff --git a/packages/dev-tools-pages/webpack.config.js b/packages/dev-tools-pages/webpack.config.js
deleted file mode 100644
index ef2f98cf2..000000000
--- a/packages/dev-tools-pages/webpack.config.js
+++ /dev/null
@@ -1,115 +0,0 @@
-const path = require('path');
-const webpack = require('webpack');
-const TerserPlugin = require('terser-webpack-plugin');
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
-const HtmlWebpackPlugin = require('html-webpack-plugin');
-const CopyWebpackPlugin = require('copy-webpack-plugin');
-const CleanWebpackPlugin = require('clean-webpack-plugin');
-
-const pages = require('./pages');
-
-const config = {
- entry: {
- compiler: './ts/pages/compiler.tsx',
- coverage: './ts/pages/coverage.tsx',
- profiler: './ts/pages/profiler.tsx',
- trace: './ts/pages/trace.tsx',
- },
- output: {
- path: path.join(__dirname, '/public'),
- filename: 'bundle-[name].js',
- chunkFilename: 'bundle-[name].js',
- publicPath: '/',
- },
- devtool: 'source-map',
- resolve: {
- modules: [path.join(__dirname, '/ts'), 'node_modules'],
- extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
- alias: {
- ts: path.join(__dirname, '/ts'),
- less: path.join(__dirname, '/less'),
- },
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- loader: 'source-map-loader',
- exclude: [
- // instead of /\/node_modules\//
- path.join(process.cwd(), 'node_modules'),
- path.join(process.cwd(), '../..', 'node_modules'),
- ],
- },
- {
- test: /\.tsx?$/,
- loader: 'awesome-typescript-loader',
- },
- {
- test: /\.md$/,
- use: 'raw-loader',
- },
- {
- test: /\.less$/,
- loader: 'style-loader!css-loader!less-loader',
- exclude: /node_modules/,
- },
- {
- test: /\.css$/,
- loaders: ['style-loader', 'css-loader'],
- },
- {
- test: /\.svg$/,
- loaders: ['react-svg-loader'],
- },
- ],
- },
- optimization: {
- minimizer: [
- new TerserPlugin({
- sourceMap: true,
- }),
- ],
- },
- devServer: {
- port: 3572,
- disableHostCheck: true,
- overlay: true,
- historyApiFallback: true,
- },
-};
-
-module.exports = (_env, argv) => {
- let plugins = [
- new CleanWebpackPlugin('public'),
- ...pages.map(p => new HtmlWebpackPlugin(p)),
- new CopyWebpackPlugin([
- { from: 'assets/crawl.html', to: 'index.html' },
- { from: 'assets/fonts', to: 'fonts' },
- { from: 'assets/images', to: 'images' },
- ]),
- ];
- if (argv.mode === 'development') {
- config.mode = 'development';
- } else {
- config.mode = 'production';
- config.output.filename = 'bundle-[name].[chunkhash].js';
- config.output.chunkFilename = 'bundle-[name].[chunkhash].js';
-
- plugins = plugins.concat([
- new webpack.DefinePlugin({
- 'process.env': {
- NODE_ENV: JSON.stringify(process.env.NODE_ENV || config.mode),
- },
- }),
- // commented out to check the bundle when needed
- //new BundleAnalyzerPlugin(),
- ]);
- }
- console.log('i 「atl」: Mode: ', config.mode);
-
- config.plugins = plugins;
- console.log('i 「atl」: Plugin Count: ', config.plugins.length);
-
- return config;
-};
diff --git a/packages/dev-utils/.npmignore b/packages/dev-utils/.npmignore
deleted file mode 100644
index 44df80fad..000000000
--- a/packages/dev-utils/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.*
-yarn-error.log
-/src/
-/scripts/
-test/
-tsconfig.json
-/lib/src/monorepo_scripts/
diff --git a/packages/dev-utils/CHANGELOG.json b/packages/dev-utils/CHANGELOG.json
deleted file mode 100644
index d05e41d2d..000000000
--- a/packages/dev-utils/CHANGELOG.json
+++ /dev/null
@@ -1,408 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.24",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.23",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.22",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.21",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.20",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1543401373,
- "version": "1.0.19",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.18",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "1.0.17",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "version": "1.0.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542028948,
- "version": "1.0.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.0.13",
- "changes": [
- {
- "note": "Make web3-provider-engine types a 'dependency' so it's available to users of the library",
- "pr": 1105
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537875740,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535377027,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535133899,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1534210131,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532619515
- },
- {
- "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.4.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.4.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.4.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.3",
- "changes": [
- {
- "note": "Add optional parameter shouldUseFakeGasEstimate to Web3Config",
- "pr": 622
- },
- {
- "note": "Add SolidityProfiler to EnvVars",
- "pr": 675
- }
- ],
- "timestamp": 1527008544
- },
- {
- "version": "0.4.2",
- "changes": [
- {
- "note": "Pass SolCompilerArtifactAdapter to CoverageSubprovider",
- "pr": 589
- },
- {
- "note": "Move callbackErrorReporter over from 0x.js",
- "pr": 579
- }
- ],
- "timestamp": 1527008544
- },
- {
- "timestamp": 1525477860,
- "version": "0.4.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.0",
- "changes": [
- {
- "note": "Update web3 provider engine to 14.0.4",
- "pr": 555
- }
- ],
- "timestamp": 1525428773
- },
- {
- "version": "0.3.6",
- "changes": [
- {
- "note": "Allow an rpcURL to be set in Web3Config (for testnet RPC endpoints)",
- "pr": 524
- }
- ],
- "timestamp": 1524044013
- },
- {
- "timestamp": 1523462196,
- "version": "0.3.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522673609,
- "version": "0.3.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522658513,
- "version": "0.3.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.3.1",
- "changes": [
- {
- "note": "Reduce npm package size by adding an `.npmignore` file."
- },
- {
- "note": "Move `@0xproject/web3-wrapper` to dependencies from devDependencies."
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.3.0",
- "changes": [
- {
- "note": "Add coverage subprovider if SOLIDITY_COVERAGE env variable is true",
- "pr": 426
- },
- {
- "note": "Refactor `BlockchainLifecycle` to work with in-process ganache",
- "pr": 426
- },
- {
- "note": "Remove `RPC` class and move it's logic to `Web3Wrapper`",
- "pr": 426
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.2.0",
- "changes": [
- {
- "note": "Remove subproviders",
- "pr": 392
- }
- ],
- "timestamp": 1518706800
- },
- {
- "version": "0.0.12",
- "changes": [
- {
- "note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
- "pr": 389
- }
- ],
- "timestamp": 1518102000
- },
- {
- "version": "0.0.11",
- "changes": [
- {
- "note": "Updated `types-ethereumjs-util` dev dependency",
- "pr": 352
- }
- ],
- "timestamp": 1517929200
- }
-]
diff --git a/packages/dev-utils/CHANGELOG.md b/packages/dev-utils/CHANGELOG.md
deleted file mode 100644
index 958fded86..000000000
--- a/packages/dev-utils/CHANGELOG.md
+++ /dev/null
@@ -1,175 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.24 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.23 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.22 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.21 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.0.20 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.0.19 - _November 28, 2018_
-
- * Dependencies updated
-
-## v1.0.18 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.17 - _November 14, 2018_
-
- * Dependencies updated
-
-## v1.0.16 - _November 13, 2018_
-
- * Dependencies updated
-
-## v1.0.15 - _November 12, 2018_
-
- * Dependencies updated
-
-## v1.0.14 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.13 - _October 18, 2018_
-
- * Make web3-provider-engine types a 'dependency' so it's available to users of the library (#1105)
-
-## v1.0.12 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.11 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _August 27, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _August 24, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _August 14, 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.4.6 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.4.5 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.4.4 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.4.3 - _May 22, 2018_
-
- * Add optional parameter shouldUseFakeGasEstimate to Web3Config (#622)
- * Add SolidityProfiler to EnvVars (#675)
-
-## v0.4.2 - _May 22, 2018_
-
- * Pass SolCompilerArtifactAdapter to CoverageSubprovider (#589)
- * Move callbackErrorReporter over from 0x.js (#579)
-
-## v0.4.1 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.4.0 - _May 4, 2018_
-
- * Update web3 provider engine to 14.0.4 (#555)
-
-## v0.3.6 - _April 18, 2018_
-
- * Allow an rpcURL to be set in Web3Config (for testnet RPC endpoints) (#524)
-
-## v0.3.5 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.3.4 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.3.3 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.3.1 - _March 17, 2018_
-
- * Reduce npm package size by adding an `.npmignore` file.
- * Move `@0xproject/web3-wrapper` to dependencies from devDependencies.
-
-## v0.3.0 - _March 17, 2018_
-
- * Add coverage subprovider if SOLIDITY_COVERAGE env variable is true (#426)
- * Refactor `BlockchainLifecycle` to work with in-process ganache (#426)
- * Remove `RPC` class and move it's logic to `Web3Wrapper` (#426)
-
-## v0.2.0 - _February 15, 2018_
-
- * Remove subproviders (#392)
-
-## v0.0.12 - _February 8, 2018_
-
- * Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
-
-## v0.0.11 - _February 6, 2018_
-
- * Updated `types-ethereumjs-util` dev dependency (#352)
diff --git a/packages/dev-utils/README.md b/packages/dev-utils/README.md
deleted file mode 100644
index b85159dd8..000000000
--- a/packages/dev-utils/README.md
+++ /dev/null
@@ -1,95 +0,0 @@
-## Dev utils
-
-Dev utils to be shared across 0x projects and packages
-
-## Configuration
-
-Some env variables might be set to change the behaviour of created web3 providers/instances.
-
-```
-VERBOSE_GANACHE: boolean. Enables verbose Ganache logging. Every request/response payload. Slightly slower, but useful for testing.
-SOLIDITY_COVERAGE: boolean. If set - adds coverage subprovider which intercepts all calls/transactions and can be later used to compute code coverage.
-```
-
-Boolean env variables should be either `true` or `false`. Defaults to `false` if not set.
-
-## Install
-
-```bash
-yarn add @0x/dev-utils
-```
-
-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"],
-}
-```
-
-## Troubleshooting
-
-If you are still seeing TS type errors complaining about missing DOM types such as `Response`:
-
-```
-error TS2304: Cannot find name 'Response'.
-```
-
-Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.
-
-```
-"compilerOptions": {
- "lib": [..., "dom"],
-```
-
-## 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/dev-utils yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/dev-utils yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/dev-utils/coverage/.gitkeep b/packages/dev-utils/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/dev-utils/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
deleted file mode 100644
index 4ab1d6439..000000000
--- a/packages/dev-utils/package.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "name": "@0x/dev-utils",
- "version": "1.0.24",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x dev TS utils",
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "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",
- "clean": "shx rm -rf lib",
- "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/dev-utils/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/lodash": "4.14.104",
- "@types/mocha": "^2.2.42",
- "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/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",
- "chai": "^4.0.1",
- "ethereum-types": "^1.1.6",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/dev-utils/src/blockchain_lifecycle.ts b/packages/dev-utils/src/blockchain_lifecycle.ts
deleted file mode 100644
index e9687787f..000000000
--- a/packages/dev-utils/src/blockchain_lifecycle.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-import { logUtils } from '@0x/utils';
-import { NodeType, Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-// HACK(albrow): 🐉 We have to do this so that debug.setHead works correctly.
-// (Geth does not seem to like debug.setHead(0), so by sending some transactions
-// we increase the current block number beyond 0). Additionally, some tests seem
-// to break when there are fewer than 3 blocks in the chain. (We have no idea
-// why, but it was consistently reproducible).
-const MINIMUM_BLOCKS = 3;
-
-export class BlockchainLifecycle {
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _snapshotIdsStack: number[];
- private _addresses: string[] = [];
- private _nodeType: NodeType | undefined;
- constructor(web3Wrapper: Web3Wrapper) {
- this._web3Wrapper = web3Wrapper;
- this._snapshotIdsStack = [];
- }
- public async startAsync(): Promise<void> {
- const nodeType = await this._getNodeTypeAsync();
- switch (nodeType) {
- case NodeType.Ganache:
- const snapshotId = await this._web3Wrapper.takeSnapshotAsync();
- this._snapshotIdsStack.push(snapshotId);
- break;
- case NodeType.Geth:
- let blockNumber = await this._web3Wrapper.getBlockNumberAsync();
- if (blockNumber < MINIMUM_BLOCKS) {
- // If the minimum block number is not met, force Geth to
- // mine some blocks by sending some dummy transactions.
- await this._mineMinimumBlocksAsync();
- blockNumber = await this._web3Wrapper.getBlockNumberAsync();
- }
- this._snapshotIdsStack.push(blockNumber);
- // HACK(albrow) It's possible that we applied a time offset but
- // the transaction we mined to put that time offset into the
- // blockchain was reverted. As a workaround, we mine a new dummy
- // block so that the latest block timestamp accounts for any
- // possible time offsets.
- await this._mineDummyBlockAsync();
- break;
- default:
- throw new Error(`Unknown node type: ${nodeType}`);
- }
- }
- public async revertAsync(): Promise<void> {
- const nodeType = await this._getNodeTypeAsync();
- switch (nodeType) {
- case NodeType.Ganache:
- const snapshotId = this._snapshotIdsStack.pop() as number;
- const didRevert = await this._web3Wrapper.revertSnapshotAsync(snapshotId);
- if (!didRevert) {
- throw new Error(`Snapshot with id #${snapshotId} failed to revert`);
- }
- break;
- case NodeType.Geth:
- const blockNumber = this._snapshotIdsStack.pop() as number;
- await this._web3Wrapper.setHeadAsync(blockNumber);
- break;
- default:
- throw new Error(`Unknown node type: ${nodeType}`);
- }
- }
- private async _mineMinimumBlocksAsync(): Promise<void> {
- logUtils.warn('WARNING: minimum block number for tests not met. Mining additional blocks...');
- while ((await this._web3Wrapper.getBlockNumberAsync()) < MINIMUM_BLOCKS) {
- logUtils.warn('Mining block...');
- await this._mineDummyBlockAsync();
- }
- logUtils.warn('Done mining the minimum number of blocks.');
- }
- private async _getNodeTypeAsync(): Promise<NodeType> {
- if (_.isUndefined(this._nodeType)) {
- this._nodeType = await this._web3Wrapper.getNodeTypeAsync();
- }
- return this._nodeType;
- }
- // Sends a transaction that has no real effect on the state and waits for it
- // to be mined.
- private async _mineDummyBlockAsync(): Promise<void> {
- if (this._addresses.length === 0) {
- this._addresses = await this._web3Wrapper.getAvailableAddressesAsync();
- if (this._addresses.length === 0) {
- throw new Error('No accounts found');
- }
- }
- await this._web3Wrapper.awaitTransactionMinedAsync(
- await this._web3Wrapper.sendTransactionAsync({
- from: this._addresses[0],
- to: this._addresses[0],
- value: '0',
- }),
- 0,
- );
- }
-}
diff --git a/packages/dev-utils/src/callback_error_reporter.ts b/packages/dev-utils/src/callback_error_reporter.ts
deleted file mode 100644
index b993bf22a..000000000
--- a/packages/dev-utils/src/callback_error_reporter.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as chai from 'chai';
-import * as _ from 'lodash';
-
-import { DoneCallback } from '@0x/types';
-
-const expect = chai.expect;
-
-export const callbackErrorReporter = {
- reportNoErrorCallbackErrors(
- done: DoneCallback,
- expectToBeCalledOnce: boolean = true,
- ): <T>(f?: ((value: T) => void) | undefined) => (value: T) => void {
- const callback = <T>(f?: (value: T) => void) => {
- const wrapped = (value: T) => {
- if (_.isUndefined(f)) {
- done();
- return;
- }
- try {
- f(value);
- if (expectToBeCalledOnce) {
- done();
- }
- } catch (err) {
- done(err);
- }
- };
- return wrapped;
- };
- return callback;
- },
- reportNodeCallbackErrors(
- done: DoneCallback,
- expectToBeCalledOnce: boolean = true,
- ): <T>(f?: ((value: T) => void) | undefined) => (error: Error | null, value: T | undefined) => void {
- const callback = <T>(f?: (value: T) => void) => {
- const wrapped = (error: Error | null, value: T | undefined) => {
- if (!_.isNull(error)) {
- done(error);
- } else {
- if (_.isUndefined(f)) {
- done();
- return;
- }
- try {
- f(value as T);
- if (expectToBeCalledOnce) {
- done();
- }
- } catch (err) {
- done(err);
- }
- }
- };
- return wrapped;
- };
- return callback;
- },
- assertNodeCallbackError(
- done: DoneCallback,
- errMsg: string,
- ): <T>(error: Error | null, value: T | undefined) => void {
- const wrapped = <T>(error: Error | null, _value: T | undefined) => {
- if (_.isNull(error)) {
- done(new Error('Expected callback to receive an error'));
- } else {
- try {
- expect(error.message).to.be.equal(errMsg);
- done();
- } catch (err) {
- done(err);
- }
- }
- };
- return wrapped;
- },
-};
diff --git a/packages/dev-utils/src/constants.ts b/packages/dev-utils/src/constants.ts
deleted file mode 100644
index 56e87d764..000000000
--- a/packages/dev-utils/src/constants.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export const constants = {
- RPC_URL: 'http://localhost:8545',
- RPC_PORT: 8545,
- GAS_LIMIT: 7000000,
- TESTRPC_FIRST_ADDRESS: '0x5409ed021d9299bf6814279a6a1411a7e866a631',
-};
diff --git a/packages/dev-utils/src/env.ts b/packages/dev-utils/src/env.ts
deleted file mode 100644
index 024162c2f..000000000
--- a/packages/dev-utils/src/env.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import * as _ from 'lodash';
-import * as process from 'process';
-
-export enum EnvVars {
- SolidityCoverage = 'SOLIDITY_COVERAGE',
- SolidityProfiler = 'SOLIDITY_PROFILER',
- SolidityRevertTrace = 'SOLIDITY_REVERT_TRACE',
- VerboseGanache = 'VERBOSE_GANACHE',
-}
-
-export const env = {
- parseBoolean(key: string): boolean {
- let isTrue: boolean;
- const envVarValue = process.env[key];
- if (envVarValue === 'true') {
- isTrue = true;
- } else if (envVarValue === 'false' || _.isUndefined(envVarValue)) {
- isTrue = false;
- } else {
- throw new Error(
- `Failed to parse ENV variable ${key} as boolean. Please make sure it's either true or false. Defaults to false`,
- );
- }
- return isTrue;
- },
-};
diff --git a/packages/dev-utils/src/globals.d.ts b/packages/dev-utils/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/dev-utils/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/dev-utils/src/index.ts b/packages/dev-utils/src/index.ts
deleted file mode 100644
index d4c19f1bf..000000000
--- a/packages/dev-utils/src/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export { BlockchainLifecycle } from './blockchain_lifecycle';
-export { web3Factory } from './web3_factory';
-export { constants as devConstants } from './constants';
-export { env, EnvVars } from './env';
-export { callbackErrorReporter } from './callback_error_reporter';
diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts
deleted file mode 100644
index 5f8981a46..000000000
--- a/packages/dev-utils/src/web3_factory.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import {
- EmptyWalletSubprovider,
- FakeGasEstimateSubprovider,
- GanacheSubprovider,
- RPCSubprovider,
- Web3ProviderEngine,
-} from '@0x/subproviders';
-import * as fs from 'fs';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-import { env, EnvVars } from './env';
-
-export interface Web3Config {
- hasAddresses?: boolean; // default: true
- shouldUseInProcessGanache?: boolean; // default: false
- shouldThrowErrorsOnGanacheRPCResponse?: boolean; // default: true
- rpcUrl?: string; // default: localhost:8545
- shouldUseFakeGasEstimate?: boolean; // default: true
- ganacheDatabasePath?: string; // default: undefined, creates a tmp dir
-}
-
-export const web3Factory = {
- getRpcProvider(config: Web3Config = {}): Web3ProviderEngine {
- const provider = new Web3ProviderEngine();
- const hasAddresses = _.isUndefined(config.hasAddresses) || config.hasAddresses;
- config.shouldUseFakeGasEstimate =
- _.isUndefined(config.shouldUseFakeGasEstimate) || config.shouldUseFakeGasEstimate;
- if (!hasAddresses) {
- provider.addProvider(new EmptyWalletSubprovider());
- }
-
- if (config.shouldUseFakeGasEstimate) {
- provider.addProvider(new FakeGasEstimateSubprovider(constants.GAS_LIMIT));
- }
- const logger = {
- log: (arg: any) => {
- fs.appendFileSync('ganache.log', `${arg}\n`);
- },
- };
- const shouldUseInProcessGanache = !!config.shouldUseInProcessGanache;
- if (shouldUseInProcessGanache) {
- if (!_.isUndefined(config.rpcUrl)) {
- throw new Error('Cannot use both GanacheSubrovider and RPCSubprovider');
- }
- const shouldThrowErrorsOnGanacheRPCResponse =
- _.isUndefined(config.shouldThrowErrorsOnGanacheRPCResponse) ||
- config.shouldThrowErrorsOnGanacheRPCResponse;
- if (!_.isUndefined(config.ganacheDatabasePath)) {
- // Saving the snapshot to a local db. Ganache requires this directory to exist
- fs.mkdirSync(config.ganacheDatabasePath);
- }
- provider.addProvider(
- new GanacheSubprovider({
- vmErrorsOnRPCResponse: shouldThrowErrorsOnGanacheRPCResponse,
- db_path: config.ganacheDatabasePath,
- gasLimit: constants.GAS_LIMIT,
- logger,
- verbose: env.parseBoolean(EnvVars.VerboseGanache),
- port: 8545,
- network_id: 50,
- mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic',
- } as any), // TODO remove any once types are merged in DefinitelyTyped
- );
- } else {
- provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL));
- }
- provider.start();
- return provider;
- },
-};
diff --git a/packages/dev-utils/test/.npmignore b/packages/dev-utils/test/.npmignore
deleted file mode 100644
index 87bc30436..000000000
--- a/packages/dev-utils/test/.npmignore
+++ /dev/null
@@ -1,5 +0,0 @@
-.*
-yarn-error.log
-/src/
-/scripts/
-tsconfig.json
diff --git a/packages/dev-utils/test/blockchain_lifecycle_test.ts b/packages/dev-utils/test/blockchain_lifecycle_test.ts
deleted file mode 100644
index d7e54f0e8..000000000
--- a/packages/dev-utils/test/blockchain_lifecycle_test.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import 'mocha';
-
-import { BlockchainLifecycle, web3Factory } from '../src';
-
-const expect = chai.expect;
-
-describe('BlockchainLifecycle tests', () => {
- const provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
- const web3Wrapper = new Web3Wrapper(provider);
- const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
- describe('#startAsync/revertAsync', () => {
- it('reverts changes in between', async () => {
- const blockNumberBefore = await web3Wrapper.getBlockNumberAsync();
- await blockchainLifecycle.startAsync();
- await web3Wrapper.mineBlockAsync();
- const blockNumberAfter = await web3Wrapper.getBlockNumberAsync();
- // tslint:disable-next-line:restrict-plus-operands
- expect(blockNumberAfter).to.be.equal(blockNumberBefore + 1);
- await blockchainLifecycle.revertAsync();
- const blockNumberAfterRevert = await web3Wrapper.getBlockNumberAsync();
- expect(blockNumberAfterRevert).to.be.equal(blockNumberBefore);
- });
- });
-});
diff --git a/packages/dev-utils/test/rpc_test.ts b/packages/dev-utils/test/rpc_test.ts
deleted file mode 100644
index f8cea4580..000000000
--- a/packages/dev-utils/test/rpc_test.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import { BlockParamLiteral } from 'ethereum-types';
-import 'mocha';
-
-import { web3Factory } from '../src';
-
-const expect = chai.expect;
-
-describe('RPC tests', () => {
- const provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
- const web3Wrapper = new Web3Wrapper(provider);
- describe('#mineBlockAsync', () => {
- it('increases block number when called', async () => {
- const blockNumberBefore = await web3Wrapper.getBlockNumberAsync();
- await web3Wrapper.mineBlockAsync();
- const blockNumberAfter = await web3Wrapper.getBlockNumberAsync();
- // tslint:disable-next-line:restrict-plus-operands
- expect(blockNumberAfter).to.be.equal(blockNumberBefore + 1);
- });
- });
- describe('#increaseTimeAsync', () => {
- it('increases time when called', async () => {
- const TIME_DELTA = 1000;
- const blockTimestampBefore = await web3Wrapper.getBlockTimestampAsync(BlockParamLiteral.Latest);
- await web3Wrapper.increaseTimeAsync(TIME_DELTA);
- await web3Wrapper.mineBlockAsync();
- const blockTimestampAfter = await web3Wrapper.getBlockTimestampAsync(BlockParamLiteral.Latest);
- // tslint:disable-next-line:restrict-plus-operands
- expect(blockTimestampAfter).to.be.at.least(blockTimestampBefore + TIME_DELTA);
- });
- });
- describe('#takeSnapshotAsync/revertSnapshotAsync', () => {
- it('reverts changes in between', async () => {
- const blockNumberBefore = await web3Wrapper.getBlockNumberAsync();
- const snapshotId = await web3Wrapper.takeSnapshotAsync();
- await web3Wrapper.mineBlockAsync();
- await web3Wrapper.revertSnapshotAsync(snapshotId);
- const blockNumberAfter = await web3Wrapper.getBlockNumberAsync();
- expect(blockNumberAfter).to.be.equal(blockNumberBefore);
- });
- });
-});
diff --git a/packages/dev-utils/tsconfig.json b/packages/dev-utils/tsconfig.json
deleted file mode 100644
index 2ee711adc..000000000
--- a/packages/dev-utils/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/dev-utils/tslint.json b/packages/dev-utils/tslint.json
deleted file mode 100644
index 631f46bca..000000000
--- a/packages/dev-utils/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "completed-docs": false
- }
-}
diff --git a/packages/devnet/Dockerfile b/packages/devnet/Dockerfile
deleted file mode 100644
index 8e276d605..000000000
--- a/packages/devnet/Dockerfile
+++ /dev/null
@@ -1,25 +0,0 @@
-FROM alpine:3.7
-
-RUN \
- apk add --update go git make gcc musl-dev linux-headers ca-certificates && \
- # TODO(albrow): Change the Git URL and branch once we have all relvant PRs
- # merged to upstream.
- git clone --depth 1 --branch '0x-testing' https://github.com/0xProject/go-ethereum && \
- (cd go-ethereum && make geth) && \
- cp go-ethereum/build/bin/geth /geth && \
- apk del go git make gcc musl-dev linux-headers && \
- rm -rf /go-ethereum && rm -rf /var/cache/apk/*
-
-RUN mkdir ~/devnet
-WORKDIR ~/devnet
-
-COPY genesis.json .
-COPY node0/ ./node0
-COPY run.sh .
-
-RUN /geth --datadir node0/ init genesis.json
-
-EXPOSE 8501
-EXPOSE 30310
-
-ENTRYPOINT ./run.sh
diff --git a/packages/devnet/README.md b/packages/devnet/README.md
deleted file mode 100644
index f0b165cbd..000000000
--- a/packages/devnet/README.md
+++ /dev/null
@@ -1,110 +0,0 @@
-## 0x Devnet
-
-A private, single-node PoA Ethereum network for testing purposes only. It uses
-Geth and the PoA implementation called "Clique".
-
-## Installation
-
-The devnet requires Docker to run (the latest version is recommended).
-
-In the package root directory, run:
-
-```
-docker build -t 0x-devnet .
-```
-
-## Usage
-
-To start the network, run:
-
-```
-docker run -it --rm -p 8501:8501 0x-devnet
-```
-
-Depending on your OS and how you installed docker, you may need to prefix any
-docker commands with `sudo`.
-
-The Docker container exposes the JSON RPC API at port 8501, and this is the
-primary way you are expected to interact with the devnet. The following
-endpoints are supported: `personal,db,eth,net,web3,txpool,miner,debug`.
-
-You can stop the network with `docker stop` and it will automatically clean up
-after itself. (`docker stop` typically requires you to use `docker ps` to find
-the name of the currently running container).
-
-### Configuration
-
-The devnet network only has a single node and uses PoA instead of PoW. That
-means that one node, called the "sealer", is the ultimate authority for
-validating transactions and adding new blocks to the chain. Since there is no
-PoW it also means that mining does not require significant computational
-resources. You can learn more about PoA and the Geth-specific implementation
-called "Clique" in [EIP-225](https://github.com/ethereum/EIPs/issues/225).
-
-The address of the "sealer" is `0xe8816898d851d5b61b7f950627d04d794c07ca37`. The
-password associated with the account is "password" and the (encrypted) private
-keys are visible in the **node0/keystore** directory. This account is already
-"unlocked" in the Geth node by default, so you can do things like sign and send
-transactions from this account using the JSON RPC endpoints directly.
-
-There are also a number of other addresses that have hard-coded starting
-balances for testing purposes. You can see the details in the **genesis.json**
-file. All of these accounts are also unlocked by default.
-
-### Additional JSON RPC Methods
-
-In addition to the
-[standard JSON RPC methods](https://github.com/ethereum/wiki/wiki/JSON-RPC) and
-the
-[Geth Management API](https://github.com/ethereum/go-ethereum/wiki/Management-APIs)
-The devnet node supports some additional JSON RPC methods:
-
-#### debug_increaseTime
-
-Increases the timestamp of the next mined block.
-
-##### Parameters
-
-`Number` - The number of seconds by which to increase the time offset.
-
-##### Returns
-
-`Number` - The total number of seconds by which the time offset has been
-increased (this includes all calls to `debug_increaseTime`).
-
-##### Example
-
-```js
-// Request
-curl -X POST --data '{"jsonrpc":"2.0","method":"debug_increaseTime","params":[100],"id":67}'
-
-// Result
-{
- "id":67,
- "jsonrpc": "2.0",
- "result": "5000"
-}
-```
-
-### Mining
-
-The node will automatically (nearly instantly) mine a block whenever new
-transactions are added to the transaction pool. If there are no transactions in
-the pool, it will wait.
-
-To stop mining, use the
-[`miner.stop`](https://github.com/ethereum/go-ethereum/wiki/Management-APIs#miner_stop)
-method.
-
-To start mining again, you can use the
-[`miner.start`](https://github.com/ethereum/go-ethereum/wiki/Management-APIs#miner_start)
-JSON RPC method.
-
-## 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/devnet/genesis.json b/packages/devnet/genesis.json
deleted file mode 100644
index 073672dd9..000000000
--- a/packages/devnet/genesis.json
+++ /dev/null
@@ -1,60 +0,0 @@
-{
- "config": {
- "chainId": 50,
- "homesteadBlock": 1,
- "eip150Block": 2,
- "eip150Hash": "0x0000000000000000000000000000000000000000000000000000000000000000",
- "eip155Block": 3,
- "eip158Block": 3,
- "byzantiumBlock": 4,
- "clique": {
- "period": 0,
- "epoch": 30000
- }
- },
- "nonce": "0x0",
- "timestamp": "0x5af1ffac",
- "extraData": "0x0000000000000000000000000000000000000000000000000000000000000000e8816898d851d5b61b7f950627d04d794c07ca370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
- "gasLimit": "0x4c4b400000",
- "difficulty": "0x1",
- "mixHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
- "coinbase": "0x0000000000000000000000000000000000000000",
- "alloc": {
- "0xe8816898d851d5b61b7f950627d04d794c07ca37": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x5409ed021d9299bf6814279a6a1411a7e866a631": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x6ecbe1db9ef729cbe972c83fb886247691fb6beb": {
- "balance": "0x56BC75E2D63100000"
- },
- "0xe36ea790bc9d7ab70c55260c66d52b1eca985f84": {
- "balance": "0x56BC75E2D63100000"
- },
- "0xe834ec434daba538cd1b9fe1582052b880bd7e63": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x78dc5d2d739606d31509c31d654056a45185ecb6": {
- "balance": "0x56BC75E2D63100000"
- },
- "0xa8dda8d7f5310e4a9e24f8eba77e091ac264f872": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x06cef8e666768cc40cc78cf93d9611019ddcb628": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x7457d5e02197480db681d3fdf256c7aca21bdc12": {
- "balance": "0x56BC75E2D63100000"
- },
- "0x91c987bf62d25945db517bdaa840a6c661374402": {
- "balance": "0x56BC75E2D63100000"
- }
- },
- "number": "0x0",
- "gasUsed": "0x0",
- "parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000"
-}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-08.903003751Z--5409ed021d9299bf6814279a6a1411a7e866a631 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-08.903003751Z--5409ed021d9299bf6814279a6a1411a7e866a631
deleted file mode 100644
index 32c4002e0..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-08.903003751Z--5409ed021d9299bf6814279a6a1411a7e866a631
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"5409ed021d9299bf6814279a6a1411a7e866a631","crypto":{"cipher":"aes-128-ctr","ciphertext":"7c7bdd62b303eb3a42d5d8e935825ed5a05a47cb2cef71e346c61b1bd582f1aa","cipherparams":{"iv":"7fd6c9d9f9893f2c480735b5386b6d75"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"79cc86edc3a668845a68fabb3913710b7504922e47aac8513ab3d6a28d090218"},"mac":"8a593ae0d0b964e47625bc964b6d389f5687f5bde631b4913136db4ab1b8083e"},"id":"29f637ba-6a65-4401-a0d1-30e1554bd776","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-09.794553183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-09.794553183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb
deleted file mode 100644
index ba84ccfd2..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-09.794553183Z--6ecbe1db9ef729cbe972c83fb886247691fb6beb
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"6ecbe1db9ef729cbe972c83fb886247691fb6beb","crypto":{"cipher":"aes-128-ctr","ciphertext":"ecaf4f2839d74d92e2cb87c2fc7d52862661b46e697d70acfbe43f0893db73ed","cipherparams":{"iv":"7641c3a107228f8a901c07a07ea1f70d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"c67c9fb30648df6985c0490b6603382147e7dc1ea28ca8c934af4a453ec0555b"},"mac":"985dca9ce65ad400fa4c9009742be2d409f402fe05203fc1278cfd1451729e8d"},"id":"e8634edc-08e6-415e-8d65-7985c4c4a05c","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-10.696351411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f84 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-10.696351411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f84
deleted file mode 100644
index e889c38b3..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-10.696351411Z--e36ea790bc9d7ab70c55260c66d52b1eca985f84
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"e36ea790bc9d7ab70c55260c66d52b1eca985f84","crypto":{"cipher":"aes-128-ctr","ciphertext":"49f89d7d612049f5f3581fc7c97d32ec9c9a2ca3c11165587139f16bfb29de6b","cipherparams":{"iv":"9767e0687a097c5b57e9cb30eec9bc0a"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"3e8f23332df99d519b602a0f6f4724338ba3fd9e7e313c337a92ffd1cafa19f1"},"mac":"4892051a669d45bb7de32a5eab63ee8fe52485a02218ce1806515da2adbd6584"},"id":"3488ad36-4a9d-4282-8651-7939b822429d","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-11.479938556Z--e834ec434daba538cd1b9fe1582052b880bd7e63 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-11.479938556Z--e834ec434daba538cd1b9fe1582052b880bd7e63
deleted file mode 100644
index c12742c54..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-11.479938556Z--e834ec434daba538cd1b9fe1582052b880bd7e63
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"e834ec434daba538cd1b9fe1582052b880bd7e63","crypto":{"cipher":"aes-128-ctr","ciphertext":"a8ae3896739c63fc3bfe034277f6a1924a1c0ddc3f6747391dada8e61e15a928","cipherparams":{"iv":"f4f4d786cd3650a428a8bac5a6c824b1"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"9acecc321bcab9b69ffdea494b8894ad0221c30f05c17d2302e315db8708ecc6"},"mac":"fc416b8f539fdc1e39e87a3bd2a69b04455875de701ced60cc8948b222171380"},"id":"0d9703e8-14fc-45d0-a425-2c40b8ae846a","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-12.260348580Z--78dc5d2d739606d31509c31d654056a45185ecb6 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-12.260348580Z--78dc5d2d739606d31509c31d654056a45185ecb6
deleted file mode 100644
index 691e31dcf..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-12.260348580Z--78dc5d2d739606d31509c31d654056a45185ecb6
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"78dc5d2d739606d31509c31d654056a45185ecb6","crypto":{"cipher":"aes-128-ctr","ciphertext":"25e90e593f08e9e3adc426c8685d90db5d1c04957e9dc8d5fab4ae30c3306b61","cipherparams":{"iv":"72ece22297a27363e795b678bcbd6be5"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"2201502b9d3c4e2076d9d15bfd9da3a6c75d9e2e574aabb29c3bc5a3b5ec55a5"},"mac":"13d709ed4bd2f5bf4973fc1373f8434835f0d12dc99b32c6fc14d9df7f41c62d"},"id":"3902dff4-5681-4646-b825-849f96efeec5","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.178294829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f872 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.178294829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f872
deleted file mode 100644
index 9054e0019..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.178294829Z--a8dda8d7f5310e4a9e24f8eba77e091ac264f872
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"a8dda8d7f5310e4a9e24f8eba77e091ac264f872","crypto":{"cipher":"aes-128-ctr","ciphertext":"0d67c13cf0b130e8ffa1aaca5df372f727164e633f8e0e28a3e54d0884ffb568","cipherparams":{"iv":"619cd539cda9f40abb45bba00b5fe53d"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"4effcd9b6fe71ee31cfe9057290154329b9af3acb6dcc46be7f78b5b9dcd3f42"},"mac":"c6eecd25944f4250b7b875d76bfbb60cc4e8db1d081621d1a2ddb72ea4e52a6d"},"id":"556bd3f1-1e5b-47a4-9b6e-448b9989d7d3","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.960499696Z--06cef8e666768cc40cc78cf93d9611019ddcb628 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.960499696Z--06cef8e666768cc40cc78cf93d9611019ddcb628
deleted file mode 100644
index 0870638dd..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-13.960499696Z--06cef8e666768cc40cc78cf93d9611019ddcb628
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"06cef8e666768cc40cc78cf93d9611019ddcb628","crypto":{"cipher":"aes-128-ctr","ciphertext":"38c9ca150932dc8c5ec5c65796425b2de98295cae64db08b816da2c06fc52c20","cipherparams":{"iv":"512127e8e606c481612473e7bc4d38f1"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"16c4cabfd13cae2df66d8ff9acc7f503c95c808b00d0bb6a12932203889c679b"},"mac":"52297b496e8751627dea1ee17bf5cbea1926f90bcde3ffc8baa089184672f875"},"id":"31102097-86e4-4e19-ad73-03c3de67bf3b","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-14.757010386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-14.757010386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d
deleted file mode 100644
index 5f28db78f..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-14.757010386Z--4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d","crypto":{"cipher":"aes-128-ctr","ciphertext":"ca7aedbacc960fc0fcb418606d7bdf042c36cc2808a5c94ac222cc0b44a9970d","cipherparams":{"iv":"3b1fe5da1cf5d6cd2ceaaf24c008c897"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"a94e4d41d77ff6dc54beda30c7a46d8f3cc312ebeffa0352d679f7e3fc5301dc"},"mac":"9a82bf60103d05878f8af3c07765c22cba3df9b1c4376eaf859e47b805666e42"},"id":"ab68c67b-e15a-4ade-b3d9-2180a32b28fe","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-15.554233052Z--7457d5e02197480db681d3fdf256c7aca21bdc12 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-15.554233052Z--7457d5e02197480db681d3fdf256c7aca21bdc12
deleted file mode 100644
index 2a2c0194a..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-15.554233052Z--7457d5e02197480db681d3fdf256c7aca21bdc12
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"7457d5e02197480db681d3fdf256c7aca21bdc12","crypto":{"cipher":"aes-128-ctr","ciphertext":"720dcc2889c7b3636f9f659650181b0d46d82420460e23454277273f528baaee","cipherparams":{"iv":"1510028e2b9988d1a73b71cbb692d085"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"5db2b62f4d1f55a3f24c014c4f23f3ec9a2992dca6c2a89c24a566f99a079396"},"mac":"22c6fb134fd0a748195ea83e9ccb490ab2c9a3e8761f9d74ea6d02abbdeb8a43"},"id":"704c31f8-8ca2-4b49-9fdc-5923f5712dad","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-16.342711541Z--91c987bf62d25945db517bdaa840a6c661374402 b/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-16.342711541Z--91c987bf62d25945db517bdaa840a6c661374402
deleted file mode 100644
index edc6d7531..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-11T21-29-16.342711541Z--91c987bf62d25945db517bdaa840a6c661374402
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"91c987bf62d25945db517bdaa840a6c661374402","crypto":{"cipher":"aes-128-ctr","ciphertext":"8f461f3c74643f382f7fc1f71719d5a89ed8cf75854d8a1b53e133997b53a386","cipherparams":{"iv":"cf595fb7680d36b4f5a01599ee54d2d1"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"73a9e599369d2bfaedd044559415147240c3517f6cd1dec8f77a98993d1ceaf8"},"mac":"c8be4dc59ad28d40f7b549a6b72834d149c84d67dc35e687676bbee0e07be395"},"id":"21cca6fb-7876-4e39-a986-a0a37f90da6d","version":3}
diff --git a/packages/devnet/node0/keystore/UTC--2018-05-15T21-50-24.532037737Z--e8816898d851d5b61b7f950627d04d794c07ca37 b/packages/devnet/node0/keystore/UTC--2018-05-15T21-50-24.532037737Z--e8816898d851d5b61b7f950627d04d794c07ca37
deleted file mode 100644
index cd2c97a88..000000000
--- a/packages/devnet/node0/keystore/UTC--2018-05-15T21-50-24.532037737Z--e8816898d851d5b61b7f950627d04d794c07ca37
+++ /dev/null
@@ -1 +0,0 @@
-{"address":"e8816898d851d5b61b7f950627d04d794c07ca37","crypto":{"cipher":"aes-128-ctr","ciphertext":"1ff4add6955cba7ddaf29f66d7d21c5e1d714ef6191fbc651ae60f2ea3c95e8f","cipherparams":{"iv":"3ff869fbdbe1a523cdb327780365976e"},"kdf":"scrypt","kdfparams":{"dklen":32,"n":262144,"p":1,"r":8,"salt":"7372dbae5fb318f8684902e099c311d4188721d677974d729711762c7ef6030c"},"mac":"485fa5dc701067782baa1589716a53110c7f917eb259e35ebca7265bbb7150b1"},"id":"89edb004-5b00-4607-a3af-a0d9ab9b1c34","version":3} \ No newline at end of file
diff --git a/packages/devnet/node0/password.txt b/packages/devnet/node0/password.txt
deleted file mode 100644
index 9842d2661..000000000
--- a/packages/devnet/node0/password.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-password
-password
-password
-password
-password
-password
-password
-password
-password
-password
-password
diff --git a/packages/devnet/run.sh b/packages/devnet/run.sh
deleted file mode 100755
index dea243396..000000000
--- a/packages/devnet/run.sh
+++ /dev/null
@@ -1,25 +0,0 @@
-set -e
-
-# Create log directory for Geth
-mkdir -p /var/log
-
-# Start Geth and direct output to stdout
-/geth \
- --verbosity 5 \
- --datadir node0/ \
- --syncmode 'full' \
- --nat none \
- --nodiscover \
- --port 30310 \
- --txpool.journal '' \
- --rpc \
- --rpcaddr '0.0.0.0' \
- --rpcport 8501 \
- --rpcapi 'personal,db,eth,net,web3,txpool,miner,debug' \
- --networkid 50 \
- --gasprice '2000000000' \
- --targetgaslimit '0x4c4b400000' \
- --mine \
- --etherbase '0xe8816898d851d5b61b7f950627d04d794c07ca37' \
- --unlock '0xe8816898d851d5b61b7f950627d04d794c07ca37,0x5409ed021d9299bf6814279a6a1411a7e866a631,0x6ecbe1db9ef729cbe972c83fb886247691fb6beb,0xe36ea790bc9d7ab70c55260c66d52b1eca985f84,0xe834ec434daba538cd1b9fe1582052b880bd7e63,0x78dc5d2d739606d31509c31d654056a45185ecb6,0xa8dda8d7f5310e4a9e24f8eba77e091ac264f872,0x06cef8e666768cc40cc78cf93d9611019ddcb628,0x4404ac8bd8f9618d27ad2f1485aa1b2cfd82482d,0x7457d5e02197480db681d3fdf256c7aca21bdc12,0x91c987bf62d25945db517bdaa840a6c661374402' \
- --password=node0/password.txt
diff --git a/packages/ethereum-types/.npmignore b/packages/ethereum-types/.npmignore
deleted file mode 100644
index 24e65ad5b..000000000
--- a/packages/ethereum-types/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/ethereum-types/CHANGELOG.json b/packages/ethereum-types/CHANGELOG.json
deleted file mode 100644
index c106d43a9..000000000
--- a/packages/ethereum-types/CHANGELOG.json
+++ /dev/null
@@ -1,201 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.1.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.1.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.1.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.1.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "version": "1.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.1.1",
- "changes": [
- {
- "note": "Add `JSONRPCResponseError` and error field on `JSONRPCResponsePayload`.",
- "pr": 1102
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Unpublished package."
- }
- ]
- },
- {
- "timestamp": 1538693146,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535133899,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1534210131,
- "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": "Add `TraceParams` interface for `debug_traceTransaction` parameters",
- "pr": 675
- },
- {
- "note": "Add `TransactionReceiptStatus` type",
- "pr": 812
- },
- {
- "note": "Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField`",
- "pr": 924
- }
- ]
- },
- {
- "version": "0.0.2",
- "changes": [
- {
- "note": "Initial publish",
- "pr": "642"
- }
- ],
- "timestamp": 1527811200
- }
-]
diff --git a/packages/ethereum-types/CHANGELOG.md b/packages/ethereum-types/CHANGELOG.md
deleted file mode 100644
index c1857495d..000000000
--- a/packages/ethereum-types/CHANGELOG.md
+++ /dev/null
@@ -1,88 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.1.6 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.1.5 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.1.4 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.1.3 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.1.2 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.1.1 - _October 18, 2018_
-
- * Add `JSONRPCResponseError` and error field on `JSONRPCResponsePayload`. (#1102)
-
-## v1.1.0 - _Invalid date_
-
- * Unpublished package.
-
-## v1.0.11 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _October 2, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _August 24, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _August 14, 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_
-
- * Add `TraceParams` interface for `debug_traceTransaction` parameters (#675)
- * Add `TransactionReceiptStatus` type (#812)
- * Add Artifact types: `CompilerSettings`, `CompilerOptions`, `OutputField` (#924)
-
-## v0.0.2 - _June 1, 2018_
-
- * Initial publish (#642)
diff --git a/packages/ethereum-types/README.md b/packages/ethereum-types/README.md
deleted file mode 100644
index 817e22d15..000000000
--- a/packages/ethereum-types/README.md
+++ /dev/null
@@ -1,61 +0,0 @@
-## ethereum-types
-
-Typescript types shared across Ethereum-related packages/libraries/tools.
-
-## Installation
-
-```bash
-yarn add -D ethereum-types
-```
-
-## Usage
-
-```javascript
-import { TransactionReceipt, TxData, TxDataPayable } from 'ethereum-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=ethereum-types yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=ethereum-types yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/ethereum-types/package.json b/packages/ethereum-types/package.json
deleted file mode 100644
index bd3748058..000000000
--- a/packages/ethereum-types/package.json
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "name": "ethereum-types",
- "version": "1.1.6",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Ethereum types",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib generated_docs",
- "lint": "tslint --format stylish --project .",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
- },
- "config": {
- "postpublish": {
- "assets": []
- }
- },
- "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/ethereum-types/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@types/node": "*",
- "bignumber.js": "~8.0.2"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/ethereum-types/src/globals.d.ts b/packages/ethereum-types/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/ethereum-types/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/ethereum-types/src/index.ts b/packages/ethereum-types/src/index.ts
deleted file mode 100644
index a8dcfd68a..000000000
--- a/packages/ethereum-types/src/index.ts
+++ /dev/null
@@ -1,521 +0,0 @@
-import { BigNumber } from 'bignumber.js';
-
-export type JSONRPCErrorCallback = (err: Error | null, result?: JSONRPCResponsePayload) => void;
-
-/**
- * Do not create your own provider. Use an existing provider from a Web3 or ProviderEngine library
- * Read more about Providers in the 0x wiki.
- */
-export interface Provider {
- sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): void;
-}
-
-export type ContractAbi = AbiDefinition[];
-
-export type AbiDefinition = FunctionAbi | EventAbi;
-
-export type FunctionAbi = MethodAbi | ConstructorAbi | FallbackAbi;
-
-export type ConstructorStateMutability = 'nonpayable' | 'payable';
-export type StateMutability = 'pure' | 'view' | ConstructorStateMutability;
-
-export interface MethodAbi {
- // Ideally this would be set to: `'function'` but then TS complains when artifacts are loaded
- // from JSON files, and this value has type `string` not type `'function'`
- type: string;
- name: string;
- inputs: DataItem[];
- outputs: DataItem[];
- constant: boolean;
- stateMutability: StateMutability;
- payable: boolean;
-}
-
-export interface ConstructorAbi {
- // Ideally this would be set to: `'constructor'` but then TS complains when artifacts are loaded
- // from JSON files, and this value has type `string` not type `'constructor'`
- type: string;
- inputs: DataItem[];
- payable: boolean;
- stateMutability: ConstructorStateMutability;
-}
-
-export interface FallbackAbi {
- // Ideally this would be set to: `'fallback'` but then TS complains when artifacts are loaded
- // from JSON files, and this value has type `string` not type `'fallback'`
- type: string;
- payable: boolean;
-}
-
-export interface EventParameter extends DataItem {
- indexed: boolean;
-}
-
-export interface EventAbi {
- // Ideally this would be set to: `'event'` but then TS complains when artifacts are loaded
- // from JSON files, and this value has type `string` not type `'event'`
- type: string;
- name: string;
- inputs: EventParameter[];
- anonymous: boolean;
-}
-
-export interface DataItem {
- name: string;
- type: string;
- components?: DataItem[];
-}
-
-export enum OpCode {
- DelegateCall = 'DELEGATECALL',
- Revert = 'REVERT',
- Create = 'CREATE',
- Stop = 'STOP',
- Invalid = 'INVALID',
- CallCode = 'CALLCODE',
- StaticCall = 'STATICCALL',
- Return = 'RETURN',
- Call = 'CALL',
- SelfDestruct = 'SELFDESTRUCT',
-}
-
-export interface StructLog {
- depth: number;
- error: string;
- gas: number;
- gasCost: number;
- memory: string[];
- op: OpCode;
- pc: number;
- stack: string[];
- storage: { [location: string]: string };
-}
-
-export interface TransactionTrace {
- gas: number;
- returnValue: any;
- structLogs: StructLog[];
-}
-
-export type Unit =
- | 'kwei'
- | 'ada'
- | 'mwei'
- | 'babbage'
- | 'gwei'
- | 'shannon'
- | 'szabo'
- | 'finney'
- | 'ether'
- | 'kether'
- | 'grand'
- | 'einstein'
- | 'mether'
- | 'gether'
- | 'tether';
-
-export interface JSONRPCRequestPayload {
- params: any[];
- method: string;
- id: number;
- jsonrpc: string;
-}
-
-export interface JSONRPCResponseError {
- message: string;
- code: number;
-}
-
-export interface JSONRPCResponsePayload {
- result: any;
- id: number;
- jsonrpc: string;
- error?: JSONRPCResponseError;
-}
-
-export interface AbstractBlock {
- number: number | null;
- hash: string | null;
- parentHash: string;
- nonce: string | null;
- sha3Uncles: string;
- logsBloom: string | null;
- transactionsRoot: string;
- stateRoot: string;
- miner: string;
- difficulty: BigNumber;
- totalDifficulty: BigNumber;
- extraData: string;
- size: number;
- gasLimit: number;
- gasUsed: number;
- timestamp: number;
- uncles: string[];
-}
-
-export interface BlockWithoutTransactionData extends AbstractBlock {
- transactions: string[];
-}
-
-export interface BlockWithTransactionData extends AbstractBlock {
- transactions: Transaction[];
-}
-
-export interface Transaction {
- hash: string;
- nonce: number;
- blockHash: string | null;
- blockNumber: number | null;
- transactionIndex: number | null;
- from: string;
- to: string | null;
- value: BigNumber;
- gasPrice: BigNumber;
- gas: number;
- input: string;
-}
-
-export interface CallTxDataBase {
- to?: string;
- value?: number | string | BigNumber;
- gas?: number | string | BigNumber;
- gasPrice?: number | string | BigNumber;
- data?: string;
- nonce?: number;
-}
-
-export interface TxData extends CallTxDataBase {
- from: string;
-}
-
-export interface CallData extends CallTxDataBase {
- from?: string;
-}
-
-export interface FilterObject {
- fromBlock?: number | string;
- toBlock?: number | string;
- blockHash?: string;
- address?: string;
- topics?: LogTopic[];
-}
-
-export type LogTopic = null | string | string[];
-
-export interface DecodedLogEntry<A> extends LogEntry {
- event: string;
- args: A;
-}
-
-export interface DecodedLogEntryEvent<A> extends DecodedLogEntry<A> {
- removed: boolean;
-}
-
-export interface LogEntryEvent extends LogEntry {
- removed: boolean;
-}
-
-export interface LogEntry {
- logIndex: number | null;
- transactionIndex: number | null;
- transactionHash: string;
- blockHash: string | null;
- blockNumber: number | null;
- address: string;
- data: string;
- topics: string[];
-}
-
-export interface TxDataPayable extends TxData {
- value?: BigNumber;
-}
-
-export type TransactionReceiptStatus = null | string | 0 | 1;
-
-export interface TransactionReceipt {
- blockHash: string;
- blockNumber: number;
- transactionHash: string;
- transactionIndex: number;
- from: string;
- to: string;
- status: TransactionReceiptStatus;
- cumulativeGasUsed: number;
- gasUsed: number;
- contractAddress: string | null;
- logs: LogEntry[];
-}
-
-export enum AbiType {
- Function = 'function',
- Constructor = 'constructor',
- Event = 'event',
- Fallback = 'fallback',
-}
-
-export type ContractEventArg = any;
-
-export interface DecodedLogArgs {
- [argName: string]: ContractEventArg;
-}
-
-export interface LogWithDecodedArgs<ArgsType extends DecodedLogArgs> extends DecodedLogEntry<ArgsType> {}
-export type RawLog = LogEntry;
-
-export enum BlockParamLiteral {
- Earliest = 'earliest',
- Latest = 'latest',
- Pending = 'pending',
-}
-
-export type BlockParam = BlockParamLiteral | number;
-
-export interface RawLogEntry {
- logIndex: string | null;
- transactionIndex: string | null;
- transactionHash: string;
- blockHash: string | null;
- blockNumber: string | null;
- address: string;
- data: string;
- topics: string[];
-}
-
-export enum SolidityTypes {
- Address = 'address',
- Bool = 'bool',
- Bytes = 'bytes',
- Int = 'int',
- String = 'string',
- Tuple = 'tuple',
- Uint256 = 'uint256',
- Uint8 = 'uint8',
- Uint = 'uint',
-}
-
-/**
- * Contains the logs returned by a TransactionReceipt. We attempt to decode the
- * logs using AbiDecoder. If we have the logs corresponding ABI, we decode it,
- * otherwise we don't.
- */
-export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt {
- logs: Array<LogWithDecodedArgs<DecodedLogArgs> | LogEntry>;
-}
-
-export interface TraceParams {
- disableMemory?: boolean;
- disableStack?: boolean;
- disableStorage?: boolean;
- tracer?: string;
- timeout?: string;
-}
-
-export type OutputField =
- | '*'
- | 'ast'
- | 'legacyAST'
- | 'abi'
- | 'devdoc'
- | 'userdoc'
- | 'metadata'
- | 'ir'
- | 'evm.assembly'
- | 'evm.legacyAssembly'
- | 'evm.bytecode.object'
- | 'evm.bytecode.opcodes'
- | 'evm.bytecode.sourceMap'
- | 'evm.bytecode.linkReferences'
- | 'evm.deployedBytecode.object'
- | 'evm.deployedBytecode.opcodes'
- | 'evm.deployedBytecode.sourceMap'
- | 'evm.deployedBytecode.linkReferences'
- | 'evm.methodIdentifiers'
- | 'evm.gasEstimates'
- | 'ewasm.wast'
- | 'ewasm.wasm';
-
-export interface ContractNetworks {
- [networkId: number]: ContractNetworkData;
-}
-
-export interface ContractNetworkData {
- address: string;
- links: {
- [linkName: string]: string;
- };
- constructorArgs: string;
-}
-
-export type ParamDescription = string;
-
-export interface StandardContractOutput {
- abi: ContractAbi;
- evm: EvmOutput;
- devdoc?: DevdocOutput;
-}
-
-export interface StandardOutput {
- errors: SolcError[];
- sources: {
- [fileName: string]: {
- id: number;
- ast?: object;
- legacyAST?: object;
- };
- };
- contracts: {
- [fileName: string]: {
- [contractName: string]: StandardContractOutput;
- };
- };
-}
-
-export type ErrorType =
- | 'JSONError'
- | 'IOError'
- | 'ParserError'
- | 'DocstringParsingError'
- | 'SyntaxError'
- | 'DeclarationError'
- | 'TypeError'
- | 'UnimplementedFeatureError'
- | 'InternalCompilerError'
- | 'Exception'
- | 'CompilerError'
- | 'FatalError'
- | 'Warning';
-export type ErrorSeverity = 'error' | 'warning';
-
-export interface SolcError {
- sourceLocation?: SourceLocation;
- type: ErrorType;
- component: 'general' | 'ewasm';
- severity: ErrorSeverity;
- message: string;
- formattedMessage?: string;
-}
-
-export interface SourceLocation {
- file: string;
- start: number;
- end: number;
-}
-
-export interface EvmOutput {
- bytecode: EvmBytecodeOutput;
- deployedBytecode: EvmBytecodeOutput;
-}
-
-export interface EvmBytecodeOutput {
- object: string;
- sourceMap: string;
-}
-
-export interface DevdocOutput {
- title: string;
- author: string;
- methods: {
- [signature: string]: {
- details: string;
- params: {
- [name: string]: ParamDescription;
- };
- return?: string;
- };
- };
-}
-
-export interface ContractVersionData {
- compiler: CompilerOpts;
- sources: {
- [sourceName: string]: {
- id: number;
- };
- };
- sourceCodes: {
- [sourceName: string]: string;
- };
- sourceTreeHashHex: string;
- compilerOutput: StandardContractOutput;
-}
-
-export interface CompilerOpts {
- name: 'solc';
- version: string;
- settings: CompilerSettings;
-}
-
-/**
- * This type defines the schema of the artifact.json file generated by Sol-compiler
- * schemaVersion: The version of the artifact schema
- * contractName: The contract name it represents
- * networks: Network specific information by network (address, id, constructor args, etc...)
- * compilerOutput: The Solidity compiler output generated from the specified compiler input
- * description (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description)
- * compiler: The compiler settings used
- * sourceCodes: The source code of the contract and all it's dependencies
- * sources: A mapping from source filePath to sourceMap id
- * sourceTreeHashHex: A unique hash generated from the contract source and that of it's dependencies.
- * If any of the sources change, the hash would change notifying us that a re-compilation is necessary
- */
-export interface ContractArtifact extends ContractVersionData {
- schemaVersion: string;
- contractName: string;
- networks: ContractNetworks;
-}
-
-export interface GeneratedCompilerOptions {
- name: 'solc';
- version: string;
- settings: CompilerSettings;
-}
-
-// Copied from the solc.js library types
-export interface CompilerSettings {
- remappings?: string[];
- optimizer?: OptimizerSettings;
- evmVersion?: 'homestead' | 'tangerineWhistle' | 'spuriousDragon' | 'byzantium' | 'constantinople';
- metadata?: CompilerSettingsMetadata;
- libraries?: {
- [fileName: string]: {
- [libName: string]: string;
- };
- };
- outputSelection: {
- [fileName: string]: {
- [contractName: string]: OutputField[];
- };
- };
-}
-
-export interface CompilerSettingsMetadata {
- useLiteralContent: true;
-}
-
-export interface OptimizerSettings {
- enabled: boolean;
- runs?: number;
-}
-
-export interface Source {
- id: number;
-}
-
-/**
- * Options you can specify (as flags or in a compiler.json file) when invoking sol-compiler
- * contractsDir: Directory containing your project's Solidity contracts. Can contain nested directories.
- * artifactsDir: Directory where you want the generated artifacts.json written to
- * compilerSettings: Desired settings to pass to the Solidity compiler during compilation.
- * (http://solidity.readthedocs.io/en/v0.4.24/using-the-compiler.html#compiler-input-and-output-json-description)
- * contracts: List of contract names you wish to compile, or alternatively ['*'] to compile all contracts in the
- * specified directory.
- * solcVersion: If you don't want to compile each contract with the Solidity version specified in-file, you can force all
- * contracts to compile with the the version specified here.
- */
-export interface CompilerOptions {
- contractsDir?: string;
- artifactsDir?: string;
- compilerSettings?: CompilerSettings;
- contracts?: string[] | '*';
- solcVersion?: string;
-} // tslint:disable-line:max-file-line-count
diff --git a/packages/ethereum-types/tsconfig.json b/packages/ethereum-types/tsconfig.json
deleted file mode 100644
index 9ab22ac8a..000000000
--- a/packages/ethereum-types/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "typeRoots": ["../../node_modules/@types"],
- "outDir": "lib",
- "rootDir": "src"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/ethereum-types/tslint.json b/packages/ethereum-types/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/ethereum-types/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/ethereum-types/typedoc-tsconfig.json b/packages/ethereum-types/typedoc-tsconfig.json
deleted file mode 100644
index f71153ec0..000000000
--- a/packages/ethereum-types/typedoc-tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "typeRoots": ["../../node_modules/@types"],
- "outDir": "lib"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/fill-scenarios/.npmignore b/packages/fill-scenarios/.npmignore
deleted file mode 100644
index 24e65ad5b..000000000
--- a/packages/fill-scenarios/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/fill-scenarios/CHANGELOG.json b/packages/fill-scenarios/CHANGELOG.json
deleted file mode 100644
index beffdd097..000000000
--- a/packages/fill-scenarios/CHANGELOG.json
+++ /dev/null
@@ -1,307 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Add support for MultiAssetProxy",
- "pr": 1363
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "1.0.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1543401373,
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "1.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542028948,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.0.8",
- "changes": [
- {
- "note": "Updated to use new @0xproject/contract-artifacts and @0xproject/abi-gen-wrappers packages",
- "pr": 1105
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "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": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.2",
- "changes": [
- {
- "note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
- }
- ],
- "timestamp": 1537369748
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.1-rc.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1535377027
- },
- {
- "version": "1.0.1-rc.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.3",
- "changes": [
- {
- "note": "Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface",
- "pr": 936
- },
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1534210131
- },
- {
- "version": "1.0.1-rc.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "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": "Make fill-scenarios compatible with V2 of 0x protocol",
- "pr": 656
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527616612,
- "version": "0.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527008544,
- "version": "0.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527008544,
- "version": "0.0.1",
- "changes": [
- {
- "note": "Move FillScenarios out of 0x.js",
- "pr": 579
- }
- ]
- }
-]
diff --git a/packages/fill-scenarios/CHANGELOG.md b/packages/fill-scenarios/CHANGELOG.md
deleted file mode 100644
index 7df8b5ab3..000000000
--- a/packages/fill-scenarios/CHANGELOG.md
+++ /dev/null
@@ -1,135 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.1.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.1.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.1.0 - _January 9, 2019_
-
- * Add support for MultiAssetProxy (#1363)
-
-## v1.0.16 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.0.15 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.0.14 - _November 28, 2018_
-
- * Dependencies updated
-
-## v1.0.13 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.12 - _November 14, 2018_
-
- * Dependencies updated
-
-## v1.0.11 - _November 13, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _November 12, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _October 18, 2018_
-
- * Updated to use new @0xproject/contract-artifacts and @0xproject/abi-gen-wrappers packages (#1105)
-
-## v1.0.7 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.3 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.2 - _September 19, 2018_
-
- * Drastically reduce the bundle size by removing unused parts of included contract artifacts.
-
-## v1.0.1 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.5 - _August 27, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.4 - _August 24, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.3 - _August 14, 2018_
-
- * Updated to use latest orderFactory interface, fixed `feeRecipient` spelling error in public interface (#936)
- * Dependencies updated
-
-## v1.0.1-rc.2 - _July 26, 2018_
-
- * Dependencies updated
-
-## 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_
-
- * Make fill-scenarios compatible with V2 of 0x protocol (#656)
-
-## v0.0.6 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.0.5 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.0.4 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.3 - _May 29, 2018_
-
- * Dependencies updated
-
-## v0.0.2 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.0.1 - _May 22, 2018_
-
- * Move FillScenarios out of 0x.js (#579)
diff --git a/packages/fill-scenarios/README.md b/packages/fill-scenarios/README.md
deleted file mode 100644
index 794b70e56..000000000
--- a/packages/fill-scenarios/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-## @0x/fill-scenarios
-
-0x order fill scenario generator
-
-## Installation
-
-```bash
-yarn add @0x/fill-scenarios
-```
-
-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/fill-scenarios yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/fill-scenarios yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/fill-scenarios/package.json b/packages/fill-scenarios/package.json
deleted file mode 100644
index d882aba76..000000000
--- a/packages/fill-scenarios/package.json
+++ /dev/null
@@ -1,46 +0,0 @@
-{
- "name": "@0x/fill-scenarios",
- "version": "1.1.2",
- "description": "0x order fill scenario generator",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "yarn tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib src/generated_contract_wrappers",
- "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/fill-scenarios/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/lodash": "4.14.104",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/abi-gen-wrappers": "^2.2.0",
- "@0x/base-contract": "^3.0.13",
- "@0x/contract-artifacts": "^1.3.0",
- "@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",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/fill-scenarios/src/constants.ts b/packages/fill-scenarios/src/constants.ts
deleted file mode 100644
index 5661b059f..000000000
--- a/packages/fill-scenarios/src/constants.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export const constants = {
- AWAIT_TRANSACTION_MINED_MS: 0,
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
-};
diff --git a/packages/fill-scenarios/src/fill_scenarios.ts b/packages/fill-scenarios/src/fill_scenarios.ts
deleted file mode 100644
index ce1f7f9ff..000000000
--- a/packages/fill-scenarios/src/fill_scenarios.ts
+++ /dev/null
@@ -1,296 +0,0 @@
-import { DummyERC20TokenContract, DummyERC721TokenContract, ExchangeContract } 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 { OrderWithoutExchangeAddress, SignedOrder } 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';
-
-export class FillScenarios {
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _userAddresses: string[];
- private readonly _coinbase: string;
- private readonly _zrxTokenAddress: string;
- private readonly _exchangeAddress: string;
- private readonly _erc20ProxyAddress: string;
- private readonly _erc721ProxyAddress: string;
- constructor(
- provider: Provider,
- userAddresses: string[],
- zrxTokenAddress: string,
- exchangeAddress: string,
- erc20ProxyAddress: string,
- erc721ProxyAddress: string,
- ) {
- this._web3Wrapper = new Web3Wrapper(provider);
- this._userAddresses = userAddresses;
- this._coinbase = userAddresses[0];
- this._zrxTokenAddress = zrxTokenAddress;
- this._exchangeAddress = exchangeAddress;
- this._erc20ProxyAddress = erc20ProxyAddress;
- this._erc721ProxyAddress = erc721ProxyAddress;
- }
- public async createFillableSignedOrderAsync(
- makerAssetData: string,
- takerAssetData: string,
- makerAddress: string,
- takerAddress: string,
- fillableAmount: BigNumber,
- expirationTimeSeconds?: BigNumber,
- ): Promise<SignedOrder> {
- return this.createAsymmetricFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- fillableAmount,
- expirationTimeSeconds,
- );
- }
- public async createFillableSignedOrderWithFeesAsync(
- makerAssetData: string,
- takerAssetData: string,
- makerFee: BigNumber,
- takerFee: BigNumber,
- makerAddress: string,
- takerAddress: string,
- fillableAmount: BigNumber,
- feeRecipientAddress: string,
- expirationTimeSeconds?: BigNumber,
- ): Promise<SignedOrder> {
- return this._createAsymmetricFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- fillableAmount,
- fillableAmount,
- feeRecipientAddress,
- expirationTimeSeconds,
- );
- }
- public async createAsymmetricFillableSignedOrderAsync(
- makerAssetData: string,
- takerAssetData: string,
- makerAddress: string,
- takerAddress: string,
- makerFillableAmount: BigNumber,
- takerFillableAmount: BigNumber,
- expirationTimeSeconds?: BigNumber,
- ): Promise<SignedOrder> {
- const makerFee = new BigNumber(0);
- const takerFee = new BigNumber(0);
- const feeRecipientAddress = constants.NULL_ADDRESS;
- return this._createAsymmetricFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- makerFillableAmount,
- takerFillableAmount,
- feeRecipientAddress,
- expirationTimeSeconds,
- );
- }
- public async createPartiallyFilledSignedOrderAsync(
- makerAssetData: string,
- takerAssetData: string,
- takerAddress: string,
- fillableAmount: BigNumber,
- partialFillAmount: BigNumber,
- ): Promise<SignedOrder> {
- const [makerAddress] = this._userAddresses;
- const signedOrder = await this.createAsymmetricFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- fillableAmount,
- );
- const exchangeInstance = new ExchangeContract(
- artifacts.Exchange.compilerOutput.abi,
- signedOrder.exchangeAddress,
- this._web3Wrapper.getProvider(),
- this._web3Wrapper.getContractDefaults(),
- );
-
- const orderWithoutExchangeAddress = _.omit(signedOrder, [
- 'signature',
- 'exchangeAddress',
- ]) as OrderWithoutExchangeAddress;
-
- const txHash = await exchangeInstance.fillOrder.sendTransactionAsync(
- orderWithoutExchangeAddress,
- partialFillAmount,
- signedOrder.signature,
- { from: takerAddress },
- );
- await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
- return signedOrder;
- }
- private async _createAsymmetricFillableSignedOrderWithFeesAsync(
- makerAssetData: string,
- takerAssetData: string,
- makerFee: BigNumber,
- takerFee: BigNumber,
- makerAddress: string,
- takerAddress: string,
- makerFillableAmount: BigNumber,
- takerFillableAmount: BigNumber,
- feeRecipientAddress: string,
- expirationTimeSeconds?: BigNumber,
- ): Promise<SignedOrder> {
- await this._increaseBalanceAndAllowanceWithAssetDataAsync(makerAssetData, makerAddress, makerFillableAmount);
- await this._increaseBalanceAndAllowanceWithAssetDataAsync(takerAssetData, takerAddress, takerFillableAmount);
- // Fees
- await Promise.all([
- this._increaseERC20BalanceAndAllowanceAsync(this._zrxTokenAddress, makerAddress, makerFee),
- this._increaseERC20BalanceAndAllowanceAsync(this._zrxTokenAddress, takerAddress, takerFee),
- ]);
- const senderAddress = constants.NULL_ADDRESS;
-
- const signedOrder = await orderFactory.createSignedOrderAsync(
- this._web3Wrapper.getProvider(),
- makerAddress,
- makerFillableAmount,
- makerAssetData,
- takerFillableAmount,
- takerAssetData,
- this._exchangeAddress,
- {
- takerAddress,
- senderAddress,
- makerFee,
- takerFee,
- feeRecipientAddress,
- expirationTimeSeconds,
- },
- );
- return signedOrder;
- }
- private async _increaseERC721BalanceAndAllowanceAsync(
- tokenAddress: string,
- address: string,
- tokenId: BigNumber,
- ): Promise<void> {
- await this._increaseERC721BalanceAsync(tokenAddress, address, tokenId);
- await this._increaseERC721AllowanceAsync(tokenAddress, address, tokenId);
- }
- private async _increaseERC721AllowanceAsync(
- tokenAddress: string,
- address: string,
- tokenId: BigNumber,
- ): Promise<void> {
- const erc721Token = new DummyERC721TokenContract(
- artifacts.DummyERC721Token.compilerOutput.abi,
- tokenAddress,
- this._web3Wrapper.getProvider(),
- this._web3Wrapper.getContractDefaults(),
- );
- const txHash = await erc721Token.approve.sendTransactionAsync(this._erc721ProxyAddress, tokenId, {
- from: address,
- });
- await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
- }
- private async _increaseERC721BalanceAsync(
- tokenAddress: string,
- address: string,
- tokenId: BigNumber,
- ): Promise<void> {
- const erc721Token = new DummyERC721TokenContract(
- artifacts.DummyERC721Token.compilerOutput.abi,
- tokenAddress,
- this._web3Wrapper.getProvider(),
- this._web3Wrapper.getContractDefaults(),
- );
- try {
- const currentOwner = await erc721Token.ownerOf.callAsync(tokenId);
- if (currentOwner !== address) {
- throw new Error(`Token ${tokenAddress}:${tokenId} is already owner by ${currentOwner}`);
- }
- } catch (err) {
- const txHash = await erc721Token.mint.sendTransactionAsync(address, tokenId, { from: this._coinbase });
- await this._web3Wrapper.awaitTransactionSuccessAsync(txHash, constants.AWAIT_TRANSACTION_MINED_MS);
- }
- }
- private async _increaseERC20BalanceAndAllowanceAsync(
- tokenAddress: string,
- address: string,
- amount: BigNumber,
- ): Promise<void> {
- 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<void> {
- 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<void> {
- 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);
- }
- private async _increaseBalanceAndAllowanceWithAssetDataAsync(
- assetData: string,
- userAddress: string,
- amount: BigNumber,
- ): Promise<void> {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- if (assetDataUtils.isERC20AssetData(decodedAssetData)) {
- await this._increaseERC20BalanceAndAllowanceAsync(decodedAssetData.tokenAddress, userAddress, amount);
- } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) {
- await this._increaseERC721BalanceAndAllowanceAsync(
- decodedAssetData.tokenAddress,
- userAddress,
- decodedAssetData.tokenId,
- );
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- for (const [index, nestedAssetDataElement] of decodedAssetData.nestedAssetData.entries()) {
- const amountsElement = decodedAssetData.amounts[index];
- const totalAmount = amount.times(amountsElement);
- await this._increaseBalanceAndAllowanceWithAssetDataAsync(
- nestedAssetDataElement,
- userAddress,
- totalAmount,
- );
- }
- }
- }
-}
diff --git a/packages/fill-scenarios/src/index.ts b/packages/fill-scenarios/src/index.ts
deleted file mode 100644
index c51145cdb..000000000
--- a/packages/fill-scenarios/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { FillScenarios } from './fill_scenarios';
diff --git a/packages/fill-scenarios/tsconfig.json b/packages/fill-scenarios/tsconfig.json
deleted file mode 100644
index 56689eaa3..000000000
--- a/packages/fill-scenarios/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/fill-scenarios/tslint.json b/packages/fill-scenarios/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/fill-scenarios/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/instant/.DS_Store b/packages/instant/.DS_Store
deleted file mode 100644
index c86c5cbcd..000000000
--- a/packages/instant/.DS_Store
+++ /dev/null
Binary files differ
diff --git a/packages/instant/.dogfood.discharge.json b/packages/instant/.dogfood.discharge.json
deleted file mode 100644
index 651b3daa6..000000000
--- a/packages/instant/.dogfood.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-instant-dogfood",
- "build_command": "WEBPACK_OUTPUT_PATH=public dotenv yarn build -- --env.discharge_target=dogfood",
- "upload_directory": "public",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "0xproject",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/packages/instant/.env_example b/packages/instant/.env_example
deleted file mode 100644
index 234e64bbe..000000000
--- a/packages/instant/.env_example
+++ /dev/null
@@ -1,7 +0,0 @@
-INSTANT_ROLLBAR_PUBLISH_TOKEN=
-INSTANT_ROLLBAR_CLIENT_TOKEN=
-INSTANT_HEAP_ANALYTICS_ID_PRODUCTION=
-INSTANT_HEAP_ANALYTICS_ID_DEVELOPMENT=
-# if you want to report to heap or rollbar when building in development mode, you can use the following:
-# INSTANT_HEAP_FORCE_DEVELOPMENT=true
-# INSTANT_ROLLBAR_FORCE_DEVELOPMENT=true \ No newline at end of file
diff --git a/packages/instant/.gitignore b/packages/instant/.gitignore
deleted file mode 100644
index 2e65f192d..000000000
--- a/packages/instant/.gitignore
+++ /dev/null
@@ -1,4 +0,0 @@
-public/instant.js
-public/instant.js.map
-umd/*
-.env \ No newline at end of file
diff --git a/packages/instant/.npmignore b/packages/instant/.npmignore
deleted file mode 100644
index 563923652..000000000
--- a/packages/instant/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-*
-*/
-!lib/**/*
-!umd/**/*
-.env \ No newline at end of file
diff --git a/packages/instant/.production.discharge.json b/packages/instant/.production.discharge.json
deleted file mode 100644
index c87f8b187..000000000
--- a/packages/instant/.production.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "instant.0x.org",
- "build_command": "dotenv yarn build -- --env.discharge_target=production",
- "upload_directory": "umd",
- "index_key": "instant.js",
- "error_key": "404.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "0xproject",
- "aws_region": "us-east-1",
- "cdn": true,
- "dns_configured": true
-}
diff --git a/packages/instant/.staging.discharge.json b/packages/instant/.staging.discharge.json
deleted file mode 100644
index 844e3ca4e..000000000
--- a/packages/instant/.staging.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-instant-staging",
- "build_command": "WEBPACK_OUTPUT_PATH=public dotenv yarn build -- --env.discharge_target=staging",
- "upload_directory": "public",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "0xproject",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/packages/instant/CHANGELOG.json b/packages/instant/CHANGELOG.json
deleted file mode 100644
index c7348c3c0..000000000
--- a/packages/instant/CHANGELOG.json
+++ /dev/null
@@ -1,29 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Renamed ActionTypes enum members to PascalCase to conform with tslint enum-naming rule",
- "pr": 1474
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/packages/instant/CHANGELOG.md b/packages/instant/CHANGELOG.md
deleted file mode 100644
index c8be0c644..000000000
--- a/packages/instant/CHANGELOG.md
+++ /dev/null
@@ -1,10 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.1 - _November 21, 2018_
-
- * Dependencies updated
diff --git a/packages/instant/README.md b/packages/instant/README.md
deleted file mode 100644
index 8832e562d..000000000
--- a/packages/instant/README.md
+++ /dev/null
@@ -1,110 +0,0 @@
-## @0x/instant
-
-## Integration
-
-Looking to integrate 0x Instant into your web application or site? Check out the dedicated [instant documentation](https://0xproject.com/wiki#Get-Started-With-Instant) to get started. The documentation covers instant and related topics in depth. For a more "drag and drop" experience, check out our [configurator tool](https://0xproject.com/instant#configure). For on demand developer support, join our [Discord](https://discordapp.com/invite/d3FTX3M).
-
-Check out a live sample integration [here](https://www.rexrelay.com/instant).
-
-## Installation
-
-The package is available as a UMD module named `zeroExInstant` at https://instant.0xproject.com/instant.js.
-
-```html
-<head>
- <script type="text/javascript" src="https://instant.0xproject.com/instant.js" charset="utf-8"></script>
-</head>
-<body>
- <div id="zeroExInstantContainer"></div>
- <script>
- zeroExInstant.render(
- {
- // Initialization options
- },
- '#zeroExInstantContainer',
- );
- </script>
-</body>
-```
-
-## Deploying
-
-To run any of the following commands you need to configure your `.env` file. There is an example `.env_example` file to show you what values are required.
-
-You can deploy a work-in-progress version of 0x Instant at http://0x-instant-dogfood.s3-website-us-east-1.amazonaws.com/instant.js for easy sharing.
-
-To build and deploy the bundle run
-
-```
-yarn deploy_dogfood
-```
-
-We also have a staging bucket that is to be updated less frequently can be used to share a beta version of instant externally: http://0x-instant-staging.s3-website-us-east-1.amazonaws.com/instant.js
-
-To build and deploy to this bundle, run
-
-```
-yarn deploy_staging
-```
-
-Finally, we have our live production bundle that is only meant to be updated with stable, polished releases: https://instant.0xproject.com/instant.js
-
-To build and deploy to this bundle, run
-
-```
-yarn deploy_production
-```
-
-**NOTE: On deploying the site to staging and dogfood, it will say the site is available at a non-existent URL. Please ignore and use the (now updated) URL above.**
-
-## 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/instant yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/instant yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/instant/jest.config.js b/packages/instant/jest.config.js
deleted file mode 100644
index 29c365835..000000000
--- a/packages/instant/jest.config.js
+++ /dev/null
@@ -1,10 +0,0 @@
-module.exports = {
- roots: ['<rootDir>/test'],
- coverageDirectory: 'coverage',
- transform: {
- '.*.tsx?$': 'ts-jest',
- },
- testRegex: '(/__test__/.*|(\\.|/)(test|spec))\\.(jsx?|tsx?)$',
- moduleFileExtensions: ['ts', 'tsx', 'js', 'jsx', 'json', 'node'],
- collectCoverageFrom: ['src/**/*.{ts,tsx}', '!src/index.tsx'],
-};
diff --git a/packages/instant/package.json b/packages/instant/package.json
deleted file mode 100644
index 86fac9afe..000000000
--- a/packages/instant/package.json
+++ /dev/null
@@ -1,104 +0,0 @@
-{
- "name": "@0x/instant",
- "version": "1.0.8",
- "engines": {
- "node": ">=6.12"
- },
- "private": true,
- "description": "0x Instant React Component",
- "main": "umd/instant.js",
- "scripts": {
- "build": "webpack --mode production",
- "build:ci": "yarn build",
- "dev": "dotenv webpack-dev-server -- --mode development",
- "lint": "tslint --format stylish --project .",
- "test": "jest",
- "test:coverage": "jest --coverage",
- "rebuild_and_test": "run-s clean build test",
- "test:circleci": "yarn test:coverage",
- "clean": "shx rm -rf lib coverage scripts",
- "deploy_dogfood": "discharge deploy -c .dogfood.discharge.json",
- "deploy_staging": "discharge deploy -c .staging.discharge.json",
- "deploy_production": "discharge deploy -c .production.discharge.json",
- "manual:postpublish": "yarn build; node ./scripts/postpublish.js"
- },
- "config": {
- "postpublish": {
- "assets": [
- "packages/instant/umd/instant.js",
- "packages/instant/umd/instant.js.map"
- ]
- }
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/0xProject/0x-monorepo.git"
- },
- "author": "Francesco Agosti",
- "license": "Apache-2.0",
- "bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
- },
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/instant/README.md",
- "dependencies": {
- "@0x/assert": "^1.0.23",
- "@0x/asset-buyer": "^4.0.2",
- "@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",
- "bowser": "^1.9.4",
- "copy-to-clipboard": "^3.0.8",
- "ethereum-types": "^1.1.6",
- "lodash": "^4.17.5",
- "polished": "^2.2.0",
- "react": "^16.5.2",
- "react-dom": "^16.5.2",
- "react-redux": "^5.0.7",
- "redux": "^4.0.0",
- "redux-devtools-extension": "^2.13.5",
- "rollbar": "^2.5.0",
- "styled-components": "^4.0.2",
- "ts-optchain": "^0.1.1"
- },
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@static/discharge": "https://github.com/0xProject/discharge.git",
- "@types/enzyme": "^3.1.14",
- "@types/enzyme-adapter-react-16": "^1.0.3",
- "@types/jest": "^23.3.5",
- "@types/lodash": "^4.14.116",
- "@types/node": "*",
- "@types/react": "^16.4.16",
- "@types/react-dom": "^16.0.8",
- "@types/react-redux": "^6.0.9",
- "@types/redux": "^3.6.0",
- "@types/styled-components": "4.0.1",
- "awesome-typescript-loader": "^5.2.1",
- "dotenv-cli": "^1.4.0",
- "enzyme": "^3.6.0",
- "enzyme-adapter-react-16": "^1.5.0",
- "ip": "^1.1.5",
- "jest": "^23.6.0",
- "make-promises-safe": "^1.1.0",
- "npm-run-all": "^4.1.2",
- "nyc": "^11.0.1",
- "rollbar-sourcemap-webpack-plugin": "^2.4.0",
- "shx": "^0.2.2",
- "source-map-loader": "^0.2.4",
- "svg-react-loader": "^0.4.6",
- "ts-jest": "^23.10.3",
- "tslint": "5.11.0",
- "typedoc": "0.13.0",
- "typescript": "3.0.1",
- "webpack": "^4.20.2",
- "webpack-cli": "^3.1.1",
- "webpack-dev-server": "^3.1.9"
- },
- "publishConfig": {
- "access": "private"
- }
-}
diff --git a/packages/instant/public/external.css b/packages/instant/public/external.css
deleted file mode 100644
index 21278577e..000000000
--- a/packages/instant/public/external.css
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- CSS file meant to represent an external (integrators) stylesheet and
- help ensure that instant looks consistent across environments.
-*/
-
-button {
- font-size: 50px;
- height: 200px;
- background-color: red;
-}
-
-input {
- padding: 100px;
- font-size: 50px;
- height: 100px;
-}
-
-input::-webkit-input-placeholder {
- color: #b4b4b4 !important;
-}
-
-div {
- padding: 3px;
-}
-
-p {
- background-color: green;
- margin: 10px;
-}
diff --git a/packages/instant/public/index.html b/packages/instant/public/index.html
deleted file mode 100644
index d10618c58..000000000
--- a/packages/instant/public/index.html
+++ /dev/null
@@ -1,207 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <title>0x Instant Dev Environment</title>
- <link rel="stylesheet" href="/external.css" />
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.2/css/bulma.min.css" />
- <script type="text/javascript" src="/instant.js" charset="utf-8"></script>
- <script type="text/javascript" src="https://unpkg.com/jsuri@1.3.1/Uri.js" charset="utf-8"></script>
- <script type="text/javascript" src="https://unpkg.com/bignumber.js@4.1.0/bignumber.js" charset="utf-8"></script>
- <style>
- .flex-center {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 100%;
- width: 100%;
- }
-
- .flex-center--column {
- flex-direction: column;
- }
-
- .button {
- margin: 10px;
- }
-
- body {
- margin: 0;
- height: 100vh;
- background-color: rgba(0, 0, 0, 0.2);
- }
- </style>
- </head>
-
- <body>
- <div class="flex-center flex-center--column">
- <div><button class="button is-large" onClick="renderWithUrlDefaults()">Open</button></div>
- <div>
- <button
- class="button is-danger"
- onClick="renderWithAssetData('0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862')"
- >
- Buy REP
- </button>
- <button
- class="button is-black"
- onClick="renderWithAssetData('0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498')"
- >
- Buy ZRX
- </button>
- <button
- class="button is-info"
- onClick="renderWithAssetData('0xf47261b00000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96')"
- >
- Buy GNO
- </button>
- </div>
- </div>
- <div id="zeroExInstantContainer"></div>
- <script>
- // Simulate history
- window.history.pushState({ page: 1 }, '0x Instant');
- window.history.pushState({ page: 2 }, '0x Instant');
- window.history.pushState({ page: 3 }, '0x Instant');
- window.onpopstate = () => console.log("Integrator's onpopstate called");
-
- const removeUndefined = obj => {
- for (let k in obj) if (obj[k] === undefined) delete obj[k];
- return obj;
- };
- BigNumber.config({
- EXPONENTIAL_AT: 1000,
- DECIMAL_PLACES: 78,
- });
- const providedOrders = [
- // Order selling REP
- {
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerFee: new BigNumber('0'),
- takerFee: new BigNumber('0'),
- makerAssetAmount: new BigNumber('200000000000000000000'),
- takerAssetAmount: new BigNumber('10000000000000000000'),
- makerAssetData: '0xf47261b00000000000000000000000008cb3971b8eb709c14616bd556ff6683019e90d9c',
- takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
- expirationTimeSeconds: new BigNumber('1601535600'),
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- salt: new BigNumber('3101985707338942582579795423923841749956600670712030922928319824580764688653'),
- signature:
- '0x1bd4d5686fea801fe33c68c4944356085e7e6cb553eb7073160abd815609f714e85fb47f44b7ffd0a2a1321ac40d72d55163869d0a50fdb5a402132150fe33a08403',
- exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
- },
- // Order selling ZRX
- {
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerFee: new BigNumber('0'),
- takerFee: new BigNumber('0'),
- makerAssetAmount: new BigNumber('300000000000000000000'),
- takerAssetAmount: new BigNumber('31000000000000000000'),
- makerAssetData: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
- takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
- expirationTimeSeconds: new BigNumber('2524636800'),
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- salt: new BigNumber(
- '64592004666704945574675477805199411288137454783320798602050822322450089238268',
- ),
- signature:
- '0x1c13cacddca8d7d8248e91f412377e68f8f1f9891a59a6c1b2eea9f7b33558c30c4fb86a448e08ab7def40a28fb3a3062dcb33bb3c45302447fce5c4288b7c7f5b03',
- exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
- },
- // Order selling GNT
- {
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerFee: new BigNumber('0'),
- takerFee: new BigNumber('0'),
- makerAssetAmount: new BigNumber('250000000000000000000'),
- takerAssetAmount: new BigNumber('10000000000000000000'),
- makerAssetData: '0xf47261b000000000000000000000000031fb614e223706f15d0d3c5f4b08bdf0d5c78623',
- takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
- expirationTimeSeconds: new BigNumber('1601535600'),
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- salt: new BigNumber(
- '40204378562212615907903051460421336779451270522691667164301816101569427926606',
- ),
- signature:
- '0x1c788bf4b93769da1e8f195f52f0f59b4a298ac6da30cf6d05a87ed4be5ee974f61352ed1bc6a0844d0962b8c894c9ca08e452431255958a4e98dd93cbe1fbc73803',
- exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
- },
- // Order selling MKR
- {
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAddress: '0x34a745008a643eebc58920eaa29fb1165b4a288e',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerFee: new BigNumber('0'),
- takerFee: new BigNumber('0'),
- makerAssetAmount: new BigNumber('200000000000000000000'),
- takerAssetAmount: new BigNumber('5000000000000000000'),
- makerAssetData: '0xf47261b00000000000000000000000007b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
- takerAssetData: '0xf47261b0000000000000000000000000d0a1e359811322d97991e03f863a0c30c2cf029c',
- expirationTimeSeconds: new BigNumber('1601535600'),
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- salt: new BigNumber(
- '71338269924068280039932133924198049371838034090153601678083172009862985793828',
- ),
- signature:
- '0x1bb3151d57ee1e8fa697767ce83ee4ba77d1ceb8cc1e79c7d77126b3687517704c50c6b3d9cb42c7e7d4478d574b297dfbd1626c5c18a7bc9c2a792c4c07f0797c03',
- exchangeAddress: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
- },
- ];
- const getRenderOptionsOverridesFromUrl = () => {
- const queryParams = new Uri(window.location.search);
- const orderSourceOverride = queryParams.getQueryParamValue('orderSource');
- const availableAssetDatasString = queryParams.getQueryParamValue('availableAssetDatas');
- const feeRecipientOverride = queryParams.getQueryParamValue('feeRecipient');
- const feePercentageOverride = +queryParams.getQueryParamValue('feePercentage');
- let affiliateInfoOverride;
- if (feeRecipientOverride !== undefined && feePercentageOverride !== undefined) {
- affiliateInfoOverride = {
- feeRecipient: feeRecipientOverride,
- feePercentage: feePercentageOverride,
- };
- }
- const renderOptionsOverrides = {
- orderSource: orderSourceOverride === 'provided' ? providedOrders : orderSourceOverride,
- networkId: +queryParams.getQueryParamValue('networkId') || undefined,
- defaultAssetBuyAmount: +queryParams.getQueryParamValue('defaultAssetBuyAmount') || undefined,
- availableAssetDatas: availableAssetDatasString ? JSON.parse(availableAssetDatasString) : undefined,
- defaultSelectedAssetData: queryParams.getQueryParamValue('defaultSelectedAssetData'),
- affiliateInfo: affiliateInfoOverride,
- shouldDisablePushToHistory: !!queryParams.getQueryParamValue('shouldDisablePushToHistory'),
- walletDisplayName: queryParams.getQueryParamValue('walletDisplayName') || undefined,
- };
- return renderOptionsOverrides;
- };
- const render = renderOptionsOverrides => {
- const renderOptionsDefaults = {
- orderSource: 'https://api.radarrelay.com/0x/v2/',
- onClose: () => {
- console.log('0x Instant Closed');
- },
- };
- const renderOptions = Object.assign({}, renderOptionsDefaults, removeUndefined(renderOptionsOverrides));
- zeroExInstant.render(renderOptions);
- };
- const renderWithUrlDefaults = (renderOptions = {}) => {
- const finalOptions = {
- ...getRenderOptionsOverridesFromUrl(),
- ...renderOptions,
- };
- render(finalOptions);
- };
- renderWithUrlDefaults();
- const renderWithAssetData = assetData => {
- renderWithUrlDefaults({
- defaultSelectedAssetData: assetData,
- });
- };
- </script>
- </body>
-</html>
diff --git a/packages/instant/src/assets/icons/ae.svg b/packages/instant/src/assets/icons/ae.svg
deleted file mode 100644
index 592400d1a..000000000
--- a/packages/instant/src/assets/icons/ae.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M22.7499 13.7657H17.0782V12.215H21.1376C20.7961 10.7612 19.5062 9.6757 17.9887 9.6757C16.6799 9.6757 15.5038 10.4704 14.9916 11.711L14.6692 12.3506L13.588 11.1101C14.3467 9.28802 16.0729 8.125 17.9887 8.125C20.6064 8.125 22.7499 10.3154 22.7499 12.9903V13.7657V13.7657Z" fill="white"/>
-<path d="M17.9888 17.8556C15.8453 17.8556 14.6882 16.5375 13.7777 15.3164L13.1707 14.5022C12.2792 13.3004 11.3497 12.0405 10.4202 10.8193C9.88911 10.1215 8.95963 9.6757 8.01119 9.6757C6.22811 9.6757 4.76751 11.1682 4.76751 12.9903C4.76751 14.8124 6.22811 16.3049 8.01119 16.3049C9.62354 16.3049 10.7806 14.793 11.2169 14.1339L11.4446 13.6881L12.4689 15.0062C11.2738 16.8283 9.64251 17.875 7.99222 17.875C5.39348 17.8556 3.25 15.6846 3.25 12.9903C3.25 10.296 5.39348 8.125 8.01119 8.125C9.45282 8.125 10.7996 8.78405 11.6153 9.86953C12.5447 11.0907 13.4742 12.3506 14.3658 13.5718L14.9728 14.3859C15.8833 15.6071 16.661 16.3049 17.9698 16.3049C19.2218 16.3049 20.1892 15.7428 20.7203 14.5992L22.4275 14.6573L22.2758 15.0644C21.517 16.7701 19.8288 17.8556 17.9888 17.8556Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/agi.svg b/packages/instant/src/assets/icons/agi.svg
deleted file mode 100644
index 9ed9784a4..000000000
--- a/packages/instant/src/assets/icons/agi.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M12.325 5C10.8394 6.11774 9.74739 8.04279 10.0509 9.9134C10.6651 13.7056 16.5341 13.6813 16.6503 17.6773C16.7037 19.5213 15.62 20.7213 14.413 22" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M14.1626 5C14.1626 5 18.2507 7.50998 15.551 12.0307" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M12.311 21.9988C12.311 21.9988 8.22279 19.4888 10.9225 14.9681" stroke="white" stroke-width="1.5" stroke-miterlimit="10" stroke-linecap="round"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/ant.svg b/packages/instant/src/assets/icons/ant.svg
deleted file mode 100644
index ed7e1491a..000000000
--- a/packages/instant/src/assets/icons/ant.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M22.7939 9.45381C18.9889 6.11086 14.2089 4.40315 13.2906 4.09626L12.9929 4L12.7017 4.09512C11.7813 4.40315 6.99477 6.11312 3.18976 9.4606L3 9.62707L3.04689 9.89999C3.12542 10.3439 3.58127 12.6858 4.85288 15.2847C5.66972 16.9505 6.66868 18.4114 7.82251 19.6287C9.22826 21.1077 10.8696 22.205 12.7028 22.8902L13.0005 23L13.1936 22.9219L13.2961 22.8845C15.1184 22.2039 16.7587 21.1066 18.1742 19.6231C19.3215 18.4193 20.3205 16.9573 21.1449 15.2791C22.4242 12.6711 22.904 10.2544 22.9531 9.87734H22.9542L23 9.60782L22.7939 9.45381ZM14.6004 9.48891C15.6223 9.48212 16.546 9.73352 17.2211 10.1582C17.1992 10.1514 16.8448 10.0347 16.4849 9.98492C16.2984 10.1842 16.3964 10.0845 16.151 10.2986C15.9839 10.4444 15.963 10.46 15.963 10.46C14.8778 10.2222 14.6004 9.48891 14.6004 9.48891ZM20.3619 14.8691C20.0151 15.5769 19.6356 16.2416 19.2266 16.8633C19.0467 17.1374 18.8613 17.4012 18.6704 17.6572C17.3781 17.5609 16.7118 17.1363 16.3704 16.7025C15.9636 16.1873 16.0138 15.6618 16.0138 15.6618C16.0138 15.5905 16.0138 15.5203 16.0258 15.4489C16.0258 15.4489 16.0323 15.3866 16.052 15.2881C16.0803 15.1534 16.1359 14.9507 16.2417 14.7479C16.4217 14.3992 16.7499 14.0504 17.3356 14.0458H17.3465C17.5013 14.039 17.6562 14.0719 17.7871 14.1489C18.4065 14.4965 18.0041 15.1466 18.0041 15.1466C18.051 15.1386 18.0979 15.1284 18.1459 15.1149C18.8907 14.9065 19.7305 14.0221 19.5854 12.5397C19.5527 12.2034 19.4436 11.9021 19.2931 11.6349C18.9136 10.9611 18.2669 10.5126 17.8983 10.2986C17.7304 10.2012 17.6202 10.1514 17.6202 10.1514C17.6387 10.0314 17.6453 9.93736 17.6453 9.86602C17.6453 9.85243 17.6453 9.83997 17.6442 9.82751C17.6409 9.71314 17.6202 9.66897 17.6202 9.66897C13.777 7.25462 10.7823 7.77667 10.7823 7.77667L11.5261 8.54899C11.5228 8.54899 11.5206 8.54786 11.5174 8.54786C11.4454 8.5422 11.368 8.5422 11.2971 8.5422C10.2447 8.58183 9.26425 8.9159 8.42669 9.47193C6.78101 10.5625 5.68717 12.5023 5.68717 14.7151C5.68717 14.8193 5.69044 14.9189 5.6948 15.0152C5.67299 14.971 5.65118 14.9269 5.62828 14.8816C5.51377 14.6494 5.40689 14.4184 5.30547 14.1931C4.54643 12.4865 4.16037 10.9871 3.99351 10.2182C7.76471 7.07569 12.3538 5.49368 12.9951 5.28645C13.175 5.3442 13.6625 5.50954 14.3539 5.78698C15.1392 6.10067 16.1872 6.5593 17.3476 7.16629C18.8209 7.93748 20.4742 8.94988 21.9967 10.2148C21.8069 11.0823 21.3358 12.884 20.3619 14.8691ZM22.6172 10.3111C22.6216 10.2929 22.6248 10.2748 22.6292 10.2578C22.6336 10.2612 22.6368 10.2646 22.6412 10.2692L22.6717 10.2952L22.6172 10.3111Z" fill="white"/>
-<path d="M22.672 10.2941L22.6164 10.311C22.6208 10.2929 22.6241 10.2748 22.6284 10.2578C22.6328 10.2612 22.6361 10.2646 22.6404 10.2691L22.672 10.2941Z" fill="white"/>
-<path d="M22.641 10.268C22.6366 10.2646 22.6333 10.2612 22.629 10.2567C22.6257 10.2736 22.6213 10.2918 22.617 10.3099L22.6726 10.2929L22.641 10.268Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/ast.svg b/packages/instant/src/assets/icons/ast.svg
deleted file mode 100644
index 8136fb688..000000000
--- a/packages/instant/src/assets/icons/ast.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13.5404 20.9375C13.4799 20.9375 13.3589 20.8844 13.2983 20.8844L11.483 19.2906C11.4225 19.2375 11.3619 19.1312 11.4225 19.025C11.483 18.8656 11.5435 18.8125 11.6645 18.8125H12.0276C13.2378 18.7594 14.4481 18.4406 15.5373 17.9094C15.8399 17.75 16.7476 17.2719 16.7476 17.2719C16.8081 17.2188 16.8686 17.2188 16.9291 17.2188C16.9896 17.2188 17.1106 17.2719 17.1712 17.325C17.2922 17.4312 17.2922 17.5375 17.1712 17.6437C16.9291 17.9625 16.6265 18.2813 16.2634 18.6L13.7219 20.8844C13.6614 20.8844 13.6009 20.9375 13.5404 20.9375Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M9.56975 16.2045C10.636 16.5909 11.8546 16.7455 12.9971 16.7455C13.911 16.7455 14.825 16.5909 15.6628 16.3591C16.9575 16.05 18.1761 15.5091 19.3185 14.7364C19.5582 14.5743 19.7429 14.4225 19.9518 14.2507C19.9927 14.2172 20.0345 14.1828 20.0778 14.1475C20.1218 14.1116 20.1642 14.0774 20.2057 14.0439C20.3315 13.9426 20.4492 13.8477 20.5776 13.7318L20.8418 13.5C20.918 13.4227 20.9733 13.3464 20.9941 13.1909C21.0106 13.0678 20.9941 12.9591 20.9179 12.8818L13.3017 5.07727C13.2636 5.07727 13.2065 5.05796 13.1494 5.03865C13.0923 5.01933 13.0352 5 12.9971 5C12.9209 5 12.7686 5.07727 12.6924 5.15455L5.07616 12.9591C5 13.0364 5 13.1909 5 13.2682C5 13.3454 5.07605 13.4226 5.15215 13.4998L5.15232 13.5L5.38082 13.7318L5.6093 13.9636C5.83779 14.1955 6.14244 14.4273 6.37093 14.5818C7.36104 15.2773 8.42731 15.8182 9.56975 16.2045ZM14.444 14.4272C14.5046 14.4878 14.5618 14.4878 14.6379 14.4878C15.7804 14.2559 16.7288 13.8863 17.7189 13.2681L17.7951 13.1909C17.8713 13.1136 17.9474 12.9591 17.9474 12.8818C17.9474 12.8045 17.9004 12.7264 17.8243 12.6491L17.7189 12.5727C16.348 11.8 14.7486 11.3363 13.1492 11.3363C11.7783 11.3363 10.4074 11.6454 9.18874 12.1863L8.88409 12.3409C8.78592 12.3835 8.73177 12.5727 8.73177 12.7272C8.73177 12.8818 8.88409 12.9591 9.03642 12.9591H9.41723C11.169 12.9591 12.9207 13.5 14.444 14.4272Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/bat.svg b/packages/instant/src/assets/icons/bat.svg
deleted file mode 100644
index 9b69ddf9d..000000000
--- a/packages/instant/src/assets/icons/bat.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13 4L5 18M13 4L21 18M13 4V9.59695M5 18H21M5 18L9.96552 15.1024M21 18L16.0345 15.1024M13 9.59695L9.96552 15.1024M13 9.59695L16.0345 15.1024M9.96552 15.1024H16.0345" stroke="white" stroke-linejoin="round"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/cvc.svg b/packages/instant/src/assets/icons/cvc.svg
deleted file mode 100644
index bddc90e16..000000000
--- a/packages/instant/src/assets/icons/cvc.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M15.2594 11.7495C15.2594 12.6029 14.7567 13.3438 14.0266 13.6875V16.2004H12.1715V13.6994C11.4294 13.3556 10.9148 12.6148 10.9148 11.7495C10.9148 10.5582 11.8902 9.59806 13.0871 9.59806C14.2839 9.59214 15.2594 10.5582 15.2594 11.7495Z" fill="white"/>
-<path d="M19.6575 14.7602C18.8736 17.6288 16.2285 19.7446 13.0868 19.7446C9.33464 19.7446 6.28266 16.722 6.28266 13C6.28266 9.27802 9.33464 6.26131 13.0868 6.26131C16.1926 6.26131 18.8257 8.33567 19.6336 11.1568H21.9195C21.0578 7.10884 17.4254 4.0625 13.0868 4.0625C8.11385 4.0625 4.0625 8.07489 4.0625 13C4.0625 17.931 8.11385 21.9375 13.0868 21.9375C17.4553 21.9375 21.1117 18.8437 21.9375 14.7602H19.6575Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/dai.svg b/packages/instant/src/assets/icons/dai.svg
deleted file mode 100644
index 901d522ca..000000000
--- a/packages/instant/src/assets/icons/dai.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="13.0001" y="6.41421" width="9.3138" height="9.3138" transform="rotate(45 13.0001 6.41421)" stroke="white" stroke-width="2"/>
-<rect x="13.0001" y="10.3334" width="3.77125" height="3.77125" transform="rotate(45 13.0001 10.3334)" fill="white"/>
-<path d="M21.0001 13.0001L13.0001 21.0001L5 13.0001H21.0001Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/dgd.svg b/packages/instant/src/assets/icons/dgd.svg
deleted file mode 100644
index 371f89584..000000000
--- a/packages/instant/src/assets/icons/dgd.svg
+++ /dev/null
@@ -1,5 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M9.75 10.5H5V9H9.75V10.5Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M12.5 9V16H5V11.6552H11V9H12.5ZM11 14.5V13.1552H6.5V14.5H11Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M21 9H13.5V16H21V11.6552H16.25V13.1552H19.5V14.5H15V10.5H21V9Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/dgx.svg b/packages/instant/src/assets/icons/dgx.svg
deleted file mode 100644
index 2e4a90a5d..000000000
--- a/packages/instant/src/assets/icons/dgx.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13 5L21 13.0578L19.1416 14.9029L13 8.71696L6.85844 14.9029L5 13.0578L13 5Z" fill="white"/>
-<path d="M12.9489 10.9281L17.9487 15.9641L12.9489 21L7.94915 15.9641L12.9489 10.9281Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/dnt.svg b/packages/instant/src/assets/icons/dnt.svg
deleted file mode 100644
index 7d5459343..000000000
--- a/packages/instant/src/assets/icons/dnt.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M21.7258 15.5161C21.4223 16.9902 20.8862 18.3613 19.9804 19.5672C18.6743 21.3155 16.9101 22.2664 14.8021 22.6148C13.9495 22.7573 13.0934 22.7813 12.2337 22.7142C12.125 22.7046 12.0058 22.7142 11.916 22.628C11.7991 22.7178 11.6645 22.6879 11.5405 22.6675C10.4789 22.4879 9.44911 22.1933 8.47841 21.7167C7.08967 21.0281 5.95718 20.0366 5.13645 18.7014C5.05497 18.5661 4.93334 18.4332 4.93806 18.2536C4.47397 17.2932 4.21299 16.2765 4.10907 15.2167C3.85281 12.5427 4.67 10.1825 6.16974 8.02577C6.75783 7.18154 7.4463 6.42593 8.18909 5.71701C9.94627 4.04411 11.9739 3.69923 14.2259 4.41534C14.5305 4.51473 14.8305 4.63807 15.1281 4.75902C15.2037 4.78895 15.304 4.79494 15.3335 4.90152C15.0301 5.12665 14.9391 5.44518 14.9391 5.80323C14.9391 7.24022 14.9391 8.67482 14.9368 10.1106C14.9368 10.1825 14.9793 10.2687 14.8919 10.3298C14.0074 9.85554 13.0816 9.64359 12.0766 9.76932C9.49989 10.0903 7.66595 12.605 8.13949 15.1892C8.71695 18.323 12.0731 19.9636 14.8376 18.4559C14.9875 18.3733 15.056 18.3733 15.1635 18.523C15.5615 19.0738 16.2641 19.1852 16.8026 18.7912C17.1628 18.5266 17.2998 18.1542 17.2998 17.7123C17.2974 13.8192 17.2998 9.9238 17.3021 6.02836C18.5987 6.92528 19.7088 8.01859 20.6582 9.28194C21.1873 9.98727 21.5215 10.7764 21.7199 11.6314C21.8332 11.8829 21.8403 12.1619 21.8734 12.4266C22.0009 13.4624 21.9313 14.4934 21.7258 15.5161Z" fill="white"/>
-<path d="M14.5209 15.0703C14.3237 16.0858 13.5715 16.6031 12.5724 16.3828C11.682 16.1864 11.0042 15.7026 10.7704 14.7614C10.4563 13.498 11.5285 11.9197 13.0991 12.1999C14.0722 12.3736 14.528 12.9879 14.5788 14.1243C14.5823 14.2033 14.5788 14.2824 14.5788 14.3614C14.5882 14.5997 14.5658 14.8368 14.5209 15.0703Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/fun.svg b/packages/instant/src/assets/icons/fun.svg
deleted file mode 100644
index bb4347df2..000000000
--- a/packages/instant/src/assets/icons/fun.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M25.6631 15.9533L23.4018 15.428C23.5825 14.6503 23.6786 13.8378 23.6786 13C23.6786 12.1622 23.5825 11.3497 23.4018 10.572L25.6631 10.0467C25.8835 10.9955 26 11.9841 26 13C26 14.0159 25.8835 15.0045 25.6631 15.9533ZM24.0412 6.13431L22.071 7.36203C21.2049 5.97222 20.0278 4.79506 18.638 3.92901L19.8657 1.9588C21.5565 3.01239 22.9876 4.44354 24.0412 6.13431ZM15.9533 0.336931L15.428 2.59815C14.6503 2.41747 13.8378 2.32143 13 2.32143C12.1622 2.32143 11.3497 2.41747 10.572 2.59815L10.0467 0.336932C10.9955 0.116523 11.9841 0 13 0C14.0159 0 15.0045 0.116523 15.9533 0.336931ZM6.13431 1.9588L7.36203 3.92901C5.97222 4.79506 4.79506 5.97222 3.92901 7.36203L1.9588 6.13431C3.01239 4.44354 4.44354 3.01239 6.13431 1.9588ZM0.336932 10.0467C0.116523 10.9955 0 11.9841 0 13C0 14.0159 0.116523 15.0045 0.336931 15.9533L2.59815 15.428C2.41747 14.6503 2.32143 13.8378 2.32143 13C2.32143 12.1622 2.41747 11.3497 2.59815 10.572L0.336932 10.0467ZM1.9588 19.8657L3.92901 18.638C4.79506 20.0278 5.97222 21.2049 7.36203 22.071L6.13431 24.0412C4.44354 22.9876 3.01239 21.5565 1.9588 19.8657ZM10.0467 25.6631C10.9955 25.8835 11.9841 26 13 26C14.0159 26 15.0045 25.8835 15.9533 25.6631L15.428 23.4018C14.6503 23.5825 13.8378 23.6786 13 23.6786C12.1622 23.6786 11.3497 23.5825 10.572 23.4018L10.0467 25.6631ZM19.8657 24.0412C21.5565 22.9876 22.9876 21.5565 24.0412 19.8657L22.071 18.638C21.2049 20.0278 20.0278 21.2049 18.638 22.071L19.8657 24.0412Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M18.8446 17.7331L17.9417 17.0037C18.1478 16.7486 18.3371 16.4737 18.507 16.1794C18.6769 15.8852 18.8203 15.5838 18.9382 15.2777L20.0213 15.695C19.8818 16.0571 19.7124 16.4131 19.5122 16.7598C19.3121 17.1065 19.0885 17.4312 18.8446 17.7331ZM20.4291 14.1765L19.2826 13.9952C19.3876 13.3314 19.385 12.66 19.281 12.0059L20.4273 11.8237C20.5502 12.5964 20.5534 13.3905 20.4291 14.1765ZM20.0204 10.305L18.9365 10.7204C18.6996 10.1019 18.3661 9.51917 17.9433 8.99682L18.8455 8.26657C19.3462 8.88513 19.7405 9.57446 20.0204 10.305ZM17.7331 7.15543L17.0038 8.05835C16.7486 7.85225 16.4737 7.66288 16.1795 7.49301C15.8852 7.32313 15.5838 7.17973 15.2777 7.06183L15.695 5.97871C16.0572 6.11822 16.4132 6.28764 16.7598 6.4878C17.1065 6.68796 17.4312 6.91155 17.7331 7.15543ZM14.1765 5.57091L13.9952 6.71738C13.3315 6.6124 12.6601 6.615 12.006 6.719L11.8237 5.57268C12.5964 5.44983 13.3905 5.4466 14.1765 5.57091ZM10.3051 5.9796L10.7204 7.06347C10.102 7.30044 9.51921 7.63389 8.99686 8.05669L8.2666 7.15447C8.88516 6.65381 9.57449 6.25955 10.3051 5.9796ZM7.15546 8.26687C6.91159 8.56877 6.68799 8.89349 6.48783 9.24017C6.28768 9.58686 6.11826 9.94285 5.97874 10.305L7.06186 10.7223C7.17977 10.4162 7.32316 10.1148 7.49304 9.82053C7.66292 9.52629 7.85229 9.25138 8.05838 8.99625L7.15546 8.26687ZM5.57095 11.8235L6.71742 12.0048C6.61244 12.6686 6.61504 13.34 6.71903 13.994L5.57272 14.1763C5.44987 13.4036 5.44664 12.6095 5.57095 11.8235ZM5.97964 15.6949L7.06351 15.2796C7.30048 15.8981 7.63393 16.4808 8.05672 17.0032L7.15451 17.7334C6.65384 17.1149 6.25958 16.4255 5.97964 15.6949ZM8.26691 18.8446L8.99629 17.9416C9.25142 18.1477 9.52633 18.3371 9.82057 18.507C10.1148 18.6769 10.4163 18.8202 10.7223 18.9381L10.305 20.0213C9.94289 19.8818 9.58689 19.7123 9.24021 19.5122C8.89353 19.312 8.56881 19.0884 8.26691 18.8446ZM11.8235 20.4291L12.0048 19.2826C12.6686 19.3876 13.34 19.385 13.9941 19.281L14.1763 20.4273C13.4036 20.5501 12.6095 20.5534 11.8235 20.4291ZM15.695 20.0204L15.2797 18.9365C15.8981 18.6995 16.4808 18.3661 17.0032 17.9433L17.7334 18.8455C17.1149 19.3462 16.4256 19.7404 15.695 20.0204Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/gno.svg b/packages/instant/src/assets/icons/gno.svg
deleted file mode 100644
index ebf6290cf..000000000
--- a/packages/instant/src/assets/icons/gno.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M21.3571 7.40046L20.5979 8.165C21.2029 9.12068 21.3926 10.3213 20.9775 11.4701C20.2875 13.4173 18.1463 14.4426 16.195 13.7478C15.9182 13.6442 15.6592 13.5208 15.4358 13.3655L13 15.8184L10.8747 13.6602C9.89011 14.3212 8.62874 14.5123 7.43855 14.0942C5.43579 13.3635 4.39981 11.1555 5.12539 9.15453C5.2282 8.84194 5.38439 8.5632 5.55639 8.30238L4.64101 7.38254L4.46901 7.67721C3.51804 9.24413 3.00005 11.052 3.00005 12.9135C2.98226 18.4605 7.47216 23 12.9822 23H13C18.5081 23 22.9822 18.4963 23 12.9474C23 11.1037 22.4998 9.29589 21.5488 7.71304L21.3571 7.40046Z" fill="white"/>
-<path d="M6.67956 9.43533C6.42056 9.78376 6.26437 10.2178 6.26437 10.6877C6.26437 11.8186 7.17975 12.7404 8.30272 12.7404C8.76931 12.7404 9.20031 12.5831 9.54629 12.3064L6.67956 9.43533Z" fill="white"/>
-<path d="M16.5982 12.2518C16.9285 12.4786 17.3105 12.6 17.7463 12.6C18.8765 12.6 19.7978 11.6786 19.7978 10.5483C19.7978 10.1304 19.6765 9.73037 19.4496 9.40002L16.5982 12.2518Z" fill="white"/>
-<path d="M13.0465 14.2L5.39969 6.4646L5.70373 6.14176C7.59026 4.1272 10.1673 3 12.9348 3H12.9513C15.7518 3 18.4387 4.20837 20.3106 6.3041L20.5981 6.62695L13.0465 14.2ZM6.647 6.4646L13.0465 12.9271L19.3655 6.59374C17.6713 4.88542 15.3671 3.90213 12.9659 3.90213H12.9495C10.5666 3.90213 8.34304 4.80425 6.647 6.4646Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/gnt.svg b/packages/instant/src/assets/icons/gnt.svg
deleted file mode 100644
index 7315ce459..000000000
--- a/packages/instant/src/assets/icons/gnt.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M16.1123 6.80392L18 5.08032L17.0723 4L15.1809 5.72692C14.5328 5.20821 13.7184 4.89855 12.8343 4.89855C10.7151 4.89855 9 6.67359 9 8.85971C9 10.7993 10.3501 12.4153 12.1346 12.7551L12.1346 14.1434C10.3501 14.4833 9 16.0993 9 18.0388C9 20.225 10.7151 22 12.8343 22C14.9534 22 16.6685 20.225 16.6685 18.0388C16.6685 16.0993 15.3185 14.4833 13.534 14.1434V12.7551C15.3185 12.4153 16.6686 10.7993 16.6686 8.85971C16.6686 8.10751 16.4651 7.40334 16.1123 6.80392ZM12.8343 6.34151C11.491 6.34151 10.3994 7.46738 10.3994 8.85971C10.3994 10.252 11.491 11.3779 12.8343 11.3779C14.1775 11.3779 15.2692 10.252 15.2692 8.85971C15.2692 8.2138 15.035 7.62639 14.6488 7.18047C14.2018 6.66426 13.5548 6.34151 12.8343 6.34151ZM12.8343 15.5206C11.491 15.5206 10.3994 16.6465 10.3994 18.0388C10.3994 19.4312 11.491 20.557 12.8343 20.557C14.1775 20.557 15.2692 19.4312 15.2692 18.0388C15.2692 16.6465 14.1775 15.5206 12.8343 15.5206Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/knc.svg b/packages/instant/src/assets/icons/knc.svg
deleted file mode 100644
index 70d35bc2f..000000000
--- a/packages/instant/src/assets/icons/knc.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M12.4391 13L18.514 16.2448C18.7327 16.3582 19 16.2221 19 15.9952V10.0049C19 9.77795 18.7327 9.64181 18.514 9.75526L12.4391 13Z" fill="white"/>
-<path d="M18.4066 7.87359L14.4048 5.06338C14.2176 4.92849 13.9603 5.01841 13.9134 5.24323L12.4391 11.5156L18.3597 8.36819C18.5704 8.25578 18.5704 8.00848 18.4066 7.87359Z" fill="white"/>
-<path d="M14.4011 20.9357L18.3951 18.0966C18.582 17.9614 18.5586 17.7135 18.3718 17.6009L12.4391 14.4688L13.8872 20.778C13.934 20.9808 14.2142 21.0709 14.4011 20.9357Z" fill="white"/>
-<path d="M10.6638 12.9938L12.4279 6.3505C12.5093 6.08826 12.1293 5.89159 11.8579 6.06641L7.35281 8.84172C7.1357 8.99469 7 9.21322 7 9.4536V16.5339C7 16.7743 7.1357 16.9928 7.35281 17.1458L11.8579 19.943C12.1293 20.0959 12.4822 19.9211 12.4279 19.6589L10.6638 12.9938Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/link.svg b/packages/instant/src/assets/icons/link.svg
deleted file mode 100644
index 2fddf7ef1..000000000
--- a/packages/instant/src/assets/icons/link.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13 3L21 7.68346V17.3165L13 22L5 17.3165V7.68346L13 3ZM6.28 9.19243V16.5278L12.36 20.0872V12.5645L6.28 9.19243ZM13.64 12.5645V20.0872L19.72 16.5278V9.19243L13.64 12.5645ZM19.0191 8.06188L13 11.4002L6.9809 8.06188L13 4.53811L19.0191 8.06188Z" fill="white"/>
-<path d="M18.2282 13.1079V12.615C18.2282 11.9957 17.8033 11.7385 17.2759 12.0514L16.648 12.4222C15.8306 12.7915 15.6957 13.4916 15.6957 14.113V14.606C15.4529 14.7817 15.2645 15.1396 15.2645 15.4353V17.377C15.2645 17.6963 15.4843 17.8313 15.7543 17.6706L18.1654 16.2454C18.4396 16.0847 18.6593 15.6904 18.6593 15.371V13.4273C18.6614 13.1337 18.4751 12.9944 18.2282 13.1079ZM16.3173 13.7466C16.3173 13.5301 16.4659 13.2665 16.6501 13.1572L17.278 12.7865C17.46 12.6772 17.6107 12.7672 17.6107 12.9836V13.468L16.3194 14.2309V13.7466H16.3173Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4906 14.3533L7.25223 12.4824L7.56089 11.894L10.7993 13.7649L10.4906 14.3533Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M9.30744 15.2854L7.24664 14.0381L7.56639 13.4564L9.62719 14.7036L9.30744 15.2854Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/lpt.svg b/packages/instant/src/assets/icons/lpt.svg
deleted file mode 100644
index cbe4f2202..000000000
--- a/packages/instant/src/assets/icons/lpt.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="8" y="6" width="2.60007" height="2.72222" fill="white"/>
-<rect x="8" y="11.4445" width="2.60007" height="2.72222" fill="white"/>
-<rect x="8" y="17.2778" width="2.60007" height="2.72222" fill="white"/>
-<rect x="13.2002" y="14.1667" width="2.60007" height="2.72222" fill="white"/>
-<rect x="13.2002" y="8.72223" width="2.60007" height="2.72222" fill="white"/>
-<rect x="18.3999" y="11.4445" width="2.60007" height="2.72222" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/mana.svg b/packages/instant/src/assets/icons/mana.svg
deleted file mode 100644
index 45be622e4..000000000
--- a/packages/instant/src/assets/icons/mana.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.49637 17.2106C5.66831 17.0504 3.6051 17.0501 2.21785 17.0997L2.18216 16.1003C3.59491 16.0499 5.7017 16.0495 7.58364 16.2144C8.52311 16.2967 9.42302 16.4215 10.1582 16.6074C10.5258 16.7004 10.8652 16.8118 11.1529 16.9476C11.4351 17.0807 11.7032 17.2536 11.8904 17.4876C12.1548 17.8181 12.1951 18.1947 12.0685 18.544C11.9575 18.8502 11.7282 19.1116 11.5056 19.3215C11.2752 19.5389 11.0004 19.7477 10.7412 19.938C10.666 19.9932 10.5926 20.0465 10.5212 20.0984C10.3369 20.2322 10.1657 20.3566 10.0104 20.4795C9.8313 20.6213 9.71009 20.7335 9.63807 20.8195C9.70045 20.8513 9.8027 20.8944 9.9652 20.9413C10.3024 21.0386 10.8117 21.1286 11.5498 21.2025C13.7635 21.4238 15.3373 21.8324 16.3972 22.2626C16.9266 22.4775 17.3363 22.7012 17.6356 22.916C17.916 23.1172 18.1597 23.353 18.2642 23.6143L17.3358 23.9857C17.3364 23.9873 17.3359 23.9866 17.3338 23.9837C17.3216 23.9665 17.2559 23.8744 17.0525 23.7284C16.8328 23.5707 16.4971 23.3823 16.0212 23.1892C15.0705 22.8033 13.5943 22.4119 11.4503 22.1975C10.6883 22.1213 10.1101 22.0239 9.68794 21.9021C9.2949 21.7886 8.9238 21.6242 8.72365 21.329C8.60977 21.161 8.56362 20.9686 8.58639 20.7737C8.60754 20.5927 8.68431 20.4391 8.76413 20.3198C8.91883 20.0886 9.1609 19.8766 9.38966 19.6955C9.56253 19.5586 9.75948 19.4156 9.94983 19.2774C10.0177 19.2281 10.0847 19.1794 10.1494 19.1319C10.4059 18.9437 10.6374 18.7658 10.8194 18.5941C11.0093 18.415 11.0988 18.2849 11.1284 18.2032L11.1284 18.2031C11.1424 18.1646 11.1452 18.1569 11.1096 18.1123C11.0568 18.0464 10.9418 17.9537 10.7263 17.852C10.5164 17.753 10.2436 17.6605 9.91304 17.5769C9.25199 17.4097 8.4119 17.2908 7.49637 17.2106Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13 24C19.0751 24 24 19.0751 24 13C24 6.92487 19.0751 2 13 2C6.92487 2 2 6.92487 2 13C2 19.0751 6.92487 24 13 24ZM13 25C19.6274 25 25 19.6274 25 13C25 6.37258 19.6274 1 13 1C6.37258 1 1 6.37258 1 13C1 19.6274 6.37258 25 13 25Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M11 8C12.1046 8 13 7.10457 13 6C13 4.89543 12.1046 4 11 4C9.89543 4 9 4.89543 9 6C9 7.10457 9.89543 8 11 8ZM11 9C12.6569 9 14 7.65685 14 6C14 4.34315 12.6569 3 11 3C9.34315 3 8 4.34315 8 6C8 7.65685 9.34315 9 11 9Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19.3544 10.0971C19.3932 10.1466 19.4365 10.2061 19.484 10.2774C19.7893 10.7353 20.1742 11.2747 20.5255 11.7041C20.7 11.9173 20.8758 12.1154 21.0359 12.2644C21.1152 12.3383 21.2026 12.4114 21.2933 12.4689C21.369 12.5169 21.5161 12.6 21.7 12.6C21.8593 12.6 21.948 12.6024 22.0287 12.6226C22.0927 12.6386 22.1619 12.669 22.2464 12.7536L23.7114 14.2186L24.084 14.7774L24.916 14.2226L24.4886 13.5815L22.9536 12.0465C22.5427 11.6356 22.1032 11.6027 21.7954 11.6002C21.7757 11.5847 21.7497 11.5627 21.7173 11.5325C21.6055 11.4284 21.4625 11.2702 21.2995 11.0709C20.9758 10.6753 20.6107 10.1647 20.316 9.72267C20.151 9.47514 19.989 9.28275 19.8263 9.14716C19.6693 9.01633 19.4649 8.90002 19.225 8.90002C18.956 8.90002 18.7546 9.04494 18.6402 9.21642C18.6195 9.24747 18.6015 9.27935 18.586 9.31166C18.4752 9.29075 18.3533 9.2574 18.2581 9.22568L18.1 9.17298L17.9419 9.22568C17.7542 9.28825 17.4747 9.41143 17.2033 9.58944C16.9388 9.76293 16.6298 10.0223 16.4528 10.3764C16.404 10.4739 16.2853 10.643 16.101 10.8746C15.9414 11.075 15.7554 11.2948 15.5674 11.5168C15.5469 11.541 15.5263 11.5653 15.5058 11.5896C15.3014 11.8311 15.0953 12.0762 14.9402 12.2813C14.8986 12.3363 14.8582 12.3918 14.8209 12.4462C14.6897 12.3856 14.5305 12.3063 14.3486 12.2153L14.341 12.2115C14.0837 12.0829 13.7913 11.9366 13.5241 11.8228C13.3886 11.7651 13.2507 11.7119 13.12 11.6724C12.9957 11.6348 12.8473 11.6 12.7 11.6C12.4003 11.6 12.1295 11.7423 11.9357 11.868C11.7287 12.0023 11.527 12.1737 11.3553 12.3263C11.2877 12.3864 11.2265 12.442 11.1698 12.4933C11.0709 12.583 10.9858 12.6602 10.9047 12.7273C10.8738 12.7528 10.8485 12.7727 10.828 12.7879C10.8082 12.7835 10.7855 12.7778 10.7597 12.7708C10.6725 12.747 10.5738 12.7143 10.4581 12.6757L10.4514 12.6734C10.3437 12.6375 10.2201 12.5963 10.1034 12.5645C9.99107 12.5339 9.84438 12.5 9.7 12.5C9.60264 12.5 9.44615 12.5174 9.29251 12.5368C9.12592 12.5577 8.92301 12.5865 8.71141 12.618C8.45081 12.6567 8.17344 12.7002 7.92827 12.7397L6.75021 9.50002H4.34269L4.19313 9.70941C3.93832 10.0661 3.54237 10.6448 3.1784 11.2277C2.82473 11.7941 2.46725 12.4172 2.32566 12.8419C2.30699 12.8979 2.2892 12.9377 2.27458 12.9652C2.26708 12.9592 2.25993 12.9528 2.25355 12.9465L1.54645 13.6536C1.68989 13.797 1.98689 14.0164 2.36436 13.9942C2.82326 13.9672 3.12157 13.6165 3.27434 13.1581C3.37276 12.8629 3.66528 12.336 4.0266 11.7574C4.31329 11.2983 4.62201 10.8397 4.85912 10.5H6.04979L7.27216 13.8616L7.6822 13.7932C7.98028 13.7435 8.44228 13.669 8.8586 13.6071C9.06699 13.5761 9.26158 13.5486 9.41749 13.5289C9.49557 13.5191 9.5616 13.5115 9.61358 13.5065C9.63952 13.504 9.66035 13.5023 9.6764 13.5012C9.69349 13.5001 9.70038 13.5 9.7 13.5C9.69972 13.5 9.69976 13.5 9.7 13.5C9.70169 13.5001 9.71319 13.5008 9.73706 13.5051C9.76371 13.5098 9.79778 13.5177 9.84032 13.5293C9.9275 13.5531 10.0262 13.5858 10.1419 13.6244L10.1487 13.6266C10.1569 13.6294 10.1652 13.6321 10.1735 13.6349L9.55279 14.8764L10.4472 15.3236L11.2599 13.6982C11.2739 13.6904 11.2862 13.6832 11.2968 13.6768C11.383 13.6249 11.4675 13.5596 11.5422 13.4977C11.6399 13.4169 11.7547 13.3129 11.8657 13.2123C11.9186 13.1644 11.9707 13.1173 12.0197 13.0737C12.1855 12.9264 12.3401 12.7977 12.4799 12.707C12.5488 12.6623 12.6044 12.6333 12.6473 12.6163C12.6806 12.603 12.6975 12.6005 12.7008 12.6001C12.7041 12.6003 12.7144 12.6012 12.733 12.6047C12.7575 12.6094 12.7899 12.6173 12.8308 12.6296C12.9134 12.6546 13.0146 12.6927 13.1322 12.7428C13.3686 12.8435 13.6355 12.9768 13.9014 13.1097L13.919 13.1185C14.1676 13.2429 14.427 13.3726 14.6258 13.451C14.7176 13.4873 14.8503 13.5352 14.9809 13.5458C15.0399 13.5506 15.1837 13.5565 15.3295 13.4724C15.4868 13.3817 15.5667 13.2365 15.5914 13.0969C15.5929 13.0943 15.5945 13.0915 15.5963 13.0884C15.6234 13.0423 15.6697 12.9746 15.7379 12.8844C15.8734 12.7051 16.0611 12.4814 16.2692 12.2355C16.2898 12.2112 16.3105 12.1867 16.3314 12.162C16.5175 11.9423 16.7138 11.7105 16.8834 11.4973C17.0647 11.2695 17.246 11.0261 17.3472 10.8236C17.4102 10.6977 17.5512 10.5571 17.7517 10.4256C17.8805 10.3412 18.0123 10.2745 18.1191 10.2283C18.2692 10.2699 18.4485 10.3097 18.616 10.3254C18.7277 10.3358 18.8928 10.342 19.0508 10.2925C19.1347 10.2663 19.2496 10.2142 19.3459 10.1069C19.3487 10.1037 19.3516 10.1004 19.3544 10.0971Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M17 16.5C16.1407 16.5 15.5 17.1455 15.5 17.875C15.5 18.1442 15.5796 18.2392 15.652 18.294C15.7592 18.3752 15.9562 18.4423 16.2977 18.4749C16.5049 18.4948 16.7388 18.5 17 18.5C17.2612 18.5 17.4951 18.4948 17.7023 18.4749C18.0438 18.4423 18.2408 18.3752 18.348 18.294C18.4204 18.2392 18.5 18.1442 18.5 17.875C18.5 17.1455 17.8593 16.5 17 16.5ZM14.5 17.875C14.5 16.5334 15.6502 15.5 17 15.5C18.3498 15.5 19.5 16.5334 19.5 17.875C19.5 18.3927 19.3211 18.8115 18.9517 19.0912C18.6171 19.3446 18.1892 19.4329 17.7977 19.4704C17.5416 19.4949 17.2692 19.5 17 19.5C16.7308 19.5 16.4584 19.4949 16.2023 19.4704C15.8108 19.4329 15.3829 19.3446 15.0483 19.0912C14.6789 18.8115 14.5 18.3927 14.5 17.875Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M20.5 18.5C19.8585 18.5 19.5 18.9173 19.5 19.25C19.5 19.3192 19.5125 19.3478 19.516 19.3548C19.5185 19.3596 19.5226 19.3674 19.5418 19.3803C19.5975 19.4177 19.7245 19.4618 19.9799 19.4836C20.1319 19.4965 20.3046 19.5 20.5 19.5C20.6954 19.5 20.8681 19.4965 21.0201 19.4836C21.2755 19.4618 21.4025 19.4177 21.4582 19.3803C21.4774 19.3674 21.4815 19.3596 21.484 19.3548C21.4875 19.3478 21.5 19.3192 21.5 19.25C21.5 18.9173 21.1415 18.5 20.5 18.5ZM18.5 19.25C18.5 18.202 19.4847 17.5 20.5 17.5C21.5153 17.5 22.5 18.202 22.5 19.25C22.5 19.6602 22.335 19.9955 22.0166 20.2098C21.7409 20.3954 21.3993 20.4549 21.1049 20.48C20.9095 20.4966 20.7025 20.5 20.5 20.5C20.2975 20.5 20.0905 20.4966 19.8951 20.48C19.6007 20.4549 19.2591 20.3954 18.9834 20.2098C18.665 19.9955 18.5 19.6602 18.5 19.25Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/mkr.svg b/packages/instant/src/assets/icons/mkr.svg
deleted file mode 100644
index e09d47444..000000000
--- a/packages/instant/src/assets/icons/mkr.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19.7553 7.98947C20.5802 7.37761 21.75 7.96641 21.75 8.99342V17.6154C21.75 18.0296 21.4142 18.3654 21 18.3654C20.5858 18.3654 20.25 18.0296 20.25 17.6154V9.49013L15.5278 12.9929V18C15.5278 18.4142 15.192 18.75 14.7778 18.75C14.3636 18.75 14.0278 18.4142 14.0278 18V12.867C14.0278 12.4713 14.2153 12.0989 14.5331 11.8631L19.7553 7.98947Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M6.24471 7.98947C5.41985 7.37761 4.25001 7.96641 4.25001 8.99342V17.6154C4.25001 18.0296 4.58579 18.3654 5.00001 18.3654C5.41422 18.3654 5.75001 18.0296 5.75001 17.6154V9.49013L10.4722 12.9929V18C10.4722 18.4142 10.808 18.75 11.2222 18.75C11.6364 18.75 11.9722 18.4142 11.9722 18V12.867C11.9722 12.4713 11.7847 12.0989 11.4669 11.8631L6.24471 7.98947Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/mln.svg b/packages/instant/src/assets/icons/mln.svg
deleted file mode 100644
index a0b821c57..000000000
--- a/packages/instant/src/assets/icons/mln.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M12.6085 3.10634C12.8511 2.96455 13.1489 2.96455 13.3915 3.10634L20.6021 7.32038C20.8482 7.46417 21 7.73183 21 8.02174V16.6605C21 16.9353 20.8635 17.1912 20.6376 17.3399L15.6215 20.6409C15.2549 20.8822 14.7665 20.7736 14.5306 20.3984C14.2948 20.0233 14.4009 19.5235 14.7676 19.2822L19.4213 16.2197V9.41321L13.7894 12.7046V23C13.7894 23.4461 13.436 23.8077 13 23.8077C12.564 23.8077 12.2106 23.4461 12.2106 23V12.7046L6.57873 9.41321V16.2197L11.2324 19.2822C11.5991 19.5235 11.7052 20.0233 11.4694 20.3984C11.2335 20.7736 10.7451 20.8822 10.3785 20.6409L5.36237 17.3399C5.13652 17.1912 5 16.9353 5 16.6605V8.02174C5 7.73183 5.15184 7.46417 5.39787 7.32038L12.6085 3.10634ZM7.38094 8.02174L13 11.3056L18.6191 8.02174L13 4.73784L7.38094 8.02174Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M12.737 4.33268V3.80768H13.2632V4.33268H12.737ZM12.737 6.43268V5.38268H13.2632V6.43268H12.737ZM12.737 8.53268V7.48268H13.2632V8.53268H12.737ZM12.737 10.6327V9.58268H13.2632V10.6327H12.737ZM12.737 12.0604V11.6827H13.2632V12.0536L13.6037 12.2582L13.3371 12.7225L13.0061 12.5235L12.711 12.717L12.4271 12.2637L12.737 12.0604ZM15.2181 13.8533L14.2776 13.2879L14.5442 12.8236L15.4847 13.389L15.2181 13.8533ZM11.8489 13.2824L10.9867 13.8478L10.7028 13.3945L11.5649 12.8291L11.8489 13.2824ZM16.1586 14.4187L16.4252 13.9544L17.3657 14.5198L17.0992 14.984L16.1586 14.4187ZM10.1246 14.4132L9.26245 14.9786L8.97849 14.5252L9.84063 13.9599L10.1246 14.4132ZM18.9802 16.1148L18.0397 15.5494L18.3062 15.0852L19.2468 15.6505L18.9802 16.1148ZM8.40031 15.544L7.53817 16.1093L7.25421 15.656L8.11635 15.0906L8.40031 15.544ZM20.391 16.9629L19.9207 16.6802L20.1873 16.2159L20.6575 16.4986L20.391 16.9629ZM6.67603 16.6747L6.24496 16.9574L5.961 16.5041L6.39207 16.2214L6.67603 16.6747Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/omg.svg b/packages/instant/src/assets/icons/omg.svg
deleted file mode 100644
index a906509af..000000000
--- a/packages/instant/src/assets/icons/omg.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M9.41177 13.7682C9.91234 13.7682 10.3879 13.8687 10.8384 14.0697C11.2789 14.2607 11.6643 14.522 11.9947 14.8536C12.325 15.1853 12.5853 15.5722 12.7755 16.0144C12.9758 16.4667 13.0759 16.9441 13.0759 17.4466C13.0759 17.9592 12.9808 18.4365 12.7906 18.8788C12.5903 19.321 12.325 19.7104 11.9947 20.0471C11.6643 20.3838 11.2788 20.6476 10.8384 20.8386C10.3879 21.0295 9.91234 21.125 9.41177 21.125C8.90118 21.125 8.4257 21.0295 7.98515 20.8386C7.54465 20.6476 7.15671 20.3838 6.82135 20.0471C6.48598 19.7104 6.22318 19.321 6.03296 18.8788C5.84274 18.4365 5.74764 17.9592 5.74764 17.4466C5.74764 16.9441 5.84275 16.4666 6.03296 16.0144C6.22318 15.5722 6.48598 15.1852 6.82135 14.8536C7.15673 14.522 7.54467 14.2556 7.98515 14.0546C8.42565 13.8637 8.90118 13.7682 9.41177 13.7682ZM9.41177 19.8437C10.0625 19.8437 10.6206 19.61 11.0862 19.1427C11.5517 18.6753 11.7844 18.11 11.7844 17.4466C11.7844 16.7933 11.5517 16.2331 11.0862 15.7657C10.6206 15.2984 10.0625 15.0647 9.41177 15.0647C8.75101 15.0647 8.18786 15.2984 7.72233 15.7657C7.2568 16.233 7.02403 16.7934 7.02403 17.4466C7.02403 18.11 7.25679 18.6753 7.72233 19.1427C8.18785 19.61 8.75094 19.8437 9.41177 19.8437ZM17.4609 5.6875C17.9715 5.6875 18.4469 5.78298 18.8875 5.97394C19.328 6.1649 19.7159 6.42872 20.0513 6.7654C20.3867 7.10209 20.6495 7.49154 20.8397 7.93373C21.0299 8.37595 21.125 8.85334 21.125 9.36592C21.125 9.86844 21.0299 10.3459 20.8397 10.7981C20.6495 11.2403 20.3867 11.6273 20.0513 11.9589C19.7159 12.2905 19.328 12.5569 18.8875 12.7579C18.447 12.9488 17.9715 13.0443 17.4609 13.0443C16.9603 13.0443 16.4847 12.9488 16.0343 12.7579C15.5938 12.5569 15.2083 12.2905 14.878 11.9589C14.5477 11.6272 14.2823 11.2403 14.0821 10.7981C13.8919 10.3458 13.7968 9.86844 13.7968 9.36592C13.7968 8.85334 13.8919 8.376 14.0821 7.93373C14.2823 7.49152 14.5476 7.10207 14.878 6.7654C15.2084 6.42872 15.5938 6.1649 16.0343 5.97394C16.4848 5.78298 16.9603 5.6875 17.4609 5.6875ZM17.4609 11.7479C18.1216 11.7479 18.6848 11.5142 19.1503 11.0469C19.6159 10.5795 19.8486 10.0192 19.8486 9.36593C19.8486 8.7026 19.6159 8.13726 19.1503 7.66991C18.6848 7.20256 18.1217 6.96889 17.4609 6.96889C16.8101 6.96889 16.252 7.20255 15.7865 7.66991C15.321 8.13725 15.0882 8.70254 15.0882 9.36593C15.0882 10.0192 15.3209 10.5795 15.7865 11.0469C16.252 11.5142 16.8102 11.7479 17.4609 11.7479ZM8.94623 5.6875H13.1209V6.96897H12.1899C12.4602 7.29058 12.6729 7.65239 12.8281 8.05438C12.9833 8.4564 13.0609 8.88354 13.0609 9.33585V9.366C13.0609 9.87858 12.9607 10.3559 12.7605 10.7982C12.5703 11.2505 12.3075 11.6449 11.9721 11.9816C11.6367 12.3183 11.2488 12.5821 10.8083 12.7731C10.3578 12.9641 9.87727 13.0595 9.36666 13.0595C8.85607 13.0595 8.38059 12.964 7.94004 12.7731C7.48953 12.5821 7.09909 12.3183 6.76872 11.9816C6.43835 11.6449 6.17305 11.2505 5.97282 10.7982C5.7826 10.356 5.6875 9.87858 5.6875 9.366C5.6875 8.88358 5.78261 8.43132 5.97282 8.00918C6.16304 7.58706 6.41081 7.21268 6.71617 6.88608C7.02151 6.55944 7.3694 6.2906 7.75984 6.07954C8.15028 5.86848 8.54572 5.74285 8.94621 5.70265L8.94623 5.6875ZM11.7844 9.36597C11.7844 8.70264 11.5517 8.1373 11.0861 7.66994C10.6206 7.2026 10.0624 6.96893 9.41173 6.96893C8.75097 6.96893 8.18782 7.20259 7.72229 7.66994C7.25676 8.13729 7.02399 8.70258 7.02399 9.36597C7.02399 10.0192 7.25675 10.5795 7.72229 11.0469C8.18781 11.5142 8.75091 11.7479 9.41173 11.7479C10.0625 11.7479 10.6206 11.5142 11.0861 11.0469C11.5516 10.5795 11.7844 10.0192 11.7844 9.36597Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/powr.svg b/packages/instant/src/assets/icons/powr.svg
deleted file mode 100644
index eb48342e1..000000000
--- a/packages/instant/src/assets/icons/powr.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="4.77072" y="8.24185" width="13.4376" height="13.4376" transform="rotate(-14.9496 4.77072 8.24185)" stroke="white" stroke-width="1.5"/>
-<rect x="8.24472" y="4.77117" width="13.4376" height="13.4376" transform="rotate(15 8.24472 4.77117)" stroke="white" stroke-width="1.5"/>
-<rect x="13" y="3.49816" width="13.4376" height="13.4376" transform="rotate(45 13 3.49816)" stroke="white" stroke-width="1.5"/>
-<path d="M12.1932 9.98888L15.2043 10.7957L16.0111 13.8068L13.8068 16.0111L10.7957 15.2043L9.98887 12.1932L12.1932 9.98888Z" stroke="white" stroke-width="1.5"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/ren.svg b/packages/instant/src/assets/icons/ren.svg
deleted file mode 100644
index fe563dee2..000000000
--- a/packages/instant/src/assets/icons/ren.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13.0587 19.5805C12.827 19.7307 12.761 20.0403 12.9112 20.272C13.0614 20.5037 13.371 20.5698 13.6027 20.4195L13.0587 19.5805ZM19.2281 15.5804L13.0587 19.5805L13.6027 20.4195L19.7722 16.4195L19.2281 15.5804Z" fill="white"/>
-<path d="M11.5033 18.8023C11.2625 18.9375 11.1769 19.2423 11.3121 19.4831C11.4473 19.7239 11.7521 19.8095 11.9928 19.6743L11.5033 18.8023ZM14.6687 17.025L11.5033 18.8023L11.9928 19.6743L15.1583 17.8969L14.6687 17.025Z" fill="white"/>
-<path d="M9.92058 17.7866C9.6798 17.9218 9.5942 18.2265 9.7294 18.4673C9.8646 18.7081 10.1694 18.7937 10.4102 18.6585L9.92058 17.7866ZM13.086 16.0092L9.92058 17.7866L10.4102 18.6585L13.5756 16.8811L13.086 16.0092Z" fill="white"/>
-<path d="M8.33788 16.7709C8.09709 16.9061 8.0115 17.2109 8.1467 17.4517C8.28189 17.6925 8.58669 17.7781 8.82747 17.6429L8.33788 16.7709ZM11.5033 14.9936L8.33788 16.7709L8.82747 17.6429L11.9929 15.8655L11.5033 14.9936Z" fill="white"/>
-<path d="M6.7552 15.7554C6.51442 15.8906 6.42883 16.1954 6.56402 16.4362C6.69922 16.677 7.00401 16.7626 7.2448 16.6274L6.7552 15.7554ZM9.92065 13.9781L6.7552 15.7554L7.2448 16.6274L10.4102 14.85L9.92065 13.9781Z" fill="white"/>
-<path d="M6.7552 13.978C6.51442 14.1132 6.42883 14.4179 6.56402 14.6587C6.69922 14.8995 7.00401 14.9851 7.2448 14.8499L6.7552 13.978ZM9.92065 12.2006L6.7552 13.978L7.2448 14.8499L10.4102 13.0725L9.92065 12.2006Z" fill="white"/>
-<path d="M6.7552 12.2006C6.51442 12.3358 6.42883 12.6406 6.56402 12.8814C6.69922 13.1222 7.00401 13.2078 7.2448 13.0726L6.7552 12.2006ZM9.92065 10.4233L6.7552 12.2006L7.2448 13.0726L10.4102 11.2952L9.92065 10.4233Z" fill="white"/>
-<path d="M6.7552 10.4233C6.51442 10.5585 6.42883 10.8633 6.56402 11.104C6.69922 11.3448 7.00401 11.4304 7.2448 11.2952L6.7552 10.4233ZM9.92065 8.6459L6.7552 10.4233L7.2448 11.2952L10.4102 9.51785L9.92065 8.6459Z" fill="white"/>
-<path d="M6.7552 8.64587C6.51442 8.78107 6.42883 9.08586 6.56402 9.32664C6.69922 9.56742 7.00401 9.65302 7.2448 9.51782L6.7552 8.64587ZM9.92065 6.8685L6.7552 8.64587L7.2448 9.51782L10.4102 7.74045L9.92065 6.8685Z" fill="white"/>
-<path d="M19.9808 9.06392L19.9999 16.5253L15.5436 19.0019L8.83997 15.2553L8.84 7.47653L13.2964 5L19.9808 9.06392Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/rep.svg b/packages/instant/src/assets/icons/rep.svg
deleted file mode 100644
index 1be1a6a88..000000000
--- a/packages/instant/src/assets/icons/rep.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M9.88881 13.8359C9.79999 12.913 10.7758 11.694 11.8001 11.2609C12.8245 10.8278 13.0773 9.78797 13.0773 9.78797L12.9999 4.5" stroke="white" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M13.0775 21.6833V19.5653C13.0775 19.5653 12.7758 18.3027 13.8001 17.8696C14.3952 17.618 15.0001 17.8696 15.8152 16.5078" stroke="white" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M5.92307 17.2448L7.96301 15.9141C7.96301 15.9141 9.37674 15.4762 10.2 16.2174C10.7522 16.7152 10.9111 17.3133 11.8 17.4565" stroke="white" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M20.3846 16.9333C20.3846 16.9333 18.3583 16.2297 17.6791 15.7898C16.9999 15.35 16.5712 15.2674 16.2 13.7391C15.9411 12.6734 15.1184 11.7896 14.2 11.7251" stroke="white" stroke-miterlimit="10" stroke-linecap="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9245 4.56536C13.5449 3.88115 12.5621 3.87822 12.1784 4.56015L5.48413 16.4599C5.21577 16.9369 5.38078 17.5411 5.85439 17.8154L12.571 21.7067C12.8837 21.8879 13.2698 21.8863 13.5809 21.7025L20.162 17.8154C20.6284 17.5399 20.7907 16.9431 20.5279 16.4693L13.9245 4.56536Z" stroke="white" stroke-miterlimit="10" stroke-linecap="round"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/req.svg b/packages/instant/src/assets/icons/req.svg
deleted file mode 100644
index d9eb89634..000000000
--- a/packages/instant/src/assets/icons/req.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M14.9149 7.02062H8.125V4.875H14.9149C15.6706 4.875 16.7813 5.10159 17.7327 5.81283C18.7294 6.55795 19.4796 7.78688 19.4905 9.586C19.545 10.4331 19.377 11.6685 18.6624 12.7308C17.8941 13.873 16.5803 14.6836 14.6197 14.6836H13.7989L17.8646 21.6365L16.0982 22.75L10.1267 12.5379H14.6197C15.9654 12.5379 16.6197 12.0203 16.9683 11.5022C17.3586 10.9219 17.4628 10.1886 17.4272 9.7083C17.4252 9.68092 17.4242 9.65348 17.4242 9.62602C17.4242 8.50439 16.9972 7.90691 16.5252 7.55408C16.0006 7.16185 15.34 7.02062 14.9149 7.02062Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/salt.svg b/packages/instant/src/assets/icons/salt.svg
deleted file mode 100644
index f2892c981..000000000
--- a/packages/instant/src/assets/icons/salt.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M7.5702 18L13 6.36471L18.4298 18H7.5702Z" stroke="white" stroke-width="2"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/snt.svg b/packages/instant/src/assets/icons/snt.svg
deleted file mode 100644
index 34b2c432b..000000000
--- a/packages/instant/src/assets/icons/snt.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M16.8917 13.922C17.1192 14.2276 17.022 14.443 16.9848 14.6496C16.3229 18.189 12.8267 20.5565 9.4926 19.8948C7.99515 19.5981 7.12853 18.6198 7.01477 17.1051C6.88861 15.4344 7.56983 14.4738 9.08383 13.9396C9.98354 13.623 10.9122 13.5966 11.8429 13.6494C13.5514 13.7483 15.2412 14.1682 16.8917 13.922Z" fill="white"/>
-<path d="M10.0068 12.1724C10.1723 8.91011 12.9198 6.18159 16.0533 6.01452C16.5683 5.98594 17.0833 5.99034 17.5921 6.11344C19.1123 6.48276 19.9396 7.50279 19.9976 9.08999C20.0534 10.6134 19.3824 11.6426 17.9388 12.1637C17.1487 12.4494 16.3275 12.544 15.5002 12.5C13.6884 12.4077 12.5508 11.9564 10.0068 12.1724Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/spank.svg b/packages/instant/src/assets/icons/spank.svg
deleted file mode 100644
index 1d7320770..000000000
--- a/packages/instant/src/assets/icons/spank.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M20.3039 18.5295L20.535 19.8495L16.1251 21.5978L15.5923 22.7836L11.0368 21.732L10.0483 23C10.0483 23 6.706 19.5963 6.47705 18.8779C6.06194 18.8779 5.22531 18.8779 4.75029 18.8779C4.75029 18.073 4.67754 14.0071 4.67754 14.0071L3 13.4272L5.07981 9.12767C5.07981 9.12767 4.37584 8.07604 4.22606 7.61947C4.86798 7.35549 8.04119 5.14405 8.04119 5.14405L7.92564 3.53199L12.4512 3.73539L13.2386 2L17.1521 5.21113L18.5002 4.30448L20.5843 8.56291L22.1227 8.59969L22.0307 13.6241L23 14.6281L20.3039 18.5295ZM10.0076 20.6393L10.4591 19.8949L14.6208 21.0893L14.7706 20.4835C14.7706 20.4835 18.1343 19.3085 18.834 19.1354C18.6949 18.813 18.4788 18.311 18.4788 18.311L21.1213 14.9073L20.488 14.4615L20.7875 9.98671L19.7369 10.0884L18.008 6.2476L17.1714 7.11747L13.949 4.3456L13.2621 5.35611L9.5069 5.0813L9.67594 5.92303L6.0705 7.96352L6.6846 9.07141L4.97497 12.6049L6.14539 12.9966L6.31229 17.1944H7.11469L10.0076 20.6393Z" fill="white"/>
-<path d="M14.9588 9.84174C14.5758 10.1793 14.2099 10.4995 13.8248 10.8393C13.3176 10.3978 12.772 10.1815 12.1322 10.2702C11.5973 10.3437 11.1415 10.7029 11.0538 11.1379C10.9597 11.6074 11.0966 11.9601 11.5459 12.1938C12.0402 12.4513 12.5687 12.6439 13.0651 12.8949C13.6429 13.187 14.0772 13.6025 14.2891 14.2603C14.5908 15.1929 14.2142 16.4934 13.0544 17.1274C11.6337 17.9063 9.57312 17.7765 8.3171 16.7292C8.22937 16.6556 8.16304 16.5583 8.04108 16.422C8.44121 16.0779 8.82208 15.7512 9.21578 15.4136C9.42976 15.5521 9.61377 15.6495 9.77211 15.7793C10.3113 16.225 10.9383 16.2164 11.5673 16.1298C12.0702 16.0606 12.4489 15.6711 12.5174 15.2189C12.5944 14.7104 12.3419 14.3598 11.9375 14.1088C11.7599 13.9985 11.5652 13.9141 11.3726 13.834C11.1801 13.7539 10.9746 13.702 10.7821 13.6241C9.96469 13.2931 9.29496 12.8084 9.21151 11.8346C9.12164 10.809 9.50679 9.96724 10.3777 9.43494C11.6914 8.63216 13.0566 8.60403 14.4196 9.34406C14.5416 9.40897 14.6485 9.50418 14.7534 9.59723C14.8176 9.65781 14.8689 9.73571 14.9588 9.84174Z" fill="white"/>
-<path d="M16.7369 15.1691C16.7369 15.1691 16.0073 15.1691 15.5922 15.1691C15.7869 13.0442 16.0394 10.9669 16.2555 8.85937C16.8632 8.85937 17.4066 8.85937 17.9758 8.85937C17.9951 9.02382 18.0165 9.24669 18.0165 9.24669L16.7369 15.1691Z" fill="white"/>
-<path d="M15.2669 15.7403C15.8361 15.8507 16.8781 16.0562 16.8781 16.0562L16.6748 18.1076C16.6748 18.1076 15.6135 17.8436 15.0273 17.6964C15.1064 17.0451 15.1835 16.4154 15.2669 15.7403Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/wax.svg b/packages/instant/src/assets/icons/wax.svg
deleted file mode 100644
index 8bcb73015..000000000
--- a/packages/instant/src/assets/icons/wax.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M11.8566 15.9922L13.0585 13.0958L14.0716 15.9922H16.4376L18.2404 11.0395H16.3999L15.1617 14.1781L13.9221 11.0395H11.9321L10.1293 15.9922H11.8566ZM9.61222 15.5L10.5002 13.0958L9.61222 11.0395H7.76192L9.61222 15.5Z" fill="white"/>
-<path d="M23.3998 11.4139C23.0267 10.378 22.3098 9.45197 21.973 8.43159C21.5691 7.21137 21.263 5.85744 20.2554 4.97781C19.4113 4.24173 18.4317 3.68721 17.3472 3.40854C16.4766 3.18617 15.5277 3.24247 14.7087 2.83432C12.3009 1.6352 10.3248 3.45499 8.1377 4.31773C6.57948 4.93136 4.74736 5.30996 3.89908 6.97915C3.34567 8.06989 3.50778 9.03678 3.27579 10.2035C3.03822 11.3928 2.31012 12.4765 2.45686 13.7319C2.64133 15.3195 3.7174 16.6143 3.83759 18.2708C3.96755 20.0878 5.40698 19.9301 6.53197 20.8337C7.05044 21.2503 7.32156 21.9343 7.87776 22.296C8.25509 22.5395 8.70229 22.4945 9.11036 22.6394C9.50026 22.7773 9.82727 23.0659 10.1976 23.2474C11.8299 24.0482 13.4775 23.0602 15.1629 23.1405C16.812 23.2179 17.9831 22.1327 19.2492 21.0068C20.0807 20.2679 21.0786 19.9681 21.8891 19.2081C22.7807 18.3721 22.7835 17.2561 22.8688 16.0992C22.8953 15.7347 22.954 15.3687 23.0197 15.0028C23.2517 13.7375 23.8484 12.6651 23.3998 11.4139ZM12.9996 21.2024C8.50943 21.2024 4.85497 17.5221 4.85497 13.0001C4.85497 8.47663 8.50943 4.79766 12.9996 4.79766C17.4898 4.79766 21.1442 8.47663 21.1442 13.0001C21.1442 17.5221 17.4898 21.2024 12.9996 21.2024Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/zil.svg b/packages/instant/src/assets/icons/zil.svg
deleted file mode 100644
index 1a9218201..000000000
--- a/packages/instant/src/assets/icons/zil.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="26" viewBox="0 0 26 26" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M15.6598 10.9663L8 6.74312V5H11.0169L19 9.41624V12.4183L11.0169 16.0592L16.548 18.0682V14.7788L19 13.517V19.1048C19 20.5231 17.5402 21.4375 16.3161 20.7859L8 17.3024V14.4787L15.6598 10.9663Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/icons/zrx.svg b/packages/instant/src/assets/icons/zrx.svg
deleted file mode 100644
index da623710b..000000000
--- a/packages/instant/src/assets/icons/zrx.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="22" height="22" viewBox="0 0 22 22" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.62099 13.9044L6.3287 12.1375L4.20565 9.27256L1.50251 5.44771C0.547534 7.07749 0 8.97462 0 11C0 14.3552 1.50251 17.3593 3.8722 19.3768L7.30341 16.9518C6.13632 16.2248 5.19614 15.1662 4.62099 13.9044Z" fill="white"/>
-<path d="M8.09561 4.62099L9.86251 6.3287L12.7274 4.20565L16.5523 1.50251C14.9225 0.547534 13.0254 0 11 0C7.64475 0 4.64072 1.50251 2.62323 3.8722L5.04816 7.30341C5.77525 6.13632 6.83381 5.19614 8.09561 4.62099Z" fill="white"/>
-<path d="M15.6713 9.86251L17.7943 12.7274L20.4975 16.5523C21.4525 14.9225 22 13.0254 22 11C22 7.64475 20.4975 4.64072 18.1278 2.62323L14.6966 5.04816C15.8637 5.77525 16.8039 6.83381 17.379 8.09561L15.6713 9.86251Z" fill="white"/>
-<path d="M19.3768 18.1278L16.9518 14.6966C16.2248 15.8637 15.1662 16.8039 13.9044 17.379L12.1375 15.6713L9.27256 17.7943L5.44771 20.4975C7.07749 21.4525 8.97462 22 11 22C14.3552 22 17.3593 20.4975 19.3768 18.1278Z" fill="white"/>
-</svg>
diff --git a/packages/instant/src/assets/powered_by_0x.svg b/packages/instant/src/assets/powered_by_0x.svg
deleted file mode 100644
index e3d007d0b..000000000
--- a/packages/instant/src/assets/powered_by_0x.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg width="108" height="18" viewBox="0 0 108 18" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M1.17959 10.0032V13.5455H0V4.49716H3.29917C4.27807 4.49716 5.04398 4.74988 5.59692 5.25533C6.15395 5.76077 6.43246 6.42986 6.43246 7.26261C6.43246 8.14092 6.16009 8.8183 5.61535 9.29474C5.0747 9.76705 4.29855 10.0032 3.28688 10.0032H1.17959ZM1.17959 9.02752H3.29917C3.92992 9.02752 4.41323 8.87837 4.74909 8.58008C5.08494 8.27764 5.25287 7.84263 5.25287 7.27504C5.25287 6.73645 5.08494 6.30558 4.74909 5.98242C4.41323 5.65927 3.95245 5.49148 3.36675 5.47905H1.17959V9.02752Z" fill="#777777"/>
-<path d="M7.37245 10.1213C7.37245 9.46254 7.49942 8.87009 7.75336 8.34393C8.01139 7.81777 8.36773 7.41175 8.82236 7.12589C9.28109 6.84002 9.80331 6.69709 10.389 6.69709C11.2942 6.69709 12.0253 7.01403 12.5823 7.6479C13.1434 8.28178 13.424 9.12488 13.424 10.1772V10.258C13.424 10.9126 13.2991 11.5009 13.0492 12.0229C12.8035 12.5408 12.4492 12.9447 11.9864 13.2347C11.5276 13.5247 10.9993 13.6697 10.4013 13.6697C9.50022 13.6697 8.76912 13.3528 8.20799 12.7189C7.65096 12.085 7.37245 11.2461 7.37245 10.2021V10.1213ZM8.51518 10.258C8.51518 11.0037 8.68515 11.6024 9.02511 12.054C9.36915 12.5056 9.82788 12.7314 10.4013 12.7314C10.9788 12.7314 11.4375 12.5035 11.7775 12.0478C12.1174 11.5879 12.2874 10.9457 12.2874 10.1213C12.2874 9.38382 12.1133 8.78723 11.7652 8.3315C11.4212 7.87163 10.9624 7.64169 10.389 7.64169C9.82788 7.64169 9.3753 7.86748 9.03125 8.31907C8.6872 8.77066 8.51518 9.41696 8.51518 10.258Z" fill="#777777"/>
-<path d="M20.735 11.9608L22.0129 6.82138H23.1495L21.2142 13.5455H20.2927L18.6769 8.44957L17.1041 13.5455H16.1825L14.2534 6.82138H15.3838L16.6925 11.8551L18.2407 6.82138H19.1561L20.735 11.9608Z" fill="#777777"/>
-<path d="M27.0692 13.6697C26.1681 13.6697 25.4349 13.3714 24.8697 12.7749C24.3045 12.1741 24.0219 11.3725 24.0219 10.3699V10.1586C24.0219 9.49154 24.1468 8.89702 24.3967 8.375C24.6506 7.84884 25.0028 7.43868 25.4534 7.14453C25.908 6.84624 26.3995 6.69709 26.9279 6.69709C27.7921 6.69709 28.4638 6.98503 28.943 7.5609C29.4222 8.13678 29.6618 8.96123 29.6618 10.0343V10.5128H25.1585C25.1749 11.1757 25.3653 11.7122 25.7298 12.1223C26.0985 12.5283 26.5654 12.7314 27.1306 12.7314C27.532 12.7314 27.872 12.6485 28.1505 12.4828C28.429 12.3171 28.6727 12.0975 28.8816 11.824L29.5758 12.3709C29.0188 13.2368 28.1832 13.6697 27.0692 13.6697ZM26.9279 7.64169C26.4691 7.64169 26.0841 7.81155 25.7729 8.15128C25.4616 8.48686 25.2691 8.95916 25.1953 9.56818H28.5252V9.48118C28.4925 8.89702 28.3368 8.44543 28.0583 8.12642C27.7798 7.80327 27.403 7.64169 26.9279 7.64169Z" fill="#777777"/>
-<path d="M34.1959 7.85298C34.0238 7.82398 33.8375 7.80948 33.6368 7.80948C32.8914 7.80948 32.3855 8.13056 32.1193 8.77273V13.5455H30.9827V6.82138H32.0886L32.107 7.59819C32.4797 6.99746 33.0081 6.69709 33.6921 6.69709C33.9133 6.69709 34.0812 6.72609 34.1959 6.78409V7.85298Z" fill="#777777"/>
-<path d="M37.8821 13.6697C36.981 13.6697 36.2479 13.3714 35.6826 12.7749C35.1174 12.1741 34.8348 11.3725 34.8348 10.3699V10.1586C34.8348 9.49154 34.9597 8.89702 35.2096 8.375C35.4635 7.84884 35.8158 7.43868 36.2663 7.14453C36.7209 6.84624 37.2124 6.69709 37.7408 6.69709C38.605 6.69709 39.2767 6.98503 39.7559 7.5609C40.2351 8.13678 40.4747 8.96123 40.4747 10.0343V10.5128H35.9714C35.9878 11.1757 36.1782 11.7122 36.5428 12.1223C36.9114 12.5283 37.3783 12.7314 37.9435 12.7314C38.3449 12.7314 38.6849 12.6485 38.9634 12.4828C39.2419 12.3171 39.4856 12.0975 39.6945 11.824L40.3887 12.3709C39.8317 13.2368 38.9962 13.6697 37.8821 13.6697ZM37.7408 7.64169C37.2821 7.64169 36.8971 7.81155 36.5858 8.15128C36.2745 8.48686 36.082 8.95916 36.0083 9.56818H39.3382V9.48118C39.3054 8.89702 39.1497 8.44543 38.8712 8.12642C38.5927 7.80327 38.2159 7.64169 37.7408 7.64169Z" fill="#777777"/>
-<path d="M41.5192 10.1275C41.5192 9.09588 41.7608 8.26728 42.2441 7.64169C42.7274 7.01196 43.3602 6.69709 44.1425 6.69709C44.9207 6.69709 45.5372 6.96638 45.9918 7.50497V4H47.1284V13.5455H46.0839L46.0287 12.8246C45.574 13.388 44.9412 13.6697 44.1302 13.6697C43.3602 13.6697 42.7315 13.3507 42.2441 12.7127C41.7608 12.0747 41.5192 11.242 41.5192 10.2145V10.1275ZM42.6558 10.258C42.6558 11.0203 42.8114 11.6169 43.1227 12.0478C43.434 12.4786 43.864 12.6941 44.4129 12.6941C45.1337 12.6941 45.66 12.3668 45.9918 11.7122V8.62358C45.6518 7.9897 45.1296 7.67276 44.4251 7.67276C43.8681 7.67276 43.434 7.89027 43.1227 8.32528C42.8114 8.7603 42.6558 9.40453 42.6558 10.258Z" fill="#777777"/>
-<path d="M57.6464 10.258C57.6464 11.2855 57.4129 12.112 56.946 12.7376C56.4791 13.359 55.8524 13.6697 55.066 13.6697C54.2264 13.6697 53.5772 13.3694 53.1185 12.7686L53.0632 13.5455H52.0188V4H53.1553V7.5609C53.6141 6.98503 54.2469 6.69709 55.0538 6.69709C55.8606 6.69709 56.4934 7.00574 56.9522 7.62305C57.415 8.24035 57.6464 9.08552 57.6464 10.1586V10.258ZM56.5098 10.1275C56.5098 9.34446 56.3603 8.73958 56.0613 8.31285C55.7623 7.88613 55.3323 7.67276 54.7711 7.67276C54.0216 7.67276 53.483 8.02492 53.1553 8.72923V11.6376C53.5035 12.3419 54.0462 12.6941 54.7834 12.6941C55.3282 12.6941 55.7521 12.4807 56.0552 12.054C56.3583 11.6272 56.5098 10.9851 56.5098 10.1275Z" fill="#777777"/>
-<path d="M61.1852 11.8613L62.7334 6.82138H63.9498L61.2773 14.5833C60.8637 15.7019 60.2063 16.2612 59.3052 16.2612L59.0902 16.2425L58.6663 16.1618V15.2296L58.9734 15.2544C59.3584 15.2544 59.6574 15.1757 59.8704 15.0183C60.0875 14.8609 60.2657 14.5729 60.4049 14.1545L60.6568 13.4709L58.2853 6.82138H59.5264L61.1852 11.8613Z" fill="#777777"/>
-<path d="M72.7808 11.3763L74.178 9.93067L72.441 7.58664L70.2293 4.45722C69.448 5.79067 69 7.34287 69 9C69 11.7452 70.2293 14.203 72.1682 15.8537L74.9755 13.8697C74.0206 13.2748 73.2514 12.4087 72.7808 11.3763Z" fill="#777777"/>
-<path d="M75.6237 3.78081L77.0693 5.17803L79.4134 3.44099L82.5428 1.22933C81.2093 0.447982 79.6571 0 78 0C75.2548 0 72.797 1.22933 71.1463 3.16816L73.1303 5.97552C73.7252 5.02063 74.5913 4.25139 75.6237 3.78081Z" fill="#777777"/>
-<path d="M81.822 8.06933L83.559 10.4134L85.7707 13.5428C86.552 12.2093 87 10.6571 87 9C87 6.2548 85.7707 3.79695 83.8318 2.14628L81.0245 4.13031C81.9794 4.7252 82.7486 5.5913 83.2192 6.62368L81.822 8.06933Z" fill="#777777"/>
-<path d="M84.8537 14.8318L82.8697 12.0245C82.2748 12.9794 81.4087 13.7486 80.3763 14.2192L78.9307 12.822L76.5866 14.559L73.4572 16.7707C74.7907 17.552 76.3429 18 78 18C80.7452 18 83.203 16.7707 84.8537 14.8318Z" fill="#777777"/>
-<path d="M95.7487 3.89648C93.6141 3.89648 92.2419 5.54671 92.2419 8.8651C92.2419 12.1566 93.6231 13.8247 95.7487 13.8247C97.8742 13.8247 99.2733 12.1566 99.2733 8.8651C99.2733 5.57361 97.8742 3.89648 95.7487 3.89648ZM93.4348 8.87406C93.4348 6.41666 94.1971 4.97272 95.7397 4.97272C96.2061 4.97272 96.6097 5.10725 96.9594 5.38527L93.928 11.5826C93.6052 10.9279 93.4348 10.031 93.4348 8.87406ZM95.7487 12.7664C95.2823 12.7664 94.8877 12.6319 94.5469 12.3718L97.5783 6.18348C97.9101 6.85613 98.0715 7.74402 98.0715 8.87406C98.0715 11.3135 97.2913 12.7664 95.7487 12.7664Z" fill="#777777"/>
-<path d="M104.96 10.085L106.915 6.7666H105.704L104.09 9.50203H103.596L102.018 6.7666H100.78L102.708 10.1298L100.565 13.6545H101.838L103.587 10.7666H104.072L105.785 13.6545H107.094L104.96 10.085Z" fill="#777777"/>
-</svg>
diff --git a/packages/instant/src/components/amount_placeholder.tsx b/packages/instant/src/components/amount_placeholder.tsx
deleted file mode 100644
index 290e34a07..000000000
--- a/packages/instant/src/components/amount_placeholder.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Pulse } from './animations/pulse';
-
-import { Text } from './ui/text';
-
-interface PlainPlaceholder {
- color: ColorOption;
-}
-const PlainPlaceholder: React.StatelessComponent<PlainPlaceholder> = props => (
- <Text fontWeight="bold" fontColor={props.color}>
- &mdash;
- </Text>
-);
-
-export interface AmountPlaceholderProps {
- color: ColorOption;
- isPulsating: boolean;
-}
-export const AmountPlaceholder: React.StatelessComponent<AmountPlaceholderProps> = props => {
- if (props.isPulsating) {
- return (
- <Pulse>
- <PlainPlaceholder color={props.color} />
- </Pulse>
- );
- } else {
- return <PlainPlaceholder color={props.color} />;
- }
-};
-
-AmountPlaceholder.displayName = 'AmountPlaceholder';
diff --git a/packages/instant/src/components/animations/full_rotation.tsx b/packages/instant/src/components/animations/full_rotation.tsx
deleted file mode 100644
index 1dff1b1fc..000000000
--- a/packages/instant/src/components/animations/full_rotation.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { keyframes, styled } from '../../style/theme';
-
-interface FullRotationProps {
- height: string;
- width: string;
-}
-const rotatingKeyframes = keyframes`
-from {
- transform: rotate(0deg);
-}
-
-to {
- transform: rotate(360deg);
-}
-`;
-
-export const FullRotation = styled.div<FullRotationProps>`
- animation: ${rotatingKeyframes} 2s linear infinite;
- height: ${props => props.height};
- width: ${props => props.width};
-`;
diff --git a/packages/instant/src/components/animations/position_animation.tsx b/packages/instant/src/components/animations/position_animation.tsx
deleted file mode 100644
index 4f8f25679..000000000
--- a/packages/instant/src/components/animations/position_animation.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { InterpolationValue } from 'styled-components';
-
-import { media, OptionallyScreenSpecific, stylesForMedia } from '../../style/media';
-import { css, keyframes, styled } from '../../style/theme';
-
-export interface TransitionInfo {
- from: string;
- to: string;
-}
-
-const generateTransitionInfoCss = (
- key: keyof TransitionInfo,
- top?: TransitionInfo,
- bottom?: TransitionInfo,
- left?: TransitionInfo,
- right?: TransitionInfo,
-): string => {
- const topStringIfExists = top ? `top: ${top[key]};` : '';
- const bottomStringIfExists = bottom ? `bottom: ${bottom[key]};` : '';
- const leftStringIfExists = left ? `left: ${left[key]};` : '';
- const rightStringIfExists = right ? `right: ${right[key]};` : '';
- return `
- ${topStringIfExists}
- ${bottomStringIfExists}
- ${leftStringIfExists}
- ${rightStringIfExists}
- `;
-};
-
-const slideKeyframeGenerator = (
- position: string,
- top?: TransitionInfo,
- bottom?: TransitionInfo,
- left?: TransitionInfo,
- right?: TransitionInfo,
-) => keyframes`
- from {
- position: ${position};
- ${generateTransitionInfoCss('from', top, bottom, left, right)}
- }
-
- to {
- position: ${position};
- ${generateTransitionInfoCss('to', top, bottom, left, right)}
- }
-`;
-
-export interface PositionAnimationSettings {
- top?: TransitionInfo;
- bottom?: TransitionInfo;
- left?: TransitionInfo;
- right?: TransitionInfo;
- timingFunction: string;
- duration?: string;
- position?: string;
-}
-
-const generatePositionAnimationCss = (positionSettings: PositionAnimationSettings) => {
- return css`
- animation-name: ${slideKeyframeGenerator(
- positionSettings.position || 'relative',
- positionSettings.top,
- positionSettings.bottom,
- positionSettings.left,
- positionSettings.right,
- )};
- animation-duration: ${positionSettings.duration || '0.3s'};
- animation-timing-function: ${positionSettings.timingFunction};
- animation-delay: 0s;
- animation-iteration-count: 1;
- animation-fill-mode: forwards;
- position: ${positionSettings.position || 'relative'};
- width: 100%;
- `;
-};
-
-export interface PositionAnimationProps {
- positionSettings: OptionallyScreenSpecific<PositionAnimationSettings>;
- zIndex?: OptionallyScreenSpecific<number>;
- height?: string;
-}
-
-const defaultAnimation = (positionSettings: OptionallyScreenSpecific<PositionAnimationSettings>) => {
- const bestDefault = 'default' in positionSettings ? positionSettings.default : positionSettings;
- return generatePositionAnimationCss(bestDefault);
-};
-const animationForSize = (
- positionSettings: OptionallyScreenSpecific<PositionAnimationSettings>,
- sizeKey: 'sm' | 'md' | 'lg',
- mediaFn: (...args: any[]) => InterpolationValue[],
-) => {
- // checking default makes sure we have a PositionAnimationSettings object
- // and then we check to see if we have a setting for the specific `sizeKey`
- const animationSettingsForSize = 'default' in positionSettings && positionSettings[sizeKey];
- return animationSettingsForSize && mediaFn`${generatePositionAnimationCss(animationSettingsForSize)}`;
-};
-
-export const PositionAnimation = styled.div<PositionAnimationProps>`
- && {
- ${props => props.zIndex && stylesForMedia<number>('z-index', props.zIndex)}
- ${props => defaultAnimation(props.positionSettings)}
- ${props => animationForSize(props.positionSettings, 'sm', media.small)}
- ${props => animationForSize(props.positionSettings, 'md', media.medium)}
- ${props => animationForSize(props.positionSettings, 'lg', media.large)}
- ${props => (props.height ? `height: ${props.height};` : '')}
- }
-`;
diff --git a/packages/instant/src/components/animations/pulse.tsx b/packages/instant/src/components/animations/pulse.tsx
deleted file mode 100644
index 01d6ea070..000000000
--- a/packages/instant/src/components/animations/pulse.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { keyframes, styled } from '../../style/theme';
-
-const pulsingKeyframes = keyframes`
- 0%, 100% {
- opacity: 0.2;
- }
- 50% {
- opacity: 100;
- }
-`;
-export const Pulse = styled.div`
- animation-name: ${pulsingKeyframes}
- animation-duration: 2s;
- animation-iteration-count: infinite;
-`;
diff --git a/packages/instant/src/components/animations/slide_animation.tsx b/packages/instant/src/components/animations/slide_animation.tsx
deleted file mode 100644
index 6ac47e9a6..000000000
--- a/packages/instant/src/components/animations/slide_animation.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as React from 'react';
-
-import { OptionallyScreenSpecific } from '../../style/media';
-import { SlideAnimationState } from '../../types';
-
-import { PositionAnimation, PositionAnimationSettings } from './position_animation';
-
-export interface SlideAnimationProps {
- animationState: SlideAnimationState;
- slideInSettings: OptionallyScreenSpecific<PositionAnimationSettings>;
- slideOutSettings: OptionallyScreenSpecific<PositionAnimationSettings>;
- zIndex?: OptionallyScreenSpecific<number>;
- height?: string;
- onAnimationEnd?: () => void;
-}
-
-export const SlideAnimation: React.StatelessComponent<SlideAnimationProps> = props => {
- if (props.animationState === 'none') {
- return <React.Fragment>{props.children}</React.Fragment>;
- }
- const positionSettings = props.animationState === 'slidIn' ? props.slideInSettings : props.slideOutSettings;
- return (
- <PositionAnimation
- onAnimationEnd={props.onAnimationEnd}
- height={props.height}
- positionSettings={positionSettings}
- zIndex={props.zIndex}
- >
- {props.children}
- </PositionAnimation>
- );
-};
-
-SlideAnimation.displayName = 'SlideAnimation';
diff --git a/packages/instant/src/components/buy_button.tsx b/packages/instant/src/components/buy_button.tsx
deleted file mode 100644
index 551e857a5..000000000
--- a/packages/instant/src/components/buy_button.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { AssetBuyer, AssetBuyerError, BuyQuote } from '@0x/asset-buyer';
-import { AssetProxyId } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { oc } from 'ts-optchain';
-
-import { WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX } from '../constants';
-import { ColorOption } from '../style/theme';
-import { AffiliateInfo, Asset, ZeroExInstantError } from '../types';
-import { analytics } from '../util/analytics';
-import { errorReporter } from '../util/error_reporter';
-import { gasPriceEstimator } from '../util/gas_price_estimator';
-import { util } from '../util/util';
-
-import { Button } from './ui/button';
-
-export interface BuyButtonProps {
- accountAddress?: string;
- accountEthBalanceInWei?: BigNumber;
- buyQuote?: BuyQuote;
- assetBuyer: AssetBuyer;
- web3Wrapper: Web3Wrapper;
- affiliateInfo?: AffiliateInfo;
- selectedAsset?: Asset;
- onValidationPending: (buyQuote: BuyQuote) => void;
- onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void;
- onSignatureDenied: (buyQuote: BuyQuote) => void;
- onBuyProcessing: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
- onBuySuccess: (buyQuote: BuyQuote, txHash: string) => void;
- onBuyFailure: (buyQuote: BuyQuote, txHash: string) => void;
-}
-
-export class BuyButton extends React.PureComponent<BuyButtonProps> {
- public static defaultProps = {
- onClick: util.boundNoop,
- onBuySuccess: util.boundNoop,
- onBuyFailure: util.boundNoop,
- };
- public render(): React.ReactNode {
- const { buyQuote, accountAddress, selectedAsset } = this.props;
- const shouldDisableButton = _.isUndefined(buyQuote) || _.isUndefined(accountAddress);
- const buttonText =
- !_.isUndefined(selectedAsset) && selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20
- ? `Buy ${selectedAsset.metaData.symbol.toUpperCase()}`
- : 'Buy Now';
- return (
- <Button
- width="100%"
- onClick={this._handleClick}
- isDisabled={shouldDisableButton}
- fontColor={ColorOption.white}
- >
- {buttonText}
- </Button>
- );
- }
- private readonly _handleClick = async () => {
- // The button is disabled when there is no buy quote anyway.
- const { buyQuote, assetBuyer, affiliateInfo, accountAddress, accountEthBalanceInWei, web3Wrapper } = this.props;
- if (_.isUndefined(buyQuote) || _.isUndefined(accountAddress)) {
- return;
- }
- this.props.onValidationPending(buyQuote);
- const ethNeededForBuy = buyQuote.worstCaseQuoteInfo.totalEthAmount;
- // if we don't have a balance for the user, let the transaction through, it will be handled by the wallet
- const hasSufficientEth = _.isUndefined(accountEthBalanceInWei) || accountEthBalanceInWei.gte(ethNeededForBuy);
- if (!hasSufficientEth) {
- analytics.trackBuyNotEnoughEth(buyQuote);
- this.props.onValidationFail(buyQuote, ZeroExInstantError.InsufficientETH);
- return;
- }
- let txHash: string | undefined;
- const gasInfo = await gasPriceEstimator.getGasInfoAsync();
- const feeRecipient = oc(affiliateInfo).feeRecipient();
- try {
- analytics.trackBuyStarted(buyQuote);
- txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote, {
- feeRecipient,
- takerAddress: accountAddress,
- gasPrice: gasInfo.gasPriceInWei,
- });
- } catch (e) {
- if (e instanceof Error) {
- if (e.message === AssetBuyerError.TransactionValueTooLow) {
- analytics.trackBuySimulationFailed(buyQuote);
- this.props.onValidationFail(buyQuote, AssetBuyerError.TransactionValueTooLow);
- return;
- } else if (e.message === AssetBuyerError.SignatureRequestDenied) {
- analytics.trackBuySignatureDenied(buyQuote);
- this.props.onSignatureDenied(buyQuote);
- return;
- } else {
- errorReporter.report(e);
- analytics.trackBuyUnknownError(buyQuote, e.message);
- this.props.onValidationFail(buyQuote, ZeroExInstantError.CouldNotSubmitTransaction);
- return;
- }
- }
- throw e;
- }
- const startTimeUnix = new Date().getTime();
- const expectedEndTimeUnix = startTimeUnix + gasInfo.estimatedTimeMs;
- this.props.onBuyProcessing(buyQuote, txHash, startTimeUnix, expectedEndTimeUnix);
- try {
- analytics.trackBuyTxSubmitted(buyQuote, txHash, startTimeUnix, expectedEndTimeUnix);
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- } catch (e) {
- if (e instanceof Error && e.message.startsWith(WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX)) {
- analytics.trackBuyTxFailed(buyQuote, txHash, startTimeUnix, expectedEndTimeUnix);
- this.props.onBuyFailure(buyQuote, txHash);
- return;
- }
- throw e;
- }
- analytics.trackBuyTxSucceeded(buyQuote, txHash, startTimeUnix, expectedEndTimeUnix);
- this.props.onBuySuccess(buyQuote, txHash);
- };
-}
diff --git a/packages/instant/src/components/buy_order_progress.tsx b/packages/instant/src/components/buy_order_progress.tsx
deleted file mode 100644
index 11ac5d5e0..000000000
--- a/packages/instant/src/components/buy_order_progress.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import * as React from 'react';
-
-import { TimedProgressBar } from '../components/timed_progress_bar';
-
-import { TimeCounter } from '../components/time_counter';
-import { Container } from '../components/ui/container';
-import { OrderProcessState, OrderState } from '../types';
-
-export interface BuyOrderProgressProps {
- buyOrderState: OrderState;
-}
-
-export const BuyOrderProgress: React.StatelessComponent<BuyOrderProgressProps> = props => {
- const { buyOrderState } = props;
- if (
- buyOrderState.processState === OrderProcessState.Processing ||
- buyOrderState.processState === OrderProcessState.Success ||
- buyOrderState.processState === OrderProcessState.Failure
- ) {
- const progress = buyOrderState.progress;
- const hasEnded = buyOrderState.processState !== OrderProcessState.Processing;
- const expectedTimeMs = progress.expectedEndTimeUnix - progress.startTimeUnix;
- return (
- <Container width="100%" padding="20px 20px 0px 20px">
- <Container marginBottom="5px">
- <TimeCounter estimatedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} />
- </Container>
- <TimedProgressBar expectedTimeMs={expectedTimeMs} hasEnded={hasEnded} key={progress.startTimeUnix} />
- </Container>
- );
- }
- return null;
-};
-
-BuyOrderProgress.displayName = 'BuyOrderProgress';
diff --git a/packages/instant/src/components/buy_order_state_buttons.tsx b/packages/instant/src/components/buy_order_state_buttons.tsx
deleted file mode 100644
index 1214559d1..000000000
--- a/packages/instant/src/components/buy_order_state_buttons.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import { AssetBuyer, AssetBuyerError, BuyQuote } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { AffiliateInfo, Asset, OrderProcessState, ZeroExInstantError } from '../types';
-
-import { BuyButton } from './buy_button';
-import { PlacingOrderButton } from './placing_order_button';
-import { SecondaryButton } from './secondary_button';
-
-import { Button } from './ui/button';
-import { Flex } from './ui/flex';
-
-export interface BuyOrderStateButtonProps {
- accountAddress?: string;
- accountEthBalanceInWei?: BigNumber;
- buyQuote?: BuyQuote;
- buyOrderProcessingState: OrderProcessState;
- assetBuyer: AssetBuyer;
- web3Wrapper: Web3Wrapper;
- affiliateInfo?: AffiliateInfo;
- selectedAsset?: Asset;
- onViewTransaction: () => void;
- onValidationPending: (buyQuote: BuyQuote) => void;
- onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void;
- onSignatureDenied: (buyQuote: BuyQuote) => void;
- onBuyProcessing: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
- onBuySuccess: (buyQuote: BuyQuote, txHash: string) => void;
- onBuyFailure: (buyQuote: BuyQuote, txHash: string) => void;
- onRetry: () => void;
-}
-
-export const BuyOrderStateButtons: React.StatelessComponent<BuyOrderStateButtonProps> = props => {
- if (props.buyOrderProcessingState === OrderProcessState.Failure) {
- return (
- <Flex justify="space-between">
- <Button width="48%" onClick={props.onRetry} fontColor={ColorOption.white}>
- Back
- </Button>
- <SecondaryButton width="48%" onClick={props.onViewTransaction}>
- Details
- </SecondaryButton>
- </Flex>
- );
- } else if (
- props.buyOrderProcessingState === OrderProcessState.Success ||
- props.buyOrderProcessingState === OrderProcessState.Processing
- ) {
- return <SecondaryButton onClick={props.onViewTransaction}>View Transaction</SecondaryButton>;
- } else if (props.buyOrderProcessingState === OrderProcessState.Validating) {
- return <PlacingOrderButton />;
- }
-
- return (
- <BuyButton
- accountAddress={props.accountAddress}
- accountEthBalanceInWei={props.accountEthBalanceInWei}
- buyQuote={props.buyQuote}
- assetBuyer={props.assetBuyer}
- web3Wrapper={props.web3Wrapper}
- affiliateInfo={props.affiliateInfo}
- selectedAsset={props.selectedAsset}
- onValidationPending={props.onValidationPending}
- onValidationFail={props.onValidationFail}
- onSignatureDenied={props.onSignatureDenied}
- onBuyProcessing={props.onBuyProcessing}
- onBuySuccess={props.onBuySuccess}
- onBuyFailure={props.onBuyFailure}
- />
- );
-};
-
-BuyOrderStateButtons.displayName = 'BuyOrderStateButtons';
diff --git a/packages/instant/src/components/coinbase_wallet_logo.tsx b/packages/instant/src/components/coinbase_wallet_logo.tsx
deleted file mode 100644
index 845b96d73..000000000
--- a/packages/instant/src/components/coinbase_wallet_logo.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as React from 'react';
-
-export interface CoinbaseWalletLogoProps {
- width?: number;
-}
-
-export const CoinbaseWalletLogo: React.StatelessComponent<CoinbaseWalletLogoProps> = ({ width }) => (
- <svg width={width} viewBox="0 0 51 51" fill="none" xmlns="http://www.w3.org/2000/svg">
- <circle cx="25.5" cy="25.5" r="25.5" fill="#3263E9" />
- <path
- fillRule="evenodd"
- clipRule="evenodd"
- d="M25.5 41C34.0604 41 41 34.0604 41 25.5C41 16.9396 34.0604 10 25.5 10C16.9396 10 10 16.9396 10 25.5C10 34.0604 16.9396 41 25.5 41ZM21.5108 20.5107C20.9586 20.5107 20.5108 20.9584 20.5108 21.5107V29.6223C20.5108 30.1746 20.9586 30.6223 21.5108 30.6223H29.6224C30.1747 30.6223 30.6224 30.1746 30.6224 29.6223V21.5107C30.6224 20.9584 30.1747 20.5107 29.6224 20.5107H21.5108Z"
- fill="white"
- />
- </svg>
-);
-
-CoinbaseWalletLogo.displayName = 'CoinbaseWalletLogo';
-
-CoinbaseWalletLogo.defaultProps = {
- width: 164,
-};
diff --git a/packages/instant/src/components/css_reset.tsx b/packages/instant/src/components/css_reset.tsx
deleted file mode 100644
index d1b20f4c9..000000000
--- a/packages/instant/src/components/css_reset.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import { INJECTED_DIV_CLASS } from '../constants';
-import { createGlobalStyle } from '../style/theme';
-
-export interface CSSResetProps {}
-
-/*
- * Derived from
- * https://github.com/jtrost/Complete-CSS-Reset
- */
-export const CSSReset = createGlobalStyle`
- .${INJECTED_DIV_CLASS} {
- a, abbr, area, article, aside, audio, b, bdo, blockquote, body, button,
- canvas, caption, cite, code, col, colgroup, command, datalist, dd, del,
- details, dialog, dfn, div, dl, dt, em, embed, fieldset, figure, form,
- h1, h2, h3, h4, h5, h6, head, header, hgroup, hr, html, i, iframe, img,
- input, ins, keygen, kbd, label, legend, li, map, mark, menu, meter, nav,
- noscript, object, ol, optgroup, option, output, p, param, pre, progress,
- q, rp, rt, ruby, samp, section, select, small, span, strong, sub, sup,
- table, tbody, td, textarea, tfoot, th, thead, time, tr, ul, var, video {
- background: transparent;
- border: 0;
- font-size: 100%;
- font: inherit;
- margin: 0;
- outline: none;
- padding: 0;
- text-align: left;
- text-decoration: none;
- vertical-align: baseline;
- }
- }
-`;
diff --git a/packages/instant/src/components/erc20_asset_amount_input.tsx b/packages/instant/src/components/erc20_asset_amount_input.tsx
deleted file mode 100644
index 0418f9165..000000000
--- a/packages/instant/src/components/erc20_asset_amount_input.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption, transparentWhite } from '../style/theme';
-import { ERC20Asset, SimpleHandler } from '../types';
-import { assetUtils } from '../util/asset';
-import { util } from '../util/util';
-
-import { ScalingAmountInput } from './scaling_amount_input';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-import { Text } from './ui/text';
-
-// Asset amounts only apply to ERC20 assets
-export interface ERC20AssetAmountInputProps {
- asset?: ERC20Asset;
- value?: BigNumber;
- onChange: (value?: BigNumber, asset?: ERC20Asset) => void;
- onSelectAssetClick?: (asset?: ERC20Asset) => void;
- startingFontSizePx: number;
- fontColor?: ColorOption;
- isInputDisabled: boolean;
- canSelectOtherAsset: boolean;
- numberOfAssetsAvailable?: number;
-}
-
-export interface ERC20AssetAmountInputState {
- currentFontSizePx: number;
-}
-
-export class ERC20AssetAmountInput extends React.PureComponent<ERC20AssetAmountInputProps, ERC20AssetAmountInputState> {
- public static defaultProps = {
- onChange: util.boundNoop,
- isDisabled: false,
- };
- constructor(props: ERC20AssetAmountInputProps) {
- super(props);
- this.state = {
- currentFontSizePx: props.startingFontSizePx,
- };
- }
- public render(): React.ReactNode {
- const { asset } = this.props;
- return (
- <Container whiteSpace="nowrap">
- {_.isUndefined(asset) ? this._renderTokenSelectionContent() : this._renderContentForAsset(asset)}
- </Container>
- );
- }
- private readonly _renderContentForAsset = (asset: ERC20Asset): React.ReactNode => {
- const { onChange, isInputDisabled, ...rest } = this.props;
- const amountBorderBottom = isInputDisabled ? '' : `1px solid ${transparentWhite}`;
- const onSymbolClick = this._generateSelectAssetClickHandler();
- return (
- <React.Fragment>
- <Container borderBottom={amountBorderBottom} display="inline-block">
- <ScalingAmountInput
- {...rest}
- isDisabled={isInputDisabled}
- textLengthThreshold={this._textLengthThresholdForAsset(asset)}
- maxFontSizePx={this.props.startingFontSizePx}
- onAmountChange={this._handleChange}
- onFontSizeChange={this._handleFontSizeChange}
- hasAutofocus={true}
- /* We send in a key of asset data to force a rerender of this component when the user selects a new asset. We do this so the autofocus attribute will bring focus onto this input */
- key={asset.assetData}
- />
- </Container>
- <Container
- display="inline-block"
- marginLeft="8px"
- title={assetUtils.bestNameForAsset(asset, undefined)}
- >
- <Flex inline={true}>
- <Text
- fontSize={`${this.state.currentFontSizePx}px`}
- fontColor={ColorOption.white}
- textTransform="uppercase"
- onClick={this.props.canSelectOtherAsset ? onSymbolClick : undefined}
- >
- {assetUtils.formattedSymbolForAsset(asset)}
- </Text>
- {this.props.canSelectOtherAsset && this._renderChevronIcon()}
- </Flex>
- </Container>
- </React.Fragment>
- );
- };
- private readonly _renderTokenSelectionContent = (): React.ReactNode => {
- const { numberOfAssetsAvailable } = this.props;
- let text = 'Select Token';
- if (_.isUndefined(numberOfAssetsAvailable)) {
- text = 'Loading...';
- } else if (numberOfAssetsAvailable === 0) {
- text = 'Assets Unavailable';
- }
- return (
- <Flex>
- <Text
- fontSize="30px"
- fontColor={ColorOption.white}
- opacity={0.7}
- fontWeight="500"
- onClick={this._generateSelectAssetClickHandler()}
- >
- {text}
- </Text>
- {this._renderChevronIcon()}
- </Flex>
- );
- };
- private readonly _renderChevronIcon = (): React.ReactNode => {
- if (!this._areAnyAssetsAvailable()) {
- return null;
- }
- return (
- <Container marginLeft="5px">
- <Icon icon="chevron" width={12} stroke={ColorOption.white} onClick={this._handleSelectAssetClick} />
- </Container>
- );
- };
- private readonly _handleChange = (value?: BigNumber): void => {
- this.props.onChange(value, this.props.asset);
- };
- private readonly _handleFontSizeChange = (fontSizePx: number): void => {
- this.setState({
- currentFontSizePx: fontSizePx,
- });
- };
- private readonly _generateSelectAssetClickHandler = (): SimpleHandler | undefined => {
- // We don't want to allow opening the token selection panel if there are no assets.
- // Since styles are inferred from the presence of a click handler, we want to return undefined
- // instead of providing a noop.
- if (!this._areAnyAssetsAvailable() || _.isUndefined(this.props.onSelectAssetClick)) {
- return undefined;
- }
- return this._handleSelectAssetClick;
- };
- private readonly _areAnyAssetsAvailable = (): boolean => {
- const { numberOfAssetsAvailable } = this.props;
- return !_.isUndefined(numberOfAssetsAvailable) && numberOfAssetsAvailable > 0;
- };
- private readonly _handleSelectAssetClick = (): void => {
- if (this.props.onSelectAssetClick) {
- this.props.onSelectAssetClick();
- }
- };
- // For assets with symbols of different length,
- // start scaling the input at different character lengths
- private readonly _textLengthThresholdForAsset = (asset?: ERC20Asset): number => {
- if (_.isUndefined(asset)) {
- return 3;
- }
- const symbol = asset.metaData.symbol;
- if (symbol.length <= 3) {
- return 5;
- }
- if (symbol.length === 5) {
- return 3;
- }
- return 4;
- };
-}
diff --git a/packages/instant/src/components/erc20_token_selector.tsx b/packages/instant/src/components/erc20_token_selector.tsx
deleted file mode 100644
index a26fb5cf5..000000000
--- a/packages/instant/src/components/erc20_token_selector.tsx
+++ /dev/null
@@ -1,176 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { ERC20Asset } from '../types';
-import { analytics } from '../util/analytics';
-import { assetUtils } from '../util/asset';
-
-import { SearchInput } from './search_input';
-import { Circle } from './ui/circle';
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
-
-export interface ERC20TokenSelectorProps {
- tokens: ERC20Asset[];
- onTokenSelect: (token: ERC20Asset) => void;
-}
-
-export interface ERC20TokenSelectorState {
- searchQuery: string;
-}
-
-export class ERC20TokenSelector extends React.PureComponent<ERC20TokenSelectorProps> {
- public state: ERC20TokenSelectorState = {
- searchQuery: '',
- };
- public render(): React.ReactNode {
- const { tokens } = this.props;
- return (
- <Container height="100%">
- <Container marginBottom="10px">
- <Text fontColor={ColorOption.darkGrey} fontSize="18px" fontWeight="600" lineHeight="22px">
- Select Token
- </Text>
- </Container>
- <SearchInput
- placeholder="Search tokens..."
- width="100%"
- value={this.state.searchQuery}
- onChange={this._handleSearchInputChange}
- tabIndex={-1}
- />
- <Container overflow="scroll" height="calc(100% - 90px)" marginTop="10px">
- <TokenRowFilter
- tokens={tokens}
- onClick={this._handleTokenClick}
- searchQuery={this.state.searchQuery}
- />
- </Container>
- </Container>
- );
- }
- private readonly _handleSearchInputChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
- const searchQuery = event.target.value;
- this.setState({
- searchQuery,
- });
- analytics.trackTokenSelectorSearched(searchQuery);
- };
- private readonly _handleTokenClick = (token: ERC20Asset): void => {
- this.props.onTokenSelect(token);
- };
-}
-
-interface TokenRowFilterProps {
- tokens: ERC20Asset[];
- onClick: (token: ERC20Asset) => void;
- searchQuery: string;
-}
-
-class TokenRowFilter extends React.Component<TokenRowFilterProps> {
- public render(): React.ReactNode {
- return _.map(this.props.tokens, token => {
- if (!this._isTokenQueryMatch(token)) {
- return null;
- }
- return <TokenSelectorRow key={token.assetData} token={token} onClick={this.props.onClick} />;
- });
- }
- public shouldComponentUpdate(nextProps: TokenRowFilterProps): boolean {
- const arePropsDeeplyEqual = _.isEqual(nextProps, this.props);
- return !arePropsDeeplyEqual;
- }
- private readonly _isTokenQueryMatch = (token: ERC20Asset): boolean => {
- const { searchQuery } = this.props;
- const searchQueryLowerCase = searchQuery.toLowerCase().trim();
- if (searchQueryLowerCase === '') {
- return true;
- }
- const tokenName = token.metaData.name.toLowerCase();
- const tokenSymbol = token.metaData.symbol.toLowerCase();
- return _.startsWith(tokenSymbol, searchQueryLowerCase) || _.startsWith(tokenName, searchQueryLowerCase);
- };
-}
-
-interface TokenSelectorRowProps {
- token: ERC20Asset;
- onClick: (token: ERC20Asset) => void;
-}
-
-class TokenSelectorRow extends React.PureComponent<TokenSelectorRowProps> {
- public render(): React.ReactNode {
- const { token } = this.props;
- const circleColor = token.metaData.primaryColor || 'black';
- const displaySymbol = assetUtils.bestNameForAsset(token);
- return (
- <Container
- padding="12px 0px"
- borderBottom="1px solid"
- borderColor={ColorOption.feintGrey}
- backgroundColor={ColorOption.white}
- width="100%"
- onClick={this._handleClick}
- darkenOnHover={true}
- cursor="pointer"
- >
- <Container marginLeft="5px">
- <Flex justify="flex-start">
- <Container marginRight="10px">
- <Circle diameter={26} rawColor={circleColor}>
- <Flex height="100%" width="100%">
- <TokenSelectorRowIcon token={token} />
- </Flex>
- </Circle>
- </Container>
- <Text fontSize="14px" fontWeight={700} fontColor={ColorOption.black}>
- {displaySymbol}
- </Text>
- <Container margin="0px 5px">
- <Text fontSize="14px"> - </Text>
- </Container>
- <Text fontSize="14px">{token.metaData.name}</Text>
- </Flex>
- </Container>
- </Container>
- );
- }
- private readonly _handleClick = (): void => {
- this.props.onClick(this.props.token);
- };
-}
-
-interface TokenSelectorRowIconProps {
- token: ERC20Asset;
-}
-
-const getTokenIcon = (symbol: string): React.StatelessComponent | undefined => {
- try {
- return require(`../assets/icons/${symbol}.svg`) as React.StatelessComponent;
- } catch (e) {
- // Can't find icon
- return undefined;
- }
-};
-
-class TokenSelectorRowIcon extends React.PureComponent<TokenSelectorRowIconProps> {
- public render(): React.ReactNode {
- const { token } = this.props;
- const iconUrlIfExists = token.metaData.iconUrl;
-
- const TokenIcon = getTokenIcon(token.metaData.symbol);
- const displaySymbol = assetUtils.bestNameForAsset(token);
- if (!_.isUndefined(iconUrlIfExists)) {
- return <img src={iconUrlIfExists} />;
- } else if (!_.isUndefined(TokenIcon)) {
- return <TokenIcon />;
- } else {
- return (
- <Text fontColor={ColorOption.white} fontSize="8px">
- {displaySymbol}
- </Text>
- );
- }
- }
-}
diff --git a/packages/instant/src/components/install_wallet_panel_content.tsx b/packages/instant/src/components/install_wallet_panel_content.tsx
deleted file mode 100644
index 1af3dafbb..000000000
--- a/packages/instant/src/components/install_wallet_panel_content.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import * as React from 'react';
-
-import {
- META_MASK_CHROME_STORE_URL,
- META_MASK_FIREFOX_STORE_URL,
- META_MASK_OPERA_STORE_URL,
- META_MASK_SITE_URL,
-} from '../constants';
-import { ColorOption } from '../style/theme';
-import { Browser } from '../types';
-import { analytics } from '../util/analytics';
-import { envUtil } from '../util/env';
-import { util } from '../util/util';
-
-import { MetaMaskLogo } from './meta_mask_logo';
-import { StandardPanelContent, StandardPanelContentProps } from './standard_panel_content';
-import { Button } from './ui/button';
-
-export interface InstallWalletPanelContentProps {}
-
-export class InstallWalletPanelContent extends React.PureComponent<InstallWalletPanelContentProps> {
- public render(): React.ReactNode {
- const panelProps = this._getStandardPanelContentProps();
- return <StandardPanelContent {...panelProps} />;
- }
- private readonly _getStandardPanelContentProps = (): StandardPanelContentProps => {
- const browser = envUtil.getBrowser();
- let description = 'Please install the MetaMask wallet browser extension.';
- let actionText = 'Learn More';
- let actionUrl = META_MASK_SITE_URL;
- switch (browser) {
- case Browser.Chrome:
- description = 'Please install the MetaMask wallet browser extension from the Chrome Store.';
- actionText = 'Get Chrome Extension';
- actionUrl = META_MASK_CHROME_STORE_URL;
- break;
- case Browser.Firefox:
- description = 'Please install the MetaMask wallet browser extension from the Firefox Store.';
- actionText = 'Get Firefox Extension';
- actionUrl = META_MASK_FIREFOX_STORE_URL;
- break;
- case Browser.Opera:
- description = 'Please install the MetaMask wallet browser extension from the Opera Store.';
- actionText = 'Get Opera Add-on';
- actionUrl = META_MASK_OPERA_STORE_URL;
- break;
- default:
- break;
- }
- const onActionClick = () => {
- analytics.trackInstallWalletModalClickedGet();
- util.createOpenUrlInNewWindow(actionUrl)();
- };
- return {
- image: <MetaMaskLogo width={85} height={80} />,
- title: 'Install MetaMask',
- description,
- moreInfoSettings: {
- href: META_MASK_SITE_URL,
- text: 'What is MetaMask?',
- onClick: analytics.trackInstallWalletModalClickedExplanation,
- },
- action: (
- <Button
- onClick={onActionClick}
- width="100%"
- fontColor={ColorOption.white}
- backgroundColor={ColorOption.darkOrange}
- >
- {actionText}
- </Button>
- ),
- };
- };
-}
diff --git a/packages/instant/src/components/instant_heading.tsx b/packages/instant/src/components/instant_heading.tsx
deleted file mode 100644
index e943f68d7..000000000
--- a/packages/instant/src/components/instant_heading.tsx
+++ /dev/null
@@ -1,149 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { SelectedERC20AssetAmountInput } from '../containers/selected_erc20_asset_amount_input';
-import { ColorOption } from '../style/theme';
-import { AsyncProcessState, ERC20Asset, OrderProcessState, OrderState } from '../types';
-import { format } from '../util/format';
-
-import { AmountPlaceholder } from './amount_placeholder';
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-import { Spinner } from './ui/spinner';
-import { Text } from './ui/text';
-
-export interface InstantHeadingProps {
- selectedAssetUnitAmount?: BigNumber;
- totalEthBaseUnitAmount?: BigNumber;
- ethUsdPrice?: BigNumber;
- quoteRequestState: AsyncProcessState;
- buyOrderState: OrderState;
- onSelectAssetClick?: (asset?: ERC20Asset) => void;
-}
-
-const PLACEHOLDER_COLOR = ColorOption.white;
-const ICON_WIDTH = 34;
-const ICON_HEIGHT = 34;
-const ICON_COLOR = ColorOption.white;
-
-export class InstantHeading extends React.PureComponent<InstantHeadingProps, {}> {
- public render(): React.ReactNode {
- const iconOrAmounts = this._renderIcon() || this._renderAmountsSection();
- return (
- <Container backgroundColor={ColorOption.primaryColor} width="100%" padding="20px">
- <Container marginBottom="5px">
- <Text
- letterSpacing="1px"
- fontColor={ColorOption.white}
- opacity={0.7}
- fontWeight={500}
- textTransform="uppercase"
- fontSize="12px"
- >
- {this._renderTopText()}
- </Text>
- </Container>
- <Flex direction="row" justify="space-between">
- <Flex height="60px">
- <SelectedERC20AssetAmountInput
- startingFontSizePx={38}
- onSelectAssetClick={this.props.onSelectAssetClick}
- />
- </Flex>
- <Flex direction="column" justify="space-between">
- {iconOrAmounts}
- </Flex>
- </Flex>
- </Container>
- );
- }
-
- private _renderAmountsSection(): React.ReactNode {
- if (
- _.isUndefined(this.props.totalEthBaseUnitAmount) &&
- this.props.quoteRequestState !== AsyncProcessState.Pending
- ) {
- return null;
- } else {
- return (
- <Container>
- <Container marginBottom="5px">{this._renderPlaceholderOrAmount(this._renderEthAmount)}</Container>
- <Container opacity={0.7}>{this._renderPlaceholderOrAmount(this._renderDollarAmount)}</Container>
- </Container>
- );
- }
- }
-
- private _renderIcon(): React.ReactNode {
- const processState = this.props.buyOrderState.processState;
-
- if (processState === OrderProcessState.Failure) {
- return <Icon icon="failed" width={ICON_WIDTH} height={ICON_HEIGHT} color={ICON_COLOR} />;
- } else if (processState === OrderProcessState.Processing) {
- return <Spinner widthPx={ICON_HEIGHT} heightPx={ICON_HEIGHT} />;
- } else if (processState === OrderProcessState.Success) {
- return <Icon icon="success" width={ICON_WIDTH} height={ICON_HEIGHT} color={ICON_COLOR} />;
- }
- return undefined;
- }
-
- private _renderTopText(): React.ReactNode {
- const processState = this.props.buyOrderState.processState;
- if (processState === OrderProcessState.Failure) {
- return 'Order failed';
- } else if (processState === OrderProcessState.Processing) {
- return 'Processing Order...';
- } else if (processState === OrderProcessState.Success) {
- return 'Tokens received!';
- }
-
- return 'I want to buy';
- }
-
- private _renderPlaceholderOrAmount(amountFunction: () => React.ReactNode): React.ReactNode {
- if (this.props.quoteRequestState === AsyncProcessState.Pending) {
- return <AmountPlaceholder isPulsating={true} color={PLACEHOLDER_COLOR} />;
- }
- if (_.isUndefined(this.props.selectedAssetUnitAmount)) {
- return <AmountPlaceholder isPulsating={false} color={PLACEHOLDER_COLOR} />;
- }
- return amountFunction();
- }
-
- private readonly _renderEthAmount = (): React.ReactNode => {
- const ethAmount = format.ethBaseUnitAmount(
- this.props.totalEthBaseUnitAmount,
- 4,
- <AmountPlaceholder isPulsating={false} color={PLACEHOLDER_COLOR} />,
- );
-
- const fontSize = _.isString(ethAmount) && ethAmount.length >= 13 ? '14px' : '16px';
- return (
- <Text
- fontSize={fontSize}
- textAlign="right"
- width="100%"
- fontColor={ColorOption.white}
- fontWeight={500}
- noWrap={true}
- >
- {ethAmount}
- </Text>
- );
- };
-
- private readonly _renderDollarAmount = (): React.ReactNode => {
- return (
- <Text fontSize="16px" textAlign="right" width="100%" fontColor={ColorOption.white} noWrap={true}>
- {format.ethBaseUnitAmountInUsd(
- this.props.totalEthBaseUnitAmount,
- this.props.ethUsdPrice,
- 2,
- <AmountPlaceholder isPulsating={false} color={ColorOption.white} />,
- )}
- </Text>
- );
- };
-}
diff --git a/packages/instant/src/components/meta_mask_logo.tsx b/packages/instant/src/components/meta_mask_logo.tsx
deleted file mode 100644
index bfbc67270..000000000
--- a/packages/instant/src/components/meta_mask_logo.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import * as React from 'react';
-
-export interface MetaMaskLogoProps {
- width?: number;
- height?: number;
-}
-
-export const MetaMaskLogo: React.StatelessComponent<MetaMaskLogoProps> = ({ width, height }) => (
- <svg width={width} height={height} viewBox="0 0 85 80" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path d="M80.578 0L47.7107 24.8648L53.542 10.2702L80.578 0Z" fill="#E2761B" />
- <path d="M4.24075 0L37.1081 25.4053L31.2768 10.2702L4.24075 0Z" fill="#E4761B" />
- <path d="M68.9152 57.8379L59.9032 71.8919L78.9874 77.2973L84.2886 58.3785L68.9152 57.8379Z" fill="#E4761B" />
- <path d="M0.53006 58.3785L5.83124 77.2973L24.9155 71.8919L15.9035 57.8379L0.53006 58.3785Z" fill="#E4761B" />
- <path d="M23.8552 34.5941L18.554 42.7022L37.1082 43.7833L36.5781 23.2428L23.8552 34.5941Z" fill="#E4761B" />
- <path d="M60.9635 34.5941L47.7106 23.2428V43.7833L66.2647 42.7022L60.9635 34.5941Z" fill="#E4761B" />
- <path d="M24.9156 71.8914L36.0481 66.4861L26.5059 58.378L24.9156 71.8914Z" fill="#E4761B" />
- <path d="M48.7709 66.4861L59.9034 71.8914L58.313 58.378L48.7709 66.4861Z" fill="#E4761B" />
- <path d="M59.9034 71.8919L48.7709 66.4865L49.301 73.5135V76.7567L59.9034 71.8919Z" fill="#D7C1B3" />
- <path d="M24.9157 71.892L35.518 76.7568V73.5136L36.0482 66.4866L24.9157 71.892Z" fill="#D7C1B3" />
- <path d="M35.5179 53.5138L25.9758 50.8111L32.8673 47.5678L35.5179 53.5138Z" fill="#233447" />
- <path d="M49.3009 53.5138L51.9515 47.5678L58.843 50.8111L49.3009 53.5138Z" fill="#233447" />
- <path d="M24.9155 71.892L26.5059 57.838L15.9035 58.3785L24.9155 71.892Z" fill="#CD6116" />
- <path d="M58.313 57.838L59.9034 71.892L68.9154 58.3785L58.313 57.838Z" fill="#CD6116" />
- <path
- d="M66.2648 42.7025L47.7106 43.7836L49.301 53.5132L51.9516 47.5673L58.8431 50.8106L66.2648 42.7025Z"
- fill="#CD6116"
- />
- <path
- d="M25.9758 50.8106L32.8673 47.5673L35.5179 53.5132L37.1083 43.7836L18.5541 42.7025L25.9758 50.8106Z"
- fill="#CD6116"
- />
- <path d="M18.5541 42.7024L26.5059 58.378L25.9758 50.8105L18.5541 42.7024Z" fill="#E4751F" />
- <path d="M58.8431 50.8106L58.313 58.3781L66.2647 42.7025L58.8431 50.8106Z" fill="#E4751F" />
- <path d="M37.1083 43.7838L35.518 53.5135L37.6384 65.4053L38.1686 49.7297L37.1083 43.7838Z" fill="#E4751F" />
- <path d="M47.7105 43.7838L46.6503 49.7297L47.1804 65.4053L49.3009 53.5135L47.7105 43.7838Z" fill="#E4751F" />
- <path
- d="M49.301 53.5134L47.1805 65.4052L48.7709 66.4863L58.313 58.3782L58.8431 50.8107L49.301 53.5134Z"
- fill="#F6851B"
- />
- <path
- d="M25.9758 50.8107L26.5059 58.3782L36.048 66.4863L37.6384 65.4052L35.5179 53.5134L25.9758 50.8107Z"
- fill="#F6851B"
- />
- <path
- d="M49.3011 76.7568V73.5135L48.771 72.973H36.0482L35.518 73.5135V76.7568L24.9157 71.8919L28.6265 75.1351L36.0482 80H48.771L56.1927 75.1351L59.9035 71.8919L49.3011 76.7568Z"
- fill="#C0AD9E"
- />
- <path
- d="M48.771 66.486L47.1806 65.405H37.6385L36.0482 66.486L35.518 73.513L36.0482 72.9725H48.771L49.3011 73.513L48.771 66.486Z"
- fill="#161616"
- />
- <path
- d="M82.1685 26.4864L84.8191 12.9729L80.5781 0L48.771 24.3242L60.9637 34.5945L78.4576 39.9998L82.1685 35.6755L80.5781 34.0539L83.2287 31.8918L81.1082 30.2702L83.7588 28.108L82.1685 26.4864Z"
- fill="#763D16"
- />
- <path
- d="M0 12.9729L2.65059 26.4864L1.06024 28.108L3.71083 30.2702L1.59036 31.8918L4.24095 34.0539L2.65059 35.6755L6.36142 39.9998L23.8553 34.5945L36.0481 24.3242L4.24095 0L0 12.9729Z"
- fill="#763D16"
- />
- <path
- d="M78.4575 39.9993L60.9636 34.5939L66.2648 42.702L58.313 58.3776H68.9154H84.2888L78.4575 39.9993Z"
- fill="#F6851B"
- />
- <path
- d="M23.8554 34.5939L6.36147 39.9993L0.530167 58.3776H15.9036H26.506L18.5542 42.702L23.8554 34.5939Z"
- fill="#F6851B"
- />
- <path
- d="M47.7106 43.7833L48.7709 24.3239L53.5419 10.2699H31.2769L36.048 24.3239L37.1083 43.7833L37.6384 49.7292V65.4048H47.1805V49.7292L47.7106 43.7833Z"
- fill="#F6851B"
- />
- </svg>
-);
-
-MetaMaskLogo.displayName = 'MetaMaskLogo';
-
-MetaMaskLogo.defaultProps = {
- width: 85,
- height: 80,
-};
diff --git a/packages/instant/src/components/order_details.tsx b/packages/instant/src/components/order_details.tsx
deleted file mode 100644
index 3ded50652..000000000
--- a/packages/instant/src/components/order_details.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-import { BuyQuoteInfo } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { oc } from 'ts-optchain';
-
-import { BIG_NUMBER_ZERO, DEFAULT_UNKOWN_ASSET_NAME } from '../constants';
-import { ColorOption } from '../style/theme';
-import { BaseCurrency } from '../types';
-import { format } from '../util/format';
-
-import { AmountPlaceholder } from './amount_placeholder';
-import { SectionHeader } from './section_header';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text, TextProps } from './ui/text';
-
-export interface OrderDetailsProps {
- buyQuoteInfo?: BuyQuoteInfo;
- selectedAssetUnitAmount?: BigNumber;
- ethUsdPrice?: BigNumber;
- isLoading: boolean;
- assetName?: string;
- baseCurrency: BaseCurrency;
- onBaseCurrencySwitchEth: () => void;
- onBaseCurrencySwitchUsd: () => void;
-}
-export class OrderDetails extends React.PureComponent<OrderDetailsProps> {
- public render(): React.ReactNode {
- const shouldShowUsdError = this.props.baseCurrency === BaseCurrency.USD && this._hadErrorFetchingUsdPrice();
- return (
- <Container width="100%" flexGrow={1} padding="20px 20px 0px 20px">
- <Container marginBottom="10px">{this._renderHeader()}</Container>
- {shouldShowUsdError ? this._renderErrorFetchingUsdPrice() : this._renderRows()}
- </Container>
- );
- }
-
- private _renderRows(): React.ReactNode {
- const { buyQuoteInfo } = this.props;
- return (
- <React.Fragment>
- <OrderDetailsRow
- labelText={this._assetAmountLabel()}
- primaryValue={this._displayAmountOrPlaceholder(buyQuoteInfo && buyQuoteInfo.assetEthAmount)}
- />
- <OrderDetailsRow
- labelText="Fee"
- primaryValue={this._displayAmountOrPlaceholder(buyQuoteInfo && buyQuoteInfo.feeEthAmount)}
- />
- <OrderDetailsRow
- labelText="Total Cost"
- isLabelBold={true}
- primaryValue={this._displayAmountOrPlaceholder(buyQuoteInfo && buyQuoteInfo.totalEthAmount)}
- isPrimaryValueBold={true}
- secondaryValue={this._totalCostSecondaryValue()}
- />
- </React.Fragment>
- );
- }
-
- private _renderErrorFetchingUsdPrice(): React.ReactNode {
- return (
- <Text>
- There was an error fetching the USD price.
- <Text
- onClick={this.props.onBaseCurrencySwitchEth}
- fontWeight={700}
- fontColor={ColorOption.primaryColor}
- >
- Click here
- </Text>
- {' to view ETH prices'}
- </Text>
- );
- }
-
- private _hadErrorFetchingUsdPrice(): boolean {
- return this.props.ethUsdPrice ? this.props.ethUsdPrice.isEqualTo(BIG_NUMBER_ZERO) : false;
- }
-
- private _totalCostSecondaryValue(): React.ReactNode {
- const secondaryCurrency = this.props.baseCurrency === BaseCurrency.USD ? BaseCurrency.ETH : BaseCurrency.USD;
-
- const canDisplayCurrency =
- secondaryCurrency === BaseCurrency.ETH ||
- (secondaryCurrency === BaseCurrency.USD && this.props.ethUsdPrice && !this._hadErrorFetchingUsdPrice());
-
- if (this.props.buyQuoteInfo && canDisplayCurrency) {
- return this._displayAmount(secondaryCurrency, this.props.buyQuoteInfo.totalEthAmount);
- } else {
- return undefined;
- }
- }
-
- private _displayAmountOrPlaceholder(weiAmount?: BigNumber): React.ReactNode {
- const { baseCurrency, isLoading } = this.props;
-
- if (_.isUndefined(weiAmount)) {
- return (
- <Container opacity={0.5}>
- <AmountPlaceholder color={ColorOption.lightGrey} isPulsating={isLoading} />
- </Container>
- );
- }
-
- return this._displayAmount(baseCurrency, weiAmount);
- }
-
- private _displayAmount(currency: BaseCurrency, weiAmount: BigNumber): React.ReactNode {
- switch (currency) {
- case BaseCurrency.USD:
- return format.ethBaseUnitAmountInUsd(weiAmount, this.props.ethUsdPrice, 2, '');
- case BaseCurrency.ETH:
- return format.ethBaseUnitAmount(weiAmount, 4, '');
- }
- }
-
- private _assetAmountLabel(): React.ReactNode {
- const { assetName, baseCurrency } = this.props;
- const numTokens = this.props.selectedAssetUnitAmount;
-
- // Display as 0 if we have a selected asset
- const displayNumTokens =
- assetName && assetName !== DEFAULT_UNKOWN_ASSET_NAME && _.isUndefined(numTokens)
- ? new BigNumber(0)
- : numTokens;
- if (!_.isUndefined(displayNumTokens)) {
- let numTokensWithSymbol: React.ReactNode = displayNumTokens.toString();
- if (assetName) {
- numTokensWithSymbol += ` ${assetName}`;
- }
- const pricePerTokenWei = this._pricePerTokenWei();
- if (pricePerTokenWei) {
- const atPriceDisplay = (
- <Text fontColor={ColorOption.lightGrey}>
- @ {this._displayAmount(baseCurrency, pricePerTokenWei)}
- </Text>
- );
- numTokensWithSymbol = (
- <React.Fragment>
- {numTokensWithSymbol} {atPriceDisplay}
- </React.Fragment>
- );
- }
- return numTokensWithSymbol;
- }
- return 'Token Amount';
- }
-
- private _pricePerTokenWei(): BigNumber | undefined {
- const buyQuoteAccessor = oc(this.props.buyQuoteInfo);
- const assetTotalInWei = buyQuoteAccessor.assetEthAmount();
- const selectedAssetUnitAmount = this.props.selectedAssetUnitAmount;
- return !_.isUndefined(assetTotalInWei) &&
- !_.isUndefined(selectedAssetUnitAmount) &&
- !selectedAssetUnitAmount.eq(BIG_NUMBER_ZERO)
- ? assetTotalInWei.div(selectedAssetUnitAmount).integerValue(BigNumber.ROUND_CEIL)
- : undefined;
- }
-
- private _baseCurrencyChoice(choice: BaseCurrency): React.ReactNode {
- const onClick =
- choice === BaseCurrency.ETH ? this.props.onBaseCurrencySwitchEth : this.props.onBaseCurrencySwitchUsd;
- const isSelected = this.props.baseCurrency === choice;
-
- const textStyle: TextProps = { onClick, fontSize: '12px' };
- if (isSelected) {
- textStyle.fontColor = ColorOption.primaryColor;
- textStyle.fontWeight = 700;
- } else {
- textStyle.fontColor = ColorOption.lightGrey;
- }
- return <Text {...textStyle}>{choice}</Text>;
- }
-
- private _renderHeader(): React.ReactNode {
- return (
- <Flex justify="space-between">
- <SectionHeader>Order Details</SectionHeader>
- <Container>
- {this._baseCurrencyChoice(BaseCurrency.ETH)}
- <Container marginLeft="5px" marginRight="5px" display="inline">
- <Text fontSize="12px" fontColor={ColorOption.feintGrey}>
- /
- </Text>
- </Container>
- {this._baseCurrencyChoice(BaseCurrency.USD)}
- </Container>
- </Flex>
- );
- }
-}
-
-export interface OrderDetailsRowProps {
- labelText: React.ReactNode;
- isLabelBold?: boolean;
- isPrimaryValueBold?: boolean;
- primaryValue: React.ReactNode;
- secondaryValue?: React.ReactNode;
-}
-export class OrderDetailsRow extends React.PureComponent<OrderDetailsRowProps, {}> {
- public render(): React.ReactNode {
- return (
- <Container padding="10px 0px" borderTop="1px dashed" borderColor={ColorOption.feintGrey}>
- <Flex justify="space-between">
- <Text fontWeight={this.props.isLabelBold ? 700 : 400} fontColor={ColorOption.grey}>
- {this.props.labelText}
- </Text>
- <Container>{this._renderValues()}</Container>
- </Flex>
- </Container>
- );
- }
-
- private _renderValues(): React.ReactNode {
- const secondaryValueNode: React.ReactNode = this.props.secondaryValue && (
- <Container marginRight="3px" display="inline-block">
- <Text fontColor={ColorOption.lightGrey}>({this.props.secondaryValue})</Text>
- </Container>
- );
- return (
- <React.Fragment>
- {secondaryValueNode}
- <Text fontWeight={this.props.isPrimaryValueBold ? 700 : 400}>{this.props.primaryValue}</Text>
- </React.Fragment>
- );
- }
-}
diff --git a/packages/instant/src/components/payment_method.tsx b/packages/instant/src/components/payment_method.tsx
deleted file mode 100644
index ada9f7bab..000000000
--- a/packages/instant/src/components/payment_method.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { Account, AccountState, Network } from '../types';
-import { envUtil } from '../util/env';
-
-import { CoinbaseWalletLogo } from './coinbase_wallet_logo';
-import { MetaMaskLogo } from './meta_mask_logo';
-import { PaymentMethodDropdown } from './payment_method_dropdown';
-import { SectionHeader } from './section_header';
-import { Circle } from './ui/circle';
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-import { Text } from './ui/text';
-import { WalletPrompt } from './wallet_prompt';
-
-export interface PaymentMethodProps {
- account: Account;
- network: Network;
- walletDisplayName: string;
- onInstallWalletClick: () => void;
- onUnlockWalletClick: () => void;
-}
-
-export class PaymentMethod extends React.PureComponent<PaymentMethodProps> {
- public render(): React.ReactNode {
- return (
- <Container width="100%" height="120px" padding="20px 20px 0px 20px">
- <Container marginBottom="12px">
- <Flex justify="space-between">
- <SectionHeader>{this._renderTitleText()}</SectionHeader>
- {this._renderTitleLabel()}
- </Flex>
- </Container>
- {this._renderMainContent()}
- </Container>
- );
- }
- private readonly _renderTitleText = (): string => {
- const { account } = this.props;
- switch (account.state) {
- case AccountState.Loading:
- return 'loading...';
- case AccountState.Locked:
- case AccountState.None:
- return 'connect your wallet';
- case AccountState.Ready:
- return 'payment method';
- }
- };
- private readonly _renderTitleLabel = (): React.ReactNode => {
- const { account } = this.props;
- if (account.state === AccountState.Ready || account.state === AccountState.Locked) {
- const circleColor: ColorOption = account.state === AccountState.Ready ? ColorOption.green : ColorOption.red;
- return (
- <Flex align="center">
- <Circle diameter={8} color={circleColor} />
- <Container marginLeft="5px">
- <Text fontColor={ColorOption.darkGrey} fontSize="12px" lineHeight="30px">
- {this.props.walletDisplayName}
- </Text>
- </Container>
- </Flex>
- );
- }
- return null;
- };
- private readonly _renderMainContent = (): React.ReactNode => {
- const { account, network } = this.props;
- const isMobile = envUtil.isMobileOperatingSystem();
- const logo = isMobile ? <CoinbaseWalletLogo width={22} /> : <MetaMaskLogo width={19} height={18} />;
- const primaryColor = isMobile ? ColorOption.darkBlue : ColorOption.darkOrange;
- const secondaryColor = isMobile ? ColorOption.lightBlue : ColorOption.lightOrange;
- const colors = { primaryColor, secondaryColor };
- switch (account.state) {
- case AccountState.Loading:
- return null;
- case AccountState.Locked:
- return (
- <WalletPrompt
- onClick={this.props.onUnlockWalletClick}
- image={
- <Container position="relative" top="2px">
- <Icon width={13} icon="lock" color={ColorOption.black} />
- </Container>
- }
- {...colors}
- >
- Click to Connect {this.props.walletDisplayName}
- </WalletPrompt>
- );
- case AccountState.None:
- return (
- <WalletPrompt onClick={this.props.onInstallWalletClick} image={logo} {...colors}>
- {isMobile ? 'Install Coinbase Wallet' : 'Install MetaMask'}
- </WalletPrompt>
- );
- case AccountState.Ready:
- return (
- <PaymentMethodDropdown
- accountAddress={account.address}
- accountEthBalanceInWei={account.ethBalanceInWei}
- network={network}
- />
- );
- }
- };
-}
diff --git a/packages/instant/src/components/payment_method_dropdown.tsx b/packages/instant/src/components/payment_method_dropdown.tsx
deleted file mode 100644
index e463e3eae..000000000
--- a/packages/instant/src/components/payment_method_dropdown.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as copy from 'copy-to-clipboard';
-import * as React from 'react';
-
-import { Network } from '../types';
-import { analytics } from '../util/analytics';
-import { envUtil } from '../util/env';
-import { etherscanUtil } from '../util/etherscan';
-import { format } from '../util/format';
-
-import { Dropdown, DropdownItemConfig } from './ui/dropdown';
-
-export interface PaymentMethodDropdownProps {
- accountAddress: string;
- accountEthBalanceInWei?: BigNumber;
- network: Network;
-}
-
-export class PaymentMethodDropdown extends React.PureComponent<PaymentMethodDropdownProps> {
- public render(): React.ReactNode {
- const { accountAddress, accountEthBalanceInWei } = this.props;
- const value = format.ethAddress(accountAddress);
- const label = format.ethBaseUnitAmount(accountEthBalanceInWei, 4, '') as string;
- return (
- <Dropdown
- value={value}
- label={label}
- items={this._getDropdownItemConfigs()}
- onOpen={analytics.trackPaymentMethodDropdownOpened}
- />
- );
- }
- private readonly _getDropdownItemConfigs = (): DropdownItemConfig[] => {
- if (envUtil.isMobileOperatingSystem()) {
- return [];
- }
- const viewOnEtherscan = {
- text: 'View on Etherscan',
- onClick: this._handleEtherscanClick,
- };
- const copyAddressToClipboard = {
- text: 'Copy address to clipboard',
- onClick: this._handleCopyToClipboardClick,
- };
- return [viewOnEtherscan, copyAddressToClipboard];
- };
- private readonly _handleEtherscanClick = (): void => {
- analytics.trackPaymentMethodOpenedEtherscan();
-
- const { accountAddress, network } = this.props;
- const etherscanUrl = etherscanUtil.getEtherScanEthAddressIfExists(accountAddress, network);
- window.open(etherscanUrl, '_blank');
- };
- private readonly _handleCopyToClipboardClick = (): void => {
- analytics.trackPaymentMethodCopiedAddress();
-
- const { accountAddress } = this.props;
- copy(accountAddress);
- };
-}
diff --git a/packages/instant/src/components/placing_order_button.tsx b/packages/instant/src/components/placing_order_button.tsx
deleted file mode 100644
index 528a305dc..000000000
--- a/packages/instant/src/components/placing_order_button.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Button } from './ui/button';
-import { Container } from './ui/container';
-import { Spinner } from './ui/spinner';
-
-export const PlacingOrderButton: React.StatelessComponent<{}> = props => (
- <Button isDisabled={true} width="100%" fontColor={ColorOption.white}>
- <Container display="inline-block" position="relative" top="3px" marginRight="8px">
- <Spinner widthPx={16} heightPx={16} />
- </Container>
- Placing Order&hellip;
- </Button>
-);
-
-PlacingOrderButton.displayName = 'PlacingOrderButton';
diff --git a/packages/instant/src/components/scaling_amount_input.tsx b/packages/instant/src/components/scaling_amount_input.tsx
deleted file mode 100644
index 7dc1fdc0c..000000000
--- a/packages/instant/src/components/scaling_amount_input.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Maybe } from '../types';
-
-import { GIT_SHA, MAGIC_TRIGGER_ERROR_INPUT, MAGIC_TRIGGER_ERROR_MESSAGE, NPM_PACKAGE_VERSION } from '../constants';
-import { ColorOption } from '../style/theme';
-import { maybeBigNumberUtil } from '../util/maybe_big_number';
-import { util } from '../util/util';
-
-import { ScalingInput } from './scaling_input';
-
-export interface ScalingAmountInputProps {
- isDisabled: boolean;
- maxFontSizePx: number;
- textLengthThreshold: number;
- fontColor?: ColorOption;
- value?: BigNumber;
- onAmountChange: (value?: BigNumber) => void;
- onFontSizeChange: (fontSizePx: number) => void;
- hasAutofocus: boolean;
-}
-interface ScalingAmountInputState {
- stringValue: string;
-}
-
-const { stringToMaybeBigNumber, areMaybeBigNumbersEqual } = maybeBigNumberUtil;
-export class ScalingAmountInput extends React.PureComponent<ScalingAmountInputProps, ScalingAmountInputState> {
- public static defaultProps = {
- onAmountChange: util.boundNoop,
- onFontSizeChange: util.boundNoop,
- isDisabled: false,
- hasAutofocus: false,
- };
- public constructor(props: ScalingAmountInputProps) {
- super(props);
- this.state = {
- stringValue: _.isUndefined(props.value) ? '' : props.value.toString(),
- };
- }
- public componentDidUpdate(): void {
- const parsedStateValue = stringToMaybeBigNumber(this.state.stringValue);
- const currentValue = this.props.value;
-
- if (!areMaybeBigNumbersEqual(parsedStateValue, currentValue)) {
- // we somehow got into the state in which the value passed in and the string value
- // in state have differed, reset state
- // we dont expect to ever get into this state, but let's make sure
- // we reset if we do since we're dealing with important numbers
- this.setState({
- stringValue: _.isUndefined(currentValue) ? '' : currentValue.toString(),
- });
- }
- }
-
- public render(): React.ReactNode {
- const { textLengthThreshold, fontColor, maxFontSizePx, onFontSizeChange } = this.props;
- return (
- <ScalingInput
- type="number"
- maxFontSizePx={maxFontSizePx}
- textLengthThreshold={textLengthThreshold}
- onFontSizeChange={onFontSizeChange}
- fontColor={fontColor}
- onChange={this._handleChange}
- value={this.state.stringValue}
- placeholder="0.00"
- emptyInputWidthCh={3.5}
- isDisabled={this.props.isDisabled}
- hasAutofocus={this.props.hasAutofocus}
- />
- );
- }
- private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
- if (event.target.value === MAGIC_TRIGGER_ERROR_INPUT) {
- throw new Error(`${MAGIC_TRIGGER_ERROR_MESSAGE} git: ${GIT_SHA}, npm: ${NPM_PACKAGE_VERSION}`);
- }
-
- const sanitizedValue = event.target.value.replace(/[^0-9.]/g, ''); // only allow numbers and "."
- this.setState({
- stringValue: sanitizedValue,
- });
-
- // Trigger onAmountChange with a valid BigNumber, or undefined if the sanitizedValue is invalid or empty
- const bigNumberValue: Maybe<BigNumber> = _.isEmpty(sanitizedValue)
- ? undefined
- : stringToMaybeBigNumber(sanitizedValue);
-
- this.props.onAmountChange(bigNumberValue);
- };
-}
diff --git a/packages/instant/src/components/scaling_input.tsx b/packages/instant/src/components/scaling_input.tsx
deleted file mode 100644
index c31de1fb5..000000000
--- a/packages/instant/src/components/scaling_input.tsx
+++ /dev/null
@@ -1,165 +0,0 @@
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { util } from '../util/util';
-
-import { Input } from './ui/input';
-
-export enum ScalingInputPhase {
- FixedFontSize,
- ScalingFontSize,
-}
-
-export interface ScalingSettings {
- percentageToReduceFontSizePerCharacter: number;
- // 1ch = the width of the 0 chararacter.
- // Allow to customize 'char' length for different characters.
- characterWidthOverrides: ObjectMap<number>;
- // How much room to leave to the right of the scaling input.
- additionalInputSpaceInCh: number;
-}
-
-export interface ScalingInputProps {
- type?: string;
- textLengthThreshold: number;
- maxFontSizePx: number;
- value: string;
- emptyInputWidthCh: number;
- onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
- onFontSizeChange: (fontSizePx: number) => void;
- fontColor?: ColorOption;
- placeholder?: string;
- maxLength?: number;
- scalingSettings: ScalingSettings;
- isDisabled: boolean;
- hasAutofocus: boolean;
-}
-
-export interface ScalingInputSnapshot {
- inputWidthPx: number;
-}
-
-// These are magic numbers that were determined experimentally.
-const defaultScalingSettings: ScalingSettings = {
- percentageToReduceFontSizePerCharacter: 0.1,
- characterWidthOverrides: {
- '1': 0.7,
- '.': 0.4,
- },
- additionalInputSpaceInCh: 0.4,
-};
-
-export class ScalingInput extends React.PureComponent<ScalingInputProps> {
- public static defaultProps = {
- onChange: util.boundNoop,
- onFontSizeChange: util.boundNoop,
- maxLength: 9,
- scalingSettings: defaultScalingSettings,
- isDisabled: false,
- hasAutofocus: false,
- };
- private readonly _inputRef = React.createRef<HTMLInputElement>();
- public static getPhase(textLengthThreshold: number, value: string): ScalingInputPhase {
- if (value.length <= textLengthThreshold) {
- return ScalingInputPhase.FixedFontSize;
- }
- return ScalingInputPhase.ScalingFontSize;
- }
- public static getPhaseFromProps(props: ScalingInputProps): ScalingInputPhase {
- const { value, textLengthThreshold } = props;
- return ScalingInput.getPhase(textLengthThreshold, value);
- }
- public static calculateFontSize(
- textLengthThreshold: number,
- maxFontSizePx: number,
- phase: ScalingInputPhase,
- value: string,
- percentageToReduceFontSizePerCharacter: number,
- ): number {
- if (phase !== ScalingInputPhase.ScalingFontSize) {
- return maxFontSizePx;
- }
- const charactersOverMax = value.length - textLengthThreshold;
- const scalingFactor = (1 - percentageToReduceFontSizePerCharacter) ** charactersOverMax;
- const fontSize = scalingFactor * maxFontSizePx;
- return fontSize;
- }
- public static calculateFontSizeFromProps(props: ScalingInputProps, phase: ScalingInputPhase): number {
- const { textLengthThreshold, value, maxFontSizePx, scalingSettings } = props;
- return ScalingInput.calculateFontSize(
- textLengthThreshold,
- maxFontSizePx,
- phase,
- value,
- scalingSettings.percentageToReduceFontSizePerCharacter,
- );
- }
- public componentDidMount(): void {
- // Trigger an initial notification of the calculated fontSize.
- const currentPhase = ScalingInput.getPhaseFromProps(this.props);
- const currentFontSize = ScalingInput.calculateFontSizeFromProps(this.props, currentPhase);
- this.props.onFontSizeChange(currentFontSize);
- }
- public componentDidUpdate(prevProps: ScalingInputProps): void {
- const prevPhase = ScalingInput.getPhaseFromProps(prevProps);
- const curPhase = ScalingInput.getPhaseFromProps(this.props);
- const prevFontSize = ScalingInput.calculateFontSizeFromProps(prevProps, prevPhase);
- const curFontSize = ScalingInput.calculateFontSizeFromProps(this.props, curPhase);
- // If font size has changed, notify.
- if (prevFontSize !== curFontSize) {
- this.props.onFontSizeChange(curFontSize);
- }
- }
- public render(): React.ReactNode {
- const { type, hasAutofocus, isDisabled, fontColor, placeholder, value, maxLength } = this.props;
- const phase = ScalingInput.getPhaseFromProps(this.props);
- return (
- <Input
- type={type}
- ref={this._inputRef as any}
- fontColor={fontColor}
- onChange={this._handleChange}
- value={value}
- placeholder={placeholder}
- fontSize={`${this._calculateFontSize(phase)}px`}
- width={this._calculateWidth(phase)}
- maxLength={maxLength}
- disabled={isDisabled}
- autoFocus={hasAutofocus}
- />
- );
- }
- private readonly _calculateWidth = (phase: ScalingInputPhase): string => {
- const { value, scalingSettings } = this.props;
- if (_.isEmpty(value)) {
- return `${this.props.emptyInputWidthCh}ch`;
- }
- const lengthInCh = _.reduce(
- value.split(''),
- (sum, char) => {
- const widthOverride = scalingSettings.characterWidthOverrides[char];
- if (!_.isUndefined(widthOverride)) {
- // tslint is confused
- // tslint:disable-next-line:restrict-plus-operands
- return sum + widthOverride;
- }
- return sum + 1;
- },
- scalingSettings.additionalInputSpaceInCh,
- );
- return `${lengthInCh}ch`;
- };
- private readonly _calculateFontSize = (phase: ScalingInputPhase): number => {
- return ScalingInput.calculateFontSizeFromProps(this.props, phase);
- };
- private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
- const value = event.target.value;
- const { maxLength } = this.props;
- if (!_.isUndefined(value) && !_.isUndefined(maxLength) && value.length > maxLength) {
- return;
- }
- this.props.onChange(event);
- };
-}
diff --git a/packages/instant/src/components/search_input.tsx b/packages/instant/src/components/search_input.tsx
deleted file mode 100644
index 71bc18915..000000000
--- a/packages/instant/src/components/search_input.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-import { Input, InputProps } from './ui/input';
-
-export interface SearchInputProps extends InputProps {
- backgroundColor?: ColorOption;
-}
-
-export const SearchInput: React.StatelessComponent<SearchInputProps> = props => (
- <Container backgroundColor={props.backgroundColor} borderRadius="3px" padding=".5em .5em">
- <Flex justify="flex-start" align="center">
- <Icon width={14} height={14} icon="search" color={ColorOption.lightGrey} padding="2px 12px" />
- <Input {...props} type="search" fontSize="16px" fontColor={props.fontColor} />
- </Flex>
- </Container>
-);
-
-SearchInput.displayName = 'SearchInput';
-
-SearchInput.defaultProps = {
- backgroundColor: ColorOption.lightestGrey,
- fontColor: ColorOption.grey,
-};
diff --git a/packages/instant/src/components/secondary_button.tsx b/packages/instant/src/components/secondary_button.tsx
deleted file mode 100644
index 0714ce287..000000000
--- a/packages/instant/src/components/secondary_button.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Button, ButtonProps } from './ui/button';
-
-export interface SecondaryButtonProps extends ButtonProps {}
-
-export const SecondaryButton: React.StatelessComponent<SecondaryButtonProps> = props => {
- const buttonProps = _.omit(props, 'text');
- return (
- <Button
- backgroundColor={ColorOption.white}
- borderColor={ColorOption.lightGrey}
- width={props.width}
- onClick={props.onClick}
- {...buttonProps}
- >
- {props.children}
- </Button>
- );
-};
-SecondaryButton.defaultProps = {
- width: '100%',
-};
-SecondaryButton.displayName = 'SecondaryButton';
diff --git a/packages/instant/src/components/section_header.tsx b/packages/instant/src/components/section_header.tsx
deleted file mode 100644
index 2185b67ba..000000000
--- a/packages/instant/src/components/section_header.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Text } from './ui/text';
-
-export interface SectionHeaderProps {}
-export const SectionHeader: React.StatelessComponent<SectionHeaderProps> = props => {
- return (
- <Text
- letterSpacing="1px"
- fontColor={ColorOption.primaryColor}
- fontWeight={600}
- textTransform="uppercase"
- fontSize="12px"
- >
- {props.children}
- </Text>
- );
-};
-SectionHeader.displayName = 'SectionHeader';
diff --git a/packages/instant/src/components/sliding_error.tsx b/packages/instant/src/components/sliding_error.tsx
deleted file mode 100644
index c7c6732cf..000000000
--- a/packages/instant/src/components/sliding_error.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import * as React from 'react';
-
-import { ScreenSpecification } from '../style/media';
-import { ColorOption } from '../style/theme';
-import { zIndex } from '../style/z_index';
-import { SlideAnimationState } from '../types';
-
-import { PositionAnimationSettings } from './animations/position_animation';
-import { SlideAnimation } from './animations/slide_animation';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
-
-export interface ErrorProps {
- icon: string;
- message: string;
-}
-
-export const Error: React.StatelessComponent<ErrorProps> = props => (
- <Container
- padding="10px"
- border={`1px solid ${ColorOption.darkOrange}`}
- backgroundColor={ColorOption.lightOrange}
- width="100%"
- borderRadius="6px"
- marginTop="10px"
- marginBottom="10px"
- >
- <Flex justify="flex-start">
- <Container marginRight="5px" display="inline" top="3px" position="relative">
- <Text fontSize="20px">{props.icon}</Text>
- </Container>
- <Text fontWeight="500" fontColor={ColorOption.darkOrange}>
- {props.message}
- </Text>
- </Flex>
- </Container>
-);
-
-Error.displayName = 'Error';
-
-export interface SlidingErrorProps extends ErrorProps {
- animationState: SlideAnimationState;
-}
-export const SlidingError: React.StatelessComponent<SlidingErrorProps> = props => {
- const slideAmount = '120px';
-
- const desktopSlideIn: PositionAnimationSettings = {
- timingFunction: 'ease-in',
- top: {
- from: slideAmount,
- to: '0px',
- },
- position: 'relative',
- };
- const desktopSlideOut: PositionAnimationSettings = {
- timingFunction: 'cubic-bezier(0.25, 0.1, 0.25, 1)',
- top: {
- from: '0px',
- to: slideAmount,
- },
- position: 'relative',
- };
-
- const mobileSlideIn: PositionAnimationSettings = {
- duration: '0.5s',
- timingFunction: 'ease-in',
- top: { from: '-120px', to: '0px' },
- position: 'fixed',
- };
- const moblieSlideOut: PositionAnimationSettings = {
- duration: '0.5s',
- timingFunction: 'ease-in',
- top: { from: '0px', to: '-120px' },
- position: 'fixed',
- };
-
- const slideUpSettings: ScreenSpecification<PositionAnimationSettings> = {
- default: desktopSlideIn,
- sm: mobileSlideIn,
- };
- const slideOutSettings: ScreenSpecification<PositionAnimationSettings> = {
- default: desktopSlideOut,
- sm: moblieSlideOut,
- };
-
- return (
- <SlideAnimation
- slideInSettings={slideUpSettings}
- slideOutSettings={slideOutSettings}
- zIndex={{ sm: zIndex.errorPopup, default: zIndex.errorPopBehind }}
- animationState={props.animationState}
- >
- <Error icon={props.icon} message={props.message} />
- </SlideAnimation>
- );
-};
-
-SlidingError.displayName = 'SlidingError';
diff --git a/packages/instant/src/components/sliding_panel.tsx b/packages/instant/src/components/sliding_panel.tsx
deleted file mode 100644
index 9b09a0d80..000000000
--- a/packages/instant/src/components/sliding_panel.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { zIndex } from '../style/z_index';
-import { SlideAnimationState } from '../types';
-
-import { PositionAnimationSettings } from './animations/position_animation';
-import { SlideAnimation } from './animations/slide_animation';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-
-export interface PanelProps {
- onClose?: () => void;
-}
-
-export const Panel: React.StatelessComponent<PanelProps> = ({ children, onClose }) => (
- <Container backgroundColor={ColorOption.white} width="100%" height="100%" zIndex={zIndex.panel} padding="20px">
- <Flex justify="flex-end">
- <Icon padding="5px" width={12} color={ColorOption.lightGrey} icon="closeX" onClick={onClose} />
- </Flex>
- <Container position="relative" top="-10px" height="100%">
- {children}
- </Container>
- </Container>
-);
-
-Panel.displayName = 'Panel';
-
-export interface SlidingPanelProps extends PanelProps {
- animationState: SlideAnimationState;
- onAnimationEnd?: () => void;
-}
-
-export class SlidingPanel extends React.PureComponent<SlidingPanelProps> {
- public render(): React.ReactNode {
- if (this.props.animationState === 'none') {
- return null;
- }
- const { animationState, onAnimationEnd, ...rest } = this.props;
- const slideAmount = '100%';
- const slideUpSettings: PositionAnimationSettings = {
- duration: '0.3s',
- timingFunction: 'ease-in-out',
- top: {
- from: slideAmount,
- to: '0px',
- },
- position: 'absolute',
- };
- const slideDownSettings: PositionAnimationSettings = {
- duration: '0.3s',
- timingFunction: 'ease-out',
- top: {
- from: '0px',
- to: slideAmount,
- },
- position: 'absolute',
- };
- return (
- <SlideAnimation
- slideInSettings={slideUpSettings}
- slideOutSettings={slideDownSettings}
- animationState={animationState}
- height="100%"
- onAnimationEnd={onAnimationEnd}
- >
- <Panel {...rest} />
- </SlideAnimation>
- );
- }
-}
diff --git a/packages/instant/src/components/standard_panel_content.tsx b/packages/instant/src/components/standard_panel_content.tsx
deleted file mode 100644
index f2987df82..000000000
--- a/packages/instant/src/components/standard_panel_content.tsx
+++ /dev/null
@@ -1,75 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-import { util } from '../util/util';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
-
-export interface MoreInfoSettings {
- text: string;
- href: string;
- onClick?: () => void;
-}
-
-export interface StandardPanelContentProps {
- image: React.ReactNode;
- title?: string;
- description: string;
- moreInfoSettings?: MoreInfoSettings;
- action: React.ReactNode;
-}
-
-const SPACING_BETWEEN_PX = '20px';
-
-const onMoreInfoClick = (href: string, onClick?: () => void) => {
- return () => {
- if (onClick) {
- onClick();
- }
- util.createOpenUrlInNewWindow(href)();
- };
-};
-
-export const StandardPanelContent: React.StatelessComponent<StandardPanelContentProps> = ({
- image,
- title,
- description,
- moreInfoSettings,
- action,
-}) => (
- <Container height="100%">
- <Flex direction="column" height="calc(100% - 58px)">
- <Container marginBottom={SPACING_BETWEEN_PX}>{image}</Container>
- {title && (
- <Container marginBottom={SPACING_BETWEEN_PX}>
- <Text fontSize="20px" fontWeight={700} fontColor={ColorOption.black}>
- {title}
- </Text>
- </Container>
- )}
- <Container marginBottom={SPACING_BETWEEN_PX}>
- <Text fontSize="14px" fontColor={ColorOption.grey} center={true}>
- {description}
- </Text>
- </Container>
- <Container marginBottom={SPACING_BETWEEN_PX}>
- {moreInfoSettings && (
- <Text
- center={true}
- fontSize="13px"
- textDecorationLine="underline"
- fontColor={ColorOption.lightGrey}
- onClick={onMoreInfoClick(moreInfoSettings.href, moreInfoSettings.onClick)}
- >
- {moreInfoSettings.text}
- </Text>
- )}
- </Container>
- </Flex>
- <Container>{action}</Container>
- </Container>
-);
-
-StandardPanelContent.displayName = 'StandardPanelContent';
diff --git a/packages/instant/src/components/standard_sliding_panel.tsx b/packages/instant/src/components/standard_sliding_panel.tsx
deleted file mode 100644
index bcc9d3dce..000000000
--- a/packages/instant/src/components/standard_sliding_panel.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from 'react';
-
-import { StandardSlidingPanelContent, StandardSlidingPanelSettings } from '../types';
-
-import { InstallWalletPanelContent } from './install_wallet_panel_content';
-import { SlidingPanel } from './sliding_panel';
-
-export interface StandardSlidingPanelProps extends StandardSlidingPanelSettings {
- onClose: () => void;
-}
-
-export class StandardSlidingPanel extends React.PureComponent<StandardSlidingPanelProps> {
- public render(): React.ReactNode {
- const { animationState, content, onClose } = this.props;
- return (
- <SlidingPanel animationState={animationState} onClose={onClose}>
- {this._getNodeForContent(content)}
- </SlidingPanel>
- );
- }
- private readonly _getNodeForContent = (content: StandardSlidingPanelContent): React.ReactNode => {
- switch (content) {
- case StandardSlidingPanelContent.InstallWallet:
- return <InstallWalletPanelContent />;
- case StandardSlidingPanelContent.None:
- return null;
- }
- };
-}
diff --git a/packages/instant/src/components/time_counter.tsx b/packages/instant/src/components/time_counter.tsx
deleted file mode 100644
index 93dc497d5..000000000
--- a/packages/instant/src/components/time_counter.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import * as React from 'react';
-
-import { ONE_SECOND_MS } from '../constants';
-import { ColorOption } from '../style/theme';
-import { timeUtil } from '../util/time';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
-
-export interface TimeCounterProps {
- estimatedTimeMs: number;
- hasEnded: boolean;
-}
-interface TimeCounterState {
- elapsedSeconds: number;
-}
-
-export class TimeCounter extends React.PureComponent<TimeCounterProps, TimeCounterState> {
- public state = {
- elapsedSeconds: 0,
- };
- private _timerId?: number;
-
- public componentDidMount(): void {
- this._setupTimerBasedOnProps();
- }
-
- public componentWillUnmount(): void {
- this._clearTimer();
- }
-
- public componentDidUpdate(prevProps: TimeCounterProps): void {
- if (prevProps.hasEnded !== this.props.hasEnded) {
- this._setupTimerBasedOnProps();
- }
- }
-
- public render(): React.ReactNode {
- const estimatedTimeSeconds = this.props.estimatedTimeMs / ONE_SECOND_MS;
- return (
- <Flex justify="space-between">
- <Container>
- <Container marginRight="5px" display="inline">
- <Text fontWeight={600} fontColor={ColorOption.grey}>
- Est. Time
- </Text>
- </Container>
- <Text fontColor={ColorOption.grey}>
- ({timeUtil.secondsToHumanDescription(estimatedTimeSeconds)})
- </Text>
- </Container>
- <Text fontColor={ColorOption.grey}>
- Time: {timeUtil.secondsToStopwatchTime(this.state.elapsedSeconds)}
- </Text>
- </Flex>
- );
- }
-
- private _setupTimerBasedOnProps(): void {
- this.props.hasEnded ? this._clearTimer() : this._newTimer();
- }
-
- private _newTimer(): void {
- this._clearTimer();
- this._timerId = window.setInterval(() => {
- this.setState({
- elapsedSeconds: this.state.elapsedSeconds + 1,
- });
- }, ONE_SECOND_MS);
- }
-
- private _clearTimer(): void {
- if (this._timerId) {
- window.clearInterval(this._timerId);
- }
- }
-}
diff --git a/packages/instant/src/components/timed_progress_bar.tsx b/packages/instant/src/components/timed_progress_bar.tsx
deleted file mode 100644
index 287269af7..000000000
--- a/packages/instant/src/components/timed_progress_bar.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-import * as _ from 'lodash';
-import { transparentize } from 'polished';
-import * as React from 'react';
-
-import { PROGRESS_FINISH_ANIMATION_TIME_MS, PROGRESS_STALL_AT_WIDTH } from '../constants';
-import { ColorOption, css, keyframes, styled, ThemeConsumer } from '../style/theme';
-
-import { Container } from './ui/container';
-
-export interface TimedProgressBarProps {
- expectedTimeMs: number;
- hasEnded: boolean;
-}
-
-/**
- * Timed Progress Bar
- * Goes from 0% -> PROGRESS_STALL_AT_WIDTH over time of expectedTimeMs
- * When hasEnded set to true, goes to 100% through animation of PROGRESS_FINISH_ANIMATION_TIME_MS length of time
- */
-export class TimedProgressBar extends React.PureComponent<TimedProgressBarProps, {}> {
- private readonly _barRef = React.createRef<HTMLDivElement>();
-
- public render(): React.ReactNode {
- const widthAnimationSettings = this._calculateWidthAnimationSettings();
- return <ProgressBar animationSettings={widthAnimationSettings} ref={this._barRef} />;
- }
-
- private _calculateWidthAnimationSettings(): WidthAnimationSettings {
- if (this.props.hasEnded) {
- if (!this._barRef.current) {
- throw new Error('ended but no reference');
- }
- const fromWidth = `${this._barRef.current.offsetWidth}px`;
- return {
- timeMs: PROGRESS_FINISH_ANIMATION_TIME_MS,
- fromWidth,
- toWidth: '100%',
- };
- }
-
- return {
- timeMs: this.props.expectedTimeMs,
- fromWidth: '0px',
- toWidth: PROGRESS_STALL_AT_WIDTH,
- };
- }
-}
-
-const expandingWidthKeyframes = (fromWidth: string, toWidth: string) => {
- return keyframes`
- from {
- width: ${fromWidth};
- }
- to {
- width: ${toWidth};
- }
- `;
-};
-
-export interface WidthAnimationSettings {
- timeMs: number;
- fromWidth: string;
- toWidth: string;
-}
-
-interface ProgressProps {
- width?: string;
- animationSettings?: WidthAnimationSettings;
-}
-
-export const Progress = styled.div<ProgressProps>`
- && {
- background-color: ${props => props.theme[ColorOption.primaryColor]};
- border-radius: 6px;
- height: 6px;
- ${props => (props.width ? `width: ${props.width};` : '')}
- ${props =>
- props.animationSettings
- ? css`
- animation: ${expandingWidthKeyframes(
- props.animationSettings.fromWidth,
- props.animationSettings.toWidth,
- )}
- ${props.animationSettings.timeMs}ms linear 1 forwards;
- `
- : ''}
- }
-`;
-
-export interface ProgressBarProps extends ProgressProps {}
-
-export const ProgressBar: React.ComponentType<ProgressBarProps & React.ClassAttributes<{}>> = React.forwardRef(
- (props, ref) => (
- <ThemeConsumer>
- {theme => (
- <Container
- width="100%"
- borderRadius="6px"
- rawBackgroundColor={transparentize(0.5, theme[ColorOption.primaryColor])}
- >
- <Progress {...props} ref={ref as any} />
- </Container>
- )}
- </ThemeConsumer>
- ),
-);
diff --git a/packages/instant/src/components/ui/button.tsx b/packages/instant/src/components/ui/button.tsx
deleted file mode 100644
index e77b1b5d1..000000000
--- a/packages/instant/src/components/ui/button.tsx
+++ /dev/null
@@ -1,87 +0,0 @@
-import { darken, saturate } from 'polished';
-import * as React from 'react';
-
-import { ColorOption, styled } from '../../style/theme';
-import { util } from '../../util/util';
-
-export type ButtonOnClickHandler = (event: React.MouseEvent<HTMLElement>) => void;
-
-export interface ButtonProps {
- backgroundColor?: ColorOption;
- borderColor?: ColorOption;
- fontColor?: ColorOption;
- fontSize?: string;
- width?: string;
- padding?: string;
- type?: string;
- isDisabled?: boolean;
- href?: string;
- onClick?: ButtonOnClickHandler;
- className?: string;
-}
-
-const PlainButton: React.StatelessComponent<ButtonProps> = ({
- children,
- isDisabled,
- onClick,
- href,
- type,
- className,
-}) => {
- const computedOnClick = isDisabled ? undefined : href ? util.createOpenUrlInNewWindow(href) : onClick;
- return (
- <button type={type} className={className} onClick={computedOnClick} disabled={isDisabled}>
- {children}
- </button>
- );
-};
-
-const darkenOnHoverAmount = 0.1;
-const darkenOnActiveAmount = 0.2;
-const saturateOnFocusAmount = 0.2;
-export const Button = styled(PlainButton)`
- && {
- all: initial;
- box-sizing: border-box;
- font-size: ${props => props.fontSize};
- font-family: 'Inter UI', sans-serif;
- font-weight: 500;
- color: ${props => props.fontColor && props.theme[props.fontColor]};
- cursor: ${props => (props.isDisabled ? 'default' : 'pointer')};
- transition: background-color, opacity 0.5s ease;
- padding: ${props => props.padding};
- border-radius: 3px;
- text-align: center;
- outline: none;
- width: ${props => props.width};
- background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
- border: ${props => (props.borderColor ? `1px solid ${props.theme[props.borderColor]}` : 'none')};
- &:hover {
- background-color: ${props =>
- !props.isDisabled
- ? darken(darkenOnHoverAmount, props.theme[props.backgroundColor || 'white'])
- : ''} !important;
- }
- &:active {
- background-color: ${props =>
- !props.isDisabled ? darken(darkenOnActiveAmount, props.theme[props.backgroundColor || 'white']) : ''};
- }
- &:disabled {
- opacity: 0.5;
- }
- &:focus {
- background-color: ${props =>
- saturate(saturateOnFocusAmount, props.theme[props.backgroundColor || 'white'])};
- }
- }
-`;
-
-Button.defaultProps = {
- backgroundColor: ColorOption.primaryColor,
- width: 'auto',
- isDisabled: false,
- padding: '.82em 1.2em',
- fontSize: '16px',
-};
-
-Button.displayName = 'Button';
diff --git a/packages/instant/src/components/ui/circle.tsx b/packages/instant/src/components/ui/circle.tsx
deleted file mode 100644
index e4f2c5260..000000000
--- a/packages/instant/src/components/ui/circle.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { ColorOption, styled, Theme, withTheme } from '../../style/theme';
-
-export interface CircleProps {
- diameter: number;
- rawColor?: string;
- color?: ColorOption;
- theme: Theme;
-}
-
-export const Circle = withTheme(
- styled.div<CircleProps>`
- && {
- width: ${props => props.diameter}px;
- height: ${props => props.diameter}px;
- background-color: ${props =>
- props.rawColor ? props.rawColor : props.theme[props.color || ColorOption.white]};
- border-radius: 50%;
- }
- `,
-);
-
-Circle.displayName = 'Circle';
-
-Circle.defaultProps = {
- color: ColorOption.white,
-};
diff --git a/packages/instant/src/components/ui/container.tsx b/packages/instant/src/components/ui/container.tsx
deleted file mode 100644
index 59b733f3e..000000000
--- a/packages/instant/src/components/ui/container.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import { darken } from 'polished';
-
-import { MediaChoice, stylesForMedia } from '../../style/media';
-import { ColorOption, styled } from '../../style/theme';
-import { cssRuleIfExists } from '../../style/util';
-
-export interface ContainerProps {
- display?: MediaChoice;
- position?: string;
- top?: string;
- right?: string;
- bottom?: string;
- left?: string;
- width?: MediaChoice;
- height?: MediaChoice;
- maxWidth?: string;
- margin?: string;
- marginTop?: string;
- marginRight?: string;
- marginBottom?: string;
- marginLeft?: string;
- padding?: string;
- borderRadius?: MediaChoice;
- border?: string;
- borderColor?: ColorOption;
- borderTop?: string;
- borderBottom?: string;
- className?: string;
- backgroundColor?: ColorOption;
- rawBackgroundColor?: string;
- hasBoxShadow?: boolean;
- isHidden?: boolean;
- zIndex?: number;
- whiteSpace?: string;
- opacity?: number;
- cursor?: string;
- overflow?: string;
- darkenOnHover?: boolean;
- rawHoverColor?: string;
- boxShadowOnHover?: boolean;
- flexGrow?: string | number;
-}
-
-const getBackgroundColor = (theme: any, backgroundColor?: ColorOption, rawBackgroundColor?: string): string => {
- if (backgroundColor) {
- return theme[backgroundColor] as string;
- }
- if (rawBackgroundColor) {
- return rawBackgroundColor;
- }
- return 'none';
-};
-
-export const Container = styled.div<ContainerProps>`
- && {
- box-sizing: border-box;
- ${props => cssRuleIfExists(props, 'flex-grow')}
- ${props => cssRuleIfExists(props, 'position')}
- ${props => cssRuleIfExists(props, 'top')}
- ${props => cssRuleIfExists(props, 'right')}
- ${props => cssRuleIfExists(props, 'bottom')}
- ${props => cssRuleIfExists(props, 'left')}
- ${props => cssRuleIfExists(props, 'max-width')}
- ${props => cssRuleIfExists(props, 'margin')}
- ${props => cssRuleIfExists(props, 'margin-top')}
- ${props => cssRuleIfExists(props, 'margin-right')}
- ${props => cssRuleIfExists(props, 'margin-bottom')}
- ${props => cssRuleIfExists(props, 'margin-left')}
- ${props => cssRuleIfExists(props, 'padding')}
- ${props => cssRuleIfExists(props, 'border')}
- ${props => cssRuleIfExists(props, 'border-top')}
- ${props => cssRuleIfExists(props, 'border-bottom')}
- ${props => cssRuleIfExists(props, 'z-index')}
- ${props => cssRuleIfExists(props, 'white-space')}
- ${props => cssRuleIfExists(props, 'opacity')}
- ${props => cssRuleIfExists(props, 'cursor')}
- ${props => cssRuleIfExists(props, 'overflow')}
- ${props => (props.overflow === 'scroll' ? `-webkit-overflow-scrolling: touch` : '')};
- ${props => (props.hasBoxShadow ? `box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)` : '')};
- ${props => props.display && stylesForMedia<string>('display', props.display)}
- ${props => props.width && stylesForMedia<string>('width', props.width)}
- ${props => props.height && stylesForMedia<string>('height', props.height)}
- ${props => props.borderRadius && stylesForMedia<string>('border-radius', props.borderRadius)}
- ${props => (props.isHidden ? 'visibility: hidden;' : '')}
- background-color: ${props => getBackgroundColor(props.theme, props.backgroundColor, props.rawBackgroundColor)};
- border-color: ${props => (props.borderColor ? props.theme[props.borderColor] : 'none')};
- &:hover {
- ${props => (props.rawHoverColor ? `background-color: ${props.rawHoverColor}` : '')}
- ${props =>
- props.darkenOnHover
- ? `background-color: ${
- props.backgroundColor ? darken(0.05, props.theme[props.backgroundColor]) : 'none'
- }`
- : ''};
- ${props => (props.boxShadowOnHover ? 'box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1)' : '')};
- }
- }
-`;
-
-Container.defaultProps = {
- display: 'block',
-};
-
-Container.displayName = 'Container';
diff --git a/packages/instant/src/components/ui/dropdown.tsx b/packages/instant/src/components/ui/dropdown.tsx
deleted file mode 100644
index 8788d3d59..000000000
--- a/packages/instant/src/components/ui/dropdown.tsx
+++ /dev/null
@@ -1,147 +0,0 @@
-import * as _ from 'lodash';
-import { transparentize } from 'polished';
-import * as React from 'react';
-
-import { ColorOption, completelyTransparent, ThemeConsumer } from '../../style/theme';
-import { zIndex } from '../../style/z_index';
-
-import { Container } from './container';
-import { Flex } from './flex';
-import { Icon } from './icon';
-import { Overlay } from './overlay';
-import { Text } from './text';
-
-export interface DropdownItemConfig {
- text: string;
- onClick?: () => void;
-}
-
-export interface DropdownProps {
- value: string;
- label?: string;
- items: DropdownItemConfig[];
- onOpen?: () => void;
-}
-
-export interface DropdownState {
- isOpen: boolean;
-}
-
-export class Dropdown extends React.PureComponent<DropdownProps, DropdownState> {
- public static defaultProps = {
- items: [],
- };
- public state: DropdownState = {
- isOpen: false,
- };
- public render(): React.ReactNode {
- const { value, label, items } = this.props;
- const { isOpen } = this.state;
- const hasItems = !_.isEmpty(items);
- const borderRadius = isOpen ? '4px 4px 0px 0px' : '4px';
- return (
- <React.Fragment>
- {isOpen && (
- <Overlay
- zIndex={zIndex.dropdownItems - 1}
- backgroundColor={completelyTransparent}
- onClick={this._closeDropdown}
- />
- )}
- <Container position="relative">
- <Container
- cursor={hasItems ? 'pointer' : undefined}
- onClick={this._handleDropdownClick}
- hasBoxShadow={isOpen}
- boxShadowOnHover={true}
- borderRadius={borderRadius}
- border="1px solid"
- borderColor={ColorOption.feintGrey}
- padding="0.8em"
- >
- <Flex justify="space-between">
- <Text fontSize="16px" fontColor={ColorOption.darkGrey}>
- {value}
- </Text>
- <Container>
- {label && (
- <Text fontSize="16px" fontColor={ColorOption.lightGrey}>
- {label}
- </Text>
- )}
- {hasItems && (
- <Container marginLeft="5px" display="inline-block" position="relative" bottom="2px">
- <Icon padding="3px" icon="chevron" width={12} stroke={ColorOption.grey} />
- </Container>
- )}
- </Container>
- </Flex>
- </Container>
- {isOpen && (
- <Container
- width="100%"
- position="absolute"
- onClick={this._closeDropdown}
- backgroundColor={ColorOption.white}
- hasBoxShadow={true}
- zIndex={zIndex.dropdownItems}
- >
- {_.map(items, (item, index) => (
- <DropdownItem key={item.text} {...item} isLast={index === items.length - 1} />
- ))}
- </Container>
- )}
- </Container>
- </React.Fragment>
- );
- }
- private readonly _handleDropdownClick = (): void => {
- if (_.isEmpty(this.props.items)) {
- return;
- }
- const isOpen = !this.state.isOpen;
- this.setState({
- isOpen,
- });
-
- if (isOpen && this.props.onOpen) {
- this.props.onOpen();
- }
- };
- private readonly _closeDropdown = (): void => {
- this.setState({
- isOpen: false,
- });
- };
-}
-
-export interface DropdownItemProps extends DropdownItemConfig {
- text: string;
- onClick?: () => void;
- isLast: boolean;
-}
-
-export const DropdownItem: React.StatelessComponent<DropdownItemProps> = ({ text, onClick, isLast }) => (
- <ThemeConsumer>
- {theme => (
- <Container
- onClick={onClick}
- cursor="pointer"
- rawHoverColor={transparentize(0.9, theme[ColorOption.primaryColor])}
- backgroundColor={ColorOption.white}
- padding="0.8em"
- borderTop="0"
- border="1px solid"
- borderRadius={isLast ? '0px 0px 4px 4px' : undefined}
- width="100%"
- borderColor={ColorOption.feintGrey}
- >
- <Text fontSize="14px" fontColor={ColorOption.darkGrey}>
- {text}
- </Text>
- </Container>
- )}
- </ThemeConsumer>
-);
-
-DropdownItem.displayName = 'DropdownItem';
diff --git a/packages/instant/src/components/ui/flex.tsx b/packages/instant/src/components/ui/flex.tsx
deleted file mode 100644
index 145e654f1..000000000
--- a/packages/instant/src/components/ui/flex.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import { MediaChoice, stylesForMedia } from '../../style/media';
-import { ColorOption, styled } from '../../style/theme';
-import { cssRuleIfExists } from '../../style/util';
-
-export interface FlexProps {
- direction?: 'row' | 'column';
- flexWrap?: 'wrap' | 'nowrap';
- justify?: 'flex-start' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'flex-end';
- align?: 'flex-start' | 'center' | 'space-around' | 'space-between' | 'space-evenly' | 'flex-end';
- width?: MediaChoice;
- height?: MediaChoice;
- backgroundColor?: ColorOption;
- inline?: boolean;
- flexGrow?: number | string;
-}
-
-export const Flex = styled.div<FlexProps>`
- && {
- display: ${props => (props.inline ? 'inline-flex' : 'flex')};
- flex-direction: ${props => props.direction};
- flex-wrap: ${props => props.flexWrap};
- ${props => cssRuleIfExists(props, 'flexGrow')}
- justify-content: ${props => props.justify};
- align-items: ${props => props.align};
- background-color: ${props => (props.backgroundColor ? props.theme[props.backgroundColor] : 'none')};
- ${props => (props.width ? stylesForMedia('width', props.width) : '')}
- ${props => (props.height ? stylesForMedia('height', props.height) : '')}
- }
-`;
-
-Flex.defaultProps = {
- direction: 'row',
- flexWrap: 'nowrap',
- justify: 'center',
- align: 'center',
-};
-
-Flex.displayName = 'Flex';
diff --git a/packages/instant/src/components/ui/icon.tsx b/packages/instant/src/components/ui/icon.tsx
deleted file mode 100644
index 811142b5b..000000000
--- a/packages/instant/src/components/ui/icon.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { ColorOption, styled, Theme, withTheme } from '../../style/theme';
-
-type svgRule = 'evenodd' | 'nonzero' | 'inherit';
-interface IconInfo {
- viewBox: string;
- path: string;
- fillRule?: svgRule;
- clipRule?: svgRule;
- strokeOpacity?: number;
- strokeWidth?: number;
- strokeLinecap?: 'butt' | 'round' | 'square' | 'inherit';
- strokeLinejoin?: 'miter' | 'round' | 'bevel' | 'inherit';
-}
-interface IconInfoMapping {
- closeX: IconInfo;
- failed: IconInfo;
- success: IconInfo;
- chevron: IconInfo;
- search: IconInfo;
- lock: IconInfo;
-}
-const ICONS: IconInfoMapping = {
- closeX: {
- viewBox: '0 0 11 11',
- fillRule: 'evenodd',
- clipRule: 'evenodd',
- path:
- 'M10.45 10.449C10.7539 10.1453 10.7539 9.65282 10.45 9.34909L6.60068 5.49999L10.45 1.65093C10.7538 1.3472 10.7538 0.854765 10.45 0.551038C10.1462 0.24731 9.65378 0.24731 9.34995 0.551038L5.50058 4.40006L1.65024 0.549939C1.34641 0.246212 0.853973 0.246212 0.550262 0.549939C0.246429 0.853667 0.246429 1.34611 0.550262 1.64983L4.40073 5.49995L0.55014 9.35019C0.246307 9.65392 0.246307 10.1464 0.55014 10.4501C0.853851 10.7538 1.34628 10.7538 1.65012 10.4501L5.5007 6.59987L9.35007 10.449C9.6539 10.7527 10.1463 10.7527 10.45 10.449Z',
- },
- failed: {
- viewBox: '0 0 34 34',
- fillRule: 'evenodd',
- clipRule: 'evenodd',
- path:
- 'M6.65771 26.4362C9.21777 29.2406 12.9033 31 17 31C24.7319 31 31 24.7319 31 17C31 14.4468 30.3164 12.0531 29.1226 9.99219L6.65771 26.4362ZM4.88281 24.0173C3.68555 21.9542 3 19.5571 3 17C3 9.26807 9.26807 3 17 3C21.1006 3 24.7891 4.76294 27.3496 7.57214L4.88281 24.0173ZM0 17C0 26.3888 7.61133 34 17 34C26.3887 34 34 26.3888 34 17C34 7.61121 26.3887 0 17 0C7.61133 0 0 7.61121 0 17Z',
- },
- success: {
- viewBox: '0 0 34 34',
- fillRule: 'evenodd',
- clipRule: 'evenodd',
- path:
- 'M17 34C26.3887 34 34 26.3888 34 17C34 7.61121 26.3887 0 17 0C7.61133 0 0 7.61121 0 17C0 26.3888 7.61133 34 17 34ZM25.7539 13.0977C26.2969 12.4718 26.2295 11.5244 25.6035 10.9817C24.9775 10.439 24.0303 10.5063 23.4878 11.1323L15.731 20.0771L12.3936 16.7438C11.8071 16.1583 10.8574 16.1589 10.272 16.7451C9.68652 17.3313 9.6875 18.281 10.2734 18.8665L14.75 23.3373L15.8887 24.4746L16.9434 23.2587L25.7539 13.0977Z',
- },
- chevron: {
- viewBox: '0 0 12 7',
- path: 'M11 1L6 6L1 1',
- strokeOpacity: 0.5,
- strokeWidth: 1.5,
- strokeLinecap: 'round',
- strokeLinejoin: 'round',
- },
- search: {
- viewBox: '0 0 14 14',
- fillRule: 'evenodd',
- clipRule: 'evenodd',
- path:
- 'M8.39404 5.19727C8.39404 6.96289 6.96265 8.39453 5.19702 8.39453C3.4314 8.39453 2 6.96289 2 5.19727C2 3.43164 3.4314 2 5.19702 2C6.96265 2 8.39404 3.43164 8.39404 5.19727ZM8.09668 9.51074C7.26855 10.0684 6.27075 10.3945 5.19702 10.3945C2.3269 10.3945 0 8.06738 0 5.19727C0 2.32715 2.3269 0 5.19702 0C8.06738 0 10.394 2.32715 10.394 5.19727C10.394 6.27051 10.0686 7.26855 9.51074 8.09668L13.6997 12.2861L12.2854 13.7002L8.09668 9.51074Z',
- },
- lock: {
- viewBox: '0 0 13 16',
- path:
- 'M6.47619 0C3.79509 0 1.60489 2.21216 1.60489 4.92014V6.33135C0.717479 6.33135 0 7.05602 0 7.95232V14.379C0 15.2753 0.717479 16 1.60489 16H11.3475C12.2349 16 12.9524 15.2753 12.9524 14.379V7.95232C12.9524 7.05602 12.2349 6.33135 11.3475 6.33135V4.92014C11.3475 2.21216 9.1573 0 6.47619 0ZM9.6482 6.33135H3.30418V4.92014C3.30418 3.16567 4.72026 1.71633 6.47619 1.71633C8.23213 1.71633 9.6482 3.16567 9.6482 4.92014V6.33135Z',
- },
-};
-
-export interface IconProps {
- className?: string;
- width: number;
- height?: number;
- color?: ColorOption;
- stroke?: ColorOption;
- icon: keyof IconInfoMapping;
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
- padding?: string;
- theme: Theme;
-}
-const PlainIcon: React.StatelessComponent<IconProps> = props => {
- const iconInfo = ICONS[props.icon];
- const colorValue = _.isUndefined(props.color) ? undefined : props.theme[props.color];
- const strokeValue = _.isUndefined(props.stroke) ? undefined : props.theme[props.stroke];
- return (
- <div onClick={props.onClick} className={props.className}>
- <svg
- width={props.width}
- height={props.height}
- viewBox={iconInfo.viewBox}
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path
- d={iconInfo.path}
- fill={colorValue}
- fillRule={iconInfo.fillRule || 'nonzero'}
- clipRule={iconInfo.clipRule || 'nonzero'}
- stroke={strokeValue}
- strokeOpacity={iconInfo.strokeOpacity}
- strokeWidth={iconInfo.strokeWidth}
- strokeLinecap={iconInfo.strokeLinecap}
- strokeLinejoin={iconInfo.strokeLinejoin}
- />
- </svg>
- </div>
- );
-};
-
-export const Icon = withTheme(styled(PlainIcon)`
- && {
- display: inline-block;
- ${props => (!_.isUndefined(props.onClick) ? 'cursor: pointer' : '')};
- transition: opacity 0.5s ease;
- padding: ${props => props.padding};
- opacity: ${props => (!_.isUndefined(props.onClick) ? 0.7 : 1)};
- &:hover {
- opacity: 1;
- }
- &:active {
- opacity: 1;
- }
- }
-`);
-
-Icon.defaultProps = {
- padding: '0em 0em',
-};
-
-Icon.displayName = 'Icon';
diff --git a/packages/instant/src/components/ui/input.tsx b/packages/instant/src/components/ui/input.tsx
deleted file mode 100644
index 024e81b15..000000000
--- a/packages/instant/src/components/ui/input.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption, styled } from '../../style/theme';
-
-export interface InputProps extends React.HTMLAttributes<HTMLInputElement> {
- tabIndex?: number;
- className?: string;
- value?: string;
- width?: string;
- fontSize?: string;
- fontColor?: ColorOption;
- placeholder?: string;
- type?: string;
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
-}
-
-export const Input = styled.input<InputProps>`
- && {
- all: initial;
- font-size: ${props => props.fontSize};
- width: ${props => props.width};
- padding: 0.1em 0em;
- font-family: 'Inter UI';
- color: ${props => props.theme[props.fontColor || 'white']};
- background: transparent;
- outline: none;
- border: none;
- &::placeholder {
- color: ${props => props.theme[props.fontColor || 'white']} !important;
- opacity: 0.5 !important;
- }
- &::-webkit-outer-spin-button,
- &::-webkit-inner-spin-button {
- -webkit-appearance: none;
- margin: 0;
- }
- }
-`;
-
-Input.defaultProps = {
- width: 'auto',
- fontColor: ColorOption.white,
- fontSize: '12px',
-};
-
-Input.displayName = 'Input';
diff --git a/packages/instant/src/components/ui/overlay.tsx b/packages/instant/src/components/ui/overlay.tsx
deleted file mode 100644
index 0b1be6a65..000000000
--- a/packages/instant/src/components/ui/overlay.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import * as _ from 'lodash';
-
-import { generateMediaWrapper, ScreenWidths } from '../../style/media';
-import { generateOverlayBlack, styled } from '../../style/theme';
-import { zIndex } from '../../style/z_index';
-
-export interface OverlayProps {
- zIndex?: number;
- backgroundColor?: string;
- width?: string;
- height?: string;
- showMaxWidth?: ScreenWidths;
-}
-
-export const Overlay = styled.div<OverlayProps>`
- && {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: ${props => props.zIndex}
- background-color: ${props => props.backgroundColor};
- ${props => props.width && `width: ${props.width};`}
- ${props => props.height && `height: ${props.height};`}
- display: ${props => (props.showMaxWidth ? 'none' : 'block')};
- ${props => props.showMaxWidth && generateMediaWrapper(props.showMaxWidth)`display: block;`}
- }
-`;
-
-Overlay.defaultProps = {
- zIndex: zIndex.overlayDefault,
- backgroundColor: generateOverlayBlack(0.7),
-};
-
-Overlay.displayName = 'Overlay';
diff --git a/packages/instant/src/components/ui/spinner.tsx b/packages/instant/src/components/ui/spinner.tsx
deleted file mode 100644
index 28ebc2598..000000000
--- a/packages/instant/src/components/ui/spinner.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from 'react';
-
-import { FullRotation } from '../animations/full_rotation';
-
-export interface SpinnerProps {
- widthPx: number;
- heightPx: number;
-}
-export const Spinner: React.StatelessComponent<SpinnerProps> = props => {
- return (
- <FullRotation width={`${props.widthPx}px`} height={`${props.heightPx}px`}>
- <svg
- width={props.widthPx}
- height={props.heightPx}
- viewBox="0 0 34 34"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <circle cx="17" cy="17" r="15" stroke="white" strokeOpacity="0.2" strokeWidth="4" />
- <path
- d="M17 32C25.2843 32 32 25.2843 32 17C32 8.71573 25.2843 2 17 2"
- stroke="white"
- strokeWidth="4"
- strokeLinecap="round"
- strokeLinejoin="round"
- />
- </svg>
- </FullRotation>
- );
-};
diff --git a/packages/instant/src/components/ui/text.tsx b/packages/instant/src/components/ui/text.tsx
deleted file mode 100644
index ca120f3bd..000000000
--- a/packages/instant/src/components/ui/text.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption, styled } from '../../style/theme';
-import { util } from '../../util/util';
-
-export interface TextProps {
- fontColor?: ColorOption;
- fontFamily?: string;
- fontStyle?: string;
- fontSize?: string;
- opacity?: number;
- letterSpacing?: string;
- textAlign?: string;
- textTransform?: string;
- lineHeight?: string;
- className?: string;
- minHeight?: string;
- center?: boolean;
- fontWeight?: number | string;
- textDecorationLine?: string;
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
- noWrap?: boolean;
- display?: string;
- href?: string;
- width?: string;
-}
-
-export const Text: React.StatelessComponent<TextProps> = ({ href, onClick, ...rest }) => {
- const computedOnClick = href ? util.createOpenUrlInNewWindow(href) : onClick;
- return <StyledText {...rest} onClick={computedOnClick} />;
-};
-
-const opacityOnHoverAmount = 0.5;
-export const StyledText = styled.div<TextProps>`
- && {
- font-family: 'Inter UI', sans-serif;
- font-style: ${props => props.fontStyle};
- font-weight: ${props => props.fontWeight};
- font-size: ${props => props.fontSize};
- opacity: ${props => props.opacity};
- text-decoration-line: ${props => props.textDecorationLine};
- ${props => (props.lineHeight ? `line-height: ${props.lineHeight}` : '')};
- ${props => (props.center ? 'text-align: center' : '')};
- color: ${props => props.fontColor && props.theme[props.fontColor]};
- ${props => (props.minHeight ? `min-height: ${props.minHeight}` : '')};
- ${props => (props.onClick ? 'cursor: pointer' : '')};
- transition: color 0.5s ease;
- ${props => (props.noWrap ? 'white-space: nowrap' : '')};
- ${props => (props.display ? `display: ${props.display}` : '')};
- ${props => (props.letterSpacing ? `letter-spacing: ${props.letterSpacing}` : '')};
- ${props => (props.textTransform ? `text-transform: ${props.textTransform}` : '')};
- ${props => (props.textAlign ? `text-align: ${props.textAlign}` : '')};
- ${props => (props.width ? `width: ${props.width}` : '')};
- &:hover {
- ${props => (props.onClick ? `opacity: ${opacityOnHoverAmount};` : '')};
- }
- }
-`;
-
-Text.defaultProps = {
- fontFamily: 'Inter UI',
- fontStyle: 'normal',
- fontWeight: 400,
- fontColor: ColorOption.black,
- fontSize: '15px',
- textDecorationLine: 'none',
- noWrap: false,
- display: 'inline-block',
-};
-
-Text.displayName = 'Text';
diff --git a/packages/instant/src/components/wallet_prompt.tsx b/packages/instant/src/components/wallet_prompt.tsx
deleted file mode 100644
index 10433767f..000000000
--- a/packages/instant/src/components/wallet_prompt.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import * as React from 'react';
-
-import { ColorOption } from '../style/theme';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Text } from './ui/text';
-
-export interface WalletPromptProps {
- image: React.ReactNode;
- onClick?: () => void;
- primaryColor: ColorOption;
- secondaryColor: ColorOption;
-}
-
-export const WalletPrompt: React.StatelessComponent<WalletPromptProps> = ({
- onClick,
- image,
- children,
- secondaryColor,
- primaryColor,
-}) => (
- <Container
- padding="10px"
- border={`1px solid ${primaryColor}`}
- backgroundColor={secondaryColor}
- width="100%"
- borderRadius="4px"
- onClick={onClick}
- cursor={onClick ? 'pointer' : undefined}
- boxShadowOnHover={!!onClick}
- >
- <Flex>
- {image}
- <Container marginLeft="10px">
- <Text fontSize="16px" fontColor={primaryColor} fontWeight="500">
- {children}
- </Text>
- </Container>
- </Flex>
- </Container>
-);
-
-WalletPrompt.defaultProps = {
- primaryColor: ColorOption.darkOrange,
- secondaryColor: ColorOption.lightOrange,
-};
-
-WalletPrompt.displayName = 'WalletPrompt';
diff --git a/packages/instant/src/components/zero_ex_instant.tsx b/packages/instant/src/components/zero_ex_instant.tsx
deleted file mode 100644
index e9cb48e61..000000000
--- a/packages/instant/src/components/zero_ex_instant.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as React from 'react';
-
-import { ZeroExInstantContainer } from '../components/zero_ex_instant_container';
-
-import { INJECTED_DIV_CLASS } from '../constants';
-
-import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider';
-
-export type ZeroExInstantProps = ZeroExInstantProviderProps;
-
-export const ZeroExInstant: React.StatelessComponent<ZeroExInstantProps> = props => {
- return (
- <div className={INJECTED_DIV_CLASS}>
- <ZeroExInstantProvider {...props}>
- <ZeroExInstantContainer />
- </ZeroExInstantProvider>
- </div>
- );
-};
-
-ZeroExInstant.displayName = 'ZeroExInstant';
diff --git a/packages/instant/src/components/zero_ex_instant_container.tsx b/packages/instant/src/components/zero_ex_instant_container.tsx
deleted file mode 100644
index e8c64d5d1..000000000
--- a/packages/instant/src/components/zero_ex_instant_container.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import * as React from 'react';
-
-import PoweredByLogo from '../assets/powered_by_0x.svg';
-import { ZERO_EX_SITE_URL } from '../constants';
-import { AvailableERC20TokenSelector } from '../containers/available_erc20_token_selector';
-import { ConnectedBuyOrderProgressOrPaymentMethod } from '../containers/connected_buy_order_progress_or_payment_method';
-import { CurrentStandardSlidingPanel } from '../containers/current_standard_sliding_panel';
-import { LatestBuyQuoteOrderDetails } from '../containers/latest_buy_quote_order_details';
-import { LatestError } from '../containers/latest_error';
-import { SelectedAssetBuyOrderStateButtons } from '../containers/selected_asset_buy_order_state_buttons';
-import { SelectedAssetInstantHeading } from '../containers/selected_asset_instant_heading';
-import { ColorOption } from '../style/theme';
-import { zIndex } from '../style/z_index';
-import { SlideAnimationState } from '../types';
-import { analytics, TokenSelectorClosedVia } from '../util/analytics';
-
-import { CSSReset } from './css_reset';
-import { SlidingPanel } from './sliding_panel';
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-
-export interface ZeroExInstantContainerProps {}
-export interface ZeroExInstantContainerState {
- tokenSelectionPanelAnimationState: SlideAnimationState;
-}
-
-export class ZeroExInstantContainer extends React.PureComponent<
- ZeroExInstantContainerProps,
- ZeroExInstantContainerState
-> {
- public state = {
- tokenSelectionPanelAnimationState: 'none' as SlideAnimationState,
- };
- public render(): React.ReactNode {
- return (
- <React.Fragment>
- <CSSReset />
- <Container
- width={{ default: '350px', sm: '100%' }}
- height={{ default: 'auto', sm: '100%' }}
- position="relative"
- >
- <Container position="relative">
- <LatestError />
- </Container>
- <Container
- zIndex={zIndex.mainContainer}
- position="relative"
- backgroundColor={ColorOption.white}
- borderRadius={{ default: '3px', sm: '0px' }}
- hasBoxShadow={true}
- overflow="hidden"
- height="100%"
- >
- <Flex direction="column" justify="flex-start" height="100%">
- <SelectedAssetInstantHeading onSelectAssetClick={this._handleSymbolClick} />
- <ConnectedBuyOrderProgressOrPaymentMethod />
- <LatestBuyQuoteOrderDetails />
- <Container padding="20px" width="100%">
- <SelectedAssetBuyOrderStateButtons />
- </Container>
- </Flex>
- <SlidingPanel
- animationState={this.state.tokenSelectionPanelAnimationState}
- onClose={this._handlePanelCloseClickedX}
- onAnimationEnd={this._handleSlidingPanelAnimationEnd}
- >
- <AvailableERC20TokenSelector onTokenSelect={this._handlePanelCloseAfterChose} />
- </SlidingPanel>
- <CurrentStandardSlidingPanel />
- </Container>
- <Container
- display={{ sm: 'none', default: 'block' }}
- marginTop="10px"
- marginLeft="auto"
- marginRight="auto"
- width="108px"
- >
- <a href={ZERO_EX_SITE_URL} target="_blank">
- <PoweredByLogo />
- </a>
- </Container>
- </Container>
- </React.Fragment>
- );
- }
- private readonly _handleSymbolClick = (): void => {
- analytics.trackTokenSelectorOpened();
- this.setState({
- tokenSelectionPanelAnimationState: 'slidIn',
- });
- };
- private readonly _handlePanelCloseClickedX = (): void => {
- this._handlePanelClose(TokenSelectorClosedVia.ClickedX);
- };
- private readonly _handlePanelCloseAfterChose = (): void => {
- this._handlePanelClose(TokenSelectorClosedVia.TokenChose);
- };
- private readonly _handlePanelClose = (closedVia: TokenSelectorClosedVia): void => {
- analytics.trackTokenSelectorClosed(closedVia);
- this.setState({
- tokenSelectionPanelAnimationState: 'slidOut',
- });
- };
- private readonly _handleSlidingPanelAnimationEnd = (): void => {
- if (this.state.tokenSelectionPanelAnimationState === 'slidOut') {
- // When the slidOut animation completes, don't keep the panel mounted.
- // Performance optimization
- this.setState({ tokenSelectionPanelAnimationState: 'none' });
- }
- };
-}
diff --git a/packages/instant/src/components/zero_ex_instant_overlay.tsx b/packages/instant/src/components/zero_ex_instant_overlay.tsx
deleted file mode 100644
index 38a716091..000000000
--- a/packages/instant/src/components/zero_ex_instant_overlay.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import * as React from 'react';
-
-import { ZeroExInstantContainer } from '../components/zero_ex_instant_container';
-import { MAIN_CONTAINER_DIV_CLASS, OVERLAY_CLOSE_BUTTON_DIV_CLASS, OVERLAY_DIV_CLASS } from '../constants';
-import { ColorOption } from '../style/theme';
-
-import { Container } from './ui/container';
-import { Flex } from './ui/flex';
-import { Icon } from './ui/icon';
-import { Overlay } from './ui/overlay';
-import { ZeroExInstantProvider, ZeroExInstantProviderProps } from './zero_ex_instant_provider';
-
-export interface ZeroExInstantOverlayProps extends ZeroExInstantProviderProps {
- onClose?: () => void;
- zIndex?: number;
-}
-
-export const ZeroExInstantOverlay: React.StatelessComponent<ZeroExInstantOverlayProps> = props => {
- const { onClose, zIndex, ...rest } = props;
- return (
- <ZeroExInstantProvider {...rest}>
- <Overlay zIndex={zIndex} className={OVERLAY_DIV_CLASS}>
- <Flex height="100vh">
- <Container
- className={OVERLAY_CLOSE_BUTTON_DIV_CLASS}
- position="absolute"
- top="0px"
- right="0px"
- display={{ default: 'initial', sm: 'none' }}
- >
- <Icon
- height={18}
- width={18}
- color={ColorOption.white}
- icon="closeX"
- onClick={onClose}
- padding="2em 2em"
- />
- </Container>
- <Container
- width={{ default: 'auto', sm: '100%' }}
- height={{ default: 'auto', sm: '100%' }}
- className={MAIN_CONTAINER_DIV_CLASS}
- >
- <ZeroExInstantContainer />
- </Container>
- </Flex>
- </Overlay>
- </ZeroExInstantProvider>
- );
-};
-
-ZeroExInstantOverlay.displayName = 'ZeroExInstantOverlay';
diff --git a/packages/instant/src/components/zero_ex_instant_provider.tsx b/packages/instant/src/components/zero_ex_instant_provider.tsx
deleted file mode 100644
index ec8e82ee3..000000000
--- a/packages/instant/src/components/zero_ex_instant_provider.tsx
+++ /dev/null
@@ -1,156 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Provider as ReduxProvider } from 'react-redux';
-
-import { ACCOUNT_UPDATE_INTERVAL_TIME_MS, BUY_QUOTE_UPDATE_INTERVAL_TIME_MS } from '../constants';
-import { SelectedAssetThemeProvider } from '../containers/selected_asset_theme_provider';
-import { asyncData } from '../redux/async_data';
-import { DEFAULT_STATE, DefaultState, State } from '../redux/reducer';
-import { store, Store } from '../redux/store';
-import { fonts } from '../style/fonts';
-import { AccountState, Network, QuoteFetchOrigin, ZeroExInstantBaseConfig } from '../types';
-import { analytics, disableAnalytics } from '../util/analytics';
-import { assetUtils } from '../util/asset';
-import { errorFlasher } from '../util/error_flasher';
-import { setupRollbar } from '../util/error_reporter';
-import { gasPriceEstimator } from '../util/gas_price_estimator';
-import { Heartbeater } from '../util/heartbeater';
-import { generateAccountHeartbeater, generateBuyQuoteHeartbeater } from '../util/heartbeater_factory';
-import { providerStateFactory } from '../util/provider_state_factory';
-
-export type ZeroExInstantProviderProps = ZeroExInstantBaseConfig;
-
-export class ZeroExInstantProvider extends React.PureComponent<ZeroExInstantProviderProps> {
- private readonly _store: Store;
- private _accountUpdateHeartbeat?: Heartbeater;
- private _buyQuoteHeartbeat?: Heartbeater;
-
- // TODO(fragosti): Write tests for this beast once we inject a provider.
- private static _mergeDefaultStateWithProps(
- props: ZeroExInstantProviderProps,
- defaultState: DefaultState = DEFAULT_STATE,
- ): State {
- // use the networkId passed in with the props, otherwise default to that of the default state (1, mainnet)
- const networkId = props.networkId || defaultState.network;
- // construct the ProviderState
- const providerState = providerStateFactory.getInitialProviderState(
- props.orderSource,
- networkId,
- props.provider,
- props.walletDisplayName,
- );
- // merge the additional additionalAssetMetaDataMap with our default map
- const completeAssetMetaDataMap = {
- // Make sure the passed in assetDatas are lower case
- ..._.mapKeys(props.additionalAssetMetaDataMap || {}, (value, key) => key.toLowerCase()),
- ...defaultState.assetMetaDataMap,
- };
- // construct the final state
- const storeStateFromProps: State = {
- ...defaultState,
- providerState,
- network: networkId,
- walletDisplayName: props.walletDisplayName,
- selectedAsset: _.isUndefined(props.defaultSelectedAssetData)
- ? undefined
- : assetUtils.createAssetFromAssetDataOrThrow(
- props.defaultSelectedAssetData,
- completeAssetMetaDataMap,
- networkId,
- ),
- selectedAssetUnitAmount: _.isUndefined(props.defaultAssetBuyAmount)
- ? undefined
- : new BigNumber(props.defaultAssetBuyAmount),
- availableAssets: _.isUndefined(props.availableAssetDatas)
- ? undefined
- : assetUtils.createAssetsFromAssetDatas(props.availableAssetDatas, completeAssetMetaDataMap, networkId),
- assetMetaDataMap: completeAssetMetaDataMap,
- affiliateInfo: props.affiliateInfo,
- };
- return storeStateFromProps;
- }
- constructor(props: ZeroExInstantProviderProps) {
- super(props);
- setupRollbar();
- fonts.include();
- const initialAppState = ZeroExInstantProvider._mergeDefaultStateWithProps(this.props);
- this._store = store.create(initialAppState);
- }
- public componentDidMount(): void {
- const state = this._store.getState();
- const dispatch = this._store.dispatch;
- // tslint:disable-next-line:no-floating-promises
- asyncData.fetchEthPriceAndDispatchToStore(dispatch);
- // fetch available assets if none are specified
- if (_.isUndefined(state.availableAssets)) {
- // tslint:disable-next-line:no-floating-promises
- asyncData.fetchAvailableAssetDatasAndDispatchToStore(state, dispatch);
- }
- if (state.providerState.account.state !== AccountState.None) {
- this._accountUpdateHeartbeat = generateAccountHeartbeater({
- store: this._store,
- shouldPerformImmediatelyOnStart: true,
- });
- this._accountUpdateHeartbeat.start(ACCOUNT_UPDATE_INTERVAL_TIME_MS);
- }
-
- this._buyQuoteHeartbeat = generateBuyQuoteHeartbeater({
- store: this._store,
- shouldPerformImmediatelyOnStart: false,
- });
- this._buyQuoteHeartbeat.start(BUY_QUOTE_UPDATE_INTERVAL_TIME_MS);
- // Trigger first buyquote fetch
- // tslint:disable-next-line:no-floating-promises
- asyncData.fetchCurrentBuyQuoteAndDispatchToStore(state, dispatch, QuoteFetchOrigin.Manual, {
- updateSilently: false,
- });
- // warm up the gas price estimator cache just in case we can't
- // grab the gas price estimate when submitting the transaction
- // tslint:disable-next-line:no-floating-promises
- gasPriceEstimator.getGasInfoAsync();
- // tslint:disable-next-line:no-floating-promises
- this._flashErrorIfWrongNetwork();
-
- // Analytics
- disableAnalytics(this.props.shouldDisableAnalyticsTracking || false);
- analytics.addEventProperties(
- analytics.generateEventProperties(
- state.network,
- this.props.orderSource,
- state.providerState,
- window,
- state.selectedAsset,
- this.props.affiliateInfo,
- state.baseCurrency,
- ),
- );
- analytics.trackInstantOpened();
- }
- public componentWillUnmount(): void {
- if (this._accountUpdateHeartbeat) {
- this._accountUpdateHeartbeat.stop();
- }
- if (this._buyQuoteHeartbeat) {
- this._buyQuoteHeartbeat.stop();
- }
- }
- public render(): React.ReactNode {
- return (
- <ReduxProvider store={this._store}>
- <SelectedAssetThemeProvider>{this.props.children}</SelectedAssetThemeProvider>
- </ReduxProvider>
- );
- }
- private readonly _flashErrorIfWrongNetwork = async (): Promise<void> => {
- const msToShowError = 30000; // 30 seconds
- const state = this._store.getState();
- const network = state.network;
- const web3Wrapper = state.providerState.web3Wrapper;
- const networkOfProvider = await web3Wrapper.getNetworkIdAsync();
- if (network !== networkOfProvider) {
- const errorMessage = `Wrong network detected. Try switching to ${Network[network]}.`;
- errorFlasher.flashNewErrorMessage(this._store.dispatch, errorMessage, msToShowError);
- }
- };
-}
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
deleted file mode 100644
index d407925a3..000000000
--- a/packages/instant/src/constants.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-import { AccountNotReady, AccountState, Network, ProviderType } from './types';
-
-export const BIG_NUMBER_ZERO = new BigNumber(0);
-export const ETH_DECIMALS = 18;
-export const DEFAULT_ZERO_EX_CONTAINER_SELECTOR = '#zeroExInstantContainer';
-export const INJECTED_DIV_CLASS = 'zeroExInstantResetRoot';
-export const INJECTED_DIV_ID = 'zeroExInstant';
-export const OVERLAY_DIV_CLASS = 'zeroExInstantOverlay';
-export const OVERLAY_CLOSE_BUTTON_DIV_CLASS = 'zeroExInstantOverlayCloseButton';
-export const MAIN_CONTAINER_DIV_CLASS = 'zeroExInstantMainContainer';
-export const WEB_3_WRAPPER_TRANSACTION_FAILED_ERROR_MSG_PREFIX = 'Transaction failed';
-export const GWEI_IN_WEI = new BigNumber(1000000000);
-export const ONE_SECOND_MS = 1000;
-export const ONE_MINUTE_MS = ONE_SECOND_MS * 60;
-export const GIT_SHA = process.env.GIT_SHA;
-export const NODE_ENV = process.env.NODE_ENV;
-export const SLIPPAGE_PERCENTAGE = 0.2;
-export const NPM_PACKAGE_VERSION = process.env.NPM_PACKAGE_VERSION;
-export const DEFAULT_UNKOWN_ASSET_NAME = '???';
-export const ACCOUNT_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 5;
-export const BUY_QUOTE_UPDATE_INTERVAL_TIME_MS = ONE_SECOND_MS * 15;
-export const DEFAULT_GAS_PRICE = GWEI_IN_WEI.multipliedBy(6);
-export const DEFAULT_ESTIMATED_TRANSACTION_TIME_MS = ONE_MINUTE_MS * 2;
-export const MAGIC_TRIGGER_ERROR_INPUT = '0€';
-export const MAGIC_TRIGGER_ERROR_MESSAGE = 'Triggered error';
-export const ETH_GAS_STATION_API_BASE_URL = 'https://ethgasstation.info';
-export const HEAP_ANALYTICS_ID = process.env.HEAP_ANALYTICS_ID;
-export const HEAP_ENABLED = process.env.HEAP_ENABLED;
-export const COINBASE_API_BASE_URL = 'https://api.coinbase.com/v2';
-export const PROGRESS_STALL_AT_WIDTH = '95%';
-export const PROGRESS_FINISH_ANIMATION_TIME_MS = 200;
-export const HOST_DOMAINS_EXTERNAL = [
- '0x-instant-staging.s3-website-us-east-1.amazonaws.com',
- '0x-instant-dogfood.s3-website-us-east-1.amazonaws.com',
- 'instant.0xproject.com',
-];
-export const HOST_DOMAINS_LOCAL = ['localhost', '127.0.0.1', '0.0.0.0'];
-export const ROLLBAR_CLIENT_TOKEN = process.env.ROLLBAR_CLIENT_TOKEN;
-export const ROLLBAR_ENABLED = process.env.ROLLBAR_ENABLED;
-export const INSTANT_DISCHARGE_TARGET = process.env.INSTANT_DISCHARGE_TARGET as
- | 'production'
- | 'dogfood'
- | 'staging'
- | undefined;
-export const COINBASE_WALLET_IOS_APP_STORE_URL = 'https://itunes.apple.com/us/app/coinbase-wallet/id1278383455?mt=8';
-export const COINBASE_WALLET_ANDROID_APP_STORE_URL = 'https://play.google.com/store/apps/details?id=org.toshi&hl=en';
-export const COINBASE_WALLET_SITE_URL = 'https://wallet.coinbase.com/';
-export const META_MASK_FIREFOX_STORE_URL = 'https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/';
-export const META_MASK_CHROME_STORE_URL =
- 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn?hl=en';
-export const META_MASK_OPERA_STORE_URL = 'https://addons.opera.com/en/extensions/details/metamask/';
-export const META_MASK_SITE_URL = 'https://metamask.io/';
-export const ETHEREUM_NODE_URL_BY_NETWORK = {
- [Network.Mainnet]: 'https://mainnet.infura.io/',
- [Network.Kovan]: 'https://kovan.infura.io/',
-};
-export const ZERO_EX_SITE_URL = 'https://www.0xproject.com/';
-export const BLOCK_POLLING_INTERVAL_MS = 10000; // 10s
-export const NO_ACCOUNT: AccountNotReady = {
- state: AccountState.None,
-};
-export const LOADING_ACCOUNT: AccountNotReady = {
- state: AccountState.Loading,
-};
-export const LOCKED_ACCOUNT: AccountNotReady = {
- state: AccountState.Locked,
-};
-export const PROVIDER_TYPE_TO_NAME: { [key in ProviderType]: string } = {
- [ProviderType.Cipher]: 'Cipher',
- [ProviderType.MetaMask]: 'MetaMask',
- [ProviderType.Mist]: 'Mist',
- [ProviderType.CoinbaseWallet]: 'Coinbase Wallet',
- [ProviderType.Parity]: 'Parity',
- [ProviderType.TrustWallet]: 'Trust Wallet',
- [ProviderType.Opera]: 'Opera Wallet',
- [ProviderType.Fallback]: 'Fallback',
-};
diff --git a/packages/instant/src/containers/available_erc20_token_selector.ts b/packages/instant/src/containers/available_erc20_token_selector.ts
deleted file mode 100644
index 4d4218d22..000000000
--- a/packages/instant/src/containers/available_erc20_token_selector.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { State } from '../redux/reducer';
-import { ERC20Asset } from '../types';
-import { assetUtils } from '../util/asset';
-
-import { ERC20TokenSelector } from '../components/erc20_token_selector';
-import { Action, actions } from '../redux/actions';
-
-export interface AvailableERC20TokenSelectorProps {
- onTokenSelect?: (token: ERC20Asset) => void;
-}
-
-interface ConnectedState {
- tokens: ERC20Asset[];
-}
-
-interface ConnectedDispatch {
- onTokenSelect: (token: ERC20Asset) => void;
-}
-
-const mapStateToProps = (state: State, _ownProps: AvailableERC20TokenSelectorProps): ConnectedState => ({
- tokens: assetUtils.getERC20AssetsFromAssets(state.availableAssets || []),
-});
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- ownProps: AvailableERC20TokenSelectorProps,
-): ConnectedDispatch => ({
- onTokenSelect: (token: ERC20Asset) => {
- dispatch(actions.updateSelectedAsset(token));
- dispatch(actions.resetAmount());
- if (ownProps.onTokenSelect) {
- ownProps.onTokenSelect(token);
- }
- },
-});
-
-export const AvailableERC20TokenSelector: React.ComponentClass<AvailableERC20TokenSelectorProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(ERC20TokenSelector);
diff --git a/packages/instant/src/containers/connected_account_payment_method.ts b/packages/instant/src/containers/connected_account_payment_method.ts
deleted file mode 100644
index f648f0b54..000000000
--- a/packages/instant/src/containers/connected_account_payment_method.ts
+++ /dev/null
@@ -1,94 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { PaymentMethod, PaymentMethodProps } from '../components/payment_method';
-import {
- COINBASE_WALLET_ANDROID_APP_STORE_URL,
- COINBASE_WALLET_IOS_APP_STORE_URL,
- COINBASE_WALLET_SITE_URL,
-} from '../constants';
-import { Action, actions } from '../redux/actions';
-import { asyncData } from '../redux/async_data';
-import { State } from '../redux/reducer';
-import { Network, Omit, OperatingSystem, ProviderState, StandardSlidingPanelContent, WalletSuggestion } from '../types';
-import { analytics } from '../util/analytics';
-import { envUtil } from '../util/env';
-
-export interface ConnectedAccountPaymentMethodProps {}
-
-interface ConnectedState {
- network: Network;
- providerState: ProviderState;
- walletDisplayName?: string;
-}
-
-interface ConnectedDispatch {
- openInstallWalletPanel: () => void;
- unlockWalletAndDispatchToStore: (providerState: ProviderState) => void;
-}
-
-type ConnectedProps = Omit<PaymentMethodProps, keyof ConnectedAccountPaymentMethodProps>;
-
-type FinalProps = ConnectedProps & ConnectedAccountPaymentMethodProps;
-
-const mapStateToProps = (state: State, _ownProps: ConnectedAccountPaymentMethodProps): ConnectedState => ({
- network: state.network,
- providerState: state.providerState,
- walletDisplayName: state.walletDisplayName,
-});
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- ownProps: ConnectedAccountPaymentMethodProps,
-): ConnectedDispatch => ({
- openInstallWalletPanel: () => dispatch(actions.openStandardSlidingPanel(StandardSlidingPanelContent.InstallWallet)),
- unlockWalletAndDispatchToStore: (providerState: ProviderState) => {
- analytics.trackAccountUnlockRequested();
- // tslint:disable-next-line:no-floating-promises
- asyncData.fetchAccountInfoAndDispatchToStore(providerState, dispatch, true);
- },
-});
-
-const mergeProps = (
- connectedState: ConnectedState,
- connectedDispatch: ConnectedDispatch,
- ownProps: ConnectedAccountPaymentMethodProps,
-): FinalProps => ({
- ...ownProps,
- network: connectedState.network,
- account: connectedState.providerState.account,
- walletDisplayName: connectedState.providerState.displayName,
- onUnlockWalletClick: () => connectedDispatch.unlockWalletAndDispatchToStore(connectedState.providerState),
- onInstallWalletClick: () => {
- const isMobile = envUtil.isMobileOperatingSystem();
- const walletSuggestion: WalletSuggestion = isMobile
- ? WalletSuggestion.CoinbaseWallet
- : WalletSuggestion.MetaMask;
-
- analytics.trackInstallWalletClicked(walletSuggestion);
- if (walletSuggestion === WalletSuggestion.MetaMask) {
- connectedDispatch.openInstallWalletPanel();
- } else {
- const operatingSystem = envUtil.getOperatingSystem();
- let url = COINBASE_WALLET_SITE_URL;
- switch (operatingSystem) {
- case OperatingSystem.Android:
- url = COINBASE_WALLET_ANDROID_APP_STORE_URL;
- break;
- case OperatingSystem.iOS:
- url = COINBASE_WALLET_IOS_APP_STORE_URL;
- break;
- default:
- break;
- }
- window.open(url, '_blank');
- }
- },
-});
-
-export const ConnectedAccountPaymentMethod: React.ComponentClass<ConnectedAccountPaymentMethodProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
- mergeProps,
-)(PaymentMethod);
diff --git a/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx b/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx
deleted file mode 100644
index cace18e7e..000000000
--- a/packages/instant/src/containers/connected_buy_order_progress_or_payment_method.tsx
+++ /dev/null
@@ -1,35 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-
-import { State } from '../redux/reducer';
-import { OrderProcessState } from '../types';
-
-import { ConnectedAccountPaymentMethod } from './connected_account_payment_method';
-import { SelectedAssetBuyOrderProgress } from './selected_asset_buy_order_progress';
-
-interface BuyOrderProgressOrPaymentMethodProps {
- orderProcessState: OrderProcessState;
-}
-export const BuyOrderProgressOrPaymentMethod = (props: BuyOrderProgressOrPaymentMethodProps) => {
- const { orderProcessState } = props;
- if (
- orderProcessState === OrderProcessState.Processing ||
- orderProcessState === OrderProcessState.Success ||
- orderProcessState === OrderProcessState.Failure
- ) {
- return <SelectedAssetBuyOrderProgress />;
- } else {
- return <ConnectedAccountPaymentMethod />;
- }
- return null;
-};
-
-interface ConnectedState extends BuyOrderProgressOrPaymentMethodProps {}
-
-export interface ConnectedBuyOrderProgressOrPaymentMethodProps {}
-const mapStateToProps = (state: State, _ownProps: ConnectedBuyOrderProgressOrPaymentMethodProps): ConnectedState => ({
- orderProcessState: state.buyOrderState.processState,
-});
-export const ConnectedBuyOrderProgressOrPaymentMethod: React.ComponentClass<
- ConnectedBuyOrderProgressOrPaymentMethodProps
-> = connect(mapStateToProps)(BuyOrderProgressOrPaymentMethod);
diff --git a/packages/instant/src/containers/current_standard_sliding_panel.ts b/packages/instant/src/containers/current_standard_sliding_panel.ts
deleted file mode 100644
index 82ac7fa1b..000000000
--- a/packages/instant/src/containers/current_standard_sliding_panel.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { StandardSlidingPanel } from '../components/standard_sliding_panel';
-import { Action, actions } from '../redux/actions';
-import { State } from '../redux/reducer';
-import { StandardSlidingPanelSettings } from '../types';
-
-export interface CurrentStandardSlidingPanelProps {}
-
-interface ConnectedState extends StandardSlidingPanelSettings {}
-
-interface ConnectedDispatch {
- onClose: () => void;
-}
-
-const mapStateToProps = (state: State, _ownProps: CurrentStandardSlidingPanelProps): ConnectedState =>
- state.standardSlidingPanelSettings;
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- ownProps: CurrentStandardSlidingPanelProps,
-): ConnectedDispatch => ({
- onClose: () => dispatch(actions.closeStandardSlidingPanel()),
-});
-
-export const CurrentStandardSlidingPanel: React.ComponentClass<CurrentStandardSlidingPanelProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(StandardSlidingPanel);
diff --git a/packages/instant/src/containers/latest_buy_quote_order_details.ts b/packages/instant/src/containers/latest_buy_quote_order_details.ts
deleted file mode 100644
index 148735c47..000000000
--- a/packages/instant/src/containers/latest_buy_quote_order_details.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { oc } from 'ts-optchain';
-
-import { Action, actions } from '../redux/actions';
-import { State } from '../redux/reducer';
-
-import { OrderDetails, OrderDetailsProps } from '../components/order_details';
-import { AsyncProcessState, BaseCurrency, Omit } from '../types';
-import { assetUtils } from '../util/asset';
-
-type DispatchProperties = 'onBaseCurrencySwitchEth' | 'onBaseCurrencySwitchUsd';
-
-interface ConnectedState extends Omit<OrderDetailsProps, DispatchProperties> {}
-const mapStateToProps = (state: State, _ownProps: LatestBuyQuoteOrderDetailsProps): ConnectedState => ({
- // use the worst case quote info
- buyQuoteInfo: oc(state).latestBuyQuote.worstCaseQuoteInfo(),
- selectedAssetUnitAmount: state.selectedAssetUnitAmount,
- ethUsdPrice: state.ethUsdPrice,
- isLoading: state.quoteRequestState === AsyncProcessState.Pending,
- assetName: assetUtils.bestNameForAsset(state.selectedAsset),
- baseCurrency: state.baseCurrency,
-});
-
-interface ConnectedDispatch extends Pick<OrderDetailsProps, DispatchProperties> {}
-const mapDispatchToProps = (dispatch: Dispatch<Action>): ConnectedDispatch => ({
- onBaseCurrencySwitchEth: () => {
- dispatch(actions.updateBaseCurrency(BaseCurrency.ETH));
- },
- onBaseCurrencySwitchUsd: () => {
- dispatch(actions.updateBaseCurrency(BaseCurrency.USD));
- },
-});
-
-export interface LatestBuyQuoteOrderDetailsProps {}
-export const LatestBuyQuoteOrderDetails: React.ComponentClass<LatestBuyQuoteOrderDetailsProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(OrderDetails);
diff --git a/packages/instant/src/containers/latest_error.tsx b/packages/instant/src/containers/latest_error.tsx
deleted file mode 100644
index 57a2dbdc2..000000000
--- a/packages/instant/src/containers/latest_error.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import * as React from 'react';
-
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { SlidingError } from '../components/sliding_error';
-import { Container } from '../components/ui/container';
-import { Overlay } from '../components/ui/overlay';
-import { Action } from '../redux/actions';
-import { State } from '../redux/reducer';
-import { ScreenWidths } from '../style/media';
-import { generateOverlayBlack } from '../style/theme';
-import { zIndex } from '../style/z_index';
-import { Asset, DisplayStatus, Omit, SlideAnimationState } from '../types';
-import { errorFlasher } from '../util/error_flasher';
-
-interface LatestErrorComponentProps {
- asset?: Asset;
- latestErrorMessage?: string;
- animationState: SlideAnimationState;
- shouldRenderOverlay: boolean;
- onOverlayClick: () => void;
-}
-
-const LatestErrorComponent: React.StatelessComponent<LatestErrorComponentProps> = props => {
- if (!props.latestErrorMessage) {
- // Render a hidden SlidingError such that instant does not move when a real error is rendered.
- return (
- <Container isHidden={true}>
- <SlidingError animationState="slidIn" icon="😢" message="" />
- </Container>
- );
- }
- return (
- <React.Fragment>
- <SlidingError animationState={props.animationState} icon="😢" message={props.latestErrorMessage} />
- {props.shouldRenderOverlay && (
- <Overlay
- onClick={props.onOverlayClick}
- zIndex={zIndex.containerOverlay}
- showMaxWidth={ScreenWidths.Sm}
- backgroundColor={generateOverlayBlack(0.4)}
- />
- )}
- </React.Fragment>
- );
-};
-
-export interface LatestErrorProps {}
-interface ConnectedState extends Omit<LatestErrorComponentProps, 'onOverlayClick'> {}
-const mapStateToProps = (state: State, _ownProps: LatestErrorProps): ConnectedState => ({
- asset: state.selectedAsset,
- latestErrorMessage: state.latestErrorMessage,
- animationState: state.latestErrorDisplayStatus === DisplayStatus.Present ? 'slidIn' : 'slidOut',
- shouldRenderOverlay: state.latestErrorDisplayStatus === DisplayStatus.Present,
-});
-
-type ConnectedDispatch = Pick<LatestErrorComponentProps, 'onOverlayClick'>;
-const mapDispatchToProps = (dispatch: Dispatch<Action>, _ownProps: LatestErrorProps): ConnectedDispatch => ({
- onOverlayClick: () => {
- errorFlasher.clearError(dispatch);
- },
-});
-
-export const LatestError = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(LatestErrorComponent);
diff --git a/packages/instant/src/containers/selected_asset_buy_order_progress.ts b/packages/instant/src/containers/selected_asset_buy_order_progress.ts
deleted file mode 100644
index 7c8c24676..000000000
--- a/packages/instant/src/containers/selected_asset_buy_order_progress.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { connect } from 'react-redux';
-
-import { BuyOrderProgress } from '../components/buy_order_progress';
-import { State } from '../redux/reducer';
-import { OrderState } from '../types';
-
-interface ConnectedState {
- buyOrderState: OrderState;
-}
-const mapStateToProps = (state: State, _ownProps: {}): ConnectedState => ({
- buyOrderState: state.buyOrderState,
-});
-export const SelectedAssetBuyOrderProgress = connect(mapStateToProps)(BuyOrderProgress);
diff --git a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts b/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
deleted file mode 100644
index 4da99cf04..000000000
--- a/packages/instant/src/containers/selected_asset_buy_order_state_buttons.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import { AssetBuyer, AssetBuyerError, BuyQuote } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { BuyOrderStateButtons } from '../components/buy_order_state_buttons';
-import { Action, actions } from '../redux/actions';
-import { State } from '../redux/reducer';
-import { AccountState, AffiliateInfo, Asset, OrderProcessState, ZeroExInstantError } from '../types';
-import { analytics } from '../util/analytics';
-import { errorFlasher } from '../util/error_flasher';
-import { etherscanUtil } from '../util/etherscan';
-
-interface ConnectedState {
- accountAddress?: string;
- accountEthBalanceInWei?: BigNumber;
- buyQuote?: BuyQuote;
- buyOrderProcessingState: OrderProcessState;
- assetBuyer: AssetBuyer;
- web3Wrapper: Web3Wrapper;
- affiliateInfo?: AffiliateInfo;
- selectedAsset?: Asset;
- onViewTransaction: () => void;
-}
-
-interface ConnectedDispatch {
- onValidationPending: (buyQuote: BuyQuote) => void;
- onSignatureDenied: (buyQuote: BuyQuote) => void;
- onBuyProcessing: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => void;
- onBuySuccess: (buyQuote: BuyQuote, txHash: string) => void;
- onBuyFailure: (buyQuote: BuyQuote, txHash: string) => void;
- onRetry: () => void;
- onValidationFail: (buyQuote: BuyQuote, errorMessage: AssetBuyerError | ZeroExInstantError) => void;
-}
-export interface SelectedAssetBuyOrderStateButtons {}
-const mapStateToProps = (state: State, _ownProps: SelectedAssetBuyOrderStateButtons): ConnectedState => {
- const assetBuyer = state.providerState.assetBuyer;
- const web3Wrapper = state.providerState.web3Wrapper;
- const account = state.providerState.account;
- const accountAddress = account.state === AccountState.Ready ? account.address : undefined;
- const accountEthBalanceInWei = account.state === AccountState.Ready ? account.ethBalanceInWei : undefined;
- const selectedAsset = state.selectedAsset;
- return {
- accountAddress,
- accountEthBalanceInWei,
- buyOrderProcessingState: state.buyOrderState.processState,
- assetBuyer,
- web3Wrapper,
- buyQuote: state.latestBuyQuote,
- affiliateInfo: state.affiliateInfo,
- selectedAsset,
- onViewTransaction: () => {
- if (
- state.buyOrderState.processState === OrderProcessState.Processing ||
- state.buyOrderState.processState === OrderProcessState.Success ||
- state.buyOrderState.processState === OrderProcessState.Failure
- ) {
- const etherscanUrl = etherscanUtil.getEtherScanTxnAddressIfExists(
- state.buyOrderState.txHash,
- assetBuyer.networkId,
- );
- if (etherscanUrl) {
- analytics.trackTransactionViewed(state.buyOrderState.processState);
-
- window.open(etherscanUrl, '_blank');
- return;
- }
- }
- },
- };
-};
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- ownProps: SelectedAssetBuyOrderStateButtons,
-): ConnectedDispatch => ({
- onValidationPending: (buyQuote: BuyQuote) => {
- dispatch(actions.setBuyOrderStateValidating());
- },
- onBuyProcessing: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) => {
- dispatch(actions.setBuyOrderStateProcessing(txHash, startTimeUnix, expectedEndTimeUnix));
- },
- onBuySuccess: (buyQuote: BuyQuote, txHash: string) => dispatch(actions.setBuyOrderStateSuccess(txHash)),
- onBuyFailure: (buyQuote: BuyQuote, txHash: string) => dispatch(actions.setBuyOrderStateFailure(txHash)),
- onSignatureDenied: () => {
- dispatch(actions.resetAmount());
- const errorMessage = 'You denied this transaction';
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage);
- },
- onValidationFail: (buyQuote, error) => {
- dispatch(actions.setBuyOrderStateNone());
- if (error === ZeroExInstantError.InsufficientETH) {
- const errorMessage = "You don't have enough ETH";
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage);
- } else if (error === ZeroExInstantError.CouldNotSubmitTransaction) {
- const errorMessage = 'Could not submit transaction';
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage);
- } else {
- errorFlasher.flashNewErrorMessage(dispatch);
- }
- },
- onRetry: () => {
- dispatch(actions.resetAmount());
- },
-});
-
-export const SelectedAssetBuyOrderStateButtons: React.ComponentClass<SelectedAssetBuyOrderStateButtons> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(BuyOrderStateButtons);
diff --git a/packages/instant/src/containers/selected_asset_instant_heading.ts b/packages/instant/src/containers/selected_asset_instant_heading.ts
deleted file mode 100644
index 8dc127e1d..000000000
--- a/packages/instant/src/containers/selected_asset_instant_heading.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { oc } from 'ts-optchain';
-
-import { State } from '../redux/reducer';
-import { AsyncProcessState, ERC20Asset, OrderState } from '../types';
-
-import { InstantHeading } from '../components/instant_heading';
-
-export interface InstantHeadingProps {
- onSelectAssetClick?: (asset?: ERC20Asset) => void;
-}
-
-interface ConnectedState {
- selectedAssetUnitAmount?: BigNumber;
- totalEthBaseUnitAmount?: BigNumber;
- ethUsdPrice?: BigNumber;
- quoteRequestState: AsyncProcessState;
- buyOrderState: OrderState;
-}
-
-const mapStateToProps = (state: State, _ownProps: InstantHeadingProps): ConnectedState => ({
- selectedAssetUnitAmount: state.selectedAssetUnitAmount,
- totalEthBaseUnitAmount: oc(state).latestBuyQuote.worstCaseQuoteInfo.totalEthAmount(),
- ethUsdPrice: state.ethUsdPrice,
- quoteRequestState: state.quoteRequestState,
- buyOrderState: state.buyOrderState,
-});
-
-export const SelectedAssetInstantHeading: React.ComponentClass<InstantHeadingProps> = connect(mapStateToProps)(
- InstantHeading,
-);
diff --git a/packages/instant/src/containers/selected_asset_theme_provider.ts b/packages/instant/src/containers/selected_asset_theme_provider.ts
deleted file mode 100644
index 6e6b83d73..000000000
--- a/packages/instant/src/containers/selected_asset_theme_provider.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-
-import { State } from '../redux/reducer';
-import { Theme, theme as defaultTheme, ThemeProvider } from '../style/theme';
-import { Asset } from '../types';
-
-export interface SelectedAssetThemeProviderProps {}
-
-interface ConnectedState {
- theme: Theme;
-}
-
-const getTheme = (asset?: Asset): Theme => {
- if (!_.isUndefined(asset) && !_.isUndefined(asset.metaData.primaryColor)) {
- return {
- ...defaultTheme,
- primaryColor: asset.metaData.primaryColor,
- };
- }
- return defaultTheme;
-};
-
-const mapStateToProps = (state: State, _ownProps: SelectedAssetThemeProviderProps): ConnectedState => {
- const theme = getTheme(state.selectedAsset);
- return { theme };
-};
-
-export const SelectedAssetThemeProvider: React.ComponentClass<SelectedAssetThemeProviderProps> = connect(
- mapStateToProps,
-)(ThemeProvider);
diff --git a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts b/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
deleted file mode 100644
index 4b9993332..000000000
--- a/packages/instant/src/containers/selected_erc20_asset_amount_input.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import { AssetBuyer } from '@0x/asset-buyer';
-import { AssetProxyId } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-
-import { ERC20AssetAmountInput, ERC20AssetAmountInputProps } from '../components/erc20_asset_amount_input';
-import { Action, actions } from '../redux/actions';
-import { State } from '../redux/reducer';
-import { ColorOption } from '../style/theme';
-import { AffiliateInfo, ERC20Asset, Omit, OrderProcessState, QuoteFetchOrigin } from '../types';
-import { buyQuoteUpdater } from '../util/buy_quote_updater';
-
-export interface SelectedERC20AssetAmountInputProps {
- fontColor?: ColorOption;
- startingFontSizePx: number;
- onSelectAssetClick?: (asset?: ERC20Asset) => void;
-}
-
-interface ConnectedState {
- assetBuyer: AssetBuyer;
- value?: BigNumber;
- asset?: ERC20Asset;
- isInputDisabled: boolean;
- numberOfAssetsAvailable?: number;
- affiliateInfo?: AffiliateInfo;
- canSelectOtherAsset: boolean;
-}
-
-interface ConnectedDispatch {
- updateBuyQuote: (
- assetBuyer: AssetBuyer,
- value?: BigNumber,
- asset?: ERC20Asset,
- affiliateInfo?: AffiliateInfo,
- ) => void;
-}
-
-type ConnectedProps = Omit<ERC20AssetAmountInputProps, keyof SelectedERC20AssetAmountInputProps>;
-
-type FinalProps = ConnectedProps & SelectedERC20AssetAmountInputProps;
-
-const mapStateToProps = (state: State, _ownProps: SelectedERC20AssetAmountInputProps): ConnectedState => {
- const processState = state.buyOrderState.processState;
- const isInputEnabled = processState === OrderProcessState.None || processState === OrderProcessState.Failure;
- const isInputDisabled = !isInputEnabled;
- const selectedAsset =
- !_.isUndefined(state.selectedAsset) && state.selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20
- ? (state.selectedAsset as ERC20Asset)
- : undefined;
- const numberOfAssetsAvailable = _.isUndefined(state.availableAssets) ? undefined : state.availableAssets.length;
- const canSelectOtherAsset =
- numberOfAssetsAvailable && numberOfAssetsAvailable > 1
- ? isInputEnabled || processState === OrderProcessState.Success
- : false;
-
- const assetBuyer = state.providerState.assetBuyer;
- return {
- assetBuyer,
- value: state.selectedAssetUnitAmount,
- asset: selectedAsset,
- isInputDisabled,
- numberOfAssetsAvailable,
- affiliateInfo: state.affiliateInfo,
- canSelectOtherAsset,
- };
-};
-
-const debouncedUpdateBuyQuoteAsync = _.debounce(buyQuoteUpdater.updateBuyQuoteAsync.bind(buyQuoteUpdater), 200, {
- trailing: true,
-}) as typeof buyQuoteUpdater.updateBuyQuoteAsync;
-
-const mapDispatchToProps = (
- dispatch: Dispatch<Action>,
- _ownProps: SelectedERC20AssetAmountInputProps,
-): ConnectedDispatch => ({
- updateBuyQuote: (assetBuyer, value, asset, affiliateInfo) => {
- // Update the input
- dispatch(actions.updateSelectedAssetAmount(value));
- // invalidate the last buy quote.
- dispatch(actions.updateLatestBuyQuote(undefined));
- // reset our buy state
- dispatch(actions.setBuyOrderStateNone());
-
- if (!_.isUndefined(value) && value.isGreaterThan(0) && !_.isUndefined(asset)) {
- // even if it's debounced, give them the illusion it's loading
- dispatch(actions.setQuoteRequestStatePending());
- // tslint:disable-next-line:no-floating-promises
- debouncedUpdateBuyQuoteAsync(assetBuyer, dispatch, asset, value, QuoteFetchOrigin.Manual, {
- setPending: true,
- dispatchErrors: true,
- affiliateInfo,
- });
- }
- },
-});
-
-const mergeProps = (
- connectedState: ConnectedState,
- connectedDispatch: ConnectedDispatch,
- ownProps: SelectedERC20AssetAmountInputProps,
-): FinalProps => {
- return {
- ...ownProps,
- asset: connectedState.asset,
- value: connectedState.value,
- onChange: (value, asset) => {
- connectedDispatch.updateBuyQuote(connectedState.assetBuyer, value, asset, connectedState.affiliateInfo);
- },
- isInputDisabled: connectedState.isInputDisabled,
- numberOfAssetsAvailable: connectedState.numberOfAssetsAvailable,
- canSelectOtherAsset: connectedState.canSelectOtherAsset,
- };
-};
-
-export const SelectedERC20AssetAmountInput: React.ComponentClass<SelectedERC20AssetAmountInputProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
- mergeProps,
-)(ERC20AssetAmountInput);
diff --git a/packages/instant/src/data/asset_data_network_mapping.ts b/packages/instant/src/data/asset_data_network_mapping.ts
deleted file mode 100644
index 4fd0a25ed..000000000
--- a/packages/instant/src/data/asset_data_network_mapping.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import * as _ from 'lodash';
-
-import { Network } from '../types';
-
-interface AssetDataByNetwork {
- [Network.Kovan]?: string;
- [Network.Mainnet]?: string;
-}
-
-export const assetDataNetworkMapping: AssetDataByNetwork[] = [
- // ZRX
- {
- [Network.Mainnet]: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- [Network.Kovan]: '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa',
- },
- // SPANK
- {
- [Network.Mainnet]: '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18',
- [Network.Kovan]: '0xf47261b00000000000000000000000007c9eee8448f3a7d1193389652d863b27e543272d',
- },
- // OMG
- {
- [Network.Mainnet]: '0xf47261b0000000000000000000000000d26114cd6ee289accf82350c8d8487fedb8a0c07',
- [Network.Kovan]: '0xf47261b000000000000000000000000046096d8ec059dbaae2950b30e01634ff0dc652ec',
- },
- // MKR
- {
- [Network.Mainnet]: '0xf47261b00000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2',
- // 0x Kovan MKR
- [Network.Kovan]: '0xf47261b00000000000000000000000007b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
- },
- // BAT
- {
- [Network.Mainnet]: '0xf47261b00000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef',
- [Network.Kovan]: '0xf47261b0000000000000000000000000c87faa7a58f0adf306bad9e7d892fb045a20e5af',
- },
- // SNT
- {
- [Network.Mainnet]: '0xf47261b0000000000000000000000000744d70fdbe2ba4cf95131626614a1763df805b9e',
- [Network.Kovan]: '0xf47261b00000000000000000000000009cfe76a718ea75e3e8ce4fc7ad0fef84be70919b',
- },
- // MANA
- {
- [Network.Mainnet]: '0xf47261b00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc942',
- [Network.Kovan]: '0xf47261b0000000000000000000000000c64edfc78321673435fbeebdaaa7f9d755963542',
- },
- // GNT
- {
- [Network.Mainnet]: '0xf47261b0000000000000000000000000a74476443119a942de498590fe1f2454d7d4ac0d',
- // 0x Kovan GNT
- [Network.Kovan]: '0xf47261b000000000000000000000000031fb614e223706f15d0d3c5f4b08bdf0d5c78623',
- },
- // SUB
- {
- [Network.Mainnet]: '0xf47261b000000000000000000000000012480e24eb5bec1a9d4369cab6a80cad3c0a377a',
- },
- // Dentacoin
- {
- [Network.Mainnet]: '0xf47261b000000000000000000000000008d32b0da63e2C3bcF8019c9c5d849d7a9d791e6',
- },
- // REP
- {
- [Network.Kovan]: '0xf47261b00000000000000000000000008cb3971b8eb709c14616bd556ff6683019e90d9c',
- [Network.Mainnet]: '0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862',
- },
-];
diff --git a/packages/instant/src/data/asset_meta_data_map.ts b/packages/instant/src/data/asset_meta_data_map.ts
deleted file mode 100644
index 88611a8c0..000000000
--- a/packages/instant/src/data/asset_meta_data_map.ts
+++ /dev/null
@@ -1,202 +0,0 @@
-import { AssetProxyId, ObjectMap } from '@0x/types';
-
-import { AssetMetaData } from '../types';
-
-export const assetMetaDataMap: ObjectMap<AssetMetaData> = {
- '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#333333',
- symbol: 'zrx',
- name: '0x',
- },
- '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#EC4F81',
- symbol: 'spank',
- name: 'Spank',
- },
- '0xf47261b0000000000000000000000000d26114cd6ee289accf82350c8d8487fedb8a0c07': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#2458E7',
- symbol: 'omg',
- name: 'OmiseGo',
- },
- '0xf47261b00000000000000000000000009f8f72aa9304c8b593d555f12ef6589cc3a579a2': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#68CCBB',
- symbol: 'mkr',
- name: 'Maker',
- },
- '0xf47261b00000000000000000000000000d8775f648430679a709e98d2b0cb6250d2887ef': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#FF5000',
- symbol: 'bat',
- name: 'Basic Attention Token',
- },
- '0xf47261b0000000000000000000000000744d70fdbe2ba4cf95131626614a1763df805b9e': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#4763D7',
- symbol: 'snt',
- name: 'Status',
- },
- '0xf47261b00000000000000000000000000f5d2fb29fb7d3cfee444a200298f468908cc942': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#f08839',
- symbol: 'mana',
- name: 'Decentraland',
- },
- '0xf47261b00000000000000000000000001985365e9f78359a9b6ad760e32412f4a445e862': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#512D80',
- symbol: 'rep',
- name: 'Augur',
- },
- '0xf47261b00000000000000000000000000abdace70d3790235af448c88547603b945604ea': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#2c3c8c',
- symbol: 'dnt',
- name: 'district0x',
- },
- '0xf47261b000000000000000000000000005f4a42e251f2d52b8ed15e9fedaacfcef1fad27': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 12,
- primaryColor: '#048998',
- symbol: 'zil',
- name: 'Zilliqa',
- },
- '0xf47261b00000000000000000000000008f8221afbb33998d8584a2b05749ba73c37a938a': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#58BFD6',
- symbol: 'req',
- name: 'Request Network',
- },
- '0xf47261b0000000000000000000000000e0b7927c4af23765cb51314a0e0521a9645f0e2a': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 9,
- primaryColor: '#E1AA3E',
- symbol: 'dgd',
- name: 'DigixDao',
- },
- '0xf47261b00000000000000000000000004f3afec4e5a3f2a6a1a411def7d7dfe50ee057bf': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 9,
- primaryColor: '#E1AA3E',
- symbol: 'dgx',
- name: 'Digix Gold Token',
- },
- '0xf47261b0000000000000000000000000419d0d8bdd9af5e606ae2232ed285aff190e711b': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#E40057',
- symbol: 'fun',
- name: 'FunFair',
- },
- '0xf47261b000000000000000000000000041e5560054824ea6b0732e656e3ad64e20e94e45': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#04bc24',
- symbol: 'cvc',
- name: 'Civic',
- },
- '0xf47261b00000000000000000000000005ca9a71b1d01849c0a95490cc00559717fcf0d1d': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#F7296E',
- symbol: 'ae',
- name: 'Aeternity',
- },
- '0xf47261b0000000000000000000000000408e41876cccdc0f92210600ef50372656052a38': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#233C5A',
- symbol: 'ren',
- name: 'Republic Protocol',
- },
- '0xf47261b0000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#325CD2',
- symbol: 'link',
- name: 'ChainLink',
- },
- '0xf47261b00000000000000000000000006810e776880c02933d47db1b9fc05908e5386b96': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#48A4C0',
- symbol: 'gno',
- name: 'Gnosis',
- },
- '0xf47261b0000000000000000000000000960b236a07cf122663c4303350609a66a7b288c0': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#04a29e',
- symbol: 'ant',
- name: 'Aragon',
- },
- '0xf47261b00000000000000000000000004156d3342d5c385a87d264f90653733592000581': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#4CABA7',
- symbol: 'salt',
- name: 'Salt',
- },
- '0xf47261b0000000000000000000000000595832f8fc6bf59c85c527fec3740a1b7a361269': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 6,
- primaryColor: '#5BC9D4',
- symbol: 'powr',
- name: 'PowerLedger',
- },
- '0xf47261b00000000000000000000000008eb24319393716668d768dcec29356ae9cffe285': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#523CE8',
- symbol: 'agi',
- name: 'SingularityNET',
- },
- '0xf47261b000000000000000000000000039bb259f66e1c59d5abef88375979b4d20d98022': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#EDB740',
- symbol: 'wax',
- name: 'WAX',
- },
- '0xf47261b0000000000000000000000000beb9ef514a379b997e0798fdcc901ee474b6d9a1': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#333333',
- symbol: 'mln',
- name: 'Melon',
- },
- '0xf47261b000000000000000000000000058b6a8a3302369daec383334672404ee733ab239': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#232D37',
- symbol: 'lpt',
- name: 'Livepeer',
- },
- '0xf47261b000000000000000000000000027054b13b1b798b345b591a4d22e6562d47ea75a': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 4,
- primaryColor: '#3A74F6',
- symbol: 'ast',
- name: 'AirSwap',
- },
- '0xf47261b000000000000000000000000089d24a6b4ccb1b6faa2625fe562bdd9a23260359': {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 18,
- primaryColor: '#DEA349',
- symbol: 'dai',
- name: 'Dai Stablecoin',
- },
-};
diff --git a/packages/instant/src/globals.d.ts b/packages/instant/src/globals.d.ts
deleted file mode 100644
index 1b5fa443d..000000000
--- a/packages/instant/src/globals.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-declare module '*.svg' {
- const content: any;
- /* tslint:disable */
- export default content;
- /* tslint:enable */
-}
-declare module '*.json' {
- const json: any;
- /* tslint:disable */
- export default json;
- /* tslint:enable */
-}
diff --git a/packages/instant/src/index.ts b/packages/instant/src/index.ts
deleted file mode 100644
index 6e611dae8..000000000
--- a/packages/instant/src/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { ZeroExInstant, ZeroExInstantProps } from './components/zero_ex_instant';
-export { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './components/zero_ex_instant_overlay';
diff --git a/packages/instant/src/index.umd.ts b/packages/instant/src/index.umd.ts
deleted file mode 100644
index 0acf3f2ad..000000000
--- a/packages/instant/src/index.umd.ts
+++ /dev/null
@@ -1,169 +0,0 @@
-import { AssetBuyer, BigNumber } from '@0x/asset-buyer';
-import { assetDataUtils } from '@0x/order-utils';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as ReactDOM from 'react-dom';
-
-import {
- DEFAULT_ZERO_EX_CONTAINER_SELECTOR,
- GIT_SHA as GIT_SHA_FROM_CONSTANT,
- INJECTED_DIV_CLASS,
- INJECTED_DIV_ID,
- NPM_PACKAGE_VERSION,
-} from './constants';
-import { assetMetaDataMap } from './data/asset_meta_data_map';
-import { ZeroExInstantOverlay, ZeroExInstantOverlayProps } from './index';
-import { Network, OrderSource } from './types';
-import { analytics } from './util/analytics';
-import { assert } from './util/assert';
-import { providerFactory } from './util/provider_factory';
-import { util } from './util/util';
-
-const isInstantRendered = (): boolean => !!document.getElementById(INJECTED_DIV_ID);
-
-const validateInstantRenderConfig = (config: ZeroExInstantConfig, selector: string) => {
- assert.isValidOrderSource('orderSource', config.orderSource);
- if (!_.isUndefined(config.defaultSelectedAssetData)) {
- assert.isHexString('defaultSelectedAssetData', config.defaultSelectedAssetData);
- }
- if (!_.isUndefined(config.additionalAssetMetaDataMap)) {
- assert.isValidAssetMetaDataMap('additionalAssetMetaDataMap', config.additionalAssetMetaDataMap);
- }
- if (!_.isUndefined(config.defaultAssetBuyAmount)) {
- assert.isNumber('defaultAssetBuyAmount', config.defaultAssetBuyAmount);
- }
- if (!_.isUndefined(config.networkId)) {
- assert.isNumber('networkId', config.networkId);
- }
- if (!_.isUndefined(config.availableAssetDatas)) {
- assert.areValidAssetDatas('availableAssetDatas', config.availableAssetDatas);
- }
- if (!_.isUndefined(config.onClose)) {
- assert.isFunction('onClose', config.onClose);
- }
- if (!_.isUndefined(config.zIndex)) {
- assert.isNumber('zIndex', config.zIndex);
- }
- if (!_.isUndefined(config.affiliateInfo)) {
- assert.isValidAffiliateInfo('affiliateInfo', config.affiliateInfo);
- }
- if (!_.isUndefined(config.provider)) {
- assert.isWeb3Provider('provider', config.provider);
- }
- if (!_.isUndefined(config.walletDisplayName)) {
- assert.isString('walletDisplayName', config.walletDisplayName);
- }
- if (!_.isUndefined(config.shouldDisablePushToHistory)) {
- assert.isBoolean('shouldDisablePushToHistory', config.shouldDisablePushToHistory);
- }
- if (!_.isUndefined(config.shouldDisableAnalyticsTracking)) {
- assert.isBoolean('shouldDisableAnalyticsTracking', config.shouldDisableAnalyticsTracking);
- }
- assert.isString('selector', selector);
-};
-
-// Render instant and return a callback that allows you to remove it from the DOM.
-const renderInstant = (config: ZeroExInstantConfig, selector: string) => {
- const appendToIfExists = document.querySelector(selector);
- assert.assert(!_.isNull(appendToIfExists), `Could not find div with selector: ${selector}`);
- const appendTo = appendToIfExists as Element;
- const injectedDiv = document.createElement('div');
- injectedDiv.setAttribute('id', INJECTED_DIV_ID);
- injectedDiv.setAttribute('class', INJECTED_DIV_CLASS);
- appendTo.appendChild(injectedDiv);
- const closeInstant = () => {
- analytics.trackInstantClosed();
- if (!_.isUndefined(config.onClose)) {
- config.onClose();
- }
- appendTo.removeChild(injectedDiv);
- };
- const instantOverlayProps = {
- ...config,
- // If we are using the history API, just go back to close
- onClose: () => (config.shouldDisablePushToHistory ? closeInstant() : window.history.back()),
- };
- ReactDOM.render(React.createElement(ZeroExInstantOverlay, instantOverlayProps), injectedDiv);
- return closeInstant;
-};
-
-export interface ZeroExInstantConfig extends ZeroExInstantOverlayProps {
- shouldDisablePushToHistory?: boolean;
-}
-
-export const render = (config: ZeroExInstantConfig, selector: string = DEFAULT_ZERO_EX_CONTAINER_SELECTOR) => {
- validateInstantRenderConfig(config, selector);
- if (config.shouldDisablePushToHistory) {
- if (!isInstantRendered()) {
- renderInstant(config, selector);
- }
- return;
- }
- // Before we render, push to history saying that instant is showing for this part of the history.
- window.history.pushState({ zeroExInstantShowing: true }, '0x Instant');
- let removeInstant = renderInstant(config, selector);
- // If the integrator defined a popstate handler, save it to __zeroExInstantIntegratorsPopStateHandler
- // unless we have already done so on a previous render.
- const anyWindow = window as any;
- const popStateExistsAndNotSetPreviously = window.onpopstate && !anyWindow.__zeroExInstantIntegratorsPopStateHandler;
- anyWindow.__zeroExInstantIntegratorsPopStateHandler = popStateExistsAndNotSetPreviously
- ? anyWindow.onpopstate.bind(window)
- : util.boundNoop;
- const onPopStateHandler = (e: PopStateEvent) => {
- anyWindow.__zeroExInstantIntegratorsPopStateHandler(e);
- const newState = e.state;
- if (newState && newState.zeroExInstantShowing) {
- // We have returned to a history state that expects instant to be rendered.
- if (!isInstantRendered()) {
- removeInstant = renderInstant(config, selector);
- }
- } else {
- // History has changed to a different state.
- if (isInstantRendered()) {
- removeInstant();
- }
- }
- };
- window.onpopstate = onPopStateHandler;
-};
-
-export const assetDataForERC20TokenAddress = (tokenAddress: string): string => {
- assert.isETHAddressHex('tokenAddress', tokenAddress);
- return assetDataUtils.encodeERC20AssetData(tokenAddress);
-};
-
-export const hasMetaDataForAssetData = (assetData: string): boolean => {
- assert.isHexString('assetData', assetData);
- return assetMetaDataMap[assetData] !== undefined;
-};
-
-export const hasLiquidityForAssetDataAsync = async (
- assetData: string,
- orderSource: OrderSource,
- networkId: Network = Network.Mainnet,
- provider?: Provider,
-): Promise<boolean> => {
- assert.isHexString('assetData', assetData);
- assert.isValidOrderSource('orderSource', orderSource);
- assert.isNumber('networkId', networkId);
-
- if (provider !== undefined) {
- assert.isWeb3Provider('provider', provider);
- }
-
- const bestProvider: Provider = provider || providerFactory.getFallbackNoSigningProvider(networkId);
-
- const assetBuyerOptions = { networkId };
-
- const assetBuyer = _.isString(orderSource)
- ? AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(bestProvider, orderSource, assetBuyerOptions)
- : AssetBuyer.getAssetBuyerForProvidedOrders(bestProvider, orderSource, assetBuyerOptions);
-
- const liquidity = await assetBuyer.getLiquidityForAssetDataAsync(assetData);
- return liquidity.ethValueAvailableInWei.gt(new BigNumber(0));
-};
-
-// Write version info to the exported object for debugging
-export const GIT_SHA = GIT_SHA_FROM_CONSTANT;
-export const NPM_VERSION = NPM_PACKAGE_VERSION;
diff --git a/packages/instant/src/redux/actions.ts b/packages/instant/src/redux/actions.ts
deleted file mode 100644
index ca0be543b..000000000
--- a/packages/instant/src/redux/actions.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { BuyQuote } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { ActionsUnion, AddressAndEthBalanceInWei, Asset, BaseCurrency, StandardSlidingPanelContent } from '../types';
-
-export interface PlainAction<T extends string> {
- type: T;
-}
-
-export interface ActionWithPayload<T extends string, P> extends PlainAction<T> {
- data: P;
-}
-
-export type Action = ActionsUnion<typeof actions>;
-
-function createAction<T extends string>(type: T): PlainAction<T>;
-function createAction<T extends string, P>(type: T, data: P): ActionWithPayload<T, P>;
-function createAction<T extends string, P>(type: T, data?: P): PlainAction<T> | ActionWithPayload<T, P> {
- return _.isUndefined(data) ? { type } : { type, data };
-}
-
-export enum ActionTypes {
- SetAccountStateLoading = 'SET_ACCOUNT_STATE_LOADING',
- SetAccountStateLocked = 'SET_ACCOUNT_STATE_LOCKED',
- SetAccountStateReady = 'SET_ACCOUNT_STATE_READY',
- UpdateAccountEthBalance = 'UPDATE_ACCOUNT_ETH_BALANCE',
- UpdateEthUsdPrice = 'UPDATE_ETH_USD_PRICE',
- UpdateSelectedAssetUnitAmount = 'UPDATE_SELECTED_ASSET_UNIT_AMOUNT',
- SetBuyOrderStateNone = 'SET_BUY_ORDER_STATE_NONE',
- SetBuyOrderStateValidating = 'SET_BUY_ORDER_STATE_VALIDATING',
- SetBuyOrderStateProcessing = 'SET_BUY_ORDER_STATE_PROCESSING',
- SetBuyOrderStateFailure = 'SET_BUY_ORDER_STATE_FAILURE',
- SetBuyOrderStateSuccess = 'SET_BUY_ORDER_STATE_SUCCESS',
- UpdateLatestBuyQuote = 'UPDATE_LATEST_BUY_QUOTE',
- UpdateSelectedAsset = 'UPDATE_SELECTED_ASSET',
- SetAvailableAssets = 'SET_AVAILABLE_ASSETS',
- SetQuoteRequestStatePending = 'SET_QUOTE_REQUEST_STATE_PENDING',
- SetQuoteRequestStateFailure = 'SET_QUOTE_REQUEST_STATE_FAILURE',
- SetErrorMessage = 'SET_ERROR_MESSAGE',
- HideError = 'HIDE_ERROR',
- ClearError = 'CLEAR_ERROR',
- ResetAmount = 'RESET_AMOUNT',
- OpenStandardSlidingPanel = 'OPEN_STANDARD_SLIDING_PANEL',
- CloseStandardSlidingPanel = 'CLOSE_STANDARD_SLIDING_PANEL',
- UpdateBaseCurrency = 'UPDATE_BASE_CURRENCY',
-}
-
-export const actions = {
- setAccountStateLoading: () => createAction(ActionTypes.SetAccountStateLoading),
- setAccountStateLocked: () => createAction(ActionTypes.SetAccountStateLocked),
- setAccountStateReady: (address: string) => createAction(ActionTypes.SetAccountStateReady, address),
- updateAccountEthBalance: (addressAndBalance: AddressAndEthBalanceInWei) =>
- createAction(ActionTypes.UpdateAccountEthBalance, addressAndBalance),
- updateEthUsdPrice: (price?: BigNumber) => createAction(ActionTypes.UpdateEthUsdPrice, price),
- updateSelectedAssetAmount: (amount?: BigNumber) => createAction(ActionTypes.UpdateSelectedAssetUnitAmount, amount),
- setBuyOrderStateNone: () => createAction(ActionTypes.SetBuyOrderStateNone),
- setBuyOrderStateValidating: () => createAction(ActionTypes.SetBuyOrderStateValidating),
- setBuyOrderStateProcessing: (txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) =>
- createAction(ActionTypes.SetBuyOrderStateProcessing, { txHash, startTimeUnix, expectedEndTimeUnix }),
- setBuyOrderStateFailure: (txHash: string) => createAction(ActionTypes.SetBuyOrderStateFailure, txHash),
- setBuyOrderStateSuccess: (txHash: string) => createAction(ActionTypes.SetBuyOrderStateSuccess, txHash),
- updateLatestBuyQuote: (buyQuote?: BuyQuote) => createAction(ActionTypes.UpdateLatestBuyQuote, buyQuote),
- updateSelectedAsset: (asset: Asset) => createAction(ActionTypes.UpdateSelectedAsset, asset),
- setAvailableAssets: (availableAssets: Asset[]) => createAction(ActionTypes.SetAvailableAssets, availableAssets),
- setQuoteRequestStatePending: () => createAction(ActionTypes.SetQuoteRequestStatePending),
- setQuoteRequestStateFailure: () => createAction(ActionTypes.SetQuoteRequestStateFailure),
- setErrorMessage: (errorMessage: string) => createAction(ActionTypes.SetErrorMessage, errorMessage),
- hideError: () => createAction(ActionTypes.HideError),
- clearError: () => createAction(ActionTypes.ClearError),
- resetAmount: () => createAction(ActionTypes.ResetAmount),
- openStandardSlidingPanel: (content: StandardSlidingPanelContent) =>
- createAction(ActionTypes.OpenStandardSlidingPanel, content),
- closeStandardSlidingPanel: () => createAction(ActionTypes.CloseStandardSlidingPanel),
- updateBaseCurrency: (baseCurrency: BaseCurrency) => createAction(ActionTypes.UpdateBaseCurrency, baseCurrency),
-};
diff --git a/packages/instant/src/redux/analytics_middleware.ts b/packages/instant/src/redux/analytics_middleware.ts
deleted file mode 100644
index 4b4d30213..000000000
--- a/packages/instant/src/redux/analytics_middleware.ts
+++ /dev/null
@@ -1,108 +0,0 @@
-import { AssetProxyId } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import { Middleware } from 'redux';
-
-import { ETH_DECIMALS } from '../constants';
-import { AccountState, StandardSlidingPanelContent } from '../types';
-import { analytics, AnalyticsEventOptions } from '../util/analytics';
-
-import { Action, ActionTypes } from './actions';
-
-import { State } from './reducer';
-
-export const analyticsMiddleware: Middleware = store => next => middlewareAction => {
- const prevState = store.getState() as State;
- const prevAccount = prevState.providerState.account;
-
- const nextAction = next(middlewareAction) as Action;
-
- const curState = store.getState() as State;
- const curAccount = curState.providerState.account;
-
- switch (nextAction.type) {
- case ActionTypes.SetAccountStateReady:
- if (curAccount.state === AccountState.Ready) {
- const didJustTurnReady = prevAccount.state !== AccountState.Ready;
- const didJustUpdateAddress =
- prevAccount.state === AccountState.Ready && prevAccount.address !== curAccount.address;
- const ethAddress = curAccount.address;
- if (didJustTurnReady) {
- analytics.trackAccountReady(ethAddress);
- analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
- analytics.addEventProperties({ ethAddress });
- } else if (didJustUpdateAddress) {
- analytics.trackAccountAddressChanged(ethAddress);
- analytics.addUserProperties({ lastKnownEthAddress: ethAddress });
- analytics.addEventProperties({ ethAddress });
- }
- }
- break;
- case ActionTypes.SetAccountStateLocked:
- if (prevAccount.state !== AccountState.Locked && curAccount.state === AccountState.Locked) {
- // if we are moving from account not locked to account locked, track `Account - Locked`
- analytics.trackAccountLocked();
- }
- break;
- case ActionTypes.UpdateAccountEthBalance:
- if (
- curAccount.state === AccountState.Ready &&
- curAccount.ethBalanceInWei &&
- !_.isEqual(curAccount, prevAccount)
- ) {
- const ethBalanceInUnitAmount = Web3Wrapper.toUnitAmount(
- curAccount.ethBalanceInWei,
- ETH_DECIMALS,
- ).toString();
- analytics.addUserProperties({ lastEthBalanceInUnitAmount: ethBalanceInUnitAmount });
- analytics.addEventProperties({ ethBalanceInUnitAmount });
- }
- break;
- case ActionTypes.UpdateSelectedAsset:
- const selectedAsset = curState.selectedAsset;
- if (selectedAsset) {
- const assetName = selectedAsset.metaData.name;
- const assetData = selectedAsset.assetData;
- analytics.trackTokenSelectorChose({
- assetName,
- assetData,
- });
-
- const selectedAssetEventProperties: AnalyticsEventOptions = {
- selectedAssetName: assetName,
- selectedAssetData: assetData,
- };
- if (selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20) {
- selectedAssetEventProperties.selectedAssetDecimals = selectedAsset.metaData.decimals;
- selectedAssetEventProperties.selectedAssetSymbol = selectedAsset.metaData.symbol;
- }
- analytics.addEventProperties(selectedAssetEventProperties);
- }
- break;
- case ActionTypes.SetAvailableAssets:
- const availableAssets = curState.availableAssets;
- if (availableAssets) {
- analytics.addEventProperties({
- numberAvailableAssets: availableAssets.length,
- });
- }
- break;
- case ActionTypes.OpenStandardSlidingPanel:
- const openSlidingContent = curState.standardSlidingPanelSettings.content;
- if (openSlidingContent === StandardSlidingPanelContent.InstallWallet) {
- analytics.trackInstallWalletModalOpened();
- }
- break;
- case ActionTypes.CloseStandardSlidingPanel:
- const closeSlidingContent = curState.standardSlidingPanelSettings.content;
- if (closeSlidingContent === StandardSlidingPanelContent.InstallWallet) {
- analytics.trackInstallWalletModalClosed();
- }
- break;
- case ActionTypes.UpdateBaseCurrency:
- analytics.trackBaseCurrencyChanged(curState.baseCurrency);
- analytics.addEventProperties({ baseCurrency: curState.baseCurrency });
- }
-
- return nextAction;
-};
diff --git a/packages/instant/src/redux/async_data.ts b/packages/instant/src/redux/async_data.ts
deleted file mode 100644
index f20fe319f..000000000
--- a/packages/instant/src/redux/async_data.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-import { AssetProxyId } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import { Dispatch } from 'redux';
-
-import { BIG_NUMBER_ZERO } from '../constants';
-import { AccountState, BaseCurrency, ERC20Asset, OrderProcessState, ProviderState, QuoteFetchOrigin } from '../types';
-import { analytics } from '../util/analytics';
-import { assetUtils } from '../util/asset';
-import { buyQuoteUpdater } from '../util/buy_quote_updater';
-import { coinbaseApi } from '../util/coinbase_api';
-import { errorFlasher } from '../util/error_flasher';
-import { errorReporter } from '../util/error_reporter';
-
-import { actions } from './actions';
-import { State } from './reducer';
-
-export const asyncData = {
- fetchEthPriceAndDispatchToStore: async (dispatch: Dispatch) => {
- try {
- const ethUsdPrice = await coinbaseApi.getEthUsdPrice();
- dispatch(actions.updateEthUsdPrice(ethUsdPrice));
- } catch (e) {
- const errorMessage = 'Error fetching ETH/USD price';
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage);
- dispatch(actions.updateEthUsdPrice(BIG_NUMBER_ZERO));
- dispatch(actions.updateBaseCurrency(BaseCurrency.ETH));
- errorReporter.report(e);
- analytics.trackUsdPriceFailed();
- }
- },
- fetchAvailableAssetDatasAndDispatchToStore: async (state: State, dispatch: Dispatch) => {
- const { providerState, assetMetaDataMap, network } = state;
- const assetBuyer = providerState.assetBuyer;
- try {
- const assetDatas = await assetBuyer.getAvailableAssetDatasAsync();
- const deduplicatedAssetDatas = _.uniq(assetDatas);
- const assets = assetUtils.createAssetsFromAssetDatas(deduplicatedAssetDatas, assetMetaDataMap, network);
- dispatch(actions.setAvailableAssets(assets));
- } catch (e) {
- const errorMessage = 'Could not find any assets';
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage);
- // On error, just specify that none are available
- dispatch(actions.setAvailableAssets([]));
- errorReporter.report(e);
- }
- },
- fetchAccountInfoAndDispatchToStore: async (
- providerState: ProviderState,
- dispatch: Dispatch,
- shouldAttemptUnlock: boolean = false,
- shouldSetToLoading: boolean = false,
- ) => {
- const web3Wrapper = providerState.web3Wrapper;
- const provider = providerState.provider;
- if (shouldSetToLoading && providerState.account.state !== AccountState.Loading) {
- dispatch(actions.setAccountStateLoading());
- }
- let availableAddresses: string[];
- try {
- // TODO(bmillman): Add support at the web3Wrapper level for calling `eth_requestAccounts` instead of calling enable here
- const isPrivacyModeEnabled = !_.isUndefined((provider as any).enable);
- availableAddresses =
- isPrivacyModeEnabled && shouldAttemptUnlock
- ? await (provider as any).enable()
- : await web3Wrapper.getAvailableAddressesAsync();
- } catch (e) {
- analytics.trackAccountUnlockDenied();
- dispatch(actions.setAccountStateLocked());
- return;
- }
- if (!_.isEmpty(availableAddresses)) {
- const activeAddress = availableAddresses[0];
- dispatch(actions.setAccountStateReady(activeAddress));
- // tslint:disable-next-line:no-floating-promises
- asyncData.fetchAccountBalanceAndDispatchToStore(activeAddress, providerState.web3Wrapper, dispatch);
- } else {
- dispatch(actions.setAccountStateLocked());
- }
- },
- fetchAccountBalanceAndDispatchToStore: async (address: string, web3Wrapper: Web3Wrapper, dispatch: Dispatch) => {
- try {
- const ethBalanceInWei = await web3Wrapper.getBalanceInWeiAsync(address);
- dispatch(actions.updateAccountEthBalance({ address, ethBalanceInWei }));
- } catch (e) {
- errorReporter.report(e);
- // leave balance as is
- return;
- }
- },
- fetchCurrentBuyQuoteAndDispatchToStore: async (
- state: State,
- dispatch: Dispatch,
- fetchOrigin: QuoteFetchOrigin,
- options: { updateSilently: boolean },
- ) => {
- const { buyOrderState, providerState, selectedAsset, selectedAssetUnitAmount, affiliateInfo } = state;
- const assetBuyer = providerState.assetBuyer;
- if (
- !_.isUndefined(selectedAssetUnitAmount) &&
- !_.isUndefined(selectedAsset) &&
- selectedAssetUnitAmount.isGreaterThan(BIG_NUMBER_ZERO) &&
- buyOrderState.processState === OrderProcessState.None &&
- selectedAsset.metaData.assetProxyId === AssetProxyId.ERC20
- ) {
- await buyQuoteUpdater.updateBuyQuoteAsync(
- assetBuyer,
- dispatch,
- selectedAsset as ERC20Asset,
- selectedAssetUnitAmount,
- fetchOrigin,
- {
- setPending: !options.updateSilently,
- dispatchErrors: !options.updateSilently,
- affiliateInfo,
- },
- );
- }
- },
-};
diff --git a/packages/instant/src/redux/reducer.ts b/packages/instant/src/redux/reducer.ts
deleted file mode 100644
index 0d8bb4b05..000000000
--- a/packages/instant/src/redux/reducer.ts
+++ /dev/null
@@ -1,297 +0,0 @@
-import { BuyQuote } from '@0x/asset-buyer';
-import { AssetProxyId, ObjectMap } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-import { LOADING_ACCOUNT, LOCKED_ACCOUNT } from '../constants';
-import { assetMetaDataMap } from '../data/asset_meta_data_map';
-import {
- Account,
- AccountReady,
- AccountState,
- AffiliateInfo,
- Asset,
- AssetMetaData,
- AsyncProcessState,
- BaseCurrency,
- DisplayStatus,
- Network,
- OrderProcessState,
- OrderState,
- ProviderState,
- StandardSlidingPanelContent,
- StandardSlidingPanelSettings,
-} from '../types';
-
-import { Action, ActionTypes } from './actions';
-
-// State that is required and we have defaults for, before props are passed in
-export interface DefaultState {
- network: Network;
- assetMetaDataMap: ObjectMap<AssetMetaData>;
- buyOrderState: OrderState;
- latestErrorDisplayStatus: DisplayStatus;
- quoteRequestState: AsyncProcessState;
- standardSlidingPanelSettings: StandardSlidingPanelSettings;
- baseCurrency: BaseCurrency;
-}
-
-// State that is required but needs to be derived from the props
-interface PropsDerivedState {
- providerState: ProviderState;
-}
-
-// State that is optional
-interface OptionalState {
- selectedAsset: Asset;
- availableAssets: Asset[];
- selectedAssetUnitAmount: BigNumber;
- ethUsdPrice: BigNumber;
- latestBuyQuote: BuyQuote;
- latestErrorMessage: string;
- affiliateInfo: AffiliateInfo;
- walletDisplayName: string;
-}
-
-export type State = DefaultState & PropsDerivedState & Partial<OptionalState>;
-
-export const DEFAULT_STATE: DefaultState = {
- network: Network.Mainnet,
- assetMetaDataMap,
- buyOrderState: { processState: OrderProcessState.None },
- latestErrorDisplayStatus: DisplayStatus.Hidden,
- quoteRequestState: AsyncProcessState.None,
- standardSlidingPanelSettings: {
- animationState: 'none',
- content: StandardSlidingPanelContent.None,
- },
- baseCurrency: BaseCurrency.USD,
-};
-
-export const createReducer = (initialState: State) => {
- const reducer = (state: State = initialState, action: Action): State => {
- switch (action.type) {
- case ActionTypes.SetAccountStateLoading:
- return reduceStateWithAccount(state, LOADING_ACCOUNT);
- case ActionTypes.SetAccountStateLocked:
- return reduceStateWithAccount(state, LOCKED_ACCOUNT);
- case ActionTypes.SetAccountStateReady: {
- const address = action.data;
- let newAccount: AccountReady = {
- state: AccountState.Ready,
- address,
- };
- const currentAccount = state.providerState.account;
- if (currentAccount.state === AccountState.Ready && currentAccount.address === address) {
- newAccount = {
- ...newAccount,
- ethBalanceInWei: currentAccount.ethBalanceInWei,
- };
- }
- return reduceStateWithAccount(state, newAccount);
- }
- case ActionTypes.UpdateAccountEthBalance: {
- const { address, ethBalanceInWei } = action.data;
- const currentAccount = state.providerState.account;
- if (currentAccount.state !== AccountState.Ready || currentAccount.address !== address) {
- return state;
- } else {
- const newAccount: AccountReady = {
- ...currentAccount,
- ethBalanceInWei,
- };
- return reduceStateWithAccount(state, newAccount);
- }
- }
- case ActionTypes.UpdateEthUsdPrice:
- return {
- ...state,
- ethUsdPrice: action.data,
- };
- case ActionTypes.UpdateSelectedAssetUnitAmount:
- return {
- ...state,
- selectedAssetUnitAmount: action.data,
- };
- case ActionTypes.UpdateLatestBuyQuote:
- const newBuyQuoteIfExists = action.data;
- const shouldUpdate =
- _.isUndefined(newBuyQuoteIfExists) || doesBuyQuoteMatchState(newBuyQuoteIfExists, state);
- if (shouldUpdate) {
- return {
- ...state,
- latestBuyQuote: newBuyQuoteIfExists,
- quoteRequestState: AsyncProcessState.Success,
- };
- } else {
- return state;
- }
- case ActionTypes.SetQuoteRequestStatePending:
- return {
- ...state,
- latestBuyQuote: undefined,
- quoteRequestState: AsyncProcessState.Pending,
- };
- case ActionTypes.SetQuoteRequestStateFailure:
- return {
- ...state,
- latestBuyQuote: undefined,
- quoteRequestState: AsyncProcessState.Failure,
- };
- case ActionTypes.SetBuyOrderStateNone:
- return {
- ...state,
- buyOrderState: { processState: OrderProcessState.None },
- };
- case ActionTypes.SetBuyOrderStateValidating:
- return {
- ...state,
- buyOrderState: { processState: OrderProcessState.Validating },
- };
- case ActionTypes.SetBuyOrderStateProcessing:
- const processingData = action.data;
- const { startTimeUnix, expectedEndTimeUnix } = processingData;
- return {
- ...state,
- buyOrderState: {
- processState: OrderProcessState.Processing,
- txHash: processingData.txHash,
- progress: {
- startTimeUnix,
- expectedEndTimeUnix,
- },
- },
- };
- case ActionTypes.SetBuyOrderStateFailure:
- const failureTxHash = action.data;
- if ('txHash' in state.buyOrderState) {
- if (state.buyOrderState.txHash === failureTxHash) {
- const { txHash, progress } = state.buyOrderState;
- return {
- ...state,
- buyOrderState: {
- processState: OrderProcessState.Failure,
- txHash,
- progress,
- },
- };
- }
- }
- return state;
- case ActionTypes.SetBuyOrderStateSuccess:
- const successTxHash = action.data;
- if ('txHash' in state.buyOrderState) {
- if (state.buyOrderState.txHash === successTxHash) {
- const { txHash, progress } = state.buyOrderState;
- return {
- ...state,
- buyOrderState: {
- processState: OrderProcessState.Success,
- txHash,
- progress,
- },
- };
- }
- }
- return state;
- case ActionTypes.SetErrorMessage:
- return {
- ...state,
- latestErrorMessage: action.data,
- latestErrorDisplayStatus: DisplayStatus.Present,
- };
- case ActionTypes.HideError:
- return {
- ...state,
- latestErrorDisplayStatus: DisplayStatus.Hidden,
- };
- case ActionTypes.ClearError:
- return {
- ...state,
- latestErrorMessage: undefined,
- latestErrorDisplayStatus: DisplayStatus.Hidden,
- };
- case ActionTypes.UpdateSelectedAsset:
- return {
- ...state,
- selectedAsset: action.data,
- };
- case ActionTypes.ResetAmount:
- return {
- ...state,
- latestBuyQuote: undefined,
- quoteRequestState: AsyncProcessState.None,
- buyOrderState: { processState: OrderProcessState.None },
- selectedAssetUnitAmount: undefined,
- };
- case ActionTypes.SetAvailableAssets:
- return {
- ...state,
- availableAssets: action.data,
- };
- case ActionTypes.OpenStandardSlidingPanel:
- return {
- ...state,
- standardSlidingPanelSettings: {
- content: action.data,
- animationState: 'slidIn',
- },
- };
- case ActionTypes.CloseStandardSlidingPanel:
- return {
- ...state,
- standardSlidingPanelSettings: {
- content: state.standardSlidingPanelSettings.content,
- animationState: 'slidOut',
- },
- };
- case ActionTypes.UpdateBaseCurrency:
- return {
- ...state,
- baseCurrency: action.data,
- };
- default:
- return state;
- }
- };
- return reducer;
-};
-
-const reduceStateWithAccount = (state: State, account: Account) => {
- const oldProviderState = state.providerState;
- const newProviderState: ProviderState = {
- ...oldProviderState,
- account,
- };
- return {
- ...state,
- providerState: newProviderState,
- };
-};
-
-const doesBuyQuoteMatchState = (buyQuote: BuyQuote, state: State): boolean => {
- const selectedAssetIfExists = state.selectedAsset;
- const selectedAssetUnitAmountIfExists = state.selectedAssetUnitAmount;
- // if no selectedAsset or selectedAssetAmount exists on the current state, return false
- if (_.isUndefined(selectedAssetIfExists) || _.isUndefined(selectedAssetUnitAmountIfExists)) {
- return false;
- }
- // if buyQuote's assetData does not match that of the current selected asset, return false
- if (selectedAssetIfExists.assetData !== buyQuote.assetData) {
- return false;
- }
- // if ERC20 and buyQuote's assetBuyAmount does not match selectedAssetAmount, return false
- // if ERC721, return true
- const selectedAssetMetaData = selectedAssetIfExists.metaData;
- if (selectedAssetMetaData.assetProxyId === AssetProxyId.ERC20) {
- const selectedAssetAmountBaseUnits = Web3Wrapper.toBaseUnitAmount(
- selectedAssetUnitAmountIfExists,
- selectedAssetMetaData.decimals,
- );
- const doesAssetAmountMatch = selectedAssetAmountBaseUnits.eq(buyQuote.assetBuyAmount);
- return doesAssetAmountMatch;
- } else {
- return true;
- }
-};
diff --git a/packages/instant/src/redux/store.ts b/packages/instant/src/redux/store.ts
deleted file mode 100644
index 11bba3876..000000000
--- a/packages/instant/src/redux/store.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as _ from 'lodash';
-import { applyMiddleware, createStore, Store as ReduxStore } from 'redux';
-import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
-
-import { analyticsMiddleware } from './analytics_middleware';
-import { createReducer, State } from './reducer';
-
-export type Store = ReduxStore<State>;
-
-export const store = {
- create: (initialState: State): Store => {
- const reducer = createReducer(initialState);
- return createStore(reducer, initialState, composeWithDevTools(applyMiddleware(analyticsMiddleware)));
- },
-};
diff --git a/packages/instant/src/style/fonts.ts b/packages/instant/src/style/fonts.ts
deleted file mode 100644
index 92450502d..000000000
--- a/packages/instant/src/style/fonts.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const fonts = {
- include: () => {
- // Inject the inter-ui font into the page
- const appendTo = document.head || document.getElementsByTagName('head')[0] || document.body;
- const style = document.createElement('style');
- style.type = 'text/css';
- style.appendChild(document.createTextNode(`@import url('https://rsms.me/inter/inter-ui.css')`));
- appendTo.appendChild(style);
- },
-};
diff --git a/packages/instant/src/style/media.ts b/packages/instant/src/style/media.ts
deleted file mode 100644
index bbf376694..000000000
--- a/packages/instant/src/style/media.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { InterpolationValue } from 'styled-components';
-
-import { css } from './theme';
-
-export enum ScreenWidths {
- Sm = 40,
- Md = 52,
- Lg = 64,
-}
-
-export const generateMediaWrapper = (screenWidth: ScreenWidths) => (...args: any[]) => css`
- @media (max-width: ${screenWidth}em) {
- ${css.apply(css, args)};
- }
-`;
-
-export const media = {
- small: generateMediaWrapper(ScreenWidths.Sm),
- medium: generateMediaWrapper(ScreenWidths.Md),
- large: generateMediaWrapper(ScreenWidths.Lg),
-};
-
-export interface ScreenSpecification<T> {
- default: T;
- sm?: T;
- md?: T;
- lg?: T;
-}
-export type OptionallyScreenSpecific<T> = T | ScreenSpecification<T>;
-export type MediaChoice = OptionallyScreenSpecific<string>;
-/**
- * Given a css property name and a OptionallyScreenSpecific value,
- * generates css properties with screen-specific viewport styling
- */
-export function stylesForMedia<T extends string | number>(
- cssPropertyName: string,
- choice: OptionallyScreenSpecific<T>,
-): InterpolationValue[] {
- if (typeof choice === 'object') {
- return css`
- ${cssPropertyName}: ${choice.default};
- ${choice.lg && media.large`${cssPropertyName}: ${choice.lg}`}
- ${choice.md && media.medium`${cssPropertyName}: ${choice.md}`}
- ${choice.sm && media.small`${cssPropertyName}: ${choice.sm}`}
- `;
- } else {
- return css`
- ${cssPropertyName}: ${choice};
- `;
- }
-}
diff --git a/packages/instant/src/style/theme.ts b/packages/instant/src/style/theme.ts
deleted file mode 100644
index 49f3c81e6..000000000
--- a/packages/instant/src/style/theme.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-import * as styledComponents from 'styled-components';
-
-const {
- default: styled,
- css,
- keyframes,
- withTheme,
- createGlobalStyle,
- ThemeConsumer,
- ThemeProvider,
-} = styledComponents;
-
-export type Theme = { [key in ColorOption]: string };
-// tslint:disable:enum-naming
-export enum ColorOption {
- primaryColor = 'primaryColor',
- black = 'black',
- lightGrey = 'lightGrey',
- grey = 'grey',
- feintGrey = 'feintGrey',
- lightestGrey = 'lightestGrey',
- darkGrey = 'darkGrey',
- white = 'white',
- lightOrange = 'lightOrange',
- darkOrange = 'darkOrange',
- green = 'green',
- red = 'red',
- darkBlue = 'darkBlue',
- lightBlue = 'lightBlue',
-}
-
-export const theme: Theme = {
- primaryColor: '#333',
- black: 'black',
- lightGrey: '#999999',
- grey: '#666666',
- feintGrey: '#DEDEDE',
- lightestGrey: '#EEEEEE',
- darkGrey: '#333333',
- white: 'white',
- lightOrange: '#FFF8F2',
- darkOrange: '#F7A24F',
- green: '#3CB34F',
- red: '#D00000',
- darkBlue: '#135df6',
- lightBlue: '#F2F7FF',
-};
-
-export const transparentWhite = 'rgba(255,255,255,0.3)';
-export const completelyTransparent = 'rga(0, 0, 0, 0)';
-
-export const generateOverlayBlack = (opacity = 0.6) => {
- return `rgba(0, 0, 0, ${opacity})`;
-};
-
-export { styled, css, keyframes, withTheme, createGlobalStyle, ThemeConsumer, ThemeProvider };
diff --git a/packages/instant/src/style/util.ts b/packages/instant/src/style/util.ts
deleted file mode 100644
index 3e38c4a7d..000000000
--- a/packages/instant/src/style/util.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-
-export const cssRuleIfExists = (props: ObjectMap<any>, rule: string): string => {
- const camelCaseRule = _.camelCase(rule);
- const ruleValueIfExists = props[camelCaseRule];
- if (!_.isUndefined(ruleValueIfExists)) {
- return `${rule}: ${ruleValueIfExists};`;
- }
- return '';
-};
diff --git a/packages/instant/src/style/z_index.ts b/packages/instant/src/style/z_index.ts
deleted file mode 100644
index ba2d27a17..000000000
--- a/packages/instant/src/style/z_index.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export const zIndex = {
- errorPopBehind: 10,
- mainContainer: 20,
- dropdownItems: 30,
- panel: 40,
- containerOverlay: 45,
- errorPopup: 50,
- overlayDefault: 100,
-};
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts
deleted file mode 100644
index 606294c93..000000000
--- a/packages/instant/src/types.ts
+++ /dev/null
@@ -1,206 +0,0 @@
-import { AssetBuyer, BigNumber } from '@0x/asset-buyer';
-import { AssetProxyId, ObjectMap, SignedOrder } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-
-// Reusable
-export type Omit<T, K extends keyof T> = Pick<T, Exclude<keyof T, K>>;
-export type Maybe<T> = T | undefined;
-export enum AsyncProcessState {
- None = 'NONE',
- Pending = 'PENDING',
- Success = 'SUCCESS',
- Failure = 'FAILURE',
-}
-
-export enum OrderProcessState {
- None = 'NONE',
- Validating = 'VALIDATING',
- Processing = 'PROCESSING',
- Success = 'SUCCESS',
- Failure = 'FAILURE',
-}
-
-export enum QuoteFetchOrigin {
- Manual = 'Manual',
- Heartbeat = 'Heartbeat',
-}
-
-export enum BaseCurrency {
- USD = 'USD', // tslint:disable-line:enum-naming
- ETH = 'ETH', // tslint:disable-line:enum-naming
-}
-
-export interface SimulatedProgress {
- startTimeUnix: number;
- expectedEndTimeUnix: number;
-}
-
-interface OrderStatePreTx {
- processState: OrderProcessState.None | OrderProcessState.Validating;
-}
-interface OrderStatePostTx {
- processState: OrderProcessState.Processing | OrderProcessState.Success | OrderProcessState.Failure;
- txHash: string;
- progress: SimulatedProgress;
-}
-export type OrderState = OrderStatePreTx | OrderStatePostTx;
-
-export enum DisplayStatus {
- Present,
- Hidden,
-}
-
-export type FunctionType = (...args: any[]) => any;
-export type ActionCreatorsMapObject = ObjectMap<FunctionType>;
-export type ActionsUnion<A extends ActionCreatorsMapObject> = ReturnType<A[keyof A]>;
-
-export interface ERC20AssetMetaData {
- assetProxyId: AssetProxyId.ERC20;
- decimals: number;
- primaryColor?: string;
- symbol: string;
- name: string;
- iconUrl?: string;
-}
-
-export interface ERC721AssetMetaData {
- assetProxyId: AssetProxyId.ERC721;
- name: string;
- imageUrl?: string;
- primaryColor?: string;
-}
-
-export type AssetMetaData = ERC20AssetMetaData | ERC721AssetMetaData;
-
-export interface ERC20Asset {
- assetData: string;
- metaData: ERC20AssetMetaData;
-}
-
-export interface ERC721Asset {
- assetData: string;
- metaData: ERC721AssetMetaData;
-}
-
-export interface Asset {
- assetData: string;
- metaData: AssetMetaData;
-}
-
-export enum Network {
- Kovan = 42,
- Mainnet = 1,
-}
-
-export enum ZeroExInstantError {
- AssetMetaDataNotAvailable = 'ASSET_META_DATA_NOT_AVAILABLE',
- InsufficientETH = 'INSUFFICIENT_ETH', // tslint:disable-line:enum-naming
- CouldNotSubmitTransaction = 'COULD_NOT_SUBMIT_TRANSACTION',
-}
-
-export type SimpleHandler = () => void;
-
-export interface AffiliateInfo {
- feeRecipient: string;
- feePercentage: number;
-}
-
-export interface ProviderState {
- name: string;
- displayName: string;
- provider: Provider;
- assetBuyer: AssetBuyer;
- web3Wrapper: Web3Wrapper;
- account: Account;
-}
-
-export enum AccountState {
- None = 'NONE,',
- Loading = 'LOADING',
- Ready = 'READY',
- Locked = 'LOCKED',
-}
-
-export interface AccountReady {
- state: AccountState.Ready;
- address: string;
- ethBalanceInWei?: BigNumber;
-}
-export interface AccountNotReady {
- state: AccountState.None | AccountState.Loading | AccountState.Locked;
-}
-
-export type Account = AccountReady | AccountNotReady;
-
-export type OrderSource = string | SignedOrder[];
-
-export interface AddressAndEthBalanceInWei {
- address: string;
- ethBalanceInWei: BigNumber;
-}
-
-export type SlideAnimationState = 'slidIn' | 'slidOut' | 'none';
-
-export enum StandardSlidingPanelContent {
- None = 'NONE',
- InstallWallet = 'INSTALL_WALLET',
-}
-
-export interface StandardSlidingPanelSettings {
- animationState: SlideAnimationState;
- content: StandardSlidingPanelContent;
-}
-
-export enum Browser {
- Chrome = 'CHROME',
- Firefox = 'FIREFOX',
- Opera = 'OPERA',
- Safari = 'SAFARI',
- Edge = 'EDGE',
- Other = 'OTHER',
-}
-
-export enum WalletSuggestion {
- CoinbaseWallet = 'Coinbase Wallet',
- MetaMask = 'MetaMask',
-}
-
-export enum OperatingSystem {
- Android = 'ANDROID',
- iOS = 'IOS', // tslint:disable-line:enum-naming
- Mac = 'MAC',
- Windows = 'WINDOWS',
- WindowsPhone = 'WINDOWS_PHONE',
- Linux = 'LINUX',
- Other = 'OTHER',
-}
-
-export enum ProviderType {
- Parity = 'PARITY',
- MetaMask = 'META_MASK',
- Mist = 'MIST',
- CoinbaseWallet = 'COINBASE_WALLET',
- Cipher = 'CIPHER',
- TrustWallet = 'TRUST_WALLET',
- Opera = 'OPERA',
- Fallback = 'FALLBACK',
-}
-
-export interface ZeroExInstantRequiredBaseConfig {
- orderSource: OrderSource;
-}
-
-export interface ZeroExInstantOptionalBaseConfig {
- provider: Provider;
- walletDisplayName: string;
- availableAssetDatas: string[];
- defaultAssetBuyAmount: number;
- defaultSelectedAssetData: string;
- additionalAssetMetaDataMap: ObjectMap<AssetMetaData>;
- networkId: Network;
- affiliateInfo: AffiliateInfo;
- shouldDisableAnalyticsTracking: boolean;
-}
-
-export type ZeroExInstantBaseConfig = ZeroExInstantRequiredBaseConfig & Partial<ZeroExInstantOptionalBaseConfig>;
diff --git a/packages/instant/src/util/address.ts b/packages/instant/src/util/address.ts
deleted file mode 100644
index b21863a8e..000000000
--- a/packages/instant/src/util/address.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import { Web3Wrapper } from '@0x/web3-wrapper';
-
-export const getBestAddress = async (web3Wrapper: Web3Wrapper): Promise<string | undefined> => {
- const addresses = await web3Wrapper.getAvailableAddressesAsync();
- return addresses[0];
-};
diff --git a/packages/instant/src/util/analytics.ts b/packages/instant/src/util/analytics.ts
deleted file mode 100644
index fa8a72a2c..000000000
--- a/packages/instant/src/util/analytics.ts
+++ /dev/null
@@ -1,248 +0,0 @@
-import { BuyQuote } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { GIT_SHA, HEAP_ENABLED, INSTANT_DISCHARGE_TARGET, NODE_ENV, NPM_PACKAGE_VERSION } from '../constants';
-import {
- AffiliateInfo,
- Asset,
- BaseCurrency,
- Network,
- OrderProcessState,
- OrderSource,
- ProviderState,
- QuoteFetchOrigin,
- WalletSuggestion,
-} from '../types';
-
-import { EventProperties, heapUtil } from './heap';
-
-let isDisabledViaConfig = false;
-export const disableAnalytics = (shouldDisableAnalytics: boolean) => {
- isDisabledViaConfig = shouldDisableAnalytics;
-};
-export const evaluateIfEnabled = (fnCall: () => void) => {
- if (isDisabledViaConfig) {
- return;
- }
- if (HEAP_ENABLED) {
- fnCall();
- }
-};
-
-enum EventNames {
- InstantOpened = 'Instant - Opened',
- InstantClosed = 'Instant - Closed',
- AccountLocked = 'Account - Locked',
- AccountReady = 'Account - Ready',
- AccountUnlockRequested = 'Account - Unlock Requested',
- AccountUnlockDenied = 'Account - Unlock Denied',
- AccountAddressChanged = 'Account - Address Changed',
- BaseCurrencyChanged = 'Base Currency - Changed',
- PaymentMethodDropdownOpened = 'Payment Method - Dropdown Opened',
- PaymentMethodOpenedEtherscan = 'Payment Method - Opened Etherscan',
- PaymentMethodCopiedAddress = 'Payment Method - Copied Address',
- BuyNotEnoughEth = 'Buy - Not Enough Eth',
- BuyStarted = 'Buy - Started',
- BuySignatureDenied = 'Buy - Signature Denied',
- BuySimulationFailed = 'Buy - Simulation Failed',
- BuyUnknownError = 'Buy - Unknown Error',
- BuyTxSubmitted = 'Buy - Tx Submitted',
- BuyTxSucceeded = 'Buy - Tx Succeeded',
- BuyTxFailed = 'Buy - Tx Failed',
- UsdPriceFetchFailed = 'USD Price - Fetch Failed',
- InstallWalletClicked = 'Install Wallet - Clicked',
- InstallWalletModalOpened = 'Install Wallet - Modal - Opened',
- InstallWalletModalClickedExplanation = 'Install Wallet - Modal - Clicked Explanation',
- InstallWalletModalClickedGet = 'Install Wallet - Modal - Clicked Get',
- InstallWalletModalClosed = 'Install Wallet - Modal - Closed',
- TokenSelectorOpened = 'Token Selector - Opened',
- TokenSelectorClosed = 'Token Selector - Closed',
- TokenSelectorChose = 'Token Selector - Chose',
- TokenSelectorSearched = 'Token Selector - Searched',
- TransactionViewed = 'Transaction - Viewed',
- QuoteFetched = 'Quote - Fetched',
- QuoteError = 'Quote - Error',
-}
-
-const track = (eventName: EventNames, eventProperties: EventProperties = {}): void => {
- evaluateIfEnabled(() => {
- heapUtil.evaluateHeapCall(heap => heap.track(eventName, eventProperties));
- });
-};
-function trackingEventFnWithoutPayload(eventName: EventNames): () => void {
- return () => {
- track(eventName);
- };
-}
-// tslint:disable-next-line:no-unused-variable
-function trackingEventFnWithPayload(eventName: EventNames): (eventProperties: EventProperties) => void {
- return (eventProperties: EventProperties) => {
- track(eventName, eventProperties);
- };
-}
-
-const buyQuoteEventProperties = (buyQuote: BuyQuote) => {
- const assetBuyAmount = buyQuote.assetBuyAmount.toString();
- const assetEthAmount = buyQuote.worstCaseQuoteInfo.assetEthAmount.toString();
- const feeEthAmount = buyQuote.worstCaseQuoteInfo.feeEthAmount.toString();
- const totalEthAmount = buyQuote.worstCaseQuoteInfo.totalEthAmount.toString();
- const feePercentage = !_.isUndefined(buyQuote.feePercentage) ? buyQuote.feePercentage.toString() : 0;
- const hasFeeOrders = !_.isEmpty(buyQuote.feeOrders) ? 'true' : 'false';
- return {
- assetBuyAmount,
- assetEthAmount,
- feeEthAmount,
- totalEthAmount,
- feePercentage,
- hasFeeOrders,
- };
-};
-
-export interface AnalyticsUserOptions {
- lastKnownEthAddress?: string;
- lastEthBalanceInUnitAmount?: string;
-}
-export interface AnalyticsEventOptions {
- embeddedHost?: string;
- embeddedUrl?: string;
- ethBalanceInUnitAmount?: string;
- ethAddress?: string;
- networkId?: number;
- providerName?: string;
- providerDisplayName?: string;
- gitSha?: string;
- npmVersion?: string;
- instantEnvironment?: string;
- orderSource?: string;
- affiliateAddress?: string;
- affiliateFeePercent?: number;
- numberAvailableAssets?: number;
- selectedAssetName?: string;
- selectedAssetSymbol?: string;
- selectedAssetData?: string;
- selectedAssetDecimals?: number;
- baseCurrency?: string;
-}
-export enum TokenSelectorClosedVia {
- ClickedX = 'Clicked X', // tslint:disable-line:enum-naming
- TokenChose = 'Token Chose',
-}
-export const analytics = {
- addUserProperties: (properties: AnalyticsUserOptions): void => {
- evaluateIfEnabled(() => {
- heapUtil.evaluateHeapCall(heap => heap.addUserProperties(properties));
- });
- },
- addEventProperties: (properties: AnalyticsEventOptions): void => {
- evaluateIfEnabled(() => {
- heapUtil.evaluateHeapCall(heap => heap.addEventProperties(properties));
- });
- },
- generateEventProperties: (
- network: Network,
- orderSource: OrderSource,
- providerState: ProviderState,
- window: Window,
- selectedAsset?: Asset,
- affiliateInfo?: AffiliateInfo,
- baseCurrency?: BaseCurrency,
- ): AnalyticsEventOptions => {
- const affiliateAddress = affiliateInfo ? affiliateInfo.feeRecipient : 'none';
- const affiliateFeePercent = affiliateInfo ? parseFloat(affiliateInfo.feePercentage.toFixed(4)) : 0;
- const orderSourceName = typeof orderSource === 'string' ? orderSource : 'provided';
- const eventOptions: AnalyticsEventOptions = {
- embeddedHost: window.location.host,
- embeddedUrl: window.location.href,
- networkId: network,
- providerName: providerState.name,
- providerDisplayName: providerState.displayName,
- gitSha: GIT_SHA,
- npmVersion: NPM_PACKAGE_VERSION,
- orderSource: orderSourceName,
- affiliateAddress,
- affiliateFeePercent,
- selectedAssetName: selectedAsset ? selectedAsset.metaData.name : 'none',
- selectedAssetData: selectedAsset ? selectedAsset.assetData : 'none',
- instantEnvironment: INSTANT_DISCHARGE_TARGET || `Local ${NODE_ENV}`,
- baseCurrency,
- };
- return eventOptions;
- },
- trackInstantOpened: trackingEventFnWithoutPayload(EventNames.InstantOpened),
- trackInstantClosed: trackingEventFnWithoutPayload(EventNames.InstantClosed),
- trackAccountLocked: trackingEventFnWithoutPayload(EventNames.AccountLocked),
- trackAccountReady: (address: string) => trackingEventFnWithPayload(EventNames.AccountReady)({ address }),
- trackAccountUnlockRequested: trackingEventFnWithoutPayload(EventNames.AccountUnlockRequested),
- trackAccountUnlockDenied: trackingEventFnWithoutPayload(EventNames.AccountUnlockDenied),
- trackAccountAddressChanged: (address: string) =>
- trackingEventFnWithPayload(EventNames.AccountAddressChanged)({ address }),
- trackBaseCurrencyChanged: (currencyChangedTo: BaseCurrency) =>
- trackingEventFnWithPayload(EventNames.BaseCurrencyChanged)({ currencyChangedTo }),
- trackPaymentMethodDropdownOpened: trackingEventFnWithoutPayload(EventNames.PaymentMethodDropdownOpened),
- trackPaymentMethodOpenedEtherscan: trackingEventFnWithoutPayload(EventNames.PaymentMethodOpenedEtherscan),
- trackPaymentMethodCopiedAddress: trackingEventFnWithoutPayload(EventNames.PaymentMethodCopiedAddress),
- trackBuyNotEnoughEth: (buyQuote: BuyQuote) =>
- trackingEventFnWithPayload(EventNames.BuyNotEnoughEth)(buyQuoteEventProperties(buyQuote)),
- trackBuyStarted: (buyQuote: BuyQuote) =>
- trackingEventFnWithPayload(EventNames.BuyStarted)(buyQuoteEventProperties(buyQuote)),
- trackBuySignatureDenied: (buyQuote: BuyQuote) =>
- trackingEventFnWithPayload(EventNames.BuySignatureDenied)(buyQuoteEventProperties(buyQuote)),
- trackBuySimulationFailed: (buyQuote: BuyQuote) =>
- trackingEventFnWithPayload(EventNames.BuySimulationFailed)(buyQuoteEventProperties(buyQuote)),
- trackBuyUnknownError: (buyQuote: BuyQuote, errorMessage: string) =>
- trackingEventFnWithPayload(EventNames.BuyUnknownError)({
- ...buyQuoteEventProperties(buyQuote),
- errorMessage,
- }),
- trackBuyTxSubmitted: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) =>
- trackingEventFnWithPayload(EventNames.BuyTxSubmitted)({
- ...buyQuoteEventProperties(buyQuote),
- txHash,
- expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix,
- }),
- trackBuyTxSucceeded: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) =>
- trackingEventFnWithPayload(EventNames.BuyTxSucceeded)({
- ...buyQuoteEventProperties(buyQuote),
- txHash,
- expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix,
- actualTxTimeMs: new Date().getTime() - startTimeUnix,
- }),
- trackBuyTxFailed: (buyQuote: BuyQuote, txHash: string, startTimeUnix: number, expectedEndTimeUnix: number) =>
- trackingEventFnWithPayload(EventNames.BuyTxFailed)({
- ...buyQuoteEventProperties(buyQuote),
- txHash,
- expectedTxTimeMs: expectedEndTimeUnix - startTimeUnix,
- actualTxTimeMs: new Date().getTime() - startTimeUnix,
- }),
- trackInstallWalletClicked: (walletSuggestion: WalletSuggestion) =>
- trackingEventFnWithPayload(EventNames.InstallWalletClicked)({ walletSuggestion }),
- trackInstallWalletModalClickedExplanation: trackingEventFnWithoutPayload(
- EventNames.InstallWalletModalClickedExplanation,
- ),
- trackInstallWalletModalClickedGet: trackingEventFnWithoutPayload(EventNames.InstallWalletModalClickedGet),
- trackInstallWalletModalOpened: trackingEventFnWithoutPayload(EventNames.InstallWalletModalOpened),
- trackInstallWalletModalClosed: trackingEventFnWithoutPayload(EventNames.InstallWalletModalClosed),
- trackTokenSelectorOpened: trackingEventFnWithoutPayload(EventNames.TokenSelectorOpened),
- trackTokenSelectorClosed: (closedVia: TokenSelectorClosedVia) =>
- trackingEventFnWithPayload(EventNames.TokenSelectorClosed)({ closedVia }),
- trackTokenSelectorChose: (payload: { assetName: string; assetData: string }) =>
- trackingEventFnWithPayload(EventNames.TokenSelectorChose)(payload),
- trackTokenSelectorSearched: (searchText: string) =>
- trackingEventFnWithPayload(EventNames.TokenSelectorSearched)({ searchText }),
- trackTransactionViewed: (orderProcesState: OrderProcessState) =>
- trackingEventFnWithPayload(EventNames.TransactionViewed)({ orderState: orderProcesState }),
- trackQuoteFetched: (buyQuote: BuyQuote, fetchOrigin: QuoteFetchOrigin) =>
- trackingEventFnWithPayload(EventNames.QuoteFetched)({
- ...buyQuoteEventProperties(buyQuote),
- fetchOrigin,
- }),
- trackQuoteError: (errorMessage: string, assetBuyAmount: BigNumber, fetchOrigin: QuoteFetchOrigin) => {
- trackingEventFnWithPayload(EventNames.QuoteError)({
- errorMessage,
- assetBuyAmount: assetBuyAmount.toString(),
- fetchOrigin,
- });
- },
- trackUsdPriceFailed: trackingEventFnWithoutPayload(EventNames.UsdPriceFetchFailed),
-};
diff --git a/packages/instant/src/util/assert.ts b/packages/instant/src/util/assert.ts
deleted file mode 100644
index 971c1eb96..000000000
--- a/packages/instant/src/util/assert.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { assert as sharedAssert } from '@0x/assert';
-import { schemas } from '@0x/json-schemas';
-import { assetDataUtils } from '@0x/order-utils';
-import { AssetProxyId, ObjectMap, SignedOrder } from '@0x/types';
-import * as _ from 'lodash';
-
-import { AffiliateInfo, AssetMetaData } from '../types';
-
-export const assert = {
- ...sharedAssert,
- isValidOrderSource(variableName: string, orderSource: string | SignedOrder[]): void {
- if (_.isString(orderSource)) {
- sharedAssert.isUri(variableName, orderSource);
- return;
- }
- sharedAssert.doesConformToSchema(variableName, orderSource, schemas.signedOrdersSchema);
- },
- areValidAssetDatas(variableName: string, assetDatas: string[]): void {
- _.forEach(assetDatas, (assetData, index) => assert.isHexString(`${variableName}[${index}]`, assetData));
- },
- isValidAssetMetaDataMap(variableName: string, metaDataMap: ObjectMap<AssetMetaData>): void {
- _.forEach(metaDataMap, (metaData, assetData) => {
- assert.isHexString(`key ${assetData} of ${variableName}`, assetData);
- assert.isValidAssetMetaData(`${variableName}.${assetData}`, metaData);
- const assetDataProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- assert.assert(
- metaData.assetProxyId === assetDataProxyId,
- `Expected meta data for assetData ${assetData} to have asset proxy id of ${assetDataProxyId}, but instead got ${
- metaData.assetProxyId
- }`,
- );
- });
- },
- isValidAssetMetaData(variableName: string, metaData: AssetMetaData): void {
- assert.isHexString(`${variableName}.assetProxyId`, metaData.assetProxyId);
- if (!_.isUndefined(metaData.primaryColor)) {
- assert.isString(`${variableName}.primaryColor`, metaData.primaryColor);
- }
- if (metaData.assetProxyId === AssetProxyId.ERC20) {
- assert.isNumber(`${variableName}.decimals`, metaData.decimals);
- assert.isString(`${variableName}.symbol`, metaData.symbol);
- } else if (metaData.assetProxyId === AssetProxyId.ERC721) {
- assert.isString(`${variableName}.name`, metaData.name);
- assert.isUri(`${variableName}.imageUrl`, metaData.imageUrl);
- }
- },
- isValidAffiliateInfo(variableName: string, affiliateInfo: AffiliateInfo): void {
- assert.isETHAddressHex(`${variableName}.recipientAddress`, affiliateInfo.feeRecipient);
- assert.isNumber(`${variableName}.percentage`, affiliateInfo.feePercentage);
- assert.assert(
- affiliateInfo.feePercentage >= 0 && affiliateInfo.feePercentage <= 0.05,
- `Expected ${variableName}.percentage to be between 0 and 0.05, but is ${affiliateInfo.feePercentage}`,
- );
- },
-};
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts
deleted file mode 100644
index b5c97913d..000000000
--- a/packages/instant/src/util/asset.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-import { AssetBuyerError, InsufficientAssetLiquidityError } from '@0x/asset-buyer';
-import { AssetProxyId, ObjectMap } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-import { BIG_NUMBER_ZERO, DEFAULT_UNKOWN_ASSET_NAME } from '../constants';
-import { assetDataNetworkMapping } from '../data/asset_data_network_mapping';
-import { Asset, AssetMetaData, ERC20Asset, Network, ZeroExInstantError } from '../types';
-
-export const assetUtils = {
- createAssetsFromAssetDatas: (
- assetDatas: string[],
- assetMetaDataMap: ObjectMap<AssetMetaData>,
- network: Network,
- ): Asset[] => {
- const arrayOfAssetOrUndefined = _.map(assetDatas, assetData =>
- assetUtils.createAssetFromAssetDataIfExists(assetData, assetMetaDataMap, network),
- );
- return _.compact(arrayOfAssetOrUndefined);
- },
- createAssetFromAssetDataIfExists: (
- assetData: string,
- assetMetaDataMap: ObjectMap<AssetMetaData>,
- network: Network,
- ): Asset | undefined => {
- const metaData = assetUtils.getMetaDataIfExists(assetData, assetMetaDataMap, network);
- if (_.isUndefined(metaData)) {
- return;
- }
- return {
- assetData: assetData.toLowerCase(),
- metaData,
- };
- },
- createAssetFromAssetDataOrThrow: (
- assetData: string,
- assetMetaDataMap: ObjectMap<AssetMetaData>,
- network: Network,
- ): Asset => {
- return {
- assetData: assetData.toLowerCase(),
- metaData: assetUtils.getMetaDataOrThrow(assetData, assetMetaDataMap, network),
- };
- },
- getMetaDataOrThrow: (assetData: string, metaDataMap: ObjectMap<AssetMetaData>, network: Network): AssetMetaData => {
- const metaDataIfExists = assetUtils.getMetaDataIfExists(assetData, metaDataMap, network);
- if (_.isUndefined(metaDataIfExists)) {
- throw new Error(ZeroExInstantError.AssetMetaDataNotAvailable);
- }
- return metaDataIfExists;
- },
- getMetaDataIfExists: (
- assetData: string,
- metaDataMap: ObjectMap<AssetMetaData>,
- network: Network,
- ): AssetMetaData | undefined => {
- let mainnetAssetData: string | undefined = assetData;
- if (network !== Network.Mainnet) {
- const mainnetAssetDataIfExists = assetUtils.getAssociatedAssetDataIfExists(
- assetData.toLowerCase(),
- network,
- );
- // Just so we don't fail in the case where we are on a non-mainnet network,
- // but pass in a valid mainnet assetData.
- mainnetAssetData = mainnetAssetDataIfExists || assetData;
- }
- if (_.isUndefined(mainnetAssetData)) {
- return;
- }
- const metaData = metaDataMap[mainnetAssetData.toLowerCase()];
- if (_.isUndefined(metaData)) {
- return;
- }
- return metaData;
- },
- bestNameForAsset: (asset?: Asset, defaultName: string = DEFAULT_UNKOWN_ASSET_NAME): string => {
- if (_.isUndefined(asset)) {
- return defaultName;
- }
- const metaData = asset.metaData;
- switch (metaData.assetProxyId) {
- case AssetProxyId.ERC20:
- return metaData.symbol.toUpperCase();
- case AssetProxyId.ERC721:
- return metaData.name;
- }
- },
- formattedSymbolForAsset: (asset?: ERC20Asset, defaultName: string = '???'): string => {
- if (_.isUndefined(asset)) {
- return defaultName;
- }
- const symbol = asset.metaData.symbol;
- if (symbol.length <= 5) {
- return symbol;
- }
- return `${symbol.slice(0, 3)}…`;
- },
- getAssociatedAssetDataIfExists: (assetData: string, network: Network): string | undefined => {
- const assetDataGroupIfExists = _.find(assetDataNetworkMapping, value => value[network] === assetData);
- if (_.isUndefined(assetDataGroupIfExists)) {
- return;
- }
- return assetDataGroupIfExists[Network.Mainnet];
- },
- getERC20AssetsFromAssets: (assets: Asset[]): ERC20Asset[] => {
- const erc20sOrUndefined = _.map(assets, asset =>
- asset.metaData.assetProxyId === AssetProxyId.ERC20 ? (asset as ERC20Asset) : undefined,
- );
- return _.compact(erc20sOrUndefined);
- },
- assetBuyerErrorMessage: (asset: ERC20Asset, error: Error): string | undefined => {
- if (error.message === AssetBuyerError.InsufficientAssetLiquidity) {
- const assetName = assetUtils.bestNameForAsset(asset, 'of this asset');
- if (
- error instanceof InsufficientAssetLiquidityError &&
- error.amountAvailableToFill.isGreaterThan(BIG_NUMBER_ZERO)
- ) {
- const unitAmountAvailableToFill = Web3Wrapper.toUnitAmount(
- error.amountAvailableToFill,
- asset.metaData.decimals,
- );
- const roundedUnitAmountAvailableToFill = unitAmountAvailableToFill.decimalPlaces(
- 2,
- BigNumber.ROUND_DOWN,
- );
-
- if (roundedUnitAmountAvailableToFill.isGreaterThan(BIG_NUMBER_ZERO)) {
- return `There are only ${roundedUnitAmountAvailableToFill} ${assetName} available to buy`;
- }
- }
-
- return `Not enough ${assetName} available`;
- } else if (error.message === AssetBuyerError.InsufficientZrxLiquidity) {
- return 'Not enough ZRX available';
- } else if (
- error.message === AssetBuyerError.StandardRelayerApiError ||
- error.message.startsWith(AssetBuyerError.AssetUnavailable)
- ) {
- const assetName = assetUtils.bestNameForAsset(asset, 'This asset');
- return `${assetName} is currently unavailable`;
- }
-
- return undefined;
- },
-};
diff --git a/packages/instant/src/util/asset_buyer_factory.ts b/packages/instant/src/util/asset_buyer_factory.ts
deleted file mode 100644
index 5ba46223c..000000000
--- a/packages/instant/src/util/asset_buyer_factory.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { AssetBuyer, AssetBuyerOpts } from '@0x/asset-buyer';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { Network, OrderSource } from '../types';
-
-export const assetBuyerFactory = {
- getAssetBuyer: (provider: Provider, orderSource: OrderSource, network: Network): AssetBuyer => {
- const assetBuyerOptions: Partial<AssetBuyerOpts> = {
- networkId: network,
- };
- const assetBuyer = _.isString(orderSource)
- ? AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(provider, orderSource, assetBuyerOptions)
- : AssetBuyer.getAssetBuyerForProvidedOrders(provider, orderSource, assetBuyerOptions);
- return assetBuyer;
- },
-};
diff --git a/packages/instant/src/util/buy_quote_updater.ts b/packages/instant/src/util/buy_quote_updater.ts
deleted file mode 100644
index 37974e71c..000000000
--- a/packages/instant/src/util/buy_quote_updater.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { AssetBuyer, BuyQuote } from '@0x/asset-buyer';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import { Dispatch } from 'redux';
-import { oc } from 'ts-optchain';
-
-import { SLIPPAGE_PERCENTAGE } from '../constants';
-import { Action, actions } from '../redux/actions';
-import { AffiliateInfo, ERC20Asset, QuoteFetchOrigin } from '../types';
-import { analytics } from '../util/analytics';
-import { assetUtils } from '../util/asset';
-import { errorFlasher } from '../util/error_flasher';
-import { errorReporter } from '../util/error_reporter';
-
-export const buyQuoteUpdater = {
- updateBuyQuoteAsync: async (
- assetBuyer: AssetBuyer,
- dispatch: Dispatch<Action>,
- asset: ERC20Asset,
- assetUnitAmount: BigNumber,
- fetchOrigin: QuoteFetchOrigin,
- options: {
- setPending: boolean;
- dispatchErrors: boolean;
- affiliateInfo?: AffiliateInfo;
- },
- ): Promise<void> => {
- // get a new buy quote.
- const baseUnitValue = Web3Wrapper.toBaseUnitAmount(assetUnitAmount, asset.metaData.decimals);
- if (options.setPending) {
- // mark quote as pending
- dispatch(actions.setQuoteRequestStatePending());
- }
- const feePercentage = oc(options.affiliateInfo).feePercentage();
- let newBuyQuote: BuyQuote | undefined;
- const slippagePercentage = SLIPPAGE_PERCENTAGE;
- try {
- newBuyQuote = await assetBuyer.getBuyQuoteAsync(asset.assetData, baseUnitValue, {
- feePercentage,
- slippagePercentage,
- });
- } catch (error) {
- const errorMessage = assetUtils.assetBuyerErrorMessage(asset, error);
-
- errorReporter.report(error);
- analytics.trackQuoteError(error.message ? error.message : 'other', baseUnitValue, fetchOrigin);
-
- if (options.dispatchErrors) {
- dispatch(actions.setQuoteRequestStateFailure());
- errorFlasher.flashNewErrorMessage(dispatch, errorMessage || 'Error fetching price, please try again');
- }
- return;
- }
- // We have a successful new buy quote
- errorFlasher.clearError(dispatch);
- // invalidate the last buy quote.
- dispatch(actions.updateLatestBuyQuote(newBuyQuote));
- analytics.trackQuoteFetched(newBuyQuote, fetchOrigin);
- },
-};
diff --git a/packages/instant/src/util/coinbase_api.ts b/packages/instant/src/util/coinbase_api.ts
deleted file mode 100644
index faac8d82d..000000000
--- a/packages/instant/src/util/coinbase_api.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber, fetchAsync } from '@0x/utils';
-
-import { COINBASE_API_BASE_URL } from '../constants';
-
-export const coinbaseApi = {
- getEthUsdPrice: async (): Promise<BigNumber> => {
- const res = await fetchAsync(`${COINBASE_API_BASE_URL}/prices/ETH-USD/buy`);
- const resJson = await res.json();
- return new BigNumber(resJson.data.amount);
- },
-};
diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts
deleted file mode 100644
index 7d4f836ff..000000000
--- a/packages/instant/src/util/env.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as bowser from 'bowser';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { PROVIDER_TYPE_TO_NAME } from '../constants';
-import { Browser, OperatingSystem, ProviderType } from '../types';
-
-export const envUtil = {
- getBrowser(): Browser {
- if (bowser.chrome) {
- return Browser.Chrome;
- } else if (bowser.firefox) {
- return Browser.Firefox;
- } else if (bowser.opera) {
- return Browser.Opera;
- } else if (bowser.msedge) {
- return Browser.Edge;
- } else if (bowser.safari) {
- return Browser.Safari;
- } else {
- return Browser.Other;
- }
- },
- isMobileOperatingSystem(): boolean {
- return bowser.mobile;
- },
- getOperatingSystem(): OperatingSystem {
- if (bowser.android) {
- return OperatingSystem.Android;
- } else if (bowser.ios) {
- return OperatingSystem.iOS;
- } else if (bowser.mac) {
- return OperatingSystem.Mac;
- } else if (bowser.windows) {
- return OperatingSystem.Windows;
- } else if (bowser.windowsphone) {
- return OperatingSystem.WindowsPhone;
- } else if (bowser.linux) {
- return OperatingSystem.Linux;
- } else {
- return OperatingSystem.Other;
- }
- },
- getProviderType(provider: Provider): ProviderType | undefined {
- const anyProvider = provider as any;
- if (provider.constructor.name === 'EthereumProvider') {
- return ProviderType.Mist;
- } else if (anyProvider.isTrust) {
- return ProviderType.TrustWallet;
- } else if (anyProvider.isParity) {
- return ProviderType.Parity;
- } else if (anyProvider.isMetaMask) {
- return ProviderType.MetaMask;
- } else if (!_.isUndefined(_.get(window, 'SOFA'))) {
- return ProviderType.CoinbaseWallet;
- } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) {
- return ProviderType.Cipher;
- } else if (envUtil.getBrowser() === Browser.Opera && !anyProvider.isMetaMask) {
- return ProviderType.Opera;
- }
- return;
- },
- getProviderName(provider: Provider): string {
- const providerTypeIfExists = envUtil.getProviderType(provider);
- if (_.isUndefined(providerTypeIfExists)) {
- return provider.constructor.name;
- }
- return PROVIDER_TYPE_TO_NAME[providerTypeIfExists];
- },
- getProviderDisplayName(provider: Provider): string {
- const providerTypeIfExists = envUtil.getProviderType(provider);
- if (_.isUndefined(providerTypeIfExists)) {
- return 'Wallet';
- }
- return PROVIDER_TYPE_TO_NAME[providerTypeIfExists];
- },
-};
diff --git a/packages/instant/src/util/error_flasher.ts b/packages/instant/src/util/error_flasher.ts
deleted file mode 100644
index 068c12fe2..000000000
--- a/packages/instant/src/util/error_flasher.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { Dispatch } from 'redux';
-
-import { Action, actions } from '../redux/actions';
-
-class ErrorFlasher {
- private _timeoutId?: number;
- public flashNewErrorMessage(dispatch: Dispatch<Action>, errorMessage?: string, delayMs: number = 7000): void {
- this._clearTimeout();
- // dispatch new message
- dispatch(actions.setErrorMessage(errorMessage || 'Something went wrong...'));
- this._timeoutId = window.setTimeout(() => {
- dispatch(actions.hideError());
- }, delayMs);
- }
- public clearError(dispatch: Dispatch<Action>): void {
- this._clearTimeout();
- dispatch(actions.hideError());
- }
- private _clearTimeout(): void {
- if (this._timeoutId) {
- window.clearTimeout(this._timeoutId);
- }
- }
-}
-
-export const errorFlasher = new ErrorFlasher();
diff --git a/packages/instant/src/util/error_reporter.ts b/packages/instant/src/util/error_reporter.ts
deleted file mode 100644
index 8d7481684..000000000
--- a/packages/instant/src/util/error_reporter.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import {
- GIT_SHA,
- HOST_DOMAINS_EXTERNAL,
- HOST_DOMAINS_LOCAL,
- INSTANT_DISCHARGE_TARGET,
- NODE_ENV,
- ROLLBAR_CLIENT_TOKEN,
- ROLLBAR_ENABLED,
-} from '../constants';
-
-// Import version of Rollbar designed for embedded components
-// See https://docs.rollbar.com/docs/using-rollbarjs-inside-an-embedded-component
-// tslint:disable-next-line:no-var-requires
-const Rollbar = require('rollbar/dist/rollbar.noconflict.umd');
-
-const getRollbarHostDomains = (): string[] => {
- if (NODE_ENV === 'development') {
- return HOST_DOMAINS_EXTERNAL.concat(HOST_DOMAINS_LOCAL);
- } else {
- return HOST_DOMAINS_EXTERNAL;
- }
-};
-
-let rollbar: any;
-// Configures rollbar and sets up error catching
-export const setupRollbar = (): any => {
- if (_.isUndefined(rollbar) && ROLLBAR_CLIENT_TOKEN && ROLLBAR_ENABLED) {
- const hostDomains = getRollbarHostDomains();
- rollbar = new Rollbar({
- accessToken: ROLLBAR_CLIENT_TOKEN,
- captureUncaught: true,
- captureUnhandledRejections: true,
- enabled: true,
- itemsPerMinute: 10,
- maxItems: 500,
- payload: {
- environment: INSTANT_DISCHARGE_TARGET || `Local ${NODE_ENV}`,
- client: {
- javascript: {
- source_map_enabled: true,
- code_version: GIT_SHA,
- guess_uncaught_frames: true,
- },
- },
- },
- hostWhiteList: hostDomains,
- uncaughtErrorLevel: 'error',
- ignoredMessages: [
- // Errors from the third-party scripts
- 'Script error',
- // Network errors or ad-blockers
- 'TypeError: Failed to fetch',
- 'Exchange has not been deployed to detected network (network/artifact mismatch)',
- // Source: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/7VU0_VvC7mE
- "undefined is not an object (evaluating '__gCrWeb.autofill.extractForms')",
- // Source: http://stackoverflow.com/questions/43399818/securityerror-from-facebook-and-cross-domain-messaging
- 'SecurityError (DOM Exception 18)',
- ],
- });
- }
-};
-
-export const errorReporter = {
- report(err: Error): void {
- if (!rollbar) {
- logUtils.log('Not reporting to rollbar because not configured', err);
- return;
- }
-
- rollbar.error(err, (rollbarErr: Error) => {
- if (rollbarErr) {
- logUtils.log(`Error reporting to rollbar, ignoring: ${rollbarErr}`);
- }
- });
- },
-};
diff --git a/packages/instant/src/util/etherscan.ts b/packages/instant/src/util/etherscan.ts
deleted file mode 100644
index f9bf82827..000000000
--- a/packages/instant/src/util/etherscan.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as _ from 'lodash';
-
-import { Network } from '../types';
-
-const etherscanPrefix = (networkId: number): string | undefined => {
- switch (networkId) {
- case Network.Kovan:
- return 'kovan.';
- case Network.Mainnet:
- return '';
- }
- return '';
-};
-
-export const etherscanUtil = {
- getEtherScanTxnAddressIfExists: (txHash: string, networkId: number) => {
- const prefix = etherscanPrefix(networkId);
- if (_.isUndefined(prefix)) {
- return;
- }
- return `https://${prefix}etherscan.io/tx/${txHash}`;
- },
- getEtherScanEthAddressIfExists: (ethAddress: string, networkId: number) => {
- const prefix = etherscanPrefix(networkId);
- if (_.isUndefined(prefix)) {
- return;
- }
- return `https://${prefix}etherscan.io/address/${ethAddress}`;
- },
-};
diff --git a/packages/instant/src/util/format.ts b/packages/instant/src/util/format.ts
deleted file mode 100644
index 61aeb839f..000000000
--- a/packages/instant/src/util/format.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-import { BIG_NUMBER_ZERO, ETH_DECIMALS } from '../constants';
-
-export const format = {
- ethBaseUnitAmount: (
- ethBaseUnitAmount?: BigNumber,
- decimalPlaces: number = 4,
- defaultText: React.ReactNode = '0 ETH',
- ): React.ReactNode => {
- if (_.isUndefined(ethBaseUnitAmount)) {
- return defaultText;
- }
- const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseUnitAmount, ETH_DECIMALS);
- return format.ethUnitAmount(ethUnitAmount, decimalPlaces);
- },
- ethUnitAmount: (
- ethUnitAmount?: BigNumber,
- decimalPlaces: number = 4,
- defaultText: React.ReactNode = '0 ETH',
- minUnitAmountToDisplay: BigNumber = new BigNumber('0.00001'),
- ): React.ReactNode => {
- if (_.isUndefined(ethUnitAmount)) {
- return defaultText;
- }
- let roundedAmount = ethUnitAmount.decimalPlaces(decimalPlaces).precision(decimalPlaces);
-
- if (roundedAmount.eq(BIG_NUMBER_ZERO) && ethUnitAmount.isGreaterThan(BIG_NUMBER_ZERO)) {
- // Sometimes for small ETH amounts (i.e. 0.000045) the amount rounded to 4 decimalPlaces is 0
- // If that is the case, show to 1 significant digit
- roundedAmount = new BigNumber(ethUnitAmount.toPrecision(1));
- }
-
- const displayAmount =
- roundedAmount.isGreaterThan(BIG_NUMBER_ZERO) && roundedAmount.isLessThan(minUnitAmountToDisplay)
- ? `< ${minUnitAmountToDisplay.toString()}`
- : roundedAmount.toString();
-
- return `${displayAmount} ETH`;
- },
- ethBaseUnitAmountInUsd: (
- ethBaseUnitAmount?: BigNumber,
- ethUsdPrice?: BigNumber,
- decimalPlaces: number = 2,
- defaultText: React.ReactNode = '$0.00',
- minUnitAmountToDisplay: BigNumber = new BigNumber('0.00001'),
- ): React.ReactNode => {
- if (_.isUndefined(ethBaseUnitAmount) || _.isUndefined(ethUsdPrice)) {
- return defaultText;
- }
- const ethUnitAmount = Web3Wrapper.toUnitAmount(ethBaseUnitAmount, ETH_DECIMALS);
- return format.ethUnitAmountInUsd(ethUnitAmount, ethUsdPrice, decimalPlaces, minUnitAmountToDisplay);
- },
- ethUnitAmountInUsd: (
- ethUnitAmount?: BigNumber,
- ethUsdPrice?: BigNumber,
- decimalPlaces: number = 2,
- defaultText: React.ReactNode = '$0.00',
- ): React.ReactNode => {
- if (_.isUndefined(ethUnitAmount) || _.isUndefined(ethUsdPrice)) {
- return defaultText;
- }
- const rawUsdPrice = ethUnitAmount.multipliedBy(ethUsdPrice);
- const roundedUsdPrice = rawUsdPrice.toFixed(decimalPlaces);
- if (roundedUsdPrice === '0.00' && rawUsdPrice.gt(BIG_NUMBER_ZERO)) {
- return '<$0.01';
- } else {
- return `$${roundedUsdPrice}`;
- }
- },
- ethAddress: (address: string): string => {
- return `0x${address.slice(2, 7)}…${address.slice(-5)}`;
- },
-};
diff --git a/packages/instant/src/util/gas_price_estimator.ts b/packages/instant/src/util/gas_price_estimator.ts
deleted file mode 100644
index 9792b60ba..000000000
--- a/packages/instant/src/util/gas_price_estimator.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { BigNumber, fetchAsync } from '@0x/utils';
-
-import {
- DEFAULT_ESTIMATED_TRANSACTION_TIME_MS,
- DEFAULT_GAS_PRICE,
- ETH_GAS_STATION_API_BASE_URL,
- GWEI_IN_WEI,
-} from '../constants';
-
-import { errorReporter } from './error_reporter';
-
-interface EthGasStationResult {
- average: number;
- fastestWait: number;
- fastWait: number;
- fast: number;
- safeLowWait: number;
- blockNum: number;
- avgWait: number;
- block_time: number;
- speed: number;
- fastest: number;
- safeLow: number;
-}
-
-interface GasInfo {
- gasPriceInWei: BigNumber;
- estimatedTimeMs: number;
-}
-
-const fetchFastAmountInWeiAsync = async (): Promise<GasInfo> => {
- const res = await fetchAsync(`${ETH_GAS_STATION_API_BASE_URL}/json/ethgasAPI.json`);
- const gasInfo = (await res.json()) as EthGasStationResult;
- // Eth Gas Station result is gwei * 10
- const gasPriceInGwei = new BigNumber(gasInfo.fast / 10);
- // Time is in minutes
- const estimatedTimeMs = gasInfo.fastWait * 60 * 1000; // Minutes to MS
- return { gasPriceInWei: gasPriceInGwei.multipliedBy(GWEI_IN_WEI), estimatedTimeMs };
-};
-
-export class GasPriceEstimator {
- private _lastFetched?: GasInfo;
- public async getGasInfoAsync(): Promise<GasInfo> {
- let fetchedAmount: GasInfo | undefined;
- try {
- fetchedAmount = await fetchFastAmountInWeiAsync();
- } catch (e) {
- fetchedAmount = undefined;
- errorReporter.report(e);
- }
-
- if (fetchedAmount) {
- this._lastFetched = fetchedAmount;
- }
-
- return (
- fetchedAmount ||
- this._lastFetched || {
- gasPriceInWei: DEFAULT_GAS_PRICE,
- estimatedTimeMs: DEFAULT_ESTIMATED_TRANSACTION_TIME_MS,
- }
- );
- }
-}
-export const gasPriceEstimator = new GasPriceEstimator();
diff --git a/packages/instant/src/util/heap.ts b/packages/instant/src/util/heap.ts
deleted file mode 100644
index 279ff3059..000000000
--- a/packages/instant/src/util/heap.ts
+++ /dev/null
@@ -1,116 +0,0 @@
-import { ObjectMap } from '@0x/types';
-import { logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { HEAP_ANALYTICS_ID } from '../constants';
-
-import { AnalyticsEventOptions, AnalyticsUserOptions } from './analytics';
-import { errorReporter } from './error_reporter';
-
-export type EventProperties = ObjectMap<string | number>;
-
-export interface HeapAnalytics {
- loaded: boolean;
- appid: string;
- identify(id: string, idType: string): void;
- track(eventName: string, eventProperties?: EventProperties): void;
- resetIdentity(): void;
- addUserProperties(properties: AnalyticsUserOptions): void;
- addEventProperties(properties: AnalyticsEventOptions): void;
- removeEventProperty(property: string): void;
- clearEventProperties(): void;
-}
-interface ModifiedWindow {
- heap?: HeapAnalytics;
- zeroExInstantLoadedHeap?: boolean;
-}
-const getWindow = (): ModifiedWindow => {
- return window as ModifiedWindow;
-};
-
-const setupZeroExInstantHeap = () => {
- if (_.isUndefined(HEAP_ANALYTICS_ID)) {
- return;
- }
-
- const curWindow = getWindow();
- // Set property to specify that this is zeroEx's heap
- curWindow.zeroExInstantLoadedHeap = true;
-
- // Typescript-compatible version of https://docs.heapanalytics.com/docs/installation
- /* tslint:disable */
- ((window as any).heap = (window as any).heap || []),
- ((window as any).heap.load = function(e: any, t: any) {
- ((window as any).heap.appid = e), ((window as any).heap.config = t = t || {});
- var r = t.forceSSL || 'https:' === (document.location as Location).protocol,
- a = document.createElement('script');
- (a.type = 'text/javascript'),
- (a.async = !0),
- (a.src = (r ? 'https:' : 'http:') + '//cdn.heapanalytics.com/js/heap-' + e + '.js');
- var n = document.getElementsByTagName('script')[0];
- (n.parentNode as Node).insertBefore(a, n);
- for (
- var o = function(e: any) {
- return function() {
- (window as any).heap.push([e].concat(Array.prototype.slice.call(arguments, 0)));
- };
- },
- p = [
- 'addEventProperties',
- 'addUserProperties',
- 'clearEventProperties',
- 'identify',
- 'resetIdentity',
- 'removeEventProperty',
- 'setEventProperties',
- 'track',
- 'unsetEventProperty',
- ],
- c = 0;
- c < p.length;
- c++
- )
- (window as any).heap[p[c]] = o(p[c]);
- });
- (window as any).heap.load(HEAP_ANALYTICS_ID);
- /* tslint:enable */
-
- return curWindow.heap as HeapAnalytics;
-};
-
-export const heapUtil = {
- getHeap: (): HeapAnalytics | undefined => {
- const curWindow = getWindow();
- const hasOtherExistingHeapIntegration = curWindow.heap && !curWindow.zeroExInstantLoadedHeap;
- if (hasOtherExistingHeapIntegration) {
- return undefined;
- }
-
- const zeroExInstantHeapIntegration = curWindow.zeroExInstantLoadedHeap && curWindow.heap;
- if (zeroExInstantHeapIntegration) {
- return zeroExInstantHeapIntegration;
- }
-
- return setupZeroExInstantHeap();
- },
- evaluateHeapCall: (heapFunctionCall: (heap: HeapAnalytics) => void): void => {
- if (_.isUndefined(HEAP_ANALYTICS_ID)) {
- return;
- }
-
- const curHeap = heapUtil.getHeap();
- if (curHeap) {
- try {
- if (curHeap.appid !== HEAP_ANALYTICS_ID) {
- // Integrator has included heap after us and reset the app id
- return;
- }
- heapFunctionCall(curHeap);
- } catch (e) {
- // We never want analytics to crash our React component
- logUtils.log('Analytics error', e);
- errorReporter.report(e);
- }
- }
- },
-};
diff --git a/packages/instant/src/util/heartbeater.ts b/packages/instant/src/util/heartbeater.ts
deleted file mode 100644
index e700d489e..000000000
--- a/packages/instant/src/util/heartbeater.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { intervalUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-type HeartbeatableFunction = () => Promise<void>;
-export class Heartbeater {
- private _intervalId?: NodeJS.Timer;
- private readonly _performImmediatelyOnStart: boolean;
- private readonly _performFunction: HeartbeatableFunction;
-
- public constructor(performingFunctionAsync: HeartbeatableFunction, performImmediatelyOnStart: boolean) {
- this._performFunction = performingFunctionAsync;
- this._performImmediatelyOnStart = performImmediatelyOnStart;
- }
-
- public start(intervalTimeMs: number): void {
- if (!_.isUndefined(this._intervalId)) {
- throw new Error('Heartbeat is running, please stop before restarting');
- }
-
- if (this._performImmediatelyOnStart) {
- // tslint:disable-next-line:no-floating-promises
- this._performFunction();
- }
-
- // tslint:disable-next-line:no-unbound-method
- this._intervalId = intervalUtils.setAsyncExcludingInterval(this._performFunction, intervalTimeMs, _.noop);
- }
-
- public stop(): void {
- if (this._intervalId) {
- intervalUtils.clearInterval(this._intervalId);
- }
- this._intervalId = undefined;
- }
-}
diff --git a/packages/instant/src/util/heartbeater_factory.ts b/packages/instant/src/util/heartbeater_factory.ts
deleted file mode 100644
index cf29bf3ea..000000000
--- a/packages/instant/src/util/heartbeater_factory.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { asyncData } from '../redux/async_data';
-import { Store } from '../redux/store';
-import { QuoteFetchOrigin } from '../types';
-
-import { Heartbeater } from './heartbeater';
-
-export interface HeartbeatFactoryOptions {
- store: Store;
- shouldPerformImmediatelyOnStart: boolean;
-}
-export const generateAccountHeartbeater = (options: HeartbeatFactoryOptions): Heartbeater => {
- const { store, shouldPerformImmediatelyOnStart } = options;
- return new Heartbeater(async () => {
- await asyncData.fetchAccountInfoAndDispatchToStore(store.getState().providerState, store.dispatch, false);
- }, shouldPerformImmediatelyOnStart);
-};
-
-export const generateBuyQuoteHeartbeater = (options: HeartbeatFactoryOptions): Heartbeater => {
- const { store, shouldPerformImmediatelyOnStart } = options;
- return new Heartbeater(async () => {
- await asyncData.fetchCurrentBuyQuoteAndDispatchToStore(
- store.getState(),
- store.dispatch,
- QuoteFetchOrigin.Heartbeat,
- {
- updateSilently: true,
- },
- );
- }, shouldPerformImmediatelyOnStart);
-};
diff --git a/packages/instant/src/util/maybe_big_number.ts b/packages/instant/src/util/maybe_big_number.ts
deleted file mode 100644
index f48473389..000000000
--- a/packages/instant/src/util/maybe_big_number.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { Maybe } from '../types';
-
-export const maybeBigNumberUtil = {
- // converts a string to a Maybe<BigNumber>
- // if string is a NaN, considered undefined
- stringToMaybeBigNumber: (stringValue: string): Maybe<BigNumber> => {
- let validBigNumber: BigNumber;
- try {
- validBigNumber = new BigNumber(stringValue);
- } catch {
- return undefined;
- }
-
- return validBigNumber.isNaN() ? undefined : validBigNumber;
- },
- areMaybeBigNumbersEqual: (val1: Maybe<BigNumber>, val2: Maybe<BigNumber>): boolean => {
- if (!_.isUndefined(val1) && !_.isUndefined(val2)) {
- return val1.isEqualTo(val2);
- }
- return _.isUndefined(val1) && _.isUndefined(val2);
- },
-};
diff --git a/packages/instant/src/util/provider_factory.ts b/packages/instant/src/util/provider_factory.ts
deleted file mode 100644
index 603f7674d..000000000
--- a/packages/instant/src/util/provider_factory.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { EmptyWalletSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BLOCK_POLLING_INTERVAL_MS, ETHEREUM_NODE_URL_BY_NETWORK } from '../constants';
-import { Maybe, Network } from '../types';
-
-export const providerFactory = {
- getInjectedProviderIfExists: (): Maybe<Provider> => {
- const injectedProviderIfExists = (window as any).ethereum;
- if (!_.isUndefined(injectedProviderIfExists)) {
- return injectedProviderIfExists;
- }
- const injectedWeb3IfExists = (window as any).web3;
- if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) {
- return injectedWeb3IfExists.currentProvider;
- }
- return undefined;
- },
- getFallbackNoSigningProvider: (network: Network): Provider => {
- const providerEngine = new Web3ProviderEngine({
- pollingInterval: BLOCK_POLLING_INTERVAL_MS,
- });
- // Intercept calls to `eth_accounts` and always return empty
- providerEngine.addProvider(new EmptyWalletSubprovider());
- // Construct an RPC subprovider, all data based requests will be sent via the RPCSubprovider
- // TODO(bmillman): make this more resilient to infura failures
- const rpcUrl = ETHEREUM_NODE_URL_BY_NETWORK[network];
- providerEngine.addProvider(new RPCSubprovider(rpcUrl));
- // // Start the Provider Engine
- providerEngine.start();
- return providerEngine;
- },
-};
diff --git a/packages/instant/src/util/provider_state_factory.ts b/packages/instant/src/util/provider_state_factory.ts
deleted file mode 100644
index bd2d6dad5..000000000
--- a/packages/instant/src/util/provider_state_factory.ts
+++ /dev/null
@@ -1,90 +0,0 @@
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { LOADING_ACCOUNT, NO_ACCOUNT } from '../constants';
-import { Maybe, Network, OrderSource, ProviderState } from '../types';
-import { envUtil } from '../util/env';
-
-import { assetBuyerFactory } from './asset_buyer_factory';
-import { providerFactory } from './provider_factory';
-
-export const providerStateFactory = {
- getInitialProviderState: (
- orderSource: OrderSource,
- network: Network,
- provider?: Provider,
- walletDisplayName?: string,
- ): ProviderState => {
- if (!_.isUndefined(provider)) {
- return providerStateFactory.getInitialProviderStateFromProvider(
- orderSource,
- network,
- provider,
- walletDisplayName,
- );
- }
- const providerStateFromWindowIfExits = providerStateFactory.getInitialProviderStateFromWindowIfExists(
- orderSource,
- network,
- walletDisplayName,
- );
- if (providerStateFromWindowIfExits) {
- return providerStateFromWindowIfExits;
- } else {
- return providerStateFactory.getInitialProviderStateFallback(orderSource, network, walletDisplayName);
- }
- },
- getInitialProviderStateFromProvider: (
- orderSource: OrderSource,
- network: Network,
- provider: Provider,
- walletDisplayName?: string,
- ): ProviderState => {
- const providerState: ProviderState = {
- name: envUtil.getProviderName(provider),
- displayName: walletDisplayName || envUtil.getProviderDisplayName(provider),
- provider,
- web3Wrapper: new Web3Wrapper(provider),
- assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network),
- account: LOADING_ACCOUNT,
- };
- return providerState;
- },
- getInitialProviderStateFromWindowIfExists: (
- orderSource: OrderSource,
- network: Network,
- walletDisplayName?: string,
- ): Maybe<ProviderState> => {
- const injectedProviderIfExists = providerFactory.getInjectedProviderIfExists();
- if (!_.isUndefined(injectedProviderIfExists)) {
- const providerState: ProviderState = {
- name: envUtil.getProviderName(injectedProviderIfExists),
- displayName: walletDisplayName || envUtil.getProviderDisplayName(injectedProviderIfExists),
- provider: injectedProviderIfExists,
- web3Wrapper: new Web3Wrapper(injectedProviderIfExists),
- assetBuyer: assetBuyerFactory.getAssetBuyer(injectedProviderIfExists, orderSource, network),
- account: LOADING_ACCOUNT,
- };
- return providerState;
- } else {
- return undefined;
- }
- },
- getInitialProviderStateFallback: (
- orderSource: OrderSource,
- network: Network,
- walletDisplayName?: string,
- ): ProviderState => {
- const provider = providerFactory.getFallbackNoSigningProvider(network);
- const providerState: ProviderState = {
- name: 'Fallback',
- displayName: walletDisplayName || envUtil.getProviderDisplayName(provider),
- provider,
- web3Wrapper: new Web3Wrapper(provider),
- assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network),
- account: NO_ACCOUNT,
- };
- return providerState;
- },
-};
diff --git a/packages/instant/src/util/time.ts b/packages/instant/src/util/time.ts
deleted file mode 100644
index bfe69cad5..000000000
--- a/packages/instant/src/util/time.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-const secondsToMinutesAndRemainingSeconds = (seconds: number): { minutes: number; remainingSeconds: number } => {
- const minutes = Math.floor(seconds / 60);
- const remainingSeconds = seconds - minutes * 60;
-
- return {
- minutes,
- remainingSeconds,
- };
-};
-
-const padZero = (aNumber: number): string => {
- return aNumber < 10 ? `0${aNumber}` : aNumber.toString();
-};
-
-export const timeUtil = {
- // converts seconds to human readable version of seconds or minutes
- secondsToHumanDescription: (seconds: number): string => {
- const { minutes, remainingSeconds } = secondsToMinutesAndRemainingSeconds(seconds);
-
- if (minutes === 0) {
- const suffix = seconds > 1 ? 's' : '';
- return `${seconds} second${suffix}`;
- }
-
- const minuteSuffix = minutes > 1 ? 's' : '';
- const minuteText = `${minutes} minute${minuteSuffix}`;
-
- const secondsSuffix = remainingSeconds > 1 ? 's' : '';
- const secondsText = remainingSeconds === 0 ? '' : ` ${remainingSeconds} second${secondsSuffix}`;
-
- return `${minuteText}${secondsText}`;
- },
- // converts seconds to stopwatch time (i.e. 05:30 and 00:30)
- // only goes up to minutes, not hours
- secondsToStopwatchTime: (seconds: number): string => {
- const { minutes, remainingSeconds } = secondsToMinutesAndRemainingSeconds(seconds);
- return `${padZero(minutes)}:${padZero(remainingSeconds)}`;
- },
-};
diff --git a/packages/instant/src/util/util.ts b/packages/instant/src/util/util.ts
deleted file mode 100644
index 29b6b1d2b..000000000
--- a/packages/instant/src/util/util.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-import * as _ from 'lodash';
-
-export const util = {
- boundNoop: _.noop.bind(_),
- createOpenUrlInNewWindow: (href: string) => () => window.open(href, '_blank'),
-};
diff --git a/packages/instant/test/components/zero_ex_instant.test.tsx b/packages/instant/test/components/zero_ex_instant.test.tsx
deleted file mode 100644
index e373bb002..000000000
--- a/packages/instant/test/components/zero_ex_instant.test.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { configure, shallow } from 'enzyme';
-import * as Adapter from 'enzyme-adapter-react-16';
-import * as React from 'react';
-
-configure({ adapter: new Adapter() });
-
-// TODO: Write non-trivial tests.
-// At time of writing we cannot render ZeroExInstant
-// because we are looking for a provider on window.
-// But in the future it will be dependency injected.
-describe('<Test />', () => {
- it('runs a test', () => {
- shallow(<div />);
- });
-});
diff --git a/packages/instant/test/util/asset.test.ts b/packages/instant/test/util/asset.test.ts
deleted file mode 100644
index 402a556d5..000000000
--- a/packages/instant/test/util/asset.test.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-import { AssetBuyerError, BigNumber, InsufficientAssetLiquidityError } from '@0x/asset-buyer';
-import { AssetProxyId, ObjectMap } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-
-import { Asset, AssetMetaData, ERC20Asset, ERC20AssetMetaData, Network, ZeroExInstantError } from '../../src/types';
-import { assetUtils } from '../../src/util/asset';
-
-const ZRX_ASSET_DATA = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498';
-const ZRX_ASSET_DATA_KOVAN = '0xf47261b00000000000000000000000002002d3812f58e35f0ea1ffbf80a75a38c32175fa';
-const ZRX_META_DATA: ERC20AssetMetaData = {
- assetProxyId: AssetProxyId.ERC20,
- symbol: 'zrx',
- decimals: 18,
- name: '0x',
-};
-const ZRX_ASSET: ERC20Asset = {
- assetData: ZRX_ASSET_DATA,
- metaData: ZRX_META_DATA,
-};
-const META_DATA_MAP: ObjectMap<AssetMetaData> = {
- [ZRX_ASSET_DATA]: ZRX_META_DATA,
-};
-const WAX_ASSET: ERC20Asset = {
- assetData: '0xf47261b000000000000000000000000039bb259f66e1c59d5abef88375979b4d20d98022',
- metaData: {
- assetProxyId: AssetProxyId.ERC20,
- decimals: 8,
- primaryColor: '#EDB740',
- symbol: 'wax',
- name: 'WAX',
- },
-};
-
-describe('assetDataUtil', () => {
- describe('bestNameForAsset', () => {
- it('should return default string if assetData is undefined', () => {
- expect(assetUtils.bestNameForAsset(undefined, 'xyz')).toEqual('xyz');
- });
- it('should return ZRX for ZRX assetData', () => {
- expect(assetUtils.bestNameForAsset(ZRX_ASSET, 'mah default')).toEqual('ZRX');
- });
- });
- describe('getMetaDataOrThrow', () => {
- it('should return the metaData for the supplied mainnet asset data', () => {
- expect(assetUtils.getMetaDataOrThrow(ZRX_ASSET_DATA, META_DATA_MAP, Network.Mainnet)).toEqual(
- ZRX_META_DATA,
- );
- });
- it('should return the metaData for the supplied non-mainnet asset data', () => {
- expect(assetUtils.getMetaDataOrThrow(ZRX_ASSET_DATA_KOVAN, META_DATA_MAP, Network.Kovan)).toEqual(
- ZRX_META_DATA,
- );
- });
- it('should throw if the metaData for the asset is not available', () => {
- expect(() =>
- assetUtils.getMetaDataOrThrow('asset data we dont have', META_DATA_MAP, Network.Mainnet),
- ).toThrowError(ZeroExInstantError.AssetMetaDataNotAvailable);
- });
- });
- describe('assetBuyerErrorMessage', () => {
- it('should return message for generic InsufficientAssetLiquidity error', () => {
- const insufficientAssetError = new Error(AssetBuyerError.InsufficientAssetLiquidity);
- expect(assetUtils.assetBuyerErrorMessage(ZRX_ASSET, insufficientAssetError)).toEqual(
- 'Not enough ZRX available',
- );
- });
- describe('InsufficientAssetLiquidityError', () => {
- it('should return custom message for token w/ 18 decimals', () => {
- const amountAvailable = Web3Wrapper.toBaseUnitAmount(new BigNumber(20.059), 18);
- expect(
- assetUtils.assetBuyerErrorMessage(ZRX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)),
- ).toEqual('There are only 20.05 ZRX available to buy');
- });
- it('should return custom message for token w/ 18 decimals and small amount available', () => {
- const amountAvailable = Web3Wrapper.toBaseUnitAmount(new BigNumber(0.01), 18);
- expect(
- assetUtils.assetBuyerErrorMessage(ZRX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)),
- ).toEqual('There are only 0.01 ZRX available to buy');
- });
- it('should return custom message for token w/ 8 decimals', () => {
- const amountAvailable = Web3Wrapper.toBaseUnitAmount(new BigNumber(3), 8);
- expect(
- assetUtils.assetBuyerErrorMessage(WAX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)),
- ).toEqual('There are only 3 WAX available to buy');
- });
- it('should return generic message when amount available rounds to zero', () => {
- const amountAvailable = Web3Wrapper.toBaseUnitAmount(new BigNumber(0.002), 18);
- expect(
- assetUtils.assetBuyerErrorMessage(ZRX_ASSET, new InsufficientAssetLiquidityError(amountAvailable)),
- ).toEqual('Not enough ZRX available');
- });
- });
- it('should return message for InsufficientZrxLiquidity', () => {
- const insufficientZrxError = new Error(AssetBuyerError.InsufficientZrxLiquidity);
- expect(assetUtils.assetBuyerErrorMessage(ZRX_ASSET, insufficientZrxError)).toEqual(
- 'Not enough ZRX available',
- );
- });
- it('should message for StandardRelayerApiError', () => {
- const standardRelayerError = new Error(AssetBuyerError.StandardRelayerApiError);
- expect(assetUtils.assetBuyerErrorMessage(ZRX_ASSET, standardRelayerError)).toEqual(
- 'ZRX is currently unavailable',
- );
- });
- it('should return error for AssetUnavailable error', () => {
- const assetUnavailableError = new Error(
- `${AssetBuyerError.AssetUnavailable}: For assetData ${ZRX_ASSET_DATA}`,
- );
- expect(assetUtils.assetBuyerErrorMessage(ZRX_ASSET, assetUnavailableError)).toEqual(
- 'ZRX is currently unavailable',
- );
- });
- });
-});
diff --git a/packages/instant/test/util/format.test.ts b/packages/instant/test/util/format.test.ts
deleted file mode 100644
index 38bf356ec..000000000
--- a/packages/instant/test/util/format.test.ts
+++ /dev/null
@@ -1,117 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-
-import { ETH_DECIMALS } from '../../src/constants';
-import { format } from '../../src/util/format';
-
-const BIG_NUMBER_ONE = new BigNumber(1);
-const BIG_NUMBER_DECIMAL = new BigNumber(0.432414);
-const BIG_NUMBER_IRRATIONAL = new BigNumber(5.3014059295032);
-const ONE_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_ONE, ETH_DECIMALS);
-const DECIMAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_DECIMAL, ETH_DECIMALS);
-const IRRATIONAL_ETH_IN_BASE_UNITS = Web3Wrapper.toBaseUnitAmount(BIG_NUMBER_IRRATIONAL, ETH_DECIMALS);
-const BIG_NUMBER_FAKE_ETH_USD_PRICE = new BigNumber(2.534);
-
-describe('format', () => {
- describe('ethBaseAmount', () => {
- it('converts 1 ETH in base units to the string `1 ETH`', () => {
- expect(format.ethBaseUnitAmount(ONE_ETH_IN_BASE_UNITS)).toBe('1 ETH');
- });
- it('converts .432414 ETH in base units to the string `.4324 ETH`', () => {
- expect(format.ethBaseUnitAmount(DECIMAL_ETH_IN_BASE_UNITS)).toBe('0.4324 ETH');
- });
- it('converts 5.3014059295032 ETH in base units to the string `5.301 ETH`', () => {
- expect(format.ethBaseUnitAmount(IRRATIONAL_ETH_IN_BASE_UNITS)).toBe('5.301 ETH');
- });
- it('returns defaultText param when ethBaseAmount is not defined', () => {
- const defaultText = 'defaultText';
- expect(format.ethBaseUnitAmount(undefined, 4, defaultText)).toBe(defaultText);
- });
- it('it allows for configurable decimal places', () => {
- expect(format.ethBaseUnitAmount(DECIMAL_ETH_IN_BASE_UNITS, 2)).toBe('0.43 ETH');
- });
- });
- describe('ethUnitAmount', () => {
- it('converts BigNumber(1) to the string `1 ETH`', () => {
- expect(format.ethUnitAmount(BIG_NUMBER_ONE)).toBe('1 ETH');
- });
- it('converts BigNumer(.432414) to the string `.4324 ETH`', () => {
- expect(format.ethUnitAmount(BIG_NUMBER_DECIMAL)).toBe('0.4324 ETH');
- });
- it('converts BigNumber(5.3014059295032) to the string `5.301 ETH`', () => {
- expect(format.ethUnitAmount(BIG_NUMBER_IRRATIONAL)).toBe('5.301 ETH');
- });
- it('shows 1 significant digit when rounded amount would be 0', () => {
- expect(format.ethUnitAmount(new BigNumber(0.00003))).toBe('0.00003 ETH');
- expect(format.ethUnitAmount(new BigNumber(0.000034))).toBe('0.00003 ETH');
- expect(format.ethUnitAmount(new BigNumber(0.000035))).toBe('0.00004 ETH');
- });
- it('shows < 0.00001 when hits threshold', () => {
- expect(format.ethUnitAmount(new BigNumber(0.000011))).toBe('0.00001 ETH');
- expect(format.ethUnitAmount(new BigNumber(0.00001))).toBe('0.00001 ETH');
- expect(format.ethUnitAmount(new BigNumber(0.000009))).toBe('< 0.00001 ETH');
- expect(format.ethUnitAmount(new BigNumber(0.0000000009))).toBe('< 0.00001 ETH');
- expect(format.ethUnitAmount(new BigNumber(0))).toBe('0 ETH');
- });
- it('returns defaultText param when ethUnitAmount is not defined', () => {
- const defaultText = 'defaultText';
- expect(format.ethUnitAmount(undefined, 4, defaultText)).toBe(defaultText);
- expect(format.ethUnitAmount(BIG_NUMBER_ONE, 4, defaultText)).toBe('1 ETH');
- });
- it('it allows for configurable decimal places', () => {
- expect(format.ethUnitAmount(BIG_NUMBER_DECIMAL, 2)).toBe('0.43 ETH');
- });
- });
- describe('ethBaseAmountInUsd', () => {
- it('correctly formats 1 ETH to usd according to some price', () => {
- expect(format.ethBaseUnitAmountInUsd(ONE_ETH_IN_BASE_UNITS, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('$2.53');
- });
- it('correctly formats .432414 ETH to usd according to some price', () => {
- expect(format.ethBaseUnitAmountInUsd(DECIMAL_ETH_IN_BASE_UNITS, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe(
- '$1.10',
- );
- });
- it('correctly formats 5.3014059295032 ETH to usd according to some price', () => {
- expect(format.ethBaseUnitAmountInUsd(IRRATIONAL_ETH_IN_BASE_UNITS, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe(
- '$13.43',
- );
- });
- it('returns defaultText param when ethBaseAmountInUsd or ethUsdPrice is not defined', () => {
- const defaultText = 'defaultText';
- expect(format.ethBaseUnitAmountInUsd(undefined, undefined, 2, defaultText)).toBe(defaultText);
- expect(format.ethBaseUnitAmountInUsd(BIG_NUMBER_ONE, undefined, 2, defaultText)).toBe(defaultText);
- expect(format.ethBaseUnitAmountInUsd(undefined, BIG_NUMBER_ONE, 2, defaultText)).toBe(defaultText);
- });
- it('it allows for configurable decimal places', () => {
- expect(format.ethBaseUnitAmountInUsd(DECIMAL_ETH_IN_BASE_UNITS, BIG_NUMBER_FAKE_ETH_USD_PRICE, 4)).toBe(
- '$1.0957',
- );
- });
- });
- describe('ethUnitAmountInUsd', () => {
- it('correctly formats 1 ETH to usd according to some price', () => {
- expect(format.ethUnitAmountInUsd(BIG_NUMBER_ONE, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('$2.53');
- });
- it('correctly formats .432414 ETH to usd according to some price', () => {
- expect(format.ethUnitAmountInUsd(BIG_NUMBER_DECIMAL, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('$1.10');
- });
- it('correctly formats 5.3014059295032 ETH to usd according to some price', () => {
- expect(format.ethUnitAmountInUsd(BIG_NUMBER_IRRATIONAL, BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('$13.43');
- });
- it('correctly formats amount that is less than 1 cent', () => {
- expect(format.ethUnitAmountInUsd(new BigNumber(0.000001), BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('<$0.01');
- });
- it('correctly formats exactly 1 cent', () => {
- expect(format.ethUnitAmountInUsd(new BigNumber(0.0039), BIG_NUMBER_FAKE_ETH_USD_PRICE)).toBe('$0.01');
- });
- it('returns defaultText param when ethUnitAmountInUsd or ethUsdPrice is not defined', () => {
- const defaultText = 'defaultText';
- expect(format.ethUnitAmountInUsd(undefined, undefined, 2, defaultText)).toBe(defaultText);
- expect(format.ethUnitAmountInUsd(BIG_NUMBER_ONE, undefined, 2, defaultText)).toBe(defaultText);
- expect(format.ethUnitAmountInUsd(undefined, BIG_NUMBER_ONE, 2, defaultText)).toBe(defaultText);
- });
- it('it allows for configurable decimal places', () => {
- expect(format.ethUnitAmountInUsd(BIG_NUMBER_DECIMAL, BIG_NUMBER_FAKE_ETH_USD_PRICE, 4)).toBe('$1.0957');
- });
- });
-});
diff --git a/packages/instant/test/util/time.test.ts b/packages/instant/test/util/time.test.ts
deleted file mode 100644
index fcb4e1875..000000000
--- a/packages/instant/test/util/time.test.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { timeUtil } from '../../src/util/time';
-
-describe('timeUtil', () => {
- describe('secondsToHumanDescription', () => {
- const numsToResults: {
- [aNumber: number]: string;
- } = {
- 1: '1 second',
- 59: '59 seconds',
- 60: '1 minute',
- 119: '1 minute 59 seconds',
- 120: '2 minutes',
- 121: '2 minutes 1 second',
- 122: '2 minutes 2 seconds',
- };
-
- const nums = Object.keys(numsToResults);
- nums.forEach(aNum => {
- const numInt = parseInt(aNum, 10);
- it(`should work for ${aNum} seconds`, () => {
- const expectedResult = numsToResults[numInt];
- expect(timeUtil.secondsToHumanDescription(numInt)).toEqual(expectedResult);
- });
- });
- });
- describe('secondsToStopwatchTime', () => {
- const numsToResults: {
- [aNumber: number]: string;
- } = {
- 1: '00:01',
- 59: '00:59',
- 60: '01:00',
- 119: '01:59',
- 120: '02:00',
- 121: '02:01',
- 2701: '45:01',
- };
-
- const nums = Object.keys(numsToResults);
- nums.forEach(aNum => {
- const numInt = parseInt(aNum, 10);
- it(`should work for ${aNum} seconds`, () => {
- const expectedResult = numsToResults[numInt];
- expect(timeUtil.secondsToStopwatchTime(numInt)).toEqual(expectedResult);
- });
- });
- });
-});
diff --git a/packages/instant/tsconfig.json b/packages/instant/tsconfig.json
deleted file mode 100644
index 2b3c11c9f..000000000
--- a/packages/instant/tsconfig.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src",
- "jsx": "react",
- "noImplicitAny": true,
- "allowSyntheticDefaultImports": true,
- "declaration": false,
- "declarationMap": false,
- "composite": false
- },
- "include": ["./src/**/*"]
-}
diff --git a/packages/instant/tslint.json b/packages/instant/tslint.json
deleted file mode 100644
index d43ee8da7..000000000
--- a/packages/instant/tslint.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "custom-no-magic-numbers": false,
- "semicolon": [true, "always", "ignore-bound-class-methods"],
- "max-classes-per-file": false,
- "switch-default": false
- }
-}
diff --git a/packages/instant/typedoc-tsconfig.json b/packages/instant/typedoc-tsconfig.json
deleted file mode 100644
index c9b0af1ae..000000000
--- a/packages/instant/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/instant/webpack.config.js b/packages/instant/webpack.config.js
deleted file mode 100644
index e74cf36d9..000000000
--- a/packages/instant/webpack.config.js
+++ /dev/null
@@ -1,176 +0,0 @@
-const childProcess = require('child_process');
-const ip = require('ip');
-const path = require('path');
-const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');
-const webpack = require('webpack');
-
-const GIT_SHA = childProcess
- .execSync('git rev-parse HEAD')
- .toString()
- .trim();
-
-const DISCHARGE_TARGETS_THAT_REQUIRED_HEAP = ['production', 'staging', 'dogfood'];
-const getHeapConfigForDischargeTarget = dischargeTarget => {
- return {
- heapAnalyticsIdEnvName:
- dischargeTarget === 'production'
- ? 'INSTANT_HEAP_ANALYTICS_ID_PRODUCTION'
- : 'INSTANT_HEAP_ANALYTICS_ID_DEVELOPMENT',
- heapAnalyticsIdRequired: DISCHARGE_TARGETS_THAT_REQUIRED_HEAP.includes(dischargeTarget),
- };
-};
-
-const DISCHARGE_TARGETS_THAT_REQUIRE_ROLLBAR = ['production', 'staging', 'dogfood'];
-const getRollbarConfigForDischargeTarget = dischargeTarget => {
- if (DISCHARGE_TARGETS_THAT_REQUIRE_ROLLBAR.includes(dischargeTarget)) {
- const rollbarSourceMapPublicPath =
- dischargeTarget === 'production'
- ? 'https://instant.0xproject.com'
- : `http://0x-instant-${dischargeTarget}.s3-website-us-east-1.amazonaws.com`;
-
- return {
- rollbarSourceMapPublicPath,
- rollbarRequired: true,
- };
- }
-
- return {
- rollbarRequired: false,
- };
-};
-
-const ROLLBAR_CLIENT_TOKEN_ENV_VAR_NAME = 'INSTANT_ROLLBAR_CLIENT_TOKEN';
-const ROLLBAR_PUBLISH_TOKEN_ENV_VAR_NAME = 'INSTANT_ROLLBAR_PUBLISH_TOKEN';
-const getRollbarTokens = (dischargeTarget, rollbarRequired) => {
- const clientToken = process.env[ROLLBAR_CLIENT_TOKEN_ENV_VAR_NAME];
- const publishToken = process.env[ROLLBAR_PUBLISH_TOKEN_ENV_VAR_NAME];
-
- if (rollbarRequired) {
- if (!clientToken) {
- throw new Error(
- `Rollbar client token required for ${dischargeTarget}, please set env var ${ROLLBAR_CLIENT_TOKEN_ENV_VAR_NAME}`,
- );
- }
- if (!publishToken) {
- throw new Error(
- `Rollbar publish token required for ${dischargeTarget}, please set env var ${ROLLBAR_PUBLISH_TOKEN_ENV_VAR_NAME}`,
- );
- }
- }
-
- return { clientToken, publishToken };
-};
-
-const generateConfig = (dischargeTarget, heapConfigOptions, rollbarConfigOptions, nodeEnv) => {
- const outputPath = process.env.WEBPACK_OUTPUT_PATH || 'umd';
-
- const { heapAnalyticsIdEnvName, heapAnalyticsIdRequired } = heapConfigOptions;
- const heapAnalyticsId = process.env[heapAnalyticsIdEnvName];
- if (heapAnalyticsIdRequired && !heapAnalyticsId) {
- throw new Error(
- `Must define heap analytics id in ENV var ${heapAnalyticsIdEnvName} when building for ${dischargeTarget}`,
- );
- }
- const heapEnabled = heapAnalyticsId && (nodeEnv !== 'development' || process.env.INSTANT_HEAP_FORCE_DEVELOPMENT);
-
- const rollbarTokens = getRollbarTokens(dischargeTarget, rollbarConfigOptions.rollbarRequired);
- const rollbarEnabled =
- rollbarTokens.clientToken && (nodeEnv !== 'development' || process.env.INSTANT_ROLLBAR_FORCE_DEVELOPMENT);
-
- let rollbarPlugin;
- if (rollbarConfigOptions.rollbarRequired) {
- if (!rollbarEnabled || !rollbarTokens.publishToken || !rollbarConfigOptions.rollbarSourceMapPublicPath) {
- throw new Error(`Rollbar required for ${dischargeTarget} but not configured`);
- }
- rollbarPlugin = new RollbarSourceMapPlugin({
- accessToken: rollbarTokens.publishToken,
- version: GIT_SHA,
- publicPath: rollbarConfigOptions.rollbarSourceMapPublicPath,
- });
- }
-
- const envVars = {
- GIT_SHA: JSON.stringify(GIT_SHA),
- NPM_PACKAGE_VERSION: JSON.stringify(process.env.npm_package_version),
- ROLLBAR_ENABLED: rollbarEnabled,
- HEAP_ENABLED: heapEnabled
- };
- if (dischargeTarget) {
- envVars.INSTANT_DISCHARGE_TARGET = JSON.stringify(dischargeTarget);
- }
- if (heapAnalyticsId) {
- envVars.HEAP_ANALYTICS_ID = JSON.stringify(heapAnalyticsId);
- }
- if (rollbarTokens.clientToken) {
- envVars.ROLLBAR_CLIENT_TOKEN = JSON.stringify(rollbarTokens.clientToken);
- }
-
- const plugins = [
- new webpack.DefinePlugin({
- 'process.env': envVars,
- }),
- ];
- if (rollbarPlugin) {
- plugins.push(rollbarPlugin);
- }
-
- const config = {
- entry: {
- instant: './src/index.umd.ts',
- },
- output: {
- filename: '[name].js',
- path: path.resolve(__dirname, outputPath),
- library: 'zeroExInstant',
- libraryTarget: 'umd',
- },
- plugins,
- devtool: 'source-map',
- resolve: {
- extensions: ['.js', '.json', '.ts', '.tsx'],
- },
- module: {
- rules: [
- {
- test: /\.(ts|tsx)$/,
- loader: 'awesome-typescript-loader',
- },
- {
- test: /\.svg$/,
- loader: 'svg-react-loader',
- },
- {
- test: /\.js$/,
- loader: 'source-map-loader',
- exclude: [
- // instead of /\/node_modules\//
- path.join(process.cwd(), 'node_modules'),
- path.join(process.cwd(), '../..', 'node_modules'),
- ],
- },
- ],
- },
- devServer: {
- contentBase: path.join(__dirname, 'public'),
- port: 5000,
- host: '0.0.0.0',
- after: () => {
- if (config.devServer.host === '0.0.0.0') {
- console.log(
- `webpack-dev-server can be accessed externally at: http://${ip.address()}:${
- config.devServer.port
- }`,
- );
- }
- },
- },
- };
- return config;
-};
-
-module.exports = (env, argv) => {
- const dischargeTarget = env ? env.discharge_target : undefined;
- const heapConfigOptions = getHeapConfigForDischargeTarget(dischargeTarget);
- const rollbarConfigOptions = getRollbarConfigForDischargeTarget(dischargeTarget);
- return generateConfig(dischargeTarget, heapConfigOptions, rollbarConfigOptions, argv.mode);
-};
diff --git a/packages/json-schemas/.npmignore b/packages/json-schemas/.npmignore
deleted file mode 100644
index 5333847e7..000000000
--- a/packages/json-schemas/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.*
-yarn-error.log
-/src/
-/scripts/
-/schemas/
-test/
-tsconfig.json
-/lib/src/monorepo_scripts/
diff --git a/packages/json-schemas/CHANGELOG.json b/packages/json-schemas/CHANGELOG.json
deleted file mode 100644
index 66de84299..000000000
--- a/packages/json-schemas/CHANGELOG.json
+++ /dev/null
@@ -1,381 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "2.1.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "2.1.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "2.1.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.1.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "2.1.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1542821676,
- "version": "2.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "2.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.1.0",
- "changes": [
- {
- "note": "Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts",
- "pr": 1173
- },
- {
- "note": "Add schemas from @0x/connect",
- "pr": 1250
- }
- ],
- "timestamp": 1542028948
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages.",
- "pr": 1145
- }
- ],
- "timestamp": 1539871071
- },
- {
- "timestamp": 1538693146,
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537875740,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.1-rc.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1535377027
- },
- {
- "version": "1.0.1-rc.5",
- "changes": [
- {
- "note": "Update incorrect relayer api fee recipients response schema",
- "pr": 974
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.4",
- "changes": [
- {
- "note": "Allow for additional properties in txData schema",
- "pr": 938
- },
- {
- "note": "Change hexSchema to match `0x`",
- "pr": 937
- },
- {
- "note": "Upgrade Relayer API schemas for relayer API V2",
- "pr": 916
- }
- ],
- "timestamp": 1534210131
- },
- {
- "version": "1.0.1-rc.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532619515
- },
- {
- "version": "1.0.1-rc.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532614997
- },
- {
- "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 schemas for V2 or 0x Protocol",
- "pr": 615
- },
- {
- "note": "Added CallData schema",
- "pr": 821
- },
- {
- "note": "Update CallData schema id to CallData",
- "pr": 894
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.8.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.8.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.8.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.8.0",
- "changes": [
- {
- "note": "Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades",
- "pr": 615
- }
- ],
- "timestamp": 1527008794
- },
- {
- "timestamp": 1527008794,
- "version": "0.7.24",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.7.23",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.7.22",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.7.21",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1523462196,
- "version": "0.7.20",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522673609,
- "version": "0.7.19",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522658513,
- "version": "0.7.18",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.7.13",
- "changes": [
- {
- "note": " Fix publishing issue where .npmignore was not properly excluding undesired content",
- "pr": 389
- }
- ],
- "timestamp": 1518102000
- },
- {
- "version": "0.7.0",
- "changes": [
- {
- "note": "Rename `subscriptionOptsSchema` to `blockRangeSchema`",
- "pr": 272
- }
- ],
- "timestamp": 1513695600
- },
- {
- "version": "0.6.7",
- "changes": [
- {
- "note": "Re-publish JSON-schema previously published under NPM package 0x-json-schemas"
- }
- ],
- "timestamp": 1510585200
- }
-]
diff --git a/packages/json-schemas/CHANGELOG.md b/packages/json-schemas/CHANGELOG.md
deleted file mode 100644
index 4e562d9e8..000000000
--- a/packages/json-schemas/CHANGELOG.md
+++ /dev/null
@@ -1,163 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.1.7 - _January 15, 2019_
-
- * Dependencies updated
-
-## v2.1.6 - _January 11, 2019_
-
- * Dependencies updated
-
-## v2.1.5 - _January 9, 2019_
-
- * Dependencies updated
-
-## v2.1.4 - _December 13, 2018_
-
- * Dependencies updated
-
-## v2.1.3 - _December 11, 2018_
-
- * Dependencies updated
-
-## v2.1.2 - _November 21, 2018_
-
- * Dependencies updated
-
-## v2.1.1 - _November 14, 2018_
-
- * Dependencies updated
-
-## v2.1.0 - _November 12, 2018_
-
- * Improve schemas by enforcing that amounts that must be whole numbers (e.g Order asset amounts) no longer allow decimal amounts (#1173)
- * Add schemas from @0x/connect (#1250)
-
-## v2.0.0 - _October 18, 2018_
-
- * Convert all schemas to JSON files so that they can be used with `json-schema` implemenations in other programming languages. (#1145)
-
-## v1.0.7 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _October 2, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.3 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.2 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.1 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.6 - _August 27, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.5 - _August 24, 2018_
-
- * Update incorrect relayer api fee recipients response schema (#974)
-
-## v1.0.1-rc.4 - _August 14, 2018_
-
- * Allow for additional properties in txData schema (#938)
- * Change hexSchema to match `0x` (#937)
- * Upgrade Relayer API schemas for relayer API V2 (#916)
-
-## v1.0.1-rc.3 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.2 - _July 26, 2018_
-
- * Dependencies updated
-
-## 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 schemas for V2 or 0x Protocol (#615)
- * Added CallData schema (#821)
- * Update CallData schema id to CallData (#894)
-
-## v0.8.3 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.8.2 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.8.1 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.8.0 - _May 22, 2018_
-
- * Update Order & SignedOrder schemas, remove ECSignature schema and add Hex schema as part of V2 upgrades (#615)
-
-## v0.7.24 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.7.23 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.7.22 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.7.21 - _April 18, 2018_
-
- * Dependencies updated
-
-## v0.7.20 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.7.19 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.7.18 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.7.13 - _February 8, 2018_
-
- * Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
-
-## v0.7.0 - _December 19, 2017_
-
- * Rename `subscriptionOptsSchema` to `blockRangeSchema` (#272)
-
-## v0.6.7 - _November 13, 2017_
-
- * Re-publish JSON-schema previously published under NPM package 0x-json-schemas
diff --git a/packages/json-schemas/README.md b/packages/json-schemas/README.md
deleted file mode 100644
index f50382f4b..000000000
--- a/packages/json-schemas/README.md
+++ /dev/null
@@ -1,83 +0,0 @@
-## @0x/json-schemas
-
-Contains 0x-related json schemas
-
-### Read the [Documentation](https://0xproject.com/docs/json-schemas).
-
-## Installation
-
-```bash
-yarn add @0x/json-schemas
-```
-
-**Import**
-
-```typescript
-import { SchemaValidator, ValidatorResult, schemas } from '@0x/json-schemas';
-```
-
-or
-
-```javascript
-var schemas = require('@0x/json-schemas').schemas;
-```
-
-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/json-schemas yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/json-schemas yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/json-schemas/coverage/.gitkeep b/packages/json-schemas/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/json-schemas/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/json-schemas/package.json b/packages/json-schemas/package.json
deleted file mode 100644
index cd515a747..000000000
--- a/packages/json-schemas/package.json
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "name": "@0x/json-schemas",
- "version": "2.1.7",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x-related json schemas",
- "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 **/schemas/**/*",
- "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 generated_docs",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
- },
- "config": {
- "postpublish": {
- "assets": [],
- "docOmitExports": [
- "schemas"
- ]
- }
- },
- "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/json-schemas/README.md",
- "dependencies": {
- "@0x/typescript-typings": "^3.0.8",
- "@types/node": "*",
- "jsonschema": "^1.2.0",
- "lodash.values": "^4.3.0"
- },
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@0x/utils": "^3.0.1",
- "@types/lodash.foreach": "^4.5.3",
- "@types/lodash.values": "^4.3.3",
- "@types/mocha": "^2.2.42",
- "chai": "^4.0.1",
- "dirty-chai": "^2.0.1",
- "lodash.foreach": "^4.5.0",
- "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/json-schemas/schemas/address_schema.json b/packages/json-schemas/schemas/address_schema.json
deleted file mode 100644
index 0dc02d331..000000000
--- a/packages/json-schemas/schemas/address_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/addressSchema",
- "type": "string",
- "pattern": "^0x[0-9a-f]{40}$"
-}
diff --git a/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json b/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json
deleted file mode 100644
index fad0bd371..000000000
--- a/packages/json-schemas/schemas/asset_pairs_request_opts_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/AssetPairsRequestOptsSchema",
- "type": "object",
- "properties": {
- "assetDataA": { "$ref": "/hexSchema" },
- "assetDataB": { "$ref": "/hexSchema" }
- }
-}
diff --git a/packages/json-schemas/schemas/block_param_schema.json b/packages/json-schemas/schemas/block_param_schema.json
deleted file mode 100644
index ed4dd1e87..000000000
--- a/packages/json-schemas/schemas/block_param_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/blockParamSchema",
- "oneOf": [
- {
- "type": "number"
- },
- {
- "enum": ["latest", "earliest", "pending"]
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/block_range_schema.json b/packages/json-schemas/schemas/block_range_schema.json
deleted file mode 100644
index b14294649..000000000
--- a/packages/json-schemas/schemas/block_range_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/blockRangeSchema",
- "properties": {
- "fromBlock": { "$ref": "/blockParamSchema" },
- "toBlock": { "$ref": "/blockParamSchema" }
- },
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/call_data_schema.json b/packages/json-schemas/schemas/call_data_schema.json
deleted file mode 100644
index e5e6e3282..000000000
--- a/packages/json-schemas/schemas/call_data_schema.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "id": "/callDataSchema",
- "properties": {
- "from": { "$ref": "/addressSchema" },
- "to": { "$ref": "/addressSchema" },
- "value": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gas": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gasPrice": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "data": {
- "type": "string",
- "pattern": "^0x[0-9a-f]*$"
- },
- "nonce": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": [],
- "type": "object",
- "additionalProperties": false
-}
diff --git a/packages/json-schemas/schemas/ec_signature_parameter_schema.json b/packages/json-schemas/schemas/ec_signature_parameter_schema.json
deleted file mode 100644
index 0c08ec240..000000000
--- a/packages/json-schemas/schemas/ec_signature_parameter_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/ecSignatureParameterSchema",
- "type": "string",
- "pattern": "^0[xX][0-9A-Fa-f]{64}$"
-}
diff --git a/packages/json-schemas/schemas/ec_signature_schema.json b/packages/json-schemas/schemas/ec_signature_schema.json
deleted file mode 100644
index 52ccfe7bb..000000000
--- a/packages/json-schemas/schemas/ec_signature_schema.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "id": "/ecSignatureSchema",
- "properties": {
- "v": {
- "type": "number",
- "minimum": 27,
- "maximum": 28
- },
- "r": { "$ref": "/ecSignatureParameterSchema" },
- "s": { "$ref": "/ecSignatureParameterSchema" }
- },
- "required": ["v", "r", "s"],
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/eip712_typed_data_schema.json b/packages/json-schemas/schemas/eip712_typed_data_schema.json
deleted file mode 100644
index 8efd6de44..000000000
--- a/packages/json-schemas/schemas/eip712_typed_data_schema.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "id": "/eip712TypedDataSchema",
- "type": "object",
- "properties": {
- "types": {
- "type": "object",
- "properties": {
- "EIP712Domain": { "type": "array" }
- },
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "type": { "type": "string" }
- },
- "required": ["name", "type"]
- }
- },
- "required": ["EIP712Domain"]
- },
- "primaryType": { "type": "string" },
- "domain": { "type": "object" },
- "message": { "type": "object" }
- },
- "required": ["types", "primaryType", "domain", "message"]
-}
diff --git a/packages/json-schemas/schemas/hex_schema.json b/packages/json-schemas/schemas/hex_schema.json
deleted file mode 100644
index f37815d5b..000000000
--- a/packages/json-schemas/schemas/hex_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/hexSchema",
- "type": "string",
- "pattern": "^0x(([0-9a-f][0-9a-f])+)?$"
-}
diff --git a/packages/json-schemas/schemas/index_filter_values_schema.json b/packages/json-schemas/schemas/index_filter_values_schema.json
deleted file mode 100644
index bec00d79e..000000000
--- a/packages/json-schemas/schemas/index_filter_values_schema.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "id": "/indexFilterValuesSchema",
- "additionalProperties": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/addressSchema" }, { "$ref": "/orderHashSchema" }]
- },
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/js_number_schema.json b/packages/json-schemas/schemas/js_number_schema.json
deleted file mode 100644
index 7df1c4747..000000000
--- a/packages/json-schemas/schemas/js_number_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/jsNumberSchema",
- "type": "number",
- "minimum": 0
-}
diff --git a/packages/json-schemas/schemas/number_schema.json b/packages/json-schemas/schemas/number_schema.json
deleted file mode 100644
index a48f3e8cf..000000000
--- a/packages/json-schemas/schemas/number_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/numberSchema",
- "type": "string",
- "pattern": "^\\d+(\\.\\d+)?$"
-}
diff --git a/packages/json-schemas/schemas/order_cancel_schema.json b/packages/json-schemas/schemas/order_cancel_schema.json
deleted file mode 100644
index 8d0999941..000000000
--- a/packages/json-schemas/schemas/order_cancel_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderCancellationRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "order": { "$ref": "/orderSchema" },
- "takerTokenCancelAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["order", "takerTokenCancelAmount"],
- "type": "object"
- }
-}
diff --git a/packages/json-schemas/schemas/order_config_request_schema.json b/packages/json-schemas/schemas/order_config_request_schema.json
deleted file mode 100644
index 19b043e7f..000000000
--- a/packages/json-schemas/schemas/order_config_request_schema.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "id": "/OrderConfigRequestSchema",
- "type": "object",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "exchangeAddress",
- "expirationTimeSeconds"
- ]
-}
diff --git a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json b/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json
deleted file mode 100644
index 73bbf20bb..000000000
--- a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderFillOrKillRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" },
- "fillTakerAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["signedOrder", "fillTakerAmount"],
- "type": "object"
- }
-}
diff --git a/packages/json-schemas/schemas/order_fill_requests_schema.json b/packages/json-schemas/schemas/order_fill_requests_schema.json
deleted file mode 100644
index d06fb19a2..000000000
--- a/packages/json-schemas/schemas/order_fill_requests_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderFillRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" },
- "takerTokenFillAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["signedOrder", "takerTokenFillAmount"],
- "type": "object"
- }
-}
diff --git a/packages/json-schemas/schemas/order_hash_schema.json b/packages/json-schemas/schemas/order_hash_schema.json
deleted file mode 100644
index 4a770579f..000000000
--- a/packages/json-schemas/schemas/order_hash_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/orderHashSchema",
- "type": "string",
- "pattern": "^0x[0-9a-fA-F]{64}$"
-}
diff --git a/packages/json-schemas/schemas/order_schema.json b/packages/json-schemas/schemas/order_schema.json
deleted file mode 100644
index c70b9e2dd..000000000
--- a/packages/json-schemas/schemas/order_schema.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "id": "/orderSchema",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerFee": { "$ref": "/wholeNumberSchema" },
- "takerFee": { "$ref": "/wholeNumberSchema" },
- "senderAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "salt": { "$ref": "/wholeNumberSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerFee",
- "takerFee",
- "senderAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "salt",
- "exchangeAddress",
- "feeRecipientAddress",
- "expirationTimeSeconds"
- ],
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json b/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json
deleted file mode 100644
index b0c419f94..000000000
--- a/packages/json-schemas/schemas/order_watcher_web_socket_request_schema.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "id": "/orderWatcherWebSocketRequestSchema",
- "type": "object",
- "definitions": {
- "signedOrderParam": {
- "type": "object",
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" }
- },
- "required": ["signedOrder"]
- },
- "orderHashParam": {
- "type": "object",
- "properties": {
- "orderHash": { "$ref": "/hexSchema" }
- },
- "required": ["orderHash"]
- }
- },
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["ADD_ORDER"] },
- "params": { "$ref": "#/definitions/signedOrderParam" }
- },
- "required": ["id", "jsonrpc", "method", "params"]
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["REMOVE_ORDER"] },
- "params": { "$ref": "#/definitions/orderHashParam" }
- },
- "required": ["id", "jsonrpc", "method", "params"]
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["GET_STATS"] },
- "params": {}
- },
- "required": ["id", "jsonrpc", "method"]
- }
- ]
-} \ No newline at end of file
diff --git a/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json b/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
deleted file mode 100644
index 154d6d754..000000000
--- a/packages/json-schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/orderWatcherWebSocketUtf8MessageSchema",
- "properties": {
- "utf8Data": { "type": "string" }
- },
- "required": [
- "utf8Data"
- ],
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/orderbook_request_schema.json b/packages/json-schemas/schemas/orderbook_request_schema.json
deleted file mode 100644
index 5ce6e8ab0..000000000
--- a/packages/json-schemas/schemas/orderbook_request_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/OrderbookRequestSchema",
- "type": "object",
- "properties": {
- "baseAssetData": { "$ref": "/hexSchema" },
- "quoteAssetData": { "$ref": "/hexSchema" }
- },
- "required": ["baseAssetData", "quoteAssetData"]
-}
diff --git a/packages/json-schemas/schemas/orders_request_opts_schema.json b/packages/json-schemas/schemas/orders_request_opts_schema.json
deleted file mode 100644
index 4c1b9b4e9..000000000
--- a/packages/json-schemas/schemas/orders_request_opts_schema.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "/OrdersRequestOptsSchema",
- "type": "object",
- "properties": {
- "makerAssetProxyId": { "$ref": "/hexSchema" },
- "takerAssetProxyId": { "$ref": "/hexSchema" },
- "makerAssetAddress": { "$ref": "/addressSchema" },
- "takerAssetAddress": { "$ref": "/addressSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "senderAddress": { "$ref": "/addressSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "traderAssetData": { "$ref": "/hexSchema" },
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "traderAddress": { "$ref": "/addressSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" }
- }
-}
diff --git a/packages/json-schemas/schemas/orders_schema.json b/packages/json-schemas/schemas/orders_schema.json
deleted file mode 100644
index 1e1c6a875..000000000
--- a/packages/json-schemas/schemas/orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/ordersSchema",
- "type": "array",
- "items": { "$ref": "/orderSchema" }
-}
diff --git a/packages/json-schemas/schemas/paged_request_opts_schema.json b/packages/json-schemas/schemas/paged_request_opts_schema.json
deleted file mode 100644
index f143c28b0..000000000
--- a/packages/json-schemas/schemas/paged_request_opts_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/PagedRequestOptsSchema",
- "type": "object",
- "properties": {
- "page": { "type": "number" },
- "perPage": { "type": "number" }
- }
-}
diff --git a/packages/json-schemas/schemas/paginated_collection_schema.json b/packages/json-schemas/schemas/paginated_collection_schema.json
deleted file mode 100644
index 9dcedf5b4..000000000
--- a/packages/json-schemas/schemas/paginated_collection_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/paginatedCollectionSchema",
- "type": "object",
- "properties": {
- "total": { "type": "number" },
- "perPage": { "type": "number" },
- "page": { "type": "number" }
- },
- "required": ["total", "perPage", "page"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json b/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json
deleted file mode 100644
index d1150d3db..000000000
--- a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "id": "/relayerApiAssetDataPairsResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": { "$ref": "/relayerApiAssetDataPairsSchema" }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json b/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json
deleted file mode 100644
index 62d4745b8..000000000
--- a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/relayerApiAssetDataPairsSchema",
- "type": "array",
- "items": {
- "properties": {
- "assetDataA": { "$ref": "/relayerApiAssetDataTradeInfoSchema" },
- "assetDataB": { "$ref": "/relayerApiAssetDataTradeInfoSchema" }
- },
- "required": ["assetDataA", "assetDataB"],
- "type": "object"
- }
-}
diff --git a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json b/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json
deleted file mode 100644
index e0f274c5d..000000000
--- a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiAssetDataTradeInfoSchema",
- "type": "object",
- "properties": {
- "assetData": { "$ref": "/hexSchema" },
- "minAmount": { "$ref": "/wholeNumberSchema" },
- "maxAmount": { "$ref": "/wholeNumberSchema" },
- "precision": { "type": "number" }
- },
- "required": ["assetData"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_error_response_schema.json b/packages/json-schemas/schemas/relayer_api_error_response_schema.json
deleted file mode 100644
index be4659b0b..000000000
--- a/packages/json-schemas/schemas/relayer_api_error_response_schema.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "/relayerApiErrorResponseSchema",
- "type": "object",
- "properties": {
- "code": { "type": "integer", "minimum": 100, "maximum": 103 },
- "reason": { "type": "string" },
- "validationErrors": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "field": { "type": "string" },
- "code": { "type": "integer", "minimum": 1000, "maximum": 1006 },
- "reason": { "type": "string" }
- },
- "required": ["field", "code", "reason"]
- }
- }
- },
- "required": ["code", "reason"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json b/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json
deleted file mode 100644
index c73506dbb..000000000
--- a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "id": "/relayerApiFeeRecipientsResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": {
- "type": "array",
- "items": { "$ref": "/addressSchema" }
- }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json b/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json
deleted file mode 100644
index f4583fc62..000000000
--- a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "id": "/relayerApiOrderConfigPayloadSchema",
- "type": "object",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "exchangeAddress",
- "expirationTimeSeconds"
- ]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json b/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json
deleted file mode 100644
index 8193861e1..000000000
--- a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrderConfigResponseSchema",
- "type": "object",
- "properties": {
- "makerFee": { "$ref": "/wholeNumberSchema" },
- "takerFee": { "$ref": "/wholeNumberSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" },
- "senderAddress": { "$ref": "/addressSchema" }
- },
- "required": ["makerFee", "takerFee", "feeRecipientAddress", "senderAddress"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_order_schema.json b/packages/json-schemas/schemas/relayer_api_order_schema.json
deleted file mode 100644
index e0f6539b9..000000000
--- a/packages/json-schemas/schemas/relayer_api_order_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/relayerApiOrderSchema",
- "type": "object",
- "properties": {
- "order": { "$ref": "/orderSchema" },
- "metaData": { "type": "object" }
- },
- "required": ["order", "metaData"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json b/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json
deleted file mode 100644
index b44f2a740..000000000
--- a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/relayerApiOrderbookResponseSchema",
- "type": "object",
- "properties": {
- "bids": { "$ref": "/relayerApiOrdersResponseSchema" },
- "asks": { "$ref": "/relayerApiOrdersResponseSchema" }
- },
- "required": ["bids", "asks"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json b/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json
deleted file mode 100644
index 274ef1625..000000000
--- a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelSubscribePayloadSchema",
- "type": "object",
- "properties": {
- "makerAssetProxyId": { "$ref": "/hexSchema" },
- "takerAssetProxyId": { "$ref": "/hexSchema" },
- "networkId": { "type": "number" },
- "makerAssetAddress": { "$ref": "/addressSchema" },
- "takerAssetAddress": { "$ref": "/addressSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "traderAssetData": { "$ref": "/hexSchema" }
- }
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json b/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json
deleted file mode 100644
index 29561d09f..000000000
--- a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelSubscribeSchema",
- "type": "object",
- "properties": {
- "type": { "enum": ["subscribe"] },
- "channel": { "enum": ["orders"] },
- "requestId": { "type": "string" },
- "payload": { "$ref": "/relayerApiOrdersChannelSubscribePayloadSchema" }
- },
- "required": ["type", "channel", "requestId"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json b/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json
deleted file mode 100644
index 239e7c586..000000000
--- a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelUpdateSchema",
- "type": "object",
- "properties": {
- "type": { "enum": ["update"] },
- "channel": { "enum": ["orders"] },
- "requestId": { "type": "string" },
- "payload": { "$ref": "/relayerApiOrdersSchema" }
- },
- "required": ["type", "channel", "requestId"]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orders_response_schema.json b/packages/json-schemas/schemas/relayer_api_orders_response_schema.json
deleted file mode 100644
index a5023a3fc..000000000
--- a/packages/json-schemas/schemas/relayer_api_orders_response_schema.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "id": "/relayerApiOrdersResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": { "$ref": "/relayerApiOrdersSchema" }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/relayer_api_orders_schema.json b/packages/json-schemas/schemas/relayer_api_orders_schema.json
deleted file mode 100644
index 84e75cd04..000000000
--- a/packages/json-schemas/schemas/relayer_api_orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/relayerApiOrdersSchema",
- "type": "array",
- "items": { "$ref": "/relayerApiOrderSchema" }
-}
diff --git a/packages/json-schemas/schemas/request_opts_schema.json b/packages/json-schemas/schemas/request_opts_schema.json
deleted file mode 100644
index 2206f5016..000000000
--- a/packages/json-schemas/schemas/request_opts_schema.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "id": "/RequestOptsSchema",
- "type": "object",
- "properties": {
- "networkId": { "type": "number" }
- }
-}
diff --git a/packages/json-schemas/schemas/signed_order_schema.json b/packages/json-schemas/schemas/signed_order_schema.json
deleted file mode 100644
index 137ae4a24..000000000
--- a/packages/json-schemas/schemas/signed_order_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/signedOrderSchema",
- "allOf": [
- { "$ref": "/orderSchema" },
- {
- "properties": {
- "signature": { "$ref": "/hexSchema" }
- },
- "required": ["signature"]
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/signed_orders_schema.json b/packages/json-schemas/schemas/signed_orders_schema.json
deleted file mode 100644
index e7c3a0b6c..000000000
--- a/packages/json-schemas/schemas/signed_orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/signedOrdersSchema",
- "type": "array",
- "items": { "$ref": "/signedOrderSchema" }
-}
diff --git a/packages/json-schemas/schemas/token_schema.json b/packages/json-schemas/schemas/token_schema.json
deleted file mode 100644
index 31e41c4b8..000000000
--- a/packages/json-schemas/schemas/token_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/tokenSchema",
- "properties": {
- "name": { "type": "string" },
- "symbol": { "type": "string" },
- "decimals": { "type": "number" },
- "address": { "$ref": "/addressSchema" }
- },
- "required": ["name", "symbol", "decimals", "address"],
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/tx_data_schema.json b/packages/json-schemas/schemas/tx_data_schema.json
deleted file mode 100644
index 8c3daba4e..000000000
--- a/packages/json-schemas/schemas/tx_data_schema.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "id": "/txDataSchema",
- "properties": {
- "from": { "$ref": "/addressSchema" },
- "to": { "$ref": "/addressSchema" },
- "value": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gas": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gasPrice": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "data": {
- "type": "string",
- "pattern": "^0x[0-9a-f]*$"
- },
- "nonce": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": ["from"],
- "type": "object"
-}
diff --git a/packages/json-schemas/schemas/whole_number_schema.json b/packages/json-schemas/schemas/whole_number_schema.json
deleted file mode 100644
index aa469954c..000000000
--- a/packages/json-schemas/schemas/whole_number_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/wholeNumberSchema",
- "anyOf": [
- {
- "type": "string",
- "pattern": "^\\d+$"
- },
- {
- "type": "integer"
- }
- ]
-}
diff --git a/packages/json-schemas/schemas/zero_ex_transaction_schema.json b/packages/json-schemas/schemas/zero_ex_transaction_schema.json
deleted file mode 100644
index 0c714f14d..000000000
--- a/packages/json-schemas/schemas/zero_ex_transaction_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/zeroExTransactionSchema",
- "properties": {
- "data": { "$ref": "/hexSchema" },
- "signerAddress": { "$ref": "/addressSchema" },
- "salt": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["data", "salt", "signerAddress"],
- "type": "object"
-}
diff --git a/packages/json-schemas/src/index.ts b/packages/json-schemas/src/index.ts
deleted file mode 100644
index 9d8470348..000000000
--- a/packages/json-schemas/src/index.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-export { ValidatorResult, Schema } from 'jsonschema';
-
-export { SchemaValidator } from './schema_validator';
-export { schemas } from './schemas';
diff --git a/packages/json-schemas/src/schema_validator.ts b/packages/json-schemas/src/schema_validator.ts
deleted file mode 100644
index 43647b594..000000000
--- a/packages/json-schemas/src/schema_validator.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import { Schema, Validator, ValidatorResult } from 'jsonschema';
-import values = require('lodash.values');
-
-import { schemas } from './schemas';
-
-/**
- * A validator for [JSON-schemas](http://json-schema.org/)
- */
-export class SchemaValidator {
- private readonly _validator: Validator;
- private static _assertSchemaDefined(schema: Schema): void {
- if (schema === undefined) {
- throw new Error(`Cannot add undefined schema`);
- }
- }
- /**
- * Instantiates a SchemaValidator instance
- */
- constructor() {
- this._validator = new Validator();
- for (const schema of values(schemas)) {
- SchemaValidator._assertSchemaDefined(schema);
- this._validator.addSchema(schema, schema.id);
- }
- }
- /**
- * Add a schema to the validator. All schemas and sub-schemas must be added to
- * the validator before the `validate` and `isValid` methods can be called with
- * instances of that schema.
- * @param schema The schema to add
- */
- public addSchema(schema: Schema): void {
- SchemaValidator._assertSchemaDefined(schema);
- this._validator.addSchema(schema, schema.id);
- }
- // In order to validate a complex JS object using jsonschema, we must replace any complex
- // sub-types (e.g BigNumber) with a simpler string representation. Since BigNumber and other
- // complex types implement the `toString` method, we can stringify the object and
- // then parse it. The resultant object can then be checked using jsonschema.
- /**
- * Validate the JS object conforms to a specific JSON schema
- * @param instance JS object in question
- * @param schema Schema to check against
- * @returns The results of the validation
- */
- public validate(instance: any, schema: Schema): ValidatorResult {
- SchemaValidator._assertSchemaDefined(schema);
- const jsonSchemaCompatibleObject = JSON.parse(JSON.stringify(instance));
- return this._validator.validate(jsonSchemaCompatibleObject, schema);
- }
- /**
- * Check whether an instance properly adheres to a JSON schema
- * @param instance JS object in question
- * @param schema Schema to check against
- * @returns Whether or not the instance adheres to the schema
- */
- public isValid(instance: any, schema: Schema): boolean {
- const isValid = this.validate(instance, schema).errors.length === 0;
- return isValid;
- }
-}
diff --git a/packages/json-schemas/src/schemas.ts b/packages/json-schemas/src/schemas.ts
deleted file mode 100644
index 9e8eb6959..000000000
--- a/packages/json-schemas/src/schemas.ts
+++ /dev/null
@@ -1,95 +0,0 @@
-import * as addressSchema from '../schemas/address_schema.json';
-import * as assetPairsRequestOptsSchema from '../schemas/asset_pairs_request_opts_schema.json';
-import * as blockParamSchema from '../schemas/block_param_schema.json';
-import * as blockRangeSchema from '../schemas/block_range_schema.json';
-import * as callDataSchema from '../schemas/call_data_schema.json';
-import * as ecSignatureParameterSchema from '../schemas/ec_signature_parameter_schema.json';
-import * as ecSignatureSchema from '../schemas/ec_signature_schema.json';
-import * as eip712TypedDataSchema from '../schemas/eip712_typed_data_schema.json';
-import * as hexSchema from '../schemas/hex_schema.json';
-import * as indexFilterValuesSchema from '../schemas/index_filter_values_schema.json';
-import * as jsNumber from '../schemas/js_number_schema.json';
-import * as numberSchema from '../schemas/number_schema.json';
-import * as orderCancellationRequestsSchema from '../schemas/order_cancel_schema.json';
-import * as orderConfigRequestSchema from '../schemas/order_config_request_schema.json';
-import * as orderFillOrKillRequestsSchema from '../schemas/order_fill_or_kill_requests_schema.json';
-import * as orderFillRequestsSchema from '../schemas/order_fill_requests_schema.json';
-import * as orderHashSchema from '../schemas/order_hash_schema.json';
-import * as orderSchema from '../schemas/order_schema.json';
-import * as orderWatcherWebSocketRequestSchema from '../schemas/order_watcher_web_socket_request_schema.json';
-import * as orderWatcherWebSocketUtf8MessageSchema from '../schemas/order_watcher_web_socket_utf8_message_schema.json';
-import * as orderBookRequestSchema from '../schemas/orderbook_request_schema.json';
-import * as ordersRequestOptsSchema from '../schemas/orders_request_opts_schema.json';
-import * as ordersSchema from '../schemas/orders_schema.json';
-import * as pagedRequestOptsSchema from '../schemas/paged_request_opts_schema.json';
-import * as paginatedCollectionSchema from '../schemas/paginated_collection_schema.json';
-import * as relayerApiAssetDataPairsResponseSchema from '../schemas/relayer_api_asset_data_pairs_response_schema.json';
-import * as relayerApiAssetDataPairsSchema from '../schemas/relayer_api_asset_data_pairs_schema.json';
-import * as relayerApiAssetDataTradeInfoSchema from '../schemas/relayer_api_asset_data_trade_info_schema.json';
-import * as relayerApiErrorResponseSchema from '../schemas/relayer_api_error_response_schema.json';
-import * as relayerApiFeeRecipientsResponseSchema from '../schemas/relayer_api_fee_recipients_response_schema.json';
-import * as relayerApiOrderConfigPayloadSchema from '../schemas/relayer_api_order_config_payload_schema.json';
-import * as relayerApiOrderConfigResponseSchema from '../schemas/relayer_api_order_config_response_schema.json';
-import * as relayerApiOrderSchema from '../schemas/relayer_api_order_schema.json';
-import * as relayerApiOrderbookResponseSchema from '../schemas/relayer_api_orderbook_response_schema.json';
-import * as relayerApiOrdersChannelSubscribePayloadSchema from '../schemas/relayer_api_orders_channel_subscribe_payload_schema.json';
-import * as relayerApiOrdersChannelSubscribeSchema from '../schemas/relayer_api_orders_channel_subscribe_schema.json';
-import * as relayerApiOrdersChannelUpdateSchema from '../schemas/relayer_api_orders_channel_update_response_schema.json';
-import * as relayerApiOrdersResponseSchema from '../schemas/relayer_api_orders_response_schema.json';
-import * as relayerApiOrdersSchema from '../schemas/relayer_api_orders_schema.json';
-import * as requestOptsSchema from '../schemas/request_opts_schema.json';
-import * as signedOrderSchema from '../schemas/signed_order_schema.json';
-import * as signedOrdersSchema from '../schemas/signed_orders_schema.json';
-import * as tokenSchema from '../schemas/token_schema.json';
-import * as txDataSchema from '../schemas/tx_data_schema.json';
-import * as wholeNumberSchema from '../schemas/whole_number_schema.json';
-import * as zeroExTransactionSchema from '../schemas/zero_ex_transaction_schema.json';
-
-export const schemas = {
- numberSchema,
- addressSchema,
- callDataSchema,
- hexSchema,
- ecSignatureParameterSchema,
- ecSignatureSchema,
- eip712TypedDataSchema,
- indexFilterValuesSchema,
- orderCancellationRequestsSchema,
- orderFillOrKillRequestsSchema,
- orderFillRequestsSchema,
- orderHashSchema,
- orderSchema,
- signedOrderSchema,
- signedOrdersSchema,
- ordersSchema,
- blockParamSchema,
- blockRangeSchema,
- tokenSchema,
- jsNumber,
- requestOptsSchema,
- pagedRequestOptsSchema,
- orderWatcherWebSocketRequestSchema,
- orderWatcherWebSocketUtf8MessageSchema,
- ordersRequestOptsSchema,
- orderBookRequestSchema,
- orderConfigRequestSchema,
- assetPairsRequestOptsSchema,
- txDataSchema,
- paginatedCollectionSchema,
- relayerApiErrorResponseSchema,
- relayerApiFeeRecipientsResponseSchema,
- relayerApiOrderSchema,
- relayerApiOrdersSchema,
- relayerApiOrderConfigPayloadSchema,
- relayerApiOrderConfigResponseSchema,
- relayerApiOrderbookResponseSchema,
- relayerApiAssetDataPairsResponseSchema,
- relayerApiAssetDataTradeInfoSchema,
- relayerApiOrdersChannelSubscribeSchema,
- relayerApiOrdersChannelSubscribePayloadSchema,
- relayerApiOrdersChannelUpdateSchema,
- relayerApiOrdersResponseSchema,
- relayerApiAssetDataPairsSchema,
- zeroExTransactionSchema,
- wholeNumberSchema,
-};
diff --git a/packages/json-schemas/test/schema_test.ts b/packages/json-schemas/test/schema_test.ts
deleted file mode 100644
index bfa2c5668..000000000
--- a/packages/json-schemas/test/schema_test.ts
+++ /dev/null
@@ -1,872 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as dirtyChai from 'dirty-chai';
-import forEach = require('lodash.foreach');
-import 'mocha';
-
-import { schemas, SchemaValidator } from '../src/index';
-
-chai.config.includeStack = true;
-chai.use(dirtyChai);
-const expect = chai.expect;
-const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
-const {
- numberSchema,
- addressSchema,
- hexSchema,
- orderCancellationRequestsSchema,
- orderFillOrKillRequestsSchema,
- orderFillRequestsSchema,
- orderHashSchema,
- orderSchema,
- signedOrderSchema,
- signedOrdersSchema,
- blockParamSchema,
- blockRangeSchema,
- tokenSchema,
- jsNumber,
- txDataSchema,
- paginatedCollectionSchema,
- relayerApiErrorResponseSchema,
- relayerApiOrderbookResponseSchema,
- relayerApiAssetDataPairsResponseSchema,
- relayerApiOrderConfigPayloadSchema,
- relayerApiOrderConfigResponseSchema,
- relayerApiOrdersChannelSubscribeSchema,
- relayerApiOrdersChannelUpdateSchema,
- relayerApiOrdersResponseSchema,
- relayerApiOrderSchema,
- wholeNumberSchema,
-} = schemas;
-
-describe('Schema', () => {
- const validator = new SchemaValidator();
- const validateAgainstSchema = (testCases: any[], schema: any, shouldFail = false) => {
- forEach(testCases, (testCase: any) => {
- const validationResult = validator.validate(testCase, schema);
- const hasErrors = validationResult.errors.length !== 0;
- if (shouldFail) {
- if (!hasErrors) {
- throw new Error(
- `Expected testCase: ${JSON.stringify(testCase, null, '\t')} to fail and it didn't.`,
- );
- }
- } else {
- if (hasErrors) {
- throw new Error(JSON.stringify(validationResult.errors, null, '\t'));
- }
- }
- });
- };
- const paginatedResponse = {
- total: 100,
- perPage: 10,
- page: 3,
- };
- describe('#numberSchema', () => {
- it('should validate valid numbers', () => {
- const testCases = ['42', '0', '1.3', '0.2', '00.00'];
- validateAgainstSchema(testCases, numberSchema);
- });
- it('should fail for invalid numbers', () => {
- const testCases = ['.3', '1.', 'abacaba', 'и', '1..0'];
- const shouldFail = true;
- validateAgainstSchema(testCases, numberSchema, shouldFail);
- });
- });
- describe('#wholeNumberSchema', () => {
- it('should validate valid numbers', () => {
- const testCases = ['5', '42', '0'];
- validateAgainstSchema(testCases, wholeNumberSchema);
- });
- it('should fail for invalid numbers', () => {
- const testCases = ['1.3', '0.2', '00.00', '.3', '1.', 'abacaba', 'и', '1..0'];
- const shouldFail = true;
- validateAgainstSchema(testCases, wholeNumberSchema, shouldFail);
- });
- });
- describe('#addressSchema', () => {
- it('should validate valid addresses', () => {
- const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', NULL_ADDRESS];
- validateAgainstSchema(testCases, addressSchema);
- });
- it('should fail for invalid addresses', () => {
- const testCases = [
- '0x',
- '0',
- '0x00',
- '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42',
- '0x8b0292B11a196601eD2ce54B665CaFEca0347D42',
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, addressSchema, shouldFail);
- });
- });
- describe('#hexSchema', () => {
- it('should validate valid hex string', () => {
- const testCases = ['0x8b0292b11a196601ed2ce54b665cafeca0347d42', NULL_ADDRESS];
- validateAgainstSchema(testCases, hexSchema);
- });
- it('should fail for invalid hex string', () => {
- const testCases = ['0', '0xzzzzzzB11a196601eD2ce54B665CaFEca0347D42'];
- const shouldFail = true;
- validateAgainstSchema(testCases, hexSchema, shouldFail);
- });
- });
- describe('#orderHashSchema', () => {
- it('should validate valid order hash', () => {
- const testCases = [
- '0x61a3ed31B43c8780e905a260a35faefEc527be7516aa11c0256729b5b351bc33',
- '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
- ];
- validateAgainstSchema(testCases, orderHashSchema);
- });
- it('should fail for invalid order hash', () => {
- const testCases = [
- {},
- '0x',
- '0x8b0292B11a196601eD2ce54B665CaFEca0347D42',
- '61a3ed31B43c8780e905a260a35faefEc527be7516aa11c0256729b5b351bc33',
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, orderHashSchema, shouldFail);
- });
- });
- describe('#blockParamSchema', () => {
- it('should validate valid block param', () => {
- const blockNumber = 42;
- const testCases = [blockNumber, 'latest', 'pending', 'earliest'];
- validateAgainstSchema(testCases, blockParamSchema);
- });
- it('should fail for invalid block param', () => {
- const testCases = [{}, '42', 'pemding'];
- const shouldFail = true;
- validateAgainstSchema(testCases, blockParamSchema, shouldFail);
- });
- });
- describe('#blockRangeSchema', () => {
- it('should validate valid subscription opts', () => {
- const testCases = [{ fromBlock: 42, toBlock: 'latest' }, { fromBlock: 42 }, {}];
- validateAgainstSchema(testCases, blockRangeSchema);
- });
- it('should fail for invalid subscription opts', () => {
- const testCases = [{ fromBlock: '42' }];
- const shouldFail = true;
- validateAgainstSchema(testCases, blockRangeSchema, shouldFail);
- });
- });
- describe('#tokenSchema', () => {
- const token = {
- name: 'Zero Ex',
- symbol: 'ZRX',
- decimals: 100500,
- address: '0x8b0292b11a196601ed2ce54b665cafeca0347d42',
- url: 'https://0xproject.com',
- };
- it('should validate valid token', () => {
- const testCases = [token];
- validateAgainstSchema(testCases, tokenSchema);
- });
- it('should fail for invalid token', () => {
- const num = 4;
- const testCases = [
- {
- ...token,
- address: null,
- },
- {
- ...token,
- decimals: undefined,
- },
- [],
- num,
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, tokenSchema, shouldFail);
- });
- });
- describe('#paginatedCollectionSchema', () => {
- it('should validate valid paginated collections', () => {
- const testCases = [paginatedResponse];
- validateAgainstSchema(testCases, paginatedCollectionSchema);
- });
- it('should fail for invalid paginated collections', () => {
- const paginatedCollectionNoTotal = {
- page: 10,
- perPage: 2,
- };
- const paginatedCollectionNoPerPage = {
- page: 10,
- total: 100,
- };
- const paginatedCollectionNoPage = {
- total: 10,
- perPage: 20,
- };
- const testCases = [{}, paginatedCollectionNoPage, paginatedCollectionNoPerPage, paginatedCollectionNoTotal];
- const shouldFail = true;
- validateAgainstSchema(testCases, paginatedCollectionSchema, shouldFail);
- });
- });
- describe('order including schemas', () => {
- const order = {
- makerAddress: NULL_ADDRESS,
- takerAddress: NULL_ADDRESS,
- senderAddress: NULL_ADDRESS,
- makerFee: '1',
- takerFee: '2',
- makerAssetAmount: '1',
- takerAssetAmount: '2',
- makerAssetData: NULL_ADDRESS,
- takerAssetData: NULL_ADDRESS,
- salt: '67006738228878699843088602623665307406148487219438534730168799356281242528500',
- feeRecipientAddress: NULL_ADDRESS,
- exchangeAddress: NULL_ADDRESS,
- expirationTimeSeconds: '42',
- };
- const relayerApiOrder = {
- order,
- metaData: {
- someMetaData: 5,
- },
- };
- const relayerApiOrdersResponse = {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- };
- describe('#orderSchema', () => {
- it('should validate valid order', () => {
- const testCases = [order];
- validateAgainstSchema(testCases, orderSchema);
- });
- it('should fail for invalid order', () => {
- const testCases = [
- {
- ...order,
- salt: undefined,
- },
- {
- ...order,
- salt: 'salt',
- },
- 'order',
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, orderSchema, shouldFail);
- });
- });
- describe('signed order including schemas', () => {
- const signedOrder = {
- ...order,
- signature:
- '0x031b61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
- };
- describe('#signedOrdersSchema', () => {
- it('should validate valid signed orders', () => {
- const testCases = [[signedOrder], []];
- validateAgainstSchema(testCases, signedOrdersSchema);
- });
- it('should fail for invalid signed orders', () => {
- const testCases = [[signedOrder, 1]];
- const shouldFail = true;
- validateAgainstSchema(testCases, signedOrdersSchema, shouldFail);
- });
- });
- describe('#signedOrderSchema', () => {
- it('should validate valid signed order', () => {
- const testCases = [signedOrder];
- validateAgainstSchema(testCases, signedOrderSchema);
- });
- it('should fail for invalid signed order', () => {
- const testCases = [
- {
- ...signedOrder,
- signature: undefined,
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, signedOrderSchema, shouldFail);
- });
- });
- describe('#orderFillOrKillRequestsSchema', () => {
- const orderFillOrKillRequests = [
- {
- signedOrder,
- fillTakerAmount: '5',
- },
- ];
- it('should validate valid order fill or kill requests', () => {
- const testCases = [orderFillOrKillRequests];
- validateAgainstSchema(testCases, orderFillOrKillRequestsSchema);
- });
- it('should fail for invalid order fill or kill requests', () => {
- const testCases = [
- [
- {
- ...orderFillOrKillRequests[0],
- fillTakerAmount: undefined,
- },
- ],
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, orderFillOrKillRequestsSchema, shouldFail);
- });
- });
- describe('#orderCancellationRequestsSchema', () => {
- const orderCancellationRequests = [
- {
- order,
- takerTokenCancelAmount: '5',
- },
- ];
- it('should validate valid order cancellation requests', () => {
- const testCases = [orderCancellationRequests];
- validateAgainstSchema(testCases, orderCancellationRequestsSchema);
- });
- it('should fail for invalid order cancellation requests', () => {
- const testCases = [
- [
- {
- ...orderCancellationRequests[0],
- takerTokenCancelAmount: undefined,
- },
- ],
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, orderCancellationRequestsSchema, shouldFail);
- });
- });
- describe('#orderFillRequestsSchema', () => {
- const orderFillRequests = [
- {
- signedOrder,
- takerTokenFillAmount: '5',
- },
- ];
- it('should validate valid order fill requests', () => {
- const testCases = [orderFillRequests];
- validateAgainstSchema(testCases, orderFillRequestsSchema);
- });
- it('should fail for invalid order fill requests', () => {
- const testCases = [
- [
- {
- ...orderFillRequests[0],
- takerTokenFillAmount: undefined,
- },
- ],
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, orderFillRequestsSchema, shouldFail);
- });
- });
- describe('standard relayer api schemas', () => {
- describe('#relayerApiOrderSchema', () => {
- it('should validate valid relayer api order', () => {
- const testCases = [relayerApiOrder];
- validateAgainstSchema(testCases, relayerApiOrderSchema);
- });
- it('should fail for invalid relayer api orders', () => {
- const testCases = [{}, order, { order }, { order, metaData: 5 }];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrderSchema, shouldFail);
- });
- });
- describe('#relayerApiErrorResponseSchema', () => {
- it('should validate valid errorResponse', () => {
- const testCases = [
- {
- code: 102,
- reason: 'Order submission disabled',
- },
- {
- code: 101,
- reason: 'Validation failed',
- validationErrors: [
- {
- field: 'maker',
- code: 1002,
- reason: 'Invalid address',
- },
- ],
- },
- ];
- validateAgainstSchema(testCases, relayerApiErrorResponseSchema);
- });
- it('should fail for invalid error responses', () => {
- const testCases = [
- {},
- {
- code: 102,
- },
- {
- code: '102',
- reason: 'Order submission disabled',
- },
- {
- reason: 'Order submission disabled',
- },
- {
- code: 101,
- reason: 'Validation failed',
- validationErrors: [
- {
- field: 'maker',
- reason: 'Invalid address',
- },
- ],
- },
- {
- code: 101,
- reason: 'Validation failed',
- validationErrors: [
- {
- field: 'maker',
- code: '1002',
- reason: 'Invalid address',
- },
- ],
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiErrorResponseSchema, shouldFail);
- });
- });
- describe('#relayerApiOrderConfigPayloadSchema', () => {
- it('should validate valid fees payloads', () => {
- const testCases = [
- {
- exchangeAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- makerAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- takerAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- makerAssetData: NULL_ADDRESS,
- takerAssetData: NULL_ADDRESS,
- makerAssetAmount: '10000000000000000000',
- takerAssetAmount: '30000000000000000000',
- expirationTimeSeconds: '42',
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrderConfigPayloadSchema);
- });
- it('should fail for invalid fees payloads', () => {
- const checksummedAddress = '0xA2b31daCf30a9C50ca473337c01d8A201ae33e32';
- const testCases = [
- {},
- {
- makerAssetAmount: '10000000000000000000',
- takerAssetAmount: '30000000000000000000',
- makerAssetData: NULL_ADDRESS,
- takerAssetData: NULL_ADDRESS,
- },
- {
- takerAddress: checksummedAddress,
- makerAssetAmount: '10000000000000000000',
- takerAssetAmount: '30000000000000000000',
- },
- {
- makerAssetAmount: 10000000000000000000,
- takerAssetAmount: 30000000000000000000,
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrderConfigPayloadSchema, shouldFail);
- });
- });
- describe('#relayerApiOrderConfigResponseSchema', () => {
- it('should validate valid fees responses', () => {
- const testCases = [
- {
- makerFee: '10000000000000000',
- takerFee: '30000000000000000',
- feeRecipientAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- senderAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrderConfigResponseSchema);
- });
- it('should fail for invalid fees responses', () => {
- const checksummedAddress = '0xA2b31daCf30a9C50ca473337c01d8A201ae33e32';
- const testCases = [
- {},
- {
- makerFee: 10000000000000000,
- takerFee: 30000000000000000,
- },
- {
- feeRecipient: checksummedAddress,
- takerToSpecify: checksummedAddress,
- makerFee: '10000000000000000',
- takerFee: '30000000000000000',
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrderConfigResponseSchema, shouldFail);
- });
- });
- describe('#relayerAssetDataPairsResponseSchema', () => {
- it('should validate valid assetPairs response', () => {
- const testCases = [
- {
- ...paginatedResponse,
- records: [],
- },
- {
- ...paginatedResponse,
- records: [
- {
- assetDataA: {
- assetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- minAmount: '0',
- maxAmount: '10000000000000000000',
- precision: 5,
- },
- assetDataB: {
- assetData: '0xef7fff64389b814a946f3e92105513705ca6b990',
- minAmount: '0',
- maxAmount: '50000000000000000000',
- precision: 5,
- },
- },
- ],
- },
- {
- ...paginatedResponse,
- records: [
- {
- assetDataA: {
- assetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- },
- assetDataB: {
- assetData: '0xef7fff64389b814a946f3e92105513705ca6b990',
- },
- },
- ],
- },
- ];
- validateAgainstSchema(testCases, relayerApiAssetDataPairsResponseSchema);
- });
- it('should fail for invalid assetPairs responses', () => {
- const testCases = [
- {
- ...paginatedResponse,
- records: [
- {
- assetDataA: {
- assetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- minAmount: '0',
- maxAmount: '10000000000000000000',
- precision: 5,
- },
- assetDataC: {
- assetData: '0xef7fff64389b814a946f3e92105513705ca6b990',
- minAmount: '0',
- maxAmount: '50000000000000000000',
- precision: 5,
- },
- },
- ],
- },
- {
- records: [
- {
- assetDataA: {
- assetData: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- minAmount: '0',
- maxAmount: '10000000000000000000',
- precision: 5,
- },
- assetDataB: {
- assetData: '0xef7fff64389b814a946f3e92105513705ca6b990',
- minAmount: '0',
- maxAmount: '50000000000000000000',
- precision: 5,
- },
- },
- ],
- },
- {
- ...paginatedResponse,
- records: [
- {
- assetDataA: {
- minAmount: '0',
- maxAmount: '10000000000000000000',
- precision: 5,
- },
- assetDataB: {
- minAmount: '0',
- maxAmount: '50000000000000000000',
- precision: 5,
- },
- },
- ],
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiAssetDataPairsResponseSchema, shouldFail);
- });
- });
- describe('#relayerApiOrdersResponseSchema', () => {
- it('should validate valid orders responses', () => {
- const testCases = [
- relayerApiOrdersResponse,
- {
- ...paginatedResponse,
- records: [],
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrdersResponseSchema);
- });
- it('should fail for invalid orders responses', () => {
- const testCases = [
- {
- records: [relayerApiOrder, relayerApiOrder],
- },
- {
- ...paginatedResponse,
- },
- {
- ...paginatedResponse,
- records: [{}, relayerApiOrder],
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrdersResponseSchema, shouldFail);
- });
- });
- describe('#relayerApiOrderbookResponseSchema', () => {
- it('should validate valid order book responses', () => {
- const testCases = [
- {
- bids: {
- ...paginatedResponse,
- records: [relayerApiOrder],
- },
- asks: {
- ...paginatedResponse,
- records: [],
- },
- },
- {
- bids: {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- },
- asks: {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- },
- },
- {
- bids: {
- ...paginatedResponse,
- records: [],
- },
- asks: {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- },
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrderbookResponseSchema);
- });
- it('should fail for invalid order fill requests', () => {
- const testCases = [
- {},
- {
- bids: {
- records: [relayerApiOrder],
- },
- asks: {
- ...paginatedResponse,
- records: [],
- },
- },
- {
- bids: {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- },
- asks: {},
- },
- {
- bids: {
- ...paginatedResponse,
- },
- asks: {
- ...paginatedResponse,
- records: [relayerApiOrder, relayerApiOrder],
- },
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrdersResponseSchema, shouldFail);
- });
- });
- describe('#relayerApiOrdersChannelSubscribeSchema', () => {
- it('should validate valid orders channel websocket subscribe message', () => {
- const testCases = [
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- makerAssetProxyId: '0x02571792',
- takerAssetProxyId: '0xf47261b0',
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {},
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrdersChannelSubscribeSchema);
- });
- it('should fail for invalid orders channel websocket subscribe message', () => {
- const checksummedAddress = '0xA2b31daCf30a9C50ca473337c01d8A201ae33e32';
- const testCases = [
- {
- type: 'subscribe',
- channel: 'orders',
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- makerAssetProxyId: '0x02571792',
- takerAssetProxyId: '0xf47261b0',
- makerAssetAddress: checksummedAddress,
- },
- },
- {
- type: 'subscribe',
- channel: 'orders',
- requestId: 'randomId',
- payload: {
- makerAssetProxyId: 'invalidId',
- },
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrdersChannelSubscribeSchema, shouldFail);
- });
- });
- describe('#relayerApiOrdersChannelUpdateSchema', () => {
- it('should validate valid orders channel websocket update message', () => {
- const testCases = [
- {
- type: 'update',
- channel: 'orders',
- requestId: 'randomId',
- payload: [relayerApiOrder],
- },
- {
- type: 'update',
- channel: 'orders',
- requestId: 'randomId',
- payload: [],
- },
- ];
- validateAgainstSchema(testCases, relayerApiOrdersChannelUpdateSchema);
- });
- it('should fail for invalid orders channel websocket update message', () => {
- const testCases = [
- {
- type: 'foo',
- channel: 'orders',
- requestId: 'randomId',
- },
- {
- type: 'update',
- channel: 'bar',
- requestId: 2,
- payload: [relayerApiOrder],
- },
- {
- type: 'update',
- channel: 'orders',
- requestId: 'randomId',
- payload: {},
- },
- {
- type: 'update',
- channel: 'orders',
- requestId: 'randomId',
- payload: relayerApiErrorResponseSchema,
- },
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, relayerApiOrdersChannelUpdateSchema, shouldFail);
- });
- });
- });
- });
- });
- describe('BigNumber serialization', () => {
- it('should correctly serialize BigNumbers', () => {
- const testCases = {
- '42': '42',
- '0': '0',
- '1.3': '1.3',
- '0.2': '0.2',
- '00.00': '0',
- '.3': '0.3',
- };
- forEach(testCases, (serialized: string, input: string) => {
- expect(JSON.parse(JSON.stringify(new BigNumber(input)))).to.be.equal(serialized);
- });
- });
- });
- describe('#jsNumberSchema', () => {
- it('should validate valid js number', () => {
- // tslint:disable-next-line:custom-no-magic-numbers
- const testCases = [1, 42];
- validateAgainstSchema(testCases, jsNumber);
- });
- it('should fail for invalid js number', () => {
- // tslint:disable-next-line:custom-no-magic-numbers
- const testCases = [NaN, -1, new BigNumber(1)];
- const shouldFail = true;
- validateAgainstSchema(testCases, jsNumber, shouldFail);
- });
- });
- describe('#txDataSchema', () => {
- it('should validate valid txData', () => {
- const bigNumGasAmount = new BigNumber(42);
- const testCases = [
- {
- from: NULL_ADDRESS,
- },
- {
- from: NULL_ADDRESS,
- gas: bigNumGasAmount,
- },
- {
- from: NULL_ADDRESS,
- gas: 42,
- },
- ];
- validateAgainstSchema(testCases, txDataSchema);
- });
- it('should fail for invalid txData', () => {
- const testCases = [
- {
- gas: new BigNumber(42),
- },
- {},
- [],
- new BigNumber(1),
- ];
- const shouldFail = true;
- validateAgainstSchema(testCases, txDataSchema, shouldFail);
- });
- });
-}); // tslint:disable:max-file-line-count
diff --git a/packages/json-schemas/tsconfig.json b/packages/json-schemas/tsconfig.json
deleted file mode 100644
index 7d7ce1d7e..000000000
--- a/packages/json-schemas/tsconfig.json
+++ /dev/null
@@ -1,57 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*"],
- "files": [
- "./schemas/address_schema.json",
- "./schemas/number_schema.json",
- "./schemas/hex_schema.json",
- "./schemas/block_param_schema.json",
- "./schemas/block_range_schema.json",
- "./schemas/call_data_schema.json",
- "./schemas/ec_signature_parameter_schema.json",
- "./schemas/ec_signature_schema.json",
- "./schemas/eip712_typed_data_schema.json",
- "./schemas/order_cancel_schema.json",
- "./schemas/order_fill_or_kill_requests_schema.json",
- "./schemas/order_fill_requests_schema.json",
- "./schemas/order_hash_schema.json",
- "./schemas/order_schema.json",
- "./schemas/signed_order_schema.json",
- "./schemas/orders_schema.json",
- "./schemas/order_watcher_web_socket_request_schema.json",
- "./schemas/order_watcher_web_socket_utf8_message_schema.json",
- "./schemas/paginated_collection_schema.json",
- "./schemas/relayer_api_asset_data_pairs_response_schema.json",
- "./schemas/relayer_api_asset_data_pairs_schema.json",
- "./schemas/relayer_api_asset_data_trade_info_schema.json",
- "./schemas/relayer_api_error_response_schema.json",
- "./schemas/relayer_api_fee_recipients_response_schema.json",
- "./schemas/relayer_api_order_config_payload_schema.json",
- "./schemas/relayer_api_order_config_response_schema.json",
- "./schemas/relayer_api_order_schema.json",
- "./schemas/relayer_api_orderbook_response_schema.json",
- "./schemas/relayer_api_orders_channel_subscribe_payload_schema.json",
- "./schemas/relayer_api_orders_channel_subscribe_schema.json",
- "./schemas/relayer_api_orders_channel_update_response_schema.json",
- "./schemas/relayer_api_orders_response_schema.json",
- "./schemas/relayer_api_orders_schema.json",
- "./schemas/signed_orders_schema.json",
- "./schemas/token_schema.json",
- "./schemas/js_number_schema.json",
- "./schemas/zero_ex_transaction_schema.json",
- "./schemas/tx_data_schema.json",
- "./schemas/index_filter_values_schema.json",
- "./schemas/whole_number_schema.json",
- "./schemas/asset_pairs_request_opts_schema.json",
- "./schemas/orderbook_request_schema.json",
- "./schemas/orders_request_opts_schema.json",
- "./schemas/paged_request_opts_schema.json",
- "./schemas/request_opts_schema.json",
- "./schemas/order_config_request_schema.json"
- ]
-}
diff --git a/packages/json-schemas/tslint.json b/packages/json-schemas/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/json-schemas/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/json-schemas/typedoc-tsconfig.json b/packages/json-schemas/typedoc-tsconfig.json
deleted file mode 100644
index c9b0af1ae..000000000
--- a/packages/json-schemas/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/metacoin/README.md b/packages/metacoin/README.md
deleted file mode 100644
index 6f35dfc25..000000000
--- a/packages/metacoin/README.md
+++ /dev/null
@@ -1,97 +0,0 @@
-## @0x/metacoin
-
-This is an example project that demonstrates how the many Ethereum dev tools developed by 0x can be used in any Solidity/TS project.
-It supports:
-
-- Compiling & testing smart contracts
-- Generating typed contract wrappers
-- Solidity coverage
-- Solidity gas profiling
-- Running tests against Ganache
-- Running tests against our fork of Geth (it supports snapshotting & time travel)
-
-## 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/metacoin yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/metacoin yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Test providers
-
-By default tests run against an in-process Ganache instance. If you want to use Geth you'll need to [start a Geth dev node](https://github.com/0xProject/0x-monorepo/blob/v2-prototype/packages/devnet/README.md) first.
-
-```bash
-cd ../devnet
-docker build -t 0x-devnet .
-docker run -it --rm -p 8501:8501 0x-devnet
-```
-
-This Geth version supports snapshots and time travel. Then - run your tests against it.
-
-```
-TEST_PROVIDER=geth yarn test
-```
-
-### Coverage
-
-```bash
-yarn test:coverage
-yarn coverage:report:html
-```
-
-### Profiling
-
-Please note that traces emitted by ganache have incorrect gas costs so we recommend using Geth for profiling.
-
-```bash
-TEST_PROVIDER=geth yarn test:profile
-```
-
-You'll see a warning that you need to explicitly enable and disable the profiler before and after the block of code you want to profile.
-
-```typescript
-import { profiler } from './utils/profiler';
-profiler.start();
-// Some solidity stuff
-profiler.stop();
-```
diff --git a/packages/metacoin/compiler.json b/packages/metacoin/compiler.json
deleted file mode 100644
index f5817e0c8..000000000
--- a/packages/metacoin/compiler.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "compilerSettings": {
- "outputSelection": {
- "*": {
- "*": [
- "abi",
- "evm.bytecode.object",
- "evm.bytecode.sourceMap",
- "evm.deployedBytecode.object",
- "evm.deployedBytecode.sourceMap"
- ]
- }
- }
- }
-}
diff --git a/packages/metacoin/contracts/Metacoin.sol b/packages/metacoin/contracts/Metacoin.sol
deleted file mode 100644
index dc67e6242..000000000
--- a/packages/metacoin/contracts/Metacoin.sol
+++ /dev/null
@@ -1,40 +0,0 @@
-pragma solidity ^0.4.24;
-pragma experimental ABIEncoderV2;
-
-contract Metacoin {
- mapping (address => uint) public balances;
-
- event Transfer(address indexed _from, address indexed _to, uint256 _value);
-
- struct TransferData {
- address to;
- uint256 amount;
- }
-
- struct NestedTransferData {
- TransferData transferData;
- uint32 callback;
- }
-
- constructor () public {
- balances[msg.sender] = 10000;
- }
-
- function transfer(TransferData transferData) public returns (bool success) {
- if (balances[msg.sender] < transferData.amount) return false;
- balances[msg.sender] -= transferData.amount;
- balances[transferData.to] += transferData.amount;
- emit Transfer(msg.sender, transferData.to, transferData.amount);
- return true;
- }
-
- function transfer(TransferData transferData, uint32 callback) public returns (int) {
- transfer(transferData);
- return callback;
- }
-
- function transfer(NestedTransferData nestedTransferData) public returns (int) {
- return transfer(nestedTransferData.transferData, nestedTransferData.callback);
- }
-
-}
diff --git a/packages/metacoin/coverage/.gitkeep b/packages/metacoin/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/metacoin/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
deleted file mode 100644
index 3b082f075..000000000
--- a/packages/metacoin/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "name": "@0x/metacoin",
- "version": "0.0.36",
- "engines": {
- "node": ">=6.12"
- },
- "private": true,
- "description": "Example solidity project using 0x dev tools",
- "scripts": {
- "lint": "tslint --format stylish --project . --exclude **/src/contract_wrappers/**/*",
- "build": "yarn pre_build && tsc -b",
- "build:ci": "yarn build",
- "pre_build": "run-s compile generate_contract_wrappers copy_artifacts",
- "clean": "shx rm -rf lib artifacts src/contract_wrappers",
- "copy_artifacts": "copyfiles './artifacts/**/*' './contracts/**/*' ./lib",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test",
- "test:coverage": "SOLIDITY_COVERAGE=true run-s build run_mocha coverage:report:text coverage:report:lcov",
- "test:profile": "SOLIDITY_PROFILER=true run-s build run_mocha profiler:report:html",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --bail --exit --timeout 10000",
- "generate_contract_wrappers": "abi-gen --abis 'artifacts/Metacoin.json' --template ../../node_modules/@0x/abi-gen-templates/contract.handlebars --partials '../../node_modules/@0x/abi-gen-templates/partials/**/*.handlebars' --output src/contract_wrappers --backend ethers",
- "coverage:report:text": "istanbul report text",
- "coverage:report:html": "istanbul report html && open coverage/index.html",
- "profiler:report:html": "istanbul report html && open coverage/index.html",
- "coverage:report:lcov": "istanbul report lcov",
- "test:circleci": "yarn test:coverage",
- "compile": "sol-compiler compile"
- },
- "author": "",
- "license": "Apache-2.0",
- "dependencies": {
- "@0x/abi-gen": "^1.0.22",
- "@0x/abi-gen-templates": "^1.0.2",
- "@0x/base-contract": "^3.0.13",
- "@0x/sol-coverage": "^1.0.3",
- "@0x/sol-profiler": "^1.0.3",
- "@0x/sol-trace": "^1.0.3",
- "@0x/subproviders": "^2.1.11",
- "@0x/tslint-config": "^2.0.2",
- "@0x/types": "^1.5.2",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "@types/mocha": "^5.2.2",
- "copyfiles": "^2.0.0",
- "ethereum-types": "^1.1.6",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5",
- "run-s": "^0.0.0"
- },
- "devDependencies": {
- "@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "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",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- }
-}
diff --git a/packages/metacoin/src/global.d.ts b/packages/metacoin/src/global.d.ts
deleted file mode 100644
index 783b92913..000000000
--- a/packages/metacoin/src/global.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare module '*.json' {
- const value: any;
- export default value;
-}
diff --git a/packages/metacoin/test/global_hooks.ts b/packages/metacoin/test/global_hooks.ts
deleted file mode 100644
index 437061b46..000000000
--- a/packages/metacoin/test/global_hooks.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-
-import { coverage } from './utils/coverage';
-import { profiler } from './utils/profiler';
-
-after('generate coverage || profiler report', async () => {
- if (env.parseBoolean(EnvVars.SolidityCoverage)) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- await coverageSubprovider.writeCoverageAsync();
- }
- if (env.parseBoolean(EnvVars.SolidityProfiler)) {
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- await profilerSubprovider.writeProfilerOutputAsync();
- }
-});
diff --git a/packages/metacoin/test/metacoin_test.ts b/packages/metacoin/test/metacoin_test.ts
deleted file mode 100644
index a8ba85814..000000000
--- a/packages/metacoin/test/metacoin_test.ts
+++ /dev/null
@@ -1,120 +0,0 @@
-import { BlockchainLifecycle, devConstants } from '@0x/dev-utils';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { ContractArtifact, LogWithDecodedArgs } from 'ethereum-types';
-
-import * as MetacoinArtifact from '../artifacts/Metacoin.json';
-import { MetacoinContract, MetacoinTransferEventArgs } from '../src/contract_wrappers/metacoin';
-
-import { chaiSetup } from './utils/chai_setup';
-import { config } from './utils/config';
-// Comment out the next line enable profiling
-// import { profiler } from './utils/profiler';
-import { provider, web3Wrapper } from './utils/web3_wrapper';
-
-const artifact: ContractArtifact = MetacoinArtifact as any;
-
-chaiSetup.configure();
-const { expect } = chai;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-// tslint:disable:no-unnecessary-type-assertion
-describe('Metacoin', () => {
- let metacoin: MetacoinContract;
- const ownerAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const INITIAL_BALANCE = new BigNumber(10000);
- before(async () => {
- metacoin = await MetacoinContract.deployFrom0xArtifactAsync(artifact, provider, config.txDefaults);
- web3Wrapper.abiDecoder.addABI(metacoin.abi);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('#constructor', () => {
- it(`should initialy give ${INITIAL_BALANCE} tokens to the creator`, async () => {
- const balance = await metacoin.balances.callAsync(ownerAddress);
- expect(balance).to.be.bignumber.equal(INITIAL_BALANCE);
- });
- });
- describe('#transfer', () => {
- it(`should successfully transfer tokens (via transfer1)`, async () => {
- const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
- const amount = INITIAL_BALANCE.div(2);
- const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(oldBalance).to.be.bignumber.equal(0);
- // profiler.start();
- const txHash = await metacoin.transfer1.sendTransactionAsync(
- {
- to: ZERO_ADDRESS,
- amount,
- },
- { from: devConstants.TESTRPC_FIRST_ADDRESS },
- );
- // profiler.stop();
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- const transferLogs = txReceipt.logs[0] as LogWithDecodedArgs<MetacoinTransferEventArgs>;
- expect(transferLogs.args).to.be.deep.equal({
- _to: ZERO_ADDRESS,
- _from: devConstants.TESTRPC_FIRST_ADDRESS,
- _value: amount,
- });
- const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(newBalance).to.be.bignumber.equal(amount);
- });
-
- it(`should successfully transfer tokens (via transfer2)`, async () => {
- const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
- const amount = INITIAL_BALANCE.div(2);
- const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(oldBalance).to.be.bignumber.equal(0);
- const callback = 59;
- const txHash = await metacoin.transfer2.sendTransactionAsync(
- {
- to: ZERO_ADDRESS,
- amount,
- },
- callback,
- { from: devConstants.TESTRPC_FIRST_ADDRESS },
- );
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- const transferLogs = txReceipt.logs[0] as LogWithDecodedArgs<MetacoinTransferEventArgs>;
- expect(transferLogs.args).to.be.deep.equal({
- _to: ZERO_ADDRESS,
- _from: devConstants.TESTRPC_FIRST_ADDRESS,
- _value: amount,
- });
- const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(newBalance).to.be.bignumber.equal(amount);
- });
-
- it(`should successfully transfer tokens (via transfer3)`, async () => {
- const ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
- const amount = INITIAL_BALANCE.div(2);
- const oldBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(oldBalance).to.be.bignumber.equal(0);
- const callback = 59;
- const txHash = await metacoin.transfer3.sendTransactionAsync(
- {
- transferData: {
- to: ZERO_ADDRESS,
- amount,
- },
- callback,
- },
- { from: devConstants.TESTRPC_FIRST_ADDRESS },
- );
- const txReceipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- const transferLogs = txReceipt.logs[0] as LogWithDecodedArgs<MetacoinTransferEventArgs>;
- expect(transferLogs.args).to.be.deep.equal({
- _to: ZERO_ADDRESS,
- _from: devConstants.TESTRPC_FIRST_ADDRESS,
- _value: amount,
- });
- const newBalance = await metacoin.balances.callAsync(ZERO_ADDRESS);
- expect(newBalance).to.be.bignumber.equal(amount);
- });
- });
-});
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/packages/metacoin/test/utils/chai_setup.ts b/packages/metacoin/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/metacoin/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/metacoin/test/utils/config.ts b/packages/metacoin/test/utils/config.ts
deleted file mode 100644
index 05f524d52..000000000
--- a/packages/metacoin/test/utils/config.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-
-export const config = {
- networkId: 50,
- artifactsDir: 'artifacts',
- contractsDir: 'contracts',
- ganacheLogFile: 'ganache.log',
- txDefaults: {
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- },
- mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic',
-};
diff --git a/packages/metacoin/test/utils/coverage.ts b/packages/metacoin/test/utils/coverage.ts
deleted file mode 100644
index 1a06d8c3c..000000000
--- a/packages/metacoin/test/utils/coverage.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-import { CoverageSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-coverage';
-import * as _ from 'lodash';
-
-import { config } from './config';
-
-let coverageSubprovider: CoverageSubprovider;
-
-export const coverage = {
- getCoverageSubproviderSingleton(): CoverageSubprovider {
- if (_.isUndefined(coverageSubprovider)) {
- coverageSubprovider = coverage._getCoverageSubprovider();
- }
- return coverageSubprovider;
- },
- _getCoverageSubprovider(): CoverageSubprovider {
- const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const zeroExArtifactsAdapter = new SolCompilerArtifactAdapter(config.artifactsDir, config.contractsDir);
- return new CoverageSubprovider(zeroExArtifactsAdapter, defaultFromAddress);
- },
-};
diff --git a/packages/metacoin/test/utils/profiler.ts b/packages/metacoin/test/utils/profiler.ts
deleted file mode 100644
index 6e6fc309f..000000000
--- a/packages/metacoin/test/utils/profiler.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { devConstants } from '@0x/dev-utils';
-import { ProfilerSubprovider, SolCompilerArtifactAdapter } from '@0x/sol-profiler';
-import * as _ from 'lodash';
-
-import { config } from './config';
-
-let profilerSubprovider: ProfilerSubprovider;
-
-export const profiler = {
- start(): void {
- profiler.getProfilerSubproviderSingleton().start();
- },
- stop(): void {
- profiler.getProfilerSubproviderSingleton().stop();
- },
- getProfilerSubproviderSingleton(): ProfilerSubprovider {
- if (_.isUndefined(profilerSubprovider)) {
- profilerSubprovider = profiler._getProfilerSubprovider();
- }
- return profilerSubprovider;
- },
- _getProfilerSubprovider(): ProfilerSubprovider {
- const defaultFromAddress = devConstants.TESTRPC_FIRST_ADDRESS;
- const zeroExArtifactsAdapter = new SolCompilerArtifactAdapter(config.artifactsDir, config.contractsDir);
- return new ProfilerSubprovider(zeroExArtifactsAdapter, defaultFromAddress);
- },
-};
diff --git a/packages/metacoin/test/utils/web3_wrapper.ts b/packages/metacoin/test/utils/web3_wrapper.ts
deleted file mode 100644
index 258cf560f..000000000
--- a/packages/metacoin/test/utils/web3_wrapper.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { env, EnvVars } from '@0x/dev-utils';
-import { GanacheSubprovider, prependSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import { errorUtils, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as fs from 'fs';
-
-import { config } from './config';
-import { coverage } from './coverage';
-import { profiler } from './profiler';
-
-enum ProviderType {
- Ganache = 'ganache',
- Geth = 'geth',
-}
-
-let testProvider: ProviderType;
-switch (process.env.TEST_PROVIDER) {
- case undefined:
- testProvider = ProviderType.Ganache;
- break;
- case 'ganache':
- testProvider = ProviderType.Ganache;
- break;
- case 'geth':
- testProvider = ProviderType.Geth;
- break;
- default:
- throw errorUtils.spawnSwitchErr('TEST_PROVIDER', process.env.TEST_PROVIDER);
-}
-
-export const provider = new Web3ProviderEngine();
-if (testProvider === ProviderType.Ganache) {
- provider.addProvider(
- new GanacheSubprovider({
- logger: {
- log: (arg: any) => {
- fs.appendFileSync(config.ganacheLogFile, `${arg}\n`);
- },
- },
- verbose: env.parseBoolean(EnvVars.SolidityCoverage),
- networkId: config.networkId,
- mnemonic: config.mnemonic,
- }),
- );
-} else {
- provider.addProvider(new RPCSubprovider('http://localhost:8501'));
-}
-provider.start();
-
-const isCoverageEnabled = env.parseBoolean(EnvVars.SolidityCoverage);
-const isProfilerEnabled = env.parseBoolean(EnvVars.SolidityProfiler);
-if (isCoverageEnabled && isProfilerEnabled) {
- throw new Error(
- `Unfortunately for now you can't enable both coverage and profiler at the same time. They both use coverage.json file and there is no way to configure that.`,
- );
-}
-if (isCoverageEnabled) {
- const coverageSubprovider = coverage.getCoverageSubproviderSingleton();
- prependSubprovider(provider, coverageSubprovider);
-}
-if (isProfilerEnabled) {
- if (testProvider === ProviderType.Ganache) {
- logUtils.warn(
- "Gas costs in Ganache traces are incorrect and we don't recommend using it for profiling. Please switch to Geth. Check README for more details",
- );
- process.exit(1);
- }
- const profilerSubprovider = profiler.getProfilerSubproviderSingleton();
- logUtils.log(
- "By default profilerSubprovider is stopped so that you don't get noise from setup code. Don't forget to start it before the code you want to profile and stop it afterwards",
- );
- profilerSubprovider.stop();
- prependSubprovider(provider, profilerSubprovider);
-}
-
-export const web3Wrapper = new Web3Wrapper(provider);
diff --git a/packages/metacoin/tsconfig.json b/packages/metacoin/tsconfig.json
deleted file mode 100644
index 163465cf5..000000000
--- a/packages/metacoin/tsconfig.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "typeRoots": [
- "comment: for building within 0x-monorepo:",
- "../../node_modules/@0x/typescript-typings/types",
- "../../node_modules/@types",
- "comment: for building in an isolated environment:",
- "node_modules/@0x/typescript-typings/types",
- "node_modules/@types"
- ]
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/metacoin/tslint.json b/packages/metacoin/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/metacoin/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/migrations/.gitignore b/packages/migrations/.gitignore
deleted file mode 100644
index 4de81c5a8..000000000
--- a/packages/migrations/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.zip
-0x_ganache_snapshot
diff --git a/packages/migrations/CHANGELOG.json b/packages/migrations/CHANGELOG.json
deleted file mode 100644
index 64ae94b14..000000000
--- a/packages/migrations/CHANGELOG.json
+++ /dev/null
@@ -1,340 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "version": "2.4.0",
- "changes": [
- {
- "note": "Added migrations for `MultiAssetProxy` contract",
- "pr": 1503
- }
- ],
- "timestamp": 1547561734
- },
- {
- "timestamp": 1547225310,
- "version": "2.3.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.3.0",
- "changes": [
- {
- "note": "Added migrations for Dutch Auction contract",
- "pr": 1465
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "2.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "2.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "version": "2.2.0",
- "changes": [
- {
- "note": "Add CLI `0x-migrate` for running the 0x migrations in a language-agnostic way",
- "pr": 1324
- },
- {
- "note": "Deploy testnet Exchange arfitact. Previously mainnet Exchange artifact was deployed.",
- "pr": 1309
- },
- {
- "note": "Fund the Forwarder with ZRX for fees.",
- "pr": 1309
- }
- ],
- "timestamp": 1543401373
- },
- {
- "version": "2.1.0",
- "changes": [
- {
- "note": "Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping",
- "pr": 1301
- }
- ],
- "timestamp": 1542821676
- },
- {
- "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": "Contract artifacts have been moved to the new @0xproject/contract-artifacts package. v1 migrations have been removed. `runMigrationsAsync` returns the addresses of the contracts that were deployed.",
- "pr": 1105
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537875740,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537369748,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537265493,
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535377027,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535133899,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1534210131,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532619515
- },
- {
- "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": "Added migrations for 0x Protocol v2"
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527008794,
- "version": "0.0.7",
- "changes": [
- {
- "note": "Use AssetProxyOwner instead of MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress",
- "pr": 675
- }
- ]
- },
- {
- "timestamp": 1527008794,
- "version": "0.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524073495,
- "version": "0.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/packages/migrations/CHANGELOG.md b/packages/migrations/CHANGELOG.md
deleted file mode 100644
index 6c9a84018..000000000
--- a/packages/migrations/CHANGELOG.md
+++ /dev/null
@@ -1,148 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.4.0 - _January 15, 2019_
-
- * Added migrations for `MultiAssetProxy` contract (#1503)
-
-## v2.3.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v2.3.0 - _January 9, 2019_
-
- * Added migrations for Dutch Auction contract (#1465)
-
-## v2.2.2 - _December 13, 2018_
-
- * Dependencies updated
-
-## v2.2.1 - _December 11, 2018_
-
- * Dependencies updated
-
-## v2.2.0 - _November 28, 2018_
-
- * Add CLI `0x-migrate` for running the 0x migrations in a language-agnostic way (#1324)
- * Deploy testnet Exchange arfitact. Previously mainnet Exchange artifact was deployed. (#1309)
- * Fund the Forwarder with ZRX for fees. (#1309)
-
-## v2.1.0 - _November 21, 2018_
-
- * Export all type declarations used by the public interface, as well as the `ContractAddresses` mapping (#1301)
-
-## 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_
-
- * Contract artifacts have been moved to the new @0xproject/contract-artifacts package. v1 migrations have been removed. `runMigrationsAsync` returns the addresses of the contracts that were deployed. (#1105)
-
-## v1.0.14 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.13 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.12 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.11 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _September 19, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _September 18, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _August 27, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _August 24, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _August 14, 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_
-
- * Added migrations for 0x Protocol v2
-
-## v0.0.10 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.0.9 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.0.8 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.7 - _May 22, 2018_
-
- * Use AssetProxyOwner instead of MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress (#675)
-
-## v0.0.6 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.0.5 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.4 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.3 - _April 18, 2018_
-
- * Dependencies updated
diff --git a/packages/migrations/Dockerfile b/packages/migrations/Dockerfile
deleted file mode 100644
index c4d6128c2..000000000
--- a/packages/migrations/Dockerfile
+++ /dev/null
@@ -1,15 +0,0 @@
-FROM mhart/alpine-node:10
-
-WORKDIR /usr/src/app
-
-RUN npm install -g ganache-cli@6.1.6
-
-ENV MNEMONIC "concert load couple harbor equip island argue ramp clarify fence smart topic"
-ENV NETWORK_ID 50
-ENV VERSION "latest"
-ENV SNAPSHOT_HOST "http://ganache-snapshots.0x.org.s3-website.us-east-2.amazonaws.com"
-ENV SNAPSHOT_NAME "0x_ganache_snapshot"
-EXPOSE 8545
-
-CMD [ "sh", "-c", "wget $SNAPSHOT_HOST/$SNAPSHOT_NAME-$VERSION.zip -O snapshot.zip && unzip snapshot.zip && ganache-cli --gasLimit 10000000 --db $SNAPSHOT_NAME --noVMErrorsOnRPCResponse -p 8545 --networkId \"$NETWORK_ID\" -m \"$MNEMONIC\" -h 0.0.0.0"]
-
diff --git a/packages/migrations/README.md b/packages/migrations/README.md
deleted file mode 100644
index 1e8b92bf8..000000000
--- a/packages/migrations/README.md
+++ /dev/null
@@ -1,100 +0,0 @@
-## Migrations
-
-Migrate the 0x system of smart contracts on the network of your choice using these migrations.
-
-## 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/migrations yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/migrations yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Migrate
-
-#### V2 smart contracts
-
-In order to migrate the V2 0x smart contracts to TestRPC/Ganache running at `http://localhost:8545`, run:
-
-```bash
-yarn migrate:v2
-```
-
-### Publish
-
-#### 0x Ganache Snapshot
-
-The 0x Ganache snapshot can be generated and published in this package. In order to build the snapshot for this version of migrations run:
-
-```bash
-yarn build:snapshot
-```
-
-This will run the migrations in Ganache and output a zip file to be uploaded to the s3 bucket. For example, after running this command you will have created `0x_ganache_snapshot-2.2.2.zip`. To publish the zip file to the s3 bucket run:
-
-```bash
-yarn publish:snapshot
-```
-
-This snapshot will now be publicly available at http://ganache-snapshots.0x.org.s3.amazonaws.com/0x_ganache_snapshot-latest.zip and also versioned with the package.json version.
-
-#### 0x Ganache Docker Image
-
-We also publish a simple docker image which downloads the latest snapshot, extracts and runs Ganache. This is not required to be built when migrations change as it always downloads and runs the latest zip file. If you have made changes to the Dockerfile then a publish of the image is required. To do this run:
-
-```bash
-yarn build:snapshot:docker
-yarn publish:snapshot:docker
-```
-
-The result is a published docker image to the 0xorg docker registry. To start the docker image run:
-
-```bash
-docker run -p 8545:8545 -ti 0xorg/ganache-cli:latest
-```
-
-This will pull the latest zip in the s3 bucket, extract and start Ganache with the snapshot.
-
-In the event you need a specific version of the published Ganache snapshot run the following specifying the VERSION environment variable:
-
-```bash
-docker run -e VERSION=2.2.2 -p 8545:8545 -ti 0xorg/ganache-cli:latest
-```
diff --git a/packages/migrations/bin/0x-migrate.js b/packages/migrations/bin/0x-migrate.js
deleted file mode 100755
index 59778c0fc..000000000
--- a/packages/migrations/bin/0x-migrate.js
+++ /dev/null
@@ -1,2 +0,0 @@
-#!/usr/bin/env node
-require('../lib/cli.js');
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
deleted file mode 100644
index 3ca4e8d6b..000000000
--- a/packages/migrations/package.json
+++ /dev/null
@@ -1,72 +0,0 @@
-{
- "name": "@0x/migrations",
- "version": "2.4.0",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x smart contract migrations",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib ${npm_package_config_snapshot_name} ${npm_package_config_snapshot_name}-*.zip",
- "lint": "tslint --format stylish --project .",
- "migrate:v2": "run-s build script:migrate:v2",
- "migrate:v2:snapshot": "run-s build script:migrate:v2:snapshot",
- "script:migrate:v2": "node ./lib/migrate.js",
- "script:migrate:v2:snapshot": "node ./lib/migrate_snapshot.js",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES",
- "build:snapshot": "rm -rf ${npm_package_config_snapshot_name} && yarn migrate:v2:snapshot && zip -r \"${npm_package_config_snapshot_name}-${npm_package_version}.zip\" ${npm_package_config_snapshot_name}",
- "build:snapshot:docker": "docker build --tag ${npm_package_config_docker_snapshot_name}:${npm_package_version} --tag ${npm_package_config_docker_snapshot_name}:latest .",
- "publish:snapshot": "aws s3 cp ${npm_package_config_snapshot_name}-${npm_package_version}.zip ${npm_package_config_s3_snapshot_bucket} && aws s3 cp ${npm_package_config_s3_snapshot_bucket}/${npm_package_config_snapshot_name}-${npm_package_version}.zip ${npm_package_config_s3_snapshot_bucket}/${npm_package_config_snapshot_name}-latest.zip",
- "publish:snapshot:docker": "docker push ${npm_package_config_docker_snapshot_name}:latest"
- },
- "config": {
- "s3_snapshot_bucket": "s3://ganache-snapshots.0x.org",
- "docker_snapshot_name": "0xorg/ganache-cli",
- "snapshot_name": "0x_ganache_snapshot",
- "postpublish": {
- "assets": []
- }
- },
- "bin": {
- "0x-migrate": "bin/0x-migrate.js"
- },
- "license": "Apache-2.0",
- "devDependencies": {
- "@0x/dev-utils": "^1.0.24",
- "@0x/tslint-config": "^2.0.2",
- "@0x/types": "^1.5.2",
- "@types/yargs": "^10.0.0",
- "make-promises-safe": "^1.1.0",
- "npm-run-all": "^4.1.2",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typedoc": "0.13.0",
- "typescript": "3.0.1",
- "yargs": "^10.0.3"
- },
- "dependencies": {
- "@0x/abi-gen-wrappers": "^2.2.0",
- "@0x/base-contract": "^3.0.13",
- "@0x/contract-addresses": "^2.2.0",
- "@0x/contract-artifacts": "^1.3.0",
- "@0x/order-utils": "^3.1.2",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "@ledgerhq/hw-app-eth": "^4.3.0",
- "ethereum-types": "^1.1.6",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5"
- },
- "optionalDependencies": {
- "@ledgerhq/hw-transport-node-hid": "^4.3.0"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/migrations/src/cli.ts b/packages/migrations/src/cli.ts
deleted file mode 100644
index 2404e7921..000000000
--- a/packages/migrations/src/cli.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/env node
-import { RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import { logUtils } from '@0x/utils';
-import * as yargs from 'yargs';
-
-import { runMigrationsAsync } from './migration';
-
-const args = yargs
- .option('rpc-url', {
- describe: 'Endpoint where backing Ethereum JSON RPC interface is available',
- type: 'string',
- demandOption: false,
- default: 'http://localhost:8545',
- })
- .option('from', {
- describe: 'Ethereum address from which to deploy the contracts',
- type: 'string',
- demandOption: true,
- })
- .example(
- '$0 --rpc-url http://localhost:8545 --from 0x5409ed021d9299bf6814279a6a1411a7e866a631',
- 'Full usage example',
- ).argv;
-
-(async () => {
- const rpcSubprovider = new RPCSubprovider(args['rpc-url']);
- const provider = new Web3ProviderEngine();
- provider.addProvider(rpcSubprovider);
- provider.start();
- const txDefaults = {
- from: args.from,
- };
- await runMigrationsAsync(provider, txDefaults);
- process.exit(0);
-})().catch(err => {
- logUtils.log(err);
- process.exit(1);
-});
diff --git a/packages/migrations/src/index.ts b/packages/migrations/src/index.ts
deleted file mode 100644
index 4f22c30b9..000000000
--- a/packages/migrations/src/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export {
- Provider,
- TxData,
- JSONRPCRequestPayload,
- JSONRPCErrorCallback,
- TxDataPayable,
- JSONRPCResponsePayload,
- JSONRPCResponseError,
-} from 'ethereum-types';
-export { ContractAddresses } from '@0x/contract-addresses';
-export { runMigrationsAsync, runMigrationsOnceAsync } from './migration';
diff --git a/packages/migrations/src/migrate.ts b/packages/migrations/src/migrate.ts
deleted file mode 100644
index d7a76d2f8..000000000
--- a/packages/migrations/src/migrate.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/env node
-import { devConstants, web3Factory } from '@0x/dev-utils';
-import { logUtils } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-
-import { runMigrationsAsync } from './migration';
-
-(async () => {
- let providerConfigs;
- let provider: Provider;
- let txDefaults;
-
- providerConfigs = { shouldUseInProcessGanache: false };
- provider = web3Factory.getRpcProvider(providerConfigs);
- txDefaults = {
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- };
- await runMigrationsAsync(provider, txDefaults);
- process.exit(0);
-})().catch(err => {
- logUtils.log(err);
- process.exit(1);
-});
diff --git a/packages/migrations/src/migrate_snapshot.ts b/packages/migrations/src/migrate_snapshot.ts
deleted file mode 100644
index 13fb063da..000000000
--- a/packages/migrations/src/migrate_snapshot.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/usr/bin/env node
-import { devConstants, web3Factory } from '@0x/dev-utils';
-import { logUtils } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-import * as fs from 'fs';
-import * as _ from 'lodash';
-import * as path from 'path';
-
-import { runMigrationsAsync } from './migration';
-
-(async () => {
- let providerConfigs;
- let provider: Provider;
- let txDefaults;
- const packageJsonPath = path.join(__dirname, '..', 'package.json');
- const packageJsonString = fs.readFileSync(packageJsonPath, 'utf8');
- const packageJson = JSON.parse(packageJsonString);
- if (_.isUndefined(packageJson.config) || _.isUndefined(packageJson.config.snapshot_name)) {
- throw new Error(`Did not find 'snapshot_name' key in package.json config`);
- }
-
- providerConfigs = { shouldUseInProcessGanache: true, ganacheDatabasePath: packageJson.config.snapshot_name };
- provider = web3Factory.getRpcProvider(providerConfigs);
- txDefaults = {
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- };
- await runMigrationsAsync(provider, txDefaults);
- process.exit(0);
-})().catch(err => {
- logUtils.log(err);
- process.exit(1);
-});
diff --git a/packages/migrations/src/migration.ts b/packages/migrations/src/migration.ts
deleted file mode 100644
index e0f245017..000000000
--- a/packages/migrations/src/migration.ts
+++ /dev/null
@@ -1,232 +0,0 @@
-import * as wrappers from '@0x/abi-gen-wrappers';
-import { ContractAddresses } from '@0x/contract-addresses';
-import * as artifacts from '@0x/contract-artifacts';
-import { assetDataUtils } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider, TxData } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { erc20TokenInfo, erc721TokenInfo } from './utils/token_info';
-
-/**
- * Creates and deploys all the contracts that are required for the latest
- * version of the 0x protocol.
- * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
- * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
- * @returns The addresses of the contracts that were deployed.
- */
-export async function runMigrationsAsync(provider: Provider, txDefaults: Partial<TxData>): Promise<ContractAddresses> {
- const web3Wrapper = new Web3Wrapper(provider);
- const accounts: string[] = await web3Wrapper.getAvailableAddressesAsync();
- const owner = accounts[0];
-
- // Proxies
- const erc20Proxy = await wrappers.ERC20ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC20Proxy,
- provider,
- txDefaults,
- );
- const erc721Proxy = await wrappers.ERC721ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC721Proxy,
- provider,
- txDefaults,
- );
-
- // ZRX
- const zrxToken = await wrappers.ZRXTokenContract.deployFrom0xArtifactAsync(
- artifacts.ZRXToken,
- provider,
- txDefaults,
- );
-
- // Ether token
- const etherToken = await wrappers.WETH9Contract.deployFrom0xArtifactAsync(artifacts.WETH9, provider, txDefaults);
-
- // Exchange
- const zrxAssetData = assetDataUtils.encodeERC20AssetData(zrxToken.address);
- const exchange = await wrappers.ExchangeContract.deployFrom0xArtifactAsync(
- artifacts.Exchange,
- provider,
- txDefaults,
- zrxAssetData,
- );
-
- // Dummy ERC20 tokens
- for (const token of erc20TokenInfo) {
- const totalSupply = new BigNumber(1000000000000000000000000000);
- // tslint:disable-next-line:no-unused-variable
- const dummyErc20Token = await wrappers.DummyERC20TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC20Token,
- provider,
- txDefaults,
- token.name,
- token.symbol,
- token.decimals,
- totalSupply,
- );
- }
-
- // ERC721
- // tslint:disable-next-line:no-unused-variable
- const cryptoKittieToken = await wrappers.DummyERC721TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC721Token,
- provider,
- txDefaults,
- erc721TokenInfo[0].name,
- erc721TokenInfo[0].symbol,
- );
-
- const multiAssetProxy = await wrappers.MultiAssetProxyContract.deployFrom0xArtifactAsync(
- artifacts.MultiAssetProxy,
- provider,
- txDefaults,
- );
-
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.addAuthorizedAddress.sendTransactionAsync(exchange.address, {
- from: owner,
- }),
- );
-
- // MultiAssetProxy
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.addAuthorizedAddress.sendTransactionAsync(multiAssetProxy.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc20Proxy.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.registerAssetProxy.sendTransactionAsync(erc721Proxy.address),
- );
-
- // Register the Asset Proxies to the Exchange
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.registerAssetProxy.sendTransactionAsync(erc20Proxy.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.registerAssetProxy.sendTransactionAsync(erc721Proxy.address),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await exchange.registerAssetProxy.sendTransactionAsync(multiAssetProxy.address),
- );
-
- // Forwarder
- const forwarder = await wrappers.ForwarderContract.deployFrom0xArtifactAsync(
- artifacts.Forwarder,
- provider,
- txDefaults,
- exchange.address,
- assetDataUtils.encodeERC20AssetData(zrxToken.address),
- assetDataUtils.encodeERC20AssetData(etherToken.address),
- );
-
- // OrderValidator
- const orderValidator = await wrappers.OrderValidatorContract.deployFrom0xArtifactAsync(
- artifacts.OrderValidator,
- provider,
- txDefaults,
- exchange.address,
- zrxAssetData,
- );
-
- // DutchAuction
- const dutchAuction = await wrappers.DutchAuctionContract.deployFrom0xArtifactAsync(
- artifacts.DutchAuction,
- provider,
- txDefaults,
- exchange.address,
- );
-
- // Multisigs
- const owners = [accounts[0], accounts[1]];
- const confirmationsRequired = new BigNumber(2);
- const secondsRequired = new BigNumber(0);
-
- // AssetProxyOwner
- const assetProxyOwner = await wrappers.AssetProxyOwnerContract.deployFrom0xArtifactAsync(
- artifacts.AssetProxyOwner,
- provider,
- txDefaults,
- owners,
- [erc20Proxy.address, erc721Proxy.address, multiAssetProxy.address],
- confirmationsRequired,
- secondsRequired,
- );
-
- // Transfer Ownership to the Asset Proxy Owner
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc20Proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await erc721Proxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, {
- from: owner,
- }),
- );
- await web3Wrapper.awaitTransactionSuccessAsync(
- await multiAssetProxy.transferOwnership.sendTransactionAsync(assetProxyOwner.address, {
- from: owner,
- }),
- );
-
- // Fund the Forwarder with ZRX
- const zrxDecimals = await zrxToken.decimals.callAsync();
- const zrxForwarderAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5000), zrxDecimals);
- await web3Wrapper.awaitTransactionSuccessAsync(
- await zrxToken.transfer.sendTransactionAsync(forwarder.address, zrxForwarderAmount, txDefaults),
- );
-
- const contractAddresses = {
- erc20Proxy: erc20Proxy.address,
- erc721Proxy: erc721Proxy.address,
- zrxToken: zrxToken.address,
- etherToken: etherToken.address,
- exchange: exchange.address,
- assetProxyOwner: assetProxyOwner.address,
- forwarder: forwarder.address,
- orderValidator: orderValidator.address,
- dutchAuction: dutchAuction.address,
- };
-
- return contractAddresses;
-}
-
-let _cachedContractAddresses: ContractAddresses;
-
-/**
- * Exactly like runMigrationsAsync but will only run the migrations the first
- * time it is called. Any subsequent calls will return the cached contract
- * addresses.
- * @param provider Web3 provider instance. Your provider instance should connect to the testnet you want to deploy to.
- * @param txDefaults Default transaction values to use when deploying contracts (e.g., specify the desired contract creator with the `from` parameter).
- * @returns The addresses of the contracts that were deployed.
- */
-export async function runMigrationsOnceAsync(
- provider: Provider,
- txDefaults: Partial<TxData>,
-): Promise<ContractAddresses> {
- if (!_.isUndefined(_cachedContractAddresses)) {
- return _cachedContractAddresses;
- }
- _cachedContractAddresses = await runMigrationsAsync(provider, txDefaults);
- return _cachedContractAddresses;
-}
diff --git a/packages/migrations/src/types.ts b/packages/migrations/src/types.ts
deleted file mode 100644
index 87e66f356..000000000
--- a/packages/migrations/src/types.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export interface ERC20Token {
- address?: string;
- name: string;
- symbol: string;
- decimals: BigNumber;
- ipfsHash: string;
- swarmHash: string;
-}
-
-export interface ERC721Token {
- name: string;
- symbol: string;
-}
-
-export enum ContractName {
- TokenTransferProxy = 'TokenTransferProxy',
- TokenRegistry = 'TokenRegistry',
- MultiSigWalletWithTimeLock = 'MultiSigWalletWithTimeLock',
- Exchange = 'Exchange',
- ZRXToken = 'ZRXToken',
- DummyToken = 'DummyToken',
- WETH9 = 'WETH9',
- MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress = 'MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress',
- AccountLevels = 'AccountLevels',
- EtherDelta = 'EtherDelta',
- Arbitrage = 'Arbitrage',
-}
diff --git a/packages/migrations/src/utils/constants.ts b/packages/migrations/src/utils/constants.ts
deleted file mode 100644
index 8b16a0520..000000000
--- a/packages/migrations/src/utils/constants.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export const constants = {
- ASSET_PROXY_OWNER_OWNERS: [
- '0x9df8137872ac09a8fee71d0da5c7539923fb9bf0',
- '0xcf34d44db312d188789f43a63d11cf2bebb4da15',
- '0x73fd50f2a6beac9cdac9fe87ef68a18edc415831',
- ],
- ASSET_PROXY_OWNER_TIMELOCK: new BigNumber(0),
- ASSET_PROXY_OWNER_CONFIRMATIONS: new BigNumber(1),
- ERC20_PROXY_ID: '0xf47261b0',
- ERC721_PROXY_ID: '0x02571792',
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- KOVAN_RPC_URL: 'https://kovan.infura.io/',
- KOVAN_NETWORK_ID: 42,
- MAINNET_RPC_URL: 'https://mainnet.infura.io/',
- MAINNET_NETWORK_ID: 1,
-};
diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts
deleted file mode 100644
index 8017b672a..000000000
--- a/packages/migrations/src/utils/provider_factory.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import Eth from '@ledgerhq/hw-app-eth';
-// tslint:disable:no-implicit-dependencies
-import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
-import { Provider } from 'ethereum-types';
-
-import { constants } from './constants';
-
-async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> {
- const ledgerConnection = await TransportNodeHid.create();
- const ledgerEthClient = new Eth(ledgerConnection);
- return ledgerEthClient;
-}
-export const providerFactory = {
- async getKovanLedgerProviderAsync(): Promise<Provider> {
- const provider = new Web3ProviderEngine();
- const ledgerWalletConfigs = {
- networkId: constants.KOVAN_NETWORK_ID,
- ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync,
- };
- const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs);
- provider.addProvider(ledgerSubprovider);
- provider.addProvider(new RPCSubprovider(constants.KOVAN_RPC_URL));
- provider.start();
- return provider;
- },
- async getMainnetLedgerProviderAsync(): Promise<Provider> {
- const provider = new Web3ProviderEngine();
- const ledgerWalletConfigs = {
- networkId: constants.MAINNET_NETWORK_ID,
- ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync,
- };
- const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs);
- provider.addProvider(ledgerSubprovider);
- provider.addProvider(new RPCSubprovider(constants.MAINNET_RPC_URL));
- provider.start();
- return provider;
- },
-};
diff --git a/packages/migrations/src/utils/token_info.ts b/packages/migrations/src/utils/token_info.ts
deleted file mode 100644
index 6e0411f60..000000000
--- a/packages/migrations/src/utils/token_info.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { BigNumber, NULL_BYTES } from '@0x/utils';
-
-import { ERC20Token, ERC721Token } from '../types';
-
-export const etherTokenByNetwork: { [networkId: number]: { address: string } } = {
- 3: {
- address: '0xc778417e063141139fce010982780140aa0cd5ab',
- },
- 4: {
- address: '0xc778417e063141139fce010982780140aa0cd5ab',
- },
- 42: {
- address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
- },
- 50: {
- address: '',
- },
-};
-export const erc20TokenInfo: ERC20Token[] = [
- {
- name: 'Augur Reputation Token',
- symbol: 'REP',
- decimals: new BigNumber(18),
- ipfsHash: NULL_BYTES,
- swarmHash: NULL_BYTES,
- },
- {
- name: 'Digix DAO Token',
- symbol: 'DGD',
- decimals: new BigNumber(18),
- ipfsHash: NULL_BYTES,
- swarmHash: NULL_BYTES,
- },
- {
- name: 'Golem Network Token',
- symbol: 'GNT',
- decimals: new BigNumber(18),
- ipfsHash: NULL_BYTES,
- swarmHash: NULL_BYTES,
- },
- {
- name: 'MakerDAO',
- symbol: 'MKR',
- decimals: new BigNumber(18),
- ipfsHash: NULL_BYTES,
- swarmHash: NULL_BYTES,
- },
- {
- name: 'Melon Token',
- symbol: 'MLN',
- decimals: new BigNumber(18),
- ipfsHash: NULL_BYTES,
- swarmHash: NULL_BYTES,
- },
-];
-
-export const erc721TokenInfo: ERC721Token[] = [
- {
- name: '0xen ERC721',
- symbol: '0xen',
- },
-];
diff --git a/packages/migrations/tsconfig.json b/packages/migrations/tsconfig.json
deleted file mode 100644
index 56689eaa3..000000000
--- a/packages/migrations/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/migrations/tslint.json b/packages/migrations/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/migrations/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/migrations/typedoc-tsconfig.json b/packages/migrations/typedoc-tsconfig.json
deleted file mode 100644
index c9b0af1ae..000000000
--- a/packages/migrations/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/monorepo-scripts/src/prepublish_checks.ts b/packages/monorepo-scripts/src/prepublish_checks.ts
index 021e57226..36781b772 100644
--- a/packages/monorepo-scripts/src/prepublish_checks.ts
+++ b/packages/monorepo-scripts/src/prepublish_checks.ts
@@ -141,20 +141,6 @@ async function checkPublishRequiredSetupAsync(): Promise<void> {
throw new Error('You must be logged into npm in the commandline to publish. Run `npm login` and try again.');
}
- // Check to see if Git personal token setup
- if (_.isUndefined(constants.githubPersonalAccessToken)) {
- throw new Error(
- 'You must have a Github personal access token set to an envVar named `GITHUB_PERSONAL_ACCESS_TOKEN_0X_JS`. Add it then try again.',
- );
- }
-
- // Check to see if discord URL is set up
- if (_.isUndefined(constants.discordAlertWebhookUrl)) {
- throw new Error(
- 'You must have a discord webhook URL set to an envVar named `DISCORD_GITHUB_RELEASE_WEBHOOK_URL`. Add it then try again.',
- );
- }
-
// Check Yarn version is 1.X
utils.log('Checking the yarn version...');
const result = await execAsync(`yarn --version`);
@@ -165,14 +151,6 @@ async function checkPublishRequiredSetupAsync(): Promise<void> {
throw new Error('Your yarn version must be v1.x or higher. Upgrade yarn and try again.');
}
- // Check that `aws` commandline tool is installed
- try {
- utils.log('Checking that aws CLI tool is installed...');
- await execAsync(`aws help`);
- } catch (err) {
- throw new Error('You must have `awscli` commandline tool installed. Install it and try again.');
- }
-
// Check that `aws` credentials are setup
try {
utils.log('Checking that aws credentials are configured...');
diff --git a/packages/order-utils/.npmignore b/packages/order-utils/.npmignore
deleted file mode 100644
index 89302c908..000000000
--- a/packages/order-utils/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/generated_docs/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/order-utils/CHANGELOG.json b/packages/order-utils/CHANGELOG.json
deleted file mode 100644
index 08d88da5b..000000000
--- a/packages/order-utils/CHANGELOG.json
+++ /dev/null
@@ -1,424 +0,0 @@
-[
- {
- "version": "4.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "3.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "3.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.1.0",
- "changes": [
- {
- "note": "Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils",
- "pr": 1363
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "3.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "3.0.6",
- "changes": [
- {
- "note": "Fix bug in wallet signature type verification",
- "pr": 1414
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1544482891,
- "version": "3.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1543401373,
- "version": "3.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "3.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "3.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "version": "3.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.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
- },
- {
- "note": "Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param",
- "pr": 1235
- }
- ],
- "timestamp": 1542028948
- },
- {
- "version": "2.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`.",
- "pr": 1102
- },
- {
- "note": "Added `ecSignTypedDataOrderAsync` to sign an order exclusively using `eth_signTypedData`.",
- "pr": 1102
- },
- {
- "note": "Rename `ecSignOrderHashAsync` to `ecSignHashAsync` removing `SignerType` parameter.",
- "pr": 1102
- },
- {
- "note": "Use `AssetData` union type for function return values.",
- "pr": 1131
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "version": "1.0.6",
- "changes": [
- {
- "note": "Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address",
- "pr": 1096
- }
- ],
- "timestamp": 1538157789
- },
- {
- "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": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.2",
- "changes": [
- {
- "note": "Drastically reduce the bundle size by removing unused parts of included contract artifacts."
- }
- ],
- "timestamp": 1537369748
- },
- {
- "version": "1.0.1",
- "changes": [
- {
- "note": "Export `orderParsingUtils`",
- "pr": 1044
- }
- ],
- "timestamp": 1536142250
- },
- {
- "version": "1.0.1-rc.6",
- "changes": [
- {
- "note": "Fix missing `BlockParamLiteral` type import issue"
- }
- ],
- "timestamp": 1535377027
- },
- {
- "version": "1.0.1-rc.5",
- "changes": [
- {
- "note": "Remove Caller and Trezor SignatureTypes",
- "pr": 1015
- }
- ]
- },
- {
- "version": "1.0.1-rc.4",
- "changes": [
- {
- "note": "Remove rounding error being thrown when maker amount is very small",
- "pr": 959
- },
- {
- "note": "Added rateUtils and sortingUtils",
- "pr": 953
- },
- {
- "note": "Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided",
- "pr": 954
- },
- {
- "note": "Instead of exporting signature util methods individually, they are now exported as `signatureUtils`",
- "pr": 924
- },
- {
- "note": "Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`",
- "pr": 924
- },
- {
- "note": "Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api",
- "pr": 997
- },
- {
- "note": "Make `sortFeeOrdersByFeeAdjustedRate` in `sortingUtils` generic",
- "pr": 997
- },
- {
- "note": "Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees",
- "pr": 997
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.3",
- "changes": [
- {
- "pr": 914,
- "note": "Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts."
- },
- {
- "note": "Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters",
- "pr": 936
- },
- {
- "note": "Added marketUtils",
- "pr": 937
- },
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1534210131
- },
- {
- "version": "1.0.1-rc.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532619515
- },
- {
- "version": "1.0.1-rc.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532605697
- },
- {
- "version": "1.0.0",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532357734
- },
- {
- "version": "1.0.0-rc.2",
- "changes": [
- {
- "note": "Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`"
- }
- ],
- "timestamp": 1532357734
- },
- {
- "timestamp": 1532043000,
- "version": "1.0.0-rc.1",
- "changes": [
- {
- "note": "Refactor to work with V2 of 0x protocol",
- "pr": 636
- },
- {
- "note": "Export parseECSignature method",
- "pr": 684
- },
- {
- "note": "Handle Typed Arrays when hashing data",
- "pr": 894
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527616612,
- "version": "0.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.5",
- "changes": [
- {
- "note": "Add orderStateUtils, a module for computing order state needed to decide if an order is still valid"
- }
- ],
- "timestamp": 1527008794
- },
- {
- "timestamp": 1525477860,
- "version": "0.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525453812,
- "version": "0.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/packages/order-utils/CHANGELOG.md b/packages/order-utils/CHANGELOG.md
deleted file mode 100644
index c82458f2e..000000000
--- a/packages/order-utils/CHANGELOG.md
+++ /dev/null
@@ -1,172 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v3.1.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v3.1.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v3.1.0 - _January 9, 2019_
-
- * Use new ABI encoder, add encoding/decoding logic for MultiAsset assetData, and add information to return values in orderStateUtils (#1363)
-
-## v3.0.7 - _December 13, 2018_
-
- * Dependencies updated
-
-## v3.0.6 - _December 11, 2018_
-
- * Fix bug in wallet signature type verification (#1414)
-
-## v3.0.5 - _December 10, 2018_
-
- * Dependencies updated
-
-## v3.0.4 - _November 28, 2018_
-
- * Dependencies updated
-
-## v3.0.3 - _November 21, 2018_
-
- * Dependencies updated
-
-## v3.0.2 - _November 14, 2018_
-
- * Dependencies updated
-
-## v3.0.1 - _November 13, 2018_
-
- * Dependencies updated
-
-## v3.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)
- * Modified the `AbstractOrderFilledCancelledFetcher` interface slightly such that `isOrderCancelledAsync` accepts a `signedOrder` instead of an `orderHash` param (#1235)
-
-## v2.0.1 - _November 9, 2018_
-
- * Dependencies updated
-
-## v2.0.0 - _October 18, 2018_
-
- * Added `ecSignOrderAsync` to first sign an order using `eth_signTypedData` and fallback to `eth_sign`. (#1102)
- * Added `ecSignTypedDataOrderAsync` to sign an order exclusively using `eth_signTypedData`. (#1102)
- * Rename `ecSignOrderHashAsync` to `ecSignHashAsync` removing `SignerType` parameter. (#1102)
- * Use `AssetData` union type for function return values. (#1131)
-
-## v1.0.7 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _September 28, 2018_
-
- * Add signerAddress normalization to `isValidECSignature` to avoid `invalid address recovery` error if caller supplies a checksummed address (#1096)
-
-## v1.0.5 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.3 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.2 - _September 19, 2018_
-
- * Drastically reduce the bundle size by removing unused parts of included contract artifacts.
-
-## v1.0.1 - _September 5, 2018_
-
- * Export `orderParsingUtils` (#1044)
-
-## v1.0.1-rc.6 - _August 27, 2018_
-
- * Fix missing `BlockParamLiteral` type import issue
-
-## v1.0.1-rc.5 - _Invalid date_
-
- * Remove Caller and Trezor SignatureTypes (#1015)
-
-## v1.0.1-rc.4 - _August 24, 2018_
-
- * Remove rounding error being thrown when maker amount is very small (#959)
- * Added rateUtils and sortingUtils (#953)
- * Update marketUtils api such that all optional parameters are bundled into one optional param and more defaults are provided (#954)
- * Instead of exporting signature util methods individually, they are now exported as `signatureUtils` (#924)
- * Export types: `SignedOrder`, `Order`, `OrderRelevantState`, `OrderState`, `ECSignature`, `ERC20AssetData`, `ERC721AssetData`, `AssetProxyId`, `SignerType`, `SignatureType`, `OrderStateValid`, `OrderStateInvalid`, `ExchangeContractErrs`, `TradeSide`, `TransferType`, `FindFeeOrdersThatCoverFeesForTargetOrdersOpts`, `FindOrdersThatCoverMakerAssetFillAmountOpts`, `FeeOrdersAndRemainingFeeAmount`, `OrdersAndRemainingFillAmount`, `Provider`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload` (#924)
- * Rename `resultOrders` to `resultFeeOrders` for object returned by `findFeeOrdersThatCoverFeesForTargetOrders` in `marketUtils` api (#997)
- * Make `sortFeeOrdersByFeeAdjustedRate` in `sortingUtils` generic (#997)
- * Update `findFeeOrdersThatCoverFeesForTargetOrders` to round the the nearest integer when calculating required fees (#997)
-
-## v1.0.1-rc.3 - _August 14, 2018_
-
- * Update ecSignOrderHashAsync to return signature string with signature type byte. Removes messagePrefixOpts. (#914)
- * Added a synchronous `createOrder` method in `orderFactory`, updated public interfaces to support some optional parameters (#936)
- * Added marketUtils (#937)
- * Dependencies updated
-
-## v1.0.1-rc.2 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.1 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.0 - _July 23, 2018_
-
- * Dependencies updated
-
-## v1.0.0-rc.2 - _July 23, 2018_
-
- * Upgrade ethereumjs-abi dep including a fix so that addresses starting with 0 are properly decoded by `decodeERC20AssetData`
-
-## v1.0.0-rc.1 - _July 19, 2018_
-
- * Refactor to work with V2 of 0x protocol (#636)
- * Export parseECSignature method (#684)
- * Handle Typed Arrays when hashing data (#894)
-
-## v0.0.9 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.0.8 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.0.7 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.6 - _May 29, 2018_
-
- * Dependencies updated
-
-## v0.0.5 - _May 22, 2018_
-
- * Add orderStateUtils, a module for computing order state needed to decide if an order is still valid
-
-## v0.0.4 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.3 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.2 - _May 4, 2018_
-
- * Dependencies updated
diff --git a/packages/order-utils/README.md b/packages/order-utils/README.md
deleted file mode 100644
index 4a8287098..000000000
--- a/packages/order-utils/README.md
+++ /dev/null
@@ -1,65 +0,0 @@
-## @0x/order-utils
-
-0x order-related utilities for those developing on top of 0x protocol.
-
-### Read the [Documentation](https://0xproject.com/docs/order-utils).
-
-## Installation
-
-```bash
-yarn add @0x/order-utils
-```
-
-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/order-utils yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/order-utils yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/order-utils/coverage/.gitkeep b/packages/order-utils/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/order-utils/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/order-utils/package.json b/packages/order-utils/package.json
deleted file mode 100644
index 7a4d4aa84..000000000
--- a/packages/order-utils/package.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "name": "@0x/order-utils",
- "version": "3.1.2",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x order utils",
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
- "scripts": {
- "build": "yarn tsc -b",
- "build:ci": "yarn build",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s 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",
- "clean": "shx rm -rf lib generated_docs",
- "lint": "tslint --format stylish --project .",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
- },
- "config": {
- "postpublish": {
- "assets": []
- }
- },
- "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/order-utils/README.md",
- "devDependencies": {
- "@0x/dev-utils": "^1.0.24",
- "@0x/tslint-config": "^2.0.2",
- "@types/bn.js": "^4.11.0",
- "@types/lodash": "4.14.104",
- "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",
- "shx": "^0.2.2",
- "sinon": "^4.0.0",
- "tslint": "5.11.0",
- "typedoc": "0.13.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/abi-gen-wrappers": "^2.2.0",
- "@0x/assert": "^1.0.23",
- "@0x/base-contract": "^3.0.13",
- "@0x/contract-artifacts": "^1.3.0",
- "@0x/json-schemas": "^2.1.7",
- "@0x/types": "^1.5.2",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "@types/node": "*",
- "bn.js": "^4.11.8",
- "ethereum-types": "^1.1.6",
- "ethereumjs-abi": "0.6.5",
- "ethereumjs-util": "^5.1.1",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts
deleted file mode 100644
index 13fbf1736..000000000
--- a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_fetcher.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-/**
- * An abstract class to be implemented in order to use OrderStateUtils. The class that
- * implements this interface must be capable of fetching the balance and proxyAllowance
- * for an Ethereum address and assetData
- */
-export abstract class AbstractBalanceAndProxyAllowanceFetcher {
- /**
- * Get balance of assetData for userAddress
- * @param assetData AssetData for which to fetch the balance
- * @param userAddress Ethereum address for which to fetch the balance
- * @return Balance amount in base units
- */
- public abstract async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
- /**
- * Get the 0x asset proxy allowance of assetData for userAddress
- * @param assetData AssetData for which to fetch the allowance
- * @param userAddress Ethereum address for which to fetch the allowance
- * @return Allowance amount in base units
- */
- public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
-}
diff --git a/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/abstract/abstract_balance_and_proxy_allowance_lazy_store.ts
deleted file mode 100644
index 0a73e92bd..000000000
--- a/packages/order-utils/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(assetData: string, userAddress: string): Promise<BigNumber>;
- public abstract async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber>;
- public abstract setBalance(assetData: string, userAddress: string, balance: BigNumber): void;
- public abstract deleteBalance(assetData: string, userAddress: string): void;
- public abstract setProxyAllowance(assetData: string, userAddress: string, proxyAllowance: BigNumber): void;
- public abstract deleteProxyAllowance(assetData: string, userAddress: string): void;
- public abstract deleteAll(): void;
-}
diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts
deleted file mode 100644
index 9e240f9ef..000000000
--- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_fetcher.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-/**
- * An abstract class to be implemented in order to use OrderStateUtils. The class that
- * implements this interface must be capable of fetching the amount filled of an order
- * and whether it's been cancelled.
- */
-export abstract class AbstractOrderFilledCancelledFetcher {
- /**
- * Get the amount of the order's takerToken amount already filled
- * @param orderHash OrderHash of order we are interested in
- * @return FilledTakerAmount
- */
- public abstract async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber>;
- /**
- * Whether an order is cancelled
- * @param orderHash OrderHash of order we are interested in
- * @return Whether or not the order is cancelled
- */
- public abstract async isOrderCancelledAsync(signedOrder: SignedOrder): Promise<boolean>;
- public abstract getZRXAssetData(): string;
-}
diff --git a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts b/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts
deleted file mode 100644
index 186521401..000000000
--- a/packages/order-utils/src/abstract/abstract_order_filled_cancelled_lazy_store.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-export abstract class AbstractOrderFilledCancelledLazyStore {
- public abstract async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber>;
- public abstract async getIsCancelledAsync(signedOrder: SignedOrder): Promise<boolean>;
- public abstract setFilledTakerAmount(orderHash: string, balance: BigNumber): void;
- public abstract deleteFilledTakerAmount(orderHash: string): void;
- public abstract setIsCancelled(orderHash: string, isCancelled: boolean): void;
- public abstract deleteIsCancelled(orderHash: string): void;
- public abstract deleteAll(): void;
- public abstract getZRXAssetData(): string;
-}
diff --git a/packages/order-utils/src/assert.ts b/packages/order-utils/src/assert.ts
deleted file mode 100644
index 2f73f58c4..000000000
--- a/packages/order-utils/src/assert.ts
+++ /dev/null
@@ -1,37 +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:no-unused-variable
-import { Schema } from '@0x/json-schemas';
-import { ECSignature, SignatureType } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-// tslint:enable:no-unused-variable
-import * as _ from 'lodash';
-
-import { utils } from './utils';
-
-export const assert = {
- ...sharedAssert,
- async isSenderAddressAsync(
- variableName: string,
- senderAddressHex: string,
- web3Wrapper: Web3Wrapper,
- ): Promise<void> {
- sharedAssert.isETHAddressHex(variableName, senderAddressHex);
- const isSenderAddressAvailable = await web3Wrapper.isSenderAddressAvailableAsync(senderAddressHex);
- sharedAssert.assert(
- isSenderAddressAvailable,
- `Specified ${variableName} ${senderAddressHex} isn't available through the supplied web3 provider`,
- );
- },
- isOneOfExpectedSignatureTypes(signature: string, signatureTypes: SignatureType[]): void {
- sharedAssert.isHexString('signature', signature);
- const signatureTypeIndexIfExists = utils.getSignatureTypeIndexIfExists(signature);
- const isExpectedSignatureType = _.includes(signatureTypes, signatureTypeIndexIfExists);
- if (!isExpectedSignatureType) {
- throw new Error(
- `Unexpected signatureType: ${signatureTypeIndexIfExists}. Valid signature types: ${signatureTypes}`,
- );
- }
- },
-};
diff --git a/packages/order-utils/src/asset_data_utils.ts b/packages/order-utils/src/asset_data_utils.ts
deleted file mode 100644
index f314891e2..000000000
--- a/packages/order-utils/src/asset_data_utils.ts
+++ /dev/null
@@ -1,308 +0,0 @@
-import {
- AssetProxyId,
- ERC20AssetData,
- ERC721AssetData,
- MultiAssetData,
- MultiAssetDataWithRecursiveDecoding,
- SingleAssetData,
-} from '@0x/types';
-import { AbiEncoder, BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-
-const encodingRules: AbiEncoder.EncodingRules = { shouldOptimize: true };
-const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
-
-export const assetDataUtils = {
- /**
- * Encodes an ERC20 token address into a hex encoded assetData string, usable in the makerAssetData or
- * takerAssetData fields in a 0x order.
- * @param tokenAddress The ERC20 token address to encode
- * @return The hex encoded assetData string
- */
- encodeERC20AssetData(tokenAddress: string): string {
- const abiEncoder = new AbiEncoder.Method(constants.ERC20_METHOD_ABI);
- const args = [tokenAddress];
- const assetData = abiEncoder.encode(args, encodingRules);
- return assetData;
- },
- /**
- * Decodes an ERC20 assetData hex string into it's corresponding ERC20 tokenAddress & assetProxyId
- * @param assetData Hex encoded assetData string to decode
- * @return An object containing the decoded tokenAddress & assetProxyId
- */
- decodeERC20AssetData(assetData: string): ERC20AssetData {
- assetDataUtils.assertIsERC20AssetData(assetData);
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- const abiEncoder = new AbiEncoder.Method(constants.ERC20_METHOD_ABI);
- const decodedAssetData = abiEncoder.decode(assetData, decodingRules);
- return {
- assetProxyId,
- // TODO(abandeali1): fix return types for `AbiEncoder.Method.decode` so that we can remove type assertion
- tokenAddress: (decodedAssetData as any).tokenContract,
- };
- },
- /**
- * Encodes an ERC721 token address into a hex encoded assetData string, usable in the makerAssetData or
- * takerAssetData fields in a 0x order.
- * @param tokenAddress The ERC721 token address to encode
- * @param tokenId The ERC721 tokenId to encode
- * @return The hex encoded assetData string
- */
- encodeERC721AssetData(tokenAddress: string, tokenId: BigNumber): string {
- const abiEncoder = new AbiEncoder.Method(constants.ERC721_METHOD_ABI);
- const args = [tokenAddress, tokenId];
- const assetData = abiEncoder.encode(args, encodingRules);
- return assetData;
- },
- /**
- * Decodes an ERC721 assetData hex string into it's corresponding ERC721 tokenAddress, tokenId & assetProxyId
- * @param assetData Hex encoded assetData string to decode
- * @return An object containing the decoded tokenAddress, tokenId & assetProxyId
- */
- decodeERC721AssetData(assetData: string): ERC721AssetData {
- assetDataUtils.assertIsERC721AssetData(assetData);
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- const abiEncoder = new AbiEncoder.Method(constants.ERC721_METHOD_ABI);
- const decodedAssetData = abiEncoder.decode(assetData, decodingRules);
- return {
- assetProxyId,
- // TODO(abandeali1): fix return types for `AbiEncoder.Method.decode` so that we can remove type assertion
- tokenAddress: (decodedAssetData as any).tokenContract,
- tokenId: (decodedAssetData as any).tokenId,
- };
- },
- /**
- * Encodes assetData for multiple AssetProxies into a single hex encoded assetData string, usable in the makerAssetData or
- * takerAssetData fields in a 0x order.
- * @param amounts Amounts of each asset that correspond to a single unit within an order.
- * @param nestedAssetData assetData strings that correspond to a valid assetProxyId.
- * @return The hex encoded assetData string
- */
- encodeMultiAssetData(amounts: BigNumber[], nestedAssetData: string[]): string {
- if (amounts.length !== nestedAssetData.length) {
- throw new Error(
- `Invalid MultiAsset arguments. Expected length of 'amounts' (${
- amounts.length
- }) to equal length of 'nestedAssetData' (${nestedAssetData.length})`,
- );
- }
- _.forEach(nestedAssetData, assetDataElement => assetDataUtils.validateAssetDataOrThrow(assetDataElement));
- const abiEncoder = new AbiEncoder.Method(constants.MULTI_ASSET_METHOD_ABI);
- const args = [amounts, nestedAssetData];
- const assetData = abiEncoder.encode(args, encodingRules);
- return assetData;
- },
- /**
- * Decodes a MultiAsset assetData hex string into it's corresponding amounts and nestedAssetData
- * @param assetData Hex encoded assetData string to decode
- * @return An object containing the decoded amounts and nestedAssetData
- */
- decodeMultiAssetData(assetData: string): MultiAssetData {
- assetDataUtils.assertIsMultiAssetData(assetData);
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- const abiEncoder = new AbiEncoder.Method(constants.MULTI_ASSET_METHOD_ABI);
- const decodedAssetData = abiEncoder.decode(assetData, decodingRules);
- // TODO(abandeali1): fix return types for `AbiEncoder.Method.decode` so that we can remove type assertion
- const amounts = (decodedAssetData as any).amounts;
- const nestedAssetData = (decodedAssetData as any).nestedAssetData;
- if (amounts.length !== nestedAssetData.length) {
- throw new Error(
- `Invalid MultiAsset assetData. Expected length of 'amounts' (${
- amounts.length
- }) to equal length of 'nestedAssetData' (${nestedAssetData.length})`,
- );
- }
- return {
- assetProxyId,
- amounts,
- nestedAssetData,
- };
- },
- /**
- * Decodes a MultiAsset assetData hex string into it's corresponding amounts and decoded nestedAssetData elements (all nested elements are flattened)
- * @param assetData Hex encoded assetData string to decode
- * @return An object containing the decoded amounts and nestedAssetData
- */
- decodeMultiAssetDataRecursively(assetData: string): MultiAssetDataWithRecursiveDecoding {
- const decodedAssetData = assetDataUtils.decodeMultiAssetData(assetData);
- const amounts: any[] = [];
- const decodedNestedAssetData = _.map(
- decodedAssetData.nestedAssetData as string[],
- (nestedAssetDataElement, index) => {
- const decodedNestedAssetDataElement = assetDataUtils.decodeAssetDataOrThrow(nestedAssetDataElement);
- if (decodedNestedAssetDataElement.assetProxyId === AssetProxyId.MultiAsset) {
- const recursivelyDecodedAssetData = assetDataUtils.decodeMultiAssetDataRecursively(
- nestedAssetDataElement,
- );
- amounts.push(
- _.map(recursivelyDecodedAssetData.amounts, amountElement =>
- amountElement.times(decodedAssetData.amounts[index]),
- ),
- );
- return recursivelyDecodedAssetData.nestedAssetData;
- } else {
- amounts.push(decodedAssetData.amounts[index]);
- return decodedNestedAssetDataElement as SingleAssetData;
- }
- },
- );
- const flattenedAmounts = _.flattenDeep(amounts);
- const flattenedDecodedNestedAssetData = _.flattenDeep(decodedNestedAssetData);
- return {
- assetProxyId: decodedAssetData.assetProxyId,
- amounts: flattenedAmounts,
- // tslint:disable-next-line:no-unnecessary-type-assertion
- nestedAssetData: flattenedDecodedNestedAssetData as SingleAssetData[],
- };
- },
- /**
- * Decode and return the assetProxyId from the assetData
- * @param assetData Hex encoded assetData string to decode
- * @return The assetProxyId
- */
- decodeAssetProxyId(assetData: string): AssetProxyId {
- if (assetData.length < constants.SELECTOR_CHAR_LENGTH_WITH_PREFIX) {
- throw new Error(
- `Could not decode assetData. Expected length of encoded data to be at least 10. Got ${
- assetData.length
- }`,
- );
- }
- const assetProxyId = assetData.slice(0, constants.SELECTOR_CHAR_LENGTH_WITH_PREFIX);
- if (
- assetProxyId !== AssetProxyId.ERC20 &&
- assetProxyId !== AssetProxyId.ERC721 &&
- assetProxyId !== AssetProxyId.MultiAsset
- ) {
- throw new Error(`Invalid assetProxyId: ${assetProxyId}`);
- }
- return assetProxyId;
- },
- /**
- * Checks if the decoded asset data is valid ERC20 data
- * @param decodedAssetData The decoded asset data to check
- */
- isERC20AssetData(decodedAssetData: SingleAssetData | MultiAssetData): decodedAssetData is ERC20AssetData {
- return decodedAssetData.assetProxyId === AssetProxyId.ERC20;
- },
- /**
- * Checks if the decoded asset data is valid ERC721 data
- * @param decodedAssetData The decoded asset data to check
- */
- isERC721AssetData(decodedAssetData: SingleAssetData | MultiAssetData): decodedAssetData is ERC721AssetData {
- return decodedAssetData.assetProxyId === AssetProxyId.ERC721;
- },
- /**
- * Checks if the decoded asset data is valid MultiAsset data
- * @param decodedAssetData The decoded asset data to check
- */
- isMultiAssetData(decodedAssetData: SingleAssetData | MultiAssetData): decodedAssetData is MultiAssetData {
- return decodedAssetData.assetProxyId === AssetProxyId.MultiAsset;
- },
- /**
- * Throws if the length or assetProxyId are invalid for the ERC20Proxy.
- * @param assetData Hex encoded assetData string
- */
- assertIsERC20AssetData(assetData: string): void {
- if (assetData.length < constants.ERC20_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX) {
- throw new Error(
- `Could not decode ERC20 Proxy Data. Expected length of encoded data to be at least ${
- constants.ERC20_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX
- }. Got ${assetData.length}`,
- );
- }
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- if (assetProxyId !== AssetProxyId.ERC20) {
- throw new Error(
- `Could not decode ERC20 assetData. Expected assetProxyId to be ERC20 (${
- AssetProxyId.ERC20
- }), but got ${assetProxyId}`,
- );
- }
- },
- /**
- * Throws if the length or assetProxyId are invalid for the ERC721Proxy.
- * @param assetData Hex encoded assetData string
- */
- assertIsERC721AssetData(assetData: string): void {
- if (assetData.length < constants.ERC721_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX) {
- throw new Error(
- `Could not decode ERC721 assetData. Expected length of encoded data to be at least ${
- constants.ERC721_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX
- }. Got ${assetData.length}`,
- );
- }
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- if (assetProxyId !== AssetProxyId.ERC721) {
- throw new Error(
- `Could not decode ERC721 assetData. Expected assetProxyId to be ERC721 (${
- AssetProxyId.ERC721
- }), but got ${assetProxyId}`,
- );
- }
- },
- /**
- * Throws if the length or assetProxyId are invalid for the MultiAssetProxy.
- * @param assetData Hex encoded assetData string
- */
- assertIsMultiAssetData(assetData: string): void {
- if (assetData.length < constants.MULTI_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX) {
- throw new Error(
- `Could not decode MultiAsset assetData. Expected length of encoded data to be at least ${
- constants.MULTI_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX
- }. Got ${assetData.length}`,
- );
- }
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- if (assetProxyId !== AssetProxyId.MultiAsset) {
- throw new Error(
- `Could not decode MultiAsset assetData. Expected assetProxyId to be MultiAsset (${
- AssetProxyId.MultiAsset
- }), but got ${assetProxyId}`,
- );
- }
- },
- /**
- * Throws if the length or assetProxyId are invalid for the corresponding AssetProxy.
- * @param assetData Hex encoded assetData string
- */
- validateAssetDataOrThrow(assetData: string): void {
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- assetDataUtils.assertIsERC20AssetData(assetData);
- break;
- case AssetProxyId.ERC721:
- assetDataUtils.assertIsERC721AssetData(assetData);
- break;
- case AssetProxyId.MultiAsset:
- assetDataUtils.assertIsMultiAssetData(assetData);
- break;
- default:
- throw new Error(`Unrecognized asset proxy id: ${assetProxyId}`);
- }
- },
- /**
- * Decode any assetData into it's corresponding assetData object
- * @param assetData Hex encoded assetData string to decode
- * @return Either a ERC20 or ERC721 assetData object
- */
- decodeAssetDataOrThrow(assetData: string): SingleAssetData | MultiAssetData {
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- const erc20AssetData = assetDataUtils.decodeERC20AssetData(assetData);
- return erc20AssetData;
- case AssetProxyId.ERC721:
- const erc721AssetData = assetDataUtils.decodeERC721AssetData(assetData);
- return erc721AssetData;
- case AssetProxyId.MultiAsset:
- const multiAssetData = assetDataUtils.decodeMultiAssetData(assetData);
- return multiAssetData;
- default:
- throw new Error(`Unrecognized asset proxy id: ${assetProxyId}`);
- }
- },
-};
diff --git a/packages/order-utils/src/constants.ts b/packages/order-utils/src/constants.ts
deleted file mode 100644
index a9a687719..000000000
--- a/packages/order-utils/src/constants.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { MethodAbi } from 'ethereum-types';
-
-const ERC20_METHOD_ABI: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'tokenContract',
- type: 'address',
- },
- ],
- name: 'ERC20Token',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-const ERC721_METHOD_ABI: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'tokenContract',
- type: 'address',
- },
- {
- name: 'tokenId',
- type: 'uint256',
- },
- ],
- name: 'ERC721Token',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-const MULTI_ASSET_METHOD_ABI: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'amounts',
- type: 'uint256[]',
- },
- {
- name: 'nestedAssetData',
- type: 'bytes[]',
- },
- ],
- name: 'MultiAsset',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const constants = {
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- NULL_BYTES: '0x',
- NULL_ERC20_ASSET_DATA: '0xf47261b00000000000000000000000000000000000000000000000000000000000000000',
- // tslint:disable-next-line:custom-no-magic-numbers
- UNLIMITED_ALLOWANCE_IN_BASE_UNITS: new BigNumber(2).pow(256).minus(1),
- TESTRPC_NETWORK_ID: 50,
- ADDRESS_LENGTH: 20,
- ERC20_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX: 74,
- ERC721_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX: 136,
- MULTI_ASSET_DATA_MIN_CHAR_LENGTH_WITH_PREFIX: 266,
- SELECTOR_CHAR_LENGTH_WITH_PREFIX: 10,
- INFINITE_TIMESTAMP_SEC: new BigNumber(2524604400), // Close to infinite
- ZERO_AMOUNT: new BigNumber(0),
- EIP712_DOMAIN_NAME: '0x Protocol',
- EIP712_DOMAIN_VERSION: '2',
- EIP712_DOMAIN_SCHEMA: {
- name: 'EIP712Domain',
- parameters: [
- { name: 'name', type: 'string' },
- { name: 'version', type: 'string' },
- { name: 'verifyingContract', type: 'address' },
- ],
- },
- EIP712_ORDER_SCHEMA: {
- name: 'Order',
- parameters: [
- { 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' },
- ],
- },
- EIP712_ZEROEX_TRANSACTION_SCHEMA: {
- name: 'ZeroExTransaction',
- parameters: [
- { name: 'salt', type: 'uint256' },
- { name: 'signerAddress', type: 'address' },
- { name: 'data', type: 'bytes' },
- ],
- },
- ERC20_METHOD_ABI,
- ERC721_METHOD_ABI,
- MULTI_ASSET_METHOD_ABI,
-};
diff --git a/packages/order-utils/src/crypto.ts b/packages/order-utils/src/crypto.ts
deleted file mode 100644
index 8b835ff48..000000000
--- a/packages/order-utils/src/crypto.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import BN = require('bn.js');
-import ABI = require('ethereumjs-abi');
-import ethUtil = require('ethereumjs-util');
-import * as _ from 'lodash';
-
-export const crypto = {
- /**
- * We convert types from JS to Solidity as follows:
- * BigNumber -> uint256
- * number -> uint8
- * string -> string
- * boolean -> bool
- * valid Ethereum address -> address
- */
- solSHA3(args: any[]): Buffer {
- return crypto._solHash(args, ABI.soliditySHA3);
- },
- solSHA256(args: any[]): Buffer {
- return crypto._solHash(args, ABI.soliditySHA256);
- },
- _solHash(args: any[], hashFunction: (types: string[], values: any[]) => Buffer): Buffer {
- const argTypes: string[] = [];
- _.each(args, (arg, i) => {
- const isNumber = _.isFinite(arg);
- if (isNumber) {
- argTypes.push('uint8');
- } else if (BigNumber.isBigNumber(arg)) {
- argTypes.push('uint256');
- const base = 10;
- args[i] = new BN(arg.toString(base), base);
- } else if (ethUtil.isValidAddress(arg)) {
- argTypes.push('address');
- } else if (_.isString(arg)) {
- argTypes.push('string');
- } else if (_.isBuffer(arg) || _.isTypedArray(arg)) {
- argTypes.push('bytes');
- } else if (_.isBoolean(arg)) {
- argTypes.push('bool');
- } else {
- throw new Error(`Unable to guess arg type: ${arg}`);
- }
- });
- const hash = hashFunction(argTypes, args);
- return hash;
- },
-};
diff --git a/packages/order-utils/src/eip712_utils.ts b/packages/order-utils/src/eip712_utils.ts
deleted file mode 100644
index 385fda989..000000000
--- a/packages/order-utils/src/eip712_utils.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-import { assert } from '@0x/assert';
-import { schemas } from '@0x/json-schemas';
-import { EIP712Object, EIP712TypedData, EIP712Types, Order, ZeroExTransaction } from '@0x/types';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-
-export const eip712Utils = {
- /**
- * Creates a EIP712TypedData object specific to the 0x protocol for use with signTypedData.
- * @param primaryType The primary type found in message
- * @param types The additional types for the data in message
- * @param message The contents of the message
- * @param exchangeAddress The address of the exchange contract
- * @return A typed data object
- */
- createTypedData: (
- primaryType: string,
- types: EIP712Types,
- message: EIP712Object,
- exchangeAddress: string,
- ): EIP712TypedData => {
- assert.isETHAddressHex('exchangeAddress', exchangeAddress);
- assert.isString('primaryType', primaryType);
- const typedData = {
- types: {
- EIP712Domain: constants.EIP712_DOMAIN_SCHEMA.parameters,
- ...types,
- },
- domain: {
- name: constants.EIP712_DOMAIN_NAME,
- version: constants.EIP712_DOMAIN_VERSION,
- verifyingContract: exchangeAddress,
- },
- message,
- primaryType,
- };
- assert.doesConformToSchema('typedData', typedData, schemas.eip712TypedDataSchema);
- return typedData;
- },
- /**
- * Creates an Order EIP712TypedData object for use with signTypedData.
- * @param Order the order
- * @return A typed data object
- */
- createOrderTypedData: (order: Order): EIP712TypedData => {
- assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
- const normalizedOrder = _.mapValues(order, value => {
- return !_.isString(value) ? value.toString() : value;
- });
- const typedData = eip712Utils.createTypedData(
- constants.EIP712_ORDER_SCHEMA.name,
- { Order: constants.EIP712_ORDER_SCHEMA.parameters },
- normalizedOrder,
- order.exchangeAddress,
- );
- return typedData;
- },
- /**
- * Creates an ExecuteTransaction EIP712TypedData object for use with signTypedData and
- * 0x Exchange executeTransaction.
- * @param ZeroExTransaction the 0x transaction
- * @param exchangeAddress The address of the exchange contract
- * @return A typed data object
- */
- createZeroExTransactionTypedData: (
- zeroExTransaction: ZeroExTransaction,
- exchangeAddress: string,
- ): EIP712TypedData => {
- assert.isETHAddressHex('exchangeAddress', exchangeAddress);
- assert.doesConformToSchema('zeroExTransaction', zeroExTransaction, schemas.zeroExTransactionSchema);
- const normalizedTransaction = _.mapValues(zeroExTransaction, value => {
- return !_.isString(value) ? value.toString() : value;
- });
- const typedData = eip712Utils.createTypedData(
- constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.name,
- { ZeroExTransaction: constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.parameters },
- normalizedTransaction,
- exchangeAddress,
- );
- return typedData;
- },
-};
diff --git a/packages/order-utils/src/exchange_transfer_simulator.ts b/packages/order-utils/src/exchange_transfer_simulator.ts
deleted file mode 100644
index 922ae8e17..000000000
--- a/packages/order-utils/src/exchange_transfer_simulator.ts
+++ /dev/null
@@ -1,153 +0,0 @@
-import { AssetProxyId, ExchangeContractErrs } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { AbstractBalanceAndProxyAllowanceLazyStore } from './abstract/abstract_balance_and_proxy_allowance_lazy_store';
-import { assetDataUtils } from './asset_data_utils';
-import { constants } from './constants';
-import { TradeSide, TransferType } from './types';
-
-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,
- },
- },
-};
-
-/**
- * An exchange transfer simulator which simulates asset transfers exactly how the
- * 0x exchange contract would do them.
- */
-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);
- }
- /**
- * Instantiate a ExchangeTransferSimulator
- * @param store A class that implements AbstractBalanceAndProxyAllowanceLazyStore
- * @return an instance of ExchangeTransferSimulator
- */
- constructor(store: AbstractBalanceAndProxyAllowanceLazyStore) {
- this._store = store;
- }
- /**
- * Simulates transferFrom call performed by a proxy
- * @param assetData Data of the asset being transferred. Includes
- * it's identifying information and assetType,
- * e.g address for ERC20, address & tokenId for ERC721
- * @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(
- assetData: string,
- from: string,
- to: string,
- amountInBaseUnits: BigNumber,
- tradeSide: TradeSide,
- transferType: TransferType,
- ): Promise<void> {
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- case AssetProxyId.ERC721:
- // 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(assetData, to, amountInBaseUnits);
- return;
- }
- const balance = await this._store.getBalanceAsync(assetData, from);
- const proxyAllowance = await this._store.getProxyAllowanceAsync(assetData, from);
- if (proxyAllowance.isLessThan(amountInBaseUnits)) {
- ExchangeTransferSimulator._throwValidationError(
- FailureReason.ProxyAllowance,
- tradeSide,
- transferType,
- );
- }
- if (balance.isLessThan(amountInBaseUnits)) {
- ExchangeTransferSimulator._throwValidationError(FailureReason.Balance, tradeSide, transferType);
- }
- await this._decreaseProxyAllowanceAsync(assetData, from, amountInBaseUnits);
- await this._decreaseBalanceAsync(assetData, from, amountInBaseUnits);
- await this._increaseBalanceAsync(assetData, to, amountInBaseUnits);
- break;
- case AssetProxyId.MultiAsset:
- const decodedAssetData = assetDataUtils.decodeMultiAssetData(assetData);
- for (const [index, nestedAssetDataElement] of decodedAssetData.nestedAssetData.entries()) {
- const amountsElement = decodedAssetData.amounts[index];
- const totalAmount = amountInBaseUnits.times(amountsElement);
- await this.transferFromAsync(
- nestedAssetDataElement,
- from,
- to,
- totalAmount,
- tradeSide,
- transferType,
- );
- }
- break;
- default:
- break;
- }
- }
- private async _decreaseProxyAllowanceAsync(
- assetData: string,
- userAddress: string,
- amountInBaseUnits: BigNumber,
- ): Promise<void> {
- const proxyAllowance = await this._store.getProxyAllowanceAsync(assetData, userAddress);
- // HACK: This code assumes that all tokens with an UNLIMITED_ALLOWANCE_IN_BASE_UNITS set,
- // are UnlimitedAllowanceTokens. This is however not true, it just so happens that all
- // DummyERC20Tokens we use in tests are.
- if (!proxyAllowance.eq(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS)) {
- this._store.setProxyAllowance(assetData, userAddress, proxyAllowance.minus(amountInBaseUnits));
- }
- }
- private async _increaseBalanceAsync(
- assetData: string,
- userAddress: string,
- amountInBaseUnits: BigNumber,
- ): Promise<void> {
- const balance = await this._store.getBalanceAsync(assetData, userAddress);
- this._store.setBalance(assetData, userAddress, balance.plus(amountInBaseUnits));
- }
- private async _decreaseBalanceAsync(
- assetData: string,
- userAddress: string,
- amountInBaseUnits: BigNumber,
- ): Promise<void> {
- const balance = await this._store.getBalanceAsync(assetData, userAddress);
- this._store.setBalance(assetData, userAddress, balance.minus(amountInBaseUnits));
- }
-}
diff --git a/packages/order-utils/src/index.ts b/packages/order-utils/src/index.ts
deleted file mode 100644
index 2150a02e4..000000000
--- a/packages/order-utils/src/index.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-export { orderHashUtils } from './order_hash';
-export { signatureUtils } from './signature_utils';
-export { generatePseudoRandomSalt } from './salt';
-export { assetDataUtils } from './asset_data_utils';
-export { marketUtils } from './market_utils';
-export { rateUtils } from './rate_utils';
-export { sortingUtils } from './sorting_utils';
-export { orderParsingUtils } from './parsing_utils';
-
-export { OrderStateUtils } from './order_state_utils';
-export { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher';
-export { AbstractBalanceAndProxyAllowanceLazyStore } from './abstract/abstract_balance_and_proxy_allowance_lazy_store';
-export { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher';
-export { AbstractOrderFilledCancelledLazyStore } from './abstract/abstract_order_filled_cancelled_lazy_store';
-
-export { OrderValidationUtils } from './order_validation_utils';
-export { ExchangeTransferSimulator } from './exchange_transfer_simulator';
-export { BalanceAndProxyAllowanceLazyStore } from './store/balance_and_proxy_allowance_lazy_store';
-export { OrderFilledCancelledLazyStore } from './store/order_filled_cancelled_lazy_store';
-
-export { eip712Utils } from './eip712_utils';
-
-export {
- Provider,
- JSONRPCRequestPayload,
- JSONRPCErrorCallback,
- JSONRPCResponsePayload,
- JSONRPCResponseError,
-} from 'ethereum-types';
-
-export {
- SignedOrder,
- Order,
- OrderRelevantState,
- OrderState,
- ECSignature,
- SingleAssetData,
- ERC20AssetData,
- ERC721AssetData,
- MultiAssetData,
- MultiAssetDataWithRecursiveDecoding,
- AssetProxyId,
- SignatureType,
- ObjectMap,
- OrderStateValid,
- OrderStateInvalid,
- ExchangeContractErrs,
- EIP712Parameter,
- EIP712TypedData,
- EIP712Types,
- EIP712Object,
- EIP712ObjectValue,
- ZeroExTransaction,
-} from '@0x/types';
-export {
- OrderError,
- TradeSide,
- TransferType,
- FindFeeOrdersThatCoverFeesForTargetOrdersOpts,
- FindOrdersThatCoverMakerAssetFillAmountOpts,
- FeeOrdersAndRemainingFeeAmount,
- OrdersAndRemainingFillAmount,
-} from './types';
diff --git a/packages/order-utils/src/market_utils.ts b/packages/order-utils/src/market_utils.ts
deleted file mode 100644
index 9042551fa..000000000
--- a/packages/order-utils/src/market_utils.ts
+++ /dev/null
@@ -1,162 +0,0 @@
-import { schemas } from '@0x/json-schemas';
-import { Order } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { assert } from './assert';
-import { constants } from './constants';
-import {
- FeeOrdersAndRemainingFeeAmount,
- FindFeeOrdersThatCoverFeesForTargetOrdersOpts,
- FindOrdersThatCoverMakerAssetFillAmountOpts,
- OrdersAndRemainingFillAmount,
-} from './types';
-
-export const marketUtils = {
- /**
- * Takes an array of orders and returns a subset of those orders that has enough makerAssetAmount
- * in order to fill the input makerAssetFillAmount plus slippageBufferAmount. Iterates from first order to last order.
- * Sort the input by ascending rate in order to get the subset of orders that will cost the least ETH.
- * @param orders An array of objects that extend the Order interface. All orders should specify the same makerAsset.
- * All orders should specify WETH as the takerAsset.
- * @param makerAssetFillAmount The amount of makerAsset desired to be filled.
- * @param opts Optional arguments this function accepts.
- * @return Resulting orders and remaining fill amount that could not be covered by the input.
- */
- findOrdersThatCoverMakerAssetFillAmount<T extends Order>(
- orders: T[],
- makerAssetFillAmount: BigNumber,
- opts?: FindOrdersThatCoverMakerAssetFillAmountOpts,
- ): OrdersAndRemainingFillAmount<T> {
- assert.doesConformToSchema('orders', orders, schemas.ordersSchema);
- assert.isValidBaseUnitAmount('makerAssetFillAmount', makerAssetFillAmount);
- // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders
- const remainingFillableMakerAssetAmounts = _.get(
- opts,
- 'remainingFillableMakerAssetAmounts',
- _.map(orders, order => order.makerAssetAmount),
- ) as BigNumber[];
- _.forEach(remainingFillableMakerAssetAmounts, (amount, index) =>
- assert.isValidBaseUnitAmount(`remainingFillableMakerAssetAmount[${index}]`, amount),
- );
- assert.assert(
- orders.length === remainingFillableMakerAssetAmounts.length,
- 'Expected orders.length to equal opts.remainingFillableMakerAssetAmounts.length',
- );
- // try to get slippageBufferAmount from opts, if it's not there, default to 0
- const slippageBufferAmount = _.get(opts, 'slippageBufferAmount', constants.ZERO_AMOUNT) as BigNumber;
- assert.isValidBaseUnitAmount('opts.slippageBufferAmount', slippageBufferAmount);
- // calculate total amount of makerAsset needed to be filled
- const totalFillAmount = makerAssetFillAmount.plus(slippageBufferAmount);
- // iterate through the orders input from left to right until we have enough makerAsset to fill totalFillAmount
- const result = _.reduce(
- orders,
- ({ resultOrders, remainingFillAmount, ordersRemainingFillableMakerAssetAmounts }, order, index) => {
- if (remainingFillAmount.isLessThanOrEqualTo(constants.ZERO_AMOUNT)) {
- return {
- resultOrders,
- remainingFillAmount: constants.ZERO_AMOUNT,
- ordersRemainingFillableMakerAssetAmounts,
- };
- } else {
- const makerAssetAmountAvailable = remainingFillableMakerAssetAmounts[index];
- const shouldIncludeOrder = makerAssetAmountAvailable.gt(constants.ZERO_AMOUNT);
- // if there is no makerAssetAmountAvailable do not append order to resultOrders
- // if we have exceeded the total amount we want to fill set remainingFillAmount to 0
- return {
- resultOrders: shouldIncludeOrder ? _.concat(resultOrders, order) : resultOrders,
- ordersRemainingFillableMakerAssetAmounts: shouldIncludeOrder
- ? _.concat(ordersRemainingFillableMakerAssetAmounts, makerAssetAmountAvailable)
- : ordersRemainingFillableMakerAssetAmounts,
- remainingFillAmount: BigNumber.max(
- constants.ZERO_AMOUNT,
- remainingFillAmount.minus(makerAssetAmountAvailable),
- ),
- };
- }
- },
- {
- resultOrders: [] as T[],
- remainingFillAmount: totalFillAmount,
- ordersRemainingFillableMakerAssetAmounts: [] as BigNumber[],
- },
- );
- return result;
- },
- /**
- * Takes an array of orders and an array of feeOrders. Returns a subset of the feeOrders that has enough ZRX
- * in order to fill the takerFees required by orders plus a slippageBufferAmount.
- * Iterates from first feeOrder to last. Sort the feeOrders by ascending rate in order to get the subset of
- * feeOrders that will cost the least ETH.
- * @param orders An array of objects that extend the Order interface. All orders should specify ZRX as
- * the makerAsset and WETH as the takerAsset.
- * @param feeOrders An array of objects that extend the Order interface. All orders should specify ZRX as
- * the makerAsset and WETH as the takerAsset.
- * @param opts Optional arguments this function accepts.
- * @return Resulting orders and remaining fee amount that could not be covered by the input.
- */
- findFeeOrdersThatCoverFeesForTargetOrders<T extends Order>(
- orders: T[],
- feeOrders: T[],
- opts?: FindFeeOrdersThatCoverFeesForTargetOrdersOpts,
- ): FeeOrdersAndRemainingFeeAmount<T> {
- assert.doesConformToSchema('orders', orders, schemas.ordersSchema);
- assert.doesConformToSchema('feeOrders', feeOrders, schemas.ordersSchema);
- // try to get remainingFillableMakerAssetAmounts from opts, if it's not there, use makerAssetAmount values from orders
- const remainingFillableMakerAssetAmounts = _.get(
- opts,
- 'remainingFillableMakerAssetAmounts',
- _.map(orders, order => order.makerAssetAmount),
- ) as BigNumber[];
- _.forEach(remainingFillableMakerAssetAmounts, (amount, index) =>
- assert.isValidBaseUnitAmount(`remainingFillableMakerAssetAmount[${index}]`, amount),
- );
- assert.assert(
- orders.length === remainingFillableMakerAssetAmounts.length,
- 'Expected orders.length to equal opts.remainingFillableMakerAssetAmounts.length',
- );
- // try to get remainingFillableFeeAmounts from opts, if it's not there, use makerAssetAmount values from feeOrders
- const remainingFillableFeeAmounts = _.get(
- opts,
- 'remainingFillableFeeAmounts',
- _.map(feeOrders, order => order.makerAssetAmount),
- ) as BigNumber[];
- _.forEach(remainingFillableFeeAmounts, (amount, index) =>
- assert.isValidBaseUnitAmount(`remainingFillableFeeAmounts[${index}]`, amount),
- );
- assert.assert(
- feeOrders.length === remainingFillableFeeAmounts.length,
- 'Expected feeOrders.length to equal opts.remainingFillableFeeAmounts.length',
- );
- // try to get slippageBufferAmount from opts, if it's not there, default to 0
- const slippageBufferAmount = _.get(opts, 'slippageBufferAmount', constants.ZERO_AMOUNT) as BigNumber;
- assert.isValidBaseUnitAmount('opts.slippageBufferAmount', slippageBufferAmount);
- // calculate total amount of ZRX needed to fill orders
- const totalFeeAmount = _.reduce(
- orders,
- (accFees, order, index) => {
- const makerAssetAmountAvailable = remainingFillableMakerAssetAmounts[index];
- const feeToFillMakerAssetAmountAvailable = makerAssetAmountAvailable
- .multipliedBy(order.takerFee)
- .dividedToIntegerBy(order.makerAssetAmount);
- return accFees.plus(feeToFillMakerAssetAmountAvailable);
- },
- constants.ZERO_AMOUNT,
- );
- const {
- resultOrders,
- remainingFillAmount,
- ordersRemainingFillableMakerAssetAmounts,
- } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(feeOrders, totalFeeAmount, {
- remainingFillableMakerAssetAmounts: remainingFillableFeeAmounts,
- slippageBufferAmount,
- });
- return {
- resultFeeOrders: resultOrders,
- remainingFeeAmount: remainingFillAmount,
- feeOrdersRemainingFillableMakerAssetAmounts: ordersRemainingFillableMakerAssetAmounts,
- };
- // TODO: add more orders here to cover rounding
- // https://github.com/0xProject/0x-protocol-specification/blob/master/v2/forwarding-contract-specification.md#over-buying-zrx
- },
-};
diff --git a/packages/order-utils/src/order_factory.ts b/packages/order-utils/src/order_factory.ts
deleted file mode 100644
index f7b855bfb..000000000
--- a/packages/order-utils/src/order_factory.ts
+++ /dev/null
@@ -1,122 +0,0 @@
-import { Order, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-import { orderHashUtils } from './order_hash';
-import { generatePseudoRandomSalt } from './salt';
-import { signatureUtils } from './signature_utils';
-import { CreateOrderOpts } from './types';
-export const orderFactory = {
- createOrderFromPartial(partialOrder: Partial<Order>): Order {
- const defaultOrder = generateEmptyOrder();
- return {
- ...defaultOrder,
- ...partialOrder,
- };
- },
- createSignedOrderFromPartial(partialSignedOrder: Partial<SignedOrder>): SignedOrder {
- const defaultOrder = generateEmptySignedOrder();
- return {
- ...defaultOrder,
- ...partialSignedOrder,
- };
- },
- createOrder(
- makerAddress: string,
- makerAssetAmount: BigNumber,
- makerAssetData: string,
- takerAssetAmount: BigNumber,
- takerAssetData: string,
- exchangeAddress: string,
- createOrderOpts: CreateOrderOpts = generateDefaultCreateOrderOpts(),
- ): Order {
- const defaultCreateOrderOpts = generateDefaultCreateOrderOpts();
- const order = {
- makerAddress,
- makerAssetAmount,
- takerAssetAmount,
- makerAssetData,
- takerAssetData,
- exchangeAddress,
- takerAddress: createOrderOpts.takerAddress || defaultCreateOrderOpts.takerAddress,
- senderAddress: createOrderOpts.senderAddress || defaultCreateOrderOpts.senderAddress,
- makerFee: createOrderOpts.makerFee || defaultCreateOrderOpts.makerFee,
- takerFee: createOrderOpts.takerFee || defaultCreateOrderOpts.takerFee,
- feeRecipientAddress: createOrderOpts.feeRecipientAddress || defaultCreateOrderOpts.feeRecipientAddress,
- salt: createOrderOpts.salt || defaultCreateOrderOpts.salt,
- expirationTimeSeconds:
- createOrderOpts.expirationTimeSeconds || defaultCreateOrderOpts.expirationTimeSeconds,
- };
- return order;
- },
- async createSignedOrderAsync(
- provider: Provider,
- makerAddress: string,
- makerAssetAmount: BigNumber,
- makerAssetData: string,
- takerAssetAmount: BigNumber,
- takerAssetData: string,
- exchangeAddress: string,
- createOrderOpts?: CreateOrderOpts,
- ): Promise<SignedOrder> {
- const order = orderFactory.createOrder(
- makerAddress,
- makerAssetAmount,
- makerAssetData,
- takerAssetAmount,
- takerAssetData,
- exchangeAddress,
- createOrderOpts,
- );
- const orderHash = orderHashUtils.getOrderHashHex(order);
- const signature = await signatureUtils.ecSignHashAsync(provider, orderHash, makerAddress);
- const signedOrder: SignedOrder = _.assign(order, { signature });
- return signedOrder;
- },
-};
-
-function generateEmptySignedOrder(): SignedOrder {
- return {
- ...generateEmptyOrder(),
- signature: constants.NULL_BYTES,
- };
-}
-function generateEmptyOrder(): Order {
- return {
- senderAddress: constants.NULL_ADDRESS,
- makerAddress: constants.NULL_ADDRESS,
- takerAddress: constants.NULL_ADDRESS,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- makerAssetAmount: constants.ZERO_AMOUNT,
- takerAssetAmount: constants.ZERO_AMOUNT,
- makerAssetData: constants.NULL_BYTES,
- takerAssetData: constants.NULL_BYTES,
- salt: generatePseudoRandomSalt(),
- exchangeAddress: constants.NULL_ADDRESS,
- feeRecipientAddress: constants.NULL_ADDRESS,
- expirationTimeSeconds: constants.INFINITE_TIMESTAMP_SEC,
- };
-}
-
-function generateDefaultCreateOrderOpts(): {
- takerAddress: string;
- senderAddress: string;
- makerFee: BigNumber;
- takerFee: BigNumber;
- feeRecipientAddress: string;
- salt: BigNumber;
- expirationTimeSeconds: BigNumber;
-} {
- return {
- takerAddress: constants.NULL_ADDRESS,
- senderAddress: constants.NULL_ADDRESS,
- makerFee: constants.ZERO_AMOUNT,
- takerFee: constants.ZERO_AMOUNT,
- feeRecipientAddress: constants.NULL_ADDRESS,
- salt: generatePseudoRandomSalt(),
- expirationTimeSeconds: constants.INFINITE_TIMESTAMP_SEC,
- };
-}
diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts
deleted file mode 100644
index c8e9be71e..000000000
--- a/packages/order-utils/src/order_hash.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { schemas, SchemaValidator } from '@0x/json-schemas';
-import { Order, SignedOrder } from '@0x/types';
-import { signTypedDataUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { assert } from './assert';
-import { eip712Utils } from './eip712_utils';
-
-const INVALID_TAKER_FORMAT = 'instance.takerAddress is not of a type(s) string';
-
-export const orderHashUtils = {
- /**
- * Checks if the supplied hex encoded order hash is valid.
- * Note: Valid means it has the expected format, not that an order with the orderHash exists.
- * Use this method when processing orderHashes submitted as user input.
- * @param orderHash Hex encoded orderHash.
- * @return Whether the supplied orderHash has the expected format.
- */
- isValidOrderHash(orderHash: string): boolean {
- // Since this method can be called to check if any arbitrary string conforms to an orderHash's
- // format, we only assert that we were indeed passed a string.
- assert.isString('orderHash', orderHash);
- const schemaValidator = new SchemaValidator();
- const isValid = schemaValidator.validate(orderHash, schemas.orderHashSchema).valid;
- return isValid;
- },
- /**
- * Computes the orderHash for a supplied order.
- * @param order An object that conforms to the Order or SignedOrder interface definitions.
- * @return Hex encoded string orderHash from hashing the supplied order.
- */
- getOrderHashHex(order: SignedOrder | Order): string {
- try {
- assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
- } catch (error) {
- if (_.includes(error.message, INVALID_TAKER_FORMAT)) {
- const errMsg =
- 'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
- throw new Error(errMsg);
- }
- throw error;
- }
-
- const orderHashBuff = orderHashUtils.getOrderHashBuffer(order);
- const orderHashHex = `0x${orderHashBuff.toString('hex')}`;
- return orderHashHex;
- },
- /**
- * Computes the orderHash for a supplied order
- * @param order An object that conforms to the Order or SignedOrder interface definitions.
- * @return A Buffer containing the resulting orderHash from hashing the supplied order
- */
- getOrderHashBuffer(order: SignedOrder | Order): Buffer {
- const typedData = eip712Utils.createOrderTypedData(order);
- const orderHashBuff = signTypedDataUtils.generateTypedDataHash(typedData);
- return orderHashBuff;
- },
-};
diff --git a/packages/order-utils/src/order_state_utils.ts b/packages/order-utils/src/order_state_utils.ts
deleted file mode 100644
index 430178b5d..000000000
--- a/packages/order-utils/src/order_state_utils.ts
+++ /dev/null
@@ -1,346 +0,0 @@
-import {
- ExchangeContractErrs,
- ObjectMap,
- OrderRelevantState,
- OrderState,
- OrderStateInvalid,
- OrderStateValid,
- SignedOrder,
-} from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { AbstractBalanceAndProxyAllowanceFetcher } from './abstract/abstract_balance_and_proxy_allowance_fetcher';
-import { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher';
-import { assetDataUtils } from './asset_data_utils';
-import { orderHashUtils } from './order_hash';
-import { OrderValidationUtils } from './order_validation_utils';
-import { RemainingFillableCalculator } from './remaining_fillable_calculator';
-import { utils } from './utils';
-
-interface SidedOrderRelevantState {
- isMakerSide: boolean;
- traderBalance: BigNumber;
- traderIndividualBalances: ObjectMap<BigNumber>;
- traderProxyAllowance: BigNumber;
- traderIndividualProxyAllowances: ObjectMap<BigNumber>;
- traderFeeBalance: BigNumber;
- traderFeeProxyAllowance: BigNumber;
- filledTakerAssetAmount: BigNumber;
- remainingFillableAssetAmount: BigNumber;
- isOrderCancelled: boolean;
-}
-interface OrderValidResult {
- isValid: true;
-}
-interface OrderInvalidResult {
- isValid: false;
- error: ExchangeContractErrs;
-}
-type OrderValidationResult = OrderValidResult | OrderInvalidResult;
-
-export class OrderStateUtils {
- private readonly _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
- private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
- private static _validateIfOrderIsValid(
- signedOrder: SignedOrder,
- sidedOrderRelevantState: SidedOrderRelevantState,
- ): OrderValidationResult {
- const isMakerSide = sidedOrderRelevantState.isMakerSide;
- if (sidedOrderRelevantState.isOrderCancelled) {
- return { isValid: false, error: ExchangeContractErrs.OrderCancelled };
- }
- const availableTakerAssetAmount = signedOrder.takerAssetAmount.minus(
- sidedOrderRelevantState.filledTakerAssetAmount,
- );
- if (availableTakerAssetAmount.eq(0)) {
- return { isValid: false, error: ExchangeContractErrs.OrderRemainingFillAmountZero };
- }
-
- if (sidedOrderRelevantState.traderBalance.eq(0)) {
- const error = isMakerSide
- ? ExchangeContractErrs.InsufficientMakerBalance
- : ExchangeContractErrs.InsufficientTakerBalance;
- return { isValid: false, error };
- }
- if (sidedOrderRelevantState.traderProxyAllowance.eq(0)) {
- const error = isMakerSide
- ? ExchangeContractErrs.InsufficientMakerAllowance
- : ExchangeContractErrs.InsufficientTakerAllowance;
- return { isValid: false, error };
- }
- if (!signedOrder.makerFee.eq(0)) {
- if (sidedOrderRelevantState.traderFeeBalance.eq(0)) {
- const error = isMakerSide
- ? ExchangeContractErrs.InsufficientMakerFeeBalance
- : ExchangeContractErrs.InsufficientTakerFeeBalance;
- return { isValid: false, error };
- }
- if (sidedOrderRelevantState.traderFeeProxyAllowance.eq(0)) {
- const error = isMakerSide
- ? ExchangeContractErrs.InsufficientMakerFeeAllowance
- : ExchangeContractErrs.InsufficientTakerFeeAllowance;
- return { isValid: false, error };
- }
- }
- const remainingTakerAssetAmount = signedOrder.takerAssetAmount.minus(
- sidedOrderRelevantState.filledTakerAssetAmount,
- );
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(
- remainingTakerAssetAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerAssetAmount,
- );
- if (isRoundingError) {
- return { isValid: false, error: ExchangeContractErrs.OrderFillRoundingError };
- }
- return { isValid: true };
- }
- /**
- * Instantiate OrderStateUtils
- * @param balanceAndProxyAllowanceFetcher A class that is capable of fetching balances
- * and proxyAllowances for Ethereum addresses. It must implement AbstractBalanceAndProxyAllowanceFetcher
- * @param orderFilledCancelledFetcher A class that is capable of fetching whether an order
- * is cancelled and how much of it has been filled. It must implement AbstractOrderFilledCancelledFetcher
- * @return Instance of OrderStateUtils
- */
- constructor(
- balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher,
- orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher,
- ) {
- this._balanceAndProxyAllowanceFetcher = balanceAndProxyAllowanceFetcher;
- this._orderFilledCancelledFetcher = orderFilledCancelledFetcher;
- }
- /**
- * Get the orderState for an "open" order (i.e where takerAddress=NULL_ADDRESS)
- * This method will only check the maker's balance/allowance to calculate the
- * OrderState.
- * @param signedOrder The order of interest
- * @return State relevant to the signedOrder, as well as whether the signedOrder is "valid".
- * Validity is defined as a non-zero amount of the order can still be filled.
- */
- public async getOpenOrderStateAsync(signedOrder: SignedOrder, transactionHash?: string): Promise<OrderState> {
- const orderRelevantState = await this.getOpenOrderRelevantStateAsync(signedOrder);
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const isOrderCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(signedOrder);
- const sidedOrderRelevantState = {
- isMakerSide: true,
- traderBalance: orderRelevantState.makerBalance,
- traderIndividualBalances: orderRelevantState.makerIndividualBalances,
- traderProxyAllowance: orderRelevantState.makerProxyAllowance,
- traderIndividualProxyAllowances: orderRelevantState.makerIndividualProxyAllowances,
- traderFeeBalance: orderRelevantState.makerFeeBalance,
- traderFeeProxyAllowance: orderRelevantState.makerFeeProxyAllowance,
- filledTakerAssetAmount: orderRelevantState.filledTakerAssetAmount,
- remainingFillableAssetAmount: orderRelevantState.remainingFillableMakerAssetAmount,
- isOrderCancelled,
- };
- const orderValidationResult = OrderStateUtils._validateIfOrderIsValid(signedOrder, sidedOrderRelevantState);
- if (orderValidationResult.isValid) {
- const orderState: OrderStateValid = {
- isValid: true,
- orderHash,
- orderRelevantState,
- transactionHash,
- };
- return orderState;
- } else {
- const orderState: OrderStateInvalid = {
- isValid: false,
- orderHash,
- error: orderValidationResult.error,
- transactionHash,
- };
- return orderState;
- }
- }
- /**
- * Get state relevant to an order (i.e makerBalance, makerAllowance, filledTakerAssetAmount, etc...
- * @param signedOrder Order of interest
- * @return An instance of OrderRelevantState
- */
- public async getOpenOrderRelevantStateAsync(signedOrder: SignedOrder): Promise<OrderRelevantState> {
- const isMaker = true;
- const sidedOrderRelevantState = await this._getSidedOrderRelevantStateAsync(
- isMaker,
- signedOrder,
- signedOrder.takerAddress,
- );
- const remainingFillableTakerAssetAmount = sidedOrderRelevantState.remainingFillableAssetAmount
- .times(signedOrder.takerAssetAmount)
- .dividedToIntegerBy(signedOrder.makerAssetAmount);
-
- const orderRelevantState = {
- makerBalance: sidedOrderRelevantState.traderBalance,
- makerIndividualBalances: sidedOrderRelevantState.traderIndividualBalances,
- makerProxyAllowance: sidedOrderRelevantState.traderProxyAllowance,
- makerIndividualProxyAllowances: sidedOrderRelevantState.traderIndividualProxyAllowances,
- makerFeeBalance: sidedOrderRelevantState.traderFeeBalance,
- makerFeeProxyAllowance: sidedOrderRelevantState.traderFeeProxyAllowance,
- filledTakerAssetAmount: sidedOrderRelevantState.filledTakerAssetAmount,
- remainingFillableMakerAssetAmount: sidedOrderRelevantState.remainingFillableAssetAmount,
- remainingFillableTakerAssetAmount,
- };
- return orderRelevantState;
- }
- /**
- * Get the max amount of the supplied order's takerAmount that could still be filled
- * @param signedOrder Order of interest
- * @param takerAddress Hypothetical taker of the order
- * @return fillableTakerAssetAmount
- */
- public async getMaxFillableTakerAssetAmountAsync(
- signedOrder: SignedOrder,
- takerAddress: string,
- ): Promise<BigNumber> {
- // Get max fillable amount for an order, considering the makers ability to fill
- let isMaker = true;
- const orderRelevantMakerState = await this._getSidedOrderRelevantStateAsync(
- isMaker,
- signedOrder,
- signedOrder.takerAddress,
- );
- const remainingFillableTakerAssetAmountGivenMakersStatus = signedOrder.makerAssetAmount.eq(0)
- ? new BigNumber(0)
- : utils.getPartialAmountFloor(
- orderRelevantMakerState.remainingFillableAssetAmount,
- signedOrder.makerAssetAmount,
- signedOrder.takerAssetAmount,
- );
-
- // Get max fillable amount for an order, considering the takers ability to fill
- isMaker = false;
- const orderRelevantTakerState = await this._getSidedOrderRelevantStateAsync(isMaker, signedOrder, takerAddress);
- const remainingFillableTakerAssetAmountGivenTakersStatus = orderRelevantTakerState.remainingFillableAssetAmount;
-
- // The min of these two in the actualy max fillable by either party
- const fillableTakerAssetAmount = BigNumber.min(
- remainingFillableTakerAssetAmountGivenMakersStatus,
- remainingFillableTakerAssetAmountGivenTakersStatus,
- );
-
- return fillableTakerAssetAmount;
- }
- private async _getSidedOrderRelevantStateAsync(
- isMakerSide: boolean,
- signedOrder: SignedOrder,
- takerAddress: string,
- ): Promise<SidedOrderRelevantState> {
- let traderAddress;
- let assetData;
- let assetAmount;
- let feeAmount;
- if (isMakerSide) {
- traderAddress = signedOrder.makerAddress;
- assetData = signedOrder.makerAssetData;
- assetAmount = signedOrder.makerAssetAmount;
- feeAmount = signedOrder.makerFee;
- } else {
- traderAddress = takerAddress;
- assetData = signedOrder.takerAssetData;
- assetAmount = signedOrder.takerAssetAmount;
- feeAmount = signedOrder.takerFee;
- }
- const zrxAssetData = this._orderFilledCancelledFetcher.getZRXAssetData();
- const isAssetZRX = assetData === zrxAssetData;
-
- const traderBalance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync(assetData, traderAddress);
- const traderIndividualBalances = await this._getAssetBalancesAsync(assetData, traderAddress);
- const traderProxyAllowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync(
- assetData,
- traderAddress,
- );
- const traderIndividualProxyAllowances = await this._getAssetProxyAllowancesAsync(assetData, traderAddress);
- const traderFeeBalance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync(
- zrxAssetData,
- traderAddress,
- );
- const traderFeeProxyAllowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync(
- zrxAssetData,
- traderAddress,
- );
-
- const transferrableTraderAssetAmount = BigNumber.min(traderProxyAllowance, traderBalance);
- const transferrableFeeAssetAmount = BigNumber.min(traderFeeProxyAllowance, traderFeeBalance);
-
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const filledTakerAssetAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash);
- const totalMakerAssetAmount = signedOrder.makerAssetAmount;
- const totalTakerAssetAmount = signedOrder.takerAssetAmount;
- const isOrderCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(signedOrder);
- const remainingTakerAssetAmount = isOrderCancelled
- ? new BigNumber(0)
- : totalTakerAssetAmount.minus(filledTakerAssetAmount);
- const remainingMakerAssetAmount = remainingTakerAssetAmount.eq(0)
- ? new BigNumber(0)
- : remainingTakerAssetAmount.times(totalMakerAssetAmount).dividedToIntegerBy(totalTakerAssetAmount);
- const remainingAssetAmount = isMakerSide ? remainingMakerAssetAmount : remainingTakerAssetAmount;
-
- const remainingFillableCalculator = new RemainingFillableCalculator(
- feeAmount,
- assetAmount,
- isAssetZRX,
- transferrableTraderAssetAmount,
- transferrableFeeAssetAmount,
- remainingAssetAmount,
- );
- const remainingFillableAssetAmount = remainingFillableCalculator.computeRemainingFillable();
-
- const sidedOrderRelevantState = {
- isMakerSide,
- traderBalance,
- traderIndividualBalances,
- traderProxyAllowance,
- traderIndividualProxyAllowances,
- traderFeeBalance,
- traderFeeProxyAllowance,
- filledTakerAssetAmount,
- remainingFillableAssetAmount,
- isOrderCancelled,
- };
- return sidedOrderRelevantState;
- }
- private async _getAssetBalancesAsync(
- assetData: string,
- traderAddress: string,
- initialBalances: ObjectMap<BigNumber> = {},
- ): Promise<ObjectMap<BigNumber>> {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- let balances: ObjectMap<BigNumber> = { ...initialBalances };
- if (assetDataUtils.isERC20AssetData(decodedAssetData) || assetDataUtils.isERC721AssetData(decodedAssetData)) {
- const balance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync(assetData, traderAddress);
- const tokenAddress = decodedAssetData.tokenAddress;
- balances[tokenAddress] = _.isUndefined(initialBalances[tokenAddress])
- ? balance
- : balances[tokenAddress].plus(balance);
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- for (const assetDataElement of decodedAssetData.nestedAssetData) {
- balances = await this._getAssetBalancesAsync(assetDataElement, traderAddress, balances);
- }
- }
- return balances;
- }
- private async _getAssetProxyAllowancesAsync(
- assetData: string,
- traderAddress: string,
- initialAllowances: ObjectMap<BigNumber> = {},
- ): Promise<ObjectMap<BigNumber>> {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- let allowances: ObjectMap<BigNumber> = { ...initialAllowances };
- if (assetDataUtils.isERC20AssetData(decodedAssetData) || assetDataUtils.isERC721AssetData(decodedAssetData)) {
- const allowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync(
- assetData,
- traderAddress,
- );
- const tokenAddress = decodedAssetData.tokenAddress;
- allowances[tokenAddress] = _.isUndefined(initialAllowances[tokenAddress])
- ? allowance
- : allowances[tokenAddress].plus(allowance);
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- for (const assetDataElement of decodedAssetData.nestedAssetData) {
- allowances = await this._getAssetBalancesAsync(assetDataElement, traderAddress, allowances);
- }
- }
- return allowances;
- }
-}
diff --git a/packages/order-utils/src/order_validation_utils.ts b/packages/order-utils/src/order_validation_utils.ts
deleted file mode 100644
index 95215d918..000000000
--- a/packages/order-utils/src/order_validation_utils.ts
+++ /dev/null
@@ -1,257 +0,0 @@
-import { ExchangeContractErrs, RevertReason, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { OrderError, TradeSide, TransferType } from './types';
-
-import { AbstractOrderFilledCancelledFetcher } from './abstract/abstract_order_filled_cancelled_fetcher';
-import { constants } from './constants';
-import { ExchangeTransferSimulator } from './exchange_transfer_simulator';
-import { orderHashUtils } from './order_hash';
-import { signatureUtils } from './signature_utils';
-import { utils } from './utils';
-
-/**
- * A utility class for validating orders
- */
-export class OrderValidationUtils {
- private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
- private readonly _provider: Provider;
- /**
- * A Typescript implementation mirroring the implementation of isRoundingError in the
- * Exchange smart contract
- * @param numerator Numerator value. When used to check an order, pass in `takerAssetFilledAmount`
- * @param denominator Denominator value. When used to check an order, pass in `order.takerAssetAmount`
- * @param target Target value. When used to check an order, pass in `order.makerAssetAmount`
- */
- public static isRoundingErrorFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): boolean {
- // Solidity's mulmod() in JS
- // Source: https://solidity.readthedocs.io/en/latest/units-and-global-variables.html#mathematical-and-cryptographic-functions
- if (denominator.eq(0)) {
- throw new Error('denominator cannot be 0');
- }
- const remainder = target.multipliedBy(numerator).mod(denominator);
- if (remainder.eq(0)) {
- return false; // no rounding error
- }
-
- // tslint:disable-next-line:custom-no-magic-numbers
- const errPercentageTimes1000000 = remainder.multipliedBy(1000000).div(numerator.multipliedBy(target));
- // tslint:disable-next-line:custom-no-magic-numbers
- const isError = errPercentageTimes1000000.gt(1000);
- return isError;
- }
- /**
- * Validate that the maker & taker have sufficient balances/allowances
- * to fill the supplied order to the fillTakerAssetAmount amount
- * @param exchangeTradeEmulator ExchangeTradeEmulator to use
- * @param signedOrder SignedOrder to test
- * @param fillTakerAssetAmount Amount of takerAsset to fill the signedOrder
- * @param senderAddress Sender of the fillOrder tx
- * @param zrxAssetData AssetData for the ZRX token
- */
- public static async validateFillOrderBalancesAllowancesThrowIfInvalidAsync(
- exchangeTradeEmulator: ExchangeTransferSimulator,
- signedOrder: SignedOrder,
- fillTakerAssetAmount: BigNumber,
- senderAddress: string,
- zrxAssetData: string,
- ): Promise<void> {
- const fillMakerTokenAmount = utils.getPartialAmountFloor(
- fillTakerAssetAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerAssetAmount,
- );
- await exchangeTradeEmulator.transferFromAsync(
- signedOrder.makerAssetData,
- signedOrder.makerAddress,
- senderAddress,
- fillMakerTokenAmount,
- TradeSide.Maker,
- TransferType.Trade,
- );
- await exchangeTradeEmulator.transferFromAsync(
- signedOrder.takerAssetData,
- senderAddress,
- signedOrder.makerAddress,
- fillTakerAssetAmount,
- TradeSide.Taker,
- TransferType.Trade,
- );
- const makerFeeAmount = utils.getPartialAmountFloor(
- fillTakerAssetAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerFee,
- );
- await exchangeTradeEmulator.transferFromAsync(
- zrxAssetData,
- signedOrder.makerAddress,
- signedOrder.feeRecipientAddress,
- makerFeeAmount,
- TradeSide.Maker,
- TransferType.Fee,
- );
- const takerFeeAmount = utils.getPartialAmountFloor(
- fillTakerAssetAmount,
- signedOrder.takerAssetAmount,
- signedOrder.takerFee,
- );
- await exchangeTradeEmulator.transferFromAsync(
- zrxAssetData,
- senderAddress,
- signedOrder.feeRecipientAddress,
- takerFeeAmount,
- TradeSide.Taker,
- TransferType.Fee,
- );
- }
- private static _validateOrderNotExpiredOrThrow(expirationTimeSeconds: BigNumber): void {
- const currentUnixTimestampSec = utils.getCurrentUnixTimestampSec();
- if (expirationTimeSeconds.isLessThan(currentUnixTimestampSec)) {
- throw new Error(RevertReason.OrderUnfillable);
- }
- }
- /**
- * Instantiate OrderValidationUtils
- * @param orderFilledCancelledFetcher A module that implements the AbstractOrderFilledCancelledFetcher
- * @return An instance of OrderValidationUtils
- */
- constructor(orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher, provider: Provider) {
- this._orderFilledCancelledFetcher = orderFilledCancelledFetcher;
- this._provider = provider;
- }
- // TODO(fabio): remove this method once the smart contracts have been refactored
- // to return helpful revert reasons instead of ORDER_UNFILLABLE. Instruct devs
- // to make "calls" to validate order fillability + getOrderInfo for fillable amount.
- /**
- * Validate if the supplied order is fillable, and throw if it isn't
- * @param exchangeTradeEmulator ExchangeTradeEmulator instance
- * @param signedOrder SignedOrder of interest
- * @param zrxAssetData ZRX assetData
- * @param expectedFillTakerTokenAmount If supplied, this call will make sure this amount is fillable.
- * If it isn't supplied, we check if the order is fillable for a non-zero amount
- */
- public async validateOrderFillableOrThrowAsync(
- exchangeTradeEmulator: ExchangeTransferSimulator,
- signedOrder: SignedOrder,
- zrxAssetData: string,
- expectedFillTakerTokenAmount?: BigNumber,
- ): Promise<void> {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const isValidSignature = await signatureUtils.isValidSignatureAsync(
- this._provider,
- orderHash,
- signedOrder.signature,
- signedOrder.makerAddress,
- );
- if (!isValidSignature) {
- throw new Error(RevertReason.InvalidOrderSignature);
- }
-
- const isCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(signedOrder);
- if (isCancelled) {
- throw new Error('CANCELLED');
- }
- const filledTakerTokenAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash);
- if (signedOrder.takerAssetAmount.eq(filledTakerTokenAmount)) {
- throw new Error('FULLY_FILLED');
- }
- try {
- OrderValidationUtils._validateOrderNotExpiredOrThrow(signedOrder.expirationTimeSeconds);
- } catch (err) {
- throw new Error('EXPIRED');
- }
- let fillTakerAssetAmount = signedOrder.takerAssetAmount.minus(filledTakerTokenAmount);
- if (!_.isUndefined(expectedFillTakerTokenAmount)) {
- fillTakerAssetAmount = expectedFillTakerTokenAmount;
- }
- await OrderValidationUtils.validateFillOrderBalancesAllowancesThrowIfInvalidAsync(
- exchangeTradeEmulator,
- signedOrder,
- fillTakerAssetAmount,
- signedOrder.takerAddress,
- zrxAssetData,
- );
- }
- /**
- * Validate a call to FillOrder and throw if it wouldn't succeed
- * @param exchangeTradeEmulator ExchangeTradeEmulator to use
- * @param provider Web3 provider to use for JSON RPC requests
- * @param signedOrder SignedOrder of interest
- * @param fillTakerAssetAmount Amount we'd like to fill the order for
- * @param takerAddress The taker of the order
- * @param zrxAssetData ZRX asset data
- */
- public async validateFillOrderThrowIfInvalidAsync(
- exchangeTradeEmulator: ExchangeTransferSimulator,
- provider: Provider,
- signedOrder: SignedOrder,
- fillTakerAssetAmount: BigNumber,
- takerAddress: string,
- zrxAssetData: string,
- ): Promise<BigNumber> {
- if (signedOrder.makerAssetAmount.eq(0) || signedOrder.takerAssetAmount.eq(0)) {
- throw new Error(RevertReason.OrderUnfillable);
- }
- if (fillTakerAssetAmount.eq(0)) {
- throw new Error(RevertReason.InvalidTakerAmount);
- }
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const isValid = await signatureUtils.isValidSignatureAsync(
- provider,
- orderHash,
- signedOrder.signature,
- signedOrder.makerAddress,
- );
- if (!isValid) {
- throw new Error(OrderError.InvalidSignature);
- }
- const filledTakerTokenAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash);
- if (signedOrder.takerAssetAmount.eq(filledTakerTokenAmount)) {
- throw new Error(RevertReason.OrderUnfillable);
- }
- if (signedOrder.takerAddress !== constants.NULL_ADDRESS && signedOrder.takerAddress !== takerAddress) {
- throw new Error(RevertReason.InvalidTaker);
- }
- OrderValidationUtils._validateOrderNotExpiredOrThrow(signedOrder.expirationTimeSeconds);
- const remainingTakerTokenAmount = signedOrder.takerAssetAmount.minus(filledTakerTokenAmount);
- const desiredFillTakerTokenAmount = remainingTakerTokenAmount.isLessThan(fillTakerAssetAmount)
- ? remainingTakerTokenAmount
- : fillTakerAssetAmount;
- try {
- await OrderValidationUtils.validateFillOrderBalancesAllowancesThrowIfInvalidAsync(
- exchangeTradeEmulator,
- signedOrder,
- desiredFillTakerTokenAmount,
- takerAddress,
- zrxAssetData,
- );
- } catch (err) {
- const transferFailedErrorMessages = [
- ExchangeContractErrs.InsufficientMakerBalance,
- ExchangeContractErrs.InsufficientMakerFeeBalance,
- ExchangeContractErrs.InsufficientTakerBalance,
- ExchangeContractErrs.InsufficientTakerFeeBalance,
- ExchangeContractErrs.InsufficientMakerAllowance,
- ExchangeContractErrs.InsufficientMakerFeeAllowance,
- ExchangeContractErrs.InsufficientTakerAllowance,
- ExchangeContractErrs.InsufficientTakerFeeAllowance,
- ];
- if (_.includes(transferFailedErrorMessages, err.message)) {
- throw new Error(RevertReason.TransferFailed);
- }
- throw err;
- }
-
- const wouldRoundingErrorOccur = OrderValidationUtils.isRoundingErrorFloor(
- desiredFillTakerTokenAmount,
- signedOrder.takerAssetAmount,
- signedOrder.makerAssetAmount,
- );
- if (wouldRoundingErrorOccur) {
- throw new Error(RevertReason.RoundingError);
- }
- return filledTakerTokenAmount;
- }
-}
diff --git a/packages/order-utils/src/parsing_utils.ts b/packages/order-utils/src/parsing_utils.ts
deleted file mode 100644
index 98c6899fe..000000000
--- a/packages/order-utils/src/parsing_utils.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-export const orderParsingUtils = {
- convertStringsFieldsToBigNumbers(obj: any, fields: string[]): any {
- const result = _.assign({}, obj);
- _.each(fields, field => {
- _.update(result, field, (value: string) => {
- if (_.isUndefined(value)) {
- throw new Error(`Could not find field '${field}' while converting string fields to BigNumber.`);
- }
- return new BigNumber(value);
- });
- });
- return result;
- },
- convertOrderStringFieldsToBigNumber(order: any): any {
- return orderParsingUtils.convertStringsFieldsToBigNumbers(order, [
- 'makerAssetAmount',
- 'takerAssetAmount',
- 'makerFee',
- 'takerFee',
- 'expirationTimeSeconds',
- 'salt',
- ]);
- },
-};
diff --git a/packages/order-utils/src/rate_utils.ts b/packages/order-utils/src/rate_utils.ts
deleted file mode 100644
index dacdbd5a2..000000000
--- a/packages/order-utils/src/rate_utils.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { schemas } from '@0x/json-schemas';
-import { Order } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { assert } from './assert';
-import { constants } from './constants';
-
-export const rateUtils = {
- /**
- * Takes an order and calculates the fee adjusted rate (takerAsset/makerAsset) by calculating how much takerAsset
- * is required to cover the fees (feeRate * takerFee), adding the takerAssetAmount and dividing by makerAssetAmount
- * @param order An object that conforms to the order interface
- * @param feeRate The market rate of ZRX denominated in takerAssetAmount
- * (ex. feeRate is 0.1 takerAsset/ZRX if it takes 1 unit of takerAsset to buy 10 ZRX)
- * Defaults to 0
- * @return The rate (takerAsset/makerAsset) of the order adjusted for fees
- */
- getFeeAdjustedRateOfOrder(order: Order, feeRate: BigNumber = constants.ZERO_AMOUNT): BigNumber {
- assert.doesConformToSchema('order', order, schemas.orderSchema);
- assert.isBigNumber('feeRate', feeRate);
- assert.assert(
- feeRate.gte(constants.ZERO_AMOUNT),
- `Expected feeRate: ${feeRate} to be greater than or equal to 0`,
- );
- const takerAssetAmountNeededToPayForFees = order.takerFee.multipliedBy(feeRate);
- const totalTakerAssetAmount = takerAssetAmountNeededToPayForFees.plus(order.takerAssetAmount);
- const rate = totalTakerAssetAmount.div(order.makerAssetAmount);
- return rate;
- },
- /**
- * Takes a fee order (makerAssetData corresponds to ZRX and takerAssetData corresponds to WETH) and calculates
- * the fee adjusted rate (WETH/ZRX) by dividing the takerAssetAmount by the makerAmount minus the takerFee
- * @param feeOrder An object that conforms to the order interface
- * @return The rate (WETH/ZRX) of the fee order adjusted for fees
- */
- getFeeAdjustedRateOfFeeOrder(feeOrder: Order): BigNumber {
- assert.doesConformToSchema('feeOrder', feeOrder, schemas.orderSchema);
- const zrxAmountAfterFees = feeOrder.makerAssetAmount.minus(feeOrder.takerFee);
- assert.assert(
- zrxAmountAfterFees.isGreaterThan(constants.ZERO_AMOUNT),
- `Expected takerFee: ${JSON.stringify(feeOrder.takerFee)} to be less than makerAssetAmount: ${JSON.stringify(
- feeOrder.makerAssetAmount,
- )}`,
- );
- const rate = feeOrder.takerAssetAmount.div(zrxAmountAfterFees);
- return rate;
- },
-};
diff --git a/packages/order-utils/src/remaining_fillable_calculator.ts b/packages/order-utils/src/remaining_fillable_calculator.ts
deleted file mode 100644
index 92ffc8e80..000000000
--- a/packages/order-utils/src/remaining_fillable_calculator.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export class RemainingFillableCalculator {
- private readonly _isTraderAssetZRX: boolean;
- // Transferrable Amount is the minimum of Approval and Balance
- private readonly _transferrableAssetAmount: BigNumber;
- private readonly _transferrableFeeAmount: BigNumber;
- private readonly _remainingOrderAssetAmount: BigNumber;
- private readonly _remainingOrderFeeAmount: BigNumber;
- private readonly _orderFee: BigNumber;
- private readonly _orderAssetAmount: BigNumber;
- constructor(
- orderFee: BigNumber,
- orderAssetAmount: BigNumber,
- isTraderAssetZRX: boolean,
- transferrableAssetAmount: BigNumber,
- transferrableFeeAmount: BigNumber,
- remainingOrderAssetAmount: BigNumber,
- ) {
- this._orderFee = orderFee;
- this._orderAssetAmount = orderAssetAmount;
- this._isTraderAssetZRX = isTraderAssetZRX;
- this._transferrableAssetAmount = transferrableAssetAmount;
- this._transferrableFeeAmount = transferrableFeeAmount;
- this._remainingOrderAssetAmount = remainingOrderAssetAmount;
- this._remainingOrderFeeAmount = orderAssetAmount.eq(0)
- ? new BigNumber(0)
- : remainingOrderAssetAmount.times(orderFee).dividedToIntegerBy(orderAssetAmount);
- }
- public computeRemainingFillable(): BigNumber {
- if (this._hasSufficientFundsForFeeAndTransferAmount()) {
- return this._remainingOrderAssetAmount;
- }
- if (this._orderFee.isZero()) {
- return BigNumber.min(this._remainingOrderAssetAmount, this._transferrableAssetAmount);
- }
- return this._calculatePartiallyFillableAssetAmount();
- }
- private _hasSufficientFundsForFeeAndTransferAmount(): boolean {
- if (this._isTraderAssetZRX) {
- const totalZRXTransferAmountRequired = this._remainingOrderAssetAmount.plus(this._remainingOrderFeeAmount);
- const hasSufficientFunds = this._transferrableAssetAmount.isGreaterThanOrEqualTo(
- totalZRXTransferAmountRequired,
- );
- return hasSufficientFunds;
- } else {
- const hasSufficientFundsForTransferAmount = this._transferrableAssetAmount.isGreaterThanOrEqualTo(
- this._remainingOrderAssetAmount,
- );
- const hasSufficientFundsForFeeAmount = this._transferrableFeeAmount.isGreaterThanOrEqualTo(
- this._remainingOrderFeeAmount,
- );
- const hasSufficientFunds = hasSufficientFundsForTransferAmount && hasSufficientFundsForFeeAmount;
- return hasSufficientFunds;
- }
- }
- private _calculatePartiallyFillableAssetAmount(): BigNumber {
- // Given an order for 200 wei for 2 ZRXwei fee, find 100 wei for 1 ZRXwei. Order ratio is then 100:1
- const orderToFeeRatio = this._orderAssetAmount.dividedBy(this._orderFee);
- // The number of times the trader (maker or taker) can fill the order, if each fill only required the transfer of a single
- // baseUnit of fee tokens.
- // Given 2 ZRXwei, the maximum amount of times trader can fill this order, in terms of fees, is 2
- const fillableTimesInFeeBaseUnits = BigNumber.min(this._transferrableFeeAmount, this._remainingOrderFeeAmount);
- // The number of times the trader can fill the order, given the traders asset Balance
- // Assuming a balance of 150 wei, and an orderToFeeRatio of 100:1, trader can fill this order 1 time.
- let fillableTimesInAssetUnits = this._transferrableAssetAmount.dividedBy(orderToFeeRatio);
- if (this._isTraderAssetZRX) {
- // If ZRX is the trader asset, the Fee and the trader fill amount need to be removed from the same pool;
- // 200 ZRXwei for 2ZRXwei fee can only be filled once (need 202 ZRXwei)
- const totalZRXTokenPooled = this._transferrableAssetAmount;
- // The purchasing power here is less as the tokens are taken from the same Pool
- // For every one number of fills, we have to take an extra ZRX out of the pool
- fillableTimesInAssetUnits = totalZRXTokenPooled.dividedBy(orderToFeeRatio.plus(new BigNumber(1)));
- }
- // When Ratio is not fully divisible there can be remainders which cannot be represented, so they are floored.
- // This can result in a RoundingError being thrown by the Exchange Contract.
- const partiallyFillableAssetAmount = fillableTimesInAssetUnits
- .times(this._orderAssetAmount)
- .dividedToIntegerBy(this._orderFee);
- const partiallyFillableFeeAmount = fillableTimesInFeeBaseUnits
- .times(this._orderAssetAmount)
- .dividedToIntegerBy(this._orderFee);
- const partiallyFillableAmount = BigNumber.min(partiallyFillableAssetAmount, partiallyFillableFeeAmount);
- return partiallyFillableAmount;
- }
-}
diff --git a/packages/order-utils/src/salt.ts b/packages/order-utils/src/salt.ts
deleted file mode 100644
index 95df66c99..000000000
--- a/packages/order-utils/src/salt.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-const MAX_DIGITS_IN_UNSIGNED_256_INT = 78;
-
-/**
- * Generates a pseudo-random 256-bit salt.
- * The salt can be included in a 0x order, ensuring that the order generates a unique orderHash
- * and will not collide with other outstanding orders that are identical in all other parameters.
- * @return A pseudo-random 256-bit number that can be used as a salt.
- */
-export function generatePseudoRandomSalt(): BigNumber {
- // BigNumber.random returns a pseudo-random number between 0 & 1 with a passed in number of decimal places.
- // Source: https://mikemcl.github.io/bignumber.js/#random
- const randomNumber = BigNumber.random(MAX_DIGITS_IN_UNSIGNED_256_INT);
- const factor = new BigNumber(10).pow(MAX_DIGITS_IN_UNSIGNED_256_INT - 1);
- const salt = randomNumber.times(factor).integerValue();
- return salt;
-}
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
deleted file mode 100644
index 131144d48..000000000
--- a/packages/order-utils/src/signature_utils.ts
+++ /dev/null
@@ -1,417 +0,0 @@
-import { ExchangeContract, IValidatorContract, IWalletContract } from '@0x/abi-gen-wrappers';
-import * as artifacts from '@0x/contract-artifacts';
-import { schemas } from '@0x/json-schemas';
-import { ECSignature, Order, SignatureType, SignedOrder, ValidatorSignature } from '@0x/types';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { assert } from './assert';
-import { eip712Utils } from './eip712_utils';
-import { orderHashUtils } from './order_hash';
-import { OrderError } from './types';
-import { utils } from './utils';
-
-export const signatureUtils = {
- /**
- * Verifies that the provided signature is valid according to the 0x Protocol smart contracts
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature A hex encoded 0x Protocol signature made up of: [TypeSpecificData][SignatureType].
- * E.g [vrs][SignatureType.EIP712]
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the signature is valid for the supplied signerAddress and data.
- */
- async isValidSignatureAsync(
- provider: Provider,
- data: string,
- signature: string,
- signerAddress: string,
- ): Promise<boolean> {
- assert.isWeb3Provider('provider', provider);
- assert.isHexString('data', data);
- assert.isHexString('signature', signature);
- assert.isETHAddressHex('signerAddress', signerAddress);
- const signatureTypeIndexIfExists = utils.getSignatureTypeIndexIfExists(signature);
- if (_.isUndefined(signatureTypeIndexIfExists)) {
- throw new Error(`Unrecognized signatureType in signature: ${signature}`);
- }
-
- switch (signatureTypeIndexIfExists) {
- case SignatureType.Illegal:
- case SignatureType.Invalid:
- return false;
-
- case SignatureType.EIP712: {
- const ecSignature = signatureUtils.parseECSignature(signature);
- return signatureUtils.isValidECSignature(data, ecSignature, signerAddress);
- }
-
- case SignatureType.EthSign: {
- const ecSignature = signatureUtils.parseECSignature(signature);
- const prefixedMessageHex = signatureUtils.addSignedMessagePrefix(data);
- return signatureUtils.isValidECSignature(prefixedMessageHex, ecSignature, signerAddress);
- }
-
- case SignatureType.Wallet: {
- const isValid = await signatureUtils.isValidWalletSignatureAsync(
- provider,
- data,
- signature,
- signerAddress,
- );
- return isValid;
- }
-
- case SignatureType.Validator: {
- const isValid = await signatureUtils.isValidValidatorSignatureAsync(
- provider,
- data,
- signature,
- signerAddress,
- );
- return isValid;
- }
-
- case SignatureType.PreSigned: {
- return signatureUtils.isValidPresignedSignatureAsync(provider, data, signerAddress);
- }
-
- default:
- throw new Error(`Unhandled SignatureType: ${signatureTypeIndexIfExists}`);
- }
- },
- /**
- * Verifies that the provided presigned signature is valid according to the 0x Protocol smart contracts
- * @param provider Web3 provider to use for all JSON RPC requests
- * @param data The hex encoded data signed by the supplied signature
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the data was preSigned by the supplied signerAddress
- */
- async isValidPresignedSignatureAsync(provider: Provider, data: string, signerAddress: string): Promise<boolean> {
- assert.isWeb3Provider('provider', provider);
- assert.isHexString('data', data);
- assert.isETHAddressHex('signerAddress', signerAddress);
- const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider);
- const isValid = await exchangeContract.preSigned.callAsync(data, signerAddress);
- return isValid;
- },
- /**
- * Verifies that the provided wallet signature is valid according to the 0x Protocol smart contracts
- * @param provider Web3 provider to use for all JSON RPC requests
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned]
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the data was preSigned by the supplied signerAddress.
- */
- async isValidWalletSignatureAsync(
- provider: Provider,
- data: string,
- signature: string,
- signerAddress: string,
- ): Promise<boolean> {
- assert.isWeb3Provider('provider', provider);
- assert.isHexString('data', data);
- assert.isHexString('signature', signature);
- assert.isETHAddressHex('signerAddress', signerAddress);
- // tslint:disable-next-line:custom-no-magic-numbers
- const signatureWithoutType = signature.slice(0, -2);
- const walletContract = new IWalletContract(artifacts.IWallet.compilerOutput.abi, signerAddress, provider);
- const isValid = await walletContract.isValidSignature.callAsync(data, signatureWithoutType);
- return isValid;
- },
- /**
- * Verifies that the provided validator signature is valid according to the 0x Protocol smart contracts
- * @param provider Web3 provider to use for all JSON RPC requests
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature A hex encoded presigned 0x Protocol signature made up of: [SignatureType.Presigned]
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the data was preSigned by the supplied signerAddress.
- */
- async isValidValidatorSignatureAsync(
- provider: Provider,
- data: string,
- signature: string,
- signerAddress: string,
- ): Promise<boolean> {
- assert.isWeb3Provider('provider', provider);
- assert.isHexString('data', data);
- assert.isHexString('signature', signature);
- assert.isETHAddressHex('signerAddress', signerAddress);
- const validatorSignature = parseValidatorSignature(signature);
- const exchangeContract = new ExchangeContract(artifacts.Exchange.compilerOutput.abi, signerAddress, provider);
- const isValidatorApproved = await exchangeContract.allowedValidators.callAsync(
- signerAddress,
- validatorSignature.validatorAddress,
- );
- if (!isValidatorApproved) {
- throw new Error(
- `Validator ${validatorSignature.validatorAddress} was not pre-approved by ${signerAddress}.`,
- );
- }
-
- const validatorContract = new IValidatorContract(
- artifacts.IValidator.compilerOutput.abi,
- signerAddress,
- provider,
- );
- const isValid = await validatorContract.isValidSignature.callAsync(
- data,
- signerAddress,
- validatorSignature.signature,
- );
- return isValid;
- },
- /**
- * Checks if the supplied elliptic curve signature corresponds to signing `data` with
- * the private key corresponding to `signerAddress`
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature An object containing the elliptic curve signature parameters.
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the ECSignature is valid.
- */
- isValidECSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
- assert.isHexString('data', data);
- assert.doesConformToSchema('signature', signature, schemas.ecSignatureSchema);
- assert.isETHAddressHex('signerAddress', signerAddress);
- const normalizedSignerAddress = signerAddress.toLowerCase();
-
- const msgHashBuff = ethUtil.toBuffer(data);
- try {
- const pubKey = ethUtil.ecrecover(
- msgHashBuff,
- signature.v,
- ethUtil.toBuffer(signature.r),
- ethUtil.toBuffer(signature.s),
- );
- const retrievedAddress = ethUtil.bufferToHex(ethUtil.pubToAddress(pubKey));
- const normalizedRetrievedAddress = retrievedAddress.toLowerCase();
- return normalizedRetrievedAddress === normalizedSignerAddress;
- } catch (err) {
- return false;
- }
- },
- /**
- * Signs an order and returns a SignedOrder. First `eth_signTypedData` is requested
- * then a fallback to `eth_sign` if not available on the supplied provider.
- * @param order The Order to sign.
- * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
- * must be available via the supplied Provider.
- * @return A SignedOrder containing the order and Elliptic curve signature with Signature Type.
- */
- async ecSignOrderAsync(provider: Provider, order: Order, signerAddress: string): Promise<SignedOrder> {
- assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
- try {
- const signedOrder = await signatureUtils.ecSignTypedDataOrderAsync(provider, order, signerAddress);
- return signedOrder;
- } catch (err) {
- // HACK: We are unable to handle specific errors thrown since provider is not an object
- // under our control. It could be Metamask Web3, Ethers, or any general RPC provider.
- // We check for a user denying the signature request in a way that supports Metamask and
- // Coinbase Wallet. Unfortunately for signers with a different error message,
- // they will receive two signature requests.
- if (err.message.includes('User denied message signature')) {
- throw err;
- }
- const orderHash = orderHashUtils.getOrderHashHex(order);
- const signatureHex = await signatureUtils.ecSignHashAsync(provider, orderHash, signerAddress);
- const signedOrder = {
- ...order,
- signature: signatureHex,
- };
- return signedOrder;
- }
- },
- /**
- * Signs an order using `eth_signTypedData` and returns a SignedOrder.
- * @param order The Order to sign.
- * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
- * must be available via the supplied Provider.
- * @return A SignedOrder containing the order and Elliptic curve signature with Signature Type.
- */
- async ecSignTypedDataOrderAsync(provider: Provider, order: Order, signerAddress: string): Promise<SignedOrder> {
- assert.isWeb3Provider('provider', provider);
- assert.isETHAddressHex('signerAddress', signerAddress);
- assert.doesConformToSchema('order', order, schemas.orderSchema, [schemas.hexSchema]);
- const web3Wrapper = new Web3Wrapper(provider);
- await assert.isSenderAddressAsync('signerAddress', signerAddress, web3Wrapper);
- const normalizedSignerAddress = signerAddress.toLowerCase();
- const typedData = eip712Utils.createOrderTypedData(order);
- try {
- const signature = await web3Wrapper.signTypedDataAsync(normalizedSignerAddress, typedData);
- const ecSignatureRSV = parseSignatureHexAsRSV(signature);
- const signatureBuffer = Buffer.concat([
- ethUtil.toBuffer(ecSignatureRSV.v),
- ethUtil.toBuffer(ecSignatureRSV.r),
- ethUtil.toBuffer(ecSignatureRSV.s),
- ethUtil.toBuffer(SignatureType.EIP712),
- ]);
- const signatureHex = `0x${signatureBuffer.toString('hex')}`;
- return {
- ...order,
- signature: signatureHex,
- };
- } catch (err) {
- // Detect if Metamask to transition users to the MetamaskSubprovider
- if ((provider as any).isMetaMask) {
- throw new Error(OrderError.InvalidMetamaskSigner);
- } else {
- throw err;
- }
- }
- },
- /**
- * Signs a hash using `eth_sign` and returns its elliptic curve signature and signature type.
- * @param msgHash Hex encoded message to sign.
- * @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
- * must be available via the supplied Provider.
- * @return A hex encoded string containing the Elliptic curve signature generated by signing the msgHash and the Signature Type.
- */
- async ecSignHashAsync(provider: Provider, msgHash: string, signerAddress: string): Promise<string> {
- assert.isWeb3Provider('provider', provider);
- assert.isHexString('msgHash', msgHash);
- assert.isETHAddressHex('signerAddress', signerAddress);
- const web3Wrapper = new Web3Wrapper(provider);
- await assert.isSenderAddressAsync('signerAddress', signerAddress, web3Wrapper);
- const normalizedSignerAddress = signerAddress.toLowerCase();
- const signature = await web3Wrapper.signMessageAsync(normalizedSignerAddress, msgHash);
- const prefixedMsgHashHex = signatureUtils.addSignedMessagePrefix(msgHash);
-
- // HACK: There is no consensus on whether the signatureHex string should be formatted as
- // v + r + s OR r + s + v, and different clients (even different versions of the same client)
- // return the signature params in different orders. In order to support all client implementations,
- // we parse the signature in both ways, and evaluate if either one is a valid signature.
- // r + s + v is the most prevalent format from eth_sign, so we attempt this first.
- // tslint:disable-next-line:custom-no-magic-numbers
- const validVParamValues = [27, 28];
- const ecSignatureRSV = parseSignatureHexAsRSV(signature);
- if (_.includes(validVParamValues, ecSignatureRSV.v)) {
- const isValidRSVSignature = signatureUtils.isValidECSignature(
- prefixedMsgHashHex,
- ecSignatureRSV,
- normalizedSignerAddress,
- );
- if (isValidRSVSignature) {
- const convertedSignatureHex = signatureUtils.convertECSignatureToSignatureHex(ecSignatureRSV);
- return convertedSignatureHex;
- }
- }
- const ecSignatureVRS = parseSignatureHexAsVRS(signature);
- if (_.includes(validVParamValues, ecSignatureVRS.v)) {
- const isValidVRSSignature = signatureUtils.isValidECSignature(
- prefixedMsgHashHex,
- ecSignatureVRS,
- normalizedSignerAddress,
- );
- if (isValidVRSSignature) {
- const convertedSignatureHex = signatureUtils.convertECSignatureToSignatureHex(ecSignatureVRS);
- return convertedSignatureHex;
- }
- }
- // Detect if Metamask to transition users to the MetamaskSubprovider
- if ((provider as any).isMetaMask) {
- throw new Error(OrderError.InvalidMetamaskSigner);
- } else {
- throw new Error(OrderError.InvalidSignature);
- }
- },
- /**
- * Combines ECSignature with V,R,S and the EthSign signature type for use in 0x protocol
- * @param ecSignature The ECSignature of the signed data
- * @return Hex encoded string of signature (v,r,s) with Signature Type
- */
- convertECSignatureToSignatureHex(ecSignature: ECSignature): string {
- const signatureBuffer = Buffer.concat([
- ethUtil.toBuffer(ecSignature.v),
- ethUtil.toBuffer(ecSignature.r),
- ethUtil.toBuffer(ecSignature.s),
- ]);
- const signatureHex = `0x${signatureBuffer.toString('hex')}`;
- const signatureWithType = signatureUtils.convertToSignatureWithType(signatureHex, SignatureType.EthSign);
- return signatureWithType;
- },
- /**
- * Combines the signature proof and the Signature Type.
- * @param signature The hex encoded signature proof
- * @param signatureType The signature type, i.e EthSign, Wallet etc.
- * @return Hex encoded string of signature proof with Signature Type
- */
- convertToSignatureWithType(signature: string, signatureType: SignatureType): string {
- const signatureBuffer = Buffer.concat([ethUtil.toBuffer(signature), ethUtil.toBuffer(signatureType)]);
- const signatureHex = `0x${signatureBuffer.toString('hex')}`;
- return signatureHex;
- },
- /**
- * Adds the relevant prefix to the message being signed.
- * @param message Message to sign
- * @return Prefixed message
- */
- addSignedMessagePrefix(message: string): string {
- assert.isString('message', message);
- const msgBuff = ethUtil.toBuffer(message);
- const prefixedMsgBuff = ethUtil.hashPersonalMessage(msgBuff);
- const prefixedMsgHex = ethUtil.bufferToHex(prefixedMsgBuff);
- return prefixedMsgHex;
- },
- /**
- * Parse a 0x protocol hex-encoded signature string into its ECSignature components
- * @param signature A hex encoded ecSignature 0x Protocol signature
- * @return An ECSignature object with r,s,v parameters
- */
- parseECSignature(signature: string): ECSignature {
- assert.isHexString('signature', signature);
- const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712];
- assert.isOneOfExpectedSignatureTypes(signature, ecSignatureTypes);
-
- // tslint:disable-next-line:custom-no-magic-numbers
- const vrsHex = signature.slice(0, -2);
- const ecSignature = parseSignatureHexAsVRS(vrsHex);
-
- return ecSignature;
- },
-};
-
-function parseValidatorSignature(signature: string): ValidatorSignature {
- assert.isOneOfExpectedSignatureTypes(signature, [SignatureType.Validator]);
- // tslint:disable:custom-no-magic-numbers
- const validatorSignature = {
- validatorAddress: signature.slice(-22, -2),
- signature: signature.slice(0, -22),
- };
- // tslint:enable:custom-no-magic-numbers
- return validatorSignature;
-}
-
-function parseSignatureHexAsVRS(signatureHex: string): ECSignature {
- const signatureBuffer = ethUtil.toBuffer(signatureHex);
- let v = signatureBuffer[0];
- // HACK: Sometimes v is returned as [0, 1] and sometimes as [27, 28]
- // If it is returned as [0, 1], add 27 to both so it becomes [27, 28]
- const lowestValidV = 27;
- const isProperlyFormattedV = v >= lowestValidV;
- if (!isProperlyFormattedV) {
- v += lowestValidV;
- }
- // signatureBuffer contains vrs
- const vEndIndex = 1;
- const rsIndex = 33;
- const r = signatureBuffer.slice(vEndIndex, rsIndex);
- const sEndIndex = 65;
- const s = signatureBuffer.slice(rsIndex, sEndIndex);
- const ecSignature: ECSignature = {
- v,
- r: ethUtil.bufferToHex(r),
- s: ethUtil.bufferToHex(s),
- };
- return ecSignature;
-}
-
-function parseSignatureHexAsRSV(signatureHex: string): ECSignature {
- const { v, r, s } = ethUtil.fromRpcSig(signatureHex);
- const ecSignature: ECSignature = {
- v,
- r: ethUtil.bufferToHex(r),
- s: ethUtil.bufferToHex(s),
- };
- return ecSignature;
-}
diff --git a/packages/order-utils/src/sorting_utils.ts b/packages/order-utils/src/sorting_utils.ts
deleted file mode 100644
index 1de24264f..000000000
--- a/packages/order-utils/src/sorting_utils.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { schemas } from '@0x/json-schemas';
-import { Order } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { assert } from './assert';
-import { constants } from './constants';
-import { rateUtils } from './rate_utils';
-
-export const sortingUtils = {
- /**
- * Takes an array of orders and sorts them by takerAsset/makerAsset rate in ascending order (best rate first).
- * Adjusts the rate of each order according to the feeRate and takerFee for that order.
- * @param orders An array of objects that extend the Order interface. All orders should specify ZRX as
- * the makerAsset and WETH as the takerAsset.
- * @param feeRate The market rate of ZRX denominated in takerAssetAmount
- * (ex. feeRate is 0.1 takerAsset/ZRX if it takes 1 unit of takerAsset to buy 10 ZRX)
- * Defaults to 0
- * @return The input orders sorted by rate in ascending order
- */
- sortOrdersByFeeAdjustedRate<T extends Order>(orders: T[], feeRate: BigNumber = constants.ZERO_AMOUNT): T[] {
- assert.doesConformToSchema('orders', orders, schemas.ordersSchema);
- assert.isBigNumber('feeRate', feeRate);
- const rateCalculator = (order: Order) => rateUtils.getFeeAdjustedRateOfOrder(order, feeRate);
- const sortedOrders = sortOrders(orders, rateCalculator);
- return sortedOrders;
- },
- /**
- * Takes an array of fee orders (makerAssetData corresponds to ZRX and takerAssetData corresponds to WETH)
- * and sorts them by rate in ascending order (best rate first). Adjusts the rate according to the takerFee.
- * @param feeOrders An array of objects that extend the Order interface. All orders should specify ZRX as
- * the makerAsset and WETH as the takerAsset.
- * @return The input orders sorted by rate in ascending order
- */
- sortFeeOrdersByFeeAdjustedRate<T extends Order>(feeOrders: T[]): T[] {
- assert.doesConformToSchema('feeOrders', feeOrders, schemas.ordersSchema);
- const rateCalculator = rateUtils.getFeeAdjustedRateOfFeeOrder.bind(rateUtils);
- const sortedOrders = sortOrders(feeOrders, rateCalculator);
- return sortedOrders;
- },
-};
-
-type RateCalculator = (order: Order) => BigNumber;
-
-// takes an array of orders, copies them, and sorts the copy based on the rate definition provided by rateCalculator
-function sortOrders<T extends Order>(orders: T[], rateCalculator: RateCalculator): T[] {
- const copiedOrders = _.cloneDeep(orders);
- copiedOrders.sort((firstOrder, secondOrder) => {
- const firstOrderRate = rateCalculator(firstOrder);
- const secondOrderRate = rateCalculator(secondOrder);
- return firstOrderRate.comparedTo(secondOrderRate);
- });
- return copiedOrders;
-}
diff --git a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts b/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts
deleted file mode 100644
index ae3e36238..000000000
--- a/packages/order-utils/src/store/balance_and_proxy_allowance_lazy_store.ts
+++ /dev/null
@@ -1,140 +0,0 @@
-import { AssetProxyId } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { AbstractBalanceAndProxyAllowanceFetcher } from '../abstract/abstract_balance_and_proxy_allowance_fetcher';
-import { AbstractBalanceAndProxyAllowanceLazyStore } from '../abstract/abstract_balance_and_proxy_allowance_lazy_store';
-import { assetDataUtils } from '../asset_data_utils';
-
-/**
- * Copy on read store for balances/proxyAllowances of tokens/accounts
- */
-export class BalanceAndProxyAllowanceLazyStore implements AbstractBalanceAndProxyAllowanceLazyStore {
- private readonly _balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher;
- private _balance: {
- [assetData: string]: {
- [userAddress: string]: BigNumber;
- };
- };
- private _proxyAllowance: {
- [assetData: string]: {
- [userAddress: string]: BigNumber;
- };
- };
- /**
- * Instantiates a BalanceAndProxyAllowanceLazyStore
- * @param balanceAndProxyAllowanceFetcher Class the implements the AbstractBalanceAndProxyAllowanceFetcher
- * @return Instance of BalanceAndProxyAllowanceLazyStore
- */
- constructor(balanceAndProxyAllowanceFetcher: AbstractBalanceAndProxyAllowanceFetcher) {
- this._balanceAndProxyAllowanceFetcher = balanceAndProxyAllowanceFetcher;
- this._balance = {};
- this._proxyAllowance = {};
- }
- /**
- * Get a users balance of an asset
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public async getBalanceAsync(assetData: string, userAddress: string): Promise<BigNumber> {
- if (_.isUndefined(this._balance[assetData]) || _.isUndefined(this._balance[assetData][userAddress])) {
- const balance = await this._balanceAndProxyAllowanceFetcher.getBalanceAsync(assetData, userAddress);
- this.setBalance(assetData, userAddress, balance);
- }
- const cachedBalance = this._balance[assetData][userAddress];
- return cachedBalance;
- }
- /**
- * Set the balance of an asset for a user
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public setBalance(assetData: string, userAddress: string, balance: BigNumber): void {
- if (_.isUndefined(this._balance[assetData])) {
- this._balance[assetData] = {};
- }
- this._balance[assetData][userAddress] = balance;
- }
- /**
- * Clear the balance of an asset for a user
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public deleteBalance(assetData: string, userAddress: string): void {
- if (!_.isUndefined(this._balance[assetData])) {
- delete this._balance[assetData][userAddress];
- if (_.isEmpty(this._balance[assetData])) {
- delete this._balance[assetData];
- }
- }
- }
- /**
- * Get the 0x asset proxy allowance
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public async getProxyAllowanceAsync(assetData: string, userAddress: string): Promise<BigNumber> {
- if (
- _.isUndefined(this._proxyAllowance[assetData]) ||
- _.isUndefined(this._proxyAllowance[assetData][userAddress])
- ) {
- const proxyAllowance = await this._balanceAndProxyAllowanceFetcher.getProxyAllowanceAsync(
- assetData,
- userAddress,
- );
- this.setProxyAllowance(assetData, userAddress, proxyAllowance);
- }
- const cachedProxyAllowance = this._proxyAllowance[assetData][userAddress];
- return cachedProxyAllowance;
- }
- /**
- * Set the 0x asset proxy allowance
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public setProxyAllowance(assetData: string, userAddress: string, proxyAllowance: BigNumber): void {
- if (_.isUndefined(this._proxyAllowance[assetData])) {
- this._proxyAllowance[assetData] = {};
- }
- this._proxyAllowance[assetData][userAddress] = proxyAllowance;
- }
- /**
- * Clear the 0x asset proxy allowance
- * @param assetData AssetData of interest
- * @param userAddress Ethereum address of interest
- */
- public deleteProxyAllowance(assetData: string, userAddress: string): void {
- if (!_.isUndefined(this._proxyAllowance[assetData])) {
- delete this._proxyAllowance[assetData][userAddress];
- if (_.isEmpty(this._proxyAllowance[assetData])) {
- delete this._proxyAllowance[assetData];
- }
- }
- }
- /**
- * Clear all ERC721 0x proxy allowances a user has on all items of a specific ERC721 contract
- * @param tokenAddress ERc721 token address
- * @param userAddress Owner Ethereum address
- */
- public deleteAllERC721ProxyAllowance(tokenAddress: string, userAddress: string): void {
- for (const assetData in this._proxyAllowance) {
- if (this._proxyAllowance.hasOwnProperty(assetData)) {
- const decodedAssetData = assetDataUtils.decodeERC721AssetData(assetData);
- if (
- decodedAssetData.assetProxyId === AssetProxyId.ERC721 &&
- decodedAssetData.tokenAddress === tokenAddress &&
- !_.isUndefined(this._proxyAllowance[assetData][userAddress])
- ) {
- delete this._proxyAllowance[assetData][userAddress];
- }
- }
- }
- }
- /**
- * Delete all balances & allowances
- */
- public deleteAll(): void {
- this._balance = {};
- this._proxyAllowance = {};
- }
-}
diff --git a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts b/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts
deleted file mode 100644
index afd6f1108..000000000
--- a/packages/order-utils/src/store/order_filled_cancelled_lazy_store.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { AbstractOrderFilledCancelledFetcher } from '../abstract/abstract_order_filled_cancelled_fetcher';
-import { AbstractOrderFilledCancelledLazyStore } from '../abstract/abstract_order_filled_cancelled_lazy_store';
-import { orderHashUtils } from '../order_hash';
-
-/**
- * Copy on read store for balances/proxyAllowances of tokens/accounts
- */
-export class OrderFilledCancelledLazyStore implements AbstractOrderFilledCancelledLazyStore {
- private readonly _orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher;
- private _filledTakerAmount: {
- [orderHash: string]: BigNumber;
- };
- private _isCancelled: {
- [orderHash: string]: boolean;
- };
- /**
- * Instantiate a OrderFilledCancelledLazyStore
- * @param orderFilledCancelledFetcher Class instance that implements the AbstractOrderFilledCancelledFetcher
- * @returns An instance of OrderFilledCancelledLazyStore
- */
- constructor(orderFilledCancelledFetcher: AbstractOrderFilledCancelledFetcher) {
- this._orderFilledCancelledFetcher = orderFilledCancelledFetcher;
- this._filledTakerAmount = {};
- this._isCancelled = {};
- }
- /**
- * Get the filledTakerAssetAmount of an order
- * @param orderHash OrderHash from order of interest
- * @return filledTakerAssetAmount
- */
- public async getFilledTakerAmountAsync(orderHash: string): Promise<BigNumber> {
- if (_.isUndefined(this._filledTakerAmount[orderHash])) {
- const filledTakerAmount = await this._orderFilledCancelledFetcher.getFilledTakerAmountAsync(orderHash);
- this.setFilledTakerAmount(orderHash, filledTakerAmount);
- }
- const cachedFilledTakerAmount = this._filledTakerAmount[orderHash];
- return cachedFilledTakerAmount;
- }
- /**
- * Set the filledTakerAssetAmount of an order
- * @param orderHash OrderHash from order of interest
- * @param filledTakerAmount Desired filledTakerAssetAmount
- */
- public setFilledTakerAmount(orderHash: string, filledTakerAmount: BigNumber): void {
- this._filledTakerAmount[orderHash] = filledTakerAmount;
- }
- /**
- * Clear the filledTakerAssetAmount of an order
- * @param orderHash OrderHash from order of interest
- */
- public deleteFilledTakerAmount(orderHash: string): void {
- delete this._filledTakerAmount[orderHash];
- }
- /**
- * Check if an order has been cancelled
- * @param orderHash OrderHash from order of interest
- * @return Whether the order has been cancelled
- */
- public async getIsCancelledAsync(signedOrder: SignedOrder): Promise<boolean> {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- if (_.isUndefined(this._isCancelled[orderHash])) {
- const isCancelled = await this._orderFilledCancelledFetcher.isOrderCancelledAsync(signedOrder);
- this.setIsCancelled(orderHash, isCancelled);
- }
- const cachedIsCancelled = this._isCancelled[orderHash]; // tslint:disable-line:boolean-naming
- return cachedIsCancelled;
- }
- /**
- * Set whether an order has been cancelled or not
- * @param orderHash OrderHash from order of interest
- * @param isCancelled Whether this order should be cancelled or not
- */
- public setIsCancelled(orderHash: string, isCancelled: boolean): void {
- this._isCancelled[orderHash] = isCancelled;
- }
- /**
- * Clear whether the order has been cancelled if already set
- * @param orderHash OrderHash from order of interest
- */
- public deleteIsCancelled(orderHash: string): void {
- delete this._isCancelled[orderHash];
- }
- /**
- * Clear all filled/cancelled state
- */
- public deleteAll(): void {
- this.deleteAllFilled();
- this.deleteAllIsCancelled();
- }
- /**
- * Clear all cancelled state
- */
- public deleteAllIsCancelled(): void {
- this._isCancelled = {};
- }
- /**
- * Clear all filled state
- */
- public deleteAllFilled(): void {
- this._filledTakerAmount = {};
- }
- /**
- * Get the ZRX assetData
- */
- public getZRXAssetData(): string {
- const zrxAssetData = this._orderFilledCancelledFetcher.getZRXAssetData();
- return zrxAssetData;
- }
-}
diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts
deleted file mode 100644
index 55ec553db..000000000
--- a/packages/order-utils/src/types.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export enum OrderError {
- InvalidSignature = 'INVALID_SIGNATURE',
- InvalidMetamaskSigner = "MetaMask provider must be wrapped in a MetamaskSubprovider (from the '@0x/subproviders' package) in order to work with this method.",
-}
-
-export enum TradeSide {
- Maker = 'maker',
- Taker = 'taker',
-}
-
-export enum TransferType {
- Trade = 'trade',
- Fee = 'fee',
-}
-
-export interface CreateOrderOpts {
- takerAddress?: string;
- senderAddress?: string;
- makerFee?: BigNumber;
- takerFee?: BigNumber;
- feeRecipientAddress?: string;
- salt?: BigNumber;
- expirationTimeSeconds?: BigNumber;
-}
-
-/**
- * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
- * You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values.
- * Defaults to `makerAssetAmount` values from the orders param.
- * slippageBufferAmount: An additional amount of makerAsset to be covered by the result in case of trade collisions or partial fills.
- * Defaults to 0
- */
-export interface FindOrdersThatCoverMakerAssetFillAmountOpts {
- remainingFillableMakerAssetAmounts?: BigNumber[];
- slippageBufferAmount?: BigNumber;
-}
-
-/**
- * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
- * You can use `OrderStateUtils` `@0x/order-utils` to perform blockchain lookups for these values.
- * Defaults to `makerAssetAmount` values from the orders param.
- * remainingFillableFeeAmounts: An array of BigNumbers corresponding to the feeOrders parameter.
- * You can use OrderStateUtils @0x/order-utils to perform blockchain lookups for these values.
- * Defaults to `makerAssetAmount` values from the feeOrders param.
- * slippageBufferAmount: An additional amount of fee to be covered by the result in case of trade collisions or partial fills.
- * Defaults to 0
- */
-export interface FindFeeOrdersThatCoverFeesForTargetOrdersOpts {
- remainingFillableMakerAssetAmounts?: BigNumber[];
- remainingFillableFeeAmounts?: BigNumber[];
- slippageBufferAmount?: BigNumber;
-}
-
-export interface FeeOrdersAndRemainingFeeAmount<T> {
- resultFeeOrders: T[];
- feeOrdersRemainingFillableMakerAssetAmounts: BigNumber[];
- remainingFeeAmount: BigNumber;
-}
-
-export interface OrdersAndRemainingFillAmount<T> {
- resultOrders: T[];
- ordersRemainingFillableMakerAssetAmounts: BigNumber[];
- remainingFillAmount: BigNumber;
-}
diff --git a/packages/order-utils/src/utils.ts b/packages/order-utils/src/utils.ts
deleted file mode 100644
index 64195dbed..000000000
--- a/packages/order-utils/src/utils.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export const utils = {
- getSignatureTypeIndexIfExists(signature: string): number {
- // tslint:disable-next-line:custom-no-magic-numbers
- const signatureTypeHex = signature.slice(-2);
- const base = 16;
- const signatureTypeInt = parseInt(signatureTypeHex, base);
- return signatureTypeInt;
- },
- getCurrentUnixTimestampSec(): BigNumber {
- const milisecondsInSecond = 1000;
- return new BigNumber(Date.now() / milisecondsInSecond).integerValue();
- },
- getPartialAmountFloor(numerator: BigNumber, denominator: BigNumber, target: BigNumber): BigNumber {
- const fillMakerTokenAmount = numerator
- .multipliedBy(target)
- .div(denominator)
- .integerValue(0);
- return fillMakerTokenAmount;
- },
-};
diff --git a/packages/order-utils/test/assert_test.ts b/packages/order-utils/test/assert_test.ts
deleted file mode 100644
index 631971787..000000000
--- a/packages/order-utils/test/assert_test.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { assert } from '../src/assert';
-
-import { chaiSetup } from './utils/chai_setup';
-import { web3Wrapper } from './utils/web3_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('Assertion library', () => {
- describe('#isSenderAddressHexAsync', () => {
- it('throws when address is invalid', async () => {
- const address = '0xdeadbeef';
- const varName = 'address';
- return expect(assert.isSenderAddressAsync(varName, address, web3Wrapper)).to.be.rejectedWith(
- `Expected ${varName} to be of type ETHAddressHex, encountered: ${address}`,
- );
- });
- it('throws when address is unavailable', async () => {
- const validUnrelatedAddress = '0x8b0292b11a196601eddce54b665cafeca0347d42';
- const varName = 'address';
- return expect(assert.isSenderAddressAsync(varName, validUnrelatedAddress, web3Wrapper)).to.be.rejectedWith(
- `Specified ${varName} ${validUnrelatedAddress} isn't available through the supplied web3 provider`,
- );
- });
- it("doesn't throw if address is available", async () => {
- const availableAddress = (await web3Wrapper.getAvailableAddressesAsync())[0];
- const varName = 'address';
- return expect(assert.isSenderAddressAsync(varName, availableAddress, web3Wrapper)).to.become(undefined);
- });
- });
-});
diff --git a/packages/order-utils/test/asset_data_utils_test.ts b/packages/order-utils/test/asset_data_utils_test.ts
deleted file mode 100644
index c498c5a00..000000000
--- a/packages/order-utils/test/asset_data_utils_test.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-import * as chai from 'chai';
-
-import { AssetProxyId, ERC721AssetData } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-
-import { assetDataUtils } from '../src/asset_data_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const KNOWN_ERC20_ENCODING = {
- address: '0x1dc4c1cefef38a777b15aa20260a54e584b16c48',
- assetData: '0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48',
-};
-const KNOWN_ERC721_ENCODING = {
- address: '0x1dc4c1cefef38a777b15aa20260a54e584b16c48',
- tokenId: new BigNumber(1),
- assetData:
- '0x025717920000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c480000000000000000000000000000000000000000000000000000000000000001',
-};
-const KNOWN_MULTI_ASSET_ENCODING = {
- amounts: [new BigNumber(1), new BigNumber(1)],
- nestedAssetData: [KNOWN_ERC20_ENCODING.assetData, KNOWN_ERC721_ENCODING.assetData],
- assetData:
- '0x94cfcdd7000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000024f47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000044025717920000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000',
-};
-
-describe('assetDataUtils', () => {
- it('should encode ERC20', () => {
- const assetData = assetDataUtils.encodeERC20AssetData(KNOWN_ERC20_ENCODING.address);
- expect(assetData).to.equal(KNOWN_ERC20_ENCODING.assetData);
- });
- it('should decode ERC20', () => {
- const decodedAssetData = assetDataUtils.decodeERC20AssetData(KNOWN_ERC20_ENCODING.assetData);
- expect(decodedAssetData.tokenAddress).to.equal(KNOWN_ERC20_ENCODING.address);
- expect(decodedAssetData.assetProxyId).to.equal(AssetProxyId.ERC20);
- });
- it('should encode ERC721', () => {
- const assetData = assetDataUtils.encodeERC721AssetData(
- KNOWN_ERC721_ENCODING.address,
- KNOWN_ERC721_ENCODING.tokenId,
- );
- expect(assetData).to.equal(KNOWN_ERC721_ENCODING.assetData);
- });
- it('should decode ERC721', () => {
- const decodedAssetData = assetDataUtils.decodeERC721AssetData(KNOWN_ERC721_ENCODING.assetData);
- expect(decodedAssetData.tokenAddress).to.equal(KNOWN_ERC721_ENCODING.address);
- expect(decodedAssetData.assetProxyId).to.equal(AssetProxyId.ERC721);
- expect(decodedAssetData.tokenId).to.be.bignumber.equal(KNOWN_ERC721_ENCODING.tokenId);
- });
- it('should encode ERC20 and ERC721 multiAssetData', () => {
- const assetData = assetDataUtils.encodeMultiAssetData(
- KNOWN_MULTI_ASSET_ENCODING.amounts,
- KNOWN_MULTI_ASSET_ENCODING.nestedAssetData,
- );
- expect(assetData).to.equal(KNOWN_MULTI_ASSET_ENCODING.assetData);
- });
- it('should decode ERC20 and ERC721 multiAssetData', () => {
- const decodedAssetData = assetDataUtils.decodeMultiAssetData(KNOWN_MULTI_ASSET_ENCODING.assetData);
- expect(decodedAssetData.assetProxyId).to.equal(AssetProxyId.MultiAsset);
- expect(decodedAssetData.amounts).to.deep.equal(KNOWN_MULTI_ASSET_ENCODING.amounts);
- expect(decodedAssetData.nestedAssetData).to.deep.equal(KNOWN_MULTI_ASSET_ENCODING.nestedAssetData);
- });
- it('should recursively decode ERC20 and ERC721 multiAssetData', () => {
- const decodedAssetData = assetDataUtils.decodeMultiAssetDataRecursively(KNOWN_MULTI_ASSET_ENCODING.assetData);
- expect(decodedAssetData.assetProxyId).to.equal(AssetProxyId.MultiAsset);
- expect(decodedAssetData.amounts).to.deep.equal(KNOWN_MULTI_ASSET_ENCODING.amounts);
- const decodedErc20AssetData = decodedAssetData.nestedAssetData[0];
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const decodedErc721AssetData = decodedAssetData.nestedAssetData[1] as ERC721AssetData;
- expect(decodedErc20AssetData.tokenAddress).to.equal(KNOWN_ERC20_ENCODING.address);
- expect(decodedErc20AssetData.assetProxyId).to.equal(AssetProxyId.ERC20);
- expect(decodedErc721AssetData.tokenAddress).to.equal(KNOWN_ERC721_ENCODING.address);
- expect(decodedErc721AssetData.assetProxyId).to.equal(AssetProxyId.ERC721);
- expect(decodedErc721AssetData.tokenId).to.be.bignumber.equal(KNOWN_ERC721_ENCODING.tokenId);
- });
- it('should recursively decode nested assetData within multiAssetData', () => {
- const amounts = [new BigNumber(1), new BigNumber(1), new BigNumber(2)];
- const nestedAssetData = [
- KNOWN_ERC20_ENCODING.assetData,
- KNOWN_ERC721_ENCODING.assetData,
- KNOWN_MULTI_ASSET_ENCODING.assetData,
- ];
- const assetData = assetDataUtils.encodeMultiAssetData(amounts, nestedAssetData);
- const decodedAssetData = assetDataUtils.decodeMultiAssetDataRecursively(assetData);
- expect(decodedAssetData.assetProxyId).to.equal(AssetProxyId.MultiAsset);
- const expectedAmounts = [new BigNumber(1), new BigNumber(1), new BigNumber(2), new BigNumber(2)];
- expect(decodedAssetData.amounts).to.deep.equal(expectedAmounts);
- const expectedLength = 4;
- expect(decodedAssetData.nestedAssetData.length).to.be.equal(expectedLength);
- const decodedErc20AssetData1 = decodedAssetData.nestedAssetData[0];
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const decodedErc721AssetData1 = decodedAssetData.nestedAssetData[1] as ERC721AssetData;
- const decodedErc20AssetData2 = decodedAssetData.nestedAssetData[2];
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const decodedErc721AssetData2 = decodedAssetData.nestedAssetData[3] as ERC721AssetData;
- expect(decodedErc20AssetData1.tokenAddress).to.equal(KNOWN_ERC20_ENCODING.address);
- expect(decodedErc20AssetData1.assetProxyId).to.equal(AssetProxyId.ERC20);
- expect(decodedErc721AssetData1.tokenAddress).to.equal(KNOWN_ERC721_ENCODING.address);
- expect(decodedErc721AssetData1.assetProxyId).to.equal(AssetProxyId.ERC721);
- expect(decodedErc721AssetData1.tokenId).to.be.bignumber.equal(KNOWN_ERC721_ENCODING.tokenId);
- expect(decodedErc20AssetData2.tokenAddress).to.equal(KNOWN_ERC20_ENCODING.address);
- expect(decodedErc20AssetData2.assetProxyId).to.equal(AssetProxyId.ERC20);
- expect(decodedErc721AssetData2.tokenAddress).to.equal(KNOWN_ERC721_ENCODING.address);
- expect(decodedErc721AssetData2.assetProxyId).to.equal(AssetProxyId.ERC721);
- expect(decodedErc721AssetData2.tokenId).to.be.bignumber.equal(KNOWN_ERC721_ENCODING.tokenId);
- });
-});
diff --git a/packages/order-utils/test/eip712_utils_test.ts b/packages/order-utils/test/eip712_utils_test.ts
deleted file mode 100644
index a54e49958..000000000
--- a/packages/order-utils/test/eip712_utils_test.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { constants } from '../src/constants';
-import { eip712Utils } from '../src/eip712_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('EIP712 Utils', () => {
- describe('createTypedData', () => {
- it('adds in the EIP712DomainSeparator', () => {
- const primaryType = 'Test';
- const typedData = eip712Utils.createTypedData(
- primaryType,
- { Test: [{ name: 'testValue', type: 'uint256' }] },
- { testValue: '1' },
- constants.NULL_ADDRESS,
- );
- expect(typedData.domain).to.not.be.undefined();
- expect(typedData.types.EIP712Domain).to.not.be.undefined();
- const domainObject = typedData.domain;
- expect(domainObject.name).to.eq(constants.EIP712_DOMAIN_NAME);
- expect(typedData.primaryType).to.eq(primaryType);
- });
- });
- describe('createTypedData', () => {
- it('adds in the EIP712DomainSeparator', () => {
- const typedData = eip712Utils.createZeroExTransactionTypedData(
- {
- salt: new BigNumber('0'),
- data: constants.NULL_BYTES,
- signerAddress: constants.NULL_ADDRESS,
- },
- constants.NULL_ADDRESS,
- );
- expect(typedData.primaryType).to.eq(constants.EIP712_ZEROEX_TRANSACTION_SCHEMA.name);
- expect(typedData.types.EIP712Domain).to.not.be.undefined();
- });
- });
-});
diff --git a/packages/order-utils/test/exchange_transfer_simulator_test.ts b/packages/order-utils/test/exchange_transfer_simulator_test.ts
deleted file mode 100644
index c26eb1907..000000000
--- a/packages/order-utils/test/exchange_transfer_simulator_test.ts
+++ /dev/null
@@ -1,174 +0,0 @@
-import { DummyERC20TokenContract, ERC20ProxyContract, ERC20TokenContract } from '@0x/abi-gen-wrappers';
-import * as artifacts from '@0x/contract-artifacts';
-import { BlockchainLifecycle, devConstants } from '@0x/dev-utils';
-import { ExchangeContractErrs } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-
-import { assetDataUtils } from '../src/asset_data_utils';
-import { constants } from '../src/constants';
-import { ExchangeTransferSimulator } from '../src/exchange_transfer_simulator';
-import { BalanceAndProxyAllowanceLazyStore } from '../src/store/balance_and_proxy_allowance_lazy_store';
-import { TradeSide, TransferType } from '../src/types';
-
-import { chaiSetup } from './utils/chai_setup';
-import { SimpleERC20BalanceAndProxyAllowanceFetcher } from './utils/simple_erc20_balance_and_proxy_allowance_fetcher';
-import { provider, web3Wrapper } from './utils/web3_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('ExchangeTransferSimulator', async () => {
- const transferAmount = new BigNumber(5);
- let userAddresses: string[];
- let dummyERC20Token: DummyERC20TokenContract;
- let coinbase: string;
- let sender: string;
- let recipient: string;
- let exampleAssetData: string;
- let exchangeTransferSimulator: ExchangeTransferSimulator;
- let txHash: string;
- let erc20ProxyAddress: string;
- before(async function(): Promise<void> {
- const mochaTestTimeoutMs = 20000;
- this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
-
- userAddresses = await web3Wrapper.getAvailableAddressesAsync();
- [coinbase, sender, recipient] = userAddresses;
-
- const txDefaults = {
- gas: devConstants.GAS_LIMIT,
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- };
-
- const erc20Proxy = await ERC20ProxyContract.deployFrom0xArtifactAsync(
- artifacts.ERC20Proxy,
- provider,
- txDefaults,
- );
- erc20ProxyAddress = erc20Proxy.address;
-
- const totalSupply = new BigNumber(100000000000000000000);
- const name = 'Test';
- const symbol = 'TST';
- const decimals = new BigNumber(18);
- // tslint:disable-next-line:no-unused-variable
- dummyERC20Token = await DummyERC20TokenContract.deployFrom0xArtifactAsync(
- artifacts.DummyERC20Token,
- provider,
- txDefaults,
- name,
- symbol,
- decimals,
- totalSupply,
- );
-
- exampleAssetData = assetDataUtils.encodeERC20AssetData(dummyERC20Token.address);
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('#transferFromAsync', function(): void {
- // HACK: For some reason these tests need a slightly longer timeout
- const mochaTestTimeoutMs = 3000;
- this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
- beforeEach(() => {
- const simpleERC20BalanceAndProxyAllowanceFetcher = new SimpleERC20BalanceAndProxyAllowanceFetcher(
- (dummyERC20Token as any) as ERC20TokenContract,
- erc20ProxyAddress,
- );
- const balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
- simpleERC20BalanceAndProxyAllowanceFetcher,
- );
- exchangeTransferSimulator = new ExchangeTransferSimulator(balanceAndProxyAllowanceLazyStore);
- });
- it("throws if the user doesn't have enough allowance", async () => {
- return expect(
- exchangeTransferSimulator.transferFromAsync(
- exampleAssetData,
- sender,
- recipient,
- transferAmount,
- TradeSide.Taker,
- TransferType.Trade,
- ),
- ).to.be.rejectedWith(ExchangeContractErrs.InsufficientTakerAllowance);
- });
- it("throws if the user doesn't have enough balance", async () => {
- txHash = await dummyERC20Token.approve.sendTransactionAsync(erc20ProxyAddress, transferAmount, {
- from: sender,
- });
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- return expect(
- exchangeTransferSimulator.transferFromAsync(
- exampleAssetData,
- sender,
- recipient,
- transferAmount,
- TradeSide.Maker,
- TransferType.Trade,
- ),
- ).to.be.rejectedWith(ExchangeContractErrs.InsufficientMakerBalance);
- });
- it('updates balances and proxyAllowance after transfer', async () => {
- txHash = await dummyERC20Token.transfer.sendTransactionAsync(sender, transferAmount, {
- from: coinbase,
- });
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
-
- txHash = await dummyERC20Token.approve.sendTransactionAsync(erc20ProxyAddress, transferAmount, {
- from: sender,
- });
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
-
- await exchangeTransferSimulator.transferFromAsync(
- exampleAssetData,
- sender,
- recipient,
- transferAmount,
- TradeSide.Taker,
- TransferType.Trade,
- );
- const store = (exchangeTransferSimulator as any)._store;
- const senderBalance = await store.getBalanceAsync(exampleAssetData, sender);
- const recipientBalance = await store.getBalanceAsync(exampleAssetData, recipient);
- const senderProxyAllowance = await store.getProxyAllowanceAsync(exampleAssetData, sender);
- expect(senderBalance).to.be.bignumber.equal(0);
- expect(recipientBalance).to.be.bignumber.equal(transferAmount);
- expect(senderProxyAllowance).to.be.bignumber.equal(0);
- });
- it("doesn't update proxyAllowance after transfer if unlimited", async () => {
- txHash = await dummyERC20Token.transfer.sendTransactionAsync(sender, transferAmount, {
- from: coinbase,
- });
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- txHash = await dummyERC20Token.approve.sendTransactionAsync(
- erc20ProxyAddress,
- constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS,
- {
- from: sender,
- },
- );
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- await exchangeTransferSimulator.transferFromAsync(
- exampleAssetData,
- sender,
- recipient,
- transferAmount,
- TradeSide.Taker,
- TransferType.Trade,
- );
- const store = (exchangeTransferSimulator as any)._store;
- const senderBalance = await store.getBalanceAsync(exampleAssetData, sender);
- const recipientBalance = await store.getBalanceAsync(exampleAssetData, recipient);
- const senderProxyAllowance = await store.getProxyAllowanceAsync(exampleAssetData, sender);
- expect(senderBalance).to.be.bignumber.equal(0);
- expect(recipientBalance).to.be.bignumber.equal(transferAmount);
- expect(senderProxyAllowance).to.be.bignumber.equal(constants.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
- });
- });
-});
diff --git a/packages/order-utils/test/market_utils_test.ts b/packages/order-utils/test/market_utils_test.ts
deleted file mode 100644
index 42ea195bb..000000000
--- a/packages/order-utils/test/market_utils_test.ts
+++ /dev/null
@@ -1,267 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { marketUtils } from '../src';
-import { constants } from '../src/constants';
-
-import { chaiSetup } from './utils/chai_setup';
-import { testOrderFactory } from './utils/test_order_factory';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable: no-unused-expression
-describe('marketUtils', () => {
- describe('#findOrdersThatCoverMakerAssetFillAmount', () => {
- describe('no orders', () => {
- it('returns empty and unchanged remainingFillAmount', async () => {
- const fillAmount = new BigNumber(10);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- [],
- fillAmount,
- );
- expect(resultOrders).to.be.empty;
- expect(remainingFillAmount).to.be.bignumber.equal(fillAmount);
- });
- });
- describe('orders are completely fillable', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- const makerAssetAmount = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- },
- 3,
- );
- it('returns input orders and zero remainingFillAmount when input exactly matches requested fill amount', async () => {
- // try to fill 20 units of makerAsset
- // include 10 units of slippageBufferAmount
- const fillAmount = new BigNumber(20);
- const slippageBufferAmount = new BigNumber(10);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- {
- slippageBufferAmount,
- },
- );
- expect(resultOrders).to.be.deep.equal(inputOrders);
- expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('returns input orders and zero remainingFillAmount when input has more than requested fill amount', async () => {
- // try to fill 15 units of makerAsset
- // include 10 units of slippageBufferAmount
- const fillAmount = new BigNumber(15);
- const slippageBufferAmount = new BigNumber(10);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- {
- slippageBufferAmount,
- },
- );
- expect(resultOrders).to.be.deep.equal(inputOrders);
- expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('returns input orders and non-zero remainingFillAmount when input has less than requested fill amount', async () => {
- // try to fill 30 units of makerAsset
- // include 5 units of slippageBufferAmount
- const fillAmount = new BigNumber(30);
- const slippageBufferAmount = new BigNumber(5);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- {
- slippageBufferAmount,
- },
- );
- expect(resultOrders).to.be.deep.equal(inputOrders);
- expect(remainingFillAmount).to.be.bignumber.equal(new BigNumber(5));
- });
- it('returns first order and zero remainingFillAmount when requested fill amount is exactly covered by the first order', async () => {
- // try to fill 10 units of makerAsset
- const fillAmount = new BigNumber(10);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- );
- expect(resultOrders).to.be.deep.equal([inputOrders[0]]);
- expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- it('returns first two orders and zero remainingFillAmount when requested fill amount is over covered by the first two order', async () => {
- // try to fill 15 units of makerAsset
- const fillAmount = new BigNumber(15);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- );
- expect(resultOrders).to.be.deep.equal([inputOrders[0], inputOrders[1]]);
- expect(remainingFillAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('orders are partially fillable', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- const makerAssetAmount = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- },
- 3,
- );
- // generate remainingFillableMakerAssetAmounts that cover different partial fill scenarios
- // 1. order is completely filled already
- // 2. order is partially fillable
- // 3. order is completely fillable
- const remainingFillableMakerAssetAmounts = [constants.ZERO_AMOUNT, new BigNumber(5), makerAssetAmount];
- it('returns last two orders and non-zero remainingFillAmount when trying to fill original makerAssetAmounts', async () => {
- // try to fill 30 units of makerAsset
- const fillAmount = new BigNumber(30);
- const { resultOrders, remainingFillAmount } = marketUtils.findOrdersThatCoverMakerAssetFillAmount(
- inputOrders,
- fillAmount,
- {
- remainingFillableMakerAssetAmounts,
- },
- );
- expect(resultOrders).to.be.deep.equal([inputOrders[1], inputOrders[2]]);
- expect(remainingFillAmount).to.be.bignumber.equal(new BigNumber(15));
- });
- });
- });
- describe('#findFeeOrdersThatCoverFeesForTargetOrders', () => {
- // generate three signed fee orders each with 10 units of ZRX, 30 total
- const zrxAmount = new BigNumber(10);
- const inputFeeOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount: zrxAmount,
- },
- 3,
- );
- describe('no target orders', () => {
- it('returns empty and zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- [],
- inputFeeOrders,
- );
- expect(resultFeeOrders).to.be.empty;
- expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('no fee orders', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- // each signed order requires 10 units of takerFee
- const makerAssetAmount = new BigNumber(10);
- const takerFee = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerFee,
- },
- 3,
- );
- // generate remainingFillableMakerAssetAmounts that equal the makerAssetAmount
- const remainingFillableMakerAssetAmounts = [makerAssetAmount, makerAssetAmount, makerAssetAmount];
- it('returns empty and non-zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- inputOrders,
- [],
- {
- remainingFillableMakerAssetAmounts,
- },
- );
- expect(resultFeeOrders).to.be.empty;
- expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30));
- });
- });
- describe('target orders have no fees', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- const makerAssetAmount = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- },
- 3,
- );
- it('returns empty and zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- inputOrders,
- inputFeeOrders,
- );
- expect(resultFeeOrders).to.be.empty;
- expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('target orders require fees and are completely fillable', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- // each signed order requires 10 units of takerFee
- const makerAssetAmount = new BigNumber(10);
- const takerFee = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerFee,
- },
- 3,
- );
- it('returns input fee orders and zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- inputOrders,
- inputFeeOrders,
- );
- expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders);
- expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('target orders require fees and are partially fillable', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- // each signed order requires 10 units of takerFee
- const makerAssetAmount = new BigNumber(10);
- const takerFee = new BigNumber(10);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerFee,
- },
- 3,
- );
- // generate remainingFillableMakerAssetAmounts that cover different partial fill scenarios
- // 1. order is completely filled already
- // 2. order is partially fillable
- // 3. order is completely fillable
- const remainingFillableMakerAssetAmounts = [constants.ZERO_AMOUNT, new BigNumber(5), makerAssetAmount];
- it('returns first two input fee orders and zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- inputOrders,
- inputFeeOrders,
- {
- remainingFillableMakerAssetAmounts,
- },
- );
- expect(resultFeeOrders).to.be.deep.equal([inputFeeOrders[0], inputFeeOrders[1]]);
- expect(remainingFeeAmount).to.be.bignumber.equal(constants.ZERO_AMOUNT);
- });
- });
- describe('target orders require more fees than available', () => {
- // generate three signed orders each with 10 units of makerAsset, 30 total
- // each signed order requires 20 units of takerFee
- const makerAssetAmount = new BigNumber(10);
- const takerFee = new BigNumber(20);
- const inputOrders = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerFee,
- },
- 3,
- );
- it('returns input fee orders and non-zero remainingFeeAmount', async () => {
- const { resultFeeOrders, remainingFeeAmount } = marketUtils.findFeeOrdersThatCoverFeesForTargetOrders(
- inputOrders,
- inputFeeOrders,
- );
- expect(resultFeeOrders).to.be.deep.equal(inputFeeOrders);
- expect(remainingFeeAmount).to.be.bignumber.equal(new BigNumber(30));
- });
- });
- });
-});
diff --git a/packages/order-utils/test/order_hash_test.ts b/packages/order-utils/test/order_hash_test.ts
deleted file mode 100644
index 30fb15a37..000000000
--- a/packages/order-utils/test/order_hash_test.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Order } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { orderHashUtils } from '../src';
-
-import { constants } from '../src/constants';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('Order hashing', () => {
- describe('#getOrderHashHex', () => {
- const expectedOrderHash = '0x434c6b41e2fb6dfcfe1b45c4492fb03700798e9c1afc6f801ba6203f948c1fa7';
- const fakeExchangeContractAddress = '0x1dc4c1cefef38a777b15aa20260a54e584b16c48';
- const order: Order = {
- makerAddress: constants.NULL_ADDRESS,
- takerAddress: constants.NULL_ADDRESS,
- senderAddress: constants.NULL_ADDRESS,
- feeRecipientAddress: constants.NULL_ADDRESS,
- makerAssetData: constants.NULL_ADDRESS,
- takerAssetData: constants.NULL_ADDRESS,
- exchangeAddress: fakeExchangeContractAddress,
- salt: new BigNumber(0),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- makerAssetAmount: new BigNumber(0),
- takerAssetAmount: new BigNumber(0),
- expirationTimeSeconds: new BigNumber(0),
- };
- it('calculates the order hash', async () => {
- const orderHash = orderHashUtils.getOrderHashHex(order);
- expect(orderHash).to.be.equal(expectedOrderHash);
- });
- it('calculates the order hash if amounts are strings', async () => {
- // It's common for developers using javascript to provide the amounts
- // as strings. Since we eventually toString() the BigNumber
- // before encoding we should result in the same orderHash in this scenario
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const orderHash = orderHashUtils.getOrderHashHex({
- ...order,
- makerAssetAmount: '0',
- takerAssetAmount: '0',
- makerFee: '0',
- takerFee: '0',
- } as any);
- expect(orderHash).to.be.equal(expectedOrderHash);
- });
- it('throws a readable error message if taker format is invalid', async () => {
- const orderWithInvalidtakerFormat = {
- ...order,
- takerAddress: (null as any) as string,
- };
- const expectedErrorMessage =
- 'Order taker must be of type string. If you want anyone to be able to fill an order - pass ZeroEx.NULL_ADDRESS';
- expect(() => orderHashUtils.getOrderHashHex(orderWithInvalidtakerFormat)).to.throw(expectedErrorMessage);
- });
- });
- describe('#isValidOrderHash', () => {
- it('returns false if the value is not a hex string', () => {
- const isValid = orderHashUtils.isValidOrderHash('not a hex');
- expect(isValid).to.be.false();
- });
- it('returns false if the length is wrong', () => {
- const isValid = orderHashUtils.isValidOrderHash('0xdeadbeef');
- expect(isValid).to.be.false();
- });
- it('returns true if order hash is correct', () => {
- const orderHashLength = 65;
- const isValid = orderHashUtils.isValidOrderHash(`0x${Array(orderHashLength).join('0')}`);
- expect(isValid).to.be.true();
- });
- });
-});
diff --git a/packages/order-utils/test/order_state_utils_test.ts b/packages/order-utils/test/order_state_utils_test.ts
deleted file mode 100644
index 42acd54c6..000000000
--- a/packages/order-utils/test/order_state_utils_test.ts
+++ /dev/null
@@ -1,145 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { AbstractBalanceAndProxyAllowanceFetcher } from '../src/abstract/abstract_balance_and_proxy_allowance_fetcher';
-import { AbstractOrderFilledCancelledFetcher } from '../src/abstract/abstract_order_filled_cancelled_fetcher';
-import { OrderStateUtils } from '../src/order_state_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-import { testOrderFactory } from './utils/test_order_factory';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('OrderStateUtils', () => {
- describe('#getOpenOrderStateAsync', () => {
- const buildMockBalanceFetcher = (takerBalance: BigNumber): AbstractBalanceAndProxyAllowanceFetcher => {
- const balanceFetcher = {
- async getBalanceAsync(_assetData: string, _userAddress: string): Promise<BigNumber> {
- return takerBalance;
- },
- async getProxyAllowanceAsync(_assetData: string, _userAddress: string): Promise<BigNumber> {
- return takerBalance;
- },
- };
- return balanceFetcher;
- };
- const buildMockOrderFilledFetcher = (
- filledAmount: BigNumber = new BigNumber(0),
- cancelled: boolean = false,
- ): AbstractOrderFilledCancelledFetcher => {
- const orderFetcher = {
- async getFilledTakerAmountAsync(_orderHash: string): Promise<BigNumber> {
- return filledAmount;
- },
- async isOrderCancelledAsync(_signedOrder: SignedOrder): Promise<boolean> {
- return cancelled;
- },
- getZRXAssetData(): string {
- return '';
- },
- };
- return orderFetcher;
- };
- it('should have valid order state if order can be fully filled with small maker amount', async () => {
- const makerAssetAmount = new BigNumber(10);
- const takerAssetAmount = new BigNumber(10000000000000000);
- const takerBalance = takerAssetAmount;
- const orderFilledAmount = new BigNumber(0);
- const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
- const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount);
- const [signedOrder] = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerAssetAmount,
- },
- 1,
- );
-
- const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
- const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
- expect(orderState.isValid).to.eq(true);
- });
- it('should be invalid when an order is partially filled where only a rounding error remains', async () => {
- const makerAssetAmount = new BigNumber(1001);
- const takerAssetAmount = new BigNumber(3);
- const takerBalance = takerAssetAmount;
- const orderFilledAmount = new BigNumber(2);
- const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
- const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount);
- const [signedOrder] = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerAssetAmount,
- },
- 1,
- );
-
- const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
- const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
- expect(orderState.isValid).to.eq(false);
- });
- it('should be invalid when an order is cancelled', async () => {
- const makerAssetAmount = new BigNumber(1000);
- const takerAssetAmount = new BigNumber(2);
- const takerBalance = takerAssetAmount;
- const orderFilledAmount = new BigNumber(0);
- const isCancelled = true;
- const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
- const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount, isCancelled);
- const [signedOrder] = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerAssetAmount,
- },
- 1,
- );
-
- const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
- const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
- expect(orderState.isValid).to.eq(false);
- });
- it('should be invalid when an order is fully filled', async () => {
- const makerAssetAmount = new BigNumber(1000);
- const takerAssetAmount = new BigNumber(2);
- const takerBalance = takerAssetAmount;
- const orderFilledAmount = takerAssetAmount;
- const isCancelled = false;
- const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
- const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount, isCancelled);
- const [signedOrder] = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerAssetAmount,
- },
- 1,
- );
-
- const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
- const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder);
- expect(orderState.isValid).to.eq(false);
- });
- it('should include the transactionHash in orderState if supplied in method invocation', async () => {
- const makerAssetAmount = new BigNumber(10);
- const takerAssetAmount = new BigNumber(10000000000000000);
- const takerBalance = takerAssetAmount;
- const orderFilledAmount = new BigNumber(0);
- const mockBalanceFetcher = buildMockBalanceFetcher(takerBalance);
- const mockOrderFilledFetcher = buildMockOrderFilledFetcher(orderFilledAmount);
- const [signedOrder] = testOrderFactory.generateTestSignedOrders(
- {
- makerAssetAmount,
- takerAssetAmount,
- },
- 1,
- );
-
- const orderStateUtils = new OrderStateUtils(mockBalanceFetcher, mockOrderFilledFetcher);
- const transactionHash = '0xdeadbeef';
- const orderState = await orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
- expect(orderState.transactionHash).to.eq(transactionHash);
- });
- });
-});
diff --git a/packages/order-utils/test/order_validation_utils_test.ts b/packages/order-utils/test/order_validation_utils_test.ts
deleted file mode 100644
index d4d12a6a7..000000000
--- a/packages/order-utils/test/order_validation_utils_test.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { OrderValidationUtils } from '../src/order_validation_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('OrderValidationUtils', () => {
- describe('#isRoundingError', () => {
- it('should return false if there is a rounding error of 0.1%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(999);
- const target = new BigNumber(50);
- // rounding error = ((20*50/999) - floor(20*50/999)) / (20*50/999) = 0.1%
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
-
- it('should return false if there is a rounding of 0.09%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(9991);
- const target = new BigNumber(500);
- // rounding error = ((20*500/9991) - floor(20*500/9991)) / (20*500/9991) = 0.09%
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
-
- it('should return true if there is a rounding error of 0.11%', async () => {
- const numerator = new BigNumber(20);
- const denominator = new BigNumber(9989);
- const target = new BigNumber(500);
- // rounding error = ((20*500/9989) - floor(20*500/9989)) / (20*500/9989) = 0.011%
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
-
- it('should return true if there is a rounding error > 0.1%', async () => {
- const numerator = new BigNumber(3);
- const denominator = new BigNumber(7);
- const target = new BigNumber(10);
- // rounding error = ((3*10/7) - floor(3*10/7)) / (3*10/7) = 6.67%
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.true();
- });
-
- it('should return false when there is no rounding error', async () => {
- const numerator = new BigNumber(1);
- const denominator = new BigNumber(2);
- const target = new BigNumber(10);
-
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
-
- it('should return false when there is rounding error <= 0.1%', async () => {
- // randomly generated numbers
- const numerator = new BigNumber(76564);
- const denominator = new BigNumber(676373677);
- const target = new BigNumber(105762562);
- // rounding error = ((76564*105762562/676373677) - floor(76564*105762562/676373677)) /
- // (76564*105762562/676373677) = 0.0007%
- const isRoundingError = OrderValidationUtils.isRoundingErrorFloor(numerator, denominator, target);
- expect(isRoundingError).to.be.false();
- });
- });
-});
diff --git a/packages/order-utils/test/rate_utils_test.ts b/packages/order-utils/test/rate_utils_test.ts
deleted file mode 100644
index b13878bb5..000000000
--- a/packages/order-utils/test/rate_utils_test.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { rateUtils } from '../src';
-
-import { chaiSetup } from './utils/chai_setup';
-import { testOrderFactory } from './utils/test_order_factory';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('rateUtils', () => {
- const testOrder = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(100),
- takerFee: new BigNumber(20),
- });
- describe('#getFeeAdjustedRateOfOrder', () => {
- it('throws when feeRate is less than zero', async () => {
- const feeRate = new BigNumber(-1);
- expect(() => rateUtils.getFeeAdjustedRateOfOrder(testOrder, feeRate)).to.throw(
- 'Expected feeRate: -1 to be greater than or equal to 0',
- );
- });
- it('correctly calculates fee adjusted rate when feeRate is provided', async () => {
- const feeRate = new BigNumber(2); // ZRX costs 2 units of takerAsset per 1 unit of ZRX
- const feeAdjustedRate = rateUtils.getFeeAdjustedRateOfOrder(testOrder, feeRate);
- // the order actually takes 100 + (2 * 20) takerAsset units to fill 100 units of makerAsset
- expect(feeAdjustedRate).to.bignumber.equal(new BigNumber(1.4));
- });
- it('correctly calculates fee adjusted rate when no feeRate is provided', async () => {
- const feeAdjustedRate = rateUtils.getFeeAdjustedRateOfOrder(testOrder);
- // because no feeRate was provided we just assume 0 fees
- // the order actually takes 100 takerAsset units to fill 100 units of makerAsset
- expect(feeAdjustedRate).to.bignumber.equal(new BigNumber(1));
- });
- });
- describe('#getFeeAdjustedRateOfFeeOrder', () => {
- it('throws when takerFee exceeds makerAssetAmount', async () => {
- const badOrder = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerFee: new BigNumber(101),
- });
- expect(() => rateUtils.getFeeAdjustedRateOfFeeOrder(badOrder)).to.throw(
- 'Expected takerFee: "101" to be less than makerAssetAmount: "100"',
- );
- });
- it('correctly calculates fee adjusted rate', async () => {
- const feeAdjustedRate = rateUtils.getFeeAdjustedRateOfFeeOrder(testOrder);
- // the order actually takes 100 takerAsset units to fill (100 - 20) units of makerAsset
- expect(feeAdjustedRate).to.bignumber.equal(new BigNumber(1.25));
- });
- });
-});
diff --git a/packages/order-utils/test/remaining_fillable_calculator_test.ts b/packages/order-utils/test/remaining_fillable_calculator_test.ts
deleted file mode 100644
index affad8f1c..000000000
--- a/packages/order-utils/test/remaining_fillable_calculator_test.ts
+++ /dev/null
@@ -1,246 +0,0 @@
-import { SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import 'mocha';
-
-import { RemainingFillableCalculator } from '../src/remaining_fillable_calculator';
-
-import { chaiSetup } from './utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('RemainingFillableCalculator', () => {
- let calculator: RemainingFillableCalculator;
- let signedOrder: SignedOrder;
- let transferrableMakeAssetAmount: BigNumber;
- let transferrableMakerFeeTokenAmount: BigNumber;
- let remainingMakeAssetAmount: BigNumber;
- let makerAmount: BigNumber;
- let takerAmount: BigNumber;
- let makerFeeAmount: BigNumber;
- let isMakeAssetZRX: boolean;
- const makerAssetData: string = '0x1';
- const takerAssetData: string = '0x2';
- const decimals: number = 4;
- const zero: BigNumber = new BigNumber(0);
- const zeroAddress = '0x0';
- const signature: string =
- '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403';
- beforeEach(async () => {
- [makerAmount, takerAmount, makerFeeAmount] = [
- Web3Wrapper.toBaseUnitAmount(new BigNumber(50), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(1), decimals),
- ];
- [transferrableMakeAssetAmount, transferrableMakerFeeTokenAmount] = [
- Web3Wrapper.toBaseUnitAmount(new BigNumber(50), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals),
- ];
- });
- function buildSignedOrder(): SignedOrder {
- return {
- signature,
- exchangeAddress: zeroAddress,
- feeRecipientAddress: zeroAddress,
- senderAddress: zeroAddress,
- makerAddress: zeroAddress,
- takerAddress: zeroAddress,
- makerFee: makerFeeAmount,
- takerFee: zero,
- makerAssetAmount: makerAmount,
- takerAssetAmount: takerAmount,
- makerAssetData,
- takerAssetData,
- salt: zero,
- expirationTimeSeconds: zero,
- };
- }
- describe('Maker token is NOT ZRX', () => {
- before(async () => {
- isMakeAssetZRX = false;
- });
- it('calculates the correct amount when unfilled and funds available', () => {
- signedOrder = buildSignedOrder();
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(remainingMakeAssetAmount);
- });
- it('calculates the correct amount when partially filled and funds available', () => {
- signedOrder = buildSignedOrder();
- remainingMakeAssetAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), decimals);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(remainingMakeAssetAmount);
- });
- it('calculates the amount to be 0 when all fee funds are transferred', () => {
- signedOrder = buildSignedOrder();
- transferrableMakerFeeTokenAmount = zero;
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(zero);
- });
- it('calculates the correct amount when balance is less than remaining fillable', () => {
- signedOrder = buildSignedOrder();
- const partiallyFilledAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- remainingMakeAssetAmount = signedOrder.makerAssetAmount.minus(partiallyFilledAmount);
- transferrableMakeAssetAmount = remainingMakeAssetAmount.minus(partiallyFilledAmount);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(transferrableMakeAssetAmount);
- });
- describe('Order to Fee Ratio is < 1', () => {
- beforeEach(async () => {
- [makerAmount, takerAmount, makerFeeAmount] = [
- Web3Wrapper.toBaseUnitAmount(new BigNumber(3), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(6), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(6), decimals),
- ];
- });
- it('calculates the correct amount when funds unavailable', () => {
- signedOrder = buildSignedOrder();
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- const transferredAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- transferrableMakeAssetAmount = remainingMakeAssetAmount.minus(transferredAmount);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(transferrableMakeAssetAmount);
- });
- });
- describe('Ratio is not evenly divisble', () => {
- beforeEach(async () => {
- [makerAmount, takerAmount, makerFeeAmount] = [
- Web3Wrapper.toBaseUnitAmount(new BigNumber(3), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(7), decimals),
- Web3Wrapper.toBaseUnitAmount(new BigNumber(7), decimals),
- ];
- });
- it('calculates the correct amount when funds unavailable', () => {
- signedOrder = buildSignedOrder();
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- const transferredAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- transferrableMakeAssetAmount = remainingMakeAssetAmount.minus(transferredAmount);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- const calculatedFillableAmount = calculator.computeRemainingFillable();
- expect(calculatedFillableAmount.isLessThanOrEqualTo(transferrableMakeAssetAmount)).to.be.true();
- expect(calculatedFillableAmount).to.be.bignumber.greaterThan(new BigNumber(0));
- const orderToFeeRatio = signedOrder.makerAssetAmount.dividedBy(signedOrder.makerFee);
- const calculatedFeeAmount = calculatedFillableAmount.dividedBy(orderToFeeRatio);
- expect(calculatedFeeAmount).to.be.bignumber.lessThan(transferrableMakerFeeTokenAmount);
- });
- });
- });
- describe('Maker Token is ZRX', () => {
- before(async () => {
- isMakeAssetZRX = true;
- });
- it('calculates the correct amount when unfilled and funds available', () => {
- signedOrder = buildSignedOrder();
- transferrableMakeAssetAmount = makerAmount.plus(makerFeeAmount);
- transferrableMakerFeeTokenAmount = transferrableMakeAssetAmount;
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(remainingMakeAssetAmount);
- });
- it('calculates the correct amount when partially filled and funds available', () => {
- signedOrder = buildSignedOrder();
- remainingMakeAssetAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), decimals);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(remainingMakeAssetAmount);
- });
- it('calculates the amount to be 0 when all fee funds are transferred', () => {
- signedOrder = buildSignedOrder();
- transferrableMakeAssetAmount = zero;
- transferrableMakerFeeTokenAmount = zero;
- remainingMakeAssetAmount = signedOrder.makerAssetAmount;
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- expect(calculator.computeRemainingFillable()).to.be.bignumber.equal(zero);
- });
- it('calculates the correct amount when balance is less than remaining fillable', () => {
- signedOrder = buildSignedOrder();
- const partiallyFilledAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- remainingMakeAssetAmount = signedOrder.makerAssetAmount.minus(partiallyFilledAmount);
- transferrableMakeAssetAmount = remainingMakeAssetAmount.minus(partiallyFilledAmount);
- transferrableMakerFeeTokenAmount = transferrableMakeAssetAmount;
-
- const orderToFeeRatio = signedOrder.makerAssetAmount.dividedToIntegerBy(signedOrder.makerFee);
- const expectedFillableAmount = new BigNumber(450980);
- calculator = new RemainingFillableCalculator(
- signedOrder.makerFee,
- signedOrder.makerAssetAmount,
- isMakeAssetZRX,
- transferrableMakeAssetAmount,
- transferrableMakerFeeTokenAmount,
- remainingMakeAssetAmount,
- );
- const calculatedFillableAmount = calculator.computeRemainingFillable();
- const numberOfFillsInRatio = calculatedFillableAmount.dividedToIntegerBy(orderToFeeRatio);
- const calculatedFillableAmountPlusFees = calculatedFillableAmount.plus(numberOfFillsInRatio);
- expect(calculatedFillableAmountPlusFees).to.be.bignumber.lessThan(transferrableMakeAssetAmount);
- expect(calculatedFillableAmountPlusFees).to.be.bignumber.lessThan(remainingMakeAssetAmount);
- expect(calculatedFillableAmount).to.be.bignumber.equal(expectedFillableAmount);
- expect(numberOfFillsInRatio.decimalPlaces()).to.be.equal(0);
- });
- });
-});
diff --git a/packages/order-utils/test/signature_utils_test.ts b/packages/order-utils/test/signature_utils_test.ts
deleted file mode 100644
index 937382056..000000000
--- a/packages/order-utils/test/signature_utils_test.ts
+++ /dev/null
@@ -1,324 +0,0 @@
-import { Order, SignatureType } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { JSONRPCErrorCallback, JSONRPCRequestPayload } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-import 'mocha';
-
-import { generatePseudoRandomSalt, orderHashUtils } from '../src';
-import { constants } from '../src/constants';
-import { signatureUtils } from '../src/signature_utils';
-
-import { chaiSetup } from './utils/chai_setup';
-import { provider, web3Wrapper } from './utils/web3_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('Signature utils', () => {
- let makerAddress: string;
- const fakeExchangeContractAddress = '0x1dc4c1cefef38a777b15aa20260a54e584b16c48';
- let order: Order;
- before(async () => {
- const availableAddreses = await web3Wrapper.getAvailableAddressesAsync();
- makerAddress = availableAddreses[0];
- order = {
- makerAddress,
- takerAddress: constants.NULL_ADDRESS,
- senderAddress: constants.NULL_ADDRESS,
- feeRecipientAddress: constants.NULL_ADDRESS,
- makerAssetData: constants.NULL_ADDRESS,
- takerAssetData: constants.NULL_ADDRESS,
- exchangeAddress: fakeExchangeContractAddress,
- salt: new BigNumber(0),
- makerFee: new BigNumber(0),
- takerFee: new BigNumber(0),
- makerAssetAmount: new BigNumber(0),
- takerAssetAmount: new BigNumber(0),
- expirationTimeSeconds: new BigNumber(0),
- };
- });
- describe('#isValidSignatureAsync', () => {
- let dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
- const ethSignSignature =
- '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403';
- let address = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
-
- it("should return false if the data doesn't pertain to the signature & address", async () => {
- const bytes32Zeros = '0x0000000000000000000000000000000000000000000000000000000000000000';
- expect(
- await signatureUtils.isValidSignatureAsync(provider, bytes32Zeros, ethSignSignature, address),
- ).to.be.false();
- });
- it("should return false if the address doesn't pertain to the signature & data", async () => {
- const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42';
- expect(
- await signatureUtils.isValidSignatureAsync(provider, dataHex, ethSignSignature, validUnrelatedAddress),
- ).to.be.false();
- });
- it("should return false if the signature doesn't pertain to the dataHex & address", async () => {
- const signatureArray = ethSignSignature.split('');
- // tslint:disable-next-line:custom-no-magic-numbers
- signatureArray[5] = 'C'; // V = 28, instead of 27
- const wrongSignature = signatureArray.join('');
- expect(
- await signatureUtils.isValidSignatureAsync(provider, dataHex, wrongSignature, address),
- ).to.be.false();
- });
-
- it('should throw if signatureType is invalid', () => {
- const signatureArray = ethSignSignature.split('');
- signatureArray[3] = '9'; // SignatureType w/ index 9 doesn't exist
- const signatureWithInvalidType = signatureArray.join('');
- expect(
- signatureUtils.isValidSignatureAsync(provider, dataHex, signatureWithInvalidType, address),
- ).to.be.rejected();
- });
-
- it('should return true for a valid Ecrecover (EthSign) signature', async () => {
- const isValidSignatureLocal = await signatureUtils.isValidSignatureAsync(
- provider,
- dataHex,
- ethSignSignature,
- address,
- );
- expect(isValidSignatureLocal).to.be.true();
- });
-
- it('should return true for a valid EIP712 signature', async () => {
- dataHex = '0xa1d7403bcbbcd75ec233cfd6584ff8dabed677d0e9bb32c2bea94e9dd8a109da';
- address = '0x6ecbe1db9ef729cbe972c83fb886247691fb6beb';
- const eip712Signature =
- '0x1bdde07aac4bf12c12ddbb155919c43eba4146a2cfcf904a862950dbebe332554c6674975603eb5a4eaf8fd7f2e06350267e5b36cda9851a89f8bb49fe2fc9afe202';
- const isValidSignatureLocal = await signatureUtils.isValidSignatureAsync(
- provider,
- dataHex,
- eip712Signature,
- address,
- );
- expect(isValidSignatureLocal).to.be.true();
- });
- });
- describe('#isValidECSignature', () => {
- const signature = {
- v: 27,
- r: '0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d64393',
- s: '0x46b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf2',
- };
- const data = '0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad';
- const address = '0x0e5cb767cce09a7f3ca594df118aa519be5e2b5a';
-
- it("should return false if the data doesn't pertain to the signature & address", async () => {
- expect(signatureUtils.isValidECSignature('0x0', signature, address)).to.be.false();
- });
- it("should return false if the address doesn't pertain to the signature & data", async () => {
- const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42';
- expect(signatureUtils.isValidECSignature(data, signature, validUnrelatedAddress)).to.be.false();
- });
- it("should return false if the signature doesn't pertain to the data & address", async () => {
- const wrongSignature = _.assign({}, signature, { v: 28 });
- expect(signatureUtils.isValidECSignature(data, wrongSignature, address)).to.be.false();
- });
- it('should return true if the signature does pertain to the data & address', async () => {
- const isValidSignatureLocal = signatureUtils.isValidECSignature(data, signature, address);
- expect(isValidSignatureLocal).to.be.true();
- });
- });
- describe('#generateSalt', () => {
- it('generates different salts', () => {
- const isEqual = generatePseudoRandomSalt().eq(generatePseudoRandomSalt());
- expect(isEqual).to.be.false();
- });
- it('generates salt in range [0..2^256)', () => {
- const salt = generatePseudoRandomSalt();
- expect(salt.isGreaterThanOrEqualTo(0)).to.be.true();
- // tslint:disable-next-line:custom-no-magic-numbers
- const twoPow256 = new BigNumber(2).pow(256);
- expect(salt.isLessThan(twoPow256)).to.be.true();
- });
- });
- describe('#ecSignOrderAsync', () => {
- it('should default to eth_sign if eth_signTypedData is unavailable', async () => {
- const expectedSignature =
- '0x1c3582f06356a1314dbf1c0e534c4d8e92e59b056ee607a7ff5a825f5f2cc5e6151c5cc7fdd420f5608e4d5bef108e42ad90c7a4b408caef32e24374cf387b0d7603';
-
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- if (payload.method === 'eth_signTypedData') {
- callback(new Error('Internal RPC Error'));
- } else if (payload.method === 'eth_sign') {
- const [address, message] = payload.params;
- const signature = await web3Wrapper.signMessageAsync(address, message);
- callback(null, {
- id: 42,
- jsonrpc: '2.0',
- result: signature,
- });
- } else {
- callback(null, { id: 42, jsonrpc: '2.0', result: [makerAddress] });
- }
- },
- };
- const signedOrder = await signatureUtils.ecSignOrderAsync(fakeProvider, order, makerAddress);
- expect(signedOrder.signature).to.equal(expectedSignature);
- });
- it('should throw if the user denies the signing request', async () => {
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- if (payload.method === 'eth_signTypedData') {
- callback(new Error('User denied message signature'));
- } else if (payload.method === 'eth_sign') {
- const [address, message] = payload.params;
- const signature = await web3Wrapper.signMessageAsync(address, message);
- callback(null, {
- id: 42,
- jsonrpc: '2.0',
- result: signature,
- });
- } else {
- callback(null, { id: 42, jsonrpc: '2.0', result: [makerAddress] });
- }
- },
- };
- expect(signatureUtils.ecSignOrderAsync(fakeProvider, order, makerAddress)).to.to.be.rejectedWith(
- 'User denied message signature',
- );
- });
- });
- describe('#ecSignHashAsync', () => {
- before(async () => {
- const availableAddreses = await web3Wrapper.getAvailableAddressesAsync();
- makerAddress = availableAddreses[0];
- });
- it('should return the correct Signature', async () => {
- const orderHash = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
- const expectedSignature =
- '0x1b61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403';
- const ecSignature = await signatureUtils.ecSignHashAsync(provider, orderHash, makerAddress);
- expect(ecSignature).to.equal(expectedSignature);
- });
- it('should return the correct Signature for signatureHex concatenated as R + S + V', async () => {
- const orderHash = '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004';
- const expectedSignature =
- '0x1b117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b03';
-
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- if (payload.method === 'eth_sign') {
- const [address, message] = payload.params;
- expect(message).to.equal(orderHash);
- const signature = await web3Wrapper.signMessageAsync(address, message);
- // tslint:disable-next-line:custom-no-magic-numbers
- const rsvHex = `0x${signature.substr(130)}${signature.substr(2, 128)}`;
- callback(null, {
- id: 42,
- jsonrpc: '2.0',
- result: rsvHex,
- });
- } else {
- callback(null, { id: 42, jsonrpc: '2.0', result: [makerAddress] });
- }
- },
- };
- const ecSignature = await signatureUtils.ecSignHashAsync(fakeProvider, orderHash, makerAddress);
- expect(ecSignature).to.equal(expectedSignature);
- });
- it('should return the correct Signature for signatureHex concatenated as V + R + S', async () => {
- const orderHash = '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004';
- const expectedSignature =
- '0x1b117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b03';
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- if (payload.method === 'eth_sign') {
- const [address, message] = payload.params;
- const signature = await web3Wrapper.signMessageAsync(address, message);
- callback(null, {
- id: 42,
- jsonrpc: '2.0',
- result: signature,
- });
- } else {
- callback(null, { id: 42, jsonrpc: '2.0', result: [makerAddress] });
- }
- },
- };
-
- const ecSignature = await signatureUtils.ecSignHashAsync(fakeProvider, orderHash, makerAddress);
- expect(ecSignature).to.equal(expectedSignature);
- });
- it('should return a valid signature', async () => {
- const orderHash = '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004';
- const ecSignature = await signatureUtils.ecSignHashAsync(provider, orderHash, makerAddress);
-
- const isValidSignature = await signatureUtils.isValidSignatureAsync(
- provider,
- orderHash,
- ecSignature,
- makerAddress,
- );
- expect(isValidSignature).to.be.true();
- });
- });
- describe('#ecSignTypedDataOrderAsync', () => {
- it('should result in the same signature as signing the order hash without an ethereum message prefix', async () => {
- // Note: Since order hash is an EIP712 hash the result of a valid EIP712 signature
- // of order hash is the same as signing the order without the Ethereum Message prefix.
- const orderHashHex = orderHashUtils.getOrderHashHex(order);
- const sig = ethUtil.ecsign(
- ethUtil.toBuffer(orderHashHex),
- Buffer.from('F2F48EE19680706196E2E339E5DA3491186E0C4C5030670656B0E0164837257D', 'hex'),
- );
- const signatureBuffer = Buffer.concat([
- ethUtil.toBuffer(sig.v),
- ethUtil.toBuffer(sig.r),
- ethUtil.toBuffer(sig.s),
- ethUtil.toBuffer(SignatureType.EIP712),
- ]);
- const signatureHex = `0x${signatureBuffer.toString('hex')}`;
- const signedOrder = await signatureUtils.ecSignTypedDataOrderAsync(provider, order, makerAddress);
- const isValidSignature = await signatureUtils.isValidSignatureAsync(
- provider,
- orderHashHex,
- signedOrder.signature,
- makerAddress,
- );
- expect(signatureHex).to.eq(signedOrder.signature);
- expect(isValidSignature).to.eq(true);
- });
- it('should return the correct Signature for signatureHex concatenated as R + S + V', async () => {
- const expectedSignature =
- '0x1cd472c439833774b55d248c31b6585f21aea1b9363ebb4ec58549e46b62eb5a6f696f5781f62de008ee7f77650ef940d99c97ec1dee67b3f5cea1bbfdfeb2eba602';
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- if (payload.method === 'eth_signTypedData') {
- const [address, typedData] = payload.params;
- const signature = await web3Wrapper.signTypedDataAsync(address, typedData);
- callback(null, {
- id: 42,
- jsonrpc: '2.0',
- result: signature,
- });
- } else {
- callback(null, { id: 42, jsonrpc: '2.0', result: [makerAddress] });
- }
- },
- };
- const signedOrder = await signatureUtils.ecSignTypedDataOrderAsync(fakeProvider, order, makerAddress);
- expect(signedOrder.signature).to.equal(expectedSignature);
- });
- });
- describe('#convertECSignatureToSignatureHex', () => {
- const ecSignature: ECSignature = {
- v: 27,
- r: '0xaca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d64393',
- s: '0x46b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf2',
- };
- it('should concatenate v,r,s and append the EthSign signature type', async () => {
- const expectedSignatureWithSignatureType =
- '0x1baca7da997ad177f040240cdccf6905b71ab16b74434388c3a72f34fd25d6439346b2bac274ff29b48b3ea6e2d04c1336eaceafda3c53ab483fc3ff12fac3ebf203';
- const signatureWithSignatureType = signatureUtils.convertECSignatureToSignatureHex(ecSignature);
- expect(signatureWithSignatureType).to.equal(expectedSignatureWithSignatureType);
- });
- });
-});
diff --git a/packages/order-utils/test/sorting_utils_test.ts b/packages/order-utils/test/sorting_utils_test.ts
deleted file mode 100644
index 0b8757496..000000000
--- a/packages/order-utils/test/sorting_utils_test.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { sortingUtils } from '../src';
-
-import { chaiSetup } from './utils/chai_setup';
-import { testOrderFactory } from './utils/test_order_factory';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('sortingUtils', () => {
- describe('#sortOrdersByFeeAdjustedRate', () => {
- const feeRate = new BigNumber(1); // ZRX costs 1 unit of takerAsset per 1 unit of ZRX
- // rate: 2 takerAsset / makerAsset
- const testOrder1 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(200),
- });
- // rate: 1 takerAsset / makerAsset
- const testOrder2 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(100),
- });
- // rate: 2.5 takerAsset / makerAsset
- const testOrder3 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(200),
- takerFee: new BigNumber(50),
- });
- it('correctly sorts by fee adjusted rate when feeRate is Provided', async () => {
- const orders = [testOrder1, testOrder2, testOrder3];
- const sortedOrders = sortingUtils.sortOrdersByFeeAdjustedRate(orders, feeRate);
- expect(sortedOrders).to.deep.equal([testOrder2, testOrder1, testOrder3]);
- });
- it('correctly sorts by fee adjusted rate when no feeRate is Provided', async () => {
- const orders = [testOrder1, testOrder2, testOrder3];
- const sortedOrders = sortingUtils.sortOrdersByFeeAdjustedRate(orders);
- expect(sortedOrders).to.deep.equal([testOrder2, testOrder1, testOrder3]);
- });
- });
- describe('#sortFeeOrdersByFeeAdjustedRate', () => {
- // rate: 200 takerAsset / makerAsset
- const testOrder1 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(200),
- takerFee: new BigNumber(99),
- });
- // rate: 1 takerAsset / makerAsset
- const testOrder2 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(100),
- });
- // rate: 4 takerAsset / makerAsset
- const testOrder3 = testOrderFactory.generateTestSignedOrder({
- makerAssetAmount: new BigNumber(100),
- takerAssetAmount: new BigNumber(200),
- takerFee: new BigNumber(50),
- });
- it('correctly sorts by fee adjusted rate', async () => {
- const orders = [testOrder1, testOrder2, testOrder3];
- const sortedOrders = sortingUtils.sortFeeOrdersByFeeAdjustedRate(orders);
- expect(sortedOrders).to.deep.equal([testOrder2, testOrder3, testOrder1]);
- });
- });
-});
diff --git a/packages/order-utils/test/utils/chai_setup.ts b/packages/order-utils/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/order-utils/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/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts b/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts
deleted file mode 100644
index d3ea8b456..000000000
--- a/packages/order-utils/test/utils/simple_erc20_balance_and_proxy_allowance_fetcher.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ERC20TokenContract } from '@0x/abi-gen-wrappers';
-import { BigNumber } from '@0x/utils';
-
-import { AbstractBalanceAndProxyAllowanceFetcher } from '../../src/abstract/abstract_balance_and_proxy_allowance_fetcher';
-
-export class SimpleERC20BalanceAndProxyAllowanceFetcher implements AbstractBalanceAndProxyAllowanceFetcher {
- private readonly _erc20TokenContract: ERC20TokenContract;
- private readonly _erc20ProxyAddress: string;
- constructor(erc20TokenWrapper: ERC20TokenContract, erc20ProxyAddress: string) {
- this._erc20TokenContract = erc20TokenWrapper;
- this._erc20ProxyAddress = erc20ProxyAddress;
- }
- public async getBalanceAsync(_assetData: string, userAddress: string): Promise<BigNumber> {
- // HACK: We cheat and don't pass in the assetData since it's always the same token used
- // in our tests.
- const balance = await this._erc20TokenContract.balanceOf.callAsync(userAddress);
- return balance;
- }
- public async getProxyAllowanceAsync(_assetData: string, userAddress: string): Promise<BigNumber> {
- // HACK: We cheat and don't pass in the assetData since it's always the same token used
- // in our tests.
- const proxyAllowance = await this._erc20TokenContract.allowance.callAsync(userAddress, this._erc20ProxyAddress);
- return proxyAllowance;
- }
-}
diff --git a/packages/order-utils/test/utils/test_order_factory.ts b/packages/order-utils/test/utils/test_order_factory.ts
deleted file mode 100644
index 4efe0b38e..000000000
--- a/packages/order-utils/test/utils/test_order_factory.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { Order, SignedOrder } from '@0x/types';
-import * as _ from 'lodash';
-
-import { constants } from '../../src/constants';
-import { orderFactory } from '../../src/order_factory';
-
-const BASE_TEST_ORDER: Order = orderFactory.createOrder(
- constants.NULL_ADDRESS,
- constants.ZERO_AMOUNT,
- constants.NULL_ERC20_ASSET_DATA,
- constants.ZERO_AMOUNT,
- constants.NULL_ERC20_ASSET_DATA,
- constants.NULL_ADDRESS,
-);
-const BASE_TEST_SIGNED_ORDER: SignedOrder = {
- ...BASE_TEST_ORDER,
- signature: constants.NULL_BYTES,
-};
-
-export const testOrderFactory = {
- generateTestSignedOrder(partialOrder: Partial<SignedOrder>): SignedOrder {
- return transformObject(BASE_TEST_SIGNED_ORDER, partialOrder);
- },
- generateTestSignedOrders(partialOrder: Partial<SignedOrder>, numOrders: number): SignedOrder[] {
- const baseTestOrders = _.map(_.range(numOrders), () => BASE_TEST_SIGNED_ORDER);
- return _.map(baseTestOrders, order => transformObject(order, partialOrder));
- },
-};
-
-function transformObject<T>(input: T, transformation: Partial<T>): T {
- const copy = _.cloneDeep(input);
- return _.assign(copy, transformation);
-}
diff --git a/packages/order-utils/test/utils/web3_wrapper.ts b/packages/order-utils/test/utils/web3_wrapper.ts
deleted file mode 100644
index accfcb7fe..000000000
--- a/packages/order-utils/test/utils/web3_wrapper.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { web3Factory } from '@0x/dev-utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-
-const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
-const web3Wrapper = new Web3Wrapper(provider);
-
-export { provider, web3Wrapper };
diff --git a/packages/order-utils/tsconfig.json b/packages/order-utils/tsconfig.json
deleted file mode 100644
index 718e623c7..000000000
--- a/packages/order-utils/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/order-utils/tslint.json b/packages/order-utils/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/order-utils/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/order-utils/typedoc-tsconfig.json b/packages/order-utils/typedoc-tsconfig.json
deleted file mode 100644
index b9c6b36f3..000000000
--- a/packages/order-utils/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/order-watcher/.npmignore b/packages/order-watcher/.npmignore
deleted file mode 100644
index ac4ab11f2..000000000
--- a/packages/order-watcher/.npmignore
+++ /dev/null
@@ -1,9 +0,0 @@
-.*
-tsconfig.json
-webpack.config.js
-yarn-error.log
-test/
-/src/
-/_bundles/
-/generated_docs/
-/scripts/
diff --git a/packages/order-watcher/CHANGELOG.json b/packages/order-watcher/CHANGELOG.json
deleted file mode 100644
index 585bb48e6..000000000
--- a/packages/order-watcher/CHANGELOG.json
+++ /dev/null
@@ -1,385 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547747677,
- "version": "2.4.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "2.4.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "2.4.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.4.0",
- "changes": [
- {
- "note": "Add support for `MultiAssetProxy`",
- "pr": 1363
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "2.3.0",
- "changes": [
- {
- "note": "Added a WebSocket interface to OrderWatcher so that it can be used by a client written in any language",
- "pr": 1427
- }
- ]
- },
- {
- "version": "2.2.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "2.2.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1543401373,
- "version": "2.2.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "2.2.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.2.4",
- "changes": [
- {
- "note": "Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX",
- "pr": 1259
- }
- ],
- "timestamp": 1542208198
- },
- {
- "version": "2.2.3",
- "changes": [
- {
- "note": "Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider",
- "pr": 1227
- },
- {
- "note": "Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event"
- }
- ],
- "timestamp": 1542134075
- },
- {
- "timestamp": 1542028948,
- "version": "2.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "2.2.0",
- "changes": [
- {
- "note": "Added getStats function and returns a Stats object",
- "pr": 1118
- },
- {
- "note": "Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter.",
- "pr": 1105
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "2.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "version": "2.1.0",
- "changes": [
- {
- "note": "Export ExpirationWatcher",
- "pr": 1097
- }
- ],
- "timestamp": 1538157789
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Fixes dropped events issue 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
- },
- {
- "note": "Add `transactionHash` to `OrderState` emitted by `OrderWatcher` subscriptions if the order's state change originated from a transaction.",
- "pr": 1087
- }
- ],
- "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
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "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 types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload`",
- "pr": 924
- },
- {
- "note": "Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order`",
- "pr": 924
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "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": "Add support for ERC721 event watching and Exchange V2 events",
- "pr": 887
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.7",
- "changes": [
- {
- "note": "Switch out simple getLogs polling with ethereumjs-blockstream",
- "pr": 825
- },
- {
- "note": "Do not stop subscription if error is encountered",
- "pr": 825
- },
- {
- "note": "Fixed a bug that caused the incorrect block to be fetched via JSON-RPC within Blockstream",
- "pr": 875
- },
- {
- "note": "Remove stateLayer config from OrderWatcher. It now always operates on the latest block",
- "pr": 875
- }
- ],
- "timestamp": 1531149657
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527617805,
- "version": "0.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527617227,
- "version": "0.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527616612,
- "version": "0.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527008794,
- "version": "0.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527008794,
- "version": "0.0.1",
- "changes": [
- {
- "note": "Moved OrderWatcher out of 0x.js package",
- "pr": 579
- }
- ]
- }
-]
diff --git a/packages/order-watcher/CHANGELOG.md b/packages/order-watcher/CHANGELOG.md
deleted file mode 100644
index df065866c..000000000
--- a/packages/order-watcher/CHANGELOG.md
+++ /dev/null
@@ -1,162 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.4.3 - _January 17, 2019_
-
- * Dependencies updated
-
-## v2.4.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v2.4.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v2.4.0 - _January 9, 2019_
-
- * Add support for `MultiAssetProxy` (#1363)
-
-## v2.3.0 - _Invalid date_
-
- * Added a WebSocket interface to OrderWatcher so that it can be used by a client written in any language (#1427)
-
-## v2.2.8 - _December 13, 2018_
-
- * Dependencies updated
-
-## v2.2.7 - _December 11, 2018_
-
- * Dependencies updated
-
-## v2.2.6 - _November 28, 2018_
-
- * Dependencies updated
-
-## v2.2.5 - _November 21, 2018_
-
- * Dependencies updated
-
-## v2.2.4 - _November 14, 2018_
-
- * Fix the bug when order watcher was throwing an error on order removal when maker token was ZRX (#1259)
-
-## v2.2.3 - _November 13, 2018_
-
- * Start jsonRpcRequestId at 1, not 0 as 0 breaks the web3.js websocket RPC provider (#1227)
- * Fix the bug when order watcher was trying to convert undefined to an object in case of CancelUpTo event
-
-## v2.2.2 - _November 12, 2018_
-
- * Dependencies updated
-
-## v2.2.1 - _November 9, 2018_
-
- * Dependencies updated
-
-## v2.2.0 - _October 18, 2018_
-
- * Added getStats function and returns a Stats object (#1118)
- * Updated to use new modularized artifacts and the latest version of @0xproject/contract-wrappers. Constructor has a new optional `contractAddresses` parameter. (#1105)
-
-## v2.1.1 - _October 4, 2018_
-
- * Dependencies updated
-
-## v2.1.0 - _September 28, 2018_
-
- * Export ExpirationWatcher (#1097)
-
-## v2.0.0 - _September 25, 2018_
-
- * Fixes dropped events issue 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)
- * Add `transactionHash` to `OrderState` emitted by `OrderWatcher` subscriptions if the order's state change originated from a transaction. (#1087)
-
-## 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.5 - _August 27, 2018_
-
- * Fix missing `BlockParamLiteral` type import issue
-
-## v1.0.1-rc.4 - _August 24, 2018_
-
- * Export types: `ExchangeContractErrs`, `OrderRelevantState`, `JSONRPCRequestPayload`, `JSONRPCErrorCallback` and `JSONRPCResponsePayload` (#924)
- * Remove exporting types: `BlockParamLiteral`, `BlockParam`, `Order` (#924)
-
-## v1.0.1-rc.3 - _August 14, 2018_
-
- * Dependencies updated
-
-## 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_
-
- * Add support for ERC721 event watching and Exchange V2 events (#887)
-
-## v0.0.8 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.0.7 - _July 9, 2018_
-
- * Switch out simple getLogs polling with ethereumjs-blockstream (#825)
- * Do not stop subscription if error is encountered (#825)
- * Fixed a bug that caused the incorrect block to be fetched via JSON-RPC within Blockstream (#875)
- * Remove stateLayer config from OrderWatcher. It now always operates on the latest block (#875)
-
-## v0.0.6 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.5 - _May 29, 2018_
-
- * Dependencies updated
-
-## v0.0.4 - _May 29, 2018_
-
- * Dependencies updated
-
-## v0.0.3 - _May 29, 2018_
-
- * Dependencies updated
-
-## v0.0.2 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.0.1 - _May 22, 2018_
-
- * Moved OrderWatcher out of 0x.js package (#579)
diff --git a/packages/order-watcher/Dockerfile b/packages/order-watcher/Dockerfile
deleted file mode 100644
index 3ffa1b72f..000000000
--- a/packages/order-watcher/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM node
-
-WORKDIR /order-watcher
-
-COPY package.json .
-RUN npm i
-RUN npm install forever -g
-
-COPY . .
-
-EXPOSE 8080
-
-CMD ["forever", "./lib/src/server.js"]
diff --git a/packages/order-watcher/README.md b/packages/order-watcher/README.md
deleted file mode 100644
index a841775b6..000000000
--- a/packages/order-watcher/README.md
+++ /dev/null
@@ -1,167 +0,0 @@
-## OrderWatcher
-
-An order watcher daemon that watches for order validity.
-
-#### Read the wiki [article](https://0xproject.com/wiki#0x-OrderWatcher).
-
-OrderWatcher also comes with a WebSocket server to provide language-agnostic access
-to order watching functionality. We used the [WebSocket Client and Server Implementation for Node](https://www.npmjs.com/package/websocket). The server sends and receives messages that conform to the [JSON RPC specifications](https://www.jsonrpc.org/specification).
-
-## Installation
-
-**Install**
-
-```bash
-npm install @0x/order-watcher --save
-```
-
-**Import**
-
-```javascript
-import { OrderWatcher } from '@0x/order-watcher';
-```
-
-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"],
-}
-```
-
-## Using the WebSocket Server
-
-**Setup**
-
-**Environmental Variables**
-Several environmental variables can be set to configure the server:
-
-- `ORDER_WATCHER_HTTP_PORT` specifies the port that the http server will listen on
- and accept connections from. When this is not set, we default to 8080.
-
-**Requests**
-The server accepts three types of requests: `ADD_ORDER`, `REMOVE_ORDER` and `GET_STATS`. These mirror what the underlying OrderWatcher does. You can read more in the [wiki](https://0xproject.com/wiki#0x-OrderWatcher). Unlike the OrderWatcher, it does not expose any `subscribe` or `unsubscribe` functionality because the WebSocket server keeps a single subscription open for all clients.
-
-The first step for making a request is establishing a connection with the server. In Javascript:
-
-```
-var W3CWebSocket = require('websocket').w3cwebsocket;
-wsClient = new W3CWebSocket('ws://127.0.0.1:8080');
-```
-
-In Python, you could use the [websocket-client library](http://pypi.python.org/pypi/websocket-client/) and run:
-
-```
-from websocket import create_connection
-wsClient = create_connection("ws://127.0.0.1:8080")
-```
-
-With the connection established, you prepare the payload for your request. The payload is a json object with a format established by the [JSON RPC specification](https://www.jsonrpc.org/specification):
-
-- `id`: All requests require you to specify a numerical `id`. When the server responds to the request, the response will have the same `id` as the one supplied with your request.
-- `jsonrpc`: This is always the string `'2.0'`.
-- `method`: This specifies the OrderWatcher method you want to call. I.e., `'ADD_ORDER'`, `'REMOVE_ORDER'` or `'GET_STATS'`.
-- `params`: These contain the parameters needed by OrderWatcher to execute the method you called. For `ADD_ORDER`, provide `{ signedOrder: <your signedOrder> }`. For `REMOVE_ORDER`, provide `{ orderHash: <your orderHash> }`. For `GET_STATS`, no parameters are needed, so you may leave this empty.
-
-Next, convert the payload to a string and send it through the connection.
-In Javascript:
-
-```
-const addOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'ADD_ORDER',
- params: { signedOrder: <your signedOrder> },
-};
-wsClient.send(JSON.stringify(addOrderPayload));
-```
-
-In Python:
-
-```
-import json
-remove_order_payload = {
- 'id': 1,
- 'jsonrpc': '2.0',
- 'method': 'REMOVE_ORDER',
- 'params': {'orderHash': '0x6edc16bf37fde79f5012088c33784c730e2f103d9ab1caf73060c386ad107b7e'},
-}
-wsClient.send(json.dumps(remove_order_payload));
-```
-
-**Response**
-The server responds to all requests in a similar format. In the data field, you'll find another object containing the following fields:
-
-- `id`: The id corresponding to the request that the server is responding to. `UPDATE` responses are not based on any requests so the `id` field is omitted`.
-- `jsonrpc`: Always `'2.0'`.
-- `method`: The method the server is responding to. Eg. `ADD_ORDER`. When order states change the server may also initiate a response. In this case, method will be listed as `UPDATE`.
-- `result`: This field varies based on the method. `UPDATE` responses contain the new order state. `GET_STATS` responses contain the current order count. When there are errors, this field is omitted.
-- `error`: When there is an error executing a request, the [JSON RPC](https://www.jsonrpc.org/specification) error object is listed here. When the server responds successfully, this field is omitted.
-
-In Javascript, the responses can be parsed using the `onmessage` callback:
-
-```
-wsClient.onmessage = (msg) => {
- const responseData = JSON.parse(msg.data);
- const method = responseData.method
-};
-```
-
-In Python, `recv` is a lightweight way to receive a response:
-
-```
-result = wsClient.recv()
-method = result.method
-```
-
-## 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/order-watcher yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/order-watcher yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/order-watcher/coverage/.gitkeep b/packages/order-watcher/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/order-watcher/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/order-watcher/package.json b/packages/order-watcher/package.json
deleted file mode 100644
index 895c64813..000000000
--- a/packages/order-watcher/package.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "name": "@0x/order-watcher",
- "version": "2.4.3",
- "description": "An order watcher daemon that watches for order validity",
- "keywords": [
- "0x",
- "0xproject",
- "ethereum",
- "exchange",
- "orderbook"
- ],
- "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: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": {
- "dockerHubRepo": "order-watcher"
- }
- },
- "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/bintrees": "^1.0.2",
- "@types/lodash": "4.14.104",
- "@types/mocha": "^2.2.42",
- "@types/node": "*",
- "@types/sinon": "^2.2.2",
- "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",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/abi-gen-wrappers": "^2.2.0",
- "@0x/assert": "^1.0.23",
- "@0x/base-contract": "^3.0.13",
- "@0x/contract-addresses": "^2.2.0",
- "@0x/contract-artifacts": "^1.3.0",
- "@0x/contract-wrappers": "^5.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",
- "bintrees": "^1.0.2",
- "ethereum-types": "^1.1.6",
- "ethereumjs-blockstream": "6.0.0",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5",
- "websocket": "^1.0.25"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/order-watcher/src/index.ts b/packages/order-watcher/src/index.ts
deleted file mode 100644
index 1f4e5eff1..000000000
--- a/packages/order-watcher/src/index.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-export { OrderWatcher } from './order_watcher/order_watcher';
-export { OrderWatcherWebSocketServer } from './order_watcher/order_watcher_web_socket_server';
-export { ExpirationWatcher } from './order_watcher/expiration_watcher';
-
-export {
- OrderStateValid,
- OrderStateInvalid,
- OrderState,
- ExchangeContractErrs,
- ObjectMap,
- OrderRelevantState,
- Stats,
-} from '@0x/types';
-
-export { OnOrderStateChangeCallback, OrderWatcherConfig } from './types';
-
-export { ContractAddresses } from '@0x/contract-addresses';
-export { SignedOrder } from '@0x/types';
-export {
- JSONRPCRequestPayload,
- JSONRPCErrorCallback,
- Provider,
- JSONRPCResponsePayload,
- JSONRPCResponseError,
-} from 'ethereum-types';
diff --git a/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts b/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts
deleted file mode 100644
index 2ea796947..000000000
--- a/packages/order-watcher/src/order_watcher/collision_resistant_abi_decoder.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { AbiDecoder } from '@0x/utils';
-import { ContractAbi, DecodedLogArgs, LogEntry, LogWithDecodedArgs, RawLog } from 'ethereum-types';
-
-const TOKEN_TYPE_COLLISION = `Token can't be marked as ERC20 and ERC721 at the same time`;
-
-/**
- * ERC20 and ERC721 have some events with different args but colliding signature.
- * For exmaple:
- * Transfer(_from address, _to address, _value uint256)
- * Transfer(_from address, _to address, _tokenId uint256)
- * Both have the signature:
- * Transfer(address,address,uint256)
- *
- * In order to correctly decode those events we need to know the token type by address in advance.
- * You can pass it by calling `this.addERC20Token(address)` or `this.addERC721Token(address)`
- */
-export class CollisionResistanceAbiDecoder {
- private readonly _erc20AbiDecoder: AbiDecoder;
- private readonly _erc721AbiDecoder: AbiDecoder;
- private readonly _restAbiDecoder: AbiDecoder;
- private readonly _knownERC20Tokens = new Set();
- private readonly _knownERC721Tokens = new Set();
- constructor(erc20Abi: ContractAbi, erc721Abi: ContractAbi, abis: ContractAbi[]) {
- this._erc20AbiDecoder = new AbiDecoder([erc20Abi]);
- this._erc721AbiDecoder = new AbiDecoder([erc721Abi]);
- this._restAbiDecoder = new AbiDecoder(abis);
- }
- public tryToDecodeLogOrNoop<ArgsType extends DecodedLogArgs>(log: LogEntry): LogWithDecodedArgs<ArgsType> | RawLog {
- if (this._knownERC20Tokens.has(log.address)) {
- const maybeDecodedERC20Log = this._erc20AbiDecoder.tryToDecodeLogOrNoop(log);
- return maybeDecodedERC20Log;
- } else if (this._knownERC721Tokens.has(log.address)) {
- const maybeDecodedERC721Log = this._erc721AbiDecoder.tryToDecodeLogOrNoop(log);
- return maybeDecodedERC721Log;
- } else {
- const maybeDecodedLog = this._restAbiDecoder.tryToDecodeLogOrNoop(log);
- return maybeDecodedLog;
- }
- }
- // Hints the ABI decoder that a particular token address is ERC20 and events from it should be decoded as ERC20 events
- public addERC20Token(address: string): void {
- if (this._knownERC721Tokens.has(address)) {
- throw new Error(TOKEN_TYPE_COLLISION);
- }
- this._knownERC20Tokens.add(address);
- }
- // Hints the ABI decoder that a particular token address is ERC721 and events from it should be decoded as ERC721 events
- public addERC721Token(address: string): void {
- if (this._knownERC20Tokens.has(address)) {
- throw new Error(TOKEN_TYPE_COLLISION);
- }
- this._knownERC721Tokens.add(address);
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts b/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts
deleted file mode 100644
index d1085014c..000000000
--- a/packages/order-watcher/src/order_watcher/dependent_order_hashes_tracker.ts
+++ /dev/null
@@ -1,243 +0,0 @@
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { AssetProxyId, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-export interface OrderHashesByMakerAddress {
- [makerAddress: string]: Set<string>;
-}
-
-export interface OrderHashesByERC20ByMakerAddress {
- [makerAddress: string]: {
- [erc20TokenAddress: string]: Set<string>;
- };
-}
-
-export interface OrderHashesByERC721AddressByTokenIdByMakerAddress {
- [makerAddress: string]: {
- [erc721TokenAddress: string]: {
- // Ideally erc721TokenId should be a BigNumber, but it's not a valid index type so we just convert it to a string before using it as an index
- [erc721TokenId: string]: Set<string>;
- };
- };
-}
-
-/**
- */
-export class DependentOrderHashesTracker {
- private readonly _zrxTokenAddress: string;
- // `_orderHashesByMakerAddress` is redundant and could be generated from
- // `_orderHashesByERC20ByMakerAddress` and `_orderHashesByERC721AddressByTokenIdByMakerAddress`
- // on the fly by merging all the entries together but it's more complex and computationally heavy.
- // We might change that in future if we're move memory-constrained.
- private readonly _orderHashesByMakerAddress: OrderHashesByMakerAddress = {};
- private readonly _orderHashesByERC20ByMakerAddress: OrderHashesByERC20ByMakerAddress = {};
- private readonly _orderHashesByERC721AddressByTokenIdByMakerAddress: OrderHashesByERC721AddressByTokenIdByMakerAddress = {};
- constructor(zrxTokenAddress: string) {
- this._zrxTokenAddress = zrxTokenAddress;
- }
- public getDependentOrderHashesByERC721ByMaker(makerAddress: string, tokenAddress: string): string[] {
- const orderHashSets = _.values(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[makerAddress][tokenAddress],
- );
- const orderHashList = _.reduce(
- orderHashSets,
- (accumulator, orderHashSet) => [...accumulator, ...orderHashSet],
- [] as string[],
- );
- const uniqueOrderHashList = _.uniq(orderHashList);
- return uniqueOrderHashList;
- }
- public getDependentOrderHashesByMaker(makerAddress: string): string[] {
- const dependentOrderHashes = Array.from(this._orderHashesByMakerAddress[makerAddress] || {});
- return dependentOrderHashes;
- }
- public getDependentOrderHashesByAssetDataByMaker(makerAddress: string, assetData: string): string[] {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- const dependentOrderHashes =
- decodedAssetData.assetProxyId === AssetProxyId.ERC20
- ? this._getDependentOrderHashesByERC20AssetData(makerAddress, assetData)
- : this._getDependentOrderHashesByERC721AssetData(makerAddress, assetData);
- return dependentOrderHashes;
- }
- public addToDependentOrderHashes(signedOrder: SignedOrder): void {
- this._addAssetDataToDependentOrderHashes(signedOrder, signedOrder.makerAssetData);
- this._addToERC20DependentOrderHashes(signedOrder, this._zrxTokenAddress);
- this._addToMakerDependentOrderHashes(signedOrder);
- }
- public removeFromDependentOrderHashes(signedOrder: SignedOrder): void {
- this._removeAssetDataFromDependentOrderHashes(signedOrder, signedOrder.makerAssetData);
- // If makerToken === ZRX then we already removed it and we don't need to remove it again.
- const decodedMakerAssetData = assetDataUtils.decodeAssetDataOrThrow(signedOrder.makerAssetData);
- if (
- assetDataUtils.isERC20AssetData(decodedMakerAssetData) &&
- decodedMakerAssetData.tokenAddress !== this._zrxTokenAddress
- ) {
- this._removeFromERC20DependentOrderhashes(signedOrder, this._zrxTokenAddress);
- }
- this._removeFromMakerDependentOrderhashes(signedOrder);
- }
- private _getDependentOrderHashesByERC20AssetData(makerAddress: string, erc20AssetData: string): string[] {
- const tokenAddress = assetDataUtils.decodeERC20AssetData(erc20AssetData).tokenAddress;
- let dependentOrderHashes: string[] = [];
- if (
- !_.isUndefined(this._orderHashesByERC20ByMakerAddress[makerAddress]) &&
- !_.isUndefined(this._orderHashesByERC20ByMakerAddress[makerAddress][tokenAddress])
- ) {
- dependentOrderHashes = Array.from(this._orderHashesByERC20ByMakerAddress[makerAddress][tokenAddress]);
- }
- return dependentOrderHashes;
- }
- private _getDependentOrderHashesByERC721AssetData(makerAddress: string, erc721AssetData: string): string[] {
- const tokenAddress = assetDataUtils.decodeERC721AssetData(erc721AssetData).tokenAddress;
- const tokenId = assetDataUtils.decodeERC721AssetData(erc721AssetData).tokenId;
- let dependentOrderHashes: string[] = [];
- if (
- !_.isUndefined(this._orderHashesByERC721AddressByTokenIdByMakerAddress[makerAddress]) &&
- !_.isUndefined(this._orderHashesByERC721AddressByTokenIdByMakerAddress[makerAddress][tokenAddress]) &&
- !_.isUndefined(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[makerAddress][tokenAddress][tokenId.toString()],
- )
- ) {
- dependentOrderHashes = Array.from(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[makerAddress][tokenAddress][tokenId.toString()],
- );
- }
- return dependentOrderHashes;
- }
- private _addToERC20DependentOrderHashes(signedOrder: SignedOrder, erc20TokenAddress: string): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- if (_.isUndefined(this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress])) {
- this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress] = {};
- }
- if (_.isUndefined(this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress])) {
- this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress] = new Set();
- }
- this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress].add(orderHash);
- }
- private _addToERC721DependentOrderHashes(
- signedOrder: SignedOrder,
- erc721TokenAddress: string,
- tokenId: BigNumber,
- ): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- if (_.isUndefined(this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress])) {
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress] = {};
- }
-
- if (
- _.isUndefined(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress],
- )
- ) {
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress] = {};
- }
-
- if (
- _.isUndefined(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress][
- tokenId.toString()
- ],
- )
- ) {
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress][
- tokenId.toString()
- ] = new Set();
- }
-
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress][
- tokenId.toString()
- ].add(orderHash);
- }
- private _addAssetDataToDependentOrderHashes(signedOrder: SignedOrder, assetData: string): void {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- if (assetDataUtils.isERC20AssetData(decodedAssetData)) {
- this._addToERC20DependentOrderHashes(signedOrder, decodedAssetData.tokenAddress);
- } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) {
- this._addToERC721DependentOrderHashes(signedOrder, decodedAssetData.tokenAddress, decodedAssetData.tokenId);
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- _.each(decodedAssetData.nestedAssetData, nestedAssetDataElement =>
- this._addAssetDataToDependentOrderHashes(signedOrder, nestedAssetDataElement),
- );
- }
- }
- private _addToMakerDependentOrderHashes(signedOrder: SignedOrder): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- if (_.isUndefined(this._orderHashesByMakerAddress[signedOrder.makerAddress])) {
- this._orderHashesByMakerAddress[signedOrder.makerAddress] = new Set();
- }
- this._orderHashesByMakerAddress[signedOrder.makerAddress].add(orderHash);
- }
- private _removeFromERC20DependentOrderhashes(signedOrder: SignedOrder, erc20TokenAddress: string): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress].delete(orderHash);
-
- if (_.isEmpty(this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress])) {
- delete this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][erc20TokenAddress];
- }
-
- if (_.isEmpty(this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress])) {
- delete this._orderHashesByERC20ByMakerAddress[signedOrder.makerAddress];
- }
- }
- private _removeFromERC721DependentOrderhashes(
- signedOrder: SignedOrder,
- erc721TokenAddress: string,
- tokenId: BigNumber,
- ): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress][
- tokenId.toString()
- ].delete(orderHash);
-
- if (
- _.isEmpty(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress][
- tokenId.toString()
- ],
- )
- ) {
- delete this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][
- erc721TokenAddress
- ][tokenId.toString()];
- }
-
- if (
- _.isEmpty(
- this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][erc721TokenAddress],
- )
- ) {
- delete this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress][
- erc721TokenAddress
- ];
- }
-
- if (_.isEmpty(this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress])) {
- delete this._orderHashesByERC721AddressByTokenIdByMakerAddress[signedOrder.makerAddress];
- }
- }
- private _removeFromMakerDependentOrderhashes(signedOrder: SignedOrder): void {
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- this._orderHashesByMakerAddress[signedOrder.makerAddress].delete(orderHash);
-
- if (_.isEmpty(this._orderHashesByMakerAddress[signedOrder.makerAddress])) {
- delete this._orderHashesByMakerAddress[signedOrder.makerAddress];
- }
- }
- private _removeAssetDataFromDependentOrderHashes(signedOrder: SignedOrder, assetData: string): void {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- if (assetDataUtils.isERC20AssetData(decodedAssetData)) {
- this._removeFromERC20DependentOrderhashes(signedOrder, decodedAssetData.tokenAddress);
- } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) {
- this._removeFromERC721DependentOrderhashes(
- signedOrder,
- decodedAssetData.tokenAddress,
- decodedAssetData.tokenId,
- );
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- _.each(decodedAssetData.nestedAssetData, nestedAssetDataElement =>
- this._removeAssetDataFromDependentOrderHashes(signedOrder, nestedAssetDataElement),
- );
- }
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/event_watcher.ts b/packages/order-watcher/src/order_watcher/event_watcher.ts
deleted file mode 100644
index 3149d858b..000000000
--- a/packages/order-watcher/src/order_watcher/event_watcher.ts
+++ /dev/null
@@ -1,158 +0,0 @@
-import { intervalUtils, logUtils } from '@0x/utils';
-import { marshaller, Web3Wrapper } from '@0x/web3-wrapper';
-import { BlockParamLiteral, FilterObject, LogEntry, Provider, RawLogEntry } from 'ethereum-types';
-import { Block, BlockAndLogStreamer, Log } from 'ethereumjs-blockstream';
-import * as _ from 'lodash';
-
-import { EventWatcherCallback, OrderWatcherError } from '../types';
-import { assert } from '../utils/assert';
-
-const DEFAULT_EVENT_POLLING_INTERVAL_MS = 200;
-
-enum LogEventState {
- Removed,
- Added,
-}
-
-/**
- * The EventWatcher watches for blockchain events at the specified block confirmation
- * depth.
- */
-export class EventWatcher {
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _isVerbose: boolean;
- private _blockAndLogStreamerIfExists: BlockAndLogStreamer<Block, Log> | undefined;
- private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
- private _onLogAddedSubscriptionToken: string | undefined;
- private _onLogRemovedSubscriptionToken: string | undefined;
- private readonly _pollingIntervalMs: number;
- constructor(
- provider: Provider,
- pollingIntervalIfExistsMs: undefined | number,
- stateLayer: BlockParamLiteral,
- isVerbose: boolean,
- ) {
- this._isVerbose = isVerbose;
- this._web3Wrapper = new Web3Wrapper(provider);
- this._pollingIntervalMs = _.isUndefined(pollingIntervalIfExistsMs)
- ? DEFAULT_EVENT_POLLING_INTERVAL_MS
- : pollingIntervalIfExistsMs;
- this._blockAndLogStreamerIfExists = undefined;
- this._blockAndLogStreamIntervalIfExists = undefined;
- this._onLogAddedSubscriptionToken = undefined;
- this._onLogRemovedSubscriptionToken = undefined;
- }
- public subscribe(callback: EventWatcherCallback): void {
- assert.isFunction('callback', callback);
- if (!_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
- }
- this._startBlockAndLogStream(callback);
- }
- public unsubscribe(): void {
- if (_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionNotFound);
- }
- this._stopBlockAndLogStream();
- }
- private _startBlockAndLogStream(callback: EventWatcherCallback): void {
- if (!_.isUndefined(this._blockAndLogStreamerIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
- }
- this._blockAndLogStreamerIfExists = new BlockAndLogStreamer(
- this._blockstreamGetBlockOrNullAsync.bind(this),
- this._blockstreamGetLogsAsync.bind(this),
- this._onBlockAndLogStreamerError.bind(this),
- );
- const catchAllLogFilter = {};
- this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);
- this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
- this._reconcileBlockAsync.bind(this),
- this._pollingIntervalMs,
- this._onBlockAndLogStreamerError.bind(this),
- );
- let isRemoved = false;
- this._onLogAddedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogAdded(
- this._onLogStateChangedAsync.bind(this, callback, isRemoved),
- );
- isRemoved = true;
- this._onLogRemovedSubscriptionToken = this._blockAndLogStreamerIfExists.subscribeToOnLogRemoved(
- this._onLogStateChangedAsync.bind(this, callback, isRemoved),
- );
- }
- // This method only exists in order to comply with the expected interface of Blockstream's constructor
- private async _blockstreamGetBlockOrNullAsync(hash: string): Promise<Block | null> {
- const shouldIncludeTransactionData = false;
- const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
- 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<Block | null> {
- const shouldIncludeTransactionData = false;
- const blockOrNull = await this._web3Wrapper.sendRawPayloadAsync<Block | null>({
- 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<RawLogEntry[]> {
- const logs = await this._web3Wrapper.sendRawPayloadAsync<RawLogEntry[]>({
- method: 'eth_getLogs',
- params: [filterOptions],
- });
- return logs as RawLogEntry[];
- }
- private _stopBlockAndLogStream(): void {
- if (_.isUndefined(this._blockAndLogStreamerIfExists)) {
- throw new Error(OrderWatcherError.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;
- delete this._blockAndLogStreamIntervalIfExists;
- }
- private async _onLogStateChangedAsync(
- callback: EventWatcherCallback,
- isRemoved: boolean,
- rawLog: RawLogEntry,
- ): Promise<void> {
- const log: LogEntry = marshaller.unmarshalLog(rawLog);
- await this._emitDifferencesAsync(log, isRemoved ? LogEventState.Removed : LogEventState.Added, callback);
- }
- private async _reconcileBlockAsync(): Promise<void> {
- 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);
- }
- }
- private async _emitDifferencesAsync(
- log: LogEntry,
- logEventState: LogEventState,
- callback: EventWatcherCallback,
- ): Promise<void> {
- const logEvent = {
- removed: logEventState === LogEventState.Removed,
- ...log,
- };
- if (!_.isUndefined(this._blockAndLogStreamIntervalIfExists)) {
- callback(null, logEvent);
- }
- }
- private _onBlockAndLogStreamerError(err: Error): void {
- // Since Blockstream errors are all recoverable, we simply log them if the verbose
- // config is passed in.
- if (this._isVerbose) {
- logUtils.warn(err);
- }
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/expiration_watcher.ts b/packages/order-watcher/src/order_watcher/expiration_watcher.ts
deleted file mode 100644
index 82590efde..000000000
--- a/packages/order-watcher/src/order_watcher/expiration_watcher.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { BigNumber, intervalUtils } from '@0x/utils';
-import { RBTree } from 'bintrees';
-import * as _ from 'lodash';
-
-import { OrderWatcherError } from '../types';
-import { utils } from '../utils/utils';
-
-const DEFAULT_EXPIRATION_MARGIN_MS = 0;
-const DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS = 50;
-
-/**
- * This class includes the functionality to detect expired orders.
- * It stores them in a min heap by expiration time and checks for expired ones every `orderExpirationCheckingIntervalMs`
- */
-export class ExpirationWatcher {
- private readonly _orderHashByExpirationRBTree: RBTree<string>;
- private readonly _expiration: { [orderHash: string]: BigNumber } = {};
- private readonly _orderExpirationCheckingIntervalMs: number;
- private readonly _expirationMarginMs: number;
- private _orderExpirationCheckingIntervalIdIfExists?: NodeJS.Timer;
- constructor(expirationMarginIfExistsMs?: number, orderExpirationCheckingIntervalIfExistsMs?: number) {
- this._orderExpirationCheckingIntervalMs =
- orderExpirationCheckingIntervalIfExistsMs || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
- this._expirationMarginMs = expirationMarginIfExistsMs || DEFAULT_EXPIRATION_MARGIN_MS;
- this._orderExpirationCheckingIntervalMs =
- expirationMarginIfExistsMs || DEFAULT_ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
- const comparator = (lhsOrderHash: string, rhsOrderHash: string) => {
- const lhsExpiration = this._expiration[lhsOrderHash].toNumber();
- const rhsExpiration = this._expiration[rhsOrderHash].toNumber();
- if (lhsExpiration !== rhsExpiration) {
- return lhsExpiration - rhsExpiration;
- } else {
- // HACK: If two orders have identical expirations, the order in which they are emitted by the
- // ExpirationWatcher does not matter, so we emit them in alphabetical order by orderHash.
- return lhsOrderHash.localeCompare(rhsOrderHash);
- }
- };
- this._orderHashByExpirationRBTree = new RBTree(comparator);
- }
- public subscribe(callback: (orderHash: string) => void): void {
- if (!_.isUndefined(this._orderExpirationCheckingIntervalIdIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
- }
- this._orderExpirationCheckingIntervalIdIfExists = intervalUtils.setInterval(
- this._pruneExpiredOrders.bind(this, callback),
- this._orderExpirationCheckingIntervalMs,
- _.noop.bind(_), // _pruneExpiredOrders never throws
- );
- }
- public unsubscribe(): void {
- if (_.isUndefined(this._orderExpirationCheckingIntervalIdIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionNotFound);
- }
- intervalUtils.clearInterval(this._orderExpirationCheckingIntervalIdIfExists);
- delete this._orderExpirationCheckingIntervalIdIfExists;
- }
- public addOrder(orderHash: string, expirationUnixTimestampMs: BigNumber): void {
- this._expiration[orderHash] = expirationUnixTimestampMs;
- this._orderHashByExpirationRBTree.insert(orderHash);
- }
- public removeOrder(orderHash: string): void {
- if (_.isUndefined(this._expiration[orderHash])) {
- return; // noop since order already removed
- }
- this._orderHashByExpirationRBTree.remove(orderHash);
- delete this._expiration[orderHash];
- }
- private _pruneExpiredOrders(callback: (orderHash: string) => void): void {
- const currentUnixTimestampMs = utils.getCurrentUnixTimestampMs();
- while (true) {
- const hasNoTrackedOrders = this._orderHashByExpirationRBTree.size === 0;
- if (hasNoTrackedOrders) {
- break;
- }
- const nextOrderHashToExpire = this._orderHashByExpirationRBTree.min();
- const hasNoExpiredOrders = this._expiration[nextOrderHashToExpire].isGreaterThan(
- currentUnixTimestampMs.plus(this._expirationMarginMs),
- );
- const isSubscriptionActive = _.isUndefined(this._orderExpirationCheckingIntervalIdIfExists);
- if (hasNoExpiredOrders || isSubscriptionActive) {
- break;
- }
- const orderHash = this._orderHashByExpirationRBTree.min();
- this._orderHashByExpirationRBTree.remove(orderHash);
- delete this._expiration[orderHash];
- callback(orderHash);
- }
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
deleted file mode 100644
index a06fd0cfe..000000000
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ /dev/null
@@ -1,490 +0,0 @@
-// tslint:disable:no-unnecessary-type-assertion
-import { ContractAddresses } from '@0x/contract-addresses';
-import * as artifacts from '@0x/contract-artifacts';
-import {
- AssetBalanceAndProxyAllowanceFetcher,
- ContractWrappers,
- ERC20TokenApprovalEventArgs,
- ERC20TokenEventArgs,
- ERC20TokenEvents,
- ERC20TokenTransferEventArgs,
- ERC721TokenApprovalEventArgs,
- ERC721TokenApprovalForAllEventArgs,
- ERC721TokenEventArgs,
- ERC721TokenEvents,
- ERC721TokenTransferEventArgs,
- ExchangeCancelEventArgs,
- ExchangeCancelUpToEventArgs,
- ExchangeEventArgs,
- ExchangeEvents,
- ExchangeFillEventArgs,
- OrderFilledCancelledFetcher,
- WETH9DepositEventArgs,
- WETH9EventArgs,
- WETH9Events,
- WETH9WithdrawalEventArgs,
-} from '@0x/contract-wrappers';
-import { schemas } from '@0x/json-schemas';
-import {
- assetDataUtils,
- BalanceAndProxyAllowanceLazyStore,
- OrderFilledCancelledLazyStore,
- orderHashUtils,
- OrderStateUtils,
-} from '@0x/order-utils';
-import { AssetProxyId, ExchangeContractErrs, OrderState, SignedOrder, Stats } from '@0x/types';
-import { errorUtils, intervalUtils } from '@0x/utils';
-import { BlockParamLiteral, LogEntryEvent, LogWithDecodedArgs, Provider } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { orderWatcherPartialConfigSchema } from '../schemas/order_watcher_partial_config_schema';
-import { OnOrderStateChangeCallback, OrderWatcherConfig, OrderWatcherError } from '../types';
-import { assert } from '../utils/assert';
-
-import { CollisionResistanceAbiDecoder } from './collision_resistant_abi_decoder';
-import { DependentOrderHashesTracker } from './dependent_order_hashes_tracker';
-import { EventWatcher } from './event_watcher';
-import { ExpirationWatcher } from './expiration_watcher';
-
-const MILLISECONDS_IN_A_SECOND = 1000;
-
-type ContractEventArgs = WETH9EventArgs | ExchangeEventArgs | ERC20TokenEventArgs | ERC721TokenEventArgs;
-
-interface OrderByOrderHash {
- [orderHash: string]: SignedOrder;
-}
-
-interface OrderStateByOrderHash {
- [orderHash: string]: OrderState;
-}
-
-const DEFAULT_ORDER_WATCHER_CONFIG: OrderWatcherConfig = {
- orderExpirationCheckingIntervalMs: 50,
- eventPollingIntervalMs: 200,
- expirationMarginMs: 0,
- // tslint:disable-next-line:custom-no-magic-numbers
- cleanupJobIntervalMs: 1000 * 60 * 60, // 1h
- isVerbose: true,
-};
-const STATE_LAYER = BlockParamLiteral.Latest;
-
-/**
- * This class includes all the functionality related to watching a set of orders
- * for potential changes in order validity/fillability. The orderWatcher notifies
- * the subscriber of these changes so that a final decision can be made on whether
- * the order should be deemed invalid.
- */
-export class OrderWatcher {
- private readonly _dependentOrderHashesTracker: DependentOrderHashesTracker;
- private readonly _orderStateByOrderHashCache: OrderStateByOrderHash = {};
- private readonly _orderByOrderHash: OrderByOrderHash = {};
- private readonly _eventWatcher: EventWatcher;
- private readonly _provider: Provider;
- private readonly _collisionResistantAbiDecoder: CollisionResistanceAbiDecoder;
- private readonly _expirationWatcher: ExpirationWatcher;
- private readonly _orderStateUtils: OrderStateUtils;
- private readonly _orderFilledCancelledLazyStore: OrderFilledCancelledLazyStore;
- private readonly _balanceAndProxyAllowanceLazyStore: BalanceAndProxyAllowanceLazyStore;
- private readonly _cleanupJobInterval: number;
- private _cleanupJobIntervalIdIfExists?: NodeJS.Timer;
- private _callbackIfExists?: OnOrderStateChangeCallback;
- /**
- * Instantiate a new OrderWatcher
- * @param provider Web3 provider to use for JSON RPC calls
- * @param networkId NetworkId to watch orders on
- * @param contractAddresses Optional contract addresses. Defaults to known
- * addresses based on networkId.
- * @param partialConfig Optional configurations
- */
- constructor(
- provider: Provider,
- networkId: number,
- contractAddresses?: ContractAddresses,
- partialConfig: Partial<OrderWatcherConfig> = DEFAULT_ORDER_WATCHER_CONFIG,
- ) {
- assert.isWeb3Provider('provider', provider);
- assert.isNumber('networkId', networkId);
- assert.doesConformToSchema('partialConfig', partialConfig, orderWatcherPartialConfigSchema);
- const config = {
- ...DEFAULT_ORDER_WATCHER_CONFIG,
- ...partialConfig,
- };
-
- this._provider = provider;
- this._collisionResistantAbiDecoder = new CollisionResistanceAbiDecoder(
- artifacts.ERC20Token.compilerOutput.abi,
- artifacts.ERC721Token.compilerOutput.abi,
- [artifacts.WETH9.compilerOutput.abi, artifacts.Exchange.compilerOutput.abi],
- );
- const contractWrappers = new ContractWrappers(provider, {
- networkId,
- // Note(albrow): We let the contract-wrappers package handle
- // default values for contractAddresses.
- contractAddresses,
- });
- this._eventWatcher = new EventWatcher(provider, config.eventPollingIntervalMs, STATE_LAYER, config.isVerbose);
- const balanceAndProxyAllowanceFetcher = new AssetBalanceAndProxyAllowanceFetcher(
- contractWrappers.erc20Token,
- contractWrappers.erc721Token,
- STATE_LAYER,
- );
- this._balanceAndProxyAllowanceLazyStore = new BalanceAndProxyAllowanceLazyStore(
- balanceAndProxyAllowanceFetcher,
- );
- const orderFilledCancelledFetcher = new OrderFilledCancelledFetcher(contractWrappers.exchange, STATE_LAYER);
- this._orderFilledCancelledLazyStore = new OrderFilledCancelledLazyStore(orderFilledCancelledFetcher);
- this._orderStateUtils = new OrderStateUtils(balanceAndProxyAllowanceFetcher, orderFilledCancelledFetcher);
- const expirationMarginIfExistsMs = _.isUndefined(config) ? undefined : config.expirationMarginMs;
- this._expirationWatcher = new ExpirationWatcher(
- expirationMarginIfExistsMs,
- config.orderExpirationCheckingIntervalMs,
- );
- this._cleanupJobInterval = config.cleanupJobIntervalMs;
- const zrxTokenAddress = assetDataUtils.decodeERC20AssetData(orderFilledCancelledFetcher.getZRXAssetData())
- .tokenAddress;
- this._dependentOrderHashesTracker = new DependentOrderHashesTracker(zrxTokenAddress);
- }
- /**
- * Add an order to the orderWatcher. Before the order is added, it's
- * signature is verified.
- * @param signedOrder The order you wish to start watching.
- */
- public async addOrderAsync(signedOrder: SignedOrder): Promise<void> {
- assert.doesConformToSchema('signedOrder', signedOrder, schemas.signedOrderSchema);
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await assert.isValidSignatureAsync(this._provider, orderHash, signedOrder.signature, signedOrder.makerAddress);
-
- const expirationUnixTimestampMs = signedOrder.expirationTimeSeconds.times(MILLISECONDS_IN_A_SECOND);
- this._expirationWatcher.addOrder(orderHash, expirationUnixTimestampMs);
-
- this._orderByOrderHash[orderHash] = signedOrder;
- this._dependentOrderHashesTracker.addToDependentOrderHashes(signedOrder);
-
- const orderAssetDatas = [signedOrder.makerAssetData, signedOrder.takerAssetData];
- _.each(orderAssetDatas, assetData => this._addAssetDataToAbiDecoder(assetData));
- }
- /**
- * Removes an order from the orderWatcher
- * @param orderHash The orderHash of the order you wish to stop watching.
- */
- public removeOrder(orderHash: string): void {
- assert.doesConformToSchema('orderHash', orderHash, schemas.orderHashSchema);
- const signedOrder = this._orderByOrderHash[orderHash];
- if (_.isUndefined(signedOrder)) {
- return; // noop
- }
- this._dependentOrderHashesTracker.removeFromDependentOrderHashes(signedOrder);
- delete this._orderByOrderHash[orderHash];
- this._expirationWatcher.removeOrder(orderHash);
- delete this._orderStateByOrderHashCache[orderHash];
- }
- /**
- * Starts an orderWatcher subscription. The callback will be called every time a watched order's
- * backing blockchain state has changed. This is a call-to-action for the caller to re-validate the order.
- * @param callback Receives the orderHash of the order that should be re-validated, together
- * with all the order-relevant blockchain state needed to re-validate the order.
- */
- public subscribe(callback: OnOrderStateChangeCallback): void {
- assert.isFunction('callback', callback);
- if (!_.isUndefined(this._callbackIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionAlreadyPresent);
- }
- this._callbackIfExists = callback;
- this._eventWatcher.subscribe(this._onEventWatcherCallbackAsync.bind(this));
- this._expirationWatcher.subscribe(this._onOrderExpired.bind(this));
- this._cleanupJobIntervalIdIfExists = intervalUtils.setAsyncExcludingInterval(
- this._cleanupAsync.bind(this),
- this._cleanupJobInterval,
- (err: Error) => {
- this.unsubscribe();
- callback(err);
- },
- );
- }
- /**
- * Ends an orderWatcher subscription.
- */
- public unsubscribe(): void {
- if (_.isUndefined(this._callbackIfExists) || _.isUndefined(this._cleanupJobIntervalIdIfExists)) {
- throw new Error(OrderWatcherError.SubscriptionNotFound);
- }
- this._balanceAndProxyAllowanceLazyStore.deleteAll();
- this._orderFilledCancelledLazyStore.deleteAll();
- delete this._callbackIfExists;
- this._eventWatcher.unsubscribe();
- this._expirationWatcher.unsubscribe();
- intervalUtils.clearAsyncExcludingInterval(this._cleanupJobIntervalIdIfExists);
- }
- /**
- * Gets statistics of the OrderWatcher Instance.
- */
- public getStats(): Stats {
- return {
- orderCount: _.size(this._orderByOrderHash),
- };
- }
- private async _cleanupAsync(): Promise<void> {
- for (const orderHash of _.keys(this._orderByOrderHash)) {
- this._cleanupOrderRelatedState(orderHash);
- await this._emitRevalidateOrdersAsync([orderHash]);
- }
- }
- private _addAssetDataToAbiDecoder(assetData: string): void {
- const decodedAssetData = assetDataUtils.decodeAssetDataOrThrow(assetData);
- if (assetDataUtils.isERC20AssetData(decodedAssetData)) {
- this._collisionResistantAbiDecoder.addERC20Token(decodedAssetData.tokenAddress);
- } else if (assetDataUtils.isERC721AssetData(decodedAssetData)) {
- this._collisionResistantAbiDecoder.addERC721Token(decodedAssetData.tokenAddress);
- } else if (assetDataUtils.isMultiAssetData(decodedAssetData)) {
- _.each(decodedAssetData.nestedAssetData, nestedAssetDataElement =>
- this._addAssetDataToAbiDecoder(nestedAssetDataElement),
- );
- }
- }
- private _deleteLazyStoreBalance(assetData: string, userAddress: string): void {
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- case AssetProxyId.ERC721:
- this._balanceAndProxyAllowanceLazyStore.deleteBalance(assetData, userAddress);
- break;
- case AssetProxyId.MultiAsset:
- const decodedAssetData = assetDataUtils.decodeMultiAssetData(assetData);
- _.each(decodedAssetData.nestedAssetData, nestedAssetDataElement =>
- this._deleteLazyStoreBalance(nestedAssetDataElement, userAddress),
- );
- break;
- default:
- break;
- }
- }
- private _deleteLazyStoreProxyAllowance(assetData: string, userAddress: string): void {
- const assetProxyId = assetDataUtils.decodeAssetProxyId(assetData);
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- case AssetProxyId.ERC721:
- this._balanceAndProxyAllowanceLazyStore.deleteProxyAllowance(assetData, userAddress);
- break;
- case AssetProxyId.MultiAsset:
- const decodedAssetData = assetDataUtils.decodeMultiAssetData(assetData);
- _.each(decodedAssetData.nestedAssetData, nestedAssetDataElement =>
- this._deleteLazyStoreProxyAllowance(nestedAssetDataElement, userAddress),
- );
- break;
- default:
- break;
- }
- }
- private _cleanupOrderRelatedState(orderHash: string): void {
- const signedOrder = this._orderByOrderHash[orderHash];
-
- this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(orderHash);
- this._orderFilledCancelledLazyStore.deleteIsCancelled(orderHash);
-
- this._deleteLazyStoreBalance(signedOrder.makerAssetData, signedOrder.makerAddress);
- this._deleteLazyStoreProxyAllowance(signedOrder.makerAssetData, signedOrder.makerAddress);
- this._deleteLazyStoreBalance(signedOrder.takerAssetData, signedOrder.takerAddress);
- this._deleteLazyStoreProxyAllowance(signedOrder.takerAssetData, signedOrder.takerAddress);
-
- const zrxAssetData = this._orderFilledCancelledLazyStore.getZRXAssetData();
- if (!signedOrder.makerFee.isZero()) {
- this._deleteLazyStoreBalance(zrxAssetData, signedOrder.makerAddress);
- this._deleteLazyStoreProxyAllowance(zrxAssetData, signedOrder.makerAddress);
- }
- if (!signedOrder.takerFee.isZero()) {
- this._deleteLazyStoreBalance(zrxAssetData, signedOrder.takerAddress);
- this._deleteLazyStoreProxyAllowance(zrxAssetData, signedOrder.takerAddress);
- }
- }
- private _onOrderExpired(orderHash: string): void {
- const orderState: OrderState = {
- isValid: false,
- orderHash,
- error: ExchangeContractErrs.OrderFillExpired,
- };
- if (!_.isUndefined(this._orderByOrderHash[orderHash])) {
- this.removeOrder(orderHash);
- if (!_.isUndefined(this._callbackIfExists)) {
- this._callbackIfExists(null, orderState);
- }
- }
- }
- private async _onEventWatcherCallbackAsync(err: Error | null, logIfExists?: LogEntryEvent): Promise<void> {
- if (!_.isNull(err)) {
- if (!_.isUndefined(this._callbackIfExists)) {
- this._callbackIfExists(err);
- }
- return;
- }
- const maybeDecodedLog = this._collisionResistantAbiDecoder.tryToDecodeLogOrNoop<ContractEventArgs>(
- // At this moment we are sure that no error occured and log is defined.
- logIfExists as LogEntryEvent,
- );
- const isLogDecoded = !_.isUndefined(((maybeDecodedLog as any) as LogWithDecodedArgs<ContractEventArgs>).event);
- if (!isLogDecoded) {
- return; // noop
- }
- const decodedLog = (maybeDecodedLog as any) as LogWithDecodedArgs<ContractEventArgs>;
- const transactionHash = decodedLog.transactionHash;
- switch (decodedLog.event) {
- case ERC20TokenEvents.Approval:
- case ERC721TokenEvents.Approval: {
- // ERC20 and ERC721 Transfer events have the same name so we need to distinguish them by args
- if (!_.isUndefined(decodedLog.args._value)) {
- // ERC20
- // Invalidate cache
- const args = decodedLog.args as ERC20TokenApprovalEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC20AssetData(decodedLog.address);
- this._deleteLazyStoreProxyAllowance(tokenAssetData, args._owner);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._owner,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- } else {
- // ERC721
- // Invalidate cache
- const args = decodedLog.args as ERC721TokenApprovalEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC721AssetData(decodedLog.address, args._tokenId);
- this._deleteLazyStoreProxyAllowance(tokenAssetData, args._owner);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._owner,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
- }
- case ERC20TokenEvents.Transfer:
- case ERC721TokenEvents.Transfer: {
- // ERC20 and ERC721 Transfer events have the same name so we need to distinguish them by args
- if (!_.isUndefined(decodedLog.args._value)) {
- // ERC20
- // Invalidate cache
- const args = decodedLog.args as ERC20TokenTransferEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC20AssetData(decodedLog.address);
- this._deleteLazyStoreBalance(tokenAssetData, args._from);
- this._deleteLazyStoreBalance(tokenAssetData, args._to);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._from,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- } else {
- // ERC721
- // Invalidate cache
- const args = decodedLog.args as ERC721TokenTransferEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC721AssetData(decodedLog.address, args._tokenId);
- this._deleteLazyStoreBalance(tokenAssetData, args._from);
- this._deleteLazyStoreBalance(tokenAssetData, args._to);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._from,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
- }
- case ERC721TokenEvents.ApprovalForAll: {
- // Invalidate cache
- const args = decodedLog.args as ERC721TokenApprovalForAllEventArgs;
- const tokenAddress = decodedLog.address;
- this._balanceAndProxyAllowanceLazyStore.deleteAllERC721ProxyAllowance(tokenAddress, args._owner);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByERC721ByMaker(
- args._owner,
- tokenAddress,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
- case WETH9Events.Deposit: {
- // Invalidate cache
- const args = decodedLog.args as WETH9DepositEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC20AssetData(decodedLog.address);
- this._deleteLazyStoreBalance(tokenAssetData, args._owner);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._owner,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
- case WETH9Events.Withdrawal: {
- // Invalidate cache
- const args = decodedLog.args as WETH9WithdrawalEventArgs;
- const tokenAssetData = assetDataUtils.encodeERC20AssetData(decodedLog.address);
- this._deleteLazyStoreBalance(tokenAssetData, args._owner);
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByAssetDataByMaker(
- args._owner,
- tokenAssetData,
- );
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
- case ExchangeEvents.Fill: {
- // Invalidate cache
- const args = decodedLog.args as ExchangeFillEventArgs;
- this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash);
- // Revalidate orders
- const orderHash = args.orderHash;
- const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
- if (isOrderWatched) {
- await this._emitRevalidateOrdersAsync([orderHash], transactionHash);
- }
- break;
- }
- case ExchangeEvents.Cancel: {
- // Invalidate cache
- const args = decodedLog.args as ExchangeCancelEventArgs;
- this._orderFilledCancelledLazyStore.deleteIsCancelled(args.orderHash);
- // Revalidate orders
- const orderHash = args.orderHash;
- const isOrderWatched = !_.isUndefined(this._orderByOrderHash[orderHash]);
- if (isOrderWatched) {
- await this._emitRevalidateOrdersAsync([orderHash], transactionHash);
- }
- break;
- }
- case ExchangeEvents.CancelUpTo: {
- // TODO(logvinov): Do it smarter and actually look at the salt and order epoch
- // Invalidate cache
- const args = decodedLog.args as ExchangeCancelUpToEventArgs;
- this._orderFilledCancelledLazyStore.deleteAllIsCancelled();
- // Revalidate orders
- const orderHashes = this._dependentOrderHashesTracker.getDependentOrderHashesByMaker(args.makerAddress);
- await this._emitRevalidateOrdersAsync(orderHashes, transactionHash);
- break;
- }
-
- default:
- throw errorUtils.spawnSwitchErr('decodedLog.event', decodedLog.event);
- }
- }
- private async _emitRevalidateOrdersAsync(orderHashes: string[], transactionHash?: string): Promise<void> {
- for (const orderHash of orderHashes) {
- const signedOrder = this._orderByOrderHash[orderHash];
- // Most of these calls will never reach the network because the data is fetched from stores
- // and only updated when cache is invalidated
- const orderState = await this._orderStateUtils.getOpenOrderStateAsync(signedOrder, transactionHash);
- if (_.isUndefined(this._callbackIfExists)) {
- break; // Unsubscribe was called
- }
- if (_.isEqual(orderState, this._orderStateByOrderHashCache[orderHash])) {
- // Actual order state didn't change
- continue;
- } else {
- this._orderStateByOrderHashCache[orderHash] = orderState;
- }
- this._callbackIfExists(null, orderState);
- }
- }
-}
diff --git a/packages/order-watcher/src/order_watcher/order_watcher_web_socket_server.ts b/packages/order-watcher/src/order_watcher/order_watcher_web_socket_server.ts
deleted file mode 100644
index b75b07603..000000000
--- a/packages/order-watcher/src/order_watcher/order_watcher_web_socket_server.ts
+++ /dev/null
@@ -1,200 +0,0 @@
-import { ContractAddresses } from '@0x/contract-addresses';
-import { schemas } from '@0x/json-schemas';
-import { OrderStateInvalid, OrderStateValid, SignedOrder } from '@0x/types';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-import * as http from 'http';
-import * as WebSocket from 'websocket';
-
-import { GetStatsResult, OrderWatcherConfig, OrderWatcherMethod, WebSocketRequest, WebSocketResponse } from '../types';
-import { assert } from '../utils/assert';
-
-import { OrderWatcher } from './order_watcher';
-
-const DEFAULT_HTTP_PORT = 8080;
-const JSON_RPC_VERSION = '2.0';
-
-// Wraps the OrderWatcher functionality in a WebSocket server. Motivations:
-// 1) Users can watch orders via non-typescript programs.
-// 2) Better encapsulation so that users can work
-export class OrderWatcherWebSocketServer {
- private readonly _orderWatcher: OrderWatcher;
- private readonly _httpServer: http.Server;
- private readonly _connectionStore: Set<WebSocket.connection>;
- private readonly _wsServer: WebSocket.server;
- private readonly _isVerbose: boolean;
- /**
- * Recover types lost when the payload is stringified.
- */
- private static _parseSignedOrder(rawRequest: any): SignedOrder {
- const bigNumberFields = [
- 'salt',
- 'makerFee',
- 'takerFee',
- 'makerAssetAmount',
- 'takerAssetAmount',
- 'expirationTimeSeconds',
- ];
- for (const field of bigNumberFields) {
- rawRequest[field] = new BigNumber(rawRequest[field]);
- }
- return rawRequest;
- }
-
- /**
- * Instantiate a new WebSocket server which provides OrderWatcher functionality
- * @param provider Web3 provider to use for JSON RPC calls.
- * @param networkId NetworkId to watch orders on.
- * @param contractAddresses Optional contract addresses. Defaults to known
- * addresses based on networkId.
- * @param orderWatcherConfig OrderWatcher configurations. isVerbose sets the verbosity for the WebSocket server aswell.
- * @param isVerbose Whether to enable verbose logging. Defaults to true.
- */
- constructor(
- provider: Provider,
- networkId: number,
- contractAddresses?: ContractAddresses,
- orderWatcherConfig?: Partial<OrderWatcherConfig>,
- ) {
- this._isVerbose =
- orderWatcherConfig !== undefined && orderWatcherConfig.isVerbose !== undefined
- ? orderWatcherConfig.isVerbose
- : true;
- this._orderWatcher = new OrderWatcher(provider, networkId, contractAddresses, orderWatcherConfig);
- this._connectionStore = new Set();
- this._httpServer = http.createServer();
- this._wsServer = new WebSocket.server({
- httpServer: this._httpServer,
- // Avoid setting autoAcceptConnections to true as it defeats all
- // standard cross-origin protection facilities built into the protocol
- // and the browser.
- // Source: https://www.npmjs.com/package/websocket#server-example
- // Also ensures that a request event is emitted by
- // the server whenever a new WebSocket request is made.
- autoAcceptConnections: false,
- });
-
- this._wsServer.on('request', async (request: any) => {
- // Designed for usage pattern where client and server are run on the same
- // machine by the same user. As such, no security checks are in place.
- const connection: WebSocket.connection = request.accept(null, request.origin);
- this._log(`${new Date()} [Server] Accepted connection from origin ${request.origin}.`);
- connection.on('message', this._onMessageCallbackAsync.bind(this, connection));
- connection.on('close', this._onCloseCallback.bind(this, connection));
- this._connectionStore.add(connection);
- });
- }
-
- /**
- * Activates the WebSocket server by subscribing to the OrderWatcher and
- * starting the WebSocket's HTTP server
- */
- public start(): void {
- // Have the WebSocket server subscribe to the OrderWatcher to receive updates.
- // These updates are then broadcast to clients in the _connectionStore.
- this._orderWatcher.subscribe(this._broadcastCallback.bind(this));
-
- const port = process.env.ORDER_WATCHER_HTTP_PORT || DEFAULT_HTTP_PORT;
- this._httpServer.listen(port, () => {
- this._log(`${new Date()} [Server] Listening on port ${port}`);
- });
- }
-
- /**
- * Deactivates the WebSocket server by stopping the HTTP server from accepting
- * new connections and unsubscribing from the OrderWatcher
- */
- public stop(): void {
- this._httpServer.close();
- this._orderWatcher.unsubscribe();
- }
-
- private _log(...args: any[]): void {
- if (this._isVerbose) {
- logUtils.log(...args);
- }
- }
-
- private async _onMessageCallbackAsync(connection: WebSocket.connection, message: any): Promise<void> {
- let response: WebSocketResponse;
- let id: number | null = null;
- try {
- assert.doesConformToSchema('message', message, schemas.orderWatcherWebSocketUtf8MessageSchema);
- const request: WebSocketRequest = JSON.parse(message.utf8Data);
- id = request.id;
- assert.doesConformToSchema('request', request, schemas.orderWatcherWebSocketRequestSchema);
- assert.isString(request.jsonrpc, JSON_RPC_VERSION);
- response = {
- id,
- jsonrpc: JSON_RPC_VERSION,
- method: request.method,
- result: await this._routeRequestAsync(request),
- };
- } catch (err) {
- response = {
- id,
- jsonrpc: JSON_RPC_VERSION,
- method: null,
- error: err.toString(),
- };
- }
- this._log(`${new Date()} [Server] OrderWatcher output: ${JSON.stringify(response)}`);
- connection.sendUTF(JSON.stringify(response));
- }
-
- private _onCloseCallback(connection: WebSocket.connection): void {
- this._connectionStore.delete(connection);
- this._log(`${new Date()} [Server] Client ${connection.remoteAddress} disconnected.`);
- }
-
- private async _routeRequestAsync(request: WebSocketRequest): Promise<GetStatsResult | undefined> {
- this._log(`${new Date()} [Server] Request received: ${request.method}`);
- switch (request.method) {
- case OrderWatcherMethod.AddOrder: {
- const signedOrder: SignedOrder = OrderWatcherWebSocketServer._parseSignedOrder(
- request.params.signedOrder,
- );
- await this._orderWatcher.addOrderAsync(signedOrder);
- break;
- }
- case OrderWatcherMethod.RemoveOrder: {
- this._orderWatcher.removeOrder(request.params.orderHash || 'undefined');
- break;
- }
- case OrderWatcherMethod.GetStats: {
- return this._orderWatcher.getStats();
- }
- default:
- // Should never reach here. Should be caught by JSON schema check.
- throw new Error(`Unexpected default case hit for request.method`);
- }
- return undefined;
- }
-
- /**
- * Broadcasts OrderState changes to ALL connected clients. At the moment,
- * we do not support clients subscribing to only a subset of orders. As such,
- * Client B will be notified of changes to an order that Client A added.
- */
- private _broadcastCallback(err: Error | null, orderState?: OrderStateValid | OrderStateInvalid | undefined): void {
- const method = OrderWatcherMethod.Update;
- const response =
- err === null
- ? {
- jsonrpc: JSON_RPC_VERSION,
- method,
- result: orderState,
- }
- : {
- jsonrpc: JSON_RPC_VERSION,
- method,
- error: {
- code: -32000,
- message: err.message,
- },
- };
- this._connectionStore.forEach((connection: WebSocket.connection) => {
- connection.sendUTF(JSON.stringify(response));
- });
- }
-}
diff --git a/packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts b/packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts
deleted file mode 100644
index 8bfced063..000000000
--- a/packages/order-watcher/src/schemas/order_watcher_partial_config_schema.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export const orderWatcherPartialConfigSchema = {
- id: '/OrderWatcherPartialConfigSchema',
- properties: {
- stateLayer: { $ref: '/blockParamSchema' },
- orderExpirationCheckingIntervalMs: { type: 'number' },
- eventPollingIntervalMs: { type: 'number' },
- expirationMarginMs: { type: 'number' },
- cleanupJobIntervalMs: { type: 'number' },
- isVerbose: { type: 'boolean' },
- },
- type: 'object',
- required: [],
-};
diff --git a/packages/order-watcher/src/server.ts b/packages/order-watcher/src/server.ts
deleted file mode 100644
index 1d31e87ab..000000000
--- a/packages/order-watcher/src/server.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses';
-import { RPCSubprovider, Web3ProviderEngine } from '@0x/subproviders';
-import * as _ from 'lodash';
-
-import { OrderWatcherWebSocketServer } from './order_watcher/order_watcher_web_socket_server';
-
-const GANACHE_NETWORK_ID = 50;
-const DEFAULT_RPC_URL = 'http://localhost:8545';
-
-const provider = new Web3ProviderEngine();
-const jsonRpcUrl = process.env.JSON_RPC_URL || DEFAULT_RPC_URL;
-const rpcSubprovider = new RPCSubprovider(jsonRpcUrl);
-provider.addProvider(rpcSubprovider);
-provider.start();
-
-const networkId = process.env.NETWORK_ID !== undefined ? _.parseInt(process.env.NETWORK_ID) : GANACHE_NETWORK_ID;
-
-const contractAddressesString = process.env.contractAddresses;
-const contractAddressesIfExists =
- contractAddressesString === undefined
- ? getContractAddressesForNetworkOrThrow(networkId)
- : JSON.parse(contractAddressesString);
-
-const orderWatcherConfig: any = {
- isVerbose: process.env.IS_VERBOSE === 'true',
-};
-const orderExpirationCheckingIntervalMs = process.env.ORDER_EXPIRATION_CHECKING_INTERVAL_MS;
-if (orderExpirationCheckingIntervalMs !== undefined) {
- orderWatcherConfig.orderExpirationCheckingIntervalMs = _.parseInt(orderExpirationCheckingIntervalMs);
-}
-const eventPollingIntervalMs = process.env.EVENT_POLLING_INTERVAL_MS;
-if (eventPollingIntervalMs !== undefined) {
- orderWatcherConfig.eventPollingIntervalMs = _.parseInt(eventPollingIntervalMs);
-}
-const expirationMarginMs = process.env.EXPIRATION_MARGIN_MS;
-if (expirationMarginMs !== undefined) {
- orderWatcherConfig.expirationMarginMs = _.parseInt(expirationMarginMs);
-}
-const cleanupJobIntervalMs = process.env.CLEANUP_JOB_INTERVAL_MS;
-if (cleanupJobIntervalMs !== undefined) {
- orderWatcherConfig.cleanupJobIntervalMs = _.parseInt(cleanupJobIntervalMs);
-}
-const wsServer = new OrderWatcherWebSocketServer(provider, networkId, contractAddressesIfExists, orderWatcherConfig);
-wsServer.start();
diff --git a/packages/order-watcher/src/types.ts b/packages/order-watcher/src/types.ts
deleted file mode 100644
index 2b529a939..000000000
--- a/packages/order-watcher/src/types.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-import { OrderState, SignedOrder } from '@0x/types';
-import { LogEntryEvent } from 'ethereum-types';
-
-export enum OrderWatcherError {
- SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT',
- SubscriptionNotFound = 'SUBSCRIPTION_NOT_FOUND',
-}
-
-export type EventWatcherCallback = (err: null | Error, log?: LogEntryEvent) => void;
-
-/**
- * orderExpirationCheckingIntervalMs: How often to check for expired orders. Default=50.
- * eventPollingIntervalMs: How often to poll the Ethereum node for new events. Default=200.
- * expirationMarginMs: Amount of time before order expiry that you'd like to be notified
- * of an orders expiration. Default=0.
- * cleanupJobIntervalMs: How often to run a cleanup job which revalidates all the orders. Default=1hr.
- * isVerbose: Weather the order watcher should be verbose. Default=true.
- */
-export interface OrderWatcherConfig {
- orderExpirationCheckingIntervalMs: number;
- eventPollingIntervalMs: number;
- expirationMarginMs: number;
- cleanupJobIntervalMs: number;
- isVerbose: boolean;
-}
-
-export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void;
-
-export enum InternalOrderWatcherError {
- NoAbiDecoder = 'NO_ABI_DECODER',
- ZrxNotInTokenRegistry = 'ZRX_NOT_IN_TOKEN_REGISTRY',
- WethNotInTokenRegistry = 'WETH_NOT_IN_TOKEN_REGISTRY',
-}
-
-export enum OrderWatcherMethod {
- // Methods initiated by the user.
- GetStats = 'GET_STATS',
- AddOrder = 'ADD_ORDER',
- RemoveOrder = 'REMOVE_ORDER',
- // These are spontaneous; they are primarily orderstate changes.
- Update = 'UPDATE',
- // `subscribe` and `unsubscribe` are methods of OrderWatcher, but we don't
- // need to expose them to the WebSocket server user because the user implicitly
- // subscribes and unsubscribes by connecting and disconnecting from the server.
-}
-
-// Users have to create a json object of this format and attach it to
-// the data field of their WebSocket message to interact with the server.
-export type WebSocketRequest = AddOrderRequest | RemoveOrderRequest | GetStatsRequest;
-
-export interface AddOrderRequest {
- id: number;
- jsonrpc: string;
- method: OrderWatcherMethod.AddOrder;
- params: { signedOrder: SignedOrder };
-}
-
-export interface RemoveOrderRequest {
- id: number;
- jsonrpc: string;
- method: OrderWatcherMethod.RemoveOrder;
- params: { orderHash: string };
-}
-
-export interface GetStatsRequest {
- id: number;
- jsonrpc: string;
- method: OrderWatcherMethod.GetStats;
-}
-
-// Users should expect a json object of this format in the data field
-// of the WebSocket messages that the server sends out.
-export type WebSocketResponse = SuccessfulWebSocketResponse | ErrorWebSocketResponse;
-
-export interface SuccessfulWebSocketResponse {
- id: number;
- jsonrpc: string;
- method: OrderWatcherMethod;
- result: OrderState | GetStatsResult | undefined; // result is undefined for ADD_ORDER and REMOVE_ORDER
-}
-
-export interface ErrorWebSocketResponse {
- id: number | null;
- jsonrpc: string;
- method: null;
- error: JSONRPCError;
-}
-
-export interface JSONRPCError {
- code: number;
- message: string;
- data?: string | object;
-}
-
-export interface GetStatsResult {
- orderCount: number;
-}
diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts
deleted file mode 100644
index ccfc7325c..000000000
--- a/packages/order-watcher/src/utils/assert.ts
+++ /dev/null
@@ -1,23 +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:no-unused-variable
-import { Schema } from '@0x/json-schemas';
-import { ECSignature } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-// tslint:enable:no-unused-variable
-import { Provider } from 'ethereum-types';
-
-import { signatureUtils } from '@0x/order-utils';
-
-export const assert = {
- ...sharedAssert,
- async isValidSignatureAsync(
- provider: Provider,
- orderHash: string,
- signature: string,
- signerAddress: string,
- ): Promise<void> {
- const isValid = await signatureUtils.isValidSignatureAsync(provider, orderHash, signature, signerAddress);
- assert.assert(isValid, `Expected order with hash '${orderHash}' to have a valid signature`);
- },
-};
diff --git a/packages/order-watcher/src/utils/utils.ts b/packages/order-watcher/src/utils/utils.ts
deleted file mode 100644
index 9c3849ff1..000000000
--- a/packages/order-watcher/src/utils/utils.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export const utils = {
- getCurrentUnixTimestampSec(): BigNumber {
- const milisecondsInASecond = 1000;
- return new BigNumber(Date.now() / milisecondsInASecond).integerValue();
- },
- getCurrentUnixTimestampMs(): BigNumber {
- return new BigNumber(Date.now());
- },
-};
diff --git a/packages/order-watcher/test/expiration_watcher_test.ts b/packages/order-watcher/test/expiration_watcher_test.ts
deleted file mode 100644
index fb5ea2a27..000000000
--- a/packages/order-watcher/test/expiration_watcher_test.ts
+++ /dev/null
@@ -1,199 +0,0 @@
-import { tokenUtils } from '@0x/contract-wrappers/lib/test/utils/token_utils';
-import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils';
-import { FillScenarios } from '@0x/fill-scenarios';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { DoneCallback } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-import 'mocha';
-import * as Sinon from 'sinon';
-
-import { ExpirationWatcher } from '../src/order_watcher/expiration_watcher';
-import { utils } from '../src/utils/utils';
-
-import { chaiSetup } from './utils/chai_setup';
-import { migrateOnceAsync } from './utils/migrate';
-import { provider, web3Wrapper } from './utils/web3_wrapper';
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-const MILISECONDS_IN_SECOND = 1000;
-
-describe('ExpirationWatcher', () => {
- let userAddresses: string[];
- let fillScenarios: FillScenarios;
- let makerAssetData: string;
- let takerAssetData: string;
- let coinbase: string;
- let makerAddress: string;
- let takerAddress: string;
- let feeRecipient: string;
- const fillableAmount = new BigNumber(5);
- let currentUnixTimestampSec: BigNumber;
- let timer: Sinon.SinonFakeTimers;
- let expirationWatcher: ExpirationWatcher;
- before(async () => {
- const contractAddresses = await migrateOnceAsync();
- await blockchainLifecycle.startAsync();
- userAddresses = await web3Wrapper.getAvailableAddressesAsync();
- fillScenarios = new FillScenarios(
- provider,
- userAddresses,
- contractAddresses.zrxToken,
- contractAddresses.exchange,
- contractAddresses.erc20Proxy,
- contractAddresses.erc721Proxy,
- );
- [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses;
- const [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
- [makerAssetData, takerAssetData] = [
- assetDataUtils.encodeERC20AssetData(makerTokenAddress),
- assetDataUtils.encodeERC20AssetData(takerTokenAddress),
- ];
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- const sinonTimerConfig = { shouldAdvanceTime: true } as any;
- // This constructor has incorrect types
- timer = Sinon.useFakeTimers(sinonTimerConfig);
- currentUnixTimestampSec = utils.getCurrentUnixTimestampSec();
- expirationWatcher = new ExpirationWatcher();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- timer.restore();
- expirationWatcher.unsubscribe();
- });
- it('correctly emits events when order expires', (done: DoneCallback) => {
- (async () => {
- const orderLifetimeSec = 60;
- const expirationUnixTimestampSec = currentUnixTimestampSec.plus(orderLifetimeSec);
- const signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- expirationUnixTimestampSec,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- expirationWatcher.addOrder(orderHash, signedOrder.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done)((hash: string) => {
- expect(hash).to.be.equal(orderHash);
- expect(utils.getCurrentUnixTimestampSec()).to.be.bignumber.gte(expirationUnixTimestampSec);
- });
- expirationWatcher.subscribe(callbackAsync);
- timer.tick(orderLifetimeSec * MILISECONDS_IN_SECOND);
- })().catch(done);
- });
- it("doesn't emit events before order expires", (done: DoneCallback) => {
- (async () => {
- const orderLifetimeSec = 60;
- const expirationUnixTimestampSec = currentUnixTimestampSec.plus(orderLifetimeSec);
- const signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- expirationUnixTimestampSec,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- expirationWatcher.addOrder(orderHash, signedOrder.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done)(async (_hash: string) => {
- done(new Error('Emitted expiration went before the order actually expired'));
- });
- expirationWatcher.subscribe(callbackAsync);
- const notEnoughTime = orderLifetimeSec - 1;
- timer.tick(notEnoughTime * MILISECONDS_IN_SECOND);
- done();
- })().catch(done);
- });
- it('emits events in correct order', (done: DoneCallback) => {
- (async () => {
- const order1Lifetime = 60;
- const order2Lifetime = 120;
- const order1ExpirationUnixTimestampSec = currentUnixTimestampSec.plus(order1Lifetime);
- const order2ExpirationUnixTimestampSec = currentUnixTimestampSec.plus(order2Lifetime);
- const signedOrder1 = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- order1ExpirationUnixTimestampSec,
- );
- const signedOrder2 = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- order2ExpirationUnixTimestampSec,
- );
- const orderHash1 = orderHashUtils.getOrderHashHex(signedOrder1);
- const orderHash2 = orderHashUtils.getOrderHashHex(signedOrder2);
- expirationWatcher.addOrder(orderHash2, signedOrder2.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- expirationWatcher.addOrder(orderHash1, signedOrder1.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- const expirationOrder = [orderHash1, orderHash2];
- const expectToBeCalledOnce = false;
- const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done, expectToBeCalledOnce)(
- (hash: string) => {
- const orderHash = expirationOrder.shift();
- expect(hash).to.be.equal(orderHash);
- if (_.isEmpty(expirationOrder)) {
- done();
- }
- },
- );
- expirationWatcher.subscribe(callbackAsync);
- timer.tick(order2Lifetime * MILISECONDS_IN_SECOND);
- })().catch(done);
- });
- it('emits events in correct order when expirations are equal', (done: DoneCallback) => {
- (async () => {
- const order1Lifetime = 60;
- const order2Lifetime = 60;
- const order1ExpirationUnixTimestampSec = currentUnixTimestampSec.plus(order1Lifetime);
- const order2ExpirationUnixTimestampSec = currentUnixTimestampSec.plus(order2Lifetime);
- const signedOrder1 = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- order1ExpirationUnixTimestampSec,
- );
- const signedOrder2 = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- order2ExpirationUnixTimestampSec,
- );
- const orderHash1 = orderHashUtils.getOrderHashHex(signedOrder1);
- const orderHash2 = orderHashUtils.getOrderHashHex(signedOrder2);
- expirationWatcher.addOrder(orderHash1, signedOrder1.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- expirationWatcher.addOrder(orderHash2, signedOrder2.expirationTimeSeconds.times(MILISECONDS_IN_SECOND));
- const expirationOrder = orderHash1 < orderHash2 ? [orderHash1, orderHash2] : [orderHash2, orderHash1];
- const expectToBeCalledOnce = false;
- const callbackAsync = callbackErrorReporter.reportNoErrorCallbackErrors(done, expectToBeCalledOnce)(
- (hash: string) => {
- const orderHash = expirationOrder.shift();
- expect(hash).to.be.equal(orderHash);
- if (_.isEmpty(expirationOrder)) {
- done();
- }
- },
- );
- expirationWatcher.subscribe(callbackAsync);
- timer.tick(order2Lifetime * MILISECONDS_IN_SECOND);
- })().catch(done);
- });
-});
diff --git a/packages/order-watcher/test/global_hooks.ts b/packages/order-watcher/test/global_hooks.ts
deleted file mode 100644
index 26c37158f..000000000
--- a/packages/order-watcher/test/global_hooks.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-before('set up mocha', async function(): Promise<void> {
- // HACK: Since the migrations take longer then our global mocha timeout limit
- // we manually increase it for this before hook.
- const mochaTestTimeoutMs = 25000;
- this.timeout(mochaTestTimeoutMs); // tslint:disable-line:no-invalid-this
-});
diff --git a/packages/order-watcher/test/order_watcher_test.ts b/packages/order-watcher/test/order_watcher_test.ts
deleted file mode 100644
index 28b564b32..000000000
--- a/packages/order-watcher/test/order_watcher_test.ts
+++ /dev/null
@@ -1,887 +0,0 @@
-// tslint:disable:no-unnecessary-type-assertion
-import { ContractWrappers } from '@0x/contract-wrappers';
-import { tokenUtils } from '@0x/contract-wrappers/lib/test/utils/token_utils';
-import { BlockchainLifecycle, callbackErrorReporter } from '@0x/dev-utils';
-import { FillScenarios } from '@0x/fill-scenarios';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import {
- DoneCallback,
- ExchangeContractErrs,
- OrderState,
- OrderStateInvalid,
- OrderStateValid,
- SignedOrder,
-} from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import * as _ from 'lodash';
-import 'mocha';
-
-import {
- DependentOrderHashesTracker,
- OrderHashesByERC20ByMakerAddress,
-} from '../src/order_watcher/dependent_order_hashes_tracker';
-import { OrderWatcher } from '../src/order_watcher/order_watcher';
-import { OrderWatcherError } 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';
-
-const TIMEOUT_MS = 150;
-
-chaiSetup.configure();
-const expect = chai.expect;
-const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
-
-describe('OrderWatcher', () => {
- let contractWrappers: ContractWrappers;
- let fillScenarios: FillScenarios;
- let userAddresses: string[];
- let zrxTokenAddress: string;
- let makerAssetData: string;
- let takerAssetData: string;
- let makerTokenAddress: string;
- let takerTokenAddress: string;
- let makerAddress: string;
- let takerAddress: string;
- let coinbase: string;
- let feeRecipient: string;
- let signedOrder: SignedOrder;
- let orderWatcher: OrderWatcher;
- const decimals = constants.ZRX_DECIMALS;
- const fillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals);
- before(async () => {
- const contractAddresses = await migrateOnceAsync();
- await blockchainLifecycle.startAsync();
- const networkId = constants.TESTRPC_NETWORK_ID;
- const config = {
- networkId,
- contractAddresses,
- };
- contractWrappers = new ContractWrappers(provider, config);
- userAddresses = await web3Wrapper.getAvailableAddressesAsync();
- zrxTokenAddress = contractAddresses.zrxToken;
- fillScenarios = new FillScenarios(
- provider,
- userAddresses,
- zrxTokenAddress,
- contractAddresses.exchange,
- contractAddresses.erc20Proxy,
- contractAddresses.erc721Proxy,
- );
- [coinbase, makerAddress, takerAddress, feeRecipient] = userAddresses;
- [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
- [makerAssetData, takerAssetData] = [
- assetDataUtils.encodeERC20AssetData(makerTokenAddress),
- assetDataUtils.encodeERC20AssetData(takerTokenAddress),
- ];
- const orderWatcherConfig = {};
- orderWatcher = new OrderWatcher(provider, networkId, contractAddresses, orderWatcherConfig);
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- await blockchainLifecycle.startAsync();
- });
- afterEach(async () => {
- await blockchainLifecycle.revertAsync();
- });
- describe('#removeOrder', async () => {
- it('should successfully remove existing order', async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- expect((orderWatcher as any)._orderByOrderHash).to.include({
- [orderHash]: signedOrder,
- });
- const dependentOrderHashesTracker = (orderWatcher as any)
- ._dependentOrderHashesTracker as DependentOrderHashesTracker;
- let orderHashesByERC20ByMakerAddress: OrderHashesByERC20ByMakerAddress = (dependentOrderHashesTracker as any)
- ._orderHashesByERC20ByMakerAddress;
- expect(orderHashesByERC20ByMakerAddress[signedOrder.makerAddress][makerTokenAddress]).to.have.keys(
- orderHash,
- );
- orderWatcher.removeOrder(orderHash);
- expect((orderWatcher as any)._orderByOrderHash).to.not.include({
- [orderHash]: signedOrder,
- });
- orderHashesByERC20ByMakerAddress = (dependentOrderHashesTracker as any)._orderHashesByERC20ByMakerAddress;
- expect(orderHashesByERC20ByMakerAddress[signedOrder.makerAddress]).to.be.undefined();
- });
- it('should no-op when removing a non-existing order', async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const nonExistentOrderHash = `0x${orderHash
- .substr(2)
- .split('')
- .reverse()
- .join('')}`;
- orderWatcher.removeOrder(nonExistentOrderHash);
- });
- });
- describe('#subscribe', async () => {
- afterEach(async () => {
- orderWatcher.unsubscribe();
- });
- it('should fail when trying to subscribe twice', async () => {
- orderWatcher.subscribe(_.noop.bind(_));
- expect(() => orderWatcher.subscribe(_.noop.bind(_))).to.throw(OrderWatcherError.SubscriptionAlreadyPresent);
- });
- });
- describe('#getStats', async () => {
- it('orderCount should increment and decrement with order additions and removals', async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- expect(orderWatcher.getStats().orderCount).to.be.eq(0);
- await orderWatcher.addOrderAsync(signedOrder);
- expect(orderWatcher.getStats().orderCount).to.be.eq(1);
- orderWatcher.removeOrder(orderHash);
- expect(orderWatcher.getStats().orderCount).to.be.eq(0);
- });
- });
- describe('tests with cleanup', async () => {
- afterEach(async () => {
- orderWatcher.unsubscribe();
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- orderWatcher.removeOrder(orderHash);
- });
- it('should emit orderStateInvalid when makerAddress allowance set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- makerTokenAddress,
- makerAddress,
- new BigNumber(0),
- );
- })().catch(done);
- });
- it('should not emit an orderState event when irrelevant Transfer event received', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((_orderState: OrderState) => {
- throw new Error('OrderState callback fired for irrelevant order');
- });
- orderWatcher.subscribe(callback);
- const notTheMaker = userAddresses[0];
- const anyRecipient = takerAddress;
- const transferAmount = new BigNumber(2);
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- notTheMaker,
- anyRecipient,
- transferAmount,
- );
- setTimeout(() => {
- done();
- }, TIMEOUT_MS);
- })().catch(done);
- });
- it('should emit orderStateInvalid when makerAddress moves balance backing watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerBalance);
- });
- orderWatcher.subscribe(callback);
- const anyRecipient = takerAddress;
- const makerBalance = await contractWrappers.erc20Token.getBalanceAsync(makerTokenAddress, makerAddress);
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- makerAddress,
- anyRecipient,
- makerBalance,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderRemainingFillAmountZero);
- });
- orderWatcher.subscribe(callback);
-
- await contractWrappers.exchange.fillOrderAsync(signedOrder, fillableAmount, takerAddress);
- })().catch(done);
- });
- it('should include transactionHash in emitted orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- await orderWatcher.addOrderAsync(signedOrder);
-
- let transactionHash: string;
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.transactionHash).to.be.equal(transactionHash);
- });
- orderWatcher.subscribe(callback);
-
- transactionHash = await contractWrappers.exchange.fillOrderAsync(
- signedOrder,
- fillableAmount,
- takerAddress,
- );
- })().catch(done);
- });
- it('should emit orderStateValid when watched order partially filled', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
-
- const makerBalance = await contractWrappers.erc20Token.getBalanceAsync(makerTokenAddress, makerAddress);
- const fillAmountInBaseUnits = new BigNumber(2);
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.true();
- const validOrderState = orderState as OrderStateValid;
- expect(validOrderState.orderHash).to.be.equal(orderHash);
- const orderRelevantState = validOrderState.orderRelevantState;
- const remainingMakerBalance = makerBalance.minus(fillAmountInBaseUnits);
- const remainingFillable = fillableAmount.minus(fillAmountInBaseUnits);
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- remainingFillable,
- );
- expect(orderRelevantState.remainingFillableTakerAssetAmount).to.be.bignumber.equal(
- remainingFillable,
- );
- expect(orderRelevantState.makerBalance).to.be.bignumber.equal(remainingMakerBalance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.exchange.fillOrderAsync(signedOrder, fillAmountInBaseUnits, takerAddress);
- })().catch(done);
- });
- it('should trigger the callback when orders backing ZRX allowance changes', (done: DoneCallback) => {
- (async () => {
- const makerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- const takerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(0), decimals);
- signedOrder = await fillScenarios.createFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- fillableAmount,
- takerAddress,
- );
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)();
- await orderWatcher.addOrderAsync(signedOrder);
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- zrxTokenAddress,
- makerAddress,
- new BigNumber(0),
- );
- })().catch(done);
- });
- describe('remainingFillable(M|T)akerTokenAmount', () => {
- it('should calculate correct remaining fillable', (done: DoneCallback) => {
- (async () => {
- const takerFillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(10), decimals);
- const makerFillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(20), decimals);
- signedOrder = await fillScenarios.createAsymmetricFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- makerFillableAmount,
- takerFillableAmount,
- );
- const fillAmountInBaseUnits = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.true();
- const validOrderState = orderState as OrderStateValid;
- expect(validOrderState.orderHash).to.be.equal(orderHash);
- const orderRelevantState = validOrderState.orderRelevantState;
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- Web3Wrapper.toBaseUnitAmount(new BigNumber(16), decimals),
- );
- expect(orderRelevantState.remainingFillableTakerAssetAmount).to.be.bignumber.equal(
- Web3Wrapper.toBaseUnitAmount(new BigNumber(8), decimals),
- );
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.exchange.fillOrderAsync(signedOrder, fillAmountInBaseUnits, takerAddress);
- })().catch(done);
- });
- it('should equal approved amount when approved amount is lowest', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
-
- const changedMakerApprovalAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(3), decimals);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- const validOrderState = orderState as OrderStateValid;
- const orderRelevantState = validOrderState.orderRelevantState;
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- changedMakerApprovalAmount,
- );
- expect(orderRelevantState.remainingFillableTakerAssetAmount).to.be.bignumber.equal(
- changedMakerApprovalAmount,
- );
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- makerTokenAddress,
- makerAddress,
- changedMakerApprovalAmount,
- );
- })().catch(done);
- });
- it('should equal balance amount when balance amount is lowest', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
-
- const makerBalance = await contractWrappers.erc20Token.getBalanceAsync(
- makerTokenAddress,
- makerAddress,
- );
-
- const remainingAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(1), decimals);
- const transferAmount = makerBalance.minus(remainingAmount);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.true();
- const validOrderState = orderState as OrderStateValid;
- const orderRelevantState = validOrderState.orderRelevantState;
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- remainingAmount,
- );
- expect(orderRelevantState.remainingFillableTakerAssetAmount).to.be.bignumber.equal(
- remainingAmount,
- );
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- makerAddress,
- constants.NULL_ADDRESS,
- transferAmount,
- );
- })().catch(done);
- });
- it('should equal ratio amount when fee balance is lowered', (done: DoneCallback) => {
- (async () => {
- const takerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(0), decimals);
- const makerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals);
- signedOrder = await fillScenarios.createFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- fillableAmount,
- feeRecipient,
- );
-
- const remainingFeeAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(3), decimals);
-
- const remainingTokenAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(4), decimals);
- const transferTokenAmount = makerFee.minus(remainingTokenAmount);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- const validOrderState = orderState as OrderStateValid;
- const orderRelevantState = validOrderState.orderRelevantState;
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- remainingFeeAmount,
- );
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- zrxTokenAddress,
- makerAddress,
- remainingFeeAmount,
- );
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- makerAddress,
- constants.NULL_ADDRESS,
- transferTokenAmount,
- );
- })().catch(done);
- });
- it('should calculate full amount when all available and non-divisible', (done: DoneCallback) => {
- (async () => {
- const takerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(0), decimals);
- const makerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- signedOrder = await fillScenarios.createFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- fillableAmount,
- feeRecipient,
- );
-
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- const validOrderState = orderState as OrderStateValid;
- const orderRelevantState = validOrderState.orderRelevantState;
- expect(orderRelevantState.remainingFillableMakerAssetAmount).to.be.bignumber.equal(
- fillableAmount,
- );
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- makerTokenAddress,
- makerAddress,
- Web3Wrapper.toBaseUnitAmount(new BigNumber(100), decimals),
- );
- })().catch(done);
- });
- });
- it('should emit orderStateInvalid when watched order cancelled', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderCancelled);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.exchange.cancelOrderAsync(signedOrder);
- })().catch(done);
- });
- it('should emit orderStateInvalid when within rounding error range after a partial fill', (done: DoneCallback) => {
- (async () => {
- const fillAmountInBaseUnits = new BigNumber(2);
- const makerAssetAmount = new BigNumber(1001);
- const takerAssetAmount = new BigNumber(3);
- signedOrder = await fillScenarios.createAsymmetricFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- makerAssetAmount,
- takerAssetAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderFillRoundingError);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.exchange.fillOrderAsync(signedOrder, fillAmountInBaseUnits, takerAddress);
- })().catch(done);
- });
- describe('erc721', () => {
- let makerErc721AssetData: string;
- let makerErc721TokenAddress: string;
- const tokenId = new BigNumber(42);
- [makerErc721TokenAddress] = tokenUtils.getDummyERC721TokenAddresses();
- makerErc721AssetData = assetDataUtils.encodeERC721AssetData(makerErc721TokenAddress, tokenId);
- const fillableErc721Amount = new BigNumber(1);
- it('should emit orderStateInvalid when maker allowance set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerErc721AssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc721Token.setApprovalAsync(
- makerErc721TokenAddress,
- constants.NULL_ADDRESS,
- tokenId,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when maker allowance for all set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerErc721AssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- await contractWrappers.erc721Token.setApprovalAsync(
- makerErc721TokenAddress,
- constants.NULL_ADDRESS,
- tokenId,
- );
- let isApproved = true;
- await contractWrappers.erc721Token.setProxyApprovalForAllAsync(
- makerErc721TokenAddress,
- makerAddress,
- isApproved,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- isApproved = false;
- await contractWrappers.erc721Token.setProxyApprovalForAllAsync(
- makerErc721TokenAddress,
- makerAddress,
- isApproved,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when maker moves NFT backing watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerErc721AssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerBalance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc721Token.transferFromAsync(
- makerErc721TokenAddress,
- coinbase,
- makerAddress,
- tokenId,
- );
- })().catch(done);
- });
- });
- describe('multiAsset', async () => {
- const tokenId = new BigNumber(42);
- const [makerErc721TokenAddress] = tokenUtils.getDummyERC721TokenAddresses();
- const makerErc721AssetData = assetDataUtils.encodeERC721AssetData(makerErc721TokenAddress, tokenId);
- const fillableErc721Amount = new BigNumber(1);
- const [makerErc20TokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
- const makerErc20AssetData = assetDataUtils.encodeERC20AssetData(makerErc20TokenAddress);
- const fillableErc20Amount = new BigNumber(2);
- const multiAssetAmounts = [fillableErc721Amount, fillableErc20Amount];
- const nestedAssetData = [makerErc721AssetData, makerErc20AssetData];
- const makerMultiAssetData = assetDataUtils.encodeMultiAssetData(multiAssetAmounts, nestedAssetData);
- it('should emit orderStateInvalid when maker allowance of ERC721 token set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc721Token.setApprovalAsync(
- makerErc721TokenAddress,
- constants.NULL_ADDRESS,
- tokenId,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when maker allowance for all of ERC721 token set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- await contractWrappers.erc721Token.setApprovalAsync(
- makerErc721TokenAddress,
- constants.NULL_ADDRESS,
- tokenId,
- );
- let isApproved = true;
- await contractWrappers.erc721Token.setProxyApprovalForAllAsync(
- makerErc721TokenAddress,
- makerAddress,
- isApproved,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- isApproved = false;
- await contractWrappers.erc721Token.setProxyApprovalForAllAsync(
- makerErc721TokenAddress,
- makerAddress,
- isApproved,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when maker moves ERC721 backing watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerBalance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc721Token.transferFromAsync(
- makerErc721TokenAddress,
- coinbase,
- makerAddress,
- tokenId,
- );
- })().catch(done);
- });
- it('should emit orderStateInvalid when maker allowance of ERC20 token set to 0 for watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableErc721Amount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerAllowance);
- });
- orderWatcher.subscribe(callback);
- await contractWrappers.erc20Token.setProxyAllowanceAsync(
- makerErc20TokenAddress,
- makerAddress,
- new BigNumber(0),
- );
- })().catch(done);
- });
- it('should not emit an orderState event when irrelevant ERC20 Transfer event received', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((_orderState: OrderState) => {
- throw new Error('OrderState callback fired for irrelevant order');
- });
- orderWatcher.subscribe(callback);
- const notTheMaker = userAddresses[0];
- const anyRecipient = takerAddress;
- const transferAmount = new BigNumber(2);
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- notTheMaker,
- anyRecipient,
- transferAmount,
- );
- setTimeout(() => {
- done();
- }, TIMEOUT_MS);
- })().catch(done);
- });
- it('should emit orderStateInvalid when makerAddress moves ERC20 balance backing watched order', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.InsufficientMakerBalance);
- });
- orderWatcher.subscribe(callback);
- const anyRecipient = takerAddress;
- const makerBalance = await contractWrappers.erc20Token.getBalanceAsync(
- makerTokenAddress,
- makerAddress,
- );
- await contractWrappers.erc20Token.transferAsync(
- makerTokenAddress,
- makerAddress,
- anyRecipient,
- makerBalance,
- );
- })().catch(done);
- });
- // TODO(abandeali1): The following test will fail until the MAP has been deployed and activated.
- it.skip('should emit orderStateInvalid when watched order fully filled', (done: DoneCallback) => {
- (async () => {
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerMultiAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- const orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- await orderWatcher.addOrderAsync(signedOrder);
-
- const callback = callbackErrorReporter.reportNodeCallbackErrors(done)((orderState: OrderState) => {
- expect(orderState.isValid).to.be.false();
- const invalidOrderState = orderState as OrderStateInvalid;
- expect(invalidOrderState.orderHash).to.be.equal(orderHash);
- expect(invalidOrderState.error).to.be.equal(ExchangeContractErrs.OrderRemainingFillAmountZero);
- });
- orderWatcher.subscribe(callback);
-
- await contractWrappers.exchange.fillOrderAsync(signedOrder, fillableAmount, takerAddress);
- })().catch(done);
- });
- });
- });
-}); // tslint:disable:max-file-line-count
diff --git a/packages/order-watcher/test/order_watcher_web_socket_server_test.ts b/packages/order-watcher/test/order_watcher_web_socket_server_test.ts
deleted file mode 100644
index 36135f65c..000000000
--- a/packages/order-watcher/test/order_watcher_web_socket_server_test.ts
+++ /dev/null
@@ -1,312 +0,0 @@
-import { ContractAddresses } from '@0x/contract-addresses';
-import { ContractWrappers } from '@0x/contract-wrappers';
-import { tokenUtils } from '@0x/contract-wrappers/lib/test/utils/token_utils';
-import { BlockchainLifecycle } from '@0x/dev-utils';
-import { FillScenarios } from '@0x/fill-scenarios';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { ExchangeContractErrs, OrderStateInvalid, SignedOrder } from '@0x/types';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as chai from 'chai';
-import 'mocha';
-import * as WebSocket from 'websocket';
-
-import { OrderWatcherWebSocketServer } from '../src/order_watcher/order_watcher_web_socket_server';
-import { AddOrderRequest, OrderWatcherMethod, RemoveOrderRequest } 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);
-
-interface WsMessage {
- data: string;
-}
-
-describe('OrderWatcherWebSocketServer', async () => {
- let contractWrappers: ContractWrappers;
- let wsServer: OrderWatcherWebSocketServer;
- let wsClient: WebSocket.w3cwebsocket;
- let wsClientTwo: WebSocket.w3cwebsocket;
- let fillScenarios: FillScenarios;
- let userAddresses: string[];
- let makerAssetData: string;
- let takerAssetData: string;
- let makerTokenAddress: string;
- let takerTokenAddress: string;
- let makerAddress: string;
- let takerAddress: string;
- let zrxTokenAddress: string;
- let signedOrder: SignedOrder;
- let orderHash: string;
- let addOrderPayload: AddOrderRequest;
- let removeOrderPayload: RemoveOrderRequest;
- let networkId: number;
- let contractAddresses: ContractAddresses;
- const decimals = constants.ZRX_DECIMALS;
- const fillableAmount = Web3Wrapper.toBaseUnitAmount(new BigNumber(5), decimals);
-
- before(async () => {
- // Set up constants
- contractAddresses = await migrateOnceAsync();
- await blockchainLifecycle.startAsync();
- networkId = constants.TESTRPC_NETWORK_ID;
- const config = {
- networkId,
- contractAddresses,
- };
- contractWrappers = new ContractWrappers(provider, config);
- userAddresses = await web3Wrapper.getAvailableAddressesAsync();
- zrxTokenAddress = contractAddresses.zrxToken;
- [makerAddress, takerAddress] = userAddresses;
- [makerTokenAddress, takerTokenAddress] = tokenUtils.getDummyERC20TokenAddresses();
- [makerAssetData, takerAssetData] = [
- assetDataUtils.encodeERC20AssetData(makerTokenAddress),
- assetDataUtils.encodeERC20AssetData(takerTokenAddress),
- ];
- fillScenarios = new FillScenarios(
- provider,
- userAddresses,
- zrxTokenAddress,
- contractAddresses.exchange,
- contractAddresses.erc20Proxy,
- contractAddresses.erc721Proxy,
- );
- signedOrder = await fillScenarios.createFillableSignedOrderAsync(
- makerAssetData,
- takerAssetData,
- makerAddress,
- takerAddress,
- fillableAmount,
- );
- orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- addOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: OrderWatcherMethod.AddOrder,
- params: { signedOrder },
- };
- removeOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: OrderWatcherMethod.RemoveOrder,
- params: { orderHash },
- };
- });
- after(async () => {
- await blockchainLifecycle.revertAsync();
- });
- beforeEach(async () => {
- // Prepare OrderWatcher WebSocket server
- const orderWatcherConfig = {
- isVerbose: true,
- };
- wsServer = new OrderWatcherWebSocketServer(provider, networkId, contractAddresses, orderWatcherConfig);
- wsServer.start();
- await blockchainLifecycle.startAsync();
- wsClient = new WebSocket.w3cwebsocket('ws://127.0.0.1:8080/');
- logUtils.log(`${new Date()} [Client] Connected.`);
- });
- afterEach(async () => {
- wsClient.close();
- await blockchainLifecycle.revertAsync();
- wsServer.stop();
- logUtils.log(`${new Date()} [Client] Closed.`);
- });
-
- it('responds to getStats requests correctly', (done: any) => {
- const payload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'GET_STATS',
- };
- wsClient.onopen = () => wsClient.send(JSON.stringify(payload));
- wsClient.onmessage = (msg: any) => {
- const responseData = JSON.parse(msg.data);
- expect(responseData.id).to.be.eq(1);
- expect(responseData.jsonrpc).to.be.eq('2.0');
- expect(responseData.method).to.be.eq('GET_STATS');
- expect(responseData.result.orderCount).to.be.eq(0);
- done();
- };
- });
-
- it('throws an error when an invalid method is attempted', async () => {
- const invalidMethodPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'BAD_METHOD',
- };
- wsClient.onopen = () => wsClient.send(JSON.stringify(invalidMethodPayload));
- const errorMsg = await onMessageAsync(wsClient, null);
- const errorData = JSON.parse(errorMsg.data);
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.id).to.be.null;
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.method).to.be.null;
- expect(errorData.jsonrpc).to.be.eq('2.0');
- expect(errorData.error).to.match(/^Error: Expected request to conform to schema/);
- });
-
- it('throws an error when jsonrpc field missing from request', async () => {
- const noJsonRpcPayload = {
- id: 1,
- method: 'GET_STATS',
- };
- wsClient.onopen = () => wsClient.send(JSON.stringify(noJsonRpcPayload));
- const errorMsg = await onMessageAsync(wsClient, null);
- const errorData = JSON.parse(errorMsg.data);
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.method).to.be.null;
- expect(errorData.jsonrpc).to.be.eq('2.0');
- expect(errorData.error).to.match(/^Error: Expected request to conform to schema/);
- });
-
- it('throws an error when we try to add an order without a signedOrder', async () => {
- const noSignedOrderAddOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'ADD_ORDER',
- orderHash: '0x7337e2f2a9aa2ed6afe26edc2df7ad79c3ffa9cf9b81a964f707ea63f5272355',
- };
- wsClient.onopen = () => wsClient.send(JSON.stringify(noSignedOrderAddOrderPayload));
- const errorMsg = await onMessageAsync(wsClient, null);
- const errorData = JSON.parse(errorMsg.data);
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.id).to.be.null;
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.method).to.be.null;
- expect(errorData.jsonrpc).to.be.eq('2.0');
- expect(errorData.error).to.match(/^Error: Expected request to conform to schema/);
- });
-
- it('throws an error when we try to add a bad signedOrder', async () => {
- const invalidAddOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'ADD_ORDER',
- signedOrder: {
- makerAddress: '0x0',
- },
- };
- wsClient.onopen = () => wsClient.send(JSON.stringify(invalidAddOrderPayload));
- const errorMsg = await onMessageAsync(wsClient, null);
- const errorData = JSON.parse(errorMsg.data);
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.id).to.be.null;
- // tslint:disable-next-line:no-unused-expression
- expect(errorData.method).to.be.null;
- expect(errorData.error).to.match(/^Error: Expected request to conform to schema/);
- });
-
- it('executes addOrder and removeOrder requests correctly', async () => {
- wsClient.onopen = () => wsClient.send(JSON.stringify(addOrderPayload));
- const addOrderMsg = await onMessageAsync(wsClient, OrderWatcherMethod.AddOrder);
- const addOrderData = JSON.parse(addOrderMsg.data);
- expect(addOrderData.method).to.be.eq('ADD_ORDER');
- expect((wsServer as any)._orderWatcher._orderByOrderHash).to.deep.include({
- [orderHash]: signedOrder,
- });
-
- const clientOnMessagePromise = onMessageAsync(wsClient, OrderWatcherMethod.RemoveOrder);
- wsClient.send(JSON.stringify(removeOrderPayload));
- const removeOrderMsg = await clientOnMessagePromise;
- const removeOrderData = JSON.parse(removeOrderMsg.data);
- expect(removeOrderData.method).to.be.eq('REMOVE_ORDER');
- expect((wsServer as any)._orderWatcher._orderByOrderHash).to.not.deep.include({
- [orderHash]: signedOrder,
- });
- });
-
- it('broadcasts orderStateInvalid message when makerAddress allowance set to 0 for watched order', async () => {
- // Add the regular order
- wsClient.onopen = () => wsClient.send(JSON.stringify(addOrderPayload));
-
- // We register the onMessage callback before calling `setProxyAllowanceAsync` which we
- // expect will cause a message to be emitted. We do now "await" here, since we want to
- // check for messages _after_ calling `setProxyAllowanceAsync`
- const clientOnMessagePromise = onMessageAsync(wsClient, OrderWatcherMethod.Update);
-
- // Set the allowance to 0
- await contractWrappers.erc20Token.setProxyAllowanceAsync(makerTokenAddress, makerAddress, new BigNumber(0));
-
- // We now await the `onMessage` promise to check for the message
- const orderWatcherUpdateMsg = await clientOnMessagePromise;
- const orderWatcherUpdateData = JSON.parse(orderWatcherUpdateMsg.data);
- expect(orderWatcherUpdateData.method).to.be.eq('UPDATE');
- const invalidOrderState = orderWatcherUpdateData.result as OrderStateInvalid;
- expect(invalidOrderState.isValid).to.be.false();
- expect(invalidOrderState.orderHash).to.be.eq(orderHash);
- expect(invalidOrderState.error).to.be.eq(ExchangeContractErrs.InsufficientMakerAllowance);
- });
-
- it('broadcasts to multiple clients when an order backing ZRX allowance changes', async () => {
- // Prepare order
- const makerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(2), decimals);
- const takerFee = Web3Wrapper.toBaseUnitAmount(new BigNumber(0), decimals);
- const nonZeroMakerFeeSignedOrder = await fillScenarios.createFillableSignedOrderWithFeesAsync(
- makerAssetData,
- takerAssetData,
- makerFee,
- takerFee,
- makerAddress,
- takerAddress,
- fillableAmount,
- takerAddress,
- );
- const nonZeroMakerFeeOrderPayload = {
- id: 1,
- jsonrpc: '2.0',
- method: 'ADD_ORDER',
- params: {
- signedOrder: nonZeroMakerFeeSignedOrder,
- },
- };
-
- // Set up a second client and have it add the order
- wsClientTwo = new WebSocket.w3cwebsocket('ws://127.0.0.1:8080/');
- logUtils.log(`${new Date()} [Client] Connected.`);
- wsClientTwo.onopen = () => wsClientTwo.send(JSON.stringify(nonZeroMakerFeeOrderPayload));
-
- // Setup the onMessage callbacks, but don't await them yet
- const clientOneOnMessagePromise = onMessageAsync(wsClient, OrderWatcherMethod.Update);
- const clientTwoOnMessagePromise = onMessageAsync(wsClientTwo, OrderWatcherMethod.Update);
-
- // Change the allowance
- await contractWrappers.erc20Token.setProxyAllowanceAsync(zrxTokenAddress, makerAddress, new BigNumber(0));
-
- // Check that both clients receive the emitted event by awaiting the onMessageAsync promises
- let updateMsg = await clientOneOnMessagePromise;
- let updateData = JSON.parse(updateMsg.data);
- let orderState = updateData.result as OrderStateInvalid;
- expect(orderState.isValid).to.be.false();
- expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE');
-
- updateMsg = await clientTwoOnMessagePromise;
- updateData = JSON.parse(updateMsg.data);
- orderState = updateData.result as OrderStateInvalid;
- expect(orderState.isValid).to.be.false();
- expect(orderState.error).to.be.eq('INSUFFICIENT_MAKER_FEE_ALLOWANCE');
-
- wsClientTwo.close();
- logUtils.log(`${new Date()} [Client] Closed.`);
- });
-});
-
-// HACK: createFillableSignedOrderAsync is Promise-based, which forces us
-// to use Promises instead of the done() callbacks for tests.
-// onmessage callback must thus be wrapped as a Promise.
-async function onMessageAsync(client: WebSocket.w3cwebsocket, method: string | null): Promise<WsMessage> {
- return new Promise<WsMessage>(resolve => {
- client.onmessage = (msg: WsMessage) => {
- const data = JSON.parse(msg.data);
- if (data.method === method) {
- resolve(msg);
- }
- };
- });
-}
diff --git a/packages/order-watcher/test/utils/chai_setup.ts b/packages/order-watcher/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/order-watcher/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/order-watcher/test/utils/constants.ts b/packages/order-watcher/test/utils/constants.ts
deleted file mode 100644
index 78037647c..000000000
--- a/packages/order-watcher/test/utils/constants.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const constants = {
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- TESTRPC_NETWORK_ID: 50,
- ZRX_DECIMALS: 18,
-};
diff --git a/packages/order-watcher/test/utils/migrate.ts b/packages/order-watcher/test/utils/migrate.ts
deleted file mode 100644
index 665ce0faa..000000000
--- a/packages/order-watcher/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<ContractAddresses> {
- const txDefaults = {
- gas: devConstants.GAS_LIMIT,
- from: devConstants.TESTRPC_FIRST_ADDRESS,
- };
- return runMigrationsOnceAsync(provider, txDefaults);
-}
diff --git a/packages/order-watcher/test/utils/web3_wrapper.ts b/packages/order-watcher/test/utils/web3_wrapper.ts
deleted file mode 100644
index accfcb7fe..000000000
--- a/packages/order-watcher/test/utils/web3_wrapper.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { web3Factory } from '@0x/dev-utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { Provider } from 'ethereum-types';
-
-const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
-const web3Wrapper = new Web3Wrapper(provider);
-
-export { provider, web3Wrapper };
diff --git a/packages/order-watcher/tsconfig.json b/packages/order-watcher/tsconfig.json
deleted file mode 100644
index 2ee711adc..000000000
--- a/packages/order-watcher/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/order-watcher/tslint.json b/packages/order-watcher/tslint.json
deleted file mode 100644
index 4ade3b924..000000000
--- a/packages/order-watcher/tslint.json
+++ /dev/null
@@ -1,6 +0,0 @@
-{
- "rules": {
- "prefer-readonly": true
- },
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/order-watcher/typedoc-tsconfig.json b/packages/order-watcher/typedoc-tsconfig.json
deleted file mode 100644
index c9b0af1ae..000000000
--- a/packages/order-watcher/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["./src/**/*", "./test/**/*"]
-}
diff --git a/packages/pipeline/.npmignore b/packages/pipeline/.npmignore
deleted file mode 100644
index 89302c908..000000000
--- a/packages/pipeline/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/generated_docs/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/pipeline/README.md b/packages/pipeline/README.md
deleted file mode 100644
index 4fc8e0ff9..000000000
--- a/packages/pipeline/README.md
+++ /dev/null
@@ -1,184 +0,0 @@
-## @0xproject/pipeline
-
-This repository contains scripts used for scraping data from the Ethereum blockchain into SQL tables for analysis by the 0x team.
-
-## 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:
-
-```bash
-yarn install
-```
-
-### Build
-
-```bash
-yarn build
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Migrations
-
-Create a new migration: `yarn migrate:create --name MigrationNameInCamelCase`
-Run migrations: `yarn migrate:run`
-Revert the most recent migration (CAUTION: may result in data loss!): `yarn migrate:revert`
-
-## Testing
-
-There are several test scripts in **package.json**. You can run all the tests
-with `yarn test:all` or run certain tests seprately by following the
-instructions below. Some tests may not work out of the box on certain platforms
-or operating systems (see the "Database tests" section below).
-
-### Unit tests
-
-The unit tests can be run with `yarn test`. These tests don't depend on any
-services or databases and will run in any environment that can run Node.
-
-### Database tests
-
-Database integration tests can be run with `yarn test:db`. These tests will
-attempt to automatically spin up a Postgres database via Docker. If this doesn't
-work you have two other options:
-
-1. Set the `DOCKER_SOCKET` environment variable to a valid socket path to use
- for communicating with Docker.
-2. Start Postgres manually and set the `ZEROEX_DATA_PIPELINE_TEST_DB_URL`
- environment variable. If this is set, the tests will use your existing
- Postgres database instead of trying to create one with Docker.
-
-## Running locally
-
-`pipeline` requires access to a PostgreSQL database. The easiest way to start
-Postgres is via Docker. Depending on your platform, you may need to prepend
-`sudo` to the following command:
-
-```
-docker run --rm -d -p 5432:5432 --name pipeline_postgres postgres:11-alpine
-```
-
-This will start a Postgres server with the default username and database name
-(`postgres` and `postgres`). You should set the environment variable as follows:
-
-```
-export ZEROEX_DATA_PIPELINE_DB_URL=postgresql://postgres@localhost/postgres
-```
-
-First thing you will need to do is run the migrations:
-
-```
-yarn migrate:run
-```
-
-Now you can run scripts locally:
-
-```
-node packages/pipeline/lib/src/scripts/pull_radar_relay_orders.js
-```
-
-To stop the Postgres server (you may need to add `sudo`):
-
-```
-docker stop pipeline_postgres
-```
-
-This will remove all data from the database.
-
-If you prefer, you can also install Postgres with e.g.,
-[Homebrew](https://wiki.postgresql.org/wiki/Homebrew) or
-[Postgress.app](https://postgresapp.com/). Keep in mind that you will need to
-set the`ZEROEX_DATA_PIPELINE_DB_URL` environment variable to a valid
-[PostgreSQL connection url](https://stackoverflow.com/questions/3582552/postgresql-connection-url)
-
-## Directory structure
-
-```
-.
-├── lib: Code generated by the TypeScript compiler. Don't edit this directly.
-├── migrations: Code for creating and updating database schemas.
-├── node_modules:
-├── src: All TypeScript source code.
-│   ├── data_sources: Code responsible for getting raw data, typically from a third-party source.
-│   ├── entities: TypeORM entities which closely mirror our database schemas. Some other ORMs call these "models".
-│   ├── parsers: Code for converting raw data into entities.
-│   ├── scripts: Executable scripts which put all the pieces together.
-│   └── utils: Various utils used across packages/files.
-├── test: All tests go here and are organized in the same way as the folder/file that they test.
-```
-
-## Adding new data to the pipeline
-
-1. Create an entity in the _entities_ directory. Entities directly mirror our
- database schemas. We follow the practice of having "dumb" entities, so
- entity classes should typically not have any methods.
-2. Create a migration using the `yarn migrate:create` command. Create/update
- tables as needed. Remember to fill in both the `up` and `down` methods. Try
- to avoid data loss as much as possible in your migrations.
-3. Add basic tests for your entity and migrations to the **test/entities/**
- directory.
-4. Create a class or function in the **data_sources/** directory for getting
- raw data. This code should abstract away pagination and rate-limiting as
- much as possible.
-5. Create a class or function in the **parsers/** directory for converting the
- raw data into an entity. Also add tests in the **tests/** directory to test
- the parser.
-6. Create an executable script in the **scripts/** directory for putting
- everything together. Your script can accept environment variables for things
- like API keys. It should pull the data, parse it, and save it to the
- database. Scripts should be idempotent and atomic (when possible). What this
- means is that your script may be responsible for determining _which_ data
- needs to be updated. For example, you may need to query the database to find
- the most recent block number that we have already pulled, then pull new data
- starting from that block number.
-7. Run the migrations and then run your new script locally and verify it works
- as expected.
-8. After all tests pass and you can run the script locally, open a new PR to
- the monorepo. Don't merge this yet!
-9. If you added any new scripts or dependencies between scripts, you will need
- to make changes to https://github.com/0xProject/0x-pipeline-orchestration
- and make a separate PR there. Don't merge this yet!
-10. After your PR passes code review, ask @feuGeneA or @xianny to deploy your
- changes to the QA environment. Check the [QA Airflow dashboard](http://airflow-qa.0x.org:8080)
- to make sure everything works correctly in the QA environment.
-11. Merge your PR to 0x-monorepo (and
- https://github.com/0xProject/0x-pipeline-orchestration if needed). Then ask
- @feuGeneA or @xianny to deploy to production.
-12. Monitor the [production Airflow dashboard](http://airflow.0x.org:8080) to
- make sure everything still works.
-13. Celebrate! :tada:
-
-#### Additional guidelines and tips:
-
-- Table names should be plural and separated by underscores (e.g.,
- `exchange_fill_events`).
-- Any table which contains data which comes directly from a third-party source
- should be namespaced in the `raw` PostgreSQL schema.
-- Column names in the database should be separated by underscores (e.g.,
- `maker_asset_type`).
-- Field names in entity classes (like any other fields in TypeScript) should
- be camel-cased (e.g., `makerAssetType`).
-- All timestamps should be stored as milliseconds since the Unix Epoch.
-- Use the `BigNumber` type for TypeScript code which deals with 256-bit
- numbers from smart contracts or for any case where we are dealing with large
- floating point numbers.
-- [TypeORM documentation](http://typeorm.io/#/) is pretty robust and can be a
- helpful resource.
-
-* Scripts/parsers should perform minimum data transformation/normalization.
- The idea here is to have a raw data feed that will be cleaned up and
- synthesized in a separate step.
diff --git a/packages/pipeline/coverage/.gitkeep b/packages/pipeline/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/pipeline/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/pipeline/migrations/1542070840010-InitialSchema.ts b/packages/pipeline/migrations/1542070840010-InitialSchema.ts
deleted file mode 100644
index 895f9e6c9..000000000
--- a/packages/pipeline/migrations/1542070840010-InitialSchema.ts
+++ /dev/null
@@ -1,187 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-const blocks = new Table({
- name: 'raw.blocks',
- columns: [
- { name: 'number', type: 'bigint', isPrimary: true },
- { name: 'hash', type: 'varchar', isPrimary: true },
- { name: 'timestamp', type: 'bigint' },
- ],
-});
-
-const exchange_cancel_events = new Table({
- name: 'raw.exchange_cancel_events',
- columns: [
- { name: 'contract_address', type: 'char(42)', isPrimary: true },
- { name: 'log_index', type: 'integer', isPrimary: true },
- { name: 'block_number', type: 'bigint', isPrimary: true },
-
- { name: 'raw_data', type: 'varchar' },
-
- { name: 'transaction_hash', type: 'varchar' },
- { name: 'maker_address', type: 'char(42)' },
- { name: 'taker_address', type: 'char(42)' },
- { name: 'fee_recipient_address', type: 'char(42)' },
- { name: 'sender_address', type: 'char(42)' },
- { name: 'order_hash', type: 'varchar' },
-
- { name: 'raw_maker_asset_data', type: 'varchar' },
- { name: 'maker_asset_type', type: 'varchar' },
- { name: 'maker_asset_proxy_id', type: 'varchar' },
- { name: 'maker_token_address', type: 'char(42)' },
- { name: 'maker_token_id', type: 'varchar', isNullable: true },
- { name: 'raw_taker_asset_data', type: 'varchar' },
- { name: 'taker_asset_type', type: 'varchar' },
- { name: 'taker_asset_proxy_id', type: 'varchar' },
- { name: 'taker_token_address', type: 'char(42)' },
- { name: 'taker_token_id', type: 'varchar', isNullable: true },
- ],
-});
-
-const exchange_cancel_up_to_events = new Table({
- name: 'raw.exchange_cancel_up_to_events',
- columns: [
- { name: 'contract_address', type: 'char(42)', isPrimary: true },
- { name: 'log_index', type: 'integer', isPrimary: true },
- { name: 'block_number', type: 'bigint', isPrimary: true },
-
- { name: 'raw_data', type: 'varchar' },
-
- { name: 'transaction_hash', type: 'varchar' },
- { name: 'maker_address', type: 'char(42)' },
- { name: 'sender_address', type: 'char(42)' },
- { name: 'order_epoch', type: 'varchar' },
- ],
-});
-
-const exchange_fill_events = new Table({
- name: 'raw.exchange_fill_events',
- columns: [
- { name: 'contract_address', type: 'char(42)', isPrimary: true },
- { name: 'log_index', type: 'integer', isPrimary: true },
- { name: 'block_number', type: 'bigint', isPrimary: true },
-
- { name: 'raw_data', type: 'varchar' },
-
- { name: 'transaction_hash', type: 'varchar' },
- { name: 'maker_address', type: 'char(42)' },
- { name: 'taker_address', type: 'char(42)' },
- { name: 'fee_recipient_address', type: 'char(42)' },
- { name: 'sender_address', type: 'char(42)' },
- { name: 'maker_asset_filled_amount', type: 'varchar' },
- { name: 'taker_asset_filled_amount', type: 'varchar' },
- { name: 'maker_fee_paid', type: 'varchar' },
- { name: 'taker_fee_paid', type: 'varchar' },
- { name: 'order_hash', type: 'varchar' },
-
- { name: 'raw_maker_asset_data', type: 'varchar' },
- { name: 'maker_asset_type', type: 'varchar' },
- { name: 'maker_asset_proxy_id', type: 'varchar' },
- { name: 'maker_token_address', type: 'char(42)' },
- { name: 'maker_token_id', type: 'varchar', isNullable: true },
- { name: 'raw_taker_asset_data', type: 'varchar' },
- { name: 'taker_asset_type', type: 'varchar' },
- { name: 'taker_asset_proxy_id', type: 'varchar' },
- { name: 'taker_token_address', type: 'char(42)' },
- { name: 'taker_token_id', type: 'varchar', isNullable: true },
- ],
-});
-
-const relayers = new Table({
- name: 'raw.relayers',
- columns: [
- { name: 'uuid', type: 'varchar', isPrimary: true },
- { name: 'name', type: 'varchar' },
- { name: 'sra_http_endpoint', type: 'varchar', isNullable: true },
- { name: 'sra_ws_endpoint', type: 'varchar', isNullable: true },
- { name: 'app_url', type: 'varchar', isNullable: true },
- { name: 'fee_recipient_addresses', type: 'char(42)', isArray: true },
- { name: 'taker_addresses', type: 'char(42)', isArray: true },
- ],
-});
-
-const sra_orders = new Table({
- name: 'raw.sra_orders',
- columns: [
- { name: 'exchange_address', type: 'char(42)', isPrimary: true },
- { name: 'order_hash_hex', type: 'varchar', isPrimary: true },
-
- { name: 'source_url', type: 'varchar' },
- { name: 'last_updated_timestamp', type: 'bigint' },
- { name: 'first_seen_timestamp', type: 'bigint' },
-
- { name: 'maker_address', type: 'char(42)' },
- { name: 'taker_address', type: 'char(42)' },
- { name: 'fee_recipient_address', type: 'char(42)' },
- { name: 'sender_address', type: 'char(42)' },
- { name: 'maker_asset_filled_amount', type: 'varchar' },
- { name: 'taker_asset_filled_amount', type: 'varchar' },
- { name: 'maker_fee', type: 'varchar' },
- { name: 'taker_fee', type: 'varchar' },
- { name: 'expiration_time_seconds', type: 'int' },
- { name: 'salt', type: 'varchar' },
- { name: 'signature', type: 'varchar' },
-
- { name: 'raw_maker_asset_data', type: 'varchar' },
- { name: 'maker_asset_type', type: 'varchar' },
- { name: 'maker_asset_proxy_id', type: 'varchar' },
- { name: 'maker_token_address', type: 'char(42)' },
- { name: 'maker_token_id', type: 'varchar', isNullable: true },
- { name: 'raw_taker_asset_data', type: 'varchar' },
- { name: 'taker_asset_type', type: 'varchar' },
- { name: 'taker_asset_proxy_id', type: 'varchar' },
- { name: 'taker_token_address', type: 'char(42)' },
- { name: 'taker_token_id', type: 'varchar', isNullable: true },
-
- { name: 'metadata_json', type: 'varchar' },
- ],
-});
-
-const token_on_chain_metadata = new Table({
- name: 'raw.token_on_chain_metadata',
- columns: [
- { name: 'address', type: 'char(42)', isPrimary: true },
- { name: 'decimals', type: 'integer' },
- { name: 'symbol', type: 'varchar' },
- { name: 'name', type: 'varchar' },
- ],
-});
-
-const transactions = new Table({
- name: 'raw.transactions',
- columns: [
- { name: 'block_number', type: 'bigint', isPrimary: true },
- { name: 'block_hash', type: 'varchar', isPrimary: true },
- { name: 'transaction_hash', type: 'varchar', isPrimary: true },
- { name: 'gas_used', type: 'bigint' },
- { name: 'gas_price', type: 'bigint' },
- ],
-});
-
-export class InitialSchema1542070840010 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.createSchema('raw');
-
- await queryRunner.createTable(blocks);
- await queryRunner.createTable(exchange_cancel_events);
- await queryRunner.createTable(exchange_cancel_up_to_events);
- await queryRunner.createTable(exchange_fill_events);
- await queryRunner.createTable(relayers);
- await queryRunner.createTable(sra_orders);
- await queryRunner.createTable(token_on_chain_metadata);
- await queryRunner.createTable(transactions);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable(blocks.name);
- await queryRunner.dropTable(exchange_cancel_events.name);
- await queryRunner.dropTable(exchange_cancel_up_to_events.name);
- await queryRunner.dropTable(exchange_fill_events.name);
- await queryRunner.dropTable(relayers.name);
- await queryRunner.dropTable(sra_orders.name);
- await queryRunner.dropTable(token_on_chain_metadata.name);
- await queryRunner.dropTable(transactions.name);
-
- await queryRunner.dropSchema('raw');
- }
-}
diff --git a/packages/pipeline/migrations/1542147915364-NewSraOrderTimestampFormat.ts b/packages/pipeline/migrations/1542147915364-NewSraOrderTimestampFormat.ts
deleted file mode 100644
index 5a8f3fec8..000000000
--- a/packages/pipeline/migrations/1542147915364-NewSraOrderTimestampFormat.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-export class NewSraOrderTimestampFormat1542147915364 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- DROP CONSTRAINT "PK_09bfb9980715329563bd53d667e",
- ADD PRIMARY KEY (order_hash_hex, exchange_address, source_url);
- `,
- );
-
- await queryRunner.query(
- `CREATE TABLE raw.sra_orders_observed_timestamps (
- order_hash_hex varchar NOT NULL,
- exchange_address varchar NOT NULL,
- source_url varchar NOT NULL,
- observed_timestamp bigint NOT NULL,
- FOREIGN KEY
- (order_hash_hex, exchange_address, source_url)
- REFERENCES raw.sra_orders (order_hash_hex, exchange_address, source_url),
- PRIMARY KEY (order_hash_hex, exchange_address, source_url, observed_timestamp)
- );`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- DROP COLUMN last_updated_timestamp,
- DROP COLUMN first_seen_timestamp;`,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable('raw.sra_orders_observed_timestamps');
-
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- ADD COLUMN last_updated_timestamp bigint NOT NULL DEFAULT 0,
- ADD COLUMN first_seen_timestamp bigint NOT NULL DEFAULT 0;`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- DROP CONSTRAINT sra_orders_pkey,
- ADD CONSTRAINT "PK_09bfb9980715329563bd53d667e" PRIMARY KEY ("exchange_address", "order_hash_hex");
- `,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts b/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts
deleted file mode 100644
index a13e3efa5..000000000
--- a/packages/pipeline/migrations/1542152278484-RenameSraOrdersFilledAmounts.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class RenameSraOrdersFilledAmounts1542152278484 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.renameColumn('raw.sra_orders', 'maker_asset_filled_amount', 'maker_asset_amount');
- await queryRunner.renameColumn('raw.sra_orders', 'taker_asset_filled_amount', 'taker_asset_amount');
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.renameColumn('raw.sra_orders', 'maker_asset_amount', 'maker_asset_filled_amount');
- await queryRunner.renameColumn('raw.sra_orders', 'taker_asset_amount', 'taker_asset_filled_amount');
- }
-}
diff --git a/packages/pipeline/migrations/1542234704666-ConvertBigNumberToNumeric.ts b/packages/pipeline/migrations/1542234704666-ConvertBigNumberToNumeric.ts
deleted file mode 100644
index 5200ef7cc..000000000
--- a/packages/pipeline/migrations/1542234704666-ConvertBigNumberToNumeric.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class ConvertBigNumberToNumeric1542234704666 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.exchange_fill_events
- ALTER COLUMN maker_asset_filled_amount TYPE numeric USING maker_asset_filled_amount::numeric,
- ALTER COLUMN taker_asset_filled_amount TYPE numeric USING taker_asset_filled_amount::numeric,
- ALTER COLUMN maker_fee_paid TYPE numeric USING maker_fee_paid::numeric,
- ALTER COLUMN taker_fee_paid TYPE numeric USING taker_fee_paid::numeric;`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.exchange_cancel_up_to_events
- ALTER COLUMN order_epoch TYPE numeric USING order_epoch::numeric;`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- ALTER COLUMN maker_asset_amount TYPE numeric USING maker_asset_amount::numeric,
- ALTER COLUMN taker_asset_amount TYPE numeric USING taker_asset_amount::numeric,
- ALTER COLUMN maker_fee TYPE numeric USING maker_fee::numeric,
- ALTER COLUMN taker_fee TYPE numeric USING taker_fee::numeric,
- ALTER COLUMN expiration_time_seconds TYPE numeric USING expiration_time_seconds::numeric,
- ALTER COLUMN salt TYPE numeric USING salt::numeric;`,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.sra_orders
- ALTER COLUMN maker_asset_amount TYPE varchar USING maker_asset_amount::varchar,
- ALTER COLUMN taker_asset_amount TYPE varchar USING taker_asset_amount::varchar,
- ALTER COLUMN maker_fee TYPE varchar USING maker_fee::varchar,
- ALTER COLUMN taker_fee TYPE varchar USING taker_fee::varchar,
- ALTER COLUMN expiration_time_seconds TYPE varchar USING expiration_time_seconds::varchar,
- ALTER COLUMN salt TYPE varchar USING salt::varchar;`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.exchange_cancel_up_to_events
- ALTER COLUMN order_epoch TYPE varchar USING order_epoch::varchar;`,
- );
-
- await queryRunner.query(
- `ALTER TABLE raw.exchange_fill_events
- ALTER COLUMN maker_asset_filled_amount TYPE varchar USING maker_asset_filled_amount::varchar,
- ALTER COLUMN taker_asset_filled_amount TYPE varchar USING taker_asset_filled_amount::varchar,
- ALTER COLUMN maker_fee_paid TYPE varchar USING maker_fee_paid::varchar,
- ALTER COLUMN taker_fee_paid TYPE varchar USING taker_fee_paid::varchar;`,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1542249766882-AddHomepageUrlToRelayers.ts b/packages/pipeline/migrations/1542249766882-AddHomepageUrlToRelayers.ts
deleted file mode 100644
index 9a4811ad5..000000000
--- a/packages/pipeline/migrations/1542249766882-AddHomepageUrlToRelayers.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
-
-export class AddHomepageUrlToRelayers1542249766882 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.addColumn(
- 'raw.relayers',
- new TableColumn({ name: 'homepage_url', type: 'varchar', default: `'unknown'` }),
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropColumn('raw.relayers', 'homepage_url');
- }
-}
diff --git a/packages/pipeline/migrations/1542401122477-MakeTakerAddressNullable.ts b/packages/pipeline/migrations/1542401122477-MakeTakerAddressNullable.ts
deleted file mode 100644
index 957c85a36..000000000
--- a/packages/pipeline/migrations/1542401122477-MakeTakerAddressNullable.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class MakeTakerAddressNullable1542401122477 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.exchange_cancel_events
- ALTER COLUMN taker_address DROP NOT NULL;`,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.exchange_cancel_events
- ALTER COLUMN taker_address SET NOT NULL;`,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts b/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts
deleted file mode 100644
index 838f5ba9c..000000000
--- a/packages/pipeline/migrations/1542655823221-NewMetadataAndOHLCVTables.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class NewMetadataAndOHLCVTables1542655823221 implements MigrationInterface {
- // tslint:disable-next-line
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`
- CREATE TABLE raw.token_metadata (
- address VARCHAR NOT NULL,
- authority VARCHAR NOT NULL,
- decimals INT NULL,
- symbol VARCHAR NULL,
- name VARCHAR NULL,
-
- PRIMARY KEY (address, authority)
- );
- `);
-
- await queryRunner.dropTable('raw.token_on_chain_metadata');
-
- await queryRunner.query(`
- CREATE TABLE raw.ohlcv_external (
- exchange VARCHAR NOT NULL,
- from_symbol VARCHAR NOT NULL,
- to_symbol VARCHAR NOT NULL,
- start_time BIGINT NOT NULL,
- end_time BIGINT NOT NULL,
-
- open DOUBLE PRECISION NOT NULL,
- close DOUBLE PRECISION NOT NULL,
- low DOUBLE PRECISION NOT NULL,
- high DOUBLE PRECISION NOT NULL,
- volume_from DOUBLE PRECISION NOT NULL,
- volume_to DOUBLE PRECISION NOT NULL,
-
- source VARCHAR NOT NULL,
- observed_timestamp BIGINT NOT NULL,
-
- PRIMARY KEY (exchange, from_symbol, to_symbol, start_time, end_time, source, observed_timestamp)
- );
- `);
- }
-
- // tslint:disable-next-line
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`
- CREATE TABLE raw.token_on_chain_metadata (
- address VARCHAR NOT NULL,
- decimals INT NULL,
- symbol VARCHAR NULL,
- name VARCHAR NULL,
-
- PRIMARY KEY (address)
- );
- `);
-
- await queryRunner.dropTable('raw.token_metadata');
-
- await queryRunner.dropTable('raw.ohlcv_external');
- }
-}
diff --git a/packages/pipeline/migrations/1543434472116-TokenOrderbookSnapshots.ts b/packages/pipeline/migrations/1543434472116-TokenOrderbookSnapshots.ts
deleted file mode 100644
index a7117c753..000000000
--- a/packages/pipeline/migrations/1543434472116-TokenOrderbookSnapshots.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-const tokenOrderbookSnapshots = new Table({
- name: 'raw.token_orderbook_snapshots',
- columns: [
- { name: 'observed_timestamp', type: 'bigint', isPrimary: true },
- { name: 'source', type: 'varchar', isPrimary: true },
- { name: 'order_type', type: 'order_t' },
- { name: 'price', type: 'numeric', isPrimary: true },
-
- { name: 'base_asset_symbol', type: 'varchar', isPrimary: true },
- { name: 'base_asset_address', type: 'char(42)' },
- { name: 'base_volume', type: 'numeric' },
-
- { name: 'quote_asset_symbol', type: 'varchar', isPrimary: true },
- { name: 'quote_asset_address', type: 'char(42)' },
- { name: 'quote_volume', type: 'numeric' },
- ],
-});
-
-export class TokenOrderbookSnapshots1543434472116 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`CREATE TYPE order_t AS enum('bid', 'ask');`);
- await queryRunner.createTable(tokenOrderbookSnapshots);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable(tokenOrderbookSnapshots.name);
- }
-}
diff --git a/packages/pipeline/migrations/1543446690436-CreateDexTrades.ts b/packages/pipeline/migrations/1543446690436-CreateDexTrades.ts
deleted file mode 100644
index 267cf144b..000000000
--- a/packages/pipeline/migrations/1543446690436-CreateDexTrades.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-const dexTrades = new Table({
- name: 'raw.dex_trades',
- columns: [
- { name: 'source_url', type: 'varchar', isPrimary: true },
- { name: 'tx_hash', type: 'varchar', isPrimary: true },
-
- { name: 'tx_timestamp', type: 'bigint' },
- { name: 'tx_date', type: 'varchar' },
- { name: 'tx_sender', type: 'varchar(42)' },
- { name: 'smart_contract_id', type: 'bigint' },
- { name: 'smart_contract_address', type: 'varchar(42)' },
- { name: 'contract_type', type: 'varchar' },
- { name: 'maker', type: 'varchar(42)' },
- { name: 'taker', type: 'varchar(42)' },
- { name: 'amount_buy', type: 'numeric' },
- { name: 'maker_fee_amount', type: 'numeric' },
- { name: 'buy_currency_id', type: 'bigint' },
- { name: 'buy_symbol', type: 'varchar' },
- { name: 'amount_sell', type: 'numeric' },
- { name: 'taker_fee_amount', type: 'numeric' },
- { name: 'sell_currency_id', type: 'bigint' },
- { name: 'sell_symbol', type: 'varchar' },
- { name: 'maker_annotation', type: 'varchar' },
- { name: 'taker_annotation', type: 'varchar' },
- { name: 'protocol', type: 'varchar' },
- { name: 'buy_address', type: 'varchar(42)', isNullable: true },
- { name: 'sell_address', type: 'varchar(42)', isNullable: true },
- ],
-});
-
-export class CreateDexTrades1543446690436 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.createTable(dexTrades);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable(dexTrades);
- }
-}
diff --git a/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts b/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts
deleted file mode 100644
index 351bc7eb8..000000000
--- a/packages/pipeline/migrations/1543980079179-ConvertTokenMetadataDecimalsToBigNumber.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class ConvertTokenMetadataDecimalsToBigNumber1543980079179 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.token_metadata
- ALTER COLUMN decimals TYPE numeric USING decimals::numeric;`,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.token_metadata
- ALTER COLUMN decimals TYPE numeric USING decimals::integer;`,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1543983324954-ConvertTransactionGasPriceToBigNumber.ts b/packages/pipeline/migrations/1543983324954-ConvertTransactionGasPriceToBigNumber.ts
deleted file mode 100644
index dcb0fd727..000000000
--- a/packages/pipeline/migrations/1543983324954-ConvertTransactionGasPriceToBigNumber.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class ConvertTransactionGasPriceToBigNumber1543983324954 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.transactions
- ALTER COLUMN gas_price TYPE numeric USING gas_price::numeric,
- ALTER COLUMN gas_used TYPE numeric USING gas_used::numeric;`,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.transactions
- ALTER COLUMN gas_price TYPE numeric USING gas_price::bigint,
- ALTER COLUMN gas_used TYPE numeric USING gas_used::bigint;`,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts b/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
deleted file mode 100644
index 2e84e0ec8..000000000
--- a/packages/pipeline/migrations/1544131464368-CreateERC20ApprovalEvents.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-const erc20ApprovalEvents = new Table({
- name: 'raw.erc20_approval_events',
- columns: [
- { name: 'token_address', type: 'varchar(42)', isPrimary: true },
- { name: 'log_index', type: 'integer', isPrimary: true },
- { name: 'block_number', type: 'bigint', isPrimary: true },
-
- { name: 'raw_data', type: 'varchar' },
- { name: 'transaction_hash', type: 'varchar' },
- { name: 'owner_address', type: 'varchar(42)' },
- { name: 'spender_address', type: 'varchar(42)' },
- { name: 'amount', type: 'numeric' },
- ],
-});
-
-export class CreateERC20TokenApprovalEvents1544131464368 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.createTable(erc20ApprovalEvents);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable(erc20ApprovalEvents);
- }
-}
diff --git a/packages/pipeline/migrations/1544131658904-TokenOrderbookSnapshotAddOrderType.ts b/packages/pipeline/migrations/1544131658904-TokenOrderbookSnapshotAddOrderType.ts
deleted file mode 100644
index a501ec6d8..000000000
--- a/packages/pipeline/migrations/1544131658904-TokenOrderbookSnapshotAddOrderType.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class TokenOrderbookSnapshotAddOrderType1544131658904 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.token_orderbook_snapshots
- DROP CONSTRAINT "PK_8a16487e7cb6862ec5a84ed3495",
- ADD PRIMARY KEY (observed_timestamp, source, order_type, price, base_asset_symbol, quote_asset_symbol);
- `,
- );
- await queryRunner.query(
- `ALTER TABLE raw.token_orderbook_snapshots
- ALTER COLUMN quote_asset_address DROP NOT NULL,
- ALTER COLUMN base_asset_address DROP NOT NULL;
- `,
- );
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(
- `ALTER TABLE raw.token_orderbook_snapshots
- ALTER COLUMN quote_asset_address SET NOT NULL,
- ALTER COLUMN base_asset_address SET NOT NULL;
- `,
- );
- await queryRunner.query(
- `ALTER TABLE raw.token_orderbook_snapshots
- DROP CONSTRAINT token_orderbook_snapshots_pkey,
- ADD CONSTRAINT "PK_8a16487e7cb6862ec5a84ed3495" PRIMARY KEY (observed_timestamp, source, price, base_asset_symbol, quote_asset_symbol);
- `,
- );
- }
-}
diff --git a/packages/pipeline/migrations/1545440485644-CreateCopperTables.ts b/packages/pipeline/migrations/1545440485644-CreateCopperTables.ts
deleted file mode 100644
index 64bf70af4..000000000
--- a/packages/pipeline/migrations/1545440485644-CreateCopperTables.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { MigrationInterface, QueryRunner, Table } from 'typeorm';
-
-const leads = new Table({
- name: 'raw.copper_leads',
- columns: [
- { name: 'id', type: 'bigint', isPrimary: true },
- { name: 'name', type: 'varchar', isNullable: true },
- { name: 'first_name', type: 'varchar', isNullable: true },
- { name: 'last_name', type: 'varchar', isNullable: true },
- { name: 'middle_name', type: 'varchar', isNullable: true },
- { name: 'assignee_id', type: 'bigint', isNullable: true },
- { name: 'company_name', type: 'varchar', isNullable: true },
- { name: 'customer_source_id', type: 'bigint', isNullable: true },
- { name: 'monetary_value', type: 'integer', isNullable: true },
- { name: 'status', type: 'varchar' },
- { name: 'status_id', type: 'bigint' },
- { name: 'title', type: 'varchar', isNullable: true },
- { name: 'date_created', type: 'bigint' },
- { name: 'date_modified', type: 'bigint', isPrimary: true },
- ],
-});
-const activities = new Table({
- name: 'raw.copper_activities',
- columns: [
- { name: 'id', type: 'bigint', isPrimary: true },
- { name: 'parent_id', type: 'bigint' },
- { name: 'parent_type', type: 'varchar' },
- { name: 'type_id', type: 'bigint' },
- { name: 'type_category', type: 'varchar' },
- { name: 'type_name', type: 'varchar', isNullable: true },
- { name: 'user_id', type: 'bigint' },
- { name: 'old_value_id', type: 'bigint', isNullable: true },
- { name: 'old_value_name', type: 'varchar', isNullable: true },
- { name: 'new_value_id', type: 'bigint', isNullable: true },
- { name: 'new_value_name', type: 'varchar', isNullable: true },
- { name: 'date_created', type: 'bigint' },
- { name: 'date_modified', type: 'bigint', isPrimary: true },
- ],
-});
-
-const opportunities = new Table({
- name: 'raw.copper_opportunities',
- columns: [
- { name: 'id', type: 'bigint', isPrimary: true },
- { name: 'name', type: 'varchar' },
- { name: 'assignee_id', isNullable: true, type: 'bigint' },
- { name: 'close_date', isNullable: true, type: 'varchar' },
- { name: 'company_id', isNullable: true, type: 'bigint' },
- { name: 'company_name', isNullable: true, type: 'varchar' },
- { name: 'customer_source_id', isNullable: true, type: 'bigint' },
- { name: 'loss_reason_id', isNullable: true, type: 'bigint' },
- { name: 'pipeline_id', type: 'bigint' },
- { name: 'pipeline_stage_id', type: 'bigint' },
- { name: 'primary_contact_id', isNullable: true, type: 'bigint' },
- { name: 'priority', isNullable: true, type: 'varchar' },
- { name: 'status', type: 'varchar' },
- { name: 'interaction_count', type: 'bigint' },
- { name: 'monetary_value', isNullable: true, type: 'integer' },
- { name: 'win_probability', isNullable: true, type: 'integer' },
- { name: 'date_created', type: 'bigint' },
- { name: 'date_modified', type: 'bigint', isPrimary: true },
- { name: 'custom_fields', type: 'jsonb' },
- ],
-});
-
-const activityTypes = new Table({
- name: 'raw.copper_activity_types',
- columns: [
- { name: 'id', type: 'bigint', isPrimary: true },
- { name: 'category', type: 'varchar' },
- { name: 'name', type: 'varchar' },
- { name: 'is_disabled', type: 'boolean', isNullable: true },
- { name: 'count_as_interaction', type: 'boolean', isNullable: true },
- ],
-});
-
-const customFields = new Table({
- name: 'raw.copper_custom_fields',
- columns: [
- { name: 'id', type: 'bigint', isPrimary: true },
- { name: 'name', type: 'varchar' },
- { name: 'data_type', type: 'varchar' },
- { name: 'field_type', type: 'varchar', isNullable: true },
- ],
-});
-
-export class CreateCopperTables1544055699284 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.createTable(leads);
- await queryRunner.createTable(activities);
- await queryRunner.createTable(opportunities);
- await queryRunner.createTable(activityTypes);
- await queryRunner.createTable(customFields);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.dropTable(leads.name);
- await queryRunner.dropTable(activities.name);
- await queryRunner.dropTable(opportunities.name);
- await queryRunner.dropTable(activityTypes.name);
- await queryRunner.dropTable(customFields.name);
- }
-}
diff --git a/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts b/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts
deleted file mode 100644
index 957af4941..000000000
--- a/packages/pipeline/migrations/1547153875669-UpdateDDexAPIToV3.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { MigrationInterface, QueryRunner } from 'typeorm';
-
-export class UpdateDDexAPIToV31547153875669 implements MigrationInterface {
- public async up(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`
- UPDATE raw.token_orderbook_snapshots
- SET quote_asset_symbol='WETH'
- WHERE quote_asset_symbol='ETH' AND
- source='ddex';
- `);
- }
-
- public async down(queryRunner: QueryRunner): Promise<any> {
- await queryRunner.query(`
- UPDATE raw.token_orderbook_snapshots
- SET quote_asset_symbol='ETH'
- WHERE quote_asset_symbol='WETH' AND
- source='ddex';
- `);
- }
-}
diff --git a/packages/pipeline/package.json b/packages/pipeline/package.json
deleted file mode 100644
index 908734687..000000000
--- a/packages/pipeline/package.json
+++ /dev/null
@@ -1,66 +0,0 @@
-{
- "name": "@0x/pipeline",
- "version": "1.0.5",
- "private": true,
- "description": "Data pipeline for offline analysis",
- "scripts": {
- "build": "yarn tsc -b",
- "build:ci": "yarn build",
- "test": "yarn run_mocha",
- "rebuild_and_test": "run-s build test:all",
- "test:db": "yarn run_mocha:db",
- "test:all": "run-s test test:db",
- "test:circleci": "yarn test:coverage",
- "run_mocha": "mocha --require source-map-support/register --require make-promises-safe 'lib/test/!(entities)/**/*_test.js' --bail --exit",
- "run_mocha:db": "mocha --require source-map-support/register --require make-promises-safe lib/test/db_global_hooks.js 'lib/test/entities/*_test.js' --bail --exit --timeout 60000",
- "test:coverage": "nyc npm run test:all --all && yarn coverage:report:lcov",
- "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
- "clean": "shx rm -rf lib",
- "lint": "tslint --project . --format stylish --exclude ./migrations/**/* --exclude ./test/fixtures/**/**/*.json",
- "migrate:run": "yarn typeorm migration:run --config ./lib/src/ormconfig",
- "migrate:revert": "yarn typeorm migration:revert --config ./lib/src/ormconfig",
- "migrate:create": "yarn typeorm migration:create --config ./lib/src/ormconfig --dir migrations"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/0xProject/0x-monorepo"
- },
- "license": "Apache-2.0",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/axios": "^0.14.0",
- "@types/ramda": "^0.25.38",
- "chai": "^4.1.2",
- "chai-as-promised": "^7.1.1",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "mocha": "^5.2.0",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/connect": "^3.0.13",
- "@0x/contract-addresses": "^2.2.0",
- "@0x/contract-artifacts": "^1.3.0",
- "@0x/contract-wrappers": "^3.0.0",
- "@0x/dev-utils": "^1.0.24",
- "@0x/order-utils": "^3.1.2",
- "@0x/subproviders": "^2.1.11",
- "@0x/types": "^1.5.2",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "@types/dockerode": "^2.5.9",
- "@types/p-limit": "^2.0.0",
- "async-parallel": "^1.2.3",
- "axios": "^0.18.0",
- "bottleneck": "^2.13.2",
- "dockerode": "^2.5.7",
- "ethereum-types": "^1.1.6",
- "pg": "^7.5.0",
- "prettier": "^1.15.3",
- "ramda": "^0.25.0",
- "reflect-metadata": "^0.1.12",
- "sqlite3": "^4.0.2",
- "typeorm": "^0.2.7"
- }
-}
diff --git a/packages/pipeline/src/data_sources/bloxy/index.ts b/packages/pipeline/src/data_sources/bloxy/index.ts
deleted file mode 100644
index 94468d25a..000000000
--- a/packages/pipeline/src/data_sources/bloxy/index.ts
+++ /dev/null
@@ -1,133 +0,0 @@
-import axios from 'axios';
-import * as R from 'ramda';
-
-// URL to use for getting dex trades from Bloxy.
-export const BLOXY_DEX_TRADES_URL = 'https://bloxy.info/api/dex/trades';
-// Number of trades to get at once. Must be less than or equal to MAX_OFFSET.
-const TRADES_PER_QUERY = 10000;
-// Maximum offset supported by the Bloxy API.
-const MAX_OFFSET = 100000;
-// Buffer to subtract from offset. This means we will request some trades twice
-// but we have less chance on missing out on any data.
-const OFFSET_BUFFER = 1000;
-// Maximum number of days supported by the Bloxy API.
-const MAX_DAYS = 30;
-// Buffer used for comparing the last seen timestamp to the last returned
-// timestamp. Increasing this reduces chances of data loss but also creates more
-// redundancy and can impact performance.
-// tslint:disable-next-line:custom-no-magic-numbers
-const LAST_SEEN_TIMESTAMP_BUFFER_MS = 1000 * 60 * 30; // 30 minutes
-
-// tslint:disable-next-line:custom-no-magic-numbers
-const millisecondsPerDay = 1000 * 60 * 60 * 24; // ms/d = ms/s * s/m * m/h * h/d
-
-export interface BloxyTrade {
- tx_hash: string;
- tx_time: string;
- tx_date: string;
- tx_sender: string;
- smart_contract_id: number;
- smart_contract_address: string;
- contract_type: string;
- maker: string;
- taker: string;
- amountBuy: number;
- makerFee: number;
- buyCurrencyId: number;
- buySymbol: string;
- amountSell: number;
- takerFee: number;
- sellCurrencyId: number;
- sellSymbol: string;
- maker_annotation: string;
- taker_annotation: string;
- protocol: string;
- buyAddress: string | null;
- sellAddress: string | null;
-}
-
-interface BloxyError {
- error: string;
-}
-
-type BloxyResponse<T> = T | BloxyError;
-type BloxyTradeResponse = BloxyResponse<BloxyTrade[]>;
-
-function isError<T>(response: BloxyResponse<T>): response is BloxyError {
- return (response as BloxyError).error !== undefined;
-}
-
-export class BloxySource {
- private readonly _apiKey: string;
-
- constructor(apiKey: string) {
- this._apiKey = apiKey;
- }
-
- /**
- * Gets all latest trades between the lastSeenTimestamp (minus some buffer)
- * and the current time. Note that because the Bloxy API has some hard
- * limits it might not always be possible to get *all* the trades in the
- * desired time range.
- * @param lastSeenTimestamp The latest timestamp for trades that have
- * already been seen.
- */
- public async getDexTradesAsync(lastSeenTimestamp: number): Promise<BloxyTrade[]> {
- let allTrades: BloxyTrade[] = [];
-
- // Clamp numberOfDays so that it is always between 1 and MAX_DAYS (inclusive)
- const numberOfDays = R.clamp(1, MAX_DAYS, getDaysSinceTimestamp(lastSeenTimestamp));
-
- // Keep getting trades until we hit one of the following conditions:
- //
- // 1. Offset hits MAX_OFFSET (we can't go back any further).
- // 2. There are no more trades in the response.
- // 3. We see a tx_time equal to or earlier than lastSeenTimestamp (plus
- // some buffer).
- //
- for (let offset = 0; offset <= MAX_OFFSET; offset += TRADES_PER_QUERY - OFFSET_BUFFER) {
- const trades = await this._getTradesWithOffsetAsync(numberOfDays, offset);
- if (trades.length === 0) {
- // There are no more trades left for the days we are querying.
- // This means we are done.
- return filterDuplicateTrades(allTrades);
- }
- const sortedTrades = R.reverse(R.sortBy(trade => trade.tx_time, trades));
- allTrades = allTrades.concat(sortedTrades);
-
- // Check if lastReturnedTimestamp < lastSeenTimestamp
- const lastReturnedTimestamp = new Date(sortedTrades[0].tx_time).getTime();
- if (lastReturnedTimestamp < lastSeenTimestamp - LAST_SEEN_TIMESTAMP_BUFFER_MS) {
- // We are at the point where we have already seen trades for the
- // timestamp range that is being returned. We're done.
- return filterDuplicateTrades(allTrades);
- }
- }
- return filterDuplicateTrades(allTrades);
- }
-
- private async _getTradesWithOffsetAsync(numberOfDays: number, offset: number): Promise<BloxyTrade[]> {
- const resp = await axios.get<BloxyTradeResponse>(BLOXY_DEX_TRADES_URL, {
- params: {
- key: this._apiKey,
- days: numberOfDays,
- limit: TRADES_PER_QUERY,
- offset,
- },
- });
- if (isError(resp.data)) {
- throw new Error(`Error in Bloxy API response: ${resp.data.error}`);
- }
- return resp.data;
- }
-}
-
-// Computes the number of days between the given timestamp and the current
-// timestamp (rounded up).
-function getDaysSinceTimestamp(timestamp: number): number {
- const msSinceTimestamp = Date.now() - timestamp;
- const daysSinceTimestamp = msSinceTimestamp / millisecondsPerDay;
- return Math.ceil(daysSinceTimestamp);
-}
-
-const filterDuplicateTrades = R.uniqBy((trade: BloxyTrade) => trade.tx_hash);
diff --git a/packages/pipeline/src/data_sources/contract-wrappers/erc20_events.ts b/packages/pipeline/src/data_sources/contract-wrappers/erc20_events.ts
deleted file mode 100644
index e0098122f..000000000
--- a/packages/pipeline/src/data_sources/contract-wrappers/erc20_events.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import {
- ContractWrappers,
- ERC20TokenApprovalEventArgs,
- ERC20TokenEvents,
- ERC20TokenWrapper,
-} from '@0x/contract-wrappers';
-import { Web3ProviderEngine } from '@0x/subproviders';
-import { LogWithDecodedArgs } from 'ethereum-types';
-
-import { GetEventsFunc, getEventsWithPaginationAsync } from './utils';
-
-export class ERC20EventsSource {
- private readonly _erc20Wrapper: ERC20TokenWrapper;
- private readonly _tokenAddress: string;
- constructor(provider: Web3ProviderEngine, networkId: number, tokenAddress: string) {
- const contractWrappers = new ContractWrappers(provider, { networkId });
- this._erc20Wrapper = contractWrappers.erc20Token;
- this._tokenAddress = tokenAddress;
- }
-
- public async getApprovalEventsAsync(
- startBlock: number,
- endBlock: number,
- ): Promise<Array<LogWithDecodedArgs<ERC20TokenApprovalEventArgs>>> {
- return getEventsWithPaginationAsync(
- this._getApprovalEventsForRangeAsync.bind(this) as GetEventsFunc<ERC20TokenApprovalEventArgs>,
- startBlock,
- endBlock,
- );
- }
-
- // Gets all approval events of for a specific sub-range. This getter
- // function will be called during each step of pagination.
- private async _getApprovalEventsForRangeAsync(
- fromBlock: number,
- toBlock: number,
- ): Promise<Array<LogWithDecodedArgs<ERC20TokenApprovalEventArgs>>> {
- return this._erc20Wrapper.getLogsAsync<ERC20TokenApprovalEventArgs>(
- this._tokenAddress,
- ERC20TokenEvents.Approval,
- { fromBlock, toBlock },
- {},
- );
- }
-}
diff --git a/packages/pipeline/src/data_sources/contract-wrappers/exchange_events.ts b/packages/pipeline/src/data_sources/contract-wrappers/exchange_events.ts
deleted file mode 100644
index 58691e2ab..000000000
--- a/packages/pipeline/src/data_sources/contract-wrappers/exchange_events.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import {
- ContractWrappers,
- ExchangeCancelEventArgs,
- ExchangeCancelUpToEventArgs,
- ExchangeEventArgs,
- ExchangeEvents,
- ExchangeFillEventArgs,
- ExchangeWrapper,
-} from '@0x/contract-wrappers';
-import { Web3ProviderEngine } from '@0x/subproviders';
-import { LogWithDecodedArgs } from 'ethereum-types';
-
-import { GetEventsFunc, getEventsWithPaginationAsync } from './utils';
-
-export class ExchangeEventsSource {
- private readonly _exchangeWrapper: ExchangeWrapper;
- constructor(provider: Web3ProviderEngine, networkId: number) {
- const contractWrappers = new ContractWrappers(provider, { networkId });
- this._exchangeWrapper = contractWrappers.exchange;
- }
-
- public async getFillEventsAsync(
- startBlock: number,
- endBlock: number,
- ): Promise<Array<LogWithDecodedArgs<ExchangeFillEventArgs>>> {
- const getFillEventsForRangeAsync = this._makeGetterFuncForEventType<ExchangeFillEventArgs>(ExchangeEvents.Fill);
- return getEventsWithPaginationAsync(getFillEventsForRangeAsync, startBlock, endBlock);
- }
-
- public async getCancelEventsAsync(
- startBlock: number,
- endBlock: number,
- ): Promise<Array<LogWithDecodedArgs<ExchangeCancelEventArgs>>> {
- const getCancelEventsForRangeAsync = this._makeGetterFuncForEventType<ExchangeCancelEventArgs>(
- ExchangeEvents.Cancel,
- );
- return getEventsWithPaginationAsync(getCancelEventsForRangeAsync, startBlock, endBlock);
- }
-
- public async getCancelUpToEventsAsync(
- startBlock: number,
- endBlock: number,
- ): Promise<Array<LogWithDecodedArgs<ExchangeCancelUpToEventArgs>>> {
- const getCancelUpToEventsForRangeAsync = this._makeGetterFuncForEventType<ExchangeCancelUpToEventArgs>(
- ExchangeEvents.CancelUpTo,
- );
- return getEventsWithPaginationAsync(getCancelUpToEventsForRangeAsync, startBlock, endBlock);
- }
-
- // Returns a getter function which gets all events of a specific type for a
- // specific sub-range. This getter function will be called during each step
- // of pagination.
- private _makeGetterFuncForEventType<ArgsType extends ExchangeEventArgs>(
- eventType: ExchangeEvents,
- ): GetEventsFunc<ArgsType> {
- return async (fromBlock: number, toBlock: number) =>
- this._exchangeWrapper.getLogsAsync<ArgsType>(eventType, { fromBlock, toBlock }, {});
- }
-}
diff --git a/packages/pipeline/src/data_sources/contract-wrappers/utils.ts b/packages/pipeline/src/data_sources/contract-wrappers/utils.ts
deleted file mode 100644
index 67660a37e..000000000
--- a/packages/pipeline/src/data_sources/contract-wrappers/utils.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { DecodedLogArgs, LogWithDecodedArgs } from 'ethereum-types';
-
-const NUM_BLOCKS_PER_QUERY = 10000; // Number of blocks to query for events at a time.
-const NUM_RETRIES = 3; // Number of retries if a request fails or times out.
-
-export type GetEventsFunc<ArgsType extends DecodedLogArgs> = (
- fromBlock: number,
- toBlock: number,
-) => Promise<Array<LogWithDecodedArgs<ArgsType>>>;
-
-/**
- * Gets all events between the given startBlock and endBlock by querying for
- * NUM_BLOCKS_PER_QUERY at a time. Accepts a getter function in order to
- * maximize code re-use and allow for getting different types of events for
- * different contracts. If the getter function throws with a retryable error,
- * it will automatically be retried up to NUM_RETRIES times.
- * @param getEventsAsync A getter function which will be called for each step during pagination.
- * @param startBlock The start of the entire block range to get events for.
- * @param endBlock The end of the entire block range to get events for.
- */
-export async function getEventsWithPaginationAsync<ArgsType extends DecodedLogArgs>(
- getEventsAsync: GetEventsFunc<ArgsType>,
- startBlock: number,
- endBlock: number,
-): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- let events: Array<LogWithDecodedArgs<ArgsType>> = [];
- for (let fromBlock = startBlock; fromBlock <= endBlock; fromBlock += NUM_BLOCKS_PER_QUERY) {
- const toBlock = Math.min(fromBlock + NUM_BLOCKS_PER_QUERY - 1, endBlock);
- const eventsInRange = await _getEventsWithRetriesAsync(getEventsAsync, NUM_RETRIES, fromBlock, toBlock);
- events = events.concat(eventsInRange);
- }
- return events;
-}
-
-/**
- * Calls the getEventsAsync function and retries up to numRetries times if it
- * throws with an error that is considered retryable.
- * @param getEventsAsync a function that will be called on each iteration.
- * @param numRetries the maximum number times to retry getEventsAsync if it fails with a retryable error.
- * @param fromBlock the start of the sub-range of blocks we are getting events for.
- * @param toBlock the end of the sub-range of blocks we are getting events for.
- */
-export async function _getEventsWithRetriesAsync<ArgsType extends DecodedLogArgs>(
- getEventsAsync: GetEventsFunc<ArgsType>,
- numRetries: number,
- fromBlock: number,
- toBlock: number,
-): Promise<Array<LogWithDecodedArgs<ArgsType>>> {
- let eventsInRange: Array<LogWithDecodedArgs<ArgsType>> = [];
- for (let i = 0; i <= numRetries; i++) {
- try {
- eventsInRange = await getEventsAsync(fromBlock, toBlock);
- } catch (err) {
- if (isErrorRetryable(err) && i < numRetries) {
- continue;
- } else {
- throw err;
- }
- }
- break;
- }
- return eventsInRange;
-}
-
-function isErrorRetryable(err: Error): boolean {
- return err.message.includes('network timeout');
-}
diff --git a/packages/pipeline/src/data_sources/copper/index.ts b/packages/pipeline/src/data_sources/copper/index.ts
deleted file mode 100644
index 15df2fd7d..000000000
--- a/packages/pipeline/src/data_sources/copper/index.ts
+++ /dev/null
@@ -1,126 +0,0 @@
-import { fetchAsync } from '@0x/utils';
-import Bottleneck from 'bottleneck';
-
-import {
- CopperActivityTypeCategory,
- CopperActivityTypeResponse,
- CopperCustomFieldResponse,
- CopperSearchResponse,
-} from '../../parsers/copper';
-
-const HTTP_OK_STATUS = 200;
-const COPPER_URI = 'https://api.prosperworks.com/developer_api/v1';
-
-const DEFAULT_PAGINATION_PARAMS = {
- page_size: 200,
- sort_by: 'date_modified',
- sort_direction: 'desc',
-};
-
-export type CopperSearchParams = CopperLeadSearchParams | CopperActivitySearchParams | CopperOpportunitySearchParams;
-export interface CopperLeadSearchParams {
- page_number?: number;
-}
-
-export interface CopperActivitySearchParams {
- minimum_activity_date: number;
- page_number?: number;
-}
-
-export interface CopperOpportunitySearchParams {
- sort_by: string; // must override the default 'date_modified' for this endpoint
- page_number?: number;
-}
-export enum CopperEndpoint {
- Leads = '/leads/search',
- Opportunities = '/opportunities/search',
- Activities = '/activities/search',
-}
-const ONE_SECOND = 1000;
-
-function httpErrorCheck(response: Response): void {
- if (response.status !== HTTP_OK_STATUS) {
- throw new Error(`HTTP error while scraping Copper: [${JSON.stringify(response)}]`);
- }
-}
-export class CopperSource {
- private readonly _accessToken: string;
- private readonly _userEmail: string;
- private readonly _defaultHeaders: any;
- private readonly _limiter: Bottleneck;
-
- constructor(maxConcurrentRequests: number, accessToken: string, userEmail: string) {
- this._accessToken = accessToken;
- this._userEmail = userEmail;
- this._defaultHeaders = {
- 'Content-Type': 'application/json',
- 'X-PW-AccessToken': this._accessToken,
- 'X-PW-Application': 'developer_api',
- 'X-PW-UserEmail': this._userEmail,
- };
- this._limiter = new Bottleneck({
- minTime: ONE_SECOND / maxConcurrentRequests,
- reservoir: 30,
- reservoirRefreshAmount: 30,
- reservoirRefreshInterval: maxConcurrentRequests,
- });
- }
-
- public async fetchNumberOfPagesAsync(endpoint: CopperEndpoint, searchParams?: CopperSearchParams): Promise<number> {
- const resp = await this._limiter.schedule(() =>
- fetchAsync(COPPER_URI + endpoint, {
- method: 'POST',
- body: JSON.stringify({ ...DEFAULT_PAGINATION_PARAMS, ...searchParams }),
- headers: this._defaultHeaders,
- }),
- );
-
- httpErrorCheck(resp);
-
- // total number of records that match the request parameters
- if (resp.headers.has('X-Pw-Total')) {
- const totalRecords: number = parseInt(resp.headers.get('X-Pw-Total') as string, 10); // tslint:disable-line:custom-no-magic-numbers
- return Math.ceil(totalRecords / DEFAULT_PAGINATION_PARAMS.page_size);
- } else {
- return 1;
- }
- }
- public async fetchSearchResultsAsync<T extends CopperSearchResponse>(
- endpoint: CopperEndpoint,
- searchParams?: CopperSearchParams,
- ): Promise<T[]> {
- const request = { ...DEFAULT_PAGINATION_PARAMS, ...searchParams };
- const response = await this._limiter.schedule(() =>
- fetchAsync(COPPER_URI + endpoint, {
- method: 'POST',
- body: JSON.stringify(request),
- headers: this._defaultHeaders,
- }),
- );
- httpErrorCheck(response);
- const json: T[] = await response.json();
- return json;
- }
-
- public async fetchActivityTypesAsync(): Promise<Map<CopperActivityTypeCategory, CopperActivityTypeResponse[]>> {
- const response = await this._limiter.schedule(() =>
- fetchAsync(`${COPPER_URI}/activity_types`, {
- method: 'GET',
- headers: this._defaultHeaders,
- }),
- );
- httpErrorCheck(response);
- return response.json();
- }
-
- public async fetchCustomFieldsAsync(): Promise<CopperCustomFieldResponse[]> {
- const response = await this._limiter.schedule(() =>
- fetchAsync(`${COPPER_URI}/custom_field_definitions`, {
- method: 'GET',
- headers: this._defaultHeaders,
- }),
- );
- httpErrorCheck(response);
- return response.json();
- }
-}
diff --git a/packages/pipeline/src/data_sources/ddex/index.ts b/packages/pipeline/src/data_sources/ddex/index.ts
deleted file mode 100644
index 7ef92b90f..000000000
--- a/packages/pipeline/src/data_sources/ddex/index.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import { fetchAsync, logUtils } from '@0x/utils';
-
-const DDEX_BASE_URL = 'https://api.ddex.io/v3';
-const ACTIVE_MARKETS_URL = `${DDEX_BASE_URL}/markets`;
-const NO_AGGREGATION_LEVEL = 3; // See https://docs.ddex.io/#get-orderbook
-const ORDERBOOK_ENDPOINT = `/orderbook?level=${NO_AGGREGATION_LEVEL}`;
-export const DDEX_SOURCE = 'ddex';
-
-export interface DdexActiveMarketsResponse {
- status: number;
- desc: string;
- data: {
- markets: DdexMarket[];
- };
-}
-
-export interface DdexMarket {
- id: string;
- quoteToken: string;
- quoteTokenDecimals: number;
- quoteTokenAddress: string;
- baseToken: string;
- baseTokenDecimals: number;
- baseTokenAddress: string;
- minOrderSize: string;
- pricePrecision: number;
- priceDecimals: number;
- amountDecimals: number;
-}
-
-export interface DdexOrderbookResponse {
- status: number;
- desc: string;
- data: {
- orderBook: DdexOrderbook;
- };
-}
-
-export interface DdexOrderbook {
- marketId: string;
- bids: DdexOrder[];
- asks: DdexOrder[];
-}
-
-export interface DdexOrder {
- price: string;
- amount: string;
- orderId: string;
-}
-
-// tslint:disable:prefer-function-over-method
-// ^ Keep consistency with other sources and help logical organization
-export class DdexSource {
- /**
- * Call Ddex API to find out which markets they are maintaining orderbooks for.
- */
- public async getActiveMarketsAsync(): Promise<DdexMarket[]> {
- logUtils.log('Getting all active DDEX markets');
- const resp = await fetchAsync(ACTIVE_MARKETS_URL);
- const respJson: DdexActiveMarketsResponse = await resp.json();
- const markets = respJson.data.markets;
- logUtils.log(`Got ${markets.length} markets.`);
- return markets;
- }
-
- /**
- * Retrieve orderbook from Ddex API for a given market.
- * @param marketId String identifying the market we want data for. Eg. 'REP/AUG'
- */
- public async getMarketOrderbookAsync(marketId: string): Promise<DdexOrderbook> {
- logUtils.log(`${marketId}: Retrieving orderbook.`);
- const marketOrderbookUrl = `${ACTIVE_MARKETS_URL}/${marketId}${ORDERBOOK_ENDPOINT}`;
- const resp = await fetchAsync(marketOrderbookUrl);
- const respJson: DdexOrderbookResponse = await resp.json();
- return respJson.data.orderBook;
- }
-}
diff --git a/packages/pipeline/src/data_sources/idex/index.ts b/packages/pipeline/src/data_sources/idex/index.ts
deleted file mode 100644
index c1e53c08d..000000000
--- a/packages/pipeline/src/data_sources/idex/index.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import { fetchAsync } from '@0x/utils';
-
-const IDEX_BASE_URL = 'https://api.idex.market';
-const MARKETS_URL = `${IDEX_BASE_URL}/returnTicker`;
-const ORDERBOOK_URL = `${IDEX_BASE_URL}/returnOrderBook`;
-const MAX_ORDER_COUNT = 100; // Maximum based on https://github.com/AuroraDAO/idex-api-docs#returnorderbook
-export const IDEX_SOURCE = 'idex';
-
-export interface IdexMarketsResponse {
- [marketName: string]: IdexMarket;
-}
-
-export interface IdexMarket {
- last: string;
- high: string;
- low: string;
- lowestAsk: string;
- highestBid: string;
- percentChange: string;
- baseVolume: string;
- quoteVolume: string;
-}
-
-export interface IdexOrderbook {
- asks: IdexOrder[];
- bids: IdexOrder[];
-}
-
-export interface IdexOrder {
- price: string;
- amount: string;
- total: string;
- orderHash: string;
- params: IdexOrderParam;
-}
-
-export interface IdexOrderParam {
- tokenBuy: string;
- buySymbol: string;
- buyPrecision: number;
- amountBuy: string;
- tokenSell: string;
- sellSymbol: string;
- sellPrecision: number;
- amountSell: string;
- expires: number;
- nonce: number;
- user: string;
-}
-
-// tslint:disable:prefer-function-over-method
-// ^ Keep consistency with other sources and help logical organization
-export class IdexSource {
- /**
- * Call Idex API to find out which markets they are maintaining orderbooks for.
- */
- public async getMarketsAsync(): Promise<string[]> {
- const params = { method: 'POST' };
- const resp = await fetchAsync(MARKETS_URL, params);
- const respJson: IdexMarketsResponse = await resp.json();
- const markets: string[] = Object.keys(respJson);
- return markets;
- }
-
- /**
- * Retrieve orderbook from Idex API for a given market.
- * @param marketId String identifying the market we want data for. Eg. 'REP_AUG'
- */
- public async getMarketOrderbookAsync(marketId: string): Promise<IdexOrderbook> {
- const params = {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({
- market: marketId,
- count: MAX_ORDER_COUNT,
- }),
- };
- const resp = await fetchAsync(ORDERBOOK_URL, params);
- const respJson: IdexOrderbook = await resp.json();
- return respJson;
- }
-}
diff --git a/packages/pipeline/src/data_sources/oasis/index.ts b/packages/pipeline/src/data_sources/oasis/index.ts
deleted file mode 100644
index 3b30e9dfd..000000000
--- a/packages/pipeline/src/data_sources/oasis/index.ts
+++ /dev/null
@@ -1,103 +0,0 @@
-import { fetchAsync } from '@0x/utils';
-
-const OASIS_BASE_URL = 'https://data.makerdao.com/v1';
-const OASIS_MARKET_QUERY = `query {
- oasisMarkets(period: "1 week") {
- nodes {
- id
- base
- quote
- buyVol
- sellVol
- price
- high
- low
- }
- }
-}`;
-const OASIS_ORDERBOOK_QUERY = `query ($market: String!) {
- allOasisOrders(condition: { market: $market }) {
- totalCount
- nodes {
- market
- offerId
- price
- amount
- act
- }
- }
-}`;
-export const OASIS_SOURCE = 'oasis';
-
-export interface OasisMarket {
- id: string; // market symbol e.g MKRDAI
- base: string; // base symbol e.g MKR
- quote: string; // quote symbol e.g DAI
- buyVol: number; // total buy volume (base)
- sellVol: number; // total sell volume (base)
- price: number; // volume weighted price (quote)
- high: number; // max sell price
- low: number; // min buy price
-}
-
-export interface OasisMarketResponse {
- data: {
- oasisMarkets: {
- nodes: OasisMarket[];
- };
- };
-}
-
-export interface OasisOrder {
- offerId: number; // Offer Id
- market: string; // Market symbol (base/quote)
- price: string; // Offer price (quote)
- amount: string; // Offer amount (base)
- act: string; // Action (ask|bid)
-}
-
-export interface OasisOrderbookResponse {
- data: {
- allOasisOrders: {
- totalCount: number;
- nodes: OasisOrder[];
- };
- };
-}
-
-// tslint:disable:prefer-function-over-method
-// ^ Keep consistency with other sources and help logical organization
-export class OasisSource {
- /**
- * Call Ddex API to find out which markets they are maintaining orderbooks for.
- */
- public async getActiveMarketsAsync(): Promise<OasisMarket[]> {
- const params = {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ query: OASIS_MARKET_QUERY }),
- };
- const resp = await fetchAsync(OASIS_BASE_URL, params);
- const respJson: OasisMarketResponse = await resp.json();
- const markets = respJson.data.oasisMarkets.nodes;
- return markets;
- }
-
- /**
- * Retrieve orderbook from Oasis API for a given market.
- * @param marketId String identifying the market we want data for. Eg. 'REPAUG'.
- */
- public async getMarketOrderbookAsync(marketId: string): Promise<OasisOrder[]> {
- const input = {
- market: marketId,
- };
- const params = {
- method: 'POST',
- headers: { 'Content-Type': 'application/json' },
- body: JSON.stringify({ query: OASIS_ORDERBOOK_QUERY, variables: input }),
- };
- const resp = await fetchAsync(OASIS_BASE_URL, params);
- const respJson: OasisOrderbookResponse = await resp.json();
- return respJson.data.allOasisOrders.nodes;
- }
-}
diff --git a/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts b/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts
deleted file mode 100644
index 85042501b..000000000
--- a/packages/pipeline/src/data_sources/ohlcv_external/crypto_compare.ts
+++ /dev/null
@@ -1,110 +0,0 @@
-// tslint:disable:no-duplicate-imports
-import { fetchAsync } from '@0x/utils';
-import Bottleneck from 'bottleneck';
-import { stringify } from 'querystring';
-import * as R from 'ramda';
-
-import { TradingPair } from '../../utils/get_ohlcv_trading_pairs';
-
-export interface CryptoCompareOHLCVResponse {
- Data: CryptoCompareOHLCVRecord[];
- Response: string;
- Message: string;
- Type: number;
-}
-
-export interface CryptoCompareOHLCVRecord {
- time: number; // in seconds, not milliseconds
- close: number;
- high: number;
- low: number;
- open: number;
- volumefrom: number;
- volumeto: number;
-}
-
-export interface CryptoCompareOHLCVParams {
- fsym: string;
- tsym: string;
- e?: string;
- aggregate?: string;
- aggregatePredictableTimePeriods?: boolean;
- limit?: number;
- toTs?: number;
-}
-
-const ONE_HOUR = 60 * 60 * 1000; // tslint:disable-line:custom-no-magic-numbers
-const ONE_SECOND = 1000;
-const ONE_HOUR_AGO = new Date().getTime() - ONE_HOUR;
-const HTTP_OK_STATUS = 200;
-const CRYPTO_COMPARE_VALID_EMPTY_RESPONSE_TYPE = 96;
-const MAX_PAGE_SIZE = 2000;
-
-export class CryptoCompareOHLCVSource {
- public readonly intervalBetweenRecords = ONE_HOUR;
- public readonly defaultExchange = 'CCCAGG';
- public readonly interval = this.intervalBetweenRecords * MAX_PAGE_SIZE; // the hourly API returns data for one interval at a time
- private readonly _url: string = 'https://min-api.cryptocompare.com/data/histohour?';
-
- // rate-limit for all API calls through this class instance
- private readonly _limiter: Bottleneck;
- constructor(maxReqsPerSecond: number) {
- this._limiter = new Bottleneck({
- minTime: ONE_SECOND / maxReqsPerSecond,
- reservoir: 30,
- reservoirRefreshAmount: 30,
- reservoirRefreshInterval: ONE_SECOND,
- });
- }
-
- // gets OHLCV records starting from pair.latest
- public async getHourlyOHLCVAsync(pair: TradingPair): Promise<CryptoCompareOHLCVRecord[]> {
- const params = {
- e: this.defaultExchange,
- fsym: pair.fromSymbol,
- tsym: pair.toSymbol,
- limit: MAX_PAGE_SIZE,
- toTs: Math.floor((pair.latestSavedTime + this.interval) / ONE_SECOND), // CryptoCompare uses timestamp in seconds. not ms
- };
- const url = this._url + stringify(params);
- const response = await this._limiter.schedule(() => fetchAsync(url));
- if (response.status !== HTTP_OK_STATUS) {
- throw new Error(`HTTP error while scraping Crypto Compare: [${response}]`);
- }
- const json: CryptoCompareOHLCVResponse = await response.json();
- if (
- (json.Response === 'Error' || json.Data.length === 0) &&
- json.Type !== CRYPTO_COMPARE_VALID_EMPTY_RESPONSE_TYPE
- ) {
- throw new Error(JSON.stringify(json));
- }
- return json.Data.filter(rec => {
- return (
- // Crypto Compare takes ~30 mins to finalise records
- rec.time * ONE_SECOND < ONE_HOUR_AGO && rec.time * ONE_SECOND > pair.latestSavedTime && hasData(rec)
- );
- });
- }
- public generateBackfillIntervals(pair: TradingPair): TradingPair[] {
- const now = new Date().getTime();
- const f = (p: TradingPair): false | [TradingPair, TradingPair] => {
- if (p.latestSavedTime > now) {
- return false;
- } else {
- return [p, R.merge(p, { latestSavedTime: p.latestSavedTime + this.interval })];
- }
- };
- return R.unfold(f, pair);
- }
-}
-
-function hasData(record: CryptoCompareOHLCVRecord): boolean {
- return (
- record.close !== 0 ||
- record.open !== 0 ||
- record.high !== 0 ||
- record.low !== 0 ||
- record.volumefrom !== 0 ||
- record.volumeto !== 0
- );
-}
diff --git a/packages/pipeline/src/data_sources/paradex/index.ts b/packages/pipeline/src/data_sources/paradex/index.ts
deleted file mode 100644
index 46d448f4b..000000000
--- a/packages/pipeline/src/data_sources/paradex/index.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { fetchAsync, logUtils } from '@0x/utils';
-
-const PARADEX_BASE_URL = 'https://api.paradex.io/consumer/v0';
-const ACTIVE_MARKETS_URL = `${PARADEX_BASE_URL}/markets`;
-const ORDERBOOK_ENDPOINT = `${PARADEX_BASE_URL}/orderbook`;
-const TOKEN_INFO_ENDPOINT = `${PARADEX_BASE_URL}/tokens`;
-export const PARADEX_SOURCE = 'paradex';
-
-export type ParadexActiveMarketsResponse = ParadexMarket[];
-
-export interface ParadexMarket {
- id: string;
- symbol: string;
- baseToken: string;
- quoteToken: string;
- minOrderSize: string;
- maxOrderSize: string;
- priceMaxDecimals: number;
- amountMaxDecimals: number;
- // These are not native to the Paradex API response. We tag them on later
- // by calling the token endpoint and joining on symbol.
- baseTokenAddress?: string;
- quoteTokenAddress?: string;
-}
-
-export interface ParadexOrderbookResponse {
- marketId: number;
- marketSymbol: string;
- bids: ParadexOrder[];
- asks: ParadexOrder[];
-}
-
-export interface ParadexOrder {
- amount: string;
- price: string;
-}
-
-export type ParadexTokenInfoResponse = ParadexTokenInfo[];
-
-export interface ParadexTokenInfo {
- name: string;
- symbol: string;
- address: string;
-}
-
-export class ParadexSource {
- private readonly _apiKey: string;
-
- constructor(apiKey: string) {
- this._apiKey = apiKey;
- }
-
- /**
- * Call Paradex API to find out which markets they are maintaining orderbooks for.
- */
- public async getActiveMarketsAsync(): Promise<ParadexActiveMarketsResponse> {
- logUtils.log('Getting all active Paradex markets.');
- const resp = await fetchAsync(ACTIVE_MARKETS_URL, {
- headers: { 'API-KEY': this._apiKey },
- });
- const markets: ParadexActiveMarketsResponse = await resp.json();
- logUtils.log(`Got ${markets.length} markets.`);
- return markets;
- }
-
- /**
- * Call Paradex API to find out their token information.
- */
- public async getTokenInfoAsync(): Promise<ParadexTokenInfoResponse> {
- logUtils.log('Getting token information from Paradex.');
- const resp = await fetchAsync(TOKEN_INFO_ENDPOINT, {
- headers: { 'API-KEY': this._apiKey },
- });
- const tokens: ParadexTokenInfoResponse = await resp.json();
- logUtils.log(`Got information for ${tokens.length} tokens.`);
- return tokens;
- }
-
- /**
- * Retrieve orderbook from Paradex API for a given market.
- * @param marketSymbol String representing the market we want data for.
- */
- public async getMarketOrderbookAsync(marketSymbol: string): Promise<ParadexOrderbookResponse> {
- logUtils.log(`${marketSymbol}: Retrieving orderbook.`);
- const marketOrderbookUrl = `${ORDERBOOK_ENDPOINT}?market=${marketSymbol}`;
- const resp = await fetchAsync(marketOrderbookUrl, {
- headers: { 'API-KEY': this._apiKey },
- });
- const orderbookResponse: ParadexOrderbookResponse = await resp.json();
- return orderbookResponse;
- }
-}
diff --git a/packages/pipeline/src/data_sources/relayer-registry/index.ts b/packages/pipeline/src/data_sources/relayer-registry/index.ts
deleted file mode 100644
index 8133f5eae..000000000
--- a/packages/pipeline/src/data_sources/relayer-registry/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-import axios from 'axios';
-
-export interface RelayerResponse {
- name: string;
- homepage_url: string;
- app_url: string;
- header_img: string;
- logo_img: string;
- networks: RelayerResponseNetwork[];
-}
-
-export interface RelayerResponseNetwork {
- networkId: number;
- sra_http_endpoint?: string;
- sra_ws_endpoint?: string;
- static_order_fields?: {
- fee_recipient_addresses?: string[];
- taker_addresses?: string[];
- };
-}
-
-export class RelayerRegistrySource {
- private readonly _url: string;
-
- constructor(url: string) {
- this._url = url;
- }
-
- public async getRelayerInfoAsync(): Promise<Map<string, RelayerResponse>> {
- const resp = await axios.get<Map<string, RelayerResponse>>(this._url);
- return resp.data;
- }
-}
diff --git a/packages/pipeline/src/data_sources/trusted_tokens/index.ts b/packages/pipeline/src/data_sources/trusted_tokens/index.ts
deleted file mode 100644
index 552739fb9..000000000
--- a/packages/pipeline/src/data_sources/trusted_tokens/index.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import axios from 'axios';
-
-export interface ZeroExTrustedTokenMeta {
- address: string;
- name: string;
- symbol: string;
- decimals: number;
-}
-
-export interface MetamaskTrustedTokenMeta {
- address: string;
- name: string;
- erc20: boolean;
- symbol: string;
- decimals: number;
-}
-
-export class TrustedTokenSource<T> {
- private readonly _url: string;
-
- constructor(url: string) {
- this._url = url;
- }
-
- public async getTrustedTokenMetaAsync(): Promise<T> {
- const resp = await axios.get<T>(this._url);
- return resp.data;
- }
-}
diff --git a/packages/pipeline/src/data_sources/web3/index.ts b/packages/pipeline/src/data_sources/web3/index.ts
deleted file mode 100644
index 45a9ea161..000000000
--- a/packages/pipeline/src/data_sources/web3/index.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { Web3ProviderEngine } from '@0x/subproviders';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { BlockWithoutTransactionData, Transaction } from 'ethereum-types';
-
-export class Web3Source {
- private readonly _web3Wrapper: Web3Wrapper;
- constructor(provider: Web3ProviderEngine) {
- this._web3Wrapper = new Web3Wrapper(provider);
- }
-
- public async getBlockInfoAsync(blockNumber: number): Promise<BlockWithoutTransactionData> {
- const block = await this._web3Wrapper.getBlockIfExistsAsync(blockNumber);
- if (block == null) {
- return Promise.reject(new Error(`Could not find block for given block number: ${blockNumber}`));
- }
- return block;
- }
-
- public async getTransactionInfoAsync(txHash: string): Promise<Transaction> {
- return this._web3Wrapper.getTransactionByHashAsync(txHash);
- }
-}
diff --git a/packages/pipeline/src/entities/block.ts b/packages/pipeline/src/entities/block.ts
deleted file mode 100644
index 398946622..000000000
--- a/packages/pipeline/src/entities/block.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'blocks', schema: 'raw' })
-export class Block {
- @PrimaryColumn() public hash!: string;
- @PrimaryColumn({ transformer: numberToBigIntTransformer })
- public number!: number;
-
- @Column({ name: 'timestamp', transformer: numberToBigIntTransformer })
- public timestamp!: number;
-}
diff --git a/packages/pipeline/src/entities/copper_activity.ts b/packages/pipeline/src/entities/copper_activity.ts
deleted file mode 100644
index cbc034285..000000000
--- a/packages/pipeline/src/entities/copper_activity.ts
+++ /dev/null
@@ -1,41 +0,0 @@
-import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'copper_activities', schema: 'raw' })
-export class CopperActivity {
- @PrimaryColumn({ type: 'bigint', transformer: numberToBigIntTransformer })
- public id!: number;
-
- @Index()
- @Column({ name: 'parent_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public parentId!: number;
- @Column({ name: 'parent_type', type: 'varchar' })
- public parentType!: string;
-
- // join with CopperActivityType
- @Index()
- @Column({ name: 'type_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public typeId!: number;
- @Column({ name: 'type_category', type: 'varchar' })
- public typeCategory!: string;
- @Column({ name: 'type_name', type: 'varchar', nullable: true })
- public typeName?: string;
-
- @Column({ name: 'user_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public userId!: number;
- @Column({ name: 'old_value_id', type: 'bigint', nullable: true, transformer: numberToBigIntTransformer })
- public oldValueId?: number;
- @Column({ name: 'old_value_name', type: 'varchar', nullable: true })
- public oldValueName?: string;
- @Column({ name: 'new_value_id', type: 'bigint', nullable: true, transformer: numberToBigIntTransformer })
- public newValueId?: number;
- @Column({ name: 'new_value_name', type: 'varchar', nullable: true })
- public newValueName?: string;
-
- @Index()
- @Column({ name: 'date_created', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateCreated!: number;
- @PrimaryColumn({ name: 'date_modified', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateModified!: number;
-}
diff --git a/packages/pipeline/src/entities/copper_activity_type.ts b/packages/pipeline/src/entities/copper_activity_type.ts
deleted file mode 100644
index 8fb2dcf70..000000000
--- a/packages/pipeline/src/entities/copper_activity_type.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'copper_activity_types', schema: 'raw' })
-export class CopperActivityType {
- @PrimaryColumn({ type: 'bigint', transformer: numberToBigIntTransformer })
- public id!: number;
- @Column({ name: 'category', type: 'varchar' })
- public category!: string;
- @Column({ name: 'name', type: 'varchar' })
- public name!: string;
- @Column({ name: 'is_disabled', type: 'boolean', nullable: true })
- public isDisabled?: boolean;
- @Column({ name: 'count_as_interaction', type: 'boolean', nullable: true })
- public countAsInteraction?: boolean;
-}
diff --git a/packages/pipeline/src/entities/copper_custom_field.ts b/packages/pipeline/src/entities/copper_custom_field.ts
deleted file mode 100644
index f23f6ab22..000000000
--- a/packages/pipeline/src/entities/copper_custom_field.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'copper_custom_fields', schema: 'raw' })
-export class CopperCustomField {
- @PrimaryColumn({ type: 'bigint', transformer: numberToBigIntTransformer })
- public id!: number;
- @Column({ name: 'data_type', type: 'varchar' })
- public dataType!: string;
- @Column({ name: 'field_type', type: 'varchar', nullable: true })
- public fieldType?: string;
- @Column({ name: 'name', type: 'varchar' })
- public name!: string;
-}
diff --git a/packages/pipeline/src/entities/copper_lead.ts b/packages/pipeline/src/entities/copper_lead.ts
deleted file mode 100644
index c51ccd761..000000000
--- a/packages/pipeline/src/entities/copper_lead.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { Column, Entity, Index, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'copper_leads', schema: 'raw' })
-export class CopperLead {
- @PrimaryColumn({ type: 'bigint', transformer: numberToBigIntTransformer })
- public id!: number;
-
- @Column({ name: 'name', type: 'varchar', nullable: true })
- public name?: string;
- @Column({ name: 'first_name', type: 'varchar', nullable: true })
- public firstName?: string;
- @Column({ name: 'last_name', type: 'varchar', nullable: true })
- public lastName?: string;
- @Column({ name: 'middle_name', type: 'varchar', nullable: true })
- public middleName?: string;
- @Column({ name: 'assignee_id', type: 'bigint', transformer: numberToBigIntTransformer, nullable: true })
- public assigneeId?: number;
- @Column({ name: 'company_name', type: 'varchar', nullable: true })
- public companyName?: string;
- @Column({ name: 'customer_source_id', type: 'bigint', transformer: numberToBigIntTransformer, nullable: true })
- public customerSourceId?: number;
- @Column({ name: 'monetary_value', type: 'integer', nullable: true })
- public monetaryValue?: number;
- @Column({ name: 'status', type: 'varchar' })
- public status!: string;
- @Column({ name: 'status_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public statusId!: number;
- @Column({ name: 'title', type: 'varchar', nullable: true })
- public title?: string;
-
- @Index()
- @Column({ name: 'date_created', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateCreated!: number;
- @PrimaryColumn({ name: 'date_modified', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateModified!: number;
-}
diff --git a/packages/pipeline/src/entities/copper_opportunity.ts b/packages/pipeline/src/entities/copper_opportunity.ts
deleted file mode 100644
index e12bd69ce..000000000
--- a/packages/pipeline/src/entities/copper_opportunity.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'copper_opportunities', schema: 'raw' })
-export class CopperOpportunity {
- @PrimaryColumn({ name: 'id', type: 'bigint', transformer: numberToBigIntTransformer })
- public id!: number;
- @Column({ name: 'name', type: 'varchar' })
- public name!: string;
- @Column({ name: 'assignee_id', nullable: true, type: 'bigint', transformer: numberToBigIntTransformer })
- public assigneeId?: number;
- @Column({ name: 'close_date', nullable: true, type: 'varchar' })
- public closeDate?: string;
- @Column({ name: 'company_id', nullable: true, type: 'bigint', transformer: numberToBigIntTransformer })
- public companyId?: number;
- @Column({ name: 'company_name', nullable: true, type: 'varchar' })
- public companyName?: string;
- @Column({ name: 'customer_source_id', nullable: true, type: 'bigint', transformer: numberToBigIntTransformer })
- public customerSourceId?: number;
- @Column({ name: 'loss_reason_id', nullable: true, type: 'bigint', transformer: numberToBigIntTransformer })
- public lossReasonId?: number;
- @Column({ name: 'pipeline_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public pipelineId!: number;
- @Column({ name: 'pipeline_stage_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public pipelineStageId!: number;
- @Column({ name: 'primary_contact_id', nullable: true, type: 'bigint', transformer: numberToBigIntTransformer })
- public primaryContactId?: number;
- @Column({ name: 'priority', nullable: true, type: 'varchar' })
- public priority?: string;
- @Column({ name: 'status', type: 'varchar' })
- public status!: string;
- @Column({ name: 'interaction_count', type: 'bigint', transformer: numberToBigIntTransformer })
- public interactionCount!: number;
- @Column({ name: 'monetary_value', nullable: true, type: 'integer' })
- public monetaryValue?: number;
- @Column({ name: 'win_probability', nullable: true, type: 'integer' })
- public winProbability?: number;
- @Column({ name: 'date_created', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateCreated!: number;
- @PrimaryColumn({ name: 'date_modified', type: 'bigint', transformer: numberToBigIntTransformer })
- public dateModified!: number;
- @Column({ name: 'custom_fields', type: 'jsonb' })
- public customFields!: { [key: number]: number };
-}
diff --git a/packages/pipeline/src/entities/dex_trade.ts b/packages/pipeline/src/entities/dex_trade.ts
deleted file mode 100644
index 9d288cb51..000000000
--- a/packages/pipeline/src/entities/dex_trade.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'dex_trades', schema: 'raw' })
-export class DexTrade {
- @PrimaryColumn({ name: 'source_url' })
- public sourceUrl!: string;
- @PrimaryColumn({ name: 'tx_hash' })
- public txHash!: string;
-
- @Column({ name: 'tx_timestamp', type: 'bigint', transformer: numberToBigIntTransformer })
- public txTimestamp!: number;
- @Column({ name: 'tx_date' })
- public txDate!: string;
- @Column({ name: 'tx_sender' })
- public txSender!: string;
- @Column({ name: 'smart_contract_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public smartContractId!: number;
- @Column({ name: 'smart_contract_address' })
- public smartContractAddress!: string;
- @Column({ name: 'contract_type' })
- public contractType!: string;
- @Column({ type: 'varchar' })
- public maker!: string;
- @Column({ type: 'varchar' })
- public taker!: string;
- @Column({ name: 'amount_buy', type: 'numeric', transformer: bigNumberTransformer })
- public amountBuy!: BigNumber;
- @Column({ name: 'maker_fee_amount', type: 'numeric', transformer: bigNumberTransformer })
- public makerFeeAmount!: BigNumber;
- @Column({ name: 'buy_currency_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public buyCurrencyId!: number;
- @Column({ name: 'buy_symbol' })
- public buySymbol!: string;
- @Column({ name: 'amount_sell', type: 'numeric', transformer: bigNumberTransformer })
- public amountSell!: BigNumber;
- @Column({ name: 'taker_fee_amount', type: 'numeric', transformer: bigNumberTransformer })
- public takerFeeAmount!: BigNumber;
- @Column({ name: 'sell_currency_id', type: 'bigint', transformer: numberToBigIntTransformer })
- public sellCurrencyId!: number;
- @Column({ name: 'sell_symbol' })
- public sellSymbol!: string;
- @Column({ name: 'maker_annotation' })
- public makerAnnotation!: string;
- @Column({ name: 'taker_annotation' })
- public takerAnnotation!: string;
- @Column() public protocol!: string;
- @Column({ name: 'buy_address', type: 'varchar', nullable: true })
- public buyAddress!: string | null;
- @Column({ name: 'sell_address', type: 'varchar', nullable: true })
- public sellAddress!: string | null;
-}
diff --git a/packages/pipeline/src/entities/erc20_approval_event.ts b/packages/pipeline/src/entities/erc20_approval_event.ts
deleted file mode 100644
index 69cdfcb0b..000000000
--- a/packages/pipeline/src/entities/erc20_approval_event.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'erc20_approval_events', schema: 'raw' })
-export class ERC20ApprovalEvent {
- @PrimaryColumn({ name: 'token_address' })
- public tokenAddress!: string;
- @PrimaryColumn({ name: 'log_index' })
- public logIndex!: number;
- @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer })
- public blockNumber!: number;
-
- @Column({ name: 'raw_data' })
- public rawData!: string;
-
- @Column({ name: 'transaction_hash' })
- public transactionHash!: string;
- @Column({ name: 'owner_address' })
- public ownerAddress!: string;
- @Column({ name: 'spender_address' })
- public spenderAddress!: string;
- @Column({ name: 'amount', type: 'numeric', transformer: bigNumberTransformer })
- public amount!: BigNumber;
-}
diff --git a/packages/pipeline/src/entities/exchange_cancel_event.ts b/packages/pipeline/src/entities/exchange_cancel_event.ts
deleted file mode 100644
index 38f99c903..000000000
--- a/packages/pipeline/src/entities/exchange_cancel_event.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { AssetType } from '../types';
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'exchange_cancel_events', schema: 'raw' })
-export class ExchangeCancelEvent {
- @PrimaryColumn({ name: 'contract_address' })
- public contractAddress!: string;
- @PrimaryColumn({ name: 'log_index' })
- public logIndex!: number;
- @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer })
- public blockNumber!: number;
-
- @Column({ name: 'raw_data' })
- public rawData!: string;
-
- @Column({ name: 'transaction_hash' })
- public transactionHash!: string;
- @Column({ name: 'maker_address' })
- public makerAddress!: string;
- @Column({ nullable: true, type: String, name: 'taker_address' })
- public takerAddress!: string;
- @Column({ name: 'fee_recipient_address' })
- public feeRecipientAddress!: string;
- @Column({ name: 'sender_address' })
- public senderAddress!: string;
- @Column({ name: 'order_hash' })
- public orderHash!: string;
-
- @Column({ name: 'raw_maker_asset_data' })
- public rawMakerAssetData!: string;
- @Column({ name: 'maker_asset_type' })
- public makerAssetType!: AssetType;
- @Column({ name: 'maker_asset_proxy_id' })
- public makerAssetProxyId!: string;
- @Column({ name: 'maker_token_address' })
- public makerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'maker_token_id' })
- public makerTokenId!: string | null;
- @Column({ name: 'raw_taker_asset_data' })
- public rawTakerAssetData!: string;
- @Column({ name: 'taker_asset_type' })
- public takerAssetType!: AssetType;
- @Column({ name: 'taker_asset_proxy_id' })
- public takerAssetProxyId!: string;
- @Column({ name: 'taker_token_address' })
- public takerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'taker_token_id' })
- public takerTokenId!: string | null;
-}
diff --git a/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts b/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts
deleted file mode 100644
index 27580305e..000000000
--- a/packages/pipeline/src/entities/exchange_cancel_up_to_event.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'exchange_cancel_up_to_events', schema: 'raw' })
-export class ExchangeCancelUpToEvent {
- @PrimaryColumn({ name: 'contract_address' })
- public contractAddress!: string;
- @PrimaryColumn({ name: 'log_index' })
- public logIndex!: number;
- @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer })
- public blockNumber!: number;
-
- @Column({ name: 'raw_data' })
- public rawData!: string;
-
- @Column({ name: 'transaction_hash' })
- public transactionHash!: string;
- @Column({ name: 'maker_address' })
- public makerAddress!: string;
- @Column({ name: 'sender_address' })
- public senderAddress!: string;
- @Column({ name: 'order_epoch', type: 'numeric', transformer: bigNumberTransformer })
- public orderEpoch!: BigNumber;
-}
diff --git a/packages/pipeline/src/entities/exchange_fill_event.ts b/packages/pipeline/src/entities/exchange_fill_event.ts
deleted file mode 100644
index 9b7727615..000000000
--- a/packages/pipeline/src/entities/exchange_fill_event.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { AssetType } from '../types';
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'exchange_fill_events', schema: 'raw' })
-export class ExchangeFillEvent {
- @PrimaryColumn({ name: 'contract_address' })
- public contractAddress!: string;
- @PrimaryColumn({ name: 'log_index' })
- public logIndex!: number;
- @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer })
- public blockNumber!: number;
-
- @Column({ name: 'raw_data' })
- public rawData!: string;
-
- @Column({ name: 'transaction_hash' })
- public transactionHash!: string;
- @Column({ name: 'maker_address' })
- public makerAddress!: string;
- @Column({ name: 'taker_address' })
- public takerAddress!: string;
- @Column({ name: 'fee_recipient_address' })
- public feeRecipientAddress!: string;
- @Column({ name: 'sender_address' })
- public senderAddress!: string;
- @Column({ name: 'maker_asset_filled_amount', type: 'numeric', transformer: bigNumberTransformer })
- public makerAssetFilledAmount!: BigNumber;
- @Column({ name: 'taker_asset_filled_amount', type: 'numeric', transformer: bigNumberTransformer })
- public takerAssetFilledAmount!: BigNumber;
- @Column({ name: 'maker_fee_paid', type: 'numeric', transformer: bigNumberTransformer })
- public makerFeePaid!: BigNumber;
- @Column({ name: 'taker_fee_paid', type: 'numeric', transformer: bigNumberTransformer })
- public takerFeePaid!: BigNumber;
- @Column({ name: 'order_hash' })
- public orderHash!: string;
-
- @Column({ name: 'raw_maker_asset_data' })
- public rawMakerAssetData!: string;
- @Column({ name: 'maker_asset_type' })
- public makerAssetType!: AssetType;
- @Column({ name: 'maker_asset_proxy_id' })
- public makerAssetProxyId!: string;
- @Column({ name: 'maker_token_address' })
- public makerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'maker_token_id' })
- public makerTokenId!: string | null;
- @Column({ name: 'raw_taker_asset_data' })
- public rawTakerAssetData!: string;
- @Column({ name: 'taker_asset_type' })
- public takerAssetType!: AssetType;
- @Column({ name: 'taker_asset_proxy_id' })
- public takerAssetProxyId!: string;
- @Column({ name: 'taker_token_address' })
- public takerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'taker_token_id' })
- public takerTokenId!: string | null;
-}
diff --git a/packages/pipeline/src/entities/index.ts b/packages/pipeline/src/entities/index.ts
deleted file mode 100644
index 27c153c07..000000000
--- a/packages/pipeline/src/entities/index.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import { ExchangeCancelEvent } from './exchange_cancel_event';
-import { ExchangeCancelUpToEvent } from './exchange_cancel_up_to_event';
-import { ExchangeFillEvent } from './exchange_fill_event';
-
-export { Block } from './block';
-export { DexTrade } from './dex_trade';
-export { ExchangeCancelEvent } from './exchange_cancel_event';
-export { ExchangeCancelUpToEvent } from './exchange_cancel_up_to_event';
-export { ExchangeFillEvent } from './exchange_fill_event';
-export { OHLCVExternal } from './ohlcv_external';
-export { Relayer } from './relayer';
-export { SraOrder } from './sra_order';
-export { SraOrdersObservedTimeStamp, createObservedTimestampForOrder } from './sra_order_observed_timestamp';
-export { TokenMetadata } from './token_metadata';
-export { TokenOrderbookSnapshot } from './token_order';
-export { Transaction } from './transaction';
-export { ERC20ApprovalEvent } from './erc20_approval_event';
-
-export { CopperLead } from './copper_lead';
-export { CopperActivity } from './copper_activity';
-export { CopperOpportunity } from './copper_opportunity';
-export { CopperActivityType } from './copper_activity_type';
-export { CopperCustomField } from './copper_custom_field';
-
-export type ExchangeEvent = ExchangeFillEvent | ExchangeCancelEvent | ExchangeCancelUpToEvent;
diff --git a/packages/pipeline/src/entities/ohlcv_external.ts b/packages/pipeline/src/entities/ohlcv_external.ts
deleted file mode 100644
index 4f55dd930..000000000
--- a/packages/pipeline/src/entities/ohlcv_external.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'ohlcv_external', schema: 'raw' })
-export class OHLCVExternal {
- @PrimaryColumn() public exchange!: string;
-
- @PrimaryColumn({ name: 'from_symbol', type: 'varchar' })
- public fromSymbol!: string;
- @PrimaryColumn({ name: 'to_symbol', type: 'varchar' })
- public toSymbol!: string;
- @PrimaryColumn({ name: 'start_time', transformer: numberToBigIntTransformer })
- public startTime!: number;
- @PrimaryColumn({ name: 'end_time', transformer: numberToBigIntTransformer })
- public endTime!: number;
-
- @Column() public open!: number;
- @Column() public close!: number;
- @Column() public low!: number;
- @Column() public high!: number;
- @Column({ name: 'volume_from' })
- public volumeFrom!: number;
- @Column({ name: 'volume_to' })
- public volumeTo!: number;
-
- @PrimaryColumn() public source!: string;
- @PrimaryColumn({ name: 'observed_timestamp', transformer: numberToBigIntTransformer })
- public observedTimestamp!: number;
-}
diff --git a/packages/pipeline/src/entities/relayer.ts b/packages/pipeline/src/entities/relayer.ts
deleted file mode 100644
index 5af8578b4..000000000
--- a/packages/pipeline/src/entities/relayer.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-@Entity({ name: 'relayers', schema: 'raw' })
-export class Relayer {
- @PrimaryColumn() public uuid!: string;
-
- @Column() public name!: string;
- @Column({ name: 'homepage_url', type: 'varchar' })
- public homepageUrl!: string;
- @Column({ name: 'sra_http_endpoint', type: 'varchar', nullable: true })
- public sraHttpEndpoint!: string | null;
- @Column({ name: 'sra_ws_endpoint', type: 'varchar', nullable: true })
- public sraWsEndpoint!: string | null;
- @Column({ name: 'app_url', type: 'varchar', nullable: true })
- public appUrl!: string | null;
-
- @Column({ name: 'fee_recipient_addresses', type: 'varchar', array: true })
- public feeRecipientAddresses!: string[];
- @Column({ name: 'taker_addresses', type: 'varchar', array: true })
- public takerAddresses!: string[];
-}
diff --git a/packages/pipeline/src/entities/sra_order.ts b/packages/pipeline/src/entities/sra_order.ts
deleted file mode 100644
index 9c730a0bb..000000000
--- a/packages/pipeline/src/entities/sra_order.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { AssetType } from '../types';
-import { bigNumberTransformer } from '../utils';
-
-@Entity({ name: 'sra_orders', schema: 'raw' })
-export class SraOrder {
- @PrimaryColumn({ name: 'exchange_address' })
- public exchangeAddress!: string;
- @PrimaryColumn({ name: 'order_hash_hex' })
- public orderHashHex!: string;
- @PrimaryColumn({ name: 'source_url' })
- public sourceUrl!: string;
-
- @Column({ name: 'maker_address' })
- public makerAddress!: string;
- @Column({ name: 'taker_address' })
- public takerAddress!: string;
- @Column({ name: 'fee_recipient_address' })
- public feeRecipientAddress!: string;
- @Column({ name: 'sender_address' })
- public senderAddress!: string;
- @Column({ name: 'maker_asset_amount', type: 'numeric', transformer: bigNumberTransformer })
- public makerAssetAmount!: BigNumber;
- @Column({ name: 'taker_asset_amount', type: 'numeric', transformer: bigNumberTransformer })
- public takerAssetAmount!: BigNumber;
- @Column({ name: 'maker_fee', type: 'numeric', transformer: bigNumberTransformer })
- public makerFee!: BigNumber;
- @Column({ name: 'taker_fee', type: 'numeric', transformer: bigNumberTransformer })
- public takerFee!: BigNumber;
- @Column({ name: 'expiration_time_seconds', type: 'numeric', transformer: bigNumberTransformer })
- public expirationTimeSeconds!: BigNumber;
- @Column({ name: 'salt', type: 'numeric', transformer: bigNumberTransformer })
- public salt!: BigNumber;
- @Column({ name: 'signature' })
- public signature!: string;
-
- @Column({ name: 'raw_maker_asset_data' })
- public rawMakerAssetData!: string;
- @Column({ name: 'maker_asset_type' })
- public makerAssetType!: AssetType;
- @Column({ name: 'maker_asset_proxy_id' })
- public makerAssetProxyId!: string;
- @Column({ name: 'maker_token_address' })
- public makerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'maker_token_id' })
- public makerTokenId!: string | null;
- @Column({ name: 'raw_taker_asset_data' })
- public rawTakerAssetData!: string;
- @Column({ name: 'taker_asset_type' })
- public takerAssetType!: AssetType;
- @Column({ name: 'taker_asset_proxy_id' })
- public takerAssetProxyId!: string;
- @Column({ name: 'taker_token_address' })
- public takerTokenAddress!: string;
- @Column({ nullable: true, type: String, name: 'taker_token_id' })
- public takerTokenId!: string | null;
-
- // TODO(albrow): Make this optional?
- @Column({ name: 'metadata_json' })
- public metadataJson!: string;
-}
diff --git a/packages/pipeline/src/entities/sra_order_observed_timestamp.ts b/packages/pipeline/src/entities/sra_order_observed_timestamp.ts
deleted file mode 100644
index cbec1c6d0..000000000
--- a/packages/pipeline/src/entities/sra_order_observed_timestamp.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { Entity, PrimaryColumn } from 'typeorm';
-
-import { numberToBigIntTransformer } from '../utils';
-
-import { SraOrder } from './sra_order';
-
-@Entity({ name: 'sra_orders_observed_timestamps', schema: 'raw' })
-export class SraOrdersObservedTimeStamp {
- @PrimaryColumn({ name: 'exchange_address' })
- public exchangeAddress!: string;
- @PrimaryColumn({ name: 'order_hash_hex' })
- public orderHashHex!: string;
- @PrimaryColumn({ name: 'source_url' })
- public sourceUrl!: string;
-
- @PrimaryColumn({ name: 'observed_timestamp', transformer: numberToBigIntTransformer })
- public observedTimestamp!: number;
-}
-
-/**
- * Returns a new SraOrdersObservedTimeStamp for the given order based on the
- * current time.
- * @param order The order to generate a timestamp for.
- */
-export function createObservedTimestampForOrder(
- order: SraOrder,
- observedTimestamp: number,
-): SraOrdersObservedTimeStamp {
- const observed = new SraOrdersObservedTimeStamp();
- observed.exchangeAddress = order.exchangeAddress;
- observed.orderHashHex = order.orderHashHex;
- observed.sourceUrl = order.sourceUrl;
- observed.observedTimestamp = observedTimestamp;
- return observed;
-}
diff --git a/packages/pipeline/src/entities/token_metadata.ts b/packages/pipeline/src/entities/token_metadata.ts
deleted file mode 100644
index 911b53972..000000000
--- a/packages/pipeline/src/entities/token_metadata.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer } from '../utils/transformers';
-
-@Entity({ name: 'token_metadata', schema: 'raw' })
-export class TokenMetadata {
- @PrimaryColumn({ type: 'varchar', nullable: false })
- public address!: string;
-
- @PrimaryColumn({ type: 'varchar', nullable: false })
- public authority!: string;
-
- @Column({ type: 'numeric', transformer: bigNumberTransformer, nullable: true })
- public decimals!: BigNumber | null;
-
- @Column({ type: 'varchar', nullable: true })
- public symbol!: string | null;
-
- @Column({ type: 'varchar', nullable: true })
- public name!: string | null;
-}
diff --git a/packages/pipeline/src/entities/token_order.ts b/packages/pipeline/src/entities/token_order.ts
deleted file mode 100644
index 2709747cb..000000000
--- a/packages/pipeline/src/entities/token_order.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'token_orderbook_snapshots', schema: 'raw' })
-export class TokenOrderbookSnapshot {
- @PrimaryColumn({ name: 'observed_timestamp', type: 'bigint', transformer: numberToBigIntTransformer })
- public observedTimestamp!: number;
- @PrimaryColumn({ name: 'source' })
- public source!: string;
- @PrimaryColumn({ name: 'order_type' })
- public orderType!: string;
- @PrimaryColumn({ name: 'price', type: 'numeric', transformer: bigNumberTransformer })
- public price!: BigNumber;
- @PrimaryColumn({ name: 'base_asset_symbol' })
- public baseAssetSymbol!: string;
- @Column({ nullable: true, type: String, name: 'base_asset_address' })
- public baseAssetAddress!: string | null;
- @Column({ name: 'base_volume', type: 'numeric', transformer: bigNumberTransformer })
- public baseVolume!: BigNumber;
- @PrimaryColumn({ name: 'quote_asset_symbol' })
- public quoteAssetSymbol!: string;
- @Column({ nullable: true, type: String, name: 'quote_asset_address' })
- public quoteAssetAddress!: string | null;
- @Column({ name: 'quote_volume', type: 'numeric', transformer: bigNumberTransformer })
- public quoteVolume!: BigNumber;
-}
diff --git a/packages/pipeline/src/entities/transaction.ts b/packages/pipeline/src/entities/transaction.ts
deleted file mode 100644
index 742050177..000000000
--- a/packages/pipeline/src/entities/transaction.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Column, Entity, PrimaryColumn } from 'typeorm';
-
-import { bigNumberTransformer, numberToBigIntTransformer } from '../utils';
-
-@Entity({ name: 'transactions', schema: 'raw' })
-export class Transaction {
- @PrimaryColumn({ name: 'transaction_hash' })
- public transactionHash!: string;
- @PrimaryColumn({ name: 'block_hash' })
- public blockHash!: string;
- @PrimaryColumn({ name: 'block_number', transformer: numberToBigIntTransformer })
- public blockNumber!: number;
-
- @Column({ type: 'numeric', name: 'gas_used', transformer: bigNumberTransformer })
- public gasUsed!: BigNumber;
- @Column({ type: 'numeric', name: 'gas_price', transformer: bigNumberTransformer })
- public gasPrice!: BigNumber;
-}
diff --git a/packages/pipeline/src/ormconfig.ts b/packages/pipeline/src/ormconfig.ts
deleted file mode 100644
index 2700714cd..000000000
--- a/packages/pipeline/src/ormconfig.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { ConnectionOptions } from 'typeorm';
-
-import {
- Block,
- CopperActivity,
- CopperActivityType,
- CopperCustomField,
- CopperLead,
- CopperOpportunity,
- DexTrade,
- ERC20ApprovalEvent,
- ExchangeCancelEvent,
- ExchangeCancelUpToEvent,
- ExchangeFillEvent,
- OHLCVExternal,
- Relayer,
- SraOrder,
- SraOrdersObservedTimeStamp,
- TokenMetadata,
- TokenOrderbookSnapshot,
- Transaction,
-} from './entities';
-
-const entities = [
- Block,
- CopperOpportunity,
- CopperActivity,
- CopperActivityType,
- CopperCustomField,
- CopperLead,
- DexTrade,
- ExchangeCancelEvent,
- ExchangeCancelUpToEvent,
- ExchangeFillEvent,
- ERC20ApprovalEvent,
- OHLCVExternal,
- Relayer,
- SraOrder,
- SraOrdersObservedTimeStamp,
- TokenMetadata,
- TokenOrderbookSnapshot,
- Transaction,
-];
-
-const config: ConnectionOptions = {
- type: 'postgres',
- url: process.env.ZEROEX_DATA_PIPELINE_DB_URL,
- synchronize: false,
- logging: ['error'],
- entities,
- migrations: ['./lib/migrations/**/*.js'],
-};
-
-module.exports = config;
diff --git a/packages/pipeline/src/parsers/bloxy/index.ts b/packages/pipeline/src/parsers/bloxy/index.ts
deleted file mode 100644
index caa55d289..000000000
--- a/packages/pipeline/src/parsers/bloxy/index.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as R from 'ramda';
-
-import { BLOXY_DEX_TRADES_URL, BloxyTrade } from '../../data_sources/bloxy';
-import { DexTrade } from '../../entities';
-
-/**
- * Parses a raw trades response from the Bloxy Dex API and returns an array of
- * DexTrade entities.
- * @param rawTrades A raw order response from an SRA endpoint.
- */
-export function parseBloxyTrades(rawTrades: BloxyTrade[]): DexTrade[] {
- return R.map(_parseBloxyTrade, rawTrades);
-}
-
-/**
- * Converts a single Bloxy trade into a DexTrade entity.
- * @param rawTrade A single trade from the response from the Bloxy API.
- */
-export function _parseBloxyTrade(rawTrade: BloxyTrade): DexTrade {
- const dexTrade = new DexTrade();
- dexTrade.sourceUrl = BLOXY_DEX_TRADES_URL;
- dexTrade.txHash = rawTrade.tx_hash;
- dexTrade.txTimestamp = new Date(rawTrade.tx_time).getTime();
- dexTrade.txDate = rawTrade.tx_date;
- dexTrade.txSender = rawTrade.tx_sender;
- dexTrade.smartContractId = rawTrade.smart_contract_id;
- dexTrade.smartContractAddress = rawTrade.smart_contract_address;
- dexTrade.contractType = rawTrade.contract_type;
- dexTrade.maker = rawTrade.maker;
- dexTrade.taker = rawTrade.taker;
- // TODO(albrow): The Bloxy API returns amounts and fees as a `number` type
- // but some of their values have too many significant digits to be
- // represented that way. Ideally they will switch to using strings and then
- // we can update this code.
- dexTrade.amountBuy = new BigNumber(rawTrade.amountBuy.toString());
- dexTrade.makerFeeAmount = new BigNumber(rawTrade.makerFee.toString());
- dexTrade.buyCurrencyId = rawTrade.buyCurrencyId;
- dexTrade.buySymbol = filterNullCharacters(rawTrade.buySymbol);
- dexTrade.amountSell = new BigNumber(rawTrade.amountSell.toString());
- dexTrade.takerFeeAmount = new BigNumber(rawTrade.takerFee.toString());
- dexTrade.sellCurrencyId = rawTrade.sellCurrencyId;
- dexTrade.sellSymbol = filterNullCharacters(rawTrade.sellSymbol);
- dexTrade.makerAnnotation = rawTrade.maker_annotation;
- dexTrade.takerAnnotation = rawTrade.taker_annotation;
- dexTrade.protocol = rawTrade.protocol;
- dexTrade.buyAddress = rawTrade.buyAddress;
- dexTrade.sellAddress = rawTrade.sellAddress;
- return dexTrade;
-}
-
-// Works with any form of escaped null character (e.g., '\0' and '\u0000').
-const filterNullCharacters = R.replace(/\0/g, '');
diff --git a/packages/pipeline/src/parsers/copper/index.ts b/packages/pipeline/src/parsers/copper/index.ts
deleted file mode 100644
index 07da66d10..000000000
--- a/packages/pipeline/src/parsers/copper/index.ts
+++ /dev/null
@@ -1,259 +0,0 @@
-import * as R from 'ramda';
-
-import { CopperActivity, CopperActivityType, CopperCustomField, CopperLead, CopperOpportunity } from '../../entities';
-
-const ONE_SECOND = 1000;
-export type CopperSearchResponse = CopperLeadResponse | CopperActivityResponse | CopperOpportunityResponse;
-export interface CopperLeadResponse {
- id: number;
- name?: string;
- first_name?: string;
- last_name?: string;
- middle_name?: string;
- assignee_id?: number;
- company_name?: string;
- customer_source_id?: number;
- monetary_value?: number;
- status: string;
- status_id: number;
- title?: string;
- date_created: number; // in seconds
- date_modified: number; // in seconds
-}
-
-export interface CopperActivityResponse {
- id: number;
- parent: CopperActivityParentResponse;
- type: CopperActivityTypeResponse;
- user_id: number;
- activity_date: number;
- old_value: CopperActivityValueResponse;
- new_value: CopperActivityValueResponse;
- date_created: number; // in seconds
- date_modified: number; // in seconds
-}
-
-export interface CopperActivityValueResponse {
- id: number;
- name: string;
-}
-export interface CopperActivityParentResponse {
- id: number;
- type: string;
-}
-
-// custom activity types
-export enum CopperActivityTypeCategory {
- User = 'user',
- System = 'system',
-}
-export interface CopperActivityTypeResponse {
- id: number;
- category: CopperActivityTypeCategory;
- name: string;
- is_disabled?: boolean;
- count_as_interaction?: boolean;
-}
-
-export interface CopperOpportunityResponse {
- id: number;
- name: string;
- assignee_id?: number;
- close_date?: string;
- company_id?: number;
- company_name?: string;
- customer_source_id?: number;
- loss_reason_id?: number;
- pipeline_id: number;
- pipeline_stage_id: number;
- primary_contact_id?: number;
- priority?: string;
- status: string;
- tags: string[];
- interaction_count: number;
- monetary_value?: number;
- win_probability?: number;
- date_created: number; // in seconds
- date_modified: number; // in seconds
- custom_fields: CopperNestedCustomFieldResponse[];
-}
-interface CopperNestedCustomFieldResponse {
- custom_field_definition_id: number;
- value: number | number[] | null;
-}
-// custom fields
-export enum CopperCustomFieldType {
- String = 'String',
- Text = 'Text',
- Dropdown = 'Dropdown',
- MultiSelect = 'MultiSelect', // not in API documentation but shows up in results
- Date = 'Date',
- Checkbox = 'Checkbox',
- Float = 'Float',
- URL = 'URL', // tslint:disable-line:enum-naming
- Percentage = 'Percentage',
- Currency = 'Currency',
- Connect = 'Connect',
-}
-export interface CopperCustomFieldOptionResponse {
- id: number;
- name: string;
-}
-export interface CopperCustomFieldResponse {
- id: number;
- name: string;
- data_type: CopperCustomFieldType;
- options?: CopperCustomFieldOptionResponse[];
-}
-/**
- * Parse response from Copper API /search/leads/
- *
- * @param leads - The array of leads returned from the API
- * @returns Returns an array of Copper Lead entities
- */
-export function parseLeads(leads: CopperLeadResponse[]): CopperLead[] {
- return leads.map(lead => {
- const entity = new CopperLead();
- entity.id = lead.id;
- entity.name = lead.name || undefined;
- entity.firstName = lead.first_name || undefined;
- entity.lastName = lead.last_name || undefined;
- entity.middleName = lead.middle_name || undefined;
- entity.assigneeId = lead.assignee_id || undefined;
- entity.companyName = lead.company_name || undefined;
- entity.customerSourceId = lead.customer_source_id || undefined;
- entity.monetaryValue = lead.monetary_value || undefined;
- entity.status = lead.status;
- entity.statusId = lead.status_id;
- entity.title = lead.title || undefined;
- entity.dateCreated = lead.date_created * ONE_SECOND;
- entity.dateModified = lead.date_modified * ONE_SECOND;
- return entity;
- });
-}
-
-/**
- * Parse response from Copper API /search/activities/
- *
- * @param activities - The array of activities returned from the API
- * @returns Returns an array of Copper Activity entities
- */
-export function parseActivities(activities: CopperActivityResponse[]): CopperActivity[] {
- return activities.map(activity => {
- const entity = new CopperActivity();
- entity.id = activity.id;
-
- entity.parentId = activity.parent.id;
- entity.parentType = activity.parent.type;
-
- entity.typeId = activity.type.id;
- entity.typeCategory = activity.type.category.toString();
- entity.typeName = activity.type.name;
-
- entity.userId = activity.user_id;
- entity.dateCreated = activity.date_created * ONE_SECOND;
- entity.dateModified = activity.date_modified * ONE_SECOND;
-
- // nested nullable fields
- entity.oldValueId = R.path(['old_value', 'id'], activity);
- entity.oldValueName = R.path(['old_value', 'name'], activity);
- entity.newValueId = R.path(['new_value', 'id'], activity);
- entity.newValueName = R.path(['new_value', 'name'], activity);
-
- return entity;
- });
-}
-
-/**
- * Parse response from Copper API /search/opportunities/
- *
- * @param opportunities - The array of opportunities returned from the API
- * @returns Returns an array of Copper Opportunity entities
- */
-export function parseOpportunities(opportunities: CopperOpportunityResponse[]): CopperOpportunity[] {
- return opportunities.map(opp => {
- const customFields: { [key: number]: number } = opp.custom_fields
- .filter(f => f.value !== null)
- .map(f => ({
- ...f,
- value: ([] as number[]).concat(f.value || []), // normalise all values to number[]
- }))
- .map(f => f.value.map(val => [f.custom_field_definition_id, val] as [number, number])) // pair each value with the custom_field_definition_id
- .reduce((acc, pair) => acc.concat(pair)) // flatten
- .reduce<{ [key: number]: number }>((obj, [key, value]) => {
- // transform into object literal
- obj[key] = value;
- return obj;
- }, {});
-
- const entity = new CopperOpportunity();
- entity.id = opp.id;
- entity.name = opp.name;
- entity.assigneeId = opp.assignee_id || undefined;
- entity.closeDate = opp.close_date || undefined;
- entity.companyId = opp.company_id || undefined;
- entity.companyName = opp.company_name || undefined;
- entity.customerSourceId = opp.customer_source_id || undefined;
- entity.lossReasonId = opp.loss_reason_id || undefined;
- entity.pipelineId = opp.pipeline_id;
- entity.pipelineStageId = opp.pipeline_stage_id;
- entity.primaryContactId = opp.primary_contact_id || undefined;
- entity.priority = opp.priority || undefined;
- entity.status = opp.status;
- entity.interactionCount = opp.interaction_count;
- entity.monetaryValue = opp.monetary_value || undefined;
- entity.winProbability = opp.win_probability === null ? undefined : opp.win_probability;
- entity.dateCreated = opp.date_created * ONE_SECOND;
- entity.dateModified = opp.date_modified * ONE_SECOND;
- entity.customFields = customFields;
- return entity;
- });
-}
-
-/**
- * Parse response from Copper API /activity_types/
- *
- * @param activityTypeResponse - Activity Types response from the API, keyed by "user" or "system"
- * @returns Returns an array of Copper Activity Type entities
- */
-export function parseActivityTypes(
- activityTypeResponse: Map<CopperActivityTypeCategory, CopperActivityTypeResponse[]>,
-): CopperActivityType[] {
- const values: CopperActivityTypeResponse[] = R.flatten(Object.values(activityTypeResponse));
- return values.map(activityType => ({
- id: activityType.id,
- name: activityType.name,
- category: activityType.category.toString(),
- isDisabled: activityType.is_disabled,
- countAsInteraction: activityType.count_as_interaction,
- }));
-}
-
-/**
- * Parse response from Copper API /custom_field_definitions/
- *
- * @param customFieldResponse - array of custom field definitions returned from the API, consisting of top-level fields and nested fields
- * @returns Returns an array of Copper Custom Field entities
- */
-export function parseCustomFields(customFieldResponse: CopperCustomFieldResponse[]): CopperCustomField[] {
- function parseTopLevelField(field: CopperCustomFieldResponse): CopperCustomField[] {
- const topLevelField: CopperCustomField = {
- id: field.id,
- name: field.name,
- dataType: field.data_type.toString(),
- };
-
- if (field.options !== undefined) {
- const nestedFields: CopperCustomField[] = field.options.map(option => ({
- id: option.id,
- name: option.name,
- dataType: field.name,
- fieldType: 'option',
- }));
- return nestedFields.concat(topLevelField);
- } else {
- return [topLevelField];
- }
- }
- return R.chain(parseTopLevelField, customFieldResponse);
-}
diff --git a/packages/pipeline/src/parsers/ddex_orders/index.ts b/packages/pipeline/src/parsers/ddex_orders/index.ts
deleted file mode 100644
index 562f894ab..000000000
--- a/packages/pipeline/src/parsers/ddex_orders/index.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-import { aggregateOrders } from '../utils';
-
-import { DdexMarket, DdexOrderbook } from '../../data_sources/ddex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../entities';
-import { OrderType } from '../../types';
-
-/**
- * Marque function of this file.
- * 1) Takes in orders from an orderbook,
- * other information attached.
- * @param ddexOrderbook A raw orderbook that we pull from the Ddex API.
- * @param ddexMarket An object containing market data also directly from the API.
- * @param observedTimestamp Time at which the orders for the market were pulled.
- * @param source The exchange where these orders are placed. In this case 'ddex'.
- */
-export function parseDdexOrders(
- ddexOrderbook: DdexOrderbook,
- ddexMarket: DdexMarket,
- observedTimestamp: number,
- source: string,
-): TokenOrder[] {
- const aggregatedBids = aggregateOrders(ddexOrderbook.bids);
- const aggregatedAsks = aggregateOrders(ddexOrderbook.asks);
- const parsedBids = aggregatedBids.map(order =>
- parseDdexOrder(ddexMarket, observedTimestamp, OrderType.Bid, source, order),
- );
- const parsedAsks = aggregatedAsks.map(order =>
- parseDdexOrder(ddexMarket, observedTimestamp, OrderType.Ask, source, order),
- );
- return parsedBids.concat(parsedAsks);
-}
-
-/**
- * Parse a single aggregated Ddex order in order to form a tokenOrder entity
- * which can be saved into the database.
- * @param ddexMarket An object containing information about the market where these
- * trades have been placed.
- * @param observedTimestamp The time when the API response returned back to us.
- * @param orderType 'bid' or 'ask' enum.
- * @param source Exchange where these orders were placed.
- * @param ddexOrder A <price, amount> tuple which we will convert to volume-basis.
- */
-export function parseDdexOrder(
- ddexMarket: DdexMarket,
- observedTimestamp: number,
- orderType: OrderType,
- source: string,
- ddexOrder: [string, BigNumber],
-): TokenOrder {
- const tokenOrder = new TokenOrder();
- const price = new BigNumber(ddexOrder[0]);
- const amount = ddexOrder[1];
-
- tokenOrder.source = source;
- tokenOrder.observedTimestamp = observedTimestamp;
- tokenOrder.orderType = orderType;
- tokenOrder.price = price;
-
- tokenOrder.baseAssetSymbol = ddexMarket.baseToken;
- tokenOrder.baseAssetAddress = ddexMarket.baseTokenAddress;
- tokenOrder.baseVolume = amount;
-
- tokenOrder.quoteAssetSymbol = ddexMarket.quoteToken;
- tokenOrder.quoteAssetAddress = ddexMarket.quoteTokenAddress;
- tokenOrder.quoteVolume = price.times(amount);
- return tokenOrder;
-}
diff --git a/packages/pipeline/src/parsers/events/erc20_events.ts b/packages/pipeline/src/parsers/events/erc20_events.ts
deleted file mode 100644
index caf9984d0..000000000
--- a/packages/pipeline/src/parsers/events/erc20_events.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { ERC20TokenApprovalEventArgs } from '@0x/contract-wrappers';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as R from 'ramda';
-
-import { ERC20ApprovalEvent } from '../../entities';
-
-/**
- * Parses raw event logs for an ERC20 approval event and returns an array of
- * ERC20ApprovalEvent entities.
- * @param eventLogs Raw event logs (e.g. returned from contract-wrappers).
- */
-export const parseERC20ApprovalEvents: (
- eventLogs: Array<LogWithDecodedArgs<ERC20TokenApprovalEventArgs>>,
-) => ERC20ApprovalEvent[] = R.map(_convertToERC20ApprovalEvent);
-
-/**
- * Converts a raw event log for an ERC20 approval event into an
- * ERC20ApprovalEvent entity.
- * @param eventLog Raw event log (e.g. returned from contract-wrappers).
- */
-export function _convertToERC20ApprovalEvent(
- eventLog: LogWithDecodedArgs<ERC20TokenApprovalEventArgs>,
-): ERC20ApprovalEvent {
- const erc20ApprovalEvent = new ERC20ApprovalEvent();
- erc20ApprovalEvent.tokenAddress = eventLog.address as string;
- erc20ApprovalEvent.blockNumber = eventLog.blockNumber as number;
- erc20ApprovalEvent.logIndex = eventLog.logIndex as number;
- erc20ApprovalEvent.rawData = eventLog.data as string;
- erc20ApprovalEvent.transactionHash = eventLog.transactionHash;
- erc20ApprovalEvent.ownerAddress = eventLog.args._owner;
- erc20ApprovalEvent.spenderAddress = eventLog.args._spender;
- erc20ApprovalEvent.amount = eventLog.args._value;
- return erc20ApprovalEvent;
-}
diff --git a/packages/pipeline/src/parsers/events/exchange_events.ts b/packages/pipeline/src/parsers/events/exchange_events.ts
deleted file mode 100644
index 9c4a5f89a..000000000
--- a/packages/pipeline/src/parsers/events/exchange_events.ts
+++ /dev/null
@@ -1,145 +0,0 @@
-import { ExchangeCancelEventArgs, ExchangeCancelUpToEventArgs, ExchangeFillEventArgs } from '@0x/contract-wrappers';
-import { assetDataUtils } from '@0x/order-utils';
-import { AssetProxyId, ERC721AssetData } from '@0x/types';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import * as R from 'ramda';
-
-import { ExchangeCancelEvent, ExchangeCancelUpToEvent, ExchangeFillEvent } from '../../entities';
-import { bigNumbertoStringOrNull, convertAssetProxyIdToType } from '../../utils';
-
-/**
- * Parses raw event logs for a fill event and returns an array of
- * ExchangeFillEvent entities.
- * @param eventLogs Raw event logs (e.g. returned from contract-wrappers).
- */
-export const parseExchangeFillEvents: (
- eventLogs: Array<LogWithDecodedArgs<ExchangeFillEventArgs>>,
-) => ExchangeFillEvent[] = R.map(_convertToExchangeFillEvent);
-
-/**
- * Parses raw event logs for a cancel event and returns an array of
- * ExchangeCancelEvent entities.
- * @param eventLogs Raw event logs (e.g. returned from contract-wrappers).
- */
-export const parseExchangeCancelEvents: (
- eventLogs: Array<LogWithDecodedArgs<ExchangeCancelEventArgs>>,
-) => ExchangeCancelEvent[] = R.map(_convertToExchangeCancelEvent);
-
-/**
- * Parses raw event logs for a CancelUpTo event and returns an array of
- * ExchangeCancelUpToEvent entities.
- * @param eventLogs Raw event logs (e.g. returned from contract-wrappers).
- */
-export const parseExchangeCancelUpToEvents: (
- eventLogs: Array<LogWithDecodedArgs<ExchangeCancelUpToEventArgs>>,
-) => ExchangeCancelUpToEvent[] = R.map(_convertToExchangeCancelUpToEvent);
-
-/**
- * Converts a raw event log for a fill event into an ExchangeFillEvent entity.
- * @param eventLog Raw event log (e.g. returned from contract-wrappers).
- */
-export function _convertToExchangeFillEvent(eventLog: LogWithDecodedArgs<ExchangeFillEventArgs>): ExchangeFillEvent {
- const makerAssetData = assetDataUtils.decodeAssetDataOrThrow(eventLog.args.makerAssetData);
- const takerAssetData = assetDataUtils.decodeAssetDataOrThrow(eventLog.args.takerAssetData);
- const exchangeFillEvent = new ExchangeFillEvent();
- exchangeFillEvent.contractAddress = eventLog.address as string;
- exchangeFillEvent.blockNumber = eventLog.blockNumber as number;
- exchangeFillEvent.logIndex = eventLog.logIndex as number;
- exchangeFillEvent.rawData = eventLog.data as string;
- exchangeFillEvent.transactionHash = eventLog.transactionHash;
- exchangeFillEvent.makerAddress = eventLog.args.makerAddress;
- exchangeFillEvent.takerAddress = eventLog.args.takerAddress;
- exchangeFillEvent.feeRecipientAddress = eventLog.args.feeRecipientAddress;
- exchangeFillEvent.senderAddress = eventLog.args.senderAddress;
- exchangeFillEvent.makerAssetFilledAmount = eventLog.args.makerAssetFilledAmount;
- exchangeFillEvent.takerAssetFilledAmount = eventLog.args.takerAssetFilledAmount;
- exchangeFillEvent.makerFeePaid = eventLog.args.makerFeePaid;
- exchangeFillEvent.takerFeePaid = eventLog.args.takerFeePaid;
- exchangeFillEvent.orderHash = eventLog.args.orderHash;
- exchangeFillEvent.rawMakerAssetData = eventLog.args.makerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeFillEvent.makerAssetType = convertAssetProxyIdToType(makerAssetData.assetProxyId as AssetProxyId);
- exchangeFillEvent.makerAssetProxyId = makerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- exchangeFillEvent.makerTokenAddress = assetDataUtils.isMultiAssetData(makerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(eventLog.args.makerAssetData).nestedAssetData[0].tokenAddress
- : makerAssetData.tokenAddress;
- // tslint has a false positive here. Type assertion is required.
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeFillEvent.makerTokenId = bigNumbertoStringOrNull((makerAssetData as ERC721AssetData).tokenId);
- exchangeFillEvent.rawTakerAssetData = eventLog.args.takerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeFillEvent.takerAssetType = convertAssetProxyIdToType(takerAssetData.assetProxyId as AssetProxyId);
- exchangeFillEvent.takerAssetProxyId = takerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- exchangeFillEvent.takerTokenAddress = assetDataUtils.isMultiAssetData(takerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(eventLog.args.takerAssetData).nestedAssetData[0].tokenAddress
- : takerAssetData.tokenAddress;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeFillEvent.takerTokenId = bigNumbertoStringOrNull((takerAssetData as ERC721AssetData).tokenId);
- return exchangeFillEvent;
-}
-
-/**
- * Converts a raw event log for a cancel event into an ExchangeCancelEvent
- * entity.
- * @param eventLog Raw event log (e.g. returned from contract-wrappers).
- */
-export function _convertToExchangeCancelEvent(
- eventLog: LogWithDecodedArgs<ExchangeCancelEventArgs>,
-): ExchangeCancelEvent {
- const makerAssetData = assetDataUtils.decodeAssetDataOrThrow(eventLog.args.makerAssetData);
- const takerAssetData = assetDataUtils.decodeAssetDataOrThrow(eventLog.args.takerAssetData);
- const exchangeCancelEvent = new ExchangeCancelEvent();
- exchangeCancelEvent.contractAddress = eventLog.address as string;
- exchangeCancelEvent.blockNumber = eventLog.blockNumber as number;
- exchangeCancelEvent.logIndex = eventLog.logIndex as number;
- exchangeCancelEvent.rawData = eventLog.data as string;
- exchangeCancelEvent.transactionHash = eventLog.transactionHash;
- exchangeCancelEvent.makerAddress = eventLog.args.makerAddress;
- exchangeCancelEvent.takerAddress = eventLog.args.takerAddress;
- exchangeCancelEvent.feeRecipientAddress = eventLog.args.feeRecipientAddress;
- exchangeCancelEvent.senderAddress = eventLog.args.senderAddress;
- exchangeCancelEvent.orderHash = eventLog.args.orderHash;
- exchangeCancelEvent.rawMakerAssetData = eventLog.args.makerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeCancelEvent.makerAssetType = convertAssetProxyIdToType(makerAssetData.assetProxyId as AssetProxyId);
- exchangeCancelEvent.makerAssetProxyId = makerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- exchangeCancelEvent.makerTokenAddress = assetDataUtils.isMultiAssetData(makerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(eventLog.args.makerAssetData).nestedAssetData[0].tokenAddress
- : makerAssetData.tokenAddress;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeCancelEvent.makerTokenId = bigNumbertoStringOrNull((makerAssetData as ERC721AssetData).tokenId);
- exchangeCancelEvent.rawTakerAssetData = eventLog.args.takerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeCancelEvent.takerAssetType = convertAssetProxyIdToType(takerAssetData.assetProxyId as AssetProxyId);
- exchangeCancelEvent.takerAssetProxyId = takerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- exchangeCancelEvent.takerTokenAddress = assetDataUtils.isMultiAssetData(takerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(eventLog.args.takerAssetData).nestedAssetData[0].tokenAddress
- : takerAssetData.tokenAddress;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- exchangeCancelEvent.takerTokenId = bigNumbertoStringOrNull((takerAssetData as ERC721AssetData).tokenId);
- return exchangeCancelEvent;
-}
-
-/**
- * Converts a raw event log for a cancelUpTo event into an
- * ExchangeCancelUpToEvent entity.
- * @param eventLog Raw event log (e.g. returned from contract-wrappers).
- */
-export function _convertToExchangeCancelUpToEvent(
- eventLog: LogWithDecodedArgs<ExchangeCancelUpToEventArgs>,
-): ExchangeCancelUpToEvent {
- const exchangeCancelUpToEvent = new ExchangeCancelUpToEvent();
- exchangeCancelUpToEvent.contractAddress = eventLog.address as string;
- exchangeCancelUpToEvent.blockNumber = eventLog.blockNumber as number;
- exchangeCancelUpToEvent.logIndex = eventLog.logIndex as number;
- exchangeCancelUpToEvent.rawData = eventLog.data as string;
- exchangeCancelUpToEvent.transactionHash = eventLog.transactionHash;
- exchangeCancelUpToEvent.makerAddress = eventLog.args.makerAddress;
- exchangeCancelUpToEvent.senderAddress = eventLog.args.senderAddress;
- exchangeCancelUpToEvent.orderEpoch = eventLog.args.orderEpoch;
- return exchangeCancelUpToEvent;
-}
diff --git a/packages/pipeline/src/parsers/events/index.ts b/packages/pipeline/src/parsers/events/index.ts
deleted file mode 100644
index 3f9915e8b..000000000
--- a/packages/pipeline/src/parsers/events/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-export { parseExchangeCancelEvents, parseExchangeCancelUpToEvents, parseExchangeFillEvents } from './exchange_events';
-export { parseERC20ApprovalEvents } from './erc20_events';
diff --git a/packages/pipeline/src/parsers/idex_orders/index.ts b/packages/pipeline/src/parsers/idex_orders/index.ts
deleted file mode 100644
index 14b871195..000000000
--- a/packages/pipeline/src/parsers/idex_orders/index.ts
+++ /dev/null
@@ -1,81 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-import { aggregateOrders } from '../utils';
-
-import { IdexOrderbook, IdexOrderParam } from '../../data_sources/idex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../entities';
-import { OrderType } from '../../types';
-
-/**
- * Marque function of this file.
- * 1) Takes in orders from an orderbook,
- * 2) Aggregates them by price point,
- * 3) Parses them into entities which are then saved into the database.
- * @param idexOrderbook raw orderbook that we pull from the Idex API.
- * @param observedTimestamp Time at which the orders for the market were pulled.
- * @param source The exchange where these orders are placed. In this case 'idex'.
- */
-export function parseIdexOrders(idexOrderbook: IdexOrderbook, observedTimestamp: number, source: string): TokenOrder[] {
- const aggregatedBids = aggregateOrders(idexOrderbook.bids);
- // Any of the bid orders' params will work
- const idexBidOrder = idexOrderbook.bids[0];
- const parsedBids =
- aggregatedBids.length > 0
- ? aggregatedBids.map(order =>
- parseIdexOrder(idexBidOrder.params, observedTimestamp, OrderType.Bid, source, order),
- )
- : [];
-
- const aggregatedAsks = aggregateOrders(idexOrderbook.asks);
- // Any of the ask orders' params will work
- const idexAskOrder = idexOrderbook.asks[0];
- const parsedAsks =
- aggregatedAsks.length > 0
- ? aggregatedAsks.map(order =>
- parseIdexOrder(idexAskOrder.params, observedTimestamp, OrderType.Ask, source, order),
- )
- : [];
- return parsedBids.concat(parsedAsks);
-}
-
-/**
- * Parse a single aggregated Idex order in order to form a tokenOrder entity
- * which can be saved into the database.
- * @param idexOrderParam An object containing information about the market where these
- * trades have been placed.
- * @param observedTimestamp The time when the API response returned back to us.
- * @param orderType 'bid' or 'ask' enum.
- * @param source Exchange where these orders were placed.
- * @param idexOrder A <price, amount> tuple which we will convert to volume-basis.
- */
-export function parseIdexOrder(
- idexOrderParam: IdexOrderParam,
- observedTimestamp: number,
- orderType: OrderType,
- source: string,
- idexOrder: [string, BigNumber],
-): TokenOrder {
- const tokenOrder = new TokenOrder();
- const price = new BigNumber(idexOrder[0]);
- const amount = idexOrder[1];
-
- tokenOrder.source = source;
- tokenOrder.observedTimestamp = observedTimestamp;
- tokenOrder.orderType = orderType;
- tokenOrder.price = price;
- tokenOrder.baseVolume = amount;
- tokenOrder.quoteVolume = price.times(amount);
-
- if (orderType === OrderType.Bid) {
- tokenOrder.baseAssetSymbol = idexOrderParam.buySymbol;
- tokenOrder.baseAssetAddress = idexOrderParam.tokenBuy;
- tokenOrder.quoteAssetSymbol = idexOrderParam.sellSymbol;
- tokenOrder.quoteAssetAddress = idexOrderParam.tokenSell;
- } else {
- tokenOrder.baseAssetSymbol = idexOrderParam.sellSymbol;
- tokenOrder.baseAssetAddress = idexOrderParam.tokenSell;
- tokenOrder.quoteAssetSymbol = idexOrderParam.buySymbol;
- tokenOrder.quoteAssetAddress = idexOrderParam.tokenBuy;
- }
- return tokenOrder;
-}
diff --git a/packages/pipeline/src/parsers/oasis_orders/index.ts b/packages/pipeline/src/parsers/oasis_orders/index.ts
deleted file mode 100644
index b71fb65b9..000000000
--- a/packages/pipeline/src/parsers/oasis_orders/index.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as R from 'ramda';
-
-import { aggregateOrders } from '../utils';
-
-import { OasisMarket, OasisOrder } from '../../data_sources/oasis';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../entities';
-import { OrderType } from '../../types';
-
-/**
- * Marque function of this file.
- * 1) Takes in orders from an orderbook,
- * 2) Aggregates them according to price point,
- * 3) Builds TokenOrder entity with other information attached.
- * @param oasisOrderbook A raw orderbook that we pull from the Oasis API.
- * @param oasisMarket An object containing market data also directly from the API.
- * @param observedTimestamp Time at which the orders for the market were pulled.
- * @param source The exchange where these orders are placed. In this case 'oasis'.
- */
-export function parseOasisOrders(
- oasisOrderbook: OasisOrder[],
- oasisMarket: OasisMarket,
- observedTimestamp: number,
- source: string,
-): TokenOrder[] {
- const aggregatedBids = aggregateOrders(R.filter(R.propEq('act', OrderType.Bid), oasisOrderbook));
- const aggregatedAsks = aggregateOrders(R.filter(R.propEq('act', OrderType.Ask), oasisOrderbook));
- const parsedBids = aggregatedBids.map(order =>
- parseOasisOrder(oasisMarket, observedTimestamp, OrderType.Bid, source, order),
- );
- const parsedAsks = aggregatedAsks.map(order =>
- parseOasisOrder(oasisMarket, observedTimestamp, OrderType.Ask, source, order),
- );
- return parsedBids.concat(parsedAsks);
-}
-
-/**
- * Parse a single aggregated Oasis order to form a tokenOrder entity
- * which can be saved into the database.
- * @param oasisMarket An object containing information about the market where these
- * trades have been placed.
- * @param observedTimestamp The time when the API response returned back to us.
- * @param orderType 'bid' or 'ask' enum.
- * @param source Exchange where these orders were placed.
- * @param oasisOrder A <price, amount> tuple which we will convert to volume-basis.
- */
-export function parseOasisOrder(
- oasisMarket: OasisMarket,
- observedTimestamp: number,
- orderType: OrderType,
- source: string,
- oasisOrder: [string, BigNumber],
-): TokenOrder {
- const tokenOrder = new TokenOrder();
- const price = new BigNumber(oasisOrder[0]);
- const amount = oasisOrder[1];
-
- tokenOrder.source = source;
- tokenOrder.observedTimestamp = observedTimestamp;
- tokenOrder.orderType = orderType;
- tokenOrder.price = price;
-
- tokenOrder.baseAssetSymbol = oasisMarket.base;
- tokenOrder.baseAssetAddress = null; // Oasis doesn't provide address information
- tokenOrder.baseVolume = amount;
-
- tokenOrder.quoteAssetSymbol = oasisMarket.quote;
- tokenOrder.quoteAssetAddress = null; // Oasis doesn't provide address information
- tokenOrder.quoteVolume = price.times(amount);
- return tokenOrder;
-}
diff --git a/packages/pipeline/src/parsers/ohlcv_external/crypto_compare.ts b/packages/pipeline/src/parsers/ohlcv_external/crypto_compare.ts
deleted file mode 100644
index 3efb90384..000000000
--- a/packages/pipeline/src/parsers/ohlcv_external/crypto_compare.ts
+++ /dev/null
@@ -1,38 +0,0 @@
-import { CryptoCompareOHLCVRecord } from '../../data_sources/ohlcv_external/crypto_compare';
-import { OHLCVExternal } from '../../entities';
-
-const ONE_SECOND = 1000; // Crypto Compare uses timestamps in seconds instead of milliseconds
-
-export interface OHLCVMetadata {
- exchange: string;
- fromSymbol: string;
- toSymbol: string;
- source: string;
- observedTimestamp: number;
- interval: number;
-}
-/**
- * Parses OHLCV records from Crypto Compare into an array of OHLCVExternal entities
- * @param rawRecords an array of OHLCV records from Crypto Compare (not the full response)
- */
-export function parseRecords(rawRecords: CryptoCompareOHLCVRecord[], metadata: OHLCVMetadata): OHLCVExternal[] {
- return rawRecords.map(rec => {
- const ohlcvRecord = new OHLCVExternal();
- ohlcvRecord.exchange = metadata.exchange;
- ohlcvRecord.fromSymbol = metadata.fromSymbol;
- ohlcvRecord.toSymbol = metadata.toSymbol;
- ohlcvRecord.startTime = rec.time * ONE_SECOND - metadata.interval;
- ohlcvRecord.endTime = rec.time * ONE_SECOND;
-
- ohlcvRecord.open = rec.open;
- ohlcvRecord.close = rec.close;
- ohlcvRecord.low = rec.low;
- ohlcvRecord.high = rec.high;
- ohlcvRecord.volumeFrom = rec.volumefrom;
- ohlcvRecord.volumeTo = rec.volumeto;
-
- ohlcvRecord.source = metadata.source;
- ohlcvRecord.observedTimestamp = metadata.observedTimestamp;
- return ohlcvRecord;
- });
-}
diff --git a/packages/pipeline/src/parsers/paradex_orders/index.ts b/packages/pipeline/src/parsers/paradex_orders/index.ts
deleted file mode 100644
index 85990dae4..000000000
--- a/packages/pipeline/src/parsers/paradex_orders/index.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-import { ParadexMarket, ParadexOrder, ParadexOrderbookResponse } from '../../data_sources/paradex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../entities';
-import { OrderType } from '../../types';
-
-/**
- * Marque function of this file.
- * 1) Takes in orders from an orderbook (orders are already aggregated by price point),
- * 2) For each aggregated order, forms a TokenOrder entity with market data and
- * other information attached.
- * @param paradexOrderbookResponse An orderbook response from the Paradex API.
- * @param paradexMarket An object containing market data also directly from the API.
- * @param observedTimestamp Time at which the orders for the market were pulled.
- * @param source The exchange where these orders are placed. In this case 'paradex'.
- */
-export function parseParadexOrders(
- paradexOrderbookResponse: ParadexOrderbookResponse,
- paradexMarket: ParadexMarket,
- observedTimestamp: number,
- source: string,
-): TokenOrder[] {
- const parsedBids = paradexOrderbookResponse.bids.map(order =>
- parseParadexOrder(paradexMarket, observedTimestamp, OrderType.Bid, source, order),
- );
- const parsedAsks = paradexOrderbookResponse.asks.map(order =>
- parseParadexOrder(paradexMarket, observedTimestamp, OrderType.Ask, source, order),
- );
- return parsedBids.concat(parsedAsks);
-}
-
-/**
- * Parse a single aggregated Ddex order in order to form a tokenOrder entity
- * which can be saved into the database.
- * @param paradexMarket An object containing information about the market where these
- * orders have been placed.
- * @param observedTimestamp The time when the API response returned back to us.
- * @param orderType 'bid' or 'ask' enum.
- * @param source Exchange where these orders were placed.
- * @param paradexOrder A ParadexOrder object; basically price, amount tuple.
- */
-export function parseParadexOrder(
- paradexMarket: ParadexMarket,
- observedTimestamp: number,
- orderType: OrderType,
- source: string,
- paradexOrder: ParadexOrder,
-): TokenOrder {
- const tokenOrder = new TokenOrder();
- const price = new BigNumber(paradexOrder.price);
- const amount = new BigNumber(paradexOrder.amount);
-
- tokenOrder.source = source;
- tokenOrder.observedTimestamp = observedTimestamp;
- tokenOrder.orderType = orderType;
- tokenOrder.price = price;
-
- tokenOrder.baseAssetSymbol = paradexMarket.baseToken;
- tokenOrder.baseAssetAddress = paradexMarket.baseTokenAddress as string;
- tokenOrder.baseVolume = amount;
-
- tokenOrder.quoteAssetSymbol = paradexMarket.quoteToken;
- tokenOrder.quoteAssetAddress = paradexMarket.quoteTokenAddress as string;
- tokenOrder.quoteVolume = price.times(amount);
- return tokenOrder;
-}
diff --git a/packages/pipeline/src/parsers/relayer_registry/index.ts b/packages/pipeline/src/parsers/relayer_registry/index.ts
deleted file mode 100644
index 9723880a4..000000000
--- a/packages/pipeline/src/parsers/relayer_registry/index.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import * as R from 'ramda';
-
-import { RelayerResponse, RelayerResponseNetwork } from '../../data_sources/relayer-registry';
-import { Relayer } from '../../entities';
-
-/**
- * Parses a raw relayer registry response into an array of Relayer entities.
- * @param rawResp raw response from the relayer-registry json file.
- */
-export function parseRelayers(rawResp: Map<string, RelayerResponse>): Relayer[] {
- const parsedAsObject = R.mapObjIndexed(parseRelayer, rawResp);
- return R.values(parsedAsObject);
-}
-
-function parseRelayer(relayerResp: RelayerResponse, uuid: string): Relayer {
- const relayer = new Relayer();
- relayer.uuid = uuid;
- relayer.name = relayerResp.name;
- relayer.homepageUrl = relayerResp.homepage_url;
- relayer.appUrl = relayerResp.app_url;
- const mainNetworkRelayerInfo = getMainNetwork(relayerResp);
- if (mainNetworkRelayerInfo !== undefined) {
- relayer.sraHttpEndpoint = mainNetworkRelayerInfo.sra_http_endpoint || null;
- relayer.sraWsEndpoint = mainNetworkRelayerInfo.sra_ws_endpoint || null;
- relayer.feeRecipientAddresses =
- R.path(['static_order_fields', 'fee_recipient_addresses'], mainNetworkRelayerInfo) || [];
- relayer.takerAddresses = R.path(['static_order_fields', 'taker_addresses'], mainNetworkRelayerInfo) || [];
- } else {
- relayer.feeRecipientAddresses = [];
- relayer.takerAddresses = [];
- }
- return relayer;
-}
-
-function getMainNetwork(relayerResp: RelayerResponse): RelayerResponseNetwork | undefined {
- return R.find(network => network.networkId === 1, relayerResp.networks);
-}
diff --git a/packages/pipeline/src/parsers/sra_orders/index.ts b/packages/pipeline/src/parsers/sra_orders/index.ts
deleted file mode 100644
index 13fe632a4..000000000
--- a/packages/pipeline/src/parsers/sra_orders/index.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { APIOrder, OrdersResponse } from '@0x/connect';
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { AssetProxyId, ERC721AssetData } from '@0x/types';
-import * as R from 'ramda';
-
-import { SraOrder } from '../../entities';
-import { bigNumbertoStringOrNull, convertAssetProxyIdToType } from '../../utils';
-
-/**
- * Parses a raw order response from an SRA endpoint and returns an array of
- * SraOrder entities.
- * @param rawOrdersResponse A raw order response from an SRA endpoint.
- */
-export function parseSraOrders(rawOrdersResponse: OrdersResponse): SraOrder[] {
- return R.map(_convertToEntity, rawOrdersResponse.records);
-}
-
-/**
- * Converts a single APIOrder into an SraOrder entity.
- * @param apiOrder A single order from the response from an SRA endpoint.
- */
-export function _convertToEntity(apiOrder: APIOrder): SraOrder {
- // TODO(albrow): refactor out common asset data decoding code.
- const makerAssetData = assetDataUtils.decodeAssetDataOrThrow(apiOrder.order.makerAssetData);
- const takerAssetData = assetDataUtils.decodeAssetDataOrThrow(apiOrder.order.takerAssetData);
-
- const sraOrder = new SraOrder();
- sraOrder.exchangeAddress = apiOrder.order.exchangeAddress;
- sraOrder.orderHashHex = orderHashUtils.getOrderHashHex(apiOrder.order);
-
- sraOrder.makerAddress = apiOrder.order.makerAddress;
- sraOrder.takerAddress = apiOrder.order.takerAddress;
- sraOrder.feeRecipientAddress = apiOrder.order.feeRecipientAddress;
- sraOrder.senderAddress = apiOrder.order.senderAddress;
- sraOrder.makerAssetAmount = apiOrder.order.makerAssetAmount;
- sraOrder.takerAssetAmount = apiOrder.order.takerAssetAmount;
- sraOrder.makerFee = apiOrder.order.makerFee;
- sraOrder.takerFee = apiOrder.order.takerFee;
- sraOrder.expirationTimeSeconds = apiOrder.order.expirationTimeSeconds;
- sraOrder.salt = apiOrder.order.salt;
- sraOrder.signature = apiOrder.order.signature;
-
- sraOrder.rawMakerAssetData = apiOrder.order.makerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- sraOrder.makerAssetType = convertAssetProxyIdToType(makerAssetData.assetProxyId as AssetProxyId);
- sraOrder.makerAssetProxyId = makerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- sraOrder.makerTokenAddress = assetDataUtils.isMultiAssetData(makerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(apiOrder.order.makerAssetData).nestedAssetData[0].tokenAddress
- : makerAssetData.tokenAddress;
- // tslint has a false positive here. Type assertion is required.
- // tslint:disable-next-line:no-unnecessary-type-assertion
- sraOrder.makerTokenId = bigNumbertoStringOrNull((makerAssetData as ERC721AssetData).tokenId);
- sraOrder.rawTakerAssetData = apiOrder.order.takerAssetData;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- sraOrder.takerAssetType = convertAssetProxyIdToType(takerAssetData.assetProxyId as AssetProxyId);
- sraOrder.takerAssetProxyId = takerAssetData.assetProxyId;
- // HACK(abandeali1): this event schema currently does not support multiple maker/taker assets, so we store the first token address from the MultiAssetProxy assetData
- sraOrder.takerTokenAddress = assetDataUtils.isMultiAssetData(takerAssetData)
- ? assetDataUtils.decodeMultiAssetDataRecursively(apiOrder.order.takerAssetData).nestedAssetData[0].tokenAddress
- : takerAssetData.tokenAddress;
- // tslint:disable-next-line:no-unnecessary-type-assertion
- sraOrder.takerTokenId = bigNumbertoStringOrNull((takerAssetData as ERC721AssetData).tokenId);
-
- sraOrder.metadataJson = JSON.stringify(apiOrder.metaData);
-
- return sraOrder;
-}
diff --git a/packages/pipeline/src/parsers/token_metadata/index.ts b/packages/pipeline/src/parsers/token_metadata/index.ts
deleted file mode 100644
index 65e0aaa6e..000000000
--- a/packages/pipeline/src/parsers/token_metadata/index.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import * as R from 'ramda';
-
-import { MetamaskTrustedTokenMeta, ZeroExTrustedTokenMeta } from '../../data_sources/trusted_tokens';
-import { TokenMetadata } from '../../entities';
-import { toBigNumberOrNull } from '../../utils';
-
-/**
- * Parses Metamask's trusted tokens list.
- * @param rawResp raw response from the metamask json file.
- */
-export function parseMetamaskTrustedTokens(rawResp: Map<string, MetamaskTrustedTokenMeta>): TokenMetadata[] {
- const parsedAsObject = R.mapObjIndexed(parseMetamaskTrustedToken, rawResp);
- return R.values(parsedAsObject);
-}
-
-/**
- * Parses 0x's trusted tokens list.
- * @param rawResp raw response from the 0x trusted tokens file.
- */
-export function parseZeroExTrustedTokens(rawResp: ZeroExTrustedTokenMeta[]): TokenMetadata[] {
- return R.map(parseZeroExTrustedToken, rawResp);
-}
-
-function parseMetamaskTrustedToken(resp: MetamaskTrustedTokenMeta, address: string): TokenMetadata {
- const trustedToken = new TokenMetadata();
-
- trustedToken.address = address;
- trustedToken.decimals = toBigNumberOrNull(resp.decimals);
- trustedToken.symbol = resp.symbol;
- trustedToken.name = resp.name;
- trustedToken.authority = 'metamask';
-
- return trustedToken;
-}
-
-function parseZeroExTrustedToken(resp: ZeroExTrustedTokenMeta): TokenMetadata {
- const trustedToken = new TokenMetadata();
-
- trustedToken.address = resp.address;
- trustedToken.decimals = toBigNumberOrNull(resp.decimals);
- trustedToken.symbol = resp.symbol;
- trustedToken.name = resp.name;
- trustedToken.authority = '0x';
-
- return trustedToken;
-}
diff --git a/packages/pipeline/src/parsers/utils.ts b/packages/pipeline/src/parsers/utils.ts
deleted file mode 100644
index 860729e9f..000000000
--- a/packages/pipeline/src/parsers/utils.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { BigNumber } from '@0x/utils';
-
-export interface GenericRawOrder {
- price: string;
- amount: string;
-}
-
-/**
- * Aggregates individual orders by price point. Filters zero amount orders.
- * @param rawOrders An array of objects that have price and amount information.
- */
-export function aggregateOrders(rawOrders: GenericRawOrder[]): Array<[string, BigNumber]> {
- const aggregatedOrders = new Map<string, BigNumber>();
- rawOrders.forEach(order => {
- const amount = new BigNumber(order.amount);
- if (amount.isZero()) {
- return;
- }
- // Use string instead of BigNum to aggregate by value instead of variable.
- // Convert to BigNumber first to consolidate different string
- // representations of the same number. Eg. '0.0' and '0.00'.
- const price = new BigNumber(order.price).toString();
-
- const existingAmount = aggregatedOrders.get(price) || new BigNumber(0);
- aggregatedOrders.set(price, amount.plus(existingAmount));
- });
- return Array.from(aggregatedOrders.entries());
-}
diff --git a/packages/pipeline/src/parsers/web3/index.ts b/packages/pipeline/src/parsers/web3/index.ts
deleted file mode 100644
index f986efc59..000000000
--- a/packages/pipeline/src/parsers/web3/index.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { BlockWithoutTransactionData, Transaction as EthTransaction } from 'ethereum-types';
-
-import { Block, Transaction } from '../../entities';
-
-const MILLISECONDS_PER_SECOND = 1000;
-
-/**
- * Parses a raw block and returns a Block entity.
- * @param rawBlock a raw block (e.g. returned from web3-wrapper).
- */
-export function parseBlock(rawBlock: BlockWithoutTransactionData): Block {
- if (rawBlock.hash == null) {
- throw new Error('Tried to parse raw block but hash was null');
- }
- if (rawBlock.number == null) {
- throw new Error('Tried to parse raw block but number was null');
- }
-
- const block = new Block();
- block.hash = rawBlock.hash;
- block.number = rawBlock.number;
- // Block timestamps are in seconds, but we use milliseconds everywhere else.
- block.timestamp = rawBlock.timestamp * MILLISECONDS_PER_SECOND;
- return block;
-}
-
-/**
- * Parses a raw transaction and returns a Transaction entity.
- * @param rawBlock a raw transaction (e.g. returned from web3-wrapper).
- */
-export function parseTransaction(rawTransaction: EthTransaction): Transaction {
- if (rawTransaction.blockHash == null) {
- throw new Error('Tried to parse raw transaction but blockHash was null');
- }
- if (rawTransaction.blockNumber == null) {
- throw new Error('Tried to parse raw transaction but blockNumber was null');
- }
-
- const tx = new Transaction();
- tx.transactionHash = rawTransaction.hash;
- tx.blockHash = rawTransaction.blockHash;
- tx.blockNumber = rawTransaction.blockNumber;
-
- tx.gasUsed = new BigNumber(rawTransaction.gas);
- tx.gasPrice = rawTransaction.gasPrice;
-
- return tx;
-}
diff --git a/packages/pipeline/src/scripts/pull_competing_dex_trades.ts b/packages/pipeline/src/scripts/pull_competing_dex_trades.ts
deleted file mode 100644
index 14644bb2e..000000000
--- a/packages/pipeline/src/scripts/pull_competing_dex_trades.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection, Repository } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { BloxySource } from '../data_sources/bloxy';
-import { DexTrade } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseBloxyTrades } from '../parsers/bloxy';
-import { handleError } from '../utils';
-
-// Number of trades to save at once.
-const BATCH_SAVE_SIZE = 1000;
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- await getAndSaveTradesAsync();
- process.exit(0);
-})().catch(handleError);
-
-async function getAndSaveTradesAsync(): Promise<void> {
- const apiKey = process.env.BLOXY_API_KEY;
- if (apiKey === undefined) {
- throw new Error('Missing required env var: BLOXY_API_KEY');
- }
- const bloxySource = new BloxySource(apiKey);
- const tradesRepository = connection.getRepository(DexTrade);
- const lastSeenTimestamp = await getLastSeenTimestampAsync(tradesRepository);
- logUtils.log(`Last seen timestamp: ${lastSeenTimestamp === 0 ? 'none' : lastSeenTimestamp}`);
- logUtils.log('Getting latest dex trades...');
- const rawTrades = await bloxySource.getDexTradesAsync(lastSeenTimestamp);
- logUtils.log(`Parsing ${rawTrades.length} trades...`);
- const trades = parseBloxyTrades(rawTrades);
- logUtils.log(`Saving ${trades.length} trades...`);
- await tradesRepository.save(trades, { chunk: Math.ceil(trades.length / BATCH_SAVE_SIZE) });
- logUtils.log('Done saving trades.');
-}
-
-async function getLastSeenTimestampAsync(tradesRepository: Repository<DexTrade>): Promise<number> {
- if ((await tradesRepository.count()) === 0) {
- return 0;
- }
- const response = (await connection.query(
- 'SELECT tx_timestamp FROM raw.dex_trades ORDER BY tx_timestamp DESC LIMIT 1',
- )) as Array<{ tx_timestamp: number }>;
- if (response.length === 0) {
- return 0;
- }
- return response[0].tx_timestamp;
-}
diff --git a/packages/pipeline/src/scripts/pull_copper.ts b/packages/pipeline/src/scripts/pull_copper.ts
deleted file mode 100644
index 5e4a6a643..000000000
--- a/packages/pipeline/src/scripts/pull_copper.ts
+++ /dev/null
@@ -1,130 +0,0 @@
-import * as R from 'ramda';
-import { Connection, ConnectionOptions, createConnection, Repository } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { CopperEndpoint, CopperSearchParams, CopperSource } from '../data_sources/copper';
-import { CopperActivity, CopperActivityType, CopperCustomField, CopperLead, CopperOpportunity } from '../entities';
-import * as ormConfig from '../ormconfig';
-import {
- CopperSearchResponse,
- parseActivities,
- parseActivityTypes,
- parseCustomFields,
- parseLeads,
- parseOpportunities,
-} from '../parsers/copper';
-import { handleError } from '../utils';
-const ONE_SECOND = 1000;
-const COPPER_RATE_LIMIT = 10;
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
-
- const accessToken = process.env.COPPER_ACCESS_TOKEN;
- const userEmail = process.env.COPPER_USER_EMAIL;
- if (accessToken === undefined || userEmail === undefined) {
- throw new Error('Missing required env var: COPPER_ACCESS_TOKEN and/or COPPER_USER_EMAIL');
- }
- const source = new CopperSource(COPPER_RATE_LIMIT, accessToken, userEmail);
-
- const fetchPromises = [
- fetchAndSaveLeadsAsync(source),
- fetchAndSaveOpportunitiesAsync(source),
- fetchAndSaveActivitiesAsync(source),
- fetchAndSaveCustomFieldsAsync(source),
- fetchAndSaveActivityTypesAsync(source),
- ];
- fetchPromises.forEach(async fn => {
- await fn;
- });
-})().catch(handleError);
-
-async function fetchAndSaveLeadsAsync(source: CopperSource): Promise<void> {
- const repository = connection.getRepository(CopperLead);
- const startTime = await getMaxAsync(connection, 'date_modified', 'raw.copper_leads');
- logUtils.log(`Fetching Copper leads starting from ${startTime}...`);
- await fetchAndSaveAsync(CopperEndpoint.Leads, source, startTime, {}, parseLeads, repository);
-}
-
-async function fetchAndSaveOpportunitiesAsync(source: CopperSource): Promise<void> {
- const repository = connection.getRepository(CopperOpportunity);
- const startTime = await getMaxAsync(connection, 'date_modified', 'raw.copper_opportunities');
- logUtils.log(`Fetching Copper opportunities starting from ${startTime}...`);
- await fetchAndSaveAsync(
- CopperEndpoint.Opportunities,
- source,
- startTime,
- { sort_by: 'name' },
- parseOpportunities,
- repository,
- );
-}
-
-async function fetchAndSaveActivitiesAsync(source: CopperSource): Promise<void> {
- const repository = connection.getRepository(CopperActivity);
- const startTime = await getMaxAsync(connection, 'date_modified', 'raw.copper_activities');
- const searchParams = {
- minimum_activity_date: Math.floor(startTime / ONE_SECOND),
- };
- logUtils.log(`Fetching Copper activities starting from ${startTime}...`);
- await fetchAndSaveAsync(CopperEndpoint.Activities, source, startTime, searchParams, parseActivities, repository);
-}
-
-async function getMaxAsync(conn: Connection, sortColumn: string, tableName: string): Promise<number> {
- const queryResult = await conn.query(`SELECT MAX(${sortColumn}) as _max from ${tableName};`);
- if (R.isEmpty(queryResult)) {
- return 0;
- } else {
- return queryResult[0]._max;
- }
-}
-
-// (Xianny): Copper API doesn't allow queries to filter by date. To ensure that we are filling in ascending chronological
-// order and not missing any records, we are scraping all available pages. If Copper data gets larger,
-// it would make sense to search for and start filling from the first page that contains a new record.
-// This search would increase our network calls and is not efficient to implement with our current small volume
-// of Copper records.
-async function fetchAndSaveAsync<T extends CopperSearchResponse, E>(
- endpoint: CopperEndpoint,
- source: CopperSource,
- startTime: number,
- searchParams: CopperSearchParams,
- parseFn: (recs: T[]) => E[],
- repository: Repository<E>,
-): Promise<void> {
- let saved = 0;
- const numPages = await source.fetchNumberOfPagesAsync(endpoint);
- try {
- for (let i = numPages; i > 0; i--) {
- logUtils.log(`Fetching page ${i}/${numPages} of ${endpoint}...`);
- const raw = await source.fetchSearchResultsAsync<T>(endpoint, {
- ...searchParams,
- page_number: i,
- });
- const newRecords = raw.filter(rec => rec.date_modified * ONE_SECOND > startTime);
- const parsed = parseFn(newRecords);
- await repository.save<any>(parsed);
- saved += newRecords.length;
- }
- } catch (err) {
- logUtils.log(`Error fetching ${endpoint}, stopping: ${err.stack}`);
- } finally {
- logUtils.log(`Saved ${saved} items from ${endpoint}, done.`);
- }
-}
-
-async function fetchAndSaveActivityTypesAsync(source: CopperSource): Promise<void> {
- logUtils.log(`Fetching Copper activity types...`);
- const activityTypes = await source.fetchActivityTypesAsync();
- const repository = connection.getRepository(CopperActivityType);
- await repository.save(parseActivityTypes(activityTypes));
-}
-
-async function fetchAndSaveCustomFieldsAsync(source: CopperSource): Promise<void> {
- logUtils.log(`Fetching Copper custom fields...`);
- const customFields = await source.fetchCustomFieldsAsync();
- const repository = connection.getRepository(CopperCustomField);
- await repository.save(parseCustomFields(customFields));
-}
diff --git a/packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts b/packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts
deleted file mode 100644
index 4e00f258f..000000000
--- a/packages/pipeline/src/scripts/pull_ddex_orderbook_snapshots.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as R from 'ramda';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { DDEX_SOURCE, DdexMarket, DdexSource } from '../data_sources/ddex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseDdexOrders } from '../parsers/ddex_orders';
-import { handleError } from '../utils';
-
-// Number of orders to save at once.
-const BATCH_SAVE_SIZE = 1000;
-
-// Number of markets to retrieve orderbooks for at once.
-const MARKET_ORDERBOOK_REQUEST_BATCH_SIZE = 50;
-
-// Delay between market orderbook requests.
-const MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY = 5000;
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const ddexSource = new DdexSource();
- const markets = await ddexSource.getActiveMarketsAsync();
- for (const marketsChunk of R.splitEvery(MARKET_ORDERBOOK_REQUEST_BATCH_SIZE, markets)) {
- await Promise.all(
- marketsChunk.map(async (market: DdexMarket) => getAndSaveMarketOrderbookAsync(ddexSource, market)),
- );
- await new Promise<void>(resolve => setTimeout(resolve, MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY));
- }
- process.exit(0);
-})().catch(handleError);
-
-/**
- * Retrieve orderbook from Ddex API for a given market. Parse orders and insert
- * them into our database.
- * @param ddexSource Data source which can query Ddex API.
- * @param market Object from Ddex API containing market data.
- */
-async function getAndSaveMarketOrderbookAsync(ddexSource: DdexSource, market: DdexMarket): Promise<void> {
- const orderBook = await ddexSource.getMarketOrderbookAsync(market.id);
- const observedTimestamp = Date.now();
-
- logUtils.log(`${market.id}: Parsing orders.`);
- const orders = parseDdexOrders(orderBook, market, observedTimestamp, DDEX_SOURCE);
-
- if (orders.length > 0) {
- logUtils.log(`${market.id}: Saving ${orders.length} orders.`);
- const TokenOrderRepository = connection.getRepository(TokenOrder);
- await TokenOrderRepository.save(orders, { chunk: Math.ceil(orders.length / BATCH_SAVE_SIZE) });
- } else {
- logUtils.log(`${market.id}: 0 orders to save.`);
- }
-}
diff --git a/packages/pipeline/src/scripts/pull_erc20_events.ts b/packages/pipeline/src/scripts/pull_erc20_events.ts
deleted file mode 100644
index bd520c610..000000000
--- a/packages/pipeline/src/scripts/pull_erc20_events.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses';
-import { web3Factory } from '@0x/dev-utils';
-import { Web3ProviderEngine } from '@0x/subproviders';
-import { logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { ERC20EventsSource } from '../data_sources/contract-wrappers/erc20_events';
-import { ERC20ApprovalEvent } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseERC20ApprovalEvents } from '../parsers/events';
-import { handleError, INFURA_ROOT_URL } from '../utils';
-
-const NETWORK_ID = 1;
-const START_BLOCK_OFFSET = 100; // Number of blocks before the last known block to consider when updating fill events.
-const BATCH_SAVE_SIZE = 1000; // Number of events to save at once.
-const BLOCK_FINALITY_THRESHOLD = 10; // When to consider blocks as final. Used to compute default endBlock.
-
-let connection: Connection;
-
-interface Token {
- // name is used for logging only.
- name: string;
- address: string;
- defaultStartBlock: number;
-}
-
-const tokensToGetApprovalEvents: Token[] = [
- {
- name: 'WETH',
- address: getContractAddressesForNetworkOrThrow(NETWORK_ID).etherToken,
- defaultStartBlock: 4719568, // Block when the WETH contract was deployed.
- },
- {
- name: 'ZRX',
- address: getContractAddressesForNetworkOrThrow(NETWORK_ID).zrxToken,
- defaultStartBlock: 4145415, // Block when the ZRX contract was deployed.
- },
- {
- name: 'DAI',
- address: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
- defaultStartBlock: 4752008, // Block when the DAI contract was deployed.
- },
-];
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const provider = web3Factory.getRpcProvider({
- rpcUrl: INFURA_ROOT_URL,
- });
- const endBlock = await calculateEndBlockAsync(provider);
- for (const token of tokensToGetApprovalEvents) {
- await getAndSaveApprovalEventsAsync(provider, token, endBlock);
- }
- process.exit(0);
-})().catch(handleError);
-
-async function getAndSaveApprovalEventsAsync(
- provider: Web3ProviderEngine,
- token: Token,
- endBlock: number,
-): Promise<void> {
- logUtils.log(`Getting approval events for ${token.name}...`);
- logUtils.log('Checking existing approval events...');
- const repository = connection.getRepository(ERC20ApprovalEvent);
- const startBlock = (await getStartBlockAsync(token)) || token.defaultStartBlock;
-
- logUtils.log(`Getting approval events starting at ${startBlock}...`);
- const eventsSource = new ERC20EventsSource(provider, NETWORK_ID, token.address);
- const eventLogs = await eventsSource.getApprovalEventsAsync(startBlock, endBlock);
-
- logUtils.log(`Parsing ${eventLogs.length} approval events...`);
- const events = parseERC20ApprovalEvents(eventLogs);
- logUtils.log(`Retrieved and parsed ${events.length} total approval events.`);
- await repository.save(events, { chunk: Math.ceil(events.length / BATCH_SAVE_SIZE) });
-}
-
-async function calculateEndBlockAsync(provider: Web3ProviderEngine): Promise<number> {
- const web3Wrapper = new Web3Wrapper(provider);
- const currentBlock = await web3Wrapper.getBlockNumberAsync();
- return currentBlock - BLOCK_FINALITY_THRESHOLD;
-}
-
-async function getStartBlockAsync(token: Token): Promise<number | null> {
- const queryResult = await connection.query(
- `SELECT block_number FROM raw.erc20_approval_events WHERE token_address = $1 ORDER BY block_number DESC LIMIT 1`,
- [token.address],
- );
- if (queryResult.length === 0) {
- logUtils.log(`No existing approval events found for ${token.name}.`);
- return null;
- }
- const lastKnownBlock = queryResult[0].block_number;
- return lastKnownBlock - START_BLOCK_OFFSET;
-}
diff --git a/packages/pipeline/src/scripts/pull_exchange_events.ts b/packages/pipeline/src/scripts/pull_exchange_events.ts
deleted file mode 100644
index f8ce4038d..000000000
--- a/packages/pipeline/src/scripts/pull_exchange_events.ts
+++ /dev/null
@@ -1,146 +0,0 @@
-import { web3Factory } from '@0x/dev-utils';
-import { Web3ProviderEngine } from '@0x/subproviders';
-import { logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import R = require('ramda');
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection, Repository } from 'typeorm';
-
-import { ExchangeEventsSource } from '../data_sources/contract-wrappers/exchange_events';
-import { ExchangeCancelEvent, ExchangeCancelUpToEvent, ExchangeEvent, ExchangeFillEvent } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseExchangeCancelEvents, parseExchangeCancelUpToEvents, parseExchangeFillEvents } from '../parsers/events';
-import { EXCHANGE_START_BLOCK, handleError, INFURA_ROOT_URL } from '../utils';
-
-const START_BLOCK_OFFSET = 100; // Number of blocks before the last known block to consider when updating fill events.
-const BATCH_SAVE_SIZE = 1000; // Number of events to save at once.
-const BLOCK_FINALITY_THRESHOLD = 10; // When to consider blocks as final. Used to compute default endBlock.
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const provider = web3Factory.getRpcProvider({
- rpcUrl: INFURA_ROOT_URL,
- });
- const endBlock = await calculateEndBlockAsync(provider);
- const eventsSource = new ExchangeEventsSource(provider, 1);
- await getFillEventsAsync(eventsSource, endBlock);
- await getCancelEventsAsync(eventsSource, endBlock);
- await getCancelUpToEventsAsync(eventsSource, endBlock);
- process.exit(0);
-})().catch(handleError);
-
-async function getFillEventsAsync(eventsSource: ExchangeEventsSource, endBlock: number): Promise<void> {
- logUtils.log('Checking existing fill events...');
- const repository = connection.getRepository(ExchangeFillEvent);
- const startBlock = await getStartBlockAsync(repository);
- logUtils.log(`Getting fill events starting at ${startBlock}...`);
- const eventLogs = await eventsSource.getFillEventsAsync(startBlock, endBlock);
- logUtils.log('Parsing fill events...');
- const events = parseExchangeFillEvents(eventLogs);
- logUtils.log(`Retrieved and parsed ${events.length} total fill events.`);
- await saveEventsAsync(startBlock === EXCHANGE_START_BLOCK, repository, events);
-}
-
-async function getCancelEventsAsync(eventsSource: ExchangeEventsSource, endBlock: number): Promise<void> {
- logUtils.log('Checking existing cancel events...');
- const repository = connection.getRepository(ExchangeCancelEvent);
- const startBlock = await getStartBlockAsync(repository);
- logUtils.log(`Getting cancel events starting at ${startBlock}...`);
- const eventLogs = await eventsSource.getCancelEventsAsync(startBlock, endBlock);
- logUtils.log('Parsing cancel events...');
- const events = parseExchangeCancelEvents(eventLogs);
- logUtils.log(`Retrieved and parsed ${events.length} total cancel events.`);
- await saveEventsAsync(startBlock === EXCHANGE_START_BLOCK, repository, events);
-}
-
-async function getCancelUpToEventsAsync(eventsSource: ExchangeEventsSource, endBlock: number): Promise<void> {
- logUtils.log('Checking existing CancelUpTo events...');
- const repository = connection.getRepository(ExchangeCancelUpToEvent);
- const startBlock = await getStartBlockAsync(repository);
- logUtils.log(`Getting CancelUpTo events starting at ${startBlock}...`);
- const eventLogs = await eventsSource.getCancelUpToEventsAsync(startBlock, endBlock);
- logUtils.log('Parsing CancelUpTo events...');
- const events = parseExchangeCancelUpToEvents(eventLogs);
- logUtils.log(`Retrieved and parsed ${events.length} total CancelUpTo events.`);
- await saveEventsAsync(startBlock === EXCHANGE_START_BLOCK, repository, events);
-}
-
-const tableNameRegex = /^[a-zA-Z_]*$/;
-
-async function getStartBlockAsync<T extends ExchangeEvent>(repository: Repository<T>): Promise<number> {
- const fillEventCount = await repository.count();
- if (fillEventCount === 0) {
- logUtils.log(`No existing ${repository.metadata.name}s found.`);
- return EXCHANGE_START_BLOCK;
- }
- const tableName = repository.metadata.tableName;
- if (!tableNameRegex.test(tableName)) {
- throw new Error(`Unexpected special character in table name: ${tableName}`);
- }
- const queryResult = await connection.query(
- `SELECT block_number FROM raw.${tableName} ORDER BY block_number DESC LIMIT 1`,
- );
- const lastKnownBlock = queryResult[0].block_number;
- return lastKnownBlock - START_BLOCK_OFFSET;
-}
-
-async function saveEventsAsync<T extends ExchangeEvent>(
- isInitialPull: boolean,
- repository: Repository<T>,
- events: T[],
-): Promise<void> {
- logUtils.log(`Saving ${repository.metadata.name}s...`);
- if (isInitialPull) {
- // Split data into numChunks pieces of maximum size BATCH_SAVE_SIZE
- // each.
- for (const eventsBatch of R.splitEvery(BATCH_SAVE_SIZE, events)) {
- await repository.insert(eventsBatch);
- }
- } else {
- // If we possibly have some overlap where we need to update some
- // existing events, we need to use our workaround/fallback.
- await saveIndividuallyWithFallbackAsync(repository, events);
- }
- const totalEvents = await repository.count();
- logUtils.log(`Done saving events. There are now ${totalEvents} total ${repository.metadata.name}s.`);
-}
-
-async function saveIndividuallyWithFallbackAsync<T extends ExchangeEvent>(
- repository: Repository<T>,
- events: T[],
-): Promise<void> {
- // Note(albrow): This is a temporary hack because `save` is not working as
- // documented and is causing a foreign key constraint violation. Hopefully
- // can remove later because this "poor man's upsert" implementation operates
- // on one event at a time and is therefore much slower.
- for (const event of events) {
- try {
- // First try an insert.
- await repository.insert(event);
- } catch {
- // If it fails, assume it was a foreign key constraint error and try
- // doing an update instead.
- // Note(albrow): Unfortunately the `as any` hack here seems
- // required. I can't figure out how to convince the type-checker
- // that the criteria and the entity itself are the correct type for
- // the given repository. If we can remove the `save` hack then this
- // will probably no longer be necessary.
- await repository.update(
- {
- contractAddress: event.contractAddress,
- blockNumber: event.blockNumber,
- logIndex: event.logIndex,
- } as any,
- event as any,
- );
- }
- }
-}
-
-async function calculateEndBlockAsync(provider: Web3ProviderEngine): Promise<number> {
- const web3Wrapper = new Web3Wrapper(provider);
- const currentBlock = await web3Wrapper.getBlockNumberAsync();
- return currentBlock - BLOCK_FINALITY_THRESHOLD;
-}
diff --git a/packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts b/packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts
deleted file mode 100644
index 490b17766..000000000
--- a/packages/pipeline/src/scripts/pull_idex_orderbook_snapshots.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as R from 'ramda';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { IDEX_SOURCE, IdexSource } from '../data_sources/idex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseIdexOrders } from '../parsers/idex_orders';
-import { handleError } from '../utils';
-
-// Number of orders to save at once.
-const BATCH_SAVE_SIZE = 1000;
-
-// Number of markets to retrieve orderbooks for at once.
-const MARKET_ORDERBOOK_REQUEST_BATCH_SIZE = 100;
-
-// Delay between market orderbook requests.
-const MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY = 2000;
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const idexSource = new IdexSource();
- logUtils.log('Getting all IDEX markets');
- const markets = await idexSource.getMarketsAsync();
- logUtils.log(`Got ${markets.length} markets.`);
- for (const marketsChunk of R.splitEvery(MARKET_ORDERBOOK_REQUEST_BATCH_SIZE, markets)) {
- await Promise.all(
- marketsChunk.map(async (marketId: string) => getAndSaveMarketOrderbookAsync(idexSource, marketId)),
- );
- await new Promise<void>(resolve => setTimeout(resolve, MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY));
- }
- process.exit(0);
-})().catch(handleError);
-
-/**
- * Retrieve orderbook from Idex API for a given market. Parse orders and insert
- * them into our database.
- * @param idexSource Data source which can query Idex API.
- * @param marketId String representing market of interest, eg. 'ETH_TIC'.
- */
-async function getAndSaveMarketOrderbookAsync(idexSource: IdexSource, marketId: string): Promise<void> {
- logUtils.log(`${marketId}: Retrieving orderbook.`);
- const orderBook = await idexSource.getMarketOrderbookAsync(marketId);
- const observedTimestamp = Date.now();
-
- if (!R.has('bids', orderBook) || !R.has('asks', orderBook)) {
- logUtils.warn(`${marketId}: Orderbook faulty.`);
- return;
- }
-
- logUtils.log(`${marketId}: Parsing orders.`);
- const orders = parseIdexOrders(orderBook, observedTimestamp, IDEX_SOURCE);
-
- if (orders.length > 0) {
- logUtils.log(`${marketId}: Saving ${orders.length} orders.`);
- const TokenOrderRepository = connection.getRepository(TokenOrder);
- await TokenOrderRepository.save(orders, { chunk: Math.ceil(orders.length / BATCH_SAVE_SIZE) });
- } else {
- logUtils.log(`${marketId}: 0 orders to save.`);
- }
-}
diff --git a/packages/pipeline/src/scripts/pull_missing_blocks.ts b/packages/pipeline/src/scripts/pull_missing_blocks.ts
deleted file mode 100644
index 345ea38fe..000000000
--- a/packages/pipeline/src/scripts/pull_missing_blocks.ts
+++ /dev/null
@@ -1,91 +0,0 @@
-import { web3Factory } from '@0x/dev-utils';
-import { logUtils } from '@0x/utils';
-
-import * as Parallel from 'async-parallel';
-import R = require('ramda');
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection, Repository } from 'typeorm';
-
-import { Web3Source } from '../data_sources/web3';
-import { Block } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseBlock } from '../parsers/web3';
-import { handleError, INFURA_ROOT_URL } from '../utils';
-
-// Number of blocks to save at once.
-const BATCH_SAVE_SIZE = 1000;
-// Maximum number of requests to send at once.
-const MAX_CONCURRENCY = 20;
-// Maximum number of blocks to query for at once. This is also the maximum
-// number of blocks we will hold in memory prior to being saved to the database.
-const MAX_BLOCKS_PER_QUERY = 1000;
-
-let connection: Connection;
-
-const tablesWithMissingBlocks = [
- 'raw.exchange_fill_events',
- 'raw.exchange_cancel_events',
- 'raw.exchange_cancel_up_to_events',
- 'raw.erc20_approval_events',
-];
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const provider = web3Factory.getRpcProvider({
- rpcUrl: INFURA_ROOT_URL,
- });
- const web3Source = new Web3Source(provider);
- for (const tableName of tablesWithMissingBlocks) {
- await getAllMissingBlocksAsync(web3Source, tableName);
- }
- process.exit(0);
-})().catch(handleError);
-
-interface MissingBlocksResponse {
- block_number: string;
-}
-
-async function getAllMissingBlocksAsync(web3Source: Web3Source, tableName: string): Promise<void> {
- const blocksRepository = connection.getRepository(Block);
- while (true) {
- logUtils.log(`Checking for missing blocks in ${tableName}...`);
- const blockNumbers = await getMissingBlockNumbersAsync(tableName);
- if (blockNumbers.length === 0) {
- // There are no more missing blocks. We're done.
- break;
- }
- await getAndSaveBlocksAsync(web3Source, blocksRepository, blockNumbers);
- }
- const totalBlocks = await blocksRepository.count();
- logUtils.log(`Done saving blocks for ${tableName}. There are now ${totalBlocks} total blocks.`);
-}
-
-async function getMissingBlockNumbersAsync(tableName: string): Promise<number[]> {
- // This query returns up to `MAX_BLOCKS_PER_QUERY` distinct block numbers
- // which are present in `tableName` but not in `raw.blocks`.
- const response = (await connection.query(
- `SELECT DISTINCT(block_number) FROM ${tableName} LEFT JOIN raw.blocks ON ${tableName}.block_number = raw.blocks.number WHERE number IS NULL LIMIT $1;`,
- [MAX_BLOCKS_PER_QUERY],
- )) as MissingBlocksResponse[];
- const blockNumberStrings = R.pluck('block_number', response);
- const blockNumbers = R.map(parseInt, blockNumberStrings);
- logUtils.log(`Found ${blockNumbers.length} missing blocks.`);
- return blockNumbers;
-}
-
-async function getAndSaveBlocksAsync(
- web3Source: Web3Source,
- blocksRepository: Repository<Block>,
- blockNumbers: number[],
-): Promise<void> {
- logUtils.log(`Getting block data for ${blockNumbers.length} blocks...`);
- Parallel.setConcurrency(MAX_CONCURRENCY);
- const rawBlocks = await Parallel.map(blockNumbers, async (blockNumber: number) =>
- web3Source.getBlockInfoAsync(blockNumber),
- );
- logUtils.log(`Parsing ${rawBlocks.length} blocks...`);
- const blocks = R.map(parseBlock, rawBlocks);
- logUtils.log(`Saving ${blocks.length} blocks...`);
- await blocksRepository.save(blocks, { chunk: Math.ceil(blocks.length / BATCH_SAVE_SIZE) });
- logUtils.log('Done saving this batch of blocks');
-}
diff --git a/packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts b/packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts
deleted file mode 100644
index c4dcf6c83..000000000
--- a/packages/pipeline/src/scripts/pull_oasis_orderbook_snapshots.ts
+++ /dev/null
@@ -1,58 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as R from 'ramda';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { OASIS_SOURCE, OasisMarket, OasisSource } from '../data_sources/oasis';
-import { TokenOrderbookSnapshot as TokenOrder } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseOasisOrders } from '../parsers/oasis_orders';
-import { handleError } from '../utils';
-
-// Number of orders to save at once.
-const BATCH_SAVE_SIZE = 1000;
-
-// Number of markets to retrieve orderbooks for at once.
-const MARKET_ORDERBOOK_REQUEST_BATCH_SIZE = 50;
-
-// Delay between market orderbook requests.
-const MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY = 1000;
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const oasisSource = new OasisSource();
- logUtils.log('Getting all active Oasis markets');
- const markets = await oasisSource.getActiveMarketsAsync();
- logUtils.log(`Got ${markets.length} markets.`);
- for (const marketsChunk of R.splitEvery(MARKET_ORDERBOOK_REQUEST_BATCH_SIZE, markets)) {
- await Promise.all(
- marketsChunk.map(async (market: OasisMarket) => getAndSaveMarketOrderbookAsync(oasisSource, market)),
- );
- await new Promise<void>(resolve => setTimeout(resolve, MILLISEC_MARKET_ORDERBOOK_REQUEST_DELAY));
- }
- process.exit(0);
-})().catch(handleError);
-
-/**
- * Retrieve orderbook from Oasis API for a given market. Parse orders and insert
- * them into our database.
- * @param oasisSource Data source which can query Oasis API.
- * @param marketId String identifying market we want data for. eg. 'REPAUG'.
- */
-async function getAndSaveMarketOrderbookAsync(oasisSource: OasisSource, market: OasisMarket): Promise<void> {
- logUtils.log(`${market.id}: Retrieving orderbook.`);
- const orderBook = await oasisSource.getMarketOrderbookAsync(market.id);
- const observedTimestamp = Date.now();
-
- logUtils.log(`${market.id}: Parsing orders.`);
- const orders = parseOasisOrders(orderBook, market, observedTimestamp, OASIS_SOURCE);
-
- if (orders.length > 0) {
- logUtils.log(`${market.id}: Saving ${orders.length} orders.`);
- const TokenOrderRepository = connection.getRepository(TokenOrder);
- await TokenOrderRepository.save(orders, { chunk: Math.ceil(orders.length / BATCH_SAVE_SIZE) });
- } else {
- logUtils.log(`${market.id}: 0 orders to save.`);
- }
-}
diff --git a/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts b/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts
deleted file mode 100644
index caac7b9d4..000000000
--- a/packages/pipeline/src/scripts/pull_ohlcv_cryptocompare.ts
+++ /dev/null
@@ -1,96 +0,0 @@
-import { Connection, ConnectionOptions, createConnection, Repository } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { CryptoCompareOHLCVSource } from '../data_sources/ohlcv_external/crypto_compare';
-import { OHLCVExternal } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { OHLCVMetadata, parseRecords } from '../parsers/ohlcv_external/crypto_compare';
-import { handleError } from '../utils';
-import { fetchOHLCVTradingPairsAsync, TradingPair } from '../utils/get_ohlcv_trading_pairs';
-
-const SOURCE_NAME = 'CryptoCompare';
-const TWO_HOURS_AGO = new Date().getTime() - 2 * 60 * 60 * 1000; // tslint:disable-line:custom-no-magic-numbers
-
-const MAX_REQS_PER_SECOND = parseInt(process.env.CRYPTOCOMPARE_MAX_REQS_PER_SECOND || '15', 10); // tslint:disable-line:custom-no-magic-numbers
-const EARLIEST_BACKFILL_DATE = process.env.OHLCV_EARLIEST_BACKFILL_DATE || '2014-06-01';
-const EARLIEST_BACKFILL_TIME = new Date(EARLIEST_BACKFILL_DATE).getTime();
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const repository = connection.getRepository(OHLCVExternal);
- const source = new CryptoCompareOHLCVSource(MAX_REQS_PER_SECOND);
-
- const jobTime = new Date().getTime();
- const tradingPairs = await fetchOHLCVTradingPairsAsync(connection, SOURCE_NAME, EARLIEST_BACKFILL_TIME);
- logUtils.log(`Starting ${tradingPairs.length} job(s) to scrape Crypto Compare for OHLCV records...`);
-
- const fetchAndSavePromises = tradingPairs.map(async pair => {
- const pairs = source.generateBackfillIntervals(pair);
- return fetchAndSaveAsync(source, repository, jobTime, pairs);
- });
- await Promise.all(fetchAndSavePromises);
- logUtils.log(`Finished scraping OHLCV records from Crypto Compare, exiting...`);
- process.exit(0);
-})().catch(handleError);
-
-async function fetchAndSaveAsync(
- source: CryptoCompareOHLCVSource,
- repository: Repository<OHLCVExternal>,
- jobTime: number,
- pairs: TradingPair[],
-): Promise<void> {
- const sortAscTimestamp = (a: TradingPair, b: TradingPair): number => {
- if (a.latestSavedTime < b.latestSavedTime) {
- return -1;
- } else if (a.latestSavedTime > b.latestSavedTime) {
- return 1;
- } else {
- return 0;
- }
- };
- pairs.sort(sortAscTimestamp);
-
- let i = 0;
- while (i < pairs.length) {
- const pair = pairs[i];
- if (pair.latestSavedTime > TWO_HOURS_AGO) {
- break;
- }
- try {
- const records = await source.getHourlyOHLCVAsync(pair);
- logUtils.log(`Retrieved ${records.length} records for ${JSON.stringify(pair)}`);
- if (records.length > 0) {
- const metadata: OHLCVMetadata = {
- exchange: source.defaultExchange,
- fromSymbol: pair.fromSymbol,
- toSymbol: pair.toSymbol,
- source: SOURCE_NAME,
- observedTimestamp: jobTime,
- interval: source.intervalBetweenRecords,
- };
- const parsedRecords = parseRecords(records, metadata);
- await saveRecordsAsync(repository, parsedRecords);
- }
- i++;
- } catch (err) {
- logUtils.log(`Error scraping OHLCVRecords, stopping task for ${JSON.stringify(pair)} [${err}]`);
- break;
- }
- }
- return Promise.resolve();
-}
-
-async function saveRecordsAsync(repository: Repository<OHLCVExternal>, records: OHLCVExternal[]): Promise<void> {
- const metadata = [
- records[0].fromSymbol,
- records[0].toSymbol,
- new Date(records[0].startTime),
- new Date(records[records.length - 1].endTime),
- ];
-
- logUtils.log(`Saving ${records.length} records to ${repository.metadata.name}... ${JSON.stringify(metadata)}`);
- await repository.save(records);
-}
diff --git a/packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts b/packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts
deleted file mode 100644
index 34345f355..000000000
--- a/packages/pipeline/src/scripts/pull_paradex_orderbook_snapshots.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import { logUtils } from '@0x/utils';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import {
- PARADEX_SOURCE,
- ParadexActiveMarketsResponse,
- ParadexMarket,
- ParadexSource,
- ParadexTokenInfoResponse,
-} from '../data_sources/paradex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseParadexOrders } from '../parsers/paradex_orders';
-import { handleError } from '../utils';
-
-// Number of orders to save at once.
-const BATCH_SAVE_SIZE = 1000;
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- const apiKey = process.env.PARADEX_DATA_PIPELINE_API_KEY;
- if (apiKey === undefined) {
- throw new Error('Missing required env var: PARADEX_DATA_PIPELINE_API_KEY');
- }
- const paradexSource = new ParadexSource(apiKey);
- const markets = await paradexSource.getActiveMarketsAsync();
- const tokenInfoResponse = await paradexSource.getTokenInfoAsync();
- const extendedMarkets = addTokenAddresses(markets, tokenInfoResponse);
- await Promise.all(
- extendedMarkets.map(async (market: ParadexMarket) => getAndSaveMarketOrderbookAsync(paradexSource, market)),
- );
- process.exit(0);
-})().catch(handleError);
-
-/**
- * Extend the default ParadexMarket objects with token addresses.
- * @param markets An array of ParadexMarket objects.
- * @param tokenInfoResponse An array of ParadexTokenInfo containing the addresses.
- */
-function addTokenAddresses(
- markets: ParadexActiveMarketsResponse,
- tokenInfoResponse: ParadexTokenInfoResponse,
-): ParadexMarket[] {
- const symbolAddressMapping = new Map<string, string>();
- tokenInfoResponse.forEach(tokenInfo => symbolAddressMapping.set(tokenInfo.symbol, tokenInfo.address));
-
- markets.forEach((market: ParadexMarket) => {
- if (symbolAddressMapping.has(market.baseToken)) {
- market.baseTokenAddress = symbolAddressMapping.get(market.baseToken);
- } else {
- market.quoteTokenAddress = '';
- logUtils.warn(`${market.baseToken}: No address found.`);
- }
-
- if (symbolAddressMapping.has(market.quoteToken)) {
- market.quoteTokenAddress = symbolAddressMapping.get(market.quoteToken);
- } else {
- market.quoteTokenAddress = '';
- logUtils.warn(`${market.quoteToken}: No address found.`);
- }
- });
- return markets;
-}
-
-/**
- * Retrieve orderbook from Paradex API for a given market. Parse orders and insert
- * them into our database.
- * @param paradexSource Data source which can query the Paradex API.
- * @param market Object from the Paradex API with information about the market in question.
- */
-async function getAndSaveMarketOrderbookAsync(paradexSource: ParadexSource, market: ParadexMarket): Promise<void> {
- const paradexOrderbookResponse = await paradexSource.getMarketOrderbookAsync(market.symbol);
- const observedTimestamp = Date.now();
-
- logUtils.log(`${market.symbol}: Parsing orders.`);
- const orders = parseParadexOrders(paradexOrderbookResponse, market, observedTimestamp, PARADEX_SOURCE);
-
- if (orders.length > 0) {
- logUtils.log(`${market.symbol}: Saving ${orders.length} orders.`);
- const tokenOrderRepository = connection.getRepository(TokenOrder);
- await tokenOrderRepository.save(orders, { chunk: Math.ceil(orders.length / BATCH_SAVE_SIZE) });
- } else {
- logUtils.log(`${market.symbol}: 0 orders to save.`);
- }
-}
diff --git a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts b/packages/pipeline/src/scripts/pull_radar_relay_orders.ts
deleted file mode 100644
index 8e8720803..000000000
--- a/packages/pipeline/src/scripts/pull_radar_relay_orders.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { HttpClient } from '@0x/connect';
-import { logUtils } from '@0x/utils';
-
-import * as R from 'ramda';
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection, EntityManager } from 'typeorm';
-
-import { createObservedTimestampForOrder, SraOrder } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseSraOrders } from '../parsers/sra_orders';
-import { handleError } from '../utils';
-
-const RADAR_RELAY_URL = 'https://api.radarrelay.com/0x/v2';
-const ORDERS_PER_PAGE = 10000; // Number of orders to get per request.
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- await getOrderbookAsync();
- process.exit(0);
-})().catch(handleError);
-
-async function getOrderbookAsync(): Promise<void> {
- logUtils.log('Getting all orders...');
- const connectClient = new HttpClient(RADAR_RELAY_URL);
- const rawOrders = await connectClient.getOrdersAsync({
- perPage: ORDERS_PER_PAGE,
- });
- logUtils.log(`Got ${rawOrders.records.length} orders.`);
- logUtils.log('Parsing orders...');
- // Parse the sra orders, then add source url to each.
- const orders = R.pipe(
- parseSraOrders,
- R.map(setSourceUrl(RADAR_RELAY_URL)),
- )(rawOrders);
- // Save all the orders and update the observed time stamps in a single
- // transaction.
- logUtils.log('Saving orders and updating timestamps...');
- const observedTimestamp = Date.now();
- await connection.transaction(
- async (manager: EntityManager): Promise<void> => {
- for (const order of orders) {
- await manager.save(SraOrder, order);
- const orderObservation = createObservedTimestampForOrder(order, observedTimestamp);
- await manager.save(orderObservation);
- }
- },
- );
-}
-
-const sourceUrlProp = R.lensProp('sourceUrl');
-
-/**
- * Sets the source url for a single order. Returns a new order instead of
- * mutating the given one.
- */
-const setSourceUrl = R.curry(
- (sourceURL: string, order: SraOrder): SraOrder => {
- return R.set(sourceUrlProp, sourceURL, order);
- },
-);
diff --git a/packages/pipeline/src/scripts/pull_trusted_tokens.ts b/packages/pipeline/src/scripts/pull_trusted_tokens.ts
deleted file mode 100644
index 8afb3e052..000000000
--- a/packages/pipeline/src/scripts/pull_trusted_tokens.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { MetamaskTrustedTokenMeta, TrustedTokenSource, ZeroExTrustedTokenMeta } from '../data_sources/trusted_tokens';
-import { TokenMetadata } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseMetamaskTrustedTokens, parseZeroExTrustedTokens } from '../parsers/token_metadata';
-import { handleError } from '../utils';
-
-const METAMASK_TRUSTED_TOKENS_URL =
- 'https://raw.githubusercontent.com/MetaMask/eth-contract-metadata/d45916c533116510cc8e9e048a8b5fc3732a6b6d/contract-map.json';
-
-const ZEROEX_TRUSTED_TOKENS_URL = 'https://website-api.0xproject.com/tokens';
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- await getMetamaskTrustedTokensAsync();
- await getZeroExTrustedTokensAsync();
- process.exit(0);
-})().catch(handleError);
-
-async function getMetamaskTrustedTokensAsync(): Promise<void> {
- logUtils.log('Getting latest metamask trusted tokens list ...');
- const trustedTokensRepository = connection.getRepository(TokenMetadata);
- const trustedTokensSource = new TrustedTokenSource<Map<string, MetamaskTrustedTokenMeta>>(
- METAMASK_TRUSTED_TOKENS_URL,
- );
- const resp = await trustedTokensSource.getTrustedTokenMetaAsync();
- const trustedTokens = parseMetamaskTrustedTokens(resp);
- logUtils.log('Saving metamask trusted tokens list');
- await trustedTokensRepository.save(trustedTokens);
- logUtils.log('Done saving metamask trusted tokens.');
-}
-
-async function getZeroExTrustedTokensAsync(): Promise<void> {
- logUtils.log('Getting latest 0x trusted tokens list ...');
- const trustedTokensRepository = connection.getRepository(TokenMetadata);
- const trustedTokensSource = new TrustedTokenSource<ZeroExTrustedTokenMeta[]>(ZEROEX_TRUSTED_TOKENS_URL);
- const resp = await trustedTokensSource.getTrustedTokenMetaAsync();
- const trustedTokens = parseZeroExTrustedTokens(resp);
- logUtils.log('Saving metamask trusted tokens list');
- await trustedTokensRepository.save(trustedTokens);
- logUtils.log('Done saving metamask trusted tokens.');
-}
diff --git a/packages/pipeline/src/scripts/update_relayer_info.ts b/packages/pipeline/src/scripts/update_relayer_info.ts
deleted file mode 100644
index 910a0157c..000000000
--- a/packages/pipeline/src/scripts/update_relayer_info.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'reflect-metadata';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import { logUtils } from '@0x/utils';
-
-import { RelayerRegistrySource } from '../data_sources/relayer-registry';
-import { Relayer } from '../entities';
-import * as ormConfig from '../ormconfig';
-import { parseRelayers } from '../parsers/relayer_registry';
-import { handleError } from '../utils';
-
-// NOTE(albrow): We need to manually update this URL for now. Fix this when we
-// have the relayer-registry behind semantic versioning.
-const RELAYER_REGISTRY_URL =
- 'https://raw.githubusercontent.com/0xProject/0x-relayer-registry/4701c85677d161ea729a466aebbc1826c6aa2c0b/relayers.json';
-
-let connection: Connection;
-
-(async () => {
- connection = await createConnection(ormConfig as ConnectionOptions);
- await getRelayersAsync();
- process.exit(0);
-})().catch(handleError);
-
-async function getRelayersAsync(): Promise<void> {
- logUtils.log('Getting latest relayer info...');
- const relayerRepository = connection.getRepository(Relayer);
- const relayerSource = new RelayerRegistrySource(RELAYER_REGISTRY_URL);
- const relayersResp = await relayerSource.getRelayerInfoAsync();
- const relayers = parseRelayers(relayersResp);
- logUtils.log('Saving relayer info...');
- await relayerRepository.save(relayers);
- logUtils.log('Done saving relayer info.');
-}
diff --git a/packages/pipeline/src/types.ts b/packages/pipeline/src/types.ts
deleted file mode 100644
index 5f2121807..000000000
--- a/packages/pipeline/src/types.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export enum AssetType {
- ERC20 = 'erc20',
- ERC721 = 'erc721',
- MultiAsset = 'multiAsset',
-}
-export enum OrderType {
- Bid = 'bid',
- Ask = 'ask',
-}
diff --git a/packages/pipeline/src/utils/constants.ts b/packages/pipeline/src/utils/constants.ts
deleted file mode 100644
index 56f3e82d8..000000000
--- a/packages/pipeline/src/utils/constants.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-// Block number when the Exchange contract was deployed to mainnet.
-export const EXCHANGE_START_BLOCK = 6271590;
-export const INFURA_ROOT_URL = 'https://mainnet.infura.io';
diff --git a/packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts b/packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts
deleted file mode 100644
index 19f81344e..000000000
--- a/packages/pipeline/src/utils/get_ohlcv_trading_pairs.ts
+++ /dev/null
@@ -1,116 +0,0 @@
-import { fetchAsync } from '@0x/utils';
-import * as R from 'ramda';
-import { Connection } from 'typeorm';
-
-export interface TradingPair {
- fromSymbol: string;
- toSymbol: string;
- latestSavedTime: number;
-}
-
-const COINLIST_API = 'https://min-api.cryptocompare.com/data/all/coinlist?BuiltOn=7605';
-
-interface CryptoCompareCoinListResp {
- Data: Map<string, CryptoCompareCoin>;
-}
-
-interface CryptoCompareCoin {
- Symbol: string;
- BuiltOn: string;
- SmartContractAddress: string;
-}
-
-const TO_CURRENCIES = ['USD', 'EUR', 'ETH', 'USDT'];
-const ETHEREUM_IDENTIFIER = '7605';
-const HTTP_OK_STATUS = 200;
-
-interface StaticPair {
- fromSymbol: string;
- toSymbol: string;
-}
-const SPECIAL_CASES: StaticPair[] = [
- {
- fromSymbol: 'ETH',
- toSymbol: 'USD',
- },
-];
-
-/**
- * Get trading pairs with latest scraped time for OHLCV records
- * @param conn a typeorm Connection to postgres
- */
-export async function fetchOHLCVTradingPairsAsync(
- conn: Connection,
- source: string,
- earliestBackfillTime: number,
-): Promise<TradingPair[]> {
- // fetch existing ohlcv records
- const latestTradingPairs: Array<{
- from_symbol: string;
- to_symbol: string;
- latest: string;
- }> = await conn.query(`SELECT
- MAX(end_time) as latest,
- from_symbol,
- to_symbol
- FROM raw.ohlcv_external
- GROUP BY from_symbol, to_symbol;`);
-
- // build addressable index: { fromsym: { tosym: time }}
- const latestTradingPairsIndex: { [fromSym: string]: { [toSym: string]: number } } = {};
- latestTradingPairs.forEach(pair => {
- const latestIndex: { [toSym: string]: number } = latestTradingPairsIndex[pair.from_symbol] || {};
- latestIndex[pair.to_symbol] = parseInt(pair.latest, 10); // tslint:disable-line:custom-no-magic-numbers
- latestTradingPairsIndex[pair.from_symbol] = latestIndex;
- });
-
- // match time to special cases
- const specialCases: TradingPair[] = SPECIAL_CASES.map(pair => {
- const latestSavedTime =
- R.path<number>([pair.fromSymbol, pair.toSymbol], latestTradingPairsIndex) || earliestBackfillTime;
- return R.assoc('latestSavedTime', latestSavedTime, pair);
- });
-
- // get token symbols used by Crypto Compare
- const allCoinsResp = await fetchAsync(COINLIST_API);
- if (allCoinsResp.status !== HTTP_OK_STATUS) {
- return [];
- }
- const allCoins: CryptoCompareCoinListResp = await allCoinsResp.json();
- const erc20CoinsIndex: Map<string, string> = new Map();
- Object.entries(allCoins.Data).forEach(pair => {
- const [symbol, coinData] = pair;
- if (coinData.BuiltOn === ETHEREUM_IDENTIFIER && coinData.SmartContractAddress !== 'N/A') {
- erc20CoinsIndex.set(coinData.SmartContractAddress.toLowerCase(), symbol);
- }
- });
-
- // fetch all tokens that are traded on 0x
- const rawEventTokenAddresses: Array<{ tokenaddress: string }> = await conn.query(
- `SELECT DISTINCT(maker_token_address) as tokenaddress FROM raw.exchange_fill_events UNION
- SELECT DISTINCT(taker_token_address) as tokenaddress FROM raw.exchange_fill_events`,
- );
-
- // tslint:disable-next-line:no-unbound-method
- const eventTokenAddresses = R.pluck('tokenaddress', rawEventTokenAddresses).map(R.toLower);
-
- // join token addresses with CC symbols
- const eventTokenSymbols: string[] = eventTokenAddresses
- .filter(tokenAddress => erc20CoinsIndex.has(tokenAddress))
- .map(tokenAddress => erc20CoinsIndex.get(tokenAddress) as string);
-
- // join traded tokens with fiat and latest backfill time
- const eventTradingPairs: TradingPair[] = R.chain(sym => {
- return TO_CURRENCIES.map(fiat => {
- const pair = {
- fromSymbol: sym,
- toSymbol: fiat,
- latestSavedTime: R.path<number>([sym, fiat], latestTradingPairsIndex) || earliestBackfillTime,
- };
- return pair;
- });
- }, eventTokenSymbols);
-
- // join with special cases
- return R.concat(eventTradingPairs, specialCases);
-}
diff --git a/packages/pipeline/src/utils/index.ts b/packages/pipeline/src/utils/index.ts
deleted file mode 100644
index 094c0178e..000000000
--- a/packages/pipeline/src/utils/index.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { BigNumber } from '@0x/utils';
-export * from './transformers';
-export * from './constants';
-
-/**
- * If the given BigNumber is not null, returns the string representation of that
- * number. Otherwise, returns null.
- * @param n The number to convert.
- */
-export function bigNumbertoStringOrNull(n: BigNumber): string | null {
- if (n == null) {
- return null;
- }
- return n.toString();
-}
-
-/**
- * If value is null or undefined, returns null. Otherwise converts value to a
- * BigNumber.
- * @param value A string or number to be converted to a BigNumber
- */
-export function toBigNumberOrNull(value: string | number | null): BigNumber | null {
- switch (value) {
- case null:
- case undefined:
- return null;
- default:
- return new BigNumber(value);
- }
-}
-
-/**
- * Logs an error by intelligently checking for `message` and `stack` properties.
- * Intended for use with top-level immediately invoked asynchronous functions.
- * @param e the error to log.
- */
-export function handleError(e: any): void {
- if (e.message != null) {
- // tslint:disable-next-line:no-console
- console.error(e.message);
- } else {
- // tslint:disable-next-line:no-console
- console.error('Unknown error');
- }
- if (e.stack != null) {
- // tslint:disable-next-line:no-console
- console.error(e.stack);
- } else {
- // tslint:disable-next-line:no-console
- console.error('(No stack trace)');
- }
- process.exit(1);
-}
diff --git a/packages/pipeline/src/utils/transformers/asset_proxy_id_types.ts b/packages/pipeline/src/utils/transformers/asset_proxy_id_types.ts
deleted file mode 100644
index 2cd05a616..000000000
--- a/packages/pipeline/src/utils/transformers/asset_proxy_id_types.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { AssetProxyId } from '@0x/types';
-
-import { AssetType } from '../../types';
-
-/**
- * Converts an assetProxyId to its string equivalent
- * @param assetProxyId Id of AssetProxy
- */
-export function convertAssetProxyIdToType(assetProxyId: AssetProxyId): AssetType {
- switch (assetProxyId) {
- case AssetProxyId.ERC20:
- return AssetType.ERC20;
- case AssetProxyId.ERC721:
- return AssetType.ERC721;
- case AssetProxyId.MultiAsset:
- return AssetType.MultiAsset;
- default:
- throw new Error(`${assetProxyId} not a supported assetProxyId`);
- }
-}
diff --git a/packages/pipeline/src/utils/transformers/big_number.ts b/packages/pipeline/src/utils/transformers/big_number.ts
deleted file mode 100644
index 5f2e4d565..000000000
--- a/packages/pipeline/src/utils/transformers/big_number.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { ValueTransformer } from 'typeorm/decorator/options/ValueTransformer';
-
-export class BigNumberTransformer implements ValueTransformer {
- // tslint:disable-next-line:prefer-function-over-method
- public to(value: BigNumber | null): string | null {
- return value === null ? null : value.toString();
- }
-
- // tslint:disable-next-line:prefer-function-over-method
- public from(value: string | null): BigNumber | null {
- return value === null ? null : new BigNumber(value);
- }
-}
-
-export const bigNumberTransformer = new BigNumberTransformer();
diff --git a/packages/pipeline/src/utils/transformers/index.ts b/packages/pipeline/src/utils/transformers/index.ts
deleted file mode 100644
index 31a4c9223..000000000
--- a/packages/pipeline/src/utils/transformers/index.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-export * from './big_number';
-export * from './number_to_bigint';
-export * from './asset_proxy_id_types';
diff --git a/packages/pipeline/src/utils/transformers/number_to_bigint.ts b/packages/pipeline/src/utils/transformers/number_to_bigint.ts
deleted file mode 100644
index 8fbd52093..000000000
--- a/packages/pipeline/src/utils/transformers/number_to_bigint.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { ValueTransformer } from 'typeorm/decorator/options/ValueTransformer';
-
-const decimalRadix = 10;
-
-// Can be used to convert a JavaScript number type to a Postgres bigint type and
-// vice versa. By default TypeORM will silently convert number types to string
-// if the corresponding Postgres type is bigint. See
-// https://github.com/typeorm/typeorm/issues/2400 for more information.
-export class NumberToBigIntTransformer implements ValueTransformer {
- // tslint:disable-next-line:prefer-function-over-method
- public to(value: number): string | null {
- if (value === null || value === undefined) {
- return null;
- } else {
- return value.toString();
- }
- }
-
- // tslint:disable-next-line:prefer-function-over-method
- public from(value: string): number {
- if (new BigNumber(value).isGreaterThan(Number.MAX_SAFE_INTEGER)) {
- throw new Error(
- `Attempted to convert PostgreSQL bigint value (${value}) to JavaScript number type but it is too big to safely convert`,
- );
- }
- return Number.parseInt(value, decimalRadix);
- }
-}
-
-export const numberToBigIntTransformer = new NumberToBigIntTransformer();
diff --git a/packages/pipeline/test/data_sources/contract-wrappers/utils_test.ts b/packages/pipeline/test/data_sources/contract-wrappers/utils_test.ts
deleted file mode 100644
index 06f1a5e86..000000000
--- a/packages/pipeline/test/data_sources/contract-wrappers/utils_test.ts
+++ /dev/null
@@ -1,109 +0,0 @@
-// tslint:disable:custom-no-magic-numbers
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import 'mocha';
-
-import { _getEventsWithRetriesAsync } from '../../../src/data_sources/contract-wrappers/utils';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const retryableMessage = 'network timeout: (simulated network timeout error)';
-const retryableError = new Error(retryableMessage);
-
-describe('data_sources/contract-wrappers/utils', () => {
- describe('_getEventsWithRetriesAsync', () => {
- it('sends a single request if it was successful', async () => {
- // Pre-declare values for the fromBlock and toBlock arguments.
- const expectedFromBlock = 100;
- const expectedToBlock = 200;
- const expectedLogs: Array<LogWithDecodedArgs<any>> = [
- {
- logIndex: 123,
- transactionIndex: 456,
- transactionHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe',
- blockHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657ff',
- blockNumber: 789,
- address: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd3365800',
- data: 'fake raw data',
- topics: [],
- event: 'TEST_EVENT',
- args: [1, 2, 3],
- },
- ];
-
- // mockGetEventsAsync checks its arguments, increments `callCount`
- // and returns `expectedLogs`.
- let callCount = 0;
- const mockGetEventsAsync = async (
- fromBlock: number,
- toBlock: number,
- ): Promise<Array<LogWithDecodedArgs<any>>> => {
- expect(fromBlock).equals(expectedFromBlock);
- expect(toBlock).equals(expectedToBlock);
- callCount += 1;
- return expectedLogs;
- };
-
- // Make sure that we get what we expected and that the mock function
- // was called exactly once.
- const gotLogs = await _getEventsWithRetriesAsync(mockGetEventsAsync, 3, expectedFromBlock, expectedToBlock);
- expect(gotLogs).deep.equals(expectedLogs);
- expect(callCount).equals(
- 1,
- 'getEventsAsync function was called more than once even though it was successful',
- );
- });
- it('retries and eventually succeeds', async () => {
- const numRetries = 5;
- let callCount = 0;
- // mockGetEventsAsync throws unless callCount == numRetries + 1.
- const mockGetEventsAsync = async (
- _fromBlock: number,
- _toBlock: number,
- ): Promise<Array<LogWithDecodedArgs<any>>> => {
- callCount += 1;
- if (callCount === numRetries + 1) {
- return [];
- }
- throw retryableError;
- };
- await _getEventsWithRetriesAsync(mockGetEventsAsync, numRetries, 100, 300);
- expect(callCount).equals(numRetries + 1, 'getEventsAsync function was called the wrong number of times');
- });
- it('throws for non-retryable errors', async () => {
- const numRetries = 5;
- const expectedMessage = 'Non-retryable error';
- // mockGetEventsAsync always throws a non-retryable error.
- const mockGetEventsAsync = async (
- _fromBlock: number,
- _toBlock: number,
- ): Promise<Array<LogWithDecodedArgs<any>>> => {
- throw new Error(expectedMessage);
- };
- // Note(albrow): This does actually return a promise (or at least a
- // "promise-like object" and is a false positive in TSLint.
- // tslint:disable-next-line:await-promise
- await expect(_getEventsWithRetriesAsync(mockGetEventsAsync, numRetries, 100, 300)).to.be.rejectedWith(
- expectedMessage,
- );
- });
- it('throws after too many retries', async () => {
- const numRetries = 5;
- // mockGetEventsAsync always throws a retryable error.
- const mockGetEventsAsync = async (
- _fromBlock: number,
- _toBlock: number,
- ): Promise<Array<LogWithDecodedArgs<any>>> => {
- throw retryableError;
- };
- // Note(albrow): This does actually return a promise (or at least a
- // "promise-like object" and is a false positive in TSLint.
- // tslint:disable-next-line:await-promise
- await expect(_getEventsWithRetriesAsync(mockGetEventsAsync, numRetries, 100, 300)).to.be.rejectedWith(
- retryableMessage,
- );
- });
- });
-});
diff --git a/packages/pipeline/test/data_sources/ohlcv_external/crypto_compare_test.ts b/packages/pipeline/test/data_sources/ohlcv_external/crypto_compare_test.ts
deleted file mode 100644
index 2efe3f5ec..000000000
--- a/packages/pipeline/test/data_sources/ohlcv_external/crypto_compare_test.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-import * as R from 'ramda';
-
-import { CryptoCompareOHLCVSource } from '../../../src/data_sources/ohlcv_external/crypto_compare';
-import { TradingPair } from '../../../src/utils/get_ohlcv_trading_pairs';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('ohlcv_external data source (Crypto Compare)', () => {
- describe('generateBackfillIntervals', () => {
- it('generates pairs with intervals to query', () => {
- const source = new CryptoCompareOHLCVSource(20);
- const pair: TradingPair = {
- fromSymbol: 'ETH',
- toSymbol: 'ZRX',
- latestSavedTime: new Date().getTime() - source.interval * 2,
- };
-
- const expected = [
- pair,
- R.merge(pair, { latestSavedTime: pair.latestSavedTime + source.interval }),
- R.merge(pair, { latestSavedTime: pair.latestSavedTime + source.interval * 2 }),
- ];
-
- const actual = source.generateBackfillIntervals(pair);
- expect(actual).deep.equal(expected);
- });
-
- it('returns single pair if no backfill is needed', () => {
- const source = new CryptoCompareOHLCVSource(20);
- const pair: TradingPair = {
- fromSymbol: 'ETH',
- toSymbol: 'ZRX',
- latestSavedTime: new Date().getTime() - source.interval + 5000,
- };
-
- const expected = [pair];
-
- const actual = source.generateBackfillIntervals(pair);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/db_global_hooks.ts b/packages/pipeline/test/db_global_hooks.ts
deleted file mode 100644
index dfee02c45..000000000
--- a/packages/pipeline/test/db_global_hooks.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { setUpDbAsync, tearDownDbAsync } from './db_setup';
-
-before('set up database', async () => {
- await setUpDbAsync();
-});
-
-after('tear down database', async () => {
- await tearDownDbAsync();
-});
diff --git a/packages/pipeline/test/db_setup.ts b/packages/pipeline/test/db_setup.ts
deleted file mode 100644
index bf31d15b6..000000000
--- a/packages/pipeline/test/db_setup.ts
+++ /dev/null
@@ -1,174 +0,0 @@
-import * as Docker from 'dockerode';
-import * as fs from 'fs';
-import * as R from 'ramda';
-import { Connection, ConnectionOptions, createConnection } from 'typeorm';
-
-import * as ormConfig from '../src/ormconfig';
-
-// The name of the image to pull and use for the container. This also affects
-// which version of Postgres we use.
-const DOCKER_IMAGE_NAME = 'postgres:11-alpine';
-// The name to use for the Docker container which will run Postgres.
-const DOCKER_CONTAINER_NAME = '0x_pipeline_postgres_test';
-// The port which will be exposed on the Docker container.
-const POSTGRES_HOST_PORT = '15432';
-// Number of milliseconds to wait for postgres to finish initializing after
-// starting the docker container.
-const POSTGRES_SETUP_DELAY_MS = 5000;
-
-/**
- * Sets up the database for testing purposes. If the
- * ZEROEX_DATA_PIPELINE_TEST_DB_URL env var is specified, it will create a
- * connection using that url. Otherwise it will spin up a new Docker container
- * with a Postgres database and then create a connection to that database.
- */
-export async function setUpDbAsync(): Promise<void> {
- const connection = await createDbConnectionOnceAsync();
- await connection.runMigrations({ transaction: true });
-}
-
-/**
- * Tears down the database used for testing. This completely destroys any data.
- * If a docker container was created, it destroys that container too.
- */
-export async function tearDownDbAsync(): Promise<void> {
- const connection = await createDbConnectionOnceAsync();
- for (const _ of connection.migrations) {
- await connection.undoLastMigration({ transaction: true });
- }
- if (needsDocker()) {
- const docker = initDockerOnce();
- const postgresContainer = docker.getContainer(DOCKER_CONTAINER_NAME);
- await postgresContainer.kill();
- await postgresContainer.remove();
- }
-}
-
-let savedConnection: Connection;
-
-/**
- * The first time this is run, it creates and returns a new TypeORM connection.
- * Each subsequent time, it returns the existing connection. This is helpful
- * because only one TypeORM connection can be active at a time.
- */
-export async function createDbConnectionOnceAsync(): Promise<Connection> {
- if (savedConnection !== undefined) {
- return savedConnection;
- }
-
- if (needsDocker()) {
- await initContainerAsync();
- }
- const testDbUrl =
- process.env.ZEROEX_DATA_PIPELINE_TEST_DB_URL ||
- `postgresql://postgres@localhost:${POSTGRES_HOST_PORT}/postgres`;
- const testOrmConfig = R.merge(ormConfig, { url: testDbUrl }) as ConnectionOptions;
-
- savedConnection = await createConnection(testOrmConfig);
- return savedConnection;
-}
-
-async function sleepAsync(ms: number): Promise<{}> {
- return new Promise<{}>(resolve => setTimeout(resolve, ms));
-}
-
-let savedDocker: Docker;
-
-function initDockerOnce(): Docker {
- if (savedDocker !== undefined) {
- return savedDocker;
- }
-
- // Note(albrow): Code for determining the right socket path is partially
- // based on https://github.com/apocas/dockerode/blob/8f3aa85311fab64d58eca08fef49aa1da5b5f60b/test/spec_helper.js
- const isWin = require('os').type() === 'Windows_NT';
- const socketPath = process.env.DOCKER_SOCKET || (isWin ? '//./pipe/docker_engine' : '/var/run/docker.sock');
- const isSocket = fs.existsSync(socketPath) ? fs.statSync(socketPath).isSocket() : false;
- if (!isSocket) {
- throw new Error(`Failed to connect to Docker using socket path: "${socketPath}".
-
-The database integration tests need to be able to connect to a Postgres database. Make sure that Docker is running and accessible at the expected socket path. If Docker isn't working you have two options:
-
- 1) Set the DOCKER_SOCKET environment variable to a socket path that can be used to connect to Docker or
- 2) Set the ZEROEX_DATA_PIPELINE_TEST_DB_URL environment variable to connect directly to an existing Postgres database instead of trying to start Postgres via Docker
-`);
- }
- savedDocker = new Docker({
- socketPath,
- });
- return savedDocker;
-}
-
-// Creates the container, waits for it to initialize, and returns it.
-async function initContainerAsync(): Promise<Docker.Container> {
- const docker = initDockerOnce();
-
- // Tear down any existing containers with the same name.
- await tearDownExistingContainerIfAnyAsync();
-
- // Pull the image we need.
- await pullImageAsync(docker, DOCKER_IMAGE_NAME);
-
- // Create the container.
- const postgresContainer = await docker.createContainer({
- name: DOCKER_CONTAINER_NAME,
- Image: DOCKER_IMAGE_NAME,
- ExposedPorts: {
- '5432': {},
- },
- HostConfig: {
- PortBindings: {
- '5432': [
- {
- HostPort: POSTGRES_HOST_PORT,
- },
- ],
- },
- },
- });
- await postgresContainer.start();
- await sleepAsync(POSTGRES_SETUP_DELAY_MS);
- return postgresContainer;
-}
-
-async function tearDownExistingContainerIfAnyAsync(): Promise<void> {
- const docker = initDockerOnce();
-
- // Check if a container with the desired name already exists. If so, this
- // probably means we didn't clean up properly on the last test run.
- const existingContainer = docker.getContainer(DOCKER_CONTAINER_NAME);
- if (existingContainer != null) {
- try {
- await existingContainer.kill();
- } catch {
- // If this fails, it's fine. The container was probably already
- // killed.
- }
- try {
- await existingContainer.remove();
- } catch {
- // If this fails, it's fine. The container was probably already
- // removed.
- }
- }
-}
-
-function needsDocker(): boolean {
- return process.env.ZEROEX_DATA_PIPELINE_TEST_DB_URL === undefined;
-}
-
-// Note(albrow): This is partially based on
-// https://stackoverflow.com/questions/38258263/how-do-i-wait-for-a-pull
-async function pullImageAsync(docker: Docker, imageName: string): Promise<void> {
- return new Promise<void>((resolve, reject) => {
- docker.pull(imageName, {}, (err, stream) => {
- if (err != null) {
- reject(err);
- return;
- }
- docker.modem.followProgress(stream, () => {
- resolve();
- });
- });
- });
-}
diff --git a/packages/pipeline/test/entities/block_test.ts b/packages/pipeline/test/entities/block_test.ts
deleted file mode 100644
index 503f284f0..000000000
--- a/packages/pipeline/test/entities/block_test.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import 'mocha';
-import 'reflect-metadata';
-
-import { Block } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-// tslint:disable:custom-no-magic-numbers
-describe('Block entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const block = new Block();
- block.hash = '0x12345';
- block.number = 1234567;
- block.timestamp = 5432154321;
- const blocksRepository = connection.getRepository(Block);
- await testSaveAndFindEntityAsync(blocksRepository, block);
- });
-});
diff --git a/packages/pipeline/test/entities/copper_test.ts b/packages/pipeline/test/entities/copper_test.ts
deleted file mode 100644
index 2543364e6..000000000
--- a/packages/pipeline/test/entities/copper_test.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import 'mocha';
-import 'reflect-metadata';
-
-import {
- CopperActivity,
- CopperActivityType,
- CopperCustomField,
- CopperLead,
- CopperOpportunity,
-} from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import {
- ParsedActivities,
- ParsedActivityTypes,
- ParsedCustomFields,
- ParsedLeads,
- ParsedOpportunities,
-} from '../fixtures/copper/parsed_entities';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-describe('Copper entities', () => {
- describe('save and find', async () => {
- it('Copper lead', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(CopperLead);
- ParsedLeads.forEach(async entity => testSaveAndFindEntityAsync(repository, entity));
- });
- it('Copper activity', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(CopperActivity);
- ParsedActivities.forEach(async entity => testSaveAndFindEntityAsync(repository, entity));
- });
- // searching on jsonb fields is broken in typeorm
- it.skip('Copper opportunity', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(CopperOpportunity);
- ParsedOpportunities.forEach(async entity => testSaveAndFindEntityAsync(repository, entity));
- });
- it('Copper activity type', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(CopperActivityType);
- ParsedActivityTypes.forEach(async entity => testSaveAndFindEntityAsync(repository, entity));
- });
- it('Copper custom field', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(CopperCustomField);
- ParsedCustomFields.forEach(async entity => testSaveAndFindEntityAsync(repository, entity));
- });
- });
-});
diff --git a/packages/pipeline/test/entities/dex_trades_test.ts b/packages/pipeline/test/entities/dex_trades_test.ts
deleted file mode 100644
index 83aaeec8f..000000000
--- a/packages/pipeline/test/entities/dex_trades_test.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import * as R from 'ramda';
-import 'reflect-metadata';
-
-import { DexTrade } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const baseTrade = {
- sourceUrl: 'https://bloxy.info/api/dex/trades',
- txTimestamp: 1543447585938,
- txDate: '2018-11-21',
- txSender: '0x00923b9a074762b93650716333b3e1473a15048e',
- smartContractId: 7091917,
- smartContractAddress: '0x818e6fecd516ecc3849daf6845e3ec868087b755',
- contractType: 'DEX/Kyber Network Proxy',
- maker: '0xbf2179859fc6d5bee9bf9158632dc51678a4100c',
- taker: '0xbf2179859fc6d5bee9bf9158632dc51678a4100d',
- amountBuy: new BigNumber('1.011943163078103'),
- makerFeeAmount: new BigNumber(0),
- buyCurrencyId: 1,
- buySymbol: 'ETH',
- amountSell: new BigNumber('941.4997928436911'),
- takerFeeAmount: new BigNumber(0),
- sellCurrencyId: 16610,
- sellSymbol: 'ELF',
- makerAnnotation: '',
- takerAnnotation: '',
- protocol: 'Kyber Network Proxy',
- sellAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100e',
-};
-
-const tradeWithNullAddresses: DexTrade = R.merge(baseTrade, {
- txHash: '0xb93a7faf92efbbb5405c9a73cd4efd99702fe27c03ff22baee1f1b1e37b3a0bf',
- buyAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100e',
- sellAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100f',
-});
-
-const tradeWithNonNullAddresses: DexTrade = R.merge(baseTrade, {
- txHash: '0xb93a7faf92efbbb5405c9a73cd4efd99702fe27c03ff22baee1f1b1e37b3a0be',
- buyAddress: null,
- sellAddress: null,
-});
-
-// tslint:disable:custom-no-magic-numbers
-describe('DexTrade entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const trades = [tradeWithNullAddresses, tradeWithNonNullAddresses];
- const tradesRepository = connection.getRepository(DexTrade);
- for (const trade of trades) {
- await testSaveAndFindEntityAsync(tradesRepository, trade);
- }
- });
-});
diff --git a/packages/pipeline/test/entities/erc20_approval_events_test.ts b/packages/pipeline/test/entities/erc20_approval_events_test.ts
deleted file mode 100644
index 1ecf41ee5..000000000
--- a/packages/pipeline/test/entities/erc20_approval_events_test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import 'reflect-metadata';
-
-import { ERC20ApprovalEvent } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-// tslint:disable:custom-no-magic-numbers
-describe('ERC20ApprovalEvent entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const event = new ERC20ApprovalEvent();
- event.tokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- event.blockNumber = 6281577;
- event.rawData = '0x000000000000000000000000000000000000000000000002b9cba5ee21ad3df9';
- event.logIndex = 43;
- event.transactionHash = '0xcb46b19c786376a0a0140d51e3e606a4c4f926d8ca5434e96d2f69d04d8d9c7f';
- event.ownerAddress = '0x0b65c5f6f3a05d6be5588a72b603360773b3fe04';
- event.spenderAddress = '0x448a5065aebb8e423f0896e6c5d525c040f59af3';
- event.amount = new BigNumber('50281464906893835769');
- const blocksRepository = connection.getRepository(ERC20ApprovalEvent);
- await testSaveAndFindEntityAsync(blocksRepository, event);
- });
-});
diff --git a/packages/pipeline/test/entities/exchange_cancel_event_test.ts b/packages/pipeline/test/entities/exchange_cancel_event_test.ts
deleted file mode 100644
index f3b306d69..000000000
--- a/packages/pipeline/test/entities/exchange_cancel_event_test.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-import 'mocha';
-import * as R from 'ramda';
-import 'reflect-metadata';
-
-import { ExchangeCancelEvent } from '../../src/entities';
-import { AssetType } from '../../src/types';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const baseCancelEvent = {
- contractAddress: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- logIndex: 1234,
- blockNumber: 6276262,
- rawData: '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428',
- transactionHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe',
- makerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- takerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- feeRecipientAddress: '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd',
- senderAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- orderHash: '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a',
- rawMakerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- makerAssetProxyId: '0xf47261b0',
- makerTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- rawTakerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetProxyId: '0xf47261b0',
- takerTokenAddress: '0xe41d2489571d322189246dafa5ebde1f4699f498',
-};
-
-const erc20CancelEvent = R.merge(baseCancelEvent, {
- makerAssetType: 'erc20' as AssetType,
- makerTokenId: null,
- takerAssetType: 'erc20' as AssetType,
- takerTokenId: null,
-});
-
-const erc721CancelEvent = R.merge(baseCancelEvent, {
- makerAssetType: 'erc721' as AssetType,
- makerTokenId: '19378573',
- takerAssetType: 'erc721' as AssetType,
- takerTokenId: '63885673888',
-});
-
-// tslint:disable:custom-no-magic-numbers
-describe('ExchangeCancelEvent entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const events = [erc20CancelEvent, erc721CancelEvent];
- const cancelEventRepository = connection.getRepository(ExchangeCancelEvent);
- for (const event of events) {
- await testSaveAndFindEntityAsync(cancelEventRepository, event);
- }
- });
-});
diff --git a/packages/pipeline/test/entities/exchange_cancel_up_to_event_test.ts b/packages/pipeline/test/entities/exchange_cancel_up_to_event_test.ts
deleted file mode 100644
index aa34f8c1c..000000000
--- a/packages/pipeline/test/entities/exchange_cancel_up_to_event_test.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import 'reflect-metadata';
-
-import { ExchangeCancelUpToEvent } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-// tslint:disable:custom-no-magic-numbers
-describe('ExchangeCancelUpToEvent entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const cancelUpToEventRepository = connection.getRepository(ExchangeCancelUpToEvent);
- const cancelUpToEvent = new ExchangeCancelUpToEvent();
- cancelUpToEvent.blockNumber = 6276262;
- cancelUpToEvent.contractAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b';
- cancelUpToEvent.logIndex = 42;
- cancelUpToEvent.makerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428';
- cancelUpToEvent.orderEpoch = new BigNumber('123456789123456789');
- cancelUpToEvent.rawData = '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428';
- cancelUpToEvent.senderAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428';
- cancelUpToEvent.transactionHash = '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe';
- await testSaveAndFindEntityAsync(cancelUpToEventRepository, cancelUpToEvent);
- });
-});
diff --git a/packages/pipeline/test/entities/exchange_fill_event_test.ts b/packages/pipeline/test/entities/exchange_fill_event_test.ts
deleted file mode 100644
index b2cb8c5e0..000000000
--- a/packages/pipeline/test/entities/exchange_fill_event_test.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import * as R from 'ramda';
-import 'reflect-metadata';
-
-import { ExchangeFillEvent } from '../../src/entities';
-import { AssetType } from '../../src/types';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const baseFillEvent = {
- contractAddress: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- blockNumber: 6276262,
- logIndex: 102,
- rawData: '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428',
- transactionHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe',
- makerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- takerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- feeRecipientAddress: '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd',
- senderAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- makerAssetFilledAmount: new BigNumber('10000000000000000'),
- takerAssetFilledAmount: new BigNumber('100000000000000000'),
- makerFeePaid: new BigNumber('0'),
- takerFeePaid: new BigNumber('12345'),
- orderHash: '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a',
- rawMakerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- makerAssetProxyId: '0xf47261b0',
- makerTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- rawTakerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetProxyId: '0xf47261b0',
- takerTokenAddress: '0xe41d2489571d322189246dafa5ebde1f4699f498',
-};
-
-const erc20FillEvent = R.merge(baseFillEvent, {
- makerAssetType: 'erc20' as AssetType,
- makerTokenId: null,
- takerAssetType: 'erc20' as AssetType,
- takerTokenId: null,
-});
-
-const erc721FillEvent = R.merge(baseFillEvent, {
- makerAssetType: 'erc721' as AssetType,
- makerTokenId: '19378573',
- takerAssetType: 'erc721' as AssetType,
- takerTokenId: '63885673888',
-});
-
-// tslint:disable:custom-no-magic-numbers
-describe('ExchangeFillEvent entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const events = [erc20FillEvent, erc721FillEvent];
- const fillEventsRepository = connection.getRepository(ExchangeFillEvent);
- for (const event of events) {
- await testSaveAndFindEntityAsync(fillEventsRepository, event);
- }
- });
-});
diff --git a/packages/pipeline/test/entities/ohlcv_external_test.ts b/packages/pipeline/test/entities/ohlcv_external_test.ts
deleted file mode 100644
index 8b995db50..000000000
--- a/packages/pipeline/test/entities/ohlcv_external_test.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import 'mocha';
-import 'reflect-metadata';
-
-import { OHLCVExternal } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const ohlcvExternal: OHLCVExternal = {
- exchange: 'CCCAGG',
- fromSymbol: 'ETH',
- toSymbol: 'ZRX',
- startTime: 1543352400000,
- endTime: 1543356000000,
- open: 307.41,
- close: 310.08,
- low: 304.6,
- high: 310.27,
- volumeFrom: 904.6,
- volumeTo: 278238.5,
- source: 'Crypto Compare',
- observedTimestamp: 1543442338074,
-};
-
-// tslint:disable:custom-no-magic-numbers
-describe('OHLCVExternal entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const repository = connection.getRepository(OHLCVExternal);
- await testSaveAndFindEntityAsync(repository, ohlcvExternal);
- });
-});
diff --git a/packages/pipeline/test/entities/relayer_test.ts b/packages/pipeline/test/entities/relayer_test.ts
deleted file mode 100644
index 760ffb6f9..000000000
--- a/packages/pipeline/test/entities/relayer_test.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-import 'mocha';
-import * as R from 'ramda';
-import 'reflect-metadata';
-
-import { Relayer } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const baseRelayer = {
- uuid: 'e8d27d8d-ddf6-48b1-9663-60b0a3ddc716',
- name: 'Radar Relay',
- homepageUrl: 'https://radarrelay.com',
- appUrl: null,
- sraHttpEndpoint: null,
- sraWsEndpoint: null,
- feeRecipientAddresses: [],
- takerAddresses: [],
-};
-
-const relayerWithUrls = R.merge(baseRelayer, {
- uuid: 'e8d27d8d-ddf6-48b1-9663-60b0a3ddc717',
- appUrl: 'https://app.radarrelay.com',
- sraHttpEndpoint: 'https://api.radarrelay.com/0x/v2/',
- sraWsEndpoint: 'wss://ws.radarrelay.com/0x/v2',
-});
-
-const relayerWithAddresses = R.merge(baseRelayer, {
- uuid: 'e8d27d8d-ddf6-48b1-9663-60b0a3ddc718',
- feeRecipientAddresses: [
- '0xa258b39954cef5cb142fd567a46cddb31a670124',
- '0xa258b39954cef5cb142fd567a46cddb31a670125',
- '0xa258b39954cef5cb142fd567a46cddb31a670126',
- ],
- takerAddresses: [
- '0xa258b39954cef5cb142fd567a46cddb31a670127',
- '0xa258b39954cef5cb142fd567a46cddb31a670128',
- '0xa258b39954cef5cb142fd567a46cddb31a670129',
- ],
-});
-
-// tslint:disable:custom-no-magic-numbers
-describe('Relayer entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const relayers = [baseRelayer, relayerWithUrls, relayerWithAddresses];
- const relayerRepository = connection.getRepository(Relayer);
- for (const relayer of relayers) {
- await testSaveAndFindEntityAsync(relayerRepository, relayer);
- }
- });
-});
diff --git a/packages/pipeline/test/entities/sra_order_test.ts b/packages/pipeline/test/entities/sra_order_test.ts
deleted file mode 100644
index c43de8ce8..000000000
--- a/packages/pipeline/test/entities/sra_order_test.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import * as R from 'ramda';
-import 'reflect-metadata';
-import { Repository } from 'typeorm';
-
-import { SraOrder, SraOrdersObservedTimeStamp } from '../../src/entities';
-import { AssetType } from '../../src/types';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const baseOrder = {
- sourceUrl: 'https://api.radarrelay.com/0x/v2',
- exchangeAddress: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- makerAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- takerAddress: '0x0000000000000000000000000000000000000000',
- feeRecipientAddress: '0xa258b39954cef5cb142fd567a46cddb31a670124',
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAssetAmount: new BigNumber('1619310371000000000'),
- takerAssetAmount: new BigNumber('8178335207070707070707'),
- makerFee: new BigNumber('100'),
- takerFee: new BigNumber('200'),
- expirationTimeSeconds: new BigNumber('1538529488'),
- salt: new BigNumber('1537924688891'),
- signature: '0x1b5a5d672b0d647b5797387ccbb89d8',
- rawMakerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- makerAssetProxyId: '0xf47261b0',
- makerTokenAddress: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- rawTakerAssetData: '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18',
- takerAssetProxyId: '0xf47261b0',
- takerTokenAddress: '0x42d6622dece394b54999fbd73d108123806f6a18',
- metadataJson: '{"isThisArbitraryData":true,"powerLevel":9001}',
-};
-
-const erc20Order = R.merge(baseOrder, {
- orderHashHex: '0x1bdbeb0d088a33da28b9ee6d94e8771452f90f4a69107da2fa75195d61b9a1c9',
- makerAssetType: 'erc20' as AssetType,
- makerTokenId: null,
- takerAssetType: 'erc20' as AssetType,
- takerTokenId: null,
-});
-
-const erc721Order = R.merge(baseOrder, {
- orderHashHex: '0x1bdbeb0d088a33da28b9ee6d94e8771452f90f4a69107da2fa75195d61b9a1d0',
- makerAssetType: 'erc721' as AssetType,
- makerTokenId: '19378573',
- takerAssetType: 'erc721' as AssetType,
- takerTokenId: '63885673888',
-});
-
-// tslint:disable:custom-no-magic-numbers
-describe('SraOrder and SraOrdersObservedTimeStamp entities', () => {
- // Note(albrow): SraOrder and SraOrdersObservedTimeStamp are tightly coupled
- // and timestamps have a foreign key constraint such that they have to point
- // to an existing SraOrder. For these reasons, we are testing them together
- // in the same test.
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const orderRepository = connection.getRepository(SraOrder);
- const timestampRepository = connection.getRepository(SraOrdersObservedTimeStamp);
- const orders = [erc20Order, erc721Order];
- for (const order of orders) {
- await testOrderWithTimestampAsync(orderRepository, timestampRepository, order);
- }
- });
-});
-
-async function testOrderWithTimestampAsync(
- orderRepository: Repository<SraOrder>,
- timestampRepository: Repository<SraOrdersObservedTimeStamp>,
- order: SraOrder,
-): Promise<void> {
- await testSaveAndFindEntityAsync(orderRepository, order);
- const timestamp = new SraOrdersObservedTimeStamp();
- timestamp.exchangeAddress = order.exchangeAddress;
- timestamp.orderHashHex = order.orderHashHex;
- timestamp.sourceUrl = order.sourceUrl;
- timestamp.observedTimestamp = 1543377376153;
- await testSaveAndFindEntityAsync(timestampRepository, timestamp);
-}
diff --git a/packages/pipeline/test/entities/token_metadata_test.ts b/packages/pipeline/test/entities/token_metadata_test.ts
deleted file mode 100644
index 48e656644..000000000
--- a/packages/pipeline/test/entities/token_metadata_test.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import 'reflect-metadata';
-
-import { TokenMetadata } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const metadataWithoutNullFields: TokenMetadata = {
- address: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- authority: 'https://website-api.0xproject.com/tokens',
- decimals: new BigNumber(18),
- symbol: 'ZRX',
- name: '0x',
-};
-
-const metadataWithNullFields: TokenMetadata = {
- address: '0xe41d2489571d322189246dafa5ebde1f4699f499',
- authority: 'https://website-api.0xproject.com/tokens',
- decimals: null,
- symbol: null,
- name: null,
-};
-
-// tslint:disable:custom-no-magic-numbers
-describe('TokenMetadata entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const tokenMetadata = [metadataWithoutNullFields, metadataWithNullFields];
- const tokenMetadataRepository = connection.getRepository(TokenMetadata);
- for (const tokenMetadatum of tokenMetadata) {
- await testSaveAndFindEntityAsync(tokenMetadataRepository, tokenMetadatum);
- }
- });
-});
diff --git a/packages/pipeline/test/entities/token_order_test.ts b/packages/pipeline/test/entities/token_order_test.ts
deleted file mode 100644
index c6057f5aa..000000000
--- a/packages/pipeline/test/entities/token_order_test.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-
-import { TokenOrderbookSnapshot } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-const tokenOrderbookSnapshot: TokenOrderbookSnapshot = {
- source: 'ddextest',
- observedTimestamp: Date.now(),
- orderType: 'bid',
- price: new BigNumber(10.1),
- baseAssetSymbol: 'ETH',
- baseAssetAddress: '0x818e6fecd516ecc3849daf6845e3ec868087b755',
- baseVolume: new BigNumber(143),
- quoteAssetSymbol: 'ABC',
- quoteAssetAddress: '0x00923b9a074762b93650716333b3e1473a15048e',
- quoteVolume: new BigNumber(12.3234234),
-};
-
-describe('TokenOrderbookSnapshot entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const tokenOrderbookSnapshotRepository = connection.getRepository(TokenOrderbookSnapshot);
- await testSaveAndFindEntityAsync(tokenOrderbookSnapshotRepository, tokenOrderbookSnapshot);
- });
-});
diff --git a/packages/pipeline/test/entities/transaction_test.ts b/packages/pipeline/test/entities/transaction_test.ts
deleted file mode 100644
index 634844544..000000000
--- a/packages/pipeline/test/entities/transaction_test.ts
+++ /dev/null
@@ -1,26 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import 'mocha';
-import 'reflect-metadata';
-
-import { Transaction } from '../../src/entities';
-import { createDbConnectionOnceAsync } from '../db_setup';
-import { chaiSetup } from '../utils/chai_setup';
-
-import { testSaveAndFindEntityAsync } from './util';
-
-chaiSetup.configure();
-
-// tslint:disable:custom-no-magic-numbers
-describe('Transaction entity', () => {
- it('save/find', async () => {
- const connection = await createDbConnectionOnceAsync();
- const transactionRepository = connection.getRepository(Transaction);
- const transaction = new Transaction();
- transaction.blockHash = '0x6ff106d00b6c3746072fc06bae140fb2549036ba7bcf9184ae19a42fd33657fd';
- transaction.blockNumber = 6276262;
- transaction.gasPrice = new BigNumber(3000000);
- transaction.gasUsed = new BigNumber(125000);
- transaction.transactionHash = '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe';
- await testSaveAndFindEntityAsync(transactionRepository, transaction);
- });
-});
diff --git a/packages/pipeline/test/entities/util.ts b/packages/pipeline/test/entities/util.ts
deleted file mode 100644
index 42df23a4a..000000000
--- a/packages/pipeline/test/entities/util.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { Repository } from 'typeorm';
-
-const expect = chai.expect;
-
-/**
- * First saves the given entity to the database, then finds it and makes sure
- * that the found entity is exactly equal to the original one. This is a bare
- * minimum basic test to make sure that the entity type definition and our
- * database schema are aligned and that it is possible to save and find the
- * entity.
- * @param repository A TypeORM repository corresponding with the type of the entity.
- * @param entity An instance of a TypeORM entity which will be saved/retrieved from the database.
- */
-export async function testSaveAndFindEntityAsync<T>(repository: Repository<T>, entity: T): Promise<void> {
- // Note(albrow): We are forced to use an 'any' hack here because
- // TypeScript complains about stack depth when checking the types.
- await repository.save<any>(entity);
- const gotEntity = await repository.findOneOrFail({
- where: entity,
- });
- expect(gotEntity).deep.equal(entity);
-}
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_activity_types.json b/packages/pipeline/test/fixtures/copper/api_v1_activity_types.json
deleted file mode 100644
index dbd39c31b..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_activity_types.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "user": [
- { "id": 0, "category": "user", "name": "Note", "is_disabled": false, "count_as_interaction": false },
- { "id": 660496, "category": "user", "name": "To Do", "is_disabled": false, "count_as_interaction": false },
- { "id": 660495, "category": "user", "name": "Meeting", "is_disabled": false, "count_as_interaction": true },
- { "id": 660494, "category": "user", "name": "Phone Call", "is_disabled": false, "count_as_interaction": true }
- ],
- "system": [
- {
- "id": 1,
- "category": "system",
- "name": "Property Changed",
- "is_disabled": false,
- "count_as_interaction": false
- },
- {
- "id": 3,
- "category": "system",
- "name": "Pipeline Stage Changed",
- "is_disabled": false,
- "count_as_interaction": false
- }
- ]
-}
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_activity_types.ts b/packages/pipeline/test/fixtures/copper/api_v1_activity_types.ts
deleted file mode 100644
index fd2d62a6c..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_activity_types.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { CopperActivityType } from '../../../src/entities';
-const ParsedActivityTypes: CopperActivityType[] = [
- { id: 0, name: 'Note', category: 'user', isDisabled: false, countAsInteraction: false },
- { id: 660496, name: 'To Do', category: 'user', isDisabled: false, countAsInteraction: false },
- { id: 660495, name: 'Meeting', category: 'user', isDisabled: false, countAsInteraction: true },
- { id: 660494, name: 'Phone Call', category: 'user', isDisabled: false, countAsInteraction: true },
- { id: 1, name: 'Property Changed', category: 'system', isDisabled: false, countAsInteraction: false },
- {
- id: 3,
- name: 'Pipeline Stage Changed',
- category: 'system',
- isDisabled: false,
- countAsInteraction: false,
- },
-];
-export { ParsedActivityTypes };
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.json b/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.json
deleted file mode 100644
index c6665cb0f..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.json
+++ /dev/null
@@ -1,38 +0,0 @@
-[
- {
- "id": 261066,
- "name": "Integration Type",
- "canonical_name": null,
- "data_type": "MultiSelect",
- "available_on": ["opportunity", "company", "person"],
- "options": [
- { "id": 394020, "name": "Strategic Relationship", "rank": 7 },
- { "id": 394013, "name": "ERC-20 Exchange", "rank": 0 },
- { "id": 394014, "name": "ERC-721 Marketplace", "rank": 1 },
- { "id": 394015, "name": "Trade Widget", "rank": 2 },
- { "id": 394016, "name": "Prediction Market Exchange", "rank": 3 },
- { "id": 394017, "name": "Security Token Exchange", "rank": 4 },
- { "id": 394018, "name": "Complementary Company", "rank": 5 },
- { "id": 394019, "name": "Service Provider", "rank": 6 }
- ]
- },
- {
- "id": 261067,
- "name": "Company Type",
- "canonical_name": null,
- "data_type": "Dropdown",
- "available_on": ["company", "opportunity", "person"],
- "options": [
- { "id": 394129, "name": "Market Maker", "rank": 6 },
- { "id": 394130, "name": "Events", "rank": 2 },
- { "id": 394023, "name": "Exchange", "rank": 3 },
- { "id": 394024, "name": "Investor", "rank": 5 },
- { "id": 394026, "name": "Service Provider", "rank": 8 },
- { "id": 394027, "name": "Wallet", "rank": 9 },
- { "id": 394134, "name": "Game", "rank": 4 },
- { "id": 394025, "name": "OTC", "rank": 7 },
- { "id": 394021, "name": "Blockchain/Protocol", "rank": 0 },
- { "id": 394022, "name": "dApp", "rank": 1 }
- ]
- }
-]
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.ts b/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.ts
deleted file mode 100644
index a44bbd2c3..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_custom_field_definitions.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { CopperCustomField } from '../../../src/entities';
-const ParsedCustomFields: CopperCustomField[] = [
- {
- id: 394020,
- name: 'Strategic Relationship',
- dataType: 'Integration Type',
- fieldType: 'option',
- },
- { id: 394013, name: 'ERC-20 Exchange', dataType: 'Integration Type', fieldType: 'option' },
- { id: 394014, name: 'ERC-721 Marketplace', dataType: 'Integration Type', fieldType: 'option' },
- { id: 394015, name: 'Trade Widget', dataType: 'Integration Type', fieldType: 'option' },
- {
- id: 394016,
- name: 'Prediction Market Exchange',
- dataType: 'Integration Type',
- fieldType: 'option',
- },
- {
- id: 394017,
- name: 'Security Token Exchange',
- dataType: 'Integration Type',
- fieldType: 'option',
- },
- { id: 394018, name: 'Complementary Company', dataType: 'Integration Type', fieldType: 'option' },
- { id: 394019, name: 'Service Provider', dataType: 'Integration Type', fieldType: 'option' },
- { id: 261066, name: 'Integration Type', dataType: 'MultiSelect' },
- { id: 394129, name: 'Market Maker', dataType: 'Company Type', fieldType: 'option' },
- { id: 394130, name: 'Events', dataType: 'Company Type', fieldType: 'option' },
- { id: 394023, name: 'Exchange', dataType: 'Company Type', fieldType: 'option' },
- { id: 394024, name: 'Investor', dataType: 'Company Type', fieldType: 'option' },
- { id: 394026, name: 'Service Provider', dataType: 'Company Type', fieldType: 'option' },
- { id: 394027, name: 'Wallet', dataType: 'Company Type', fieldType: 'option' },
- { id: 394134, name: 'Game', dataType: 'Company Type', fieldType: 'option' },
- { id: 394025, name: 'OTC', dataType: 'Company Type', fieldType: 'option' },
- { id: 394021, name: 'Blockchain/Protocol', dataType: 'Company Type', fieldType: 'option' },
- { id: 394022, name: 'dApp', dataType: 'Company Type', fieldType: 'option' },
- { id: 261067, name: 'Company Type', dataType: 'Dropdown' },
-];
-export { ParsedCustomFields };
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_activities.json b/packages/pipeline/test/fixtures/copper/api_v1_list_activities.json
deleted file mode 100644
index a726111ac..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_activities.json
+++ /dev/null
@@ -1,242 +0,0 @@
-[
- {
- "id": 5015299552,
- "parent": { "id": 14667512, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1545329595,
- "old_value": { "id": 2392929, "name": "Evaluation" },
- "new_value": { "id": 2392931, "name": "Integration Started" },
- "date_created": 1545329595,
- "date_modified": 1545329595
- },
- {
- "id": 5010214065,
- "parent": { "id": 14978865, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1545245706,
- "old_value": { "id": 2392928, "name": "Intro" },
- "new_value": { "id": 2392929, "name": "Evaluation" },
- "date_created": 1545245706,
- "date_modified": 1545245706
- },
- {
- "id": 5006149111,
- "parent": { "id": 70430977, "type": "person" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1545166908,
- "old_value": null,
- "new_value": null,
- "date_created": 1545168280,
- "date_modified": 1545166908
- },
- {
- "id": 5005314622,
- "parent": { "id": 27778968, "type": "company" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1545080504,
- "old_value": null,
- "new_value": null,
- "date_created": 1545160479,
- "date_modified": 1545080504
- },
- {
- "id": 5000006802,
- "parent": { "id": 14956518, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1545071374,
- "old_value": null,
- "new_value": null,
- "date_created": 1545071500,
- "date_modified": 1545071374
- },
- {
- "id": 4985504199,
- "parent": { "id": 14912790, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544644058,
- "old_value": null,
- "new_value": null,
- "date_created": 1544644661,
- "date_modified": 1544644058
- },
- {
- "id": 4985456147,
- "parent": { "id": 14912790, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544644048,
- "old_value": null,
- "new_value": null,
- "date_created": 1544644053,
- "date_modified": 1544644048
- },
- {
- "id": 4980975996,
- "parent": { "id": 14902828, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544563171,
- "old_value": null,
- "new_value": null,
- "date_created": 1544563224,
- "date_modified": 1544563171
- },
- {
- "id": 4980910331,
- "parent": { "id": 14902828, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544562495,
- "old_value": { "id": 2392928, "name": "Intro" },
- "new_value": { "id": 2392931, "name": "Integration Started" },
- "date_created": 1544562495,
- "date_modified": 1544562495
- },
- {
- "id": 4980872220,
- "parent": { "id": 14888910, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544559279,
- "old_value": null,
- "new_value": null,
- "date_created": 1544562118,
- "date_modified": 1544559279
- },
- {
- "id": 4980508097,
- "parent": { "id": 14050167, "type": "opportunity" },
- "type": { "id": 1, "category": "system", "name": "Status Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544558077,
- "old_value": "Open",
- "new_value": "Won",
- "date_created": 1544558077,
- "date_modified": 1544558077
- },
- {
- "id": 4980508095,
- "parent": { "id": 66538237, "type": "person" },
- "type": { "id": 1, "category": "system" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544558077,
- "old_value": null,
- "new_value": null,
- "date_created": 1544558077,
- "date_modified": 1544558077
- },
- {
- "id": 4980508092,
- "parent": { "id": 27779020, "type": "company" },
- "type": { "id": 1, "category": "system" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544558077,
- "old_value": null,
- "new_value": null,
- "date_created": 1544558077,
- "date_modified": 1544558077
- },
- {
- "id": 4980507507,
- "parent": { "id": 14050167, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544558071,
- "old_value": { "id": 2392931, "name": "Integration Started" },
- "new_value": { "id": 2405442, "name": "Integration Complete" },
- "date_created": 1544558071,
- "date_modified": 1544558071
- },
- {
- "id": 4980479684,
- "parent": { "id": 14901232, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544557777,
- "old_value": { "id": 2392928, "name": "Intro" },
- "new_value": { "id": 2392929, "name": "Evaluation" },
- "date_created": 1544557777,
- "date_modified": 1544557777
- },
- {
- "id": 4980327164,
- "parent": { "id": 14901232, "type": "opportunity" },
- "type": { "id": 660495, "category": "user" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544554864,
- "old_value": null,
- "new_value": null,
- "date_created": 1544556132,
- "date_modified": 1544554864
- },
- {
- "id": 4975270470,
- "parent": { "id": 14888744, "type": "opportunity" },
- "type": { "id": 3, "category": "system", "name": "Stage Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544469501,
- "old_value": { "id": 2392928, "name": "Intro" },
- "new_value": { "id": 2392931, "name": "Integration Started" },
- "date_created": 1544469501,
- "date_modified": 1544469501
- },
- {
- "id": 4975255523,
- "parent": { "id": 64713448, "type": "person" },
- "type": { "id": 1, "category": "system" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544469389,
- "old_value": null,
- "new_value": null,
- "date_created": 1544469389,
- "date_modified": 1544469389
- },
- {
- "id": 4975255519,
- "parent": { "id": 13735617, "type": "opportunity" },
- "type": { "id": 1, "category": "system", "name": "Status Change" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544469388,
- "old_value": "Open",
- "new_value": "Won",
- "date_created": 1544469388,
- "date_modified": 1544469388
- },
- {
- "id": 4975255514,
- "parent": { "id": 27778968, "type": "company" },
- "type": { "id": 1, "category": "system" },
- "user_id": 680302,
- "details": "blah blah",
- "activity_date": 1544469388,
- "old_value": null,
- "new_value": null,
- "date_created": 1544469388,
- "date_modified": 1544469388
- }
-]
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_activities.ts b/packages/pipeline/test/fixtures/copper/api_v1_list_activities.ts
deleted file mode 100644
index 51ee9ced3..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_activities.ts
+++ /dev/null
@@ -1,305 +0,0 @@
-import { CopperActivity } from '../../../src/entities';
-
-const ParsedActivities: CopperActivity[] = [
- {
- id: 5015299552,
- parentId: 14667512,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1545329595000,
- dateModified: 1545329595000,
- oldValueId: 2392929,
- oldValueName: 'Evaluation',
- newValueId: 2392931,
- newValueName: 'Integration Started',
- },
- {
- id: 5010214065,
- parentId: 14978865,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1545245706000,
- dateModified: 1545245706000,
- oldValueId: 2392928,
- oldValueName: 'Intro',
- newValueId: 2392929,
- newValueName: 'Evaluation',
- },
- {
- id: 5006149111,
- parentId: 70430977,
- parentType: 'person',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1545168280000,
- dateModified: 1545166908000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 5005314622,
- parentId: 27778968,
- parentType: 'company',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1545160479000,
- dateModified: 1545080504000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 5000006802,
- parentId: 14956518,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1545071500000,
- dateModified: 1545071374000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4985504199,
- parentId: 14912790,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544644661000,
- dateModified: 1544644058000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4985456147,
- parentId: 14912790,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544644053000,
- dateModified: 1544644048000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980975996,
- parentId: 14902828,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544563224000,
- dateModified: 1544563171000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980910331,
- parentId: 14902828,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1544562495000,
- dateModified: 1544562495000,
- oldValueId: 2392928,
- oldValueName: 'Intro',
- newValueId: 2392931,
- newValueName: 'Integration Started',
- },
- {
- id: 4980872220,
- parentId: 14888910,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544562118000,
- dateModified: 1544559279000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980508097,
- parentId: 14050167,
- parentType: 'opportunity',
- typeId: 1,
- typeCategory: 'system',
- typeName: 'Status Change',
- userId: 680302,
- dateCreated: 1544558077000,
- dateModified: 1544558077000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980508095,
- parentId: 66538237,
- parentType: 'person',
- typeId: 1,
- typeCategory: 'system',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544558077000,
- dateModified: 1544558077000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980508092,
- parentId: 27779020,
- parentType: 'company',
- typeId: 1,
- typeCategory: 'system',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544558077000,
- dateModified: 1544558077000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4980507507,
- parentId: 14050167,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1544558071000,
- dateModified: 1544558071000,
- oldValueId: 2392931,
- oldValueName: 'Integration Started',
- newValueId: 2405442,
- newValueName: 'Integration Complete',
- },
- {
- id: 4980479684,
- parentId: 14901232,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1544557777000,
- dateModified: 1544557777000,
- oldValueId: 2392928,
- oldValueName: 'Intro',
- newValueId: 2392929,
- newValueName: 'Evaluation',
- },
- {
- id: 4980327164,
- parentId: 14901232,
- parentType: 'opportunity',
- typeId: 660495,
- typeCategory: 'user',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544556132000,
- dateModified: 1544554864000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4975270470,
- parentId: 14888744,
- parentType: 'opportunity',
- typeId: 3,
- typeCategory: 'system',
- typeName: 'Stage Change',
- userId: 680302,
- dateCreated: 1544469501000,
- dateModified: 1544469501000,
- oldValueId: 2392928,
- oldValueName: 'Intro',
- newValueId: 2392931,
- newValueName: 'Integration Started',
- },
- {
- id: 4975255523,
- parentId: 64713448,
- parentType: 'person',
- typeId: 1,
- typeCategory: 'system',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544469389000,
- dateModified: 1544469389000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4975255519,
- parentId: 13735617,
- parentType: 'opportunity',
- typeId: 1,
- typeCategory: 'system',
- typeName: 'Status Change',
- userId: 680302,
- dateCreated: 1544469388000,
- dateModified: 1544469388000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
- {
- id: 4975255514,
- parentId: 27778968,
- parentType: 'company',
- typeId: 1,
- typeCategory: 'system',
- typeName: undefined,
- userId: 680302,
- dateCreated: 1544469388000,
- dateModified: 1544469388000,
- oldValueId: undefined,
- oldValueName: undefined,
- newValueId: undefined,
- newValueName: undefined,
- },
-];
-export { ParsedActivities };
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json b/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json
deleted file mode 100644
index e7161085d..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.json
+++ /dev/null
@@ -1,577 +0,0 @@
-[
- {
- "id": 9150547,
- "name": "My Contact",
- "prefix": null,
- "first_name": "My",
- "last_name": "Contact",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mycontact@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1490045162,
- "date_modified": 1490045162
- },
- {
- "id": 9150552,
- "name": "My Contact",
- "prefix": null,
- "first_name": "My",
- "last_name": "Contact",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": null,
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [
- {
- "number": "415-123-45678",
- "category": "mobile"
- }
- ],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1490045237,
- "date_modified": 1490045237
- },
- {
- "id": 9150578,
- "name": "My Contact",
- "prefix": null,
- "first_name": "My",
- "last_name": "Contact",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": null,
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [
- {
- "number": "415-123-45678",
- "category": "mobile"
- }
- ],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1490045279,
- "date_modified": 1490045279
- },
- {
- "id": 8982554,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1489528899,
- "date_modified": 1489528899
- },
- {
- "id": 8982702,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@gmail.test",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1489531171,
- "date_modified": 1489531171
- },
- {
- "id": 9094361,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1489791225,
- "date_modified": 1489791225
- },
- {
- "id": 9094364,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "123456789012345678901234567890"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "123456789012345678901234567890"
- }
- ],
- "date_created": 1489791283,
- "date_modified": 1489791283
- },
- {
- "id": 9094371,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "123456789012345678901234567890"
- }
- ],
- "date_created": 1489791417,
- "date_modified": 1489791417
- },
- {
- "id": 9094372,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "123456789012345678901234567890"
- }
- ],
- "date_created": 1489791453,
- "date_modified": 1489791453
- },
- {
- "id": 9094373,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------"
- }
- ],
- "date_created": 1489791470,
- "date_modified": 1489791470
- },
- {
- "id": 9094383,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5-----"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------|--------1---------2---------3---------4---------5---------6---------7---------8---------9---------"
- }
- ],
- "date_created": 1489791672,
- "date_modified": 1489791672
- },
- {
- "id": 9174441,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "Text fields are 255 chars or less!"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "text \n text"
- }
- ],
- "date_created": 1490112942,
- "date_modified": 1490112942
- },
- {
- "id": 9174443,
- "name": "My Lead",
- "prefix": null,
- "first_name": "My",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": null,
- "assignee_id": null,
- "company_name": null,
- "customer_source_id": null,
- "details": null,
- "email": {
- "email": "mylead@noemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": null,
- "socials": [],
- "status": "New",
- "status_id": 208231,
- "tags": [],
- "title": null,
- "websites": [],
- "phone_numbers": [],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": "Text fields are 255 chars or less!"
- },
- {
- "custom_field_definition_id": 103481,
- "value": "text /n text"
- }
- ],
- "date_created": 1490112953,
- "date_modified": 1490112953
- },
- {
- "id": 8894157,
- "name": "Test Lead",
- "prefix": null,
- "first_name": "Test",
- "last_name": "Lead",
- "middle_name": null,
- "suffix": null,
- "address": {
- "street": "301 Howard St Ste 600",
- "city": "San Francisco",
- "state": "CA",
- "postal_code": "94105",
- "country": "US"
- },
- "assignee_id": 137658,
- "company_name": "Lead's Company",
- "customer_source_id": 331241,
- "details": "This is an update",
- "email": {
- "email": "address@workemail.com",
- "category": "work"
- },
- "interaction_count": 0,
- "monetary_value": 100,
- "socials": [
- {
- "url": "facebook.com/test_lead",
- "category": "facebook"
- }
- ],
- "status": "New",
- "status_id": 208231,
- "tags": ["tag 1", "tag 2"],
- "title": "Title",
- "websites": [
- {
- "url": "www.workwebsite.com",
- "category": "work"
- }
- ],
- "phone_numbers": [
- {
- "number": "415-999-4321",
- "category": "mobile"
- },
- {
- "number": "415-555-1234",
- "category": "work"
- }
- ],
- "custom_fields": [
- {
- "custom_field_definition_id": 100764,
- "value": null
- },
- {
- "custom_field_definition_id": 103481,
- "value": null
- }
- ],
- "date_created": 1489018784,
- "date_modified": 1496692911
- }
-]
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.ts b/packages/pipeline/test/fixtures/copper/api_v1_list_leads.ts
deleted file mode 100644
index b1f00cba7..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_leads.ts
+++ /dev/null
@@ -1,229 +0,0 @@
-import { CopperLead } from '../../../src/entities';
-const ParsedLeads: CopperLead[] = [
- {
- id: 9150547,
- name: 'My Contact',
- firstName: 'My',
- lastName: 'Contact',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1490045162000,
- dateModified: 1490045162000,
- },
- {
- id: 9150552,
- name: 'My Contact',
- firstName: 'My',
- lastName: 'Contact',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1490045237000,
- dateModified: 1490045237000,
- },
- {
- id: 9150578,
- name: 'My Contact',
- firstName: 'My',
- lastName: 'Contact',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1490045279000,
- dateModified: 1490045279000,
- },
- {
- id: 8982554,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489528899000,
- dateModified: 1489528899000,
- },
- {
- id: 8982702,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489531171000,
- dateModified: 1489531171000,
- },
- {
- id: 9094361,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791225000,
- dateModified: 1489791225000,
- },
- {
- id: 9094364,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791283000,
- dateModified: 1489791283000,
- },
- {
- id: 9094371,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791417000,
- dateModified: 1489791417000,
- },
- {
- id: 9094372,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791453000,
- dateModified: 1489791453000,
- },
- {
- id: 9094373,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791470000,
- dateModified: 1489791470000,
- },
- {
- id: 9094383,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1489791672000,
- dateModified: 1489791672000,
- },
- {
- id: 9174441,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1490112942000,
- dateModified: 1490112942000,
- },
- {
- id: 9174443,
- name: 'My Lead',
- firstName: 'My',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: undefined,
- companyName: undefined,
- customerSourceId: undefined,
- monetaryValue: undefined,
- status: 'New',
- statusId: 208231,
- title: undefined,
- dateCreated: 1490112953000,
- dateModified: 1490112953000,
- },
- {
- id: 8894157,
- name: 'Test Lead',
- firstName: 'Test',
- lastName: 'Lead',
- middleName: undefined,
- assigneeId: 137658,
- companyName: "Lead's Company",
- customerSourceId: 331241,
- monetaryValue: 100,
- status: 'New',
- statusId: 208231,
- title: 'Title',
- dateCreated: 1489018784000,
- dateModified: 1496692911000,
- },
-];
-
-export { ParsedLeads };
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.json b/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.json
deleted file mode 100644
index 34ac58c30..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.json
+++ /dev/null
@@ -1,662 +0,0 @@
-[
- {
- "id": 14050269,
- "name": "8Base RaaS",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 27778962,
- "company_name": "8base",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 66088850,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 81,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542653860,
- "date_last_contacted": 1544757550,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1538414159,
- "date_modified": 1544769562,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013, 394018] },
- { "custom_field_definition_id": 261067, "value": 394026 }
- ]
- },
- {
- "id": 14631430,
- "name": "Alice.si TW + ERC 20 Marketplace",
- "assignee_id": 680302,
- "close_date": "12/15/2018",
- "company_id": 30238847,
- "company_name": "Alice SI",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 69354024,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 4,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542304481,
- "date_last_contacted": 1542304800,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542304481,
- "date_modified": 1542304943,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013, 394015] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14632057,
- "name": "Altcoin.io Relayer",
- "assignee_id": 680302,
- "close_date": "12/15/2018",
- "company_id": 29936486,
- "company_name": "Altcoin.io",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 68724646,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 22,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542310909,
- "date_last_contacted": 1543864597,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542306827,
- "date_modified": 1543864667,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013, 394017] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14667523,
- "name": "Altcoin.io Relayer",
- "assignee_id": 680302,
- "close_date": "12/19/2018",
- "company_id": 29936486,
- "company_name": "Altcoin.io",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 68724646,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 21,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542657437,
- "date_last_contacted": 1543864597,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542657437,
- "date_modified": 1543864667,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013, 394017] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14666706,
- "name": "Amadeus Relayer",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 29243209,
- "company_name": "Amadeus",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 66912020,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 11,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542654284,
- "date_last_contacted": 1543264254,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542654284,
- "date_modified": 1543277520,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14666718,
- "name": "Ambo Relayer",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 29249190,
- "company_name": "Ambo",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 66927869,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 126,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542654352,
- "date_last_contacted": 1545252349,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542654352,
- "date_modified": 1545253761,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14164318,
- "name": "Augur TW",
- "assignee_id": 680302,
- "close_date": "12/10/2018",
- "company_id": 27778967,
- "company_name": "Augur",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 67248692,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 22,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1544469362,
- "date_last_contacted": 1544491567,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1539204858,
- "date_modified": 1544653867,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394021 }
- ]
- },
- {
- "id": 14666626,
- "name": "Autonio",
- "assignee_id": 680302,
- "close_date": "12/19/2018",
- "company_id": 27920701,
- "company_name": "Auton",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392931,
- "primary_contact_id": 64742640,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 54,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542653834,
- "date_last_contacted": 1542658568,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542653834,
- "date_modified": 1542658808,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013, 394019] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14050921,
- "name": "Axie Infinity 721 Marketplace",
- "assignee_id": 680302,
- "close_date": "11/1/2018",
- "company_id": 27779033,
- "company_name": "Axie Infinity",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392931,
- "primary_contact_id": 66499254,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 4,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1543861025,
- "date_last_contacted": 1539024738,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1538416687,
- "date_modified": 1543861025,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394014] },
- { "custom_field_definition_id": 261067, "value": 394134 }
- ]
- },
- {
- "id": 13735617,
- "name": "Balance TW",
- "assignee_id": 680302,
- "close_date": "12/10/2018",
- "company_id": 27778968,
- "company_name": "Balance",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 64713448,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 34,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1544469382,
- "date_last_contacted": 1545082200,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1535668009,
- "date_modified": 1545082454,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394027 }
- ]
- },
- {
- "id": 14667112,
- "name": "Bamboo Relayer",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 29243795,
- "company_name": "Bamboo Relay",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 66914687,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 46,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542655143,
- "date_last_contacted": 1545252349,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542655143,
- "date_modified": 1545253761,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 13627309,
- "name": "Ben TW",
- "assignee_id": 680302,
- "close_date": "1/1/2019",
- "company_id": 27702348,
- "company_name": "Ben",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 64262622,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 64,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1541527279,
- "date_last_contacted": 1541639882,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1534887789,
- "date_modified": 1541651395,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394027 }
- ]
- },
- {
- "id": 14808512,
- "name": "Bit2Me Relayer",
- "assignee_id": 680302,
- "close_date": "12/3/2018",
- "company_id": 30793050,
- "company_name": "Bit2Me",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405442,
- "primary_contact_id": 70267217,
- "priority": "None",
- "status": "Won",
- "tags": [],
- "interaction_count": 0,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1543861167,
- "date_last_contacted": null,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1543861167,
- "date_modified": 1543861189,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394013] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14050312,
- "name": "Bitcoin.tax Reporting Integration",
- "assignee_id": 680302,
- "close_date": "11/1/2018",
- "company_id": 27957614,
- "company_name": "Bitcoin",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392928,
- "primary_contact_id": 66539479,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 5,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1538414308,
- "date_last_contacted": 1536766098,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1538414308,
- "date_modified": 1538414314,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394019] },
- { "custom_field_definition_id": 261067, "value": 394026 }
- ]
- },
- {
- "id": 14331463,
- "name": "Bitpie TW",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 27779026,
- "company_name": "Bitpie",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 67700943,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 9,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1539984566,
- "date_last_contacted": 1541529947,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1539984566,
- "date_modified": 1541530233,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394027 }
- ]
- },
- {
- "id": 14331481,
- "name": "Bitski Wallet SDK TW",
- "assignee_id": 680302,
- "close_date": "11/19/2018",
- "company_id": 29489300,
- "company_name": "Bitski",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 67697528,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 23,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1539984735,
- "date_last_contacted": 1544811399,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1539984735,
- "date_modified": 1544818605,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394026 }
- ]
- },
- {
- "id": 14531554,
- "name": "BitUniverse TW",
- "assignee_id": 680302,
- "close_date": "12/6/2018",
- "company_id": 29901805,
- "company_name": "BitUniverse Co., Ltd (Cryptocurrency Portfolio)",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 68692107,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 15,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1543861104,
- "date_last_contacted": 1544803276,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1541527110,
- "date_modified": 1544812979,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394026 }
- ]
- },
- {
- "id": 14050895,
- "name": "BlitzPredict PMR",
- "assignee_id": 680302,
- "close_date": "11/1/2018",
- "company_id": 28758258,
- "company_name": "BlitzPredict",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 66378659,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 32,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1539985501,
- "date_last_contacted": 1544830560,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1538416597,
- "date_modified": 1544830709,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394016] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- },
- {
- "id": 14209841,
- "name": "Blockfolio TW",
- "assignee_id": 680302,
- "close_date": "11/15/2018",
- "company_id": 29332516,
- "company_name": "Blockfolio",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2405443,
- "primary_contact_id": 67247027,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 20,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1539984098,
- "date_last_contacted": 1539977661,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1539624801,
- "date_modified": 1539984098,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394015] },
- { "custom_field_definition_id": 261067, "value": 394026 }
- ]
- },
- {
- "id": 14633220,
- "name": "BlockSwap 721 / 1155 Conversational Marketplace",
- "assignee_id": 680302,
- "close_date": "12/15/2018",
- "company_id": 30210921,
- "company_name": "BlockSwap",
- "customer_source_id": null,
- "details": "blah blah",
- "loss_reason_id": null,
- "pipeline_id": 512676,
- "pipeline_stage_id": 2392929,
- "primary_contact_id": 69296220,
- "priority": "None",
- "status": "Open",
- "tags": [],
- "interaction_count": 82,
- "monetary_unit": null,
- "monetary_value": null,
- "converted_unit": null,
- "converted_value": null,
- "win_probability": 0,
- "date_stage_changed": 1542311056,
- "date_last_contacted": 1543536442,
- "leads_converted_from": [],
- "date_lead_created": null,
- "date_created": 1542311056,
- "date_modified": 1543557877,
- "custom_fields": [
- { "custom_field_definition_id": 261066, "value": [394014] },
- { "custom_field_definition_id": 261067, "value": 394023 }
- ]
- }
-]
diff --git a/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.ts b/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.ts
deleted file mode 100644
index 3c2d4ae5e..000000000
--- a/packages/pipeline/test/fixtures/copper/api_v1_list_opportunities.ts
+++ /dev/null
@@ -1,425 +0,0 @@
-// tslint:disable:custom-no-magic-numbers
-import { CopperOpportunity } from '../../../src/entities';
-const ParsedOpportunities: CopperOpportunity[] = [
- {
- id: 14050269,
- name: '8Base RaaS',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 27778962,
- companyName: '8base',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 66088850,
- priority: 'None',
- status: 'Won',
- interactionCount: 81,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1538414159000,
- dateModified: 1544769562000,
- customFields: { '261066': 394018, '261067': 394026 },
- },
- {
- id: 14631430,
- name: 'Alice.si TW + ERC 20 Marketplace',
- assigneeId: 680302,
- closeDate: '12/15/2018',
- companyId: 30238847,
- companyName: 'Alice SI',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 69354024,
- priority: 'None',
- status: 'Open',
- interactionCount: 4,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542304481000,
- dateModified: 1542304943000,
- customFields: { '261066': 394015, '261067': 394023 },
- },
- {
- id: 14632057,
- name: 'Altcoin.io Relayer',
- assigneeId: 680302,
- closeDate: '12/15/2018',
- companyId: 29936486,
- companyName: 'Altcoin.io',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 68724646,
- priority: 'None',
- status: 'Open',
- interactionCount: 22,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542306827000,
- dateModified: 1543864667000,
- customFields: { '261066': 394017, '261067': 394023 },
- },
- {
- id: 14667523,
- name: 'Altcoin.io Relayer',
- assigneeId: 680302,
- closeDate: '12/19/2018',
- companyId: 29936486,
- companyName: 'Altcoin.io',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 68724646,
- priority: 'None',
- status: 'Open',
- interactionCount: 21,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542657437000,
- dateModified: 1543864667000,
- customFields: { '261066': 394017, '261067': 394023 },
- },
- {
- id: 14666706,
- name: 'Amadeus Relayer',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 29243209,
- companyName: 'Amadeus',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 66912020,
- priority: 'None',
- status: 'Won',
- interactionCount: 11,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542654284000,
- dateModified: 1543277520000,
- customFields: { '261066': 394013, '261067': 394023 },
- },
- {
- id: 14666718,
- name: 'Ambo Relayer',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 29249190,
- companyName: 'Ambo',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 66927869,
- priority: 'None',
- status: 'Won',
- interactionCount: 126,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542654352000,
- dateModified: 1545253761000,
- customFields: { '261066': 394013, '261067': 394023 },
- },
- {
- id: 14164318,
- name: 'Augur TW',
- assigneeId: 680302,
- closeDate: '12/10/2018',
- companyId: 27778967,
- companyName: 'Augur',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 67248692,
- priority: 'None',
- status: 'Won',
- interactionCount: 22,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1539204858000,
- dateModified: 1544653867000,
- customFields: { '261066': 394015, '261067': 394021 },
- },
- {
- id: 14666626,
- name: 'Autonio',
- assigneeId: 680302,
- closeDate: '12/19/2018',
- companyId: 27920701,
- companyName: 'Auton',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392931,
- primaryContactId: 64742640,
- priority: 'None',
- status: 'Open',
- interactionCount: 54,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542653834000,
- dateModified: 1542658808000,
- customFields: { '261066': 394019, '261067': 394023 },
- },
- {
- id: 14050921,
- name: 'Axie Infinity 721 Marketplace',
- assigneeId: 680302,
- closeDate: '11/1/2018',
- companyId: 27779033,
- companyName: 'Axie Infinity',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392931,
- primaryContactId: 66499254,
- priority: 'None',
- status: 'Open',
- interactionCount: 4,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1538416687000,
- dateModified: 1543861025000,
- customFields: { '261066': 394014, '261067': 394134 },
- },
- {
- id: 13735617,
- name: 'Balance TW',
- assigneeId: 680302,
- closeDate: '12/10/2018',
- companyId: 27778968,
- companyName: 'Balance',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 64713448,
- priority: 'None',
- status: 'Won',
- interactionCount: 34,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1535668009000,
- dateModified: 1545082454000,
- customFields: { '261066': 394015, '261067': 394027 },
- },
- {
- id: 14667112,
- name: 'Bamboo Relayer',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 29243795,
- companyName: 'Bamboo Relay',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 66914687,
- priority: 'None',
- status: 'Won',
- interactionCount: 46,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542655143000,
- dateModified: 1545253761000,
- customFields: { '261066': 394013, '261067': 394023 },
- },
- {
- id: 13627309,
- name: 'Ben TW',
- assigneeId: 680302,
- closeDate: '1/1/2019',
- companyId: 27702348,
- companyName: 'Ben',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 64262622,
- priority: 'None',
- status: 'Open',
- interactionCount: 64,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1534887789000,
- dateModified: 1541651395000,
- customFields: { '261066': 394015, '261067': 394027 },
- },
- {
- id: 14808512,
- name: 'Bit2Me Relayer',
- assigneeId: 680302,
- closeDate: '12/3/2018',
- companyId: 30793050,
- companyName: 'Bit2Me',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405442,
- primaryContactId: 70267217,
- priority: 'None',
- status: 'Won',
- interactionCount: 0,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1543861167000,
- dateModified: 1543861189000,
- customFields: { '261066': 394013, '261067': 394023 },
- },
- {
- id: 14050312,
- name: 'Bitcoin.tax Reporting Integration',
- assigneeId: 680302,
- closeDate: '11/1/2018',
- companyId: 27957614,
- companyName: 'Bitcoin',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392928,
- primaryContactId: 66539479,
- priority: 'None',
- status: 'Open',
- interactionCount: 5,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1538414308000,
- dateModified: 1538414314000,
- customFields: { '261066': 394019, '261067': 394026 },
- },
- {
- id: 14331463,
- name: 'Bitpie TW',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 27779026,
- companyName: 'Bitpie',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 67700943,
- priority: 'None',
- status: 'Open',
- interactionCount: 9,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1539984566000,
- dateModified: 1541530233000,
- customFields: { '261066': 394015, '261067': 394027 },
- },
- {
- id: 14331481,
- name: 'Bitski Wallet SDK TW',
- assigneeId: 680302,
- closeDate: '11/19/2018',
- companyId: 29489300,
- companyName: 'Bitski',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 67697528,
- priority: 'None',
- status: 'Open',
- interactionCount: 23,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1539984735000,
- dateModified: 1544818605000,
- customFields: { '261066': 394015, '261067': 394026 },
- },
- {
- id: 14531554,
- name: 'BitUniverse TW',
- assigneeId: 680302,
- closeDate: '12/6/2018',
- companyId: 29901805,
- companyName: 'BitUniverse Co., Ltd (Cryptocurrency Portfolio)',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 68692107,
- priority: 'None',
- status: 'Open',
- interactionCount: 15,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1541527110000,
- dateModified: 1544812979000,
- customFields: { '261066': 394015, '261067': 394026 },
- },
- {
- id: 14050895,
- name: 'BlitzPredict PMR',
- assigneeId: 680302,
- closeDate: '11/1/2018',
- companyId: 28758258,
- companyName: 'BlitzPredict',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 66378659,
- priority: 'None',
- status: 'Open',
- interactionCount: 32,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1538416597000,
- dateModified: 1544830709000,
- customFields: { '261066': 394016, '261067': 394023 },
- },
- {
- id: 14209841,
- name: 'Blockfolio TW',
- assigneeId: 680302,
- closeDate: '11/15/2018',
- companyId: 29332516,
- companyName: 'Blockfolio',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2405443,
- primaryContactId: 67247027,
- priority: 'None',
- status: 'Open',
- interactionCount: 20,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1539624801000,
- dateModified: 1539984098000,
- customFields: { '261066': 394015, '261067': 394026 },
- },
- {
- id: 14633220,
- name: 'BlockSwap 721 / 1155 Conversational Marketplace',
- assigneeId: 680302,
- closeDate: '12/15/2018',
- companyId: 30210921,
- companyName: 'BlockSwap',
- customerSourceId: undefined,
- lossReasonId: undefined,
- pipelineId: 512676,
- pipelineStageId: 2392929,
- primaryContactId: 69296220,
- priority: 'None',
- status: 'Open',
- interactionCount: 82,
- monetaryValue: undefined,
- winProbability: 0,
- dateCreated: 1542311056000,
- dateModified: 1543557877000,
- customFields: { '261066': 394014, '261067': 394023 },
- },
-];
-export { ParsedOpportunities };
diff --git a/packages/pipeline/test/fixtures/copper/parsed_entities.ts b/packages/pipeline/test/fixtures/copper/parsed_entities.ts
deleted file mode 100644
index 1f49d38ed..000000000
--- a/packages/pipeline/test/fixtures/copper/parsed_entities.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export { ParsedActivityTypes } from './api_v1_activity_types';
-export { ParsedCustomFields } from './api_v1_custom_field_definitions';
-export { ParsedActivities } from './api_v1_list_activities';
-export { ParsedLeads } from './api_v1_list_leads';
-export { ParsedOpportunities } from './api_v1_list_opportunities';
diff --git a/packages/pipeline/test/parsers/bloxy/index_test.ts b/packages/pipeline/test/parsers/bloxy/index_test.ts
deleted file mode 100644
index 6aabb091d..000000000
--- a/packages/pipeline/test/parsers/bloxy/index_test.ts
+++ /dev/null
@@ -1,98 +0,0 @@
-// tslint:disable:custom-no-magic-numbers
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-import * as R from 'ramda';
-
-import { BLOXY_DEX_TRADES_URL, BloxyTrade } from '../../../src/data_sources/bloxy';
-import { DexTrade } from '../../../src/entities';
-import { _parseBloxyTrade } from '../../../src/parsers/bloxy';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-const baseInput: BloxyTrade = {
- tx_hash: '0xb93a7faf92efbbb5405c9a73cd4efd99702fe27c03ff22baee1f1b1e37b3a0bf',
- tx_time: '2018-11-21T09:06:28.000+00:00',
- tx_date: '2018-11-21',
- tx_sender: '0x00923b9a074762b93650716333b3e1473a15048e',
- smart_contract_id: 7091917,
- smart_contract_address: '0x818e6fecd516ecc3849daf6845e3ec868087b755',
- contract_type: 'DEX/Kyber Network Proxy',
- maker: '0x0000000000000000000000000000000000000001',
- taker: '0x0000000000000000000000000000000000000002',
- amountBuy: 1.011943163078103,
- makerFee: 38.912083,
- buyCurrencyId: 1,
- buySymbol: 'ETH',
- amountSell: 941.4997928436911,
- takerFee: 100.39,
- sellCurrencyId: 16610,
- sellSymbol: 'ELF',
- maker_annotation: 'random annotation',
- taker_annotation: 'random other annotation',
- protocol: 'Kyber Network Proxy',
- buyAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100d',
- sellAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100e',
-};
-
-const baseExpected: DexTrade = {
- sourceUrl: BLOXY_DEX_TRADES_URL,
- txHash: '0xb93a7faf92efbbb5405c9a73cd4efd99702fe27c03ff22baee1f1b1e37b3a0bf',
- txTimestamp: 1542791188000,
- txDate: '2018-11-21',
- txSender: '0x00923b9a074762b93650716333b3e1473a15048e',
- smartContractId: 7091917,
- smartContractAddress: '0x818e6fecd516ecc3849daf6845e3ec868087b755',
- contractType: 'DEX/Kyber Network Proxy',
- maker: '0x0000000000000000000000000000000000000001',
- taker: '0x0000000000000000000000000000000000000002',
- amountBuy: new BigNumber('1.011943163078103'),
- makerFeeAmount: new BigNumber('38.912083'),
- buyCurrencyId: 1,
- buySymbol: 'ETH',
- amountSell: new BigNumber('941.4997928436911'),
- takerFeeAmount: new BigNumber('100.39'),
- sellCurrencyId: 16610,
- sellSymbol: 'ELF',
- makerAnnotation: 'random annotation',
- takerAnnotation: 'random other annotation',
- protocol: 'Kyber Network Proxy',
- buyAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100d',
- sellAddress: '0xbf2179859fc6d5bee9bf9158632dc51678a4100e',
-};
-
-interface TestCase {
- input: BloxyTrade;
- expected: DexTrade;
-}
-
-const testCases: TestCase[] = [
- {
- input: baseInput,
- expected: baseExpected,
- },
- {
- input: R.merge(baseInput, { buyAddress: null, sellAddress: null }),
- expected: R.merge(baseExpected, { buyAddress: null, sellAddress: null }),
- },
- {
- input: R.merge(baseInput, {
- buySymbol:
- 'RING\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000',
- }),
- expected: R.merge(baseExpected, { buySymbol: 'RING' }),
- },
-];
-
-describe('bloxy', () => {
- describe('_parseBloxyTrade', () => {
- for (const [i, testCase] of testCases.entries()) {
- it(`converts BloxyTrade to DexTrade entity (${i + 1}/${testCases.length})`, () => {
- const actual = _parseBloxyTrade(testCase.input);
- expect(actual).deep.equal(testCase.expected);
- });
- }
- });
-});
diff --git a/packages/pipeline/test/parsers/copper/index_test.ts b/packages/pipeline/test/parsers/copper/index_test.ts
deleted file mode 100644
index bb8e70da1..000000000
--- a/packages/pipeline/test/parsers/copper/index_test.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import {
- CopperActivity,
- CopperActivityType,
- CopperCustomField,
- CopperLead,
- CopperOpportunity,
-} from '../../../src/entities';
-import {
- CopperActivityResponse,
- CopperActivityTypeCategory,
- CopperActivityTypeResponse,
- CopperCustomFieldResponse,
- CopperSearchResponse,
- parseActivities,
- parseActivityTypes,
- parseCustomFields,
- parseLeads,
- parseOpportunities,
-} from '../../../src/parsers/copper';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-type CopperResponse = CopperSearchResponse | CopperCustomFieldResponse;
-type CopperEntity = CopperLead | CopperActivity | CopperOpportunity | CopperActivityType | CopperCustomField;
-
-import * as activityTypesApiResponse from '../../fixtures/copper/api_v1_activity_types.json';
-import * as customFieldsApiResponse from '../../fixtures/copper/api_v1_custom_field_definitions.json';
-import * as listActivitiesApiResponse from '../../fixtures/copper/api_v1_list_activities.json';
-import * as listLeadsApiResponse from '../../fixtures/copper/api_v1_list_leads.json';
-import * as listOpportunitiesApiResponse from '../../fixtures/copper/api_v1_list_opportunities.json';
-import {
- ParsedActivities,
- ParsedActivityTypes,
- ParsedCustomFields,
- ParsedLeads,
- ParsedOpportunities,
-} from '../../fixtures/copper/parsed_entities';
-
-interface TestCase {
- input: CopperResponse[];
- expected: CopperEntity[];
- parseFn(input: CopperResponse[]): CopperEntity[];
-}
-const testCases: TestCase[] = [
- {
- input: listLeadsApiResponse,
- expected: ParsedLeads,
- parseFn: parseLeads,
- },
- {
- input: (listActivitiesApiResponse as unknown) as CopperActivityResponse[],
- expected: ParsedActivities,
- parseFn: parseActivities,
- },
- {
- input: listOpportunitiesApiResponse,
- expected: ParsedOpportunities,
- parseFn: parseOpportunities,
- },
- {
- input: customFieldsApiResponse,
- expected: ParsedCustomFields,
- parseFn: parseCustomFields,
- },
-];
-describe('Copper parser', () => {
- it('parses API responses', () => {
- testCases.forEach(testCase => {
- const actual: CopperEntity[] = testCase.parseFn(testCase.input);
- expect(actual).deep.equal(testCase.expected);
- });
- });
-
- // special case because the API response is not an array
- it('parses activity types API response', () => {
- const actual: CopperActivityType[] = parseActivityTypes((activityTypesApiResponse as unknown) as Map<
- CopperActivityTypeCategory,
- CopperActivityTypeResponse[]
- >);
- expect(actual).deep.equal(ParsedActivityTypes);
- });
-});
diff --git a/packages/pipeline/test/parsers/ddex_orders/index_test.ts b/packages/pipeline/test/parsers/ddex_orders/index_test.ts
deleted file mode 100644
index d6f69e090..000000000
--- a/packages/pipeline/test/parsers/ddex_orders/index_test.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { DdexMarket } from '../../../src/data_sources/ddex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../../src/entities';
-import { parseDdexOrder } from '../../../src/parsers/ddex_orders';
-import { OrderType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('ddex_orders', () => {
- describe('parseDdexOrder', () => {
- it('converts ddexOrder to TokenOrder entity', () => {
- const ddexOrder: [string, BigNumber] = ['0.5', new BigNumber(10)];
- const ddexMarket: DdexMarket = {
- id: 'ABC-DEF',
- quoteToken: 'ABC',
- quoteTokenDecimals: 5,
- quoteTokenAddress: '0x0000000000000000000000000000000000000000',
- baseToken: 'DEF',
- baseTokenDecimals: 2,
- baseTokenAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- minOrderSize: '0.1',
- pricePrecision: 1,
- priceDecimals: 1,
- amountDecimals: 0,
- };
- const observedTimestamp: number = Date.now();
- const orderType: OrderType = OrderType.Bid;
- const source: string = 'ddex';
-
- const expected = new TokenOrder();
- expected.source = 'ddex';
- expected.observedTimestamp = observedTimestamp;
- expected.orderType = OrderType.Bid;
- expected.price = new BigNumber(0.5);
- expected.quoteAssetSymbol = 'ABC';
- expected.quoteAssetAddress = '0x0000000000000000000000000000000000000000';
- expected.quoteVolume = new BigNumber(5);
- expected.baseAssetSymbol = 'DEF';
- expected.baseAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.baseVolume = new BigNumber(10);
-
- const actual = parseDdexOrder(ddexMarket, observedTimestamp, orderType, source, ddexOrder);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/events/erc20_events_test.ts b/packages/pipeline/test/parsers/events/erc20_events_test.ts
deleted file mode 100644
index 962c50f98..000000000
--- a/packages/pipeline/test/parsers/events/erc20_events_test.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { ERC20TokenApprovalEventArgs } from '@0x/contract-wrappers';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import 'mocha';
-
-import { ERC20ApprovalEvent } from '../../../src/entities';
-import { _convertToERC20ApprovalEvent } from '../../../src/parsers/events/erc20_events';
-import { _convertToExchangeFillEvent } from '../../../src/parsers/events/exchange_events';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('erc20_events', () => {
- describe('_convertToERC20ApprovalEvent', () => {
- it('converts LogWithDecodedArgs to ERC20ApprovalEvent entity', () => {
- const input: LogWithDecodedArgs<ERC20TokenApprovalEventArgs> = {
- address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- blockHash: '0xd2d7aafaa7102aec0bca8ef026d5a85133e87892334c46ee1e92e42912991c9b',
- blockNumber: 6281577,
- data: '0x000000000000000000000000000000000000000000000002b9cba5ee21ad3df9',
- logIndex: 43,
- topics: [
- '0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925',
- '0x0000000000000000000000000b65c5f6f3a05d6be5588a72b603360773b3fe04',
- '0x000000000000000000000000448a5065aebb8e423f0896e6c5d525c040f59af3',
- ],
- transactionHash: '0xcb46b19c786376a0a0140d51e3e606a4c4f926d8ca5434e96d2f69d04d8d9c7f',
- transactionIndex: 103,
- event: 'Approval',
- args: {
- _owner: '0x0b65c5f6f3a05d6be5588a72b603360773b3fe04',
- _spender: '0x448a5065aebb8e423f0896e6c5d525c040f59af3',
- _value: new BigNumber('50281464906893835769'),
- },
- };
-
- const expected = new ERC20ApprovalEvent();
- expected.tokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- expected.blockNumber = 6281577;
- expected.rawData = '0x000000000000000000000000000000000000000000000002b9cba5ee21ad3df9';
- expected.logIndex = 43;
- expected.transactionHash = '0xcb46b19c786376a0a0140d51e3e606a4c4f926d8ca5434e96d2f69d04d8d9c7f';
- expected.ownerAddress = '0x0b65c5f6f3a05d6be5588a72b603360773b3fe04';
- expected.spenderAddress = '0x448a5065aebb8e423f0896e6c5d525c040f59af3';
- expected.amount = new BigNumber('50281464906893835769');
-
- const actual = _convertToERC20ApprovalEvent(input);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/events/exchange_events_test.ts b/packages/pipeline/test/parsers/events/exchange_events_test.ts
deleted file mode 100644
index 956ad9ef8..000000000
--- a/packages/pipeline/test/parsers/events/exchange_events_test.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import { ExchangeFillEventArgs } from '@0x/contract-wrappers';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { LogWithDecodedArgs } from 'ethereum-types';
-import 'mocha';
-
-import { ExchangeFillEvent } from '../../../src/entities';
-import { _convertToExchangeFillEvent } from '../../../src/parsers/events/exchange_events';
-import { AssetType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('exchange_events', () => {
- describe('_convertToExchangeFillEvent', () => {
- it('converts LogWithDecodedArgs to ExchangeFillEvent entity', () => {
- const input: LogWithDecodedArgs<ExchangeFillEventArgs> = {
- logIndex: 102,
- transactionIndex: 38,
- transactionHash: '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe',
- blockHash: '',
- blockNumber: 6276262,
- address: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- data:
- '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000',
- topics: [
- '0x0bcc4c97732e47d9946f229edb95f5b6323f601300e4690de719993f3c371129',
- '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428',
- '0x000000000000000000000000c370d2a5920344aa6b7d8d11250e3e861434cbdd',
- '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a',
- ],
- event: 'Fill',
- args: {
- makerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- feeRecipientAddress: '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd',
- takerAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- senderAddress: '0xf6da68519f78b0d0bc93c701e86affcb75c92428',
- makerAssetFilledAmount: new BigNumber('10000000000000000'),
- takerAssetFilledAmount: new BigNumber('100000000000000000'),
- makerFeePaid: new BigNumber('0'),
- takerFeePaid: new BigNumber('12345'),
- orderHash: '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a',
- makerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- takerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- },
- };
- const expected = new ExchangeFillEvent();
- expected.contractAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b';
- expected.blockNumber = 6276262;
- expected.logIndex = 102;
- expected.rawData =
- '0x000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000f6da68519f78b0d0bc93c701e86affcb75c92428000000000000000000000000000000000000000000000000002386f26fc10000000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024f47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f49800000000000000000000000000000000000000000000000000000000';
- expected.transactionHash = '0x6dd106d002873746072fc5e496dd0fb2541b68c77bcf9184ae19a42fd33657fe';
- expected.makerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428';
- expected.takerAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428';
- expected.feeRecipientAddress = '0xc370d2a5920344aa6b7d8d11250e3e861434cbdd';
- expected.senderAddress = '0xf6da68519f78b0d0bc93c701e86affcb75c92428';
- expected.makerAssetFilledAmount = new BigNumber('10000000000000000');
- expected.takerAssetFilledAmount = new BigNumber('100000000000000000');
- expected.makerFeePaid = new BigNumber('0');
- expected.takerFeePaid = new BigNumber('12345');
- expected.orderHash = '0xab12ed2cbaa5615ab690b9da75a46e53ddfcf3f1a68655b5fe0d94c75a1aac4a';
- expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- expected.makerAssetType = AssetType.ERC20;
- expected.makerAssetProxyId = '0xf47261b0';
- expected.makerTokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- expected.makerTokenId = null;
- expected.rawTakerAssetData = '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498';
- expected.takerAssetType = AssetType.ERC20;
- expected.takerAssetProxyId = '0xf47261b0';
- expected.takerTokenAddress = '0xe41d2489571d322189246dafa5ebde1f4699f498';
- expected.takerTokenId = null;
- const actual = _convertToExchangeFillEvent(input);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/idex_orders/index_test.ts b/packages/pipeline/test/parsers/idex_orders/index_test.ts
deleted file mode 100644
index 48b019732..000000000
--- a/packages/pipeline/test/parsers/idex_orders/index_test.ts
+++ /dev/null
@@ -1,87 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { IdexOrderParam } from '../../../src/data_sources/idex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../../src/entities';
-import { parseIdexOrder } from '../../../src/parsers/idex_orders';
-import { OrderType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('idex_orders', () => {
- describe('parseIdexOrder', () => {
- // for market listed as 'DEF_ABC'.
- it('correctly converts bid type idexOrder to TokenOrder entity', () => {
- const idexOrder: [string, BigNumber] = ['0.5', new BigNumber(10)];
- const idexOrderParam: IdexOrderParam = {
- tokenBuy: '0x0000000000000000000000000000000000000000',
- buySymbol: 'ABC',
- buyPrecision: 2,
- amountBuy: '10',
- tokenSell: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- sellSymbol: 'DEF',
- sellPrecision: 2,
- amountSell: '5',
- expires: Date.now() + 100000,
- nonce: 1,
- user: '0x212345667543456435324564345643453453333',
- };
- const observedTimestamp: number = Date.now();
- const orderType: OrderType = OrderType.Bid;
- const source: string = 'idex';
-
- const expected = new TokenOrder();
- expected.source = 'idex';
- expected.observedTimestamp = observedTimestamp;
- expected.orderType = OrderType.Bid;
- expected.price = new BigNumber(0.5);
- expected.baseAssetSymbol = 'ABC';
- expected.baseAssetAddress = '0x0000000000000000000000000000000000000000';
- expected.baseVolume = new BigNumber(10);
- expected.quoteAssetSymbol = 'DEF';
- expected.quoteAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.quoteVolume = new BigNumber(5);
-
- const actual = parseIdexOrder(idexOrderParam, observedTimestamp, orderType, source, idexOrder);
- expect(actual).deep.equal(expected);
- });
- it('correctly converts ask type idexOrder to TokenOrder entity', () => {
- const idexOrder: [string, BigNumber] = ['0.5', new BigNumber(10)];
- const idexOrderParam: IdexOrderParam = {
- tokenBuy: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- buySymbol: 'DEF',
- buyPrecision: 2,
- amountBuy: '5',
- tokenSell: '0x0000000000000000000000000000000000000000',
- sellSymbol: 'ABC',
- sellPrecision: 2,
- amountSell: '10',
- expires: Date.now() + 100000,
- nonce: 1,
- user: '0x212345667543456435324564345643453453333',
- };
- const observedTimestamp: number = Date.now();
- const orderType: OrderType = OrderType.Ask;
- const source: string = 'idex';
-
- const expected = new TokenOrder();
- expected.source = 'idex';
- expected.observedTimestamp = observedTimestamp;
- expected.orderType = OrderType.Ask;
- expected.price = new BigNumber(0.5);
- expected.baseAssetSymbol = 'ABC';
- expected.baseAssetAddress = '0x0000000000000000000000000000000000000000';
- expected.baseVolume = new BigNumber(10);
- expected.quoteAssetSymbol = 'DEF';
- expected.quoteAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.quoteVolume = new BigNumber(5);
-
- const actual = parseIdexOrder(idexOrderParam, observedTimestamp, orderType, source, idexOrder);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/oasis_orders/index_test.ts b/packages/pipeline/test/parsers/oasis_orders/index_test.ts
deleted file mode 100644
index 401fedff8..000000000
--- a/packages/pipeline/test/parsers/oasis_orders/index_test.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { OasisMarket } from '../../../src/data_sources/oasis';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../../src/entities';
-import { parseOasisOrder } from '../../../src/parsers/oasis_orders';
-import { OrderType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('oasis_orders', () => {
- describe('parseOasisOrder', () => {
- it('converts oasisOrder to TokenOrder entity', () => {
- const oasisOrder: [string, BigNumber] = ['0.5', new BigNumber(10)];
- const oasisMarket: OasisMarket = {
- id: 'ABCDEF',
- base: 'DEF',
- quote: 'ABC',
- buyVol: 100,
- sellVol: 200,
- price: 1,
- high: 1,
- low: 0,
- };
- const observedTimestamp: number = Date.now();
- const orderType: OrderType = OrderType.Bid;
- const source: string = 'oasis';
-
- const expected = new TokenOrder();
- expected.source = 'oasis';
- expected.observedTimestamp = observedTimestamp;
- expected.orderType = OrderType.Bid;
- expected.price = new BigNumber(0.5);
- expected.baseAssetSymbol = 'DEF';
- expected.baseAssetAddress = null;
- expected.baseVolume = new BigNumber(10);
- expected.quoteAssetSymbol = 'ABC';
- expected.quoteAssetAddress = null;
- expected.quoteVolume = new BigNumber(5);
-
- const actual = parseOasisOrder(oasisMarket, observedTimestamp, orderType, source, oasisOrder);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/ohlcv_external/crypto_compare_test.ts b/packages/pipeline/test/parsers/ohlcv_external/crypto_compare_test.ts
deleted file mode 100644
index 118cafc5e..000000000
--- a/packages/pipeline/test/parsers/ohlcv_external/crypto_compare_test.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-import * as R from 'ramda';
-
-import { CryptoCompareOHLCVRecord } from '../../../src/data_sources/ohlcv_external/crypto_compare';
-import { OHLCVExternal } from '../../../src/entities';
-import { OHLCVMetadata, parseRecords } from '../../../src/parsers/ohlcv_external/crypto_compare';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('ohlcv_external parser (Crypto Compare)', () => {
- describe('parseRecords', () => {
- const record: CryptoCompareOHLCVRecord = {
- time: 200,
- close: 100,
- high: 101,
- low: 99,
- open: 98,
- volumefrom: 1234,
- volumeto: 4321,
- };
-
- const metadata: OHLCVMetadata = {
- fromSymbol: 'ETH',
- toSymbol: 'ZRX',
- exchange: 'CCCAGG',
- source: 'CryptoCompare',
- observedTimestamp: new Date().getTime(),
- interval: 100000,
- };
-
- const entity = new OHLCVExternal();
- entity.exchange = metadata.exchange;
- entity.fromSymbol = metadata.fromSymbol;
- entity.toSymbol = metadata.toSymbol;
- entity.startTime = 100000;
- entity.endTime = 200000;
- entity.open = record.open;
- entity.close = record.close;
- entity.low = record.low;
- entity.high = record.high;
- entity.volumeFrom = record.volumefrom;
- entity.volumeTo = record.volumeto;
- entity.source = metadata.source;
- entity.observedTimestamp = metadata.observedTimestamp;
-
- it('converts Crypto Compare OHLCV records to OHLCVExternal entity', () => {
- const input = [record, R.merge(record, { time: 300 }), R.merge(record, { time: 400 })];
- const expected = [
- entity,
- R.merge(entity, { startTime: 200000, endTime: 300000 }),
- R.merge(entity, { startTime: 300000, endTime: 400000 }),
- ];
-
- const actual = parseRecords(input, metadata);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/paradex_orders/index_test.ts b/packages/pipeline/test/parsers/paradex_orders/index_test.ts
deleted file mode 100644
index c5dd8751b..000000000
--- a/packages/pipeline/test/parsers/paradex_orders/index_test.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { ParadexMarket, ParadexOrder } from '../../../src/data_sources/paradex';
-import { TokenOrderbookSnapshot as TokenOrder } from '../../../src/entities';
-import { parseParadexOrder } from '../../../src/parsers/paradex_orders';
-import { OrderType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('paradex_orders', () => {
- describe('parseParadexOrder', () => {
- it('converts ParadexOrder to TokenOrder entity', () => {
- const paradexOrder: ParadexOrder = {
- amount: '412',
- price: '0.1245',
- };
- const paradexMarket: ParadexMarket = {
- id: '2',
- symbol: 'ABC/DEF',
- baseToken: 'DEF',
- quoteToken: 'ABC',
- minOrderSize: '0.1',
- maxOrderSize: '1000',
- priceMaxDecimals: 5,
- amountMaxDecimals: 5,
- baseTokenAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- quoteTokenAddress: '0x0000000000000000000000000000000000000000',
- };
- const observedTimestamp: number = Date.now();
- const orderType: OrderType = OrderType.Bid;
- const source: string = 'paradex';
-
- const expected = new TokenOrder();
- expected.source = 'paradex';
- expected.observedTimestamp = observedTimestamp;
- expected.orderType = OrderType.Bid;
- expected.price = new BigNumber(0.1245);
- expected.baseAssetSymbol = 'DEF';
- expected.baseAssetAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.baseVolume = new BigNumber(412);
- expected.quoteAssetSymbol = 'ABC';
- expected.quoteAssetAddress = '0x0000000000000000000000000000000000000000';
- expected.quoteVolume = new BigNumber(412 * 0.1245);
-
- const actual = parseParadexOrder(paradexMarket, observedTimestamp, orderType, source, paradexOrder);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/sra_orders/index_test.ts b/packages/pipeline/test/parsers/sra_orders/index_test.ts
deleted file mode 100644
index 838171a72..000000000
--- a/packages/pipeline/test/parsers/sra_orders/index_test.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import { APIOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { SraOrder } from '../../../src/entities';
-import { _convertToEntity } from '../../../src/parsers/sra_orders';
-import { AssetType } from '../../../src/types';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('sra_orders', () => {
- describe('_convertToEntity', () => {
- it('converts ApiOrder to SraOrder entity', () => {
- const input: APIOrder = {
- order: {
- makerAddress: '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81',
- takerAddress: '0x0000000000000000000000000000000000000000',
- feeRecipientAddress: '0xa258b39954cef5cb142fd567a46cddb31a670124',
- senderAddress: '0x0000000000000000000000000000000000000000',
- makerAssetAmount: new BigNumber('1619310371000000000'),
- takerAssetAmount: new BigNumber('8178335207070707070707'),
- makerFee: new BigNumber('0'),
- takerFee: new BigNumber('0'),
- exchangeAddress: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- expirationTimeSeconds: new BigNumber('1538529488'),
- signature:
- '0x1b5a5d672b0d647b5797387ccbb89d822d5d2e873346b014f4ff816ff0783f2a7a0d2824d2d7042ec8ea375bc7f870963e1cb8248f1db03ddf125e27b5963aa11f03',
- salt: new BigNumber('1537924688891'),
- makerAssetData: '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- takerAssetData: '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18',
- },
- metaData: { isThisArbitraryData: true, powerLevel: 9001 },
- };
- const expected = new SraOrder();
- expected.exchangeAddress = '0x4f833a24e1f95d70f028921e27040ca56e09ab0b';
- expected.orderHashHex = '0x1bdbeb0d088a33da28b9ee6d94e8771452f90f4a69107da2fa75195d61b9a1c9';
- expected.makerAddress = '0xb45df06e38540a675fdb5b598abf2c0dbe9d6b81';
- expected.takerAddress = '0x0000000000000000000000000000000000000000';
- expected.feeRecipientAddress = '0xa258b39954cef5cb142fd567a46cddb31a670124';
- expected.senderAddress = '0x0000000000000000000000000000000000000000';
- expected.makerAssetAmount = new BigNumber('1619310371000000000');
- expected.takerAssetAmount = new BigNumber('8178335207070707070707');
- expected.makerFee = new BigNumber('0');
- expected.takerFee = new BigNumber('0');
- expected.expirationTimeSeconds = new BigNumber('1538529488');
- expected.salt = new BigNumber('1537924688891');
- expected.signature =
- '0x1b5a5d672b0d647b5797387ccbb89d822d5d2e873346b014f4ff816ff0783f2a7a0d2824d2d7042ec8ea375bc7f870963e1cb8248f1db03ddf125e27b5963aa11f03';
- expected.rawMakerAssetData = '0xf47261b0000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- expected.makerAssetType = AssetType.ERC20;
- expected.makerAssetProxyId = '0xf47261b0';
- expected.makerTokenAddress = '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2';
- expected.makerTokenId = null;
- expected.rawTakerAssetData = '0xf47261b000000000000000000000000042d6622dece394b54999fbd73d108123806f6a18';
- expected.takerAssetType = AssetType.ERC20;
- expected.takerAssetProxyId = '0xf47261b0';
- expected.takerTokenAddress = '0x42d6622dece394b54999fbd73d108123806f6a18';
- expected.takerTokenId = null;
- expected.metadataJson = '{"isThisArbitraryData":true,"powerLevel":9001}';
-
- const actual = _convertToEntity(input);
- expect(actual).deep.equal(expected);
- });
- });
-});
diff --git a/packages/pipeline/test/parsers/utils/index_test.ts b/packages/pipeline/test/parsers/utils/index_test.ts
deleted file mode 100644
index 5a0d0f182..000000000
--- a/packages/pipeline/test/parsers/utils/index_test.ts
+++ /dev/null
@@ -1,30 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import 'mocha';
-
-import { aggregateOrders, GenericRawOrder } from '../../../src/parsers/utils';
-import { chaiSetup } from '../../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-// tslint:disable:custom-no-magic-numbers
-describe('aggregateOrders', () => {
- it('aggregates order by price point', () => {
- const input = [
- { price: '1', amount: '20', orderHash: 'testtest', total: '20' },
- { price: '1', amount: '30', orderHash: 'testone', total: '30' },
- { price: '2', amount: '100', orderHash: 'testtwo', total: '200' },
- ];
- const expected = [['1', new BigNumber(50)], ['2', new BigNumber(100)]];
- const actual = aggregateOrders(input);
- expect(actual).deep.equal(expected);
- });
-
- it('handles empty orders gracefully', () => {
- const input: GenericRawOrder[] = [];
- const expected: Array<[string, BigNumber]> = [];
- const actual = aggregateOrders(input);
- expect(actual).deep.equal(expected);
- });
-});
diff --git a/packages/pipeline/test/utils/chai_setup.ts b/packages/pipeline/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/pipeline/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/pipeline/tsconfig.json b/packages/pipeline/tsconfig.json
deleted file mode 100644
index 45e07374c..000000000
--- a/packages/pipeline/tsconfig.json
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "emitDecoratorMetadata": true,
- "experimentalDecorators": true,
- "resolveJsonModule": true
- },
- "include": ["./src/**/*", "./test/**/*", "./migrations/**/*"],
- "files": [
- "./test/fixtures/copper/api_v1_activity_types.json",
- "./test/fixtures/copper/api_v1_custom_field_definitions.json",
- "./test/fixtures/copper/api_v1_list_activities.json",
- "./test/fixtures/copper/api_v1_list_leads.json",
- "./test/fixtures/copper/api_v1_list_opportunities.json"
- ]
-}
diff --git a/packages/pipeline/tslint.json b/packages/pipeline/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/pipeline/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/pipeline/typedoc-tsconfig.json b/packages/pipeline/typedoc-tsconfig.json
deleted file mode 100644
index 8b0ff51c1..000000000
--- a/packages/pipeline/typedoc-tsconfig.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": ".",
- "emitDecoratorMetadata": true,
- "experimentalDecorators": true
- },
- "include": ["./src/**/*", "./test/**/*", "./migrations/**/*"]
-}
diff --git a/packages/react-docs/.npmignore b/packages/react-docs/.npmignore
deleted file mode 100644
index d645458f6..000000000
--- a/packages/react-docs/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/src/
-/scripts/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/react-docs/CHANGELOG.json b/packages/react-docs/CHANGELOG.json
deleted file mode 100644
index 8b418fc11..000000000
--- a/packages/react-docs/CHANGELOG.json
+++ /dev/null
@@ -1,407 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.25",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.24",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.23",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.22",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.21",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1543401373,
- "version": "1.0.20",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.19",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "1.0.18",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "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": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.17",
- "changes": [
- {
- "note": "Nest MD files under versions so that you can update them for future versions",
- "pr": 844
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.0.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.0.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.13",
- "changes": [
- {
- "note": "Incorrect publish that was unpublished"
- }
- ],
- "timestamp": 1527810075
- },
- {
- "timestamp": 1527009133,
- "version": "0.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525466747,
- "version": "0.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.8",
- "changes": [
- {
- "note": "Added support for rendering default param values",
- "pr": 519
- },
- {
- "note": "Added support for rendering nested function types within interface types",
- "pr": 519
- },
- {
- "note": "Improve type comment rendering",
- "pr": 535
- }
- ],
- "timestamp": 1524044013
- },
- {
- "timestamp": 1523462196,
- "version": "0.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522673609,
- "version": "0.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.5",
- "changes": [
- {
- "note": "Handle `reflection` type rendering so that anonymous function type declarations render properly",
- "pr": 465
- },
- {
- "note": "Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures.",
- "pr": 465
- },
- {
- "note": "Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks.",
- "pr": 465
- },
- {
- "note": "Add support for documenting exported functions.",
- "pr": 465
- }
- ],
- "timestamp": 1522658513
- },
- {
- "version": "0.0.3",
- "changes": [
- {
- "note": "Move TS typings from devDependencies to dependencies since they are needed by the package user."
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.0.2",
- "changes": [
- {
- "note": "Move example out into a separate sub-package"
- },
- {
- "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package",
- "pr": 452
- }
- ],
- "timestamp": 1521298800
- }
-]
diff --git a/packages/react-docs/CHANGELOG.md b/packages/react-docs/CHANGELOG.md
deleted file mode 100644
index 5ec82b5be..000000000
--- a/packages/react-docs/CHANGELOG.md
+++ /dev/null
@@ -1,176 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.25 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.24 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.23 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.22 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.0.21 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.0.20 - _November 28, 2018_
-
- * Dependencies updated
-
-## v1.0.19 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.18 - _November 14, 2018_
-
- * Dependencies updated
-
-## v1.0.17 - _November 13, 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_
-
- * Dependencies updated
-
-## v0.0.17 - _July 18, 2018_
-
- * Nest MD files under versions so that you can update them for future versions (#844)
-
-## v0.0.16 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.0.15 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.0.14 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.13 - _May 31, 2018_
-
- * Incorrect publish that was unpublished
-
-## v0.0.12 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.0.11 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.10 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.9 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.8 - _April 18, 2018_
-
- * Added support for rendering default param values (#519)
- * Added support for rendering nested function types within interface types (#519)
- * Improve type comment rendering (#535)
-
-## v0.0.7 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.0.6 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.0.5 - _April 2, 2018_
-
- * Handle `reflection` type rendering so that anonymous function type declarations render properly (#465)
- * Rename `MethodSignature` to `Signature` and change it's props so that it can be used to render method and function signatures. (#465)
- * Rename `MethodBlock` to `SignatureBlock` since it is not used to render method and function signature blocks. (#465)
- * Add support for documenting exported functions. (#465)
-
-## v0.0.3 - _March 17, 2018_
-
- * Move TS typings from devDependencies to dependencies since they are needed by the package user.
-
-## v0.0.2 - _March 17, 2018_
-
- * Move example out into a separate sub-package
- * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452)
diff --git a/packages/react-docs/README.md b/packages/react-docs/README.md
deleted file mode 100644
index 7b1f4f80a..000000000
--- a/packages/react-docs/README.md
+++ /dev/null
@@ -1,96 +0,0 @@
-## @0x/react-docs
-
-#### WARNING: Alpha software. Expect things to break when trying to use.
-
-A full-page React component for rendering beautiful documentation for Solidity and Typescript code generated with [TypeDoc](http://typedoc.org/) or [sol-doc](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-doc).
-
-<div style="text-align: center;">
-<img src="https://s3.eu-west-2.amazonaws.com/0x-wiki-images/screenshot.png" style="padding-bottom: 20px; padding-top: 20px;" width="80%" />
-<div>react-docs generating 0x's smart contract docs</div>
-</div>
-
-#### Features
-
-- Mobile optimized
-- Reads Javadoc-style comments in your code to generate class/method/argument/return/type comments.
-- Syntax highlighting support for TypeScript & Solidity
-- Type declaration linking
-- Type declaration popovers to avoid clicking through to the definition
-- Section/method/type anchors for easily pointing others to a specific part of your docs.
-- Version picker
-- Customizable sidebar header
-- Supports custom markdown sections so you can easily add an intro or installation instructions.
-
-## Installation
-
-```bash
-yarn add @0x/react-docs
-```
-
-## Usage
-
-This package exposes both a single `Documentation` react component that will render a docs page, as well as all of it's sub-components in case someone wants to build their own layout.
-
-Currently this package still has some external dependencies outside of the `Documentation` component, so please start your project off by copying the [react-docs-example](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs-example) directory and modifying it there. If you need changes in the [react-docs](https://github.com/0xProject/0x-monorepo/tree/development/packages/react-docs) package, fork the 0x monorepo, make the required changes and submit a PR. Until we merge it, you can have your project depend on your own custom fork.
-
-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"],
-}
-```
-
-## Future improvements
-
-Feel free to contribute to these improvements!
-
-- Allow user to pass in styling for all major elements similar to [Material-UI](http://www.material-ui.com/).
-- Allow user to define an alternative font and have it change everywhere.
-- Add source links to Solidity docs (currently unsupported by solc, which underlies sol-doc).
-
-## 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/react-docs yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/react-docs yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/react-docs/package.json b/packages/react-docs/package.json
deleted file mode 100644
index f8f2b6276..000000000
--- a/packages/react-docs/package.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "name": "@0x/react-docs",
- "version": "1.0.25",
- "engines": {
- "node": ">=6.12"
- },
- "description": "React documentation component for rendering TypeDoc & sol-doc generated JSON",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "lint": "tslint --format stylish --project .",
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib"
- },
- "author": "Fabio Berger",
- "license": "Apache-2.0",
- "bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
- },
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/react-docs/README.md",
- "repository": {
- "type": "git",
- "url": "https://github.com/0xProject/0x-monorepo.git"
- },
- "devDependencies": {
- "@0x/dev-utils": "^1.0.24",
- "@0x/tslint-config": "^2.0.2",
- "@types/compare-versions": "^3.0.0",
- "@types/styled-components": "4.0.0",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "^5.9.1",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/react-shared": "^1.1.2",
- "@0x/types": "^1.5.2",
- "@0x/utils": "^3.0.1",
- "@types/lodash": "4.14.104",
- "@types/material-ui": "^0.20.0",
- "@types/node": "*",
- "@types/react": "*",
- "@types/react-dom": "*",
- "@types/react-scroll": "1.5.3",
- "basscss": "^8.0.3",
- "compare-versions": "^3.0.1",
- "lodash": "^4.17.5",
- "material-ui": "^0.20.0",
- "react": "^16.5.2",
- "react-dom": "^16.5.2",
- "react-markdown": "^3.2.2",
- "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
- "react-tooltip": "^3.2.7",
- "semver": "5.5.0",
- "styled-components": "^4.0.1"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/react-docs/src/components/badge.tsx b/packages/react-docs/src/components/badge.tsx
deleted file mode 100644
index e3d5be273..000000000
--- a/packages/react-docs/src/components/badge.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as React from 'react';
-
-const styles: Styles = {
- badge: {
- width: 50,
- fontSize: 11,
- height: 10,
- borderRadius: 5,
- lineHeight: 0.9,
- fontFamily: 'Roboto Mono',
- marginLeft: 3,
- marginRight: 3,
- },
-};
-
-export interface BadgeProps {
- title: string;
- backgroundColor: string;
-}
-
-export interface BadgeState {
- isHovering: boolean;
-}
-
-export class Badge extends React.Component<BadgeProps, BadgeState> {
- constructor(props: BadgeProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public render(): React.ReactNode {
- const badgeStyle = {
- ...styles.badge,
- backgroundColor: this.props.backgroundColor,
- opacity: this.state.isHovering ? 0.7 : 1,
- };
- return (
- <div
- className="p1 center"
- style={badgeStyle}
- onMouseOver={this._setHoverState.bind(this, true)}
- onMouseOut={this._setHoverState.bind(this, false)}
- >
- {this.props.title}
- </div>
- );
- }
- private _setHoverState(isHovering: boolean): void {
- this.setState({
- isHovering,
- });
- }
-}
diff --git a/packages/react-docs/src/components/comment.tsx b/packages/react-docs/src/components/comment.tsx
deleted file mode 100644
index 4d34f711e..000000000
--- a/packages/react-docs/src/components/comment.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import { colors, MarkdownCodeBlock } from '@0x/react-shared';
-import * as React from 'react';
-import * as ReactMarkdown from 'react-markdown';
-
-export interface CommentProps {
- comment: string;
- className?: string;
-}
-
-const defaultProps = {
- className: '',
-};
-
-export const Comment: React.SFC<CommentProps> = (props: CommentProps) => {
- return (
- <div className={`${props.className} comment`} style={{ color: colors.greyTheme }}>
- <ReactMarkdown source={props.comment} renderers={{ code: MarkdownCodeBlock }} />
- </div>
- );
-};
-
-Comment.defaultProps = defaultProps;
diff --git a/packages/react-docs/src/components/custom_enum.tsx b/packages/react-docs/src/components/custom_enum.tsx
deleted file mode 100644
index e971a012a..000000000
--- a/packages/react-docs/src/components/custom_enum.tsx
+++ /dev/null
@@ -1,33 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { CustomType } from '@0x/types';
-
-const STRING_ENUM_CODE_PREFIX = ' strEnum(';
-
-export interface CustomEnumProps {
- type: CustomType;
-}
-
-// This component renders custom string enums that was a work-around for versions of
-// TypeScript <2.4.0 that did not support them natively. We keep it around to support
-// older versions of 0x.js <0.9.0
-export const CustomEnum = (props: CustomEnumProps) => {
- const type = props.type;
- if (!_.startsWith(type.defaultValue, STRING_ENUM_CODE_PREFIX)) {
- logUtils.log('We do not yet support `Variable` types that are not strEnums');
- return null;
- }
- // Remove the prefix and postfix, leaving only the strEnum values without quotes.
- const enumValues = type.defaultValue.slice(10, -3).replace(/'/g, '');
- return (
- <span>
- {`{`}
- {'\t'}
- {enumValues}
- <br />
- {`}`}
- </span>
- );
-};
diff --git a/packages/react-docs/src/components/doc_reference.tsx b/packages/react-docs/src/components/doc_reference.tsx
deleted file mode 100644
index 424fe9ecf..000000000
--- a/packages/react-docs/src/components/doc_reference.tsx
+++ /dev/null
@@ -1,318 +0,0 @@
-import {
- colors,
- constants as sharedConstants,
- EtherscanLinkSuffixes,
- HeaderSizes,
- Link,
- MarkdownSection,
- Networks,
- SectionHeader,
- utils as sharedUtils,
-} from '@0x/react-shared';
-import {
- DocAgnosticFormat,
- Event,
- ExternalExportToLink,
- Property,
- SolidityMethod,
- TypeDefinitionByName,
- TypescriptFunction,
- TypescriptMethod,
-} from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as semver from 'semver';
-
-import { DocsInfo } from '../docs_info';
-import { AddressByContractName, SupportedDocJson } from '../types';
-import { constants } from '../utils/constants';
-
-import { Badge } from './badge';
-import { Comment } from './comment';
-import { EventDefinition } from './event_definition';
-import { PropertyBlock } from './property_block';
-import { SignatureBlock } from './signature_block';
-import { TypeDefinition } from './type_definition';
-
-const networkNameToColor: { [network: string]: string } = {
- [Networks.Kovan]: colors.purple,
- [Networks.Ropsten]: colors.red,
- [Networks.Mainnet]: colors.turquois,
- [Networks.Rinkeby]: colors.darkYellow,
-};
-
-export interface DocReferenceProps {
- selectedVersion: string;
- availableVersions: string[];
- docsInfo: DocsInfo;
- sourceUrl: string;
- docAgnosticFormat?: DocAgnosticFormat;
-}
-
-export interface DocReferenceState {}
-
-export class DocReference extends React.Component<DocReferenceProps, DocReferenceState> {
- public componentDidUpdate(prevProps: DocReferenceProps, _prevState: DocReferenceState): void {
- if (!_.isEqual(prevProps.docAgnosticFormat, this.props.docAgnosticFormat)) {
- const hash = window.location.hash.slice(1);
- sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
- }
- }
- public render(): React.ReactNode {
- const subMenus = _.values(this.props.docsInfo.markdownMenu);
- const orderedSectionNames = _.flatten(subMenus);
-
- const typeDefinitionByName = this.props.docsInfo.getTypeDefinitionsByName(this.props.docAgnosticFormat);
- const renderedSections = _.map(orderedSectionNames, this._renderSection.bind(this, typeDefinitionByName));
-
- return (
- <div>
- <div id={sharedConstants.SCROLL_TOP_ID} />
- {renderedSections}
- </div>
- );
- }
- private _renderSection(typeDefinitionByName: TypeDefinitionByName, sectionName: string): React.ReactNode {
- const markdownVersions = _.keys(this.props.docsInfo.sectionNameToMarkdownByVersion);
- const eligibleVersions = _.filter(markdownVersions, mdVersion => {
- return semver.lte(mdVersion, this.props.selectedVersion);
- });
- if (_.isEmpty(eligibleVersions)) {
- throw new Error(
- `No eligible markdown sections found for ${this.props.docsInfo.displayName} version ${
- this.props.selectedVersion
- }.`,
- );
- }
- const sortedEligibleVersions = eligibleVersions.sort(semver.rcompare.bind(semver));
- const closestVersion = sortedEligibleVersions[0];
- const markdownFileIfExists = this.props.docsInfo.sectionNameToMarkdownByVersion[closestVersion][sectionName];
- if (!_.isUndefined(markdownFileIfExists)) {
- // Special-case replace the `introduction` sectionName with the package name
- const isIntroductionSection = sectionName === 'introduction';
- const headerSize = isIntroductionSection ? HeaderSizes.H1 : HeaderSizes.H3;
- return (
- <MarkdownSection
- key={`markdown-section-${sectionName}`}
- sectionName={sectionName}
- headerSize={headerSize}
- markdownContent={markdownFileIfExists}
- alternativeSectionTitle={isIntroductionSection ? this.props.docsInfo.displayName : undefined}
- />
- );
- }
-
- const docSection = this.props.docAgnosticFormat[sectionName];
- if (_.isUndefined(docSection)) {
- return null;
- }
-
- const isExportedFunctionSection =
- docSection.functions.length === 1 &&
- _.isEmpty(docSection.types) &&
- _.isEmpty(docSection.methods) &&
- _.isEmpty(docSection.constructors) &&
- _.isEmpty(docSection.properties) &&
- _.isEmpty(docSection.events);
-
- const sortedTypes = _.sortBy(docSection.types, 'name');
- const typeDefs = _.map(sortedTypes, (customType, i) => {
- return (
- <TypeDefinition
- sectionName={sectionName}
- key={`type-${customType.name}-${i}`}
- customType={customType}
- docsInfo={this.props.docsInfo}
- typeDefinitionByName={typeDefinitionByName}
- isInPopover={false}
- />
- );
- });
-
- const sortedProperties = _.sortBy(docSection.properties, 'name');
- const propertyDefs = _.map(
- sortedProperties,
- this._renderProperty.bind(this, sectionName, typeDefinitionByName),
- );
-
- const sortedMethods = _.sortBy(docSection.methods, 'name');
- const methodDefs = _.map(sortedMethods, method => {
- return this._renderSignatureBlocks(method, sectionName, typeDefinitionByName);
- });
-
- const sortedFunctions = _.sortBy(docSection.functions, 'name');
- const functionDefs = _.map(sortedFunctions, func => {
- return this._renderSignatureBlocks(func, sectionName, typeDefinitionByName);
- });
-
- const sortedEvents = _.sortBy(docSection.events, 'name');
- const eventDefs = _.map(sortedEvents, (event: Event, i: number) => {
- return (
- <EventDefinition
- key={`event-${event.name}-${i}`}
- event={event}
- sectionName={sectionName}
- docsInfo={this.props.docsInfo}
- />
- );
- });
- const headerStyle: React.CSSProperties = {
- fontWeight: 100,
- };
- return (
- <div key={`section-${sectionName}`} className="py2 pr3 md-pl2 sm-pl3">
- <div className="flex pb2">
- <div style={{ marginRight: 7 }}>
- <SectionHeader sectionName={sectionName} />
- </div>
- {this._renderNetworkBadgesIfExists(sectionName)}
- </div>
- {docSection.comment && <Comment comment={docSection.comment} />}
- {!_.isEmpty(docSection.constructors) && (
- <div>
- <h2 style={headerStyle}>Constructor</h2>
- {this._renderConstructors(docSection.constructors, sectionName, typeDefinitionByName)}
- </div>
- )}
- {!_.isEmpty(docSection.properties) && (
- <div>
- <h2 style={headerStyle}>Properties</h2>
- <div>{propertyDefs}</div>
- </div>
- )}
- {!_.isEmpty(docSection.methods) && (
- <div>
- <h2 style={headerStyle}>Methods</h2>
- <div>{methodDefs}</div>
- </div>
- )}
- {!_.isEmpty(docSection.functions) && (
- <div>
- {!isExportedFunctionSection && (
- <div style={{ ...headerStyle, fontSize: '1.5em' }}>Functions</div>
- )}
- <div>{functionDefs}</div>
- </div>
- )}
- {!_.isUndefined(docSection.events) && docSection.events.length > 0 && (
- <div>
- <h2 style={headerStyle}>Events</h2>
- <div>{eventDefs}</div>
- </div>
- )}
- {!_.isUndefined(docSection.externalExportToLink) &&
- this._renderExternalExports(docSection.externalExportToLink)}
- {!_.isUndefined(typeDefs) && typeDefs.length > 0 && (
- <div>
- <div>{typeDefs}</div>
- </div>
- )}
- <div
- style={{
- width: '100%',
- height: 1,
- backgroundColor: colors.grey300,
- marginTop: 32,
- marginBottom: 12,
- }}
- />
- </div>
- );
- }
- private _renderExternalExports(externalExportToLink: ExternalExportToLink): React.ReactNode {
- const externalExports = _.map(externalExportToLink, (link: string, exportName: string) => {
- return (
- <div className="pt2" key={`external-export-${exportName}`}>
- <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
- {`import { `}
- <Link to={link} shouldOpenInNewTab={true} fontColor={colors.lightBlueA700}>
- {exportName}
- </Link>
- {` } from '${this.props.docsInfo.packageName}'`}
- </code>
- </div>
- );
- });
- return <div>{externalExports}</div>;
- }
- private _renderNetworkBadgesIfExists(sectionName: string): React.ReactNode {
- if (this.props.docsInfo.type !== SupportedDocJson.SolDoc) {
- return null;
- }
-
- const networkToAddressByContractName = this.props.docsInfo.contractsByVersionByNetworkId[
- this.props.selectedVersion
- ];
- const badges = _.map(
- networkToAddressByContractName,
- (addressByContractName: AddressByContractName, networkName: string) => {
- const contractAddress = addressByContractName[sectionName];
- if (_.isUndefined(contractAddress)) {
- return null;
- }
- const linkIfExists = sharedUtils.getEtherScanLinkIfExists(
- contractAddress,
- sharedConstants.NETWORK_ID_BY_NAME[networkName],
- EtherscanLinkSuffixes.Address,
- );
- return (
- <div style={{ marginTop: 8 }}>
- <Link
- key={`badge-${networkName}-${sectionName}`}
- to={linkIfExists}
- shouldOpenInNewTab={true}
- fontColor={colors.white}
- >
- <Badge title={networkName} backgroundColor={networkNameToColor[networkName]} />
- </Link>
- </div>
- );
- },
- );
- return badges;
- }
- private _renderConstructors(
- constructors: SolidityMethod[] | TypescriptMethod[],
- sectionName: string,
- typeDefinitionByName: TypeDefinitionByName,
- ): React.ReactNode {
- const constructorDefs = _.map(constructors, constructor => {
- return this._renderSignatureBlocks(constructor, sectionName, typeDefinitionByName);
- });
- return <div>{constructorDefs}</div>;
- }
- private _renderProperty(
- sectionName: string,
- typeDefinitionByName: TypeDefinitionByName,
- property: Property,
- ): React.ReactNode {
- return (
- <PropertyBlock
- key={`property-${property.name}-${property.type.name}`}
- property={property}
- sectionName={sectionName}
- docsInfo={this.props.docsInfo}
- sourceUrl={this.props.sourceUrl}
- selectedVersion={this.props.selectedVersion}
- typeDefinitionByName={typeDefinitionByName}
- />
- );
- }
- private _renderSignatureBlocks(
- method: SolidityMethod | TypescriptFunction | TypescriptMethod,
- sectionName: string,
- typeDefinitionByName: TypeDefinitionByName,
- ): React.ReactNode {
- return (
- <SignatureBlock
- key={`method-${method.name}-${sectionName}`}
- sectionName={sectionName}
- method={method}
- typeDefinitionByName={typeDefinitionByName}
- libraryVersion={this.props.selectedVersion}
- docsInfo={this.props.docsInfo}
- sourceUrl={this.props.sourceUrl}
- />
- );
- }
-}
diff --git a/packages/react-docs/src/components/enum.tsx b/packages/react-docs/src/components/enum.tsx
deleted file mode 100644
index dee866790..000000000
--- a/packages/react-docs/src/components/enum.tsx
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { EnumValue } from '../types';
-
-export interface EnumProps {
- values: EnumValue[];
-}
-
-export const Enum = (props: EnumProps) => {
- const values = _.map(props.values, value => {
- const defaultValueIfAny = !_.isUndefined(value.defaultValue) ? ` = ${value.defaultValue}` : '';
- return `\n\t${value.name}${defaultValueIfAny},`;
- });
- return (
- <span>
- {`{`}
- {values}
- <br />
- {`}`}
- </span>
- );
-};
diff --git a/packages/react-docs/src/components/event_definition.tsx b/packages/react-docs/src/components/event_definition.tsx
deleted file mode 100644
index b76769788..000000000
--- a/packages/react-docs/src/components/event_definition.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared';
-import { Event, EventArg } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { DocsInfo } from '../docs_info';
-
-import { Type } from './type';
-
-export interface EventDefinitionProps {
- event: Event;
- sectionName: string;
- docsInfo: DocsInfo;
-}
-
-export interface EventDefinitionState {
- shouldShowAnchor: boolean;
-}
-
-export class EventDefinition extends React.Component<EventDefinitionProps, EventDefinitionState> {
- constructor(props: EventDefinitionProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const event = this.props.event;
- const id = `${this.props.sectionName}-${event.name}`;
- return (
- <div
- id={id}
- className="pb2"
- style={{ overflow: 'hidden', width: '100%' }}
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- <AnchorTitle
- headerSize={HeaderSizes.H3}
- title={`Event ${event.name}`}
- id={id}
- shouldShowAnchor={this.state.shouldShowAnchor}
- />
- <div style={{ fontSize: 16 }}>
- <pre>
- <code className="hljs solidity">{this._renderEventCode()}</code>
- </pre>
- </div>
- </div>
- );
- }
- private _renderEventCode(): React.ReactNode {
- const indexed = <span style={{ color: colors.green }}> indexed</span>;
- const eventArgs = _.map(this.props.event.eventArgs, (eventArg: EventArg) => {
- const type = (
- <Type
- type={eventArg.type}
- sectionName={this.props.sectionName}
- docsInfo={this.props.docsInfo}
- isInPopover={false}
- />
- );
- return (
- <span key={`eventArg-${eventArg.name}`}>
- {eventArg.name}
- {eventArg.isIndexed ? indexed : ''}: {type},
- </span>
- );
- });
- const argList = _.reduce(eventArgs, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, '\n\t', curr];
- });
- return (
- <span>
- {`{`}
- <br />
- {'\t'}
- {argList}
- <br />
- {`}`}
- </span>
- );
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
-}
diff --git a/packages/react-docs/src/components/interface.tsx b/packages/react-docs/src/components/interface.tsx
deleted file mode 100644
index 06896159f..000000000
--- a/packages/react-docs/src/components/interface.tsx
+++ /dev/null
@@ -1,89 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { CustomType, TypeDefinitionByName } from '@0x/types';
-
-import { DocsInfo } from '../docs_info';
-
-import { Signature } from './signature';
-import { Type } from './type';
-
-const defaultProps = {};
-
-export interface InterfaceProps {
- type: CustomType;
- sectionName: string;
- docsInfo: DocsInfo;
- typeDefinitionByName: TypeDefinitionByName;
- isInPopover: boolean;
-}
-
-export const Interface: React.SFC<InterfaceProps> = (props: InterfaceProps): any => {
- const type = props.type;
- const properties = _.map(type.children, (property, i) => {
- return (
- <span key={`property-${property.name}-${property.type}-${type.name}-${i}`}>
- {property.name}:{' '}
- {property.type && !_.isUndefined(property.type.method) ? (
- <Signature
- name={property.type.method.name}
- returnType={property.type.method.returnType}
- parameters={property.type.method.parameters}
- typeParameter={property.type.method.typeParameter}
- sectionName={props.sectionName}
- shouldHideMethodName={true}
- shouldUseArrowSyntax={true}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={props.isInPopover}
- />
- ) : (
- <Type
- type={property.type}
- sectionName={props.sectionName}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={props.isInPopover}
- />
- )}
- ,
- </span>
- );
- });
- const hasIndexSignature = !_.isUndefined(type.indexSignature);
- if (hasIndexSignature) {
- const is = type.indexSignature;
- const param = (
- <span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}>
- {is.keyName}:{' '}
- <Type
- type={is.keyType}
- sectionName={props.sectionName}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={props.isInPopover}
- />
- </span>
- );
- properties.push(
- <span key={`indexSignature-${type.name}-${is.keyType.name}`}>
- [{param}]: {is.valueName},
- </span>,
- );
- }
- const propertyList = _.reduce(properties, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, '\n\t', curr];
- });
- return (
- <span>
- {`{`}
- <br />
- {'\t'}
- {propertyList}
- <br />
- {`}`}
- </span>
- );
-};
-
-Interface.defaultProps = defaultProps;
diff --git a/packages/react-docs/src/components/property_block.tsx b/packages/react-docs/src/components/property_block.tsx
deleted file mode 100644
index d0bd84802..000000000
--- a/packages/react-docs/src/components/property_block.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { AnchorTitle, HeaderSizes } from '@0x/react-shared';
-import { Property, TypeDefinitionByName } from '@0x/types';
-import * as React from 'react';
-
-import { DocsInfo } from '../docs_info';
-import { constants } from '../utils/constants';
-
-import { Comment } from './comment';
-import { SourceLink } from './source_link';
-import { Type } from './type';
-
-export interface PropertyBlockProps {
- property: Property;
- sectionName: string;
- docsInfo: DocsInfo;
- sourceUrl: string;
- selectedVersion: string;
- typeDefinitionByName: TypeDefinitionByName;
-}
-
-export interface PropertyBlockState {
- shouldShowAnchor: boolean;
-}
-
-export class PropertyBlock extends React.Component<PropertyBlockProps, PropertyBlockState> {
- constructor(props: PropertyBlockProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const property = this.props.property;
- const sectionName = this.props.sectionName;
- return (
- <div
- id={`${this.props.sectionName}-${property.name}`}
- className="pb4 pt2"
- key={`property-${property.name}-${property.type.name}`}
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- <div className="pb2" style={{ lineHeight: 1.3 }}>
- <AnchorTitle
- headerSize={HeaderSizes.H3}
- title={property.name}
- id={`${sectionName}-${property.name}`}
- shouldShowAnchor={this.state.shouldShowAnchor}
- />
- </div>
- <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
- {(property as any).callPath}
- {property.name}:{' '}
- <Type
- type={property.type}
- sectionName={sectionName}
- docsInfo={this.props.docsInfo}
- typeDefinitionByName={this.props.typeDefinitionByName}
- isInPopover={false}
- />
- </code>
- {property.source && (
- <SourceLink
- version={this.props.selectedVersion}
- source={property.source}
- sourceUrl={this.props.sourceUrl}
- />
- )}
- {property.comment && <Comment comment={property.comment} className="py2" />}
- </div>
- );
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
-}
diff --git a/packages/react-docs/src/components/signature.tsx b/packages/react-docs/src/components/signature.tsx
deleted file mode 100644
index c229999b1..000000000
--- a/packages/react-docs/src/components/signature.tsx
+++ /dev/null
@@ -1,164 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Parameter, Type as TypeDef, TypeDefinitionByName, TypeParameter } from '@0x/types';
-
-import { DocsInfo } from '../docs_info';
-
-import { Type } from './type';
-
-export interface SignatureProps {
- name: string;
- returnType: TypeDef;
- parameters: Parameter[];
- sectionName: string;
- shouldHideMethodName?: boolean;
- shouldUseArrowSyntax?: boolean;
- typeDefinitionByName?: TypeDefinitionByName;
- typeParameter?: TypeParameter;
- callPath?: string;
- docsInfo: DocsInfo;
- isInPopover: boolean;
- isFallback?: boolean;
-}
-
-const defaultProps = {
- shouldHideMethodName: false,
- shouldUseArrowSyntax: false,
- callPath: '',
- isFallback: false,
-};
-
-export const Signature: React.SFC<SignatureProps> = (props: SignatureProps) => {
- const sectionName = props.sectionName;
- const parameters = renderParameters(
- props.parameters,
- props.docsInfo,
- sectionName,
- props.isInPopover,
- props.name,
- props.typeDefinitionByName,
- );
- const paramStringArray: any[] = [];
- // HACK: For now we don't put params on newlines if there are less then 2 of them.
- // Ideally we would check the character length of the resulting method signature and
- // if it exceeds the available space, put params on their own lines.
- const hasMoreThenTwoParams = parameters.length > 2;
- _.each(parameters, (param: React.ReactNode, i: number) => {
- const finalParam = hasMoreThenTwoParams ? (
- <span className="pl2" key={`param-${i}`}>
- {param}
- </span>
- ) : (
- param
- );
- paramStringArray.push(finalParam);
- const comma = hasMoreThenTwoParams ? (
- <span key={`param-comma-${i}`}>
- , <br />
- </span>
- ) : (
- ', '
- );
- paramStringArray.push(comma);
- });
- if (!hasMoreThenTwoParams) {
- paramStringArray.pop();
- }
- const methodName = props.shouldHideMethodName ? '' : props.name;
- const typeParameterIfExists = _.isUndefined(props.typeParameter)
- ? undefined
- : renderTypeParameter(
- props.typeParameter,
- props.docsInfo,
- sectionName,
- props.isInPopover,
- props.typeDefinitionByName,
- );
- return (
- <span style={{ fontSize: 15 }}>
- {props.callPath}
- {props.isFallback ? '' : methodName}
- {typeParameterIfExists}({hasMoreThenTwoParams && <br />}
- {paramStringArray})
- {props.returnType && (
- <span>
- {props.shouldUseArrowSyntax ? ' => ' : ': '}{' '}
- <Type
- type={props.returnType}
- sectionName={sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- </span>
- )}
- </span>
- );
-};
-
-Signature.defaultProps = defaultProps;
-
-function renderParameters(
- parameters: Parameter[],
- docsInfo: DocsInfo,
- sectionName: string,
- isInPopover: boolean,
- name: string,
- typeDefinitionByName?: TypeDefinitionByName,
-): React.ReactNode[] {
- const params = _.map(parameters, (p: Parameter, i: number) => {
- const isOptional = p.isOptional;
- const hasDefaultValue = !_.isUndefined(p.defaultValue);
- const type = (
- <Type
- type={p.type}
- sectionName={sectionName}
- typeDefinitionByName={typeDefinitionByName}
- docsInfo={docsInfo}
- isInPopover={isInPopover}
- />
- );
- return (
- <span key={`param-${JSON.stringify(p.type)}-${name}-${i}`}>
- {!_.isEmpty(p.name) && (
- <span>
- {p.name}
- {isOptional && '?'}:{' '}
- </span>
- )}
- {type}
- {hasDefaultValue && ` = ${p.defaultValue}`}
- </span>
- );
- });
- return params;
-}
-
-function renderTypeParameter(
- typeParameter: TypeParameter,
- docsInfo: DocsInfo,
- sectionName: string,
- isInPopover: boolean,
- typeDefinitionByName?: TypeDefinitionByName,
-): React.ReactNode {
- const typeParam = (
- <span>
- {`<${typeParameter.name}`}
- {!_.isUndefined(typeParameter.type) && (
- <span>
- {' extends '}
- <Type
- type={typeParameter.type}
- sectionName={sectionName}
- typeDefinitionByName={typeDefinitionByName}
- docsInfo={docsInfo}
- isInPopover={isInPopover}
- />
- </span>
- )}
- {`>`}
- </span>
- );
- return typeParam;
-}
diff --git a/packages/react-docs/src/components/signature_block.tsx b/packages/react-docs/src/components/signature_block.tsx
deleted file mode 100644
index 3189d86cf..000000000
--- a/packages/react-docs/src/components/signature_block.tsx
+++ /dev/null
@@ -1,153 +0,0 @@
-import { AnchorTitle, colors, HeaderSizes, Styles } from '@0x/react-shared';
-import { Parameter, SolidityMethod, TypeDefinitionByName, TypescriptFunction, TypescriptMethod } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { DocsInfo } from '../docs_info';
-import { constants } from '../utils/constants';
-
-import { Comment } from './comment';
-import { Signature } from './signature';
-import { SourceLink } from './source_link';
-
-export interface SignatureBlockProps {
- method: SolidityMethod | TypescriptFunction | TypescriptMethod;
- sectionName: string;
- libraryVersion: string;
- typeDefinitionByName: TypeDefinitionByName;
- docsInfo: DocsInfo;
- sourceUrl: string;
-}
-
-export interface SignatureBlockState {
- shouldShowAnchor: boolean;
-}
-
-const styles: Styles = {
- chip: {
- fontSize: 13,
- color: colors.white,
- height: 11,
- borderRadius: 14,
- lineHeight: 0.9,
- },
-};
-
-export class SignatureBlock extends React.Component<SignatureBlockProps, SignatureBlockState> {
- constructor(props: SignatureBlockProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const method = this.props.method;
-
- const isFallback = (method as SolidityMethod).isFallback;
- const hasExclusivelyNamedParams = !_.isUndefined(_.find(method.parameters, p => !_.isEmpty(p.name)));
- return (
- <div
- id={`${this.props.sectionName}-${method.name}`}
- style={{ overflow: 'hidden', width: '100%' }}
- className="pb4 pt2"
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- {!(method as TypescriptMethod).isConstructor && (
- <div className="flex pb2 pt2">
- {(method as TypescriptMethod).isStatic && this._renderChip('Static')}
- {(method as SolidityMethod).isConstant && this._renderChip('Constant')}
- {(method as SolidityMethod).isPayable && this._renderChip('Payable')}
- {isFallback && this._renderChip('Fallback', colors.lightGreenA700)}
- <div style={{ lineHeight: 1.3 }}>
- <AnchorTitle
- headerSize={HeaderSizes.H3}
- title={isFallback ? '' : method.name}
- id={`${this.props.sectionName}-${method.name}`}
- shouldShowAnchor={this.state.shouldShowAnchor}
- />
- </div>
- </div>
- )}
- <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
- <Signature
- name={method.name}
- returnType={method.returnType}
- parameters={method.parameters}
- typeParameter={(method as TypescriptMethod).typeParameter}
- callPath={(method as TypescriptMethod).callPath}
- sectionName={this.props.sectionName}
- typeDefinitionByName={this.props.typeDefinitionByName}
- docsInfo={this.props.docsInfo}
- isInPopover={false}
- isFallback={isFallback}
- />
- </code>
- {(method as TypescriptMethod).source && (
- <SourceLink
- version={this.props.libraryVersion}
- source={(method as TypescriptMethod).source}
- sourceUrl={this.props.sourceUrl}
- />
- )}
- {method.comment && <Comment comment={method.comment} className="py2" />}
- {method.parameters && !_.isEmpty(method.parameters) && hasExclusivelyNamedParams && (
- <div>
- <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}>
- ARGUMENTS
- </h4>
- {this._renderParameterDescriptions(method.parameters, method.name)}
- </div>
- )}
- {method.returnComment && (
- <div className="pt1 comment">
- <h4 className="pb1 thin" style={{ borderBottom: '1px solid #e1e8ed' }}>
- RETURNS
- </h4>
- <Comment comment={method.returnComment} />
- </div>
- )}
- </div>
- );
- }
- private _renderChip(text: string, backgroundColor: string = colors.lightBlueA700): React.ReactNode {
- return (
- <div className="p1 mr1" style={{ ...styles.chip, backgroundColor }}>
- {text}
- </div>
- );
- }
- private _renderParameterDescriptions(parameters: Parameter[], name: string): React.ReactNode {
- const descriptions = _.map(parameters, (parameter: Parameter, i: number) => {
- const isOptional = parameter.isOptional;
- return (
- <div
- key={`param-description-${parameter.name}-${name}-${i}`}
- className="flex pb1 mb2"
- style={{ borderBottom: '1px solid #f0f4f7' }}
- >
- <div className="pl2 col lg-col-4 md-col-4 sm-col-12 col-12">
- <div
- className="bold"
- style={{ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis' }}
- >
- {parameter.name}
- </div>
- <div className="pt1" style={{ color: colors.grey, fontSize: 14 }}>
- {isOptional && 'optional'}
- </div>
- </div>
- <div className="col lg-col-8 md-col-8 sm-col-12 col-12" style={{ paddingLeft: 5 }}>
- {parameter.comment && <Comment comment={parameter.comment} />}
- </div>
- </div>
- );
- });
- return descriptions;
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
-}
diff --git a/packages/react-docs/src/components/source_link.tsx b/packages/react-docs/src/components/source_link.tsx
deleted file mode 100644
index 6459824c2..000000000
--- a/packages/react-docs/src/components/source_link.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { colors, Link } from '@0x/react-shared';
-import { Source } from '@0x/types';
-import * as React from 'react';
-
-export interface SourceLinkProps {
- source: Source;
- sourceUrl: string;
- version: string;
-}
-
-export const SourceLink = (props: SourceLinkProps) => {
- const src = props.source;
- const sourceCodeUrl = `${props.sourceUrl}/${src.fileName}#L${src.line}`;
- return (
- <div className="pt2" style={{ fontSize: 14 }}>
- <Link to={sourceCodeUrl} shouldOpenInNewTab={true} textDecoration="underline" fontColor={colors.grey}>
- {'Source'}
- </Link>
- </div>
- );
-};
diff --git a/packages/react-docs/src/components/type.tsx b/packages/react-docs/src/components/type.tsx
deleted file mode 100644
index 894c3f560..000000000
--- a/packages/react-docs/src/components/type.tsx
+++ /dev/null
@@ -1,271 +0,0 @@
-import { colors, Link, utils as sharedUtils } from '@0x/react-shared';
-import { Type as TypeDef, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
-import { errorUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as ReactTooltip from 'react-tooltip';
-
-import { DocsInfo } from '../docs_info';
-
-import { Signature } from './signature';
-import { TypeDefinition } from './type_definition';
-
-const basicJsTypes = ['string', 'number', 'undefined', 'null', 'boolean'];
-const basicSolidityTypes = ['bytes', 'bytes4', 'bytes32', 'uint8', 'uint256', 'address'];
-
-const defaultProps = {};
-
-export interface TypeProps {
- type: TypeDef;
- docsInfo: DocsInfo;
- sectionName: string;
- typeDefinitionByName?: TypeDefinitionByName;
- isInPopover: boolean;
-}
-
-// The return type needs to be `any` here so that we can recursively define <Type /> components within
-// <Type /> components (e.g when rendering the union type).
-export const Type: React.SFC<TypeProps> = (props: TypeProps): any => {
- const type = props.type;
- const isReference = type.typeDocType === TypeDocTypes.Reference;
- const isArray = type.typeDocType === TypeDocTypes.Array;
- let typeNameColor = 'inherit';
- let typeName: string | React.ReactNode;
- let typeArgs: React.ReactNode[] = [];
- switch (type.typeDocType) {
- case TypeDocTypes.Intrinsic:
- case TypeDocTypes.Unknown:
- typeName = type.name;
- typeNameColor = colors.orange;
- break;
-
- case TypeDocTypes.Reference:
- typeName = type.name;
- typeArgs = _.map(type.typeArguments, (arg: TypeDef) => {
- if (arg.typeDocType === TypeDocTypes.Array) {
- const key = `type-${arg.elementType.name}-${arg.elementType.typeDocType}`;
- return (
- <span>
- <Type
- key={key}
- type={arg}
- sectionName={props.sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- []
- </span>
- );
- } else {
- const subType = (
- <Type
- key={`type-${arg.name}-${arg.value}-${arg.typeDocType}`}
- type={arg}
- sectionName={props.sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- );
- return subType;
- }
- });
- break;
-
- case TypeDocTypes.StringLiteral:
- typeName = `'${type.value}'`;
- typeNameColor = colors.green;
- break;
-
- case TypeDocTypes.Array:
- typeName = type.elementType.name;
- if (_.includes(basicJsTypes, typeName) || _.includes(basicSolidityTypes, typeName)) {
- typeNameColor = colors.orange;
- }
- break;
-
- case TypeDocTypes.Union:
- const unionTypes = _.map(type.types, t => {
- return (
- <Type
- key={`type-${t.name}-${t.value}-${t.typeDocType}`}
- type={t}
- sectionName={props.sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- );
- });
- typeName = _.reduce(unionTypes, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, '|', curr];
- });
- break;
-
- case TypeDocTypes.Reflection:
- if (!_.isUndefined(type.method)) {
- typeName = (
- <Signature
- name={type.method.name}
- returnType={type.method.returnType}
- parameters={type.method.parameters}
- typeParameter={type.method.typeParameter}
- sectionName={props.sectionName}
- shouldHideMethodName={true}
- shouldUseArrowSyntax={true}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={props.isInPopover}
- />
- );
- } else if (!_.isUndefined(type.indexSignature)) {
- const is = type.indexSignature;
- const param = (
- <span key={`indexSigParams-${is.keyName}-${is.keyType}-${type.name}`}>
- {is.keyName}:{' '}
- <Type
- type={is.keyType}
- sectionName={props.sectionName}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={props.isInPopover}
- />
- </span>
- );
- typeName = (
- <span key={`indexSignature-${type.name}-${is.keyType.name}`}>
- {'{'}[{param}]: {is.valueName}
- {'}'}
- </span>
- );
- } else {
- throw new Error(`Unrecognized Reflection type that isn't a Method nor an Index Signature`);
- }
-
- break;
-
- case TypeDocTypes.TypeParameter:
- typeName = type.name;
- break;
-
- case TypeDocTypes.Intersection:
- const intersectionsTypes = _.map(type.types, t => {
- return (
- <Type
- key={`type-${t.name}-${t.value}-${t.typeDocType}`}
- type={t}
- sectionName={props.sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- );
- });
- typeName = _.reduce(intersectionsTypes, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, '&', curr];
- });
- break;
-
- case TypeDocTypes.Tuple:
- const tupleTypes = _.map(type.tupleElements, (t, i) => {
- return (
- <Type
- key={`type-tuple-${t.name}-${t.typeDocType}-${i}`}
- type={t}
- sectionName={props.sectionName}
- typeDefinitionByName={props.typeDefinitionByName}
- docsInfo={props.docsInfo}
- isInPopover={props.isInPopover}
- />
- );
- });
- typeName = (
- <div>
- [
- {_.reduce(tupleTypes, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, ', ', curr];
- })}
- ]
- </div>
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('type.typeDocType', type.typeDocType);
- }
- // HACK: Normalize BigNumber to simply BigNumber. For some reason the type
- // name is unpredictably one or the other.
- if (typeName === 'BigNumber') {
- typeName = 'BigNumber';
- }
- const commaSeparatedTypeArgs = _.reduce(typeArgs, (prev: React.ReactNode, curr: React.ReactNode) => {
- return [prev, ', ', curr];
- });
-
- const isExportedClassReference = !!props.type.isExportedClassReference;
- const typeNameUrlIfExists = !_.isUndefined(props.type.externalLink) ? props.type.externalLink : undefined;
- if (!_.isUndefined(typeNameUrlIfExists)) {
- typeName = props.isInPopover ? (
- <span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span>
- ) : (
- <Link to={typeNameUrlIfExists} shouldOpenInNewTab={true} fontColor={colors.lightBlueA700}>
- {typeName}
- </Link>
- );
- } else if (
- (isReference || isArray) &&
- ((props.typeDefinitionByName && props.typeDefinitionByName[typeName as string]) || isExportedClassReference)
- ) {
- const id = Math.random().toString();
- const typeDefinitionAnchorId = isExportedClassReference
- ? props.type.name
- : `${props.docsInfo.typeSectionName}-${typeName}`;
- typeName = (
- <span>
- {sharedUtils.isUserOnMobile() || props.isInPopover || isExportedClassReference ? (
- <span style={{ color: colors.lightBlueA700, cursor: 'pointer' }}>{typeName}</span>
- ) : (
- <Link to={typeDefinitionAnchorId}>
- <span
- data-tip={true}
- data-for={id}
- style={{
- color: colors.lightBlueA700,
- cursor: 'pointer',
- display: 'inline-block',
- }}
- >
- {typeName}
- <ReactTooltip type="light" effect="solid" id={id} className="typeTooltip">
- <TypeDefinition
- sectionName={props.sectionName}
- customType={props.typeDefinitionByName[typeName as string]}
- shouldAddId={false}
- docsInfo={props.docsInfo}
- typeDefinitionByName={props.typeDefinitionByName}
- isInPopover={true}
- />
- </ReactTooltip>
- </span>
- </Link>
- )}
- </span>
- );
- }
- return (
- <span>
- <span style={{ color: typeNameColor }}>{typeName}</span>
- {isArray && '[]'}
- {!_.isEmpty(typeArgs) && (
- <span>
- {'<'}
- {commaSeparatedTypeArgs}
- {'>'}
- </span>
- )}
- </span>
- );
-};
-
-Type.defaultProps = defaultProps;
diff --git a/packages/react-docs/src/components/type_definition.tsx b/packages/react-docs/src/components/type_definition.tsx
deleted file mode 100644
index a1fde51da..000000000
--- a/packages/react-docs/src/components/type_definition.tsx
+++ /dev/null
@@ -1,188 +0,0 @@
-import { AnchorTitle, colors, HeaderSizes } from '@0x/react-shared';
-import { CustomType, CustomTypeChild, TypeDefinitionByName, TypeDocTypes } from '@0x/types';
-import { errorUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { DocsInfo } from '../docs_info';
-import { KindString, SupportedDocJson } from '../types';
-import { constants } from '../utils/constants';
-
-import { Comment } from './comment';
-import { CustomEnum } from './custom_enum';
-import { Enum } from './enum';
-import { Interface } from './interface';
-import { Signature } from './signature';
-import { Type } from './type';
-
-export interface TypeDefinitionProps {
- sectionName: string;
- customType: CustomType;
- shouldAddId?: boolean;
- docsInfo: DocsInfo;
- typeDefinitionByName?: TypeDefinitionByName;
- isInPopover?: boolean;
-}
-
-export interface TypeDefinitionState {
- shouldShowAnchor: boolean;
-}
-
-export class TypeDefinition extends React.Component<TypeDefinitionProps, TypeDefinitionState> {
- public static defaultProps: Partial<TypeDefinitionProps> = {
- shouldAddId: true,
- isInPopover: false,
- };
- constructor(props: TypeDefinitionProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const customType = this.props.customType;
-
- let typePrefix: string;
- let codeSnippet: React.ReactNode;
- switch (customType.kindString) {
- case KindString.Interface:
- typePrefix = this.props.docsInfo.type === SupportedDocJson.SolDoc ? 'Struct' : 'Interface';
- codeSnippet = (
- <Interface
- type={customType}
- sectionName={this.props.sectionName}
- docsInfo={this.props.docsInfo}
- typeDefinitionByName={this.props.typeDefinitionByName}
- isInPopover={this.props.isInPopover}
- />
- );
- break;
-
- case KindString.Variable:
- typePrefix = 'Enum';
- codeSnippet = <CustomEnum type={customType} />;
- break;
-
- case KindString.Enumeration:
- typePrefix = 'Enum';
- const enumValues = _.map(customType.children, (c: CustomTypeChild) => {
- return {
- name: c.name,
- defaultValue: c.defaultValue,
- };
- });
- codeSnippet = <Enum values={enumValues} />;
- break;
-
- case KindString.TypeAlias:
- typePrefix = 'Type Alias';
- codeSnippet = (
- <span>
- <span style={{ color: colors.lightPurple }}>type</span> {customType.name} ={' '}
- {customType.type.typeDocType !== TypeDocTypes.Reflection ? (
- <Type
- type={customType.type}
- sectionName={this.props.sectionName}
- docsInfo={this.props.docsInfo}
- typeDefinitionByName={this.props.typeDefinitionByName}
- isInPopover={this.props.isInPopover}
- />
- ) : (
- <Signature
- name={customType.type.method.name}
- returnType={customType.type.method.returnType}
- parameters={customType.type.method.parameters}
- typeParameter={customType.type.method.typeParameter}
- callPath={customType.type.method.callPath}
- sectionName={this.props.sectionName}
- shouldHideMethodName={true}
- shouldUseArrowSyntax={true}
- docsInfo={this.props.docsInfo}
- typeDefinitionByName={this.props.typeDefinitionByName}
- isInPopover={this.props.isInPopover}
- />
- )}
- </span>
- );
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('type.kindString', customType.kindString);
- }
-
- const typeDefinitionAnchorId = `${this.props.sectionName}-${customType.name}`;
- return (
- <div
- id={this.props.shouldAddId ? typeDefinitionAnchorId : ''}
- className="pb2 pt2"
- style={{ overflow: 'hidden', width: '100%' }}
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- <AnchorTitle
- headerSize={HeaderSizes.H3}
- title={`${typePrefix} ${customType.name}`}
- id={this.props.shouldAddId ? typeDefinitionAnchorId : ''}
- shouldShowAnchor={this.state.shouldShowAnchor}
- isDisabled={this.props.isInPopover}
- />
- <div style={{ fontSize: 16 }}>
- <pre>
- <code className={`hljs ${constants.TYPE_TO_SYNTAX[this.props.docsInfo.type]}`}>
- {codeSnippet}
- </code>
- </pre>
- </div>
- <div style={{ maxWidth: 620 }}>
- {customType.comment && (
- <Comment comment={this._formatComment(customType.comment)} className="py2" />
- )}
- </div>
- </div>
- );
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
- /**
- * Type definition comments usually describe the type as a whole or the individual
- * properties within the type. Since TypeDoc just treats these comments simply as
- * one paragraph, we do some additional formatting so that we can display individual
- * property comments on their own lines.
- * E.g:
- * Interface SomeConfig
- * {
- * networkId: number,
- * derivationPath: string,
- * }
- * networkId: The ethereum networkId to set as the chainId from EIP155
- * derivationPath: Initial derivation path to use e.g 44'/60'/0'
- *
- * Each property description should be on a new line.
- */
- private _formatComment(text: string): string {
- const NEW_LINE_REGEX = /(\r\n|\n|\r)/gm;
- const sanitizedText = text.replace(NEW_LINE_REGEX, ' ');
- const PROPERTY_DESCRIPTION_DIVIDER = ':';
- if (!_.includes(sanitizedText, PROPERTY_DESCRIPTION_DIVIDER)) {
- return sanitizedText;
- }
- const segments = sanitizedText.split(PROPERTY_DESCRIPTION_DIVIDER);
- _.each(segments, (s: string, i: number) => {
- if (i === 0) {
- segments[i] = `**${s}**`;
- return;
- } else if (i === segments.length - 1) {
- return;
- }
- const words = s.split(' ');
- const property = words[words.length - 1];
- words[words.length - 1] = `\n\n**${property}**`;
- segments[i] = words.join(' ');
- });
- const final = segments.join(PROPERTY_DESCRIPTION_DIVIDER);
- return final;
- }
-}
diff --git a/packages/react-docs/src/docs_info.ts b/packages/react-docs/src/docs_info.ts
deleted file mode 100644
index 76f7784ba..000000000
--- a/packages/react-docs/src/docs_info.ts
+++ /dev/null
@@ -1,118 +0,0 @@
-import { ALink, utils as sharedUtils } from '@0x/react-shared';
-import { DocAgnosticFormat, ObjectMap, TypeDefinitionByName } from '@0x/types';
-import * as _ from 'lodash';
-
-import {
- ContractsByVersionByNetworkId,
- DocsInfoConfig,
- DocsMenu,
- SectionNameToMarkdownByVersion,
- SectionsMap,
- SupportedDocJson,
-} from './types';
-import { constants } from './utils/constants';
-
-export class DocsInfo {
- public id: string;
- public type: SupportedDocJson;
- public displayName: string;
- public packageName: string;
- public packageUrl: string;
- public markdownMenu: DocsMenu;
- public typeSectionName: string;
- public sections: SectionsMap;
- public sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
- public contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
- constructor(config: DocsInfoConfig) {
- this.id = config.id;
- this.type = config.type;
- this.markdownMenu = config.markdownMenu;
- this.displayName = config.displayName;
- this.packageName = config.packageName;
- this.packageUrl = config.packageUrl;
- this.typeSectionName = config.type === SupportedDocJson.SolDoc ? 'structs' : 'types';
- this.sections = config.markdownSections;
- this.sectionNameToMarkdownByVersion = config.sectionNameToMarkdownByVersion;
- this.contractsByVersionByNetworkId = config.contractsByVersionByNetworkId;
- }
- public getTypeDefinitionsByName(docAgnosticFormat: DocAgnosticFormat): ObjectMap<TypeDefinitionByName> {
- if (_.isUndefined(docAgnosticFormat[this.typeSectionName])) {
- return {};
- }
-
- const section = docAgnosticFormat[this.typeSectionName];
- const typeDefinitionByName = _.keyBy(section.types, 'name') as any;
- return typeDefinitionByName;
- }
- public getSectionNameToLinks(docAgnosticFormat: DocAgnosticFormat): ObjectMap<ALink[]> {
- const sectionNameToLinks: ObjectMap<ALink[]> = {};
- _.each(this.markdownMenu, (linkTitles, sectionName) => {
- sectionNameToLinks[sectionName] = [];
- _.each(linkTitles, linkTitle => {
- const to = sharedUtils.getIdFromName(linkTitle);
- const links = sectionNameToLinks[sectionName];
- links.push({
- title: linkTitle,
- to,
- });
- });
- });
-
- if (_.isUndefined(docAgnosticFormat)) {
- return sectionNameToLinks;
- }
-
- const docSections = _.keys(this.sections);
- _.each(docSections, sectionName => {
- const docSection = docAgnosticFormat[sectionName];
- if (_.isUndefined(docSection) || sectionName === constants.EXTERNAL_EXPORTS_SECTION_NAME) {
- return; // no-op
- }
-
- const isExportedFunctionSection =
- docSection.functions.length === 1 &&
- _.isEmpty(docSection.types) &&
- _.isEmpty(docSection.methods) &&
- _.isEmpty(docSection.constructors) &&
- _.isEmpty(docSection.properties) &&
- _.isEmpty(docSection.events);
-
- if (sectionName === this.typeSectionName) {
- const sortedTypesNames = _.sortBy(docSection.types, 'name');
- const typeNames = _.map(sortedTypesNames, t => t.name);
- const typeLinks = _.map(typeNames, typeName => {
- return {
- to: `${sectionName}-${typeName}`,
- title: typeName,
- };
- });
- sectionNameToLinks[sectionName] = typeLinks;
- } else if (isExportedFunctionSection) {
- // Noop so that we don't have the method listed underneath itself.
- } else {
- let eventNames: string[] = [];
- if (!_.isUndefined(docSection.events)) {
- const sortedEventNames = _.sortBy(docSection.events, 'name');
- eventNames = _.map(sortedEventNames, m => m.name);
- }
- const propertiesSortedByName = _.sortBy(docSection.properties, 'name');
- const propertyNames = _.map(propertiesSortedByName, m => m.name);
- const methodsSortedByName = _.sortBy(docSection.methods, 'name');
- const methodNames = _.map(methodsSortedByName, m => m.name);
- const sortedFunctionNames = _.sortBy(docSection.functions, 'name');
- const functionNames = _.map(sortedFunctionNames, m => m.name);
- const names = [...eventNames, ...propertyNames, ...functionNames, ...methodNames];
-
- const links = _.map(names, name => {
- return {
- to: `${sectionName}-${name}`,
- title: name,
- };
- });
-
- sectionNameToLinks[sectionName] = links;
- }
- });
- return sectionNameToLinks;
- }
-}
diff --git a/packages/react-docs/src/globals.d.ts b/packages/react-docs/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/react-docs/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/react-docs/src/index.ts b/packages/react-docs/src/index.ts
deleted file mode 100644
index a5ed788b1..000000000
--- a/packages/react-docs/src/index.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-export { DocAgnosticFormat, GeneratedDocJson } from '@0x/types';
-
-// Exported to give users of this library added flexibility if they want to build
-// a docs page from scratch using the individual components.
-export { Badge } from './components/badge';
-export { Comment } from './components/comment';
-export { CustomEnum } from './components/custom_enum';
-export { DocReference } from './components/doc_reference';
-export { Enum } from './components/enum';
-export { EventDefinition } from './components/event_definition';
-export { Interface } from './components/interface';
-export { SignatureBlock } from './components/signature_block';
-export { Signature } from './components/signature';
-export { SourceLink } from './components/source_link';
-export { TypeDefinition } from './components/type_definition';
-export { Type } from './components/type';
-export { TypeDocUtils } from './utils/typedoc_utils';
-
-export { DocsInfo } from './docs_info';
-
-export { DocsInfoConfig, DocsMenu, SupportedDocJson } from './types';
-
-export { constants } from './utils/constants';
diff --git a/packages/react-docs/src/types.ts b/packages/react-docs/src/types.ts
deleted file mode 100644
index 153448513..000000000
--- a/packages/react-docs/src/types.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-export interface SectionNameToMarkdownByVersion {
- [version: string]: { [sectionName: string]: string };
-}
-
-export interface DocsInfoConfig {
- id: string;
- packageName: string;
- type: SupportedDocJson;
- displayName: string;
- packageUrl: string;
- markdownMenu: DocsMenu;
- markdownSections: SectionsMap;
- sectionNameToMarkdownByVersion: SectionNameToMarkdownByVersion;
- contractsByVersionByNetworkId?: ContractsByVersionByNetworkId;
-}
-
-export interface DocsMenu {
- [sectionName: string]: string[];
-}
-
-export interface SectionsMap {
- [sectionName: string]: string;
-}
-
-// Exception: We don't make the values uppercase because these KindString's need to
-// match up those returned by TypeDoc
-export enum KindString {
- Constructor = 'Constructor',
- Property = 'Property',
- Method = 'Method',
- Interface = 'Interface',
- TypeAlias = 'Type alias',
- ObjectLiteral = 'Object literal',
- Variable = 'Variable',
- Function = 'Function',
- Enumeration = 'Enumeration',
- Class = 'Class',
-}
-
-export enum SupportedDocJson {
- SolDoc = 'SOL_DOC',
- TypeDoc = 'TYPEDOC',
-}
-
-export interface ContractsByVersionByNetworkId {
- [version: string]: {
- [networkName: string]: {
- [contractName: string]: string;
- };
- };
-}
-
-export interface AddressByContractName {
- [contractName: string]: string;
-}
-
-export interface EnumValue {
- name: string;
- defaultValue?: string;
-}
-
-export enum AbiTypes {
- Constructor = 'constructor',
- Function = 'function',
- Event = 'event',
-}
diff --git a/packages/react-docs/src/utils/constants.ts b/packages/react-docs/src/utils/constants.ts
deleted file mode 100644
index b5b6cc00d..000000000
--- a/packages/react-docs/src/utils/constants.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import { SupportedDocJson } from '../types';
-
-export const constants = {
- TYPES_SECTION_NAME: 'types',
- EXTERNAL_EXPORTS_SECTION_NAME: 'external exports',
- TYPE_TO_SYNTAX: {
- [SupportedDocJson.SolDoc]: 'solidity',
- [SupportedDocJson.TypeDoc]: 'typescript',
- } as { [supportedDocType: string]: string },
-};
diff --git a/packages/react-docs/src/utils/typedoc_utils.ts b/packages/react-docs/src/utils/typedoc_utils.ts
deleted file mode 100644
index f74ec3e28..000000000
--- a/packages/react-docs/src/utils/typedoc_utils.ts
+++ /dev/null
@@ -1,507 +0,0 @@
-import {
- CustomType,
- CustomTypeChild,
- DocAgnosticFormat,
- DocSection,
- ExternalExportToLink,
- ExternalTypeToLink,
- GeneratedDocJson,
- IndexSignature,
- Parameter,
- Property,
- Type,
- TypeDocNode,
- TypeDocType,
- TypeDocTypes,
- TypeParameter,
- TypescriptFunction,
- TypescriptMethod,
-} from '@0x/types';
-import { errorUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { DocsInfo } from '../docs_info';
-import { KindString } from '../types';
-
-import { constants } from './constants';
-
-export class TypeDocUtils {
- private readonly _typeDocNameOrder: string[];
- private readonly _externalTypeToLink: ExternalTypeToLink;
- private readonly _externalExportToLink: ExternalExportToLink;
- private readonly _docsInfo: DocsInfo;
- private readonly _typeDocJson: TypeDocNode;
- private readonly _classNames: string[];
- constructor(generatedDocJson: GeneratedDocJson, docsInfo: DocsInfo) {
- this._docsInfo = docsInfo;
- const exportPathOrder = generatedDocJson.metadata.exportPathOrder;
- const exportPathToTypedocNames = generatedDocJson.metadata.exportPathToTypedocNames;
- this._externalTypeToLink = generatedDocJson.metadata.externalTypeToLink;
- this._externalExportToLink = generatedDocJson.metadata.externalExportToLink;
- this._typeDocJson = generatedDocJson.typedocJson;
-
- this._typeDocNameOrder = _.compact(
- _.flatten(
- _.map(exportPathOrder, exportPath => {
- return exportPathToTypedocNames[exportPath];
- }),
- ),
- );
-
- this._classNames = [];
- _.each(this._typeDocJson.children, file => {
- _.each(file.children, child => {
- if (child.kindString === KindString.Class) {
- this._classNames.push(child.name);
- }
- });
- });
- }
- public isType(entity: TypeDocNode): boolean {
- return (
- entity.kindString === KindString.Interface ||
- entity.kindString === KindString.Function ||
- entity.kindString === KindString.TypeAlias ||
- entity.kindString === KindString.Variable ||
- entity.kindString === KindString.Enumeration
- );
- }
- public isMethod(entity: TypeDocNode): boolean {
- return entity.kindString === KindString.Method;
- }
- public isConstructor(entity: TypeDocNode): boolean {
- return entity.kindString === KindString.Constructor;
- }
- public isProperty(entity: TypeDocNode): boolean {
- return entity.kindString === KindString.Property;
- }
- public isUnderscorePrefixed(name: string): boolean {
- return _.startsWith(name, '_');
- }
- public getModuleDefinitionsBySectionName(versionDocObj: TypeDocNode, configModulePaths: string[]): TypeDocNode[] {
- const moduleDefinitions: TypeDocNode[] = [];
- const jsonModules = versionDocObj.children;
- _.each(jsonModules, jsonMod => {
- _.each(configModulePaths, configModulePath => {
- if (_.includes(configModulePath, jsonMod.name)) {
- moduleDefinitions.push(jsonMod);
- }
- });
- });
- return moduleDefinitions;
- }
- public convertToDocAgnosticFormat(): DocAgnosticFormat {
- const docAgnosticFormat: DocAgnosticFormat = {};
-
- if (!_.isEmpty(this._externalExportToLink)) {
- this._docsInfo.sections[constants.EXTERNAL_EXPORTS_SECTION_NAME] = constants.EXTERNAL_EXPORTS_SECTION_NAME;
- this._docsInfo.markdownMenu[constants.EXTERNAL_EXPORTS_SECTION_NAME] = [
- constants.EXTERNAL_EXPORTS_SECTION_NAME,
- ];
- const docSection: DocSection = {
- comment: 'This package also re-exports some third-party libraries for your convenience.',
- constructors: [],
- methods: [],
- functions: [],
- properties: [],
- types: [],
- externalExportToLink: this._externalExportToLink,
- };
- docAgnosticFormat[constants.EXTERNAL_EXPORTS_SECTION_NAME] = docSection;
- }
-
- const typeEntities: TypeDocNode[] = [];
- _.each(this._typeDocNameOrder, typeDocName => {
- const fileChildIndex = _.findIndex(this._typeDocJson.children, child => child.name === typeDocName);
- const fileChild = this._typeDocJson.children[fileChildIndex];
- let sectionName: string;
- _.each(fileChild.children, child => {
- switch (child.kindString) {
- case KindString.Class:
- case KindString.ObjectLiteral: {
- sectionName = child.name;
- this._docsInfo.sections[sectionName] = sectionName;
- this._docsInfo.markdownMenu[sectionName] = [sectionName];
- const entities = child.children;
- const commentObj = child.comment;
- const sectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : '';
- const isClassOrObjectLiteral = true;
- const docSection = this._convertEntitiesToDocSection(
- entities,
- sectionName,
- isClassOrObjectLiteral,
- );
- docSection.comment = sectionComment;
- docAgnosticFormat[sectionName] = docSection;
- break;
- }
- case KindString.Function: {
- sectionName = child.name;
- this._docsInfo.sections[sectionName] = sectionName;
- this._docsInfo.markdownMenu[sectionName] = [sectionName];
- const entities = [child];
- const commentObj = child.comment;
- const SectionComment = !_.isUndefined(commentObj) ? commentObj.shortText : '';
- const docSection = this._convertEntitiesToDocSection(entities, sectionName);
- docSection.comment = SectionComment;
- docAgnosticFormat[sectionName] = docSection;
- break;
- }
- case KindString.Interface:
- case KindString.Variable:
- case KindString.Enumeration:
- case KindString.TypeAlias:
- typeEntities.push(child);
- break;
- default:
- throw errorUtils.spawnSwitchErr('kindString', child.kindString);
- }
- });
- });
- if (!_.isEmpty(typeEntities)) {
- this._docsInfo.sections[constants.TYPES_SECTION_NAME] = constants.TYPES_SECTION_NAME;
- this._docsInfo.markdownMenu[constants.TYPES_SECTION_NAME] = [constants.TYPES_SECTION_NAME];
- const docSection = this._convertEntitiesToDocSection(typeEntities, constants.TYPES_SECTION_NAME);
- docAgnosticFormat[constants.TYPES_SECTION_NAME] = docSection;
- }
-
- return docAgnosticFormat;
- }
- private _convertEntitiesToDocSection(
- entities: TypeDocNode[],
- sectionName: string,
- isClassOrObjectLiteral: boolean = false,
- ): DocSection {
- const docSection: DocSection = {
- comment: '',
- constructors: [],
- methods: [],
- functions: [],
- properties: [],
- types: [],
- };
-
- let isConstructor;
- _.each(entities, entity => {
- switch (entity.kindString) {
- case KindString.Constructor:
- isConstructor = true;
- const constructor = this._convertMethod(entity, isConstructor, sectionName);
- docSection.constructors.push(constructor);
- break;
-
- case KindString.Function:
- if (entity.flags.isExported) {
- const funcName = entity.signatures[0].name;
- if (!this.isUnderscorePrefixed(funcName)) {
- const func = this._convertFunction(entity, sectionName, isClassOrObjectLiteral);
- docSection.functions.push(func);
- }
- }
- break;
-
- case KindString.Method:
- if (entity.flags.isPublic && !this.isUnderscorePrefixed(entity.name)) {
- isConstructor = false;
- const method = this._convertMethod(entity, isConstructor, sectionName);
- docSection.methods.push(method);
- }
- break;
-
- case KindString.Property: {
- if (!this.isUnderscorePrefixed(entity.name)) {
- const property = this._convertProperty(entity, sectionName);
- docSection.properties.push(property);
- }
- break;
- }
-
- case KindString.Variable:
- if (isClassOrObjectLiteral) {
- // Render as a property
- const property = this._convertProperty(entity, sectionName);
- docSection.properties.push(property);
- } else {
- // Otherwise, render as a type
- const customType = this._convertCustomType(entity, sectionName);
- const seenTypeNames = _.map(docSection.types, t => t.name);
- const isUnseen = !_.includes(seenTypeNames, customType.name);
- if (isUnseen) {
- docSection.types.push(customType);
- }
- }
- break;
-
- case KindString.Interface:
- case KindString.Enumeration:
- case KindString.TypeAlias: {
- const customType = this._convertCustomType(entity, sectionName);
- const seenTypeNames = _.map(docSection.types, t => t.name);
- const isUnseen = !_.includes(seenTypeNames, customType.name);
- if (isUnseen) {
- docSection.types.push(customType);
- }
- break;
- }
-
- case KindString.Class:
- // We currently do not support more then a single class per file
- // except for the types section, where we ignore classes since we
- // only want to render type definitions.
- break;
-
- default:
- throw errorUtils.spawnSwitchErr('kindString', entity.kindString);
- }
- });
- return docSection;
- }
- private _convertCustomType(entity: TypeDocNode, sectionName: string): CustomType {
- const typeIfExists = !_.isUndefined(entity.type) ? this._convertType(entity.type, sectionName) : undefined;
- const isConstructor = false;
- const methodIfExists = !_.isUndefined(entity.declaration)
- ? this._convertMethod(entity.declaration, isConstructor, sectionName)
- : undefined;
- const doesIndexSignatureExist = !_.isUndefined(entity.indexSignature);
- const indexSignature = entity.indexSignature;
- const indexSignatureIfExists = doesIndexSignatureExist
- ? this._convertIndexSignature(indexSignature, sectionName)
- : undefined;
- const commentIfExists =
- !_.isUndefined(entity.comment) && !_.isUndefined(entity.comment.shortText)
- ? entity.comment.shortText
- : undefined;
-
- const childrenIfExist = !_.isUndefined(entity.children)
- ? _.map(entity.children, (child: TypeDocNode) => {
- let childTypeIfExists = !_.isUndefined(child.type)
- ? this._convertType(child.type, sectionName)
- : undefined;
- if (child.kindString === KindString.Method) {
- childTypeIfExists = {
- name: child.name,
- typeDocType: TypeDocTypes.Reflection,
- method: this._convertMethod(child, isConstructor, sectionName),
- };
- }
- const c: CustomTypeChild = {
- name: child.name,
- type: childTypeIfExists,
- defaultValue: child.defaultValue,
- };
- return c;
- })
- : undefined;
-
- const customType = {
- name: entity.name,
- kindString: entity.kindString,
- type: typeIfExists,
- method: methodIfExists,
- indexSignature: indexSignatureIfExists,
- defaultValue: entity.defaultValue,
- comment: commentIfExists,
- children: childrenIfExist,
- };
- return customType;
- }
- private _convertIndexSignature(entity: TypeDocNode, sectionName: string): IndexSignature {
- const key = entity.parameters[0];
- const indexSignature = {
- keyName: key.name,
- keyType: this._convertType(key.type, sectionName),
- valueName: entity.type.name,
- };
- return indexSignature;
- }
- private _convertProperty(entity: TypeDocNode, sectionName: string): Property {
- const source = entity.sources[0];
- const commentIfExists = !_.isUndefined(entity.comment) ? entity.comment.shortText : undefined;
- const isConstructor = false;
- const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic;
- const callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name);
- const property = {
- name: entity.name,
- type: this._convertType(entity.type, sectionName),
- source: {
- fileName: source.fileName,
- line: source.line,
- },
- comment: commentIfExists,
- callPath,
- };
- return property;
- }
- private _convertMethod(entity: TypeDocNode, isConstructor: boolean, sectionName: string): TypescriptMethod {
- const signature = entity.signatures[0];
- const source = entity.sources[0];
- const hasComment = !_.isUndefined(signature.comment);
- const isStatic = _.isUndefined(entity.flags.isStatic) ? false : entity.flags.isStatic;
-
- const parameters = _.map(signature.parameters, param => {
- return this._convertParameter(param, sectionName);
- });
- const returnType = this._convertType(signature.type, sectionName);
- const typeParameter = _.isUndefined(signature.typeParameter)
- ? undefined
- : this._convertTypeParameter(signature.typeParameter[0], sectionName);
-
- const callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name);
- const method = {
- isConstructor,
- isStatic,
- name: signature.name,
- comment: hasComment ? signature.comment.shortText : undefined,
- returnComment: hasComment && signature.comment.returns ? signature.comment.returns : undefined,
- source: {
- fileName: source.fileName,
- line: source.line,
- callPath,
- parameters,
- returnType,
- typeParameter,
- },
- callPath,
- parameters,
- returnType,
- typeParameter,
- };
- return method;
- }
- private _getCallPath(sectionName: string, isStatic: boolean, isConstructor: boolean, entityName: string): string {
- // HACK: we use the fact that the sectionName is the same as the property name at the top-level
- // of the public interface. In the future, we shouldn't use this hack but rather get it from the JSON.
- let callPath;
- if (isConstructor || entityName === '__type') {
- callPath = '';
- } else {
- const prefix = isStatic ? sectionName : this._getLowercaseSectionName(sectionName);
- callPath = `${prefix}.`;
- }
- return callPath;
- }
- private _getLowercaseSectionName(sectionName: string): string {
- if (_.startsWith(sectionName, 'ERC')) {
- return `${sectionName.slice(0, 3).toLowerCase()}${sectionName.slice(3)}`;
- }
- return `${sectionName[0].toLowerCase()}${sectionName.slice(1)}`;
- }
- private _convertFunction(entity: TypeDocNode, sectionName: string, isObjectLiteral: boolean): TypescriptFunction {
- const signature = entity.signatures[0];
- const source = entity.sources[0];
- const hasComment = !_.isUndefined(signature.comment);
-
- const parameters = _.map(signature.parameters, param => {
- return this._convertParameter(param, sectionName);
- });
- const returnType = this._convertType(signature.type, sectionName);
- const typeParameter = _.isUndefined(signature.typeParameter)
- ? undefined
- : this._convertTypeParameter(signature.typeParameter[0], sectionName);
-
- let callPath = '';
- if (isObjectLiteral) {
- const isConstructor = false;
- const isStatic = false;
- callPath = this._getCallPath(sectionName, isStatic, isConstructor, entity.name);
- }
- const func = {
- name: signature.name,
- comment: hasComment ? signature.comment.shortText : undefined,
- returnComment: hasComment && signature.comment.returns ? signature.comment.returns : undefined,
- callPath,
- source: {
- fileName: source.fileName,
- line: source.line,
- },
- parameters,
- returnType,
- typeParameter,
- };
- return func;
- }
- private _convertTypeParameter(entity: TypeDocNode, sectionName: string): TypeParameter {
- let type;
- if (!_.isUndefined(entity.type)) {
- type = this._convertType(entity.type, sectionName);
- }
- const parameter = {
- name: entity.name,
- type,
- };
- return parameter;
- }
- private _convertParameter(entity: TypeDocNode, sectionName: string): Parameter {
- let comment = '<No comment>';
- if (entity.comment && entity.comment.shortText) {
- comment = entity.comment.shortText;
- } else if (entity.comment && entity.comment.text) {
- comment = entity.comment.text;
- }
-
- const isOptional = !_.isUndefined(entity.flags.isOptional) ? entity.flags.isOptional : false;
-
- const type = this._convertType(entity.type, sectionName);
-
- const parameter = {
- name: entity.name,
- comment,
- isOptional,
- defaultValue: entity.defaultValue,
- type,
- };
- return parameter;
- }
- private _convertType(entity: TypeDocType, sectionName: string): Type {
- const typeArguments = _.map(entity.typeArguments, typeArgument => {
- return this._convertType(typeArgument, sectionName);
- });
- const types = _.map(entity.types, t => {
- return this._convertType(t, sectionName);
- });
-
- let indexSignatureIfExists;
- let methodIfExists;
- let tupleElementsIfExists;
- const doesIndexSignatureExist =
- !_.isUndefined(entity.declaration) && !_.isUndefined(entity.declaration.indexSignature);
- if (doesIndexSignatureExist) {
- const indexSignature = entity.declaration.indexSignature;
- indexSignatureIfExists = this._convertIndexSignature(indexSignature, sectionName);
- } else if (!_.isUndefined(entity.declaration)) {
- const isConstructor = false;
- methodIfExists = this._convertMethod(entity.declaration, isConstructor, sectionName);
- } else if (entity.type === TypeDocTypes.Tuple) {
- tupleElementsIfExists = _.map(entity.elements, el => {
- // the following line is required due to an open tslint issue, https://github.com/palantir/tslint/issues/3540
- // tslint:disable-next-line:no-unnecessary-type-assertion
- return { name: el.name, typeDocType: el.type as TypeDocTypes };
- });
- }
-
- const elementTypeIfExists = !_.isUndefined(entity.elementType)
- ? {
- name: entity.elementType.name,
- typeDocType: entity.elementType.type,
- }
- : undefined;
-
- const type: Type = {
- name: entity.name,
- value: entity.value,
- isExportedClassReference: _.includes(this._classNames, entity.name),
- typeDocType: entity.type,
- typeArguments,
- elementType: elementTypeIfExists,
- types,
- method: methodIfExists,
- indexSignature: indexSignatureIfExists,
- tupleElements: tupleElementsIfExists,
- };
- const externalLinkIfExists = this._externalTypeToLink[entity.name];
- if (!_.isUndefined(externalLinkIfExists)) {
- type.externalLink = externalLinkIfExists;
- }
- return type;
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/react-docs/tsconfig.json b/packages/react-docs/tsconfig.json
deleted file mode 100644
index 76e2cd027..000000000
--- a/packages/react-docs/tsconfig.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src",
- "jsx": "react",
- "baseUrl": ".",
- "strictNullChecks": false,
- "paths": {
- "*": ["node_modules/@types/*", "*"]
- }
- },
- "include": ["./src/**/*"]
-}
diff --git a/packages/react-docs/tslint.json b/packages/react-docs/tslint.json
deleted file mode 100644
index c3f6d9cae..000000000
--- a/packages/react-docs/tslint.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "no-object-literal-type-assertion": false,
- "completed-docs": false,
- "prefer-function-over-method": false,
- "custom-no-magic-numbers": false
- }
-}
diff --git a/packages/react-shared/.npmignore b/packages/react-shared/.npmignore
deleted file mode 100644
index d645458f6..000000000
--- a/packages/react-shared/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/src/
-/scripts/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/react-shared/CHANGELOG.json b/packages/react-shared/CHANGELOG.json
deleted file mode 100644
index 99a8779ac..000000000
--- a/packages/react-shared/CHANGELOG.json
+++ /dev/null
@@ -1,370 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop.",
- "pr": 1448
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "1.0.25",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.24",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1543401373,
- "version": "1.0.23",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.22",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "1.0.21",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "version": "1.0.20",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542028948,
- "version": "1.0.19",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.18",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.0.17",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1539871071
- },
- {
- "timestamp": 1538693146,
- "version": "1.0.16",
- "changes": [
- {
- "note": "Unpublished package"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537875740,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535377027,
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535133899,
- "version": "1.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1534210131,
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532619515,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532614997,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532605697,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532551340,
- "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.2.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.2.0",
- "changes": [
- {
- "note": "Removed portal specific colors"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.1.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525466747,
- "version": "0.1.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.1.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.1.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1523462196,
- "version": "0.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522673609,
- "version": "0.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.1.0",
- "changes": [
- {
- "note": "Added new colors",
- "pr": 468
- },
- {
- "note": "Fix section and menuItem text display to replace dashes with spaces."
- },
- {
- "note": "Reorganized colors and added new ones"
- }
- ],
- "timestamp": 1522658513
- }
-]
diff --git a/packages/react-shared/CHANGELOG.md b/packages/react-shared/CHANGELOG.md
deleted file mode 100644
index e1a5df403..000000000
--- a/packages/react-shared/CHANGELOG.md
+++ /dev/null
@@ -1,164 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.1.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.1.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.1.0 - _January 9, 2019_
-
- * Change implementation to use react-router-dom NavLink instead of Link. Expose `activeStyle` prop. (#1448)
-
-## v1.0.25 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.0.24 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.0.23 - _November 28, 2018_
-
- * Dependencies updated
-
-## v1.0.22 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.21 - _November 14, 2018_
-
- * Dependencies updated
-
-## v1.0.20 - _November 13, 2018_
-
- * Dependencies updated
-
-## v1.0.19 - _November 12, 2018_
-
- * Dependencies updated
-
-## v1.0.18 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.17 - _October 18, 2018_
-
- * Dependencies updated
-
-## v1.0.16 - _October 4, 2018_
-
- * Unpublished package
-
-## v1.0.14 - _October 2, 2018_
-
- * Dependencies updated
-
-## v1.0.13 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.12 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.11 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _August 27, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _August 24, 2018_
-
- * Dependencies updated
-
-## v1.0.6 - _August 14, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.3 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.2 - _July 25, 2018_
-
- * Dependencies updated
-
-## v1.0.1 - _July 23, 2018_
-
- * Dependencies updated
-
-## v1.0.0 - _July 19, 2018_
-
- * Dependencies updated
-
-## v0.2.3 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.2.2 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.2.1 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.2.0 - _May 4, 2018_
-
- * Removed portal specific colors
-
-## v0.1.6 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.1.5 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.1.4 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.1.3 - _April 18, 2018_
-
- * Dependencies updated
-
-## v0.1.2 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.1.1 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.1.0 - _April 2, 2018_
-
- * Added new colors (#468)
- * Fix section and menuItem text display to replace dashes with spaces.
- * Reorganized colors and added new ones
diff --git a/packages/react-shared/README.md b/packages/react-shared/README.md
deleted file mode 100644
index 7ff9a94d9..000000000
--- a/packages/react-shared/README.md
+++ /dev/null
@@ -1,63 +0,0 @@
-## @0x/react-shared
-
-Contains React components & frontend types/utils shared between 0x projects.
-
-## Installation
-
-```bash
-yarn add @0x/react-shared
-```
-
-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/react-shared yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/react-shared yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/react-shared/package.json b/packages/react-shared/package.json
deleted file mode 100644
index 4be4742b0..000000000
--- a/packages/react-shared/package.json
+++ /dev/null
@@ -1,65 +0,0 @@
-{
- "name": "@0x/react-shared",
- "version": "1.1.2",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x shared react components",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "lint": "tslint --format stylish --project .",
- "build": "tsc",
- "build:ci": "yarn build",
- "watch_without_deps": "tsc -w",
- "clean": "shx rm -rf lib"
- },
- "author": "Fabio Berger",
- "license": "Apache-2.0",
- "bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
- },
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/react-shared/README.md",
- "repository": {
- "type": "git",
- "url": "https://github.com/0xProject/0x-monorepo.git"
- },
- "devDependencies": {
- "@0x/dev-utils": "^1.0.24",
- "@0x/tslint-config": "^2.0.2",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "^5.9.1",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/types": "^1.5.2",
- "@material-ui/core": "^3.0.1",
- "@types/is-mobile": "0.3.0",
- "@types/lodash": "4.14.104",
- "@types/material-ui": "0.18.0",
- "@types/node": "*",
- "@types/react": "*",
- "@types/react-dom": "*",
- "@types/react-router-dom": "^4.0.4",
- "@types/react-scroll": "1.5.3",
- "@types/styled-components": "4.0.0",
- "@types/valid-url": "^1.0.2",
- "basscss": "^8.0.3",
- "change-case": "^3.0.2",
- "is-mobile": "^0.2.2",
- "lodash": "^4.17.5",
- "material-ui": "^0.20.0",
- "react": "^16.5.2",
- "react-dom": "^16.5.2",
- "react-highlight": "0xproject/react-highlight#fix/react-version",
- "react-markdown": "^3.2.2",
- "react-router-dom": "^4.1.1",
- "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
- "styled-components": "^4.0.1",
- "valid-url": "^1.0.9"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/react-shared/src/components/anchor_title.tsx b/packages/react-shared/src/components/anchor_title.tsx
deleted file mode 100644
index fccd56de7..000000000
--- a/packages/react-shared/src/components/anchor_title.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { Link } from '../components/link';
-import { HeaderSizes, Styles } from '../types';
-import { colors } from '../utils/colors';
-
-export interface AnchorTitleProps {
- title: string | React.ReactNode;
- id: string;
- headerSize: HeaderSizes;
- shouldShowAnchor: boolean;
- isDisabled: boolean;
-}
-
-export interface AnchorTitleState {}
-
-const styles: Styles = {
- h1: {
- fontSize: '1.875em',
- },
- h2: {
- fontSize: '1.5em',
- fontWeight: 400,
- },
- h3: {
- fontSize: '1.17em',
- },
-};
-
-interface AnchorIconProps {
- shouldShowAnchor: boolean;
-}
-
-const AnchorIcon = styled.i<AnchorIconProps>`
- opacity: ${props => (props.shouldShowAnchor ? 1 : 0)};
- &:hover {
- opacity: ${props => (props.shouldShowAnchor ? 0.6 : 0)};
- }
- font-size: 20px;
- transform: rotate(45deg);
- cursor: pointer;
-`;
-
-export class AnchorTitle extends React.Component<AnchorTitleProps, AnchorTitleState> {
- public static defaultProps: Partial<AnchorTitleProps> = {
- isDisabled: false,
- };
- public render(): React.ReactNode {
- return (
- <div
- className="relative flex"
- style={
- {
- ...styles[this.props.headerSize],
- fontWeight: 'bold',
- display: 'block',
- WebkitMarginStart: 0,
- WebkitMarginEnd: 0,
- } as any
- }
- >
- <div className="inline-block" style={{ paddingRight: 4, color: colors.darkestGrey }}>
- {this.props.title}
- </div>
- {!this.props.isDisabled && (
- <Link to={this.props.id}>
- <AnchorIcon className="zmdi zmdi-link" shouldShowAnchor={this.props.shouldShowAnchor} />
- </Link>
- )}
- </div>
- );
- }
-}
diff --git a/packages/react-shared/src/components/link.tsx b/packages/react-shared/src/components/link.tsx
deleted file mode 100644
index 2fb19ac11..000000000
--- a/packages/react-shared/src/components/link.tsx
+++ /dev/null
@@ -1,150 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { NavLink as ReactRounterLink } from 'react-router-dom';
-import { Link as ScrollLink } from 'react-scroll';
-import * as validUrl from 'valid-url';
-
-import { LinkType } from '../types';
-import { constants } from '../utils/constants';
-
-export interface BaseLinkProps {
- to: string;
- shouldOpenInNewTab?: boolean;
- className?: string;
- onMouseOver?: (event: React.MouseEvent<HTMLElement>) => void;
- onMouseLeave?: (event: React.MouseEvent<HTMLElement>) => void;
- onMouseEnter?: (event: React.MouseEvent<HTMLElement>) => void;
- textDecoration?: string;
- fontColor?: string;
-}
-
-export interface ScrollLinkProps extends BaseLinkProps {
- onActivityChanged?: (isActive: boolean) => void;
-}
-
-export interface ReactLinkProps extends BaseLinkProps {
- activeStyle?: React.CSSProperties;
-}
-
-export type LinkProps = ReactLinkProps & ScrollLinkProps;
-
-export interface LinkState {}
-
-/**
- * A generic link component which let's the developer render internal, external and scroll-to-hash links, and
- * their associated behaviors with a single link component. Many times we want a menu including a combination of
- * internal, external and scroll links and the abstraction of the differences of rendering each types of link
- * makes it much easier to do so.
- */
-export class Link extends React.Component<LinkProps, LinkState> {
- public static defaultProps: Partial<LinkProps> = {
- shouldOpenInNewTab: false,
- className: '',
- onMouseOver: _.noop.bind(_),
- onMouseLeave: _.noop.bind(_),
- onMouseEnter: _.noop.bind(_),
- textDecoration: 'none',
- fontColor: 'inherit',
- };
- private _outerReactScrollSpan: HTMLSpanElement | null;
- constructor(props: LinkProps) {
- super(props);
- this._outerReactScrollSpan = null;
- }
- public render(): React.ReactNode {
- let type: LinkType;
- const isReactRoute = _.startsWith(this.props.to, '/');
- const isExternal = validUrl.isWebUri(this.props.to) || _.startsWith(this.props.to, 'mailto:');
- if (isReactRoute) {
- type = LinkType.ReactRoute;
- } else if (isExternal) {
- type = LinkType.External;
- } else {
- type = LinkType.ReactScroll;
- }
-
- if (type === LinkType.ReactScroll && this.props.shouldOpenInNewTab) {
- throw new Error(`Cannot open LinkType.ReactScroll links in new tab. link.to: ${this.props.to}`);
- }
-
- const styleWithDefault = {
- textDecoration: this.props.textDecoration,
- cursor: 'pointer',
- color: this.props.fontColor,
- };
-
- switch (type) {
- case LinkType.External:
- return (
- <a
- target={this.props.shouldOpenInNewTab ? '_blank' : ''}
- className={this.props.className}
- style={styleWithDefault}
- href={this.props.to}
- onMouseOver={this.props.onMouseOver}
- onMouseEnter={this.props.onMouseEnter}
- onMouseLeave={this.props.onMouseLeave}
- >
- {this.props.children}
- </a>
- );
- case LinkType.ReactRoute:
- return (
- <ReactRounterLink
- to={this.props.to}
- className={this.props.className}
- style={styleWithDefault}
- target={this.props.shouldOpenInNewTab ? '_blank' : ''}
- onMouseOver={this.props.onMouseOver}
- onMouseEnter={this.props.onMouseEnter}
- onMouseLeave={this.props.onMouseLeave}
- activeStyle={this.props.activeStyle}
- >
- {this.props.children}
- </ReactRounterLink>
- );
- case LinkType.ReactScroll:
- return (
- <span
- ref={input => (this._outerReactScrollSpan = input)}
- onMouseOver={this.props.onMouseOver}
- onMouseEnter={this.props.onMouseEnter}
- onMouseLeave={this.props.onMouseLeave}
- >
- <ScrollLink
- to={this.props.to}
- offset={0}
- spy={true}
- hashSpy={true}
- duration={constants.DOCS_SCROLL_DURATION_MS}
- containerId={constants.SCROLL_CONTAINER_ID}
- className={this.props.className}
- style={styleWithDefault}
- onSetActive={this._onActivityChanged.bind(this, true)}
- onSetInactive={this._onActivityChanged.bind(this, false)}
- >
- <span onClick={this._onClickPropagateClickEventAroundScrollLink.bind(this)}>
- {this.props.children}
- </span>
- </ScrollLink>
- </span>
- );
- default:
- throw new Error(`Unrecognized LinkType: ${type}`);
- }
- }
- private _onActivityChanged(isActive: boolean): void {
- if (this.props.onActivityChanged) {
- this.props.onActivityChanged(isActive);
- }
- }
- // HACK(fabio): For some reason, the react-scroll link decided to stop the propagation of click events.
- // We do however rely on these events being propagated in certain scenarios (e.g when the link
- // is within a dropdown we want to close upon being clicked). Because of this, we register the
- // click event of an inner span, and pass it around the react-scroll link to an outer span.
- private _onClickPropagateClickEventAroundScrollLink(): void {
- if (!_.isNull(this._outerReactScrollSpan)) {
- this._outerReactScrollSpan.click();
- }
- }
-}
diff --git a/packages/react-shared/src/components/markdown_code_block.tsx b/packages/react-shared/src/components/markdown_code_block.tsx
deleted file mode 100644
index 3b28424cd..000000000
--- a/packages/react-shared/src/components/markdown_code_block.tsx
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as React from 'react';
-import * as HighLight from 'react-highlight';
-
-export interface MarkdownCodeBlockProps {
- value: string;
- language: string;
-}
-
-export interface MarkdownCodeBlockState {}
-
-export class MarkdownCodeBlock extends React.Component<MarkdownCodeBlockProps, MarkdownCodeBlockState> {
- // Re-rendering a codeblock causes any use selection to become de-selected. This is annoying when trying
- // to copy-paste code examples. We therefore noop re-renders on this component if it's props haven't changed.
- public shouldComponentUpdate(nextProps: MarkdownCodeBlockProps, _nextState: MarkdownCodeBlockState): boolean {
- return nextProps.value !== this.props.value || nextProps.language !== this.props.language;
- }
- public render(): React.ReactNode {
- return (
- <span style={{ fontSize: 14 }}>
- <HighLight className={this.props.language || 'javascript'}>{this.props.value}</HighLight>
- </span>
- );
- }
-}
diff --git a/packages/react-shared/src/components/markdown_link_block.tsx b/packages/react-shared/src/components/markdown_link_block.tsx
deleted file mode 100644
index f083a91cf..000000000
--- a/packages/react-shared/src/components/markdown_link_block.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { constants } from '../utils/constants';
-import { utils } from '../utils/utils';
-
-export interface MarkdownLinkBlockProps {
- href: string;
-}
-
-export interface MarkdownLinkBlockState {}
-
-export class MarkdownLinkBlock extends React.Component<MarkdownLinkBlockProps, MarkdownLinkBlockState> {
- // Re-rendering a linkBlock causes it to remain unclickable.
- // We therefore noop re-renders on this component if it's props haven't changed.
- public shouldComponentUpdate(nextProps: MarkdownLinkBlockProps, _nextState: MarkdownLinkBlockState): boolean {
- return nextProps.href !== this.props.href;
- }
- public render(): React.ReactNode {
- const href = this.props.href;
- const isLinkToSection = _.startsWith(href, '#');
- // If protocol is http or https, we can open in a new tab, otherwise don't for security reasons
- if (_.startsWith(href, 'http') || _.startsWith(href, 'https')) {
- return (
- <a href={href} target="_blank" rel="nofollow noreferrer noopener">
- {this.props.children}
- </a>
- );
- } else if (isLinkToSection) {
- return (
- <a
- style={{ cursor: 'pointer', textDecoration: 'underline' }}
- onClick={this._onHashUrlClick.bind(this, href)}
- >
- {this.props.children}
- </a>
- );
- } else {
- return <a href={href}>{this.props.children}</a>;
- }
- }
- private _onHashUrlClick(href: string): void {
- const hash = href.split('#')[1];
- utils.scrollToHash(hash, constants.SCROLL_CONTAINER_ID);
- utils.setUrlHash(hash);
- }
-}
diff --git a/packages/react-shared/src/components/markdown_paragraph_block.tsx b/packages/react-shared/src/components/markdown_paragraph_block.tsx
deleted file mode 100644
index eeaef8571..000000000
--- a/packages/react-shared/src/components/markdown_paragraph_block.tsx
+++ /dev/null
@@ -1,10 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { colors } from '../utils/colors';
-
-export interface MarkdownParagraphBlockProps {}
-
-export const MarkdownParagraphBlock: React.StatelessComponent<MarkdownParagraphBlockProps> = ({ children }) => {
- return <span style={{ color: colors.greyTheme, lineHeight: '26px' }}>{children}</span>;
-};
diff --git a/packages/react-shared/src/components/markdown_section.tsx b/packages/react-shared/src/components/markdown_section.tsx
deleted file mode 100644
index 42c910c11..000000000
--- a/packages/react-shared/src/components/markdown_section.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as ReactMarkdown from 'react-markdown';
-import { Element as ScrollElement } from 'react-scroll';
-
-import { HeaderSizes } from '../types';
-import { colors } from '../utils/colors';
-import { utils } from '../utils/utils';
-
-import { AnchorTitle } from './anchor_title';
-import { Link } from './link';
-import { MarkdownCodeBlock } from './markdown_code_block';
-import { MarkdownLinkBlock } from './markdown_link_block';
-import { MarkdownParagraphBlock } from './markdown_paragraph_block';
-
-export interface MarkdownSectionProps {
- sectionName: string;
- markdownContent: string;
- headerSize?: HeaderSizes;
- githubLink?: string;
- alternativeSectionTitle?: string;
-}
-
-interface DefaultMarkdownSectionProps {
- headerSize: HeaderSizes;
-}
-
-type PropsWithDefaults = MarkdownSectionProps & DefaultMarkdownSectionProps;
-
-export interface MarkdownSectionState {
- shouldShowAnchor: boolean;
-}
-
-export class MarkdownSection extends React.Component<MarkdownSectionProps, MarkdownSectionState> {
- public static defaultProps: Partial<MarkdownSectionProps> = {
- headerSize: HeaderSizes.H3,
- };
- constructor(props: MarkdownSectionProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const { sectionName, markdownContent, headerSize, githubLink } = this.props as PropsWithDefaults;
-
- const id = utils.getIdFromName(sectionName);
- const formattedSectionName = utils.convertCamelCaseToSpaces(sectionName);
- const title = !_.isUndefined(this.props.alternativeSectionTitle)
- ? this.props.alternativeSectionTitle
- : _.capitalize(formattedSectionName);
- return (
- <div
- className="md-px1 sm-px2 overflow-hidden"
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- <ScrollElement name={id} style={{ paddingBottom: 20 }}>
- <div className="clearfix" style={{ paddingTop: 30, paddingBottom: 20 }}>
- <div className="col lg-col-8 md-col-8 sm-col-12">
- <span style={{ color: colors.grey700 }}>
- <AnchorTitle
- headerSize={headerSize}
- title={title}
- id={id}
- shouldShowAnchor={this.state.shouldShowAnchor}
- />
- </span>
- </div>
- <div className="col col-4 sm-hide xs-hide right-align pr3" style={{ height: 28 }}>
- {!_.isUndefined(githubLink) && (
- <div style={{ lineHeight: 2.1 }}>
- <Link to={githubLink} shouldOpenInNewTab={true} fontColor={colors.linkBlue}>
- Edit on Github
- </Link>
- </div>
- )}
- </div>
- </div>
- <ReactMarkdown
- source={markdownContent}
- escapeHtml={false}
- renderers={{
- code: MarkdownCodeBlock,
- link: MarkdownLinkBlock,
- paragraph: MarkdownParagraphBlock,
- }}
- />
- <div
- style={{
- width: '100%',
- height: 1,
- backgroundColor: colors.grey300,
- marginTop: 32,
- }}
- />
- </ScrollElement>
- </div>
- );
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
-}
diff --git a/packages/react-shared/src/components/section_header.tsx b/packages/react-shared/src/components/section_header.tsx
deleted file mode 100644
index 137b63765..000000000
--- a/packages/react-shared/src/components/section_header.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as React from 'react';
-import { Element as ScrollElement } from 'react-scroll';
-
-import { HeaderSizes } from '../types';
-import { colors } from '../utils/colors';
-import { utils } from '../utils/utils';
-
-import { AnchorTitle } from './anchor_title';
-
-export interface SectionHeaderProps {
- sectionName: string;
- headerSize?: HeaderSizes;
-}
-
-interface DefaultSectionHeaderProps {
- headerSize: HeaderSizes;
-}
-
-type PropsWithDefaults = SectionHeaderProps & DefaultSectionHeaderProps;
-
-export interface SectionHeaderState {
- shouldShowAnchor: boolean;
-}
-
-export class SectionHeader extends React.Component<SectionHeaderProps, SectionHeaderState> {
- public static defaultProps: Partial<SectionHeaderProps> = {
- headerSize: HeaderSizes.H2,
- };
- constructor(props: SectionHeaderProps) {
- super(props);
- this.state = {
- shouldShowAnchor: false,
- };
- }
- public render(): React.ReactNode {
- const { headerSize } = this.props as PropsWithDefaults;
-
- const finalSectionName = utils.convertDashesToSpaces(this.props.sectionName);
- const id = utils.getIdFromName(finalSectionName);
- return (
- <div
- onMouseOver={this._setAnchorVisibility.bind(this, true)}
- onMouseOut={this._setAnchorVisibility.bind(this, false)}
- >
- <ScrollElement name={id}>
- <AnchorTitle
- headerSize={headerSize}
- title={
- <span
- style={{
- textTransform: 'capitalize',
- color: colors.grey,
- fontFamily: 'Roboto Mono',
- fontWeight: 300,
- fontSize: 27,
- }}
- >
- {finalSectionName}
- </span>
- }
- id={id}
- shouldShowAnchor={this.state.shouldShowAnchor}
- />
- </ScrollElement>
- </div>
- );
- }
- private _setAnchorVisibility(shouldShowAnchor: boolean): void {
- this.setState({
- shouldShowAnchor,
- });
- }
-}
diff --git a/packages/react-shared/src/globals.d.ts b/packages/react-shared/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/react-shared/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/react-shared/src/index.ts b/packages/react-shared/src/index.ts
deleted file mode 100644
index 285e1c6b4..000000000
--- a/packages/react-shared/src/index.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-export { AnchorTitle } from './components/anchor_title';
-export { MarkdownLinkBlock } from './components/markdown_link_block';
-export { MarkdownCodeBlock } from './components/markdown_code_block';
-export { MarkdownSection } from './components/markdown_section';
-export { SectionHeader } from './components/section_header';
-export { Link, LinkProps } from './components/link';
-
-export { HeaderSizes, Styles, EtherscanLinkSuffixes, Networks, ALink } from './types';
-
-export { utils } from './utils/utils';
-export { constants } from './utils/constants';
-export { colors } from './utils/colors';
diff --git a/packages/react-shared/src/types.ts b/packages/react-shared/src/types.ts
deleted file mode 100644
index 9e8dcb6b6..000000000
--- a/packages/react-shared/src/types.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-export interface Styles {
- [name: string]: React.CSSProperties;
-}
-
-export enum HeaderSizes {
- H1 = 'h1',
- H2 = 'h2',
- H3 = 'h3',
-}
-
-export enum EtherscanLinkSuffixes {
- Address = 'address',
- Tx = 'tx',
-}
-
-export enum Networks {
- Mainnet = 'Mainnet',
- Kovan = 'Kovan',
- Ropsten = 'Ropsten',
- Rinkeby = 'Rinkeby',
-}
-
-export enum LinkType {
- External = 'EXTERNAL',
- ReactScroll = 'REACT_SCROLL',
- ReactRoute = 'REACT_ROUTE',
-}
-
-export interface ALink {
- title: string;
- to: string;
- shouldOpenInNewTab?: boolean;
-}
diff --git a/packages/react-shared/src/utils/colors.ts b/packages/react-shared/src/utils/colors.ts
deleted file mode 100644
index a4dd7fefa..000000000
--- a/packages/react-shared/src/utils/colors.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { colors as materialUiColors } from 'material-ui/styles';
-
-const baseColors = {
- gray40: '#F8F8F8',
- grey50: '#FAFAFA',
- grey100: '#F5F5F5',
- lightestGrey: '#F0F0F0',
- greyishPink: '#E6E5E5',
- grey300: '#E0E0E0',
- beigeWhite: '#E4E4E4',
- lightBgGrey: '#EDEDED',
- grey325: '#dfdfdf',
- grey350: '#CACACA',
- grey400: '#BDBDBD',
- lightGrey: '#BBBBBB',
- grey500: '#9E9E9E',
- grey: '#A5A5A5',
- darkGrey: '#818181',
- landingLinkGrey: '#919191',
- linkSectionGrey: '#999999',
- greyTheme: '#666666',
- grey700: '#616161',
- grey750: '#515151',
- grey800: '#424242',
- darkerGrey: '#393939',
- heroGrey: '#404040',
- projectsGrey: '#343333',
- darkestGrey: '#272727',
- lightestBlue: '#E7F1FD',
- lightBlue: '#60A4F4',
- lightBlueA700: '#0091EA',
- lightLinkBlue: '#3289F1',
- mediumBlue: '#488AEA',
- linkBlue: '#1D5CDE',
- darkBlue: '#4D5481',
- lightTurquois: '#aefcdc',
- turquois: '#058789',
- lightPurple: '#A81CA6',
- purple: '#690596',
- red200: '#EF9A9A',
- red: '#E91751',
- red500: '#F44336',
- red600: '#E53935',
- limeGreen: '#66DE75',
- lightGreen: '#4DC55C',
- lightestGreen: '#89C774',
- brightGreen: '#00C33E',
- green400: '#66BB6A',
- green: '#4DA24B',
- amber600: '#FFB300',
- orange: '#E69D00',
- amber800: '#FF8F00',
- darkYellow: '#caca03',
-};
-
-export const colors = {
- ...materialUiColors,
- ...baseColors,
-};
diff --git a/packages/react-shared/src/utils/constants.ts b/packages/react-shared/src/utils/constants.ts
deleted file mode 100644
index 2dca1a078..000000000
--- a/packages/react-shared/src/utils/constants.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { Networks } from '../types';
-
-export const constants = {
- DOCS_SCROLL_DURATION_MS: 0,
- SCROLL_CONTAINER_ID: 'scroll_container',
- SCROLL_TOP_ID: 'pageScrollTop',
- NETWORK_NAME_BY_ID: {
- 1: Networks.Mainnet,
- 3: Networks.Ropsten,
- 4: Networks.Rinkeby,
- 42: Networks.Kovan,
- } as { [symbol: number]: string },
- NETWORK_ID_BY_NAME: {
- [Networks.Mainnet]: 1,
- [Networks.Ropsten]: 3,
- [Networks.Rinkeby]: 4,
- [Networks.Kovan]: 42,
- } as { [networkName: string]: number },
-};
diff --git a/packages/react-shared/src/utils/utils.ts b/packages/react-shared/src/utils/utils.ts
deleted file mode 100644
index 142aea85d..000000000
--- a/packages/react-shared/src/utils/utils.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import changeCase = require('change-case');
-import isMobile = require('is-mobile');
-import * as _ from 'lodash';
-import { scroller } from 'react-scroll';
-
-import { EtherscanLinkSuffixes, Networks } from '../types';
-
-import { constants } from './constants';
-
-export const utils = {
- setUrlHash(anchorId: string): void {
- window.location.hash = anchorId;
- },
- scrollToHash(hash: string, containerId: string): void {
- let finalHash = hash;
- if (_.isEmpty(hash)) {
- finalHash = constants.SCROLL_TOP_ID; // scroll to the top
- }
-
- scroller.scrollTo(finalHash, {
- duration: 0,
- offset: 0,
- containerId,
- });
- },
- isUserOnMobile(): boolean {
- const isUserOnMobile = isMobile();
- return isUserOnMobile;
- },
- getIdFromName(name: string): string {
- const id = name.replace(/ /g, '-');
- return id;
- },
- convertDashesToSpaces(text: string): string {
- return text.replace(/-/g, ' ');
- },
- convertCamelCaseToSpaces(text: string): string {
- return changeCase.snake(text).replace(/_/g, ' ');
- },
- getEtherScanLinkIfExists(
- addressOrTxHash: string,
- networkId: number,
- suffix: EtherscanLinkSuffixes,
- ): string | undefined {
- const networkName = constants.NETWORK_NAME_BY_ID[networkId];
- if (_.isUndefined(networkName)) {
- return undefined;
- }
- const etherScanPrefix = networkName === Networks.Mainnet ? '' : `${networkName.toLowerCase()}.`;
- return `https://${etherScanPrefix}etherscan.io/${suffix}/${addressOrTxHash}`;
- },
-};
diff --git a/packages/react-shared/tsconfig.json b/packages/react-shared/tsconfig.json
deleted file mode 100644
index 5abe0ab4e..000000000
--- a/packages/react-shared/tsconfig.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src",
- "jsx": "react",
- "baseUrl": ".",
- "paths": {
- "*": ["node_modules/@types/*", "*"]
- }
- },
- "include": ["./src/**/*"]
-}
diff --git a/packages/react-shared/tslint.json b/packages/react-shared/tslint.json
deleted file mode 100644
index c3f6d9cae..000000000
--- a/packages/react-shared/tslint.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "no-object-literal-type-assertion": false,
- "completed-docs": false,
- "prefer-function-over-method": false,
- "custom-no-magic-numbers": false
- }
-}
diff --git a/packages/sol-compiler/README.md b/packages/sol-compiler/README.md
index 412a5fc02..a75d92e7e 100644
--- a/packages/sol-compiler/README.md
+++ b/packages/sol-compiler/README.md
@@ -1,4 +1,4 @@
-## @0x/sol-compiler
+## @dexon-foundation/sol-compiler
Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds:
@@ -15,13 +15,13 @@ Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) t
#### CLI Installation
```bash
-yarn global add @0x/sol-compiler
+yarn global add @dexon-foundation/sol-compiler
```
#### API Installation
```bash
-yarn add @0x/sol-compiler
+yarn add @dexon-foundation/sol-compiler
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
@@ -35,13 +35,13 @@ If your project is in [TypeScript](https://www.typescriptlang.org/), add the fol
**Import**
```typescript
-import { Compiler } from '@0x/sol-compiler';
+import { Compiler } from '@dexon-foundation/sol-compiler';
```
or
```javascript
-var Compiler = require('@0x/sol-compiler').Compiler;
+var Compiler = require('@dexon-foundation/sol-compiler').Compiler;
```
## Contributing
@@ -69,13 +69,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0x/sol-compiler yarn build
+PKG=@dexon-foundation/sol-compiler yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0x/sol-compiler yarn watch
+PKG=@dexon-foundation/sol-compiler yarn watch
```
### Clean
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index 0b53cffd5..344621285 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -1,6 +1,6 @@
{
- "name": "@0x/sol-compiler",
- "version": "2.0.2",
+ "name": "@dexon-foundation/sol-compiler",
+ "version": "2.0.5",
"engines": {
"node": ">=6.12"
},
@@ -29,7 +29,7 @@
}
},
"bin": {
- "sol-compiler": "bin/sol-compiler.js"
+ "dsol-compiler": "bin/sol-compiler.js"
},
"repository": {
"type": "git",
@@ -74,6 +74,8 @@
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"@0x/web3-wrapper": "^3.2.4",
+ "@dexon-foundation/dsolc": "^0.5.1",
+ "@dexon-foundation/typescript-typings": "^1.0.0",
"@types/yargs": "^11.0.0",
"chalk": "^2.3.0",
"chokidar": "^2.0.4",
@@ -84,7 +86,6 @@
"pluralize": "^7.0.0",
"require-from-string": "^2.0.1",
"semver": "5.5.0",
- "solc": "^0.5.2",
"source-map-support": "^0.5.0",
"web3-eth-abi": "^1.0.0-beta.24",
"yargs": "^10.0.3"
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index d38ccbf39..4bc9343e7 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -17,7 +17,7 @@ import * as _ from 'lodash';
import * as path from 'path';
import * as pluralize from 'pluralize';
import * as semver from 'semver';
-import solc = require('solc');
+import solc = require('@dexon-foundation/dsolc');
import { compilerOptionsSchema } from './schemas/compiler_options_schema';
import { binPaths } from './solc/bin_paths';
diff --git a/packages/sol-compiler/src/solc/bin_paths.ts b/packages/sol-compiler/src/solc/bin_paths.ts
index b653c0926..daa17ae6c 100644
--- a/packages/sol-compiler/src/solc/bin_paths.ts
+++ b/packages/sol-compiler/src/solc/bin_paths.ts
@@ -3,50 +3,7 @@ export interface BinaryPaths {
}
export const binPaths: BinaryPaths = {
- '0.5.2': 'soljson-v0.5.2+commit.1df8f40c.js',
- '0.5.1': 'soljson-v0.5.1+commit.c8a2cb62.js',
- '0.5.0': 'soljson-v0.5.0+commit.1d4f565a.js',
- '0.4.25': 'soljson-v0.4.25+commit.59dbf8f1.js',
- '0.4.24': 'soljson-v0.4.24+commit.e67f0147.js',
- '0.4.23': 'soljson-v0.4.23+commit.124ca40d.js',
- '0.4.22': 'soljson-v0.4.22+commit.4cb486ee.js',
- '0.4.21': 'soljson-v0.4.21+commit.dfe3193c.js',
- '0.4.20': 'soljson-v0.4.20+commit.3155dd80.js',
- '0.4.19': 'soljson-v0.4.19+commit.c4cbbb05.js',
- '0.4.18': 'soljson-v0.4.18+commit.9cf6e910.js',
- '0.4.17': 'soljson-v0.4.17+commit.bdeb9e52.js',
- '0.4.16': 'soljson-v0.4.16+commit.d7661dd9.js',
- '0.4.15': 'soljson-v0.4.15+commit.bbb8e64f.js',
- '0.4.14': 'soljson-v0.4.14+commit.c2215d46.js',
- '0.4.13': 'soljson-v0.4.13+commit.fb4cb1a.js',
- '0.4.12': 'soljson-v0.4.12+commit.194ff033.js',
- '0.4.11': 'soljson-v0.4.11+commit.68ef5810.js',
- '0.4.10': 'soljson-v0.4.10+commit.f0d539ae.js',
- '0.4.9': 'soljson-v0.4.9+commit.364da425.js',
- '0.4.8': 'soljson-v0.4.8+commit.60cc1668.js',
- '0.4.7': 'soljson-v0.4.7+commit.822622cf.js',
- '0.4.6': 'soljson-v0.4.6+commit.2dabbdf0.js',
- '0.4.5': 'soljson-v0.4.5+commit.b318366e.js',
- '0.4.4': 'soljson-v0.4.4+commit.4633f3de.js',
- '0.4.3': 'soljson-v0.4.3+commit.2353da71.js',
- '0.4.2': 'soljson-v0.4.2+commit.af6afb04.js',
- '0.4.1': 'soljson-v0.4.1+commit.4fc6fc2c.js',
- '0.4.0': 'soljson-v0.4.0+commit.acd334c9.js',
- '0.3.6': 'soljson-v0.3.6+commit.3fc68da.js',
- '0.3.5': 'soljson-v0.3.5+commit.5f97274.js',
- '0.3.4': 'soljson-v0.3.4+commit.7dab890.js',
- '0.3.3': 'soljson-v0.3.3+commit.4dc1cb1.js',
- '0.3.2': 'soljson-v0.3.2+commit.81ae2a7.js',
- '0.3.1': 'soljson-v0.3.1+commit.c492d9b.js',
- '0.3.0': 'soljson-v0.3.0+commit.11d6736.js',
- '0.2.2': 'soljson-v0.2.2+commit.ef92f56.js',
- '0.2.1': 'soljson-v0.2.1+commit.91a6b35.js',
- '0.2.0': 'soljson-v0.2.0+commit.4dc2445.js',
- '0.1.7': 'soljson-v0.1.7+commit.b4e666c.js',
- '0.1.6': 'soljson-v0.1.6+commit.d41f8b7.js',
- '0.1.5': 'soljson-v0.1.5+commit.23865e3.js',
- '0.1.4': 'soljson-v0.1.4+commit.5f6c3cd.js',
- '0.1.3': 'soljson-v0.1.3+commit.28f561.js',
- '0.1.2': 'soljson-v0.1.2+commit.d0d36e3.js',
- '0.1.1': 'soljson-v0.1.1+commit.6ff4cd6.js',
+ '0.5.1': 'soljson-v0.5.1+commit.d7688b80.js',
+ '0.5.0': 'soljson-v0.5.0+commit.366fa976.js',
+ '0.4.25': 'soljson-v0.4.25+commit.433aebb7.js',
};
diff --git a/packages/sol-compiler/src/utils/compiler.ts b/packages/sol-compiler/src/utils/compiler.ts
index db308f2b5..e6a8825d8 100644
--- a/packages/sol-compiler/src/utils/compiler.ts
+++ b/packages/sol-compiler/src/utils/compiler.ts
@@ -6,7 +6,7 @@ import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash';
import * as path from 'path';
import * as requireFromString from 'require-from-string';
-import * as solc from 'solc';
+import * as solc from '@dexon-foundation/dsolc';
import { binPaths } from '../solc/bin_paths';
diff --git a/packages/sol-compiler/src/utils/constants.ts b/packages/sol-compiler/src/utils/constants.ts
index 433897f8a..ed33be835 100644
--- a/packages/sol-compiler/src/utils/constants.ts
+++ b/packages/sol-compiler/src/utils/constants.ts
@@ -2,7 +2,7 @@ import * as path from 'path';
export const constants = {
SOLIDITY_FILE_EXTENSION: '.sol',
- BASE_COMPILER_URL: 'https://ethereum.github.io/solc-bin/bin/',
+ BASE_COMPILER_URL: 'https://dexon-foundation.github.io/dsolc-bin/bin/',
LATEST_ARTIFACT_VERSION: '2.0.0',
SOLC_BIN_DIR: path.join(__dirname, '..', '..', 'solc_bin'),
};
diff --git a/packages/sol-coverage/CHANGELOG.json b/packages/sol-coverage/CHANGELOG.json
index 550ca2feb..954bb4848 100644
--- a/packages/sol-coverage/CHANGELOG.json
+++ b/packages/sol-coverage/CHANGELOG.json
@@ -39,7 +39,7 @@
"version": "1.0.0",
"changes": [
{
- "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils",
+ "note": "Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils",
"pr": 1492
}
]
diff --git a/packages/sol-coverage/CHANGELOG.md b/packages/sol-coverage/CHANGELOG.md
index 18c1719bf..b4378dadc 100644
--- a/packages/sol-coverage/CHANGELOG.md
+++ b/packages/sol-coverage/CHANGELOG.md
@@ -19,4 +19,4 @@ CHANGELOG
## v1.0.0 - _Invalid date_
- * Initial release as a separate package. For historical entries see @0x/sol-tracing-utils (#1492)
+ * Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils (#1492)
diff --git a/packages/sol-coverage/README.md b/packages/sol-coverage/README.md
index f8cc62eb8..681b130e3 100644
--- a/packages/sol-coverage/README.md
+++ b/packages/sol-coverage/README.md
@@ -1,4 +1,4 @@
-## @0x/sol-coverage
+## @dexon-foundation/sol-coverage
A Solidity code coverage tool.
@@ -7,19 +7,19 @@ A Solidity code coverage tool.
## Installation
```bash
-yarn add @0x/sol-coverage
+yarn add @dexon-foundation/sol-coverage
```
**Import**
```javascript
-import { CoverageSubprovider } from '@0x/sol-coverage';
+import { CoverageSubprovider } from '@dexon-foundation/sol-coverage';
```
or
```javascript
-var CoverageSubprovider = require('@0x/sol-coverage').CoverageSubprovider;
+var CoverageSubprovider = require('@dexon-foundation/sol-coverage').CoverageSubprovider;
```
## Contributing
@@ -47,13 +47,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0x/sol-coverage yarn build
+PKG=@dexon-foundation/sol-coverage yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0x/sol-coverage yarn watch
+PKG=@dexon-foundation/sol-coverage yarn watch
```
### Clean
diff --git a/packages/sol-coverage/package.json b/packages/sol-coverage/package.json
index 805e2e670..c4f727d04 100644
--- a/packages/sol-coverage/package.json
+++ b/packages/sol-coverage/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/sol-coverage",
+ "name": "@dexon-foundation/sol-coverage",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
@@ -29,8 +29,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-coverage/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.1",
- "@0x/subproviders": "^2.1.11",
+ "@dexon-foundation/sol-tracing-utils": "^4.0.1",
+ "@dexon-foundation/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
"lodash": "^4.17.5"
diff --git a/packages/sol-coverage/src/coverage_subprovider.ts b/packages/sol-coverage/src/coverage_subprovider.ts
index d03963ed6..d34b3f5f3 100644
--- a/packages/sol-coverage/src/coverage_subprovider.ts
+++ b/packages/sol-coverage/src/coverage_subprovider.ts
@@ -15,7 +15,7 @@ import {
TraceInfo,
TraceInfoSubprovider,
utils,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
import * as _ from 'lodash';
/**
diff --git a/packages/sol-coverage/src/index.ts b/packages/sol-coverage/src/index.ts
index 6a91a3966..cf94ab078 100644
--- a/packages/sol-coverage/src/index.ts
+++ b/packages/sol-coverage/src/index.ts
@@ -6,7 +6,7 @@ export {
ContractData,
SourceCodes,
Sources,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
export {
JSONRPCRequestPayload,
@@ -22,4 +22,4 @@ export {
ErrorCallback,
OnNextCompleted,
Callback,
-} from '@0x/subproviders';
+} from '@dexon-foundation/subproviders';
diff --git a/packages/sol-doc/package.json b/packages/sol-doc/package.json
index 179f45e81..25225ed29 100644
--- a/packages/sol-doc/package.json
+++ b/packages/sol-doc/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/sol-doc",
+ "name": "@dexon-foundation/sol-doc",
"version": "1.0.14",
"description": "Solidity documentation generator",
"main": "lib/src/index.js",
@@ -25,7 +25,7 @@
"author": "F. Eugene Aumson",
"license": "Apache-2.0",
"dependencies": {
- "@0x/sol-compiler": "^2.0.2",
+ "@dexon-foundation/sol-compiler": "^2.0.4",
"@0x/types": "^1.5.2",
"@0x/utils": "^3.0.1",
"ethereum-types": "^1.1.6",
diff --git a/packages/sol-doc/src/sol_doc.ts b/packages/sol-doc/src/sol_doc.ts
index e2cfb39e2..a3a003c85 100644
--- a/packages/sol-doc/src/sol_doc.ts
+++ b/packages/sol-doc/src/sol_doc.ts
@@ -14,7 +14,7 @@ import {
import ethUtil = require('ethereumjs-util');
import * as _ from 'lodash';
-import { Compiler, CompilerOptions } from '@0x/sol-compiler';
+import { Compiler, CompilerOptions } from '@dexon-foundation/sol-compiler';
import {
CustomType,
CustomTypeChild,
diff --git a/packages/sol-profiler/CHANGELOG.json b/packages/sol-profiler/CHANGELOG.json
index 550ca2feb..954bb4848 100644
--- a/packages/sol-profiler/CHANGELOG.json
+++ b/packages/sol-profiler/CHANGELOG.json
@@ -39,7 +39,7 @@
"version": "1.0.0",
"changes": [
{
- "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils",
+ "note": "Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils",
"pr": 1492
}
]
diff --git a/packages/sol-profiler/CHANGELOG.md b/packages/sol-profiler/CHANGELOG.md
index 18c1719bf..b4378dadc 100644
--- a/packages/sol-profiler/CHANGELOG.md
+++ b/packages/sol-profiler/CHANGELOG.md
@@ -19,4 +19,4 @@ CHANGELOG
## v1.0.0 - _Invalid date_
- * Initial release as a separate package. For historical entries see @0x/sol-tracing-utils (#1492)
+ * Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils (#1492)
diff --git a/packages/sol-profiler/README.md b/packages/sol-profiler/README.md
index 44fa29e3f..c0894a08b 100644
--- a/packages/sol-profiler/README.md
+++ b/packages/sol-profiler/README.md
@@ -1,4 +1,4 @@
-## @0x/sol-profiler
+## @dexon-foundation/sol-profiler
Solidity line-by-line gas profiler.
@@ -7,19 +7,19 @@ Solidity line-by-line gas profiler.
## Installation
```bash
-yarn add @0x/sol-profiler
+yarn add @dexon-foundation/sol-profiler
```
**Import**
```javascript
-import { ProfilerSubprovider } from '@0x/sol-profiler';
+import { ProfilerSubprovider } from '@dexon-foundation/sol-profiler';
```
or
```javascript
-var ProfilerSubprovider = require('@0x/sol-profiler').ProfilerSubprovider;
+var ProfilerSubprovider = require('@dexon-foundation/sol-profiler').ProfilerSubprovider;
```
## Contributing
@@ -47,13 +47,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0x/sol-profiler yarn build
+PKG=@dexon-foundation/sol-profiler yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0x/sol-profiler yarn watch
+PKG=@dexon-foundation/sol-profiler yarn watch
```
### Clean
diff --git a/packages/sol-profiler/package.json b/packages/sol-profiler/package.json
index 4fe2928c7..eacb5be83 100644
--- a/packages/sol-profiler/package.json
+++ b/packages/sol-profiler/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/sol-profiler",
+ "name": "@dexon-foundation/sol-profiler",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
@@ -29,8 +29,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-profiler/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.1",
- "@0x/subproviders": "^2.1.11",
+ "@dexon-foundation/sol-tracing-utils": "^4.0.1",
+ "@dexon-foundation/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
"lodash": "^4.17.5"
diff --git a/packages/sol-profiler/src/index.ts b/packages/sol-profiler/src/index.ts
index fcb715d2d..d900cc866 100644
--- a/packages/sol-profiler/src/index.ts
+++ b/packages/sol-profiler/src/index.ts
@@ -5,7 +5,7 @@ export {
ContractData,
SourceCodes,
Sources,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
// HACK: ProfilerSubprovider is a hacky way to do profiling using coverage tools. Not production ready
export { ProfilerSubprovider } from './profiler_subprovider';
@@ -24,4 +24,4 @@ export {
ErrorCallback,
OnNextCompleted,
Callback,
-} from '@0x/subproviders';
+} from '@dexon-foundation/subproviders';
diff --git a/packages/sol-profiler/src/profiler_subprovider.ts b/packages/sol-profiler/src/profiler_subprovider.ts
index 9f195f768..679524ee2 100644
--- a/packages/sol-profiler/src/profiler_subprovider.ts
+++ b/packages/sol-profiler/src/profiler_subprovider.ts
@@ -12,7 +12,7 @@ import {
TraceInfo,
TraceInfoSubprovider,
utils,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
/**
* This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface.
diff --git a/packages/sol-resolver/CHANGELOG.json b/packages/sol-resolver/CHANGELOG.json
deleted file mode 100644
index f5a005fd4..000000000
--- a/packages/sol-resolver/CHANGELOG.json
+++ /dev/null
@@ -1,297 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.2.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.2.1",
- "changes": [
- {
- "note": "Add `absolutePath` to `ContractSource` type",
- "pr": 1461
- },
- {
- "note": "Add `SpyResolver` that records all resolved contracts data",
- "pr": 1461
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "1.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "NPMResolver now supports scoped packages",
- "pr": 1311
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.17",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "timestamp": 1539871071,
- "version": "1.0.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538693146,
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "1.0.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "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"
- }
- ]
- },
- {
- "version": "1.0.5",
- "changes": [
- {
- "note": "Fix a bug where RelativeFSResolver would crash when trying to read a directory",
- "pr": 909
- },
- {
- "note": "Fix a bug where NpmResolver would crash when trying to read a directory",
- "pr": 961
- }
- ],
- "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": "Fix a bug in FsResolver where it tries to read directories as files",
- "pr": 589
- },
- {
- "note": "Fix a bug in NameResolver where it is not ignoring .sol files",
- "pr": 589
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.0.7",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.0.6",
- "changes": [
- {
- "note": "Incorrect publish that was unpublished"
- }
- ],
- "timestamp": 1527810075
- },
- {
- "timestamp": 1527009133,
- "version": "0.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- }
-]
diff --git a/packages/sol-resolver/CHANGELOG.md b/packages/sol-resolver/CHANGELOG.md
deleted file mode 100644
index a48561cc3..000000000
--- a/packages/sol-resolver/CHANGELOG.md
+++ /dev/null
@@ -1,129 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.2.3 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.2.2 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.2.1 - _January 9, 2019_
-
- * Add `absolutePath` to `ContractSource` type (#1461)
- * Add `SpyResolver` that records all resolved contracts data (#1461)
-
-## v1.1.1 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.1.0 - _December 11, 2018_
-
- * NPMResolver now supports scoped packages (#1311)
-
-## v1.0.17 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.16 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.15 - _October 18, 2018_
-
- * Dependencies updated
-
-## v1.0.14 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.13 - _October 2, 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_
-
- * Fix a bug where RelativeFSResolver would crash when trying to read a directory (#909)
- * Fix a bug where NpmResolver would crash when trying to read a directory (#961)
-
-## 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 a bug in FsResolver where it tries to read directories as files (#589)
- * Fix a bug in NameResolver where it is not ignoring .sol files (#589)
-
-## v0.0.8 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.0.7 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.0.6 - _May 31, 2018_
-
- * Incorrect publish that was unpublished
-
-## v0.0.5 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.0.4 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.3 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.0.2 - _April 18, 2018_
-
- * Dependencies updated
diff --git a/packages/sol-resolver/README.md b/packages/sol-resolver/README.md
deleted file mode 100644
index 2ab336bc9..000000000
--- a/packages/sol-resolver/README.md
+++ /dev/null
@@ -1,67 +0,0 @@
-## @0x/sol-resolver
-
-A Solidity import resolver used by [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler).
-
-## Installation
-
-```bash
-yarn add @0x/sol-resolver
-```
-
-**Import**
-
-```javascript
-import { Resolver } from '@0x/sol-resolver';
-```
-
-or
-
-```javascript
-var Resolver = require('@0x/sol-resolver').Resolver;
-```
-
-## 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/sol-resolver yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/sol-resolver yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/sol-resolver/package.json b/packages/sol-resolver/package.json
deleted file mode 100644
index 0518cde95..000000000
--- a/packages/sol-resolver/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@0x/sol-resolver",
- "version": "1.2.3",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Import resolver for smart contracts dependencies",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib",
- "lint": "tslint --format stylish --project ."
- },
- "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/resolver/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/types": "^1.5.2",
- "@0x/typescript-typings": "^3.0.8",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/sol-resolver/src/globals.d.ts b/packages/sol-resolver/src/globals.d.ts
deleted file mode 100644
index e799b3529..000000000
--- a/packages/sol-resolver/src/globals.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-// tslint:disable:completed-docs
-declare module '*.json' {
- const json: any;
- /* tslint:disable */
- export default json;
- /* tslint:enable */
-}
diff --git a/packages/sol-resolver/src/index.ts b/packages/sol-resolver/src/index.ts
deleted file mode 100644
index f55aca070..000000000
--- a/packages/sol-resolver/src/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export { ContractSource, ContractSources } from './types';
-export { FallthroughResolver } from './resolvers/fallthrough_resolver';
-export { URLResolver } from './resolvers/url_resolver';
-export { NPMResolver } from './resolvers/npm_resolver';
-export { FSResolver } from './resolvers/fs_resolver';
-export { RelativeFSResolver } from './resolvers/relative_fs_resolver';
-export { NameResolver } from './resolvers/name_resolver';
-export { SpyResolver } from './resolvers/spy_resolver';
-export { EnumerableResolver } from './resolvers/enumerable_resolver';
-export { Resolver } from './resolvers/resolver';
diff --git a/packages/sol-resolver/src/resolvers/enumerable_resolver.ts b/packages/sol-resolver/src/resolvers/enumerable_resolver.ts
deleted file mode 100644
index 0efa43e7c..000000000
--- a/packages/sol-resolver/src/resolvers/enumerable_resolver.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export abstract class EnumerableResolver extends Resolver {
- public abstract getAll(): ContractSource[];
-}
diff --git a/packages/sol-resolver/src/resolvers/fallthrough_resolver.ts b/packages/sol-resolver/src/resolvers/fallthrough_resolver.ts
deleted file mode 100644
index 338f334f4..000000000
--- a/packages/sol-resolver/src/resolvers/fallthrough_resolver.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import * as _ from 'lodash';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class FallthroughResolver extends Resolver {
- private readonly _resolvers: Resolver[] = [];
- public appendResolver(resolver: Resolver): void {
- this._resolvers.push(resolver);
- }
- public resolveIfExists(importPath: string): ContractSource | undefined {
- for (const resolver of this._resolvers) {
- const contractSourceIfExists = resolver.resolveIfExists(importPath);
- if (!_.isUndefined(contractSourceIfExists)) {
- return contractSourceIfExists;
- }
- }
- return undefined;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/fs_resolver.ts b/packages/sol-resolver/src/resolvers/fs_resolver.ts
deleted file mode 100644
index 86128023d..000000000
--- a/packages/sol-resolver/src/resolvers/fs_resolver.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import * as fs from 'fs';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class FSResolver extends Resolver {
- // tslint:disable-next-line:prefer-function-over-method
- public resolveIfExists(importPath: string): ContractSource | undefined {
- if (fs.existsSync(importPath) && fs.lstatSync(importPath).isFile()) {
- const fileContent = fs.readFileSync(importPath).toString();
- return { source: fileContent, path: importPath, absolutePath: importPath };
- }
- return undefined;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/name_resolver.ts b/packages/sol-resolver/src/resolvers/name_resolver.ts
deleted file mode 100644
index aee326fb7..000000000
--- a/packages/sol-resolver/src/resolvers/name_resolver.ts
+++ /dev/null
@@ -1,66 +0,0 @@
-import * as fs from 'fs';
-import * as path from 'path';
-
-import { ContractSource } from '../types';
-
-import { EnumerableResolver } from './enumerable_resolver';
-
-const SOLIDITY_FILE_EXTENSION = '.sol';
-
-export class NameResolver extends EnumerableResolver {
- private readonly _contractsDir: string;
- constructor(contractsDir: string) {
- super();
- this._contractsDir = contractsDir;
- }
- public resolveIfExists(lookupContractName: string): ContractSource | undefined {
- let contractSource: ContractSource | undefined;
- const onFile = (filePath: string) => {
- const contractName = path.basename(filePath, SOLIDITY_FILE_EXTENSION);
- if (contractName === lookupContractName) {
- const absoluteContractPath = path.join(this._contractsDir, filePath);
- const source = fs.readFileSync(absoluteContractPath).toString();
- contractSource = { source, path: filePath, absolutePath: absoluteContractPath };
- return true;
- }
- return undefined;
- };
- this._traverseContractsDir(this._contractsDir, onFile);
- return contractSource;
- }
- public getAll(): ContractSource[] {
- const contractSources: ContractSource[] = [];
- const onFile = (filePath: string) => {
- const absoluteContractPath = path.join(this._contractsDir, filePath);
- const source = fs.readFileSync(absoluteContractPath).toString();
- const contractSource = { source, path: filePath, absolutePath: absoluteContractPath };
- contractSources.push(contractSource);
- };
- this._traverseContractsDir(this._contractsDir, onFile);
- return contractSources;
- }
- // tslint:disable-next-line:prefer-function-over-method
- private _traverseContractsDir(dirPath: string, onFile: (filePath: string) => true | void): boolean {
- let dirContents: string[] = [];
- try {
- dirContents = fs.readdirSync(dirPath);
- } catch (err) {
- throw new Error(`No directory found at ${dirPath}`);
- }
- for (const fileName of dirContents) {
- const absoluteEntryPath = path.join(dirPath, fileName);
- const isDirectory = fs.lstatSync(absoluteEntryPath).isDirectory();
- const entryPath = path.relative(this._contractsDir, absoluteEntryPath);
- let isComplete;
- if (isDirectory) {
- isComplete = this._traverseContractsDir(absoluteEntryPath, onFile);
- } else if (fileName.endsWith(SOLIDITY_FILE_EXTENSION)) {
- isComplete = onFile(entryPath);
- }
- if (isComplete) {
- return isComplete;
- }
- }
- return false;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/npm_resolver.ts b/packages/sol-resolver/src/resolvers/npm_resolver.ts
deleted file mode 100644
index 3c1d09557..000000000
--- a/packages/sol-resolver/src/resolvers/npm_resolver.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import * as fs from 'fs';
-import * as _ from 'lodash';
-import * as path from 'path';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class NPMResolver extends Resolver {
- private readonly _packagePath: string;
- constructor(packagePath: string) {
- super();
- this._packagePath = packagePath;
- }
- public resolveIfExists(importPath: string): ContractSource | undefined {
- if (!importPath.startsWith('/')) {
- let packageName;
- let packageScopeIfExists;
- let other;
- if (_.startsWith(importPath, '@')) {
- [packageScopeIfExists, packageName, ...other] = importPath.split('/');
- } else {
- [packageName, ...other] = importPath.split('/');
- }
- const pathWithinPackage = path.join(...other);
- let currentPath = this._packagePath;
- const ROOT_PATH = '/';
- while (currentPath !== ROOT_PATH) {
- const packagePath = _.isUndefined(packageScopeIfExists)
- ? packageName
- : path.join(packageScopeIfExists, packageName);
- const lookupPath = path.join(currentPath, 'node_modules', packagePath, pathWithinPackage);
- if (fs.existsSync(lookupPath) && fs.lstatSync(lookupPath).isFile()) {
- const fileContent = fs.readFileSync(lookupPath).toString();
- return { source: fileContent, path: importPath, absolutePath: lookupPath };
- }
- currentPath = path.dirname(currentPath);
- }
- }
- return undefined;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts b/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts
deleted file mode 100644
index cfff145f9..000000000
--- a/packages/sol-resolver/src/resolvers/relative_fs_resolver.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as fs from 'fs';
-import * as path from 'path';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class RelativeFSResolver extends Resolver {
- private readonly _contractsDir: string;
- constructor(contractsDir: string) {
- super();
- this._contractsDir = contractsDir;
- }
- // tslint:disable-next-line:prefer-function-over-method
- public resolveIfExists(importPath: string): ContractSource | undefined {
- const filePath = path.resolve(path.join(this._contractsDir, importPath));
- if (fs.existsSync(filePath) && !fs.lstatSync(filePath).isDirectory()) {
- const fileContent = fs.readFileSync(filePath).toString();
- return { source: fileContent, path: importPath, absolutePath: filePath };
- }
- return undefined;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/resolver.ts b/packages/sol-resolver/src/resolvers/resolver.ts
deleted file mode 100644
index 7edc9a85d..000000000
--- a/packages/sol-resolver/src/resolvers/resolver.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import * as _ from 'lodash';
-
-import { ContractSource } from '../types';
-
-export abstract class Resolver {
- public abstract resolveIfExists(importPath: string): ContractSource | undefined;
- public resolve(importPath: string): ContractSource {
- const contractSourceIfExists = this.resolveIfExists(importPath);
- if (_.isUndefined(contractSourceIfExists)) {
- throw new Error(`Failed to resolve ${importPath}`);
- }
- return contractSourceIfExists;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/spy_resolver.ts b/packages/sol-resolver/src/resolvers/spy_resolver.ts
deleted file mode 100644
index 5582d771a..000000000
--- a/packages/sol-resolver/src/resolvers/spy_resolver.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as _ from 'lodash';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-/**
- * This resolver is a passthrough proxy to any resolver that records all the resolved contracts sources.
- * You can access them later using the `resolvedContractSources` public field.
- */
-export class SpyResolver extends Resolver {
- public resolvedContractSources: ContractSource[] = [];
- private readonly _resolver: Resolver;
- constructor(resolver: Resolver) {
- super();
- this._resolver = resolver;
- }
- public resolveIfExists(importPath: string): ContractSource | undefined {
- const contractSourceIfExists = this._resolver.resolveIfExists(importPath);
- if (!_.isUndefined(contractSourceIfExists)) {
- this.resolvedContractSources.push(contractSourceIfExists);
- }
- return contractSourceIfExists;
- }
-}
diff --git a/packages/sol-resolver/src/resolvers/url_resolver.ts b/packages/sol-resolver/src/resolvers/url_resolver.ts
deleted file mode 100644
index ef300e6db..000000000
--- a/packages/sol-resolver/src/resolvers/url_resolver.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import * as fs from 'fs';
-
-import { ContractSource } from '../types';
-
-import { Resolver } from './resolver';
-
-export class URLResolver extends Resolver {
- // tslint:disable-next-line:prefer-function-over-method
- public resolveIfExists(importPath: string): ContractSource | undefined {
- const FILE_URL_PREXIF = 'file://';
- if (importPath.startsWith(FILE_URL_PREXIF)) {
- const filePath = importPath.substr(FILE_URL_PREXIF.length);
- const fileContent = fs.readFileSync(filePath).toString();
- return { source: fileContent, path: importPath, absolutePath: filePath };
- }
- return undefined;
- }
-}
diff --git a/packages/sol-resolver/src/types.ts b/packages/sol-resolver/src/types.ts
deleted file mode 100644
index b4ba164c8..000000000
--- a/packages/sol-resolver/src/types.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export interface ContractSource {
- source: string;
- path: string;
- absolutePath: string;
-}
-
-export interface ContractSources {
- [key: string]: ContractSource;
-}
diff --git a/packages/sol-resolver/tsconfig.json b/packages/sol-resolver/tsconfig.json
deleted file mode 100644
index 56689eaa3..000000000
--- a/packages/sol-resolver/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/sol-resolver/tslint.json b/packages/sol-resolver/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/sol-resolver/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/sol-trace/CHANGELOG.json b/packages/sol-trace/CHANGELOG.json
index 550ca2feb..954bb4848 100644
--- a/packages/sol-trace/CHANGELOG.json
+++ b/packages/sol-trace/CHANGELOG.json
@@ -39,7 +39,7 @@
"version": "1.0.0",
"changes": [
{
- "note": "Initial release as a separate package. For historical entries see @0x/sol-tracing-utils",
+ "note": "Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils",
"pr": 1492
}
]
diff --git a/packages/sol-trace/CHANGELOG.md b/packages/sol-trace/CHANGELOG.md
index 18c1719bf..b4378dadc 100644
--- a/packages/sol-trace/CHANGELOG.md
+++ b/packages/sol-trace/CHANGELOG.md
@@ -19,4 +19,4 @@ CHANGELOG
## v1.0.0 - _Invalid date_
- * Initial release as a separate package. For historical entries see @0x/sol-tracing-utils (#1492)
+ * Initial release as a separate package. For historical entries see @dexon-foundation/sol-tracing-utils (#1492)
diff --git a/packages/sol-trace/package.json b/packages/sol-trace/package.json
index 2aedf7ebc..ca6933e23 100644
--- a/packages/sol-trace/package.json
+++ b/packages/sol-trace/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/sol-trace",
+ "name": "@dexon-foundation/sol-trace",
"version": "1.0.3",
"engines": {
"node": ">=6.12"
@@ -29,8 +29,8 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-trace/README.md",
"dependencies": {
- "@0x/sol-tracing-utils": "^4.0.1",
- "@0x/subproviders": "^2.1.11",
+ "@dexon-foundation/sol-tracing-utils": "^4.0.1",
+ "@dexon-foundation/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"ethereum-types": "^1.1.6",
"ethereumjs-util": "^5.1.1",
diff --git a/packages/sol-trace/src/index.ts b/packages/sol-trace/src/index.ts
index 61b5d8cb7..6ac76fe03 100644
--- a/packages/sol-trace/src/index.ts
+++ b/packages/sol-trace/src/index.ts
@@ -5,7 +5,7 @@ export {
ContractData,
SourceCodes,
Sources,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
export { RevertTraceSubprovider } from './revert_trace_subprovider';
@@ -23,4 +23,4 @@ export {
ErrorCallback,
OnNextCompleted,
Callback,
-} from '@0x/subproviders';
+} from '@dexon-foundation/subproviders';
diff --git a/packages/sol-trace/src/revert_trace_subprovider.ts b/packages/sol-trace/src/revert_trace_subprovider.ts
index 046dad812..08a71fcb7 100644
--- a/packages/sol-trace/src/revert_trace_subprovider.ts
+++ b/packages/sol-trace/src/revert_trace_subprovider.ts
@@ -10,7 +10,7 @@ import {
SourceSnippet,
TraceCollectionSubprovider,
utils,
-} from '@0x/sol-tracing-utils';
+} from '@dexon-foundation/sol-tracing-utils';
import { stripHexPrefix } from 'ethereumjs-util';
import * as _ from 'lodash';
import { getLogger, levels, Logger } from 'loglevel';
diff --git a/packages/sol-tracing-utils/README.md b/packages/sol-tracing-utils/README.md
index 0a4749b8e..8b000b426 100644
--- a/packages/sol-tracing-utils/README.md
+++ b/packages/sol-tracing-utils/README.md
@@ -1,4 +1,4 @@
-## @0x/sol-tracing-utils
+## @dexon-foundation/sol-tracing-utils
Common code for all solidity trace-based tools (sol-coverage, sol-profiler, sol-trace).
@@ -33,13 +33,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0x/sol-tracing-utils yarn build
+PKG=@dexon-foundation/sol-tracing-utils yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0x/sol-tracing-utils yarn watch
+PKG=@dexon-foundation/sol-tracing-utils yarn watch
```
### Clean
diff --git a/packages/sol-tracing-utils/package.json b/packages/sol-tracing-utils/package.json
index cabb752d2..9ac2e22eb 100644
--- a/packages/sol-tracing-utils/package.json
+++ b/packages/sol-tracing-utils/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/sol-tracing-utils",
+ "name": "@dexon-foundation/sol-tracing-utils",
"version": "4.0.1",
"engines": {
"node": ">=6.12"
@@ -20,7 +20,7 @@
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --exit",
"clean": "shx rm -rf lib test/fixtures/artifacts src/artifacts generated_docs",
"copy_test_fixtures": "copyfiles 'test/fixtures/**/*' ./lib",
- "compile_test": "sol-compiler compile",
+ "compile_test": "dsol-compiler compile",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
},
"config": {
@@ -42,9 +42,9 @@
},
"homepage": "https://github.com/0xProject/0x-monorepo/packages/sol-tracing-utils/README.md",
"dependencies": {
+ "@dexon-foundation/sol-compiler": "^2.0.5",
+ "@dexon-foundation/subproviders": "^2.1.11",
"@0x/dev-utils": "^1.0.24",
- "@0x/sol-compiler": "^2.0.2",
- "@0x/subproviders": "^2.1.11",
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"@0x/web3-wrapper": "^3.2.4",
diff --git a/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts
index bb2b15153..8801b335d 100644
--- a/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts
+++ b/packages/sol-tracing-utils/src/artifact_adapters/truffle_artifact_adapter.ts
@@ -1,4 +1,4 @@
-import { Compiler, CompilerOptions } from '@0x/sol-compiler';
+import { Compiler, CompilerOptions } from '@dexon-foundation/sol-compiler';
import * as fs from 'fs';
import * as glob from 'glob';
import * as path from 'path';
diff --git a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
index 5118921fa..a2e5abd09 100644
--- a/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
+++ b/packages/sol-tracing-utils/src/trace_collection_subprovider.ts
@@ -1,5 +1,5 @@
import { BlockchainLifecycle } from '@0x/dev-utils';
-import { Callback, ErrorCallback, NextCallback, Subprovider } from '@0x/subproviders';
+import { Callback, ErrorCallback, NextCallback, Subprovider } from '@dexon-foundation/subproviders';
import { logUtils } from '@0x/utils';
import { CallDataRPC, marshaller, Web3Wrapper } from '@0x/web3-wrapper';
import { JSONRPCRequestPayload, Provider, TxData } from 'ethereum-types';
diff --git a/packages/sra-spec/.discharge.json b/packages/sra-spec/.discharge.json
deleted file mode 100644
index 80ede84f3..000000000
--- a/packages/sra-spec/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "sra-spec",
- "build_command": "yarn build-json",
- "upload_directory": "public",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/packages/sra-spec/.gitignore b/packages/sra-spec/.gitignore
deleted file mode 100644
index f029c576c..000000000
--- a/packages/sra-spec/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-public/api.json
diff --git a/packages/sra-spec/.npmignore b/packages/sra-spec/.npmignore
deleted file mode 100644
index e610180ad..000000000
--- a/packages/sra-spec/.npmignore
+++ /dev/null
@@ -1,8 +0,0 @@
-.*
-yarn-error.log
-/src/
-/schemas/
-test/
-tsconfig.json
-/lib/src/monorepo_scripts/
-/public/ \ No newline at end of file
diff --git a/packages/sra-spec/CHANGELOG.json b/packages/sra-spec/CHANGELOG.json
deleted file mode 100644
index e22a3b0e4..000000000
--- a/packages/sra-spec/CHANGELOG.json
+++ /dev/null
@@ -1,188 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.0.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.0.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "1.0.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.12",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1542821676,
- "version": "1.0.11",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542028948,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.0.7",
- "changes": [
- {
- "note": "Make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library",
- "pr": 1105
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "1.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "timestamp": 1538157789,
- "version": "1.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537875740,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.1-rc.6",
- "changes": [
- {
- "note": "Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js"
- },
- {
- "note": "Fix relative path to introduction MD file"
- }
- ],
- "timestamp": 1535377027
- },
- {
- "version": "1.0.1-rc.5",
- "changes": [
- {
- "note": "Add takerAddress to /orders parameters",
- "pr": 974
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.4",
- "changes": [
- {
- "note": "Add inital spec for SRA v2",
- "pr": 916
- }
- ],
- "timestamp": 1534210131
- }
-]
diff --git a/packages/sra-spec/CHANGELOG.md b/packages/sra-spec/CHANGELOG.md
deleted file mode 100644
index 5fe40ccb4..000000000
--- a/packages/sra-spec/CHANGELOG.md
+++ /dev/null
@@ -1,83 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.0.16 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.0.15 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.0.14 - _January 9, 2019_
-
- * Dependencies updated
-
-## v1.0.13 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.0.12 - _December 11, 2018_
-
- * Dependencies updated
-
-## v1.0.11 - _November 21, 2018_
-
- * Dependencies updated
-
-## v1.0.10 - _November 14, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _November 12, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _October 18, 2018_
-
- * Make @loopback/openapi-v3-types a 'dependency' so it's available to users of the library (#1105)
-
-## v1.0.6 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.5 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.0.4 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.3 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.0.2 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.1 - _September 5, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.6 - _August 27, 2018_
-
- * Fix `main` and `types` package.json entries so that they point to the new location of index.d.ts and index.js
- * Fix relative path to introduction MD file
-
-## v1.0.1-rc.5 - _August 24, 2018_
-
- * Add takerAddress to /orders parameters (#974)
-
-## v1.0.1-rc.4 - _August 14, 2018_
-
- * Add inital spec for SRA v2 (#916)
diff --git a/packages/sra-spec/README.md b/packages/sra-spec/README.md
deleted file mode 100644
index 4575aaf66..000000000
--- a/packages/sra-spec/README.md
+++ /dev/null
@@ -1,93 +0,0 @@
-## @0x/sra-spec
-
-Contains the Standard Relayer API [OpenAPI Spec](https://github.com/OAI/OpenAPI-Specification).
-
-The package distributes both a javascript object version and a json version.
-
-A deployed [ReDoc](https://github.com/Rebilly/ReDoc) static site with the API can be found here http://sra-spec.s3-website-us-east-1.amazonaws.com/.
-
-## Usage
-
-```
-import { api } from '@0x/sra-spec';
-```
-
-## Installation
-
-```
-yarn install
-```
-
-## Development
-
-You can start a development server that will serve a [ReDoc](https://github.com/Rebilly/ReDoc) documentation instance. It uses the `api.json` file from `lib/` (you must have built at least once with `yarn build` or `yarn build-json`) that is based on the `api` object exported from `src`.
-
-```
-yarn watch_without_deps
-```
-
-The process will watch for changes, but will not hot-reload so you must refresh the page to see the changes.
-
-## 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/sra-spec yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/sra-spec yarn watch
-```
-
-### Static Site
-
-We also [host a static HTML version of the docs on S3](http://sra-spec.s3-website-us-east-1.amazonaws.com/) for easy sharing.
-
-To build and deploy the site run
-
-```
-yarn deploy-site
-```
-
-**NOTE: On deploying the site, it will say the site is available at a non-existent URL. Please ignore and use the (now updated) URL above.**
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/sra-spec/build_scripts/buildJson.ts b/packages/sra-spec/build_scripts/buildJson.ts
deleted file mode 100644
index b92b5172b..000000000
--- a/packages/sra-spec/build_scripts/buildJson.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-import { writeFileSync } from 'fs';
-
-import { api } from '../src';
-
-const apiJson = JSON.stringify(api);
-writeFileSync('lib/api.json', apiJson);
-writeFileSync('public/api.json', apiJson);
diff --git a/packages/sra-spec/package.json b/packages/sra-spec/package.json
deleted file mode 100644
index 9c4c0a24f..000000000
--- a/packages/sra-spec/package.json
+++ /dev/null
@@ -1,63 +0,0 @@
-{
- "name": "@0x/sra-spec",
- "version": "1.0.16",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Standard Relayer API Open API Spec",
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
- "scripts": {
- "serve": "redoc-cli serve lib/api.json --watch",
- "watch_without_deps": "run-p build:watch serve",
- "lint": "tslint --format stylish --project .",
- "test": "swagger-cli validate lib/api.json",
- "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",
- "clean": "shx rm -rf lib",
- "build": "tsc -b && yarn copy_md_files && yarn build-json",
- "build:ci": "yarn build",
- "build-json": "node ./lib/build_scripts/buildJson",
- "build:watch": "chokidar 'src/**/*' -c 'yarn build' ",
- "copy_md_files": "copyfiles -u 2 './src/md/**/*.md' ./lib/src/md",
- "deploy-site": "discharge deploy"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/0xProject/0x-monorepo.git"
- },
- "author": "Francesco Agosti",
- "license": "Apache-2.0",
- "bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
- },
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/sra-spec/README.md",
- "dependencies": {
- "@0x/json-schemas": "^2.1.7",
- "@loopback/openapi-v3-types": "^0.8.2"
- },
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/mocha": "^2.2.42",
- "@types/node": "^10.5.3",
- "chai": "^4.0.1",
- "chokidar-cli": "^1.2.0",
- "copyfiles": "^2.0.0",
- "dirty-chai": "^2.0.1",
- "discharge": "^0.7.1",
- "mocha": "^4.0.1",
- "npm-run-all": "^4.1.3",
- "nyc": "^11.0.1",
- "redoc-cli": "^0.6.1",
- "shx": "^0.2.2",
- "swagger-cli": "^2.1.1",
- "ts-node": "^7.0.0",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/sra-spec/public/index.html b/packages/sra-spec/public/index.html
deleted file mode 100644
index 5271b50c6..000000000
--- a/packages/sra-spec/public/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <title>0x Standard Relayer API</title>
- <!-- needed for adaptive design -->
- <meta charset="utf-8"/>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
-
- <!--
- ReDoc doesn't change outer page styles
- -->
- <style>
- body {
- margin: 0;
- padding: 0;
- }
- </style>
- </head>
- <body>
- <redoc spec-url='http://sra-spec.s3-website-us-east-1.amazonaws.com/api.json'></redoc>
- <script src="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js"> </script>
- </body>
-</html>
diff --git a/packages/sra-spec/src/api.ts b/packages/sra-spec/src/api.ts
deleted file mode 100644
index 7cecb0369..000000000
--- a/packages/sra-spec/src/api.ts
+++ /dev/null
@@ -1,310 +0,0 @@
-import { OpenApiSpec } from '@loopback/openapi-v3-types';
-
-import { examples } from './examples';
-import { schemas } from './json-schemas';
-import { md } from './md';
-import { generateParameters } from './parameters';
-import { generateResponses } from './responses';
-
-export const api: OpenApiSpec = {
- openapi: '3.0.0',
- info: {
- version: '2.0.0',
- title: 'Standard Relayer REST API',
- description: md.introduction,
- license: {
- name: 'Apache 2.0',
- url: 'https://www.apache.org/licenses/LICENSE-2.0.html',
- },
- },
- paths: {
- '/v2/asset_pairs': {
- get: {
- description:
- 'Retrieves a list of available asset pairs and the information required to trade them (in any order). Setting only `assetDataA` or `assetDataB` returns pairs filtered by that asset only.',
- operationId: 'getAssetPairs',
- parameters: generateParameters(
- [
- {
- name: 'assetDataA',
- in: 'query',
- description: 'The assetData value for the first asset in the pair.',
- example: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'assetDataB',
- in: 'query',
- description: 'The assetData value for the second asset in the pair.',
- example: '0x0257179264389b814a946f3e92105513705ca6b990',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- ],
- true,
- ),
- responses: generateResponses(
- 'relayerApiAssetDataPairsResponseSchema',
- examples.relayerApiAssetDataPairsResponse,
- `Returns a collection of available asset pairs with some meta info`,
- ),
- },
- },
- '/v2/orders': {
- get: {
- description:
- 'Retrieves a list of orders given query parameters. This endpoint should be [paginated](#section/Pagination). For querying an entire orderbook snapshot, the [orderbook endpoint](#operation/getOrderbook) is recommended. If both makerAssetData and takerAssetData are specified, returned orders will be sorted by price determined by (takerTokenAmount/makerTokenAmount) in ascending order. By default, orders returned by this endpoint are unsorted.',
- operationId: 'getOrders',
- parameters: generateParameters(
- [
- {
- name: 'makerAssetProxyId',
- in: 'query',
- description: `The maker [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: "0xf47261b0" for ERC20, "0x02571792" for ERC721).`,
- example: '0xf47261b0',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'takerAssetProxyId',
- in: 'query',
- description: `The taker asset [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: "0xf47261b0" for ERC20, "0x02571792" for ERC721).`,
- example: '0x02571792',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'makerAssetAddress',
- in: 'query',
- description: `The contract address for the maker asset.`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'takerAssetAddress',
- in: 'query',
- description: `The contract address for the taker asset.`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'exchangeAddress',
- in: 'query',
- description: `Same as exchangeAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'senderAddress',
- in: 'query',
- description: `Same as senderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'makerAssetData',
- in: 'query',
- description: `Same as makerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'takerAssetData',
- in: 'query',
- description: `Same as takerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'traderAssetData',
- in: 'query',
- description: `Same as traderAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'makerAddress',
- in: 'query',
- description: `Same as makerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'takerAddress',
- in: 'query',
- description: `Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'traderAddress',
- in: 'query',
- description: `Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- {
- name: 'feeRecipientAddress',
- in: 'query',
- description: `Same as feeRecipientAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)`,
- example: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- schema: {
- $ref: '#/components/schemas/addressSchema',
- },
- },
- ],
- true,
- ),
- responses: generateResponses(
- 'relayerApiOrdersResponseSchema',
- examples.relayerApiOrdersResponse,
- `A collection of 0x orders with meta-data as specified by query params`,
- ),
- },
- },
- '/v2/order/{orderHash}': {
- get: {
- description: 'Retrieves the 0x order with meta info that is associated with the hash.',
- operationId: 'getOrder',
- parameters: generateParameters(
- [
- {
- name: 'orderHash',
- in: 'path',
- description: 'The hash of the desired 0x order.',
- example: '0xd4b103c42d2512eef3fee775e097f044291615d25f5d71e0ac70dbd49d223591',
- schema: {
- $ref: '#/components/schemas/orderHashSchema',
- },
- },
- ],
- false,
- ),
- responses: generateResponses(
- 'relayerApiOrderSchema',
- examples.relayerApiOrder,
- `The order and meta info associated with the orderHash`,
- ),
- },
- },
- '/v2/orderbook': {
- get: {
- description: `Retrieves the orderbook for a given asset pair. This endpoint should be [paginated](#section/Pagination). Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by _taker fee price_ which is defined as the **takerFee** divided by **takerTokenAmount**. After _taker fee price_, orders are to be sorted by expiration in ascending order. The way pagination works for this endpoint is that the **page** and **perPage** query params apply to both \`bids\` and \`asks\` collections, and if \`page\` * \`perPage\` > \`total\` for a certain collection, the \`records\` for that collection should just be empty. `,
- operationId: 'getOrderbook',
- parameters: generateParameters(
- [
- {
- name: 'baseAssetData',
- in: 'query',
- description: `assetData (makerAssetData or takerAssetData) designated as the base currency in the [currency pair calculation](https://en.wikipedia.org/wiki/Currency_pair) of price.`,
- required: true,
- example: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- {
- name: 'quoteAssetData',
- in: 'query',
- description: `assetData (makerAssetData or takerAssetData) designated as the quote currency in the currency pair calculation of price (required).`,
- required: true,
- example: '0xf47261b04c32345ced77393b3530b1eed0f346429d',
- schema: {
- $ref: '#/components/schemas/hexSchema',
- },
- },
- ],
- true,
- ),
- responses: generateResponses(
- 'relayerApiOrderbookResponseSchema',
- examples.relayerApiOrderbookResponse,
- `The sorted order book for the specified asset pair.`,
- ),
- },
- },
- '/v2/order_config': {
- post: {
- description: `Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: \`senderAddress\`, \`feeRecipientAddress\`, \`makerFee\`, \`takerFee\`. `,
- operationId: 'getOrderConfig',
- parameters: generateParameters([], false),
- requestBody: {
- description:
- 'The fields of a 0x order the relayer may want to decide what configuration to send back.',
- content: {
- 'application/json': {
- schema: {
- $ref: '#/components/schemas/relayerApiOrderConfigPayloadSchema',
- },
- example: examples.relayerApiOrderConfigPayload,
- },
- },
- },
- responses: generateResponses(
- 'relayerApiOrderConfigResponseSchema',
- examples.relayerApiOrderConfigResponse,
- `The additional fields necessary in order to submit an order to the relayer.`,
- ),
- },
- },
- '/v2/fee_recipients': {
- get: {
- description: `Retrieves a collection of all fee recipient addresses for a relayer. This endpoint should be [paginated](#section/Pagination).`,
- operationId: 'getFeeRecipients',
- parameters: generateParameters([], true),
- responses: generateResponses(
- 'relayerApiFeeRecipientsResponseSchema',
- examples.relayerApiFeeRecipientsResponse,
- `A collection of all used fee recipient addresses.`,
- ),
- },
- },
- '/v2/order': {
- post: {
- description: `Submit a signed order to the relayer.`,
- operationId: 'postOrder',
- parameters: generateParameters([], false),
- requestBody: {
- description: 'A valid signed 0x order based on the schema.',
- content: {
- 'application/json': {
- schema: {
- $ref: '#/components/schemas/signedOrderSchema',
- },
- example: examples.signedOrder,
- },
- },
- },
- responses: generateResponses(),
- },
- },
- },
- components: {
- schemas,
- },
-};
diff --git a/packages/sra-spec/src/errors.ts b/packages/sra-spec/src/errors.ts
deleted file mode 100644
index 20c35514f..000000000
--- a/packages/sra-spec/src/errors.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { examples } from './examples';
-export const errorResponses = {
- '400': {
- description: 'Validation error',
- content: {
- 'application/json': {
- schema: { $ref: '#/components/schemas/relayerApiErrorResponseSchema' },
- example: examples.validationError,
- },
- },
- },
- '404': {
- description: 'Not found',
- },
- '429': {
- description: 'Too many requests - Rate limit exceeded',
- },
- '500': {
- description: 'Internal Server Error',
- },
- '501': {
- description: 'Not implemented.',
- },
-};
diff --git a/packages/sra-spec/src/examples/errors.ts b/packages/sra-spec/src/examples/errors.ts
deleted file mode 100644
index 81f29d81c..000000000
--- a/packages/sra-spec/src/examples/errors.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export const validationError = {
- code: 100,
- reason: 'Validation failed',
- validationErrors: [
- {
- field: 'networkId',
- code: 1006,
- reason: 'Network id 42 is not supported',
- },
- ],
-};
diff --git a/packages/sra-spec/src/examples/index.ts b/packages/sra-spec/src/examples/index.ts
deleted file mode 100644
index dcf9b13eb..000000000
--- a/packages/sra-spec/src/examples/index.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { validationError } from './errors';
-import { relayerApiAssetDataPairsResponse } from './relayerApiAssetDataPairsResponse';
-import { relayerApiFeeRecipientsResponse } from './relayerApiFeeRecipientsResponse';
-import { relayerApiOrder } from './relayerApiOrder';
-import { relayerApiOrderbookResponse } from './relayerApiOrderbookResponse';
-import { relayerApiOrderConfigPayload } from './relayerApiOrderConfigPayload';
-import { relayerApiOrderConfigResponse } from './relayerApiOrderConfigResponse';
-import { relayerApiOrdersResponse } from './relayerApiOrdersResponse';
-import { signedOrder } from './signedOrder';
-
-export const examples = {
- validationError,
- relayerApiAssetDataPairsResponse,
- relayerApiFeeRecipientsResponse,
- relayerApiOrder,
- relayerApiOrderbookResponse,
- relayerApiOrderConfigPayload,
- relayerApiOrderConfigResponse,
- relayerApiOrdersResponse,
- signedOrder,
-};
diff --git a/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts b/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts
deleted file mode 100644
index 3ab7b29c0..000000000
--- a/packages/sra-spec/src/examples/relayerApiAssetDataPairsResponse.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-export const relayerApiAssetDataPairsResponse = {
- total: 43,
- page: 1,
- perPage: 100,
- records: [
- {
- assetDataA: {
- minAmount: '0',
- maxAmount: '10000000000000000000',
- precision: 5,
- assetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- },
- assetDataB: {
- minAmount: '0',
- maxAmount: '1',
- precision: 5,
- assetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- },
- },
- ],
-};
diff --git a/packages/sra-spec/src/examples/relayerApiFeeRecipientsResponse.ts b/packages/sra-spec/src/examples/relayerApiFeeRecipientsResponse.ts
deleted file mode 100644
index 0182af629..000000000
--- a/packages/sra-spec/src/examples/relayerApiFeeRecipientsResponse.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const relayerApiFeeRecipientsResponse = {
- total: 3,
- page: 1,
- perPage: 10,
- records: [
- '0x6eC92694ea172ebC430C30fa31De87620967A082',
- '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- ],
-};
diff --git a/packages/sra-spec/src/examples/relayerApiOrder.ts b/packages/sra-spec/src/examples/relayerApiOrder.ts
deleted file mode 100644
index e3ae66dc3..000000000
--- a/packages/sra-spec/src/examples/relayerApiOrder.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-export const relayerApiOrder = {
- order: {
- makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
- senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerAssetAmount: '10000000000000000',
- takerAssetAmount: '1',
- makerFee: '100000000000000',
- takerFee: '200000000000000',
- expirationTimeSeconds: '1532560590',
- salt: '1532559225',
- makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- },
- metaData: {},
-};
diff --git a/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts b/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts
deleted file mode 100644
index cca68b84d..000000000
--- a/packages/sra-spec/src/examples/relayerApiOrderConfigPayload.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-export const relayerApiOrderConfigPayload = {
- makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerAssetAmount: '10000000000000000',
- takerAssetAmount: '1',
- makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- expirationTimeSeconds: '1532560590',
-};
diff --git a/packages/sra-spec/src/examples/relayerApiOrderConfigResponse.ts b/packages/sra-spec/src/examples/relayerApiOrderConfigResponse.ts
deleted file mode 100644
index a3c531c0a..000000000
--- a/packages/sra-spec/src/examples/relayerApiOrderConfigResponse.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export const relayerApiOrderConfigResponse = {
- senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
- makerFee: '100000000000000',
- takerFee: '200000000000000',
-};
diff --git a/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts b/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts
deleted file mode 100644
index 7f0772649..000000000
--- a/packages/sra-spec/src/examples/relayerApiOrderbookResponse.ts
+++ /dev/null
@@ -1,56 +0,0 @@
-export const relayerApiOrderbookResponse = {
- bids: {
- total: 325,
- page: 2,
- perPage: 100,
- records: [
- {
- order: {
- makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
- senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerAssetAmount: '10000000000000000',
- takerAssetAmount: '1',
- makerFee: '100000000000000',
- takerFee: '200000000000000',
- expirationTimeSeconds: '1532560590',
- salt: '1532559225',
- makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- 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: '1',
- makerFee: '200000000000000',
- takerFee: '100000000000000',
- expirationTimeSeconds: '1532560590',
- salt: '1532559225',
- makerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- takerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- signature: '0x013842a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b3518891',
- },
- metaData: {},
- },
- ],
- },
-};
diff --git a/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts b/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts
deleted file mode 100644
index eb66b8e81..000000000
--- a/packages/sra-spec/src/examples/relayerApiOrdersResponse.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-export const relayerApiOrdersResponse = {
- total: 984,
- page: 1,
- perPage: 100,
- records: [
- {
- order: {
- makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
- senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerAssetAmount: '10000000000000000',
- takerAssetAmount: '1',
- makerFee: '100000000000000',
- takerFee: '200000000000000',
- expirationTimeSeconds: '1532560590',
- salt: '1532559225',
- makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- },
- metaData: {},
- },
- ],
-};
diff --git a/packages/sra-spec/src/examples/signedOrder.ts b/packages/sra-spec/src/examples/signedOrder.ts
deleted file mode 100644
index 8513c398f..000000000
--- a/packages/sra-spec/src/examples/signedOrder.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-export const signedOrder = {
- makerAddress: '0x9e56625509c2f60af937f23b7b532600390e8c8b',
- takerAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- feeRecipientAddress: '0xb046140686d052fff581f63f8136cce132e857da',
- senderAddress: '0xa2b31dacf30a9c50ca473337c01d8a201ae33e32',
- makerAssetAmount: '10000000000000000',
- takerAssetAmount: '20000000000000000',
- makerFee: '100000000000000',
- takerFee: '200000000000000',
- expirationTimeSeconds: '1532560590',
- salt: '1532559225',
- makerAssetData: '0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498',
- takerAssetData:
- '0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063',
- exchangeAddress: '0x12459c951127e0c374ff9105dda097662a027093',
- signature: '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
-};
diff --git a/packages/sra-spec/src/headers.ts b/packages/sra-spec/src/headers.ts
deleted file mode 100644
index 152254c9f..000000000
--- a/packages/sra-spec/src/headers.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-export const headers = {
- 'X-Rate-Limit-Limit': {
- description: `The maximum number of requests you're permitted to make per hour.`,
- schema: {
- type: 'integer',
- },
- },
- 'X-Rate-Limit-Remaining': {
- description: 'The number of requests remaining in the current rate limit window.',
- schema: {
- type: 'integer',
- },
- },
- 'X-Rate-Limit-Reset': {
- description: 'The time at which the current rate limit window resets in UTC epoch seconds.',
- schema: {
- type: 'integer',
- },
- },
-};
diff --git a/packages/sra-spec/src/index.ts b/packages/sra-spec/src/index.ts
deleted file mode 100644
index 4d73f3cd3..000000000
--- a/packages/sra-spec/src/index.ts
+++ /dev/null
@@ -1 +0,0 @@
-export { api } from './api';
diff --git a/packages/sra-spec/src/json-schemas.ts b/packages/sra-spec/src/json-schemas.ts
deleted file mode 100644
index f9342ca9e..000000000
--- a/packages/sra-spec/src/json-schemas.ts
+++ /dev/null
@@ -1,65 +0,0 @@
-import { schemas as jsonSchemas } from '@0x/json-schemas';
-
-// Only include schemas we actually need
-const {
- wholeNumberSchema,
- numberSchema,
- addressSchema,
- hexSchema,
- orderHashSchema,
- orderSchema,
- signedOrderSchema,
- signedOrdersSchema,
- ordersSchema,
- paginatedCollectionSchema,
- relayerApiErrorResponseSchema,
- relayerApiFeeRecipientsResponseSchema,
- relayerApiOrderSchema,
- relayerApiOrdersSchema,
- relayerApiOrderConfigPayloadSchema,
- relayerApiOrderConfigResponseSchema,
- relayerApiOrderbookResponseSchema,
- relayerApiAssetDataPairsResponseSchema,
- relayerApiAssetDataTradeInfoSchema,
- relayerApiOrdersChannelSubscribeSchema,
- relayerApiOrdersChannelSubscribePayloadSchema,
- relayerApiOrdersChannelUpdateSchema,
- relayerApiOrdersResponseSchema,
- relayerApiAssetDataPairsSchema,
-} = jsonSchemas;
-
-const usedSchemas = {
- wholeNumberSchema,
- numberSchema,
- addressSchema,
- hexSchema,
- orderHashSchema,
- orderSchema,
- signedOrderSchema,
- signedOrdersSchema,
- ordersSchema,
- paginatedCollectionSchema,
- relayerApiErrorResponseSchema,
- relayerApiFeeRecipientsResponseSchema,
- relayerApiOrderSchema,
- relayerApiOrdersSchema,
- relayerApiOrderConfigPayloadSchema,
- relayerApiOrderConfigResponseSchema,
- relayerApiOrderbookResponseSchema,
- relayerApiAssetDataPairsResponseSchema,
- relayerApiAssetDataTradeInfoSchema,
- relayerApiOrdersChannelSubscribeSchema,
- relayerApiOrdersChannelSubscribePayloadSchema,
- relayerApiOrdersChannelUpdateSchema,
- relayerApiOrdersResponseSchema,
- relayerApiAssetDataPairsSchema,
-};
-
-// We need to replace the `$ref`s to be OpenAPI compliant.
-const openApiSchemas = JSON.parse(
- JSON.stringify(usedSchemas).replace(/(\/\w+)/g, match => `#/components/schemas${match}`),
-);
-// The json schema used by OpenAPI does not accept ids
-Object.keys(openApiSchemas).forEach(key => delete openApiSchemas[key].id);
-
-export const schemas = openApiSchemas;
diff --git a/packages/sra-spec/src/md/index.ts b/packages/sra-spec/src/md/index.ts
deleted file mode 100644
index 4e778e073..000000000
--- a/packages/sra-spec/src/md/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { readFileSync } from 'fs';
-
-export const md = {
- introduction: readFileSync(`${__dirname}/introduction.md`).toString(),
-};
diff --git a/packages/sra-spec/src/md/introduction.md b/packages/sra-spec/src/md/introduction.md
deleted file mode 100644
index 3f7431c51..000000000
--- a/packages/sra-spec/src/md/introduction.md
+++ /dev/null
@@ -1,210 +0,0 @@
-# Schemas
-
-The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas). Examples of each payload and response can be found in the library's [test suite](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/test/schema_test.ts#L1).
-
-```bash
-npm install @0xproject/json-schemas --save
-```
-
-You can easily validate your API's payloads and responses using the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) package:
-
-```js
-import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas';
-
-const {relayerApiTokenPairsResponseSchema} = schemas;
-const validator = new SchemaValidator();
-
-const tokenPairsResponse = {
- ...
-};
-const validatorResult: ValidatorResult = validator.validate(tokenPairsResponse, relayerApiTokenPairsResponseSchema);
-```
-
-# Pagination
-
-Requests that return potentially large collections should respond to the **?page** and **?perPage** parameters. For example:
-
-```bash
-$ curl https://api.example-relayer.com/v2/asset_pairs?page=3&perPage=20
-```
-
-Page numbering should be 1-indexed, not 0-indexed. If a query provides an unreasonable (ie. too high) `perPage` value, the response can return a validation error as specified in the [errors section](#section/Errors). If the query specifies a `page` that does not exist (ie. there are not enough `records`), the response should just return an empty `records` array.
-
-All endpoints that are paginated should return a `total`, `page`, `perPage` and a `records` value in the top level of the collection. The value of `total` should be the total number of records for a given query, whereas `records` should be an array representing the response to the query for that page. `page` and `perPage`, are the same values that were specified in the request. See the note in [miscellaneous](#section/Misc.) about formatting `snake_case` vs. `lowerCamelCase`.
-
-These requests include the [`/v2/asset_pairs`](#operation/getAssetPairs), [`/v2/orders`](#operation/getOrders), [`/v2/fee_recipients`](#operation/getFeeRecipients) and [`/v2/orderbook`](#operation/getOrderbook) endpoints.
-
-# Network Id
-
-All requests should be able to specify a **?networkId** query param for all supported networks. For example:
-
-```bash
-$ curl https://api.example-relayer.com/v2/asset_pairs?networkId=1
-```
-
-If the query param is not provided, it should default to **1** (mainnet).
-
-Networks and their Ids:
-
-| Network Id | Network Name |
-| ---------- | ------------ |
-| 1 | Mainnet |
-| 42 | Kovan |
-| 3 | Ropsten |
-| 4 | Rinkeby |
-
-If a certain network is not supported, the response should **400** as specified in the [error response](#section/Errors) section. For example:
-
-```json
-{
- "code": 100,
- "reason": "Validation failed",
- "validationErrors": [
- {
- "field": "networkId",
- "code": 1006,
- "reason": "Network id 42 is not supported"
- }
- ]
-}
-```
-
-# Link Header
-
-A [Link Header](https://tools.ietf.org/html/rfc5988) can be included in a response to provide clients with more context about paging
-For example:
-
-```bash
-Link: <https://api.example-relayer.com/v2/asset_pairs?page=3&perPage=20>; rel="next",
-<https://api.github.com/user/repos?page=10&perPage=20>; rel="last"
-```
-
-This `Link` response header contains one or more Hypermedia link relations.
-
-The possible `rel` values are:
-
-| Name | Description |
-| ----- | ------------------------------------------------------------- |
-| next | The link relation for the immediate next page of results. |
-| last | The link relation for the last page of results. |
-| first | The link relation for the first page of results. |
-| prev | The link relation for the immediate previous page of results. |
-
-# Rate Limits
-
-Rate limit guidance for clients can be optionally returned in the response headers:
-
-| Header Name | Description |
-| --------------------- | ---------------------------------------------------------------------------- |
-| X-RateLimit-Limit | The maximum number of requests you're permitted to make per hour. |
-| X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
-| X-RateLimit-Reset | The time at which the current rate limit window resets in UTC epoch seconds. |
-
-For example:
-
-```bash
-$ curl -i https://api.example-relayer.com/v2/asset_pairs
-HTTP/1.1 200 OK
-Date: Mon, 20 Oct 2017 12:30:06 GMT
-Status: 200 OK
-X-RateLimit-Limit: 60
-X-RateLimit-Remaining: 56
-X-RateLimit-Reset: 1372700873
-```
-
-When a rate limit is exceeded, a status of **429 Too Many Requests** should be returned.
-
-# Errors
-
-Unless the spec defines otherwise, errors to bad requests should respond with HTTP 4xx or status codes.
-
-## Common error codes
-
-| Code | Reason |
-| ---- | --------------------------------------- |
-| 400 | Bad Request – Invalid request format |
-| 404 | Not found |
-| 429 | Too many requests - Rate limit exceeded |
-| 500 | Internal Server Error |
-| 501 | Not Implemented |
-
-## Error reporting format
-
-For all **400** responses, see the [error response schema](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_error_response_schema.ts#L1).
-
-```json
-{
- "code": 101,
- "reason": "Validation failed",
- "validationErrors": [
- {
- "field": "maker",
- "code": 1002,
- "reason": "Invalid address"
- }
- ]
-}
-```
-
-General error codes:
-
-```bash
-100 - Validation Failed
-101 - Malformed JSON
-102 - Order submission disabled
-103 - Throttled
-```
-
-Validation error codes:
-
-```bash
-1000 - Required field
-1001 - Incorrect format
-1002 - Invalid address
-1003 - Address not supported
-1004 - Value out of range
-1005 - Invalid signature or hash
-1006 - Unsupported option
-```
-
-# Asset Data Encoding
-
-As we now support multiple [token transfer proxies](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy), the identifier of which proxy to use for the token transfer must be encoded, along with the token information. Each proxy in 0x v2 has a unique identifier. If you're using 0x.js there will be helper methods for this [encoding](https://0xproject.com/docs/0x.js#zeroEx-encodeERC20AssetData) and [decoding](https://0xproject.com/docs/0x.js#zeroEx-decodeAssetProxyId).
-
-The identifier for the Proxy uses a similar scheme to [ABI function selectors](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#function-selector).
-
-```js
-// ERC20 Proxy ID 0xf47261b0
-bytes4(keccak256('ERC20Token(address)'));
-// ERC721 Proxy ID 0x02571792
-bytes4(keccak256('ERC721Token(address,uint256)'));
-```
-
-Asset data is encoded using [ABI encoding](https://solidity.readthedocs.io/en/develop/abi-spec.html).
-
-For example, encoding the ERC20 token contract (address: 0x1dc4c1cefef38a777b15aa20260a54e584b16c48) using the ERC20 Transfer Proxy (id: 0xf47261b0) would be:
-
-```bash
-0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48
-```
-
-Encoding the ERC721 token contract (address: `0x371b13d97f4bf77d724e78c16b7dc74099f40e84`), token id (id: `99`, which hex encoded is `0x63`) and the ERC721 Transfer Proxy (id: 0x02571792) would be:
-
-```bash
-0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063
-```
-
-For more information see [the Asset Proxy](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#erc20proxy) section of the v2 spec and the [Ethereum ABI Spec](https://solidity.readthedocs.io/en/develop/abi-spec.html).
-
-# Meta Data in Order Responses
-
-In v2 of the standard relayer API we added the `metaData` field. It is meant to provide a standard place for relayers to put optional, custom or non-standard fields that may of interest to the consumer of the API.
-
-A good example of such a field is `remainingTakerAssetAmount`, which is a convenience field that communicates how much of a 0x order is potentially left to be filled. Unlike the other fields in a 0x order, it is not guaranteed to be correct as it is derived from whatever mechanism the implementer (ie. the relayer) is using. While convenient for prototyping and low stakes situations, we recommend validating the value of the field by checking the state of the blockchain yourself, such as by using [Order Watcher](https://0xproject.com/wiki#0x-OrderWatcher).
-
-# Misc.
-
-- All requests and responses should be of **application/json** content type
-- All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API).
-- All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix.
-- All parameters are to be written in `lowerCamelCase`.
diff --git a/packages/sra-spec/src/parameters.ts b/packages/sra-spec/src/parameters.ts
deleted file mode 100644
index 48ffb036d..000000000
--- a/packages/sra-spec/src/parameters.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-import { ParameterObject } from '@loopback/openapi-v3-types';
-export const paginationParameters: ParameterObject[] = [
- {
- name: 'page',
- in: 'query',
- description: 'The number of the page to request in the collection.',
- example: 3,
- schema: {
- type: 'number',
- default: 1,
- },
- },
- {
- name: 'perPage',
- in: 'query',
- description: 'The number of records to return per page.',
- example: 10,
- schema: {
- type: 'number',
- default: 100,
- },
- },
-];
-
-export const networkdIdParameter: ParameterObject = {
- name: 'networkId',
- in: 'query',
- description: 'The id of the Ethereum network',
- example: 42,
- schema: {
- type: 'number',
- default: 1,
- },
-};
-
-export const generateParameters = (parameters: ParameterObject[], isPaginated: boolean = false): ParameterObject[] => {
- const optionalParameters = isPaginated ? paginationParameters : [];
- return [...parameters, networkdIdParameter, ...optionalParameters];
-};
diff --git a/packages/sra-spec/src/responses.ts b/packages/sra-spec/src/responses.ts
deleted file mode 100644
index cd7352058..000000000
--- a/packages/sra-spec/src/responses.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { ResponsesObject } from '@loopback/openapi-v3-types';
-
-import { errorResponses } from './errors';
-import { headers } from './headers';
-
-export const generateResponses = (schemaName?: string, example?: any, description: string = 'OK'): ResponsesObject => {
- const responses = {
- '200': {
- headers,
- description,
- content: {},
- },
- ...errorResponses,
- };
- if (schemaName) {
- responses['200'].content = {
- 'application/json': {
- schema: { $ref: `#/components/schemas/${schemaName}` },
- example,
- },
- };
- }
- return responses;
-};
diff --git a/packages/sra-spec/tsconfig.json b/packages/sra-spec/tsconfig.json
deleted file mode 100644
index 785ed914d..000000000
--- a/packages/sra-spec/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["./src/**/*", "./test/*", "./build_scripts/*", "./md/*"]
-}
diff --git a/packages/sra-spec/tslint.json b/packages/sra-spec/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/sra-spec/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/subproviders/README.md b/packages/subproviders/README.md
index b0d77284b..1ba4ff06c 100644
--- a/packages/subproviders/README.md
+++ b/packages/subproviders/README.md
@@ -1,4 +1,4 @@
-## @0x/subproviders
+## @dexon-foundation/subproviders
A few useful web3 subproviders including a LedgerSubprovider useful for adding Ledger Nano S support.
@@ -9,7 +9,7 @@ We have written up a [Wiki](https://0xproject.com/wiki#Web3-Provider-Examples) a
## Installation
```
-yarn add @0x/subproviders
+yarn add @dexon-foundation/subproviders
```
If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
@@ -45,13 +45,13 @@ yarn install
To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:
```bash
-PKG=@0x/subproviders yarn build
+PKG=@dexon-foundation/subproviders yarn build
```
Or continuously rebuild on change:
```bash
-PKG=@0x/subproviders yarn watch
+PKG=@dexon-foundation/subproviders yarn watch
```
### Clean
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index b54cc11db..2e7cdc085 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -1,5 +1,5 @@
{
- "name": "@0x/subproviders",
+ "name": "@dexon-foundation/subproviders",
"version": "2.1.11",
"engines": {
"node": ">=6.12"
@@ -34,6 +34,7 @@
"@0x/typescript-typings": "^3.0.8",
"@0x/utils": "^3.0.1",
"@0x/web3-wrapper": "^3.2.4",
+ "@dexon-foundation/ganache-core": "^2.3.2",
"@ledgerhq/hw-app-eth": "^4.3.0",
"@ledgerhq/hw-transport-u2f": "4.24.0",
"@types/eth-lightwallet": "^3.0.0",
@@ -46,7 +47,6 @@
"ethereum-types": "^1.1.6",
"ethereumjs-tx": "^1.3.5",
"ethereumjs-util": "^5.1.1",
- "ganache-core": "^2.3.3",
"hdkey": "^0.7.1",
"json-rpc-error": "2.0.0",
"lodash": "^4.17.5",
diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts
index 2b8544f8b..f42d6deac 100644
--- a/packages/subproviders/src/subproviders/ganache.ts
+++ b/packages/subproviders/src/subproviders/ganache.ts
@@ -1,5 +1,5 @@
import { JSONRPCRequestPayload, Provider } from 'ethereum-types';
-import * as Ganache from 'ganache-core';
+import * as Ganache from '@dexon-foundation/ganache-core';
import { Callback, ErrorCallback } from '../types';
diff --git a/packages/testnet-faucets/Dockerfile b/packages/testnet-faucets/Dockerfile
deleted file mode 100644
index cfd22aa39..000000000
--- a/packages/testnet-faucets/Dockerfile
+++ /dev/null
@@ -1,13 +0,0 @@
-FROM node
-
-WORKDIR /src
-
-COPY package.json .
-RUN npm i
-RUN npm install forever -g
-
-COPY . .
-
-EXPOSE 3000
-
-CMD ["forever", "./server/server.js"]
diff --git a/packages/testnet-faucets/README.md b/packages/testnet-faucets/README.md
deleted file mode 100644
index 8b85e3517..000000000
--- a/packages/testnet-faucets/README.md
+++ /dev/null
@@ -1,153 +0,0 @@
-## @0x/testnet-faucets
-
-This faucet dispenses 0.1 test ether to one recipient per second and 0.1 test ZRX every 5 seconds. It has a max queue size of 1000.
-
-## Installation
-
-This is a private package and therefore is not published to npm. In order to build and run this package locally, see the contributing instructions below.
-
-## 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/testnet-faucets yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/testnet-faucets yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Start
-
-Set the following environment variables:
-
-```bash
-export DISPENSER_ADDRESS=0x5409ed021d9299bf6814279a6a1411a7e866a631
-export DISPENSER_PRIVATE_KEY=f2f48ee19680706196e2e339e5da3491186e0c4c5030670656b0e0164837257d
-export FAUCET_ROLLBAR_ACCESS_KEY={GET_THIS_FROM_ROLLBAR_ACCOUNT_SETTINGS}
-export INFURA_API_KEY={GET_THIS_FROM_INFURA}
-```
-
-If you want to talk to testrpc, set the following environment variable:
-
-```bash
-export FAUCET_ENVIRONMENT=development
-```
-
-Infura API Key can be requested here: https://infura.io/signup
-
-Note: The above public/private keys exist when running `testrpc` with the following option `--mnemonic concert load couple harbor equip island argue ramp clarify fence smart topic`.
-
-```bash
-PKG=0x.js yarn watch
-```
-
-### Endpoints
-
-`GET /ping`
-
-Returns `pong`
-
-`GET /info`
-
-Returns a JSON payload describing the state of the queues for each network. For example:
-
-```json
-{
- "3": {
- "ether": {
- "full": false,
- "size": 4
- },
- "zrx": {
- "full": false,
- "size": 6
- }
- },
- "42": {
- "ether": {
- "full": false,
- "size": 8
- },
- "zrx": {
- "full": false,
- "size": 20
- }
- }
-}
-```
-
-`GET /ether/:recipient?networkId=:networkId`
-
-Schedules a transaction that sends 0.1 ETH to the `recipient` on the network specified by `networkId` where `recipient` is a hex encoded Ethereum address prefixed with `0x`. If no `networkId` is provided via query parameters the faucet will default to network 42 (Kovan).
-
-`GET /zrx/:recipient?networkId=:networkId`
-
-Schedules a transaction that sends 0.1 ZRX to the `recipient` on the network specified by `networkId` where `recipient` is a hex encoded Ethereum address prefixed with `0x`. If no `networkId` is provided via query parameters the faucet will default to network 42 (Kovan).
-
-`GET /order/weth/:recipient?networkId=:networkId`
-
-Returns a JSON payload describing an order for 0.1 WETH in exchange for 0.1 ZRX signed by the dispenser address on the network specified by `networkId`. The taker is specified by `recipient` where `recipient` is a hex encoded Ethereum address prefixed with `0x`. If no `networkId` is provided via query parameters the faucet will default to network 42 (Kovan).
-
-`GET /order/zrx/:recipient?networkId=:networkId`
-
-Returns a JSON payload describing an order for 0.1 ZRX in exchange for 0.1 WETH signed by the dispenser address on the network specified by `networkId`. The taker is specified by `recipient` where `recipient` is a hex encoded Ethereum address prefixed with `0x`. If no `networkId` is provided via query parameters the faucet will default to network 42 (Kovan).
-
-#### Example request
-
-```bash
-curl -i http://localhost:3000/ether/0x14e2F1F157E7DD4057D02817436D628A37120FD1\?networkId=3
-```
-
-This command will request the local server to initiate a transfer of 0.1 ETH from the dispensing address to `0x14e2F1F157E7DD4057D02817436D628A37120FD1` on the Ropsten testnet.
-
-### Docker configs
-
-```
-docker run -d \
--p 80:3000 \
---name testnet-faucets \
---log-opt max-size=100m \
---log-opt max-file=20 \
--e DISPENSER_ADDRESS=$DISPENSER_ADDRESS \
--e DISPENSER_PRIVATE_KEY=$DISPENSER_PRIVATE_KEY \
--e FAUCET_ROLLBAR_ACCESS_KEY=$FAUCET_ROLLBAR_ACCESS_KEY \
--e FAUCET_ENVIRONMENT=production \
--e INFURA_API_KEY=$INFURA_API_KEY \
-testnet-faucets
-```
diff --git a/packages/testnet-faucets/gulpfile.js b/packages/testnet-faucets/gulpfile.js
deleted file mode 100644
index 839ef851b..000000000
--- a/packages/testnet-faucets/gulpfile.js
+++ /dev/null
@@ -1,91 +0,0 @@
-const gulp = require('gulp');
-const nodemon = require('nodemon');
-const path = require('path');
-const webpack = require('webpack');
-const fs = require('fs');
-const nodeExternals = require('webpack-node-externals');
-
-const config = {
- target: 'node',
- entry: [path.join(__dirname, '/src/ts/server.ts')],
- output: {
- path: path.join(__dirname, '/server'),
- filename: 'server.js',
- },
- devtool: 'source-map',
- resolve: {
- modules: [path.join(__dirname, '/src/ts'), 'node_modules'],
- extensions: ['.ts', '.tsx', '.js', '.jsx', '.json'],
- alias: {
- ts: path.join(__dirname, '/src/ts'),
- contract_artifacts: path.join(__dirname, '/src/contract_artifacts'),
- },
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- loader: 'source-map-loader',
- },
- {
- test: /\.tsx?$/,
- loader: 'awesome-typescript-loader',
- },
- ],
- },
- plugins: [
- new webpack.BannerPlugin({
- banner: 'require("source-map-support").install();',
- raw: true,
- entryOnly: false,
- }),
- ],
- externals: nodeExternals({
- modulesDir: path.join(__dirname, '../../node_modules'),
- }),
- watchOptions: {
- ignored: /server|node_modules|transpiled/,
- },
-};
-
-gulp.task('build', function(done) {
- webpack(config).run(onBuild(done));
-});
-
-gulp.task('watch', function() {
- webpack(config).watch(100, function(err, stats) {
- onBuild()(err, stats);
- nodemon.restart();
- });
-});
-
-gulp.task('run', ['watch'], function() {
- nodemon({
- execMap: {
- js: 'node',
- },
- script: path.join(__dirname, 'server/server'),
- ignore: ['*'],
- watch: ['foo/'],
- ext: 'noop',
- }).on('restart', function() {
- console.log('Restarted!');
- });
-});
-
-function onBuild(done) {
- return function(err, stats) {
- if (err) {
- console.log('Error', err);
- process.exit(1);
- } else {
- console.log(stats.toString());
- }
- if (done) {
- if (stats.compilation.errors && stats.compilation.errors.length > 0) {
- process.exit(1);
- }
- done();
- }
- };
-}
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
deleted file mode 100644
index da7477be4..000000000
--- a/packages/testnet-faucets/package.json
+++ /dev/null
@@ -1,50 +0,0 @@
-{
- "private": true,
- "name": "@0x/testnet-faucets",
- "version": "1.0.64",
- "engines": {
- "node": ">=6.12"
- },
- "description": "A faucet micro-service that dispenses test ERC20 tokens or Ether",
- "main": "server.js",
- "scripts": {
- "build": "node ../../node_modules/gulp/bin/gulp.js build",
- "build:ci": "yarn build",
- "dev": "node ../../node_modules/gulp/bin/gulp.js run",
- "start": "node ./server/server.js",
- "lint": "tslint --format stylish --project .",
- "clean": "shx rm -rf server"
- },
- "author": "Fabio Berger",
- "license": "Apache-2.0",
- "dependencies": {
- "0x.js": "^3.0.3",
- "@0x/subproviders": "^2.1.11",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "@0x/web3-wrapper": "^3.2.4",
- "body-parser": "^1.17.1",
- "ethereum-types": "^1.1.6",
- "ethereumjs-tx": "^1.3.5",
- "ethereumjs-util": "^5.1.1",
- "express": "^4.15.2",
- "lodash": "^4.17.5",
- "rollbar": "^0.6.5"
- },
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/body-parser": "^1.16.1",
- "@types/express": "^4.0.35",
- "@types/lodash": "4.14.104",
- "awesome-typescript-loader": "^5.2.1",
- "gulp": "^3.9.1",
- "make-promises-safe": "^1.1.0",
- "nodemon": "^1.11.0",
- "shx": "^0.2.2",
- "source-map-loader": "^0.2.4",
- "tslint": "5.11.0",
- "typescript": "3.0.1",
- "webpack": "^4.20.2",
- "webpack-node-externals": "^1.6.0"
- }
-}
diff --git a/packages/testnet-faucets/src/ts/configs.ts b/packages/testnet-faucets/src/ts/configs.ts
deleted file mode 100644
index 038c8e22a..000000000
--- a/packages/testnet-faucets/src/ts/configs.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-export const configs = {
- DISPENSER_ADDRESS: (process.env.DISPENSER_ADDRESS as string).toLowerCase(),
- DISPENSER_PRIVATE_KEY: process.env.DISPENSER_PRIVATE_KEY,
- ENVIRONMENT: process.env.FAUCET_ENVIRONMENT,
- INFURA_API_KEY: process.env.INFURA_API_KEY,
- ROLLBAR_ACCESS_KEY: process.env.FAUCET_ROLLBAR_ACCESS_KEY,
-};
diff --git a/packages/testnet-faucets/src/ts/constants.ts b/packages/testnet-faucets/src/ts/constants.ts
deleted file mode 100644
index c6370e3f6..000000000
--- a/packages/testnet-faucets/src/ts/constants.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const constants = {
- SUCCESS_STATUS: 200,
- SERVICE_UNAVAILABLE_STATUS: 503,
- BAD_REQUEST_STATUS: 400,
-};
diff --git a/packages/testnet-faucets/src/ts/dispatch_queue.ts b/packages/testnet-faucets/src/ts/dispatch_queue.ts
deleted file mode 100644
index 3d0958fbf..000000000
--- a/packages/testnet-faucets/src/ts/dispatch_queue.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { intervalUtils, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { errorReporter } from './error_reporter';
-
-const MAX_QUEUE_SIZE = 500;
-const DEFAULT_QUEUE_INTERVAL_MS = 1000;
-
-export class DispatchQueue {
- private readonly _queueIntervalMs: number;
- private readonly _queue: Array<() => Promise<void>>;
- private _queueIntervalIdIfExists?: NodeJS.Timer;
- constructor() {
- this._queueIntervalMs = DEFAULT_QUEUE_INTERVAL_MS;
- this._queue = [];
- this._start();
- }
- public add(taskAsync: () => Promise<void>): boolean {
- if (this.isFull()) {
- return false;
- }
- this._queue.push(taskAsync);
- return true;
- }
- public size(): number {
- return this._queue.length;
- }
- public isFull(): boolean {
- return this.size() >= MAX_QUEUE_SIZE;
- }
- public stop(): void {
- if (!_.isUndefined(this._queueIntervalIdIfExists)) {
- intervalUtils.clearAsyncExcludingInterval(this._queueIntervalIdIfExists);
- }
- }
- private _start(): void {
- this._queueIntervalIdIfExists = intervalUtils.setAsyncExcludingInterval(
- async () => {
- const taskAsync = this._queue.shift();
- if (_.isUndefined(taskAsync)) {
- return Promise.resolve();
- }
- await taskAsync();
- },
- this._queueIntervalMs,
- (err: Error) => {
- logUtils.log(`Unexpected err: ${err} - ${JSON.stringify(err)}`);
- // tslint:disable-next-line:no-floating-promises
- errorReporter.reportAsync(err);
- },
- );
- }
-}
diff --git a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts b/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts
deleted file mode 100644
index 58caeeeaa..000000000
--- a/packages/testnet-faucets/src/ts/dispense_asset_tasks.ts
+++ /dev/null
@@ -1,73 +0,0 @@
-import { ERC20TokenWrapper } from '0x.js';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-
-import { configs } from './configs';
-import { TOKENS_BY_NETWORK } from './tokens';
-
-const DISPENSE_AMOUNT_ETHER = 0.1;
-const DISPENSE_AMOUNT_TOKEN = 1;
-const DISPENSE_MAX_AMOUNT_TOKEN = 100;
-const DISPENSE_MAX_AMOUNT_ETHER = 2;
-
-type AsyncTask = () => Promise<void>;
-
-export const dispenseAssetTasks = {
- dispenseEtherTask(recipientAddress: string, web3Wrapper: Web3Wrapper): AsyncTask {
- return async () => {
- logUtils.log(`Processing ETH ${recipientAddress}`);
- const userBalance = await web3Wrapper.getBalanceInWeiAsync(recipientAddress);
- const maxAmountInWei = Web3Wrapper.toWei(new BigNumber(DISPENSE_MAX_AMOUNT_ETHER));
- if (userBalance.isGreaterThanOrEqualTo(maxAmountInWei)) {
- logUtils.log(
- `User exceeded ETH balance maximum (${maxAmountInWei}) ${recipientAddress} ${userBalance} `,
- );
- return;
- }
- const txHash = await web3Wrapper.sendTransactionAsync({
- from: configs.DISPENSER_ADDRESS,
- to: recipientAddress,
- value: Web3Wrapper.toWei(new BigNumber(DISPENSE_AMOUNT_ETHER)),
- });
- logUtils.log(`Sent ${DISPENSE_AMOUNT_ETHER} ETH to ${recipientAddress} tx: ${txHash}`);
- };
- },
- dispenseTokenTask(
- recipientAddress: string,
- tokenSymbol: string,
- networkId: number,
- erc20TokenWrapper: ERC20TokenWrapper,
- ): AsyncTask {
- return async () => {
- logUtils.log(`Processing ${tokenSymbol} ${recipientAddress}`);
- const amountToDispense = new BigNumber(DISPENSE_AMOUNT_TOKEN);
- const tokenIfExists = _.get(TOKENS_BY_NETWORK, [networkId, tokenSymbol]);
- if (_.isUndefined(tokenIfExists)) {
- throw new Error(`Unsupported asset type: ${tokenSymbol}`);
- }
- const baseUnitAmount = Web3Wrapper.toBaseUnitAmount(amountToDispense, tokenIfExists.decimals);
- const userBalanceBaseUnits = await erc20TokenWrapper.getBalanceAsync(
- tokenIfExists.address,
- recipientAddress,
- );
- const maxAmountBaseUnits = Web3Wrapper.toBaseUnitAmount(
- new BigNumber(DISPENSE_MAX_AMOUNT_TOKEN),
- tokenIfExists.decimals,
- );
- if (userBalanceBaseUnits.isGreaterThanOrEqualTo(maxAmountBaseUnits)) {
- logUtils.log(
- `User exceeded token balance maximum (${maxAmountBaseUnits}) ${recipientAddress} ${userBalanceBaseUnits} `,
- );
- return;
- }
- const txHash = await erc20TokenWrapper.transferAsync(
- tokenIfExists.address,
- configs.DISPENSER_ADDRESS,
- recipientAddress,
- baseUnitAmount,
- );
- logUtils.log(`Sent ${amountToDispense} ${tokenSymbol} to ${recipientAddress} tx: ${txHash}`);
- };
- },
-};
diff --git a/packages/testnet-faucets/src/ts/error_reporter.ts b/packages/testnet-faucets/src/ts/error_reporter.ts
deleted file mode 100644
index d5358aed0..000000000
--- a/packages/testnet-faucets/src/ts/error_reporter.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { logUtils } from '@0x/utils';
-import * as express from 'express';
-import rollbar = require('rollbar');
-
-import { configs } from './configs';
-
-export const errorReporter = {
- setup(): void {
- rollbar.init(configs.ROLLBAR_ACCESS_KEY, {
- environment: configs.ENVIRONMENT,
- });
- rollbar.handleUncaughtExceptions(configs.ROLLBAR_ACCESS_KEY);
- process.on('unhandledRejection', async (err: Error) => {
- logUtils.log(`Uncaught exception ${err}. Stack: ${err.stack}`);
- await errorReporter.reportAsync(err);
- process.exit(1);
- });
- },
- async reportAsync(err: Error, req?: express.Request): Promise<any> {
- if (configs.ENVIRONMENT === 'development') {
- return; // Do not log development environment errors
- }
- return new Promise<any>((resolve, reject) => {
- rollbar.handleError(err, req, (rollbarErr: Error) => {
- if (rollbarErr) {
- logUtils.log(`Error reporting to rollbar, ignoring: ${rollbarErr}`);
- reject(rollbarErr);
- } else {
- resolve();
- }
- });
- });
- },
- errorHandler(): any {
- return rollbar.errorHandler(configs.ROLLBAR_ACCESS_KEY);
- },
-};
diff --git a/packages/testnet-faucets/src/ts/global.d.ts b/packages/testnet-faucets/src/ts/global.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/testnet-faucets/src/ts/global.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/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts
deleted file mode 100644
index 533e1f8b3..000000000
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ /dev/null
@@ -1,200 +0,0 @@
-import {
- assetDataUtils,
- BigNumber,
- ContractWrappers,
- generatePseudoRandomSalt,
- Order,
- orderHashUtils,
- Provider,
- RPCSubprovider,
- signatureUtils,
- SignedOrder,
- Web3ProviderEngine,
-} from '0x.js';
-import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0x/subproviders';
-import { logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as express from 'express';
-import * as _ from 'lodash';
-
-import { configs } from './configs';
-import { constants } from './constants';
-import { DispatchQueue } from './dispatch_queue';
-import { dispenseAssetTasks } from './dispense_asset_tasks';
-import { rpcUrls } from './rpc_urls';
-import { TOKENS_BY_NETWORK } from './tokens';
-
-interface NetworkConfig {
- dispatchQueue: DispatchQueue;
- web3Wrapper: Web3Wrapper;
- contractWrappers: ContractWrappers;
- networkId: number;
-}
-
-interface ItemByNetworkId<T> {
- [networkId: string]: T;
-}
-
-enum RequestedAssetType {
- ETH = 'ETH', // tslint:disable-line:enum-naming
- WETH = 'WETH', // tslint:disable-line:enum-naming
- ZRX = 'ZRX', // tslint:disable-line:enum-naming
-}
-
-const FIVE_DAYS_IN_MS = 4.32e8; // TODO: make this configurable
-const NULL_ADDRESS = '0x0000000000000000000000000000000000000000';
-const ZERO = new BigNumber(0);
-const ASSET_AMOUNT = new BigNumber(0.1);
-
-export class Handler {
- private readonly _networkConfigByNetworkId: ItemByNetworkId<NetworkConfig> = {};
- private static _createProviderEngine(rpcUrl: string): Provider {
- if (_.isUndefined(configs.DISPENSER_PRIVATE_KEY)) {
- throw new Error('Dispenser Private key not found');
- }
- const engine = new Web3ProviderEngine();
- engine.addProvider(new NonceTrackerSubprovider());
- engine.addProvider(new PrivateKeyWalletSubprovider(configs.DISPENSER_PRIVATE_KEY));
- engine.addProvider(new RPCSubprovider(rpcUrl));
- engine.start();
- return engine;
- }
- constructor() {
- _.forIn(rpcUrls, (rpcUrl: string, networkIdString: string) => {
- const providerObj = Handler._createProviderEngine(rpcUrl);
- const web3Wrapper = new Web3Wrapper(providerObj);
- // tslint:disable-next-line:custom-no-magic-numbers
- const networkId = parseInt(networkIdString, 10);
- const contractWrappersConfig = {
- networkId,
- };
- const contractWrappers = new ContractWrappers(providerObj, contractWrappersConfig);
- const dispatchQueue = new DispatchQueue();
- this._networkConfigByNetworkId[networkId] = {
- dispatchQueue,
- web3Wrapper,
- contractWrappers,
- networkId,
- };
- });
- }
- public getQueueInfo(_req: express.Request, res: express.Response): void {
- res.setHeader('Content-Type', 'application/json');
- const queueInfo = _.mapValues(rpcUrls, (_rpcUrl: string, networkId: string) => {
- const dispatchQueue = this._networkConfigByNetworkId[networkId].dispatchQueue;
- return {
- full: dispatchQueue.isFull(),
- size: dispatchQueue.size(),
- };
- });
- const payload = JSON.stringify(queueInfo);
- res.status(constants.SUCCESS_STATUS).send(payload);
- }
- public dispenseEther(req: express.Request, res: express.Response): void {
- this._dispenseAsset(req, res, RequestedAssetType.ETH);
- }
- public dispenseZRX(req: express.Request, res: express.Response): void {
- this._dispenseAsset(req, res, RequestedAssetType.ZRX);
- }
- public async dispenseWETHOrderAsync(req: express.Request, res: express.Response): Promise<void> {
- await this._dispenseOrderAsync(req, res, RequestedAssetType.WETH);
- }
- public async dispenseZRXOrderAsync(
- req: express.Request,
- res: express.Response,
- _next: express.NextFunction,
- ): Promise<void> {
- await this._dispenseOrderAsync(req, res, RequestedAssetType.ZRX);
- }
- private _dispenseAsset(req: express.Request, res: express.Response, requestedAssetType: RequestedAssetType): void {
- const networkId = req.params.networkId;
- const recipient = req.params.recipient;
- const networkConfig = _.get(this._networkConfigByNetworkId, networkId);
- if (_.isUndefined(networkConfig)) {
- res.status(constants.BAD_REQUEST_STATUS).send('UNSUPPORTED_NETWORK_ID');
- return;
- }
- let dispenserTask;
- switch (requestedAssetType) {
- case RequestedAssetType.ETH:
- dispenserTask = dispenseAssetTasks.dispenseEtherTask(recipient, networkConfig.web3Wrapper);
- break;
- case RequestedAssetType.WETH:
- case RequestedAssetType.ZRX:
- dispenserTask = dispenseAssetTasks.dispenseTokenTask(
- recipient,
- requestedAssetType,
- networkConfig.networkId,
- networkConfig.contractWrappers.erc20Token,
- );
- break;
- default:
- throw new Error(`Unsupported asset type: ${requestedAssetType}`);
- }
- const didAddToQueue = networkConfig.dispatchQueue.add(dispenserTask);
- if (!didAddToQueue) {
- res.status(constants.SERVICE_UNAVAILABLE_STATUS).send('QUEUE_IS_FULL');
- return;
- }
- logUtils.log(`Added ${recipient} to queue: ${requestedAssetType} networkId: ${networkId}`);
- res.status(constants.SUCCESS_STATUS).end();
- }
- private async _dispenseOrderAsync(
- req: express.Request,
- res: express.Response,
- requestedAssetType: RequestedAssetType,
- ): Promise<void> {
- const networkConfig = _.get(this._networkConfigByNetworkId, req.params.networkId);
- if (_.isUndefined(networkConfig)) {
- res.status(constants.BAD_REQUEST_STATUS).send('UNSUPPORTED_NETWORK_ID');
- return;
- }
- res.setHeader('Content-Type', 'application/json');
- const makerTokenIfExists = _.get(TOKENS_BY_NETWORK, [networkConfig.networkId, requestedAssetType]);
- if (_.isUndefined(makerTokenIfExists)) {
- throw new Error(`Unsupported asset type: ${requestedAssetType}`);
- }
- const takerTokenSymbol =
- requestedAssetType === RequestedAssetType.WETH ? RequestedAssetType.ZRX : RequestedAssetType.WETH;
- const takerTokenIfExists = _.get(TOKENS_BY_NETWORK, [networkConfig.networkId, takerTokenSymbol]);
- if (_.isUndefined(takerTokenIfExists)) {
- throw new Error(`Unsupported asset type: ${takerTokenSymbol}`);
- }
-
- const makerAssetAmount = Web3Wrapper.toBaseUnitAmount(ASSET_AMOUNT, makerTokenIfExists.decimals);
- const takerAssetAmount = Web3Wrapper.toBaseUnitAmount(ASSET_AMOUNT, takerTokenIfExists.decimals);
- const makerAssetData = assetDataUtils.encodeERC20AssetData(makerTokenIfExists.address);
- const takerAssetData = assetDataUtils.encodeERC20AssetData(takerTokenIfExists.address);
- const order: Order = {
- makerAddress: configs.DISPENSER_ADDRESS,
- takerAddress: req.params.recipient as string,
- makerFee: ZERO,
- takerFee: ZERO,
- makerAssetAmount,
- takerAssetAmount,
- makerAssetData,
- takerAssetData,
- salt: generatePseudoRandomSalt(),
- exchangeAddress: networkConfig.contractWrappers.exchange.address,
- feeRecipientAddress: NULL_ADDRESS,
- senderAddress: NULL_ADDRESS,
- expirationTimeSeconds: new BigNumber(Date.now() + FIVE_DAYS_IN_MS)
- // tslint:disable-next-line:custom-no-magic-numbers
- .div(1000)
- .integerValue(BigNumber.ROUND_FLOOR),
- };
- const orderHash = orderHashUtils.getOrderHashHex(order);
- const signature = await signatureUtils.ecSignHashAsync(
- networkConfig.web3Wrapper.getProvider(),
- orderHash,
- configs.DISPENSER_ADDRESS,
- );
- const signedOrder: SignedOrder = {
- ...order,
- signature,
- };
- const payload = JSON.stringify(signedOrder);
- logUtils.log(`Dispensed signed order: ${payload}`);
- res.status(constants.SUCCESS_STATUS).send(payload);
- }
-}
diff --git a/packages/testnet-faucets/src/ts/parameter_transformer.ts b/packages/testnet-faucets/src/ts/parameter_transformer.ts
deleted file mode 100644
index bed8eb99e..000000000
--- a/packages/testnet-faucets/src/ts/parameter_transformer.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { addressUtils } from '@0x/utils';
-import { NextFunction, Request, Response } from 'express';
-import * as _ from 'lodash';
-
-import { constants } from './constants';
-import { rpcUrls } from './rpc_urls';
-
-const DEFAULT_NETWORK_ID = 42; // kovan
-
-export const parameterTransformer = {
- transform(req: Request, res: Response, next: NextFunction): void {
- const recipientAddress = req.params.recipient;
- if (_.isUndefined(recipientAddress) || !addressUtils.isAddress(recipientAddress)) {
- res.status(constants.BAD_REQUEST_STATUS).send('INVALID_RECIPIENT_ADDRESS');
- return;
- }
- const lowerCaseRecipientAddress = recipientAddress.toLowerCase();
- req.params.recipient = lowerCaseRecipientAddress;
- const networkId = _.get(req.query, 'networkId', DEFAULT_NETWORK_ID);
- const rpcUrlIfExists = _.get(rpcUrls, networkId);
- if (_.isUndefined(rpcUrlIfExists)) {
- res.status(constants.BAD_REQUEST_STATUS).send('UNSUPPORTED_NETWORK_ID');
- return;
- }
- req.params.networkId = networkId;
- next();
- },
-};
diff --git a/packages/testnet-faucets/src/ts/rpc_urls.ts b/packages/testnet-faucets/src/ts/rpc_urls.ts
deleted file mode 100644
index d31908257..000000000
--- a/packages/testnet-faucets/src/ts/rpc_urls.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { configs } from './configs';
-
-const productionRpcUrls = {
- '3': `https://ropsten.infura.io/${configs.INFURA_API_KEY}`,
- '42': `https://kovan.infura.io/${configs.INFURA_API_KEY}`,
-};
-
-const developmentRpcUrls = {
- '50': 'http://127.0.0.1:8545',
-};
-
-export const rpcUrls = configs.ENVIRONMENT === 'development' ? developmentRpcUrls : productionRpcUrls;
diff --git a/packages/testnet-faucets/src/ts/server.ts b/packages/testnet-faucets/src/ts/server.ts
deleted file mode 100644
index f00562000..000000000
--- a/packages/testnet-faucets/src/ts/server.ts
+++ /dev/null
@@ -1,52 +0,0 @@
-import * as bodyParser from 'body-parser';
-import * as express from 'express';
-
-import { constants } from './constants';
-import { errorReporter } from './error_reporter';
-import { Handler } from './handler';
-import { parameterTransformer } from './parameter_transformer';
-
-// Setup the errorReporter to catch uncaught exceptions and unhandled rejections
-errorReporter.setup();
-
-const app = express();
-app.use(bodyParser.json()); // for parsing application/json
-// tslint:disable-next-line:no-unused-variable
-app.use((req, res, next) => {
- res.header('Access-Control-Allow-Origin', '*');
- res.header('Access-Control-Allow-Headers', 'Origin, X-Requested-With, Content-Type, Accept');
- next();
-});
-
-const handler = new Handler();
-// tslint:disable-next-line:no-unused-variable
-app.get('/ping', (req: express.Request, res: express.Response) => {
- res.status(constants.SUCCESS_STATUS).send('pong');
-});
-app.get('/info', handler.getQueueInfo.bind(handler));
-app.get(
- '/ether/:recipient',
- parameterTransformer.transform.bind(parameterTransformer),
- handler.dispenseEther.bind(handler),
-);
-app.get(
- '/zrx/:recipient',
- parameterTransformer.transform.bind(parameterTransformer),
- handler.dispenseZRX.bind(handler),
-);
-app.get(
- '/order/weth/:recipient',
- parameterTransformer.transform.bind(parameterTransformer),
- handler.dispenseWETHOrderAsync.bind(handler),
-);
-app.get(
- '/order/zrx/:recipient',
- parameterTransformer.transform.bind(parameterTransformer),
- handler.dispenseZRXOrderAsync.bind(handler),
-);
-
-// Log to rollbar any errors unhandled by handlers
-app.use(errorReporter.errorHandler());
-const DEFAULT_PORT = 3000;
-const port = process.env.PORT || DEFAULT_PORT;
-app.listen(port);
diff --git a/packages/testnet-faucets/src/ts/tokens.ts b/packages/testnet-faucets/src/ts/tokens.ts
deleted file mode 100644
index 4ffb03df4..000000000
--- a/packages/testnet-faucets/src/ts/tokens.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-interface TokensByNetwork {
- [networkId: number]: { [tokenSymbol: string]: { address: string; decimals: number } };
-}
-
-export const tokens = {
- ZRX: {
- decimals: 18,
- },
- WETH: {
- decimals: 18,
- },
-};
-export const TOKENS_BY_NETWORK: TokensByNetwork = {
- 3: {
- ZRX: {
- ...tokens.ZRX,
- address: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
- },
- WETH: {
- ...tokens.WETH,
- address: '0xc778417e063141139fce010982780140aa0cd5ab',
- },
- },
- 42: {
- ZRX: {
- ...tokens.ZRX,
- address: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
- },
- WETH: {
- ...tokens.WETH,
- address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
- },
- },
- 50: {
- ZRX: {
- ...tokens.ZRX,
- address: '0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c',
- },
- WETH: {
- ...tokens.WETH,
- address: '0x0b1ba0af832d7c05fd64161e0db78e85978e8082',
- },
- },
-};
diff --git a/packages/testnet-faucets/tsconfig.json b/packages/testnet-faucets/tsconfig.json
deleted file mode 100644
index 4997ce208..000000000
--- a/packages/testnet-faucets/tsconfig.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src/ts",
- "strictPropertyInitialization": false
- },
- "include": ["./src/ts/**/*"]
-}
diff --git a/packages/testnet-faucets/tslint.json b/packages/testnet-faucets/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/testnet-faucets/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/tslint-config/.npmignore b/packages/tslint-config/.npmignore
deleted file mode 100644
index c46793a87..000000000
--- a/packages/tslint-config/.npmignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.*
-yarn-error.log
-node_modules/
-/scripts/
-/rules/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/tslint-config/CHANGELOG.json b/packages/tslint-config/CHANGELOG.json
deleted file mode 100644
index 34ea6aa6b..000000000
--- a/packages/tslint-config/CHANGELOG.json
+++ /dev/null
@@ -1,283 +0,0 @@
-[
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "2.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "2.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Improve async-suffix rule to check functions too, not just methods",
- "pr": 1425
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.0.10",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "timestamp": 1539871071,
- "version": "1.0.9",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538693146,
- "version": "1.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1536142250,
- "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": 1532614997,
- "version": "1.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532605697,
- "version": "1.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532551340,
- "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": "Added a bunch of rules",
- "pr": 883
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.4.21",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.4.20",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.19",
- "changes": [
- {
- "note": "Incorrect publish that was unpublished"
- }
- ],
- "timestamp": 1527810075
- },
- {
- "timestamp": 1527009133,
- "version": "0.4.18",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.4.17",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.4.16",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1523462196,
- "version": "0.4.15",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522673609,
- "version": "0.4.14",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1522658513,
- "version": "0.4.13",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.9",
- "changes": [
- {
- "note": "Move devDeps to deps to fix missed dependency issue in published package."
- }
- ],
- "timestamp": 1518102000
- },
- {
- "version": "0.4.8",
- "changes": [
- {
- "note": "Fix publish issue where custom TSLint rules were not being included",
- "pr": 389
- }
- ],
- "timestamp": 1518102000
- },
- {
- "version": "0.4.7",
- "changes": [
- {
- "note": "Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names",
- "pr": 354
- }
- ],
- "timestamp": 1517929200
- },
- {
- "version": "0.4.0",
- "changes": [
- {
- "note": "Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names"
- },
- {
- "note": "Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews."
- }
- ],
- "timestamp": 1514386800
- },
- {
- "version": "0.3.0",
- "changes": [
- {
- "note": "Added rules for unused imports, variables and Async suffixes",
- "pr": 265
- }
- ],
- "timestamp": 1513695600
- },
- {
- "version": "0.1.0",
- "changes": [
- {
- "note": "Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject`"
- },
- {
- "note": "Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned."
- }
- ],
- "timestamp": 1510585200
- }
-]
diff --git a/packages/tslint-config/CHANGELOG.md b/packages/tslint-config/CHANGELOG.md
deleted file mode 100644
index 37d287c10..000000000
--- a/packages/tslint-config/CHANGELOG.md
+++ /dev/null
@@ -1,124 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v2.0.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v2.0.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v2.0.0 - _December 13, 2018_
-
- * Improve async-suffix rule to check functions too, not just methods (#1425)
-
-## v1.0.10 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.0.9 - _October 18, 2018_
-
- * Dependencies updated
-
-## v1.0.8 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.0.7 - _September 5, 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 25, 2018_
-
- * Dependencies updated
-
-## v1.0.1 - _July 23, 2018_
-
- * Dependencies updated
-
-## v1.0.0 - _July 19, 2018_
-
- * Added a bunch of rules (#883)
-
-## v0.4.21 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.4.20 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.4.19 - _May 31, 2018_
-
- * Incorrect publish that was unpublished
-
-## v0.4.18 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.4.17 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.4.16 - _April 18, 2018_
-
- * Dependencies updated
-
-## v0.4.15 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.4.14 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.4.13 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.4.9 - _February 8, 2018_
-
- * Move devDeps to deps to fix missed dependency issue in published package.
-
-## v0.4.8 - _February 8, 2018_
-
- * Fix publish issue where custom TSLint rules were not being included (#389)
-
-## v0.4.7 - _February 6, 2018_
-
- * Modified custom 'underscore-privates' rule, changing it to 'underscore-private-and-protected' requiring underscores to be prepended to both private and protected variable names (#354)
-
-## v0.4.0 - _December 27, 2017_
-
- * Added custom 'underscore-privates' rule, requiring underscores to be prepended to private variable names
- * Because our tools can be used in both a TS and JS environment, we want to make the private methods of any public facing interface show up at the bottom of auto-complete lists. Additionally, we wanted to remain consistent with respect to our usage of underscores in order to enforce this rule with a linter rule, rather then manual code reviews.
-
-## v0.3.0 - _December 19, 2017_
-
- * Added rules for unused imports, variables and Async suffixes (#265)
-
-## v0.1.0 - _November 13, 2017_
-
- * Re-published TsLintConfig previously published under NPM package `tslint-config-0xproject`
- * Updated to TSLint v5.8.0, requiring several rule additions to keep our conventions aligned.
diff --git a/packages/tslint-config/README.md b/packages/tslint-config/README.md
deleted file mode 100644
index 5614e5e54..000000000
--- a/packages/tslint-config/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-## @0x/tslint-config
-
-TSLint configuration and custom linter rules used by 0xProject.
-
-## Installation
-
-```bash
-yarn add --dev @0x/tslint-config
-```
-
-## Usage
-
-Add the following to your `tslint.json` file
-
-```json
-{
- "extends": ["@0x/tslint-config"]
-}
-```
-
-## 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/tslint-config yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/tslint-config yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/tslint-config/package.json b/packages/tslint-config/package.json
deleted file mode 100644
index f90321edb..000000000
--- a/packages/tslint-config/package.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "name": "@0x/tslint-config",
- "version": "2.0.2",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Lint rules related to 0xProject for TSLint",
- "main": "tslint.json",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "test": "mocha ./lib/test/*.spec.js",
- "clean": "shx rm -rf lib",
- "lint": "tslint --format stylish --project ."
- },
- "repository": {
- "type": "git",
- "url": "git://github.com/0xProject/0x-monorepo.git"
- },
- "keywords": [
- "tslint",
- "config",
- "0xProject",
- "typescript",
- "ts"
- ],
- "author": {
- "name": "Fabio Berger",
- "email": "fabio@0xproject.com"
- },
- "license": "Apache-2.0",
- "bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
- },
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/tslint-config/README.md",
- "devDependencies": {
- "@types/lodash": "4.14.104",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "lodash": "^4.17.5",
- "tslint": "5.11.0",
- "tslint-eslint-rules": "5.4.0",
- "tslint-react": "^3.2.0",
- "tsutils": "3.0.0"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/tslint-config/rules/asyncSuffixRule.ts b/packages/tslint-config/rules/asyncSuffixRule.ts
deleted file mode 100644
index 5215c7151..000000000
--- a/packages/tslint-config/rules/asyncSuffixRule.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import * as Lint from 'tslint';
-import * as ts from 'typescript';
-
-import { AsyncSuffixWalker } from './walkers/async_suffix';
-
-export class Rule extends Lint.Rules.AbstractRule {
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- return this.applyWithWalker(new AsyncSuffixWalker(sourceFile, this.getOptions()));
- }
-}
diff --git a/packages/tslint-config/rules/booleanNamingRule.ts b/packages/tslint-config/rules/booleanNamingRule.ts
deleted file mode 100644
index 6590f689b..000000000
--- a/packages/tslint-config/rules/booleanNamingRule.ts
+++ /dev/null
@@ -1,69 +0,0 @@
-import * as _ from 'lodash';
-import * as Lint from 'tslint';
-import * as ts from 'typescript';
-
-const VALID_BOOLEAN_PREFIXES = ['is', 'does', 'should', 'was', 'has', 'can', 'did', 'would', 'are'];
-// tslint:disable:no-unnecessary-type-assertion
-export class Rule extends Lint.Rules.TypedRule {
- public static FAILURE_STRING = `Boolean variable names should begin with: ${VALID_BOOLEAN_PREFIXES.join(', ')}`;
-
- public applyWithProgram(sourceFile: ts.SourceFile, program: ts.Program): Lint.RuleFailure[] {
- return this.applyWithFunction(sourceFile, walk, undefined, program.getTypeChecker());
- }
-}
-
-function walk(ctx: Lint.WalkContext<void>, tc: ts.TypeChecker): void {
- traverse(ctx.sourceFile);
-
- function traverse(node: ts.Node): void {
- checkNodeForViolations(ctx, node, tc);
- return ts.forEachChild(node, traverse);
- }
-}
-
-function checkNodeForViolations(ctx: Lint.WalkContext<void>, node: ts.Node, tc: ts.TypeChecker): void {
- switch (node.kind) {
- // Handle: const { timestamp } = ...
- case ts.SyntaxKind.BindingElement: {
- const bindingElementNode = node as ts.BindingElement;
- if (bindingElementNode.name.kind === ts.SyntaxKind.Identifier) {
- handleBooleanNaming(bindingElementNode, tc, ctx);
- }
- break;
- }
-
- // Handle regular assignments: const block = ...
- case ts.SyntaxKind.VariableDeclaration:
- const variableDeclarationNode = node as ts.VariableDeclaration;
- if (variableDeclarationNode.name.kind === ts.SyntaxKind.Identifier) {
- handleBooleanNaming(node as ts.VariableDeclaration, tc, ctx);
- }
- break;
-
- default:
- _.noop();
- }
-}
-
-function handleBooleanNaming(
- node: ts.VariableDeclaration | ts.BindingElement,
- tc: ts.TypeChecker,
- ctx: Lint.WalkContext<void>,
-): void {
- const nodeName = node.name;
- const variableName = nodeName.getText();
- const lowercasedName = _.toLower(variableName);
- const typeNode = tc.getTypeAtLocation(node);
- const typeName = (typeNode as any).intrinsicName;
- if (typeName === 'boolean') {
- const hasProperName = !_.isUndefined(
- _.find(VALID_BOOLEAN_PREFIXES, prefix => {
- return _.startsWith(lowercasedName, prefix);
- }),
- );
- if (!hasProperName) {
- ctx.addFailureAtNode(node, Rule.FAILURE_STRING);
- }
- }
-}
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/packages/tslint-config/rules/customNoMagicNumbersRule.ts b/packages/tslint-config/rules/customNoMagicNumbersRule.ts
deleted file mode 100644
index cb124f738..000000000
--- a/packages/tslint-config/rules/customNoMagicNumbersRule.ts
+++ /dev/null
@@ -1,79 +0,0 @@
-import * as Lint from 'tslint';
-import { isPrefixUnaryExpression } from 'tsutils';
-import * as ts from 'typescript';
-
-// tslint:disable:no-unnecessary-type-assertion
-/**
- * A modified version of the no-magic-numbers rule that allows for magic numbers
- * when instantiating a BigNumber instance.
- * E.g We want to be able to write:
- * const amount = new BigNumber(5);
- * Original source: https://github.com/palantir/tslint/blob/42b058a6baa688f8be8558b277eb056c3ff79818/src/rules/noMagicNumbersRule.ts
- */
-export class Rule extends Lint.Rules.AbstractRule {
- public static ALLOWED_NODES = new Set<ts.SyntaxKind>([
- ts.SyntaxKind.ExportAssignment,
- ts.SyntaxKind.FirstAssignment,
- ts.SyntaxKind.LastAssignment,
- ts.SyntaxKind.PropertyAssignment,
- ts.SyntaxKind.ShorthandPropertyAssignment,
- ts.SyntaxKind.VariableDeclaration,
- ts.SyntaxKind.VariableDeclarationList,
- ts.SyntaxKind.EnumMember,
- ts.SyntaxKind.PropertyDeclaration,
- ts.SyntaxKind.Parameter,
- ]);
-
- public static DEFAULT_ALLOWED = [-1, 0, 1];
-
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- const allowedNumbers = this.ruleArguments.length > 0 ? this.ruleArguments : Rule.DEFAULT_ALLOWED;
- return this.applyWithWalker(
- // tslint:disable-next-line:no-inferred-empty-object-type
- new CustomNoMagicNumbersWalker(sourceFile, this.ruleName, new Set(allowedNumbers.map(String))),
- );
- }
-}
-
-// tslint:disable-next-line:max-classes-per-file
-class CustomNoMagicNumbersWalker extends Lint.AbstractWalker<Set<string>> {
- public static FAILURE_STRING = "'magic numbers' are not allowed";
- private static _isNegativeNumberLiteral(
- node: ts.Node,
- ): node is ts.PrefixUnaryExpression & { operand: ts.NumericLiteral } {
- return (
- isPrefixUnaryExpression(node) &&
- node.operator === ts.SyntaxKind.MinusToken &&
- node.operand.kind === ts.SyntaxKind.NumericLiteral
- );
- }
- public walk(sourceFile: ts.SourceFile): void {
- const cb = (node: ts.Node): void => {
- if (node.kind === ts.SyntaxKind.NumericLiteral) {
- return this.checkNumericLiteral(node, (node as ts.NumericLiteral).text);
- }
- if (CustomNoMagicNumbersWalker._isNegativeNumberLiteral(node)) {
- return this.checkNumericLiteral(node, `-${(node.operand as ts.NumericLiteral).text}`);
- }
- return ts.forEachChild(node, cb);
- };
- return ts.forEachChild(sourceFile, cb);
- }
-
- // tslint:disable:no-non-null-assertion
- // tslint:disable-next-line:underscore-private-and-protected
- private checkNumericLiteral(node: ts.Node, num: string): void {
- if (!Rule.ALLOWED_NODES.has(node.parent!.kind) && !this.options.has(num)) {
- if (node.parent!.kind === ts.SyntaxKind.NewExpression) {
- const className = (node.parent! as any).expression.escapedText;
- const BIG_NUMBER_NEW_EXPRESSION = 'BigNumber';
- if (className === BIG_NUMBER_NEW_EXPRESSION) {
- return; // noop
- }
- }
- this.addFailureAtNode(node, CustomNoMagicNumbersWalker.FAILURE_STRING);
- }
- }
- // tslint:enable:no-non-null-assertion
-}
-// tslint:enable:no-unnecessary-type-assertion
diff --git a/packages/tslint-config/rules/enumNamingRule.ts b/packages/tslint-config/rules/enumNamingRule.ts
deleted file mode 100644
index 56499618f..000000000
--- a/packages/tslint-config/rules/enumNamingRule.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-import * as Lint from 'tslint';
-import * as ts from 'typescript';
-
-export class Rule extends Lint.Rules.AbstractRule {
- public static FAILURE_STRING = `Enum member names should be PascalCase`;
-
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- return this.applyWithFunction(sourceFile, walk);
- }
-}
-
-function walk(ctx: Lint.WalkContext<void>): void {
- // Recursively walk the AST starting with root node, `ctx.sourceFile`.
- // Call the function `cb` (defined below) for each child.
- return ts.forEachChild(ctx.sourceFile, cb);
-
- function cb(node: ts.Node): void {
- if (node.kind === ts.SyntaxKind.EnumMember) {
- const keyNode = node.getFirstToken(ctx.sourceFile);
- if (keyNode !== undefined) {
- const keyText = keyNode.getText(ctx.sourceFile);
- if (!isPascalCase(keyText)) {
- return ctx.addFailureAtNode(node, Rule.FAILURE_STRING, getFix(keyText, node));
- }
- }
- }
- // Continue recursion into the AST by calling function `cb` for every child of the current node.
- return ts.forEachChild(node, cb);
- }
-
- function getFix(text: string, node: ts.Node): Lint.Replacement {
- let fix = toPascalCase(text);
- // check for `member = value`
- if (node.getChildCount(ctx.sourceFile) === 3) {
- const value = node.getLastToken(ctx.sourceFile);
- if (value !== undefined) {
- fix += ` = ${value.getText(ctx.sourceFile)}`;
- }
- }
- return new Lint.Replacement(node.getStart(ctx.sourceFile), node.getWidth(ctx.sourceFile), fix);
- }
-}
-
-// Modified from: https://github.com/jonschlinkert/pascalcase/
-function toPascalCase(str: string): string {
- let result = str.replace(/([a-z0-9\W])([A-Z])/g, '$1 $2');
- if (result.length === 1) {
- return result.toUpperCase();
- }
- result = result.replace(/^[\W_\.]+|[\W_\.]+$/g, '').toLowerCase();
- result = result.charAt(0).toUpperCase() + result.slice(1);
- return result.replace(/[\W_\.]+(\w|$)/g, (_, ch) => {
- return ch.toUpperCase();
- });
-}
-function isPascalCase(s: string): boolean {
- const regex = /^([A-Z0-9]+[a-z0-9]+)+$/g;
- const key = s.split('=')[0].trim();
- return regex.test(key);
-}
diff --git a/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts b/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts
deleted file mode 100644
index 8c039bea7..000000000
--- a/packages/tslint-config/rules/underscorePrivateAndProtectedRule.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import * as Lint from 'tslint';
-import * as ts from 'typescript';
-
-const UNDERSCORE = '_';
-
-type RelevantClassMember =
- | ts.MethodDeclaration
- | ts.PropertyDeclaration
- | ts.GetAccessorDeclaration
- | ts.SetAccessorDeclaration;
-
-// Copied from: https://github.com/DanielRosenwasser/underscore-privates-tslint-rule
-// The version on github is not published on npm
-export class Rule extends Lint.Rules.AbstractRule {
- public static FAILURE_STRING = 'private and protected members must be prefixed with an underscore';
-
- public apply(sourceFile: ts.SourceFile): Lint.RuleFailure[] {
- return this.applyWithFunction(sourceFile, walk);
- }
-}
-function walk(ctx: Lint.WalkContext<void>): void {
- traverse(ctx.sourceFile);
-
- function traverse(node: ts.Node): void {
- checkNodeForViolations(ctx, node);
- return ts.forEachChild(node, traverse);
- }
-}
-function checkNodeForViolations(ctx: Lint.WalkContext<void>, node: ts.Node): void {
- if (!isRelevantClassMember(node)) {
- return;
- }
- // The declaration might have a computed property name or a numeric name.
- const name = node.name;
- if (!nameIsIdentifier(name)) {
- return;
- }
- if (!nameStartsWithUnderscore(name.text) && memberIsPrivate(node)) {
- ctx.addFailureAtNode(name, Rule.FAILURE_STRING);
- }
-}
-function isRelevantClassMember(node: ts.Node): node is RelevantClassMember {
- switch (node.kind) {
- case ts.SyntaxKind.MethodDeclaration:
- case ts.SyntaxKind.PropertyDeclaration:
- case ts.SyntaxKind.GetAccessor:
- case ts.SyntaxKind.SetAccessor:
- return true;
- default:
- return false;
- }
-}
-function nameStartsWithUnderscore(text: string): boolean {
- return text.charCodeAt(0) === UNDERSCORE.charCodeAt(0);
-}
-function memberIsPrivate(node: ts.Declaration): boolean {
- return Lint.hasModifier(node.modifiers, ts.SyntaxKind.PrivateKeyword, ts.SyntaxKind.ProtectedKeyword);
-}
-function nameIsIdentifier(node: ts.Node): node is ts.Identifier {
- return node.kind === ts.SyntaxKind.Identifier;
-}
diff --git a/packages/tslint-config/rules/walkers/async_suffix.ts b/packages/tslint-config/rules/walkers/async_suffix.ts
deleted file mode 100644
index 4e12152e8..000000000
--- a/packages/tslint-config/rules/walkers/async_suffix.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import * as _ from 'lodash';
-import * as Lint from 'tslint';
-import * as ts from 'typescript';
-
-export class AsyncSuffixWalker extends Lint.RuleWalker {
- public static FAILURE_STRING = 'async functions/methods must have an Async suffix';
- public visitFunctionDeclaration(node: ts.FunctionDeclaration): void {
- this._visitFunctionOrMethodDeclaration(node);
- super.visitFunctionDeclaration(node);
- }
- public visitMethodDeclaration(node: ts.MethodDeclaration): void {
- this._visitFunctionOrMethodDeclaration(node);
- super.visitMethodDeclaration(node);
- }
- private _visitFunctionOrMethodDeclaration(node: ts.MethodDeclaration | ts.FunctionDeclaration): void {
- const nameNode = node.name;
- if (!_.isUndefined(nameNode)) {
- const name = nameNode.getText();
- if (!_.isUndefined(node.type)) {
- if (node.type.kind === ts.SyntaxKind.TypeReference) {
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const returnTypeName = (node.type as ts.TypeReferenceNode).typeName.getText();
- if (returnTypeName === 'Promise' && !name.endsWith('Async')) {
- const failure = this.createFailure(
- nameNode.getStart(),
- nameNode.getWidth(),
- AsyncSuffixWalker.FAILURE_STRING,
- );
- this.addFailure(failure);
- }
- }
- }
- }
- }
-}
diff --git a/packages/tslint-config/test/enumNamingSpec.spec.ts b/packages/tslint-config/test/enumNamingSpec.spec.ts
deleted file mode 100644
index d5b864eba..000000000
--- a/packages/tslint-config/test/enumNamingSpec.spec.ts
+++ /dev/null
@@ -1,88 +0,0 @@
-import * as assert from 'assert';
-
-import { Rule } from '../rules/enumNamingRule';
-
-import { getFixedResult, helper } from './lintrunner';
-const rule = 'enum-naming';
-
-describe('enumNamingRule', () => {
- it(`should not fail PascalCase`, () => {
- const src = `enum test { MemberOne, MemberTwo }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 0);
- });
- it(`should not fail PascalCase keys with uncased values`, () => {
- const src = `enum test { MemberOne = 'member_one', MemberTwo = 'member two' }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 0);
- });
- it(`should not fail PascalCase keys with numbers`, () => {
- const src = `enum test { Member1 = 'member_one', MemberTwo = 'member two' }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 0);
- });
- it(`should fail with camelCase`, () => {
- const src = `enum test { memberOne, memberTwo }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 2);
- });
- it(`should fail with snake case`, () => {
- const src = `enum test { member_one, member_two }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 2);
- });
- it(`should fail with all caps`, () => {
- const src = `enum test { MEMBERONE, MEMBER_TWO }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 2);
- });
- it(`should fail with mixed case`, () => {
- const src = `enum test { member_one, MemberTwo }`;
- const result = helper(src, rule);
- assert.equal(result.errorCount, 1);
- });
-
- it(`should fail with the right position`, () => {
- const src = `enum test { MemberOne, member_two }`;
- const startPosition = src.indexOf('member_two');
- const endPosition = startPosition + 'member_two'.length;
- const failure = helper(src, rule).failures[0];
-
- assert.equal(failure.getStartPosition().getPosition(), startPosition);
- assert.equal(failure.getEndPosition().getPosition(), endPosition);
- assert.equal(failure.getFailure(), Rule.FAILURE_STRING);
- });
-
- it(`should fail with the right message`, () => {
- const src = `enum test { memberOne, memberTwo }`;
- const failure = helper(src, rule).failures[0];
-
- assert.equal(failure.getFailure(), Rule.FAILURE_STRING);
- });
-});
-describe('enumNaming fixer', () => {
- it('should fix keys', () => {
- const src = `enum test { MemberOne, memberTwo, member_three, MEMBER_FOUR, MEMBERFIVE }`;
- const expected = `enum test { MemberOne, MemberTwo, MemberThree, MemberFour, Memberfive }`;
- const actual = getFixedResult(src, rule);
- const result = helper(src, rule);
- assert.equal(result.errorCount, 4); // tslint:disable-line:custom-no-magic-numbers
- assert.equal(actual, expected);
- });
- it('should not fix values', () => {
- const src = `enum test { MemberOne = 'MemberOne', memberTwo = 'memberTwo', member_three = 'member_three', MEMBER_FOUR = 'MEMBER_FOUR' }`;
- const expected = `enum test { MemberOne = 'MemberOne', MemberTwo = 'memberTwo', MemberThree = 'member_three', MemberFour = 'MEMBER_FOUR' }`;
- const actual = getFixedResult(src, rule);
- const result = helper(src, rule);
- assert.equal(result.errorCount, 3); // tslint:disable-line:custom-no-magic-numbers
- assert.equal(actual, expected);
- });
- it('should preserve values with equals sign', () => {
- const src = `enum Operators { assign = '=', EQUALS = '==', Triple_Equals = '===' }`;
- const expected = `enum Operators { Assign = '=', Equals = '==', TripleEquals = '===' }`;
- const actual = getFixedResult(src, rule);
- const result = helper(src, rule);
- assert.equal(result.errorCount, 3); // tslint:disable-line:custom-no-magic-numbers
- assert.equal(actual, expected);
- });
-});
diff --git a/packages/tslint-config/test/lintrunner.ts b/packages/tslint-config/test/lintrunner.ts
deleted file mode 100644
index fcd1b6844..000000000
--- a/packages/tslint-config/test/lintrunner.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import * as path from 'path';
-import { Configuration, Linter, Replacement } from 'tslint';
-
-export const helper = (src: string, rule: string) => {
- const linter = new Linter({ fix: false });
- linter.lint(
- '',
- src,
- Configuration.parseConfigFile({
- rules: {
- [rule]: true,
- },
- rulesDirectory: path.join(__dirname, '../rules'),
- }),
- );
- return linter.getResult();
-};
-
-export const getFixedResult = (src: string, rule: string) => {
- const result = helper(src, rule);
- const fixes = [].concat.apply(result.failures.map(x => x.getFix()));
- return Replacement.applyFixes(src, fixes);
-};
diff --git a/packages/tslint-config/tsconfig.json b/packages/tslint-config/tsconfig.json
deleted file mode 100644
index b9a4dd03e..000000000
--- a/packages/tslint-config/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["./rules/**/*", "test/**/*"]
-}
diff --git a/packages/tslint-config/tslint.json b/packages/tslint-config/tslint.json
deleted file mode 100644
index a5fa6962c..000000000
--- a/packages/tslint-config/tslint.json
+++ /dev/null
@@ -1,130 +0,0 @@
-{
- "extends": ["tslint:latest", "tslint-react", "tslint-eslint-rules"],
- "rules": {
- "adjacent-overload-signatures": true,
- "arrow-parens": [true, "ban-single-arg-parens"],
- "arrow-return-shorthand": true,
- "async-suffix": true,
- "await-promise": true,
- "binary-expression-operand-order": true,
- "boolean-naming": true,
- "callable-types": true,
- "class-name": true,
- "completed-docs": [
- true,
- {
- "functions": {
- "visibilities": ["exported"]
- },
- "methods": {
- "locations": "instance",
- "privacies": ["public", "protected"]
- }
- }
- ],
- "curly": true,
- "custom-no-magic-numbers": [true, 0, 1, 2, 3, -1],
- "encoding": true,
- "enum-naming": true,
- "eofline": true,
- "import-spacing": true,
- "indent": [true, "spaces", 4],
- "interface-name": false,
- "interface-over-type-literal": true,
- "jsx-alignment": true,
- "jsx-boolean-value": true,
- "jsx-curly-spacing": [true, "never"],
- "jsx-no-bind": false,
- "jsx-no-lambda": true,
- "jsx-no-multiline-js": false,
- "jsx-no-string-ref": true,
- "jsx-self-close": true,
- "jsx-wrap-multiline": false,
- "linebreak-style": [true, "LF"],
- "max-classes-per-file": [true, 1],
- "max-file-line-count": [true, 500],
- "max-line-length": false,
- "member-access": true,
- "member-ordering": [true, "public-before-private", "static-before-instance", "variables-before-functions"],
- "new-parens": true,
- "newline-before-return": false,
- "no-angle-bracket-type-assertion": true,
- "no-boolean-literal-compare": true,
- "no-debugger": true,
- "no-default-export": true,
- "no-duplicate-super": true,
- "no-duplicate-switch-case": true,
- "no-duplicate-variable": true,
- "no-empty-interface": false,
- "no-eval": true,
- "no-floating-promises": true,
- "no-implicit-dependencies": [true, "dev"],
- "no-inferred-empty-object-type": true,
- "no-invalid-template-strings": true,
- "no-invalid-this": true,
- "no-misused-new": true,
- "no-non-null-assertion": true,
- "no-parameter-reassignment": true,
- "no-redundant-jsdoc": true,
- "no-return-await": true,
- "no-shadowed-variable": true,
- "no-sparse-arrays": true,
- "no-string-literal": true,
- "no-string-throw": true,
- "no-submodule-imports": false,
- "no-switch-case-fall-through": true,
- "no-this-assignment": false,
- "no-unbound-method": true,
- "no-unnecessary-class": true,
- "no-unnecessary-type-assertion": true,
- "no-unused-variable": true,
- "no-unsafe-finally": true,
- "number-literal-format": true,
- "object-literal-key-quotes": false,
- "object-literal-sort-keys": false,
- "ordered-imports": [
- true,
- {
- "grouped-imports": true
- }
- ],
- "prefer-const": true,
- "prefer-for-of": true,
- "prefer-function-over-method": true,
- "prefer-object-spread": true,
- "prefer-readonly": true,
- "prefer-template": true,
- "promise-function-async": true,
- "quotemark": [true, "single", "avoid-escape", "jsx-double"],
- "restrict-plus-operands": true,
- "semicolon": [true, "always"],
- "space-before-function-paren": [
- true,
- {
- "anonymous": "never",
- "asyncArrow": "always",
- "constructor": "never",
- "method": "never",
- "named": "never"
- }
- ],
- "space-within-parens": false,
- "switch-default": true,
- "type-literal-delimiter": true,
- "typedef": [true, "call-signature", "parameter", "property-declaration"],
- "underscore-private-and-protected": true,
- "variable-name": [true, "ban-keywords", "allow-pascal-case"],
- "whitespace": [
- true,
- "check-branch",
- "check-decl",
- "check-operator",
- "check-separator",
- "check-rest-spread",
- "check-type",
- "check-typecast",
- "check-preblock"
- ]
- },
- "rulesDirectory": "lib/rules"
-}
diff --git a/packages/types/.npmignore b/packages/types/.npmignore
deleted file mode 100644
index 24e65ad5b..000000000
--- a/packages/types/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json
deleted file mode 100644
index 7a6d205ee..000000000
--- a/packages/types/CHANGELOG.json
+++ /dev/null
@@ -1,420 +0,0 @@
-[
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "1.5.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "1.5.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.5.0",
- "changes": [
- {
- "note": "Added types for Dutch Auction contract",
- "pr": 1465
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "1.4.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "1.4.0",
- "changes": [
- {
- "note": "Add `LengthMismatch` and `LengthGreaterThan3Required` revert reasons",
- "pr": 1224
- },
- {
- "note": "Add RevertReasons for DutchAuction contract",
- "pr": 1225
- },
- {
- "note": "Add MultiAsset types",
- "pr": 1363
- }
- ],
- "timestamp": 1544570656
- },
- {
- "version": "1.3.0",
- "changes": [
- {
- "note": "Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package",
- "pr": 1298
- }
- ],
- "timestamp": 1542821676
- },
- {
- "version": "1.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "1.2.0",
- "changes": [
- {
- "note": "Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing",
- "pr": 1102
- },
- {
- "note": "Added `ZeroExTransaction` type for Exchange executeTransaction",
- "pr": 1102
- },
- {
- "note": "Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`)",
- "pr": 1131
- }
- ],
- "timestamp": 1539871071
- },
- {
- "timestamp": 1538693146,
- "version": "1.1.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "1.1.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538157789,
- "version": "1.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "1.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Add ObjectMap type",
- "pr": 1037
- },
- {
- "note": "Add SRA types from connect",
- "pr": 1085
- }
- ],
- "timestamp": 1537875740
- },
- {
- "timestamp": 1537541580,
- "version": "1.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.0.1",
- "changes": [
- {
- "note": "Add AssetProxyOwner revert reasons",
- "pr": 1041
- },
- {
- "note": "Add MultiSigWalletWithTimeLock revert reasons",
- "pr": 1050
- }
- ],
- "timestamp": 1536142250
- },
- {
- "version": "1.0.1-rc.6",
- "changes": [
- {
- "note": "Add WalletError and ValidatorError revert reasons",
- "pr": 1012
- },
- {
- "note": "Remove Caller and Trezor SignatureTypes",
- "pr": 1015
- }
- ],
- "timestamp": 1535377027
- },
- {
- "version": "1.0.1-rc.5",
- "changes": [
- {
- "note": "Add revert reasons for ERC721Token",
- "pr": 933
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.0.1-rc.4",
- "changes": [
- {
- "pr": 914,
- "note": "Added SignerType to handle different signing prefix scenarios"
- }
- ],
- "timestamp": 1534210131
- },
- {
- "version": "1.0.1-rc.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532619515
- },
- {
- "version": "1.0.1-rc.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1532614997
- },
- {
- "version": "1.0.1-rc.1",
- "changes": [
- {
- "note": "Remove `ECSignatureBuffer`"
- }
- ],
- "timestamp": 1532605697
- },
- {
- "timestamp": 1532357734,
- "version": "1.0.0",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532043000,
- "version": "1.0.0-rc.1",
- "changes": [
- {
- "note": "Updated types for V2 of 0x protocol"
- },
- {
- "note": "Add `ECSignatureBuffer`"
- },
- {
- "note": "Add Forwarder contract revert reasons"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.8.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.8.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1527009133,
- "version": "0.8.0",
- "changes": [
- {
- "note": "Change the order type to v2 format",
- "pr": 618
- }
- ]
- },
- {
- "version": "0.7.0",
- "changes": [
- {
- "note": "Make OpCode type an enum",
- "pr": 589
- },
- {
- "note": "Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js",
- "pr": 579
- }
- ],
- "timestamp": 1527009133
- },
- {
- "timestamp": 1525477860,
- "version": "0.6.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.6.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.6.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.6.0",
- "changes": [
- {
- "note": "Add Provider type",
- "pr": 501
- }
- ],
- "timestamp": 1523462196
- },
- {
- "version": "0.5.0",
- "changes": [
- {
- "note": "Make `DataItem.components` optional",
- "pr": 485
- }
- ],
- "timestamp": 1522673609
- },
- {
- "timestamp": 1522658513,
- "version": "0.4.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.0",
- "changes": [
- {
- "note": "Remove `JSONRPCPayload`",
- "pr": 426
- },
- {
- "note": "Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package",
- "pr": 456
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.3.1",
- "changes": [
- {
- "note": "Added `RawLogEntry` type."
- }
- ],
- "timestamp": 1520434800
- },
- {
- "version": "0.3.0",
- "changes": [
- {
- "note": "Add `data` to `TxData`",
- "pr": 413
- },
- {
- "note": "Add `number` as an option to `ContractEventArg`",
- "pr": 413
- },
- {
- "note": "Move web3 types from devDep to dep since required when using this package",
- "pr": 429
- }
- ],
- "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 BlockLiteralParam and BlockParam, refactored out of 0x.js types.",
- "pr": 355
- }
- ],
- "timestamp": 1517929200
- }
-]
diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md
deleted file mode 100644
index ac27d9096..000000000
--- a/packages/types/CHANGELOG.md
+++ /dev/null
@@ -1,171 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v1.5.2 - _January 15, 2019_
-
- * Dependencies updated
-
-## v1.5.1 - _January 11, 2019_
-
- * Dependencies updated
-
-## v1.5.0 - _January 9, 2019_
-
- * Added types for Dutch Auction contract (#1465)
-
-## v1.4.1 - _December 13, 2018_
-
- * Dependencies updated
-
-## v1.4.0 - _December 11, 2018_
-
- * Add `LengthMismatch` and `LengthGreaterThan3Required` revert reasons (#1224)
- * Add RevertReasons for DutchAuction contract (#1225)
- * Add MultiAsset types (#1363)
-
-## v1.3.0 - _November 21, 2018_
-
- * Add the `SimpleContractArtifact` type, which describes the artifact format published in the `@0x/contract-artifacts` package (#1298)
-
-## v1.2.1 - _November 9, 2018_
-
- * Dependencies updated
-
-## v1.2.0 - _October 18, 2018_
-
- * Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing (#1102)
- * Added `ZeroExTransaction` type for Exchange executeTransaction (#1102)
- * Add `AssetData` union type (`type AssetData = ERC20AssetData | ERC721AssetData`) (#1131)
-
-## v1.1.4 - _October 4, 2018_
-
- * Dependencies updated
-
-## v1.1.3 - _October 2, 2018_
-
- * Dependencies updated
-
-## v1.1.2 - _September 28, 2018_
-
- * Dependencies updated
-
-## v1.1.1 - _September 25, 2018_
-
- * Dependencies updated
-
-## v1.1.0 - _September 25, 2018_
-
- * Add ObjectMap type (#1037)
- * Add SRA types from connect (#1085)
-
-## v1.0.2 - _September 21, 2018_
-
- * Dependencies updated
-
-## v1.0.1 - _September 5, 2018_
-
- * Add AssetProxyOwner revert reasons (#1041)
- * Add MultiSigWalletWithTimeLock revert reasons (#1050)
-
-## v1.0.1-rc.6 - _August 27, 2018_
-
- * Add WalletError and ValidatorError revert reasons (#1012)
- * Remove Caller and Trezor SignatureTypes (#1015)
-
-## v1.0.1-rc.5 - _August 24, 2018_
-
- * Add revert reasons for ERC721Token (#933)
-
-## v1.0.1-rc.4 - _August 14, 2018_
-
- * Added SignerType to handle different signing prefix scenarios (#914)
-
-## v1.0.1-rc.3 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.2 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.0.1-rc.1 - _July 26, 2018_
-
- * Remove `ECSignatureBuffer`
-
-## v1.0.0 - _July 23, 2018_
-
- * Dependencies updated
-
-## v1.0.0-rc.1 - _July 19, 2018_
-
- * Updated types for V2 of 0x protocol
- * Add `ECSignatureBuffer`
- * Add Forwarder contract revert reasons
-
-## v0.8.2 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.8.1 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.8.0 - _May 22, 2018_
-
- * Change the order type to v2 format (#618)
-
-## v0.7.0 - _May 22, 2018_
-
- * Make OpCode type an enum (#589)
- * Moved ExchangeContractErrs, DoneCallback, Token, OrderRelevantState, OrderStateValid, OrderStateInvalid, OrderState, OrderAddresses and OrderValues types from 0x.js (#579)
-
-## v0.6.3 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.6.2 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.6.1 - _April 18, 2018_
-
- * Dependencies updated
-
-## v0.6.0 - _April 11, 2018_
-
- * Add Provider type (#501)
-
-## v0.5.0 - _April 2, 2018_
-
- * Make `DataItem.components` optional (#485)
-
-## v0.4.2 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.4.0 - _March 17, 2018_
-
- * Remove `JSONRPCPayload` (#426)
- * Consolidate `Order`, `SignedOrder`, and `ECSignature` into the `@0xproject/types` package (#456)
-
-## v0.3.1 - _March 7, 2018_
-
- * Added `RawLogEntry` type.
-
-## v0.3.0 - _March 3, 2018_
-
- * Add `data` to `TxData` (#413)
- * Add `number` as an option to `ContractEventArg` (#413)
- * Move web3 types from devDep to dep since required when using this package (#429)
-
-## 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 BlockLiteralParam and BlockParam, refactored out of 0x.js types. (#355)
diff --git a/packages/types/README.md b/packages/types/README.md
deleted file mode 100644
index 136eb1940..000000000
--- a/packages/types/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-## @0x/types
-
-Typescript types shared across 0x projects and packages
-
-## Installation
-
-```bash
-yarn add -D @0x/types
-```
-
-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 { TransactionReceipt, TxData, TxDataPayable } from '@0x/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/types yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/types yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/types/package.json b/packages/types/package.json
deleted file mode 100644
index 440f05423..000000000
--- a/packages/types/package.json
+++ /dev/null
@@ -1,40 +0,0 @@
-{
- "name": "@0x/types",
- "version": "1.5.2",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x types",
- "main": "lib/index.js",
- "types": "lib/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib",
- "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/types/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "make-promises-safe": "^1.1.0",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@types/node": "*",
- "bignumber.js": "~8.0.2",
- "ethereum-types": "^1.1.6"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/types/src/globals.d.ts b/packages/types/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/types/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/types/src/index.ts b/packages/types/src/index.ts
deleted file mode 100644
index 49f788fb0..000000000
--- a/packages/types/src/index.ts
+++ /dev/null
@@ -1,687 +0,0 @@
-// tslint:disable:max-file-line-count
-
-import { BigNumber } from 'bignumber.js';
-import { ContractAbi, ContractNetworks, DevdocOutput } from 'ethereum-types';
-
-// HACK: Rather then extending from OrderWithoutExchangeAddress
-// we don't, because our docs don't expand inherited types, and it's unnecessarily
-// confusing to introduce the user to the OrderWithoutExchangeAddress type.
-export interface Order {
- senderAddress: string;
- makerAddress: string;
- takerAddress: string;
- makerFee: BigNumber;
- takerFee: BigNumber;
- makerAssetAmount: BigNumber;
- takerAssetAmount: BigNumber;
- makerAssetData: string;
- takerAssetData: string;
- salt: BigNumber;
- exchangeAddress: string;
- feeRecipientAddress: string;
- expirationTimeSeconds: BigNumber;
-}
-
-export interface OrderWithoutExchangeAddress {
- senderAddress: string;
- makerAddress: string;
- takerAddress: string;
- makerFee: BigNumber;
- takerFee: BigNumber;
- makerAssetAmount: BigNumber;
- takerAssetAmount: BigNumber;
- makerAssetData: string;
- takerAssetData: string;
- salt: BigNumber;
- feeRecipientAddress: string;
- expirationTimeSeconds: BigNumber;
-}
-
-export interface SignedOrder extends Order {
- signature: string;
-}
-
-/**
- * ZeroExTransaction for use with 0x Exchange executeTransaction
- */
-export interface ZeroExTransaction {
- salt: BigNumber;
- signerAddress: string;
- data: string;
-}
-
-/**
- * Elliptic Curve signature
- */
-export interface ECSignature {
- v: number;
- r: string;
- s: string;
-}
-
-/**
- * Validator signature components
- */
-export interface ValidatorSignature {
- validatorAddress: string;
- signature: string;
-}
-
-/**
- * Errors originating from the 0x exchange contract
- */
-export enum ExchangeContractErrs {
- OrderFillExpired = 'ORDER_FILL_EXPIRED',
- OrderCancelExpired = 'ORDER_CANCEL_EXPIRED',
- OrderCancelled = 'ORDER_CANCELLED',
- OrderFillAmountZero = 'ORDER_FILL_AMOUNT_ZERO',
- OrderRemainingFillAmountZero = 'ORDER_REMAINING_FILL_AMOUNT_ZERO',
- OrderFillRoundingError = 'ORDER_FILL_ROUNDING_ERROR',
- FillBalanceAllowanceError = 'FILL_BALANCE_ALLOWANCE_ERROR',
- InsufficientTakerBalance = 'INSUFFICIENT_TAKER_BALANCE',
- InsufficientTakerAllowance = 'INSUFFICIENT_TAKER_ALLOWANCE',
- InsufficientMakerBalance = 'INSUFFICIENT_MAKER_BALANCE',
- InsufficientMakerAllowance = 'INSUFFICIENT_MAKER_ALLOWANCE',
- InsufficientTakerFeeBalance = 'INSUFFICIENT_TAKER_FEE_BALANCE',
- InsufficientTakerFeeAllowance = 'INSUFFICIENT_TAKER_FEE_ALLOWANCE',
- InsufficientMakerFeeBalance = 'INSUFFICIENT_MAKER_FEE_BALANCE',
- InsufficientMakerFeeAllowance = 'INSUFFICIENT_MAKER_FEE_ALLOWANCE',
- TransactionSenderIsNotFillOrderTaker = 'TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER',
- MultipleMakersInSingleCancelBatchDisallowed = 'MULTIPLE_MAKERS_IN_SINGLE_CANCEL_BATCH_DISALLOWED',
- InsufficientRemainingFillAmount = 'INSUFFICIENT_REMAINING_FILL_AMOUNT',
- MultipleTakerTokensInFillUpToDisallowed = 'MULTIPLE_TAKER_TOKENS_IN_FILL_UP_TO_DISALLOWED',
- BatchOrdersMustHaveSameExchangeAddress = 'BATCH_ORDERS_MUST_HAVE_SAME_EXCHANGE_ADDRESS',
- BatchOrdersMustHaveAtLeastOneItem = 'BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM',
-}
-
-export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken';
-
-export interface Artifact {
- contract_name: ArtifactContractName;
- abi: ContractAbi;
- networks: {
- [networkId: number]: {
- address: string;
- };
- };
-}
-
-export type DoneCallback = (err?: Error) => void;
-
-export interface OrderRelevantState {
- makerBalance: BigNumber;
- makerIndividualBalances: ObjectMap<BigNumber>;
- makerProxyAllowance: BigNumber;
- makerIndividualProxyAllowances: ObjectMap<BigNumber>;
- makerFeeBalance: BigNumber;
- makerFeeProxyAllowance: BigNumber;
- filledTakerAssetAmount: BigNumber;
- remainingFillableMakerAssetAmount: BigNumber;
- remainingFillableTakerAssetAmount: BigNumber;
-}
-
-export interface OrderStateValid {
- isValid: true;
- orderHash: string;
- orderRelevantState: OrderRelevantState;
- transactionHash?: string;
-}
-
-export interface OrderStateInvalid {
- isValid: false;
- orderHash: string;
- error: ExchangeContractErrs;
- transactionHash?: string;
-}
-
-export type OrderState = OrderStateValid | OrderStateInvalid;
-
-export interface Token {
- name: string;
- address: string;
- symbol: string;
- decimals: number;
-}
-
-export enum SignatureType {
- Illegal,
- Invalid,
- EIP712,
- EthSign,
- Wallet,
- Validator,
- PreSigned,
- NSignatureTypes,
-}
-
-export enum AssetProxyId {
- ERC20 = '0xf47261b0',
- ERC721 = '0x02571792',
- MultiAsset = '0x94cfcdd7',
-}
-
-export interface ERC20AssetData {
- assetProxyId: string;
- tokenAddress: string;
-}
-
-export interface ERC721AssetData {
- assetProxyId: string;
- tokenAddress: string;
- tokenId: BigNumber;
-}
-
-export type SingleAssetData = ERC20AssetData | ERC721AssetData;
-
-export interface MultiAssetData {
- assetProxyId: string;
- amounts: BigNumber[];
- nestedAssetData: string[];
-}
-
-export interface MultiAssetDataWithRecursiveDecoding {
- assetProxyId: string;
- amounts: BigNumber[];
- nestedAssetData: SingleAssetData[];
-}
-
-export type AssetData = SingleAssetData | MultiAssetData | MultiAssetDataWithRecursiveDecoding;
-
-// TODO: DRY. These should be extracted from contract code.
-export enum RevertReason {
- OrderUnfillable = 'ORDER_UNFILLABLE',
- InvalidMaker = 'INVALID_MAKER',
- InvalidTaker = 'INVALID_TAKER',
- InvalidSender = 'INVALID_SENDER',
- InvalidOrderSignature = 'INVALID_ORDER_SIGNATURE',
- InvalidTakerAmount = 'INVALID_TAKER_AMOUNT',
- DivisionByZero = 'DIVISION_BY_ZERO',
- RoundingError = 'ROUNDING_ERROR',
- InvalidSignature = 'INVALID_SIGNATURE',
- SignatureIllegal = 'SIGNATURE_ILLEGAL',
- SignatureUnsupported = 'SIGNATURE_UNSUPPORTED',
- TakerOverpay = 'TAKER_OVERPAY',
- OrderOverfill = 'ORDER_OVERFILL',
- InvalidFillPrice = 'INVALID_FILL_PRICE',
- InvalidNewOrderEpoch = 'INVALID_NEW_ORDER_EPOCH',
- CompleteFillFailed = 'COMPLETE_FILL_FAILED',
- NegativeSpreadRequired = 'NEGATIVE_SPREAD_REQUIRED',
- ReentrancyIllegal = 'REENTRANCY_ILLEGAL',
- InvalidTxHash = 'INVALID_TX_HASH',
- InvalidTxSignature = 'INVALID_TX_SIGNATURE',
- FailedExecution = 'FAILED_EXECUTION',
- AssetProxyAlreadyExists = 'ASSET_PROXY_ALREADY_EXISTS',
- LengthGreaterThan0Required = 'LENGTH_GREATER_THAN_0_REQUIRED',
- LengthGreaterThan3Required = 'LENGTH_GREATER_THAN_3_REQUIRED',
- LengthGreaterThan131Required = 'LENGTH_GREATER_THAN_131_REQUIRED',
- Length0Required = 'LENGTH_0_REQUIRED',
- Length65Required = 'LENGTH_65_REQUIRED',
- InvalidAmount = 'INVALID_AMOUNT',
- TransferFailed = 'TRANSFER_FAILED',
- SenderNotAuthorized = 'SENDER_NOT_AUTHORIZED',
- TargetNotAuthorized = 'TARGET_NOT_AUTHORIZED',
- TargetAlreadyAuthorized = 'TARGET_ALREADY_AUTHORIZED',
- IndexOutOfBounds = 'INDEX_OUT_OF_BOUNDS',
- AuthorizedAddressMismatch = 'AUTHORIZED_ADDRESS_MISMATCH',
- OnlyContractOwner = 'ONLY_CONTRACT_OWNER',
- MakerNotWhitelisted = 'MAKER_NOT_WHITELISTED',
- TakerNotWhitelisted = 'TAKER_NOT_WHITELISTED',
- AssetProxyDoesNotExist = 'ASSET_PROXY_DOES_NOT_EXIST',
- LengthMismatch = 'LENGTH_MISMATCH',
- LibBytesGreaterThanZeroLengthRequired = 'GREATER_THAN_ZERO_LENGTH_REQUIRED',
- LibBytesGreaterOrEqualTo4LengthRequired = 'GREATER_OR_EQUAL_TO_4_LENGTH_REQUIRED',
- LibBytesGreaterOrEqualTo20LengthRequired = 'GREATER_OR_EQUAL_TO_20_LENGTH_REQUIRED',
- LibBytesGreaterOrEqualTo32LengthRequired = 'GREATER_OR_EQUAL_TO_32_LENGTH_REQUIRED',
- LibBytesGreaterOrEqualToNestedBytesLengthRequired = 'GREATER_OR_EQUAL_TO_NESTED_BYTES_LENGTH_REQUIRED',
- LibBytesGreaterOrEqualToSourceBytesLengthRequired = 'GREATER_OR_EQUAL_TO_SOURCE_BYTES_LENGTH_REQUIRED',
- Erc20InsufficientBalance = 'ERC20_INSUFFICIENT_BALANCE',
- Erc20InsufficientAllowance = 'ERC20_INSUFFICIENT_ALLOWANCE',
- FeePercentageTooLarge = 'FEE_PERCENTAGE_TOO_LARGE',
- ValueGreaterThanZero = 'VALUE_GREATER_THAN_ZERO',
- InvalidMsgValue = 'INVALID_MSG_VALUE',
- InsufficientEthRemaining = 'INSUFFICIENT_ETH_REMAINING',
- Uint256Overflow = 'UINT256_OVERFLOW',
- Erc721ZeroToAddress = 'ERC721_ZERO_TO_ADDRESS',
- Erc721OwnerMismatch = 'ERC721_OWNER_MISMATCH',
- Erc721InvalidSpender = 'ERC721_INVALID_SPENDER',
- Erc721ZeroOwner = 'ERC721_ZERO_OWNER',
- Erc721InvalidSelector = 'ERC721_INVALID_SELECTOR',
- WalletError = 'WALLET_ERROR',
- ValidatorError = 'VALIDATOR_ERROR',
- InvalidFunctionSelector = 'INVALID_FUNCTION_SELECTOR',
- InvalidAssetProxy = 'INVALID_ASSET_PROXY',
- UnregisteredAssetProxy = 'UNREGISTERED_ASSET_PROXY',
- TxFullyConfirmed = 'TX_FULLY_CONFIRMED',
- TxNotFullyConfirmed = 'TX_NOT_FULLY_CONFIRMED',
- TimeLockIncomplete = 'TIME_LOCK_INCOMPLETE',
- // DutchAuction
- AuctionInvalidAmount = 'INVALID_AMOUNT',
- AuctionExpired = 'AUCTION_EXPIRED',
- AuctionNotStarted = 'AUCTION_NOT_STARTED',
- AuctionInvalidBeginTime = 'INVALID_BEGIN_TIME',
- InvalidAssetData = 'INVALID_ASSET_DATA',
- // Balance Threshold Filter
- InvalidOrBlockedExchangeSelector = 'INVALID_OR_BLOCKED_EXCHANGE_SELECTOR',
- BalanceQueryFailed = 'BALANCE_QUERY_FAILED',
- AtLeastOneAddressDoesNotMeetBalanceThreshold = 'AT_LEAST_ONE_ADDRESS_DOES_NOT_MEET_BALANCE_THRESHOLD',
-}
-
-export enum StatusCodes {
- Success = 200,
- NotFound = 404,
- InternalError = 500,
- MethodNotAllowed = 405,
- GatewayTimeout = 504,
-}
-
-export interface ObjectMap<T> {
- [key: string]: T;
-}
-
-/**
- * baseAssetData: The address of assetData designated as the baseToken in the currency pair calculation of price
- * quoteAssetData: The address of assetData designated as the quoteToken in the currency pair calculation of price
- * limit: Maximum number of bids and asks in orderbook snapshot
- */
-export interface OrdersChannelSubscriptionOpts {
- baseAssetData: string;
- quoteAssetData: string;
- limit: number;
-}
-
-export type OrdersChannelMessage = UpdateOrdersChannelMessage | UnknownOrdersChannelMessage;
-
-export enum OrdersChannelMessageTypes {
- Update = 'update',
- Unknown = 'unknown',
-}
-
-export interface UpdateOrdersChannelMessage {
- type: OrdersChannelMessageTypes.Update;
- requestId: string;
- payload: APIOrder[];
-}
-
-export interface UnknownOrdersChannelMessage {
- type: OrdersChannelMessageTypes.Unknown;
- requestId: string;
- payload: undefined;
-}
-
-export enum WebsocketConnectionEventType {
- Close = 'close',
- Error = 'error',
- Message = 'message',
-}
-
-export enum WebsocketClientEventType {
- Connect = 'connect',
- ConnectFailed = 'connectFailed',
-}
-
-export type OrdersResponse = PaginatedCollection<APIOrder>;
-
-export interface APIOrder {
- order: SignedOrder;
- metaData: object;
-}
-
-export interface AssetPairsRequestOpts {
- assetDataA?: string;
- assetDataB?: string;
-}
-
-export type AssetPairsResponse = PaginatedCollection<AssetPairsItem>;
-
-export interface AssetPairsItem {
- assetDataA: Asset;
- assetDataB: Asset;
-}
-
-export interface Asset {
- assetData: string;
- minAmount: BigNumber;
- maxAmount: BigNumber;
- precision: number;
-}
-
-export interface OrdersRequestOpts {
- makerAssetProxyId?: string;
- takerAssetProxyId?: string;
- makerAssetAddress?: string;
- takerAssetAddress?: string;
- exchangeAddress?: string;
- senderAddress?: string;
- makerAssetData?: string;
- takerAssetData?: string;
- makerAddress?: string;
- takerAddress?: string;
- traderAddress?: string;
- feeRecipientAddress?: string;
-}
-
-export interface OrderbookRequest {
- baseAssetData: string;
- quoteAssetData: string;
-}
-
-export interface OrderbookResponse {
- bids: PaginatedCollection<APIOrder>;
- asks: PaginatedCollection<APIOrder>;
-}
-
-export interface PaginatedCollection<T> {
- total: number;
- page: number;
- perPage: number;
- records: T[];
-}
-
-export interface OrderConfigRequest {
- makerAddress: string;
- takerAddress: string;
- makerAssetAmount: BigNumber;
- takerAssetAmount: BigNumber;
- makerAssetData: string;
- takerAssetData: string;
- exchangeAddress: string;
- expirationTimeSeconds: BigNumber;
-}
-
-export interface OrderConfigResponse {
- makerFee: BigNumber;
- takerFee: BigNumber;
- feeRecipientAddress: string;
- senderAddress: string;
-}
-
-export type FeeRecipientsResponse = PaginatedCollection<string>;
-
-export interface RequestOpts {
- networkId?: number;
-}
-
-export interface PagedRequestOpts {
- page?: number;
- perPage?: number;
-}
-
-export interface TypeDocType {
- type: TypeDocTypes;
- value: string;
- name: string;
- types: TypeDocType[];
- typeArguments?: TypeDocType[];
- declaration: TypeDocNode;
- elementType?: TypeDocType;
- indexSignature?: TypeDocNode;
- elements?: TupleElement[];
-}
-
-export interface TupleElement {
- type: string;
- name: string;
-}
-
-export interface TypeDocNode {
- id?: number;
- name?: string;
- kind?: string;
- defaultValue?: string;
- kindString?: string;
- type?: TypeDocType;
- fileName?: string;
- line?: number;
- comment?: TypeDocNode;
- text?: string;
- shortText?: string;
- returns?: string;
- declaration: TypeDocNode;
- flags?: TypeDocFlags;
- indexSignature?: TypeDocNode;
- signatures?: TypeDocNode[];
- parameters?: TypeDocNode[];
- typeParameter?: TypeDocNode[];
- sources?: TypeDocNode[];
- children?: TypeDocNode[];
- groups?: TypeDocGroup[];
-}
-
-export interface TypeDocFlags {
- isStatic?: boolean;
- isOptional?: boolean;
- isPublic?: boolean;
- isExported?: boolean;
-}
-
-export interface TypeDocGroup {
- title: string;
- children: number[];
-}
-
-export enum TypeDocTypes {
- Intrinsic = 'intrinsic',
- Reference = 'reference',
- Array = 'array',
- StringLiteral = 'stringLiteral',
- Reflection = 'reflection',
- Union = 'union',
- TypeParameter = 'typeParameter',
- Intersection = 'intersection',
- Tuple = 'tuple',
- Unknown = 'unknown',
-}
-
-export interface CustomTypeChild {
- name: string;
- type?: Type;
- defaultValue?: string;
-}
-
-export interface Event {
- name: string;
- eventArgs: EventArg[];
-}
-
-export interface EventArg {
- isIndexed: boolean;
- name: string;
- type: Type;
-}
-
-export interface Property {
- name: string;
- type: Type;
- source?: Source;
- comment?: string;
- callPath?: string;
-}
-
-export interface BaseMethod {
- isConstructor: boolean;
- name: string;
- returnComment?: string | undefined;
- callPath: string;
- parameters: Parameter[];
- returnType: Type;
- comment?: string;
-}
-
-export interface BaseFunction {
- name: string;
- returnComment?: string | undefined;
- parameters: Parameter[];
- returnType: Type;
- comment?: string;
-}
-
-export interface TypeDefinitionByName {
- [typeName: string]: CustomType;
-}
-
-export interface DocAgnosticFormat {
- [sectionName: string]: DocSection;
-}
-
-export interface DocSection {
- comment: string;
- constructors: Array<TypescriptMethod | SolidityMethod>;
- methods: Array<TypescriptMethod | SolidityMethod>;
- properties: Property[];
- types: CustomType[];
- functions: TypescriptFunction[];
- events?: Event[];
- externalExportToLink?: ExternalExportToLink;
-}
-
-export interface TypescriptMethod extends BaseMethod {
- source?: Source;
- isStatic?: boolean;
- typeParameter?: TypeParameter;
-}
-
-export interface TypescriptFunction extends BaseFunction {
- source?: Source;
- typeParameter?: TypeParameter;
- callPath: string;
-}
-
-export interface SolidityMethod extends BaseMethod {
- isConstant?: boolean;
- isPayable?: boolean;
- isFallback?: boolean;
-}
-
-export interface Source {
- fileName: string;
- line: number;
-}
-
-export interface Parameter {
- name: string;
- comment: string;
- isOptional: boolean;
- type: Type;
- defaultValue?: string;
-}
-
-export interface TypeParameter {
- name: string;
- type: Type;
-}
-
-export interface Type {
- name: string;
- typeDocType: TypeDocTypes;
- value?: string;
- isExportedClassReference?: boolean;
- typeArguments?: Type[];
- elementType?: ElementType;
- types?: Type[];
- method?: TypescriptMethod;
- indexSignature?: IndexSignature;
- externalLink?: string;
- tupleElements?: Type[];
-}
-
-export interface ElementType {
- name: string;
- typeDocType: TypeDocTypes;
-}
-
-export interface IndexSignature {
- keyName: string;
- keyType: Type;
- valueName: string;
-}
-
-export interface CustomType {
- name: string;
- kindString: string;
- type?: Type;
- method?: TypescriptMethod;
- indexSignature?: IndexSignature;
- defaultValue?: string;
- comment?: string;
- children?: CustomTypeChild[];
-}
-export interface GeneratedDocJson {
- version: string;
- metadata: Metadata;
- typedocJson: TypeDocNode;
-}
-
-export interface ExportNameToTypedocNames {
- [exportName: string]: string[];
-}
-
-export interface ExternalTypeToLink {
- [externalTypeName: string]: string;
-}
-
-export interface ExternalExportToLink {
- [externalExport: string]: string;
-}
-
-export interface Metadata {
- exportPathToTypedocNames: ExportNameToTypedocNames;
- exportPathOrder: string[];
- externalTypeToLink: ExternalTypeToLink;
- externalExportToLink: ExternalExportToLink;
-}
-
-export interface EIP712Parameter {
- name: string;
- type: string;
-}
-
-export interface EIP712Types {
- [key: string]: EIP712Parameter[];
-}
-
-export type EIP712ObjectValue = string | number | EIP712Object;
-
-export interface EIP712Object {
- [key: string]: EIP712ObjectValue;
-}
-
-export interface EIP712TypedData {
- types: EIP712Types;
- domain: EIP712Object;
- message: EIP712Object;
- primaryType: string;
-}
-
-export interface Stats {
- orderCount: number;
-}
-
-export interface SimpleContractArtifact {
- schemaVersion: string;
- contractName: string;
- compilerOutput: SimpleStandardContractOutput;
- networks: ContractNetworks;
-}
-
-export interface SimpleStandardContractOutput {
- abi: ContractAbi;
- evm: SimpleEvmOutput;
- devdoc?: DevdocOutput;
-}
-
-export interface SimpleEvmOutput {
- bytecode: SimpleEvmBytecodeOutput;
-}
-
-export interface SimpleEvmBytecodeOutput {
- object: string;
-}
-
-export interface DutchAuctionDetails {
- beginTimeSeconds: BigNumber;
- endTimeSeconds: BigNumber;
- beginAmount: BigNumber;
- endAmount: BigNumber;
- currentAmount: BigNumber;
- currentTimeSeconds: BigNumber;
-}
diff --git a/packages/types/tsconfig.json b/packages/types/tsconfig.json
deleted file mode 100644
index 56689eaa3..000000000
--- a/packages/types/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "src"
- },
- "include": ["src/**/*"]
-}
diff --git a/packages/types/tslint.json b/packages/types/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/types/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/typescript-typings/package.json b/packages/typescript-typings/package.json
index 01cab8c63..c79f75e36 100644
--- a/packages/typescript-typings/package.json
+++ b/packages/typescript-typings/package.json
@@ -1,6 +1,6 @@
{
- "name": "@0x/typescript-typings",
- "version": "3.0.8",
+ "name": "@dexon-foundation/typescript-typings",
+ "version": "1.0.0",
"engines": {
"node": ">=6.12"
},
@@ -12,7 +12,7 @@
},
"repository": {
"type": "git",
- "url": "git+https://github.com/0xProject/0x-monorepo.git"
+ "url": "git+https://github.com/dexon-foundation/sol-tools.git"
},
"author": "Fabio Berger",
"contributors": [
@@ -20,9 +20,9 @@
],
"license": "Apache-2.0",
"bugs": {
- "url": "https://github.com/0xProject/0x-monorepo/issues"
+ "url": "https://github.com/dexon-foundation/sol-tools/issues"
},
- "homepage": "https://github.com/0xProject/0x-monorepo/packages/typescript-typings#readme",
+ "homepage": "https://github.com/dexon-foundation/sol-tools/packages/typescript-typings#readme",
"dependencies": {
"@types/bn.js": "^4.11.0",
"@types/react": "*",
diff --git a/packages/typescript-typings/types/@ledgerhq/index.d.ts b/packages/typescript-typings/types/@ledgerhq/index.d.ts
deleted file mode 100644
index 724dacb76..000000000
--- a/packages/typescript-typings/types/@ledgerhq/index.d.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-// Ledgerco declarations
-interface ECSignatureString {
- v: string;
- r: string;
- s: string;
-}
-interface ECSignature {
- v: number;
- r: string;
- s: string;
-}
-
-interface LedgerTransport {
- close(): Promise<void>;
-}
-
-declare module '@ledgerhq/hw-app-eth' {
- class Eth {
- public transport: LedgerTransport;
- constructor(transport: LedgerTransport);
- public getAddress(
- path: string,
- boolDisplay?: boolean,
- boolChaincode?: boolean,
- ): Promise<{ publicKey: string; address: string; chainCode: string }>;
- public signTransaction(path: string, rawTxHex: string): Promise<ECSignatureString>;
- public getAppConfiguration(): Promise<{ arbitraryDataEnabled: number; version: string }>;
- public signPersonalMessage(path: string, messageHex: string): Promise<ECSignature>;
- }
- export default Eth;
-}
-
-declare module '@ledgerhq/hw-transport-u2f' {
- export default class TransportU2F implements LedgerTransport {
- public static create(): Promise<LedgerTransport>;
- public close(): Promise<void>;
- }
-}
-
-declare module '@ledgerhq/hw-transport-node-hid' {
- export default class TransportNodeHid implements LedgerTransport {
- public static create(): Promise<LedgerTransport>;
- public close(): Promise<void>;
- }
-}
diff --git a/packages/typescript-typings/types/async-child-process/index.d.ts b/packages/typescript-typings/types/async-child-process/index.d.ts
deleted file mode 100644
index f8ed46378..000000000
--- a/packages/typescript-typings/types/async-child-process/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'async-child-process';
diff --git a/packages/typescript-typings/types/chai-as-promised/index.d.ts b/packages/typescript-typings/types/chai-as-promised/index.d.ts
deleted file mode 100644
index 6d5345755..000000000
--- a/packages/typescript-typings/types/chai-as-promised/index.d.ts
+++ /dev/null
@@ -1,266 +0,0 @@
-// Type definitions for chai-as-promised
-// Project: https://github.com/domenic/chai-as-promised/
-// Definitions by: jt000 <https://github.com/jt000>, Yuki Kokubun <https://github.com/Kuniwak>
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-declare module 'chai-as-promised' {
- function chaiAsPromised(chai: any, utils: any): void;
- namespace chaiAsPromised {}
- export = chaiAsPromised;
-}
-
-// tslint:disable:no-namespace ban-types member-ordering
-declare namespace Chai {
- // For BDD API
- interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
- eventually: PromisedAssertion;
- fulfilled: PromisedAssertion;
- become(expected: any): PromisedAssertion;
- rejected(): PromisedAssertion;
- rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion;
- notify(fn: Function): PromisedAssertion;
- }
-
- // Eventually does not have .then(), but PromisedAssertion have.
- interface Eventually extends PromisedLanguageChains, PromisedNumericComparison, PromisedTypeComparison {
- // From chai-as-promised
- become(expected: PromiseLike<any>): PromisedAssertion;
- fulfilled: PromisedAssertion;
- rejected: () => PromisedAssertion;
- rejectedWith(expected: any, message?: string | RegExp): PromisedAssertion;
- notify(fn: Function): PromisedAssertion;
-
- // From chai
- not: PromisedAssertion;
- deep: PromisedDeep;
- all: PromisedKeyFilter;
- a: PromisedTypeComparison;
- an: PromisedTypeComparison;
- include: PromisedInclude;
- contain: PromisedInclude;
- ok: PromisedAssertion;
- true: () => PromisedAssertion;
- false: () => PromisedAssertion;
- null: PromisedAssertion;
- undefined: PromisedAssertion;
- exist: PromisedAssertion;
- empty: PromisedAssertion;
- arguments: PromisedAssertion;
- Arguments: PromisedAssertion;
- equal: PromisedEqual;
- equals: PromisedEqual;
- eq: PromisedEqual;
- eql: PromisedEqual;
- eqls: PromisedEqual;
- property: PromisedProperty;
- ownProperty: PromisedOwnProperty;
- haveOwnProperty: PromisedOwnProperty;
- length: PromisedLength;
- lengthOf: PromisedLength;
- match(regexp: RegExp | string, message?: string): PromisedAssertion;
- string(string: string, message?: string): PromisedAssertion;
- keys: PromisedKeys;
- key(string: string): PromisedAssertion;
- throw: PromisedThrow;
- throws: PromisedThrow;
- Throw: PromisedThrow;
- respondTo(method: string, message?: string): PromisedAssertion;
- itself: PromisedAssertion;
- satisfy(matcher: Function, message?: string): PromisedAssertion;
- closeTo(expected: number, delta: number, message?: string): PromisedAssertion;
- members: PromisedMembers;
- }
-
- interface PromisedAssertion extends Eventually, PromiseLike<any> {}
-
- interface PromisedLanguageChains {
- eventually: Eventually;
-
- // From chai
- to: PromisedAssertion;
- be: PromisedAssertion;
- been: PromisedAssertion;
- is: PromisedAssertion;
- that: PromisedAssertion;
- which: PromisedAssertion;
- and: PromisedAssertion;
- has: PromisedAssertion;
- have: PromisedAssertion;
- with: PromisedAssertion;
- at: PromisedAssertion;
- of: PromisedAssertion;
- same: PromisedAssertion;
- }
-
- interface PromisedNumericComparison {
- above: PromisedNumberComparer;
- gt: PromisedNumberComparer;
- greaterThan: PromisedNumberComparer;
- least: PromisedNumberComparer;
- gte: PromisedNumberComparer;
- below: PromisedNumberComparer;
- lt: PromisedNumberComparer;
- lessThan: PromisedNumberComparer;
- most: PromisedNumberComparer;
- lte: PromisedNumberComparer;
- within(start: number, finish: number, message?: string): PromisedAssertion;
- }
-
- type PromisedNumberComparer = (value: number, message?: string) => PromisedAssertion;
-
- interface PromisedTypeComparison {
- (type: string, message?: string): PromisedAssertion;
- instanceof: PromisedInstanceOf;
- instanceOf: PromisedInstanceOf;
- }
-
- type PromisedInstanceOf = (constructor: Object, message?: string) => PromisedAssertion;
-
- interface PromisedDeep {
- equal: PromisedEqual;
- include: PromisedInclude;
- property: PromisedProperty;
- }
-
- interface PromisedKeyFilter {
- keys: PromisedKeys;
- }
-
- type PromisedEqual = (value: any, message?: string) => PromisedAssertion;
-
- type PromisedProperty = (name: string, value?: any, message?: string) => PromisedAssertion;
-
- type PromisedOwnProperty = (name: string, message?: string) => PromisedAssertion;
-
- interface PromisedLength extends PromisedLanguageChains, PromisedNumericComparison {
- (length: number, message?: string): PromisedAssertion;
- }
-
- interface PromisedInclude {
- (value: Object | string | number, message?: string): PromisedAssertion;
- keys: PromisedKeys;
- members: PromisedMembers;
- all: PromisedKeyFilter;
- }
-
- interface PromisedKeys {
- (...keys: string[]): PromisedAssertion;
- (keys: any[]): PromisedAssertion;
- }
-
- interface PromisedThrow {
- (): PromisedAssertion;
- (expected: string | RegExp, message?: string): PromisedAssertion;
- (constructor: Error | Function, expected?: string | RegExp, message?: string): PromisedAssertion;
- }
-
- type PromisedMembers = (set: any[], message?: string) => PromisedAssertion;
-
- // For Assert API
- interface Assert {
- eventually: PromisedAssert;
- isFulfilled(promise: PromiseLike<any>, message?: string): PromiseLike<void>;
- becomes(promise: PromiseLike<any>, expected: any, message?: string): PromiseLike<void>;
- doesNotBecome(promise: PromiseLike<any>, expected: any, message?: string): PromiseLike<void>;
- isRejected(promise: PromiseLike<any>, message?: string): PromiseLike<void>;
- isRejected(promise: PromiseLike<any>, expected: any | RegExp, message?: string): PromiseLike<void>;
- notify(fn: Function): PromiseLike<void>;
- }
-
- export interface PromisedAssert {
- fail(actual?: any, expected?: any, msg?: string, operator?: string): PromiseLike<void>;
-
- ok(val: any, msg?: string): PromiseLike<void>;
- notOk(val: any, msg?: string): PromiseLike<void>;
-
- equal(act: any, exp: any, msg?: string): PromiseLike<void>;
- notEqual(act: any, exp: any, msg?: string): PromiseLike<void>;
-
- strictEqual(act: any, exp: any, msg?: string): PromiseLike<void>;
- notStrictEqual(act: any, exp: any, msg?: string): PromiseLike<void>;
-
- deepEqual(act: any, exp: any, msg?: string): PromiseLike<void>;
- notDeepEqual(act: any, exp: any, msg?: string): PromiseLike<void>;
-
- isTrue(val: any, msg?: string): PromiseLike<void>;
- isFalse(val: any, msg?: string): PromiseLike<void>;
-
- isNull(val: any, msg?: string): PromiseLike<void>;
- isNotNull(val: any, msg?: string): PromiseLike<void>;
-
- isUndefined(val: any, msg?: string): PromiseLike<void>;
- isDefined(val: any, msg?: string): PromiseLike<void>;
-
- isFunction(val: any, msg?: string): PromiseLike<void>;
- isNotFunction(val: any, msg?: string): PromiseLike<void>;
-
- isObject(val: any, msg?: string): PromiseLike<void>;
- isNotObject(val: any, msg?: string): PromiseLike<void>;
-
- isArray(val: any, msg?: string): PromiseLike<void>;
- isNotArray(val: any, msg?: string): PromiseLike<void>;
-
- isString(val: any, msg?: string): PromiseLike<void>;
- isNotString(val: any, msg?: string): PromiseLike<void>;
-
- isNumber(val: any, msg?: string): PromiseLike<void>;
- isNotNumber(val: any, msg?: string): PromiseLike<void>;
-
- isBoolean(val: any, msg?: string): PromiseLike<void>;
- isNotBoolean(val: any, msg?: string): PromiseLike<void>;
-
- typeOf(val: any, type: string, msg?: string): PromiseLike<void>;
- notTypeOf(val: any, type: string, msg?: string): PromiseLike<void>;
-
- instanceOf(val: any, type: Function, msg?: string): PromiseLike<void>;
- notInstanceOf(val: any, type: Function, msg?: string): PromiseLike<void>;
-
- include(exp: string | any[], inc: any, msg?: string): PromiseLike<void>;
-
- notInclude(exp: string | any[], inc: any, msg?: string): PromiseLike<void>;
-
- match(exp: any, re: RegExp, msg?: string): PromiseLike<void>;
- notMatch(exp: any, re: RegExp, msg?: string): PromiseLike<void>;
-
- property(obj: Object, prop: string, msg?: string): PromiseLike<void>;
- notProperty(obj: Object, prop: string, msg?: string): PromiseLike<void>;
- deepProperty(obj: Object, prop: string, msg?: string): PromiseLike<void>;
- notDeepProperty(obj: Object, prop: string, msg?: string): PromiseLike<void>;
-
- propertyVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike<void>;
- propertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike<void>;
-
- deepPropertyVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike<void>;
- deepPropertyNotVal(obj: Object, prop: string, val: any, msg?: string): PromiseLike<void>;
-
- lengthOf(exp: any, len: number, msg?: string): PromiseLike<void>;
- // alias frenzy
- throw(fn: Function, msg?: string): PromiseLike<void>;
- throw(fn: Function, regExp: RegExp): PromiseLike<void>;
- throw(fn: Function, errType: Function, msg?: string): PromiseLike<void>;
- throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike<void>;
-
- throws(fn: Function, msg?: string): PromiseLike<void>;
- throws(fn: Function, regExp: RegExp): PromiseLike<void>;
- throws(fn: Function, errType: Function, msg?: string): PromiseLike<void>;
- throws(fn: Function, errType: Function, regExp: RegExp): PromiseLike<void>;
-
- Throw(fn: Function, msg?: string): PromiseLike<void>;
- Throw(fn: Function, regExp: RegExp): PromiseLike<void>;
- Throw(fn: Function, errType: Function, msg?: string): PromiseLike<void>;
- Throw(fn: Function, errType: Function, regExp: RegExp): PromiseLike<void>;
-
- doesNotThrow(fn: Function, msg?: string): PromiseLike<void>;
- doesNotThrow(fn: Function, regExp: RegExp): PromiseLike<void>;
- doesNotThrow(fn: Function, errType: Function, msg?: string): PromiseLike<void>;
- doesNotThrow(fn: Function, errType: Function, regExp: RegExp): PromiseLike<void>;
-
- operator(val: any, operator: string, val2: any, msg?: string): PromiseLike<void>;
- closeTo(act: number, exp: number, delta: number, msg?: string): PromiseLike<void>;
-
- sameMembers(set1: any[], set2: any[], msg?: string): PromiseLike<void>;
- includeMembers(set1: any[], set2: any[], msg?: string): PromiseLike<void>;
-
- ifError(val: any, msg?: string): PromiseLike<void>;
- }
-}
diff --git a/packages/typescript-typings/types/chai-bignumber/index.d.ts b/packages/typescript-typings/types/chai-bignumber/index.d.ts
deleted file mode 100644
index 802b69795..000000000
--- a/packages/typescript-typings/types/chai-bignumber/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'chai-bignumber';
diff --git a/packages/typescript-typings/types/chai/index.d.ts b/packages/typescript-typings/types/chai/index.d.ts
deleted file mode 100644
index 3bde1f27c..000000000
--- a/packages/typescript-typings/types/chai/index.d.ts
+++ /dev/null
@@ -1,1257 +0,0 @@
-// Type definitions for chai 4.0.0
-// Project: http://chaijs.com/
-// Definitions by: Jed Mao <https://github.com/jedmao/>,
-// Bart van der Schoor <https://github.com/Bartvds>,
-// Andrew Brown <https://github.com/AGBrown>,
-// Olivier Chevet <https://github.com/olivr70>,
-// Matt Wistrand <https://github.com/mwistrand>,
-// Josh Goldberg <https://github.com/joshuakgoldberg>
-// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
-
-// <reference types="assertion-error"/>
-
-// tslint:disable:no-namespace member-ordering ban-types unified-signatures variable-name callable-types
-declare namespace Chai {
- interface ChaiStatic {
- expect: ExpectStatic;
- should(): Should;
- /**
- * Provides a way to extend the internals of Chai
- */
- use(fn: (chai: any, utils: any) => void): ChaiStatic;
- assert: AssertStatic;
- config: Config;
- AssertionError: typeof AssertionError;
- version: string;
- }
-
- export interface ExpectStatic extends AssertionStatic {
- fail(actual?: any, expected?: any, message?: string, operator?: Operator): void;
- }
-
- export interface AssertStatic extends Assert {}
-
- type AssertionStatic = (target: any, message?: string) => Assertion;
-
- export type Operator = string; // "==" | "===" | ">" | ">=" | "<" | "<=" | "!=" | "!==";
-
- export type OperatorComparable = boolean | null | number | string | undefined | Date;
-
- interface ShouldAssertion {
- equal(value1: any, value2: any, message?: string): void;
- Throw: ShouldThrow;
- throw: ShouldThrow;
- exist(value: any, message?: string): void;
- }
-
- interface Should extends ShouldAssertion {
- not: ShouldAssertion;
- fail(actual: any, expected: any, message?: string, operator?: Operator): void;
- }
-
- interface ShouldThrow {
- (actual: Function): void;
- (actual: Function, expected: string | RegExp, message?: string): void;
- (actual: Function, constructor: Error | Function, expected?: string | RegExp, message?: string): void;
- }
-
- interface Assertion extends LanguageChains, NumericComparison, TypeComparison {
- not: Assertion;
- deep: Deep;
- nested: Nested;
- any: KeyFilter;
- all: KeyFilter;
- a: TypeComparison;
- an: TypeComparison;
- include: Include;
- includes: Include;
- contain: Include;
- contains: Include;
- ok: Assertion;
- true: () => Assertion;
- false: () => Assertion;
- null: () => Assertion;
- undefined: () => Assertion;
- NaN: Assertion;
- exist: Assertion;
- empty: Assertion;
- arguments: Assertion;
- Arguments: Assertion;
- equal: Equal;
- equals: Equal;
- eq: Equal;
- eql: Equal;
- eqls: Equal;
- property: Property;
- ownProperty: OwnProperty;
- haveOwnProperty: OwnProperty;
- ownPropertyDescriptor: OwnPropertyDescriptor;
- haveOwnPropertyDescriptor: OwnPropertyDescriptor;
- length: Length;
- lengthOf: Length;
- match: Match;
- matches: Match;
- string(string: string, message?: string): Assertion;
- keys: Keys;
- key(string: string): Assertion;
- throw: (message?: string) => Assertion;
- throws: Throw;
- Throw: Throw;
- respondTo: RespondTo;
- respondsTo: RespondTo;
- itself: Assertion;
- satisfy: Satisfy;
- satisfies: Satisfy;
- closeTo: CloseTo;
- approximately: CloseTo;
- members: Members;
- increase: PropertyChange;
- increases: PropertyChange;
- decrease: PropertyChange;
- decreases: PropertyChange;
- change: PropertyChange;
- changes: PropertyChange;
- extensible: Assertion;
- sealed: Assertion;
- frozen: Assertion;
- bignumber: Assertion;
- // HACK: In order to comply with chai-as-promised we make eventually a `PromisedAssertion` not an `Assertion`
- eventually: PromisedAssertion;
- oneOf(list: any[], message?: string): Assertion;
- }
-
- interface LanguageChains {
- to: Assertion;
- be: Assertion;
- been: Assertion;
- is: Assertion;
- that: Assertion;
- which: Assertion;
- and: Assertion;
- has: Assertion;
- have: Assertion;
- with: Assertion;
- at: Assertion;
- of: Assertion;
- same: Assertion;
- }
-
- interface NumericComparison {
- above: NumberComparer;
- gt: NumberComparer;
- greaterThan: NumberComparer;
- least: NumberComparer;
- gte: NumberComparer;
- below: NumberComparer;
- lt: NumberComparer;
- lessThan: NumberComparer;
- most: NumberComparer;
- lte: NumberComparer;
- within(start: number, finish: number, message?: string): Assertion;
- }
-
- interface NumberComparer {
- (value: number | object, message?: string): Assertion;
- }
-
- interface TypeComparison {
- (type: string, message?: string): Assertion;
- instanceof: InstanceOf;
- instanceOf: InstanceOf;
- }
-
- interface InstanceOf {
- (constructor: Object, message?: string): Assertion;
- }
-
- interface CloseTo {
- (expected: number, delta: number, message?: string): Assertion;
- }
-
- interface Nested {
- include: Include;
- property: Property;
- members: Members;
- }
-
- interface Deep {
- equal: Equal;
- equals: Equal;
- eq: Equal;
- include: Include;
- property: Property;
- members: Members;
- }
-
- interface KeyFilter {
- keys: Keys;
- }
-
- interface Equal {
- (value: any, message?: string): Assertion;
- }
-
- interface Property {
- (name: string, value?: any, message?: string): Assertion;
- }
-
- interface OwnProperty {
- (name: string, message?: string): Assertion;
- }
-
- interface OwnPropertyDescriptor {
- (name: string, descriptor: PropertyDescriptor, message?: string): Assertion;
- (name: string, message?: string): Assertion;
- }
-
- interface Length extends LanguageChains, NumericComparison {
- (length: number, message?: string): Assertion;
- }
-
- interface Include {
- (value: Object | string | number, message?: string): Assertion;
- keys: Keys;
- members: Members;
- any: KeyFilter;
- all: KeyFilter;
- }
-
- interface Match {
- (regexp: RegExp | string, message?: string): Assertion;
- }
-
- interface Keys {
- (...keys: string[]): Assertion;
- (keys: any[]): Assertion;
- (keys: Object): Assertion;
- }
-
- interface Throw {
- (): Assertion;
- (expected: string, message?: string): Assertion;
- (expected: RegExp, message?: string): Assertion;
- (constructor: Error, expected?: string, message?: string): Assertion;
- (constructor: Error, expected?: RegExp, message?: string): Assertion;
- (constructor: Function, expected?: string, message?: string): Assertion;
- (constructor: Function, expected?: RegExp, message?: string): Assertion;
- }
-
- interface RespondTo {
- (method: string, message?: string): Assertion;
- }
-
- interface Satisfy {
- (matcher: Function, message?: string): Assertion;
- }
-
- interface Members {
- (set: any[], message?: string): Assertion;
- }
-
- interface PropertyChange {
- (object: Object, property: string, message?: string): Assertion;
- }
-
- export interface Assert {
- /**
- * @param expression Expression to test for truthiness.
- * @param message Message to display on error.
- */
- (expression: any, message?: string): void;
-
- /**
- * Throws a failure.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- * @param operator Comparison operator, if not strict equality.
- * @remarks Node.js assert module-compatible.
- */
- fail<T>(actual?: T, expected?: T, message?: string, operator?: Operator): void;
-
- /**
- * Asserts that object is truthy.
- *
- * @type T Type of object.
- * @param object Object to test.
- * @param message Message to display on error.
- */
- isOk<T>(value: T, message?: string): void;
-
- /**
- * Asserts that object is truthy.
- *
- * @type T Type of object.
- * @param object Object to test.
- * @param message Message to display on error.
- */
- ok<T>(value: T, message?: string): void;
-
- /**
- * Asserts that object is falsy.
- *
- * @type T Type of object.
- * @param object Object to test.
- * @param message Message to display on error.
- */
- isNotOk<T>(value: T, message?: string): void;
-
- /**
- * Asserts that object is falsy.
- *
- * @type T Type of object.
- * @param object Object to test.
- * @param message Message to display on error.
- */
- notOk<T>(value: T, message?: string): void;
-
- /**
- * Asserts non-strict equality (==) of actual and expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- equal<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts non-strict inequality (==) of actual and expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- notEqual<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts strict equality (===) of actual and expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- strictEqual<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts strict inequality (==) of actual and expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- notStrictEqual<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts that actual is deeply equal to expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- deepEqual<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts that actual is not deeply equal to expected.
- *
- * @type T Type of the objects.
- * @param actual Actual value.
- * @param expected Potential expected value.
- * @param message Message to display on error.
- */
- notDeepEqual<T>(actual: T, expected: T, message?: string): void;
-
- /**
- * Asserts valueToCheck is strictly greater than (>) valueToBeAbove.
- *
- * @param valueToCheck Actual value.
- * @param valueToBeAbove Minimum Potential expected value.
- * @param message Message to display on error.
- */
- isAbove(valueToCheck: number, valueToBeAbove: number, message?: string): void;
-
- /**
- * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtLeast.
- *
- * @param valueToCheck Actual value.
- * @param valueToBeAtLeast Minimum Potential expected value.
- * @param message Message to display on error.
- */
- isAtLeast(valueToCheck: number, valueToBeAtLeast: number, message?: string): void;
-
- /**
- * Asserts valueToCheck is strictly less than (<) valueToBeBelow.
- *
- * @param valueToCheck Actual value.
- * @param valueToBeBelow Minimum Potential expected value.
- * @param message Message to display on error.
- */
- isBelow(valueToCheck: number, valueToBeBelow: number, message?: string): void;
-
- /**
- * Asserts valueToCheck is greater than or equal to (>=) valueToBeAtMost.
- *
- * @param valueToCheck Actual value.
- * @param valueToBeAtMost Minimum Potential expected value.
- * @param message Message to display on error.
- */
- isAtMost(valueToCheck: number, valueToBeAtMost: number, message?: string): void;
-
- /**
- * Asserts that value is true.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isTrue<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is false.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isFalse<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not true.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotTrue<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not false.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotFalse<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is null.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNull<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not null.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotNull<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not null.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNaN<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not null.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotNaN<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is undefined.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isUndefined<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not undefined.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isDefined<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is a function.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isFunction<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not a function.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotFunction<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is an object of type 'Object'
- * (as revealed by Object.prototype.toString).
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- * @remarks The assertion does not match subclassed objects.
- */
- isObject<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not an object of type 'Object'
- * (as revealed by Object.prototype.toString).
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotObject<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is an array.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isArray<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not an array.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotArray<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is a string.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isString<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not a string.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotString<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is a number.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNumber<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not a number.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotNumber<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is a boolean.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isBoolean<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value is not a boolean.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param message Message to display on error.
- */
- isNotBoolean<T>(value: T, message?: string): void;
-
- /**
- * Asserts that value's type is name, as determined by Object.prototype.toString.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param name Potential expected type name of value.
- * @param message Message to display on error.
- */
- typeOf<T>(value: T, name: string, message?: string): void;
-
- /**
- * Asserts that value's type is not name, as determined by Object.prototype.toString.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param name Potential expected type name of value.
- * @param message Message to display on error.
- */
- notTypeOf<T>(value: T, name: string, message?: string): void;
-
- /**
- * Asserts that value is an instance of constructor.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param constructor Potential expected contructor of value.
- * @param message Message to display on error.
- */
- instanceOf<T>(value: T, constructor: Function, message?: string): void;
-
- /**
- * Asserts that value is not an instance of constructor.
- *
- * @type T Type of value.
- * @param value Actual value.
- * @param constructor Potential expected contructor of value.
- * @param message Message to display on error.
- */
- notInstanceOf<T>(value: T, type: Function, message?: string): void;
-
- /**
- * Asserts that haystack includes needle.
- *
- * @param haystack Container string.
- * @param needle Potential expected substring of haystack.
- * @param message Message to display on error.
- */
- include(haystack: string, needle: string, message?: string): void;
-
- /**
- * Asserts that haystack includes needle.
- *
- * @type T Type of values in haystack.
- * @param haystack Container array.
- * @param needle Potential value contained in haystack.
- * @param message Message to display on error.
- */
- include<T>(haystack: T[], needle: T, message?: string): void;
-
- /**
- * Asserts that haystack does not include needle.
- *
- * @param haystack Container string.
- * @param needle Potential expected substring of haystack.
- * @param message Message to display on error.
- */
- notInclude(haystack: string, needle: any, message?: string): void;
-
- /**
- * Asserts that haystack does not include needle.
- *
- * @type T Type of values in haystack.
- * @param haystack Container array.
- * @param needle Potential value contained in haystack.
- * @param message Message to display on error.
- */
- notInclude(haystack: any[], needle: any, message?: string): void;
-
- /**
- * Asserts that value matches the regular expression regexp.
- *
- * @param value Actual value.
- * @param regexp Potential match of value.
- * @param message Message to display on error.
- */
- match(value: string, regexp: RegExp, message?: string): void;
-
- /**
- * Asserts that value does not match the regular expression regexp.
- *
- * @param value Actual value.
- * @param regexp Potential match of value.
- * @param message Message to display on error.
- */
- notMatch(expected: any, regexp: RegExp, message?: string): void;
-
- /**
- * Asserts that object has a property named by property.
- *
- * @type T Type of object.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param message Message to display on error.
- */
- property<T>(object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that object has a property named by property.
- *
- * @type T Type of object.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param message Message to display on error.
- */
- notProperty<T>(object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that object has a property named by property, which can be a string
- * using dot- and bracket-notation for deep reference.
- *
- * @type T Type of object.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param message Message to display on error.
- */
- deepProperty<T>(object: T, property: string, message?: string): void;
-
- /**
- * Asserts that object does not have a property named by property, which can be a
- * string using dot- and bracket-notation for deep reference.
- *
- * @type T Type of object.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param message Message to display on error.
- */
- notDeepProperty<T>(object: T, property: string, message?: string): void;
-
- /**
- * Asserts that object has a property named by property with value given by value.
- *
- * @type T Type of object.
- * @type V Type of value.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param value Potential expected property value.
- * @param message Message to display on error.
- */
- propertyVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
-
- /**
- * Asserts that object has a property named by property with value given by value.
- *
- * @type T Type of object.
- * @type V Type of value.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param value Potential expected property value.
- * @param message Message to display on error.
- */
- propertyNotVal<T, V>(object: T, property: string /* keyof T */, value: V, message?: string): void;
-
- /**
- * Asserts that object has a property named by property, which can be a string
- * using dot- and bracket-notation for deep reference.
- *
- * @type T Type of object.
- * @type V Type of value.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param value Potential expected property value.
- * @param message Message to display on error.
- */
- deepPropertyVal<T, V>(object: T, property: string, value: V, message?: string): void;
-
- /**
- * Asserts that object does not have a property named by property, which can be a
- * string using dot- and bracket-notation for deep reference.
- *
- * @type T Type of object.
- * @type V Type of value.
- * @param object Container object.
- * @param property Potential contained property of object.
- * @param value Potential expected property value.
- * @param message Message to display on error.
- */
- deepPropertyNotVal<T, V>(object: T, property: string, value: V, message?: string): void;
-
- /**
- * Asserts that object has a length property with the expected value.
- *
- * @type T Type of object.
- * @param object Container object.
- * @param length Potential expected length of object.
- * @param message Message to display on error.
- */
- lengthOf<T extends { readonly length?: number }>(object: T, length: number, message?: string): void;
-
- /**
- * Asserts that fn will throw an error.
- *
- * @param fn Function that may throw.
- * @param message Message to display on error.
- */
- throw(fn: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param regExp Potential expected message match.
- * @param message Message to display on error.
- */
- throw(fn: Function, regExp: RegExp): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- throw(fn: Function, constructor: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor
- * and an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- throw(fn: Function, constructor: Function, regExp: RegExp): void;
-
- /**
- * Asserts that fn will throw an error.
- *
- * @param fn Function that may throw.
- * @param message Message to display on error.
- */
- throws(fn: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param regExp Potential expected message match.
- * @param message Message to display on error.
- */
- throws(fn: Function, regExp: RegExp, message?: string): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- throws(fn: Function, errType: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor
- * and an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- throws(fn: Function, errType: Function, regExp: RegExp): void;
-
- /**
- * Asserts that fn will throw an error.
- *
- * @param fn Function that may throw.
- * @param message Message to display on error.
- */
- Throw(fn: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param regExp Potential expected message match.
- * @param message Message to display on error.
- */
- Throw(fn: Function, regExp: RegExp): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- Throw(fn: Function, errType: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor
- * and an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- Throw(fn: Function, errType: Function, regExp: RegExp): void;
-
- /**
- * Asserts that fn will not throw an error.
- *
- * @param fn Function that may throw.
- * @param message Message to display on error.
- */
- doesNotThrow(fn: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param regExp Potential expected message match.
- * @param message Message to display on error.
- */
- doesNotThrow(fn: Function, regExp: RegExp): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- doesNotThrow(fn: Function, errType: Function, message?: string): void;
-
- /**
- * Asserts that function will throw an error that is an instance of constructor
- * and an error with message matching regexp.
- *
- * @param fn Function that may throw.
- * @param constructor Potential expected error constructor.
- * @param message Message to display on error.
- */
- doesNotThrow(fn: Function, errType: Function, regExp: RegExp): void;
-
- /**
- * Compares two values using operator.
- *
- * @param val1 Left value during comparison.
- * @param operator Comparison operator.
- * @param val2 Right value during comparison.
- * @param message Message to display on error.
- */
- operator(val1: OperatorComparable, operator: Operator, val2: OperatorComparable, message?: string): void;
-
- /**
- * Asserts that the target is equal to expected, to within a +/- delta range.
- *
- * @param actual Actual value
- * @param expected Potential expected value.
- * @param delta Maximum differenced between values.
- * @param message Message to display on error.
- */
- closeTo(actual: number, expected: number, delta: number, message?: string): void;
-
- /**
- * Asserts that the target is equal to expected, to within a +/- delta range.
- *
- * @param actual Actual value
- * @param expected Potential expected value.
- * @param delta Maximum differenced between values.
- * @param message Message to display on error.
- */
- approximately(act: number, exp: number, delta: number, message?: string): void;
-
- /**
- * Asserts that set1 and set2 have the same members. Order is not take into account.
- *
- * @type T Type of set values.
- * @param set1 Actual set of values.
- * @param set2 Potential expected set of values.
- * @param message Message to display on error.
- */
- sameMembers<T>(set1: T[], set2: T[], message?: string): void;
-
- /**
- * Asserts that set1 and set2 have the same members using deep equality checking.
- * Order is not take into account.
- *
- * @type T Type of set values.
- * @param set1 Actual set of values.
- * @param set2 Potential expected set of values.
- * @param message Message to display on error.
- */
- sameDeepMembers<T>(set1: T[], set2: T[], message?: string): void;
-
- /**
- * Asserts that subset is included in superset. Order is not take into account.
- *
- * @type T Type of set values.
- * @param superset Actual set of values.
- * @param subset Potential contained set of values.
- * @param message Message to display on error.
- */
- includeMembers<T>(superset: T[], subset: T[], message?: string): void;
-
- /**
- * Asserts that subset is included in superset using deep equality checking.
- * Order is not take into account.
- *
- * @type T Type of set values.
- * @param superset Actual set of values.
- * @param subset Potential contained set of values.
- * @param message Message to display on error.
- */
- includeDeepMembers<T>(superset: T[], subset: T[], message?: string): void;
-
- /**
- * Asserts that non-object, non-array value inList appears in the flat array list.
- *
- * @type T Type of list values.
- * @param inList Value expected to be in the list.
- * @param list List of values.
- * @param message Message to display on error.
- */
- oneOf<T>(inList: T, list: T[], message?: string): void;
-
- /**
- * Asserts that a function changes the value of a property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected to be modified.
- * @param message Message to display on error.
- */
- changes<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that a function does not change the value of a property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected not to be modified.
- * @param message Message to display on error.
- */
- doesNotChange<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that a function increases an object property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected to be increased.
- * @param message Message to display on error.
- */
- increases<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that a function does not increase an object property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected not to be increased.
- * @param message Message to display on error.
- */
- doesNotIncrease<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that a function decreases an object property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected to be decreased.
- * @param message Message to display on error.
- */
- decreases<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts that a function does not decrease an object property.
- *
- * @type T Type of object.
- * @param modifier Function to run.
- * @param object Container object.
- * @param property Property of object expected not to be decreased.
- * @param message Message to display on error.
- */
- doesNotDecrease<T>(modifier: Function, object: T, property: string /* keyof T */, message?: string): void;
-
- /**
- * Asserts if value is not a false value, and throws if it is a true value.
- *
- * @type T Type of object.
- * @param object Actual value.
- * @param message Message to display on error.
- * @remarks This is added to allow for chai to be a drop-in replacement for
- * Node’s assert class.
- */
- ifError<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is extensible (can have new properties added to it).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isExtensible<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is extensible (can have new properties added to it).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- extensible<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not extensible.
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isNotExtensible<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not extensible.
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- notExtensible<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is sealed (can have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isSealed<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is sealed (can have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- sealed<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not sealed.
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isNotSealed<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not sealed.
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- notSealed<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is frozen (cannot have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isFrozen<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is frozen (cannot have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- frozen<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not frozen (cannot have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- isNotFrozen<T>(object: T, message?: string): void;
-
- /**
- * Asserts that object is not frozen (cannot have new properties added to it
- * and its existing properties cannot be removed).
- *
- * @type T Type of object
- * @param object Actual value.
- * @param message Message to display on error.
- */
- notFrozen<T>(object: T, message?: string): void;
- }
-
- export interface Config {
- /**
- * Default: false
- */
- includeStack: boolean;
-
- /**
- * Default: true
- */
- showDiff: boolean;
-
- /**
- * Default: 40
- */
- truncateThreshold: number;
- }
-
- export class AssertionError {
- constructor(message: string, _props?: any, ssf?: Function);
- public name: string;
- public message: string;
- public showDiff: boolean;
- public stack: string;
- }
-}
-
-declare const chai: Chai.ChaiStatic;
-
-declare module 'chai' {
- export = chai;
-}
-
-interface Object {
- should: Chai.Assertion;
-}
diff --git a/packages/typescript-typings/types/dirty-chai/index.d.ts b/packages/typescript-typings/types/dirty-chai/index.d.ts
deleted file mode 100644
index 91ed2021e..000000000
--- a/packages/typescript-typings/types/dirty-chai/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'dirty-chai';
diff --git a/packages/typescript-typings/types/solc/index.d.ts b/packages/typescript-typings/types/dsolc/index.d.ts
index f4c05cd7c..8e39da99a 100644
--- a/packages/typescript-typings/types/solc/index.d.ts
+++ b/packages/typescript-typings/types/dsolc/index.d.ts
@@ -1,4 +1,4 @@
-declare module 'solc' {
+declare module '@dexon-foundation/dsolc' {
export { ErrorType, ErrorSeverity, SolcError, StandardContractOutput, StandardOutput } from 'ethereum-types';
import { SolcError } from 'ethereum-types';
export interface ContractCompilationResult {
diff --git a/packages/typescript-typings/types/es6-promisify/index.d.ts b/packages/typescript-typings/types/es6-promisify/index.d.ts
deleted file mode 100644
index f9c202fb0..000000000
--- a/packages/typescript-typings/types/es6-promisify/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'es6-promisify';
diff --git a/packages/typescript-typings/types/ethereumjs-abi/index.d.ts b/packages/typescript-typings/types/ethereumjs-abi/index.d.ts
deleted file mode 100644
index 2d9fc9fcd..000000000
--- a/packages/typescript-typings/types/ethereumjs-abi/index.d.ts
+++ /dev/null
@@ -1,7 +0,0 @@
-declare module 'ethereumjs-abi' {
- export function soliditySHA3(argTypes: string[], args: any[]): Buffer;
- export function soliditySHA256(argTypes: string[], args: any[]): Buffer;
- export function methodID(name: string, types: string[]): Buffer;
- export function simpleEncode(signature: string, ...args: any[]): Buffer;
- export function rawDecode(signature: string[], data: Buffer): any[];
-}
diff --git a/packages/typescript-typings/types/ethereumjs-util/index.d.ts b/packages/typescript-typings/types/ethereumjs-util/index.d.ts
deleted file mode 100644
index b1c521e18..000000000
--- a/packages/typescript-typings/types/ethereumjs-util/index.d.ts
+++ /dev/null
@@ -1,100 +0,0 @@
-declare module 'ethereumjs-util' {
- import BN = require('bn.js');
-
- interface Signature {
- v: number;
- r: Buffer;
- s: Buffer;
- }
-
- export const MAX_INTEGER: BN;
-
- export const TWO_POW256: BN;
-
- export const SHA3_NULL_S: string;
-
- export const SHA3_NULL: Buffer;
-
- export const SHA3_RLP_ARRAY_S: string;
-
- export const SHA3_RLP_ARRAY: Buffer;
-
- export const SHA3_RLP_S: string;
-
- export const SHA3_RLP: Buffer;
-
- export function zeros(bytes: number): Buffer;
-
- export function setLength(msg: Buffer, length: number, right: boolean): Buffer;
- export function setLength(msg: number[], length: number, right: boolean): number[];
-
- export function setLengthLeft(msg: Buffer, length: number, right?: boolean): Buffer;
- export function setLengthLeft(msg: number[], length: number, right?: boolean): number[];
-
- export function setLengthRight(msg: Buffer, length: number): Buffer;
- export function setLengthRight(msg: number[], length: number): number[];
-
- export function unpad(a: Buffer): Buffer;
- export function unpad(a: number[]): number[];
- export function unpad(a: string): string;
-
- export function toBuffer(v: any): Buffer;
-
- export function bufferToInt(buf: Buffer): number;
-
- export function bufferToHex(buf: Buffer): string;
-
- export function fromSigned(num: Buffer): BN;
-
- export function toUnsigned(num: BN): Buffer;
-
- export function sha3(a: Buffer | string | number | number[], bits?: number): Buffer;
-
- export function sha256(a: Buffer | string | number | number[]): Buffer;
-
- export function ripemd160(a: Buffer | string | number | number[], padded?: boolean): Buffer;
-
- export function rlphash(a: Buffer | string | number | number[]): Buffer;
-
- export function isValidPrivate(privateKey: Buffer): boolean;
-
- export function isValidPublic(publicKey: Buffer, sanitize?: boolean): boolean;
-
- export function pubToAddress(publicKey: Buffer, sanitize?: boolean): Buffer;
- export function publicToAddress(publicKey: Buffer, sanitize?: boolean): Buffer;
-
- export function privateToPublic(privateKey: Buffer): Buffer;
-
- export function importPublic(publicKey: Buffer): Buffer;
-
- export function ecsign(message: Buffer, privateKey: Buffer): Signature;
-
- export function hashPersonalMessage(message: Buffer | string): Buffer;
-
- export function ecrecover(msgHash: Buffer, v: number, r: Buffer, s: Buffer): Buffer;
-
- export function toRpcSig(v: number, r: Buffer, s: Buffer): string;
-
- export function fromRpcSig(sig: string): Signature;
-
- export function privateToAddress(privateKey: Buffer): Buffer;
-
- export function isValidAddress(address: string): boolean;
-
- export function toChecksumAddress(address: string): string;
-
- export function isValidChecksumAddress(address: string): boolean;
-
- export function generateAddress(from: Buffer | string, nonce: number | string | number[] | Buffer): Buffer;
-
- export function isPrecompiled(address: Buffer | string): boolean;
-
- export function addHexPrefix(str: string): string;
-
- export function stripHexPrefix(str: string): string;
-
- export function isValidSignature(v: number, r: Buffer | string, s: Buffer | string, homestead?: boolean): boolean;
-
- export function baToJSON(ba: Buffer): string;
- export function baToJSON(ba: any[]): string[];
-}
diff --git a/packages/typescript-typings/types/ganache-core/index.d.ts b/packages/typescript-typings/types/ganache-core/index.d.ts
new file mode 100644
index 000000000..e192db556
--- /dev/null
+++ b/packages/typescript-typings/types/ganache-core/index.d.ts
@@ -0,0 +1,23 @@
+// Type definitions for ganache-core 2.1
+// Project: https://github.com/trufflesuite/ganache-core#readme
+// Definitions by: Leonid Logvinov <https://github.com/LogvinovLeon>
+// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
+// TypeScript Version: 2.4
+
+declare module '@dexon-foundation/ganache-core' {
+ import { Provider } from 'ethereum-protocol';
+ export interface GanacheOpts {
+ verbose?: boolean;
+ logger?: {
+ log(msg: string): void;
+ };
+ port?: number;
+ network_id?: number;
+ networkId?: number;
+ mnemonic?: string;
+ gasLimit?: number;
+ vmErrorsOnRPCResponse?: boolean;
+ db_path?: string;
+ }
+ export function provider(opts: GanacheOpts): Provider;
+}
diff --git a/packages/typescript-typings/types/json-rpc-error/index.d.ts b/packages/typescript-typings/types/json-rpc-error/index.d.ts
deleted file mode 100644
index dfaf92167..000000000
--- a/packages/typescript-typings/types/json-rpc-error/index.d.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-declare module 'json-rpc-error' {
- export class InternalError extends Error {
- constructor(err: Error | string);
- }
- export class MethodNotFound extends Error {
- constructor();
- }
-}
diff --git a/packages/typescript-typings/types/keccak/index.d.ts b/packages/typescript-typings/types/keccak/index.d.ts
deleted file mode 100644
index 0465f8faf..000000000
--- a/packages/typescript-typings/types/keccak/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'keccak';
diff --git a/packages/typescript-typings/types/openapi-schema-validation/index.d.ts b/packages/typescript-typings/types/openapi-schema-validation/index.d.ts
deleted file mode 100644
index 123a6bdb7..000000000
--- a/packages/typescript-typings/types/openapi-schema-validation/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'openapi-schema-validation';
diff --git a/packages/typescript-typings/types/promisify-child-process/index.d.ts b/packages/typescript-typings/types/promisify-child-process/index.d.ts
deleted file mode 100644
index 55c041735..000000000
--- a/packages/typescript-typings/types/promisify-child-process/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'promisify-child-process';
diff --git a/packages/typescript-typings/types/publish-release/index.d.ts b/packages/typescript-typings/types/publish-release/index.d.ts
deleted file mode 100644
index 680cc45c9..000000000
--- a/packages/typescript-typings/types/publish-release/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'publish-release';
diff --git a/packages/typescript-typings/types/react-highlight/index.d.ts b/packages/typescript-typings/types/react-highlight/index.d.ts
deleted file mode 100644
index 875721533..000000000
--- a/packages/typescript-typings/types/react-highlight/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'react-highlight';
diff --git a/packages/typescript-typings/types/react-popper/index.d.ts b/packages/typescript-typings/types/react-popper/index.d.ts
deleted file mode 100644
index d7dbca17f..000000000
--- a/packages/typescript-typings/types/react-popper/index.d.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-// Type definitions for react-popper 1.0.0-beta.6
-// Project: https://github.com/gilbarbara/react-joyride
-
-declare module 'react-popper' {
- import * as React from 'react';
- import * as PopperJS from 'popper.js';
-
- interface ManagerProps {
- children: React.ReactNode;
- }
- export class Manager extends React.Component<ManagerProps, {}> {}
-
- type RefHandler = (ref: HTMLElement | null) => void;
-
- export interface ReferenceChildrenProps {
- ref: RefHandler;
- }
-
- export interface ReferenceProps {
- children: (props: ReferenceChildrenProps) => React.ReactNode;
- }
- export class Reference extends React.Component<ReferenceProps, {}> {}
-
- export interface PopperArrowProps {
- ref: RefHandler;
- style: React.CSSProperties;
- }
-
- export type Placement = PopperJS.Placement;
-
- export interface PopperChildrenProps {
- arrowProps: PopperArrowProps;
- outOfBoundaries: boolean | null;
- placement: PopperJS.Placement;
- ref: RefHandler;
- scheduleUpdate: () => void;
- style: React.CSSProperties;
- }
-
- export interface PopperProps {
- children: (props: PopperChildrenProps) => React.ReactNode;
- eventsEnabled?: boolean;
- modifiers?: PopperJS.Modifiers;
- placement?: PopperJS.Placement;
- positionFixed?: boolean;
- referenceElement?: Element;
- }
- export class Popper extends React.Component<PopperProps, {}> {}
-}
diff --git a/packages/typescript-typings/types/react-tooltip/index.d.ts b/packages/typescript-typings/types/react-tooltip/index.d.ts
deleted file mode 100644
index 98cb6d592..000000000
--- a/packages/typescript-typings/types/react-tooltip/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'react-tooltip';
diff --git a/packages/typescript-typings/types/react-typist/index.d.ts b/packages/typescript-typings/types/react-typist/index.d.ts
deleted file mode 100644
index 692c596a5..000000000
--- a/packages/typescript-typings/types/react-typist/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'react-typist';
diff --git a/packages/typescript-typings/types/request-promise-native/index.d.ts b/packages/typescript-typings/types/request-promise-native/index.d.ts
deleted file mode 100644
index a86e99624..000000000
--- a/packages/typescript-typings/types/request-promise-native/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'request-promise-native';
diff --git a/packages/typescript-typings/types/rollbar/index.d.ts b/packages/typescript-typings/types/rollbar/index.d.ts
deleted file mode 100644
index c9bec447d..000000000
--- a/packages/typescript-typings/types/rollbar/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'rollbar';
diff --git a/packages/typescript-typings/types/semver-diff/index.d.ts b/packages/typescript-typings/types/semver-diff/index.d.ts
deleted file mode 100644
index e4a14eeb2..000000000
--- a/packages/typescript-typings/types/semver-diff/index.d.ts
+++ /dev/null
@@ -1 +0,0 @@
-declare module 'semver-diff';
diff --git a/packages/typescript-typings/types/semver-sort/index.d.ts b/packages/typescript-typings/types/semver-sort/index.d.ts
deleted file mode 100644
index 47310756a..000000000
--- a/packages/typescript-typings/types/semver-sort/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare module 'semver-sort' {
- const desc: (versions: string[]) => string[];
-}
diff --git a/packages/typescript-typings/types/to-snake-case/index.d.ts b/packages/typescript-typings/types/to-snake-case/index.d.ts
deleted file mode 100644
index 39df3f852..000000000
--- a/packages/typescript-typings/types/to-snake-case/index.d.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-declare function toSnakeCase(str: string): string;
-declare module 'to-snake-case' {
- export = toSnakeCase;
-}
diff --git a/packages/typescript-typings/types/truffle-hdwalet-provider/index.d.ts b/packages/typescript-typings/types/truffle-hdwalet-provider/index.d.ts
deleted file mode 100644
index 007df61e0..000000000
--- a/packages/typescript-typings/types/truffle-hdwalet-provider/index.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-declare module 'truffle-hdwallet-provider' {
- import { JSONRPCRequestPayload, JSONRPCResponsePayload, Provider } from 'ethereum-types';
- class HDWalletProvider implements Provider {
- constructor(mnemonic: string, rpcUrl: string);
- public sendAsync(
- payload: JSONRPCRequestPayload,
- callback: (err: Error, result: JSONRPCResponsePayload) => void,
- ): void;
- }
- export = HDWalletProvider;
-}
diff --git a/packages/typescript-typings/types/web3-eth-abi/index.d.ts b/packages/typescript-typings/types/web3-eth-abi/index.d.ts
deleted file mode 100644
index 5d2f46e04..000000000
--- a/packages/typescript-typings/types/web3-eth-abi/index.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare module 'web3-eth-abi' {
- export function encodeParameters(typesArray: string[], parameters: any[]): string;
-}
diff --git a/packages/typescript-typings/types/web3/index.d.ts b/packages/typescript-typings/types/web3/index.d.ts
deleted file mode 100644
index 4085c71a7..000000000
--- a/packages/typescript-typings/types/web3/index.d.ts
+++ /dev/null
@@ -1,231 +0,0 @@
-declare module 'web3' {
- import * as BigNumber from 'bignumber.js';
- import {
- AbiDefinition,
- BlockWithTransactionData,
- BlockWithoutTransactionData,
- BlockParam,
- CallData,
- Provider,
- Unit,
- TxData,
- Transaction,
- ContractAbi,
- TransactionReceipt,
- FilterObject,
- LogEntryEvent,
- JSONRPCRequestPayload,
- JSONRPCResponsePayload,
- } from 'ethereum-types';
-
- type MixedData = string | number | object | any[] | BigNumber.BigNumber;
-
- class Web3 {
- public static providers: typeof providers;
- public currentProvider: Provider;
-
- public eth: Web3.EthApi;
- public personal: Web3.PersonalApi | undefined;
- public version: Web3.VersionApi;
- public net: Web3.NetApi;
-
- public constructor(provider?: Provider);
-
- public isConnected(): boolean;
- public setProvider(provider: Provider): void;
- public reset(keepIsSyncing: boolean): void;
- public toHex(data: MixedData): string;
- public toAscii(hex: string): string;
- public fromAscii(ascii: string, padding?: number): string;
- public toDecimal(hex: string): number;
- public fromDecimal(value: number | string): string;
- public fromWei(value: number | string, unit: Unit): string;
- public fromWei(value: BigNumber.BigNumber, unit: Unit): BigNumber.BigNumber;
- public toWei(amount: number | string, unit: Unit): string;
- public toWei(amount: BigNumber.BigNumber, unit: Unit): BigNumber.BigNumber;
- public toBigNumber(value: number | string): BigNumber.BigNumber;
- public isAddress(address: string): boolean;
- public isChecksumAddress(address: string): boolean;
- public sha3(value: string, options?: Web3.Sha3Options): string;
- }
-
- namespace providers {
- class HttpProvider implements Provider {
- constructor(url?: string, timeout?: number, username?: string, password?: string);
- public sendAsync(
- payload: JSONRPCRequestPayload,
- callback: (err: Error, result: JSONRPCResponsePayload) => void,
- ): void;
- }
- }
-
- namespace Web3 {
- interface ContractInstance {
- address: string;
- abi: ContractAbi;
- [name: string]: any;
- }
-
- interface Contract<A extends ContractInstance> {
- at(address: string): A;
- getData(...args: any[]): string;
- 'new'(...args: any[]): A;
- }
-
- interface FilterResult {
- get(callback: () => void): void;
- watch(callback: (err: Error, result: LogEntryEvent) => void): void;
- stopWatching(callback?: () => void): void;
- }
-
- interface Sha3Options {
- encoding: 'hex';
- }
-
- interface EthApi {
- coinbase: string;
- mining: boolean;
- hashrate: number;
- gasPrice: BigNumber.BigNumber;
- accounts: string[];
- blockNumber: number;
- defaultAccount?: string;
- defaultBlock: BlockParam;
- syncing: Web3.SyncingResult;
- compile: {
- solidity(sourceString: string, cb?: (err: Error, result: any) => void): object;
- };
- getMining(cd: (err: Error, mining: boolean) => void): void;
- getHashrate(cd: (err: Error, hashrate: number) => void): void;
- getGasPrice(cd: (err: Error, gasPrice: BigNumber.BigNumber) => void): void;
- getAccounts(cd: (err: Error, accounts: string[]) => void): void;
- getBlockNumber(callback: (err: Error, blockNumber: number) => void): void;
- getSyncing(cd: (err: Error, syncing: Web3.SyncingResult) => void): void;
- isSyncing(cb: (err: Error, isSyncing: boolean, syncingState: Web3.SyncingState) => void): Web3.IsSyncing;
-
- getBlock(hashStringOrBlockNumber: string | BlockParam): BlockWithoutTransactionData;
- getBlock(
- hashStringOrBlockNumber: string | BlockParam,
- callback: (err: Error, blockObj: BlockWithoutTransactionData) => void,
- ): void;
- getBlock(
- hashStringOrBlockNumber: string | BlockParam,
- returnTransactionObjects: true,
- ): BlockWithTransactionData;
- getBlock(
- hashStringOrBlockNumber: string | BlockParam,
- returnTransactionObjects: true,
- callback: (err: Error, blockObj: BlockWithTransactionData) => void,
- ): void;
-
- getBlockTransactionCount(hashStringOrBlockNumber: string | BlockParam): number;
- getBlockTransactionCount(
- hashStringOrBlockNumber: string | BlockParam,
- callback: (err: Error, blockTransactionCount: number) => void,
- ): void;
-
- // TODO returnTransactionObjects
- getUncle(hashStringOrBlockNumber: string | BlockParam, uncleNumber: number): BlockWithoutTransactionData;
- getUncle(
- hashStringOrBlockNumber: string | BlockParam,
- uncleNumber: number,
- callback: (err: Error, uncle: BlockWithoutTransactionData) => void,
- ): void;
-
- getTransaction(transactionHash: string): Transaction;
- getTransaction(transactionHash: string, callback: (err: Error, transaction: Transaction) => void): void;
-
- getTransactionFromBlock(hashStringOrBlockNumber: string | BlockParam, indexNumber: number): Transaction;
- getTransactionFromBlock(
- hashStringOrBlockNumber: string | BlockParam,
- indexNumber: number,
- callback: (err: Error, transaction: Transaction) => void,
- ): void;
-
- contract(abi: AbiDefinition[]): Web3.Contract<any>;
-
- // TODO block param
- getBalance(addressHexString: string): BigNumber.BigNumber;
- getBalance(addressHexString: string, callback: (err: Error, result: BigNumber.BigNumber) => void): void;
-
- // TODO block param
- getStorageAt(address: string, position: number): string;
- getStorageAt(address: string, position: number, callback: (err: Error, storage: string) => void): void;
-
- // TODO block param
- getCode(addressHexString: string): string;
- getCode(addressHexString: string, callback: (err: Error, code: string) => void): void;
-
- filter(value: string | FilterObject): Web3.FilterResult;
-
- sendTransaction(txData: TxData): string;
- sendTransaction(txData: TxData, callback: (err: Error, value: string) => void): void;
-
- sendRawTransaction(rawTxData: string): string;
- sendRawTransaction(rawTxData: string, callback: (err: Error, value: string) => void): void;
-
- sign(address: string, data: string): string;
- sign(address: string, data: string, callback: (err: Error, signature: string) => void): void;
-
- getTransactionReceipt(txHash: string): TransactionReceipt | null;
- getTransactionReceipt(
- txHash: string,
- callback: (err: Error, receipt: TransactionReceipt | null) => void,
- ): void;
-
- // TODO block param
- call(callData: CallData): string;
- call(callData: CallData, callback: (err: Error, result: string) => void): void;
-
- estimateGas(callData: CallData): number;
- estimateGas(callData: CallData, callback: (err: Error, gas: number) => void): void;
-
- // TODO defaultBlock
- getTransactionCount(address: string): number;
- getTransactionCount(address: string, callback: (err: Error, count: number) => void): void;
- }
-
- interface VersionApi {
- api: string;
- network: string;
- node: string;
- ethereum: string;
- whisper: string;
- getNetwork(cd: (err: Error, networkId: string) => void): void;
- getNode(cd: (err: Error, nodeVersion: string) => void): void;
- getEthereum(cd: (err: Error, ethereum: string) => void): void;
- getWhisper(cd: (err: Error, whisper: string) => void): void;
- }
-
- interface PersonalApi {
- listAccounts: string[] | undefined;
- newAccount(password?: string): string;
- unlockAccount(address: string, password?: string, duration?: number): boolean;
- lockAccount(address: string): boolean;
- sign(message: string, account: string, password: string): string;
- sign(hexMessage: string, account: string, callback: (error: Error, signature: string) => void): void;
- }
-
- interface NetApi {
- listening: boolean;
- peerCount: number;
- getListening(cd: (err: Error, listening: boolean) => void): void;
- getPeerCount(cd: (err: Error, peerCount: number) => void): void;
- }
-
- interface SyncingState {
- startingBlock: number;
- currentBlock: number;
- highestBlock: number;
- }
- type SyncingResult = false | SyncingState;
-
- interface IsSyncing {
- addCallback(cb: (err: Error, isSyncing: boolean, syncingState: SyncingState) => void): void;
- stopWatching(): void;
- }
- }
- /* tslint:disable */
- export = Web3;
- /* tslint:enable */
-}
diff --git a/packages/utils/.npmignore b/packages/utils/.npmignore
deleted file mode 100644
index 24e65ad5b..000000000
--- a/packages/utils/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/utils/CHANGELOG.json b/packages/utils/CHANGELOG.json
deleted file mode 100644
index 0fb199e58..000000000
--- a/packages/utils/CHANGELOG.json
+++ /dev/null
@@ -1,423 +0,0 @@
-[
- {
- "version": "4.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "3.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Make `promisify` resolve when the callback error is undefined.",
- "pr": 1501
- }
- ],
- "timestamp": 1547225310
- },
- {
- "version": "2.1.1",
- "changes": [
- {
- "note": "Add `should` prefix to names of properties in EncodingRules and DecodingRules",
- "pr": 1363
- }
- ],
- "timestamp": 1547040760
- },
- {
- "version": "2.1.0",
- "changes": [
- {
- "note": "Add `logWithTime` to `logUtils`",
- "pr": 1461
- }
- ]
- },
- {
- "version": "2.0.8",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "2.0.7",
- "changes": [
- {
- "note": "Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development."
- }
- ],
- "timestamp": 1544570656
- },
- {
- "timestamp": 1542821676,
- "version": "2.0.6",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542208198,
- "version": "2.0.5",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.0.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1541740904
- },
- {
- "timestamp": 1539871071,
- "version": "2.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538693146,
- "version": "2.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1538475601,
- "version": "2.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Make abi_decoder compatible with ethers ^4.0.0",
- "pr": 1069
- }
- ],
- "timestamp": 1538157789
- },
- {
- "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"
- }
- ]
- },
- {
- "version": "1.0.5",
- "changes": [
- {
- "note": "Increased BigNumber decimal precision from 20 to 78",
- "pr": 807
- },
- {
- "note": "Store different ABIs for events with same function signature and different amount of indexed arguments",
- "pr": 933
- }
- ],
- "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"
- }
- ]
- },
- {
- "version": "1.0.1",
- "changes": [
- {
- "note": "Add `AbortController` polyfill to `fetchAsync`",
- "pr": 903
- }
- ],
- "timestamp": 1532357734
- },
- {
- "timestamp": 1532043000,
- "version": "1.0.0",
- "changes": [
- {
- "note": "Add `fetchAsync` which adds a default timeout to all requests",
- "pr": 874
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.7.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.7.2",
- "changes": [
- {
- "note": "Added errorUtils.spawnSwitchErr"
- },
- {
- "note": "Add logUtils.warn",
- "pr": 589
- },
- {
- "note": "Fixes uncaught Error in abi_decoder",
- "pr": 763
- }
- ],
- "timestamp": 1531149657
- },
- {
- "timestamp": 1529397769,
- "version": "0.7.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.7.0",
- "changes": [
- {
- "note": "Incorrect publish that was unpublished"
- }
- ],
- "timestamp": 1527810075
- },
- {
- "timestamp": 1527009133,
- "version": "0.6.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.6.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.6.0",
- "changes": [
- {
- "note": "Update ethers-contracts to ethers.js",
- "pr": 540
- }
- ],
- "timestamp": 1525428773
- },
- {
- "version": "0.5.2",
- "changes": [
- {
- "note": "Export NULL_BYTES constant",
- "pr": 500
- }
- ],
- "timestamp": 1524044013
- },
- {
- "timestamp": 1523462196,
- "version": "0.5.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.5.0",
- "changes": [
- {
- "note": "Make `AbiDecoder.addABI` public",
- "pr": 485
- }
- ],
- "timestamp": 1522673609
- },
- {
- "timestamp": 1522658513,
- "version": "0.4.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.4.3",
- "changes": [
- {
- "note": "Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface."
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.4.2",
- "changes": [
- {
- "note": "Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package",
- "pr": 452
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.4.0",
- "changes": [
- {
- "note": "Use `ethers-contracts` as a backend to decode event args",
- "pr": 413
- },
- {
- "note": "Move web3 types from devDep to dep since required when using this package",
- "pr": 429
- }
- ],
- "timestamp": 1520089200
- },
- {
- "version": "0.3.2",
- "changes": [
- {
- "note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
- "pr": 389
- }
- ],
- "timestamp": 1518102000
- },
- {
- "version": "0.3.0",
- "changes": [
- {
- "note": "Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes).",
- "pr": 366
- }
- ],
- "timestamp": 1517756400
- },
- {
- "version": "0.2.0",
- "changes": [
- {
- "note": "Add `onError` parameter to `intervalUtils.setAsyncExcludingInterval`",
- "pr": 312
- },
- {
- "note": "Add `intervalUtils.setInterval`",
- "pr": 312
- }
- ],
- "timestamp": 1516114800
- }
-]
diff --git a/packages/utils/CHANGELOG.md b/packages/utils/CHANGELOG.md
deleted file mode 100644
index ed3f00158..000000000
--- a/packages/utils/CHANGELOG.md
+++ /dev/null
@@ -1,179 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v3.0.1 - _January 15, 2019_
-
- * Dependencies updated
-
-## v3.0.0 - _January 11, 2019_
-
- * Make `promisify` resolve when the callback error is undefined. (#1501)
-
-## v2.1.1 - _January 9, 2019_
-
- * Add `should` prefix to names of properties in EncodingRules and DecodingRules (#1363)
-
-## v2.1.0 - _Invalid date_
-
- * Add `logWithTime` to `logUtils` (#1461)
-
-## v2.0.8 - _December 13, 2018_
-
- * Dependencies updated
-
-## v2.0.7 - _December 11, 2018_
-
- * Optimized ABI Encoder/Decoder. Generates compressed calldata to save gas. Generates human-readable calldata to aid development.
-
-## v2.0.6 - _November 21, 2018_
-
- * Dependencies updated
-
-## v2.0.5 - _November 14, 2018_
-
- * Dependencies updated
-
-## v2.0.4 - _November 9, 2018_
-
- * Dependencies updated
-
-## v2.0.3 - _October 18, 2018_
-
- * Dependencies updated
-
-## v2.0.2 - _October 4, 2018_
-
- * Dependencies updated
-
-## v2.0.1 - _October 2, 2018_
-
- * Dependencies updated
-
-## v2.0.0 - _September 28, 2018_
-
- * Make abi_decoder compatible with ethers ^4.0.0 (#1069)
-
-## 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_
-
- * Increased BigNumber decimal precision from 20 to 78 (#807)
- * Store different ABIs for events with same function signature and different amount of indexed arguments (#933)
-
-## 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_
-
- * Add `AbortController` polyfill to `fetchAsync` (#903)
-
-## v1.0.0 - _July 19, 2018_
-
- * Add `fetchAsync` which adds a default timeout to all requests (#874)
-
-## v0.7.3 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.7.2 - _July 9, 2018_
-
- * Added errorUtils.spawnSwitchErr
- * Add logUtils.warn (#589)
- * Fixes uncaught Error in abi_decoder (#763)
-
-## v0.7.1 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.7.0 - _May 31, 2018_
-
- * Incorrect publish that was unpublished
-
-## v0.6.2 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.6.1 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.6.0 - _May 4, 2018_
-
- * Update ethers-contracts to ethers.js (#540)
-
-## v0.5.2 - _April 18, 2018_
-
- * Export NULL_BYTES constant (#500)
-
-## v0.5.1 - _April 11, 2018_
-
- * Dependencies updated
-
-## v0.5.0 - _April 2, 2018_
-
- * Make `AbiDecoder.addABI` public (#485)
-
-## v0.4.4 - _April 2, 2018_
-
- * Dependencies updated
-
-## v0.4.3 - _March 17, 2018_
-
- * Add `@types/node` to dependencies since `intervalUtils` has the `NodeJS` type as part of its public interface.
-
-## v0.4.2 - _March 17, 2018_
-
- * Consolidate all `console.log` calls into `logUtils` in the `@0xproject/utils` package (#452)
-
-## v0.4.0 - _March 3, 2018_
-
- * Use `ethers-contracts` as a backend to decode event args (#413)
- * Move web3 types from devDep to dep since required when using this package (#429)
-
-## v0.3.2 - _February 8, 2018_
-
- * Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
-
-## v0.3.0 - _February 4, 2018_
-
- * Fix a bug related to event signature collisions (argument indexes aren't included in event signatures) in the abi_decoder. The decoder used to throw on unknown events with identical signatures as a known event (except indexes). (#366)
-
-## v0.2.0 - _January 16, 2018_
-
- * Add `onError` parameter to `intervalUtils.setAsyncExcludingInterval` (#312)
- * Add `intervalUtils.setInterval` (#312)
diff --git a/packages/utils/README.md b/packages/utils/README.md
deleted file mode 100644
index 0b15f00c5..000000000
--- a/packages/utils/README.md
+++ /dev/null
@@ -1,84 +0,0 @@
-## @0x/utils
-
-Utils to be shared across 0x projects and packages
-
-## Installation
-
-```bash
-yarn add @0x/utils
-```
-
-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 { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0x/utils';
-```
-
-## Troubleshooting
-
-If you are still seeing TS type errors complaining about missing DOM types such as `Response`:
-
-```
-error TS2304: Cannot find name 'Response'.
-```
-
-Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.
-
-```
-"compilerOptions": {
- "lib": [..., "dom"],
-```
-
-## 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/utils yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/utils yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
diff --git a/packages/utils/coverage/.gitkeep b/packages/utils/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/utils/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/utils/package.json b/packages/utils/package.json
deleted file mode 100644
index b6be39210..000000000
--- a/packages/utils/package.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "name": "@0x/utils",
- "version": "3.0.1",
- "engines": {
- "node": ">=6.12"
- },
- "description": "0x TS utils",
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "clean": "shx rm -rf lib",
- "lint": "tslint --format stylish --project .",
- "test": "yarn run_mocha",
- "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"
- },
- "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/utils/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/detect-node": "2.0.0",
- "@types/lodash": "4.14.104",
- "@types/mocha": "^2.2.42",
- "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",
- "shx": "^0.2.2",
- "tslint": "5.11.0",
- "typescript": "3.0.1"
- },
- "dependencies": {
- "@0x/types": "^1.5.2",
- "@0x/typescript-typings": "^3.0.8",
- "@types/node": "*",
- "abortcontroller-polyfill": "^1.1.9",
- "bignumber.js": "~8.0.2",
- "chalk": "^2.4.1",
- "detect-node": "2.0.3",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "ethers": "~4.0.4",
- "isomorphic-fetch": "^2.2.1",
- "js-sha3": "^0.7.0",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/utils/src/abi_decoder.ts b/packages/utils/src/abi_decoder.ts
deleted file mode 100644
index 28b6418d8..000000000
--- a/packages/utils/src/abi_decoder.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import {
- AbiDefinition,
- AbiType,
- DecodedLogArgs,
- EventAbi,
- EventParameter,
- LogEntry,
- LogWithDecodedArgs,
- RawLog,
- SolidityTypes,
-} from 'ethereum-types';
-import * as ethers from 'ethers';
-import * as _ from 'lodash';
-
-import { addressUtils } from './address_utils';
-import { BigNumber } from './configured_bignumber';
-
-/**
- * AbiDecoder allows you to decode event logs given a set of supplied contract ABI's. It takes the contract's event
- * signature from the ABI and attempts to decode the logs using it.
- */
-export class AbiDecoder {
- private readonly _methodIds: { [signatureHash: string]: { [numIndexedArgs: number]: EventAbi } } = {};
- /**
- * Instantiate an AbiDecoder
- * @param abiArrays An array of contract ABI's
- * @return AbiDecoder instance
- */
- constructor(abiArrays: AbiDefinition[][]) {
- _.forEach(abiArrays, this.addABI.bind(this));
- }
- /**
- * Attempt to decode a log given the ABI's the AbiDecoder knows about.
- * @param log The log to attempt to decode
- * @return The decoded log if the requisite ABI was available. Otherwise the log unaltered.
- */
- public tryToDecodeLogOrNoop<ArgsType extends DecodedLogArgs>(log: LogEntry): LogWithDecodedArgs<ArgsType> | RawLog {
- const methodId = log.topics[0];
- const numIndexedArgs = log.topics.length - 1;
- if (_.isUndefined(this._methodIds[methodId]) || _.isUndefined(this._methodIds[methodId][numIndexedArgs])) {
- return log;
- }
- const event = this._methodIds[methodId][numIndexedArgs];
- const ethersInterface = new ethers.utils.Interface([event]);
- const decodedParams: DecodedLogArgs = {};
- let topicsIndex = 1;
-
- let decodedData: any[];
- try {
- decodedData = ethersInterface.events[event.name].decode(log.data);
- } catch (error) {
- if (error.code === ethers.errors.INVALID_ARGUMENT) {
- // Because we index events by Method ID, and Method IDs are derived from the method
- // name and the input parameters, it's possible that the return value of the event
- // does not match our ABI. If that's the case, then ethers will throw an error
- // when we try to parse the event. We handle that case here by returning the log rather
- // than throwing an error.
- return log;
- }
- throw error;
- }
- let didFailToDecode = false;
- _.forEach(event.inputs, (param: EventParameter, i: number) => {
- // Indexed parameters are stored in topics. Non-indexed ones in decodedData
- let value: BigNumber | string | number = param.indexed ? log.topics[topicsIndex++] : decodedData[i];
- if (_.isUndefined(value)) {
- didFailToDecode = true;
- return;
- }
- if (param.type === SolidityTypes.Address) {
- const baseHex = 16;
- value = addressUtils.padZeros(new BigNumber((value as string).toLowerCase()).toString(baseHex));
- } else if (param.type === SolidityTypes.Uint256 || param.type === SolidityTypes.Uint) {
- value = new BigNumber(value);
- } else if (param.type === SolidityTypes.Uint8) {
- value = new BigNumber(value).toNumber();
- }
- decodedParams[param.name] = value;
- });
-
- if (didFailToDecode) {
- return log;
- } else {
- return {
- ...log,
- event: event.name,
- args: decodedParams,
- };
- }
- }
- /**
- * Add additional ABI definitions to the AbiDecoder
- * @param abiArray An array of ABI definitions to add to the AbiDecoder
- */
- public addABI(abiArray: AbiDefinition[]): void {
- if (_.isUndefined(abiArray)) {
- return;
- }
- const ethersInterface = new ethers.utils.Interface(abiArray);
- _.map(abiArray, (abi: AbiDefinition) => {
- if (abi.type === AbiType.Event) {
- // tslint:disable-next-line:no-unnecessary-type-assertion
- const eventAbi = abi as EventAbi;
- const topic = ethersInterface.events[eventAbi.name].topic;
- const numIndexedArgs = _.reduce(eventAbi.inputs, (sum, input) => (input.indexed ? sum + 1 : sum), 0);
- this._methodIds[topic] = {
- ...this._methodIds[topic],
- [numIndexedArgs]: eventAbi,
- };
- }
- });
- }
-}
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/data_type.ts b/packages/utils/src/abi_encoder/abstract_data_types/data_type.ts
deleted file mode 100644
index f23324721..000000000
--- a/packages/utils/src/abi_encoder/abstract_data_types/data_type.ts
+++ /dev/null
@@ -1,76 +0,0 @@
-import { DataItem } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { Calldata } from '../calldata/calldata';
-import { CalldataBlock } from '../calldata/calldata_block';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-import { DecodingRules, EncodingRules } from '../utils/rules';
-
-import { DataTypeFactory } from './interfaces';
-
-export abstract class DataType {
- private readonly _dataItem: DataItem;
- private readonly _factory: DataTypeFactory;
-
- constructor(dataItem: DataItem, factory: DataTypeFactory) {
- this._dataItem = dataItem;
- this._factory = factory;
- }
-
- public getDataItem(): DataItem {
- return this._dataItem;
- }
-
- public getFactory(): DataTypeFactory {
- return this._factory;
- }
-
- public encode(value: any, rules?: EncodingRules, selector?: string): string {
- const rules_ = _.isUndefined(rules) ? constants.DEFAULT_ENCODING_RULES : rules;
- const calldata = new Calldata(rules_);
- if (!_.isUndefined(selector)) {
- calldata.setSelector(selector);
- }
- const block = this.generateCalldataBlock(value);
- calldata.setRoot(block);
- const encodedCalldata = calldata.toString();
- return encodedCalldata;
- }
-
- public decode(calldata: string, rules?: DecodingRules, selector?: string): any {
- if (!_.isUndefined(selector) && !_.startsWith(calldata, selector)) {
- throw new Error(
- `Tried to decode calldata, but it was missing the function selector. Expected prefix '${selector}'. Got '${calldata}'.`,
- );
- }
- const hasSelector = !_.isUndefined(selector);
- const rawCalldata = new RawCalldata(calldata, hasSelector);
- const rules_ = _.isUndefined(rules) ? constants.DEFAULT_DECODING_RULES : rules;
- const value = this.generateValue(rawCalldata, rules_);
- return value;
- }
-
- public decodeAsArray(returndata: string, rules?: DecodingRules): any[] {
- const value = this.decode(returndata, rules);
- const valuesAsArray = _.isObject(value) ? _.values(value) : [value];
- return valuesAsArray;
- }
-
- public getSignature(isDetailed?: boolean): string {
- if (_.isEmpty(this._dataItem.name) || !isDetailed) {
- return this.getSignatureType();
- }
- const name = this.getDataItem().name;
- const lastIndexOfScopeDelimiter = name.lastIndexOf('.');
- const isScopedName = !_.isUndefined(lastIndexOfScopeDelimiter) && lastIndexOfScopeDelimiter > 0;
- const shortName = isScopedName ? name.substr((lastIndexOfScopeDelimiter as number) + 1) : name;
- const detailedSignature = `${shortName} ${this.getSignatureType()}`;
- return detailedSignature;
- }
-
- public abstract generateCalldataBlock(value: any, parentBlock?: CalldataBlock): CalldataBlock;
- public abstract generateValue(calldata: RawCalldata, rules: DecodingRules): any;
- public abstract getSignatureType(): string;
- public abstract isStatic(): boolean;
-}
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts b/packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts
deleted file mode 100644
index 2f2f60871..000000000
--- a/packages/utils/src/abi_encoder/abstract_data_types/interfaces.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import { DataItem } from 'ethereum-types';
-
-import { RawCalldata } from '../calldata/raw_calldata';
-
-import { DataType } from './data_type';
-
-export interface DataTypeFactory {
- create: (dataItem: DataItem, parentDataType?: DataType) => DataType;
-}
-
-export interface DataTypeStaticInterface {
- matchType: (type: string) => boolean;
- encodeValue: (value: any) => Buffer;
- decodeValue: (rawCalldata: RawCalldata) => any;
-}
-
-export interface MemberIndexByName {
- [key: string]: number;
-}
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/types/blob.ts b/packages/utils/src/abi_encoder/abstract_data_types/types/blob.ts
deleted file mode 100644
index a091e55b9..000000000
--- a/packages/utils/src/abi_encoder/abstract_data_types/types/blob.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { DataItem } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BlobCalldataBlock } from '../../calldata/blocks/blob';
-import { CalldataBlock } from '../../calldata/calldata_block';
-import { RawCalldata } from '../../calldata/raw_calldata';
-import { DecodingRules } from '../../utils/rules';
-
-import { DataType } from '../data_type';
-import { DataTypeFactory } from '../interfaces';
-
-export abstract class AbstractBlobDataType extends DataType {
- protected _sizeKnownAtCompileTime: boolean;
-
- public constructor(dataItem: DataItem, factory: DataTypeFactory, sizeKnownAtCompileTime: boolean) {
- super(dataItem, factory);
- this._sizeKnownAtCompileTime = sizeKnownAtCompileTime;
- }
-
- public generateCalldataBlock(value: any, parentBlock?: CalldataBlock): BlobCalldataBlock {
- const encodedValue = this.encodeValue(value);
- const name = this.getDataItem().name;
- const signature = this.getSignature();
- const parentName = _.isUndefined(parentBlock) ? '' : parentBlock.getName();
- const block = new BlobCalldataBlock(name, signature, parentName, encodedValue);
- return block;
- }
-
- public generateValue(calldata: RawCalldata, rules: DecodingRules): any {
- const value = this.decodeValue(calldata);
- return value;
- }
-
- public isStatic(): boolean {
- return this._sizeKnownAtCompileTime;
- }
-
- public abstract encodeValue(value: any): Buffer;
- public abstract decodeValue(calldata: RawCalldata): any;
-}
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/types/pointer.ts b/packages/utils/src/abi_encoder/abstract_data_types/types/pointer.ts
deleted file mode 100644
index 0f3c55280..000000000
--- a/packages/utils/src/abi_encoder/abstract_data_types/types/pointer.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { DataItem } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { PointerCalldataBlock } from '../../calldata/blocks/pointer';
-import { CalldataBlock } from '../../calldata/calldata_block';
-import { RawCalldata } from '../../calldata/raw_calldata';
-import { constants } from '../../utils/constants';
-import { DecodingRules } from '../../utils/rules';
-
-import { DataType } from '../data_type';
-import { DataTypeFactory } from '../interfaces';
-
-export abstract class AbstractPointerDataType extends DataType {
- protected _destination: DataType;
- protected _parent: DataType;
-
- public constructor(dataItem: DataItem, factory: DataTypeFactory, destination: DataType, parent: DataType) {
- super(dataItem, factory);
- this._destination = destination;
- this._parent = parent;
- }
-
- public generateCalldataBlock(value: any, parentBlock?: CalldataBlock): PointerCalldataBlock {
- if (_.isUndefined(parentBlock)) {
- throw new Error(`DependentDataType requires a parent block to generate its block`);
- }
- const destinationBlock = this._destination.generateCalldataBlock(value, parentBlock);
- const name = this.getDataItem().name;
- const signature = this.getSignature();
- const parentName = parentBlock.getName();
- const block = new PointerCalldataBlock(name, signature, parentName, destinationBlock, parentBlock);
- return block;
- }
-
- public generateValue(calldata: RawCalldata, rules: DecodingRules): any {
- const destinationOffsetBuf = calldata.popWord();
- const destinationOffsetHex = ethUtil.bufferToHex(destinationOffsetBuf);
- const destinationOffsetRelative = parseInt(destinationOffsetHex, constants.HEX_BASE);
- const destinationOffsetAbsolute = calldata.toAbsoluteOffset(destinationOffsetRelative);
- const currentOffset = calldata.getOffset();
- calldata.setOffset(destinationOffsetAbsolute);
- const value = this._destination.generateValue(calldata, rules);
- calldata.setOffset(currentOffset);
- return value;
- }
-
- // Disable prefer-function-over-method for inherited abstract method.
- /* tslint:disable prefer-function-over-method */
- public isStatic(): boolean {
- return true;
- }
- /* tslint:enable prefer-function-over-method */
-}
diff --git a/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts b/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts
deleted file mode 100644
index 2c6c4b0f6..000000000
--- a/packages/utils/src/abi_encoder/abstract_data_types/types/set.ts
+++ /dev/null
@@ -1,224 +0,0 @@
-import { ObjectMap } from '@0x/types';
-import { DataItem } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { BigNumber } from '../../../configured_bignumber';
-import { SetCalldataBlock } from '../../calldata/blocks/set';
-import { CalldataBlock } from '../../calldata/calldata_block';
-import { RawCalldata } from '../../calldata/raw_calldata';
-import { constants } from '../../utils/constants';
-import { DecodingRules } from '../../utils/rules';
-
-import { DataType } from '../data_type';
-import { DataTypeFactory, MemberIndexByName } from '../interfaces';
-
-import { AbstractPointerDataType } from './pointer';
-
-export abstract class AbstractSetDataType extends DataType {
- protected readonly _arrayLength: number | undefined;
- protected readonly _arrayElementType: string | undefined;
- private readonly _memberIndexByName: MemberIndexByName;
- private readonly _members: DataType[];
- private readonly _isArray: boolean;
-
- public constructor(
- dataItem: DataItem,
- factory: DataTypeFactory,
- isArray: boolean = false,
- arrayLength?: number,
- arrayElementType?: string,
- ) {
- super(dataItem, factory);
- this._memberIndexByName = {};
- this._members = [];
- this._isArray = isArray;
- this._arrayLength = arrayLength;
- this._arrayElementType = arrayElementType;
- if (isArray && !_.isUndefined(arrayLength)) {
- [this._members, this._memberIndexByName] = this._createMembersWithLength(dataItem, arrayLength);
- } else if (!isArray) {
- [this._members, this._memberIndexByName] = this._createMembersWithKeys(dataItem);
- }
- }
-
- public generateCalldataBlock(value: any[] | object, parentBlock?: CalldataBlock): SetCalldataBlock {
- const block =
- value instanceof Array
- ? this._generateCalldataBlockFromArray(value, parentBlock)
- : this._generateCalldataBlockFromObject(value, parentBlock);
- return block;
- }
-
- public generateValue(calldata: RawCalldata, rules: DecodingRules): any[] | object {
- let members = this._members;
- // Case 1: This is an array of undefined length, which means that `this._members` was not
- // populated in the constructor. So we must construct the set of members now.
- if (this._isArray && _.isUndefined(this._arrayLength)) {
- const arrayLengthBuf = calldata.popWord();
- const arrayLengthHex = ethUtil.bufferToHex(arrayLengthBuf);
- const arrayLength = new BigNumber(arrayLengthHex, constants.HEX_BASE);
- [members] = this._createMembersWithLength(this.getDataItem(), arrayLength.toNumber());
- }
- // Create a new scope in the calldata, before descending into the members of this set.
- calldata.startScope();
- let value: any[] | object;
- if (rules.shouldConvertStructsToObjects && !this._isArray) {
- // Construct an object with values for each member of the set.
- value = {};
- _.each(this._memberIndexByName, (idx: number, key: string) => {
- const member = this._members[idx];
- const memberValue = member.generateValue(calldata, rules);
- (value as { [key: string]: any })[key] = memberValue;
- });
- } else {
- // Construct an array with values for each member of the set.
- value = [];
- _.each(members, (member: DataType, idx: number) => {
- const memberValue = member.generateValue(calldata, rules);
- (value as any[]).push(memberValue);
- });
- }
- // Close this scope and return tetheh value.
- calldata.endScope();
- return value;
- }
-
- public isStatic(): boolean {
- // An array with an undefined length is never static.
- if (this._isArray && _.isUndefined(this._arrayLength)) {
- return false;
- }
- // If any member of the set is a pointer then the set is not static.
- const dependentMember = _.find(this._members, (member: DataType) => {
- return member instanceof AbstractPointerDataType;
- });
- const isStatic = _.isUndefined(dependentMember);
- return isStatic;
- }
-
- protected _generateCalldataBlockFromArray(value: any[], parentBlock?: CalldataBlock): SetCalldataBlock {
- // Sanity check: if the set has a defined length then `value` must have the same length.
- if (!_.isUndefined(this._arrayLength) && value.length !== this._arrayLength) {
- throw new Error(
- `Expected array of ${JSON.stringify(
- this._arrayLength,
- )} elements, but got array of length ${JSON.stringify(value.length)}`,
- );
- }
- // Create a new calldata block for this set.
- const parentName = _.isUndefined(parentBlock) ? '' : parentBlock.getName();
- const block = new SetCalldataBlock(this.getDataItem().name, this.getSignature(), parentName);
- // If this set has an undefined length then set its header to be the number of elements.
- let members = this._members;
- if (this._isArray && _.isUndefined(this._arrayLength)) {
- [members] = this._createMembersWithLength(this.getDataItem(), value.length);
- const lenBuf = ethUtil.setLengthLeft(
- ethUtil.toBuffer(`0x${value.length.toString(constants.HEX_BASE)}`),
- constants.EVM_WORD_WIDTH_IN_BYTES,
- );
- block.setHeader(lenBuf);
- }
- // Create blocks for members of set.
- const memberCalldataBlocks: CalldataBlock[] = [];
- _.each(members, (member: DataType, idx: number) => {
- const memberBlock = member.generateCalldataBlock(value[idx], block);
- memberCalldataBlocks.push(memberBlock);
- });
- block.setMembers(memberCalldataBlocks);
- return block;
- }
-
- protected _generateCalldataBlockFromObject(obj: object, parentBlock?: CalldataBlock): SetCalldataBlock {
- // Create a new calldata block for this set.
- const parentName = _.isUndefined(parentBlock) ? '' : parentBlock.getName();
- const block = new SetCalldataBlock(this.getDataItem().name, this.getSignature(), parentName);
- // Create blocks for members of set.
- const memberCalldataBlocks: CalldataBlock[] = [];
- _.forEach(this._memberIndexByName, (memberIndex: number, memberName: string) => {
- if (!(memberName in obj)) {
- throw new Error(
- `Could not assign tuple to object: missing key '${memberName}' in object ${JSON.stringify(obj)}`,
- );
- }
- const memberValue: any = (obj as ObjectMap<any>)[memberName];
- const memberBlock = this._members[memberIndex].generateCalldataBlock(memberValue, block);
- memberCalldataBlocks.push(memberBlock);
- });
- // Associate member blocks with Set block.
- block.setMembers(memberCalldataBlocks);
- return block;
- }
-
- protected _computeSignatureOfMembers(isDetailed?: boolean): string {
- // Compute signature of members
- let signature = `(`;
- _.each(this._members, (member: DataType, i: number) => {
- signature += member.getSignature(isDetailed);
- if (i < this._members.length - 1) {
- signature += ',';
- }
- });
- signature += ')';
- return signature;
- }
-
- private _createMembersWithKeys(dataItem: DataItem): [DataType[], MemberIndexByName] {
- // Sanity check
- if (_.isUndefined(dataItem.components)) {
- throw new Error(
- `Tried to create a set using key/value pairs, but no components were defined by the input DataItem '${
- dataItem.name
- }'.`,
- );
- }
- // Create one member for each component of `dataItem`
- const members: DataType[] = [];
- const memberIndexByName: MemberIndexByName = {};
- const memberNames: string[] = [];
- _.each(dataItem.components, (memberItem: DataItem) => {
- // If a component with `name` already exists then
- // rename to `name_nameIdx` to avoid naming conflicts.
- let memberName = memberItem.name;
- let nameIdx = 0;
- while (_.includes(memberNames, memberName) || _.isEmpty(memberName)) {
- nameIdx++;
- memberName = `${memberItem.name}_${nameIdx}`;
- }
- memberNames.push(memberName);
- const childDataItem: DataItem = {
- type: memberItem.type,
- name: `${dataItem.name}.${memberName}`,
- };
- const components = memberItem.components;
- if (!_.isUndefined(components)) {
- childDataItem.components = components;
- }
- const child = this.getFactory().create(childDataItem, this);
- memberIndexByName[memberName] = members.length;
- members.push(child);
- });
- return [members, memberIndexByName];
- }
-
- private _createMembersWithLength(dataItem: DataItem, length: number): [DataType[], MemberIndexByName] {
- // Create `length` members, deriving the type from `dataItem`
- const members: DataType[] = [];
- const memberIndexByName: MemberIndexByName = {};
- const range = _.range(length);
- _.each(range, (idx: number) => {
- const memberDataItem: DataItem = {
- type: _.isUndefined(this._arrayElementType) ? '' : this._arrayElementType,
- name: `${dataItem.name}[${idx.toString(constants.DEC_BASE)}]`,
- };
- const components = dataItem.components;
- if (!_.isUndefined(components)) {
- memberDataItem.components = components;
- }
- const memberType = this.getFactory().create(memberDataItem, this);
- memberIndexByName[idx.toString(constants.DEC_BASE)] = members.length;
- members.push(memberType);
- });
- return [members, memberIndexByName];
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/blocks/blob.ts b/packages/utils/src/abi_encoder/calldata/blocks/blob.ts
deleted file mode 100644
index 219ea6c61..000000000
--- a/packages/utils/src/abi_encoder/calldata/blocks/blob.ts
+++ /dev/null
@@ -1,20 +0,0 @@
-import { CalldataBlock } from '../calldata_block';
-
-export class BlobCalldataBlock extends CalldataBlock {
- private readonly _blob: Buffer;
-
- constructor(name: string, signature: string, parentName: string, blob: Buffer) {
- const headerSizeInBytes = 0;
- const bodySizeInBytes = blob.byteLength;
- super(name, signature, parentName, headerSizeInBytes, bodySizeInBytes);
- this._blob = blob;
- }
-
- public toBuffer(): Buffer {
- return this._blob;
- }
-
- public getRawData(): Buffer {
- return this._blob;
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts b/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts
deleted file mode 100644
index 72d6a3173..000000000
--- a/packages/utils/src/abi_encoder/calldata/blocks/pointer.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { constants } from '../../utils/constants';
-
-import { CalldataBlock } from '../calldata_block';
-
-export class PointerCalldataBlock extends CalldataBlock {
- public static readonly RAW_DATA_START = new Buffer('<');
- public static readonly RAW_DATA_END = new Buffer('>');
- private static readonly _DEPENDENT_PAYLOAD_SIZE_IN_BYTES = 32;
- private static readonly _EMPTY_HEADER_SIZE = 0;
- private readonly _parent: CalldataBlock;
- private readonly _dependency: CalldataBlock;
- private _aliasFor: CalldataBlock | undefined;
-
- constructor(name: string, signature: string, parentName: string, dependency: CalldataBlock, parent: CalldataBlock) {
- const headerSizeInBytes = PointerCalldataBlock._EMPTY_HEADER_SIZE;
- const bodySizeInBytes = PointerCalldataBlock._DEPENDENT_PAYLOAD_SIZE_IN_BYTES;
- super(name, signature, parentName, headerSizeInBytes, bodySizeInBytes);
- this._parent = parent;
- this._dependency = dependency;
- this._aliasFor = undefined;
- }
-
- public toBuffer(): Buffer {
- const destinationOffset = !_.isUndefined(this._aliasFor)
- ? this._aliasFor.getOffsetInBytes()
- : this._dependency.getOffsetInBytes();
- const parentOffset = this._parent.getOffsetInBytes();
- const parentHeaderSize = this._parent.getHeaderSizeInBytes();
- const pointer: number = destinationOffset - (parentOffset + parentHeaderSize);
- const pointerHex = `0x${pointer.toString(constants.HEX_BASE)}`;
- const pointerBuf = ethUtil.toBuffer(pointerHex);
- const pointerBufPadded = ethUtil.setLengthLeft(pointerBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- return pointerBufPadded;
- }
-
- public getDependency(): CalldataBlock {
- return this._dependency;
- }
-
- public setAlias(block: CalldataBlock): void {
- this._aliasFor = block;
- this._setName(`${this.getName()} (alias for ${block.getName()})`);
- }
-
- public getAlias(): CalldataBlock | undefined {
- return this._aliasFor;
- }
-
- public getRawData(): Buffer {
- const dependencyRawData = this._dependency.getRawData();
- const rawDataComponents: Buffer[] = [];
- rawDataComponents.push(PointerCalldataBlock.RAW_DATA_START);
- rawDataComponents.push(dependencyRawData);
- rawDataComponents.push(PointerCalldataBlock.RAW_DATA_END);
- const rawData = Buffer.concat(rawDataComponents);
- return rawData;
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/blocks/set.ts b/packages/utils/src/abi_encoder/calldata/blocks/set.ts
deleted file mode 100644
index d1abc4986..000000000
--- a/packages/utils/src/abi_encoder/calldata/blocks/set.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import * as _ from 'lodash';
-
-import { CalldataBlock } from '../calldata_block';
-
-export class SetCalldataBlock extends CalldataBlock {
- private _header: Buffer | undefined;
- private _members: CalldataBlock[];
-
- constructor(name: string, signature: string, parentName: string) {
- super(name, signature, parentName, 0, 0);
- this._members = [];
- this._header = undefined;
- }
-
- public getRawData(): Buffer {
- const rawDataComponents: Buffer[] = [];
- if (!_.isUndefined(this._header)) {
- rawDataComponents.push(this._header);
- }
- _.each(this._members, (member: CalldataBlock) => {
- const memberBuffer = member.getRawData();
- rawDataComponents.push(memberBuffer);
- });
- const rawData = Buffer.concat(rawDataComponents);
- return rawData;
- }
-
- public setMembers(members: CalldataBlock[]): void {
- this._members = members;
- }
-
- public setHeader(header: Buffer): void {
- this._setHeaderSize(header.byteLength);
- this._header = header;
- }
-
- public toBuffer(): Buffer {
- if (!_.isUndefined(this._header)) {
- return this._header;
- }
- return new Buffer('');
- }
-
- public getMembers(): CalldataBlock[] {
- return this._members;
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/calldata.ts b/packages/utils/src/abi_encoder/calldata/calldata.ts
deleted file mode 100644
index b08fb71ce..000000000
--- a/packages/utils/src/abi_encoder/calldata/calldata.ts
+++ /dev/null
@@ -1,245 +0,0 @@
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { constants } from '../utils/constants';
-import { EncodingRules } from '../utils/rules';
-
-import { PointerCalldataBlock } from './blocks/pointer';
-import { SetCalldataBlock } from './blocks/set';
-import { CalldataBlock } from './calldata_block';
-import { CalldataIterator, ReverseCalldataIterator } from './iterator';
-
-export class Calldata {
- private readonly _rules: EncodingRules;
- private _selector: string;
- private _root: CalldataBlock | undefined;
-
- public constructor(rules: EncodingRules) {
- this._rules = rules;
- this._selector = '';
- this._root = undefined;
- }
- /**
- * Sets the root calldata block. This block usually corresponds to a Method.
- */
- public setRoot(block: CalldataBlock): void {
- this._root = block;
- }
- /**
- * Sets the selector to be prepended onto the calldata.
- * If the root block was created by a Method then a selector will likely be set.
- */
- public setSelector(selector: string): void {
- if (!_.startsWith(selector, '0x')) {
- throw new Error(`Expected selector to be hex. Missing prefix '0x'`);
- } else if (selector.length !== constants.HEX_SELECTOR_LENGTH_IN_CHARS) {
- throw new Error(`Invalid selector '${selector}'`);
- }
- this._selector = selector;
- }
- /**
- * Iterates through the calldata blocks, starting from the root block, to construct calldata as a hex string.
- * If the `optimize` flag is set then this calldata will be condensed, to save gas.
- * If the `annotate` flag is set then this will return human-readable calldata.
- * If the `annotate` flag is *not* set then this will return EVM-compatible calldata.
- */
- public toString(): string {
- // Sanity check: root block must be set
- if (_.isUndefined(this._root)) {
- throw new Error('expected root');
- }
- // Optimize, if flag set
- if (this._rules.shouldOptimize) {
- this._optimize();
- }
- // Set offsets
- const iterator = new CalldataIterator(this._root);
- let offset = 0;
- for (const block of iterator) {
- block.setOffset(offset);
- offset += block.getSizeInBytes();
- }
- // Generate hex string
- const hexString = this._rules.shouldAnnotate
- ? this._toHumanReadableCallData()
- : this._toEvmCompatibeCallDataHex();
- return hexString;
- }
- /**
- * There are three types of calldata blocks: Blob, Set and Pointer.
- * Scenarios arise where distinct pointers resolve to identical values.
- * We optimize by keeping only one such instance of the identical value, and redirecting all pointers here.
- * We keep the last such duplicate value because pointers can only be positive (they cannot point backwards).
- *
- * Example #1:
- * function f(string[], string[])
- * f(["foo", "bar", "blitz"], ["foo", "bar", "blitz"])
- * The array ["foo", "bar", "blitz"] will only be included in the calldata once.
- *
- * Example #2:
- * function f(string[], string)
- * f(["foo", "bar", "blitz"], "foo")
- * The string "foo" will only be included in the calldata once.
- *
- * Example #3:
- * function f((string, uint, bytes), string, uint, bytes)
- * f(("foo", 5, "0x05"), "foo", 5, "0x05")
- * The string "foo" and bytes "0x05" will only be included in the calldata once.
- * The duplicate `uint 5` values cannot be optimized out because they are static values (no pointer points to them).
- *
- * @TODO #1:
- * This optimization strategy handles blocks that are exact duplicates of one another.
- * But what if some block is a combination of two other blocks? Or a subset of another block?
- * This optimization problem is not much different from the current implemetation.
- * Instead of tracking "observed" hashes, at each node we would simply do pattern-matching on the calldata.
- * This strategy would be applied after assigning offsets to the tree, rather than before (as in this strategy).
- * Note that one consequence of this strategy is pointers may resolve to offsets that are not word-aligned.
- * This shouldn't be a problem but further investigation should be done.
- *
- * @TODO #2:
- * To be done as a follow-up to @TODO #1.
- * Since we optimize from the bottom-up, we could be affecting the outcome of a later potential optimization.
- * For example, what if by removing one duplicate value we miss out on optimizing another block higher in the tree.
- * To handle this case, at each node we can store a candidate optimization in a priority queue (sorted by calldata size).
- * At the end of traversing the tree, the candidate at the front of the queue will be the most optimal output.
- *
- */
- private _optimize(): void {
- // Step 1/1 Create a reverse iterator (starts from the end of the calldata to the beginning)
- if (_.isUndefined(this._root)) {
- throw new Error('expected root');
- }
- const iterator = new ReverseCalldataIterator(this._root);
- // Step 2/2 Iterate over each block, keeping track of which blocks have been seen and pruning redundant blocks.
- const blocksByHash: { [key: string]: CalldataBlock } = {};
- for (const block of iterator) {
- // If a block is a pointer and its value has already been observed, then update
- // the pointer to resolve to the existing value.
- if (block instanceof PointerCalldataBlock) {
- const dependencyBlockHashBuf = block.getDependency().computeHash();
- const dependencyBlockHash = ethUtil.bufferToHex(dependencyBlockHashBuf);
- if (dependencyBlockHash in blocksByHash) {
- const blockWithSameHash = blocksByHash[dependencyBlockHash];
- if (blockWithSameHash !== block.getDependency()) {
- block.setAlias(blockWithSameHash);
- }
- }
- continue;
- }
- // This block has not been seen. Record its hash.
- const blockHashBuf = block.computeHash();
- const blockHash = ethUtil.bufferToHex(blockHashBuf);
- if (!(blockHash in blocksByHash)) {
- blocksByHash[blockHash] = block;
- }
- }
- }
- private _toEvmCompatibeCallDataHex(): string {
- // Sanity check: must have a root block.
- if (_.isUndefined(this._root)) {
- throw new Error('expected root');
- }
- // Construct an array of buffers (one buffer for each block).
- const selectorBuffer = ethUtil.toBuffer(this._selector);
- const valueBufs: Buffer[] = [selectorBuffer];
- const iterator = new CalldataIterator(this._root);
- for (const block of iterator) {
- valueBufs.push(block.toBuffer());
- }
- // Create hex from buffer array.
- const combinedBuffers = Buffer.concat(valueBufs);
- const hexValue = ethUtil.bufferToHex(combinedBuffers);
- return hexValue;
- }
- /**
- * Returns human-readable calldata.
- *
- * Example:
- * simpleFunction(string[], string[])
- * strings = ["Hello", "World"]
- * simpleFunction(strings, strings)
- *
- * Output:
- * 0xbb4f12e3
- * ### simpleFunction
- * 0x0 0000000000000000000000000000000000000000000000000000000000000040 ptr<array1> (alias for array2)
- * 0x20 0000000000000000000000000000000000000000000000000000000000000040 ptr<array2>
- *
- * 0x40 0000000000000000000000000000000000000000000000000000000000000002 ### array2
- * 0x60 0000000000000000000000000000000000000000000000000000000000000040 ptr<array2[0]>
- * 0x80 0000000000000000000000000000000000000000000000000000000000000080 ptr<array2[1]>
- * 0xa0 0000000000000000000000000000000000000000000000000000000000000005 array2[0]
- * 0xc0 48656c6c6f000000000000000000000000000000000000000000000000000000
- * 0xe0 0000000000000000000000000000000000000000000000000000000000000005 array2[1]
- * 0x100 576f726c64000000000000000000000000000000000000000000000000000000
- */
- private _toHumanReadableCallData(): string {
- // Sanity check: must have a root block.
- if (_.isUndefined(this._root)) {
- throw new Error('expected root');
- }
- // Constants for constructing annotated string
- const offsetPadding = 10;
- const valuePadding = 74;
- const namePadding = 80;
- const evmWordStartIndex = 0;
- const emptySize = 0;
- // Construct annotated calldata
- let hexValue = `${this._selector}`;
- let offset = 0;
- const functionName: string = this._root.getName();
- const iterator = new CalldataIterator(this._root);
- for (const block of iterator) {
- // Process each block 1 word at a time
- const size = block.getSizeInBytes();
- const name = block.getName();
- const parentName = block.getParentName();
- const prettyName = name.replace(`${parentName}.`, '').replace(`${functionName}.`, '');
- // Resulting line will be <offsetStr><valueStr><nameStr>
- let offsetStr = '';
- let valueStr = '';
- let nameStr = '';
- let lineStr = '';
- if (size === emptySize) {
- // This is a Set block with no header.
- // For example, a tuple or an array with a defined length.
- offsetStr = ' '.repeat(offsetPadding);
- valueStr = ' '.repeat(valuePadding);
- nameStr = `### ${prettyName.padEnd(namePadding)}`;
- lineStr = `\n${offsetStr}${valueStr}${nameStr}`;
- } else {
- // This block has at least one word of value.
- offsetStr = `0x${offset.toString(constants.HEX_BASE)}`.padEnd(offsetPadding);
- valueStr = ethUtil
- .stripHexPrefix(
- ethUtil.bufferToHex(
- block.toBuffer().slice(evmWordStartIndex, constants.EVM_WORD_WIDTH_IN_BYTES),
- ),
- )
- .padEnd(valuePadding);
- if (block instanceof SetCalldataBlock) {
- nameStr = `### ${prettyName.padEnd(namePadding)}`;
- lineStr = `\n${offsetStr}${valueStr}${nameStr}`;
- } else {
- nameStr = ` ${prettyName.padEnd(namePadding)}`;
- lineStr = `${offsetStr}${valueStr}${nameStr}`;
- }
- }
- // This block has a value that is more than 1 word.
- for (let j = constants.EVM_WORD_WIDTH_IN_BYTES; j < size; j += constants.EVM_WORD_WIDTH_IN_BYTES) {
- offsetStr = `0x${(offset + j).toString(constants.HEX_BASE)}`.padEnd(offsetPadding);
- valueStr = ethUtil
- .stripHexPrefix(
- ethUtil.bufferToHex(block.toBuffer().slice(j, j + constants.EVM_WORD_WIDTH_IN_BYTES)),
- )
- .padEnd(valuePadding);
- nameStr = ' '.repeat(namePadding);
- lineStr = `${lineStr}\n${offsetStr}${valueStr}${nameStr}`;
- }
- // Append to hex value
- hexValue = `${hexValue}\n${lineStr}`;
- offset += size;
- }
- return hexValue;
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/calldata_block.ts b/packages/utils/src/abi_encoder/calldata/calldata_block.ts
deleted file mode 100644
index 35bd994e5..000000000
--- a/packages/utils/src/abi_encoder/calldata/calldata_block.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as ethUtil from 'ethereumjs-util';
-
-export abstract class CalldataBlock {
- private readonly _signature: string;
- private readonly _parentName: string;
- private _name: string;
- private _offsetInBytes: number;
- private _headerSizeInBytes: number;
- private _bodySizeInBytes: number;
-
- constructor(
- name: string,
- signature: string,
- parentName: string,
- headerSizeInBytes: number,
- bodySizeInBytes: number,
- ) {
- this._name = name;
- this._signature = signature;
- this._parentName = parentName;
- this._offsetInBytes = 0;
- this._headerSizeInBytes = headerSizeInBytes;
- this._bodySizeInBytes = bodySizeInBytes;
- }
-
- protected _setHeaderSize(headerSizeInBytes: number): void {
- this._headerSizeInBytes = headerSizeInBytes;
- }
-
- protected _setBodySize(bodySizeInBytes: number): void {
- this._bodySizeInBytes = bodySizeInBytes;
- }
-
- protected _setName(name: string): void {
- this._name = name;
- }
-
- public getName(): string {
- return this._name;
- }
-
- public getParentName(): string {
- return this._parentName;
- }
-
- public getSignature(): string {
- return this._signature;
- }
- public getHeaderSizeInBytes(): number {
- return this._headerSizeInBytes;
- }
-
- public getBodySizeInBytes(): number {
- return this._bodySizeInBytes;
- }
-
- public getSizeInBytes(): number {
- return this.getHeaderSizeInBytes() + this.getBodySizeInBytes();
- }
-
- public getOffsetInBytes(): number {
- return this._offsetInBytes;
- }
-
- public setOffset(offsetInBytes: number): void {
- this._offsetInBytes = offsetInBytes;
- }
-
- public computeHash(): Buffer {
- const rawData = this.getRawData();
- const hash = ethUtil.sha3(rawData);
- return hash;
- }
-
- public abstract toBuffer(): Buffer;
- public abstract getRawData(): Buffer;
-}
diff --git a/packages/utils/src/abi_encoder/calldata/iterator.ts b/packages/utils/src/abi_encoder/calldata/iterator.ts
deleted file mode 100644
index 333b32b4f..000000000
--- a/packages/utils/src/abi_encoder/calldata/iterator.ts
+++ /dev/null
@@ -1,114 +0,0 @@
-/* tslint:disable max-classes-per-file */
-import * as _ from 'lodash';
-
-import { Queue } from '../utils/queue';
-
-import { BlobCalldataBlock } from './blocks/blob';
-import { PointerCalldataBlock } from './blocks/pointer';
-import { SetCalldataBlock } from './blocks/set';
-import { CalldataBlock } from './calldata_block';
-
-/**
- * Iterator class for Calldata Blocks. Blocks follows the order
- * they should be put into calldata that is passed to he EVM.
- *
- * Example #1:
- * Let root = Set {
- * Blob{} A,
- * Pointer {
- * Blob{} a
- * } B,
- * Blob{} C
- * }
- * It will iterate as follows: [A, B, C, B.a]
- *
- * Example #2:
- * Let root = Set {
- * Blob{} A,
- * Pointer {
- * Blob{} a
- * Pointer {
- * Blob{} b
- * }
- * } B,
- * Pointer {
- * Blob{} c
- * } C
- * }
- * It will iterate as follows: [A, B, C, B.a, B.b, C.c]
- */
-abstract class BaseIterator implements Iterable<CalldataBlock> {
- protected readonly _root: CalldataBlock;
- protected readonly _queue: Queue<CalldataBlock>;
-
- private static _createQueue(block: CalldataBlock): Queue<CalldataBlock> {
- const queue = new Queue<CalldataBlock>();
- // Base case
- if (!(block instanceof SetCalldataBlock)) {
- queue.pushBack(block);
- return queue;
- }
- // This is a set; add members
- const set = block;
- _.eachRight(set.getMembers(), (member: CalldataBlock) => {
- queue.mergeFront(BaseIterator._createQueue(member));
- });
- // Add children
- _.each(set.getMembers(), (member: CalldataBlock) => {
- // Traverse child if it is a unique pointer.
- // A pointer that is an alias for another pointer is ignored.
- if (member instanceof PointerCalldataBlock && _.isUndefined(member.getAlias())) {
- const dependency = member.getDependency();
- queue.mergeBack(BaseIterator._createQueue(dependency));
- }
- });
- // Put set block at the front of the queue
- queue.pushFront(set);
- return queue;
- }
-
- public constructor(root: CalldataBlock) {
- this._root = root;
- this._queue = BaseIterator._createQueue(root);
- }
-
- public [Symbol.iterator](): { next: () => IteratorResult<CalldataBlock> } {
- return {
- next: () => {
- const nextBlock = this.nextBlock();
- if (!_.isUndefined(nextBlock)) {
- return {
- value: nextBlock,
- done: false,
- };
- }
- return {
- done: true,
- value: new BlobCalldataBlock('', '', '', new Buffer('')),
- };
- },
- };
- }
-
- public abstract nextBlock(): CalldataBlock | undefined;
-}
-
-export class CalldataIterator extends BaseIterator {
- public constructor(root: CalldataBlock) {
- super(root);
- }
-
- public nextBlock(): CalldataBlock | undefined {
- return this._queue.popFront();
- }
-}
-
-export class ReverseCalldataIterator extends BaseIterator {
- public constructor(root: CalldataBlock) {
- super(root);
- }
-
- public nextBlock(): CalldataBlock | undefined {
- return this._queue.popBack();
- }
-}
diff --git a/packages/utils/src/abi_encoder/calldata/raw_calldata.ts b/packages/utils/src/abi_encoder/calldata/raw_calldata.ts
deleted file mode 100644
index 189841989..000000000
--- a/packages/utils/src/abi_encoder/calldata/raw_calldata.ts
+++ /dev/null
@@ -1,82 +0,0 @@
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { constants } from '../utils/constants';
-import { Queue } from '../utils/queue';
-
-export class RawCalldata {
- private static readonly _INITIAL_OFFSET = 0;
- private readonly _value: Buffer;
- private readonly _selector: string;
- private readonly _scopes: Queue<number>;
- private _offset: number;
-
- public constructor(value: string | Buffer, hasSelector: boolean = true) {
- // Sanity check
- if (typeof value === 'string' && !_.startsWith(value, '0x')) {
- throw new Error(`Expected raw calldata to start with '0x'`);
- }
- // Construct initial values
- this._value = ethUtil.toBuffer(value);
- this._selector = '0x';
- this._scopes = new Queue<number>();
- this._scopes.pushBack(RawCalldata._INITIAL_OFFSET);
- this._offset = RawCalldata._INITIAL_OFFSET;
- // If there's a selector then slice it
- if (hasSelector) {
- const selectorBuf = this._value.slice(constants.HEX_SELECTOR_LENGTH_IN_BYTES);
- this._value = this._value.slice(constants.HEX_SELECTOR_LENGTH_IN_BYTES);
- this._selector = ethUtil.bufferToHex(selectorBuf);
- }
- }
-
- public popBytes(lengthInBytes: number): Buffer {
- const value = this._value.slice(this._offset, this._offset + lengthInBytes);
- this.setOffset(this._offset + lengthInBytes);
- return value;
- }
-
- public popWord(): Buffer {
- const wordInBytes = 32;
- return this.popBytes(wordInBytes);
- }
-
- public popWords(length: number): Buffer {
- const wordInBytes = 32;
- return this.popBytes(length * wordInBytes);
- }
-
- public readBytes(from: number, to: number): Buffer {
- const value = this._value.slice(from, to);
- return value;
- }
-
- public setOffset(offsetInBytes: number): void {
- this._offset = offsetInBytes;
- }
-
- public startScope(): void {
- this._scopes.pushFront(this._offset);
- }
-
- public endScope(): void {
- this._scopes.popFront();
- }
-
- public getOffset(): number {
- return this._offset;
- }
-
- public toAbsoluteOffset(relativeOffset: number): number {
- const scopeOffset = this._scopes.peekFront();
- if (_.isUndefined(scopeOffset)) {
- throw new Error(`Tried to access undefined scope.`);
- }
- const absoluteOffset = relativeOffset + scopeOffset;
- return absoluteOffset;
- }
-
- public getSelector(): string {
- return this._selector;
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_type_factory.ts b/packages/utils/src/abi_encoder/evm_data_type_factory.ts
deleted file mode 100644
index 268649148..000000000
--- a/packages/utils/src/abi_encoder/evm_data_type_factory.ts
+++ /dev/null
@@ -1,165 +0,0 @@
-/* tslint:disable max-classes-per-file */
-import { DataItem, MethodAbi } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { generateDataItemsFromSignature } from './utils/signature_parser';
-
-import { DataType } from './abstract_data_types/data_type';
-import { DataTypeFactory } from './abstract_data_types/interfaces';
-import { AddressDataType } from './evm_data_types/address';
-import { ArrayDataType } from './evm_data_types/array';
-import { BoolDataType } from './evm_data_types/bool';
-import { DynamicBytesDataType } from './evm_data_types/dynamic_bytes';
-import { IntDataType } from './evm_data_types/int';
-import { MethodDataType } from './evm_data_types/method';
-import { PointerDataType } from './evm_data_types/pointer';
-import { StaticBytesDataType } from './evm_data_types/static_bytes';
-import { StringDataType } from './evm_data_types/string';
-import { TupleDataType } from './evm_data_types/tuple';
-import { UIntDataType } from './evm_data_types/uint';
-
-export class Address extends AddressDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Bool extends BoolDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Int extends IntDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class UInt extends UIntDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class StaticBytes extends StaticBytesDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class DynamicBytes extends DynamicBytesDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class String extends StringDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Pointer extends PointerDataType {
- public constructor(destDataType: DataType, parentDataType: DataType) {
- super(destDataType, parentDataType, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Tuple extends TupleDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Array extends ArrayDataType {
- public constructor(dataItem: DataItem) {
- super(dataItem, EvmDataTypeFactory.getInstance());
- }
-}
-
-export class Method extends MethodDataType {
- public constructor(abi: MethodAbi) {
- super(abi, EvmDataTypeFactory.getInstance());
- }
-}
-
-/* tslint:disable no-construct */
-export class EvmDataTypeFactory implements DataTypeFactory {
- private static _instance: DataTypeFactory;
-
- public static getInstance(): DataTypeFactory {
- if (!EvmDataTypeFactory._instance) {
- EvmDataTypeFactory._instance = new EvmDataTypeFactory();
- }
- return EvmDataTypeFactory._instance;
- }
-
- /* tslint:disable prefer-function-over-method */
- public create(dataItem: DataItem, parentDataType?: DataType): DataType {
- // Create data type
- let dataType: undefined | DataType;
- if (Array.matchType(dataItem.type)) {
- dataType = new Array(dataItem);
- } else if (Address.matchType(dataItem.type)) {
- dataType = new Address(dataItem);
- } else if (Bool.matchType(dataItem.type)) {
- dataType = new Bool(dataItem);
- } else if (Int.matchType(dataItem.type)) {
- dataType = new Int(dataItem);
- } else if (UInt.matchType(dataItem.type)) {
- dataType = new UInt(dataItem);
- } else if (StaticBytes.matchType(dataItem.type)) {
- dataType = new StaticBytes(dataItem);
- } else if (Tuple.matchType(dataItem.type)) {
- dataType = new Tuple(dataItem);
- } else if (DynamicBytes.matchType(dataItem.type)) {
- dataType = new DynamicBytes(dataItem);
- } else if (String.matchType(dataItem.type)) {
- dataType = new String(dataItem);
- }
- // @TODO: DataTypeement Fixed/UFixed types
- if (_.isUndefined(dataType)) {
- throw new Error(`Unrecognized data type: '${dataItem.type}'`);
- } else if (!_.isUndefined(parentDataType) && !dataType.isStatic()) {
- const pointerToDataType = new Pointer(dataType, parentDataType);
- return pointerToDataType;
- }
- return dataType;
- }
- /* tslint:enable prefer-function-over-method */
-
- private constructor() {}
-}
-
-/**
- * Convenience function for creating a DataType from different inputs.
- * @param input A single or set of DataItem or a DataType signature.
- * A signature in the form of '<type>' is interpreted as a `DataItem`
- * For example, 'string' is interpreted as {type: 'string'}
- * A signature in the form '(<type1>, <type2>, ..., <typen>)' is interpreted as `DataItem[]`
- * For eaxmple, '(string, uint256)' is interpreted as [{type: 'string'}, {type: 'uint256'}]
- * @return DataType corresponding to input.
- */
-export function create(input: DataItem | DataItem[] | string): DataType {
- // Handle different types of input
- const isSignature = typeof input === 'string';
- const isTupleSignature = isSignature && (input as string).startsWith('(');
- const shouldParseAsTuple = isTupleSignature || _.isArray(input);
- // Create input `dataItem`
- let dataItem: DataItem;
- if (shouldParseAsTuple) {
- const dataItems = isSignature ? generateDataItemsFromSignature(input as string) : (input as DataItem[]);
- dataItem = {
- name: '',
- type: 'tuple',
- components: dataItems,
- };
- } else {
- dataItem = isSignature ? generateDataItemsFromSignature(input as string)[0] : (input as DataItem);
- }
- // Create data type
- const dataType = EvmDataTypeFactory.getInstance().create(dataItem);
- return dataType;
-}
-/* tslint:enable no-construct */
diff --git a/packages/utils/src/abi_encoder/evm_data_types/address.ts b/packages/utils/src/abi_encoder/evm_data_types/address.ts
deleted file mode 100644
index 2278830eb..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/address.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-
-export class AddressDataType extends AbstractBlobDataType {
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
- private static readonly _ADDRESS_SIZE_IN_BYTES = 20;
- private static readonly _DECODED_ADDRESS_OFFSET_IN_BYTES =
- constants.EVM_WORD_WIDTH_IN_BYTES - AddressDataType._ADDRESS_SIZE_IN_BYTES;
-
- public static matchType(type: string): boolean {
- return type === SolidityTypes.Address;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, AddressDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!AddressDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Address with bad input: ${dataItem}`);
- }
- }
-
- // Disable prefer-function-over-method for inherited abstract methods.
- /* tslint:disable prefer-function-over-method */
- public encodeValue(value: string): Buffer {
- if (!ethUtil.isValidAddress(value)) {
- throw new Error(`Invalid address: '${value}'`);
- }
- const valueBuf = ethUtil.toBuffer(value);
- const encodedValueBuf = ethUtil.setLengthLeft(valueBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- return encodedValueBuf;
- }
-
- public decodeValue(calldata: RawCalldata): string {
- const valueBufPadded = calldata.popWord();
- const valueBuf = valueBufPadded.slice(AddressDataType._DECODED_ADDRESS_OFFSET_IN_BYTES);
- const value = ethUtil.bufferToHex(valueBuf);
- const valueLowercase = _.toLower(value);
- return valueLowercase;
- }
-
- public getSignatureType(): string {
- return SolidityTypes.Address;
- }
- /* tslint:enable prefer-function-over-method */
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/array.ts b/packages/utils/src/abi_encoder/evm_data_types/array.ts
deleted file mode 100644
index d9607f47e..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/array.ts
+++ /dev/null
@@ -1,74 +0,0 @@
-import { DataItem } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractSetDataType } from '../abstract_data_types/types/set';
-import { constants } from '../utils/constants';
-
-export class ArrayDataType extends AbstractSetDataType {
- private static readonly _MATCHER = RegExp('^(.+)\\[([0-9]*)\\]$');
- private readonly _elementType: string;
-
- public static matchType(type: string): boolean {
- return ArrayDataType._MATCHER.test(type);
- }
-
- private static _decodeElementTypeAndLengthFromType(type: string): [string, undefined | number] {
- const matches = ArrayDataType._MATCHER.exec(type);
- if (_.isNull(matches) || matches.length !== 3) {
- throw new Error(`Could not parse array: ${type}`);
- } else if (_.isUndefined(matches[1])) {
- throw new Error(`Could not parse array type: ${type}`);
- } else if (_.isUndefined(matches[2])) {
- throw new Error(`Could not parse array length: ${type}`);
- }
- const arrayElementType = matches[1];
- const arrayLength = _.isEmpty(matches[2]) ? undefined : parseInt(matches[2], constants.DEC_BASE);
- return [arrayElementType, arrayLength];
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- // Construct parent
- const isArray = true;
- const [arrayElementType, arrayLength] = ArrayDataType._decodeElementTypeAndLengthFromType(dataItem.type);
- super(dataItem, dataTypeFactory, isArray, arrayLength, arrayElementType);
- // Set array properties
- this._elementType = arrayElementType;
- }
-
- public getSignatureType(): string {
- return this._computeSignature(false);
- }
-
- public getSignature(isDetailed?: boolean): string {
- if (_.isEmpty(this.getDataItem().name) || !isDetailed) {
- return this.getSignatureType();
- }
- const name = this.getDataItem().name;
- const lastIndexOfScopeDelimiter = name.lastIndexOf('.');
- const isScopedName = !_.isUndefined(lastIndexOfScopeDelimiter) && lastIndexOfScopeDelimiter > 0;
- const shortName = isScopedName ? name.substr((lastIndexOfScopeDelimiter as number) + 1) : name;
- const detailedSignature = `${shortName} ${this._computeSignature(isDetailed)}`;
- return detailedSignature;
- }
-
- private _computeSignature(isDetailed?: boolean): string {
- // Compute signature for a single array element
- const elementDataItem: DataItem = {
- type: this._elementType,
- name: '',
- };
- const elementComponents = this.getDataItem().components;
- if (!_.isUndefined(elementComponents)) {
- elementDataItem.components = elementComponents;
- }
- const elementDataType = this.getFactory().create(elementDataItem);
- const elementSignature = elementDataType.getSignature(isDetailed);
- // Construct signature for array of type `element`
- if (_.isUndefined(this._arrayLength)) {
- return `${elementSignature}[]`;
- } else {
- return `${elementSignature}[${this._arrayLength}]`;
- }
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/bool.ts b/packages/utils/src/abi_encoder/evm_data_types/bool.ts
deleted file mode 100644
index 23298bc88..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/bool.ts
+++ /dev/null
@@ -1,53 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { BigNumber } from '../../configured_bignumber';
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-
-export class BoolDataType extends AbstractBlobDataType {
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
-
- public static matchType(type: string): boolean {
- return type === SolidityTypes.Bool;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, BoolDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!BoolDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Bool with bad input: ${dataItem}`);
- }
- }
-
- // Disable prefer-function-over-method for inherited abstract methods.
- /* tslint:disable prefer-function-over-method */
- public encodeValue(value: boolean): Buffer {
- const encodedValue = value ? '0x1' : '0x0';
- const encodedValueBuf = ethUtil.setLengthLeft(
- ethUtil.toBuffer(encodedValue),
- constants.EVM_WORD_WIDTH_IN_BYTES,
- );
- return encodedValueBuf;
- }
-
- public decodeValue(calldata: RawCalldata): boolean {
- const valueBuf = calldata.popWord();
- const valueHex = ethUtil.bufferToHex(valueBuf);
- const valueNumber = new BigNumber(valueHex, constants.HEX_BASE);
- if (!(valueNumber.isEqualTo(0) || valueNumber.isEqualTo(1))) {
- throw new Error(`Failed to decode boolean. Expected 0x0 or 0x1, got ${valueHex}`);
- }
- /* tslint:disable boolean-naming */
- const value: boolean = !valueNumber.isEqualTo(0);
- /* tslint:enable boolean-naming */
- return value;
- }
-
- public getSignatureType(): string {
- return SolidityTypes.Bool;
- }
- /* tslint:enable prefer-function-over-method */
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/dynamic_bytes.ts b/packages/utils/src/abi_encoder/evm_data_types/dynamic_bytes.ts
deleted file mode 100644
index fa38b63c0..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/dynamic_bytes.ts
+++ /dev/null
@@ -1,72 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-
-export class DynamicBytesDataType extends AbstractBlobDataType {
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = false;
-
- public static matchType(type: string): boolean {
- return type === SolidityTypes.Bytes;
- }
-
- private static _sanityCheckValue(value: string | Buffer): void {
- if (typeof value !== 'string') {
- return;
- }
- if (!_.startsWith(value, '0x')) {
- throw new Error(`Tried to encode non-hex value. Value must inlcude '0x' prefix.`);
- } else if (value.length % 2 !== 0) {
- throw new Error(`Tried to assign ${value}, which is contains a half-byte. Use full bytes only.`);
- }
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, DynamicBytesDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!DynamicBytesDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Dynamic Bytes with bad input: ${dataItem}`);
- }
- }
-
- // Disable prefer-function-over-method for inherited abstract methods.
- /* tslint:disable prefer-function-over-method */
- public encodeValue(value: string | Buffer): Buffer {
- // Encoded value is of the form: <length><value>, with each field padded to be word-aligned.
- // 1/3 Construct the length
- const valueBuf = ethUtil.toBuffer(value);
- const wordsToStoreValuePadded = Math.ceil(valueBuf.byteLength / constants.EVM_WORD_WIDTH_IN_BYTES);
- const bytesToStoreValuePadded = wordsToStoreValuePadded * constants.EVM_WORD_WIDTH_IN_BYTES;
- const lengthBuf = ethUtil.toBuffer(valueBuf.byteLength);
- const lengthBufPadded = ethUtil.setLengthLeft(lengthBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- // 2/3 Construct the value
- DynamicBytesDataType._sanityCheckValue(value);
- const valueBufPadded = ethUtil.setLengthRight(valueBuf, bytesToStoreValuePadded);
- // 3/3 Combine length and value
- const encodedValue = Buffer.concat([lengthBufPadded, valueBufPadded]);
- return encodedValue;
- }
-
- public decodeValue(calldata: RawCalldata): string {
- // Encoded value is of the form: <length><value>, with each field padded to be word-aligned.
- // 1/2 Decode length
- const lengthBuf = calldata.popWord();
- const lengthHex = ethUtil.bufferToHex(lengthBuf);
- const length = parseInt(lengthHex, constants.HEX_BASE);
- // 2/2 Decode value
- const wordsToStoreValuePadded = Math.ceil(length / constants.EVM_WORD_WIDTH_IN_BYTES);
- const valueBufPadded = calldata.popWords(wordsToStoreValuePadded);
- const valueBuf = valueBufPadded.slice(0, length);
- const value = ethUtil.bufferToHex(valueBuf);
- DynamicBytesDataType._sanityCheckValue(value);
- return value;
- }
-
- public getSignatureType(): string {
- return SolidityTypes.Bytes;
- }
- /* tslint:enable prefer-function-over-method */
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/int.ts b/packages/utils/src/abi_encoder/evm_data_types/int.ts
deleted file mode 100644
index f8be1f778..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/int.ts
+++ /dev/null
@@ -1,63 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BigNumber } from '../../configured_bignumber';
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-import * as EncoderMath from '../utils/math';
-
-export class IntDataType extends AbstractBlobDataType {
- private static readonly _MATCHER = RegExp(
- '^int(8|16|24|32|40|48|56|64|72|80|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256){0,1}$',
- );
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
- private static readonly _MAX_WIDTH: number = 256;
- private static readonly _DEFAULT_WIDTH: number = IntDataType._MAX_WIDTH;
- private readonly _width: number;
- private readonly _minValue: BigNumber;
- private readonly _maxValue: BigNumber;
-
- public static matchType(type: string): boolean {
- return IntDataType._MATCHER.test(type);
- }
-
- private static _decodeWidthFromType(type: string): number {
- const matches = IntDataType._MATCHER.exec(type);
- const width =
- !_.isNull(matches) && matches.length === 2 && !_.isUndefined(matches[1])
- ? parseInt(matches[1], constants.DEC_BASE)
- : IntDataType._DEFAULT_WIDTH;
- return width;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, IntDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!IntDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Int with bad input: ${dataItem}`);
- }
- this._width = IntDataType._decodeWidthFromType(dataItem.type);
- this._minValue = new BigNumber(2).exponentiatedBy(this._width - 1).times(-1);
- this._maxValue = new BigNumber(2).exponentiatedBy(this._width - 1).minus(1);
- }
-
- public encodeValue(value: BigNumber | string | number): Buffer {
- const encodedValue = EncoderMath.safeEncodeNumericValue(value, this._minValue, this._maxValue);
- return encodedValue;
- }
-
- public decodeValue(calldata: RawCalldata): BigNumber | number {
- const valueBuf = calldata.popWord();
- const value = EncoderMath.safeDecodeNumericValue(valueBuf, this._minValue, this._maxValue);
- const numberOfBytesInUint8 = 8;
- if (this._width === numberOfBytesInUint8) {
- return value.toNumber();
- }
- return value;
- }
-
- public getSignatureType(): string {
- return `${SolidityTypes.Int}${this._width}`;
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/method.ts b/packages/utils/src/abi_encoder/evm_data_types/method.ts
deleted file mode 100644
index c852a0fdf..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/method.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { DataItem, MethodAbi } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { DataType } from '../abstract_data_types/data_type';
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractSetDataType } from '../abstract_data_types/types/set';
-import { constants } from '../utils/constants';
-import { DecodingRules, EncodingRules } from '../utils/rules';
-
-import { TupleDataType } from './tuple';
-
-export class MethodDataType extends AbstractSetDataType {
- private readonly _methodSignature: string;
- private readonly _methodSelector: string;
- private readonly _returnDataType: DataType;
-
- public constructor(abi: MethodAbi, dataTypeFactory: DataTypeFactory) {
- const methodDataItem = { type: 'method', name: abi.name, components: abi.inputs };
- super(methodDataItem, dataTypeFactory);
- this._methodSignature = this._computeSignature();
- this._methodSelector = this._computeSelector();
- const returnDataItem: DataItem = { type: 'tuple', name: abi.name, components: abi.outputs };
- this._returnDataType = new TupleDataType(returnDataItem, this.getFactory());
- }
-
- public encode(value: any, rules?: EncodingRules): string {
- const calldata = super.encode(value, rules, this._methodSelector);
- return calldata;
- }
-
- public decode(calldata: string, rules?: DecodingRules): any[] | object {
- const value = super.decode(calldata, rules, this._methodSelector);
- return value;
- }
-
- public encodeReturnValues(value: any, rules?: EncodingRules): string {
- const returnData = this._returnDataType.encode(value, rules);
- return returnData;
- }
-
- public decodeReturnValues(returndata: string, rules?: DecodingRules): any {
- const returnValues = this._returnDataType.decode(returndata, rules);
- return returnValues;
- }
-
- public strictDecodeReturnValue<T>(returndata: string, rules?: DecodingRules): T {
- const returnValues = this._returnDataType.decode(returndata, rules);
- const returnValuesAsArray: any = _.isObject(returnValues) ? _.values(returnValues) : [returnValues];
- switch (returnValuesAsArray.length) {
- case 0:
- return undefined as any;
- case 1:
- return returnValuesAsArray[0];
- default:
- return returnValuesAsArray;
- }
- }
-
- public getSignatureType(): string {
- return this._methodSignature;
- }
-
- public getSelector(): string {
- return this._methodSelector;
- }
-
- private _computeSignature(): string {
- const memberSignature = this._computeSignatureOfMembers();
- const methodSignature = `${this.getDataItem().name}${memberSignature}`;
- return methodSignature;
- }
-
- private _computeSelector(): string {
- const signature = this._computeSignature();
- const selector = ethUtil.bufferToHex(
- ethUtil.toBuffer(
- ethUtil
- .sha3(signature)
- .slice(constants.HEX_SELECTOR_BYTE_OFFSET_IN_CALLDATA, constants.HEX_SELECTOR_LENGTH_IN_BYTES),
- ),
- );
- return selector;
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/pointer.ts b/packages/utils/src/abi_encoder/evm_data_types/pointer.ts
deleted file mode 100644
index 250db7c64..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/pointer.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { DataItem } from 'ethereum-types';
-
-import { DataType } from '../abstract_data_types/data_type';
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractPointerDataType } from '../abstract_data_types/types/pointer';
-
-export class PointerDataType extends AbstractPointerDataType {
- constructor(destDataType: DataType, parentDataType: DataType, dataTypeFactory: DataTypeFactory) {
- const destDataItem = destDataType.getDataItem();
- const dataItem: DataItem = { name: `ptr<${destDataItem.name}>`, type: `ptr<${destDataItem.type}>` };
- super(dataItem, dataTypeFactory, destDataType, parentDataType);
- }
-
- public getSignatureType(): string {
- return this._destination.getSignature(false);
- }
-
- public getSignature(isDetailed?: boolean): string {
- return this._destination.getSignature(isDetailed);
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/static_bytes.ts b/packages/utils/src/abi_encoder/evm_data_types/static_bytes.ts
deleted file mode 100644
index cbf1957d7..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/static_bytes.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-
-export class StaticBytesDataType extends AbstractBlobDataType {
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
- private static readonly _MATCHER = RegExp(
- '^(byte|bytes(1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23|24|25|26|27|28|29|30|31|32))$',
- );
- private static readonly _DEFAULT_WIDTH = 1;
- private readonly _width: number;
-
- public static matchType(type: string): boolean {
- return StaticBytesDataType._MATCHER.test(type);
- }
-
- private static _decodeWidthFromType(type: string): number {
- const matches = StaticBytesDataType._MATCHER.exec(type);
- const width =
- !_.isNull(matches) && matches.length === 3 && !_.isUndefined(matches[2])
- ? parseInt(matches[2], constants.DEC_BASE)
- : StaticBytesDataType._DEFAULT_WIDTH;
- return width;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, StaticBytesDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!StaticBytesDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Static Bytes with bad input: ${dataItem}`);
- }
- this._width = StaticBytesDataType._decodeWidthFromType(dataItem.type);
- }
-
- public getSignatureType(): string {
- // Note that `byte` reduces to `bytes1`
- return `${SolidityTypes.Bytes}${this._width}`;
- }
-
- public encodeValue(value: string | Buffer): Buffer {
- // 1/2 Convert value into a buffer and do bounds checking
- this._sanityCheckValue(value);
- const valueBuf = ethUtil.toBuffer(value);
- // 2/2 Store value as hex
- const valuePadded = ethUtil.setLengthRight(valueBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- return valuePadded;
- }
-
- public decodeValue(calldata: RawCalldata): string {
- const valueBufPadded = calldata.popWord();
- const valueBuf = valueBufPadded.slice(0, this._width);
- const value = ethUtil.bufferToHex(valueBuf);
- this._sanityCheckValue(value);
- return value;
- }
-
- private _sanityCheckValue(value: string | Buffer): void {
- if (typeof value === 'string') {
- if (!_.startsWith(value, '0x')) {
- throw new Error(`Tried to encode non-hex value. Value must inlcude '0x' prefix.`);
- } else if (value.length % 2 !== 0) {
- throw new Error(`Tried to assign ${value}, which is contains a half-byte. Use full bytes only.`);
- }
- }
- const valueBuf = ethUtil.toBuffer(value);
- if (valueBuf.byteLength > this._width) {
- throw new Error(
- `Tried to assign ${value} (${
- valueBuf.byteLength
- } bytes), which exceeds max bytes that can be stored in a ${this.getSignature()}`,
- );
- }
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/string.ts b/packages/utils/src/abi_encoder/evm_data_types/string.ts
deleted file mode 100644
index 97ac46442..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/string.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-
-export class StringDataType extends AbstractBlobDataType {
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = false;
-
- public static matchType(type: string): boolean {
- return type === SolidityTypes.String;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, StringDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!StringDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate String with bad input: ${dataItem}`);
- }
- }
-
- // Disable prefer-function-over-method for inherited abstract methods.
- /* tslint:disable prefer-function-over-method */
- public encodeValue(value: string): Buffer {
- // Encoded value is of the form: <length><value>, with each field padded to be word-aligned.
- // 1/3 Construct the length
- const wordsToStoreValuePadded = Math.ceil(value.length / constants.EVM_WORD_WIDTH_IN_BYTES);
- const bytesToStoreValuePadded = wordsToStoreValuePadded * constants.EVM_WORD_WIDTH_IN_BYTES;
- const lengthBuf = ethUtil.toBuffer(value.length);
- const lengthBufPadded = ethUtil.setLengthLeft(lengthBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- // 2/3 Construct the value
- const valueBuf = new Buffer(value);
- const valueBufPadded = ethUtil.setLengthRight(valueBuf, bytesToStoreValuePadded);
- // 3/3 Combine length and value
- const encodedValue = Buffer.concat([lengthBufPadded, valueBufPadded]);
- return encodedValue;
- }
-
- public decodeValue(calldata: RawCalldata): string {
- // Encoded value is of the form: <length><value>, with each field padded to be word-aligned.
- // 1/2 Decode length
- const lengthBufPadded = calldata.popWord();
- const lengthHexPadded = ethUtil.bufferToHex(lengthBufPadded);
- const length = parseInt(lengthHexPadded, constants.HEX_BASE);
- // 2/2 Decode value
- const wordsToStoreValuePadded = Math.ceil(length / constants.EVM_WORD_WIDTH_IN_BYTES);
- const valueBufPadded = calldata.popWords(wordsToStoreValuePadded);
- const valueBuf = valueBufPadded.slice(0, length);
- const value = valueBuf.toString('ascii');
- return value;
- }
-
- public getSignatureType(): string {
- return SolidityTypes.String;
- }
- /* tslint:enable prefer-function-over-method */
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/tuple.ts b/packages/utils/src/abi_encoder/evm_data_types/tuple.ts
deleted file mode 100644
index 5000c85e8..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/tuple.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractSetDataType } from '../abstract_data_types/types/set';
-
-export class TupleDataType extends AbstractSetDataType {
- public static matchType(type: string): boolean {
- return type === SolidityTypes.Tuple;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory);
- if (!TupleDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate Tuple with bad input: ${dataItem}`);
- }
- }
-
- public getSignatureType(): string {
- return this._computeSignatureOfMembers(false);
- }
-
- public getSignature(isDetailed?: boolean): string {
- if (_.isEmpty(this.getDataItem().name) || !isDetailed) {
- return this.getSignatureType();
- }
- const name = this.getDataItem().name;
- const lastIndexOfScopeDelimiter = name.lastIndexOf('.');
- const isScopedName = !_.isUndefined(lastIndexOfScopeDelimiter) && lastIndexOfScopeDelimiter > 0;
- const shortName = isScopedName ? name.substr((lastIndexOfScopeDelimiter as number) + 1) : name;
- const detailedSignature = `${shortName} ${this._computeSignatureOfMembers(isDetailed)}`;
- return detailedSignature;
- }
-}
diff --git a/packages/utils/src/abi_encoder/evm_data_types/uint.ts b/packages/utils/src/abi_encoder/evm_data_types/uint.ts
deleted file mode 100644
index a82aa789e..000000000
--- a/packages/utils/src/abi_encoder/evm_data_types/uint.ts
+++ /dev/null
@@ -1,62 +0,0 @@
-import { DataItem, SolidityTypes } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BigNumber } from '../../configured_bignumber';
-import { DataTypeFactory } from '../abstract_data_types/interfaces';
-import { AbstractBlobDataType } from '../abstract_data_types/types/blob';
-import { RawCalldata } from '../calldata/raw_calldata';
-import { constants } from '../utils/constants';
-import * as EncoderMath from '../utils/math';
-
-export class UIntDataType extends AbstractBlobDataType {
- private static readonly _MATCHER = RegExp(
- '^uint(8|16|24|32|40|48|56|64|72|88|96|104|112|120|128|136|144|152|160|168|176|184|192|200|208|216|224|232|240|248|256){0,1}$',
- );
- private static readonly _SIZE_KNOWN_AT_COMPILE_TIME: boolean = true;
- private static readonly _MAX_WIDTH: number = 256;
- private static readonly _DEFAULT_WIDTH: number = UIntDataType._MAX_WIDTH;
- private static readonly _MIN_VALUE = new BigNumber(0);
- private readonly _width: number;
- private readonly _maxValue: BigNumber;
-
- public static matchType(type: string): boolean {
- return UIntDataType._MATCHER.test(type);
- }
-
- private static _decodeWidthFromType(type: string): number {
- const matches = UIntDataType._MATCHER.exec(type);
- const width =
- !_.isNull(matches) && matches.length === 2 && !_.isUndefined(matches[1])
- ? parseInt(matches[1], constants.DEC_BASE)
- : UIntDataType._DEFAULT_WIDTH;
- return width;
- }
-
- public constructor(dataItem: DataItem, dataTypeFactory: DataTypeFactory) {
- super(dataItem, dataTypeFactory, UIntDataType._SIZE_KNOWN_AT_COMPILE_TIME);
- if (!UIntDataType.matchType(dataItem.type)) {
- throw new Error(`Tried to instantiate UInt with bad input: ${dataItem}`);
- }
- this._width = UIntDataType._decodeWidthFromType(dataItem.type);
- this._maxValue = new BigNumber(2).exponentiatedBy(this._width).minus(1);
- }
-
- public encodeValue(value: BigNumber | string | number): Buffer {
- const encodedValue = EncoderMath.safeEncodeNumericValue(value, UIntDataType._MIN_VALUE, this._maxValue);
- return encodedValue;
- }
-
- public decodeValue(calldata: RawCalldata): BigNumber | number {
- const valueBuf = calldata.popWord();
- const value = EncoderMath.safeDecodeNumericValue(valueBuf, UIntDataType._MIN_VALUE, this._maxValue);
- const numberOfBytesInUint8 = 8;
- if (this._width === numberOfBytesInUint8) {
- return value.toNumber();
- }
- return value;
- }
-
- public getSignatureType(): string {
- return `${SolidityTypes.Uint}${this._width}`;
- }
-}
diff --git a/packages/utils/src/abi_encoder/index.ts b/packages/utils/src/abi_encoder/index.ts
deleted file mode 100644
index cfacfe075..000000000
--- a/packages/utils/src/abi_encoder/index.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-export { EncodingRules, DecodingRules } from './utils/rules';
-export {
- Address,
- Array,
- Bool,
- DynamicBytes,
- Int,
- Method,
- Pointer,
- StaticBytes,
- String,
- Tuple,
- UInt,
- create,
-} from './evm_data_type_factory';
-export { DataType } from './abstract_data_types/data_type';
diff --git a/packages/utils/src/abi_encoder/utils/constants.ts b/packages/utils/src/abi_encoder/utils/constants.ts
deleted file mode 100644
index fc586f295..000000000
--- a/packages/utils/src/abi_encoder/utils/constants.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import { DecodingRules, EncodingRules } from './rules';
-
-export const constants = {
- EVM_WORD_WIDTH_IN_BYTES: 32,
- EVM_WORD_WIDTH_IN_BITS: 256,
- HEX_BASE: 16,
- DEC_BASE: 10,
- BIN_BASE: 2,
- HEX_SELECTOR_LENGTH_IN_CHARS: 10,
- HEX_SELECTOR_LENGTH_IN_BYTES: 4,
- HEX_SELECTOR_BYTE_OFFSET_IN_CALLDATA: 0,
- // Disable no-object-literal-type-assertion so we can enforce cast
- /* tslint:disable no-object-literal-type-assertion */
- DEFAULT_DECODING_RULES: { shouldConvertStructsToObjects: true } as DecodingRules,
- DEFAULT_ENCODING_RULES: { shouldOptimize: true, shouldAnnotate: false } as EncodingRules,
- /* tslint:enable no-object-literal-type-assertion */
-};
diff --git a/packages/utils/src/abi_encoder/utils/math.ts b/packages/utils/src/abi_encoder/utils/math.ts
deleted file mode 100644
index a2a79e2a8..000000000
--- a/packages/utils/src/abi_encoder/utils/math.ts
+++ /dev/null
@@ -1,113 +0,0 @@
-import * as ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-
-import { BigNumber } from '../../configured_bignumber';
-import { constants } from '../utils/constants';
-
-function sanityCheckBigNumberRange(
- value_: BigNumber | string | number,
- minValue: BigNumber,
- maxValue: BigNumber,
-): void {
- const value = new BigNumber(value_, 10);
- if (value.isGreaterThan(maxValue)) {
- throw new Error(`Tried to assign value of ${value}, which exceeds max value of ${maxValue}`);
- } else if (value.isLessThan(minValue)) {
- throw new Error(`Tried to assign value of ${value}, which exceeds min value of ${minValue}`);
- } else if (value.isNaN()) {
- throw new Error(`Tried to assign NaN value`);
- }
-}
-function bigNumberToPaddedBuffer(value: BigNumber): Buffer {
- const valueHex = `0x${value.toString(constants.HEX_BASE)}`;
- const valueBuf = ethUtil.toBuffer(valueHex);
- const valueBufPadded = ethUtil.setLengthLeft(valueBuf, constants.EVM_WORD_WIDTH_IN_BYTES);
- return valueBufPadded;
-}
-/**
- * Takes a numeric value and returns its ABI-encoded value
- * @param value_ The value to encode.
- * @return ABI Encoded value
- */
-export function encodeNumericValue(value_: BigNumber | string | number): Buffer {
- const value = new BigNumber(value_, 10);
- // Case 1/2: value is non-negative
- if (value.isGreaterThanOrEqualTo(0)) {
- const encodedPositiveValue = bigNumberToPaddedBuffer(value);
- return encodedPositiveValue;
- }
- // Case 2/2: Value is negative
- // Use two's-complement to encode the value
- // Step 1/3: Convert negative value to positive binary string
- const valueBin = value.times(-1).toString(constants.BIN_BASE);
- // Step 2/3: Invert binary value
- let invertedValueBin = '1'.repeat(constants.EVM_WORD_WIDTH_IN_BITS - valueBin.length);
- _.each(valueBin, (bit: string) => {
- invertedValueBin += bit === '1' ? '0' : '1';
- });
- const invertedValue = new BigNumber(invertedValueBin, constants.BIN_BASE);
- // Step 3/3: Add 1 to inverted value
- const negativeValue = invertedValue.plus(1);
- const encodedValue = bigNumberToPaddedBuffer(negativeValue);
- return encodedValue;
-}
-/**
- * Takes a numeric value and returns its ABI-encoded value.
- * Performs an additional sanity check, given the min/max allowed value.
- * @param value_ The value to encode.
- * @return ABI Encoded value
- */
-export function safeEncodeNumericValue(
- value: BigNumber | string | number,
- minValue: BigNumber,
- maxValue: BigNumber,
-): Buffer {
- sanityCheckBigNumberRange(value, minValue, maxValue);
- const encodedValue = encodeNumericValue(value);
- return encodedValue;
-}
-/**
- * Takes an ABI-encoded numeric value and returns its decoded value as a BigNumber.
- * @param encodedValue The encoded numeric value.
- * @param minValue The minimum possible decoded value.
- * @return ABI Decoded value
- */
-export function decodeNumericValue(encodedValue: Buffer, minValue: BigNumber): BigNumber {
- const valueHex = ethUtil.bufferToHex(encodedValue);
- // Case 1/3: value is definitely non-negative because of numeric boundaries
- const value = new BigNumber(valueHex, constants.HEX_BASE);
- if (!minValue.isLessThan(0)) {
- return value;
- }
- // Case 2/3: value is non-negative because there is no leading 1 (encoded as two's-complement)
- const valueBin = value.toString(constants.BIN_BASE);
- const isValueNegative = valueBin.length === constants.EVM_WORD_WIDTH_IN_BITS && _.startsWith(valueBin[0], '1');
- if (!isValueNegative) {
- return value;
- }
- // Case 3/3: value is negative
- // Step 1/3: Invert b inary value
- let invertedValueBin = '';
- _.each(valueBin, (bit: string) => {
- invertedValueBin += bit === '1' ? '0' : '1';
- });
- const invertedValue = new BigNumber(invertedValueBin, constants.BIN_BASE);
- // Step 2/3: Add 1 to inverted value
- // The result is the two's-complement representation of the input value.
- const positiveValue = invertedValue.plus(1);
- // Step 3/3: Invert positive value to get the negative value
- const negativeValue = positiveValue.times(-1);
- return negativeValue;
-}
-/**
- * Takes an ABI-encoded numeric value and returns its decoded value as a BigNumber.
- * Performs an additional sanity check, given the min/max allowed value.
- * @param encodedValue The encoded numeric value.
- * @param minValue The minimum possible decoded value.
- * @return ABI Decoded value
- */
-export function safeDecodeNumericValue(encodedValue: Buffer, minValue: BigNumber, maxValue: BigNumber): BigNumber {
- const value = decodeNumericValue(encodedValue, minValue);
- sanityCheckBigNumberRange(value, minValue, maxValue);
- return value;
-}
diff --git a/packages/utils/src/abi_encoder/utils/queue.ts b/packages/utils/src/abi_encoder/utils/queue.ts
deleted file mode 100644
index 53afb7e11..000000000
--- a/packages/utils/src/abi_encoder/utils/queue.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-export class Queue<T> {
- private _store: T[] = [];
-
- public pushBack(val: T): void {
- this._store.push(val);
- }
-
- public pushFront(val: T): void {
- this._store.unshift(val);
- }
-
- public popFront(): T | undefined {
- return this._store.shift();
- }
-
- public popBack(): T | undefined {
- if (this._store.length === 0) {
- return undefined;
- }
- const backElement = this._store.splice(-1, 1)[0];
- return backElement;
- }
-
- public mergeBack(q: Queue<T>): void {
- this._store = this._store.concat(q._store);
- }
-
- public mergeFront(q: Queue<T>): void {
- this._store = q._store.concat(this._store);
- }
-
- public getStore(): T[] {
- return this._store;
- }
-
- public peekFront(): T | undefined {
- return this._store.length >= 0 ? this._store[0] : undefined;
- }
-}
diff --git a/packages/utils/src/abi_encoder/utils/rules.ts b/packages/utils/src/abi_encoder/utils/rules.ts
deleted file mode 100644
index c8d83c3ba..000000000
--- a/packages/utils/src/abi_encoder/utils/rules.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-export interface DecodingRules {
- shouldConvertStructsToObjects: boolean;
-}
-
-export interface EncodingRules {
- shouldOptimize?: boolean;
- shouldAnnotate?: boolean;
-}
diff --git a/packages/utils/src/abi_encoder/utils/signature_parser.ts b/packages/utils/src/abi_encoder/utils/signature_parser.ts
deleted file mode 100644
index 315784cea..000000000
--- a/packages/utils/src/abi_encoder/utils/signature_parser.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { DataItem } from 'ethereum-types';
-import * as _ from 'lodash';
-
-/**
- * Returns an array of DataItem's corresponding to the input signature.
- * A signature can be in two forms: '<DataItem.type>' or '(<DataItem1.type>, <DataItem2.type>, ...)
- * An example of the first form would be 'address' or 'uint256'
- * An example of the second form would be '(address, uint256)'
- * Signatures can also include a name field, for example: 'foo address' or '(foo address, bar uint256)'
- * @param signature of input DataItems
- * @return DataItems derived from input signature
- */
-export function generateDataItemsFromSignature(signature: string): DataItem[] {
- let trimmedSignature = signature;
- if (signature.startsWith('(')) {
- if (!signature.endsWith(')')) {
- throw new Error(`Failed to generate data item. Must end with ')'`);
- }
- trimmedSignature = signature.substr(1, signature.length - 2);
- }
- trimmedSignature += ',';
- let isCurrTokenArray = false;
- let currTokenArrayModifier = '';
- let isParsingArrayModifier = false;
- let currToken = '';
- let parenCount = 0;
- let currTokenName = '';
- const dataItems: DataItem[] = [];
- for (const char of trimmedSignature) {
- // Tokenize the type string while keeping track of parentheses.
- switch (char) {
- case '(':
- parenCount += 1;
- currToken += char;
- break;
- case ')':
- parenCount -= 1;
- currToken += char;
- break;
- case '[':
- if (parenCount === 0) {
- isParsingArrayModifier = true;
- isCurrTokenArray = true;
- currTokenArrayModifier += '[';
- } else {
- currToken += char;
- }
- break;
- case ']':
- if (parenCount === 0) {
- isParsingArrayModifier = false;
- currTokenArrayModifier += ']';
- } else {
- currToken += char;
- }
- break;
- case ' ':
- if (parenCount === 0) {
- currTokenName = currToken;
- currToken = '';
- } else {
- currToken += char;
- }
- break;
- case ',':
- if (parenCount === 0) {
- // Generate new DataItem from token
- const components = currToken.startsWith('(') ? generateDataItemsFromSignature(currToken) : [];
- const isTuple = !_.isEmpty(components);
- const dataItem: DataItem = { name: currTokenName, type: '' };
- if (isTuple) {
- dataItem.type = 'tuple';
- dataItem.components = components;
- } else {
- dataItem.type = currToken;
- }
- if (isCurrTokenArray) {
- dataItem.type += currTokenArrayModifier;
- }
- dataItems.push(dataItem);
- // reset token state
- currTokenName = '';
- currToken = '';
- isCurrTokenArray = false;
- currTokenArrayModifier = '';
- break;
- } else {
- currToken += char;
- break;
- }
- default:
- if (isParsingArrayModifier) {
- currTokenArrayModifier += char;
- } else {
- currToken += char;
- }
- break;
- }
- }
- return dataItems;
-}
diff --git a/packages/utils/src/abi_utils.ts b/packages/utils/src/abi_utils.ts
deleted file mode 100644
index 3e6fc9665..000000000
--- a/packages/utils/src/abi_utils.ts
+++ /dev/null
@@ -1,229 +0,0 @@
-import { AbiDefinition, AbiType, ContractAbi, DataItem, MethodAbi } from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { BigNumber } from './configured_bignumber';
-
-type ParamName = null | string | NestedParamName;
-interface NestedParamName {
- name: string | null;
- names: ParamName[];
-}
-
-// Note(albrow): This function is unexported in ethers.js. Copying it here for
-// now.
-// Source: https://github.com/ethers-io/ethers.js/blob/884593ab76004a808bf8097e9753fb5f8dcc3067/contracts/interface.js#L30
-function parseEthersParams(params: DataItem[]): { names: ParamName[]; types: string[] } {
- const names: ParamName[] = [];
- const types: string[] = [];
-
- params.forEach((param: DataItem) => {
- if (param.components != null) {
- let suffix = '';
- const arrayBracket = param.type.indexOf('[');
- if (arrayBracket >= 0) {
- suffix = param.type.substring(arrayBracket);
- }
-
- const result = parseEthersParams(param.components);
- names.push({ name: param.name || null, names: result.names });
- types.push(`tuple(${result.types.join(',')})${suffix}`);
- } else {
- names.push(param.name || null);
- types.push(param.type);
- }
- });
-
- return {
- names,
- types,
- };
-}
-
-// returns true if x is equal to y and false otherwise. Performs some minimal
-// type conversion and data massaging for x and y, depending on type. name and
-// type should typically be derived from parseEthersParams.
-function isAbiDataEqual(name: ParamName, type: string, x: any, y: any): boolean {
- if (_.isUndefined(x) && _.isUndefined(y)) {
- return true;
- } else if (_.isUndefined(x) && !_.isUndefined(y)) {
- return false;
- } else if (!_.isUndefined(x) && _.isUndefined(y)) {
- return false;
- }
- if (_.endsWith(type, '[]')) {
- // For array types, we iterate through the elements and check each one
- // individually. Strangely, name does not need to be changed in this
- // case.
- if (x.length !== y.length) {
- return false;
- }
- const newType = _.trimEnd(type, '[]');
- for (let i = 0; i < x.length; i++) {
- if (!isAbiDataEqual(name, newType, x[i], y[i])) {
- return false;
- }
- }
- return true;
- }
- if (_.startsWith(type, 'tuple(')) {
- if (_.isString(name)) {
- throw new Error('Internal error: type was tuple but names was a string');
- } else if (_.isNull(name)) {
- throw new Error('Internal error: type was tuple but names was null');
- }
- // For tuples, we iterate through the underlying values and check each
- // one individually.
- const types = splitTupleTypes(type);
- if (types.length !== name.names.length) {
- throw new Error(
- `Internal error: parameter types/names length mismatch (${types.length} != ${name.names.length})`,
- );
- }
- for (let i = 0; i < types.length; i++) {
- // For tuples, name is an object with a names property that is an
- // array. As an example, for orders, name looks like:
- //
- // {
- // name: 'orders',
- // names: [
- // 'makerAddress',
- // // ...
- // 'takerAssetData'
- // ]
- // }
- //
- const nestedName = _.isString(name.names[i])
- ? (name.names[i] as string)
- : ((name.names[i] as NestedParamName).name as string);
- if (!isAbiDataEqual(name.names[i], types[i], x[nestedName], y[nestedName])) {
- return false;
- }
- }
- return true;
- } else if (type === 'address' || type === 'bytes') {
- // HACK(albrow): ethers.js returns the checksummed address even when
- // initially passed in a non-checksummed address. To account for that,
- // we convert to lowercase before comparing.
- return _.isEqual(_.toLower(x), _.toLower(y));
- } else if (_.startsWith(type, 'uint') || _.startsWith(type, 'int')) {
- return new BigNumber(x).eq(new BigNumber(y));
- }
- return _.isEqual(x, y);
-}
-
-// splitTupleTypes splits a tuple type string (of the form `tuple(X)` where X is
-// any other type or list of types) into its component types. It works with
-// nested tuples, so, e.g., `tuple(tuple(uint256,address),bytes32)` will yield:
-// `['tuple(uint256,address)', 'bytes32']`. It expects exactly one tuple type as
-// an argument (not an array).
-function splitTupleTypes(type: string): string[] {
- if (_.endsWith(type, '[]')) {
- throw new Error('Internal error: array types are not supported');
- } else if (!_.startsWith(type, 'tuple(')) {
- throw new Error(`Internal error: expected tuple type but got non-tuple type: ${type}`);
- }
- // Trim the outtermost tuple().
- const trimmedType = type.substring('tuple('.length, type.length - 1);
- const types: string[] = [];
- let currToken = '';
- let parenCount = 0;
- // Tokenize the type string while keeping track of parentheses.
- for (const char of trimmedType) {
- switch (char) {
- case '(':
- parenCount += 1;
- currToken += char;
- break;
- case ')':
- parenCount -= 1;
- currToken += char;
- break;
- case ',':
- if (parenCount === 0) {
- types.push(currToken);
- currToken = '';
- break;
- } else {
- currToken += char;
- break;
- }
- default:
- currToken += char;
- break;
- }
- }
- types.push(currToken);
- return types;
-}
-
-export const abiUtils = {
- parseEthersParams,
- isAbiDataEqual,
- splitTupleTypes,
- parseFunctionParam(param: DataItem): string {
- if (param.type === 'tuple') {
- // Parse out tuple types into {type_1, type_2, ..., type_N}
- const tupleComponents = param.components;
- const paramString = _.map(tupleComponents, component => abiUtils.parseFunctionParam(component));
- const tupleParamString = `{${paramString}}`;
- return tupleParamString;
- }
- return param.type;
- },
- getFunctionSignature(methodAbi: MethodAbi): string {
- const functionName = methodAbi.name;
- const parameterTypeList = _.map(methodAbi.inputs, (param: DataItem) => abiUtils.parseFunctionParam(param));
- const functionSignature = `${functionName}(${parameterTypeList})`;
- return functionSignature;
- },
- /**
- * Solidity supports function overloading whereas TypeScript does not.
- * See: https://solidity.readthedocs.io/en/v0.4.21/contracts.html?highlight=overload#function-overloading
- * In order to support overloaded functions, we suffix overloaded function names with an index.
- * This index should be deterministic, regardless of function ordering within the smart contract. To do so,
- * we assign indexes based on the alphabetical order of function signatures.
- *
- * E.g
- * ['f(uint)', 'f(uint,byte32)']
- * Should always be renamed to:
- * ['f1(uint)', 'f2(uint,byte32)']
- * Regardless of the order in which these these overloaded functions are declared within the contract ABI.
- */
- renameOverloadedMethods(inputContractAbi: ContractAbi): ContractAbi {
- const contractAbi = _.cloneDeep(inputContractAbi);
- const methodAbis = contractAbi.filter((abi: AbiDefinition) => abi.type === AbiType.Function) as MethodAbi[];
- // Sort method Abis into alphabetical order, by function signature
- const methodAbisOrdered = _.sortBy(methodAbis, [
- (methodAbi: MethodAbi) => {
- const functionSignature = abiUtils.getFunctionSignature(methodAbi);
- return functionSignature;
- },
- ]);
- // Group method Abis by name (overloaded methods will be grouped together, in alphabetical order)
- const methodAbisByName: { [key: string]: MethodAbi[] } = {};
- _.each(methodAbisOrdered, methodAbi => {
- (methodAbisByName[methodAbi.name] || (methodAbisByName[methodAbi.name] = [])).push(methodAbi);
- });
- // Rename overloaded methods to overloadedMethodName1, overloadedMethodName2, ...
- _.each(methodAbisByName, methodAbisWithSameName => {
- _.each(methodAbisWithSameName, (methodAbi, i: number) => {
- if (methodAbisWithSameName.length > 1) {
- const overloadedMethodId = i + 1;
- const sanitizedMethodName = `${methodAbi.name}${overloadedMethodId}`;
- const indexOfExistingAbiWithSanitizedMethodNameIfExists = _.findIndex(
- methodAbis,
- currentMethodAbi => currentMethodAbi.name === sanitizedMethodName,
- );
- if (indexOfExistingAbiWithSanitizedMethodNameIfExists >= 0) {
- const methodName = methodAbi.name;
- throw new Error(
- `Failed to rename overloaded method '${methodName}' to '${sanitizedMethodName}'. A method with this name already exists.`,
- );
- }
- methodAbi.name = sanitizedMethodName;
- }
- });
- });
- return contractAbi;
- },
-};
diff --git a/packages/utils/src/address_utils.ts b/packages/utils/src/address_utils.ts
deleted file mode 100644
index 1fc960408..000000000
--- a/packages/utils/src/address_utils.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { addHexPrefix, stripHexPrefix } from 'ethereumjs-util';
-import * as jsSHA3 from 'js-sha3';
-import * as _ from 'lodash';
-
-const BASIC_ADDRESS_REGEX = /^(0x)?[0-9a-f]{40}$/i;
-const SAME_CASE_ADDRESS_REGEX = /^(0x)?([0-9a-f]{40}|[0-9A-F]{40})$/;
-const ADDRESS_LENGTH = 40;
-
-export const addressUtils = {
- isChecksumAddress(address: string): boolean {
- // Check each case
- const unprefixedAddress = address.replace('0x', '');
- const addressHash = jsSHA3.keccak256(unprefixedAddress.toLowerCase());
-
- for (let i = 0; i < ADDRESS_LENGTH; i++) {
- // The nth letter should be uppercase if the nth digit of casemap is 1
- const hexBase = 16;
- const lowercaseRange = 7;
- if (
- (parseInt(addressHash[i], hexBase) > lowercaseRange &&
- unprefixedAddress[i].toUpperCase() !== unprefixedAddress[i]) ||
- (parseInt(addressHash[i], hexBase) <= lowercaseRange &&
- unprefixedAddress[i].toLowerCase() !== unprefixedAddress[i])
- ) {
- return false;
- }
- }
- return true;
- },
- isAddress(address: string): boolean {
- if (!BASIC_ADDRESS_REGEX.test(address)) {
- // Check if it has the basic requirements of an address
- return false;
- } else if (SAME_CASE_ADDRESS_REGEX.test(address)) {
- // If it's all small caps or all all caps, return true
- return true;
- } else {
- // Otherwise check each case
- const isValidChecksummedAddress = addressUtils.isChecksumAddress(address);
- return isValidChecksummedAddress;
- }
- },
- padZeros(address: string): string {
- return addHexPrefix(_.padStart(stripHexPrefix(address), ADDRESS_LENGTH, '0'));
- },
-};
diff --git a/packages/utils/src/class_utils.ts b/packages/utils/src/class_utils.ts
deleted file mode 100644
index 04e60ee57..000000000
--- a/packages/utils/src/class_utils.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-import * as _ from 'lodash';
-
-export const classUtils = {
- // This is useful for classes that have nested methods. Nested methods don't get bound out of the box.
- bindAll(self: any, exclude: string[] = ['contructor'], thisArg?: any): void {
- for (const key of Object.getOwnPropertyNames(self)) {
- const val = self[key];
- if (!_.includes(exclude, key)) {
- if (_.isFunction(val)) {
- self[key] = val.bind(thisArg || self);
- } else if (_.isObject(val)) {
- classUtils.bindAll(val, exclude, self);
- }
- }
- }
- return self;
- },
-};
diff --git a/packages/utils/src/configured_bignumber.ts b/packages/utils/src/configured_bignumber.ts
deleted file mode 100644
index 34b57d303..000000000
--- a/packages/utils/src/configured_bignumber.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-import { BigNumber } from 'bignumber.js';
-
-BigNumber.config({
- // By default BigNumber's `toString` method converts to exponential notation if the value has
- // more then 20 digits. We want to avoid this behavior, so we set EXPONENTIAL_AT to a high number
- EXPONENTIAL_AT: 1000,
- // Note(albrow): This is the lowest value for which
- // `x.div(y).floor() === x.divToInt(y)`
- // for all values of x and y <= MAX_UINT256, where MAX_UINT256 is the
- // maximum number represented by the uint256 type in Solidity (2^256-1).
- DECIMAL_PLACES: 78,
-});
-
-// Set a debug print function for NodeJS
-// Upstream issue: https://github.com/MikeMcl/bignumber.js/issues/188
-import isNode = require('detect-node');
-if (isNode) {
- // Dynamically load a NodeJS specific module.
- // Typescript requires all imports to be global, so we need to use
- // `const` here and disable the tslint warning.
- // tslint:disable-next-line: no-var-requires
- const util = require('util');
-
- // Set a custom util.inspect function
- // HACK: We add a function to the BigNumber class by assigning to the
- // prototype. The function name is a symbol provided by Node.
- (BigNumber.prototype as any)[util.inspect.custom] = function(): string {
- // HACK: When executed, `this` will refer to the BigNumber instance.
- // This is also why we need a function expression instead of an
- // arrow function, as the latter does not have a `this`.
- // Return the readable string representation
- // tslint:disable-next-line: no-invalid-this
- return this.toString();
- };
-}
-
-export { BigNumber };
diff --git a/packages/utils/src/constants.ts b/packages/utils/src/constants.ts
deleted file mode 100644
index 2894d4747..000000000
--- a/packages/utils/src/constants.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const NULL_BYTES = '0x';
diff --git a/packages/utils/src/error_utils.ts b/packages/utils/src/error_utils.ts
deleted file mode 100644
index 735d3940b..000000000
--- a/packages/utils/src/error_utils.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-export const errorUtils = {
- spawnSwitchErr(name: string, value: any): Error {
- return new Error(`Unexpected switch value: ${value} encountered for ${name}`);
- },
-};
diff --git a/packages/utils/src/fetch_async.ts b/packages/utils/src/fetch_async.ts
deleted file mode 100644
index b4c85718d..000000000
--- a/packages/utils/src/fetch_async.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import isNode = require('detect-node');
-import 'isomorphic-fetch';
-// WARNING: This needs to be imported after isomorphic-fetch: https://github.com/mo/abortcontroller-polyfill#using-it-on-browsers-without-fetch
-// tslint:disable-next-line:ordered-imports
-import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only';
-
-export const fetchAsync = async (
- endpoint: string,
- options: RequestInit = {},
- timeoutMs: number = 20000,
-): Promise<Response> => {
- if (options.signal || (options as any).timeout) {
- throw new Error(
- 'Cannot call fetchAsync with options.signal or options.timeout. To set a timeout, please use the supplied "timeoutMs" parameter.',
- );
- }
- let optionsWithAbortParam;
- if (!isNode) {
- const controller = new AbortController();
- const signal = controller.signal;
- setTimeout(() => {
- controller.abort();
- }, timeoutMs);
- optionsWithAbortParam = {
- signal,
- ...options,
- };
- } else {
- // HACK: the `timeout` param only exists in `node-fetch`, and not on the `isomorphic-fetch`
- // `RequestInit` type. Since `isomorphic-fetch` conditionally wraps `node-fetch` when the
- // execution environment is `Node.js`, we need to cast it to `any` in that scenario.
- optionsWithAbortParam = {
- timeout: timeoutMs,
- ...options,
- } as any;
- }
-
- const response = await fetch(endpoint, optionsWithAbortParam);
- return response;
-};
diff --git a/packages/utils/src/globals.d.ts b/packages/utils/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/utils/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/utils/src/index.ts b/packages/utils/src/index.ts
deleted file mode 100644
index 082aff6bb..000000000
--- a/packages/utils/src/index.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-export { promisify } from './promisify';
-export { addressUtils } from './address_utils';
-export { classUtils } from './class_utils';
-export { intervalUtils } from './interval_utils';
-export { BigNumber } from './configured_bignumber';
-export { AbiDecoder } from './abi_decoder';
-export { logUtils } from './log_utils';
-export { abiUtils } from './abi_utils';
-export { NULL_BYTES } from './constants';
-export { errorUtils } from './error_utils';
-export { fetchAsync } from './fetch_async';
-export { signTypedDataUtils } from './sign_typed_data_utils';
-export import AbiEncoder = require('./abi_encoder');
diff --git a/packages/utils/src/interval_utils.ts b/packages/utils/src/interval_utils.ts
deleted file mode 100644
index 3d0561cd2..000000000
--- a/packages/utils/src/interval_utils.ts
+++ /dev/null
@@ -1,39 +0,0 @@
-export const intervalUtils = {
- setAsyncExcludingInterval(
- fn: () => Promise<void>,
- intervalMs: number,
- onError: (err: Error) => void,
- ): NodeJS.Timer {
- let isLocked = false;
- const intervalId = setInterval(async () => {
- if (isLocked) {
- return;
- } else {
- isLocked = true;
- try {
- await fn();
- } catch (err) {
- onError(err);
- }
- isLocked = false;
- }
- }, intervalMs);
- return intervalId;
- },
- clearAsyncExcludingInterval(intervalId: NodeJS.Timer): void {
- clearInterval(intervalId);
- },
- setInterval(fn: () => void, intervalMs: number, onError: (err: Error) => void): NodeJS.Timer {
- const intervalId = setInterval(() => {
- try {
- fn();
- } catch (err) {
- onError(err);
- }
- }, intervalMs);
- return intervalId;
- },
- clearInterval(intervalId: NodeJS.Timer): void {
- clearInterval(intervalId);
- },
-};
diff --git a/packages/utils/src/log_utils.ts b/packages/utils/src/log_utils.ts
deleted file mode 100644
index 6d9996c67..000000000
--- a/packages/utils/src/log_utils.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import chalk from 'chalk';
-
-export const logUtils = {
- log(...args: any[]): void {
- console.log(...args); // tslint:disable-line:no-console
- },
- warn(...args: any[]): void {
- console.warn(...args); // tslint:disable-line:no-console
- },
- logWithTime(arg: string): void {
- logUtils.log(`[${chalk.gray(new Date().toLocaleTimeString())}] ${arg}`);
- },
-};
diff --git a/packages/utils/src/promisify.ts b/packages/utils/src/promisify.ts
deleted file mode 100644
index e82251a0f..000000000
--- a/packages/utils/src/promisify.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import * as _ from 'lodash';
-
-/**
- * Transforms callback-based function -- func(arg1, arg2 .. argN, callback) -- into an ES6-compatible Promise.
- * Promisify provides a default callback of the form (error, result) and rejects when `error` is not null. You can also
- * supply thisArg object as the second argument which will be passed to `apply`.
- */
-// HACK: This can't be properly typed without variadic kinds https://github.com/Microsoft/TypeScript/issues/5453
-export function promisify<T>(originalFn: (...args: any[]) => void, thisArg?: any): (...callArgs: any[]) => Promise<T> {
- const promisifiedFunction = async (...callArgs: any[]): Promise<T> => {
- return new Promise<T>((resolve, reject) => {
- const callback = (err: Error | null, data?: T) => {
- _.isNull(err) || _.isUndefined(err) ? resolve(data) : reject(err);
- };
- originalFn.apply(thisArg, [...callArgs, callback]);
- });
- };
- return promisifiedFunction;
-}
diff --git a/packages/utils/src/sign_typed_data_utils.ts b/packages/utils/src/sign_typed_data_utils.ts
deleted file mode 100644
index adb66622d..000000000
--- a/packages/utils/src/sign_typed_data_utils.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-import { EIP712Object, EIP712ObjectValue, EIP712TypedData, EIP712Types } from '@0x/types';
-import * as ethUtil from 'ethereumjs-util';
-import * as ethers from 'ethers';
-import * as _ from 'lodash';
-
-import { BigNumber } from './configured_bignumber';
-
-export const signTypedDataUtils = {
- /**
- * Generates the EIP712 Typed Data hash for signing
- * @param typedData An object that conforms to the EIP712TypedData interface
- * @return A Buffer containing the hash of the typed data.
- */
- generateTypedDataHash(typedData: EIP712TypedData): Buffer {
- return ethUtil.sha3(
- Buffer.concat([
- Buffer.from('1901', 'hex'),
- signTypedDataUtils._structHash('EIP712Domain', typedData.domain, typedData.types),
- signTypedDataUtils._structHash(typedData.primaryType, typedData.message, typedData.types),
- ]),
- );
- },
- _findDependencies(primaryType: string, types: EIP712Types, found: string[] = []): string[] {
- if (found.includes(primaryType) || types[primaryType] === undefined) {
- return found;
- }
- found.push(primaryType);
- for (const field of types[primaryType]) {
- for (const dep of signTypedDataUtils._findDependencies(field.type, types, found)) {
- if (!found.includes(dep)) {
- found.push(dep);
- }
- }
- }
- return found;
- },
- _encodeType(primaryType: string, types: EIP712Types): string {
- let deps = signTypedDataUtils._findDependencies(primaryType, types);
- deps = deps.filter(d => d !== primaryType);
- deps = [primaryType].concat(deps.sort());
- let result = '';
- for (const dep of deps) {
- result += `${dep}(${types[dep].map(({ name, type }) => `${type} ${name}`).join(',')})`;
- }
- return result;
- },
- _encodeData(primaryType: string, data: EIP712Object, types: EIP712Types): string {
- const encodedTypes = ['bytes32'];
- const encodedValues: Array<Buffer | EIP712ObjectValue> = [signTypedDataUtils._typeHash(primaryType, types)];
- for (const field of types[primaryType]) {
- const value = data[field.name];
- if (field.type === 'string' || field.type === 'bytes') {
- const hashValue = ethUtil.sha3(value as string);
- encodedTypes.push('bytes32');
- encodedValues.push(hashValue);
- } else if (types[field.type] !== undefined) {
- encodedTypes.push('bytes32');
- const hashValue = ethUtil.sha3(
- // tslint:disable-next-line:no-unnecessary-type-assertion
- signTypedDataUtils._encodeData(field.type, value as EIP712Object, types),
- );
- encodedValues.push(hashValue);
- } else if (field.type.lastIndexOf(']') === field.type.length - 1) {
- throw new Error('Arrays currently unimplemented in encodeData');
- } else {
- encodedTypes.push(field.type);
- const normalizedValue = signTypedDataUtils._normalizeValue(field.type, value);
- encodedValues.push(normalizedValue);
- }
- }
- return ethers.utils.defaultAbiCoder.encode(encodedTypes, encodedValues);
- },
- _normalizeValue(type: string, value: any): EIP712ObjectValue {
- const normalizedValue = type === 'uint256' && BigNumber.isBigNumber(value) ? value.toString() : value;
- return normalizedValue;
- },
- _typeHash(primaryType: string, types: EIP712Types): Buffer {
- return ethUtil.sha3(signTypedDataUtils._encodeType(primaryType, types));
- },
- _structHash(primaryType: string, data: EIP712Object, types: EIP712Types): Buffer {
- return ethUtil.sha3(signTypedDataUtils._encodeData(primaryType, data, types));
- },
-};
diff --git a/packages/utils/test/abi_encoder/abi_samples/method_abis.ts b/packages/utils/test/abi_encoder/abi_samples/method_abis.ts
deleted file mode 100644
index fc552c127..000000000
--- a/packages/utils/test/abi_encoder/abi_samples/method_abis.ts
+++ /dev/null
@@ -1,780 +0,0 @@
-/* tslint:disable max-file-line-count */
-import { MethodAbi } from 'ethereum-types';
-
-export const simpleAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'greg',
- type: 'uint256',
- },
- {
- name: 'gregStr',
- type: 'string',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const stringAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'greg',
- type: 'string[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const GAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'a',
- type: 'uint256',
- },
- {
- name: 'b',
- type: 'string',
- },
- {
- name: 'e',
- type: 'bytes',
- },
- {
- name: 'f',
- type: 'address',
- },
- ],
-
- name: 'f',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const typesWithDefaultWidthsAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someUint',
- type: 'uint',
- },
- {
- name: 'someInt',
- type: 'int',
- },
- {
- name: 'someByte',
- type: 'byte',
- },
- {
- name: 'someUint',
- type: 'uint[]',
- },
- {
- name: 'someInt',
- type: 'int[]',
- },
- {
- name: 'someByte',
- type: 'byte[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const multiDimensionalArraysStaticTypeAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'a',
- type: 'uint8[][][]',
- },
- {
- name: 'b',
- type: 'uint8[][][2]',
- },
- {
- name: 'c',
- type: 'uint8[][2][]',
- },
- {
- name: 'd',
- type: 'uint8[2][][]',
- },
- {
- name: 'e',
- type: 'uint8[][2][2]',
- },
- {
- name: 'f',
- type: 'uint8[2][2][]',
- },
- {
- name: 'g',
- type: 'uint8[2][][2]',
- },
- {
- name: 'h',
- type: 'uint8[2][2][2]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const multiDimensionalArraysDynamicTypeAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'a',
- type: 'string[][][]',
- },
- {
- name: 'b',
- type: 'string[][][2]',
- },
- {
- name: 'c',
- type: 'string[][2][]',
- },
- {
- name: 'h',
- type: 'string[2][2][2]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const dynamicTupleAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- ],
- name: 'order',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayOfStaticTuplesWithDefinedLengthAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someUint2',
- type: 'uint256',
- },
- ],
- name: 'order',
- type: 'tuple[8]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayOfStaticTuplesWithDynamicLengthAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someUint2',
- type: 'uint256',
- },
- ],
- name: 'order',
- type: 'tuple[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayOfDynamicTuplesWithDefinedLengthAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someString',
- type: 'string',
- },
- ],
- name: 'order',
- type: 'tuple[8]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayOfDynamicTuplesWithUndefinedLengthAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someString',
- type: 'string',
- },
- ],
- name: 'order',
- type: 'tuple[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayOfDynamicTuplesAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someString',
- type: 'string',
- },
- ],
- name: 'order',
- type: 'tuple[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const multidimensionalArrayOfDynamicTuplesAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someString',
- type: 'string',
- },
- ],
- name: 'order',
- type: 'tuple[][2][]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const staticTupleAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'someUint1',
- type: 'uint256',
- },
- {
- name: 'someUint2',
- type: 'uint256',
- },
- {
- name: 'someUint3',
- type: 'uint256',
- },
- {
- name: 'someBool',
- type: 'bool',
- },
- ],
- name: 'order',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const staticArrayAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someStaticArray',
- type: 'uint8[3]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const staticArrayDynamicMembersAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someStaticArray',
- type: 'string[3]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const dynamicArrayDynamicMembersAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someStaticArray',
- type: 'string[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const dynamicArrayStaticMembersAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someStaticArray',
- type: 'uint8[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const largeFlatAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someUInt256',
- type: 'uint256',
- },
- {
- name: 'someInt256',
- type: 'int256',
- },
- {
- name: 'someInt32',
- type: 'int32',
- },
- {
- name: 'someByte',
- type: 'byte',
- },
- {
- name: 'someBytes32',
- type: 'bytes32',
- },
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someString',
- type: 'string',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- {
- name: 'someBool',
- type: 'bool',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const largeNestedAbi: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someStaticArray',
- type: 'uint8[3]',
- },
- {
- name: 'someStaticArrayWithDynamicMembers',
- type: 'string[2]',
- },
- {
- name: 'someDynamicArrayWithDynamicMembers',
- type: 'bytes[]',
- },
- {
- name: 'some2DArray',
- type: 'string[][]',
- },
- {
- name: 'someTuple',
- type: 'tuple',
- components: [
- {
- name: 'someUint32',
- type: 'uint32',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- ],
- },
- {
- name: 'someTupleWithDynamicTypes',
- type: 'tuple',
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- /*{
- name: 'someStrArray',
- type: 'string[]',
- },*/
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- ],
- },
- {
- name: 'someArrayOfTuplesWithDynamicTypes',
- type: 'tuple[]',
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- /*{
- name: 'someStrArray',
- type: 'string[]',
- },*/
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- ],
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const nestedTuples: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'firstTuple',
- type: 'tuple[1]',
- components: [
- {
- name: 'someUint32',
- type: 'uint32',
- },
- {
- name: 'nestedTuple',
- type: 'tuple',
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- ],
- },
- ],
- },
- {
- name: 'secondTuple',
- type: 'tuple[]',
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- {
- name: 'nestedTuple',
- type: 'tuple',
- components: [
- {
- name: 'someUint32',
- type: 'uint32',
- },
- {
- name: 'secondNestedTuple',
- type: 'tuple',
- components: [
- {
- name: 'someUint',
- type: 'uint256',
- },
- {
- name: 'someStr',
- type: 'string',
- },
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- ],
- },
- ],
- },
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someAddress',
- type: 'address',
- },
- ],
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const simpleAbi2: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'someByte',
- type: 'byte',
- },
- {
- name: 'someBytes32',
- type: 'bytes32',
- },
- {
- name: 'someBytes',
- type: 'bytes',
- },
- {
- name: 'someString',
- type: 'string',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const fillOrderAbi: MethodAbi = {
- 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: 'salt',
- type: 'uint256',
- },
- {
- name: 'orderSignature',
- type: 'bytes',
- },
- {
- name: 'takerSignature',
- type: 'bytes',
- },
- ],
- name: 'fillOrder',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
diff --git a/packages/utils/test/abi_encoder/abi_samples/optimizer_abis.ts b/packages/utils/test/abi_encoder/abi_samples/optimizer_abis.ts
deleted file mode 100644
index 7cfd7a118..000000000
--- a/packages/utils/test/abi_encoder/abi_samples/optimizer_abis.ts
+++ /dev/null
@@ -1,340 +0,0 @@
-/* tslint:disable max-file-line-count */
-import { MethodAbi } from 'ethereum-types';
-
-export const duplicateDynamicArraysWithStaticElements: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array1',
- type: 'uint[]',
- },
- {
- name: 'array2',
- type: 'uint[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateDynamicArraysWithDynamicElements: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array1',
- type: 'string[]',
- },
- {
- name: 'array2',
- type: 'string[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateStaticArraysWithStaticElements: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array1',
- type: 'uint[2]',
- },
- {
- name: 'array2',
- type: 'uint[2]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateStaticArraysWithDynamicElements: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array1',
- type: 'string[2]',
- },
- {
- name: 'array2',
- type: 'string[2]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateArrayElements: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array',
- type: 'string[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateTupleFields: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'field1',
- type: 'string',
- },
- {
- name: 'field2',
- type: 'string',
- },
- ],
- name: 'Tuple',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateStrings: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'string1',
- type: 'string',
- },
- {
- name: 'string2',
- type: 'string',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateBytes: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'bytes1',
- type: 'bytes',
- },
- {
- name: 'bytes2',
- type: 'bytes',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateTuples: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'field1',
- type: 'string',
- },
- {
- name: 'field2',
- type: 'uint',
- },
- ],
- name: 'Tuple',
- type: 'tuple',
- },
- {
- components: [
- {
- name: 'field1',
- type: 'string',
- },
- {
- name: 'field2',
- type: 'uint',
- },
- ],
- name: 'Tuple',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateArraysNestedInTuples: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- name: 'field',
- type: 'uint[]',
- },
- ],
- name: 'Tuple1',
- type: 'tuple',
- },
- {
- components: [
- {
- name: 'field',
- type: 'uint[]',
- },
- {
- name: 'extraField',
- type: 'string',
- },
- ],
- name: 'Tuple2',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateTuplesNestedInTuples: MethodAbi = {
- constant: false,
- inputs: [
- {
- components: [
- {
- components: [
- {
- name: 'nestedField',
- type: 'string',
- },
- ],
- name: 'field',
- type: 'tuple',
- },
- ],
- name: 'Tuple1',
- type: 'tuple',
- },
- {
- components: [
- {
- components: [
- {
- name: 'nestedField',
- type: 'string',
- },
- ],
- name: 'field',
- type: 'tuple',
- },
- {
- name: 'extraField',
- type: 'string',
- },
- ],
- name: 'Tuple1',
- type: 'tuple',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const duplicateTwoDimensionalArrays: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'array1',
- type: 'string[][]',
- },
- {
- name: 'array2',
- type: 'string[][]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayElementsDuplicatedAsSeparateParameter: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'stringArray',
- type: 'string[]',
- },
- {
- name: 'string',
- type: 'string',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const arrayElementsDuplicatedAsTupleFields: MethodAbi = {
- constant: false,
- inputs: [
- {
- name: 'uint8Array',
- type: 'uint8[]',
- },
- {
- components: [
- {
- name: 'uint',
- type: 'uint',
- },
- ],
- name: 'uintTuple',
- type: 'tuple[]',
- },
- ],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
diff --git a/packages/utils/test/abi_encoder/abi_samples/return_value_abis.ts b/packages/utils/test/abi_encoder/abi_samples/return_value_abis.ts
deleted file mode 100644
index ac2124011..000000000
--- a/packages/utils/test/abi_encoder/abi_samples/return_value_abis.ts
+++ /dev/null
@@ -1,99 +0,0 @@
-/* tslint:disable max-file-line-count */
-import { MethodAbi } from 'ethereum-types';
-
-export const noReturnValues: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const singleStaticReturnValue: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [
- {
- name: 'Bytes4',
- type: 'bytes4',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const multipleStaticReturnValues: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [
- {
- name: 'val1',
- type: 'bytes4',
- },
- {
- name: 'val2',
- type: 'bytes4',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const singleDynamicReturnValue: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [
- {
- name: 'val',
- type: 'bytes',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const multipleDynamicReturnValues: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [
- {
- name: 'val1',
- type: 'bytes',
- },
- {
- name: 'val2',
- type: 'bytes',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
-
-export const mixedStaticAndDynamicReturnValues: MethodAbi = {
- constant: false,
- inputs: [],
- name: 'simpleFunction',
- outputs: [
- {
- name: 'val1',
- type: 'bytes4',
- },
- {
- name: 'val2',
- type: 'bytes',
- },
- ],
- payable: false,
- stateMutability: 'nonpayable',
- type: 'function',
-};
diff --git a/packages/utils/test/abi_encoder/evm_data_types_test.ts b/packages/utils/test/abi_encoder/evm_data_types_test.ts
deleted file mode 100644
index 4814ce28b..000000000
--- a/packages/utils/test/abi_encoder/evm_data_types_test.ts
+++ /dev/null
@@ -1,1168 +0,0 @@
-/* tslint:disable max-file-line-count */
-import * as chai from 'chai';
-import * as ethUtil from 'ethereumjs-util';
-import 'mocha';
-
-import { AbiEncoder, BigNumber } from '../../src/';
-import { chaiSetup } from '../utils/chai_setup';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('ABI Encoder: EVM Data Type Encoding/Decoding', () => {
- const encodingRules: AbiEncoder.EncodingRules = { shouldOptimize: false }; // optimizer is tested separately.
- describe('Array', () => {
- it('Fixed size; Static elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'int[2]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = [new BigNumber(5), new BigNumber(6)];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Dynamic size; Static elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'int[]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = [new BigNumber(5), new BigNumber(6)];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Fixed size; Dynamic elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'string[2]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = ['Hello', 'world'];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005776f726c64000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Dynamic size; Dynamic elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'string[]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = ['Hello', 'world'];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005776f726c64000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Dynamic Size; Multidimensional; Dynamic Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'bytes[][]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708', '0x09101112'];
- const array2 = ['0x10111213', '0x14151617'];
- const array3 = ['0x18192021'];
- const args = [array1, array2, array3];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000040102030400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000405060708000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004091011120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000041011121300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000414151617000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000041819202100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Dynamic Size; Multidimensional; Static Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'bytes4[][]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708', '0x09101112'];
- const array2 = ['0x10111213', '0x14151617'];
- const array3 = ['0x18192021'];
- const args = [array1, array2, array3];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000301020304000000000000000000000000000000000000000000000000000000000506070800000000000000000000000000000000000000000000000000000000091011120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000021011121300000000000000000000000000000000000000000000000000000000141516170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011819202100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Static Size; Multidimensional; Static Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'bytes4[3][2]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708', '0x09101112'];
- const array2 = ['0x10111213', '0x14151617', '0x18192021'];
- const args = [array1, array2];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x010203040000000000000000000000000000000000000000000000000000000005060708000000000000000000000000000000000000000000000000000000000910111200000000000000000000000000000000000000000000000000000000101112130000000000000000000000000000000000000000000000000000000014151617000000000000000000000000000000000000000000000000000000001819202100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Static Size; Multidimensional; Dynamic Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'bytes[3][2]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708', '0x09101112'];
- const array2 = ['0x10111213', '0x14151617', '0x18192021'];
- const args = [array1, array2];
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000401020304000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004050607080000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040910111200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000000410111213000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004141516170000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041819202100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Static size; Too Few Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'string[3]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = ['Hello', 'world'];
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Expected array of 3 elements, but got array of length 2');
- });
- it('Static size; Too Many Elements', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'string[1]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = ['Hello', 'world'];
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Expected array of 1 elements, but got array of length 2');
- });
- it('Element Type Mismatch', async () => {
- // Create DataType object
- const testDataItem = { name: 'testArray', type: 'uint[]' };
- const dataType = new AbiEncoder.Array(testDataItem);
- // Construct args to be encoded
- const args = [new BigNumber(1), 'Bad Argument'];
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Tried to assign NaN value');
- });
- });
-
- describe('Tuple', () => {
- it('Static elements only', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field_1', type: 'int32' }, { name: 'field_2', type: 'bool' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = { field_1: new BigNumber(-5), field_2: true };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args, encodingRules);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Dynamic elements only', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field_1', type: 'string' }, { name: 'field_2', type: 'bytes' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = { field_1: 'Hello, World!', field_2: '0xabcdef0123456789' };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20576f726c6421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008abcdef0123456789000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Nested Static Array', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field', type: 'uint[2]' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = { field: [new BigNumber(1), new BigNumber(2)] };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Nested Dynamic Array', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field', type: 'uint[]' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = { field: [new BigNumber(1), new BigNumber(2)] };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Nested Static Multidimensional Array', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field', type: 'bytes4[2][2]' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708'];
- const array2 = ['0x09101112', '0x13141516'];
- const args = { field: [array1, array2] };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x0102030400000000000000000000000000000000000000000000000000000000050607080000000000000000000000000000000000000000000000000000000009101112000000000000000000000000000000000000000000000000000000001314151600000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Nested Dynamic Multidimensional Array', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field', type: 'bytes[2][2]' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const array1 = ['0x01020304', '0x05060708'];
- const array2 = ['0x09101112', '0x13141516'];
- const args = { field: [array1, array2] };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004010203040000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040506070800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000004091011120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000041314151600000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Static and dynamic elements mixed', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [
- { name: 'field_1', type: 'int32' },
- { name: 'field_2', type: 'string' },
- { name: 'field_3', type: 'bool' },
- { name: 'field_4', type: 'bytes' },
- ],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = {
- field_1: new BigNumber(-5),
- field_2: 'Hello, World!',
- field_3: true,
- field_4: '0xabcdef0123456789',
- };
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffb0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20576f726c6421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008abcdef0123456789000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodingRules: AbiEncoder.DecodingRules = { shouldConvertStructsToObjects: true };
- const decodedArgs = dataType.decode(encodedArgs, decodingRules);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Missing Key', async () => {
- // Create DataType object
- const testDataItem = {
- name: 'Tuple',
- type: 'tuple',
- components: [{ name: 'field_1', type: 'int32' }, { name: 'field_2', type: 'bool' }],
- };
- const dataType = new AbiEncoder.Tuple(testDataItem);
- // Construct args to be encoded
- const args = { field_1: new BigNumber(-5) };
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Could not assign tuple to object: missing key \'field_2\' in object {"field_1":"-5"}');
- });
- });
-
- describe('Address', () => {
- it('Valid Address', async () => {
- // Create DataType object
- const testDataItem = { name: 'Address', type: 'address' };
- const dataType = new AbiEncoder.Address(testDataItem);
- // Construct args to be encoded
- const args = '0xe41d2489571d322189246dafa5ebde1f4699f498';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Invalid Address - input is not valid hex', async () => {
- // Create DataType object
- const testDataItem = { name: 'Address', type: 'address' };
- const dataType = new AbiEncoder.Address(testDataItem);
- // Construct args to be encoded
- const args = 'e4';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw(`Invalid address: '${args}'`);
- });
- it('Invalid Address - input is not 20 bytes', async () => {
- // Create DataType object
- const testDataItem = { name: 'Address', type: 'address' };
- const dataType = new AbiEncoder.Address(testDataItem);
- // Construct args to be encoded
- const args = '0xe4';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw(`Invalid address: '${args}'`);
- });
- });
-
- describe('Bool', () => {
- it('True', async () => {
- // Create DataType object
- const testDataItem = { name: 'Boolean', type: 'bool' };
- const dataType = new AbiEncoder.Bool(testDataItem);
- // Construct args to be encoded
- const args = true;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('False', async () => {
- // Create DataType object
- const testDataItem = { name: 'Boolean', type: 'bool' };
- const dataType = new AbiEncoder.Bool(testDataItem);
- // Construct args to be encoded
- const args = false;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- });
-
- describe('Integer', () => {
- /* tslint:disable custom-no-magic-numbers */
- const max256BitInteger = new BigNumber(2).pow(255).minus(1);
- const min256BitInteger = new BigNumber(2).pow(255).times(-1);
- const max32BitInteger = new BigNumber(2).pow(31).minus(1);
- const min32BitInteger = new BigNumber(2).pow(31).times(-1);
- /* tslint:enable custom-no-magic-numbers */
-
- it('Int256 - Positive Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int256 - Negative Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(-1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int256 - Positive Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = max256BitInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int256 - Negative Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = min256BitInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = `0x8000000000000000000000000000000000000000000000000000000000000000`;
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int256 - Value too large', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = max256BitInteger.plus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('Int256 - Value too small', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (256)', type: 'int' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = min256BitInteger.minus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('Int32 - Positive Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int32 - Negative Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(-1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int32 - Positive Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = max32BitInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x000000000000000000000000000000000000000000000000000000007fffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int32 - Negative Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = min32BitInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = `0xffffffffffffffffffffffffffffffffffffffffffffffffffffffff80000000`;
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Int32 - Value too large', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = max32BitInteger.plus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('Int32 - Value too small', async () => {
- // Create DataType object
- const testDataItem = { name: 'Integer (32)', type: 'int32' };
- const dataType = new AbiEncoder.Int(testDataItem);
- // Construct args to be encoded
- const args = min32BitInteger.minus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- });
-
- describe('Unsigned Integer', () => {
- /* tslint:disable custom-no-magic-numbers */
- const max256BitUnsignedInteger = new BigNumber(2).pow(256).minus(1);
- const min256BitUnsignedInteger = new BigNumber(0);
- const max32BitUnsignedInteger = new BigNumber(2).pow(32).minus(1);
- const min32BitUnsignedInteger = new BigNumber(0);
- /* tslint:enable custom-no-magic-numbers */
-
- it('UInt256 - Positive Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (256)', type: 'uint' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt256 - Positive Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (256)', type: 'uint' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = max256BitUnsignedInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt256 - Zero Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (256)', type: 'uint' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = min256BitUnsignedInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = `0x0000000000000000000000000000000000000000000000000000000000000000`;
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt256 - Value too large', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (256)', type: 'uint' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = max256BitUnsignedInteger.plus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('UInt256 - Value too small', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (256)', type: 'uint' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = min256BitUnsignedInteger.minus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('UInt32 - Positive Base Case', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (32)', type: 'uint32' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = new BigNumber(1);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0000000000000000000000000000000000000000000000000000000000000001';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt32 - Positive Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (32)', type: 'uint32' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = max32BitUnsignedInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x00000000000000000000000000000000000000000000000000000000ffffffff';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt32 - Zero Value', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (32)', type: 'uint32' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = min32BitUnsignedInteger;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = `0x0000000000000000000000000000000000000000000000000000000000000000`;
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('UInt32 - Value too large', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (32)', type: 'uint32' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = max32BitUnsignedInteger.plus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- it('UInt32 - Value too small', async () => {
- // Create DataType object
- const testDataItem = { name: 'Unsigned Integer (32)', type: 'uint32' };
- const dataType = new AbiEncoder.UInt(testDataItem);
- // Construct args to be encoded
- const args = min32BitUnsignedInteger.minus(1);
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw();
- });
- });
-
- describe('Static Bytes', () => {
- it('Single Byte (byte)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Byte', type: 'byte' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x05';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0500000000000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Single Byte (bytes1)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes1', type: 'bytes1' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x05';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0500000000000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('4 Bytes (bytes4)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes4', type: 'bytes4' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x00010203';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0001020300000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('4 Bytes (bytes4); Encoder must pad input', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes4', type: 'bytes4' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const args = '0x1a18';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x1a18000000000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- const paddedArgs = '0x1a180000';
- expect(decodedArgs).to.be.deep.equal(paddedArgs);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('32 Bytes (bytes32)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes32', type: 'bytes32' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x0001020304050607080911121314151617181920212223242526272829303132';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x0001020304050607080911121314151617181920212223242526272829303132';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('32 Bytes (bytes32); Encoder must pad input', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes32', type: 'bytes32' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const args = '0x1a18bf61';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs = '0x1a18bf6100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- const paddedArgs = '0x1a18bf6100000000000000000000000000000000000000000000000000000000';
- expect(decodedArgs).to.be.deep.equal(paddedArgs);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Should throw when pass in too many bytes (bytes4)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes4', type: 'bytes4' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x0102030405';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw(
- 'Tried to assign 0x0102030405 (5 bytes), which exceeds max bytes that can be stored in a bytes4',
- );
- });
- it('Should throw when pass in too many bytes (bytes32)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes32', type: 'bytes32' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x010203040506070809101112131415161718192021222324252627282930313233';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw(
- 'Tried to assign 0x010203040506070809101112131415161718192021222324252627282930313233 (33 bytes), which exceeds max bytes that can be stored in a bytes32',
- );
- });
- it('Should throw when pass in bad hex (no 0x prefix)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes32', type: 'bytes32' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0102030405060708091011121314151617181920212223242526272829303132';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw("Tried to encode non-hex value. Value must inlcude '0x' prefix.");
- });
- it('Should throw when pass in bad hex (include a half-byte)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes32', type: 'bytes32' };
- const dataType = new AbiEncoder.StaticBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x010';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Tried to assign 0x010, which is contains a half-byte. Use full bytes only.');
- });
- });
-
- describe('Dynamic Bytes', () => {
- it('Fits into one EVM word', async () => {
- // Create DataType object
- const testDataItem = { name: 'Dynamic Bytes', type: 'bytes' };
- const dataType = new AbiEncoder.DynamicBytes(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const args = '0x1a18bf61';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000041a18bf6100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Spans multiple EVM words', async () => {
- // Create DataType object
- const testDataItem = { name: 'Dynamic Bytes', type: 'bytes' };
- const dataType = new AbiEncoder.DynamicBytes(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const bytesLength = 40;
- const args = `0x${'61'.repeat(bytesLength)}`;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000002861616161616161616161616161616161616161616161616161616161616161616161616161616161000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Input as Buffer', async () => {
- // Create DataType object
- const testDataItem = { name: 'Dynamic Bytes', type: 'bytes' };
- const dataType = new AbiEncoder.DynamicBytes(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const args = '0x1a18bf61';
- const argsAsBuffer = ethUtil.toBuffer(args);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(argsAsBuffer);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000041a18bf6100000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Should throw when pass in bad hex (no 0x prefix)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes', type: 'bytes' };
- const dataType = new AbiEncoder.DynamicBytes(testDataItem);
- // Construct args to be encoded
- const args = '01';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw("Tried to encode non-hex value. Value must inlcude '0x' prefix.");
- });
- it('Should throw when pass in bad hex (include a half-byte)', async () => {
- // Create DataType object
- const testDataItem = { name: 'Static Bytes', type: 'bytes' };
- const dataType = new AbiEncoder.DynamicBytes(testDataItem);
- // Construct args to be encoded
- const args = '0x010';
- // Encode Args and validate result
- expect(() => {
- dataType.encode(args, encodingRules);
- }).to.throw('Tried to assign 0x010, which is contains a half-byte. Use full bytes only.');
- });
- });
-
- describe('String', () => {
- it('Fits into one EVM word', async () => {
- // Create DataType object
- const testDataItem = { name: 'String', type: 'string' };
- const dataType = new AbiEncoder.String(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const args = 'five';
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x00000000000000000000000000000000000000000000000000000000000000046669766500000000000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('Spans multiple EVM words', async () => {
- // Create DataType object
- const testDataItem = { name: 'String', type: 'string' };
- const dataType = new AbiEncoder.String(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const bytesLength = 40;
- const args = 'a'.repeat(bytesLength);
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000002861616161616161616161616161616161616161616161616161616161616161616161616161616161000000000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- it('String that begins with 0x prefix', async () => {
- // Create DataType object
- const testDataItem = { name: 'String', type: 'string' };
- const dataType = new AbiEncoder.String(testDataItem);
- // Construct args to be encoded
- // Note: There will be padding because this is a bytes32 but we are only passing in 4 bytes.
- const strLength = 40;
- const args = `0x${'a'.repeat(strLength)}`;
- // Encode Args and validate result
- const encodedArgs = dataType.encode(args, encodingRules);
- const expectedEncodedArgs =
- '0x000000000000000000000000000000000000000000000000000000000000002a30786161616161616161616161616161616161616161616161616161616161616161616161616161616100000000000000000000000000000000000000000000';
- expect(encodedArgs).to.be.equal(expectedEncodedArgs);
- // Decode Encoded Args and validate result
- const decodedArgs = dataType.decode(encodedArgs);
- expect(decodedArgs).to.be.deep.equal(args);
- // Validate signature
- const dataTypeFromSignature = AbiEncoder.create(dataType.getSignature(true));
- const argsEncodedFromSignature = dataTypeFromSignature.encode(args);
- expect(argsEncodedFromSignature).to.be.deep.equal(expectedEncodedArgs);
- });
- });
-});
diff --git a/packages/utils/test/abi_encoder/methods_test.ts b/packages/utils/test/abi_encoder/methods_test.ts
deleted file mode 100644
index d8045fece..000000000
--- a/packages/utils/test/abi_encoder/methods_test.ts
+++ /dev/null
@@ -1,385 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { AbiEncoder, BigNumber } from '../../src/';
-import { chaiSetup } from '../utils/chai_setup';
-
-import * as AbiSamples from './abi_samples/method_abis';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('ABI Encoder: Method Encoding / Decoding', () => {
- const encodingRules: AbiEncoder.EncodingRules = { shouldOptimize: false }; // optimizer is tested separately.
- it('Types with default widths', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.typesWithDefaultWidthsAbi);
- const args = [new BigNumber(1), new BigNumber(-1), '0x56', [new BigNumber(1)], [new BigNumber(-1)], ['0x56']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x09f2b0c30000000000000000000000000000000000000000000000000000000000000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff560000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000015600000000000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Array of Static Tuples (Array has defined length)', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.arrayOfStaticTuplesWithDefinedLengthAbi);
- let value = 0;
- const arrayOfTuples = [];
- const arrayOfTuplesLength = 8;
- for (let i = 0; i < arrayOfTuplesLength; ++i) {
- arrayOfTuples.push([new BigNumber(++value), new BigNumber(++value)]);
- }
- const args = [arrayOfTuples];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x9eb20969000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000010';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Array of Static Tuples (Array has dynamic length)', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.arrayOfStaticTuplesWithDynamicLengthAbi);
- let value = 0;
- const arrayOfTuples = [];
- const arrayOfTuplesLength = 8;
- for (let i = 0; i < arrayOfTuplesLength; ++i) {
- arrayOfTuples.push([new BigNumber(++value), new BigNumber(++value)]);
- }
- const args = [arrayOfTuples];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x63275d6e00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000010';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Array of Dynamic Tuples (Array has defined length)', async () => {
- // Generate Calldata
- const method = new AbiEncoder.Method(AbiSamples.arrayOfDynamicTuplesWithDefinedLengthAbi);
- let value = 0;
- const arrayOfTuples = [];
- const arrayOfTuplesLength = 8;
- for (let i = 0; i < arrayOfTuplesLength; ++i) {
- arrayOfTuples.push([new BigNumber(++value), new BigNumber(++value).toString()]);
- }
- const args = [arrayOfTuples];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0xdeedb00f00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000132000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000013400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000138000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023132000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023136000000000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Array of Dynamic Tuples (Array has dynamic length)', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.arrayOfDynamicTuplesWithUndefinedLengthAbi);
- let value = 0;
- const arrayOfTuples = [];
- const arrayOfTuplesLength = 8;
- for (let i = 0; i < arrayOfTuplesLength; ++i) {
- arrayOfTuples.push([new BigNumber(++value), new BigNumber(++value).toString()]);
- }
- const args = [arrayOfTuples];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x60c847fb000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000280000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000003800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000048000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000132000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000013400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000001360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000138000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023130000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023132000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000023136000000000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Multidimensional Arrays / Static Members', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.multiDimensionalArraysStaticTypeAbi);
- // Eight 3-dimensional arrays of uint8[2][2][2]
- let value = 0;
- const args = [];
- const argsLength = 8;
- for (let i = 0; i < argsLength; ++i) {
- args.push([[[++value, ++value], [++value, ++value]], [[++value, ++value], [++value, ++value]]]);
- }
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0xc2f47d6f00000000000000000000000000000000000000000000000000000000000001e00000000000000000000000000000000000000000000000000000000000000480000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000d400000000000000000000000000000000000000000000000000000000000000e600000000000000000000000000000000000000000000000000000000000000039000000000000000000000000000000000000000000000000000000000000003a000000000000000000000000000000000000000000000000000000000000003b000000000000000000000000000000000000000000000000000000000000003c000000000000000000000000000000000000000000000000000000000000003d000000000000000000000000000000000000000000000000000000000000003e000000000000000000000000000000000000000000000000000000000000003f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000300000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000050000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000009000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000b000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000d000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000110000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000130000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001500000000000000000000000000000000000000000000000000000000000000160000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001700000000000000000000000000000000000000000000000000000000000000180000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001b000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000001d000000000000000000000000000000000000000000000000000000000000001e000000000000000000000000000000000000000000000000000000000000001f000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000140000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000230000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000025000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000027000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000029000000000000000000000000000000000000000000000000000000000000002a000000000000000000000000000000000000000000000000000000000000002b000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000002d000000000000000000000000000000000000000000000000000000000000002e000000000000000000000000000000000000000000000000000000000000002f0000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000003100000000000000000000000000000000000000000000000000000000000000320000000000000000000000000000000000000000000000000000000000000033000000000000000000000000000000000000000000000000000000000000003400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000035000000000000000000000000000000000000000000000000000000000000003600000000000000000000000000000000000000000000000000000000000000370000000000000000000000000000000000000000000000000000000000000038';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Multidimensional Arrays / Dynamic Members', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.multiDimensionalArraysDynamicTypeAbi);
- // Eight 3-dimensional arrays of string[2][2][2]
- let value = 0;
- const args = [];
- const argsLength = 4;
- for (let i = 0; i < argsLength; ++i) {
- args.push([
- [
- [new BigNumber(++value).toString(), new BigNumber(++value).toString()],
- [new BigNumber(++value).toString(), new BigNumber(++value).toString()],
- ],
- [
- [new BigNumber(++value).toString(), new BigNumber(++value).toString()],
- [new BigNumber(++value).toString(), new BigNumber(++value).toString()],
- ],
- ]);
- }
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x81534ebd0000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000052000000000000000000000000000000000000000000000000000000000000009a00000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000013300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000001350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000137000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000139000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002313000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000023131000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000231320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000002313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023134000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000231350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002313600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000024000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000231370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002313800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000023139000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000023231000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000232320000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000002323300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023234000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000232350000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002323600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000232370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002323800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000002323900000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023330000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000002333100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000023332000000000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Fixed Length Array / Dynamic Members', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.staticArrayDynamicMembersAbi);
- const args = [['Brave', 'New', 'World']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x243a6e6e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000005427261766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e657700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Fixed Length Array / Dynamic Members', async () => {
- // Generaet calldata
- const method = new AbiEncoder.Method(AbiSamples.staticArrayDynamicMembersAbi);
- const args = [['Brave', 'New', 'World']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x243a6e6e0000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000005427261766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e657700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Unfixed Length Array / Dynamic Members ABI', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.dynamicArrayDynamicMembersAbi);
- const args = [['Brave', 'New', 'World']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x13e751a900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000005427261766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034e657700000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Unfixed Length Array / Static Members ABI', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.dynamicArrayStaticMembersAbi);
- // tslint:disable custom-no-magic-numbers
- const args = [[127, 14, 54]];
- // tslint:enable custom-no-magic-numbers
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x4fc8a83300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000036';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Fixed Length Array / Static Members ABI', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.staticArrayAbi);
- // tslint:disable custom-no-magic-numbers
- const args = [[127, 14, 54]];
- // tslint:enable custom-no-magic-numbers
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0xf68ade72000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000036';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Array ABI', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(AbiSamples.stringAbi);
- const args = [['five', 'six', 'seven']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x13e751a900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000000046669766500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000373697800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005736576656e000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Static Tuple', async () => {
- // Generate calldata
- // This is dynamic because it has dynamic members
- const method = new AbiEncoder.Method(AbiSamples.staticTupleAbi);
- const args = [[new BigNumber(5), new BigNumber(10), new BigNumber(15), false]];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0xa9125e150000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Dynamic Tuple (Array input)', async () => {
- // Generate calldata
- // This is dynamic because it has dynamic members
- const method = new AbiEncoder.Method(AbiSamples.dynamicTupleAbi);
- const args = [[new BigNumber(5), 'five']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x5b998f3500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000046669766500000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Dynamic Tuple (Object input)', async () => {
- // Generate Calldata
- // This is dynamic because it has dynamic members
- const method = new AbiEncoder.Method(AbiSamples.dynamicTupleAbi);
- const args = [[new BigNumber(5), 'five']];
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x5b998f3500000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000046669766500000000000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Large, Flat ABI', async () => {
- // Construct calldata
- const method = new AbiEncoder.Method(AbiSamples.largeFlatAbi);
- const args = [
- new BigNumber(256745454),
- new BigNumber(-256745454),
- new BigNumber(434244),
- '0x43',
- '0x0001020304050607080911121314151617181920212223242526272829303132',
- '0x0001020304050607080911121314151617181920212223242526272829303132080911121314151617181920212223242526272829303132',
- 'Little peter piper piped a piping pepper pot',
- '0xe41d2489571d322189246dafa5ebde1f4699f498',
- true,
- ];
- // Validate calldata
- const calldata = method.encode(args, encodingRules);
- const expectedCalldata =
- '0x312d4d42000000000000000000000000000000000000000000000000000000000f4d9feefffffffffffffffffffffffffffffffffffffffffffffffffffffffff0b26012000000000000000000000000000000000000000000000000000000000006a0444300000000000000000000000000000000000000000000000000000000000000000102030405060708091112131415161718192021222324252627282930313200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000180000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f4980000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000003800010203040506070809111213141516171819202122232425262728293031320809111213141516171819202122232425262728293031320000000000000000000000000000000000000000000000000000000000000000000000000000002c4c6974746c65207065746572207069706572207069706564206120706970696e672070657070657220706f740000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodingRules = { shouldConvertStructsToObjects: false };
- const decodedValue = method.decode(calldata, decodingRules);
- expect(decodedValue).to.be.deep.equal(args);
- });
- it('Large, Nested ABI', async () => {
- // Construct Calldata
- const method = new AbiEncoder.Method(AbiSamples.largeNestedAbi);
- // tslint:disable custom-no-magic-numbers
- const someStaticArray = [127, 14, 54];
- // tslint:enable custom-no-magic-numbers
- const someStaticArrayWithDynamicMembers = [
- 'the little piping piper piped a piping pipper papper',
- 'the kid knows how to write poems, what can I say -- I guess theres a lot I could say to try to fill this line with a lot of text.',
- ];
- const someDynamicArrayWithDynamicMembers = [
- '0x38745637834987324827439287423897238947239847',
- '0x7283472398237423984723984729847248927498748974284728947239487498749847874329423743492347329847239842374892374892374892347238947289478947489374289472894738942749823743298742389472389473289472389437249823749823742893472398',
- '0x283473298473248923749238742398742398472894729843278942374982374892374892743982',
- ];
- const some2DArray = [
- [
- 'some string',
- 'some another string',
- 'there are just too many stringsup in',
- 'here',
- 'yall ghonna make me lose my mind',
- ],
- [
- 'the little piping piper piped a piping pipper papper',
- 'the kid knows how to write poems, what can I say -- I guess theres a lot I could say to try to fill this line with a lot of text.',
- ],
- [],
- ];
- const someTuple = {
- someUint32: new BigNumber(4037824789),
- someStr:
- 'the kid knows how to write poems, what can I say -- I guess theres a lot I could say to try to fill this line with a lot of text.',
- };
- const someTupleWithDynamicTypes = {
- someUint: new BigNumber(4024789),
- someStr: 'akdhjasjkdhasjkldshdjahdkjsahdajksdhsajkdhsajkdhadjkashdjksadhajkdhsajkdhsadjk',
- someBytes: '0x29384723894723843743289742389472398473289472348927489274894738427428947389facdea',
- someAddress: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- };
- const someTupleWithDynamicTypes2 = {
- someUint: new BigNumber(9024789),
- someStr: 'ksdhsajkdhsajkdhadjkashdjksadhajkdhsajkdhsadjkakdhjasjkdhasjkldshdjahdkjsahdaj',
- someBytes: '0x29384723894398473289472348927489272384374328974238947274894738427428947389facde1',
- someAddress: '0x746dafa5ebde1f4699f4981d3221892e41d24895',
- };
- const someTupleWithDynamicTypes3 = {
- someUint: new BigNumber(1024789),
- someStr: 'sdhsajkdhsajkdhadjkashdjakdhjasjkdhasjkldshdjahdkjsahdajkksadhajkdhsajkdhsadjk',
- someBytes: '0x38947238437432829384729742389472398473289472348927489274894738427428947389facdef',
- someAddress: '0x89571d322189e415ebde1f4699f498d24246dafa',
- };
- const someArrayOfTuplesWithDynamicTypes = [someTupleWithDynamicTypes2, someTupleWithDynamicTypes3];
- const args = {
- someStaticArray,
- someStaticArrayWithDynamicMembers,
- someDynamicArrayWithDynamicMembers,
- some2DArray,
- someTuple,
- someTupleWithDynamicTypes,
- someArrayOfTuplesWithDynamicTypes,
- };
- const calldata = method.encode(args, encodingRules);
- // Validate calldata
- const expectedCalldata =
- '0x4b49031c000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000e0000000000000000000000000000000000000000000000000000000000000036000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000440000000000000000000000000000000000000000000000000000000000000088000000000000000000000000000000000000000000000000000000000000009800000000000000000000000000000000000000000000000000000000000000ae0000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000034746865206c6974746c6520706970696e67207069706572207069706564206120706970696e6720706970706572207061707065720000000000000000000000000000000000000000000000000000000000000000000000000000000000000081746865206b6964206b6e6f777320686f7720746f20777269746520706f656d732c20776861742063616e204920736179202d2d2049206775657373207468657265732061206c6f74204920636f756c642073617920746f2074727920746f2066696c6c2074686973206c696e6520776974682061206c6f74206f6620746578742e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000014000000000000000000000000000000000000000000000000000000000000000163874563783498732482743928742389723894723984700000000000000000000000000000000000000000000000000000000000000000000000000000000006e72834723982374239847239847298472489274987489742847289472394874987498478743294237434923473298472398423748923748923748923472389472894789474893742894728947389427498237432987423894723894732894723894372498237498237428934723980000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000027283473298473248923749238742398742398472894729843278942374982374892374892743982000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000018000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000b736f6d6520737472696e670000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013736f6d6520616e6f7468657220737472696e67000000000000000000000000000000000000000000000000000000000000000000000000000000000000000024746865726520617265206a75737420746f6f206d616e7920737472696e6773757020696e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000046865726500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002079616c6c2067686f6e6e61206d616b65206d65206c6f7365206d79206d696e640000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000034746865206c6974746c6520706970696e67207069706572207069706564206120706970696e6720706970706572207061707065720000000000000000000000000000000000000000000000000000000000000000000000000000000000000081746865206b6964206b6e6f777320686f7720746f20777269746520706f656d732c20776861742063616e204920736179202d2d2049206775657373207468657265732061206c6f74204920636f756c642073617920746f2074727920746f2066696c6c2074686973206c696e6520776974682061206c6f74206f6620746578742e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000f0ac511500000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000081746865206b6964206b6e6f777320686f7720746f20777269746520706f656d732c20776861742063616e204920736179202d2d2049206775657373207468657265732061206c6f74204920636f756c642073617920746f2074727920746f2066696c6c2074686973206c696e6520776974682061206c6f74206f6620746578742e0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003d69d500000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498000000000000000000000000000000000000000000000000000000000000004e616b64686a61736a6b646861736a6b6c647368646a6168646b6a73616864616a6b73646873616a6b646873616a6b646861646a6b617368646a6b73616468616a6b646873616a6b64687361646a6b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002829384723894723843743289742389472398473289472348927489274894738427428947389facdea0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001a0000000000000000000000000000000000000000000000000000000000089b51500000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000100000000000000000000000000746dafa5ebde1f4699f4981d3221892e41d24895000000000000000000000000000000000000000000000000000000000000004e6b73646873616a6b646873616a6b646861646a6b617368646a6b73616468616a6b646873616a6b64687361646a6b616b64686a61736a6b646861736a6b6c647368646a6168646b6a73616864616a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002829384723894398473289472348927489272384374328974238947274894738427428947389facde100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa3150000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000010000000000000000000000000089571d322189e415ebde1f4699f498d24246dafa000000000000000000000000000000000000000000000000000000000000004e73646873616a6b646873616a6b646861646a6b617368646a616b64686a61736a6b646861736a6b6c647368646a6168646b6a73616864616a6b6b73616468616a6b646873616a6b64687361646a6b000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002838947238437432829384729742389472398473289472348927489274894738427428947389facdef000000000000000000000000000000000000000000000000';
- expect(calldata).to.be.equal(expectedCalldata);
- // Validate decoding
- const decodedValue = method.decode(calldata, { shouldConvertStructsToObjects: true });
- expect(decodedValue).to.be.deep.equal(args);
- });
-});
diff --git a/packages/utils/test/abi_encoder/optimizer_test.ts b/packages/utils/test/abi_encoder/optimizer_test.ts
deleted file mode 100644
index c2881f14c..000000000
--- a/packages/utils/test/abi_encoder/optimizer_test.ts
+++ /dev/null
@@ -1,269 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { AbiEncoder, BigNumber } from '../../src/';
-import { chaiSetup } from '../utils/chai_setup';
-
-import * as OptimizedAbis from './abi_samples/optimizer_abis';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('ABI Encoder: Optimized Method Encoding/Decoding', () => {
- const encodingRules: AbiEncoder.EncodingRules = { shouldOptimize: true };
- it('Duplicate Dynamic Arrays with Static Elements', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateDynamicArraysWithStaticElements);
- const array1 = [new BigNumber(100), new BigNumber(150)];
- const array2 = array1;
- const args = [array1, array2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x7221063300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000096';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Dynamic Arrays with Dynamic Elements', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateDynamicArraysWithDynamicElements);
- const array1 = ['Hello', 'World'];
- const array2 = array1;
- const args = [array1, array2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0xbb4f12e300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Static Arrays with Static Elements (should not optimize)', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateStaticArraysWithStaticElements);
- const array1 = [new BigNumber(100), new BigNumber(150)];
- const array2 = array1;
- const args = [array1, array2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x7f8130430000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000096';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- const unoptimizedCalldata = method.encode(args);
- expect(optimizedCalldata).to.be.equal(unoptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Static Arrays with Dynamic Elements', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateStaticArraysWithDynamicElements);
- const array1 = ['Hello', 'World'];
- const array2 = array1;
- const args = [array1, array2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x9fe31f8e0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Array Elements (should optimize)', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateArrayElements);
- const strings = ['Hello', 'World', 'Hello', 'World'];
- const args = [strings];
- // Validate calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x13e751a900000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Tuple Fields', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTupleFields);
- const tuple = ['Hello', 'Hello'];
- const args = [tuple];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x16780a5e000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Strings', async () => {
- // Description:
- // Two dynamic arrays with the same values.
- // In the optimized calldata, only one set of elements should be included.
- // Both arrays should point to this set.
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateStrings);
- const args = ['Hello', 'Hello'];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x07370bfa00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Bytes', async () => {
- // Description:
- // Two dynamic arrays with the same values.
- // In the optimized calldata, only one set of elements should be included.
- // Both arrays should point to this set.
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateBytes);
- const value = '0x01020304050607080910111213141516171819202122232425262728293031323334353637383940';
- const args = [value, value];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x6045e42900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000002801020304050607080910111213141516171819202122232425262728293031323334353637383940000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Tuples', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTuples);
- const tuple1 = ['Hello, World!', new BigNumber(424234)];
- const tuple2 = tuple1;
- const args = [tuple1, tuple2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x564f826d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000006792a000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20576f726c642100000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Fields Across Two Tuples', async () => {
- // Description:
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTuples);
- const tuple1 = ['Hello, World!', new BigNumber(1)];
- const tuple2 = [tuple1[0], new BigNumber(2)];
- const args = [tuple1, tuple2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x564f826d000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20576f726c642100000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Arrays, Nested in Separate Tuples', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateArraysNestedInTuples);
- const array = [new BigNumber(100), new BigNumber(150), new BigNumber(200)];
- const tuple1 = [array];
- const tuple2 = [array, 'extra argument to prevent exactly matching the tuples'];
- const args = [tuple1, tuple2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x18970a9e000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000030000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000000035657874726120617267756d656e7420746f2070726576656e742065786163746c79206d61746368696e6720746865207475706c65730000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Tuples, Nested in Separate Tuples', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTuplesNestedInTuples);
- const nestedTuple = ['Hello, World!'];
- const tuple1 = [nestedTuple];
- const tuple2 = [nestedTuple, 'extra argument to prevent exactly matching the tuples'];
- const args = [tuple1, tuple2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x0b4d2e6a000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000000d48656c6c6f2c20576f726c6421000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035657874726120617267756d656e7420746f2070726576656e742065786163746c79206d61746368696e6720746865207475706c65730000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Two-Dimensional Arrays', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTwoDimensionalArrays);
- const twoDimArray1 = [['Hello', 'World'], ['Foo', 'Bar', 'Zaa']];
- const twoDimArray2 = twoDimArray1;
- const args = [twoDimArray1, twoDimArray2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, { shouldOptimize: false });
- const expectedOptimizedCalldata =
- '0x0d28c4f9000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000002c0000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000003466f6f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003426172000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035a61610000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000003466f6f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003426172000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000035a61610000000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Duplicate Array, Nested within Separate Two-Dimensional Arrays', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.duplicateTwoDimensionalArrays);
- const twoDimArray1 = [['Hello', 'World'], ['Foo']];
- const twoDimArray2 = [['Hello', 'World'], ['Bar']];
- const args = [twoDimArray1, twoDimArray2];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x0d28c4f900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000001200000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003466f6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000548656c6c6f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005576f726c640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000034261720000000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Array Elements Duplicated as Tuple Fields', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.arrayElementsDuplicatedAsTupleFields);
- // tslint:disable custom-no-magic-numbers
- const array = [100, 150, 200, 225];
- // tslint:enable custom-no-magic-numbers
- const tuple = [
- [new BigNumber(array[0])],
- [new BigNumber(array[1])],
- [new BigNumber(array[2])],
- [new BigNumber(array[3])],
- ];
- const args = [array, tuple];
- // Validata calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0x5b5c78fd0000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000009600000000000000000000000000000000000000000000000000000000000000c800000000000000000000000000000000000000000000000000000000000000e1';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
- it('Array Elements Duplicated as Separate Parameter', async () => {
- // Generate calldata
- const method = new AbiEncoder.Method(OptimizedAbis.arrayElementsDuplicatedAsSeparateParameter);
- const array = ['Hello', 'Hello', 'Hello', 'World'];
- const str = 'Hello';
- const args = [array, str];
- // Validate calldata
- const optimizedCalldata = method.encode(args, encodingRules);
- const expectedOptimizedCalldata =
- '0xe0e0d34900000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000c000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000005576f726c64000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000548656c6c6f000000000000000000000000000000000000000000000000000000';
- expect(optimizedCalldata).to.be.equal(expectedOptimizedCalldata);
- // Validate decoding
- const decodedArgs = method.decode(optimizedCalldata, { shouldConvertStructsToObjects: false });
- expect(decodedArgs).to.be.deep.equal(args);
- });
-});
diff --git a/packages/utils/test/abi_encoder/return_values_test.ts b/packages/utils/test/abi_encoder/return_values_test.ts
deleted file mode 100644
index 308d11ee5..000000000
--- a/packages/utils/test/abi_encoder/return_values_test.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { AbiEncoder } from '../../src/';
-import { chaiSetup } from '../utils/chai_setup';
-
-import * as ReturnValueAbis from './abi_samples/return_value_abis';
-
-chaiSetup.configure();
-const expect = chai.expect;
-
-describe('ABI Encoder: Return Value Encoding/Decoding', () => {
- const encodingRules: AbiEncoder.EncodingRules = { shouldOptimize: false }; // optimizer is tested separately.
- it('No Return Value', async () => {
- // Decode return value
- const method = new AbiEncoder.Method(ReturnValueAbis.noReturnValues);
- const returnValue = '0x';
- const decodedReturnValue = method.decodeReturnValues(returnValue, { shouldConvertStructsToObjects: false });
- const expectedDecodedReturnValue: any[] = [];
- expect(decodedReturnValue).to.be.deep.equal(expectedDecodedReturnValue);
- });
- it('Single static return value', async () => {
- // Generate Return Value
- const method = new AbiEncoder.Method(ReturnValueAbis.singleStaticReturnValue);
- const returnValue = ['0x01020304'];
- const encodedReturnValue = method.encodeReturnValues(returnValue, encodingRules);
- const decodedReturnValue = method.decodeReturnValues(encodedReturnValue, {
- shouldConvertStructsToObjects: false,
- });
- // Validate decoded return value
- expect(decodedReturnValue).to.be.deep.equal(returnValue);
- });
- it('Multiple static return values', async () => {
- // Generate Return Value
- const method = new AbiEncoder.Method(ReturnValueAbis.multipleStaticReturnValues);
- const returnValue = ['0x01020304', '0x05060708'];
- const encodedReturnValue = method.encodeReturnValues(returnValue, encodingRules);
- const decodedReturnValue = method.decodeReturnValues(encodedReturnValue, {
- shouldConvertStructsToObjects: false,
- });
- // Validate decoded return value
- expect(decodedReturnValue).to.be.deep.equal(returnValue);
- });
- it('Single dynamic return value', async () => {
- // Generate Return Value
- const method = new AbiEncoder.Method(ReturnValueAbis.singleDynamicReturnValue);
- const returnValue = ['0x01020304'];
- const encodedReturnValue = method.encodeReturnValues(returnValue, encodingRules);
- const decodedReturnValue = method.decodeReturnValues(encodedReturnValue, {
- shouldConvertStructsToObjects: false,
- });
- // Validate decoded return value
- expect(decodedReturnValue).to.be.deep.equal(returnValue);
- });
- it('Multiple dynamic return values', async () => {
- // Generate Return Value
- const method = new AbiEncoder.Method(ReturnValueAbis.multipleDynamicReturnValues);
- const returnValue = ['0x01020304', '0x05060708'];
- const encodedReturnValue = method.encodeReturnValues(returnValue, encodingRules);
- const decodedReturnValue = method.decodeReturnValues(encodedReturnValue, {
- shouldConvertStructsToObjects: false,
- });
- // Validate decoded return value
- expect(decodedReturnValue).to.be.deep.equal(returnValue);
- });
- it('Mixed static/dynamic return values', async () => {
- // Generate Return Value
- const method = new AbiEncoder.Method(ReturnValueAbis.mixedStaticAndDynamicReturnValues);
- const returnValue = ['0x01020304', '0x05060708'];
- const encodedReturnValue = method.encodeReturnValues(returnValue, encodingRules);
- const decodedReturnValue = method.decodeReturnValues(encodedReturnValue, {
- shouldConvertStructsToObjects: false,
- });
- // Validate decoded return value
- expect(decodedReturnValue).to.be.deep.equal(returnValue);
- });
-});
diff --git a/packages/utils/test/abi_encoder/signature_tests.ts b/packages/utils/test/abi_encoder/signature_tests.ts
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/utils/test/abi_encoder/signature_tests.ts
+++ /dev/null
diff --git a/packages/utils/test/abi_utils_test.ts b/packages/utils/test/abi_utils_test.ts
deleted file mode 100644
index 0ebee64c4..000000000
--- a/packages/utils/test/abi_utils_test.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { abiUtils } from '../src';
-
-const expect = chai.expect;
-
-describe('abiUtils', () => {
- describe('splitTupleTypes', () => {
- it('handles basic types', () => {
- const got = abiUtils.splitTupleTypes('tuple(bytes,uint256,address)');
- expect(got).to.deep.equal(['bytes', 'uint256', 'address']);
- });
- it('handles nested tuple types', () => {
- const got = abiUtils.splitTupleTypes('tuple(tuple(bytes,uint256),address)');
- expect(got).to.deep.equal(['tuple(bytes,uint256)', 'address']);
- });
- });
-});
diff --git a/packages/utils/test/sign_typed_data_utils_test.ts b/packages/utils/test/sign_typed_data_utils_test.ts
deleted file mode 100644
index 3d2cb2496..000000000
--- a/packages/utils/test/sign_typed_data_utils_test.ts
+++ /dev/null
@@ -1,163 +0,0 @@
-import * as chai from 'chai';
-import 'mocha';
-
-import { signTypedDataUtils } from '../src/sign_typed_data_utils';
-
-const expect = chai.expect;
-
-describe('signTypedDataUtils', () => {
- describe('signTypedDataHash', () => {
- const simpleSignTypedDataHashHex = '0xb460d69ca60383293877cd765c0f97bd832d66bca720f7e32222ce1118832493';
- const simpleSignTypedData = {
- types: {
- EIP712Domain: [
- {
- name: 'name',
- type: 'string',
- },
- ],
- Test: [
- {
- name: 'testAddress',
- type: 'address',
- },
- {
- name: 'testNumber',
- type: 'uint256',
- },
- ],
- },
- domain: {
- name: 'Test',
- },
- message: {
- testAddress: '0x0000000000000000000000000000000000000000',
- testNumber: '12345',
- },
- primaryType: 'Test',
- };
- const orderSignTypedDataHashHex = '0x55eaa6ec02f3224d30873577e9ddd069a288c16d6fb407210eecbc501fa76692';
- const orderSignTypedData = {
- types: {
- EIP712Domain: [
- {
- name: 'name',
- type: 'string',
- },
- {
- name: 'version',
- type: 'string',
- },
- {
- name: 'verifyingContract',
- type: 'address',
- },
- ],
- Order: [
- {
- 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',
- },
- ],
- },
- domain: {
- name: '0x Protocol',
- version: '2',
- verifyingContract: '0x0000000000000000000000000000000000000000',
- },
- message: {
- makerAddress: '0x0000000000000000000000000000000000000000',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerAssetAmount: '1000000000000000000',
- takerAssetAmount: '1000000000000000000',
- expirationTimeSeconds: '12345',
- makerFee: '0',
- takerFee: '0',
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- senderAddress: '0x0000000000000000000000000000000000000000',
- salt: '12345',
- makerAssetData: '0x0000000000000000000000000000000000000000',
- takerAssetData: '0x0000000000000000000000000000000000000000',
- exchangeAddress: '0x0000000000000000000000000000000000000000',
- },
- primaryType: 'Order',
- };
- it('creates a hash of the test sign typed data', () => {
- const hash = signTypedDataUtils.generateTypedDataHash(simpleSignTypedData).toString('hex');
- const hashHex = `0x${hash}`;
- expect(hashHex).to.be.eq(simpleSignTypedDataHashHex);
- });
- it('creates a hash of the order sign typed data', () => {
- const hash = signTypedDataUtils.generateTypedDataHash(orderSignTypedData).toString('hex');
- const hashHex = `0x${hash}`;
- expect(hashHex).to.be.eq(orderSignTypedDataHashHex);
- });
- it('creates a hash of an uninitialized order', () => {
- const uninitializedOrder = {
- ...orderSignTypedData,
- message: {
- makerAddress: '0x0000000000000000000000000000000000000000',
- takerAddress: '0x0000000000000000000000000000000000000000',
- makerAssetAmount: 0,
- takerAssetAmount: 0,
- expirationTimeSeconds: 0,
- makerFee: 0,
- takerFee: 0,
- feeRecipientAddress: '0x0000000000000000000000000000000000000000',
- senderAddress: '0x0000000000000000000000000000000000000000',
- salt: 0,
- makerAssetData: '0x0000000000000000000000000000000000000000',
- takerAssetData: '0x0000000000000000000000000000000000000000',
- exchangeAddress: '0x0000000000000000000000000000000000000000',
- },
- };
- const hash = signTypedDataUtils.generateTypedDataHash(uninitializedOrder).toString('hex');
- const hashHex = `0x${hash}`;
- expect(hashHex).to.be.eq('0xfaa49b35faeb9197e9c3ba7a52075e6dad19739549f153b77dfcf59408a4b422');
- });
- });
-});
diff --git a/packages/utils/test/utils/chai_setup.ts b/packages/utils/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/utils/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/utils/tsconfig.json b/packages/utils/tsconfig.json
deleted file mode 100644
index 718e623c7..000000000
--- a/packages/utils/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/utils/tslint.json b/packages/utils/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/utils/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/verdaccio/Dockerfile b/packages/verdaccio/Dockerfile
deleted file mode 100644
index 6a6a64abf..000000000
--- a/packages/verdaccio/Dockerfile
+++ /dev/null
@@ -1,3 +0,0 @@
-FROM verdaccio/verdaccio
-
-ADD conf.yaml /verdaccio/conf/config.yaml
diff --git a/packages/verdaccio/README.md b/packages/verdaccio/README.md
deleted file mode 100644
index 340cd5512..000000000
--- a/packages/verdaccio/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## 0x Verdaccio
-
-This package contains a Dockerfile and conf.yaml file for configuring our own
-Docker image for Verdaccio.
-
-See https://verdaccio.org/docs/en/configuration for more information.
-
-## Build
-
-In the root directory for _this package_, run:
-
-`sudo docker build . -t 0x-verdaccio`
-
-## Run
-
-To start Verdaccio run:
-
-`sudo docker run --rm -i -p 4873:4873 0x-verdaccio`
diff --git a/packages/verdaccio/conf.yaml b/packages/verdaccio/conf.yaml
deleted file mode 100644
index 24e036932..000000000
--- a/packages/verdaccio/conf.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# Copied from https://github.com/verdaccio/verdaccio/blob/90fc216649ecd8df31d3706b5c17555fa0a35e4a/conf/docker.yaml
-# Only the uplinks section has been modified.
-#
-# This is the config file used for the docker images.
-# It allows all users to do anything, so don't use it on production systems.
-#
-# Do not configure host and port under `listen` in this file
-# as it will be ignored when using docker.
-# see https://github.com/verdaccio/verdaccio/blob/master/wiki/docker.md#docker-and-custom-port-configuration
-#
-# Look here for more config file examples:
-# https://github.com/verdaccio/verdaccio/tree/master/conf
-#
-
-# path to a directory with all packages
-storage: /verdaccio/storage
-# path to a directory with plugins to include
-plugins: /verdaccio/plugins
-
-web:
- # WebUI is enabled as default, if you want disable it, just uncomment this line
- enable: false
-
-auth:
- htpasswd:
- file: /verdaccio/conf/htpasswd
- # Maximum amount of users allowed to register, defaults to "+infinity".
- # You can set this to -1 to disable registration.
- #max_users: 1000
-
-# a list of other known repositories we can talk to
-uplinks:
- npmjs:
- url: https://registry.npmjs.org/
- cache: true
- max_fails: 5
-
-packages:
- '@*/*':
- # scoped packages
- access: $all
- publish: $authenticated
- proxy: npmjs
-
- '**':
- # allow all users (including non-authenticated users) to read and
- # publish all packages
- #
- # you can specify usernames/groupnames (depending on your auth plugin)
- # and three keywords: "$all", "$anonymous", "$authenticated"
- access: $all
-
- # allow all known users to publish packages
- # (anyone can register by default, remember?)
- publish: $authenticated
-
- # if package is not available locally, proxy requests to 'npmjs' registry
- proxy: npmjs
-
-# To use `npm audit` uncomment the following section
-# middlewares:
-# audit:
-# enabled: true
-
-# log settings
-logs:
- - {type: stdout, format: pretty, level: http}
- #- {type: file, path: verdaccio.log, level: info}
-
-max_body_size: 100mb
diff --git a/packages/web3-wrapper/.npmignore b/packages/web3-wrapper/.npmignore
deleted file mode 100644
index 24e65ad5b..000000000
--- a/packages/web3-wrapper/.npmignore
+++ /dev/null
@@ -1,6 +0,0 @@
-.*
-yarn-error.log
-/scripts/
-/src/
-tsconfig.json
-/lib/monorepo_scripts/
diff --git a/packages/web3-wrapper/CHANGELOG.json b/packages/web3-wrapper/CHANGELOG.json
deleted file mode 100644
index 4a639f662..000000000
--- a/packages/web3-wrapper/CHANGELOG.json
+++ /dev/null
@@ -1,489 +0,0 @@
-[
- {
- "version": "4.0.0",
- "changes": [
- {
- "note": "Upgrade the bignumber.js to v8.0.2",
- "pr": 1517
- },
- {
- "note": "Update ganache-core to v2.3.3",
- "pr": 1518
- }
- ]
- },
- {
- "timestamp": 1547561734,
- "version": "3.2.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547225310,
- "version": "3.2.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1547040760,
- "version": "3.2.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.2.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1544739608
- },
- {
- "version": "3.2.0",
- "changes": [
- {
- "note": "Return `value` and `gasPrice` as BigNumbers to avoid loss of precision errors",
- "pr": 1402
- }
- ],
- "timestamp": 1544570656
- },
- {
- "version": "3.1.6",
- "changes": [
- {
- "note": "Unmarshall mined transaction receipts",
- "pr": 1308
- }
- ],
- "timestamp": 1543401373
- },
- {
- "version": "3.1.5",
- "changes": [
- {
- "note": "Add unmarshalling of transaction receipts",
- "pr": 1291
- },
- {
- "note": "Return `undefined` instead of `null` if transaction receipt not found",
- "pr": 1291
- }
- ],
- "timestamp": 1542821676
- },
- {
- "timestamp": 1542208198,
- "version": "3.1.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542134075,
- "version": "3.1.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1542028948,
- "version": "3.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.1.1",
- "changes": [
- {
- "note": "Fix bug in `getTransactionByHashAsync` which was causing the return value to have the wrong type (raw fields instead of unmarshalled fields).",
- "pr": 1177
- }
- ],
- "timestamp": 1541740904
- },
- {
- "version": "3.1.0",
- "changes": [
- {
- "note": "Add `signTypedData` to perform EIP712 `eth_signTypedData`.",
- "pr": 1102
- },
- {
- "note": "Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned.",
- "pr": 1102
- }
- ],
- "timestamp": 1539871071
- },
- {
- "version": "3.0.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ],
- "timestamp": 1538693146
- },
- {
- "timestamp": 1538157789,
- "version": "3.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1537907159,
- "version": "3.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "3.0.0",
- "changes": [
- {
- "note": "Rename `getBlockAsync` to `getBlockIfExistsAsync` and rather then throw if the requested block wasn't found, return undefined.",
- "pr": 1082
- },
- {
- "note": "Expose `sendRawPayloadAsync` so one can easily extend `Web3Wrapper` with their own custom JSON RPC calls",
- "pr": 1080
- }
- ],
- "timestamp": 1537875740
- },
- {
- "version": "2.0.3",
- "changes": [
- {
- "note": "Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined.",
- "pr": 1079
- }
- ],
- "timestamp": 1537541580
- },
- {
- "timestamp": 1536142250,
- "version": "2.0.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1535377027,
- "version": "2.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "2.0.0",
- "changes": [
- {
- "note": "Export types: `BlockParam`, `TxData`, `Provider`, `TransactionReceipt`, `Transaction`, `TraceParams`, `TransactionTrace``, BlockWithoutTransactionDat`a, `LogEntry`, `FilterObject`, `CallData`, `TransactionReceiptWithDecodedLogs`, `BlockWithTransactionData``, LogTopi`c, `JSONRPCRequestPayload`, `TransactionReceiptStatus`, `DecodedLogArgs`, `StructLog`, `JSONRPCErrorCallback``, BlockParamLitera`l, `ContractEventArg`, `DecodedLogEntry`, `LogEntryEvent`, `OpCode`, `TxDataPayable`, `JSONRPCResponsePayload``, RawLogEntr`y, `DecodedLogEntryEvent`, `LogWithDecodedArgs`, `AbiDefinition`, `RawLog`, `FunctionAbi`, `EventAbi`, `EventParameter``, MethodAb`i, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability` and `StateMutability`",
- "pr": 924
- },
- {
- "note": "Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC`",
- "pr": 924
- },
- {
- "note": "Export `AbiDecoder` class",
- "pr": 924
- }
- ],
- "timestamp": 1535133899
- },
- {
- "version": "1.2.0",
- "changes": [
- {
- "note": "Export marshaller to convert between RPC and user-space data formats",
- "pr": 938
- },
- {
- "note": "Export RPC types",
- "pr": 938
- }
- ],
- "timestamp": 1534210131
- },
- {
- "timestamp": 1532619515,
- "version": "1.1.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532614997,
- "version": "1.1.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "1.1.0",
- "changes": [
- {
- "note": "Add `getTransactionByHashAsync` method",
- "pr": 847
- }
- ],
- "timestamp": 1532605697
- },
- {
- "timestamp": 1532357734,
- "version": "1.0.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1532043000,
- "version": "1.0.0",
- "changes": [
- {
- "note": "Stop exporting `marshaller` utility file.",
- "pr": 902
- },
- {
- "note": "Export `marshaller` utility file.",
- "pr": 829
- },
- {
- "note": "Add `getNodeTypeAsync` method",
- "pr": 812
- },
- {
- "note": "Stop exporting uniqueVersionIds object",
- "pr": 897
- }
- ]
- },
- {
- "timestamp": 1531919263,
- "version": "0.7.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1531149657,
- "version": "0.7.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1529397769,
- "version": "0.7.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1528070400,
- "version": "0.7.0",
- "changes": [
- {
- "note": "Add `web3Wrapper.getContractCodeAsync`",
- "pr": 675
- },
- {
- "note": "Add `web3Wrapper.getTransactionTraceAsync`",
- "pr": 675
- },
- {
- "note": "Add `web3Wrapper.getBlockWithTransactionDataAsync`",
- "pr": 675
- },
- {
- "note": "Add exported uniqueVersionIds object",
- "pr": 622
- },
- {
- "note": "Update increaseTimeAsync to work with Geth",
- "pr": 622
- },
- {
- "note": "Make callAsync throw if raw call result is 0x (null)",
- "pr": 622
- },
- {
- "note": "Add new setHeadAsync method",
- "pr": 622
- },
- {
- "note": "Improve performance of awaitTransactionMinedAsync by immediately checking if the transaction was already mined instead of waiting for the first interval.",
- "pr": 688
- }
- ]
- },
- {
- "timestamp": 1527009133,
- "version": "0.6.4",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525477860,
- "version": "0.6.3",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1525428773,
- "version": "0.6.2",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "timestamp": 1524044013,
- "version": "0.6.1",
- "changes": [
- {
- "note": "Dependencies updated"
- }
- ]
- },
- {
- "version": "0.6.0",
- "changes": [
- {
- "note": "Make `isAddress` and `toWei` static",
- "pr": 501
- },
- {
- "note": "Add static methods `toUnitAmount` and `toBaseUnitAmount`",
- "pr": 501
- }
- ],
- "timestamp": 1523462196
- },
- {
- "version": "0.5.0",
- "changes": [
- {
- "note": "Add `web3Wrapper.awaitTransactionMinedAsync`",
- "pr": 485
- },
- {
- "note": "Add a public field `abiDecoder: AbiDecoder` which allows you to add your ABIs that are later used to decode logs",
- "pr": 485
- },
- {
- "note": "Export enum `Web3WrapperErrors` with a single value so far: `TransactionMiningTimeout`",
- "pr": 485
- }
- ],
- "timestamp": 1522673609
- },
- {
- "version": "0.4.0",
- "changes": [
- {
- "note": "Rename `signTransactionAsync` to `signMessageAsync` for clarity",
- "pr": 465
- }
- ],
- "timestamp": 1522658513
- },
- {
- "version": "0.3.0",
- "changes": [
- {
- "note": "Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync`",
- "pr": 426
- },
- {
- "note": "Add `web3Wrapper.isZeroExWeb3Wrapper` for runtime instanceOf checks",
- "pr": 426
- },
- {
- "note": "Add a `getProvider` method",
- "pr": 444
- }
- ],
- "timestamp": 1521298800
- },
- {
- "version": "0.2.0",
- "changes": [
- {
- "note": "Ensure all returned user addresses are lowercase",
- "pr": 373
- },
- {
- "note": "Add `web3Wrapper.callAsync`",
- "pr": 413
- },
- {
- "note": "Make `web3Wrapper.estimateGas` accept whole `txData` instead of `data`",
- "pr": 413
- },
- {
- "note": "Remove `web3Wrapper.getContractInstance`",
- "pr": 413
- }
- ],
- "timestamp": 1520089200
- },
- {
- "version": "0.1.12",
- "changes": [
- {
- "note": "Fix publishing issue where .npmignore was not properly excluding undesired content",
- "pr": 389
- }
- ],
- "timestamp": 1518102000
- }
-]
diff --git a/packages/web3-wrapper/CHANGELOG.md b/packages/web3-wrapper/CHANGELOG.md
deleted file mode 100644
index 5850c5474..000000000
--- a/packages/web3-wrapper/CHANGELOG.md
+++ /dev/null
@@ -1,190 +0,0 @@
-<!--
-changelogUtils.file is auto-generated using the monorepo-scripts package. Don't edit directly.
-Edit the package's CHANGELOG.json file only.
--->
-
-CHANGELOG
-
-## v3.2.4 - _January 15, 2019_
-
- * Dependencies updated
-
-## v3.2.3 - _January 11, 2019_
-
- * Dependencies updated
-
-## v3.2.2 - _January 9, 2019_
-
- * Dependencies updated
-
-## v3.2.1 - _December 13, 2018_
-
- * Dependencies updated
-
-## v3.2.0 - _December 11, 2018_
-
- * Return `value` and `gasPrice` as BigNumbers to avoid loss of precision errors (#1402)
-
-## v3.1.6 - _November 28, 2018_
-
- * Unmarshall mined transaction receipts (#1308)
-
-## v3.1.5 - _November 21, 2018_
-
- * Add unmarshalling of transaction receipts (#1291)
- * Return `undefined` instead of `null` if transaction receipt not found (#1291)
-
-## v3.1.4 - _November 14, 2018_
-
- * Dependencies updated
-
-## v3.1.3 - _November 13, 2018_
-
- * Dependencies updated
-
-## v3.1.2 - _November 12, 2018_
-
- * Dependencies updated
-
-## v3.1.1 - _November 9, 2018_
-
- * Fix bug in `getTransactionByHashAsync` which was causing the return value to have the wrong type (raw fields instead of unmarshalled fields). (#1177)
-
-## v3.1.0 - _October 18, 2018_
-
- * Add `signTypedData` to perform EIP712 `eth_signTypedData`. (#1102)
- * Web3Wrapper now throws when an RPC request contains an error field in the response. Previously errors could be swallowed and undefined returned. (#1102)
-
-## v3.0.3 - _October 4, 2018_
-
- * Dependencies updated
-
-## v3.0.2 - _September 28, 2018_
-
- * Dependencies updated
-
-## v3.0.1 - _September 25, 2018_
-
- * Dependencies updated
-
-## v3.0.0 - _September 25, 2018_
-
- * Rename `getBlockAsync` to `getBlockIfExistsAsync` and rather then throw if the requested block wasn't found, return undefined. (#1082)
- * Expose `sendRawPayloadAsync` so one can easily extend `Web3Wrapper` with their own custom JSON RPC calls (#1080)
-
-## v2.0.3 - _September 21, 2018_
-
- * Fixes issue #1076 where Parity now returns a placeholder transactionReceipt before the transaction is mined. (#1079)
-
-## v2.0.2 - _September 5, 2018_
-
- * Dependencies updated
-
-## v2.0.1 - _August 27, 2018_
-
- * Dependencies updated
-
-## v2.0.0 - _August 24, 2018_
-
- * Export types: `BlockParam`, `TxData`, `Provider`, `TransactionReceipt`, `Transaction`, `TraceParams`, `TransactionTrace``, BlockWithoutTransactionDat`a, `LogEntry`, `FilterObject`, `CallData`, `TransactionReceiptWithDecodedLogs`, `BlockWithTransactionData``, LogTopi`c, `JSONRPCRequestPayload`, `TransactionReceiptStatus`, `DecodedLogArgs`, `StructLog`, `JSONRPCErrorCallback``, BlockParamLitera`l, `ContractEventArg`, `DecodedLogEntry`, `LogEntryEvent`, `OpCode`, `TxDataPayable`, `JSONRPCResponsePayload``, RawLogEntr`y, `DecodedLogEntryEvent`, `LogWithDecodedArgs`, `AbiDefinition`, `RawLog`, `FunctionAbi`, `EventAbi`, `EventParameter``, MethodAb`i, `ConstructorAbi`, `FallbackAbi`, `DataItem`, `ConstructorStateMutability` and `StateMutability` (#924)
- * Stop exporting types: `CallTxDataBaseRPC` and `AbstractBlockRPC` (#924)
- * Export `AbiDecoder` class (#924)
-
-## v1.2.0 - _August 14, 2018_
-
- * Export marshaller to convert between RPC and user-space data formats (#938)
- * Export RPC types (#938)
-
-## v1.1.2 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.1.1 - _July 26, 2018_
-
- * Dependencies updated
-
-## v1.1.0 - _July 26, 2018_
-
- * Add `getTransactionByHashAsync` method (#847)
-
-## v1.0.1 - _July 23, 2018_
-
- * Dependencies updated
-
-## v1.0.0 - _July 19, 2018_
-
- * Stop exporting `marshaller` utility file. (#902)
- * Export `marshaller` utility file. (#829)
- * Add `getNodeTypeAsync` method (#812)
- * Stop exporting uniqueVersionIds object (#897)
-
-## v0.7.3 - _July 18, 2018_
-
- * Dependencies updated
-
-## v0.7.2 - _July 9, 2018_
-
- * Dependencies updated
-
-## v0.7.1 - _June 19, 2018_
-
- * Dependencies updated
-
-## v0.7.0 - _June 4, 2018_
-
- * Add `web3Wrapper.getContractCodeAsync` (#675)
- * Add `web3Wrapper.getTransactionTraceAsync` (#675)
- * Add `web3Wrapper.getBlockWithTransactionDataAsync` (#675)
- * Add exported uniqueVersionIds object (#622)
- * Update increaseTimeAsync to work with Geth (#622)
- * Make callAsync throw if raw call result is 0x (null) (#622)
- * Add new setHeadAsync method (#622)
- * Improve performance of awaitTransactionMinedAsync by immediately checking if the transaction was already mined instead of waiting for the first interval. (#688)
-
-## v0.6.4 - _May 22, 2018_
-
- * Dependencies updated
-
-## v0.6.3 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.6.2 - _May 4, 2018_
-
- * Dependencies updated
-
-## v0.6.1 - _April 18, 2018_
-
- * Dependencies updated
-
-## v0.6.0 - _April 11, 2018_
-
- * Make `isAddress` and `toWei` static (#501)
- * Add static methods `toUnitAmount` and `toBaseUnitAmount` (#501)
-
-## v0.5.0 - _April 2, 2018_
-
- * Add `web3Wrapper.awaitTransactionMinedAsync` (#485)
- * Add a public field `abiDecoder: AbiDecoder` which allows you to add your ABIs that are later used to decode logs (#485)
- * Export enum `Web3WrapperErrors` with a single value so far: `TransactionMiningTimeout` (#485)
-
-## v0.4.0 - _April 2, 2018_
-
- * Rename `signTransactionAsync` to `signMessageAsync` for clarity (#465)
-
-## v0.3.0 - _March 17, 2018_
-
- * Add `web3Wrapper.takeSnapshotAsync`, `web3Wrapper.revertSnapshotAsync`, `web3Wrapper.mineBlockAsync`, `web3Wrapper.increaseTimeAsync` (#426)
- * Add `web3Wrapper.isZeroExWeb3Wrapper` for runtime instanceOf checks (#426)
- * Add a `getProvider` method (#444)
-
-## v0.2.0 - _March 3, 2018_
-
- * Ensure all returned user addresses are lowercase (#373)
- * Add `web3Wrapper.callAsync` (#413)
- * Make `web3Wrapper.estimateGas` accept whole `txData` instead of `data` (#413)
- * Remove `web3Wrapper.getContractInstance` (#413)
-
-## v0.1.12 - _February 8, 2018_
-
- * Fix publishing issue where .npmignore was not properly excluding undesired content (#389)
diff --git a/packages/web3-wrapper/README.md b/packages/web3-wrapper/README.md
deleted file mode 100644
index 4402de19c..000000000
--- a/packages/web3-wrapper/README.md
+++ /dev/null
@@ -1,71 +0,0 @@
-## @0x/web3-wrapper
-
-Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript.
-
-### Read the [Documentation](https://0xproject.com/docs/web3-wrapper).
-
-## Installation
-
-```bash
-yarn add @0x/web3-wrapper
-```
-
-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/web3-wrapper yarn build
-```
-
-Or continuously rebuild on change:
-
-```bash
-PKG=@0x/web3-wrapper yarn watch
-```
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Run Tests
-
-```bash
-yarn test
-```
diff --git a/packages/web3-wrapper/coverage/.gitkeep b/packages/web3-wrapper/coverage/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/web3-wrapper/coverage/.gitkeep
+++ /dev/null
diff --git a/packages/web3-wrapper/package.json b/packages/web3-wrapper/package.json
deleted file mode 100644
index f28cc36ca..000000000
--- a/packages/web3-wrapper/package.json
+++ /dev/null
@@ -1,69 +0,0 @@
-{
- "name": "@0x/web3-wrapper",
- "version": "3.2.4",
- "engines": {
- "node": ">=6.12"
- },
- "description": "Wraps around web3 and gives a nicer interface",
- "main": "lib/src/index.js",
- "types": "lib/src/index.d.ts",
- "scripts": {
- "build": "tsc -b",
- "build:ci": "yarn build",
- "watch_without_deps": "tsc -w",
- "clean": "shx rm -rf lib generated_docs",
- "lint": "tslint --format stylish --project .",
- "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",
- "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --tsconfig typedoc-tsconfig.json --json $JSON_FILE_PATH $PROJECT_FILES"
- },
- "config": {
- "postpublish": {
- "assets": []
- }
- },
- "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/web3-wrapper/README.md",
- "devDependencies": {
- "@0x/tslint-config": "^2.0.2",
- "@types/ganache-core": "^2.1.2",
- "@types/lodash": "4.14.104",
- "chai": "^4.0.1",
- "chai-as-promised": "^7.1.0",
- "chai-bignumber": "^3.0.0",
- "dirty-chai": "^2.0.1",
- "ganache-core": "^2.3.3",
- "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"
- },
- "dependencies": {
- "@0x/assert": "^1.0.23",
- "@0x/json-schemas": "^2.1.7",
- "@0x/typescript-typings": "^3.0.8",
- "@0x/utils": "^3.0.1",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "ethers": "~4.0.4",
- "lodash": "^4.17.5"
- },
- "publishConfig": {
- "access": "public"
- }
-}
diff --git a/packages/web3-wrapper/src/globals.d.ts b/packages/web3-wrapper/src/globals.d.ts
deleted file mode 100644
index 94e63a32d..000000000
--- a/packages/web3-wrapper/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/web3-wrapper/src/index.ts b/packages/web3-wrapper/src/index.ts
deleted file mode 100644
index 4d20ba9be..000000000
--- a/packages/web3-wrapper/src/index.ts
+++ /dev/null
@@ -1,60 +0,0 @@
-export { Web3Wrapper } from './web3_wrapper';
-export { marshaller } from './marshaller';
-
-export { AbiDecoder } from '@0x/utils';
-
-export {
- BlockParam,
- TxData,
- Provider,
- TransactionReceipt,
- Transaction,
- TraceParams,
- TransactionTrace,
- BlockWithoutTransactionData,
- LogEntry,
- FilterObject,
- CallData,
- TransactionReceiptWithDecodedLogs,
- BlockWithTransactionData,
- LogTopic,
- JSONRPCRequestPayload,
- TransactionReceiptStatus,
- DecodedLogArgs,
- StructLog,
- JSONRPCErrorCallback,
- BlockParamLiteral,
- ContractEventArg,
- DecodedLogEntry,
- LogEntryEvent,
- OpCode,
- TxDataPayable,
- JSONRPCResponsePayload,
- JSONRPCResponseError,
- RawLogEntry,
- DecodedLogEntryEvent,
- LogWithDecodedArgs,
- AbiDefinition,
- RawLog,
- FunctionAbi,
- EventAbi,
- EventParameter,
- MethodAbi,
- ConstructorAbi,
- FallbackAbi,
- DataItem,
- ConstructorStateMutability,
- StateMutability,
-} from 'ethereum-types';
-export {
- Web3WrapperErrors,
- NodeType,
- CallDataRPC,
- BlockWithoutTransactionDataRPC,
- BlockWithTransactionDataRPC,
- TransactionReceiptStatusRPC,
- TransactionReceiptRPC,
- LogEntryRPC,
- TransactionRPC,
- TxDataRPC,
-} from './types';
diff --git a/packages/web3-wrapper/src/marshaller.ts b/packages/web3-wrapper/src/marshaller.ts
deleted file mode 100644
index 4230f8eab..000000000
--- a/packages/web3-wrapper/src/marshaller.ts
+++ /dev/null
@@ -1,230 +0,0 @@
-import { addressUtils } from '@0x/utils';
-import {
- BlockParam,
- BlockParamLiteral,
- BlockWithoutTransactionData,
- BlockWithTransactionData,
- CallData,
- CallTxDataBase,
- LogEntry,
- RawLogEntry,
- Transaction,
- TransactionReceipt,
- TxData,
-} from 'ethereum-types';
-import ethUtil = require('ethereumjs-util');
-import * as _ from 'lodash';
-
-import { utils } from './utils';
-
-import {
- BlockWithoutTransactionDataRPC,
- BlockWithTransactionDataRPC,
- CallDataRPC,
- CallTxDataBaseRPC,
- TransactionReceiptRPC,
- TransactionRPC,
- TxDataRPC,
-} from './types';
-
-/**
- * Utils to convert ethereum structures from user-space format to RPC format. (marshall/unmarshall)
- */
-export const marshaller = {
- /**
- * Unmarshall block without transaction data
- * @param blockWithHexValues block to unmarshall
- * @return unmarshalled block without transaction data
- */
- unmarshalIntoBlockWithoutTransactionData(
- blockWithHexValues: BlockWithoutTransactionDataRPC,
- ): BlockWithoutTransactionData {
- const block = {
- ...blockWithHexValues,
- gasLimit: utils.convertHexToNumber(blockWithHexValues.gasLimit),
- gasUsed: utils.convertHexToNumber(blockWithHexValues.gasUsed),
- size: utils.convertHexToNumber(blockWithHexValues.size),
- timestamp: utils.convertHexToNumber(blockWithHexValues.timestamp),
- number: _.isNull(blockWithHexValues.number) ? null : utils.convertHexToNumber(blockWithHexValues.number),
- difficulty: utils.convertAmountToBigNumber(blockWithHexValues.difficulty),
- totalDifficulty: utils.convertAmountToBigNumber(blockWithHexValues.totalDifficulty),
- };
- return block;
- },
- /**
- * Unmarshall block with transaction data
- * @param blockWithHexValues block to unmarshall
- * @return unmarshalled block with transaction data
- */
- unmarshalIntoBlockWithTransactionData(blockWithHexValues: BlockWithTransactionDataRPC): BlockWithTransactionData {
- const block = {
- ...blockWithHexValues,
- gasLimit: utils.convertHexToNumber(blockWithHexValues.gasLimit),
- gasUsed: utils.convertHexToNumber(blockWithHexValues.gasUsed),
- size: utils.convertHexToNumber(blockWithHexValues.size),
- timestamp: utils.convertHexToNumber(blockWithHexValues.timestamp),
- number: _.isNull(blockWithHexValues.number) ? null : utils.convertHexToNumber(blockWithHexValues.number),
- difficulty: utils.convertAmountToBigNumber(blockWithHexValues.difficulty),
- totalDifficulty: utils.convertAmountToBigNumber(blockWithHexValues.totalDifficulty),
- transactions: [] as Transaction[],
- };
- block.transactions = _.map(blockWithHexValues.transactions, (tx: TransactionRPC) => {
- const transaction = marshaller.unmarshalTransaction(tx);
- return transaction;
- });
- return block;
- },
- /**
- * Unmarshall transaction
- * @param txRpc transaction to unmarshall
- * @return unmarshalled transaction
- */
- unmarshalTransaction(txRpc: TransactionRPC): Transaction {
- const tx = {
- ...txRpc,
- blockNumber: !_.isNull(txRpc.blockNumber) ? utils.convertHexToNumber(txRpc.blockNumber) : null,
- transactionIndex: !_.isNull(txRpc.transactionIndex)
- ? utils.convertHexToNumber(txRpc.transactionIndex)
- : null,
- nonce: utils.convertHexToNumber(txRpc.nonce),
- gas: utils.convertHexToNumber(txRpc.gas),
- gasPrice: utils.convertAmountToBigNumber(txRpc.gasPrice),
- value: utils.convertAmountToBigNumber(txRpc.value),
- };
- return tx;
- },
- /**
- * Unmarshall transaction receipt
- * @param txReceiptRpc transaction receipt to unmarshall
- * @return unmarshalled transaction receipt
- */
- unmarshalTransactionReceipt(txReceiptRpc: TransactionReceiptRPC): TransactionReceipt {
- const txReceipt = {
- ...txReceiptRpc,
- blockNumber: utils.convertHexToNumber(txReceiptRpc.blockNumber),
- transactionIndex: utils.convertHexToNumber(txReceiptRpc.transactionIndex),
- cumulativeGasUsed: utils.convertHexToNumber(txReceiptRpc.cumulativeGasUsed),
- gasUsed: utils.convertHexToNumber(txReceiptRpc.gasUsed),
- logs: _.map(txReceiptRpc.logs, marshaller.unmarshalLog.bind(marshaller)),
- };
- return txReceipt;
- },
- /**
- * Unmarshall transaction data
- * @param txDataRpc transaction data to unmarshall
- * @return unmarshalled transaction data
- */
- unmarshalTxData(txDataRpc: TxDataRPC): TxData {
- if (_.isUndefined(txDataRpc.from)) {
- throw new Error(`txData must include valid 'from' value.`);
- }
- const txData = {
- ...txDataRpc,
- value: !_.isUndefined(txDataRpc.value) ? utils.convertAmountToBigNumber(txDataRpc.value) : undefined,
- gas: !_.isUndefined(txDataRpc.gas) ? utils.convertHexToNumber(txDataRpc.gas) : undefined,
- gasPrice: !_.isUndefined(txDataRpc.gasPrice)
- ? utils.convertAmountToBigNumber(txDataRpc.gasPrice)
- : undefined,
- nonce: !_.isUndefined(txDataRpc.nonce) ? utils.convertHexToNumber(txDataRpc.nonce) : undefined,
- };
- return txData;
- },
- /**
- * Marshall transaction data
- * @param txData transaction data to marshall
- * @return marshalled transaction data
- */
- marshalTxData(txData: Partial<TxData>): Partial<TxDataRPC> {
- if (_.isUndefined(txData.from)) {
- throw new Error(`txData must include valid 'from' value.`);
- }
- const callTxDataBase = {
- ...txData,
- };
- delete callTxDataBase.from;
- const callTxDataBaseRPC = marshaller._marshalCallTxDataBase(callTxDataBase);
- const txDataRPC = {
- ...callTxDataBaseRPC,
- from: marshaller.marshalAddress(txData.from),
- };
- const prunableIfUndefined = ['gasPrice', 'gas', 'value', 'nonce'];
- _.each(txDataRPC, (value: any, key: string) => {
- if (_.isUndefined(value) && _.includes(prunableIfUndefined, key)) {
- delete (txDataRPC as any)[key];
- }
- });
- return txDataRPC;
- },
- /**
- * Marshall call data
- * @param callData call data to marshall
- * @return marshalled call data
- */
- marshalCallData(callData: Partial<CallData>): Partial<CallDataRPC> {
- const callTxDataBase = {
- ...callData,
- };
- delete callTxDataBase.from;
- const callTxDataBaseRPC = marshaller._marshalCallTxDataBase(callTxDataBase);
- const callDataRPC = {
- ...callTxDataBaseRPC,
- from: _.isUndefined(callData.from) ? undefined : marshaller.marshalAddress(callData.from),
- };
- return callDataRPC;
- },
- /**
- * Marshall address
- * @param address address to marshall
- * @return marshalled address
- */
- marshalAddress(address: string): string {
- if (addressUtils.isAddress(address)) {
- return ethUtil.addHexPrefix(address);
- }
- throw new Error(`Invalid address encountered: ${address}`);
- },
- /**
- * Marshall block param
- * @param blockParam block param to marshall
- * @return marshalled block param
- */
- marshalBlockParam(blockParam: BlockParam | string | number | undefined): string | undefined {
- if (_.isUndefined(blockParam)) {
- return BlockParamLiteral.Latest;
- }
- const encodedBlockParam = _.isNumber(blockParam) ? utils.numberToHex(blockParam) : blockParam;
- return encodedBlockParam;
- },
- /**
- * Unmarshall log
- * @param rawLog log to unmarshall
- * @return unmarshalled log
- */
- unmarshalLog(rawLog: RawLogEntry): LogEntry {
- const formattedLog = {
- ...rawLog,
- logIndex: utils.convertHexToNumberOrNull(rawLog.logIndex),
- blockNumber: utils.convertHexToNumberOrNull(rawLog.blockNumber),
- transactionIndex: utils.convertHexToNumberOrNull(rawLog.transactionIndex),
- };
- return formattedLog;
- },
- _marshalCallTxDataBase(callTxDataBase: Partial<CallTxDataBase>): Partial<CallTxDataBaseRPC> {
- const callTxDataBaseRPC = {
- ...callTxDataBase,
- to: _.isUndefined(callTxDataBase.to) ? undefined : marshaller.marshalAddress(callTxDataBase.to),
- gasPrice: _.isUndefined(callTxDataBase.gasPrice)
- ? undefined
- : utils.encodeAmountAsHexString(callTxDataBase.gasPrice),
- gas: _.isUndefined(callTxDataBase.gas) ? undefined : utils.encodeAmountAsHexString(callTxDataBase.gas),
- value: _.isUndefined(callTxDataBase.value)
- ? undefined
- : utils.encodeAmountAsHexString(callTxDataBase.value),
- nonce: _.isUndefined(callTxDataBase.nonce)
- ? undefined
- : utils.encodeAmountAsHexString(callTxDataBase.nonce),
- };
-
- return callTxDataBaseRPC;
- },
-};
diff --git a/packages/web3-wrapper/src/types.ts b/packages/web3-wrapper/src/types.ts
deleted file mode 100644
index eb5a35f07..000000000
--- a/packages/web3-wrapper/src/types.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-export enum Web3WrapperErrors {
- TransactionMiningTimeout = 'TRANSACTION_MINING_TIMEOUT',
-}
-
-export interface AbstractBlockRPC {
- number: string | null;
- hash: string | null;
- parentHash: string;
- nonce: string | null;
- sha3Uncles: string;
- logsBloom: string | null;
- transactionsRoot: string;
- stateRoot: string;
- miner: string;
- difficulty: string;
- totalDifficulty: string;
- extraData: string;
- size: string;
- gasLimit: string;
- gasUsed: string;
- timestamp: string;
- uncles: string[];
-}
-export interface BlockWithoutTransactionDataRPC extends AbstractBlockRPC {
- transactions: string[];
-}
-export interface BlockWithTransactionDataRPC extends AbstractBlockRPC {
- transactions: TransactionRPC[];
-}
-export interface TransactionRPC {
- hash: string;
- nonce: string;
- blockHash: string | null;
- blockNumber: string | null;
- transactionIndex: string | null;
- from: string;
- to: string | null;
- value: string;
- gasPrice: string;
- gas: string;
- input: string;
-}
-
-export interface TransactionReceiptRPC {
- blockHash: string;
- blockNumber: string;
- transactionHash: string;
- transactionIndex: string;
- from: string;
- to: string;
- status: TransactionReceiptStatusRPC;
- cumulativeGasUsed: string;
- gasUsed: string;
- contractAddress: string | null;
- logs: LogEntryRPC[];
-}
-
-export interface LogEntryRPC {
- logIndex: string | null;
- transactionIndex: string | null;
- transactionHash: string;
- blockHash: string | null;
- blockNumber: string | null;
- address: string;
- data: string;
- topics: string[];
-}
-
-export type TransactionReceiptStatusRPC = null | string | 0 | 1;
-
-export interface CallTxDataBaseRPC {
- to?: string;
- value?: string;
- gas?: string;
- gasPrice?: string;
- data?: string;
- nonce?: string;
-}
-
-export interface TxDataRPC extends CallTxDataBaseRPC {
- from: string;
-}
-
-export interface CallDataRPC extends CallTxDataBaseRPC {
- from?: string;
-}
-
-// NodeType represents the type of the backing Ethereum node.
-export enum NodeType {
- Geth = 'GETH',
- Ganache = 'GANACHE',
-}
diff --git a/packages/web3-wrapper/src/utils.ts b/packages/web3-wrapper/src/utils.ts
deleted file mode 100644
index 1aba3c75a..000000000
--- a/packages/web3-wrapper/src/utils.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-
-export const utils = {
- convertHexToNumber(value: string): number {
- const valueBigNumber = new BigNumber(value);
- const valueNumber = valueBigNumber.toNumber();
- return valueNumber;
- },
- convertHexToNumberOrNull(hex: string | null): number | null {
- if (_.isNull(hex)) {
- return null;
- }
- const decimal = utils.convertHexToNumber(hex);
- return decimal;
- },
- convertAmountToBigNumber(value: string | number | BigNumber): BigNumber {
- const num = value || 0;
- const isBigNumber = BigNumber.isBigNumber(num);
- if (isBigNumber) {
- return num as BigNumber;
- }
-
- if (_.isString(num) && (num.indexOf('0x') === 0 || num.indexOf('-0x') === 0)) {
- return new BigNumber(num.replace('0x', ''), 16);
- }
-
- const baseTen = 10;
- return new BigNumber((num as number).toString(baseTen), baseTen);
- },
- encodeAmountAsHexString(value: string | number | BigNumber): string {
- const valueBigNumber = utils.convertAmountToBigNumber(value);
- const hexBase = 16;
- const valueHex = valueBigNumber.toString(hexBase);
-
- return valueBigNumber.isLessThan(0) ? `-0x${valueHex.substr(1)}` : `0x${valueHex}`;
- },
- numberToHex(value: number): string {
- if (!isFinite(value) && !utils.isHexStrict(value)) {
- throw new Error(`Given input ${value} is not a number.`);
- }
-
- const valueBigNumber = new BigNumber(value);
- const hexBase = 16;
- const result = valueBigNumber.toString(hexBase);
-
- return valueBigNumber.lt(0) ? `-0x${result.substr(1)}` : `0x${result}`;
- },
- isHexStrict(hex: string | number): boolean {
- return (
- (_.isString(hex) || _.isNumber(hex)) && /^(-)?0x[0-9a-f]*$/i.test(_.isNumber(hex) ? hex.toString() : hex)
- );
- },
-};
diff --git a/packages/web3-wrapper/src/web3_wrapper.ts b/packages/web3-wrapper/src/web3_wrapper.ts
deleted file mode 100644
index 76cae4b01..000000000
--- a/packages/web3-wrapper/src/web3_wrapper.ts
+++ /dev/null
@@ -1,703 +0,0 @@
-import { assert } from '@0x/assert';
-import { schemas } from '@0x/json-schemas';
-import { AbiDecoder, addressUtils, BigNumber, intervalUtils, promisify } from '@0x/utils';
-import {
- BlockParam,
- BlockParamLiteral,
- BlockWithoutTransactionData,
- BlockWithTransactionData,
- CallData,
- FilterObject,
- JSONRPCRequestPayload,
- JSONRPCResponsePayload,
- LogEntry,
- Provider,
- RawLogEntry,
- TraceParams,
- Transaction,
- TransactionReceipt,
- TransactionReceiptWithDecodedLogs,
- TransactionTrace,
- TxData,
-} from 'ethereum-types';
-import * as _ from 'lodash';
-
-import { marshaller } from './marshaller';
-import {
- BlockWithoutTransactionDataRPC,
- BlockWithTransactionDataRPC,
- NodeType,
- TransactionReceiptRPC,
- TransactionRPC,
- Web3WrapperErrors,
-} from './types';
-import { utils } from './utils';
-
-const BASE_TEN = 10;
-
-// These are unique identifiers contained in the response of the
-// web3_clientVersion call.
-const uniqueVersionIds = {
- geth: 'Geth',
- ganache: 'EthereumJS TestRPC',
-};
-
-/**
- * An alternative to the Web3.js library that provides a consistent, clean, promise-based interface.
- */
-export class Web3Wrapper {
- /**
- * Flag to check if this instance is of type Web3Wrapper
- */
- public isZeroExWeb3Wrapper = true;
- public abiDecoder: AbiDecoder;
- private _provider: Provider;
- private readonly _txDefaults: Partial<TxData>;
- private _jsonRpcRequestId: number;
- /**
- * Check if an address is a valid Ethereum address
- * @param address Address to check
- * @returns Whether the address is a valid Ethereum address
- */
- public static isAddress(address: string): boolean {
- return addressUtils.isAddress(address);
- }
- /**
- * A unit amount is defined as the amount of a token above the specified decimal places (integer part).
- * E.g: If a currency has 18 decimal places, 1e18 or one quintillion of the currency is equivalent
- * to 1 unit.
- * @param amount The amount in baseUnits that you would like converted to units.
- * @param decimals The number of decimal places the unit amount has.
- * @return The amount in units.
- */
- public static toUnitAmount(amount: BigNumber, decimals: number): BigNumber {
- assert.isValidBaseUnitAmount('amount', amount);
- assert.isNumber('decimals', decimals);
- const aUnit = new BigNumber(BASE_TEN).pow(decimals);
- const unit = amount.div(aUnit);
- return unit;
- }
- /**
- * A baseUnit is defined as the smallest denomination of a token. An amount expressed in baseUnits
- * is the amount expressed in the smallest denomination.
- * E.g: 1 unit of a token with 18 decimal places is expressed in baseUnits as 1000000000000000000
- * @param amount The amount of units that you would like converted to baseUnits.
- * @param decimals The number of decimal places the unit amount has.
- * @return The amount in baseUnits.
- */
- public static toBaseUnitAmount(amount: BigNumber, decimals: number): BigNumber {
- assert.isBigNumber('amount', amount);
- assert.isNumber('decimals', decimals);
- const unit = new BigNumber(BASE_TEN).pow(decimals);
- const baseUnitAmount = amount.times(unit);
- const hasDecimals = baseUnitAmount.decimalPlaces() !== 0;
- if (hasDecimals) {
- throw new Error(`Invalid unit amount: ${amount.toString()} - Too many decimal places`);
- }
- return baseUnitAmount;
- }
- /**
- * Convert an Ether amount from ETH to Wei
- * @param ethAmount Amount of Ether to convert to wei
- * @returns Amount in wei
- */
- public static toWei(ethAmount: BigNumber): BigNumber {
- assert.isBigNumber('ethAmount', ethAmount);
- const ETH_DECIMALS = 18;
- const balanceWei = Web3Wrapper.toBaseUnitAmount(ethAmount, ETH_DECIMALS);
- return balanceWei;
- }
- private static _assertBlockParam(blockParam: string | BlockParam): void {
- if (_.isNumber(blockParam)) {
- return;
- } else if (_.isString(blockParam)) {
- assert.doesBelongToStringEnum('blockParam', blockParam, BlockParamLiteral);
- }
- }
- private static _assertBlockParamOrString(blockParam: string | BlockParam): void {
- try {
- Web3Wrapper._assertBlockParam(blockParam);
- } catch (err) {
- try {
- assert.isHexString('blockParam', blockParam as string);
- return;
- } catch (err) {
- throw new Error(`Expected blockParam to be of type "string | BlockParam", encountered ${blockParam}`);
- }
- }
- }
- private static _normalizeTxReceiptStatus(status: undefined | null | string | 0 | 1): null | 0 | 1 {
- // Transaction status might have four values
- // undefined - Testrpc and other old clients
- // null - New clients on old transactions
- // number - Parity
- // hex - Geth
- if (_.isString(status)) {
- return utils.convertHexToNumber(status) as 0 | 1;
- } else if (_.isUndefined(status)) {
- return null;
- } else {
- return status;
- }
- }
- /**
- * Instantiates a new Web3Wrapper.
- * @param provider The Web3 provider instance you would like the Web3Wrapper to use for interacting with
- * the backing Ethereum node.
- * @param txDefaults Override TxData defaults sent with RPC requests to the backing Ethereum node.
- * @return An instance of the Web3Wrapper class.
- */
- constructor(provider: Provider, txDefaults?: Partial<TxData>) {
- assert.isWeb3Provider('provider', provider);
- if (_.isUndefined((provider as any).sendAsync)) {
- // Web3@1.0 provider doesn't support synchronous http requests,
- // so it only has an async `send` method, instead of a `send` and `sendAsync` in web3@0.x.x`
- // We re-assign the send method so that Web3@1.0 providers work with @0x/web3-wrapper
- (provider as any).sendAsync = (provider as any).send;
- }
- this.abiDecoder = new AbiDecoder([]);
- this._provider = provider;
- this._txDefaults = txDefaults || {};
- this._jsonRpcRequestId = 1;
- }
- /**
- * Get the contract defaults set to the Web3Wrapper instance
- * @return TxData defaults (e.g gas, gasPrice, nonce, etc...)
- */
- public getContractDefaults(): Partial<TxData> {
- return this._txDefaults;
- }
- /**
- * Retrieve the Web3 provider
- * @return Web3 provider instance
- */
- public getProvider(): Provider {
- return this._provider;
- }
- /**
- * Update the used Web3 provider
- * @param provider The new Web3 provider to be set
- */
- public setProvider(provider: Provider): void {
- assert.isWeb3Provider('provider', provider);
- this._provider = provider;
- }
- /**
- * Check whether an address is available through the backing provider. This can be
- * useful if you want to know whether a user can sign messages or transactions from
- * a given Ethereum address.
- * @param senderAddress Address to check availability for
- * @returns Whether the address is available through the provider.
- */
- public async isSenderAddressAvailableAsync(senderAddress: string): Promise<boolean> {
- assert.isETHAddressHex('senderAddress', senderAddress);
- const addresses = await this.getAvailableAddressesAsync();
- const normalizedAddress = senderAddress.toLowerCase();
- return _.includes(addresses, normalizedAddress);
- }
- /**
- * Fetch the backing Ethereum node's version string (e.g `MetaMask/v4.2.0`)
- * @returns Ethereum node's version string
- */
- public async getNodeVersionAsync(): Promise<string> {
- const nodeVersion = await this.sendRawPayloadAsync<string>({ method: 'web3_clientVersion' });
- return nodeVersion;
- }
- /**
- * Fetches the networkId of the backing Ethereum node
- * @returns The network id
- */
- public async getNetworkIdAsync(): Promise<number> {
- const networkIdStr = await this.sendRawPayloadAsync<string>({ method: 'net_version' });
- const networkId = _.parseInt(networkIdStr);
- return networkId;
- }
- /**
- * Retrieves the transaction receipt for a given transaction hash if found
- * @param txHash Transaction hash
- * @returns The transaction receipt, including it's status (0: failed, 1: succeeded). Returns undefined if transaction not found.
- */
- public async getTransactionReceiptIfExistsAsync(txHash: string): Promise<TransactionReceipt | undefined> {
- assert.isHexString('txHash', txHash);
- const transactionReceiptRpc = await this.sendRawPayloadAsync<TransactionReceiptRPC>({
- method: 'eth_getTransactionReceipt',
- params: [txHash],
- });
- // HACK Parity can return a pending transaction receipt. We check for a non null
- // block number before continuing with returning a fully realised receipt.
- // ref: https://github.com/paritytech/parity-ethereum/issues/1180
- if (!_.isNull(transactionReceiptRpc) && !_.isNull(transactionReceiptRpc.blockNumber)) {
- transactionReceiptRpc.status = Web3Wrapper._normalizeTxReceiptStatus(transactionReceiptRpc.status);
- const transactionReceipt = marshaller.unmarshalTransactionReceipt(transactionReceiptRpc);
- return transactionReceipt;
- } else {
- return undefined;
- }
- }
- /**
- * Retrieves the transaction data for a given transaction
- * @param txHash Transaction hash
- * @returns The raw transaction data
- */
- public async getTransactionByHashAsync(txHash: string): Promise<Transaction> {
- assert.isHexString('txHash', txHash);
- const transactionRpc = await this.sendRawPayloadAsync<TransactionRPC>({
- method: 'eth_getTransactionByHash',
- params: [txHash],
- });
- const transaction = marshaller.unmarshalTransaction(transactionRpc);
- return transaction;
- }
- /**
- * Retrieves an accounts Ether balance in wei
- * @param owner Account whose balance you wish to check
- * @param defaultBlock The block depth at which to fetch the balance (default=latest)
- * @returns Balance in wei
- */
- public async getBalanceInWeiAsync(owner: string, defaultBlock?: BlockParam): Promise<BigNumber> {
- assert.isETHAddressHex('owner', owner);
- if (!_.isUndefined(defaultBlock)) {
- Web3Wrapper._assertBlockParam(defaultBlock);
- }
- const marshalledDefaultBlock = marshaller.marshalBlockParam(defaultBlock);
- const encodedOwner = marshaller.marshalAddress(owner);
- const balanceInWei = await this.sendRawPayloadAsync<string>({
- method: 'eth_getBalance',
- params: [encodedOwner, marshalledDefaultBlock],
- });
- // Rewrap in a new BigNumber
- return new BigNumber(balanceInWei);
- }
- /**
- * Check if a contract exists at a given address
- * @param address Address to which to check
- * @returns Whether or not contract code was found at the supplied address
- */
- public async doesContractExistAtAddressAsync(address: string): Promise<boolean> {
- assert.isETHAddressHex('address', address);
- const code = await this.getContractCodeAsync(address);
- // Regex matches 0x0, 0x00, 0x in order to accommodate poorly implemented clients
- const isCodeEmpty = /^0x0{0,40}$/i.test(code);
- return !isCodeEmpty;
- }
- /**
- * Gets the contract code by address
- * @param address Address of the contract
- * @param defaultBlock Block height at which to make the call. Defaults to `latest`
- * @return Code of the contract
- */
- public async getContractCodeAsync(address: string, defaultBlock?: BlockParam): Promise<string> {
- assert.isETHAddressHex('address', address);
- if (!_.isUndefined(defaultBlock)) {
- Web3Wrapper._assertBlockParam(defaultBlock);
- }
- const marshalledDefaultBlock = marshaller.marshalBlockParam(defaultBlock);
- const encodedAddress = marshaller.marshalAddress(address);
- const code = await this.sendRawPayloadAsync<string>({
- method: 'eth_getCode',
- params: [encodedAddress, marshalledDefaultBlock],
- });
- return code;
- }
- /**
- * Gets the debug trace of a transaction
- * @param txHash Hash of the transactuon to get a trace for
- * @param traceParams Config object allowing you to specify if you need memory/storage/stack traces.
- * @return Transaction trace
- */
- public async getTransactionTraceAsync(txHash: string, traceParams: TraceParams): Promise<TransactionTrace> {
- assert.isHexString('txHash', txHash);
- const trace = await this.sendRawPayloadAsync<TransactionTrace>({
- method: 'debug_traceTransaction',
- params: [txHash, traceParams],
- });
- return trace;
- }
- /**
- * Sign a message with a specific address's private key (`eth_sign`)
- * @param address Address of signer
- * @param message Message to sign
- * @returns Signature string (might be VRS or RSV depending on the Signer)
- */
- public async signMessageAsync(address: string, message: string): Promise<string> {
- assert.isETHAddressHex('address', address);
- assert.isString('message', message); // TODO: Should this be stricter? Hex string?
- const signData = await this.sendRawPayloadAsync<string>({
- method: 'eth_sign',
- params: [address, message],
- });
- return signData;
- }
- /**
- * Sign an EIP712 typed data message with a specific address's private key (`eth_signTypedData`)
- * @param address Address of signer
- * @param typedData Typed data message to sign
- * @returns Signature string (as RSV)
- */
- public async signTypedDataAsync(address: string, typedData: any): Promise<string> {
- assert.isETHAddressHex('address', address);
- assert.doesConformToSchema('typedData', typedData, schemas.eip712TypedDataSchema);
- const signData = await this.sendRawPayloadAsync<string>({
- method: 'eth_signTypedData',
- params: [address, typedData],
- });
- return signData;
- }
- /**
- * Fetches the latest block number
- * @returns Block number
- */
- public async getBlockNumberAsync(): Promise<number> {
- const blockNumberHex = await this.sendRawPayloadAsync<string>({
- method: 'eth_blockNumber',
- params: [],
- });
- const blockNumber = utils.convertHexToNumberOrNull(blockNumberHex);
- return blockNumber as number;
- }
- /**
- * Fetch a specific Ethereum block without transaction data
- * @param blockParam The block you wish to fetch (blockHash, blockNumber or blockLiteral)
- * @returns The requested block without transaction data, or undefined if block was not found
- * (e.g the node isn't fully synced, there was a block re-org and the requested block was uncles, etc...)
- */
- public async getBlockIfExistsAsync(
- blockParam: string | BlockParam,
- ): Promise<BlockWithoutTransactionData | undefined> {
- Web3Wrapper._assertBlockParamOrString(blockParam);
- const encodedBlockParam = marshaller.marshalBlockParam(blockParam);
- const method = utils.isHexStrict(blockParam) ? 'eth_getBlockByHash' : 'eth_getBlockByNumber';
- const shouldIncludeTransactionData = false;
- const blockWithoutTransactionDataWithHexValuesOrNull = await this.sendRawPayloadAsync<
- BlockWithoutTransactionDataRPC
- >({
- method,
- params: [encodedBlockParam, shouldIncludeTransactionData],
- });
- let blockWithoutTransactionDataIfExists;
- if (!_.isNull(blockWithoutTransactionDataWithHexValuesOrNull)) {
- blockWithoutTransactionDataIfExists = marshaller.unmarshalIntoBlockWithoutTransactionData(
- blockWithoutTransactionDataWithHexValuesOrNull,
- );
- }
- return blockWithoutTransactionDataIfExists;
- }
- /**
- * Fetch a specific Ethereum block with transaction data
- * @param blockParam The block you wish to fetch (blockHash, blockNumber or blockLiteral)
- * @returns The requested block with transaction data
- */
- public async getBlockWithTransactionDataAsync(blockParam: string | BlockParam): Promise<BlockWithTransactionData> {
- Web3Wrapper._assertBlockParamOrString(blockParam);
- let encodedBlockParam = blockParam;
- if (_.isNumber(blockParam)) {
- encodedBlockParam = utils.numberToHex(blockParam);
- }
- const method = utils.isHexStrict(blockParam) ? 'eth_getBlockByHash' : 'eth_getBlockByNumber';
- const shouldIncludeTransactionData = true;
- const blockWithTransactionDataWithHexValues = await this.sendRawPayloadAsync<BlockWithTransactionDataRPC>({
- method,
- params: [encodedBlockParam, shouldIncludeTransactionData],
- });
- const blockWithoutTransactionData = marshaller.unmarshalIntoBlockWithTransactionData(
- blockWithTransactionDataWithHexValues,
- );
- return blockWithoutTransactionData;
- }
- /**
- * Fetch a block's timestamp
- * @param blockParam The block you wish to fetch (blockHash, blockNumber or blockLiteral)
- * @returns The block's timestamp
- */
- public async getBlockTimestampAsync(blockParam: string | BlockParam): Promise<number> {
- Web3Wrapper._assertBlockParamOrString(blockParam);
- const blockIfExists = await this.getBlockIfExistsAsync(blockParam);
- if (_.isUndefined(blockIfExists)) {
- throw new Error(`Failed to fetch block with blockParam: ${JSON.stringify(blockParam)}`);
- }
- return blockIfExists.timestamp;
- }
- /**
- * Retrieve the user addresses available through the backing provider
- * @returns Available user addresses
- */
- public async getAvailableAddressesAsync(): Promise<string[]> {
- const addresses = await this.sendRawPayloadAsync<string>({
- method: 'eth_accounts',
- params: [],
- });
- const normalizedAddresses = _.map(addresses, address => address.toLowerCase());
- return normalizedAddresses;
- }
- /**
- * Take a snapshot of the blockchain state on a TestRPC/Ganache local node
- * @returns The snapshot id. This can be used to revert to this snapshot
- */
- public async takeSnapshotAsync(): Promise<number> {
- const snapshotId = Number(await this.sendRawPayloadAsync<string>({ method: 'evm_snapshot', params: [] }));
- return snapshotId;
- }
- /**
- * Revert the blockchain state to a previous snapshot state on TestRPC/Ganache local node
- * @param snapshotId snapshot id to revert to
- * @returns Whether the revert was successful
- */
- public async revertSnapshotAsync(snapshotId: number): Promise<boolean> {
- assert.isNumber('snapshotId', snapshotId);
- const didRevert = await this.sendRawPayloadAsync<boolean>({ method: 'evm_revert', params: [snapshotId] });
- return didRevert;
- }
- /**
- * Mine a block on a TestRPC/Ganache local node
- */
- public async mineBlockAsync(): Promise<void> {
- await this.sendRawPayloadAsync<string>({ method: 'evm_mine', params: [] });
- }
- /**
- * Increase the next blocks timestamp on TestRPC/Ganache or Geth local node.
- * Will throw if provider is neither TestRPC/Ganache or Geth.
- * @param timeDelta Amount of time to add in seconds
- */
- public async increaseTimeAsync(timeDelta: number): Promise<number> {
- assert.isNumber('timeDelta', timeDelta);
- // Detect Geth vs. Ganache and use appropriate endpoint.
- const version = await this.getNodeVersionAsync();
- if (_.includes(version, uniqueVersionIds.geth)) {
- return this.sendRawPayloadAsync<number>({ method: 'debug_increaseTime', params: [timeDelta] });
- } else if (_.includes(version, uniqueVersionIds.ganache)) {
- return this.sendRawPayloadAsync<number>({ method: 'evm_increaseTime', params: [timeDelta] });
- } else {
- throw new Error(`Unknown client version: ${version}`);
- }
- }
- /**
- * Retrieve smart contract logs for a given filter
- * @param filter Parameters by which to filter which logs to retrieve
- * @returns The corresponding log entries
- */
- public async getLogsAsync(filter: FilterObject): Promise<LogEntry[]> {
- if (!_.isUndefined(filter.blockHash) && (!_.isUndefined(filter.fromBlock) || !_.isUndefined(filter.toBlock))) {
- throw new Error(
- `Cannot specify 'blockHash' as well as 'fromBlock'/'toBlock' in the filter supplied to 'getLogsAsync'`,
- );
- }
-
- let fromBlock = filter.fromBlock;
- if (_.isNumber(fromBlock)) {
- fromBlock = utils.numberToHex(fromBlock);
- }
- let toBlock = filter.toBlock;
- if (_.isNumber(toBlock)) {
- toBlock = utils.numberToHex(toBlock);
- }
- const serializedFilter = {
- ...filter,
- fromBlock,
- toBlock,
- };
- const payload = {
- method: 'eth_getLogs',
- params: [serializedFilter],
- };
- const rawLogs = await this.sendRawPayloadAsync<RawLogEntry[]>(payload);
- const formattedLogs = _.map(rawLogs, marshaller.unmarshalLog.bind(marshaller));
- return formattedLogs;
- }
- /**
- * Calculate the estimated gas cost for a given transaction
- * @param txData Transaction data
- * @returns Estimated gas cost
- */
- public async estimateGasAsync(txData: Partial<TxData>): Promise<number> {
- assert.doesConformToSchema('txData', txData, schemas.txDataSchema, [
- schemas.addressSchema,
- schemas.numberSchema,
- schemas.jsNumber,
- ]);
- const txDataHex = marshaller.marshalTxData(txData);
- const gasHex = await this.sendRawPayloadAsync<string>({ method: 'eth_estimateGas', params: [txDataHex] });
- const gas = utils.convertHexToNumber(gasHex);
- return gas;
- }
- /**
- * Call a smart contract method at a given block height
- * @param callData Call data
- * @param defaultBlock Block height at which to make the call. Defaults to `latest`
- * @returns The raw call result
- */
- public async callAsync(callData: CallData, defaultBlock?: BlockParam): Promise<string> {
- assert.doesConformToSchema('callData', callData, schemas.callDataSchema, [
- schemas.addressSchema,
- schemas.numberSchema,
- schemas.jsNumber,
- ]);
- if (!_.isUndefined(defaultBlock)) {
- Web3Wrapper._assertBlockParam(defaultBlock);
- }
- const marshalledDefaultBlock = marshaller.marshalBlockParam(defaultBlock);
- const callDataHex = marshaller.marshalCallData(callData);
- const rawCallResult = await this.sendRawPayloadAsync<string>({
- method: 'eth_call',
- params: [callDataHex, marshalledDefaultBlock],
- });
- return rawCallResult;
- }
- /**
- * Send a transaction
- * @param txData Transaction data
- * @returns Transaction hash
- */
- public async sendTransactionAsync(txData: TxData): Promise<string> {
- assert.doesConformToSchema('txData', txData, schemas.txDataSchema, [
- schemas.addressSchema,
- schemas.numberSchema,
- schemas.jsNumber,
- ]);
- const txDataHex = marshaller.marshalTxData(txData);
- const txHash = await this.sendRawPayloadAsync<string>({ method: 'eth_sendTransaction', params: [txDataHex] });
- return txHash;
- }
- /**
- * Waits for a transaction to be mined and returns the transaction receipt.
- * Note that just because a transaction was mined does not mean it was
- * successful. You need to check the status code of the transaction receipt
- * to find out if it was successful, or use the helper method
- * awaitTransactionSuccessAsync.
- * @param txHash Transaction hash
- * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
- * @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
- * @return Transaction receipt with decoded log args.
- */
- public async awaitTransactionMinedAsync(
- txHash: string,
- pollingIntervalMs: number = 1000,
- timeoutMs?: number,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- assert.isHexString('txHash', txHash);
- assert.isNumber('pollingIntervalMs', pollingIntervalMs);
- if (!_.isUndefined(timeoutMs)) {
- assert.isNumber('timeoutMs', timeoutMs);
- }
- // Immediately check if the transaction has already been mined.
- let transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash);
- if (!_.isUndefined(transactionReceipt)) {
- const logsWithDecodedArgs = _.map(
- transactionReceipt.logs,
- this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder),
- );
- const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs = {
- ...transactionReceipt,
- logs: logsWithDecodedArgs,
- };
- return transactionReceiptWithDecodedLogArgs;
- }
-
- // Otherwise, check again every pollingIntervalMs.
- let wasTimeoutExceeded = false;
- if (timeoutMs) {
- setTimeout(() => (wasTimeoutExceeded = true), timeoutMs);
- }
-
- const txReceiptPromise = new Promise(
- (resolve: (receipt: TransactionReceiptWithDecodedLogs) => void, reject) => {
- const intervalId = intervalUtils.setAsyncExcludingInterval(
- async () => {
- if (wasTimeoutExceeded) {
- intervalUtils.clearAsyncExcludingInterval(intervalId);
- return reject(Web3WrapperErrors.TransactionMiningTimeout);
- }
-
- transactionReceipt = await this.getTransactionReceiptIfExistsAsync(txHash);
- if (!_.isUndefined(transactionReceipt)) {
- intervalUtils.clearAsyncExcludingInterval(intervalId);
- const logsWithDecodedArgs = _.map(
- transactionReceipt.logs,
- this.abiDecoder.tryToDecodeLogOrNoop.bind(this.abiDecoder),
- );
- const transactionReceiptWithDecodedLogArgs: TransactionReceiptWithDecodedLogs = {
- ...transactionReceipt,
- logs: logsWithDecodedArgs,
- };
- resolve(transactionReceiptWithDecodedLogArgs);
- }
- },
- pollingIntervalMs,
- (err: Error) => {
- intervalUtils.clearAsyncExcludingInterval(intervalId);
- reject(err);
- },
- );
- },
- );
- const txReceipt = await txReceiptPromise;
- return txReceipt;
- }
- /**
- * Waits for a transaction to be mined and returns the transaction receipt.
- * Unlike awaitTransactionMinedAsync, it will throw if the receipt has a
- * status that is not equal to 1. A status of 0 or null indicates that the
- * transaction was mined, but failed. See:
- * https://github.com/ethereum/wiki/wiki/JavaScript-API#web3ethgettransactionreceipt
- * @param txHash Transaction hash
- * @param pollingIntervalMs How often (in ms) should we check if the transaction is mined.
- * @param timeoutMs How long (in ms) to poll for transaction mined until aborting.
- * @return Transaction receipt with decoded log args.
- */
- public async awaitTransactionSuccessAsync(
- txHash: string,
- pollingIntervalMs: number = 1000,
- timeoutMs?: number,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const receipt = await this.awaitTransactionMinedAsync(txHash, pollingIntervalMs, timeoutMs);
- if (receipt.status !== 1) {
- throw new Error(`Transaction failed: ${txHash}`);
- }
- return receipt;
- }
- /**
- * Calls the 'debug_setHead' JSON RPC method, which sets the current head of
- * the local chain by block number. Note, this is a destructive action and
- * may severely damage your chain. Use with extreme caution. As of now, this
- * is only supported by Geth. It sill throw if the 'debug_setHead' method is
- * not supported.
- * @param blockNumber The block number to reset to.
- */
- public async setHeadAsync(blockNumber: number): Promise<void> {
- assert.isNumber('blockNumber', blockNumber);
- await this.sendRawPayloadAsync<void>({ method: 'debug_setHead', params: [utils.numberToHex(blockNumber)] });
- }
- /**
- * Sends a raw Ethereum JSON RPC payload and returns the response's `result` key
- * @param payload A partial JSON RPC payload. No need to include version, id, params (if none needed)
- * @return The contents nested under the result key of the response body
- */
- public async sendRawPayloadAsync<A>(payload: Partial<JSONRPCRequestPayload>): Promise<A> {
- const sendAsync = this._provider.sendAsync.bind(this._provider);
- const payloadWithDefaults = {
- id: this._jsonRpcRequestId++,
- params: [],
- jsonrpc: '2.0',
- ...payload,
- };
- const response = await promisify<JSONRPCResponsePayload>(sendAsync)(payloadWithDefaults);
- if (response.error) {
- throw new Error(response.error.message);
- }
- const result = response.result;
- return result;
- }
- /**
- * Returns either NodeType.Geth or NodeType.Ganache depending on the type of
- * the backing Ethereum node. Throws for any other type of node.
- */
- public async getNodeTypeAsync(): Promise<NodeType> {
- const version = await this.getNodeVersionAsync();
- if (_.includes(version, uniqueVersionIds.geth)) {
- return NodeType.Geth;
- } else if (_.includes(version, uniqueVersionIds.ganache)) {
- return NodeType.Ganache;
- } else {
- throw new Error(`Unknown client version: ${version}`);
- }
- }
-} // tslint:disable-line:max-file-line-count
diff --git a/packages/web3-wrapper/test/utils/chai_setup.ts b/packages/web3-wrapper/test/utils/chai_setup.ts
deleted file mode 100644
index 1a8733093..000000000
--- a/packages/web3-wrapper/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/web3-wrapper/test/web3_wrapper_test.ts b/packages/web3-wrapper/test/web3_wrapper_test.ts
deleted file mode 100644
index c4ee91d3d..000000000
--- a/packages/web3-wrapper/test/web3_wrapper_test.ts
+++ /dev/null
@@ -1,169 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as chai from 'chai';
-import { BlockParamLiteral, JSONRPCErrorCallback, JSONRPCRequestPayload, TransactionReceipt } from 'ethereum-types';
-import * as Ganache from 'ganache-core';
-import * as _ from 'lodash';
-import 'mocha';
-
-import { Web3Wrapper } from '../src/web3_wrapper';
-
-import { chaiSetup } from './utils/chai_setup';
-chaiSetup.configure();
-
-const { expect } = chai;
-
-const NUM_GANACHE_ADDRESSES = 10;
-
-describe('Web3Wrapper tests', () => {
- const NETWORK_ID = 50;
- const provider = Ganache.provider({ network_id: NETWORK_ID });
- const web3Wrapper = new Web3Wrapper(provider);
- let addresses: string[];
- before(async () => {
- addresses = await web3Wrapper.getAvailableAddressesAsync();
- });
- describe('#isAddress', () => {
- it('correctly checks if a string is a valid ethereum address', () => {
- expect(Web3Wrapper.isAddress('0x0')).to.be.false();
- expect(Web3Wrapper.isAddress('0xdeadbeef')).to.be.false();
- expect(Web3Wrapper.isAddress('42')).to.be.false();
- expect(Web3Wrapper.isAddress('weth.thetoken.eth')).to.be.false();
- expect(Web3Wrapper.isAddress('0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2')).to.be.true();
- expect(Web3Wrapper.isAddress('0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2')).to.be.true();
- });
- });
- describe('#getNodeVersionAsync', () => {
- it('gets the node version', async () => {
- const nodeVersion = await web3Wrapper.getNodeVersionAsync();
- const NODE_VERSION = 'EthereumJS TestRPC/v2.3.3/ethereum-js';
- expect(nodeVersion).to.be.equal(NODE_VERSION);
- });
- });
- describe('#getNetworkIdAsync', () => {
- it('gets the network id', async () => {
- const networkId = await web3Wrapper.getNetworkIdAsync();
- expect(networkId).to.be.equal(NETWORK_ID);
- });
- });
- describe('#getNetworkIdAsync', () => {
- it('gets the network id', async () => {
- const networkId = await web3Wrapper.getNetworkIdAsync();
- expect(networkId).to.be.equal(NETWORK_ID);
- });
- });
- describe('#getAvailableAddressesAsync', () => {
- it('gets the available addresses', async () => {
- const availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
- expect(availableAddresses.length).to.be.equal(NUM_GANACHE_ADDRESSES);
- expect(Web3Wrapper.isAddress(availableAddresses[0])).to.equal(true);
- });
- });
- describe('#getBalanceInWeiAsync', () => {
- it('gets the users balance in wei', async () => {
- const secondAccount = addresses[1];
- const balanceInWei = await web3Wrapper.getBalanceInWeiAsync(secondAccount);
- const tenEthInWei = 100000000000000000000;
- expect(balanceInWei).to.be.bignumber.equal(tenEthInWei);
- });
- it('should throw if supplied owner not an Ethereum address hex string', async () => {
- const invalidEthAddress = 'deadbeef';
- expect(web3Wrapper.getBalanceInWeiAsync(invalidEthAddress)).to.eventually.to.be.rejected();
- });
- });
- describe('#signMessageAsync', () => {
- it('should sign message', async () => {
- const message = '0xdeadbeef';
- const signer = addresses[1];
- const signature = await web3Wrapper.signMessageAsync(signer, message);
- const signatureLength = 132;
- expect(signature.length).to.be.equal(signatureLength);
- });
- it('should throw if the provider returns an error', async () => {
- const message = '0xdeadbeef';
- const signer = addresses[1];
- const fakeProvider = {
- async sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): Promise<void> {
- callback(new Error('User denied message signature'));
- },
- };
- const errorWeb3Wrapper = new Web3Wrapper(fakeProvider);
- expect(errorWeb3Wrapper.signMessageAsync(signer, message)).to.be.rejectedWith(
- 'User denied message signature',
- );
- });
- });
- describe('#getBlockNumberAsync', () => {
- it('get block number', async () => {
- const blockNumber = await web3Wrapper.getBlockNumberAsync();
- expect(typeof blockNumber).to.be.equal('number');
- });
- });
- describe('#getTransactionReceiptAsync/awaitTransactionSuccessAsync', () => {
- it('get block number', async () => {
- const payload = { from: addresses[0], to: addresses[1], value: 1 };
- const txHash = await web3Wrapper.sendTransactionAsync(payload);
- await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- const receiptIfExists = await web3Wrapper.getTransactionReceiptIfExistsAsync(txHash);
- expect(receiptIfExists).to.not.be.undefined();
- const receipt = receiptIfExists as TransactionReceipt;
- expect(receipt.transactionIndex).to.be.a('number');
- expect(receipt.transactionHash).to.be.equal(txHash);
- });
- });
- describe('#getBlockIfExistsAsync', () => {
- it('gets block when supplied a valid BlockParamLiteral value', async () => {
- const blockParamLiteral = BlockParamLiteral.Earliest;
- const blockIfExists = await web3Wrapper.getBlockIfExistsAsync(blockParamLiteral);
- if (_.isUndefined(blockIfExists)) {
- throw new Error('Expected block to exist');
- }
- expect(blockIfExists.number).to.be.equal(0);
- expect(BigNumber.isBigNumber(blockIfExists.difficulty)).to.equal(true);
- expect(_.isNumber(blockIfExists.gasLimit)).to.equal(true);
- });
- it('gets block when supplied a block number', async () => {
- const blockParamLiteral = 0;
- const blockIfExists = await web3Wrapper.getBlockIfExistsAsync(blockParamLiteral);
- if (_.isUndefined(blockIfExists)) {
- throw new Error('Expected block to exist');
- }
- expect(blockIfExists.number).to.be.equal(0);
- });
- it('gets block when supplied a block hash', async () => {
- const blockParamLiteral = 0;
- const blockIfExists = await web3Wrapper.getBlockIfExistsAsync(blockParamLiteral);
- if (_.isUndefined(blockIfExists)) {
- throw new Error('Expected block to exist');
- }
- const sameBlockIfExists = await web3Wrapper.getBlockIfExistsAsync(blockIfExists.hash as string);
- if (_.isUndefined(sameBlockIfExists)) {
- throw new Error('Expected block to exist');
- }
- expect(sameBlockIfExists.number).to.be.equal(0);
- });
- it('should throw if supplied invalid blockParam value', async () => {
- const invalidBlockParam = 'deadbeef';
- expect(web3Wrapper.getBlockIfExistsAsync(invalidBlockParam)).to.eventually.to.be.rejected();
- });
- });
- describe('#getBlockWithTransactionDataAsync', () => {
- it('gets block when supplied a valid BlockParamLiteral value', async () => {
- const blockParamLiteral = BlockParamLiteral.Earliest;
- const block = await web3Wrapper.getBlockWithTransactionDataAsync(blockParamLiteral);
- expect(block.number).to.be.equal(0);
- expect(BigNumber.isBigNumber(block.difficulty)).to.equal(true);
- expect(_.isNumber(block.gasLimit)).to.equal(true);
- });
- it('should throw if supplied invalid blockParam value', async () => {
- const invalidBlockParam = 'deadbeef';
- expect(web3Wrapper.getBlockWithTransactionDataAsync(invalidBlockParam)).to.eventually.to.be.rejected();
- });
- });
- describe('#getBlockTimestampAsync', () => {
- it('gets block timestamp', async () => {
- const blockParamLiteral = BlockParamLiteral.Earliest;
- const timestamp = await web3Wrapper.getBlockTimestampAsync(blockParamLiteral);
- expect(_.isNumber(timestamp)).to.be.equal(true);
- });
- });
-});
diff --git a/packages/web3-wrapper/tsconfig.json b/packages/web3-wrapper/tsconfig.json
deleted file mode 100644
index 718e623c7..000000000
--- a/packages/web3-wrapper/tsconfig.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "outDir": "lib",
- "rootDir": "."
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/web3-wrapper/tslint.json b/packages/web3-wrapper/tslint.json
deleted file mode 100644
index dd9053357..000000000
--- a/packages/web3-wrapper/tslint.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "extends": ["@0x/tslint-config"]
-}
diff --git a/packages/web3-wrapper/typedoc-tsconfig.json b/packages/web3-wrapper/typedoc-tsconfig.json
deleted file mode 100644
index b9c6b36f3..000000000
--- a/packages/web3-wrapper/typedoc-tsconfig.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "../../typedoc-tsconfig",
- "compilerOptions": {
- "outDir": "lib"
- },
- "include": ["src/**/*", "test/**/*"]
-}
diff --git a/packages/website/.gitignore b/packages/website/.gitignore
deleted file mode 100644
index 1e8d1ceb4..000000000
--- a/packages/website/.gitignore
+++ /dev/null
@@ -1 +0,0 @@
-.awcache
diff --git a/packages/website/README.md b/packages/website/README.md
deleted file mode 100644
index 432b7c335..000000000
--- a/packages/website/README.md
+++ /dev/null
@@ -1,69 +0,0 @@
-## Website & 0x Portal DApp
-
-This repository contains our website and [0x Portal DApp][portal-url] (over-the-counter exchange), facilitating trustless over-the-counter trading of Ethereum-based tokens using 0x protocol.
-
-[website-url]: https://0x.org/
-[portal-url]: https://0x.org/portal
-
-## 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.
-
-## Local Dev Setup
-
-Requires Node version 6.9.5 or higher
-
-Add the following to your `/etc/hosts` file:
-
-```
-127.0.0.1 0xproject.localhost
-```
-
-### Install dependencies:
-
-```bash
-yarn install
-```
-
-### 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/website yarn build
-```
-
-### Run dev server
-
-```bash
-PKG=@0x/website yarn watch
-```
-
-Visit [0xproject.localhost:3572](http://0xproject.localhost:3572) in your browser.
-
-### Clean
-
-```bash
-yarn clean
-```
-
-### Lint
-
-```bash
-yarn lint
-```
-
-### Resources
-
-##### Toolkit
-
-- [Material Design Icon Font](http://zavoloklom.github.io/material-design-iconic-font/icons.html#directional)
-- [BassCSS toolkit](http://basscss.com/)
-- [Material-UI component library](http://www.material-ui.com/#/)
-
-##### Recommended Atom packages:
-
-- [atom-typescript](https://atom.io/packages/atom-typescript)
-- [linter-tslint](https://atom.io/packages/linter-tslint)
diff --git a/packages/website/contracts/Mintable.json b/packages/website/contracts/Mintable.json
deleted file mode 100644
index 895db73a2..000000000
--- a/packages/website/contracts/Mintable.json
+++ /dev/null
@@ -1,189 +0,0 @@
-{
- "contract_name": "Mintable",
- "abi": [
- {
- "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": "_owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "mint",
- "outputs": [],
- "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"
- },
- {
- "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"
- }
- ],
- "unlinked_binary": "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820998c8326b9629e063eb4867166e72c68a8c2e3ebca6a9d35ebc78c041c7aa47b0029",
- "networks": {},
- "schema_version": "0.0.5",
- "updated_at": 1503413048892
-}
diff --git a/packages/website/less/all.less b/packages/website/less/all.less
deleted file mode 100644
index 5d1dccc98..000000000
--- a/packages/website/less/all.less
+++ /dev/null
@@ -1,146 +0,0 @@
-body {
- font-family: 'Roboto';
-}
-
-a {
- color: black;
-}
-
-#faq {
- li {
- padding-bottom: 5px;
- }
-
- a {
- color: rgb(66, 66, 66);
- }
-}
-
-#landing {
- .h1,
- .h2,
- .h3,
- .h4 {
- font-family: 'Roboto Mono';
- }
-}
-
-#portal {
- h1,
- h2,
- h3,
- h4 {
- font-weight: 100;
- }
-}
-
-#scroll_container {
- .typeTooltip {
- border: 1px solid lightgray;
- opacity: 1;
- }
-}
-
-/*
- * Adds always visible scrollbars on OSX so that user knows the content is scrollable
- * Source: https://davidwalsh.name/osx-overflow
- */
-::-webkit-scrollbar {
- -webkit-appearance: none;
- width: 4px;
- height: 2px;
-}
-::-webkit-scrollbar-thumb {
- border-radius: 4px;
- background-color: rgba(0, 0, 0, 0.5);
- -webkit-box-shadow: 0 0 1px rgba(255, 255, 255, 0.5);
-}
-
-// Hack: For some reason the animation applied to the material-ui textfield causes the overflow
-// applied to other elements to fail while the animation is underway. Adding this class to the
-// affected component fixes the issue
-// Source: http://stackoverflow.com/questions/14383632/webkit-border-radius-and-overflow-bug-when-using-any-animation-transition
-.transitionFix {
- -webkit-backface-visibility: hidden;
- -moz-backface-visibility: hidden;
- -webkit-transform: translate3d(0, 0, 0);
- -moz-transform: translate3d(0, 0, 0);
-}
-
-.thin {
- font-weight: 100;
-}
-
-code {
- border: 1px solid #e3eefe;
- border-radius: 4px;
- font-family: 'Roboto Mono';
- //background-color: #f2f6ff !important; // lightBlue
-}
-
-#wiki {
- p {
- color: #515151; // grey750
- fontsize: 15;
- }
-
- a {
- color: #1d5cde; // linkBlue
- }
-
- h1,
- h2,
- h3,
- h4 {
- padding-top: 15px;
- }
-
- p,
- blockquote,
- ol,
- dl,
- li,
- table,
- pre {
- margin: 15px 0;
- }
-
- li {
- margin: 5px 0;
- }
-
- table {
- padding: 0;
- border-collapse: collapse;
- }
- table tr {
- border-top: 1px solid #cccccc;
- background-color: white;
- margin: 0;
- padding: 0;
- }
- table tr:nth-child(2n) {
- background-color: #f8f8f8;
- }
- table tr th {
- font-weight: bold;
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px;
- }
- table tr td {
- border: 1px solid #cccccc;
- text-align: left;
- margin: 0;
- padding: 6px 13px;
- }
- table tr th :first-child,
- table tr td :first-child {
- margin-top: 0;
- }
- table tr th :last-child,
- table tr td :last-child {
- margin-bottom: 0;
- }
-}
diff --git a/packages/website/less/normalize.less b/packages/website/less/normalize.less
deleted file mode 100644
index c45a85f89..000000000
--- a/packages/website/less/normalize.less
+++ /dev/null
@@ -1,349 +0,0 @@
-/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
-
-/* Document
- ========================================================================== */
-
-/**
- * 1. Correct the line height in all browsers.
- * 2. Prevent adjustments of font size after orientation changes in iOS.
- */
-
- html {
- line-height: 1.15; /* 1 */
- -webkit-text-size-adjust: 100%; /* 2 */
- }
-
- /* Sections
- ========================================================================== */
-
- /**
- * Remove the margin in all browsers.
- */
-
- body {
- margin: 0;
- }
-
- /**
- * Render the `main` element consistently in IE.
- */
-
- main {
- display: block;
- }
-
- /**
- * Correct the font size and margin on `h1` elements within `section` and
- * `article` contexts in Chrome, Firefox, and Safari.
- */
-
- h1 {
- font-size: 2em;
- margin: 0.67em 0;
- }
-
- /* Grouping content
- ========================================================================== */
-
- /**
- * 1. Add the correct box sizing in Firefox.
- * 2. Show the overflow in Edge and IE.
- */
-
- hr {
- box-sizing: content-box; /* 1 */
- height: 0; /* 1 */
- overflow: visible; /* 2 */
- }
-
- /**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
- pre {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
- }
-
- /* Text-level semantics
- ========================================================================== */
-
- /**
- * Remove the gray background on active links in IE 10.
- */
-
- a {
- background-color: transparent;
- }
-
- /**
- * 1. Remove the bottom border in Chrome 57-
- * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
- */
-
- abbr[title] {
- border-bottom: none; /* 1 */
- text-decoration: underline; /* 2 */
- text-decoration: underline dotted; /* 2 */
- }
-
- /**
- * Add the correct font weight in Chrome, Edge, and Safari.
- */
-
- b,
- strong {
- font-weight: bolder;
- }
-
- /**
- * 1. Correct the inheritance and scaling of font size in all browsers.
- * 2. Correct the odd `em` font sizing in all browsers.
- */
-
- code,
- kbd,
- samp {
- font-family: monospace, monospace; /* 1 */
- font-size: 1em; /* 2 */
- }
-
- /**
- * Add the correct font size in all browsers.
- */
-
- small {
- font-size: 80%;
- }
-
- /**
- * Prevent `sub` and `sup` elements from affecting the line height in
- * all browsers.
- */
-
- sub,
- sup {
- font-size: 75%;
- line-height: 0;
- position: relative;
- vertical-align: baseline;
- }
-
- sub {
- bottom: -0.25em;
- }
-
- sup {
- top: -0.5em;
- }
-
- /* Embedded content
- ========================================================================== */
-
- /**
- * Remove the border on images inside links in IE 10.
- */
-
- img {
- border-style: none;
- }
-
- /* Forms
- ========================================================================== */
-
- /**
- * 1. Change the font styles in all browsers.
- * 2. Remove the margin in Firefox and Safari.
- */
-
- button,
- input,
- optgroup,
- select,
- textarea {
- font-family: inherit; /* 1 */
- font-size: 100%; /* 1 */
- line-height: 1.15; /* 1 */
- margin: 0; /* 2 */
- }
-
- /**
- * Show the overflow in IE.
- * 1. Show the overflow in Edge.
- */
-
- button,
- input { /* 1 */
- overflow: visible;
- }
-
- /**
- * Remove the inheritance of text transform in Edge, Firefox, and IE.
- * 1. Remove the inheritance of text transform in Firefox.
- */
-
- button,
- select { /* 1 */
- text-transform: none;
- }
-
- /**
- * Correct the inability to style clickable types in iOS and Safari.
- */
-
- button,
- [type="button"],
- [type="reset"],
- [type="submit"] {
- -webkit-appearance: button;
- }
-
- /**
- * Remove the inner border and padding in Firefox.
- */
-
- button::-moz-focus-inner,
- [type="button"]::-moz-focus-inner,
- [type="reset"]::-moz-focus-inner,
- [type="submit"]::-moz-focus-inner {
- border-style: none;
- padding: 0;
- }
-
- /**
- * Restore the focus styles unset by the previous rule.
- */
-
- button:-moz-focusring,
- [type="button"]:-moz-focusring,
- [type="reset"]:-moz-focusring,
- [type="submit"]:-moz-focusring {
- outline: 1px dotted ButtonText;
- }
-
- /**
- * Correct the padding in Firefox.
- */
-
- fieldset {
- padding: 0.35em 0.75em 0.625em;
- }
-
- /**
- * 1. Correct the text wrapping in Edge and IE.
- * 2. Correct the color inheritance from `fieldset` elements in IE.
- * 3. Remove the padding so developers are not caught out when they zero out
- * `fieldset` elements in all browsers.
- */
-
- legend {
- box-sizing: border-box; /* 1 */
- color: inherit; /* 2 */
- display: table; /* 1 */
- max-width: 100%; /* 1 */
- padding: 0; /* 3 */
- white-space: normal; /* 1 */
- }
-
- /**
- * Add the correct vertical alignment in Chrome, Firefox, and Opera.
- */
-
- progress {
- vertical-align: baseline;
- }
-
- /**
- * Remove the default vertical scrollbar in IE 10+.
- */
-
- textarea {
- overflow: auto;
- }
-
- /**
- * 1. Add the correct box sizing in IE 10.
- * 2. Remove the padding in IE 10.
- */
-
- [type="checkbox"],
- [type="radio"] {
- box-sizing: border-box; /* 1 */
- padding: 0; /* 2 */
- }
-
- /**
- * Correct the cursor style of increment and decrement buttons in Chrome.
- */
-
- [type="number"]::-webkit-inner-spin-button,
- [type="number"]::-webkit-outer-spin-button {
- height: auto;
- }
-
- /**
- * 1. Correct the odd appearance in Chrome and Safari.
- * 2. Correct the outline style in Safari.
- */
-
- [type="search"] {
- -webkit-appearance: textfield; /* 1 */
- outline-offset: -2px; /* 2 */
- }
-
- /**
- * Remove the inner padding in Chrome and Safari on macOS.
- */
-
- [type="search"]::-webkit-search-decoration {
- -webkit-appearance: none;
- }
-
- /**
- * 1. Correct the inability to style clickable types in iOS and Safari.
- * 2. Change font properties to `inherit` in Safari.
- */
-
- ::-webkit-file-upload-button {
- -webkit-appearance: button; /* 1 */
- font: inherit; /* 2 */
- }
-
- /* Interactive
- ========================================================================== */
-
- /*
- * Add the correct display in Edge, IE 10+, and Firefox.
- */
-
- details {
- display: block;
- }
-
- /*
- * Add the correct display in all browsers.
- */
-
- summary {
- display: list-item;
- }
-
- /* Misc
- ========================================================================== */
-
- /**
- * Add the correct display in IE 10+.
- */
-
- template {
- display: none;
- }
-
- /**
- * Add the correct display in IE 10.
- */
-
- [hidden] {
- display: none;
- } \ No newline at end of file
diff --git a/packages/website/md/docs/0xjs/0.0.1/async.md b/packages/website/md/docs/0xjs/0.0.1/async.md
deleted file mode 100644
index 8abaef331..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/async.md
+++ /dev/null
@@ -1,26 +0,0 @@
-0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
-
-_Async/await syntax (recommended):_
-
-```javascript
-try {
- var availableAddresses = await zeroEx.getAvailableAddressesAsync();
-} catch (error) {
- console.log('Caught error: ', error);
-}
-```
-
-_Promise syntax:_
-
-```javascript
-zeroEx
- .getAvailableAddressesAsync()
- .then(function(availableAddresses) {
- console.log(availableAddresses);
- })
- .catch(function(error) {
- console.log('Caught error: ', error);
- });
-```
-
-As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.
diff --git a/packages/website/md/docs/0xjs/0.0.1/errors.md b/packages/website/md/docs/0xjs/0.0.1/errors.md
deleted file mode 100644
index e97973ccf..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/errors.md
+++ /dev/null
@@ -1 +0,0 @@
-All error messages thrown by the 0x.js library are part of a documented string enum. Each error message is in all-caps, snake-case format. This makes the error messages easily identifiable, unique and grep-able. The error enums listing all possible errors the library could throw can be found in the `Types` section.
diff --git a/packages/website/md/docs/0xjs/0.0.1/installation.md b/packages/website/md/docs/0xjs/0.0.1/installation.md
deleted file mode 100644
index 3860df1cc..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/installation.md
+++ /dev/null
@@ -1,31 +0,0 @@
-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 { ZeroEx } from '0x.js';
-```
-
-#### 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
-<script type="text/javascript" src="0x.js"></script>
-```
-
-### Wiki
-
-Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more!
diff --git a/packages/website/md/docs/0xjs/0.0.1/introduction.md b/packages/website/md/docs/0xjs/0.0.1/introduction.md
deleted file mode 100644
index 008376d33..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any ERC20 token. Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20 token balance/allowance and much more.
diff --git a/packages/website/md/docs/0xjs/0.0.1/versioning.md b/packages/website/md/docs/0xjs/0.0.1/versioning.md
deleted file mode 100644
index 6bcaa5b4d..000000000
--- a/packages/website/md/docs/0xjs/0.0.1/versioning.md
+++ /dev/null
@@ -1 +0,0 @@
-This project adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. Since the library is still an alpha, it's public interface is not yet stable and we will introduce backward incompatible changes to the interface without incrementing the major version until the `1.0.0` release. Our convention until then will be to increment the minor version whenever we introduce backward incompatible changes to the public interface, and to increment the patch version otherwise. This way, it is safe for you to include 0x.js in your projects with the tilda (e.g `~0.22.0`) without fear that a patch update would break your app.
diff --git a/packages/website/md/docs/0xjs/1.0.1/async.md b/packages/website/md/docs/0xjs/1.0.1/async.md
deleted file mode 100644
index bd5ae9d8a..000000000
--- a/packages/website/md/docs/0xjs/1.0.1/async.md
+++ /dev/null
@@ -1,31 +0,0 @@
-0x packages are promise-based libraries. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
-
-_Async/await syntax (recommended):_
-
-```javascript
-try {
- const signature = await signatureUtils.ecSignOrderHashAsync(
- providerEngine,
- orderHashHex,
- maker,
- SignerType.Default,
- );
-} catch (error) {
- console.log('Caught error: ', error);
-}
-```
-
-_Promise syntax:_
-
-```javascript
-signatureUtils
- .ecSignOrderHashAsync(providerEngine, orderHashHex, maker, SignerType.Default)
- .then(function(signature) {
- console.log(signature);
- })
- .catch(function(error) {
- console.log('Caught error: ', error);
- });
-```
-
-As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.
diff --git a/packages/website/md/docs/0xjs/1.0.1/installation.md b/packages/website/md/docs/0xjs/1.0.1/installation.md
deleted file mode 100644
index d5c13e710..000000000
--- a/packages/website/md/docs/0xjs/1.0.1/installation.md
+++ /dev/null
@@ -1,40 +0,0 @@
-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,
- Order,
- orderHashUtils,
- signatureUtils,
- SignerType,
-} from '0x.js';
-```
-
-#### 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
-<script type="text/javascript" src="0x.js"></script>
-```
-
-### Wiki
-
-Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with Ganache, Infura and more!
diff --git a/packages/website/md/docs/0xjs/1.0.1/introduction.md b/packages/website/md/docs/0xjs/1.0.1/introduction.md
deleted file mode 100644
index 4d5d314d3..000000000
--- a/packages/website/md/docs/0xjs/1.0.1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [0x.js](https://github.com/0xProject/0x-monorepo/tree/development/packages/0x.js) documentation! 0x.js is a Javascript library for interacting with the 0x protocol. With it, you can easily make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721). Functionality includes generating, signing, filling and cancelling orders, verifying an orders signature, setting or checking a users ERC20/ERC721 token balance/allowance and much more.
diff --git a/packages/website/md/docs/0xjs/1.0.1/versioning.md b/packages/website/md/docs/0xjs/1.0.1/versioning.md
deleted file mode 100644
index 6bae835d3..000000000
--- a/packages/website/md/docs/0xjs/1.0.1/versioning.md
+++ /dev/null
@@ -1 +0,0 @@
-Since v1.0.0, this package adheres to the [Semantic Versioning 2.0.0](http://semver.org/) specification. The library's public interface includes all the methods, properties and types included in the documentation. We will publish with a major version bump for any breaking change to the public interface, use a minor version bump when introducing new features in a backwards-compatible way, and patch versions when introducing backwards-compatible bug fixes. Because of this, we recommend you import `0x.js` with a caret `^1.0.0` to take advantage of non-breaking bug fixes.
diff --git a/packages/website/md/docs/0xjs/2.0.0/async.md b/packages/website/md/docs/0xjs/2.0.0/async.md
deleted file mode 100644
index c84eebf94..000000000
--- a/packages/website/md/docs/0xjs/2.0.0/async.md
+++ /dev/null
@@ -1,26 +0,0 @@
-0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
-
-_Async/await syntax (recommended):_
-
-```javascript
-try {
- var availableAddresses = await web3Wrapper.getAvailableAddressesAsync();
-} catch (error) {
- console.log('Caught error: ', error);
-}
-```
-
-_Promise syntax:_
-
-```javascript
-web3Wrapper
- .getAvailableAddressesAsync()
- .then(function(availableAddresses) {
- console.log(availableAddresses);
- })
- .catch(function(error) {
- console.log('Caught error: ', error);
- });
-```
-
-As is the convention with promise-based libraries, if an error occurs, it is thrown. It is the callers responsibility to catch thrown errors and to handle them appropriately.
diff --git a/packages/website/md/docs/0xjs/2.0.0/installation.md b/packages/website/md/docs/0xjs/2.0.0/installation.md
deleted file mode 100644
index 87d763572..000000000
--- a/packages/website/md/docs/0xjs/2.0.0/installation.md
+++ /dev/null
@@ -1,38 +0,0 @@
-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';
-```
-
-#### 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
-<script type="text/javascript" src="0x.js"></script>
-```
-
-### Wiki
-
-Check out our [wiki](https://0x.org/wiki) for articles on how to get 0x.js setup with TestRPC, Infura and more!
diff --git a/packages/website/md/docs/asset_buyer/installation.md b/packages/website/md/docs/asset_buyer/installation.md
deleted file mode 100644
index 3c0c95068..000000000
--- a/packages/website/md/docs/asset_buyer/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-#### Install
-
-```bash
-yarn add @0x/asset-buyer
-```
-
-#### Import
-
-```javascript
-import { AssetBuyer } from '@0x/asset-buyer';
-```
-
-or
-
-```javascript
-var AssetBuyer = require('@0x/asset-buyer').AssetBuyer;
-```
diff --git a/packages/website/md/docs/asset_buyer/introduction.md b/packages/website/md/docs/asset_buyer/introduction.md
deleted file mode 100644
index bac81c760..000000000
--- a/packages/website/md/docs/asset_buyer/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [asset-buyer](https://github.com/0xProject/0x-monorepo/tree/development/packages/asset-buyer) documentation! AssetBuyer is a library that provides an easy way to buy any asset with ETH in one click, leveraging 0x liquidity and the [Forwarder contract](https://0x.org/docs/contracts#Forwarder).
diff --git a/packages/website/md/docs/asset_buyer/usage.md b/packages/website/md/docs/asset_buyer/usage.md
deleted file mode 100644
index 209c15062..000000000
--- a/packages/website/md/docs/asset_buyer/usage.md
+++ /dev/null
@@ -1,39 +0,0 @@
-#### Construction
-
-Connecting to a standard relayer API compliant url:
-
-```typescript
-const provider = web3.currentProvider;
-const apiUrl = 'https://api.relayer.com/v2';
-const assetBuyer = AssetBuyer.getAssetBuyerForStandardRelayerAPIUrl(provider, apiUrl);
-```
-
-Providing your own orders:
-
-```typescript
-const provider = web3.currentProvider;
-const orders = []; // get these from your own API, a relayer, a friend, from anywhere
-const assetBuyer = AssetBuyer.getAssetBuyerForProvidedOrders(provider, orders);
-```
-
-#### Get a quote
-
-A [BuyQuote](#types-BuyQuote) object contains enough information to display buy information to an end user
-
-```typescript
-const erc20TokenAddress = '0x5fa3c....';
-const amountToBuy = new BigNumber(50000000000000000000);
-const buyQuote = await assetBuyer.getBuyQuoteForERC20TokenAddressAsync(erc20TokenAddress, amountToBuy);
-const quoteInfo = buyQuote.worstCaseQuoteInfo;
-console.log(quoteInfo.ethAmount); // the total amount the user needs to pay to buy the desired amount (including ZRX fees)
-console.log(quoteInfo.feeAmount); // a portion of the total ethAmount above that was used to buy affiliate fees
-console.log(quoteInfo.ethPerAssetPrice); // the rate that this quote provides (e.g. 0.0035ETH / REP)
-```
-
-#### Perform a buy
-
-Pass the [BuyQuote](#types-BuyQuote) object from above back to the assetBuyer in order to initiate the buy transaction
-
-```typescript
-const txHash = await assetBuyer.executeBuyQuoteAsync(buyQuote); // the hash of the transaction submitted to the Ethereum network
-```
diff --git a/packages/website/md/docs/connect/1/installation.md b/packages/website/md/docs/connect/1/installation.md
deleted file mode 100644
index d457b0577..000000000
--- a/packages/website/md/docs/connect/1/installation.md
+++ /dev/null
@@ -1,15 +0,0 @@
-**Install**
-
-```bash
-npm install @0xproject/connect --save
-```
-
-**Import**
-
-```javascript
-import { HttpClient } from '@0xproject/connect';
-```
-
-### Wiki
-
-Check out our [0x Connect introduction tutorial](https://0x.org/wiki#Intro-Tutorial) for information on how to integrate relayers into your application.
diff --git a/packages/website/md/docs/connect/1/introduction.md b/packages/website/md/docs/connect/1/introduction.md
deleted file mode 100644
index 4e3039442..000000000
--- a/packages/website/md/docs/connect/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is 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). Functionality includes getting supported token pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific token pairs, getting fee information, and submitting orders.
diff --git a/packages/website/md/docs/connect/2/introduction.md b/packages/website/md/docs/connect/2/introduction.md
deleted file mode 100644
index 8e251b327..000000000
--- a/packages/website/md/docs/connect/2/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [0x Connect](https://github.com/0xProject/0x-monorepo/tree/development/packages/connect) documentation! 0x Connect is 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). Functionality includes getting supported asset pairs from a relayer, getting orders filtered by different attributes, getting individual orders specified by order hash, getting orderbooks for specific asset pairs, getting fee information, and submitting orders.
diff --git a/packages/website/md/docs/connect/3/installation.md b/packages/website/md/docs/connect/3/installation.md
deleted file mode 100644
index 8ed6172bf..000000000
--- a/packages/website/md/docs/connect/3/installation.md
+++ /dev/null
@@ -1,15 +0,0 @@
-**Install**
-
-```bash
-npm install @0x/connect --save
-```
-
-**Import**
-
-```javascript
-import { HttpClient } from '@0x/connect';
-```
-
-### Wiki
-
-Check out our [0x Connect introduction tutorial](https://0x.org/wiki#Intro-Tutorial) for information on how to integrate relayers into your application.
diff --git a/packages/website/md/docs/contract_wrappers/1/installation.md b/packages/website/md/docs/contract_wrappers/1/installation.md
deleted file mode 100644
index d5c7fbdba..000000000
--- a/packages/website/md/docs/contract_wrappers/1/installation.md
+++ /dev/null
@@ -1,11 +0,0 @@
-**Install**
-
-```bash
-npm install @0xproject/contract-wrappers --save
-```
-
-**Import**
-
-```javascript
-import { ContractWrappers } from '@0xproject/contract-wrappers';
-```
diff --git a/packages/website/md/docs/contract_wrappers/1/introduction.md b/packages/website/md/docs/contract_wrappers/1/introduction.md
deleted file mode 100644
index ccc81b373..000000000
--- a/packages/website/md/docs/contract_wrappers/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [Contract-wrappers](https://github.com/0xProject/0x-monorepo/tree/development/packages/contract-wrappers) documentation! Contract-wrappers is a library for interacting with the Ethereum smart contracts that make up the 0x protocol. With it, you can easily send transactions and make calls to the 0x smart contracts as well as any token adhering to the token standards supported by the protocol (currently ERC20 & ERC721).
diff --git a/packages/website/md/docs/contract_wrappers/2/installation.md b/packages/website/md/docs/contract_wrappers/2/installation.md
deleted file mode 100644
index 50610550a..000000000
--- a/packages/website/md/docs/contract_wrappers/2/installation.md
+++ /dev/null
@@ -1,11 +0,0 @@
-**Install**
-
-```bash
-npm install @0x/contract-wrappers --save
-```
-
-**Import**
-
-```javascript
-import { ContractWrappers } from '@0x/contract-wrappers';
-```
diff --git a/packages/website/md/docs/ethereum_types/installation.md b/packages/website/md/docs/ethereum_types/installation.md
deleted file mode 100644
index 5371cfa47..000000000
--- a/packages/website/md/docs/ethereum_types/installation.md
+++ /dev/null
@@ -1,11 +0,0 @@
-**Install**
-
-```bash
-yarn add ethereum-types
-```
-
-**Import**
-
-```typescript
-import { Provider } from 'ethereum-types';
-```
diff --git a/packages/website/md/docs/ethereum_types/introduction.md b/packages/website/md/docs/ethereum_types/introduction.md
deleted file mode 100644
index 43484cdd1..000000000
--- a/packages/website/md/docs/ethereum_types/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [ethereum-types](https://github.com/0xProject/0x-monorepo/packages/ethereum-types) documentation! This package provides ethereum specific (but not library-specific) types that are meant to be shared between other ethereum packages.
diff --git a/packages/website/md/docs/json_schemas/1/installation.md b/packages/website/md/docs/json_schemas/1/installation.md
deleted file mode 100644
index 50a37bae1..000000000
--- a/packages/website/md/docs/json_schemas/1/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0xproject/json-schemas
-```
-
-**Import**
-
-```javascript
-import { schemas } from '@0xproject/json-schemas';
-```
-
-or
-
-```javascript
-var schemas = require('@0xproject/json-schemas').schemas;
-```
diff --git a/packages/website/md/docs/json_schemas/1/introduction.md b/packages/website/md/docs/json_schemas/1/introduction.md
deleted file mode 100644
index 5b2e90387..000000000
--- a/packages/website/md/docs/json_schemas/1/introduction.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Welcome to the [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project.
-
-If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...). All the schema files are currently TypeScript that require evaluation in order to be recognized as valid JSON.
diff --git a/packages/website/md/docs/json_schemas/1/schemas.md b/packages/website/md/docs/json_schemas/1/schemas.md
deleted file mode 100644
index 11f9df329..000000000
--- a/packages/website/md/docs/json_schemas/1/schemas.md
+++ /dev/null
@@ -1,28 +0,0 @@
-0x Protocol Schemas
-
-- [Basic types](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/basic_type_schemas.ts) (e.g Ethereum address, number)
-- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/ec_signature_schema.ts)
-- [Order/SignedOrder](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_schemas.ts)
-- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_hash_schema.ts)
-
-0x.js Schemas
-
-- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/block_range_schema.ts)
-- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/index_filter_values_schema.ts)
-- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_requests_schema.ts)
-- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_cancel_schema.ts)
-- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.ts)
-- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/signed_orders_schema.ts)
-- [Token](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/token_schema.ts)
-- [TxData](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/tx_data_schema.ts)
-
-Standard Relayer API Schemas
-
-- [Error response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_error_response_schema.ts)
-- [Fees payload](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_payload_schema.ts)
-- [Fees response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_fees_response_schema.ts)
-- [Orderbook channel subscribe](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orberbook_channel_subscribe_schema.ts)
-- [Orderbook channel snapshot](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_snapshot_schema.ts)
-- [Orderbook channel update](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_channel_update_response_schema.ts)
-- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.ts)
-- [Token pairs response](https://github.com/0xProject/0x-monorepo/blob/d4c1b3b0bd26e730ce6687469cdf7283877543e1/packages/json-schemas/schemas/relayer_api_token_pairs_response_schema.ts)
diff --git a/packages/website/md/docs/json_schemas/1/usage.md b/packages/website/md/docs/json_schemas/1/usage.md
deleted file mode 100644
index 68b801153..000000000
--- a/packages/website/md/docs/json_schemas/1/usage.md
+++ /dev/null
@@ -1,14 +0,0 @@
-The following example shows you how to validate a 0x order using the `@0xproject/json-schemas` package.
-
-```javascript
-import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas';
-
-const {orderSchema} = schemas;
-const validator = new SchemaValidator();
-
-const order = {
- ...
-};
-const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors
-const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean
-```
diff --git a/packages/website/md/docs/json_schemas/2/schemas.md b/packages/website/md/docs/json_schemas/2/schemas.md
deleted file mode 100644
index 78e6df372..000000000
--- a/packages/website/md/docs/json_schemas/2/schemas.md
+++ /dev/null
@@ -1,40 +0,0 @@
-Basic Schemas
-
-- [Address type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/address_schema.json)
-- [Number type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/number_schema.json)
-- [Hex type](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/hex_schema.json)
-- [JS number](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/js_number.json)
-
-0x Protocol Schemas
-
-- [Order](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_schema.json)
-- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_order_schema.json)
-- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_hash_schema.json)
-- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/ec_signature_schema.json)
-
-0x.js Schemas
-
-- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_param_schema.json)
-- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/block_range_schema.json)
-- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/index_filter_values_schema.json)
-- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_requests_schema.json)
-- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_cancel_schema.json)
-- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json)
-- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/signed_orders_schema.json)
-- [Token](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/token_schema.json)
-- [TxData](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/tx_data_schema.json)
-
-Standard Relayer API Schemas
-
-- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/paginated_collection_schema.json)
-- [Error response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_error_response_schema.json)
-- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json)
-- [Order config response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json)
-- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json)
-- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json)
-- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json)
-- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json)
-- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json)
-- [Trade info](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json)
-- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json)
-- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/5ec4b27200297708298deca97603849a37b2f66a/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json)
diff --git a/packages/website/md/docs/json_schemas/3/installation.md b/packages/website/md/docs/json_schemas/3/installation.md
deleted file mode 100644
index a99886113..000000000
--- a/packages/website/md/docs/json_schemas/3/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0x/json-schemas
-```
-
-**Import**
-
-```javascript
-import { schemas } from '@0x/json-schemas';
-```
-
-or
-
-```javascript
-var schemas = require('@0x/json-schemas').schemas;
-```
diff --git a/packages/website/md/docs/json_schemas/3/introduction.md b/packages/website/md/docs/json_schemas/3/introduction.md
deleted file mode 100644
index 0039d014a..000000000
--- a/packages/website/md/docs/json_schemas/3/introduction.md
+++ /dev/null
@@ -1,3 +0,0 @@
-Welcome to the [json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas) documentation! This package provides JSON schemas for validating 0x Protocol & Standard Relayer API data structures. It provides both the raw JSON schemas and a schema validator class to interact with them from a JS project.
-
-If you are not using a Javascript-based language for your project, you can use a Javascript environment to render the JSON schemas within this package and use them together with a [JSON Schema](http://json-schema.org/) implementation in your [language of choice](http://json-schema.org/implementations.html) (e.g Python, Haskell, Go, C, C++, Rust, Ruby, Scala, etc...).
diff --git a/packages/website/md/docs/json_schemas/3/schemas.md b/packages/website/md/docs/json_schemas/3/schemas.md
deleted file mode 100644
index 90fcfdffe..000000000
--- a/packages/website/md/docs/json_schemas/3/schemas.md
+++ /dev/null
@@ -1,41 +0,0 @@
-Basic Schemas
-
-- [Address type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/address_schema.json)
-- [Number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/number_schema.json)
-- [Whole number type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/whole_number_schema.json)
-- [Hex type](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/hex_schema.json)
-- [JS number](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/js_number.json)
-
-0x Protocol Schemas
-
-- [Order](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_schema.json)
-- [SignedOrder](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_order_schema.json)
-- [OrderHash](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_hash_schema.json)
-- [ECSignature](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/ec_signature_schema.json)
-
-0x.js Schemas
-
-- [BlockParam](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_param_schema.json)
-- [BlockRange](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/block_range_schema.json)
-- [IndexFilter Values](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/index_filter_values_schema.json)
-- [OrderFillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_requests_schema.json)
-- [OrderCancellationRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_cancel_schema.json)
-- [OrderFillOrKillRequests](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/order_fill_or_kill_requests_schema.json)
-- [SignedOrders](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/signed_orders_schema.json)
-- [Token](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/token_schema.json)
-- [TxData](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/tx_data_schema.json)
-
-Standard Relayer API Schemas
-
-- [Paginated collection](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/paginated_collection_schema.json)
-- [Error response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_error_response_schema.json)
-- [Order config payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_payload_schema.json)
-- [Order config response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_order_config_response_schema.json)
-- [Orders channel subscribe payload](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json)
-- [Orders channel subscribe](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_subscribe_schema.json)
-- [Orders channel update](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orders_channel_update_response_schema.json)
-- [Orderbook response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_orderbook_response_schema.json)
-- [Asset pairs](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_schema.json)
-- [Trade info](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_trade_info_schema.json)
-- [Asset pairs response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_asset_data_pairs_response_schema.json)
-- [Fee recipients response](https://github.com/0xProject/0x-monorepo/blob/528ae4376e5e605dac9666f2a5917803e942a1f9/packages/json-schemas/schemas/relayer_api_fee_recipients_response_schema.json)
diff --git a/packages/website/md/docs/json_schemas/3/usage.md b/packages/website/md/docs/json_schemas/3/usage.md
deleted file mode 100644
index 2b72eeaad..000000000
--- a/packages/website/md/docs/json_schemas/3/usage.md
+++ /dev/null
@@ -1,14 +0,0 @@
-The following example shows you how to validate a 0x order using the `@0x/json-schemas` package.
-
-```javascript
-import {SchemaValidator, ValidatorResult, schemas} from '@0x/json-schemas';
-
-const {orderSchema} = schemas;
-const validator = new SchemaValidator();
-
-const order = {
- ...
-};
-const validatorResult: ValidatorResult = validator.validate(order, orderSchema); // Contains all errors
-const isValid: boolean = validator.isValid(order, orderSchema); // Only returns boolean
-```
diff --git a/packages/website/md/docs/migrations/1/installation.md b/packages/website/md/docs/migrations/1/installation.md
deleted file mode 100644
index 78403037b..000000000
--- a/packages/website/md/docs/migrations/1/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0x/migrations
-```
-
-**Import**
-
-```javascript
-import { runMigrationsAsync } from '@0x/migrations';
-```
-
-or
-
-```javascript
-var runMigrationsAsync = require('@0x/migrations').runMigrationsAsync;
-```
diff --git a/packages/website/md/docs/migrations/1/introduction.md b/packages/website/md/docs/migrations/1/introduction.md
deleted file mode 100644
index 70b13c5f8..000000000
--- a/packages/website/md/docs/migrations/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [@0x/migrations](https://github.com/0xProject/0x-monorepo/tree/development/packages/migrations) documentation! This package is intended for developers who would like to deploy the 0x protocol system of smart contracts to a custom testnet. If you want to test against existing testnets, check out our pre-deployed [Ganache snapshot](https://0x.org/wiki#Ganache-Setup-Guide) or where 0x is already deployed on [popular testnets](https://0x.org/wiki#Deployed-Addresses).
diff --git a/packages/website/md/docs/order_utils/1/installation.md b/packages/website/md/docs/order_utils/1/installation.md
deleted file mode 100644
index 68a7cf960..000000000
--- a/packages/website/md/docs/order_utils/1/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0xproject/order-utils
-```
-
-**Import**
-
-```javascript
-import { createSignedOrderAsync } from '@0xproject/order-utils';
-```
-
-or
-
-```javascript
-var createSignedOrderAsync = require('@0xproject/order-utils').createSignedOrderAsync;
-```
diff --git a/packages/website/md/docs/order_utils/1/introduction.md b/packages/website/md/docs/order_utils/1/introduction.md
deleted file mode 100644
index d5f3f2925..000000000
--- a/packages/website/md/docs/order_utils/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [@0xproject/order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders.
diff --git a/packages/website/md/docs/order_utils/2/installation.md b/packages/website/md/docs/order_utils/2/installation.md
deleted file mode 100644
index d4bac6a53..000000000
--- a/packages/website/md/docs/order_utils/2/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0x/order-utils
-```
-
-**Import**
-
-```javascript
-import { createSignedOrderAsync } from '@0x/order-utils';
-```
-
-or
-
-```javascript
-var createSignedOrderAsync = require('@0x/order-utils').createSignedOrderAsync;
-```
diff --git a/packages/website/md/docs/order_utils/2/introduction.md b/packages/website/md/docs/order_utils/2/introduction.md
deleted file mode 100644
index 567896603..000000000
--- a/packages/website/md/docs/order_utils/2/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [order-utils](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-utils) documentation! Order utils is a set of utils around creating, signing, validating 0x orders.
diff --git a/packages/website/md/docs/order_watcher/1/installation.md b/packages/website/md/docs/order_watcher/1/installation.md
deleted file mode 100644
index 4b28f583d..000000000
--- a/packages/website/md/docs/order_watcher/1/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0xproject/order-watcher
-```
-
-**Import**
-
-```javascript
-import { OrderWatcher } from '@0xproject/order-watcher';
-```
-
-or
-
-```javascript
-var OrderWatcher = require('@0xproject/order-utils').OrderWatcher;
-```
diff --git a/packages/website/md/docs/order_watcher/1/introduction.md b/packages/website/md/docs/order_watcher/1/introduction.md
deleted file mode 100644
index f922d922f..000000000
--- a/packages/website/md/docs/order_watcher/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [@0xproject/order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date.
diff --git a/packages/website/md/docs/order_watcher/2/installation.md b/packages/website/md/docs/order_watcher/2/installation.md
deleted file mode 100644
index 883eb40e5..000000000
--- a/packages/website/md/docs/order_watcher/2/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add @0x/order-watcher
-```
-
-**Import**
-
-```javascript
-import { OrderWatcher } from '@0x/order-watcher';
-```
-
-or
-
-```javascript
-var OrderWatcher = require('@0x/order-utils').OrderWatcher;
-```
diff --git a/packages/website/md/docs/order_watcher/2/introduction.md b/packages/website/md/docs/order_watcher/2/introduction.md
deleted file mode 100644
index b2d574053..000000000
--- a/packages/website/md/docs/order_watcher/2/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [order-watcher](https://github.com/0xProject/0x-monorepo/tree/development/packages/order-watcher) documentation! OrderWatcher is a daemon that efficiently watches a set of orders, emitting events whenever the validity of an order changes. It can be used by relayers to prune an orderbook, or by traders to keep orders fetched from a Relayer up-to-date.
diff --git a/packages/website/md/docs/smart_contracts/1/introduction.md b/packages/website/md/docs/smart_contracts/1/introduction.md
deleted file mode 100644
index 81715a3d1..000000000
--- a/packages/website/md/docs/smart_contracts/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/contracts/core) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts.
diff --git a/packages/website/md/docs/smart_contracts/2/introduction.md b/packages/website/md/docs/smart_contracts/2/introduction.md
deleted file mode 100644
index b2c3d8f8d..000000000
--- a/packages/website/md/docs/smart_contracts/2/introduction.md
+++ /dev/null
@@ -1,6 +0,0 @@
-Welcome to the [0x smart contracts](https://github.com/0xProject/0x-monorepo/tree/development/contracts/core) documentation! This documentation is intended for dApp developers who want to integrate 0x exchange functionality directly into their own smart contracts.
-
-### Helpful wiki articles:
-
-- [Deployed smart contract addresses](https://0x.org/wiki#Deployed-Addresses)
-- [0x Protocol Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md)
diff --git a/packages/website/md/docs/sol-compiler/1/installation.md b/packages/website/md/docs/sol-compiler/1/installation.md
deleted file mode 100644
index 9c8561d9b..000000000
--- a/packages/website/md/docs/sol-compiler/1/installation.md
+++ /dev/null
@@ -1,23 +0,0 @@
-#### CLI Installation
-
-```bash
-yarn global add @0xproject/sol-compiler
-```
-
-#### API Installation
-
-```bash
-yarn add @0xproject/sol-compiler
-```
-
-**Import**
-
-```typescript
-import { Compiler } from '@0xproject/sol-compiler';
-```
-
-or
-
-```javascript
-var Compiler = require('@0xproject/sol-compiler').Compiler;
-```
diff --git a/packages/website/md/docs/sol-compiler/1/introduction.md b/packages/website/md/docs/sol-compiler/1/introduction.md
deleted file mode 100644
index 3b7332111..000000000
--- a/packages/website/md/docs/sol-compiler/1/introduction.md
+++ /dev/null
@@ -1,8 +0,0 @@
-Welcome to the [sol-compiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-compiler) documentation! Sol-compiler is a wrapper around [solc-js](https://www.npmjs.com/package/solc) that adds:
-
-- Smart re-compilation: Only recompiles when smart contracts have changed
-- Ability to compile an entire project instead of only individual `.sol` files
-- Compilation using the Solidity version specified at the top of each individual `.sol` file
-- Proper parsing of Solidity version ranges
-- Support for the standard [input description](https://solidity.readthedocs.io/en/develop/using-the-compiler.html#input-description) for what information you'd like added to the resulting `artifacts` file (i.e 100% configurable artifacts content).
-- Storage of constructor args, source maps and paths to all dependency source files.
diff --git a/packages/website/md/docs/sol-compiler/1/usage.md b/packages/website/md/docs/sol-compiler/1/usage.md
deleted file mode 100644
index 79c9b32ba..000000000
--- a/packages/website/md/docs/sol-compiler/1/usage.md
+++ /dev/null
@@ -1,24 +0,0 @@
-#### CLI Usage
-
-```bash
-$ sol-compiler
-Options:
- --version Show version number [boolean]
- --contracts-dir path of contracts directory to compile [string]
- --artifacts-dir path to write contracts artifacts to [string]
- --contracts comma separated list of contracts to compile
- [string] [default: "*"]
- --help Show help [boolean]
-```
-
-#### API Usage
-
-```typescript
-import { Compiler } from '@0xproject/sol-compiler';
-
-const compiler = new Compiler();
-
-(async () => {
- await compiler.compileAllAsync();
-})().catch(console.log);
-```
diff --git a/packages/website/md/docs/sol-compiler/2/installation.md b/packages/website/md/docs/sol-compiler/2/installation.md
deleted file mode 100644
index 7e7b690fe..000000000
--- a/packages/website/md/docs/sol-compiler/2/installation.md
+++ /dev/null
@@ -1,23 +0,0 @@
-#### CLI Installation
-
-```bash
-yarn global add @0x/sol-compiler
-```
-
-#### API Installation
-
-```bash
-yarn add @0x/sol-compiler
-```
-
-**Import**
-
-```typescript
-import { Compiler } from '@0x/sol-compiler';
-```
-
-or
-
-```javascript
-var Compiler = require('@0x/sol-compiler').Compiler;
-```
diff --git a/packages/website/md/docs/sol-compiler/2/usage.md b/packages/website/md/docs/sol-compiler/2/usage.md
deleted file mode 100644
index 68e5a988f..000000000
--- a/packages/website/md/docs/sol-compiler/2/usage.md
+++ /dev/null
@@ -1,24 +0,0 @@
-#### CLI Usage
-
-```bash
-$ sol-compiler
-Options:
- --version Show version number [boolean]
- --contracts-dir path of contracts directory to compile [string]
- --artifacts-dir path to write contracts artifacts to [string]
- --contracts comma separated list of contracts to compile
- [string] [default: "*"]
- --help Show help [boolean]
-```
-
-#### API Usage
-
-```typescript
-import { Compiler } from '@0x/sol-compiler';
-
-const compiler = new Compiler();
-
-(async () => {
- await compiler.compileAllAsync();
-})().catch(console.log);
-```
diff --git a/packages/website/md/docs/sol_coverage/installation.md b/packages/website/md/docs/sol_coverage/installation.md
deleted file mode 100644
index 7c9840ab8..000000000
--- a/packages/website/md/docs/sol_coverage/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add -D @0x/sol-coverage
-```
-
-**Import**
-
-```javascript
-import { CoverageSubprovider } from '@0x/sol-coverage';
-```
-
-or
-
-```javascript
-var CoverageSubprovider = require('@0x/sol-coverage').CoverageSubprovider;
-```
diff --git a/packages/website/md/docs/sol_coverage/introduction.md b/packages/website/md/docs/sol_coverage/introduction.md
deleted file mode 100644
index f21f8ecbe..000000000
--- a/packages/website/md/docs/sol_coverage/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [sol-coverage](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-coverage) documentation! Sol-coverage is a Solidity coverage tool.
diff --git a/packages/website/md/docs/sol_coverage/usage.md b/packages/website/md/docs/sol_coverage/usage.md
deleted file mode 100644
index d194f8abd..000000000
--- a/packages/website/md/docs/sol_coverage/usage.md
+++ /dev/null
@@ -1,74 +0,0 @@
-Sol-coverage uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `CoverageSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
-
-The CoverageSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
-
-Coverage subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data.
-
-In order to use `CoverageSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it.
-
-### Sol-compiler
-
-If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you.
-
-```typescript
-import { SolCompilerArtifactsAdapter } from '@0x/sol-coverage';
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
-```
-
-### Truffle
-
-If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you.
-
-```typescript
-import { TruffleArtifactAdapter } from '@0x/sol-coverage';
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
-```
-
-Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
-
-### Other framework/toolset
-
-You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-
-```typescript
-import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);
-```
-
-### Usage
-
-```typescript
-import { CoverageSubprovider } from '@0x/sol-coverage';
-import ProviderEngine = require('web3-provider-engine');
-
-const provider = new ProviderEngine();
-// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
-const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
-const isVerbose = true;
-const coverageSubprovider = new CoverageSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
-
-provider.addProvider(coverageSubprovider);
-// Add all your other providers
-provider.start();
-```
-
-After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call:
-
-```typescript
-await coverageSubprovider.writeCoverageAsync();
-```
-
-This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/coverage.json.md) - so you can use it with any of the existing Istanbul reporters.
-
-```bash
-yarn add -D istanbul
-istanbul report html
-open coverage/index.html
-```
-
-Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/md/docs/sol_profiler/installation.md b/packages/website/md/docs/sol_profiler/installation.md
deleted file mode 100644
index e29ac5ae7..000000000
--- a/packages/website/md/docs/sol_profiler/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add -D @0x/sol-profiler
-```
-
-**Import**
-
-```javascript
-import { ProfilerSubprovider } from '@0x/sol-profiler';
-```
-
-or
-
-```javascript
-var ProfilerSubprovider = require('@0x/sol-profiler').ProfilerSubprovider;
-```
diff --git a/packages/website/md/docs/sol_profiler/introduction.md b/packages/website/md/docs/sol_profiler/introduction.md
deleted file mode 100644
index bd53fb0fe..000000000
--- a/packages/website/md/docs/sol_profiler/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [sol-profiler](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-profiler) documentation! Sol-profiler is a Solidity profiler tool.
diff --git a/packages/website/md/docs/sol_profiler/usage.md b/packages/website/md/docs/sol_profiler/usage.md
deleted file mode 100644
index 0fbc31bc1..000000000
--- a/packages/website/md/docs/sol_profiler/usage.md
+++ /dev/null
@@ -1,74 +0,0 @@
-Sol-profiler uses transaction traces in order to figure out which lines of Solidity source code have been covered by your tests. In order for it to gather these traces, you must add the `ProfilerSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
-
-The ProfilerSubprovider eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
-
-Profiler subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data.
-
-In order to use `ProfilerSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it.
-
-### Sol-compiler
-
-If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you.
-
-```typescript
-import { SolCompilerArtifactsAdapter } from '@0x/sol-profiler';
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
-```
-
-### Truffle
-
-If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you.
-
-```typescript
-import { TruffleArtifactAdapter } from '@0x/sol-profiler';
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
-```
-
-Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
-
-### Other framework/toolset
-
-You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-
-```typescript
-import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);
-```
-
-### Usage
-
-```typescript
-import { ProfilerSubprovider } from '@0x/sol-profiler';
-import ProviderEngine = require('web3-provider-engine');
-
-const provider = new ProviderEngine();
-// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
-const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
-const isVerbose = true;
-const profilerSubprovider = new ProfilerSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
-
-provider.addProvider(profilerSubprovider);
-// Add all your other providers
-provider.start();
-```
-
-After your test suite is complete (e.g in the Mocha global `after` hook), you'll need to call:
-
-```typescript
-await profilerSubprovider.writeProfilerOutputAsync();
-```
-
-This will create a `coverage.json` file in a `coverage` directory. This file has an [Istanbul format](https://github.com/gotwarlost/istanbul/blob/master/profiler.json.md) - so you can use it with any of the existing Istanbul reporters.
-
-```bash
-yarn add -D istanbul
-istanbul report html
-open coverage/index.html
-```
-
-Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/md/docs/sol_trace/installation.md b/packages/website/md/docs/sol_trace/installation.md
deleted file mode 100644
index eb7bf08b8..000000000
--- a/packages/website/md/docs/sol_trace/installation.md
+++ /dev/null
@@ -1,17 +0,0 @@
-**Install**
-
-```bash
-yarn add -D @0x/sol-trace
-```
-
-**Import**
-
-```javascript
-import { RevertTraceSubprovider } from '@0x/sol-trace';
-```
-
-or
-
-```javascript
-var RevertTraceSubprovider = require('@0x/sol-trace').RevertTraceSubprovider;
-```
diff --git a/packages/website/md/docs/sol_trace/introduction.md b/packages/website/md/docs/sol_trace/introduction.md
deleted file mode 100644
index 73f5c2bcd..000000000
--- a/packages/website/md/docs/sol_trace/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [sol-trace](https://github.com/0xProject/0x-monorepo/tree/development/packages/sol-trace) documentation! Sol-trace gives you a human-readable error stack trace when a revert happens in your Solidity code.
diff --git a/packages/website/md/docs/sol_trace/usage.md b/packages/website/md/docs/sol_trace/usage.md
deleted file mode 100644
index d117a0faf..000000000
--- a/packages/website/md/docs/sol_trace/usage.md
+++ /dev/null
@@ -1,62 +0,0 @@
-Sol-trace uses transaction traces to reconstruct the stack trace when reverts happen in Solidity. In order for it to gather these traces, you must add the `RevertTraceSubprovider` to the [ProviderEngine](https://github.com/MetaMask/provider-engine) instance you use when running your Solidity tests. If you're unfamiliar with `ProviderEngine`, please read the [Web3 Provider explained](https://0x.org/wiki#Web3-Provider-Explained) wiki article.
-
-The `RevertTraceSubprovider` eavesdrops on the `eth_sendTransaction` and `eth_call` RPC calls and collects traces after each call using `debug_traceTransaction`. `eth_call`'s' don't generate traces - so we take a snapshot, re-submit it as a transaction, get the trace and then revert the snapshot.
-
-Trace subprovider needs some info about your contracts (`srcMap`, `bytecode`). It gets that info from your project's artifacts. Some frameworks have their own artifact format. Some artifact formats don't actually contain all the neccessary data.
-
-In order to use `RevertTraceSubprovider` with your favorite framework you need to pass an `artifactsAdapter` to it.
-
-### Sol-compiler
-
-If you are generating your artifacts with [@0x/sol-compiler](https://0x.org/docs/sol-compiler) you can use the `SolCompilerArtifactsAdapter` we've implemented for you.
-
-```typescript
-import { SolCompilerArtifactsAdapter } from '@0x/sol-trace';
-// Both artifactsDir and contractsDir are optional and will be fetched from compiler.json if not passed in
-const artifactAdapter = new SolCompilerArtifactAdapter(artifactsDir, contractsDir);
-```
-
-### Truffle
-
-If your project is using [Truffle](https://truffleframework.com/), we've written a `TruffleArtifactsAdapter`for you.
-
-```typescript
-import { TruffleArtifactAdapter } from '@0x/sol-trace';
-const projectRoot = '.';
-const solcVersion = '0.5.0';
-const artifactAdapter = new TruffleArtifactAdapter(projectRoot, solcVersion);
-```
-
-Because truffle artifacts don't have all the data we need - we actually will recompile your contracts under the hood. That's why you don't need to pass an `artifactsPath`.
-
-### Other framework/toolset
-
-You'll need to write your own artifacts adapter. It should extend `AbstractArtifactsAdapter`.
-
-```typescript
-import { AbstractArtifactAdapter } from '@0x/sol-trace';
-
-class YourCustomArtifactsAdapter extends AbstractArtifactAdapter {...};
-const artifactAdapter = new YourCustomArtifactsAdapter(...);
-```
-
-### Usage
-
-```typescript
-import { RevertTraceSubprovider } from '@0x/sol-trace';
-import ProviderEngine = require('web3-provider-engine');
-
-const provider = new ProviderEngine();
-// Some calls might not have `from` address specified. Nevertheless - transactions need to be submitted from an address with at least some funds. defaultFromAddress is the address that will be used to submit those calls as transactions from.
-const defaultFromAddress = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
-const isVerbose = true;
-const revertTraceSubprovider = new RevertTraceSubprovider(artifactsAdapter, defaultFromAddress, isVerbose);
-
-provider.addProvider(revertTraceSubprovider);
-// Add all your other providers
-provider.start();
-```
-
-Now when you run your tests, it should print out stack traces when encountering an error.
-
-Use [Geth](https://github.com/ethereum/go-ethereum) as a backing node. We recommend using our [Devnet Docker container](https://hub.docker.com/r/0xorg/devnet) which sets up a Geth node for testing purposes. Ganache support is a [work in progress](https://github.com/0xProject/0x-monorepo/issues/1520).
diff --git a/packages/website/md/docs/subproviders/1/installation.md b/packages/website/md/docs/subproviders/1/installation.md
deleted file mode 100644
index a049ff0ec..000000000
--- a/packages/website/md/docs/subproviders/1/installation.md
+++ /dev/null
@@ -1,15 +0,0 @@
-```bash
-npm install @0xproject/subproviders --save
-```
-
-**Import**
-
-```typescript
-import { LedgerSubprovider } from '@0xproject/subproviders';
-```
-
-or
-
-```javascript
-var LedgerSubprovider = require('@0xproject/subproviders').LedgerSubprovider;
-```
diff --git a/packages/website/md/docs/subproviders/1/introduction.md b/packages/website/md/docs/subproviders/1/introduction.md
deleted file mode 100644
index fe7fb6a8d..000000000
--- a/packages/website/md/docs/subproviders/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [Subproviders](https://github.com/0xProject/0x-monorepo/tree/development/packages/subproviders) documentation! Subproviders is a package containing useful [subproviders](https://0x.org/wiki#Web3-Provider-Explained) that can be used with the [Web3 Provider Engine](https://github.com/MetaMask/provider-engine) library.
diff --git a/packages/website/md/docs/subproviders/1/ledger_node_hid.md b/packages/website/md/docs/subproviders/1/ledger_node_hid.md
deleted file mode 100644
index 3089817af..000000000
--- a/packages/website/md/docs/subproviders/1/ledger_node_hid.md
+++ /dev/null
@@ -1,17 +0,0 @@
-By default, node-hid transport support is an optional dependency. This is due to the requirement of native usb developer packages on the host system. If these aren't installed the entire `npm install` fails. We also no longer export node-hid transport client factories. To re-create this see our integration tests or follow the example below:
-
-```typescript
-import Eth from '@ledgerhq/hw-app-eth';
-import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
-async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumClient> {
- const ledgerConnection = await TransportNodeHid.create();
- const ledgerEthClient = new Eth(ledgerConnection);
- return ledgerEthClient;
-}
-
-// Create a LedgerSubprovider with the node-hid transport
-ledgerSubprovider = new LedgerSubprovider({
- networkId,
- ledgerEthereumClientFactoryAsync: ledgerEthereumNodeJsClientFactoryAsync,
-});
-```
diff --git a/packages/website/md/docs/subproviders/2/installation.md b/packages/website/md/docs/subproviders/2/installation.md
deleted file mode 100644
index 025dd0dee..000000000
--- a/packages/website/md/docs/subproviders/2/installation.md
+++ /dev/null
@@ -1,15 +0,0 @@
-```bash
-npm install @0x/subproviders --save
-```
-
-**Import**
-
-```typescript
-import { LedgerSubprovider } from '@0x/subproviders';
-```
-
-or
-
-```javascript
-var LedgerSubprovider = require('@0x/subproviders').LedgerSubprovider;
-```
diff --git a/packages/website/md/docs/web3_wrapper/1/installation.md b/packages/website/md/docs/web3_wrapper/1/installation.md
deleted file mode 100644
index 92794d9b0..000000000
--- a/packages/website/md/docs/web3_wrapper/1/installation.md
+++ /dev/null
@@ -1,25 +0,0 @@
-**Install**
-
-```bash
-npm install @0xproject/web3-wrapper --save
-```
-
-**Import**
-
-```javascript
-import { Web3Wrapper } from '@0xproject/web3-wrapper';
-```
-
-or
-
-```javascript
-var Web3Wrapper = require('@0xproject/web3-wrapper').Web3Wrapper;
-```
-
-If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
-
-```
-"include": [
- "./node_modules/web3-typescript-typings/index.d.ts",
-]
-```
diff --git a/packages/website/md/docs/web3_wrapper/1/introduction.md b/packages/website/md/docs/web3_wrapper/1/introduction.md
deleted file mode 100644
index 17bd316f1..000000000
--- a/packages/website/md/docs/web3_wrapper/1/introduction.md
+++ /dev/null
@@ -1 +0,0 @@
-Welcome to the [Web3Wrapper](https://github.com/0xProject/0x-monorepo/tree/development/packages/web3-wrapper) documentation! Web3-wrapper is a JSON-RPC client for Ethereum nodes. It is a type-safe alternative to [Web3.js](https://github.com/ethereum/web3.js/) written in TypeScript.
diff --git a/packages/website/md/docs/web3_wrapper/2/installation.md b/packages/website/md/docs/web3_wrapper/2/installation.md
deleted file mode 100644
index 14c4f066c..000000000
--- a/packages/website/md/docs/web3_wrapper/2/installation.md
+++ /dev/null
@@ -1,25 +0,0 @@
-**Install**
-
-```bash
-npm install @0x/web3-wrapper --save
-```
-
-**Import**
-
-```javascript
-import { Web3Wrapper } from '@0x/web3-wrapper';
-```
-
-or
-
-```javascript
-var Web3Wrapper = require('@0x/web3-wrapper').Web3Wrapper;
-```
-
-If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:
-
-```
-"include": [
- "./node_modules/web3-typescript-typings/index.d.ts",
-]
-```
diff --git a/packages/website/package.json b/packages/website/package.json
deleted file mode 100644
index ce7ed395f..000000000
--- a/packages/website/package.json
+++ /dev/null
@@ -1,128 +0,0 @@
-{
- "name": "@0x/website",
- "version": "0.0.67",
- "engines": {
- "node": ">=6.12"
- },
- "private": true,
- "description": "Website and 0x portal dapp",
- "scripts": {
- "build": "yarn build:dev",
- "build:prod": "node --max_old_space_size=8192 ../../node_modules/.bin/webpack --mode production",
- "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 --https",
- "deploy_dogfood": "npm run build:prod; aws s3 sync ./public/. s3://dogfood.0x.org --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
- "deploy_staging": "npm run build:prod; aws s3 sync ./public/. s3://staging-0xproject --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers",
- "deploy_live": "DEPLOY_ROLLBAR_SOURCEMAPS=true npm run build:prod; aws s3 sync ./public/. s3://0x.org --profile 0xproject --region us-east-1 --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --exclude *.map.js"
- },
- "author": "Fabio Berger",
- "license": "Apache-2.0",
- "dependencies": {
- "@0x/asset-buyer": "^4.0.2",
- "@0x/contract-addresses": "^2.2.0",
- "@0x/contract-wrappers": "^5.0.1",
- "@0x/json-schemas": "^2.1.7",
- "@0x/order-utils": "^3.1.2",
- "@0x/react-docs": "^1.0.25",
- "@0x/react-shared": "^1.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",
- "@reach/dialog": "^0.1.2",
- "@types/react-lazyload": "^2.3.1",
- "@types/react-loadable": "^5.4.2",
- "@types/react-syntax-highlighter": "^0.0.8",
- "@types/styled-components": "4.1.1",
- "accounting": "^0.4.1",
- "basscss": "^8.0.3",
- "blockies": "^0.0.2",
- "bowser": "^1.9.3",
- "deep-equal": "^1.0.1",
- "ethereum-types": "^1.1.6",
- "ethereumjs-util": "^5.1.1",
- "find-versions": "^2.0.0",
- "jsonschema": "^1.2.0",
- "less": "^2.7.2",
- "lodash": "^4.17.5",
- "material-ui": "^0.20.0",
- "moment": "2.21.0",
- "numeral": "^2.0.6",
- "polished": "^1.9.2",
- "query-string": "^6.0.0",
- "rc-slider": "^8.6.3",
- "react": "^16.5.2",
- "react-copy-to-clipboard": "^5.0.0",
- "react-document-title": "^2.0.3",
- "react-dom": "^16.5.2",
- "react-flickity-component": "^3.1.0",
- "react-headroom": "2.2.2",
- "react-helmet": "^5.2.0",
- "react-lazyload": "^2.3.0",
- "react-loadable": "^5.5.0",
- "react-markdown": "^4.0.6",
- "react-popper": "^1.0.0-beta.6",
- "react-redux": "^5.0.3",
- "react-responsive": "^6.0.1",
- "react-router-dom": "^4.3.1",
- "react-scroll": "0xproject/react-scroll#pr-330-and-replace-state",
- "react-scrollable-anchor": "^0.6.1",
- "react-syntax-highlighter": "^10.1.1",
- "react-tooltip": "^3.2.7",
- "react-typist": "^2.0.4",
- "redux": "^3.6.0",
- "redux-devtools-extension": "^2.13.2",
- "rollbar": "^2.4.7",
- "semver-sort": "0.0.4",
- "styled-components": "^4.1.1",
- "thenby": "^1.2.3",
- "truffle-contract": "2.0.1",
- "web3-provider-engine": "14.0.6",
- "xml-js": "^1.6.4"
- },
- "devDependencies": {
- "@types/accounting": "^0.4.1",
- "@types/blockies": "^0.0.0",
- "@types/deep-equal": "^1.0.0",
- "@types/find-versions": "^2.0.0",
- "@types/jsonschema": "^1.1.1",
- "@types/lodash": "4.14.104",
- "@types/material-ui": "^0.20.0",
- "@types/node": "*",
- "@types/numeral": "^0.0.22",
- "@types/query-string": "^5.1.0",
- "@types/rc-slider": "^8.6.0",
- "@types/react": "^16.7.7",
- "@types/react-copy-to-clipboard": "^4.2.0",
- "@types/react-dom": "^16.0.7",
- "@types/react-helmet": "^5.0.6",
- "@types/react-redux": "^4.4.37",
- "@types/react-scroll": "1.5.3",
- "@types/react-syntax-highlighter": "^0.0.8",
- "@types/react-tap-event-plugin": "0.0.30",
- "@types/redux": "^3.6.0",
- "@types/web3-provider-engine": "^14.0.0",
- "awesome-typescript-loader": "^5.2.1",
- "css-loader": "0.23.x",
- "less-loader": "^4.1.0",
- "make-promises-safe": "^1.1.0",
- "raw-loader": "^0.5.1",
- "react-svg-loader": "^2.1.0",
- "rollbar-sourcemap-webpack-plugin": "^2.4.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/website/public/css/basscss.min.css b/packages/website/public/css/basscss.min.css
deleted file mode 100644
index cb6f13198..000000000
--- a/packages/website/public/css/basscss.min.css
+++ /dev/null
@@ -1 +0,0 @@
-/*! Basscss | http://basscss.com | MIT License */.h1{font-size:2rem}.h2{font-size:1.5rem}.h3{font-size:1.25rem}.h4{font-size:1rem}.h5{font-size:.875rem}.h6{font-size:.75rem}.font-family-inherit{font-family:inherit}.font-size-inherit{font-size:inherit}.text-decoration-none{text-decoration:none}.bold{font-weight:700}.regular{font-weight:400}.italic{font-style:italic}.caps{text-transform:uppercase;letter-spacing:.2em}.left-align{text-align:left}.center{text-align:center}.right-align{text-align:right}.justify{text-align:justify}.nowrap{white-space:nowrap}.break-word{word-wrap:break-word}.line-height-1{line-height:1}.line-height-2{line-height:1.125}.line-height-3{line-height:1.25}.line-height-4{line-height:1.5}.list-style-none{list-style:none}.underline{text-decoration:underline}.truncate{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.list-reset{list-style:none;padding-left:0}.inline{display:inline}.block{display:block}.inline-block{display:inline-block}.table{display:table}.table-cell{display:table-cell}.overflow-hidden{overflow:hidden}.overflow-scroll{overflow:scroll}.overflow-auto{overflow:auto}.clearfix:after,.clearfix:before{content:" ";display:table}.clearfix:after{clear:both}.left{float:left}.right{float:right}.fit{max-width:100%}.max-width-1{max-width:24rem}.max-width-2{max-width:32rem}.max-width-3{max-width:48rem}.max-width-4{max-width:64rem}.border-box{box-sizing:border-box}.align-baseline{vertical-align:baseline}.align-top{vertical-align:top}.align-middle{vertical-align:middle}.align-bottom{vertical-align:bottom}.m0{margin:0}.mt0{margin-top:0}.mr0{margin-right:0}.mb0{margin-bottom:0}.ml0,.mx0{margin-left:0}.mx0{margin-right:0}.my0{margin-top:0;margin-bottom:0}.m1{margin:.5rem}.mt1{margin-top:.5rem}.mr1{margin-right:.5rem}.mb1{margin-bottom:.5rem}.ml1,.mx1{margin-left:.5rem}.mx1{margin-right:.5rem}.my1{margin-top:.5rem;margin-bottom:.5rem}.m2{margin:1rem}.mt2{margin-top:1rem}.mr2{margin-right:1rem}.mb2{margin-bottom:1rem}.ml2,.mx2{margin-left:1rem}.mx2{margin-right:1rem}.my2{margin-top:1rem;margin-bottom:1rem}.m3{margin:2rem}.mt3{margin-top:2rem}.mr3{margin-right:2rem}.mb3{margin-bottom:2rem}.ml3,.mx3{margin-left:2rem}.mx3{margin-right:2rem}.my3{margin-top:2rem;margin-bottom:2rem}.m4{margin:4rem}.mt4{margin-top:4rem}.mr4{margin-right:4rem}.mb4{margin-bottom:4rem}.ml4,.mx4{margin-left:4rem}.mx4{margin-right:4rem}.my4{margin-top:4rem;margin-bottom:4rem}.mxn1{margin-left:-.5rem;margin-right:-.5rem}.mxn2{margin-left:-1rem;margin-right:-1rem}.mxn3{margin-left:-2rem;margin-right:-2rem}.mxn4{margin-left:-4rem;margin-right:-4rem}.ml-auto{margin-left:auto}.mr-auto,.mx-auto{margin-right:auto}.mx-auto{margin-left:auto}.p0{padding:0}.pt0{padding-top:0}.pr0{padding-right:0}.pb0{padding-bottom:0}.pl0,.px0{padding-left:0}.px0{padding-right:0}.py0{padding-top:0;padding-bottom:0}.p1{padding:.5rem}.pt1{padding-top:.5rem}.pr1{padding-right:.5rem}.pb1{padding-bottom:.5rem}.pl1{padding-left:.5rem}.py1{padding-top:.5rem;padding-bottom:.5rem}.px1{padding-left:.5rem;padding-right:.5rem}.p2{padding:1rem}.pt2{padding-top:1rem}.pr2{padding-right:1rem}.pb2{padding-bottom:1rem}.pl2{padding-left:1rem}.py2{padding-top:1rem;padding-bottom:1rem}.px2{padding-left:1rem;padding-right:1rem}.p3{padding:2rem}.pt3{padding-top:2rem}.pr3{padding-right:2rem}.pb3{padding-bottom:2rem}.pl3{padding-left:2rem}.py3{padding-top:2rem;padding-bottom:2rem}.px3{padding-left:2rem;padding-right:2rem}.p4{padding:4rem}.pt4{padding-top:4rem}.pr4{padding-right:4rem}.pb4{padding-bottom:4rem}.pl4{padding-left:4rem}.py4{padding-top:4rem;padding-bottom:4rem}.px4{padding-left:4rem;padding-right:4rem}.col{float:left}.col,.col-right{box-sizing:border-box}.col-right{float:right}.col-1{width:8.33333%}.col-2{width:16.66667%}.col-3{width:25%}.col-4{width:33.33333%}.col-5{width:41.66667%}.col-6{width:50%}.col-7{width:58.33333%}.col-8{width:66.66667%}.col-9{width:75%}.col-10{width:83.33333%}.col-11{width:91.66667%}.col-12{width:100%}@media (min-width:40em){.sm-col{float:left;box-sizing:border-box}.sm-col-right{float:right;box-sizing:border-box}.sm-col-1{width:8.33333%}.sm-col-2{width:16.66667%}.sm-col-3{width:25%}.sm-col-4{width:33.33333%}.sm-col-5{width:41.66667%}.sm-col-6{width:50%}.sm-col-7{width:58.33333%}.sm-col-8{width:66.66667%}.sm-col-9{width:75%}.sm-col-10{width:83.33333%}.sm-col-11{width:91.66667%}.sm-col-12{width:100%}}@media (min-width:52em){.md-col{float:left;box-sizing:border-box}.md-col-right{float:right;box-sizing:border-box}.md-col-1{width:8.33333%}.md-col-2{width:16.66667%}.md-col-3{width:25%}.md-col-4{width:33.33333%}.md-col-5{width:41.66667%}.md-col-6{width:50%}.md-col-7{width:58.33333%}.md-col-8{width:66.66667%}.md-col-9{width:75%}.md-col-10{width:83.33333%}.md-col-11{width:91.66667%}.md-col-12{width:100%}}@media (min-width:64em){.lg-col{float:left;box-sizing:border-box}.lg-col-right{float:right;box-sizing:border-box}.lg-col-1{width:8.33333%}.lg-col-2{width:16.66667%}.lg-col-3{width:25%}.lg-col-4{width:33.33333%}.lg-col-5{width:41.66667%}.lg-col-6{width:50%}.lg-col-7{width:58.33333%}.lg-col-8{width:66.66667%}.lg-col-9{width:75%}.lg-col-10{width:83.33333%}.lg-col-11{width:91.66667%}.lg-col-12{width:100%}}.flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}@media (min-width:40em){.sm-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}@media (min-width:52em){.md-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}@media (min-width:64em){.lg-flex{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}}.flex-column{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column}.flex-wrap{-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap}.items-start{-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;-ms-grid-row-align:flex-start;align-items:flex-start}.items-end{-webkit-box-align:end;-webkit-align-items:flex-end;-ms-flex-align:end;-ms-grid-row-align:flex-end;align-items:flex-end}.items-center{-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;-ms-grid-row-align:center;align-items:center}.items-baseline{-webkit-box-align:baseline;-webkit-align-items:baseline;-ms-flex-align:baseline;-ms-grid-row-align:baseline;align-items:baseline}.items-stretch{-webkit-box-align:stretch;-webkit-align-items:stretch;-ms-flex-align:stretch;-ms-grid-row-align:stretch;align-items:stretch}.self-start{-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start}.self-end{-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end}.self-center{-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.self-baseline{-webkit-align-self:baseline;-ms-flex-item-align:baseline;align-self:baseline}.self-stretch{-webkit-align-self:stretch;-ms-flex-item-align:stretch;align-self:stretch}.justify-start{-webkit-box-pack:start;-webkit-justify-content:flex-start;-ms-flex-pack:start;justify-content:flex-start}.justify-end{-webkit-box-pack:end;-webkit-justify-content:flex-end;-ms-flex-pack:end;justify-content:flex-end}.justify-center{-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center}.justify-between{-webkit-box-pack:justify;-webkit-justify-content:space-between;-ms-flex-pack:justify;justify-content:space-between}.justify-around{-webkit-justify-content:space-around;-ms-flex-pack:distribute;justify-content:space-around}.content-start{-webkit-align-content:flex-start;-ms-flex-line-pack:start;align-content:flex-start}.content-end{-webkit-align-content:flex-end;-ms-flex-line-pack:end;align-content:flex-end}.content-center{-webkit-align-content:center;-ms-flex-line-pack:center;align-content:center}.content-between{-webkit-align-content:space-between;-ms-flex-line-pack:justify;align-content:space-between}.content-around{-webkit-align-content:space-around;-ms-flex-line-pack:distribute;align-content:space-around}.content-stretch{-webkit-align-content:stretch;-ms-flex-line-pack:stretch;align-content:stretch}.flex-auto{-webkit-box-flex:1;-webkit-flex:1 1 auto;-ms-flex:1 1 auto;flex:1 1 auto;min-width:0;min-height:0}.flex-none{-webkit-box-flex:0;-webkit-flex:none;-ms-flex:none;flex:none}.order-0{-webkit-box-ordinal-group:1;-webkit-order:0;-ms-flex-order:0;order:0}.order-1{-webkit-box-ordinal-group:2;-webkit-order:1;-ms-flex-order:1;order:1}.order-2{-webkit-box-ordinal-group:3;-webkit-order:2;-ms-flex-order:2;order:2}.order-3{-webkit-box-ordinal-group:4;-webkit-order:3;-ms-flex-order:3;order:3}.order-last{-webkit-box-ordinal-group:100000;-webkit-order:99999;-ms-flex-order:99999;order:99999}.relative{position:relative}.absolute{position:absolute}.fixed{position:fixed}.top-0{top:0}.right-0{right:0}.bottom-0{bottom:0}.left-0{left:0}.z1{z-index:1}.z2{z-index:2}.z3{z-index:3}.z4{z-index:4}.border{border-style:solid;border-width:1px}.border-top{border-top-style:solid;border-top-width:1px}.border-right{border-right-style:solid;border-right-width:1px}.border-bottom{border-bottom-style:solid;border-bottom-width:1px}.border-left{border-left-style:solid;border-left-width:1px}.border-none{border:0}.rounded{border-radius:3px}.circle{border-radius:50%}.rounded-top{border-radius:3px 3px 0 0}.rounded-right{border-radius:0 3px 3px 0}.rounded-bottom{border-radius:0 0 3px 3px}.rounded-left{border-radius:3px 0 0 3px}.not-rounded{border-radius:0}.hide{position:absolute!important;height:1px;width:1px;overflow:hidden;clip:rect(1px,1px,1px,1px)}@media (max-width:40em){.xs-hide{display:none!important}}@media (min-width:40em) and (max-width:52em){.sm-hide{display:none!important}}@media (min-width:52em) and (max-width:64em){.md-hide{display:none!important}}@media (min-width:64em){.lg-hide{display:none!important}}.display-none{display:none!important} \ No newline at end of file
diff --git a/packages/website/public/css/basscss_responsive_custom.css b/packages/website/public/css/basscss_responsive_custom.css
deleted file mode 100644
index 041abca6a..000000000
--- a/packages/website/public/css/basscss_responsive_custom.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/* Custom Basscss Responsive Utilities */
-
-@media (max-width: 52em) {
- .sm-center {
- text-align: center;
- }
- .sm-align-middle {
- vertical-align: middle;
- }
- .sm-align-top {
- vertical-align: top;
- }
- .sm-left-align {
- text-align: left;
- }
- .sm-right-align {
- text-align: right;
- }
- .sm-table-cell {
- display: table-cell;
- }
- .sm-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
- .sm-right {
- float: right;
- }
- .sm-left {
- float: left;
- }
- .sm-justify-end {
- ms-flex-pack: end;
- justify-content: flex-end;
- }
-}
-
-@media (min-width: 52em) {
- .md-center {
- text-align: center;
- }
- .md-align-middle {
- vertical-align: middle;
- }
- .md-align-top {
- vertical-align: top;
- }
- .md-left-align {
- text-align: left;
- }
- .md-right-align {
- text-align: right;
- }
- .md-table-cell {
- display: table-cell;
- }
- .md-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
- .md-right {
- float: right;
- }
- .md-left {
- float: left;
- }
- .md-justify-end {
- ms-flex-pack: end;
- justify-content: flex-end;
- }
-}
-
-@media (min-width: 64em) {
- .lg-center {
- text-align: center;
- }
- .lg-align-middle {
- vertical-align: middle;
- }
- .lg-align-top {
- vertical-align: top;
- }
- .lg-left-align {
- text-align: left;
- }
- .lg-right-align {
- text-align: right;
- }
- .lg-table-cell {
- display: table-cell;
- }
- .lg-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
- .lg-right {
- float: right;
- }
- .lg-left {
- float: left;
- }
- .lg-justify-end {
- ms-flex-pack: end;
- justify-content: flex-end;
- }
-}
diff --git a/packages/website/public/css/basscss_responsive_margin.css b/packages/website/public/css/basscss_responsive_margin.css
deleted file mode 100644
index c9f3e855c..000000000
--- a/packages/website/public/css/basscss_responsive_margin.css
+++ /dev/null
@@ -1,453 +0,0 @@
-/* Basscss Responsive Margin */
-
-@media (max-width: 52em) {
- /* Modified by Fabio Berger to max-width from min-width */
-
- .sm-m0 {
- margin: 0;
- }
- .sm-mt0 {
- margin-top: 0;
- }
- .sm-mr0 {
- margin-right: 0;
- }
- .sm-mb0 {
- margin-bottom: 0;
- }
- .sm-ml0 {
- margin-left: 0;
- }
- .sm-mx0 {
- margin-left: 0;
- margin-right: 0;
- }
- .sm-my0 {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .sm-m1 {
- margin: 0.5rem;
- }
- .sm-mt1 {
- margin-top: 0.5rem;
- }
- .sm-mr1 {
- margin-right: 0.5rem;
- }
- .sm-mb1 {
- margin-bottom: 0.5rem;
- }
- .sm-ml1 {
- margin-left: 0.5rem;
- }
- .sm-mx1 {
- margin-left: 0.5rem;
- margin-right: 0.5rem;
- }
- .sm-my1 {
- margin-top: 0.5rem;
- margin-bottom: 0.5rem;
- }
-
- .sm-m2 {
- margin: 1rem;
- }
- .sm-mt2 {
- margin-top: 1rem;
- }
- .sm-mr2 {
- margin-right: 1rem;
- }
- .sm-mb2 {
- margin-bottom: 1rem;
- }
- .sm-ml2 {
- margin-left: 1rem;
- }
- .sm-mx2 {
- margin-left: 1rem;
- margin-right: 1rem;
- }
- .sm-my2 {
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
-
- .sm-m3 {
- margin: 2rem;
- }
- .sm-mt3 {
- margin-top: 2rem;
- }
- .sm-mr3 {
- margin-right: 2rem;
- }
- .sm-mb3 {
- margin-bottom: 2rem;
- }
- .sm-ml3 {
- margin-left: 2rem;
- }
- .sm-mx3 {
- margin-left: 2rem;
- margin-right: 2rem;
- }
- .sm-my3 {
- margin-top: 2rem;
- margin-bottom: 2rem;
- }
-
- .sm-m4 {
- margin: 4rem;
- }
- .sm-mt4 {
- margin-top: 4rem;
- }
- .sm-mr4 {
- margin-right: 4rem;
- }
- .sm-mb4 {
- margin-bottom: 4rem;
- }
- .sm-ml4 {
- margin-left: 4rem;
- }
- .sm-mx4 {
- margin-left: 4rem;
- margin-right: 4rem;
- }
- .sm-my4 {
- margin-top: 4rem;
- margin-bottom: 4rem;
- }
-
- .sm-mxn1 {
- margin-left: -0.5rem;
- margin-right: -0.5rem;
- }
- .sm-mxn2 {
- margin-left: -1rem;
- margin-right: -1rem;
- }
- .sm-mxn3 {
- margin-left: -2rem;
- margin-right: -2rem;
- }
- .sm-mxn4 {
- margin-left: -4rem;
- margin-right: -4rem;
- }
-
- .sm-ml-auto {
- margin-left: auto;
- }
- .sm-mr-auto {
- margin-right: auto;
- }
- .sm-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
-}
-
-@media (min-width: 52em) {
- .md-m0 {
- margin: 0;
- }
- .md-mt0 {
- margin-top: 0;
- }
- .md-mr0 {
- margin-right: 0;
- }
- .md-mb0 {
- margin-bottom: 0;
- }
- .md-ml0 {
- margin-left: 0;
- }
- .md-mx0 {
- margin-left: 0;
- margin-right: 0;
- }
- .md-my0 {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .md-m1 {
- margin: 0.5rem;
- }
- .md-mt1 {
- margin-top: 0.5rem;
- }
- .md-mr1 {
- margin-right: 0.5rem;
- }
- .md-mb1 {
- margin-bottom: 0.5rem;
- }
- .md-ml1 {
- margin-left: 0.5rem;
- }
- .md-mx1 {
- margin-left: 0.5rem;
- margin-right: 0.5rem;
- }
- .md-my1 {
- margin-top: 0.5rem;
- margin-bottom: 0.5rem;
- }
-
- .md-m2 {
- margin: 1rem;
- }
- .md-mt2 {
- margin-top: 1rem;
- }
- .md-mr2 {
- margin-right: 1rem;
- }
- .md-mb2 {
- margin-bottom: 1rem;
- }
- .md-ml2 {
- margin-left: 1rem;
- }
- .md-mx2 {
- margin-left: 1rem;
- margin-right: 1rem;
- }
- .md-my2 {
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
-
- .md-m3 {
- margin: 2rem;
- }
- .md-mt3 {
- margin-top: 2rem;
- }
- .md-mr3 {
- margin-right: 2rem;
- }
- .md-mb3 {
- margin-bottom: 2rem;
- }
- .md-ml3 {
- margin-left: 2rem;
- }
- .md-mx3 {
- margin-left: 2rem;
- margin-right: 2rem;
- }
- .md-my3 {
- margin-top: 2rem;
- margin-bottom: 2rem;
- }
-
- .md-m4 {
- margin: 4rem;
- }
- .md-mt4 {
- margin-top: 4rem;
- }
- .md-mr4 {
- margin-right: 4rem;
- }
- .md-mb4 {
- margin-bottom: 4rem;
- }
- .md-ml4 {
- margin-left: 4rem;
- }
- .md-mx4 {
- margin-left: 4rem;
- margin-right: 4rem;
- }
- .md-my4 {
- margin-top: 4rem;
- margin-bottom: 4rem;
- }
-
- .md-mxn1 {
- margin-left: -0.5rem;
- margin-right: -0.5rem;
- }
- .md-mxn2 {
- margin-left: -1rem;
- margin-right: -1rem;
- }
- .md-mxn3 {
- margin-left: -2rem;
- margin-right: -2rem;
- }
- .md-mxn4 {
- margin-left: -4rem;
- margin-right: -4rem;
- }
-
- .md-ml-auto {
- margin-left: auto;
- }
- .md-mr-auto {
- margin-right: auto;
- }
- .md-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
-}
-
-@media (min-width: 64em) {
- .lg-m0 {
- margin: 0;
- }
- .lg-mt0 {
- margin-top: 0;
- }
- .lg-mr0 {
- margin-right: 0;
- }
- .lg-mb0 {
- margin-bottom: 0;
- }
- .lg-ml0 {
- margin-left: 0;
- }
- .lg-mx0 {
- margin-left: 0;
- margin-right: 0;
- }
- .lg-my0 {
- margin-top: 0;
- margin-bottom: 0;
- }
-
- .lg-m1 {
- margin: 0.5rem;
- }
- .lg-mt1 {
- margin-top: 0.5rem;
- }
- .lg-mr1 {
- margin-right: 0.5rem;
- }
- .lg-mb1 {
- margin-bottom: 0.5rem;
- }
- .lg-ml1 {
- margin-left: 0.5rem;
- }
- .lg-mx1 {
- margin-left: 0.5rem;
- margin-right: 0.5rem;
- }
- .lg-my1 {
- margin-top: 0.5rem;
- margin-bottom: 0.5rem;
- }
-
- .lg-m2 {
- margin: 1rem;
- }
- .lg-mt2 {
- margin-top: 1rem;
- }
- .lg-mr2 {
- margin-right: 1rem;
- }
- .lg-mb2 {
- margin-bottom: 1rem;
- }
- .lg-ml2 {
- margin-left: 1rem;
- }
- .lg-mx2 {
- margin-left: 1rem;
- margin-right: 1rem;
- }
- .lg-my2 {
- margin-top: 1rem;
- margin-bottom: 1rem;
- }
-
- .lg-m3 {
- margin: 2rem;
- }
- .lg-mt3 {
- margin-top: 2rem;
- }
- .lg-mr3 {
- margin-right: 2rem;
- }
- .lg-mb3 {
- margin-bottom: 2rem;
- }
- .lg-ml3 {
- margin-left: 2rem;
- }
- .lg-mx3 {
- margin-left: 2rem;
- margin-right: 2rem;
- }
- .lg-my3 {
- margin-top: 2rem;
- margin-bottom: 2rem;
- }
-
- .lg-m4 {
- margin: 4rem;
- }
- .lg-mt4 {
- margin-top: 4rem;
- }
- .lg-mr4 {
- margin-right: 4rem;
- }
- .lg-mb4 {
- margin-bottom: 4rem;
- }
- .lg-ml4 {
- margin-left: 4rem;
- }
- .lg-mx4 {
- margin-left: 4rem;
- margin-right: 4rem;
- }
- .lg-my4 {
- margin-top: 4rem;
- margin-bottom: 4rem;
- }
-
- .lg-mxn1 {
- margin-left: -0.5rem;
- margin-right: -0.5rem;
- }
- .lg-mxn2 {
- margin-left: -1rem;
- margin-right: -1rem;
- }
- .lg-mxn3 {
- margin-left: -2rem;
- margin-right: -2rem;
- }
- .lg-mxn4 {
- margin-left: -4rem;
- margin-right: -4rem;
- }
-
- .lg-ml-auto {
- margin-left: auto;
- }
- .lg-mr-auto {
- margin-right: auto;
- }
- .lg-mx-auto {
- margin-left: auto;
- margin-right: auto;
- }
-}
diff --git a/packages/website/public/css/basscss_responsive_padding.css b/packages/website/public/css/basscss_responsive_padding.css
deleted file mode 100644
index e027c2d65..000000000
--- a/packages/website/public/css/basscss_responsive_padding.css
+++ /dev/null
@@ -1,134 +0,0 @@
-/* Basscss Responsive Padding */
-/* Modified by Fabio Berger to include xs prefix */
-
-@media (max-width: 52em) { /* Modified by Fabio Berger to max-width from min-width */
-
- .sm-p0 { padding: 0 }
- .sm-pt0 { padding-top: 0 }
- .sm-pr0 { padding-right: 0 }
- .sm-pb0 { padding-bottom: 0 }
- .sm-pl0 { padding-left: 0 }
- .sm-px0 { padding-left: 0; padding-right: 0 }
- .sm-py0 { padding-top: 0; padding-bottom: 0 }
-
- .sm-p1 { padding: .5rem }
- .sm-pt1 { padding-top: .5rem }
- .sm-pr1 { padding-right: .5rem }
- .sm-pb1 { padding-bottom: .5rem }
- .sm-pl1 { padding-left: .5rem }
- .sm-px1 { padding-left: .5rem; padding-right: .5rem }
- .sm-py1 { padding-top: .5rem; padding-bottom: .5rem }
-
- .sm-p2 { padding: 1rem }
- .sm-pt2 { padding-top: 1rem }
- .sm-pr2 { padding-right: 1rem }
- .sm-pb2 { padding-bottom: 1rem }
- .sm-pl2 { padding-left: 1rem }
- .sm-px2 { padding-left: 1rem; padding-right: 1rem }
- .sm-py2 { padding-top: 1rem; padding-bottom: 1rem }
-
- .sm-p3 { padding: 2rem }
- .sm-pt3 { padding-top: 2rem }
- .sm-pr3 { padding-right: 2rem }
- .sm-pb3 { padding-bottom: 2rem }
- .sm-pl3 { padding-left: 2rem }
- .sm-px3 { padding-left: 2rem; padding-right: 2rem }
- .sm-py3 { padding-top: 2rem; padding-bottom: 2rem }
-
- .sm-p4 { padding: 4rem }
- .sm-pt4 { padding-top: 4rem }
- .sm-pr4 { padding-right: 4rem }
- .sm-pb4 { padding-bottom: 4rem }
- .sm-pl4 { padding-left: 4rem }
- .sm-px4 { padding-left: 4rem; padding-right: 4rem }
- .sm-py4 { padding-top: 4rem; padding-bottom: 4rem }
-
-}
-
-@media (min-width: 52em) {
-
- .md-p0 { padding: 0 }
- .md-pt0 { padding-top: 0 }
- .md-pr0 { padding-right: 0 }
- .md-pb0 { padding-bottom: 0 }
- .md-pl0 { padding-left: 0 }
- .md-px0 { padding-left: 0; padding-right: 0 }
- .md-py0 { padding-top: 0; padding-bottom: 0 }
-
- .md-p1 { padding: .5rem }
- .md-pt1 { padding-top: .5rem }
- .md-pr1 { padding-right: .5rem }
- .md-pb1 { padding-bottom: .5rem }
- .md-pl1 { padding-left: .5rem }
- .md-px1 { padding-left: .5rem; padding-right: .5rem }
- .md-py1 { padding-top: .5rem; padding-bottom: .5rem }
-
- .md-p2 { padding: 1rem }
- .md-pt2 { padding-top: 1rem }
- .md-pr2 { padding-right: 1rem }
- .md-pb2 { padding-bottom: 1rem }
- .md-pl2 { padding-left: 1rem }
- .md-px2 { padding-left: 1rem; padding-right: 1rem }
- .md-py2 { padding-top: 1rem; padding-bottom: 1rem }
-
- .md-p3 { padding: 2rem }
- .md-pt3 { padding-top: 2rem }
- .md-pr3 { padding-right: 2rem }
- .md-pb3 { padding-bottom: 2rem }
- .md-pl3 { padding-left: 2rem }
- .md-px3 { padding-left: 2rem; padding-right: 2rem }
- .md-py3 { padding-top: 2rem; padding-bottom: 2rem }
-
- .md-p4 { padding: 4rem }
- .md-pt4 { padding-top: 4rem }
- .md-pr4 { padding-right: 4rem }
- .md-pb4 { padding-bottom: 4rem }
- .md-pl4 { padding-left: 4rem }
- .md-px4 { padding-left: 4rem; padding-right: 4rem }
- .md-py4 { padding-top: 4rem; padding-bottom: 4rem }
-
-}
-
-@media (min-width: 64em) {
-
- .lg-p0 { padding: 0 }
- .lg-pt0 { padding-top: 0 }
- .lg-pr0 { padding-right: 0 }
- .lg-pb0 { padding-bottom: 0 }
- .lg-pl0 { padding-left: 0 }
- .lg-px0 { padding-left: 0; padding-right: 0 }
- .lg-py0 { padding-top: 0; padding-bottom: 0 }
-
- .lg-p1 { padding: .5rem }
- .lg-pt1 { padding-top: .5rem }
- .lg-pr1 { padding-right: .5rem }
- .lg-pb1 { padding-bottom: .5rem }
- .lg-pl1 { padding-left: .5rem }
- .lg-px1 { padding-left: .5rem; padding-right: .5rem }
- .lg-py1 { padding-top: .5rem; padding-bottom: .5rem }
-
- .lg-p2 { padding: 1rem }
- .lg-pt2 { padding-top: 1rem }
- .lg-pr2 { padding-right: 1rem }
- .lg-pb2 { padding-bottom: 1rem }
- .lg-pl2 { padding-left: 1rem }
- .lg-px2 { padding-left: 1rem; padding-right: 1rem }
- .lg-py2 { padding-top: 1rem; padding-bottom: 1rem }
-
- .lg-p3 { padding: 2rem }
- .lg-pt3 { padding-top: 2rem }
- .lg-pr3 { padding-right: 2rem }
- .lg-pb3 { padding-bottom: 2rem }
- .lg-pl3 { padding-left: 2rem }
- .lg-px3 { padding-left: 2rem; padding-right: 2rem }
- .lg-py3 { padding-top: 2rem; padding-bottom: 2rem }
-
- .lg-p4 { padding: 4rem }
- .lg-pt4 { padding-top: 4rem }
- .lg-pr4 { padding-right: 4rem }
- .lg-pb4 { padding-bottom: 4rem }
- .lg-pl4 { padding-left: 4rem }
- .lg-px4 { padding-left: 4rem; padding-right: 4rem }
- .lg-py4 { padding-top: 4rem; padding-bottom: 4rem }
-
-}
diff --git a/packages/website/public/css/basscss_responsive_type_scale.css b/packages/website/public/css/basscss_responsive_type_scale.css
deleted file mode 100644
index cae23b4e7..000000000
--- a/packages/website/public/css/basscss_responsive_type_scale.css
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Basscss Responsive Type Scale */
-/* Modified by Fabio Berger to include xs prefix */
-
-@media (max-width: 52em) { /* Modified by Fabio Berger to max-width from min-width */
- .sm-h00 { font-size: 4rem }
- .sm-h0 { font-size: 3rem }
- .sm-h1 { font-size: 2rem }
- .sm-h2 { font-size: 1.5rem }
- .sm-h3 { font-size: 1.25rem }
- .sm-h4 { font-size: 1rem }
- .sm-h5 { font-size: .875rem }
- .sm-h6 { font-size: .75rem }
-}
-
-@media (min-width: 52em) {
- .md-h00 { font-size: 4rem }
- .md-h0 { font-size: 3rem }
- .md-h1 { font-size: 2rem }
- .md-h2 { font-size: 1.5rem }
- .md-h3 { font-size: 1.25rem }
- .md-h4 { font-size: 1rem }
- .md-h5 { font-size: .875rem }
- .md-h6 { font-size: .75rem }
-}
-
-@media (min-width: 64em) {
- .lg-h00 { font-size: 4rem }
- .lg-h0 { font-size: 3rem }
- .lg-h1 { font-size: 2rem }
- .lg-h2 { font-size: 1.5rem }
- .lg-h3 { font-size: 1.25rem }
- .lg-h4 { font-size: 1rem }
- .lg-h5 { font-size: .875rem }
- .lg-h6 { font-size: .75rem }
-}
diff --git a/packages/website/public/css/formular.css b/packages/website/public/css/formular.css
deleted file mode 100644
index 85549f8c8..000000000
--- a/packages/website/public/css/formular.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/**
- * @license
- * MyFonts Webfont Build ID 3678880, 2018-11-27T05:59:35-0500
- *
- * The fonts listed in this notice are subject to the End User License
- * Agreement(s) entered into by the website owner. All other parties are
- * explicitly restricted from using the Licensed Webfonts(s).
- *
- * You may obtain a valid license at the URLs below.
- *
- * Webfont: Formular-Light by Brownfox
- * URL: https://www.myfonts.com/fonts/brownfox/formular/light/
- *
- * Webfont: Formular by Brownfox
- * URL: https://www.myfonts.com/fonts/brownfox/formular/regular/
- *
- *
- * License: https://www.myfonts.com/viewlicense?type=web&buildid=3678880
- * Licensed pageviews: 200,000
- * Webfonts copyright: Copyright (c) 2014 by Vyacheslav Kirilenko, Gayane Bagdasaryan. All rights reserved.
- *
- * © 2018 MyFonts Inc
-*/
-
-
-/* @import must be at top of file, otherwise CSS will not work */
-@import url("//hello.myfonts.net/count/3822a0");
-
-
-@font-face {
- font-family: 'Formular';
- font-weight: 300;
- src: url('../fonts/Formular-Light.woff2');
- src: url('../fonts/Formular-Light.woff2') format('woff2'), url('../fonts/Formular-Light.woff') format('woff');
- font-display: swap;
-}
-
-
-@font-face {
- font-family: 'Formular';
- font-weight: 400;
- src: url('../fonts/Formular-Regular.woff2');
- src: url('../fonts/Formular-Regular.woff2') format('woff2'), url('../fonts/Formular-Regular.woff') format('woff');
- font-display: swap;
-}
diff --git a/packages/website/public/css/github-gist.css b/packages/website/public/css/github-gist.css
deleted file mode 100644
index d5c8751c5..000000000
--- a/packages/website/public/css/github-gist.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * GitHub Gist Theme
- * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
- */
-
-.hljs {
- display: block;
- background: white;
- padding: 0.5em;
- color: #333333;
- overflow-x: auto;
-}
-
-.hljs-comment,
-.hljs-meta {
- color: #969896;
-}
-
-.hljs-string,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-strong,
-.hljs-emphasis,
-.hljs-quote {
- color: #df5000;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-type {
- color: #a71d5d;
-}
-
-.hljs-literal,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-attribute {
- color: #0086b3;
-}
-
-.hljs-section,
-.hljs-name {
- color: #63a35c;
-}
-
-.hljs-tag {
- color: #333333;
-}
-
-.hljs-title,
-.hljs-attr,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #795da3;
-}
-
-.hljs-addition {
- color: #55a532;
- background-color: #eaffea;
-}
-
-.hljs-deletion {
- color: #bd2c00;
- background-color: #ffecec;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
diff --git a/packages/website/public/css/material-design-iconic-font.min.css b/packages/website/public/css/material-design-iconic-font.min.css
deleted file mode 100755
index e1a58fe2f..000000000
--- a/packages/website/public/css/material-design-iconic-font.min.css
+++ /dev/null
@@ -1 +0,0 @@
-@font-face{font-family:Material-Design-Iconic-Font;src:url(../fonts/Material-Design-Iconic-Font.woff2?v=2.2.0) format('woff2'),url(../fonts/Material-Design-Iconic-Font.woff?v=2.2.0) format('woff'),url(../fonts/Material-Design-Iconic-Font.ttf?v=2.2.0) format('truetype')}.zmdi{display:inline-block;font:normal normal normal 14px/1 'Material-Design-Iconic-Font';font-size:inherit;text-rendering:auto;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.zmdi-hc-lg{font-size:1.33333333em;line-height:.75em;vertical-align:-15%}.zmdi-hc-2x{font-size:2em}.zmdi-hc-3x{font-size:3em}.zmdi-hc-4x{font-size:4em}.zmdi-hc-5x{font-size:5em}.zmdi-hc-fw{width:1.28571429em;text-align:center}.zmdi-hc-ul{padding-left:0;margin-left:2.14285714em;list-style-type:none}.zmdi-hc-ul>li{position:relative}.zmdi-hc-li{position:absolute;left:-2.14285714em;width:2.14285714em;top:.14285714em;text-align:center}.zmdi-hc-li.zmdi-hc-lg{left:-1.85714286em}.zmdi-hc-border{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:2px}.zmdi-hc-border-circle{padding:.1em .25em;border:solid .1em #9e9e9e;border-radius:50%}.zmdi.pull-left{float:left;margin-right:.15em}.zmdi.pull-right{float:right;margin-left:.15em}.zmdi-hc-spin{-webkit-animation:zmdi-spin 1.5s infinite linear;animation:zmdi-spin 1.5s infinite linear}.zmdi-hc-spin-reverse{-webkit-animation:zmdi-spin-reverse 1.5s infinite linear;animation:zmdi-spin-reverse 1.5s infinite linear}@-webkit-keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes zmdi-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@-webkit-keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}@keyframes zmdi-spin-reverse{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(-359deg);transform:rotate(-359deg)}}.zmdi-hc-rotate-90{-webkit-transform:rotate(90deg);-ms-transform:rotate(90deg);transform:rotate(90deg)}.zmdi-hc-rotate-180{-webkit-transform:rotate(180deg);-ms-transform:rotate(180deg);transform:rotate(180deg)}.zmdi-hc-rotate-270{-webkit-transform:rotate(270deg);-ms-transform:rotate(270deg);transform:rotate(270deg)}.zmdi-hc-flip-horizontal{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.zmdi-hc-flip-vertical{-webkit-transform:scale(1,-1);-ms-transform:scale(1,-1);transform:scale(1,-1)}.zmdi-hc-stack{position:relative;display:inline-block;width:2em;height:2em;line-height:2em;vertical-align:middle}.zmdi-hc-stack-1x,.zmdi-hc-stack-2x{position:absolute;left:0;width:100%;text-align:center}.zmdi-hc-stack-1x{line-height:inherit}.zmdi-hc-stack-2x{font-size:2em}.zmdi-hc-inverse{color:#fff}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-3d-rotation:before{content:'\f101'}.zmdi-airplane-off:before{content:'\f102'}.zmdi-airplane:before{content:'\f103'}.zmdi-album:before{content:'\f104'}.zmdi-archive:before{content:'\f105'}.zmdi-assignment-account:before{content:'\f106'}.zmdi-assignment-alert:before{content:'\f107'}.zmdi-assignment-check:before{content:'\f108'}.zmdi-assignment-o:before{content:'\f109'}.zmdi-assignment-return:before{content:'\f10a'}.zmdi-assignment-returned:before{content:'\f10b'}.zmdi-assignment:before{content:'\f10c'}.zmdi-attachment-alt:before{content:'\f10d'}.zmdi-attachment:before{content:'\f10e'}.zmdi-audio:before{content:'\f10f'}.zmdi-badge-check:before{content:'\f110'}.zmdi-balance-wallet:before{content:'\f111'}.zmdi-balance:before{content:'\f112'}.zmdi-battery-alert:before{content:'\f113'}.zmdi-battery-flash:before{content:'\f114'}.zmdi-battery-unknown:before{content:'\f115'}.zmdi-battery:before{content:'\f116'}.zmdi-bike:before{content:'\f117'}.zmdi-block-alt:before{content:'\f118'}.zmdi-block:before{content:'\f119'}.zmdi-boat:before{content:'\f11a'}.zmdi-book-image:before{content:'\f11b'}.zmdi-book:before{content:'\f11c'}.zmdi-bookmark-outline:before{content:'\f11d'}.zmdi-bookmark:before{content:'\f11e'}.zmdi-brush:before{content:'\f11f'}.zmdi-bug:before{content:'\f120'}.zmdi-bus:before{content:'\f121'}.zmdi-cake:before{content:'\f122'}.zmdi-car-taxi:before{content:'\f123'}.zmdi-car-wash:before{content:'\f124'}.zmdi-car:before{content:'\f125'}.zmdi-card-giftcard:before{content:'\f126'}.zmdi-card-membership:before{content:'\f127'}.zmdi-card-travel:before{content:'\f128'}.zmdi-card:before{content:'\f129'}.zmdi-case-check:before{content:'\f12a'}.zmdi-case-download:before{content:'\f12b'}.zmdi-case-play:before{content:'\f12c'}.zmdi-case:before{content:'\f12d'}.zmdi-cast-connected:before{content:'\f12e'}.zmdi-cast:before{content:'\f12f'}.zmdi-chart-donut:before{content:'\f130'}.zmdi-chart:before{content:'\f131'}.zmdi-city-alt:before{content:'\f132'}.zmdi-city:before{content:'\f133'}.zmdi-close-circle-o:before{content:'\f134'}.zmdi-close-circle:before{content:'\f135'}.zmdi-close:before{content:'\f136'}.zmdi-cocktail:before{content:'\f137'}.zmdi-code-setting:before{content:'\f138'}.zmdi-code-smartphone:before{content:'\f139'}.zmdi-code:before{content:'\f13a'}.zmdi-coffee:before{content:'\f13b'}.zmdi-collection-bookmark:before{content:'\f13c'}.zmdi-collection-case-play:before{content:'\f13d'}.zmdi-collection-folder-image:before{content:'\f13e'}.zmdi-collection-image-o:before{content:'\f13f'}.zmdi-collection-image:before{content:'\f140'}.zmdi-collection-item-1:before{content:'\f141'}.zmdi-collection-item-2:before{content:'\f142'}.zmdi-collection-item-3:before{content:'\f143'}.zmdi-collection-item-4:before{content:'\f144'}.zmdi-collection-item-5:before{content:'\f145'}.zmdi-collection-item-6:before{content:'\f146'}.zmdi-collection-item-7:before{content:'\f147'}.zmdi-collection-item-8:before{content:'\f148'}.zmdi-collection-item-9-plus:before{content:'\f149'}.zmdi-collection-item-9:before{content:'\f14a'}.zmdi-collection-item:before{content:'\f14b'}.zmdi-collection-music:before{content:'\f14c'}.zmdi-collection-pdf:before{content:'\f14d'}.zmdi-collection-plus:before{content:'\f14e'}.zmdi-collection-speaker:before{content:'\f14f'}.zmdi-collection-text:before{content:'\f150'}.zmdi-collection-video:before{content:'\f151'}.zmdi-compass:before{content:'\f152'}.zmdi-cutlery:before{content:'\f153'}.zmdi-delete:before{content:'\f154'}.zmdi-dialpad:before{content:'\f155'}.zmdi-dns:before{content:'\f156'}.zmdi-drink:before{content:'\f157'}.zmdi-edit:before{content:'\f158'}.zmdi-email-open:before{content:'\f159'}.zmdi-email:before{content:'\f15a'}.zmdi-eye-off:before{content:'\f15b'}.zmdi-eye:before{content:'\f15c'}.zmdi-eyedropper:before{content:'\f15d'}.zmdi-favorite-outline:before{content:'\f15e'}.zmdi-favorite:before{content:'\f15f'}.zmdi-filter-list:before{content:'\f160'}.zmdi-fire:before{content:'\f161'}.zmdi-flag:before{content:'\f162'}.zmdi-flare:before{content:'\f163'}.zmdi-flash-auto:before{content:'\f164'}.zmdi-flash-off:before{content:'\f165'}.zmdi-flash:before{content:'\f166'}.zmdi-flip:before{content:'\f167'}.zmdi-flower-alt:before{content:'\f168'}.zmdi-flower:before{content:'\f169'}.zmdi-font:before{content:'\f16a'}.zmdi-fullscreen-alt:before{content:'\f16b'}.zmdi-fullscreen-exit:before{content:'\f16c'}.zmdi-fullscreen:before{content:'\f16d'}.zmdi-functions:before{content:'\f16e'}.zmdi-gas-station:before{content:'\f16f'}.zmdi-gesture:before{content:'\f170'}.zmdi-globe-alt:before{content:'\f171'}.zmdi-globe-lock:before{content:'\f172'}.zmdi-globe:before{content:'\f173'}.zmdi-graduation-cap:before{content:'\f174'}.zmdi-home:before{content:'\f175'}.zmdi-hospital-alt:before{content:'\f176'}.zmdi-hospital:before{content:'\f177'}.zmdi-hotel:before{content:'\f178'}.zmdi-hourglass-alt:before{content:'\f179'}.zmdi-hourglass-outline:before{content:'\f17a'}.zmdi-hourglass:before{content:'\f17b'}.zmdi-http:before{content:'\f17c'}.zmdi-image-alt:before{content:'\f17d'}.zmdi-image-o:before{content:'\f17e'}.zmdi-image:before{content:'\f17f'}.zmdi-inbox:before{content:'\f180'}.zmdi-invert-colors-off:before{content:'\f181'}.zmdi-invert-colors:before{content:'\f182'}.zmdi-key:before{content:'\f183'}.zmdi-label-alt-outline:before{content:'\f184'}.zmdi-label-alt:before{content:'\f185'}.zmdi-label-heart:before{content:'\f186'}.zmdi-label:before{content:'\f187'}.zmdi-labels:before{content:'\f188'}.zmdi-lamp:before{content:'\f189'}.zmdi-landscape:before{content:'\f18a'}.zmdi-layers-off:before{content:'\f18b'}.zmdi-layers:before{content:'\f18c'}.zmdi-library:before{content:'\f18d'}.zmdi-link:before{content:'\f18e'}.zmdi-lock-open:before{content:'\f18f'}.zmdi-lock-outline:before{content:'\f190'}.zmdi-lock:before{content:'\f191'}.zmdi-mail-reply-all:before{content:'\f192'}.zmdi-mail-reply:before{content:'\f193'}.zmdi-mail-send:before{content:'\f194'}.zmdi-mall:before{content:'\f195'}.zmdi-map:before{content:'\f196'}.zmdi-menu:before{content:'\f197'}.zmdi-money-box:before{content:'\f198'}.zmdi-money-off:before{content:'\f199'}.zmdi-money:before{content:'\f19a'}.zmdi-more-vert:before{content:'\f19b'}.zmdi-more:before{content:'\f19c'}.zmdi-movie-alt:before{content:'\f19d'}.zmdi-movie:before{content:'\f19e'}.zmdi-nature-people:before{content:'\f19f'}.zmdi-nature:before{content:'\f1a0'}.zmdi-navigation:before{content:'\f1a1'}.zmdi-open-in-browser:before{content:'\f1a2'}.zmdi-open-in-new:before{content:'\f1a3'}.zmdi-palette:before{content:'\f1a4'}.zmdi-parking:before{content:'\f1a5'}.zmdi-pin-account:before{content:'\f1a6'}.zmdi-pin-assistant:before{content:'\f1a7'}.zmdi-pin-drop:before{content:'\f1a8'}.zmdi-pin-help:before{content:'\f1a9'}.zmdi-pin-off:before{content:'\f1aa'}.zmdi-pin:before{content:'\f1ab'}.zmdi-pizza:before{content:'\f1ac'}.zmdi-plaster:before{content:'\f1ad'}.zmdi-power-setting:before{content:'\f1ae'}.zmdi-power:before{content:'\f1af'}.zmdi-print:before{content:'\f1b0'}.zmdi-puzzle-piece:before{content:'\f1b1'}.zmdi-quote:before{content:'\f1b2'}.zmdi-railway:before{content:'\f1b3'}.zmdi-receipt:before{content:'\f1b4'}.zmdi-refresh-alt:before{content:'\f1b5'}.zmdi-refresh-sync-alert:before{content:'\f1b6'}.zmdi-refresh-sync-off:before{content:'\f1b7'}.zmdi-refresh-sync:before{content:'\f1b8'}.zmdi-refresh:before{content:'\f1b9'}.zmdi-roller:before{content:'\f1ba'}.zmdi-ruler:before{content:'\f1bb'}.zmdi-scissors:before{content:'\f1bc'}.zmdi-screen-rotation-lock:before{content:'\f1bd'}.zmdi-screen-rotation:before{content:'\f1be'}.zmdi-search-for:before{content:'\f1bf'}.zmdi-search-in-file:before{content:'\f1c0'}.zmdi-search-in-page:before{content:'\f1c1'}.zmdi-search-replace:before{content:'\f1c2'}.zmdi-search:before{content:'\f1c3'}.zmdi-seat:before{content:'\f1c4'}.zmdi-settings-square:before{content:'\f1c5'}.zmdi-settings:before{content:'\f1c6'}.zmdi-shield-check:before{content:'\f1c7'}.zmdi-shield-security:before{content:'\f1c8'}.zmdi-shopping-basket:before{content:'\f1c9'}.zmdi-shopping-cart-plus:before{content:'\f1ca'}.zmdi-shopping-cart:before{content:'\f1cb'}.zmdi-sign-in:before{content:'\f1cc'}.zmdi-sort-amount-asc:before{content:'\f1cd'}.zmdi-sort-amount-desc:before{content:'\f1ce'}.zmdi-sort-asc:before{content:'\f1cf'}.zmdi-sort-desc:before{content:'\f1d0'}.zmdi-spellcheck:before{content:'\f1d1'}.zmdi-storage:before{content:'\f1d2'}.zmdi-store-24:before{content:'\f1d3'}.zmdi-store:before{content:'\f1d4'}.zmdi-subway:before{content:'\f1d5'}.zmdi-sun:before{content:'\f1d6'}.zmdi-tab-unselected:before{content:'\f1d7'}.zmdi-tab:before{content:'\f1d8'}.zmdi-tag-close:before{content:'\f1d9'}.zmdi-tag-more:before{content:'\f1da'}.zmdi-tag:before{content:'\f1db'}.zmdi-thumb-down:before{content:'\f1dc'}.zmdi-thumb-up-down:before{content:'\f1dd'}.zmdi-thumb-up:before{content:'\f1de'}.zmdi-ticket-star:before{content:'\f1df'}.zmdi-toll:before{content:'\f1e0'}.zmdi-toys:before{content:'\f1e1'}.zmdi-traffic:before{content:'\f1e2'}.zmdi-translate:before{content:'\f1e3'}.zmdi-triangle-down:before{content:'\f1e4'}.zmdi-triangle-up:before{content:'\f1e5'}.zmdi-truck:before{content:'\f1e6'}.zmdi-turning-sign:before{content:'\f1e7'}.zmdi-wallpaper:before{content:'\f1e8'}.zmdi-washing-machine:before{content:'\f1e9'}.zmdi-window-maximize:before{content:'\f1ea'}.zmdi-window-minimize:before{content:'\f1eb'}.zmdi-window-restore:before{content:'\f1ec'}.zmdi-wrench:before{content:'\f1ed'}.zmdi-zoom-in:before{content:'\f1ee'}.zmdi-zoom-out:before{content:'\f1ef'}.zmdi-alert-circle-o:before{content:'\f1f0'}.zmdi-alert-circle:before{content:'\f1f1'}.zmdi-alert-octagon:before{content:'\f1f2'}.zmdi-alert-polygon:before{content:'\f1f3'}.zmdi-alert-triangle:before{content:'\f1f4'}.zmdi-help-outline:before{content:'\f1f5'}.zmdi-help:before{content:'\f1f6'}.zmdi-info-outline:before{content:'\f1f7'}.zmdi-info:before{content:'\f1f8'}.zmdi-notifications-active:before{content:'\f1f9'}.zmdi-notifications-add:before{content:'\f1fa'}.zmdi-notifications-none:before{content:'\f1fb'}.zmdi-notifications-off:before{content:'\f1fc'}.zmdi-notifications-paused:before{content:'\f1fd'}.zmdi-notifications:before{content:'\f1fe'}.zmdi-account-add:before{content:'\f1ff'}.zmdi-account-box-mail:before{content:'\f200'}.zmdi-account-box-o:before{content:'\f201'}.zmdi-account-box-phone:before{content:'\f202'}.zmdi-account-box:before{content:'\f203'}.zmdi-account-calendar:before{content:'\f204'}.zmdi-account-circle:before{content:'\f205'}.zmdi-account-o:before{content:'\f206'}.zmdi-account:before{content:'\f207'}.zmdi-accounts-add:before{content:'\f208'}.zmdi-accounts-alt:before{content:'\f209'}.zmdi-accounts-list-alt:before{content:'\f20a'}.zmdi-accounts-list:before{content:'\f20b'}.zmdi-accounts-outline:before{content:'\f20c'}.zmdi-accounts:before{content:'\f20d'}.zmdi-face:before{content:'\f20e'}.zmdi-female:before{content:'\f20f'}.zmdi-male-alt:before{content:'\f210'}.zmdi-male-female:before{content:'\f211'}.zmdi-male:before{content:'\f212'}.zmdi-mood-bad:before{content:'\f213'}.zmdi-mood:before{content:'\f214'}.zmdi-run:before{content:'\f215'}.zmdi-walk:before{content:'\f216'}.zmdi-cloud-box:before{content:'\f217'}.zmdi-cloud-circle:before{content:'\f218'}.zmdi-cloud-done:before{content:'\f219'}.zmdi-cloud-download:before{content:'\f21a'}.zmdi-cloud-off:before{content:'\f21b'}.zmdi-cloud-outline-alt:before{content:'\f21c'}.zmdi-cloud-outline:before{content:'\f21d'}.zmdi-cloud-upload:before{content:'\f21e'}.zmdi-cloud:before{content:'\f21f'}.zmdi-download:before{content:'\f220'}.zmdi-file-plus:before{content:'\f221'}.zmdi-file-text:before{content:'\f222'}.zmdi-file:before{content:'\f223'}.zmdi-folder-outline:before{content:'\f224'}.zmdi-folder-person:before{content:'\f225'}.zmdi-folder-star-alt:before{content:'\f226'}.zmdi-folder-star:before{content:'\f227'}.zmdi-folder:before{content:'\f228'}.zmdi-gif:before{content:'\f229'}.zmdi-upload:before{content:'\f22a'}.zmdi-border-all:before{content:'\f22b'}.zmdi-border-bottom:before{content:'\f22c'}.zmdi-border-clear:before{content:'\f22d'}.zmdi-border-color:before{content:'\f22e'}.zmdi-border-horizontal:before{content:'\f22f'}.zmdi-border-inner:before{content:'\f230'}.zmdi-border-left:before{content:'\f231'}.zmdi-border-outer:before{content:'\f232'}.zmdi-border-right:before{content:'\f233'}.zmdi-border-style:before{content:'\f234'}.zmdi-border-top:before{content:'\f235'}.zmdi-border-vertical:before{content:'\f236'}.zmdi-copy:before{content:'\f237'}.zmdi-crop:before{content:'\f238'}.zmdi-format-align-center:before{content:'\f239'}.zmdi-format-align-justify:before{content:'\f23a'}.zmdi-format-align-left:before{content:'\f23b'}.zmdi-format-align-right:before{content:'\f23c'}.zmdi-format-bold:before{content:'\f23d'}.zmdi-format-clear-all:before{content:'\f23e'}.zmdi-format-clear:before{content:'\f23f'}.zmdi-format-color-fill:before{content:'\f240'}.zmdi-format-color-reset:before{content:'\f241'}.zmdi-format-color-text:before{content:'\f242'}.zmdi-format-indent-decrease:before{content:'\f243'}.zmdi-format-indent-increase:before{content:'\f244'}.zmdi-format-italic:before{content:'\f245'}.zmdi-format-line-spacing:before{content:'\f246'}.zmdi-format-list-bulleted:before{content:'\f247'}.zmdi-format-list-numbered:before{content:'\f248'}.zmdi-format-ltr:before{content:'\f249'}.zmdi-format-rtl:before{content:'\f24a'}.zmdi-format-size:before{content:'\f24b'}.zmdi-format-strikethrough-s:before{content:'\f24c'}.zmdi-format-strikethrough:before{content:'\f24d'}.zmdi-format-subject:before{content:'\f24e'}.zmdi-format-underlined:before{content:'\f24f'}.zmdi-format-valign-bottom:before{content:'\f250'}.zmdi-format-valign-center:before{content:'\f251'}.zmdi-format-valign-top:before{content:'\f252'}.zmdi-redo:before{content:'\f253'}.zmdi-select-all:before{content:'\f254'}.zmdi-space-bar:before{content:'\f255'}.zmdi-text-format:before{content:'\f256'}.zmdi-transform:before{content:'\f257'}.zmdi-undo:before{content:'\f258'}.zmdi-wrap-text:before{content:'\f259'}.zmdi-comment-alert:before{content:'\f25a'}.zmdi-comment-alt-text:before{content:'\f25b'}.zmdi-comment-alt:before{content:'\f25c'}.zmdi-comment-edit:before{content:'\f25d'}.zmdi-comment-image:before{content:'\f25e'}.zmdi-comment-list:before{content:'\f25f'}.zmdi-comment-more:before{content:'\f260'}.zmdi-comment-outline:before{content:'\f261'}.zmdi-comment-text-alt:before{content:'\f262'}.zmdi-comment-text:before{content:'\f263'}.zmdi-comment-video:before{content:'\f264'}.zmdi-comment:before{content:'\f265'}.zmdi-comments:before{content:'\f266'}.zmdi-check-all:before{content:'\f267'}.zmdi-check-circle-u:before{content:'\f268'}.zmdi-check-circle:before{content:'\f269'}.zmdi-check-square:before{content:'\f26a'}.zmdi-check:before{content:'\f26b'}.zmdi-circle-o:before{content:'\f26c'}.zmdi-circle:before{content:'\f26d'}.zmdi-dot-circle-alt:before{content:'\f26e'}.zmdi-dot-circle:before{content:'\f26f'}.zmdi-minus-circle-outline:before{content:'\f270'}.zmdi-minus-circle:before{content:'\f271'}.zmdi-minus-square:before{content:'\f272'}.zmdi-minus:before{content:'\f273'}.zmdi-plus-circle-o-duplicate:before{content:'\f274'}.zmdi-plus-circle-o:before{content:'\f275'}.zmdi-plus-circle:before{content:'\f276'}.zmdi-plus-square:before{content:'\f277'}.zmdi-plus:before{content:'\f278'}.zmdi-square-o:before{content:'\f279'}.zmdi-star-circle:before{content:'\f27a'}.zmdi-star-half:before{content:'\f27b'}.zmdi-star-outline:before{content:'\f27c'}.zmdi-star:before{content:'\f27d'}.zmdi-bluetooth-connected:before{content:'\f27e'}.zmdi-bluetooth-off:before{content:'\f27f'}.zmdi-bluetooth-search:before{content:'\f280'}.zmdi-bluetooth-setting:before{content:'\f281'}.zmdi-bluetooth:before{content:'\f282'}.zmdi-camera-add:before{content:'\f283'}.zmdi-camera-alt:before{content:'\f284'}.zmdi-camera-bw:before{content:'\f285'}.zmdi-camera-front:before{content:'\f286'}.zmdi-camera-mic:before{content:'\f287'}.zmdi-camera-party-mode:before{content:'\f288'}.zmdi-camera-rear:before{content:'\f289'}.zmdi-camera-roll:before{content:'\f28a'}.zmdi-camera-switch:before{content:'\f28b'}.zmdi-camera:before{content:'\f28c'}.zmdi-card-alert:before{content:'\f28d'}.zmdi-card-off:before{content:'\f28e'}.zmdi-card-sd:before{content:'\f28f'}.zmdi-card-sim:before{content:'\f290'}.zmdi-desktop-mac:before{content:'\f291'}.zmdi-desktop-windows:before{content:'\f292'}.zmdi-device-hub:before{content:'\f293'}.zmdi-devices-off:before{content:'\f294'}.zmdi-devices:before{content:'\f295'}.zmdi-dock:before{content:'\f296'}.zmdi-floppy:before{content:'\f297'}.zmdi-gamepad:before{content:'\f298'}.zmdi-gps-dot:before{content:'\f299'}.zmdi-gps-off:before{content:'\f29a'}.zmdi-gps:before{content:'\f29b'}.zmdi-headset-mic:before{content:'\f29c'}.zmdi-headset:before{content:'\f29d'}.zmdi-input-antenna:before{content:'\f29e'}.zmdi-input-composite:before{content:'\f29f'}.zmdi-input-hdmi:before{content:'\f2a0'}.zmdi-input-power:before{content:'\f2a1'}.zmdi-input-svideo:before{content:'\f2a2'}.zmdi-keyboard-hide:before{content:'\f2a3'}.zmdi-keyboard:before{content:'\f2a4'}.zmdi-laptop-chromebook:before{content:'\f2a5'}.zmdi-laptop-mac:before{content:'\f2a6'}.zmdi-laptop:before{content:'\f2a7'}.zmdi-mic-off:before{content:'\f2a8'}.zmdi-mic-outline:before{content:'\f2a9'}.zmdi-mic-setting:before{content:'\f2aa'}.zmdi-mic:before{content:'\f2ab'}.zmdi-mouse:before{content:'\f2ac'}.zmdi-network-alert:before{content:'\f2ad'}.zmdi-network-locked:before{content:'\f2ae'}.zmdi-network-off:before{content:'\f2af'}.zmdi-network-outline:before{content:'\f2b0'}.zmdi-network-setting:before{content:'\f2b1'}.zmdi-network:before{content:'\f2b2'}.zmdi-phone-bluetooth:before{content:'\f2b3'}.zmdi-phone-end:before{content:'\f2b4'}.zmdi-phone-forwarded:before{content:'\f2b5'}.zmdi-phone-in-talk:before{content:'\f2b6'}.zmdi-phone-locked:before{content:'\f2b7'}.zmdi-phone-missed:before{content:'\f2b8'}.zmdi-phone-msg:before{content:'\f2b9'}.zmdi-phone-paused:before{content:'\f2ba'}.zmdi-phone-ring:before{content:'\f2bb'}.zmdi-phone-setting:before{content:'\f2bc'}.zmdi-phone-sip:before{content:'\f2bd'}.zmdi-phone:before{content:'\f2be'}.zmdi-portable-wifi-changes:before{content:'\f2bf'}.zmdi-portable-wifi-off:before{content:'\f2c0'}.zmdi-portable-wifi:before{content:'\f2c1'}.zmdi-radio:before{content:'\f2c2'}.zmdi-reader:before{content:'\f2c3'}.zmdi-remote-control-alt:before{content:'\f2c4'}.zmdi-remote-control:before{content:'\f2c5'}.zmdi-router:before{content:'\f2c6'}.zmdi-scanner:before{content:'\f2c7'}.zmdi-smartphone-android:before{content:'\f2c8'}.zmdi-smartphone-download:before{content:'\f2c9'}.zmdi-smartphone-erase:before{content:'\f2ca'}.zmdi-smartphone-info:before{content:'\f2cb'}.zmdi-smartphone-iphone:before{content:'\f2cc'}.zmdi-smartphone-landscape-lock:before{content:'\f2cd'}.zmdi-smartphone-landscape:before{content:'\f2ce'}.zmdi-smartphone-lock:before{content:'\f2cf'}.zmdi-smartphone-portrait-lock:before{content:'\f2d0'}.zmdi-smartphone-ring:before{content:'\f2d1'}.zmdi-smartphone-setting:before{content:'\f2d2'}.zmdi-smartphone-setup:before{content:'\f2d3'}.zmdi-smartphone:before{content:'\f2d4'}.zmdi-speaker:before{content:'\f2d5'}.zmdi-tablet-android:before{content:'\f2d6'}.zmdi-tablet-mac:before{content:'\f2d7'}.zmdi-tablet:before{content:'\f2d8'}.zmdi-tv-alt-play:before{content:'\f2d9'}.zmdi-tv-list:before{content:'\f2da'}.zmdi-tv-play:before{content:'\f2db'}.zmdi-tv:before{content:'\f2dc'}.zmdi-usb:before{content:'\f2dd'}.zmdi-videocam-off:before{content:'\f2de'}.zmdi-videocam-switch:before{content:'\f2df'}.zmdi-videocam:before{content:'\f2e0'}.zmdi-watch:before{content:'\f2e1'}.zmdi-wifi-alt-2:before{content:'\f2e2'}.zmdi-wifi-alt:before{content:'\f2e3'}.zmdi-wifi-info:before{content:'\f2e4'}.zmdi-wifi-lock:before{content:'\f2e5'}.zmdi-wifi-off:before{content:'\f2e6'}.zmdi-wifi-outline:before{content:'\f2e7'}.zmdi-wifi:before{content:'\f2e8'}.zmdi-arrow-left-bottom:before{content:'\f2e9'}.zmdi-arrow-left:before{content:'\f2ea'}.zmdi-arrow-merge:before{content:'\f2eb'}.zmdi-arrow-missed:before{content:'\f2ec'}.zmdi-arrow-right-top:before{content:'\f2ed'}.zmdi-arrow-right:before{content:'\f2ee'}.zmdi-arrow-split:before{content:'\f2ef'}.zmdi-arrows:before{content:'\f2f0'}.zmdi-caret-down-circle:before{content:'\f2f1'}.zmdi-caret-down:before{content:'\f2f2'}.zmdi-caret-left-circle:before{content:'\f2f3'}.zmdi-caret-left:before{content:'\f2f4'}.zmdi-caret-right-circle:before{content:'\f2f5'}.zmdi-caret-right:before{content:'\f2f6'}.zmdi-caret-up-circle:before{content:'\f2f7'}.zmdi-caret-up:before{content:'\f2f8'}.zmdi-chevron-down:before{content:'\f2f9'}.zmdi-chevron-left:before{content:'\f2fa'}.zmdi-chevron-right:before{content:'\f2fb'}.zmdi-chevron-up:before{content:'\f2fc'}.zmdi-forward:before{content:'\f2fd'}.zmdi-long-arrow-down:before{content:'\f2fe'}.zmdi-long-arrow-left:before{content:'\f2ff'}.zmdi-long-arrow-return:before{content:'\f300'}.zmdi-long-arrow-right:before{content:'\f301'}.zmdi-long-arrow-tab:before{content:'\f302'}.zmdi-long-arrow-up:before{content:'\f303'}.zmdi-rotate-ccw:before{content:'\f304'}.zmdi-rotate-cw:before{content:'\f305'}.zmdi-rotate-left:before{content:'\f306'}.zmdi-rotate-right:before{content:'\f307'}.zmdi-square-down:before{content:'\f308'}.zmdi-square-right:before{content:'\f309'}.zmdi-swap-alt:before{content:'\f30a'}.zmdi-swap-vertical-circle:before{content:'\f30b'}.zmdi-swap-vertical:before{content:'\f30c'}.zmdi-swap:before{content:'\f30d'}.zmdi-trending-down:before{content:'\f30e'}.zmdi-trending-flat:before{content:'\f30f'}.zmdi-trending-up:before{content:'\f310'}.zmdi-unfold-less:before{content:'\f311'}.zmdi-unfold-more:before{content:'\f312'}.zmdi-apps:before{content:'\f313'}.zmdi-grid-off:before{content:'\f314'}.zmdi-grid:before{content:'\f315'}.zmdi-view-agenda:before{content:'\f316'}.zmdi-view-array:before{content:'\f317'}.zmdi-view-carousel:before{content:'\f318'}.zmdi-view-column:before{content:'\f319'}.zmdi-view-comfy:before{content:'\f31a'}.zmdi-view-compact:before{content:'\f31b'}.zmdi-view-dashboard:before{content:'\f31c'}.zmdi-view-day:before{content:'\f31d'}.zmdi-view-headline:before{content:'\f31e'}.zmdi-view-list-alt:before{content:'\f31f'}.zmdi-view-list:before{content:'\f320'}.zmdi-view-module:before{content:'\f321'}.zmdi-view-quilt:before{content:'\f322'}.zmdi-view-stream:before{content:'\f323'}.zmdi-view-subtitles:before{content:'\f324'}.zmdi-view-toc:before{content:'\f325'}.zmdi-view-web:before{content:'\f326'}.zmdi-view-week:before{content:'\f327'}.zmdi-widgets:before{content:'\f328'}.zmdi-alarm-check:before{content:'\f329'}.zmdi-alarm-off:before{content:'\f32a'}.zmdi-alarm-plus:before{content:'\f32b'}.zmdi-alarm-snooze:before{content:'\f32c'}.zmdi-alarm:before{content:'\f32d'}.zmdi-calendar-alt:before{content:'\f32e'}.zmdi-calendar-check:before{content:'\f32f'}.zmdi-calendar-close:before{content:'\f330'}.zmdi-calendar-note:before{content:'\f331'}.zmdi-calendar:before{content:'\f332'}.zmdi-time-countdown:before{content:'\f333'}.zmdi-time-interval:before{content:'\f334'}.zmdi-time-restore-setting:before{content:'\f335'}.zmdi-time-restore:before{content:'\f336'}.zmdi-time:before{content:'\f337'}.zmdi-timer-off:before{content:'\f338'}.zmdi-timer:before{content:'\f339'}.zmdi-android-alt:before{content:'\f33a'}.zmdi-android:before{content:'\f33b'}.zmdi-apple:before{content:'\f33c'}.zmdi-behance:before{content:'\f33d'}.zmdi-codepen:before{content:'\f33e'}.zmdi-dribbble:before{content:'\f33f'}.zmdi-dropbox:before{content:'\f340'}.zmdi-evernote:before{content:'\f341'}.zmdi-facebook-box:before{content:'\f342'}.zmdi-facebook:before{content:'\f343'}.zmdi-github-box:before{content:'\f344'}.zmdi-github:before{content:'\f345'}.zmdi-google-drive:before{content:'\f346'}.zmdi-google-earth:before{content:'\f347'}.zmdi-google-glass:before{content:'\f348'}.zmdi-google-maps:before{content:'\f349'}.zmdi-google-pages:before{content:'\f34a'}.zmdi-google-play:before{content:'\f34b'}.zmdi-google-plus-box:before{content:'\f34c'}.zmdi-google-plus:before{content:'\f34d'}.zmdi-google:before{content:'\f34e'}.zmdi-instagram:before{content:'\f34f'}.zmdi-language-css3:before{content:'\f350'}.zmdi-language-html5:before{content:'\f351'}.zmdi-language-javascript:before{content:'\f352'}.zmdi-language-python-alt:before{content:'\f353'}.zmdi-language-python:before{content:'\f354'}.zmdi-lastfm:before{content:'\f355'}.zmdi-linkedin-box:before{content:'\f356'}.zmdi-paypal:before{content:'\f357'}.zmdi-pinterest-box:before{content:'\f358'}.zmdi-pocket:before{content:'\f359'}.zmdi-polymer:before{content:'\f35a'}.zmdi-share:before{content:'\f35b'}.zmdi-stackoverflow:before{content:'\f35c'}.zmdi-steam-square:before{content:'\f35d'}.zmdi-steam:before{content:'\f35e'}.zmdi-twitter-box:before{content:'\f35f'}.zmdi-twitter:before{content:'\f360'}.zmdi-vk:before{content:'\f361'}.zmdi-wikipedia:before{content:'\f362'}.zmdi-windows:before{content:'\f363'}.zmdi-aspect-ratio-alt:before{content:'\f364'}.zmdi-aspect-ratio:before{content:'\f365'}.zmdi-blur-circular:before{content:'\f366'}.zmdi-blur-linear:before{content:'\f367'}.zmdi-blur-off:before{content:'\f368'}.zmdi-blur:before{content:'\f369'}.zmdi-brightness-2:before{content:'\f36a'}.zmdi-brightness-3:before{content:'\f36b'}.zmdi-brightness-4:before{content:'\f36c'}.zmdi-brightness-5:before{content:'\f36d'}.zmdi-brightness-6:before{content:'\f36e'}.zmdi-brightness-7:before{content:'\f36f'}.zmdi-brightness-auto:before{content:'\f370'}.zmdi-brightness-setting:before{content:'\f371'}.zmdi-broken-image:before{content:'\f372'}.zmdi-center-focus-strong:before{content:'\f373'}.zmdi-center-focus-weak:before{content:'\f374'}.zmdi-compare:before{content:'\f375'}.zmdi-crop-16-9:before{content:'\f376'}.zmdi-crop-3-2:before{content:'\f377'}.zmdi-crop-5-4:before{content:'\f378'}.zmdi-crop-7-5:before{content:'\f379'}.zmdi-crop-din:before{content:'\f37a'}.zmdi-crop-free:before{content:'\f37b'}.zmdi-crop-landscape:before{content:'\f37c'}.zmdi-crop-portrait:before{content:'\f37d'}.zmdi-crop-square:before{content:'\f37e'}.zmdi-exposure-alt:before{content:'\f37f'}.zmdi-exposure:before{content:'\f380'}.zmdi-filter-b-and-w:before{content:'\f381'}.zmdi-filter-center-focus:before{content:'\f382'}.zmdi-filter-frames:before{content:'\f383'}.zmdi-filter-tilt-shift:before{content:'\f384'}.zmdi-gradient:before{content:'\f385'}.zmdi-grain:before{content:'\f386'}.zmdi-graphic-eq:before{content:'\f387'}.zmdi-hdr-off:before{content:'\f388'}.zmdi-hdr-strong:before{content:'\f389'}.zmdi-hdr-weak:before{content:'\f38a'}.zmdi-hdr:before{content:'\f38b'}.zmdi-iridescent:before{content:'\f38c'}.zmdi-leak-off:before{content:'\f38d'}.zmdi-leak:before{content:'\f38e'}.zmdi-looks:before{content:'\f38f'}.zmdi-loupe:before{content:'\f390'}.zmdi-panorama-horizontal:before{content:'\f391'}.zmdi-panorama-vertical:before{content:'\f392'}.zmdi-panorama-wide-angle:before{content:'\f393'}.zmdi-photo-size-select-large:before{content:'\f394'}.zmdi-photo-size-select-small:before{content:'\f395'}.zmdi-picture-in-picture:before{content:'\f396'}.zmdi-slideshow:before{content:'\f397'}.zmdi-texture:before{content:'\f398'}.zmdi-tonality:before{content:'\f399'}.zmdi-vignette:before{content:'\f39a'}.zmdi-wb-auto:before{content:'\f39b'}.zmdi-eject-alt:before{content:'\f39c'}.zmdi-eject:before{content:'\f39d'}.zmdi-equalizer:before{content:'\f39e'}.zmdi-fast-forward:before{content:'\f39f'}.zmdi-fast-rewind:before{content:'\f3a0'}.zmdi-forward-10:before{content:'\f3a1'}.zmdi-forward-30:before{content:'\f3a2'}.zmdi-forward-5:before{content:'\f3a3'}.zmdi-hearing:before{content:'\f3a4'}.zmdi-pause-circle-outline:before{content:'\f3a5'}.zmdi-pause-circle:before{content:'\f3a6'}.zmdi-pause:before{content:'\f3a7'}.zmdi-play-circle-outline:before{content:'\f3a8'}.zmdi-play-circle:before{content:'\f3a9'}.zmdi-play:before{content:'\f3aa'}.zmdi-playlist-audio:before{content:'\f3ab'}.zmdi-playlist-plus:before{content:'\f3ac'}.zmdi-repeat-one:before{content:'\f3ad'}.zmdi-repeat:before{content:'\f3ae'}.zmdi-replay-10:before{content:'\f3af'}.zmdi-replay-30:before{content:'\f3b0'}.zmdi-replay-5:before{content:'\f3b1'}.zmdi-replay:before{content:'\f3b2'}.zmdi-shuffle:before{content:'\f3b3'}.zmdi-skip-next:before{content:'\f3b4'}.zmdi-skip-previous:before{content:'\f3b5'}.zmdi-stop:before{content:'\f3b6'}.zmdi-surround-sound:before{content:'\f3b7'}.zmdi-tune:before{content:'\f3b8'}.zmdi-volume-down:before{content:'\f3b9'}.zmdi-volume-mute:before{content:'\f3ba'}.zmdi-volume-off:before{content:'\f3bb'}.zmdi-volume-up:before{content:'\f3bc'}.zmdi-n-1-square:before{content:'\f3bd'}.zmdi-n-2-square:before{content:'\f3be'}.zmdi-n-3-square:before{content:'\f3bf'}.zmdi-n-4-square:before{content:'\f3c0'}.zmdi-n-5-square:before{content:'\f3c1'}.zmdi-n-6-square:before{content:'\f3c2'}.zmdi-neg-1:before{content:'\f3c3'}.zmdi-neg-2:before{content:'\f3c4'}.zmdi-plus-1:before{content:'\f3c5'}.zmdi-plus-2:before{content:'\f3c6'}.zmdi-sec-10:before{content:'\f3c7'}.zmdi-sec-3:before{content:'\f3c8'}.zmdi-zero:before{content:'\f3c9'}.zmdi-airline-seat-flat-angled:before{content:'\f3ca'}.zmdi-airline-seat-flat:before{content:'\f3cb'}.zmdi-airline-seat-individual-suite:before{content:'\f3cc'}.zmdi-airline-seat-legroom-extra:before{content:'\f3cd'}.zmdi-airline-seat-legroom-normal:before{content:'\f3ce'}.zmdi-airline-seat-legroom-reduced:before{content:'\f3cf'}.zmdi-airline-seat-recline-extra:before{content:'\f3d0'}.zmdi-airline-seat-recline-normal:before{content:'\f3d1'}.zmdi-airplay:before{content:'\f3d2'}.zmdi-closed-caption:before{content:'\f3d3'}.zmdi-confirmation-number:before{content:'\f3d4'}.zmdi-developer-board:before{content:'\f3d5'}.zmdi-disc-full:before{content:'\f3d6'}.zmdi-explicit:before{content:'\f3d7'}.zmdi-flight-land:before{content:'\f3d8'}.zmdi-flight-takeoff:before{content:'\f3d9'}.zmdi-flip-to-back:before{content:'\f3da'}.zmdi-flip-to-front:before{content:'\f3db'}.zmdi-group-work:before{content:'\f3dc'}.zmdi-hd:before{content:'\f3dd'}.zmdi-hq:before{content:'\f3de'}.zmdi-markunread-mailbox:before{content:'\f3df'}.zmdi-memory:before{content:'\f3e0'}.zmdi-nfc:before{content:'\f3e1'}.zmdi-play-for-work:before{content:'\f3e2'}.zmdi-power-input:before{content:'\f3e3'}.zmdi-present-to-all:before{content:'\f3e4'}.zmdi-satellite:before{content:'\f3e5'}.zmdi-tap-and-play:before{content:'\f3e6'}.zmdi-vibration:before{content:'\f3e7'}.zmdi-voicemail:before{content:'\f3e8'}.zmdi-group:before{content:'\f3e9'}.zmdi-rss:before{content:'\f3ea'}.zmdi-shape:before{content:'\f3eb'}.zmdi-spinner:before{content:'\f3ec'}.zmdi-ungroup:before{content:'\f3ed'}.zmdi-500px:before{content:'\f3ee'}.zmdi-8tracks:before{content:'\f3ef'}.zmdi-amazon:before{content:'\f3f0'}.zmdi-blogger:before{content:'\f3f1'}.zmdi-delicious:before{content:'\f3f2'}.zmdi-disqus:before{content:'\f3f3'}.zmdi-flattr:before{content:'\f3f4'}.zmdi-flickr:before{content:'\f3f5'}.zmdi-github-alt:before{content:'\f3f6'}.zmdi-google-old:before{content:'\f3f7'}.zmdi-linkedin:before{content:'\f3f8'}.zmdi-odnoklassniki:before{content:'\f3f9'}.zmdi-outlook:before{content:'\f3fa'}.zmdi-paypal-alt:before{content:'\f3fb'}.zmdi-pinterest:before{content:'\f3fc'}.zmdi-playstation:before{content:'\f3fd'}.zmdi-reddit:before{content:'\f3fe'}.zmdi-skype:before{content:'\f3ff'}.zmdi-slideshare:before{content:'\f400'}.zmdi-soundcloud:before{content:'\f401'}.zmdi-tumblr:before{content:'\f402'}.zmdi-twitch:before{content:'\f403'}.zmdi-vimeo:before{content:'\f404'}.zmdi-whatsapp:before{content:'\f405'}.zmdi-xbox:before{content:'\f406'}.zmdi-yahoo:before{content:'\f407'}.zmdi-youtube-play:before{content:'\f408'}.zmdi-youtube:before{content:'\f409'}.zmdi-import-export:before{content:'\f30c'}.zmdi-swap-vertical-:before{content:'\f30c'}.zmdi-airplanemode-inactive:before{content:'\f102'}.zmdi-airplanemode-active:before{content:'\f103'}.zmdi-rate-review:before{content:'\f103'}.zmdi-comment-sign:before{content:'\f25a'}.zmdi-network-warning:before{content:'\f2ad'}.zmdi-shopping-cart-add:before{content:'\f1ca'}.zmdi-file-add:before{content:'\f221'}.zmdi-network-wifi-scan:before{content:'\f2e4'}.zmdi-collection-add:before{content:'\f14e'}.zmdi-format-playlist-add:before{content:'\f3ac'}.zmdi-format-queue-music:before{content:'\f3ab'}.zmdi-plus-box:before{content:'\f277'}.zmdi-tag-backspace:before{content:'\f1d9'}.zmdi-alarm-add:before{content:'\f32b'}.zmdi-battery-charging:before{content:'\f114'}.zmdi-daydream-setting:before{content:'\f217'}.zmdi-more-horiz:before{content:'\f19c'}.zmdi-book-photo:before{content:'\f11b'}.zmdi-incandescent:before{content:'\f189'}.zmdi-wb-iridescent:before{content:'\f38c'}.zmdi-calendar-remove:before{content:'\f330'}.zmdi-refresh-sync-disabled:before{content:'\f1b7'}.zmdi-refresh-sync-problem:before{content:'\f1b6'}.zmdi-crop-original:before{content:'\f17e'}.zmdi-power-off:before{content:'\f1af'}.zmdi-power-off-setting:before{content:'\f1ae'}.zmdi-leak-remove:before{content:'\f38d'}.zmdi-star-border:before{content:'\f27c'}.zmdi-brightness-low:before{content:'\f36d'}.zmdi-brightness-medium:before{content:'\f36e'}.zmdi-brightness-high:before{content:'\f36f'}.zmdi-smartphone-portrait:before{content:'\f2d4'}.zmdi-live-tv:before{content:'\f2d9'}.zmdi-format-textdirection-l-to-r:before{content:'\f249'}.zmdi-format-textdirection-r-to-l:before{content:'\f24a'}.zmdi-arrow-back:before{content:'\f2ea'}.zmdi-arrow-forward:before{content:'\f2ee'}.zmdi-arrow-in:before{content:'\f2e9'}.zmdi-arrow-out:before{content:'\f2ed'}.zmdi-rotate-90-degrees-ccw:before{content:'\f304'}.zmdi-adb:before{content:'\f33a'}.zmdi-network-wifi:before{content:'\f2e8'}.zmdi-network-wifi-alt:before{content:'\f2e3'}.zmdi-network-wifi-lock:before{content:'\f2e5'}.zmdi-network-wifi-off:before{content:'\f2e6'}.zmdi-network-wifi-outline:before{content:'\f2e7'}.zmdi-network-wifi-info:before{content:'\f2e4'}.zmdi-layers-clear:before{content:'\f18b'}.zmdi-colorize:before{content:'\f15d'}.zmdi-format-paint:before{content:'\f1ba'}.zmdi-format-quote:before{content:'\f1b2'}.zmdi-camera-monochrome-photos:before{content:'\f285'}.zmdi-sort-by-alpha:before{content:'\f1cf'}.zmdi-folder-shared:before{content:'\f225'}.zmdi-folder-special:before{content:'\f226'}.zmdi-comment-dots:before{content:'\f260'}.zmdi-reorder:before{content:'\f31e'}.zmdi-dehaze:before{content:'\f197'}.zmdi-sort:before{content:'\f1ce'}.zmdi-pages:before{content:'\f34a'}.zmdi-stack-overflow:before{content:'\f35c'}.zmdi-calendar-account:before{content:'\f204'}.zmdi-paste:before{content:'\f109'}.zmdi-cut:before{content:'\f1bc'}.zmdi-save:before{content:'\f297'}.zmdi-smartphone-code:before{content:'\f139'}.zmdi-directions-bike:before{content:'\f117'}.zmdi-directions-boat:before{content:'\f11a'}.zmdi-directions-bus:before{content:'\f121'}.zmdi-directions-car:before{content:'\f125'}.zmdi-directions-railway:before{content:'\f1b3'}.zmdi-directions-run:before{content:'\f215'}.zmdi-directions-subway:before{content:'\f1d5'}.zmdi-directions-walk:before{content:'\f216'}.zmdi-local-hotel:before{content:'\f178'}.zmdi-local-activity:before{content:'\f1df'}.zmdi-local-play:before{content:'\f1df'}.zmdi-local-airport:before{content:'\f103'}.zmdi-local-atm:before{content:'\f198'}.zmdi-local-bar:before{content:'\f137'}.zmdi-local-cafe:before{content:'\f13b'}.zmdi-local-car-wash:before{content:'\f124'}.zmdi-local-convenience-store:before{content:'\f1d3'}.zmdi-local-dining:before{content:'\f153'}.zmdi-local-drink:before{content:'\f157'}.zmdi-local-florist:before{content:'\f168'}.zmdi-local-gas-station:before{content:'\f16f'}.zmdi-local-grocery-store:before{content:'\f1cb'}.zmdi-local-hospital:before{content:'\f177'}.zmdi-local-laundry-service:before{content:'\f1e9'}.zmdi-local-library:before{content:'\f18d'}.zmdi-local-mall:before{content:'\f195'}.zmdi-local-movies:before{content:'\f19d'}.zmdi-local-offer:before{content:'\f187'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-parking:before{content:'\f1a5'}.zmdi-local-pharmacy:before{content:'\f176'}.zmdi-local-phone:before{content:'\f2be'}.zmdi-local-pizza:before{content:'\f1ac'}.zmdi-local-post-office:before{content:'\f15a'}.zmdi-local-printshop:before{content:'\f1b0'}.zmdi-local-see:before{content:'\f28c'}.zmdi-local-shipping:before{content:'\f1e6'}.zmdi-local-store:before{content:'\f1d4'}.zmdi-local-taxi:before{content:'\f123'}.zmdi-local-wc:before{content:'\f211'}.zmdi-my-location:before{content:'\f299'}.zmdi-directions:before{content:'\f1e7'} \ No newline at end of file
diff --git a/packages/website/public/css/roboto.css b/packages/website/public/css/roboto.css
deleted file mode 100644
index 4c4a126b0..000000000
--- a/packages/website/public/css/roboto.css
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-NOTE: This file includes several font faces that are commented out. They are
-not currently used by this app but could be at a future point. For this reason,
-we leave them commented out rather then removing them completely.
-*/
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Thin.ttf') format('truetype');
- font-weight: 100;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-ThinItalic.ttf') format('truetype');
- font-weight: 100;
- font-style: italic;
-}*/
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Light.ttf') format('truetype');
- font-weight: 300;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-LightItalic.ttf') format('truetype');
- font-weight: 300;
- font-style: italic;
-}*/
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Regular.ttf') format('truetype');
- font-weight: 400;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-RegularItalic.ttf') format('truetype');
- font-weight: 400;
- font-style: italic;
-}*/
-
-/*@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Medium.ttf') format('truetype');
- font-weight: 500;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-MediumItalic.ttf') format('truetype');
- font-weight: 500;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Bold.ttf') format('truetype');
- font-weight: 700;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-BoldItalic.ttf') format('truetype');
- font-weight: 700;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-Black.ttf') format('truetype');
- font-weight: 900;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto';
- src: url('../fonts/Roboto-BlackItalic.ttf') format('truetype');
- font-weight: 900;
- font-style: italic;
-}*/
diff --git a/packages/website/public/css/roboto_mono.css b/packages/website/public/css/roboto_mono.css
deleted file mode 100644
index f8159d35f..000000000
--- a/packages/website/public/css/roboto_mono.css
+++ /dev/null
@@ -1,69 +0,0 @@
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-Thin.ttf') format('truetype');
- font-weight: 100;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-ThinItalic.ttf') format('truetype');
- font-weight: 100;
- font-style: italic;
-}*/
-
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-Light.ttf') format('truetype');
- font-weight: 300;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-LightItalic.ttf') format('truetype');
- font-weight: 300;
- font-style: italic;
-}*/
-
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-Regular.ttf') format('truetype');
- font-weight: 400;
- font-style: normal;
-}
-
-/*@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-RegularItalic.ttf') format('truetype');
- font-weight: 400;
- font-style: italic;
-}*/
-
-/*@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-Medium.ttf') format('truetype');
- font-weight: 500;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-MediumItalic.ttf') format('truetype');
- font-weight: 500;
- font-style: italic;
-}
-
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-Bold.ttf') format('truetype');
- font-weight: 700;
- font-style: normal;
-}
-
-@font-face {
- font-family: 'Roboto Mono';
- src: url('../fonts/RobotoMono-BoldItalic.ttf') format('truetype');
- font-weight: 700;
- font-style: italic;
-}*/
diff --git a/packages/website/public/fonts/Formular-Light.woff b/packages/website/public/fonts/Formular-Light.woff
deleted file mode 100644
index 79c774b40..000000000
--- a/packages/website/public/fonts/Formular-Light.woff
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Formular-Light.woff2 b/packages/website/public/fonts/Formular-Light.woff2
deleted file mode 100644
index 6502d5da1..000000000
--- a/packages/website/public/fonts/Formular-Light.woff2
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Formular-Regular.woff b/packages/website/public/fonts/Formular-Regular.woff
deleted file mode 100644
index 651364b9b..000000000
--- a/packages/website/public/fonts/Formular-Regular.woff
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Formular-Regular.woff2 b/packages/website/public/fonts/Formular-Regular.woff2
deleted file mode 100644
index 91cdbf29f..000000000
--- a/packages/website/public/fonts/Formular-Regular.woff2
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Material-Design-Iconic-Font.eot b/packages/website/public/fonts/Material-Design-Iconic-Font.eot
deleted file mode 100755
index 5e2519150..000000000
--- a/packages/website/public/fonts/Material-Design-Iconic-Font.eot
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Material-Design-Iconic-Font.svg b/packages/website/public/fonts/Material-Design-Iconic-Font.svg
deleted file mode 100755
index 1d3d2eaa2..000000000
--- a/packages/website/public/fonts/Material-Design-Iconic-Font.svg
+++ /dev/null
@@ -1,787 +0,0 @@
-<?xml version="1.0" standalone="no"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
-<svg xmlns="http://www.w3.org/2000/svg">
-<metadata></metadata>
-<defs>
-<font id="material-desidesigniconicfont" horiz-adv-x="427" >
-<font-face units-per-em="512" ascent="448" descent="-64" />
-<missing-glyph horiz-adv-x="500" />
-<glyph unicode="&#xf101;" horiz-adv-x="510" d="M159 -10l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32q6 -60 40 -108t87 -73zM178 129q14 0 21 7t7 20q0 7 -2 12t-6 8q-4 4 -9.5 5.5t-13.5 1.5h-16v22h16q8 0 13 2t8 5q4 3 6 8t2 10q0 12 -7 19q-6 6 -19 6q-5 0 -10 -2q-4 -1 -8 -4q-3 -3 -5 -8q-2 -4 -2 -9 h-28q0 10 4 18t11 14t17 10q9 3 21 3q11 0 22 -3q10 -3 16 -9q7 -6 11 -15t4 -20q0 -5 -2 -10q-1 -5 -4 -10q-4 -5 -8 -9q-5 -4 -11 -7q7 -3 13 -7q5 -4 8 -9q3 -4 5 -11q2 -5 2 -12q0 -11 -5 -20q-4 -9 -11.5 -15.5t-17.5 -9.5t-22 -3q-11 0 -21 3q-9 3 -17 9t-12 14.5 t-4 20.5h27q0 -6 2 -10.5t6 -7.5q3 -3 8 -5t11 -2zM360.5 255.5q10.5 -10.5 16.5 -25.5q5 -16 5 -34v-8q0 -19 -5 -34q-6 -15 -16 -25q-10 -11 -25 -17q-14 -5 -32 -5h-49v170h50q18 0 31.5 -5.5t24 -16zM352 188v8q0 28 -12 43q-12 14 -35 14h-20v-123h19q12 0 21 4t15 11 q6 8 9 19t3 24zM255 448q100 0 173.5 -68t81.5 -166h-32q-6 59 -40.5 107t-86.5 73l-29 -28l-81 81z" />
-<glyph unicode="&#xf102;" horiz-adv-x="405" d="M235 256l170 -107v-42l-67 21l-167 167v78q0 14 9 23t22.5 9t23 -9t9.5 -23v-117zM21 336l27 27l336 -336l-27 -27l-122 122v-79l42 -32v-32l-74 21l-75 -21v32l43 32v117l-171 -53v42l128 80z" />
-<glyph unicode="&#xf103;" horiz-adv-x="405" d="M175 256zM405 107l-170 53v-117l42 -32v-32l-74 21l-75 -21v32l43 32v117l-171 -53v42l171 107v117q0 14 9 23t22.5 9t23 -9t9.5 -23v-117l170 -107v-42z" />
-<glyph unicode="&#xf104;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 96q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM213.5 213q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6z " />
-<glyph unicode="&#xf105;" horiz-adv-x="384" d="M374 336q10 -11 10 -27v-266q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v266q0 16 10 27l29 36q10 12 25 12h256q15 0 25 -12zM192 75l117 117h-74v43h-86v-43h-74zM45 341h294l-20 22h-256z" />
-<glyph unicode="&#xf106;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M192 299q-27 0 -45.5 -19t-18.5 -45.5t18.5 -45t45.5 -18.5t45.5 18.5t18.5 45t-18.5 45.5t-45.5 19zM320 43v30q0 19 -23.5 35t-52.5 23.5t-52 7.5t-52 -7.5t-52.5 -23.5t-23.5 -35v-30h256z" />
-<glyph unicode="&#xf107;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM213 64v43h-42v-43h42zM213 149v128h-42v-128h42zM192 341q9 0 15 6.5t6 15 t-6 15t-15 6.5t-15 -6.5t-6 -15t6 -15t15 -6.5z" />
-<glyph unicode="&#xf108;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M149 85l171 171l-30 30l-141 -140l-55 55l-30 -30z" />
-<glyph unicode="&#xf109;" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 405q-9 0 -15 -6t-6 -15t6 -15t15 -6t15 6t6 15t-6 15t-15 6zM341 21v342 h-42v-64h-214v64h-42v-342h298z" />
-<glyph unicode="&#xf10a;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M277 128v85h-85v64l-107 -106l107 -107v64h85z" />
-<glyph unicode="&#xf10b;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 31t36.5 12t36.5 -12t23.5 -31h89zM192 384q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5z M192 64l107 107h-64v85h-86v-85h-64z" />
-<glyph unicode="&#xf10c;" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h89q7 19 23.5 30.5t36.5 11.5t36.5 -11.5t23.5 -30.5h89zM192 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15 t-15 6.5zM235 64v43h-150v-43h150zM299 149v43h-214v-43h214zM299 235v42h-214v-42h214z" />
-<glyph unicode="&#xf10d;" horiz-adv-x="235" d="M203 320h32v-245q0 -49 -34.5 -83.5t-83 -34.5t-83 34.5t-34.5 83.5v266q0 36 25 61t60.5 25t60.5 -25t25 -61v-224q0 -22 -16 -37.5t-38 -15.5t-37.5 15.5t-15.5 37.5v203h32v-203q0 -8 6.5 -14.5t15 -6.5t15 6.5t6.5 14.5v224q0 22 -16 38t-38 16t-37.5 -16t-15.5 -38 v-266q0 -36 25 -61t60.5 -25t60.5 25t25 61v245z" />
-<glyph unicode="&#xf10e;" d="M117 75q-48 0 -82.5 34t-34.5 83t34.5 83t82.5 34h224q36 0 61 -25t25 -60t-25 -60t-61 -25h-181q-22 0 -37.5 15.5t-15.5 37.5t15.5 37.5t37.5 15.5h160v-32h-160q-9 0 -15 -6t-6 -15t6 -15t15 -6h181q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5h-224q-35 0 -60 -25 t-25 -60t25 -60t60 -25h203v-32h-203z" />
-<glyph unicode="&#xf10f;" horiz-adv-x="277" d="M128 384h149v-64h-85v-235h-1q-4 -36 -31 -60.5t-64 -24.5q-40 0 -68 28t-28 68t28 68t68 28q15 0 32 -6v198z" />
-<glyph unicode="&#xf110;" horiz-adv-x="384" d="M341 427q18 0 30.5 -12.5t12.5 -30.5v-276q0 -23 -19 -35l-173 -116l-173 116q-19 12 -19 35v276q0 18 12.5 30.5t30.5 12.5h298zM149 107l192 192l-30 30l-162 -162l-76 76l-30 -30z" />
-<glyph unicode="&#xf111;" horiz-adv-x="405" d="M384 64v-21q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-21h-192q-18 0 -30.5 -12.5t-12.5 -30.5v-170q0 -18 12.5 -30.5t30.5 -12.5h192zM192 107v170h213v-170h-213zM277.5 160 q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5z" />
-<glyph unicode="&#xf112;" horiz-adv-x="405" d="M43 235h64v-150h-64v150zM171 235h64v-150h-64v150zM0 -21v64h405v-64h-405zM299 235h64v-150h-64v150zM203 427l202 -107v-43h-405v43z" />
-<glyph unicode="&#xf113;" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM128 64v43h-43v-43h43zM128 149v107h-43v-107h43z" />
-<glyph unicode="&#xf114;" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM85 21l86 160h-43v118l-85 -160h42v-118z" />
-<glyph unicode="&#xf115;" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36zM127 65v41h-41v-41h41zM156 177q15 15 15 36q0 27 -19 45.5t-45.5 18.5t-45 -18.5t-18.5 -45.5h32q0 14 9 23t22.5 9t23 -9t9.5 -22.5 t-10 -22.5l-20 -20q-19 -21 -19 -43h34q0 16 17 34z" />
-<glyph unicode="&#xf116;" horiz-adv-x="213" d="M185 363q12 0 20 -8.5t8 -20.5v-327q0 -12 -8 -20t-20 -8h-157q-11 0 -19.5 8t-8.5 20v327q0 12 8.5 20.5t19.5 8.5h36v42h85v-42h36z" />
-<glyph unicode="&#xf117;" horiz-adv-x="512" d="M330.5 331q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5zM106.5 192q44.5 0 75.5 -31t31 -75.5t-31 -75.5t-75.5 -31t-75.5 31t-31 75.5t31 75.5t75.5 31zM106.5 11q30.5 0 52.5 22t22 52.5t-22 52.5t-52.5 22t-52.5 -22t-22 -52.5 t22 -52.5t52.5 -22zM230 224l47 -49v-132h-42v106l-69 60q-12 10 -12 30q0 17 12 30l60 60q10 12 30 12q18 0 34 -12l41 -41q32 -32 76 -32v-43q-64 0 -108 45l-17 17zM405.5 192q44.5 0 75.5 -31t31 -75.5t-31 -75.5t-75.5 -31t-75.5 31t-31 75.5t31 75.5t75.5 31z M405.5 11q30.5 0 52.5 22t22 52.5t-22 52.5t-52.5 22t-52.5 -22t-22 -52.5t22 -52.5t52.5 -22z" />
-<glyph unicode="&#xf118;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 21q58 0 105 36l-239 240q-36 -47 -36 -105q0 -71 50 -121t120 -50zM348 87q36 47 36 105q0 71 -50 121t-121 50q-58 0 -104 -36z" />
-<glyph unicode="&#xf119;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM43 192q0 -59 36 -105l239 240q-46 36 -105 36q-70 0 -120 -50t-50 -121zM213 21q71 0 121 50t50 121q0 59 -36 105l-239 -240q46 -36 104 -36z" />
-<glyph unicode="&#xf11a;" d="M384 0h43v-43h-43q-44 0 -85 21q-41 -20 -86 -20t-85 20q-42 -21 -85 -21h-43v43h43q45 0 85 28q39 -27 85.5 -27t85.5 27q40 -28 85 -28zM42 43l-41 142q-3 8 1 17q4 8 13 10l28 9v99q0 18 12.5 30.5t29.5 12.5h64v64h128v-64h64q18 0 30.5 -12.5t12.5 -30.5v-99l27 -9 q9 -2 13 -10t1 -17l-40 -142h-1q-48 0 -85 42q-38 -42 -86 -42t-85 42q-37 -42 -85 -42h-1zM85 320v-85l128 42l128 -42v85h-256z" />
-<glyph unicode="&#xf11b;" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM43 363v-171l53 32l53 -32v171h-106zM43 43h256l-83 109l-64 -82l-45 55z" />
-<glyph unicode="&#xf11c;" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM43 363v-171l53 32l53 -32v171h-106z" />
-<glyph unicode="&#xf11d;" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-341l-150 64l-149 -64v341q0 18 12.5 30.5t30.5 12.5h213zM256 64v277h-213v-277l106 47z" />
-<glyph unicode="&#xf11e;" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-341l-150 64l-149 -64v341q0 18 12.5 30.5t30.5 12.5h213z" />
-<glyph unicode="&#xf11f;" horiz-adv-x="405" d="M106.5 149q26.5 0 45.5 -18.5t19 -45.5q0 -35 -25 -60t-61 -25q-24 0 -47 11.5t-38 31.5q15 0 29 11.5t14 30.5q0 27 18.5 45.5t45 18.5zM399 349q6 -6 6 -15t-6 -15l-191 -191l-59 59l191 191q7 6 15.5 6t15.5 -6z" />
-<glyph unicode="&#xf120;" horiz-adv-x="341" d="M341 277v-42h-44q2 -13 2 -22v-21h42v-43h-42v-21q0 -9 -2 -21h44v-43h-60q-17 -29 -46 -46.5t-64 -17.5t-64.5 17.5t-46.5 46.5h-60v43h45q-2 12 -2 21v21h-43v43h43v21q0 9 2 22h-45v42h60q15 26 39 42l-35 35l30 30l47 -46q14 3 29.5 3t30.5 -3l46 46l30 -30l-34 -35 q24 -16 38 -42h60zM213 107v42h-85v-42h85zM213 192v43h-85v-43h85z" />
-<glyph unicode="&#xf121;" horiz-adv-x="341" d="M0 107v213q0 27 12.5 44.5t38 26t53 11.5t67 3t67 -3t53 -11.5t38 -26t12.5 -44.5v-213q0 -28 -21 -48v-38q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-171v-22q0 -8 -6 -14.5t-15 -6.5h-21q-9 0 -15.5 6.5t-6.5 14.5v38q-21 20 -21 48zM74.5 85 q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM266.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM299 213v107h-256v-107h256z" />
-<glyph unicode="&#xf122;" horiz-adv-x="384" d="M192 320q-18 0 -30.5 12.5t-12.5 30.5q0 12 7 22l36 63l36 -63q7 -10 7 -22q0 -18 -12.5 -30.5t-30.5 -12.5zM290 107q22 -22 52 -22q23 0 42 13v-98q0 -9 -6.5 -15t-14.5 -6h-342q-8 0 -14.5 6t-6.5 15v98q19 -13 42 -13q30 0 52 22l23 23l23 -23q21 -21 52 -21t52 21 l23 23zM320 256q27 0 45.5 -18.5t18.5 -45.5v-33q0 -17 -12.5 -29.5t-29.5 -12.5t-29 12l-46 46l-46 -46q-11 -11 -29 -11t-30 11l-45 46l-46 -46q-12 -12 -29 -12t-29.5 12.5t-12.5 29.5v33q0 27 18.5 45.5t45.5 18.5h107v43h42v-43h107z" />
-<glyph unicode="&#xf123;" horiz-adv-x="384" d="M340 320l44 -128v-171q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-256v-22q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v171l44 128q8 21 31 21h53v43h128v-43h53q23 0 31 -21zM74.5 107q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5 t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM309.5 107q13.5 0 22.5 9t9 22.5t-9 23t-22.5 9.5t-23 -9.5t-9.5 -23t9.5 -22.5t23 -9zM43 213h298l-32 96h-234z" />
-<glyph unicode="&#xf124;" horiz-adv-x="384" d="M298.5 341q-13.5 0 -22.5 9.5t-9 22.5q0 10 8 24.5t16 23.5l8 10q32 -36 32 -58q0 -13 -9.5 -22.5t-23 -9.5zM192 341q-13 0 -22.5 9.5t-9.5 22.5q0 10 8 24.5t16 23.5l8 10q32 -36 32 -58q0 -13 -9.5 -22.5t-22.5 -9.5zM85.5 341q-13.5 0 -23 9.5t-9.5 22.5q0 10 8 24.5 t16 23.5l8 10q32 -36 32 -58q0 -13 -9 -22.5t-22.5 -9.5zM340 277l44 -128v-170q0 -9 -6.5 -15.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 15.5v21h-256v-21q0 -9 -6.5 -15.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 15.5v170l44 128q8 22 31 22h234q23 0 31 -22zM74.5 64 q13.5 0 23 9.5t9.5 22.5t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5t22.5 -9.5zM309.5 64q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5zM43 171h298l-32 96h-234z" />
-<glyph unicode="&#xf125;" horiz-adv-x="384" d="M340 320l44 -128v-171q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v22h-256v-22q0 -8 -6.5 -14.5t-14.5 -6.5h-22q-8 0 -14.5 6.5t-6.5 14.5v171l44 128q8 21 31 21h234q23 0 31 -21zM74.5 107q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23 t9 -22.5t22.5 -9zM309.5 107q13.5 0 22.5 9t9 22.5t-9 23t-22.5 9.5t-23 -9.5t-9.5 -23t9.5 -22.5t23 -9zM43 213h298l-32 96h-234z" />
-<glyph unicode="&#xf126;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h46q-4 11 -4 21q0 27 19 45.5t45 18.5q34 0 54 -28l10 -15l11 15q19 28 53 28q27 0 45.5 -18.5t18.5 -45.5q0 -10 -4 -21h47z M277.5 363q-8.5 0 -15 -6.5t-6.5 -15t6.5 -15t15 -6.5t15 6.5t6.5 15t-6.5 15t-15 6.5zM149.5 363q-8.5 0 -15 -6.5t-6.5 -15t6.5 -15t15 -6.5t15 6.5t6.5 15t-6.5 15t-15 6.5zM384 43v42h-341v-42h341zM384 149v128h-108l44 -60l-35 -25l-50 69l-22 29l-21 -29l-51 -69 l-34 25l44 60h-108v-128h341z" />
-<glyph unicode="&#xf127;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-85v-106l-86 42l-85 -42v106h-85q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h341zM384 128v43h-341v-43h341zM384 235v128h-341v-128h341z" />
-<glyph unicode="&#xf128;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h64v43q0 17 12.5 29.5t29.5 12.5h128q18 0 30.5 -12.5t12.5 -29.5v-43h64zM149 363v-43h128v43h-128zM384 43v42h-341v-42h341z M384 149v128h-64v-42h-43v42h-128v-42h-42v42h-64v-128h341z" />
-<glyph unicode="&#xf129;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v128h-341v-128h341zM384 277v43h-341v-43h341z" />
-<glyph unicode="&#xf12a;" d="M384 309q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h85v43l43 43h85l43 -43v-43h85zM171 352v-43h85v43h-85zM181 64l141 141l-30 30l-111 -111l-44 45l-30 -30z" />
-<glyph unicode="&#xf12b;" d="M384 309q18 0 30.5 -12.5t12.5 -29.5v-235q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v235q0 17 12.5 29.5t30.5 12.5h85v43l43 43h85l43 -43v-43h85zM171 352v-43h85v43h-85zM213 32l107 107h-64v85h-85v-85h-64z" />
-<glyph unicode="&#xf12c;" d="M299 320h128v-277q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v277h128v43q0 17 12.5 29.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -29.5v-43zM171 363v-43h85v43h-85zM149 64l160 107l-160 85v-192z" />
-<glyph unicode="&#xf12d;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t30.5 12.5h85v43q0 17 12.5 29.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -29.5v-43h85zM256 320v43h-85v-43h85z" />
-<glyph unicode="&#xf12e;" horiz-adv-x="469" d="M0 64q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 149q62 0 105.5 -43.5t43.5 -105.5h-42q0 44 -31.5 75.5t-75.5 31.5v42zM384 299v-214h-120q-21 64 -68 111t-111 68v35h299zM0 235q97 0 166 -69t69 -166h-43q0 80 -56 136t-136 56v43zM427 384q17 0 29.5 -12.5t12.5 -30.5 v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-150v43h150v298h-384v-64h-43v64q0 18 12.5 30.5t30.5 12.5h384z" />
-<glyph unicode="&#xf12f;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-150v43h150v298h-384v-64h-43v64q0 18 12.5 30.5t30.5 12.5h384zM0 64q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 149q62 0 105.5 -43.5t43.5 -105.5h-42q0 44 -31.5 75.5t-75.5 31.5v42zM0 235 q97 0 166 -69t69 -166h-43q0 80 -56 136t-136 56v43z" />
-<glyph unicode="&#xf130;" d="M235 404q81 -8 136.5 -68.5t55.5 -143.5q0 -45 -19 -87l-56 33q11 27 11 54q0 56 -37 98t-91 50v64zM213 43q72 0 117 56l55 -33q-30 -41 -75 -64t-97 -23q-88 0 -150.5 62.5t-62.5 150.5q0 83 55.5 143.5t136.5 68.5v-64q-55 -8 -91.5 -50t-36.5 -98q0 -62 43.5 -105.5 t105.5 -43.5z" />
-<glyph unicode="&#xf131;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM128 85v150h-43v-150h43zM213 85v214h-42v-214h42zM299 85v86h-43v-86h43z" />
-<glyph unicode="&#xf132;" d="M213 299h214v-299h-427v384h213v-85zM85 43v42h-42v-42h42zM85 128v43h-42v-43h42zM85 213v43h-42v-43h42zM85 299v42h-42v-42h42zM171 43v42h-43v-42h43zM171 128v43h-43v-43h43zM171 213v43h-43v-43h43zM171 299v42h-43v-42h43zM384 43v213h-171v-43h43v-42h-43v-43h43 v-43h-43v-42h171zM341 213v-42h-42v42h42zM341 128v-43h-42v43h42z" />
-<glyph unicode="&#xf133;" horiz-adv-x="384" d="M256 213h128v-213h-384v299h128v42l64 64l64 -64v-128zM85 43v42h-42v-42h42zM85 128v43h-42v-43h42zM85 213v43h-42v-43h42zM213 43v42h-42v-42h42zM213 128v43h-42v-43h42zM213 213v43h-42v-43h42zM213 299v42h-42v-42h42zM341 43v42h-42v-42h42zM341 128v43h-42v-43 h42z" />
-<glyph unicode="&#xf134;" d="M269 277l30 -30l-56 -55l56 -55l-30 -30l-56 55l-55 -55l-30 30l55 55l-55 55l30 30l55 -55zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf135;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 115l-77 77l77 77l-30 30l-77 -77l-76 77l-30 -30l76 -77l-76 -77l30 -30l76 77l77 -77z" />
-<glyph unicode="&#xf136;" horiz-adv-x="299" d="M299 311l-120 -119l120 -119l-30 -30l-120 119l-119 -119l-30 30l119 119l-119 119l30 30l119 -119l120 119z" />
-<glyph unicode="&#xf137;" horiz-adv-x="384" d="M171 171l-171 170v43h384v-43l-171 -170v-128h107v-43h-256v43h107v128zM96 299h192l43 42h-278z" />
-<glyph unicode="&#xf138;" horiz-adv-x="477" d="M148 304l-93 -112l93 -112l-33 -27l-115 139l115 139zM132 171v42h43v-42h-43zM345 213v-42h-42v42h42zM217 171v42h43v-42h-43zM362 331l115 -139l-115 -139l-33 27l93 112l-93 112z" />
-<glyph unicode="&#xf139;" horiz-adv-x="341" d="M64 341v-42h-43v85q0 18 12.5 30.5t30.5 12.5l213 -1q18 0 30.5 -12t12.5 -30v-85h-43v42h-213zM243 94l-30 30l68 68l-68 68l30 30l98 -98zM128 124l-30 -30l-98 98l98 98l30 -30l-68 -68zM277 43v42h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5 t-12.5 30.5v85h43v-42h213z" />
-<glyph unicode="&#xf13a;" d="M158 94l-30 -30l-128 128l128 128l30 -30l-98 -98zM269 94l98 98l-98 98l30 30l128 -128l-128 -128z" />
-<glyph unicode="&#xf13b;" d="M384 384q18 0 30.5 -12.5t12.5 -30.5v-64q0 -17 -12.5 -29.5t-30.5 -12.5h-43v-64q0 -36 -25 -61t-60 -25h-128q-35 0 -60 25t-25 61v213h341zM384 277v64h-43v-64h43zM0 0v43h384v-43h-384z" />
-<glyph unicode="&#xf13c;" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM384 192v171h-107v-171l54 32z" />
-<glyph unicode="&#xf13d;" horiz-adv-x="469" d="M43 256v-235h341q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v235h43zM363 341h106v-234q0 -18 -12.5 -30.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 30.5v234h107v43q0 18 12.5 30.5t30.5 12.5h85q18 0 30.5 -12.5t12.5 -30.5v-43zM235 384v-43 h85v43h-85zM235 128l117 85l-117 64v-149z" />
-<glyph unicode="&#xf13e;" horiz-adv-x="512" d="M43 320v-299h384v-42h-384q-18 0 -30.5 12.5t-12.5 29.5v192v107h43zM469 363q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5l1 256q0 17 12 29.5t30 12.5h128l43 -42h170zM149 128h299l-75 96l-53 -64l-75 96z" />
-<glyph unicode="&#xf13f;" horiz-adv-x="469" d="M319 228l76 -100h-235l59 75l41 -50zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299 v-299h299z" />
-<glyph unicode="&#xf140;" d="M427 107q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256q18 0 30.5 -12.5t12.5 -29.5v-256zM192 192l-64 -85h256l-85 106l-64 -79zM0 320h43v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299z" />
-<glyph unicode="&#xf141;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM277 128v171h-42v42h85v-213h-43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299 h299z" />
-<glyph unicode="&#xf142;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM341 171v-43h-128v85 q0 18 12.5 30.5t30.5 12.5h43v43h-86v42h86q17 0 29.5 -12.5t12.5 -29.5v-43q0 -18 -12.5 -30.5t-29.5 -12.5h-43v-42h85z" />
-<glyph unicode="&#xf143;" horiz-adv-x="469" d="M427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM341 171q0 -18 -12.5 -30.5 t-29.5 -12.5h-86v43h86v42h-43v43h43v43h-86v42h86q17 0 29.5 -12.5t12.5 -29.5v-32q0 -14 -9 -23t-23 -9q14 0 23 -9.5t9 -22.5v-32z" />
-<glyph unicode="&#xf144;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM299 128v85h-86v128h43v-85h43v85h42v-213h-42zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85 v299h-299v-299h299z" />
-<glyph unicode="&#xf145;" horiz-adv-x="469" d="M427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM341 171q0 -18 -12.5 -30.5 t-29.5 -12.5h-86v43h86v42h-86v128h128v-42h-85v-43h43q17 0 29.5 -12.5t12.5 -30.5v-42z" />
-<glyph unicode="&#xf146;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128q-18 0 -30.5 12.5 t-12.5 30.5v128q0 17 12.5 29.5t30.5 12.5h85v-42h-85v-43h43q17 0 29.5 -12.5t12.5 -30.5v-42q0 -18 -12.5 -30.5t-29.5 -12.5h-43zM256 213v-42h43v42h-43z" />
-<glyph unicode="&#xf147;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128h-43l86 171h-86v42 h128v-42z" />
-<glyph unicode="&#xf148;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM256 128q-18 0 -30.5 12.5 t-12.5 30.5v32q0 13 9.5 22.5t22.5 9.5q-13 0 -22.5 9t-9.5 23v32q0 17 12.5 29.5t30.5 12.5h43q17 0 29.5 -12.5t12.5 -29.5v-32q0 -14 -9 -23t-23 -9q14 0 23 -9.5t9 -22.5v-32q0 -18 -12.5 -30.5t-29.5 -12.5h-43zM256 299v-43h43v43h-43zM256 213v-42h43v42h-43z" />
-<glyph unicode="&#xf149;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM277 192q0 -18 -12.5 -30.5t-29.5 -12.5h-64v43h64v21h-22q-17 0 -29.5 12.5t-12.5 30.5v21q0 18 12.5 30.5t29.5 12.5h22q17 0 29.5 -12.5t12.5 -30.5v-85zM213 256h22v21h-22v-21zM427 427 q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 256v128h-299v-299h299v128h-43v-42h-43v42h-42v43h42v43h43v-43h43z" />
-<glyph unicode="&#xf14a;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299zM299 341q17 0 29.5 -12.5 t12.5 -29.5v-128q0 -18 -12.5 -30.5t-29.5 -12.5h-86v43h86v42h-43q-18 0 -30.5 12.5t-12.5 30.5v43q0 17 12.5 29.5t30.5 12.5h43zM299 256v43h-43v-43h43z" />
-<glyph unicode="&#xf14b;" horiz-adv-x="469" d="M43 341v-341h341v-43h-341q-18 0 -30.5 12.5t-12.5 30.5v341h43zM427 427q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-299q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h299zM427 85v299h-299v-299h299z" />
-<glyph unicode="&#xf14c;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM341 299v42h-85v-117q-14 11 -32 11q-22 0 -37.5 -16t-15.5 -38t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5v118h64z M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43z" />
-<glyph unicode="&#xf14d;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM203 245v22q0 13 -9.5 22.5t-22.5 9.5h-54v-128h32v42h22q13 0 22.5 9.5t9.5 22.5zM309 203v64q0 13 -9 22.5t-23 9.5h-53 v-128h53q14 0 23 9t9 23zM395 267v32h-64v-128h32v42h32v32h-32v22h32zM149 245v22h22v-22h-22zM43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM256 203v64h21v-64h-21z" />
-<glyph unicode="&#xf14e;" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM363 213v43h-86v85h-42v-85h-86v-43h86v-85h42v85h86z " />
-<glyph unicode="&#xf14f;" horiz-adv-x="341" d="M303 427q16 0 27 -11.5t11 -27.5v-307q0 -16 -11 -27t-27 -11h-179q-16 0 -27.5 11t-11.5 27v307q0 16 11.5 27.5t27.5 11.5h179zM213.5 384q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM213.5 96q35.5 0 60.5 25t25 60.5 t-25 60.5t-60.5 25t-60.5 -25t-25 -60.5t25 -60.5t60.5 -25zM160 181.5q0 53.5 53.5 53.5t53.5 -53.5t-53.5 -53.5t-53.5 53.5zM43 341v-341h213v-43h-213q-18 0 -30.5 12.5t-12.5 30.5v341h43z" />
-<glyph unicode="&#xf150;" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM363 213v43h-214v-43h214zM277 128v43h-128v-43h128z M363 299v42h-214v-42h214z" />
-<glyph unicode="&#xf151;" d="M43 320v-299h298v-42h-298q-18 0 -30.5 12.5t-12.5 29.5v299h43zM384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h256zM213 139l128 96l-128 96v-192z" />
-<glyph unicode="&#xf152;" d="M213.5 215q9.5 0 16.5 -6.5t7 -16.5t-7 -16.5t-16.5 -6.5t-16.5 6.5t-7 16.5t7 16.5t16.5 6.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM260 145l81 175l-174 -81l-82 -175z" />
-<glyph unicode="&#xf153;" horiz-adv-x="408" d="M114 163l-89 90q-25 25 -25 60t25 60l150 -149zM259 202l-31 -31l146 -147l-30 -30l-146 147l-147 -147l-31 30l209 208q-12 24 -4 56t33 57q31 30 69 35t61.5 -18.5t18.5 -61.5t-36 -69q-25 -25 -56.5 -33t-55.5 4z" />
-<glyph unicode="&#xf154;" horiz-adv-x="299" d="M21 43v256h256v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-171q-18 0 -30.5 12.5t-12.5 30.5zM299 363v-43h-299v43h75l21 21h107l21 -21h75z" />
-<glyph unicode="&#xf155;" horiz-adv-x="341" d="M170.5 43q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 427q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 341q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5z M170.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 171q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 299q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 427q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" />
-<glyph unicode="&#xf156;" horiz-adv-x="384" d="M363 171q8 0 14.5 -6.5t6.5 -15.5v-128q0 -8 -6.5 -14.5t-14.5 -6.5h-342q-8 0 -14.5 6.5t-6.5 14.5v128q0 9 6.5 15.5t14.5 6.5h342zM85.5 43q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5zM363 384q8 0 14.5 -6.5t6.5 -14.5v-128 q0 -9 -6.5 -15.5t-14.5 -6.5h-342q-8 0 -14.5 6.5t-6.5 15.5v128q0 8 6.5 14.5t14.5 6.5h342zM85.5 256q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" />
-<glyph unicode="&#xf157;" horiz-adv-x="384" d="M0 405h384l-43 -389q-2 -16 -14 -26.5t-28 -10.5h-214q-16 0 -28 10.5t-14 26.5zM192 43q27 0 45.5 18.5t18.5 45.5q0 19 -16 47.5t-32 48.5l-16 19q-7 -8 -17.5 -21.5t-28.5 -44t-18 -49.5q0 -27 18.5 -45.5t45.5 -18.5zM327 277l9 86h-288l9 -86h270z" />
-<glyph unicode="&#xf158;" horiz-adv-x="384" d="M0 80l236 236l80 -80l-236 -236h-80v80zM378 298l-39 -39l-80 80l39 39q6 6 15 6t15 -6l50 -50q6 -6 6 -15t-6 -15z" />
-<glyph unicode="&#xf159;" d="M426 277l1 -213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v213q0 24 20 37l193 113l193 -113q20 -13 20 -37zM213 171l177 110l-177 103l-176 -103z" />
-<glyph unicode="&#xf15a;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 277v43l-171 -107l-170 107v-43l170 -106z" />
-<glyph unicode="&#xf15b;" horiz-adv-x="469" d="M235 299q-20 0 -39 -8l-46 46q41 15 84 15q79 0 143 -44.5t92 -115.5q-23 -60 -73 -101l-62 62q7 19 7 39q0 44 -31 75.5t-75 31.5zM21 357l27 27l379 -378l-27 -27l-63 62l-9 9q-45 -18 -93 -18q-79 0 -143 44.5t-92 115.5q25 64 80 106l-10 10zM139 239 q-11 -23 -11 -47q0 -44 31.5 -75.5t75.5 -31.5q24 0 47 12l-33 33q-8 -2 -14 -2q-27 0 -45.5 18.5t-18.5 45.5q0 7 1 14zM231 256h4q26 0 45 -19t19 -45l-1 -4z" />
-<glyph unicode="&#xf15c;" horiz-adv-x="469" d="M235 352q79 0 142.5 -44.5t91.5 -115.5q-28 -71 -91.5 -115.5t-142.5 -44.5t-143 44.5t-92 115.5q28 71 92 115.5t143 44.5zM235 85q44 0 75 31.5t31 75.5t-31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5t31.5 -75.5t75.5 -31.5zM234.5 256q26.5 0 45.5 -18.5t19 -45.5 t-19 -45.5t-45.5 -18.5t-45 18.5t-18.5 45.5t18.5 45.5t45 18.5z" />
-<glyph unicode="&#xf15d;" horiz-adv-x="384" d="M378 328q6 -6 6 -15t-6 -15l-67 -67l41 -41l-30 -30l-30 30l-191 -190h-101v101l190 191l-30 30l30 30l41 -41l67 67q6 6 15 6t15 -6zM84 43l172 172l-41 41l-172 -172z" />
-<glyph unicode="&#xf15e;" d="M309 384q50 0 84 -34t34 -83q0 -24 -10 -48.5t-22 -43.5t-40.5 -49t-48 -48.5t-62.5 -56.5l-31 -28l-31 27q-42 39 -62 57.5t-48.5 48.5t-40.5 49t-21.5 43.5t-9.5 48.5q0 49 34 83t83 34q58 0 96 -45q38 45 96 45zM215 52q49 44 71.5 65.5t49.5 51.5t37.5 52.5 t10.5 45.5q0 32 -21.5 53t-53.5 21q-24 0 -45.5 -14t-30.5 -36h-40q-8 22 -29.5 36t-46.5 14q-32 0 -53 -21t-21 -53q0 -23 10 -45.5t37.5 -52.5t50 -51.5t70.5 -65.5l2 -2z" />
-<glyph unicode="&#xf15f;" d="M213 -7l-31 28q-42 38 -62 56.5t-48 48.5t-40.5 49t-22 43.5t-9.5 48.5q0 49 34 83t83 34q58 0 96 -45q38 45 96 45q50 0 84 -34t34 -83q0 -24 -10 -48.5t-22 -43.5t-40.5 -49t-48 -48.5t-62.5 -57.5z" />
-<glyph unicode="&#xf160;" horiz-adv-x="384" d="M149 64v43h86v-43h-86zM0 320h384v-43h-384v43zM64 171v42h256v-42h-256z" />
-<glyph unicode="&#xf161;" horiz-adv-x="341" d="M203 434q64 -52 101 -126t37 -159q0 -70 -50 -120t-120.5 -50t-120.5 50t-50 120q0 108 69 190l-1 -8q0 -33 22.5 -56t55.5 -23q32 0 52 23t20 56q0 21 -3.5 46.5t-7.5 40.5zM164 43q43 0 73 30t30 72q0 45 -13 86q-30 -41 -98 -55q-29 -6 -44.5 -23.5t-15.5 -42.5 q0 -28 20 -47.5t48 -19.5z" />
-<glyph unicode="&#xf162;" horiz-adv-x="320" d="M201 320h119v-213h-149l-9 42h-119v-149h-43v363h192z" />
-<glyph unicode="&#xf163;" horiz-adv-x="469" d="M128 213v-42h-128v42h128zM174 282l-30 -30l-45 46l30 30zM256 427v-128h-43v128h43zM370 298l-45 -46l-30 30l45 46zM341 213h128v-42h-128v42zM234.5 256q26.5 0 45.5 -18.5t19 -45.5t-19 -45.5t-45.5 -18.5t-45 18.5t-18.5 45.5t18.5 45.5t45 18.5zM295 102l30 30 l45 -46l-30 -30zM99 86l45 46l30 -30l-45 -46zM213 -43v128h43v-128h-43z" />
-<glyph unicode="&#xf164;" horiz-adv-x="410" d="M0 405h213l-85 -192h85l-149 -256v192h-64v256zM341 405l69 -192h-41l-15 43h-68l-15 -43h-41l69 192h42zM295 285h50l-25 78z" />
-<glyph unicode="&#xf165;" horiz-adv-x="363" d="M27 384l336 -336l-27 -27l-89 89l-76 -131v192h-64v79l-107 107zM320 235l-33 -57l-180 181v46h213l-85 -170h85z" />
-<glyph unicode="&#xf166;" horiz-adv-x="213" d="M0 405h213l-85 -170h85l-149 -256v192h-64v234z" />
-<glyph unicode="&#xf167;" horiz-adv-x="384" d="M256 0v43h43v-43h-43zM341 256v43h43v-43h-43zM0 341q0 18 12.5 30.5t30.5 12.5h85v-43h-85v-298h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v298zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM171 -43v470h42v-470h-42zM341 85v43h43v-43h-43zM256 341v43h43v-43h-43z M341 171v42h43v-42h-43zM341 0v43h43q0 -18 -12.5 -30.5t-30.5 -12.5z" />
-<glyph unicode="&#xf168;" horiz-adv-x="384" d="M192 -21q0 79 56 135.5t136 56.5q0 -80 -56 -136t-136 -56zM55 229q0 34 31 48q-31 15 -31 48q0 22 16 38t38 16q17 0 30 -10v4q0 22 15.5 38t37.5 16t37.5 -16t15.5 -38v-4q14 10 30 10q22 0 38 -16t16 -38q0 -33 -31 -48q31 -14 31 -48q0 -22 -16 -37.5t-38 -15.5 q-17 0 -30 9v-4q0 -22 -15.5 -37.5t-37.5 -15.5t-37.5 15.5t-15.5 37.5v4q-14 -9 -30 -9q-22 0 -38 15.5t-16 37.5zM192 331q-22 0 -37.5 -16t-15.5 -38t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5t-15.5 38t-37.5 16zM0 171q80 0 136 -56.5t56 -135.5q-80 0 -136 56 t-56 136z" />
-<glyph unicode="&#xf169;" horiz-adv-x="414" d="M350 183q30 -17 47 -47t17 -63q-29 -17 -63 -17.5t-65 17.5q-9 5 -17 11q2 -10 2 -20q0 -35 -17.5 -64.5t-46.5 -46.5q-29 17 -46.5 46.5t-17.5 64.5q0 10 2 20q-9 -7 -17 -11q-31 -17 -65 -17t-63 17q0 34 17 63.5t47 47.5q8 4 18 8q-10 4 -18 9q-30 17 -47 47t-17 63 q29 17 63 17.5t65 -17.5q8 -4 17 -11q-2 10 -2 20q0 35 17.5 64.5t46.5 46.5q29 -17 46.5 -46.5t17.5 -64.5q0 -10 -2 -20q9 7 17 11q31 18 65 17.5t63 -17.5q0 -33 -17 -63t-47 -47q-8 -5 -18 -9q10 -4 18 -9zM207 107q35 0 60 25t25 60t-25 60t-60 25t-60 -25t-25 -60 t25 -60t60 -25z" />
-<glyph unicode="&#xf16a;" d="M169 160l44 118l44 -118h-88zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM298 53h44l-109 278h-40l-109 -278h45l24 64h120z" />
-<glyph unicode="&#xf16b;" horiz-adv-x="469" d="M235 331l42 -54h-85zM363 235l53 -43l-53 -43v86zM107 235v-86l-54 43zM277 107l-42 -54l-43 54h85zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384 v-300h384z" />
-<glyph unicode="&#xf16c;" horiz-adv-x="299" d="M0 107v42h107v-106h-43v64h-64zM64 277v64h43v-106h-107v42h64zM192 43v106h107v-42h-64v-64h-43zM235 277h64v-42h-107v106h43v-64z" />
-<glyph unicode="&#xf16d;" horiz-adv-x="299" d="M43 149v-64h64v-42h-107v106h43zM0 235v106h107v-42h-64v-64h-43zM256 85v64h43v-106h-107v42h64zM192 341h107v-106h-43v64h-64v42z" />
-<glyph unicode="&#xf16e;" horiz-adv-x="256" d="M256 363v-64h-149l106 -107l-106 -107h149v-64h-256v43l139 128l-139 128v43h256z" />
-<glyph unicode="&#xf16f;" horiz-adv-x="352" d="M336 294q16 -16 16 -38v-203q0 -22 -15.5 -37.5t-37.5 -15.5t-38 15.5t-16 37.5v107h-32v-160h-213v341q0 18 12.5 30.5t30.5 12.5h128q17 0 29.5 -12.5t12.5 -30.5v-149h22q17 0 29.5 -12.5t12.5 -30.5v-96q0 -8 6.5 -14.5t15 -6.5t15 6.5t6.5 14.5v154q-11 -4 -21 -4 q-22 0 -38 15.5t-16 37.5q0 17 9.5 30.5t25.5 19.5l-45 45l22 22l80 -79h-1zM171 235v106h-128v-106h128zM298.5 235q8.5 0 15 6t6.5 15t-6.5 15t-15 6t-15 -6t-6.5 -15t6.5 -15t15 -6z" />
-<glyph unicode="&#xf170;" horiz-adv-x="387" d="M37 301l-37 36q5 6 19 20q26 27 58 27q18 0 35.5 -15t17.5 -46q0 -20 -6 -34t-21 -36q-29 -43 -40 -75q-5 -18 -2.5 -29.5t10.5 -11.5q9 0 24 18q16 17 48 58q18 22 46 41t60 19q42 0 62.5 -27.5t23.5 -61.5h52v-53h-52q-6 -69 -36.5 -100t-63.5 -31q-28 0 -48.5 19.5 t-20.5 46.5q0 33 30 69.5t85 45.5v3q-1 8 -2.5 12.5t-5 10.5t-11 9t-18.5 3q-18 0 -39 -20t-48 -53q-16 -19 -23.5 -28t-19.5 -18.5t-23 -12.5q-30 -10 -56 9q-29 22 -29 64q0 14 6 32.5t15 35.5t16.5 30t15.5 24.5t8 12.5q18 28 7 32q-8 3 -37 -26zM236 52q14 0 27.5 18 t17.5 57q-30 -8 -45.5 -27t-15.5 -32q0 -7 5 -11.5t11 -4.5z" />
-<glyph unicode="&#xf171;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM361 277q-32 56 -92 76q19 -35 29 -76h63zM213 362q-27 -39 -40 -85h81q-14 46 -41 85zM48 149h72q-3 25 -3 43t3 43h-72q-5 -23 -5 -43t5 -43zM66 107 q32 -56 92 -76q-19 35 -29 76h-63zM129 277q10 41 29 76q-60 -20 -92 -76h63zM213 22q27 39 41 85h-81q13 -46 40 -85zM263 149q4 25 4 43t-4 43h-100q-3 -25 -3 -43t3 -43h100zM269 31q60 20 92 76h-63q-10 -41 -29 -76zM306 149h72q6 23 6 43t-6 43h-72q3 -25 3 -43 t-3 -43z" />
-<glyph unicode="&#xf172;" horiz-adv-x="469" d="M448 363q9 0 15 -6.5t6 -15.5v-85q0 -9 -6 -15t-15 -6h-107q-8 0 -14.5 6t-6.5 15v85q0 9 6.5 15.5t14.5 6.5v10q0 22 16 38t38 16t37.5 -16t15.5 -38v-10zM431 363v10q0 15 -10.5 26t-25.5 11t-26 -11t-11 -26v-10h73zM382 192h44q1 -12 1 -21q0 -89 -62.5 -151.5 t-151 -62.5t-151 62.5t-62.5 151t62.5 151t150.5 62.5q33 0 64 -10v-54q0 -18 -12.5 -30.5t-29.5 -12.5h-43v-42q0 -9 -6.5 -15.5t-14.5 -6.5h-43v-42h128q9 0 15 -6.5t6 -15.5v-64h22q14 0 25 -8t15 -21q45 49 45 115q0 7 -2 21zM192 1v42q-18 0 -30.5 12.5t-12.5 29.5v22 l-102 102q-4 -20 -4 -38q0 -65 42.5 -113.5t106.5 -56.5z" />
-<glyph unicode="&#xf173;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 23v41q-18 0 -30.5 12.5t-12.5 30.5v21l-102 102q-4 -20 -4 -38q0 -65 42.5 -113t106.5 -56zM339 77q45 49 45 115q0 53 -29.5 96t-77.5 62v-9 q0 -17 -12.5 -29.5t-29.5 -12.5h-43v-43q0 -9 -6.5 -15t-14.5 -6h-43v-43h128q9 0 15 -6.5t6 -14.5v-64h22q14 0 25 -8.5t15 -21.5z" />
-<glyph unicode="&#xf174;" horiz-adv-x="469" d="M85 167l150 -82l149 82v-86l-149 -81l-150 81v86zM235 384l234 -128v-171h-42v148l-192 -105l-235 128z" />
-<glyph unicode="&#xf175;" d="M171 21h-107v171h-64l213 192l214 -192h-64v-171h-107v128h-85v-128z" />
-<glyph unicode="&#xf176;" horiz-adv-x="384" d="M384 341v-42l-43 -128l43 -128v-43h-384v43l43 128l-43 128v42h271l31 86l50 -19l-24 -67h56zM277 149v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64z" />
-<glyph unicode="&#xf177;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM320 149v86h-85v85h-86v-85h-85v-86h85v-85h86v85h85z" />
-<glyph unicode="&#xf178;" horiz-adv-x="469" d="M128 171q-27 0 -45.5 18.5t-18.5 45t18.5 45.5t45.5 19t45.5 -19t18.5 -45.5t-18.5 -45t-45.5 -18.5zM384 299q35 0 60 -25t25 -61v-192h-42v64h-384v-64h-43v320h43v-192h170v150h171z" />
-<glyph unicode="&#xf179;" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128zM213 96l-85 85l-85 -85h170zM43 288h170v75h-170v-75z" />
-<glyph unicode="&#xf17a;" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128zM213 96l-85 85l-85 -85v-75h170v75zM128 203l85 85v75h-170v-75z" />
-<glyph unicode="&#xf17b;" horiz-adv-x="256" d="M0 405h256v-128v0l-85 -85l85 -85v-1v-127h-256v127v1l85 85l-85 85v0v128z" />
-<glyph unicode="&#xf17c;" horiz-adv-x="469" d="M75 213v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43zM128 224v32h96v-32h-32v-96h-32v96h-32zM245 224v32h96v-32h-32v-96h-32v96h-32zM437 256q13 0 22.5 -9.5t9.5 -22.5v-21q0 -13 -9.5 -22.5t-22.5 -9.5h-42v-43h-32v128h74zM437 203v21h-42v-21h42z" />
-<glyph unicode="&#xf17d;" horiz-adv-x="469" d="M469 64q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h384q17 0 29.5 -12.5t12.5 -30.5v-256zM160 181l-75 -96h299l-96 128l-75 -96z" />
-<glyph unicode="&#xf17e;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298zM234 186l75 -101h-234l58 76l42 -51z" />
-<glyph unicode="&#xf17f;" horiz-adv-x="384" d="M384 43q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-298zM117 160l-74 -96h298l-96 128l-74 -96z" />
-<glyph unicode="&#xf180;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-299q-17 0 -29.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t29.5 12.5h299zM341 128v213h-299v-213h86q0 -27 18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5h85zM277 235l-85 -86l-85 86h42v64h86v-64 h42z" />
-<glyph unicode="&#xf181;" horiz-adv-x="384" d="M377 3l7 -8l-27 -27l-58 58q-46 -38 -107 -38q-71 0 -121 50q-46 46 -49.5 112t37.5 116l-59 59l27 27l59 -59l30 -30l76 -76l134 -134zM192 30v103l-102 102q-26 -34 -26 -77q0 -53 38 -90q37 -38 90 -38zM192 339l-49 -48l-30 30l79 79l121 -121q38 -39 47 -92.5 t-13 -99.5l-155 154v98z" />
-<glyph unicode="&#xf182;" horiz-adv-x="341" d="M291 279q50 -50 50 -121t-50 -120.5t-120.5 -49.5t-120.5 49.5t-50 120.5t50 121l121 121zM171 30v309l-91 -90q-37 -38 -37 -91t37 -90q37 -38 91 -38z" />
-<glyph unicode="&#xf183;" horiz-adv-x="469" d="M249 235h220v-86h-42v-85h-86v85h-92q-14 -37 -47 -61t-74 -24q-53 0 -90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5q41 0 74 -24t47 -61zM128 149q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5t-30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5z" />
-<glyph unicode="&#xf184;" horiz-adv-x="405" d="M312 323l93 -131l-93 -131q-13 -18 -35 -18h-234q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h234q22 0 35 -18zM277 85l76 107l-76 107h-234v-214h234z" />
-<glyph unicode="&#xf185;" horiz-adv-x="405" d="M312 323l93 -131l-93 -131q-13 -18 -35 -18h-234q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h234q22 0 35 -18z" />
-<glyph unicode="&#xf186;" d="M414 201q13 -13 13 -30.5t-13 -29.5l-149 -150q-13 -12 -30.5 -12t-29.5 12l-192 192q-13 13 -13 30v150q0 17 12.5 29.5t30.5 12.5h149q18 0 30 -12zM74.5 299q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM326 122q15 16 15 38 t-15.5 37.5t-37.5 15.5t-38 -15l-15 -16l-16 16q-15 15 -38 15q-22 0 -37.5 -15.5t-15.5 -37.5t16 -38l91 -91z" />
-<glyph unicode="&#xf187;" d="M414 201q13 -13 13 -30.5t-13 -29.5l-149 -150q-13 -12 -30.5 -12t-29.5 12l-192 192q-13 13 -13 30v150q0 17 12.5 29.5t30.5 12.5h149q18 0 30 -12zM74.5 299q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9z" />
-<glyph unicode="&#xf188;" horiz-adv-x="446" d="M26 29q-16 7 -22.5 23t-0.5 32l52 125v-192zM442 108q7 -16 0 -32.5t-23 -23.5l-157 -65q-8 -3 -16 -3q-29 0 -39 26l-106 256q-4 8 -3 17q0 28 26 38l157 65q8 3 17 3q28 0 39 -26zM140.5 261q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5z M98 27v135l73 -178h-31q-17 0 -29.5 12.5t-12.5 30.5z" />
-<glyph unicode="&#xf189;" horiz-adv-x="469" d="M54 52l39 39l30 -30l-39 -39zM213 -31v63h43v-63h-43zM64 224v-43h-64v43h64zM299 313q29 -17 46.5 -46t17.5 -64q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 35 17 64t47 46v103h128v-103zM405 224h64v-43h-64v43zM346 61l30 29l39 -38l-30 -30z" />
-<glyph unicode="&#xf18a;" horiz-adv-x="469" d="M277 320l192 -256h-469l128 171l96 -128l34 25l-61 81z" />
-<glyph unicode="&#xf18b;" d="M380 128l-31 31l26 19l30 -30zM370 229l-51 -40l-168 168l62 48l192 -149zM27 427l400 -400l-27 -27l-81 81l-106 -82l-192 149l35 27l157 -123l76 59l-31 30l-45 -34l-157 122l-35 27l69 54l-90 90z" />
-<glyph unicode="&#xf18c;" horiz-adv-x="384" d="M192 52l157 123l35 -27l-192 -149l-192 149l35 27zM192 107l-157 122l-35 27l192 149l192 -149l-35 -27z" />
-<glyph unicode="&#xf18d;" horiz-adv-x="384" d="M192 202q81 75 192 75v-234q-110 0 -192 -76q-81 76 -192 76v234q111 0 192 -75zM192 277q-27 0 -45.5 19t-18.5 45.5t18.5 45t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19z" />
-<glyph unicode="&#xf18e;" d="M41 192q0 -27 19 -46.5t47 -19.5h85v-41h-85q-44 0 -75.5 31.5t-31.5 75.5t31.5 75.5t75.5 31.5h85v-41h-85q-28 0 -47 -19.5t-19 -46.5zM128 171v42h171v-42h-171zM320 299q44 0 75.5 -31.5t31.5 -75.5t-31.5 -75.5t-75.5 -31.5h-85v41h85q27 0 46.5 19.5t19.5 46.5 t-19.5 46.5t-46.5 19.5h-85v41h85z" />
-<glyph unicode="&#xf18f;" horiz-adv-x="341" d="M170.5 85q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h194v43 q0 27 -19.5 46.5t-47 19.5t-46.5 -19.5t-19 -46.5h-41q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM299 21v214h-256v-214h256z" />
-<glyph unicode="&#xf190;" horiz-adv-x="341" d="M299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h21v43q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM170.5 386q-27.5 0 -46.5 -19.5t-19 -46.5h2v-43h130v43 q0 27 -19.5 46.5t-47 19.5zM299 21v214h-256v-214h256zM170.5 85q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5z" />
-<glyph unicode="&#xf191;" horiz-adv-x="341" d="M299 277q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h21v43q0 44 31.5 75.5t75.5 31.5t75 -31.5t31 -75.5v-43h22zM170.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5 t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM237 277v43q0 27 -19.5 46.5t-47 19.5t-46.5 -19.5t-19 -46.5v-43h132z" />
-<glyph unicode="&#xf192;" horiz-adv-x="512" d="M149 277l-85 -85l85 -85v-64l-149 149l149 149v-64zM277 256q54 -8 96.5 -30.5t69.5 -55.5t43.5 -69.5t25.5 -79.5q-78 109 -235 109v-87l-149 149l149 149v-85z" />
-<glyph unicode="&#xf193;" horiz-adv-x="384" d="M149 256q54 -8 96.5 -30.5t69.5 -55.5t43.5 -69.5t25.5 -79.5q-78 109 -235 109v-87l-149 149l149 149v-85z" />
-<glyph unicode="&#xf194;" horiz-adv-x="448" d="M0 0v149l320 43l-320 43v149l448 -192z" />
-<glyph unicode="&#xf195;" horiz-adv-x="384" d="M341 320q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h42q0 44 31.5 75.5t75.5 31.5t75.5 -31.5t31.5 -75.5h42zM192 384q-27 0 -45.5 -18.5t-18.5 -45.5h128q0 27 -18.5 45.5 t-45.5 18.5zM192 171q44 0 75.5 31t31.5 75h-43q0 -26 -18.5 -45t-45.5 -19t-45.5 19t-18.5 45h-43q0 -44 31.5 -75t75.5 -31z" />
-<glyph unicode="&#xf196;" horiz-adv-x="384" d="M373 384q11 0 11 -11v-322q0 -8 -8 -10l-120 -41l-128 45l-114 -44l-3 -1q-11 0 -11 11v322q0 8 8 10l120 41l128 -45l114 44zM256 43v253l-128 45v-253z" />
-<glyph unicode="&#xf197;" horiz-adv-x="432" d="M0 48v48h432v-48h-432zM0 168v48h432v-48h-432zM0 336h432v-48h-432v48z" />
-<glyph unicode="&#xf198;" d="M192 85v22h-43v42h86v22h-64q-9 0 -15.5 6t-6.5 15v64q0 9 6.5 15t15.5 6h21v22h43v-22h42v-42h-85v-22h64q9 0 15 -6t6 -15v-64q0 -9 -6 -15t-15 -6h-21v-22h-43zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5 t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v256h-341v-256h341z" />
-<glyph unicode="&#xf199;" horiz-adv-x="339" d="M180 301q-18 0 -32 -6l-32 31q15 8 32 12v46h64v-47q32 -8 49.5 -30t19.5 -51h-48q-2 45 -53 45zM27 361l312 -312l-27 -27l-48 48q-19 -18 -52 -24v-46h-64v46q-33 7 -55 28t-23 54h46q5 -45 64 -45q38 0 52 20l-75 74q-84 25 -84 84l-73 73z" />
-<glyph unicode="&#xf19a;" horiz-adv-x="217" d="M117 215q46 -11 73 -32t27 -61q0 -32 -20.5 -51t-53.5 -25v-46h-64v46q-34 7 -55.5 28t-23.5 54h47q4 -45 64 -45q31 0 44 12t13 26q0 17 -13.5 30t-50.5 22q-100 24 -100 88q0 29 21 49.5t54 27.5v46h64v-47q32 -8 49.5 -30t18.5 -51h-47q-2 45 -53 45q-27 0 -42.5 -11 t-15.5 -29q0 -15 14 -25.5t50 -20.5z" />
-<glyph unicode="&#xf19b;" horiz-adv-x="85" d="M42.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM42.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM42.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" />
-<glyph unicode="&#xf19c;" horiz-adv-x="341" d="M42.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM170.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" />
-<glyph unicode="&#xf19d;" horiz-adv-x="341" d="M299 384h42v-384h-42v43h-43v-43h-171v43h-42v-43h-43v384h43v-43h42v43h171v-43h43v43zM85 85v43h-42v-43h42zM85 171v42h-42v-42h42zM85 256v43h-42v-43h42zM299 85v43h-43v-43h43zM299 171v42h-43v-42h43zM299 256v43h-43v-43h43z" />
-<glyph unicode="&#xf19e;" d="M341 363h86v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h21l43 -86h64l-43 86h43l42 -86h64l-42 86h42l43 -86h64z" />
-<glyph unicode="&#xf19f;" horiz-adv-x="430" d="M430 252q0 -57 -37.5 -99t-93.5 -49v-83h64v-42h-342v106h-21v86q0 8 6.5 14.5t14.5 6.5h64q9 0 15.5 -6.5t6.5 -14.5v-86h-22v-64h171v84q-53 9 -88.5 50.5t-35.5 96.5q0 62 43.5 106t105.5 44t105.5 -44t43.5 -106zM53.5 213q-13.5 0 -23 9.5t-9.5 23t9.5 22.5t23 9 t22.5 -9t9 -22.5t-9 -23t-22.5 -9.5z" />
-<glyph unicode="&#xf1a0;" horiz-adv-x="302" d="M171 104v-83h128v-42h-299v42h128v84q-53 9 -88.5 50.5t-35.5 96.5q0 62 43.5 106t105.5 44t105.5 -44t43.5 -106q0 -57 -37.5 -99t-93.5 -49z" />
-<glyph unicode="&#xf1a1;" horiz-adv-x="320" d="M160 405l160 -390l-15 -15l-145 64l-145 -64l-15 15z" />
-<glyph unicode="&#xf1a2;" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85v213h-298v-213h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM192 235l85 -86h-64v-128h-42v128h-64z" />
-<glyph unicode="&#xf1a3;" horiz-adv-x="384" d="M341 43v149h43v-149q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h149v-43h-149v-298h298zM235 384h149v-149h-43v76l-209 -209l-30 30l209 209h-76v43z" />
-<glyph unicode="&#xf1a4;" horiz-adv-x="384" d="M192 384q80 0 136 -50t56 -121q0 -44 -31.5 -75t-75.5 -31h-37q-14 0 -23 -9.5t-9 -22.5q0 -12 8 -21q8 -10 8 -22q0 -13 -9.5 -22.5t-22.5 -9.5q-80 0 -136 56t-56 136t56 136t136 56zM74.5 192q13.5 0 23 9.5t9.5 22.5t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5 t22.5 -9.5zM138.5 277q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM245.5 277q13.5 0 22.5 9.5t9 23t-9 22.5t-22.5 9t-23 -9t-9.5 -22.5t9.5 -23t23 -9.5zM309.5 192q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5 t9.5 -22.5t23 -9.5z" />
-<glyph unicode="&#xf1a5;" horiz-adv-x="277" d="M149 384q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5h-64v-128h-85v384h149zM154 213q17 0 29.5 12.5t12.5 30.5t-12.5 30.5t-29.5 12.5h-69v-86h69z" />
-<glyph unicode="&#xf1a6;" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM192 335q-24 0 -41 -17t-17 -41t17 -40.5t41 -16.5t41 16.5t17 40.5t-17 41t-41 17zM320 107v19 q0 20 -23.5 35.5t-52.5 23t-52 7.5t-52 -7.5t-52.5 -23t-23.5 -35.5v-19h256z" />
-<glyph unicode="&#xf1a7;" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM232 173l88 40l-88 40l-40 88l-40 -88l-88 -40l88 -40l40 -88z" />
-<glyph unicode="&#xf1a8;" horiz-adv-x="299" d="M277 277q0 -27 -13 -61t-32 -63t-37.5 -55t-31.5 -40l-14 -15q-5 5 -13.5 15t-30.5 39t-39 56.5t-31 62t-14 61.5q0 53 37.5 90.5t90.5 37.5t90.5 -37.5t37.5 -90.5zM107 277.5q0 -17.5 12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30zM0 21 h299v-42h-299v42z" />
-<glyph unicode="&#xf1a9;" horiz-adv-x="384" d="M341 405q18 0 30.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-30.5 -12.5h-85l-64 -64l-64 64h-85q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h298zM213 64v43h-42v-43h42zM257 229q20 20 20 48q0 36 -25 61t-60 25t-60 -25t-25 -61h42q0 18 12.5 30.5 t30.5 12.5t30.5 -12.5t12.5 -30.5q0 -17 -13 -30l-26 -27q-25 -25 -25 -60v-11h42q0 22 6 34.5t19 26.5z" />
-<glyph unicode="&#xf1aa;" horiz-adv-x="384" d="M213 309q-23 0 -39 -18l-68 68q44 46 107 46q62 0 106 -43.5t44 -105.5q0 -48 -37 -117l-77 78q18 16 18 39q0 22 -16 37.5t-38 15.5zM307 105l77 -78l-27 -27l-72 71q-16 -23 -34 -46.5t-28 -34.5l-10 -11q-6 6 -16 18t-35.5 46.5t-45.5 67t-36 73.5t-16 72q0 16 4 33 l-68 68l27 27l178 -178l3 -3z" />
-<glyph unicode="&#xf1ab;" horiz-adv-x="299" d="M149 405q62 0 106 -43.5t44 -105.5q0 -31 -15.5 -71.5t-37.5 -75t-44 -65t-37 -48.5l-16 -17q-6 6 -16 18t-35.5 46.5t-45.5 67t-36 73.5t-16 72q0 62 43.5 105.5t105.5 43.5zM149 203q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5t-37.5 -15.5t-15.5 -37.5t15.5 -37.5 t37.5 -15.5z" />
-<glyph unicode="&#xf1ac;" horiz-adv-x="384" d="M192 405q56 0 105.5 -22.5t86.5 -62.5l-192 -341l-192 341q36 40 86 62.5t106 22.5zM85 298.5q0 -17.5 12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30zM191.5 128q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30 t30 -12.5z" />
-<glyph unicode="&#xf1ad;" horiz-adv-x="428" d="M336 192l86 -85q6 -7 6 -15.5t-6 -14.5l-93 -93q-6 -6 -15 -6t-15 6l-85 85l-85 -85q-6 -6 -15 -6t-15 6l-93 93q-6 6 -6 14.5t6 15.5l85 85l-85 84q-6 7 -6 15.5t6 15.5l93 92q6 6 14.5 6t15.5 -6l85 -85l85 85q6 6 15 6t15 -6l92 -92q7 -7 7 -15.5t-7 -15.5zM214 256 q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15.5 6.5t6.5 15t-6.5 15t-15.5 6.5zM114 214l77 78l-77 77l-78 -78zM171.5 171q8.5 0 15 6t6.5 15t-6.5 15t-15 6t-15 -6t-6.5 -15t6.5 -15t15 -6zM214 128q9 0 15.5 6.5t6.5 15t-6.5 15t-15.5 6.5t-15 -6.5t-6 -15t6 -15t15 -6.5z M257 213q-9 0 -15 -6t-6 -15t6 -15t15 -6t15 6t6 15t-6 15t-15 6zM314 14l77 78l-77 77l-78 -78z" />
-<glyph unicode="&#xf1ae;" horiz-adv-x="341" d="M64 -64v43h43v-43h-43zM149 -64v43h43v-43h-43zM192 405v-213h-43v213h43zM268 353q34 -23 53.5 -60t19.5 -80q0 -70 -50 -120t-120.5 -50t-120.5 50t-50 120q0 43 19.5 80t53.5 60l31 -30q-28 -18 -44.5 -47t-16.5 -63q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5 q0 34 -17 63t-45 46zM235 -64v43h42v-43h-42z" />
-<glyph unicode="&#xf1af;" horiz-adv-x="384" d="M213 384v-213h-42v213h42zM316 338q68 -58 68 -146q0 -80 -56 -136t-136 -56t-136 56t-56 136q0 88 68 146l30 -30q-55 -45 -55 -116q0 -62 43.5 -105.5t105.5 -43.5t105.5 43.5t43.5 105.5q0 71 -55 115z" />
-<glyph unicode="&#xf1b0;" d="M363 277q26 0 45 -18.5t19 -45.5v-128h-86v-85h-256v85h-85v128q0 27 18.5 45.5t45.5 18.5h299zM299 43v106h-171v-106h171zM362.5 192q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5zM341 384v-85h-256v85h256z" />
-<glyph unicode="&#xf1b1;" horiz-adv-x="448" d="M395 213q22 0 37.5 -15.5t15.5 -37.5t-15.5 -37.5t-37.5 -15.5h-32v-86q0 -17 -12.5 -29.5t-30.5 -12.5h-81v32q0 24 -17 40.5t-41 16.5t-40.5 -16.5t-16.5 -40.5v-32h-81q-18 0 -30.5 12.5t-12.5 29.5v81h32q24 0 41 17t17 41t-17 41t-41 17h-32v81q0 17 12.5 29.5 t30.5 12.5h85v32q0 22 15.5 38t37.5 16t38 -16t16 -38v-32h85q18 0 30.5 -12.5t12.5 -29.5v-86h32z" />
-<glyph unicode="&#xf1b2;" horiz-adv-x="299" d="M21 85l43 86h-64v128h128v-128l-43 -86h-64zM192 85l43 86h-64v128h128v-128l-43 -86h-64z" />
-<glyph unicode="&#xf1b3;" horiz-adv-x="341" d="M0 117v224q0 27 12.5 45t38 26.5t53 11.5t67 3t67 -3t53 -11.5t38 -26.5t12.5 -45v-224q0 -31 -21.5 -52.5t-52.5 -21.5l32 -32v-11h-256v11l32 32q-31 0 -53 21.5t-22 52.5zM170.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5 t30 -12.5zM299 235v106h-256v-106h256z" />
-<glyph unicode="&#xf1b4;" horiz-adv-x="384" d="M320 85v43h-256v-43h256zM320 171v42h-256v-42h256zM320 256v43h-256v-43h256zM0 -21v426l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32l32 -32l32 32v-426l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32l-32 -32l-32 32z " />
-<glyph unicode="&#xf1b5;" horiz-adv-x="469" d="M384 277l85 -85h-64q0 -71 -50 -121t-120 -50q-49 0 -91 27l31 31q27 -15 60 -15q53 0 90.5 37.5t37.5 90.5h-64zM107 192h64l-86 -85l-85 85h64q0 71 50 121t121 50q49 0 91 -27l-32 -31q-27 15 -59 15q-53 0 -90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf1b6;" horiz-adv-x="384" d="M0 192q0 59 36 105t92 60v-44q-38 -14 -61.5 -47t-23.5 -74q0 -53 37 -90l48 47v-128h-128l50 51q-50 50 -50 120zM171 85v43h42v-43h-42zM384 363l-50 -51q50 -50 50 -120q0 -59 -36 -105t-92 -60v44q38 14 61.5 47t23.5 74q0 53 -37 90l-48 -47v128h128zM171 171v128 h42v-128h-42z" />
-<glyph unicode="&#xf1b7;" horiz-adv-x="366" d="M152 313q-5 -2 -16 -8l-31 32q22 14 47 20v-44zM0 333l27 27l335 -336l-27 -27l-50 50q-22 -14 -48 -20v44q7 3 17 8l-173 172q-14 -28 -14 -59q0 -53 38 -90l47 47v-128h-128l51 51q-51 50 -51 120q0 49 26 90zM366 363l-51 -51q51 -50 51 -120q0 -49 -26 -90l-32 31 q15 28 15 59q0 53 -38 90l-47 -47v128h128z" />
-<glyph unicode="&#xf1b8;" horiz-adv-x="341" d="M171 363q70 0 120 -50t50 -121q0 -49 -26 -91l-31 31q15 28 15 60q0 53 -37.5 90.5t-90.5 37.5v-64l-86 85l86 86v-64zM171 64v64l85 -85l-85 -86v64q-71 0 -121 50t-50 121q0 49 26 91l32 -31q-15 -28 -15 -60q0 -53 37.5 -90.5t90.5 -37.5z" />
-<glyph unicode="&#xf1b9;" horiz-adv-x="341" d="M171 320q-53 0 -90.5 -37.5t-37.5 -90.5q0 -32 15 -60l-32 -31q-26 42 -26 91q0 71 50 121t121 50v64l85 -86l-85 -85v64zM315 283q26 -42 26 -91q0 -71 -50 -121t-120 -50v-64l-86 86l86 85v-64q53 0 90.5 37.5t37.5 90.5q0 31 -15 60z" />
-<glyph unicode="&#xf1ba;" horiz-adv-x="363" d="M299 363h64v-171h-171v-192q0 -9 -6.5 -15t-14.5 -6h-43q-9 0 -15 6t-6 15v235h213v85h-21v-21q0 -9 -6.5 -15.5t-15.5 -6.5h-256q-8 0 -14.5 6.5t-6.5 15.5v85q0 9 6.5 15t14.5 6h256q9 0 15.5 -6t6.5 -15v-21z" />
-<glyph unicode="&#xf1bb;" horiz-adv-x="469" d="M427 320q17 0 29.5 -12.5t12.5 -30.5v-170q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v170q0 18 12.5 30.5t30.5 12.5h384zM427 107v170h-43v-85h-43v85h-42v-85h-43v85h-43v-85h-42v85h-43v-85h-43v85h-42v-170h384z" />
-<glyph unicode="&#xf1bc;" d="M163 285l264 -264v-21h-64l-150 149l-50 -50q8 -17 8 -35q0 -35 -25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60 25q19 0 35 -7l51 50l-51 50q-16 -7 -35 -7q-35 0 -60 25t-25 60t25 60t60.5 25t60.5 -25t25 -60q0 -18 -8 -35zM85.5 277q17.5 0 30 12.5t12.5 30.5 t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM85.5 21q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM213.5 181q10.5 0 10.5 11t-10.5 11t-10.5 -11t10.5 -11zM363 384h64v-21l-150 -150l-42 43z" />
-<glyph unicode="&#xf1bd;" horiz-adv-x="484" d="M475 176q9 -10 9 -23t-9 -23l-136 -135q-9 -10 -22.5 -10t-22.5 10l-257 256q-9 9 -9 22.5t9 22.5l136 136q9 9 22.5 9t22.5 -9l53 -52l-31 -30l-44 44l-121 -120l241 -242l121 121l-47 47l30 30zM159 11l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32 q6 -60 40 -108t87 -73zM320 256q-9 0 -15 6.5t-6 14.5v86q0 8 6 14.5t15 6.5v11q0 22 15.5 37.5t37.5 15.5t38 -15.5t16 -37.5v-11q8 0 14.5 -6.5t6.5 -14.5v-86q0 -8 -6.5 -14.5t-14.5 -6.5h-107zM337 395v-11h73v11q0 15 -11 25.5t-26 10.5t-25.5 -10.5t-10.5 -25.5z" />
-<glyph unicode="&#xf1be;" horiz-adv-x="510" d="M351 394l-29 -28l-81 81l14 1q100 0 173.5 -68t81.5 -167h-32q-6 60 -40.5 108t-86.5 73zM217 411l257 -257q9 -9 9 -22.5t-9 -22.5l-136 -136q-9 -9 -22.5 -9t-22.5 9l-257 257q-9 9 -9 22.5t9 22.5l136 136q9 9 22.5 9t22.5 -9zM315 -4l136 136l-256 256l-136 -136z M159 -10l29 28l81 -81l-14 -1q-100 0 -173.5 68t-81.5 167h32q6 -60 40 -108t87 -73z" />
-<glyph unicode="&#xf1bf;" d="M320 149l107 -106l-32 -32l-107 107v16l-6 6q-39 -33 -90 -33q-38 0 -70 19l31 31q19 -8 39 -8q40 0 68 28.5t28 68t-28 67.5t-68 28t-68 -28t-28 -68h75l-89 -85l-82 85h54q0 57 40.5 98t97.5 41q58 0 98.5 -40.5t40.5 -98.5q0 -51 -34 -90l6 -6h17z" />
-<glyph unicode="&#xf1c0;" horiz-adv-x="341" d="M341 30l-81 82q17 27 17 59q0 44 -31 75t-75 31t-75.5 -31t-31.5 -75t31.5 -75.5t75.5 -31.5q31 0 59 18l94 -95q-12 -8 -25 -8h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170l128 -128v-247zM107 170.5q0 26.5 18.5 45.5t45 19t45.5 -19t19 -45.5 t-19 -45t-45.5 -18.5t-45 18.5t-18.5 45z" />
-<glyph unicode="&#xf1c1;" d="M203 256q22 0 37.5 -15.5t15.5 -37.5t-15.5 -38t-37.5 -16t-38 16t-16 38t16 37.5t38 15.5zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM316 60l30 30l-62 62 q15 23 15 51q0 40 -28 68t-68 28t-68 -28t-28 -68t28 -68t67 -28q28 0 51 15z" />
-<glyph unicode="&#xf1c2;" horiz-adv-x="373" d="M149 320q-38 0 -67.5 -24.5t-36.5 -60.5h-43q8 54 49.5 91t97.5 37q62 0 106 -44l44 44v-128h-128l54 54q-32 31 -76 31zM270 125l103 -104l-32 -31l-103 103q-40 -29 -89 -29q-62 0 -105 44l-44 -44v128h128l-54 -54q31 -31 75 -31q39 0 68 24t37 61h43q-5 -37 -27 -67z " />
-<glyph unicode="&#xf1c3;" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28z" />
-<glyph unicode="&#xf1c4;" d="M43 64v64h341v-128h-64v64h-213v-64h-64v64zM363 235h64v-64h-64v64zM0 235h64v-64h-64v64zM320 171h-213v170q0 18 12.5 30.5t29.5 12.5h128q18 0 30.5 -12.5t12.5 -30.5v-170z" />
-<glyph unicode="&#xf1c5;" horiz-adv-x="384" d="M192 235q18 0 30.5 -12.5t12.5 -30.5t-12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5t30.5 12.5zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM304 192 q0 7 -1 15l32 24q4 5 1 10l-30 52q-3 5 -9 3l-37 -15q-12 9 -25 15l-6 39q-1 6 -7 6h-60q-6 0 -7 -6l-6 -40q-14 -5 -25 -14l-37 15q-6 2 -9 -4l-30 -51q-3 -6 1 -10l32 -24q-1 -8 -1 -15t1 -15l-32 -24q-4 -5 -1 -10l30 -52q3 -5 9 -3l37 15q12 -9 25 -15l6 -39q1 -6 7 -6 h60q6 0 7 6l6 40q14 5 25 14l37 -15q6 -2 9 4l30 51q3 6 -1 10l-32 24q1 8 1 15z" />
-<glyph unicode="&#xf1c6;" horiz-adv-x="415" d="M366 171l45 -35q7 -6 3 -14l-43 -74q-4 -8 -13 -4l-53 21q-18 -13 -36 -21l-8 -56q-1 -9 -11 -9h-85q-9 0 -11 9l-8 56q-19 8 -36 21l-53 -21q-9 -3 -13 4l-43 74q-4 8 3 14l45 35q-1 12 -1 21t1 21l-45 35q-7 6 -3 14l43 74q5 8 13 4l53 -21q18 13 36 21l8 56q2 9 11 9 h85q10 0 11 -9l8 -56q19 -8 36 -21l53 21q9 3 13 -4l43 -74q4 -8 -3 -14l-45 -35q2 -12 2 -21t-2 -21zM207.5 117q30.5 0 52.5 22t22 53t-22 53t-52.5 22t-52.5 -22t-22 -53t22 -53t52.5 -22z" />
-<glyph unicode="&#xf1c7;" horiz-adv-x="384" d="M192 427l192 -86v-128q0 -89 -55 -162.5t-137 -93.5q-82 20 -137 93.5t-55 162.5v128zM149 85l171 171l-30 30l-141 -140l-55 55l-30 -30z" />
-<glyph unicode="&#xf1c8;" horiz-adv-x="384" d="M192 427l192 -86v-128q0 -89 -55 -162.5t-137 -93.5q-82 20 -137 93.5t-55 162.5v128zM192 192v188l-149 -66v-122h149v-191q59 19 100 72t49 119h-149z" />
-<glyph unicode="&#xf1c9;" horiz-adv-x="469" d="M346 256h102q9 0 15 -6.5t6 -14.5v-6l-54 -198q-4 -13 -15.5 -22t-26.5 -9h-277q-15 0 -26 9t-15 22l-54 198q-1 2 -1 6q0 8 6.5 14.5t14.5 6.5h103l93 140q6 9 17.5 9t17.5 -9zM171 256h128l-64 94zM234.5 85q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5 t-12.5 -30.5t12.5 -30.5t30 -12.5z" />
-<glyph unicode="&#xf1ca;" horiz-adv-x="430" d="M213 256v64h-64v43h64v64h43v-64h64v-43h-64v-64h-43zM128 64q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30 12.5t-12 30t12 30t30 12.5zM341.5 64q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM132 133q0 -5 5 -5h247v-43 h-256q-18 0 -30.5 12.5t-12.5 30.5q0 11 6 20l28 53l-76 162h-43v42h70l20 -42l20 -43l48 -101l3 -6h149l59 107l24 43l37 -21l-82 -149q-12 -22 -38 -22h-159l-19 -35v-3z" />
-<glyph unicode="&#xf1cb;" d="M128 64q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30 12.5t-12 30t12 30t30 12.5zM0 405h70l20 -42h315q9 0 15.5 -6.5t6.5 -15.5q0 -5 -3 -10l-76 -138q-12 -22 -38 -22h-159l-19 -35v-3q0 -5 5 -5h247v-43h-256q-18 0 -30.5 12.5t-12.5 30.5q0 11 6 20l28 53 l-76 162h-43v42zM341.5 64q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5z" />
-<glyph unicode="&#xf1cc;" horiz-adv-x="384" d="M151 115l55 56h-206v42h206l-55 56l30 30l107 -107l-107 -107zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85h43v-85h298v298h-298v-85h-43v85q0 18 12.5 30.5t30.5 12.5h298z" />
-<glyph unicode="&#xf1cd;" horiz-adv-x="384" d="M0 320h128v-43h-128v43zM0 64v43h384v-43h-384zM0 213h256v-42h-256v42z" />
-<glyph unicode="&#xf1ce;" horiz-adv-x="384" d="M0 64v43h128v-43h-128zM0 320h384v-43h-384v43zM0 171v42h256v-42h-256z" />
-<glyph unicode="&#xf1cf;" horiz-adv-x="417" d="M282 364h-147l74 73zM135 20h147l-73 -73zM70 157h81l-41 111zM93 315h35l93 -246h-38l-20 53h-106l-19 -53h-38zM285 103h132v-34h-184v28l128 183h-127v35h179v-27z" />
-<glyph unicode="&#xf1d0;" horiz-adv-x="417" d="M282 364h-147l74 73zM135 20h147l-73 -73zM266 157h81l-40 111zM290 315h34l93 -246h-38l-19 53h-106l-20 -53h-38zM52 103h132v-34h-184v28l128 183h-127v35h179v-27z" />
-<glyph unicode="&#xf1d1;" horiz-adv-x="438" d="M213 107l-24 64h-121l-23 -64h-45l109 277h40l109 -277h-45zM85 213h88l-44 118zM408 201l30 -30l-202 -203l-109 109l30 30l79 -79z" />
-<glyph unicode="&#xf1d2;" d="M0 21v86h427v-86h-427zM43 85v-42h42v42h-42zM0 363h427v-86h-427v86zM85 299v42h-42v-42h42zM0 149v86h427v-86h-427zM43 213v-42h42v42h-42z" />
-<glyph unicode="&#xf1d3;" d="M363 299h64v-278h-171v86h-85v-86h-171v278h64v64h299v-64zM192 235v64h-64v-22h43v-21h-43v-64h64v21h-43v22h43zM299 192v107h-22v-43h-21v43h-21v-64h42v-43h22z" />
-<glyph unicode="&#xf1d4;" horiz-adv-x="384" d="M363 363v-43h-342v43h342zM384 149h-21v-128h-43v128h-85v-128h-214v128h-21v43l21 107h342l21 -107v-43zM192 64v85h-128v-85h128z" />
-<glyph unicode="&#xf1d5;" horiz-adv-x="341" d="M170.5 405q39.5 0 67 -3t53 -11.5t38 -26t12.5 -44.5v-203q0 -31 -21.5 -52.5t-52.5 -21.5l32 -32v-11h-256v11l32 32q-31 0 -53 21.5t-22 52.5v203q0 27 12.5 44.5t38 26t53 11.5t67 3zM74.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23 t22.5 -9.5zM149 213v107h-106v-107h106zM266.5 85q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM299 213v107h-107v-107h107z" />
-<glyph unicode="&#xf1d6;" horiz-adv-x="469" d="M123 345l-30 -30l-39 38l30 30zM64 224v-43h-64v43h64zM256 436v-63h-43v63h43zM415 353l-38 -38l-30 30l38 38zM346 61l30 29l39 -38l-30 -30zM405 224h64v-43h-64v43zM235 331q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5 t90.5 37.5zM213 -31v63h43v-63h-43zM54 52l39 39l30 -30l-39 -39z" />
-<glyph unicode="&#xf1d7;" horiz-adv-x="469" d="M0 256v43h43v-43h-43zM0 171v42h43v-42h-43zM0 341q0 18 12.5 30.5t30.5 12.5v-43h-43zM171 0v43h42v-43h-42zM0 85v43h43v-43h-43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM427 384q17 0 29.5 -12.5t12.5 -30.5v-85h-213v128h171zM427 85v43h42v-43h-42zM171 341v43 h42v-43h-42zM85 0v43h43v-43h-43zM85 341v43h43v-43h-43zM427 0v43h42q0 -18 -12.5 -30.5t-29.5 -12.5zM427 171v42h42v-42h-42zM256 0v43h43v-43h-43zM341 0v43h43v-43h-43z" />
-<glyph unicode="&#xf1d8;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 43v213h-171v85h-213v-298h384z" />
-<glyph unicode="&#xf1d9;" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-320q-21 0 -34 19l-115 173l115 173q13 19 34 19h320zM405 115l-76 77l76 77l-30 30l-76 -77l-77 77l-30 -30l77 -77l-77 -77l30 -30l77 77l76 -77z" />
-<glyph unicode="&#xf1da;" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-318q-23 0 -36 19l-115 173l115 173q13 19 34 19h320zM192 160q13 0 22.5 9.5t9.5 22.5t-9.5 22.5t-22.5 9.5t-22.5 -9.5t-9.5 -22.5t9.5 -22.5t22.5 -9.5zM298.5 160q13.5 0 23 9.5t9.5 22.5 t-9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5t9 -22.5t22.5 -9.5zM405.5 160q13.5 0 22.5 9.5t9 22.5t-9 22.5t-22.5 9.5t-23 -9.5t-9.5 -22.5t9.5 -22.5t23 -9.5z" />
-<glyph unicode="&#xf1db;" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-320q-21 0 -34 19l-115 173l115 173q13 19 34 19h320z" />
-<glyph unicode="&#xf1dc;" horiz-adv-x="469" d="M299 384q17 0 29.5 -12.5t12.5 -30.5v-213q0 -18 -12 -30l-141 -141l-22 23q-10 9 -10 22l1 7l20 98h-134q-18 0 -30.5 12.5t-12.5 29.5v2v41q0 8 3 16l64 150q11 26 40 26h192zM384 384h85v-256h-85v256z" />
-<glyph unicode="&#xf1dd;" horiz-adv-x="512" d="M256 320v-27q0 -6 -2 -11l-49 -113q-8 -20 -29 -20h-144q-13 0 -22.5 9.5t-9.5 22.5v139q0 13 9 23l106 105l17 -17q7 -7 7 -17l-1 -5l-14 -68h111q8 0 14.5 -6t6.5 -15zM480 235q13 0 22.5 -9.5t9.5 -22.5v-139q0 -13 -9 -23l-106 -105l-17 17q-7 7 -7 17l1 5l14 68 h-111q-8 0 -14.5 6t-6.5 15v27q0 6 2 11l49 113q8 20 29 20h144z" />
-<glyph unicode="&#xf1de;" horiz-adv-x="469" d="M0 0v256h85v-256h-85zM469 235v-2v-41q0 -8 -3 -16l-64 -150q-11 -26 -39 -26h-192q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 13 30l140 141l23 -23q9 -9 9 -22l-1 -7l-20 -98h135q17 0 29.5 -12.5t12.5 -29.5z" />
-<glyph unicode="&#xf1df;" d="M384 192q0 -18 12.5 -30.5t30.5 -12.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v85q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5v85q0 18 12.5 30.5t30.5 12.5h341q18 0 30.5 -12.5t12.5 -30.5v-85q-18 0 -30.5 -12.5t-12.5 -30.5z M290 90l-24 87l71 58l-91 5l-33 84l-33 -84l-90 -5l70 -58l-23 -87l76 49z" />
-<glyph unicode="&#xf1e0;" horiz-adv-x="469" d="M298.5 363q70.5 0 120.5 -50t50 -121t-50 -121t-120.5 -50t-120.5 50t-50 121t50 121t120.5 50zM299 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5zM43 192q0 -41 23.5 -74t61.5 -47v-44q-56 14 -92 60t-36 105 t36 105t92 60v-44q-38 -14 -61.5 -47t-23.5 -74z" />
-<glyph unicode="&#xf1e1;" horiz-adv-x="469" d="M235 192q0 48 34.5 82.5t82.5 34.5t82.5 -34.5t34.5 -82.5h-234zM235 192q0 -48 -35 -82.5t-83 -34.5t-82.5 34.5t-34.5 82.5h235zM235 192q-48 0 -83 34.5t-35 82.5t35 83t83 35v-235zM235 192q48 0 82.5 -34.5t34.5 -82.5t-34.5 -83t-82.5 -35v235z" />
-<glyph unicode="&#xf1e2;" horiz-adv-x="341" d="M341 235q0 -30 -18 -52.5t-46 -30.5v-24h64q0 -29 -18 -52t-46 -30v-25q0 -8 -6 -14.5t-15 -6.5h-171q-8 0 -14.5 6.5t-6.5 14.5v25q-28 7 -46 30t-18 52h64v24q-28 8 -46 30.5t-18 52.5h64v24q-28 7 -46 30t-18 52h64v22q0 8 6.5 14.5t14.5 6.5h171q9 0 15 -6.5t6 -14.5 v-22h64q0 -29 -18 -52t-46 -30v-24h64zM170.5 43q17.5 0 30 12.5t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5zM170.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM170.5 256q17.5 0 30 12.5 t12.5 30t-12.5 30t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" />
-<glyph unicode="&#xf1e3;" horiz-adv-x="469" d="M253 127l-16 -44l-66 66l-107 -106l-30 30l108 107q-40 44 -63 97h42q20 -39 50 -71q45 50 67 114h-238v43h149v42h43v-42h149v-43h-62q-24 -78 -79 -139l-1 -1zM373 235l96 -256h-42l-24 64h-102l-24 -64h-42l96 256h42zM317 85h70l-35 93z" />
-<glyph unicode="&#xf1e4;" d="M213 78l137 219h-273zM213 -2l-213 341h427z" />
-<glyph unicode="&#xf1e5;" d="M213 282l-136 -218h273zM213 363l214 -342h-427z" />
-<glyph unicode="&#xf1e6;" horiz-adv-x="469" d="M405 277l64 -85v-107h-42q0 -26 -19 -45t-45.5 -19t-45 19t-18.5 45h-128q0 -26 -19 -45t-45.5 -19t-45 19t-18.5 45h-43v235q0 18 12.5 30.5t30.5 12.5h298v-86h64zM106.5 53q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM395 245h-54v-53 h95zM362.5 53q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5z" />
-<glyph unicode="&#xf1e7;" d="M420 207q7 -6 7 -15t-7 -15l-192 -192q-6 -6 -15 -6t-15 6l-192 192q-6 6 -6 15t6 15l192 192q6 6 15 6t15 -6zM256 139l75 74l-75 75v-53h-107q-9 0 -15 -6.5t-6 -15.5v-85h43v64h85v-53z" />
-<glyph unicode="&#xf1e8;" d="M43 363v-150h-43v150q0 17 12.5 29.5t30.5 12.5h149v-42h-149zM171 171l63 -79l43 57l64 -85h-256zM320 266.5q0 -13.5 -9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5t22.5 -9.5t9.5 -23zM384 405q18 0 30.5 -12.5t12.5 -29.5v-150h-43v150h-149v42h149z M384 21v150h43v-150q0 -17 -12.5 -29.5t-30.5 -12.5h-149v42h149zM43 171v-150h149v-42h-149q-18 0 -30.5 12.5t-12.5 29.5v150h43z" />
-<glyph unicode="&#xf1e9;" horiz-adv-x="341" d="M110 89l121 121q25 -25 25 -60.5t-25 -60.5t-60.5 -25t-60.5 25zM299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h256zM128 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5 t6 15t-6 15t-15 6.5zM64 363q-9 0 -15 -6.5t-6 -15t6 -15t15 -6.5t15 6.5t6 15t-6 15t-15 6.5zM171 21q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
-<glyph unicode="&#xf1ea;" horiz-adv-x="341" d="M0 363h341v-342h-341v342zM43 277v-213h256v213h-256z" />
-<glyph unicode="&#xf1eb;" horiz-adv-x="341" d="M341 21h-341v86h341v-86z" />
-<glyph unicode="&#xf1ec;" horiz-adv-x="341" d="M0 277h85v86h256v-256h-85v-86h-256v256zM256 277v-128h43v171h-171v-43h128zM43 192v-128h170v128h-170z" />
-<glyph unicode="&#xf1ed;" horiz-adv-x="470" d="M464 43q6 -5 6 -14.5t-8 -15.5l-49 -49q-7 -7 -15.5 -7t-14.5 7l-194 194q-37 -15 -77.5 -6.5t-70.5 38.5q-31 32 -39 75.5t12 82.5l94 -92l64 64l-92 92q38 18 82 10.5t76 -38.5q30 -30 38.5 -70.5t-6.5 -76.5z" />
-<glyph unicode="&#xf1ee;" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM192 235h-43v-43h-21v43h-43v21h43v43 h21v-43h43v-21z" />
-<glyph unicode="&#xf1ef;" horiz-adv-x="373" d="M267 149l106 -106l-32 -32l-106 106v17l-6 6q-39 -33 -90 -33q-58 0 -98.5 40.5t-40.5 98t40.5 98t98 40.5t98 -40.5t40.5 -98.5q0 -51 -33 -90l6 -6h17zM139 149q40 0 68 28t28 68t-28 68t-68 28t-68 -28t-28 -68t28 -68t68 -28zM85 256h107v-21h-107v21z" />
-<glyph unicode="&#xf1f0;" d="M192 128h43v-43h-43v43zM192 299h43v-128h-43v128zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf1f1;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 85v43h-43v-43h43zM235 171v128h-43v-128h43z" />
-<glyph unicode="&#xf1f2;" horiz-adv-x="384" d="M272 384l112 -112v-160l-112 -112h-160l-112 112v160l112 112h160zM192 79q12 0 20 8t8 19.5t-8 19.5t-20 8t-20 -8t-8 -19.5t8 -19.5t20 -8zM213 171v128h-42v-128h42z" />
-<glyph unicode="&#xf1f3;" horiz-adv-x="469" d="M469 192l-52 -59l8 -79l-77 -17l-41 -68l-72 31l-73 -31l-40 67l-77 18l7 79l-52 59l52 60l-7 78l77 17l40 68l73 -31l72 31l41 -68l77 -17l-8 -79zM256 85v43h-43v-43h43zM256 171v128h-43v-128h43z" />
-<glyph unicode="&#xf1f4;" horiz-adv-x="469" d="M0 0l235 405l234 -405h-469zM256 64v43h-43v-43h43zM256 149v86h-43v-86h43z" />
-<glyph unicode="&#xf1f5;" d="M192 64v43h43v-43h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM213.5 320q35.5 0 60.5 -25t25 -60 q0 -18 -10 -32.5t-22 -23t-22 -22t-10 -29.5h-43q0 23 10 39.5t22 24t22 18.5t10 25q0 17 -12.5 29.5t-30 12.5t-30 -12.5t-12.5 -29.5h-43q0 35 25 60t60.5 25z" />
-<glyph unicode="&#xf1f6;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 43v42h-43v-42h43zM279 208q20 20 20 48q0 35 -25 60t-60.5 25t-60.5 -25t-25 -60h43q0 18 12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-13 -30l-26 -27 q-25 -25 -25 -60v-11h43q0 22 5.5 34.5t19.5 25.5z" />
-<glyph unicode="&#xf1f7;" d="M192 85v128h43v-128h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM192 256v43h43v-43h-43z" />
-<glyph unicode="&#xf1f8;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM235 85v128h-43v-128h43zM235 256v43h-43v-43h43z" />
-<glyph unicode="&#xf1f9;" horiz-adv-x="447" d="M118 372q-33 -24 -53 -60t-22 -77h-43q2 50 25.5 94t62.5 73zM404 235q-2 41 -22.5 77t-53.5 60l31 30q39 -29 62 -73t26 -94h-43zM362 224v-117l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5z M223 -21q-17 0 -29.5 12.5t-12.5 29.5h85q0 -8 -3 -16q-9 -21 -31 -25q-4 -1 -9 -1z" />
-<glyph unicode="&#xf1fa;" horiz-adv-x="384" d="M150 0h84q0 -18 -12 -30.5t-30 -12.5t-30 12.5t-12 30.5zM339 89l45 -45v-23h-384v23l45 45v124q0 52 32 91.5t81 51.5v15q0 14 10 24t24 10t24 -10t10 -24v-15q49 -12 81 -51.5t32 -91.5v-124zM277 170v43h-64v64h-42v-64h-64v-43h64v-64h42v64h64z" />
-<glyph unicode="&#xf1fb;" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117zM277 85v139q0 40 -28 68t-68 28t-68 -28t-28 -68v-139 h192z" />
-<glyph unicode="&#xf1fc;" horiz-adv-x="384" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 224v-79l-202 202q17 8 31 12v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5zM314 43h-314v21l43 43v117q0 38 19 71l-62 62l27 27l357 -357l-27 -27z" />
-<glyph unicode="&#xf1fd;" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117zM235 239v38h-107v-38h60l-60 -73v-38h107v38h-60z" />
-<glyph unicode="&#xf1fe;" horiz-adv-x="363" d="M181.5 -21q-17.5 0 -30 12.5t-12.5 29.5h85q0 -17 -12.5 -29.5t-30 -12.5zM320 107l43 -43v-21h-363v21l43 43v117q0 49 30 86.5t76 48.5v14q0 14 9.5 23t23 9t22.5 -9t9 -23v-14q47 -11 77 -48.5t30 -86.5v-117z" />
-<glyph unicode="&#xf1ff;" horiz-adv-x="469" d="M298.5 192q-35.5 0 -60.5 25t-25 60.5t25 60.5t60.5 25t60.5 -25t25 -60.5t-25 -60.5t-60.5 -25zM107 235h64v-43h-64v-64h-43v64h-64v43h64v64h43v-64zM298.5 149q31.5 0 69.5 -9t69.5 -29.5t31.5 -46.5v-43h-341v43q0 26 31.5 46.5t69.5 29.5t69.5 9z" />
-<glyph unicode="&#xf200;" horiz-adv-x="512" d="M448 277l-64 -42l-64 42v22l64 -43l64 43v-22zM469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h426zM170.5 320q-26.5 0 -45 -18.5t-18.5 -45.5t18.5 -45.5t45 -18.5t45.5 18.5 t19 45.5t-19 45.5t-45.5 18.5zM299 64v21q0 20 -24 36t-52.5 23t-52 7t-52 -7t-52 -23t-23.5 -36v-21h256zM469 192v128h-170v-128h170z" />
-<glyph unicode="&#xf201;" horiz-adv-x="384" d="M192 187q-20 0 -34 14t-14 34t14 34t34 14t34 -14t14 -34t-14 -34t-34 -14zM288 101v-16h-192v16q0 22 33 35t63 13t63 -13t33 -35zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5 t30.5 12.5h298zM341 43v298h-298v-298h298z" />
-<glyph unicode="&#xf202;" horiz-adv-x="512" d="M469 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h426zM170.5 320q-26.5 0 -45 -18.5t-18.5 -45.5t18.5 -45.5t45 -18.5t45.5 18.5t19 45.5t-19 45.5t-45.5 18.5zM299 64v21 q0 20 -24 36t-52.5 23t-52 7t-52 -7t-52 -23t-23.5 -36v-21h256zM381 149q-8 22 -8 43t8 43h35l32 42l-42 43q-44 -33 -59 -85q-6 -22 -6 -43t6 -43q15 -52 59 -85l42 43l-32 42h-35z" />
-<glyph unicode="&#xf203;" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298zM256 256q0 27 -18.5 45.5t-45.5 18.5t-45.5 -18.5t-18.5 -45.5t18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5zM64 85v-21h256 v21q0 20 -23.5 36t-52.5 23t-52 7t-52 -7t-52.5 -23t-23.5 -36z" />
-<glyph unicode="&#xf204;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM192 320q-27 0 -45.5 -18.5t-18.5 -45.5t18.5 -45.5t45.5 -18.5t45.5 18.5t18.5 45.5 t-18.5 45.5t-45.5 18.5zM320 64v21q0 20 -23.5 36t-52.5 23t-52 7t-52 -7t-52.5 -23t-23.5 -36v-21h256z" />
-<glyph unicode="&#xf205;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 341q-26.5 0 -45.5 -18.5t-19 -45t19 -45.5t45.5 -19t45 19t18.5 45.5t-18.5 45t-45 18.5zM213.5 38q39.5 0 73 18.5t54.5 50.5q0 20 -23.5 35.5 t-52 23t-52 7.5t-52 -7.5t-52 -23t-24.5 -35.5q21 -32 55 -50.5t73.5 -18.5z" />
-<glyph unicode="&#xf206;" horiz-adv-x="341" d="M170.5 322q-18.5 0 -31.5 -13t-13 -31.5t13 -31.5t31.5 -13t31.5 13t13 31.5t-13 31.5t-31.5 13zM171 130q-44 0 -87 -16.5t-43 -28.5v-23h260v23q0 12 -43 28.5t-87 16.5zM170.5 363q35.5 0 60.5 -25t25 -60.5t-25 -60.5t-60.5 -25t-60.5 25t-25 60.5t25 60.5t60.5 25z M170.5 171q31.5 0 69.5 -9t69.5 -29.5t31.5 -47.5v-64h-341v64q0 27 31.5 47.5t69.5 29.5t69.5 9z" />
-<glyph unicode="&#xf207;" horiz-adv-x="341" d="M170.5 192q-35.5 0 -60.5 25t-25 60.5t25 60.5t60.5 25t60.5 -25t25 -60.5t-25 -60.5t-60.5 -25zM170.5 149q31.5 0 69.5 -9t69.5 -29.5t31.5 -46.5v-43h-341v43q0 26 31.5 46.5t69.5 29.5t69.5 9z" />
-<glyph unicode="&#xf208;" horiz-adv-x="512" d="M171 235v-43h-64v-64h-43v64h-64v43h64v64h43v-64h64zM384 213q-10 0 -19 3q19 28 19 61q0 34 -19 61q9 3 19 3q27 0 45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19zM277.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM419 167 q37 -6 65 -22t28 -38v-43h-64v43q0 34 -29 60zM277 171q40 0 84 -18t44 -46v-43h-256v43q0 28 44 46t84 18z" />
-<glyph unicode="&#xf209;" d="M309 192q-22 0 -37.5 15.5t-15.5 37.5t15.5 38t37.5 16t37.5 -16t15.5 -38t-15.5 -37.5t-37.5 -15.5zM149.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM309.5 149q36.5 0 77 -16t40.5 -42v-48h-235v48q0 26 40.5 42t77 16z M149 171q22 0 51 -6q-51 -28 -51 -74v-48h-149v53q0 23 27.5 41t61 26t60.5 8z" />
-<glyph unicode="&#xf20a;" d="M384 448v-43h-341v43h341zM43 -64v43h341v-43h-341zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM213 304q-20 0 -34 -14t-14 -34t14 -34t34 -14t34 14t14 34t-14 34 t-34 14zM320 85v32q0 24 -36.5 39t-70 15t-70 -15t-36.5 -39v-32h213z" />
-<glyph unicode="&#xf20b;" horiz-adv-x="469" d="M427 341h42v-298h-42v298zM341 43v298h43v-298h-43zM277 341q9 0 15.5 -6t6.5 -15v-256q0 -9 -6.5 -15t-15.5 -6h-256q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h256zM149 283q-20 0 -34 -14t-14 -34t14 -34t34 -14t34 14t14 34t-14 34t-34 14zM245 85v16q0 22 -33 35 t-63 13t-63 -13t-33 -35v-16h192z" />
-<glyph unicode="&#xf20c;" horiz-adv-x="469" d="M331 171q25 0 56 -7.5t56.5 -24t25.5 -38.5v-58h-469v58q0 22 25.5 38.5t56.5 24t57 7.5q50 0 96 -22q46 22 96 22zM245 75v26q0 10 -35 24t-71.5 14t-71.5 -14t-35 -24v-26h213zM437 75v26q0 10 -35 24t-71 14q-32 0 -65 -12q11 -12 11 -26v-26h160zM139 192 q-31 0 -53 22t-22 53t22 52.5t53 21.5t52.5 -21.5t21.5 -52.5t-21.5 -53t-52.5 -22zM138.5 309q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM331 192q-31 0 -53 22t-22 53t22 52.5t53 21.5t52.5 -21.5t21.5 -52.5t-21.5 -53 t-52.5 -22zM330.5 309q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5z" />
-<glyph unicode="&#xf20d;" horiz-adv-x="469" d="M320 213q-27 0 -45.5 19t-18.5 45.5t18.5 45t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19zM149.5 213q-26.5 0 -45.5 19t-19 45.5t19 45t45.5 18.5t45 -18.5t18.5 -45t-18.5 -45.5t-45 -19zM149.5 171q27.5 0 60.5 -8t61 -26t28 -41v-53h-299v53q0 23 27.5 41 t61 26t61 8zM320 171q28 0 61 -8t60.5 -26t27.5 -41v-53h-128v53q0 43 -42 74q13 1 21 1z" />
-<glyph unicode="&#xf20e;" d="M149 197q11 0 19 -7.5t8 -18.5t-8 -19t-19 -8t-18.5 8t-7.5 19t7.5 18.5t18.5 7.5zM277 197q11 0 19 -7.5t8 -18.5t-8 -19t-19 -8t-18.5 8t-7.5 19t7.5 18.5t18.5 7.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5 t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121q0 24 -7 48q-24 -5 -48 -5q-53 0 -99 24t-75 66q-33 -80 -111 -115q-1 -10 -1 -18q0 -71 50 -121t120.5 -50z" />
-<glyph unicode="&#xf20f;" horiz-adv-x="192" d="M128 -21h-64v128h-64l54 162q4 14 15.5 22t25.5 8h2q14 0 25 -8t16 -22l54 -162h-64v-128zM96 320q-18 0 -30.5 12.5t-12.5 30t12.5 30t30.5 12.5t30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5z" />
-<glyph unicode="&#xf210;" horiz-adv-x="149" d="M32 -21v160h-32v117q0 18 12.5 30.5t30.5 12.5h64q17 0 29.5 -12.5t12.5 -30.5v-117h-32v-160h-85zM74.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5z" />
-<glyph unicode="&#xf211;" horiz-adv-x="363" d="M32 -21v160h-32v117q0 18 12.5 30.5t30.5 12.5h64q17 0 29.5 -12.5t12.5 -30.5v-117h-32v-160h-85zM299 -21h-64v128h-64l54 162q4 14 15.5 22t24.5 8h3q14 0 25 -8t15 -22l55 -162h-64v-128zM74.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30 t-12.5 -30t-30 -12.5zM266.5 320q-17.5 0 -30 12.5t-12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5z" />
-<glyph unicode="&#xf212;" horiz-adv-x="384" d="M192 405q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30.5 12.5t-12.5 30t12.5 30t30.5 12.5zM384 256h-128v-277h-43v128h-42v-128h-43v277h-128v43h384v-43z" />
-<glyph unicode="&#xf213;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM288 213q-13 0 -22.5 9.5t-9.5 23t9.5 22.5t22.5 9t22.5 -9 t9.5 -22.5t-9.5 -23t-22.5 -9.5zM138.5 213q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM213.5 149q36.5 0 66 -20.5t42.5 -53.5h-218q13 33 43 53.5t66.5 20.5z" />
-<glyph unicode="&#xf214;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM288 213q-13 0 -22.5 9.5t-9.5 23t9.5 22.5t22.5 9t22.5 -9 t9.5 -22.5t-9.5 -23t-22.5 -9.5zM138.5 213q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM213.5 75q-36.5 0 -66.5 20.5t-43 53.5h218q-13 -33 -42.5 -53.5t-66 -20.5z" />
-<glyph unicode="&#xf215;" horiz-adv-x="343" d="M226.5 331q-17.5 0 -30.5 12.5t-13 30t13 30t30.5 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5zM149 35l-149 29l9 43l104 -21l34 173l-38 -15v-73h-43v100l111 47q3 0 8.5 1t8.5 1q22 0 36 -21l22 -34q13 -23 37.5 -37t53.5 -14v-43q-71 0 -117 53l-13 -64l45 -42v-160 h-43v128l-44 42z" />
-<glyph unicode="&#xf216;" horiz-adv-x="277" d="M160 331q-18 0 -30.5 12.5t-12.5 30t12.5 30t30.5 12.5t30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5zM81 258l-60 -301h45l39 171l44 -43v-128h43v160l-45 43l13 64q46 -53 117 -53v42q-29 0 -53.5 14.5t-37.5 37.5l-22 34q-14 21 -36 21q-3 0 -8.5 -1t-8.5 -1l-111 -47 v-100h43v72l38 15v0z" />
-<glyph unicode="&#xf217;" horiz-adv-x="469" d="M171 107q-27 0 -45.5 18.5t-18.5 45.5q0 24 16.5 42.5t40.5 20.5h3q9 20 27.5 31.5t40.5 11.5q28 0 48.5 -18t24.5 -46h1q22 0 38 -15.5t16 -37.5t-16 -37.5t-38 -15.5h-138zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384 q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" />
-<glyph unicode="&#xf218;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM309 107q22 0 38 15.5t16 37.5t-16 37.5t-38 15.5h-10q0 36 -25 61t-61 25q-29 0 -52 -18.5t-30 -46.5l-3 1q-27 0 -45.5 -19t-18.5 -45.5t18.5 -45 t45.5 -18.5h181z" />
-<glyph unicode="&#xf219;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM213 85l141 141l-30 30l-111 -110l-44 44l-30 -30z" />
-<glyph unicode="&#xf21a;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM363 171h-64v85h-86v-85h-64l107 -107z" />
-<glyph unicode="&#xf21b;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -55 -45 -87l-31 31q33 19 33 56q0 27 -18.5 45.5t-45.5 18.5h-32v11q0 48 -34 82.5t-83 34.5q-29 0 -54 -13l-32 31q40 25 86 25q58 0 102 -37t55 -92zM64 336l27 27l357 -357l-27 -27l-43 42h-250q-53 0 -90.5 37.5t-37.5 90.5 q0 52 35.5 89t87.5 39zM165 235h-37q-35 0 -60 -25t-25 -60.5t25 -60.5t60 -25h208z" />
-<glyph unicode="&#xf21c;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q21 40 59 63.5t83 23.5q58 0 102 -37t55 -92zM405 64q27 0 45.5 19t18.5 45t-18.5 45t-45.5 19h-32v11q0 48 -34.5 82.5t-82.5 34.5 q-58 0 -94 -47q41 -12 67.5 -46t26.5 -78h-43q0 36 -25 61t-60 25t-60 -25t-25 -60.5t25 -60.5t60 -25h277z" />
-<glyph unicode="&#xf21d;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM405 64q27 0 45.5 18.5t18.5 45.5t-18.5 45.5t-45.5 18.5h-32v11q0 48 -34 82.5t-83 34.5 q-40 0 -71 -24t-42 -61h-15q-35 0 -60 -25t-25 -60.5t25 -60.5t60 -25h277z" />
-<glyph unicode="&#xf21e;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92zM299 171h64l-107 106l-107 -106h64v-86h86v86z" />
-<glyph unicode="&#xf21f;" horiz-adv-x="512" d="M413 234q42 -3 70.5 -33.5t28.5 -72.5q0 -44 -31.5 -75.5t-75.5 -31.5h-277q-53 0 -90.5 37.5t-37.5 90.5q0 50 33 86t81 41q20 40 58 63.5t84 23.5q58 0 102 -37t55 -92z" />
-<glyph unicode="&#xf220;" horiz-adv-x="299" d="M299 256l-150 -149l-149 149h85v128h128v-128h86zM0 64h299v-43h-299v43z" />
-<glyph unicode="&#xf221;" horiz-adv-x="341" d="M213 405l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170zM256 107v42h-64v64h-43v-64h-64v-42h64v-64h43v64h64zM192 256h117l-117 117v-117z" />
-<glyph unicode="&#xf222;" horiz-adv-x="341" d="M213 405l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h170zM256 64v43h-171v-43h171zM256 149v43h-171v-43h171zM192 256h117l-117 117v-117z" />
-<glyph unicode="&#xf223;" horiz-adv-x="341" d="M43 405h170l128 -128v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-257q-17 0 -29.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5zM192 256h117l-117 117v-117z" />
-<glyph unicode="&#xf224;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM384 64v213h-341v-213h341z" />
-<glyph unicode="&#xf225;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM277.5 256q-17.5 0 -30 -12.5t-12.5 -30t12.5 -30t30 -12.5t30 12.5t12.5 30t-12.5 30t-30 12.5zM363 85v22 q0 19 -29.5 30.5t-56 11.5t-56 -11.5t-29.5 -30.5v-22h171z" />
-<glyph unicode="&#xf226;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128l42 -43h171zM247 64l-20 87l67 58l-89 8l-34 82l-35 -82l-89 -8l68 -58l-21 -87l77 45z" />
-<glyph unicode="&#xf227;" d="M43 363h128l42 -43h171q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5zM276 256l-25 -60l-65 -5l49 -43l-15 -63l56 33l56 -33l-14 63l49 43l-65 5z" />
-<glyph unicode="&#xf228;" d="M171 363l42 -43h171q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h128z" />
-<glyph unicode="&#xf229;" horiz-adv-x="299" d="M139 256h32v-128h-32v128zM85 256q10 0 16 -6.5t6 -14.5v-11h-75v-64h43v32h32v-43q0 -8 -6 -14.5t-16 -6.5h-64q-9 0 -15 6.5t-6 14.5v86q0 8 6 14.5t15 6.5h64zM299 224h-64v-21h42v-32h-42v-43h-32v128h96v-32z" />
-<glyph unicode="&#xf22a;" horiz-adv-x="299" d="M0 363h299v-43h-299v43zM0 149l149 150l150 -150h-86v-128h-128v128h-85z" />
-<glyph unicode="&#xf22b;" horiz-adv-x="384" d="M0 384h384v-384h-384v384zM171 43v128h-128v-128h128zM171 213v128h-128v-128h128zM341 43v128h-128v-128h128zM341 213v128h-128v-128h128z" />
-<glyph unicode="&#xf22c;" horiz-adv-x="384" d="M128 213v-42h-43v42h43zM213 128v-43h-42v43h42zM128 384v-43h-43v43h43zM213 213v-42h-42v42h42zM43 384v-43h-43v43h43zM213 299v-43h-42v43h42zM299 213v-42h-43v42h43zM213 384v-43h-42v43h42zM299 384v-43h-43v43h43zM341 171v42h43v-42h-43zM341 85v43h43v-43h-43z M43 299v-43h-43v43h43zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM43 213v-42h-43v42h43zM0 0v43h384v-43h-384zM43 128v-43h-43v43h43z" />
-<glyph unicode="&#xf22d;" horiz-adv-x="384" d="M85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM85 0v43h43v-43h-43zM171 85v43h42v-43h-42zM171 0v43h42v-43h-42zM0 0v43h43v-43h-43zM0 85v43h43v-43h-43zM0 171v42h43v-42h-43zM0 256v43h43v-43h-43zM0 341v43h43v-43h-43zM171 171v42h42v-42h-42zM341 85v43h43v-43 h-43zM341 171v42h43v-42h-43zM341 0v43h43v-43h-43zM341 256v43h43v-43h-43zM171 256v43h42v-43h-42zM341 384h43v-43h-43v43zM171 341v43h42v-43h-42zM256 0v43h43v-43h-43zM256 171v42h43v-42h-43zM256 341v43h43v-43h-43z" />
-<glyph unicode="&#xf22e;" horiz-adv-x="512" d="M379 299l-214 -214h-80v80l214 214zM442 362l-42 -42l-80 80l42 42q6 6 15 6t15 -6l50 -50q6 -6 6 -15t-6 -15zM0 21h512v-85h-512v85z" />
-<glyph unicode="&#xf22f;" horiz-adv-x="384" d="M0 0v43h43v-43h-43zM43 299v-43h-43v43h43zM0 85v43h43v-43h-43zM85 0v43h43v-43h-43zM43 384v-43h-43v43h43zM128 384v-43h-43v43h43zM299 384v-43h-43v43h43zM213 299v-43h-42v43h42zM213 384v-43h-42v43h42zM341 85v43h43v-43h-43zM171 0v43h42v-43h-42zM0 171v42h384 v-42h-384zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM171 85v43h42v-43h-42zM256 0v43h43v-43h-43zM341 0v43h43v-43h-43z" />
-<glyph unicode="&#xf230;" horiz-adv-x="384" d="M0 0v43h43v-43h-43zM85 0v43h43v-43h-43zM43 299v-43h-43v43h43zM0 85v43h43v-43h-43zM128 384v-43h-43v43h43zM43 384v-43h-43v43h43zM299 384v-43h-43v43h43zM341 256v43h43v-43h-43zM341 384h43v-43h-43v43zM256 0v43h43v-43h-43zM213 384v-171h171v-42h-171v-171h-42 v171h-171v42h171v171h42zM341 0v43h43v-43h-43zM341 85v43h43v-43h-43z" />
-<glyph unicode="&#xf231;" horiz-adv-x="384" d="M171 0v43h42v-43h-42zM171 85v43h42v-43h-42zM171 341v43h42v-43h-42zM171 256v43h42v-43h-42zM171 171v42h42v-42h-42zM85 0v43h43v-43h-43zM85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM0 0v384h43v-384h-43zM341 256v43h43v-43h-43zM256 0v43h43v-43h-43zM341 85v43 h43v-43h-43zM341 384h43v-43h-43v43zM341 171v42h43v-42h-43zM341 0v43h43v-43h-43zM256 171v42h43v-42h-43zM256 341v43h43v-43h-43z" />
-<glyph unicode="&#xf232;" horiz-adv-x="384" d="M213 299v-43h-42v43h42zM213 213v-42h-42v42h42zM299 213v-42h-43v42h43zM0 384h384v-384h-384v384zM341 43v298h-298v-298h298zM213 128v-43h-42v43h42zM128 213v-42h-43v42h43z" />
-<glyph unicode="&#xf233;" horiz-adv-x="384" d="M85 0v43h43v-43h-43zM0 341v43h43v-43h-43zM85 341v43h43v-43h-43zM85 171v42h43v-42h-43zM0 0v43h43v-43h-43zM171 0v43h42v-43h-42zM0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM0 256v43h43v-43h-43zM171 85v43h42v-43h-42zM256 171v42h43v-42h-43zM341 384h43v-384 h-43v384zM256 0v43h43v-43h-43zM256 341v43h43v-43h-43zM171 171v42h42v-42h-42zM171 341v43h42v-43h-42zM171 256v43h42v-43h-42z" />
-<glyph unicode="&#xf234;" horiz-adv-x="384" d="M256 0v43h43v-43h-43zM341 0v43h43v-43h-43zM85 0v43h43v-43h-43zM171 0v43h42v-43h-42zM341 85v43h43v-43h-43zM341 171v42h43v-42h-43zM0 384h384v-43h-341v-341h-43v384zM341 256v43h43v-43h-43z" />
-<glyph unicode="&#xf235;" horiz-adv-x="384" d="M85 0v43h43v-43h-43zM85 171v42h43v-42h-43zM171 171v42h42v-42h-42zM171 0v43h42v-43h-42zM0 85v43h43v-43h-43zM0 0v43h43v-43h-43zM0 171v42h43v-42h-43zM0 256v43h43v-43h-43zM171 85v43h42v-43h-42zM341 256v43h43v-43h-43zM341 171v42h43v-42h-43zM0 384h384v-43 h-384v43zM341 85v43h43v-43h-43zM256 0v43h43v-43h-43zM171 256v43h42v-43h-42zM341 0v43h43v-43h-43zM256 171v42h43v-42h-43z" />
-<glyph unicode="&#xf236;" horiz-adv-x="384" d="M0 256v43h43v-43h-43zM0 341v43h43v-43h-43zM85 0v43h43v-43h-43zM85 171v42h43v-42h-43zM0 171v42h43v-42h-43zM0 0v43h43v-43h-43zM0 85v43h43v-43h-43zM85 341v43h43v-43h-43zM341 85v43h43v-43h-43zM171 0v384h42v-384h-42zM341 0v43h43v-43h-43zM341 171v42h43v-42 h-43zM341 384h43v-43h-43v43zM341 256v43h43v-43h-43zM256 341v43h43v-43h-43zM256 0v43h43v-43h-43zM256 171v42h43v-42h-43z" />
-<glyph unicode="&#xf237;" horiz-adv-x="405" d="M299 427v-43h-256v-299h-43v299q0 18 12.5 30.5t30.5 12.5h256zM363 341q17 0 29.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-29.5 -12.5h-235q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h235zM363 0v299h-235v-299h235z" />
-<glyph unicode="&#xf238;" horiz-adv-x="469" d="M341 128v171h-170v42h170q18 0 30.5 -12.5t12.5 -29.5v-171h-43zM128 85h341v-42h-85v-86h-43v86h-213q-18 0 -30.5 12.5t-12.5 29.5v214h-85v42h85v86h43v-342z" />
-<glyph unicode="&#xf239;" horiz-adv-x="384" d="M85 128h214v-43h-214v43zM0 0v43h384v-43h-384zM0 171v42h384v-42h-384zM85 299h214v-43h-214v43zM0 384h384v-43h-384v43z" />
-<glyph unicode="&#xf23a;" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM0 85v43h384v-43h-384zM0 171v42h384v-42h-384zM0 256v43h384v-43h-384zM0 384h384v-43h-384v43z" />
-<glyph unicode="&#xf23b;" horiz-adv-x="384" d="M256 128v-43h-256v43h256zM256 299v-43h-256v43h256zM0 171v42h384v-42h-384zM0 0v43h384v-43h-384zM0 384h384v-43h-384v43z" />
-<glyph unicode="&#xf23c;" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM128 85v43h256v-43h-256zM0 171v42h384v-42h-384zM128 256v43h256v-43h-256zM0 384h384v-43h-384v43z" />
-<glyph unicode="&#xf23d;" horiz-adv-x="229" d="M183 218q21 -10 33.5 -29.5t12.5 -43.5q0 -34 -23 -57.5t-56 -23.5h-150v299h133q36 0 61 -25t25 -61q0 -35 -36 -59zM64 309v-64h64q13 0 22.5 9.5t9.5 23t-9.5 22.5t-22.5 9h-64zM139 117q13 0 22.5 9.5t9.5 23t-9.5 22.5t-22.5 9h-75v-64h75z" />
-<glyph unicode="&#xf23e;" horiz-adv-x="384" d="M43 171v42h298v-42h-298zM0 85v43h299v-43h-299zM85 299h299v-43h-299v43z" />
-<glyph unicode="&#xf23f;" horiz-adv-x="384" d="M27 341l6 -5l308 -309l-27 -27l-121 121l-33 -78h-64l53 123l-149 148zM85 341h299v-64h-124l-34 -80l-45 44l16 36h-52l-60 60v4z" />
-<glyph unicode="&#xf240;" horiz-adv-x="512" d="M353 257q10 -9 10 -22.5t-10 -22.5l-117 -117q-9 -10 -22.5 -10t-22.5 10l-118 117q-9 9 -9 22.5t9 22.5l110 110l-51 51l31 30zM111 235h205l-103 102zM405 203q43 -47 43 -75q0 -18 -12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5q0 13 10.5 31.5t21.5 30.5zM0 21h512v-85 h-512v85z" />
-<glyph unicode="&#xf241;" horiz-adv-x="338" d="M299 149q0 -14 -3 -28l-184 184q14 19 28.5 37.5t22.5 27.5l8 10q5 -6 13.5 -16.5t30.5 -40t39 -56.5t31 -60.5t14 -57.5zM280 83l58 -59l-27 -27l-56 56q-36 -32 -84 -32q-53 0 -90.5 37.5t-37.5 90.5q0 35 28 88l-71 71l27 28l154 -155z" />
-<glyph unicode="&#xf242;" horiz-adv-x="512" d="M0 21h512v-85h-512v85zM235 384h42l117 -299h-48l-23 64h-134l-24 -64h-48zM205 192h102l-51 135z" />
-<glyph unicode="&#xf243;" horiz-adv-x="384" d="M171 85v43h213v-43h-213zM0 192l85 85v-170zM0 0v43h384v-43h-384zM0 384h384v-43h-384v43zM171 256v43h213v-43h-213zM171 171v42h213v-42h-213z" />
-<glyph unicode="&#xf244;" horiz-adv-x="384" d="M0 0v43h384v-43h-384zM0 277l85 -85l-85 -85v170zM171 85v43h213v-43h-213zM0 384h384v-43h-384v43zM171 256v43h213v-43h-213zM171 171v42h213v-42h-213z" />
-<glyph unicode="&#xf245;" horiz-adv-x="256" d="M85 363h171v-64h-60l-72 -171h47v-64h-171v64h60l72 171h-47v64z" />
-<glyph unicode="&#xf246;" horiz-adv-x="437" d="M96 299v-214h53l-74 -74l-75 74h53v214h-53l75 74l74 -74h-53zM181 341h256v-42h-256v42zM181 43v42h256v-42h-256zM181 171v42h256v-42h-256z" />
-<glyph unicode="&#xf247;" horiz-adv-x="395" d="M32 224q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5zM32 352q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5t9.5 22.5t22.5 9.5zM32 92q12 0 20 -8t8 -20t-8 -20t-20 -8t-20 8t-8 20t8 20t20 8z M96 43v42h299v-42h-299zM96 171v42h299v-42h-299zM96 341h299v-42h-299v42z" />
-<glyph unicode="&#xf248;" horiz-adv-x="405" d="M0 85v22h64v-86h-64v22h43v10h-22v22h22v10h-43zM21 277v64h-21v22h43v-86h-22zM0 213v22h64v-20l-38 -44h38v-22h-64v20l38 44h-38zM107 341h298v-42h-298v42zM107 43v42h298v-42h-298zM107 171v42h298v-42h-298z" />
-<glyph unicode="&#xf249;" horiz-adv-x="341" d="M85 235q-35 0 -60 25t-25 60t25 60t60 25h171v-42h-43v-235h-42v235h-43v-235h-43v107zM341 64l-85 -85v64h-256v42h256v64z" />
-<glyph unicode="&#xf24a;" horiz-adv-x="341" d="M128 235q-35 0 -60 25t-25 60t25 60t60 25h171v-42h-43v-235h-43v235h-42v-235h-43v107zM85 85h256v-42h-256v-64l-85 85l85 85v-64z" />
-<glyph unicode="&#xf24b;" horiz-adv-x="405" d="M128 363h277v-64h-106v-256h-64v256h-107v64zM0 192v64h192v-64h-64v-149h-64v149h-64z" />
-<glyph unicode="&#xf24c;" horiz-adv-x="469" d="M105 235q-5 4 -7 8q-11 22 -11 47t13 47q8 18 30 36q19 14 49 24q26 8 62 8q40 0 66 -10q25 -6 49 -26q20 -16 30 -40q11 -25 11 -52h-86q0 11 -4 24q-3 13 -13 19q-10 10 -21 13q-17 4 -30 4t-30 -4q-8 -2 -21 -11q-10 -7 -13 -15q-4 -13 -4 -19q0 -22 21 -34 q14 -9 43 -19h-134zM469 192v-43h-91q1 -1 1.5 -2t1 -3t1.5 -3q8 -20 8 -47q0 -24 -10 -49q-8 -18 -30 -36q-21 -18 -47 -24q-26 -8 -62 -8q-15 0 -40 4q-13 2 -39 10q-13 7 -34 20q-14 8 -28 25q-13 17 -19 34q-6 20 -6 45h85q0 -21 6 -34q5 -8 17 -21q10 -10 26 -13 q21 -4 34 -4t30 4q3 2 10 5t9 6q10 6 13 15q4 12 4 19q0 13 -2 19q-3 11 -13 17q-17 12 -25 15q-2 1 -7.5 3t-7.5 3h-254v43h469z" />
-<glyph unicode="&#xf24d;" horiz-adv-x="384" d="M149 43v64h86v-64h-86zM43 363h298v-64h-106v-64h-86v64h-106v64zM0 149v43h384v-43h-384z" />
-<glyph unicode="&#xf24e;" horiz-adv-x="341" d="M213 85v-42h-213v42h213zM341 256v-43h-341v43h341zM0 128v43h341v-43h-341zM0 341h341v-42h-341v42z" />
-<glyph unicode="&#xf24f;" horiz-adv-x="299" d="M149 85q-53 0 -90.5 37.5t-37.5 90.5v171h54v-171q0 -31 21.5 -52.5t52.5 -21.5t53 21.5t22 52.5v171h53v-171q0 -53 -37.5 -90.5t-90.5 -37.5zM0 43h299v-43h-299v43z" />
-<glyph unicode="&#xf250;" horiz-adv-x="341" d="M256 171l-85 -86l-86 86h64v213h43v-213h64zM0 43h341v-43h-341v43z" />
-<glyph unicode="&#xf251;" horiz-adv-x="341" d="M85 43l86 85l85 -85h-64v-86h-43v86h-64zM256 341l-85 -85l-86 85h64v86h43v-86h64zM0 213h341v-42h-341v42z" />
-<glyph unicode="&#xf252;" horiz-adv-x="341" d="M85 213l86 86l85 -86h-64v-213h-43v213h-64zM0 384h341v-43h-341v43z" />
-<glyph unicode="&#xf253;" horiz-adv-x="436" d="M360 222l76 77v-192h-192l78 77q-48 40 -110 40q-56 0 -100.5 -33t-61.5 -84l-50 16q22 68 80.5 111t131.5 43q84 0 148 -55z" />
-<glyph unicode="&#xf254;" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5v-43h-43zM0 171v42h43v-42h-43zM85 0v43h43v-43h-43zM0 256v43h43v-43h-43zM213 384v-43h-42v43h42zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM0 85v43h43v-43h-43zM128 384v-43h-43v43h43 zM171 0v43h42v-43h-42zM341 171v42h43v-42h-43zM341 0v43h43q0 -18 -12.5 -30.5t-30.5 -12.5zM341 256v43h43v-43h-43zM341 85v43h43v-43h-43zM256 0v43h43v-43h-43zM256 341v43h43v-43h-43zM85 85v214h214v-214h-214zM128 256v-128h128v128h-128z" />
-<glyph unicode="&#xf255;" horiz-adv-x="341" d="M299 256h42v-128h-341v128h43v-85h256v85z" />
-<glyph unicode="&#xf256;" horiz-adv-x="299" d="M0 85h299v-42h-299v42zM96 175l-19 -47h-45l101 235h32l102 -235h-45l-19 47h-107zM149 320l-40 -107h80z" />
-<glyph unicode="&#xf257;" d="M427 64h-86v-43h43l-64 -64l-64 64h43v43h-171q-18 0 -30.5 12.5t-12.5 30.5v170h-85v43h85v43h-42l64 64l64 -64h-43v-256h299v-43zM171 277v43h128q17 0 29.5 -12.5t12.5 -30.5v-128h-42v128h-128z" />
-<glyph unicode="&#xf258;" horiz-adv-x="437" d="M224 277q73 0 131.5 -43t81.5 -111l-51 -16q-17 51 -61.5 84t-100.5 33q-61 0 -109 -40l77 -77h-192v192l77 -77q64 55 147 55z" />
-<glyph unicode="&#xf259;" horiz-adv-x="363" d="M0 43v42h128v-42h-128zM341 341v-42h-341v42h341zM277 213q36 0 61 -25t25 -60t-25 -60t-61 -25h-42v-43l-64 64l64 64v-43h48q17 0 29.5 12.5t12.5 30.5t-12.5 30.5t-29.5 12.5h-283v42h277z" />
-<glyph unicode="&#xf25a;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM235 149v43h-43v-43h43zM235 235v85h-43v-85h43z" />
-<glyph unicode="&#xf25b;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-384l-86 85h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h341zM341 149v43h-256v-43h256zM341 213v43h-256v-43h256zM341 277v43h-256v-43h256z" />
-<glyph unicode="&#xf25c;" d="M426 363l1 -384l-86 85h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h341q18 0 30 -12.5t12 -29.5z" />
-<glyph unicode="&#xf25d;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM85 149h53l147 147q8 7 0 15l-38 38q-7 7 -15 0l-147 -147v-53zM341 149v43h-117l-43 -43h160z" />
-<glyph unicode="&#xf25e;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM64 149h299l-96 128l-75 -96l-53 64z" />
-<glyph unicode="&#xf25f;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM128 149v43h-43v-43h43zM128 213v43h-43v-43h43zM128 277v43h-43v-43h43zM277 149v43h-106v-43h106zM341 213v43h-170v-43h170zM341 277v43 h-170v-43h170z" />
-<glyph unicode="&#xf260;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM149 213v43h-42v-43h42zM235 213v43h-43v-43h43zM320 213v43h-43v-43h43z" />
-<glyph unicode="&#xf261;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM384 107v256h-341v-299l42 43h299z" />
-<glyph unicode="&#xf262;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM85 256v-43h256v43h-256zM256 149v43h-171v-43h171zM341 277v43h-256v-43h256z" />
-<glyph unicode="&#xf263;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM341 149v43h-256v-43h256zM341 213v43h-256v-43h256zM341 277v43h-256v-43h256z" />
-<glyph unicode="&#xf264;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341zM341 149v171l-85 -68v68h-171v-171h171v69z" />
-<glyph unicode="&#xf265;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-299l-85 -85v384q0 17 12.5 29.5t30.5 12.5h341z" />
-<glyph unicode="&#xf266;" d="M405 320q9 0 15.5 -6.5t6.5 -14.5v-320l-86 85h-234q-9 0 -15.5 6.5t-6.5 14.5v43h278v192h42zM320 192q0 -9 -6.5 -15t-14.5 -6h-214l-85 -86v299q0 9 6.5 15t14.5 6h278q8 0 14.5 -6t6.5 -15v-192z" />
-<glyph unicode="&#xf267;" horiz-adv-x="496" d="M375 299l-135 -136l-30 30l135 136zM466 329l30 -30l-256 -256l-119 119l30 30l89 -89zM0 162l30 30l119 -119l-30 -30z" />
-<glyph unicode="&#xf268;" d="M213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM320 64v43h-213v-43h213zM177 149l143 143l-30 30l-113 -113l-40 41l-30 -30z" />
-<glyph unicode="&#xf269;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 85l192 192l-30 31l-162 -162l-77 76l-30 -30z" />
-<glyph unicode="&#xf26a;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM149 85l192 192l-30 31l-162 -162l-76 76l-30 -30z" />
-<glyph unicode="&#xf26b;" horiz-adv-x="375" d="M119 102l227 227l29 -30l-256 -256l-119 119l30 30z" />
-<glyph unicode="&#xf26c;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf26d;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5z" />
-<glyph unicode="&#xf26e;" d="M213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM277 192q0 -27 -18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5 t19 45.5t45.5 18.5t45 -18.5t18.5 -45.5z" />
-<glyph unicode="&#xf26f;" d="M213 299q44 0 75.5 -31.5t31.5 -75.5t-31.5 -75.5t-75.5 -31.5t-75 31.5t-31 75.5t31 75.5t75 31.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf270;" d="M107 213h213v-42h-213v42zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf271;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 171v42h-213v-42h213z" />
-<glyph unicode="&#xf272;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM299 171v42h-214v-42h214z" />
-<glyph unicode="&#xf273;" horiz-adv-x="299" d="M299 171h-299v42h299v-42z" />
-<glyph unicode="&#xf274;" horiz-adv-x="512" d="M341 277v-64h64v-42h-64v-64h-42v64h-64v42h64v64h42zM43 192q0 -44 23.5 -80.5t61.5 -54.5v-46q-56 20 -92 69.5t-36 111.5t36 111.5t92 69.5v-46q-38 -18 -61.5 -54.5t-23.5 -80.5zM320 384q79 0 135.5 -56.5t56.5 -135.5t-56.5 -135.5t-135.5 -56.5t-135.5 56.5 t-56.5 135.5t56.5 135.5t135.5 56.5zM320 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -105.5t105.5 -43.5z" />
-<glyph unicode="&#xf275;" d="M235 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM213 405q88 0 151 -62.5t63 -150.5t-63 -150.5t-151 -62.5t-150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf276;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM320 171v42h-85v86h-43v-86h-85v-42h85v-86h43v86h85z" />
-<glyph unicode="&#xf277;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM299 171v42h-86v86h-42v-86h-86v-42h86v-86h42v86h86z" />
-<glyph unicode="&#xf278;" horiz-adv-x="299" d="M299 171h-128v-128h-43v128h-128v42h128v128h43v-128h128v-42z" />
-<glyph unicode="&#xf279;" horiz-adv-x="384" d="M341 341h-298v-298h298v298zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298z" />
-<glyph unicode="&#xf27a;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM304 64l-24 103l79 69l-105 9l-41 96l-41 -97l-105 -8l80 -69l-24 -103l90 54z" />
-<glyph unicode="&#xf27b;" d="M427 240l-117 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 142l60 -142zM213 109l81 -49l-22 91l71 62l-93 8l-37 86v-198z" />
-<glyph unicode="&#xf27c;" d="M427 251l-117 -101l35 -150l-132 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141zM213 119l81 -48l-22 91l71 62l-93 8l-37 86l-36 -86l-93 -8l70 -62l-21 -91z" />
-<glyph unicode="&#xf27d;" d="M213 80l-132 -80l35 150l-116 101l153 13l60 141l60 -141l154 -13l-117 -101l35 -150z" />
-<glyph unicode="&#xf27e;" horiz-adv-x="384" d="M85 192l-42 -43l-43 43l43 43zM314 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM213 324v-81l40 41zM253 100l-40 41v-81zM341 235l43 -43l-43 -43l-42 43z" />
-<glyph unicode="&#xf27f;" horiz-adv-x="341" d="M192 324v-69l-43 43v107h22l121 -121l-64 -65l-30 30l34 35zM30 363l311 -312l-30 -30l-49 49l-91 -91h-22v162l-98 -98l-30 30l120 119l-141 141zM192 60l40 40l-40 41v-81z" />
-<glyph unicode="&#xf280;" horiz-adv-x="384" d="M240 192l49 49q10 -24 10 -49q0 -26 -10 -50zM353 305q31 -51 31 -111q0 -61 -33 -113l-25 25q21 41 21 86q0 46 -21 86zM271 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM171 324v-81l40 41zM211 100l-40 41v-81z" />
-<glyph unicode="&#xf281;" horiz-adv-x="271" d="M128 -64v43h43v-43h-43zM43 -64v43h42v-43h-42zM213 -64v43h43v-43h-43zM271 326l-92 -91l92 -92l-122 -122h-21v162l-98 -98l-30 30l119 120l-119 119l30 30l98 -98v162h21zM171 366v-80l40 40zM211 143l-40 40v-80z" />
-<glyph unicode="&#xf282;" horiz-adv-x="271" d="M271 284l-92 -92l92 -92l-122 -121h-21v162l-98 -98l-30 30l119 119l-119 119l30 30l98 -98v162h21zM171 324v-81l40 41zM211 100l-40 41v-81z" />
-<glyph unicode="&#xf283;" d="M149 384h128l39 -43h68q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h67zM213 64q44 0 75.5 31.5t31.5 75.5t-31.5 75t-75.5 31t-75 -31t-31 -75t31 -75.5t75 -31.5zM213 85l-26 59 l-59 27l59 26l26 59l27 -59l59 -26l-59 -27z" />
-<glyph unicode="&#xf284;" d="M158 224l-1 -2l-78 135q58 48 134 48q23 0 47 -5zM417 256h-206l78 135q46 -17 79.5 -52.5t48.5 -82.5zM422 235q5 -22 5 -43q0 -83 -57 -144l-101 176l-6 11h159zM140 192l24 -43h-160q-4 22 -4 43q0 82 56 144zM10 128h206l-78 -135q-46 17 -79.5 52.5t-48.5 82.5z M250 128l20 34l78 -135q-59 -48 -135 -48q-22 0 -46 5z" />
-<glyph unicode="&#xf285;" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h68l38 43h128l39 -43h68zM384 43v256h-171v-22q-44 0 -75 -31t-31 -75.5t31 -75.5t75 -31v-21h171zM320 170.5 q0 -44.5 -31 -75.5t-76 -31v38q29 0 49 20t20 48.5t-20 48.5t-49 20v38q45 0 76 -31t31 -75.5zM145 170.5q0 28.5 20 48.5t48 20v-137q-28 0 -48 20t-20 48.5z" />
-<glyph unicode="&#xf286;" horiz-adv-x="299" d="M107 21v43l64 -64l-64 -64v43h-107v42h107zM192 21h107v-42h-107v42zM149.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM256 448q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213 q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM43 405v-224q0 24 36.5 39t70 15t70 -15t36.5 -39v224h-213z" />
-<glyph unicode="&#xf287;" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-149v45q45 7 75.5 43t30.5 83h-42q0 -36 -25 -61t-60.5 -25t-60.5 25t-25 61h-43q0 -47 30.5 -83t76.5 -43v-45h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h67l39 43h128 l39 -43h68zM256 171v85q0 18 -12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5v-85q0 -18 12.5 -30.5t30 -12.5t30 12.5t12.5 30.5z" />
-<glyph unicode="&#xf288;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67l39 42h128l39 -42h68zM213 299q-44 0 -75 -31.5t-31 -75.5q0 -10 2 -21h44q-4 10 -4 21q0 27 19 45.5t45 18.5h85 q-32 43 -85 43zM213 85q44 0 75.5 31.5t31.5 75.5q0 12 -2 21h-45q4 -10 4 -21q0 -27 -18.5 -45.5t-45.5 -18.5h-85q33 -43 85 -43z" />
-<glyph unicode="&#xf289;" horiz-adv-x="299" d="M107 21v43l64 -64l-64 -64v43h-107v42h107zM192 21h107v-42h-107v42zM256 448q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM149.5 320q17.5 0 30 12.5t12.5 30t-12.5 30 t-30 12.5t-30 -12.5t-12.5 -30t12.5 -30t30 -12.5z" />
-<glyph unicode="&#xf28a;" d="M256 341h171v-320h-171q0 -17 -12.5 -29.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 29.5v320q0 18 12.5 30.5t30.5 12.5h21v21q0 9 6.5 15.5t14.5 6.5h86q8 0 14.5 -6.5t6.5 -15.5v-21h21q18 0 30.5 -12.5t12.5 -30.5zM213 64v43h-42v-43h42zM213 256v43h-42v-43h42z M299 64v43h-43v-43h43zM299 256v43h-43v-43h43zM384 64v43h-43v-43h43zM384 256v43h-43v-43h43z" />
-<glyph unicode="&#xf28b;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67l39 42h128l39 -42h68zM277 117l75 75l-75 75v-54h-128v54l-74 -75l74 -75v54h128v-54z" />
-<glyph unicode="&#xf28c;" d="M145 192q0 68 68.5 68t68.5 -68t-68.5 -68t-68.5 68zM149 405h128l39 -42h68q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h67zM213 85q44 0 75.5 31.5t31.5 75.5t-31.5 75.5 t-75.5 31.5t-75 -31.5t-31 -75.5t31 -75.5t75 -31.5z" />
-<glyph unicode="&#xf28d;" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171zM192 85v43h-43v-43h43zM192 171v106h-43v-106h43z" />
-<glyph unicode="&#xf28e;" horiz-adv-x="400" d="M354 341l1 -249l-242 242l50 50h149q17 0 29.5 -12.5t12.5 -30.5zM27 365l373 -372l-27 -28l-40 41q-10 -6 -21 -6h-213q-18 0 -30.5 12.5t-12.5 30.5v239l-56 56z" />
-<glyph unicode="&#xf28f;" horiz-adv-x="341" d="M299 405q17 0 29.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171zM171 277v86h-43v-86h43zM235 277v86h-43v-86h43zM299 277v86h-43v-86h43z" />
-<glyph unicode="&#xf290;" horiz-adv-x="341" d="M341 363v-342q0 -17 -12.5 -29.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 29.5v256l128 128h171q17 0 29.5 -12.5t12.5 -29.5zM107 43v42h-43v-42h43zM277 43v42h-42v-42h42zM107 128v85h-43v-85h43zM192 43v85h-43v-85h43zM192 171v42h-43v-42h43zM277 128v85h-42v-85 h42z" />
-<glyph unicode="&#xf291;" horiz-adv-x="469" d="M427 405q17 0 29.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-150l43 -64v-21h-171v21l43 64h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h384zM427 149v214h-384v-214h384z" />
-<glyph unicode="&#xf292;" horiz-adv-x="469" d="M427 405q17 0 29.5 -12.5t12.5 -29.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-150v-43h43v-42h-171v42h43v43h-149q-18 0 -30.5 12.5t-12.5 30.5v256q0 17 12.5 29.5t30.5 12.5h384zM427 107v256h-384v-256h384z" />
-<glyph unicode="&#xf293;" horiz-adv-x="384" d="M299 107h85v-107h-107v65l-85 90l-85 -90v-65h-107v107h85l86 85v68q-19 7 -31 23.5t-12 36.5q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5q0 -20 -12 -36.5t-31 -23.5v-68z" />
-<glyph unicode="&#xf294;" horiz-adv-x="512" d="M469 320h-281l-43 43h324v-43zM41 413l42 -42l372 -373l-27 -27l-50 50h-378v64h43v235q0 15 10 27l-39 39zM85 314v-229h229zM491 277q8 0 14.5 -6t6.5 -15v-213q0 -9 -6.5 -15.5t-14.5 -6.5h-4l-64 64h46v150h-85v-111l-43 43v89q0 9 6.5 15t15.5 6h128z" />
-<glyph unicode="&#xf295;" horiz-adv-x="512" d="M85 320v-235h214v-64h-299v64h43v235q0 18 12.5 30.5t29.5 12.5h384v-43h-384zM491 277q8 0 14.5 -6t6.5 -15v-213q0 -9 -6.5 -15.5t-14.5 -6.5h-128q-9 0 -15.5 6.5t-6.5 15.5v213q0 9 6.5 15t15.5 6h128zM469 85v150h-85v-150h85z" />
-<glyph unicode="&#xf296;" horiz-adv-x="256" d="M43 -43v43h170v-43h-170zM213 426q18 0 30.5 -12t12.5 -30v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5zM213 128v213h-170v-213h170z" />
-<glyph unicode="&#xf297;" horiz-adv-x="384" d="M299 384l85 -85v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h256zM192 43q27 0 45.5 18.5t18.5 45t-18.5 45.5t-45.5 19t-45.5 -19t-18.5 -45.5t18.5 -45t45.5 -18.5zM256 256v85h-213v-85h213z" />
-<glyph unicode="&#xf298;" d="M277 288l-64 -64l-64 64v117h128v-117zM117 256l64 -64l-64 -64h-117v128h117zM149 96l64 64l64 -64v-117h-128v117zM309 256h118v-128h-118l-64 64z" />
-<glyph unicode="&#xf299;" horiz-adv-x="469" d="M234.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM425 213h44v-42h-44q-7 -67 -54.5 -114.5t-114.5 -55.5v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44v42h44q7 67 55 114.5t114 55.5v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5z M235 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-106 -43.5t-44 -105.5t44 -105.5t106 -43.5z" />
-<glyph unicode="&#xf29a;" horiz-adv-x="469" d="M425 213h44v-42h-43q-4 -36 -21 -68l-32 32q11 28 11 57q0 62 -43.5 105.5t-105.5 43.5q-30 0 -57 -11l-32 32q32 17 67 21v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5zM43 357l27 27l357 -357l-27 -27l-44 44q-44 -36 -100 -43v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44 v42h44q6 56 42 100zM326 74l-210 209q-31 -40 -31 -91q0 -62 44 -105.5t106 -43.5q50 0 91 31z" />
-<glyph unicode="&#xf29b;" horiz-adv-x="469" d="M425 213h44v-42h-44q-7 -67 -54.5 -114.5t-114.5 -55.5v-44h-43v44q-66 8 -114 55.5t-55 114.5h-44v42h44q7 67 55 114.5t114 55.5v44h43v-44q67 -8 114.5 -55.5t54.5 -114.5zM235 43q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-106 -43.5t-44 -105.5 t44 -105.5t106 -43.5z" />
-<glyph unicode="&#xf29c;" horiz-adv-x="384" d="M192 427q80 0 136 -56.5t56 -135.5v-214q0 -26 -18.5 -45t-45.5 -19h-128v43h149v21h-85v171h85v43q0 62 -43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5v-43h85v-171h-64q-27 0 -45.5 19t-18.5 45v150q0 79 56 135.5t136 56.5z" />
-<glyph unicode="&#xf29d;" horiz-adv-x="384" d="M192 427q80 0 136 -56.5t56 -135.5v-150q0 -26 -18.5 -45t-45.5 -19h-64v171h85v43q0 62 -43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5v-43h85v-171h-64q-27 0 -45.5 19t-18.5 45v150q0 79 56 135.5t136 56.5z" />
-<glyph unicode="&#xf29e;" horiz-adv-x="469" d="M235 341q62 0 105.5 -43.5t43.5 -105.5h-43q0 44 -31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5h-43q0 62 44 105.5t106 43.5zM256 143v-70l73 -73l-30 -30l-64 64l-64 -64l-30 30l72 73v70q-14 6 -23 19.5t-9 29.5q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5 q0 -35 -32 -49zM235 427q97 0 165.5 -69t68.5 -166h-42q0 80 -56.5 136t-136 56t-135.5 -56t-56 -136h-43q0 97 69 166t166 69z" />
-<glyph unicode="&#xf29f;" horiz-adv-x="469" d="M85 405v-85h43v-128h-128v128h43v85q0 9 6 15.5t15 6.5t15 -6.5t6 -15.5zM171 107v42h128v-42q0 -21 -12 -37.5t-31 -22.5v-90h-43v90q-19 6 -30.5 22.5t-11.5 37.5zM0 107v42h128v-42q0 -21 -12 -37.5t-31 -22.5v-90h-42v90q-19 6 -31 22.5t-12 37.5zM427 320h42v-128 h-128v128h43v85q0 9 6.5 15.5t15 6.5t15 -6.5t6.5 -15.5v-85zM256 405v-85h43v-128h-128v128h42v85q0 9 6.5 15.5t15 6.5t15 -6.5t6.5 -15.5zM341 107v42h128v-42q0 -21 -11.5 -37.5t-30.5 -22.5v-90h-43v90q-19 6 -31 22.5t-12 37.5z" />
-<glyph unicode="&#xf2a0;" horiz-adv-x="299" d="M277 299h22v-128l-64 -128v-64h-171v64l-64 128v128h21v64q0 17 12.5 29.5t30.5 12.5h171q17 0 29.5 -12.5t12.5 -29.5v-64zM64 363v-64h43v42h21v-42h43v42h21v-42h43v64h-171z" />
-<glyph unicode="&#xf2a1;" horiz-adv-x="256" d="M214 299q15 0 28.5 -13.5t13.5 -29.5v-117l-75 -75v-64h-106v64l-75 75v117q0 16 13.5 29.5t28.5 13.5h1v85h42v-85h86v85h42z" />
-<glyph unicode="&#xf2a2;" horiz-adv-x="469" d="M149 202.5q0 -13.5 -9 -22.5t-22.5 -9t-23 9t-9.5 22.5t9.5 23t23 9.5t22.5 -9.5t9 -23zM299 309.5q0 -13.5 -9.5 -23t-22.5 -9.5h-64q-14 0 -23 9.5t-9 23t9 22.5t23 9h64q13 0 22.5 -9t9.5 -22.5zM160 128q13 0 22.5 -9.5t9.5 -22.5t-9.5 -22.5t-22.5 -9.5t-22.5 9.5 t-9.5 22.5t9.5 22.5t22.5 9.5zM235 427q97 0 165.5 -69t68.5 -166t-68.5 -166t-165.5 -69t-166 69t-69 166t69 166t166 69zM234.5 0q79.5 0 136 56.5t56.5 135.5t-56.5 135.5t-136 56.5t-135.5 -56.5t-56 -135.5t56 -135.5t135.5 -56.5zM352 235q13 0 22.5 -9.5t9.5 -23 t-9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5zM309.5 128q13.5 0 22.5 -9.5t9 -22.5t-9 -22.5t-22.5 -9.5t-23 9.5t-9.5 22.5t9.5 22.5t23 9.5z" />
-<glyph unicode="&#xf2a3;" d="M384 384q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 12.5 30.5t30.5 12.5h341zM192 320v-43h43v43h-43zM192 256v-43h43v43h-43zM128 320v-43h43v43h-43zM128 256v-43h43v43h-43zM107 213v43h-43v-43h43 zM107 277v43h-43v-43h43zM299 128v43h-171v-43h171zM299 213v43h-43v-43h43zM299 277v43h-43v-43h43zM363 213v43h-43v-43h43zM363 277v43h-43v-43h43zM213 -43l-85 86h171z" />
-<glyph unicode="&#xf2a4;" d="M384 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h341zM192 277v-42h43v42h-43zM192 213v-42h43v42h-43zM128 277v-42h43v42h-43zM128 213v-42h43v42h-43zM107 171v42h-43v-42h43 zM107 235v42h-43v-42h43zM299 85v43h-171v-43h171zM299 171v42h-43v-42h43zM299 235v42h-43v-42h43zM363 171v42h-43v-42h43zM363 235v42h-43v-42h43z" />
-<glyph unicode="&#xf2a5;" horiz-adv-x="512" d="M469 64h43v-43h-512v43h43v320h426v-320zM299 64v21h-86v-21h86zM427 128v213h-342v-213h342z" />
-<glyph unicode="&#xf2a6;" horiz-adv-x="512" d="M427 64h85q0 -18 -12.5 -30.5t-30.5 -12.5h-426q-18 0 -30.5 12.5t-12.5 30.5h85q-17 0 -29.5 12.5t-12.5 30.5v234q0 18 12.5 30.5t29.5 12.5h342q17 0 29.5 -12.5t12.5 -30.5v-234q0 -18 -12.5 -30.5t-29.5 -12.5zM85 341v-234h342v234h-342zM256 43q9 0 15 6t6 15 t-6 15t-15 6t-15 -6t-6 -15t6 -15t15 -6z" />
-<glyph unicode="&#xf2a7;" horiz-adv-x="512" d="M427 64h85v-43h-512v43h85q-17 0 -29.5 12.5t-12.5 30.5v213q0 18 12.5 30.5t29.5 12.5h342q17 0 29.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-29.5 -12.5zM85 320v-213h342v213h-342z" />
-<glyph unicode="&#xf2a8;" horiz-adv-x="384" d="M341 213q0 -36 -19 -70l-26 27q9 21 9 43h36zM256 210l-128 127v4q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45.5v-128v-1.5v-1.5zM27 384l357 -357l-27 -27l-89 89q-26 -15 -55 -19v-70h-42v70q-54 8 -91 49t-37 94h36q0 -46 33.5 -77t79.5 -31q25 0 49 11l-35 35 q-7 -2 -14 -2q-27 0 -45.5 19t-18.5 45v16l-128 128z" />
-<glyph unicode="&#xf2a9;" horiz-adv-x="299" d="M149.5 139q-26.5 0 -45.5 18.5t-19 45.5v128q0 26 19 45t45.5 19t45 -19t18.5 -45v-128q0 -27 -18.5 -45.5t-45 -18.5zM124 333v-132q0 -11 7.5 -18.5t18 -7.5t18 7.5t7.5 18.5v132q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5zM262 203h37q0 -54 -37.5 -95t-90.5 -49 v-70h-43v70q-53 8 -90.5 49t-37.5 95h36q0 -47 34 -78t79.5 -31t79 31t33.5 78z" />
-<glyph unicode="&#xf2aa;" horiz-adv-x="299" d="M43 -64v43h42v-43h-42zM149.5 171q-26.5 0 -45.5 18.5t-19 45.5v128q0 26 19 45t45.5 19t45 -19t18.5 -45v-128q0 -27 -18.5 -45.5t-45 -18.5zM128 -64v43h43v-43h-43zM213 -64v43h43v-43h-43zM299 235q0 -54 -37.5 -95t-90.5 -49v-70h-43v70q-53 8 -90.5 49t-37.5 95h36 q0 -47 34 -78t79.5 -31t79 31t33.5 78h37z" />
-<glyph unicode="&#xf2ab;" horiz-adv-x="299" d="M149.5 149q-26.5 0 -45.5 19t-19 45v128q0 27 19 45.5t45.5 18.5t45 -18.5t18.5 -45.5v-128q0 -26 -18.5 -45t-45 -19zM262 213h37q0 -54 -37.5 -94.5t-90.5 -48.5v-70h-43v70q-53 8 -90.5 49t-37.5 94h36q0 -46 34 -77t79.5 -31t79 31t33.5 77z" />
-<glyph unicode="&#xf2ac;" horiz-adv-x="341" d="M192 425q64 -8 106.5 -56t42.5 -113h-149v169zM0 128v85h341v-85q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 121zM149 425v-169h-149q0 65 43 113t106 56z" />
-<glyph unicode="&#xf2ad;" d="M384 64v171h43v-171h-43zM384 -21v42h43v-42h-43zM0 -21l427 426v-128h-86v-298h-341z" />
-<glyph unicode="&#xf2ae;" horiz-adv-x="469" d="M395 235q-40 0 -68 -28.5t-28 -67.5v-6q-22 -19 -22 -48v-64h-277l405 406v-193q-9 1 -10 1zM448 107q9 0 15 -6.5t6 -15.5v-85q0 -9 -6 -15t-15 -6h-107q-8 0 -14.5 6t-6.5 15v85q0 9 6.5 15.5t14.5 6.5v32q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5v-32zM427 107v32 q0 13 -9.5 22.5t-23 9.5t-22.5 -9.5t-9 -22.5v-32h64z" />
-<glyph unicode="&#xf2af;" horiz-adv-x="448" d="M427 427v-367l-184 183zM80 352l368 -368l-27 -27l-43 43h-378l189 189l-136 136z" />
-<glyph unicode="&#xf2b0;" d="M384 302l-281 -281h281v281zM427 405v-426h-427z" />
-<glyph unicode="&#xf2b1;" horiz-adv-x="509" d="M405 203q-66 0 -113 -47t-47 -113q0 -9 2 -22h-247l427 427l-1 -247q-12 2 -21 2zM484 32l23 -17q3 -3 1 -7l-21 -37q-2 -4 -7 -3l-26 11q-8 -6 -18 -10l-4 -29q-1 -4 -6 -4h-42q-5 0 -6 4l-4 29q-9 3 -18 10l-26 -11q-5 -1 -7 3l-21 37q-2 4 1 7l23 17q-1 5 -1 10.5 t1 10.5l-23 18q-3 3 -1 7l21 37q3 3 7 2l26 -11q8 6 18 11l4 28q1 4 6 4h42q5 0 6 -4l4 -28q9 -4 18 -11l26 11q5 1 7 -2l21 -37q2 -4 -1 -7l-23 -18q1 -4 1 -10q0 -4 -1 -11zM405 11q13 0 22.5 9t9.5 22.5t-9.5 23t-22.5 9.5t-22.5 -9.5t-9.5 -23t9.5 -22.5t22.5 -9z" />
-<glyph unicode="&#xf2b2;" d="M0 -21l427 426v-426h-427z" />
-<glyph unicode="&#xf2b3;" horiz-adv-x="384" d="M250 245l-15 15l59 60l-59 60l15 15l49 -49v81h10l61 -61l-46 -46l46 -46l-61 -61h-10v81zM320 386v-40l20 20zM320 294v-40l20 20zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75 q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z" />
-<glyph unicode="&#xf2b4;" horiz-adv-x="512" d="M256 256q-51 0 -98 -15v-66q0 -14 -12 -20q-31 -15 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15q105 100 250 100t250 -100q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-25 23 -57 39q-12 6 -12 19v66q-47 16 -98 16z" />
-<glyph unicode="&#xf2b5;" d="M320 213v64h-85v86h85v64l107 -107zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5 q36 -12 76 -12z" />
-<glyph unicode="&#xf2b6;" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM341 192q0 62 -43.5 105.5 t-105.5 43.5v43q80 0 136 -56t56 -136h-43zM256 192q0 27 -18.5 45.5t-45.5 18.5v43q44 0 75.5 -31.5t31.5 -75.5h-43z" />
-<glyph unicode="&#xf2b7;" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM363 363q8 0 14.5 -6.5 t6.5 -15.5v-85q0 -9 -6.5 -15t-14.5 -6h-107q-9 0 -15 6t-6 15v85q0 9 6 15.5t15 6.5v10q0 22 15.5 38t37.5 16t38 -16t16 -38v-10zM346 363v10q0 15 -11 26t-26 11t-25.5 -11t-10.5 -26v-10h73z" />
-<glyph unicode="&#xf2b8;" horiz-adv-x="512" d="M139 331v-75h-32v128h128v-32h-75l96 -96l128 128l21 -21l-149 -150zM506 92q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-27 24 -57 40q-12 5 -12 19v66q-47 15 -98 15t-98 -15v-66q0 -14 -12 -20q-32 -16 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15 q105 100 250 100t250 -100z" />
-<glyph unicode="&#xf2b9;" horiz-adv-x="384" d="M363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12zM192 384h192v-149h-128 l-64 -64v213z" />
-<glyph unicode="&#xf2ba;" horiz-adv-x="384" d="M299 384v-149h-43v149h43zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z M341 384h43v-149h-43v149z" />
-<glyph unicode="&#xf2bb;" horiz-adv-x="512" d="M506 92q6 -6 6 -15t-6 -15l-53 -53q-6 -6 -15 -6t-15 6q-26 24 -57 40q-12 5 -12 19v66q-47 15 -98 15t-98 -15v-66q0 -14 -12 -20q-32 -16 -57 -39q-6 -6 -15 -6t-15 6l-53 53q-6 6 -6 15t6 15q105 100 250 100t250 -100zM451 314l-76 -75l-30 30l76 76zM277 405v-106 h-42v106h42zM137 239q-74 75 -76 75l30 31l76 -76z" />
-<glyph unicode="&#xf2bc;" horiz-adv-x="384" d="M213 256v-43h-42v43h42zM299 256v-43h-43v43h43zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q47 -93 141 -141l47 47 q9 9 22 5q36 -12 76 -12zM341 256h43v-43h-43v43z" />
-<glyph unicode="&#xf2bd;" horiz-adv-x="384" d="M299 384v-107h-22v107h22zM256 341v-64h-64v22h43v21h-43v64h64v-21h-43v-22h43zM320 384h64v-64h-43v-43h-21v107zM363 341v22h-22v-22h22zM363 117q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5 h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22l-47 -47q48 -93 141 -141l47 47q9 9 22 5q36 -12 76 -12z" />
-<glyph unicode="&#xf2be;" horiz-adv-x="384" d="M77 218q47 -93 141 -141l47 47q9 10 22 5q36 -12 76 -12q8 0 14.5 -6t6.5 -15v-75q0 -8 -6.5 -14.5t-14.5 -6.5q-99 0 -182.5 48.5t-132 132t-48.5 182.5q0 8 6.5 14.5t14.5 6.5h75q9 0 15 -6.5t6 -14.5q0 -40 12 -76q4 -13 -5 -22z" />
-<glyph unicode="&#xf2bf;" d="M364 343q63 -63 63 -151t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t150.5 62.5h22v-176q21 -12 21 -37q0 -18 -12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5q0 24 21 37v45q-28 -7 -46 -30t-18 -52q0 -35 25 -60t60.5 -25t60.5 25t25 60t-25 60l30 30 q37 -37 37 -90t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 47 30.5 82.5t76.5 43.5v43q-64 -8 -106.5 -56t-42.5 -113q0 -71 50 -121t120.5 -50t120.5 50t50 121q0 70 -50 121z" />
-<glyph unicode="&#xf2c0;" d="M332 144l-34 35q1 7 1 13q0 35 -25 60t-61 25q-4 0 -13 -1l-34 35q23 9 47 9q53 0 90.5 -37.5t37.5 -90.5q0 -25 -9 -48zM213 363q-42 0 -80 -20l-31 31q52 31 111 31q89 0 151.5 -62.5t62.5 -150.5q0 -60 -32 -111l-31 31q20 38 20 80q0 71 -50 121t-121 50zM27 395 l21 -22l357 -357l-27 -27l-160 161l-5 -1q-17 0 -29.5 12.5t-12.5 30.5v4l-34 34q-9 -19 -9 -38q0 -49 43 -74l-22 -37q-29 17 -46.5 46.5t-17.5 64.5q0 38 21 69l-31 31q-32 -44 -32 -100q0 -47 23 -86t62 -62l-22 -37q-48 29 -77 78t-29 107q0 73 45 131l-45 45z" />
-<glyph unicode="&#xf2c1;" d="M213.5 213q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM341 171q0 -35 -17 -64.5t-47 -46.5l-21 37q43 25 43 74q0 35 -25 60t-60.5 25t-60.5 -25t-25 -60q0 -49 43 -74l-22 -37q-29 17 -46.5 46.5t-17.5 64.5q0 53 37.5 90.5 t90.5 37.5t90.5 -37.5t37.5 -90.5zM213.5 384q88.5 0 151 -62.5t62.5 -150.5q0 -59 -29 -108t-78 -77l-21 37q39 23 62 62t23 86q0 70 -50 120t-120.5 50t-120.5 -50t-50 -120q0 -47 23 -86t62 -62l-22 -37q-48 28 -77 77t-29 108q0 88 62.5 150.5t151 62.5z" />
-<glyph unicode="&#xf2c2;" d="M26 317l270 110l15 -36l-177 -71h250q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v256q0 14 7.5 24.5t18.5 15.5zM106.5 21q26.5 0 45.5 19t19 45.5t-19 45t-45.5 18.5t-45 -18.5t-18.5 -45t18.5 -45.5t45 -19z M384 192v85h-341v-85h256v43h42v-43h43z" />
-<glyph unicode="&#xf2c3;" horiz-adv-x="469" d="M256 192h149v-32h-149v32zM256 213h149h-149zM256 107h149h-149zM427 363q17 0 29.5 -12.5t12.5 -30.5v-277q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v277q0 18 12.5 30.5t30.5 12.5h384zM427 43v277h-192v-277h192z" />
-<glyph unicode="&#xf2c4;" horiz-adv-x="331" d="M59 297q44 44 106.5 44t106.5 -44l-31 -30q-31 31 -75.5 31t-76.5 -31zM165.5 427q96.5 0 165.5 -69l-30 -30q-56 56 -135.5 56t-135.5 -56l-30 30q69 69 165.5 69zM226 234q10 0 17.5 -7t6.5 -17v-207q0 -10 -7 -17t-17 -7h-122q-10 0 -17 7t-7 17v207q0 10 7 17.5 t17 7.5zM229 21v171h-128v-171h128z" />
-<glyph unicode="&#xf2c5;" horiz-adv-x="332" d="M230 256q9 0 15 -6.5t6 -14.5v-256q0 -9 -6 -15.5t-15 -6.5h-128q-9 0 -15 6.5t-6 15.5v256q0 8 6 14.5t15 6.5h128zM166 128q18 0 30.5 12.5t12.5 30t-12.5 30t-30.5 12.5t-30.5 -12.5t-12.5 -30t12.5 -30t30.5 -12.5zM60 319q44 44 106 44t106 -44l-31 -30 q-31 31 -75 31t-76 -31zM166 448q98 0 166 -69l-30 -30q-56 56 -136 56q-79 0 -136 -56l-30 30q69 69 166 69z" />
-<glyph unicode="&#xf2c6;" horiz-adv-x="384" d="M367 322q-40 36 -90 36t-89 -36l-17 17q44 45 106 45t107 -45zM348 305l-17 -17q-22 21 -54 21t-53 -21l-17 17q30 30 70.5 30t70.5 -30zM341 171q18 0 30.5 -12.5t12.5 -30.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85q0 18 12.5 30.5 t30.5 12.5h213v85h43v-85h42zM107 64v43h-43v-43h43zM181 64v43h-42v-43h42zM256 64v43h-43v-43h43z" />
-<glyph unicode="&#xf2c7;" horiz-adv-x="384" d="M358 220q11 -3 18.5 -14.5t7.5 -24.5v-117q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v85q0 18 12.5 30.5t30.5 12.5h268l-300 109l15 40zM85 85v43h-42v-43h42zM341 85v43h-213v-43h213z" />
-<glyph unicode="&#xf2c8;" horiz-adv-x="299" d="M235 427q26 0 45 -19t19 -45v-342q0 -26 -19 -45t-45 -19h-171q-27 0 -45.5 19t-18.5 45v342q0 26 18.5 45t45.5 19h171zM192 0v21h-85v-21h85zM261 64v299h-224v-299h224z" />
-<glyph unicode="&#xf2c9;" horiz-adv-x="299" d="M256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213zM235 171l-86 -86l-85 86h64v106h43v-106h64z" />
-<glyph unicode="&#xf2ca;" horiz-adv-x="384" d="M213 273l-85 -85l85 -86l-21 -21l-85 85l-86 -85l-21 21l85 86l-85 85l21 21l86 -85l85 85zM341 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5 h213z" />
-<glyph unicode="&#xf2cb;" horiz-adv-x="299" d="M171 299v-43h-43v43h43zM171 213v-128h-43v128h43zM256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213z" />
-<glyph unicode="&#xf2cc;" horiz-adv-x="277" d="M224 427q22 0 37.5 -16t15.5 -38v-362q0 -22 -15.5 -38t-37.5 -16h-171q-22 0 -37.5 16t-15.5 38v362q0 22 15.5 38t37.5 16h171zM138.5 -21q13.5 0 23 9t9.5 22.5t-9.5 23t-23 9.5t-22.5 -9.5t-9 -23t9 -22.5t22.5 -9zM235 64v299h-192v-299h192z" />
-<glyph unicode="&#xf2cd;" horiz-adv-x="469" d="M427 341q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h384zM384 85v214h-299v-214h299zM192 107q-9 0 -15 6t-6 15v64q0 9 6 15t15 6v22q0 17 12.5 29.5t30 12.5t30 -12.5t12.5 -29.5 v-22q9 0 15.5 -6t6.5 -15v-64q0 -9 -6.5 -15t-15.5 -6h-85zM209 235v-22h51v22q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5z" />
-<glyph unicode="&#xf2ce;" horiz-adv-x="469" d="M0 299q0 17 12.5 29.5t30.5 12.5h384q17 0 29.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v214zM384 299h-299v-214h299v214z" />
-<glyph unicode="&#xf2cf;" horiz-adv-x="363" d="M320 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5h213zM145 213q10 0 18 -8t8 -19v-75q0 -10 -8.5 -18t-19.5 -8h-117q-10 0 -18 8.5t-8 19.5v75 q0 9 8 17t18 8v32q0 22 18 38t41 16t41.5 -16t18.5 -38v-32zM117 213v32q0 13 -9 20.5t-22.5 7.5t-23 -7.5t-9.5 -20.5v-32h64z" />
-<glyph unicode="&#xf2d0;" horiz-adv-x="299" d="M107 107q-9 0 -15.5 6t-6.5 15v64q0 9 6.5 15t15.5 6v22q0 17 12.5 29.5t30 12.5t30 -12.5t12.5 -29.5v-22q9 0 15 -6t6 -15v-64q0 -9 -6 -15t-15 -6h-85zM124 235v-22h51v22q0 10 -7.5 17.5t-18 7.5t-18 -7.5t-7.5 -17.5zM256 427q18 0 30.5 -12.5t12.5 -30.5v-384 q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5h213zM256 43v298h-213v-298h213z" />
-<glyph unicode="&#xf2d1;" horiz-adv-x="426" d="M386 284q40 -39 40 -92t-40 -90l-21 22q29 30 29 70t-29 68zM341 239q20 -21 20 -47t-20 -45l-21 22q18 24 0 49zM256 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5h213zM256 21 v342h-213v-342h213z" />
-<glyph unicode="&#xf2d2;" horiz-adv-x="256" d="M21 -64v43h43v-43h-43zM107 -64v43h42v-43h-42zM192 -64v43h43v-43h-43zM213 448q18 0 30.5 -12.5t12.5 -30.5v-341q0 -18 -12.5 -30.5t-30.5 -12.5h-170q-18 0 -30.5 12.5t-12.5 30.5v341q0 18 12.5 30.5t30.5 12.5h170zM213 107v256h-170v-256h170z" />
-<glyph unicode="&#xf2d3;" horiz-adv-x="385" d="M189 181l23 -19q4 -4 2 -6l-21 -37q-2 -2 -7 -2l-27 11q-13 -9 -19 -11l-5 -27q-4 -5 -6 -5h-43q-2 0 -3.5 1.5t-0.5 3.5l-4 27q-7 2 -20 11l-29 -9q-3 -2 -7 3l-21 36q0 4 2 8l23 17v22l-23 17q-4 4 -2 6l21 37q2 2 7 2l27 -11q13 9 20 11l4 27q4 5 6 5h43q6 0 6 -5 l5 -27q6 -2 19 -11l27 9q3 2 7 -3l21 -36q0 -4 -2 -6l-23 -17v-22zM107.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5zM342 427q18 0 30.5 -12.5t12.5 -30.5v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5 t-12.5 30.5v64h43v-43h213v342h-213v-43h-43v64q0 18 12.5 30.5t30.5 12.5h213z" />
-<glyph unicode="&#xf2d4;" horiz-adv-x="299" d="M256 426q18 0 30.5 -12t12.5 -30v-384q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v384q0 18 12.5 30.5t30.5 12.5zM256 43v298h-213v-298h213z" />
-<glyph unicode="&#xf2d5;" horiz-adv-x="299" d="M256 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h213zM149.5 363q-17.5 0 -30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5t30 12.5t12.5 30.5t-12.5 30.5t-30 12.5zM149 21 q44 0 75.5 31.5t31.5 75.5t-31.5 75.5t-75.5 31.5t-75 -31.5t-31 -75.5t31 -75.5t75 -31.5zM149.5 192q26.5 0 45 -18.5t18.5 -45.5t-18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5t19 45.5t45.5 18.5z" />
-<glyph unicode="&#xf2d6;" horiz-adv-x="384" d="M320 448q27 0 45.5 -18.5t18.5 -45.5v-384q0 -27 -18.5 -45.5t-45.5 -18.5h-256q-27 0 -45.5 18.5t-18.5 45.5v384q0 27 18.5 45.5t45.5 18.5h256zM235 -21v21h-86v-21h86zM347 43v341h-310v-341h310z" />
-<glyph unicode="&#xf2d7;" horiz-adv-x="405" d="M352 448q22 0 37.5 -15.5t15.5 -37.5v-406q0 -22 -15.5 -37.5t-37.5 -15.5h-299q-22 0 -37.5 15.5t-15.5 37.5v406q0 22 15.5 37.5t37.5 15.5h299zM202.5 -43q13.5 0 23 9.5t9.5 23t-9.5 22.5t-23 9t-22.5 -9t-9 -22.5t9 -23t22.5 -9.5zM363 43v341h-320v-341h320z" />
-<glyph unicode="&#xf2d8;" horiz-adv-x="469" d="M427 363q17 0 29.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h384zM384 64v256h-299v-256h299z" />
-<glyph unicode="&#xf2d9;" horiz-adv-x="469" d="M427 320q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h162l-71 70l15 15l86 -85l85 85l15 -15l-70 -70h162zM427 21v256h-384v-256h384zM171 235l149 -86l-149 -85v171z" />
-<glyph unicode="&#xf2da;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384zM384 277v-42h-235v42h235zM384 192v-43h-235v43h235zM128 277v-42h-43v42 h43zM128 192v-43h-43v43h43z" />
-<glyph unicode="&#xf2db;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384zM320 213l-149 -85v171z" />
-<glyph unicode="&#xf2dc;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-107v-43h-171v43h-106q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384zM427 85v256h-384v-256h384z" />
-<glyph unicode="&#xf2dd;" horiz-adv-x="303" d="M218 299h85v-86h-21v-42q0 -18 -12.5 -30.5t-30.5 -12.5h-64v-65q26 -13 26 -42q0 -19 -14 -33t-33.5 -14t-33 14t-13.5 33q0 29 25 42v65h-64q-17 0 -29.5 12.5t-12.5 30.5v44q-26 13 -26 41q0 19 14 33t33 14t33 -14t14 -33q0 -28 -26 -41v-44h64v170h-42l64 86l64 -86 h-43v-170h64v42h-21v86z" />
-<glyph unicode="&#xf2de;" horiz-adv-x="405" d="M405 309v-228l-238 239h132q8 0 14.5 -6.5t6.5 -14.5v-75zM27 405l378 -378l-27 -27l-68 68q-6 -4 -11 -4h-256q-9 0 -15.5 6.5t-6.5 14.5v214q0 8 6.5 14.5t15.5 6.5h15l-58 58z" />
-<glyph unicode="&#xf2df;" d="M341 245l86 86v-278l-86 86v-75q0 -9 -6 -15t-15 -6h-299q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h299q9 0 15 -6t6 -15v-75zM235 117l74 75l-74 75v-54h-128v54l-75 -75l75 -75v54h128v-54z" />
-<glyph unicode="&#xf2e0;" horiz-adv-x="384" d="M299 224l85 85v-234l-85 85v-75q0 -8 -6.5 -14.5t-15.5 -6.5h-256q-8 0 -14.5 6.5t-6.5 14.5v214q0 8 6.5 14.5t14.5 6.5h256q9 0 15.5 -6.5t6.5 -14.5v-75z" />
-<glyph unicode="&#xf2e1;" horiz-adv-x="341" d="M341 192q0 -40 -17 -75t-48 -59l-20 -122h-171l-20 122q-65 51 -65 134t65 134l20 122h171l20 -122q31 -24 48 -59t17 -75zM43 192q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5z" />
-<glyph unicode="&#xf2e2;" horiz-adv-x="497" d="M249 350q-107 1 -190 -55l43 -53q49 29 107 38q108 15 187 -38l42 53q-83 56 -189 55zM248.5 389q138.5 0 248.5 -85l-248 -309l-249 309q110 85 248.5 85z" />
-<glyph unicode="&#xf2e3;" horiz-adv-x="469" d="M0 256q64 64 149.5 86.5t171 0t148.5 -86.5l-42 -43q-80 80 -192.5 80t-191.5 -80zM171 85q26 27 63.5 27t64.5 -27l-64 -64zM85 171q62 61 149.5 61t149.5 -61l-43 -43q-44 44 -106.5 44t-106.5 -44z" />
-<glyph unicode="&#xf2e4;" horiz-adv-x="512" d="M256 384q136 0 256 -91l-256 -314l-256 315q119 90 256 90zM277 107v128h-42v-128h42zM235 277h42v43h-42v-43z" />
-<glyph unicode="&#xf2e5;" horiz-adv-x="503" d="M482 107q8 0 14.5 -7t6.5 -15v-85q0 -8 -6.5 -14.5t-14.5 -6.5h-107q-8 0 -14.5 6.5t-6.5 14.5v85q0 8 6.5 15t14.5 7v32q0 22 15.5 37.5t38 15.5t38 -15.5t15.5 -37.5v-32zM461 107v32q0 12 -9.5 22t-22.5 10t-22.5 -10t-9.5 -22v-32h64zM322 139v-56l-75 -94l-247 310 q114 85 247.5 85t247.5 -85l-45 -56q-6 2 -21 2q-45 0 -76 -31t-31 -75z" />
-<glyph unicode="&#xf2e6;" horiz-adv-x="497" d="M497 299l-117 -145l-220 220q44 10 88 10q136 0 249 -85zM356 123l74 -74l-27 -27l-71 71l-83 -103l-1 -1v1l-248 309q35 27 79 47l-44 44l27 27z" />
-<glyph unicode="&#xf2e7;" horiz-adv-x="497" d="M249 350q-105 0 -190 -55l190 -237l189 237q-84 55 -189 55zM248.5 389q49.5 0 96 -11t80.5 -29.5t47 -27t25 -17.5l-248 -309v0l-249 309q12 9 25 17.5t47.5 27t80.5 29.5t95.5 11z" />
-<glyph unicode="&#xf2e8;" horiz-adv-x="497" d="M249 -10l-1 -1v1l-248 309q113 85 248.5 85t248.5 -85zM68 214q82 63 180.5 63t180.5 -63l-180 -224l-1 -1v1z" />
-<glyph unicode="&#xf2e9;" horiz-adv-x="320" d="M320 333l-247 -248h140v-42h-213v213h43v-141l247 248z" />
-<glyph unicode="&#xf2ea;" horiz-adv-x="341" d="M341 213v-42h-259l119 -120l-30 -30l-171 171l171 171l30 -30l-119 -120h259z" />
-<glyph unicode="&#xf2eb;" horiz-adv-x="273" d="M243 13l-72 72l30 30l72 -72zM41 277l96 96l96 -96h-75v-136l-128 -128l-30 30l115 115v119h-74z" />
-<glyph unicode="&#xf2ec;" horiz-adv-x="384" d="M354 299l30 -30l-192 -192l-149 149v-98h-43v171h171v-43h-98l119 -119z" />
-<glyph unicode="&#xf2ed;" horiz-adv-x="320" d="M107 341h213v-213h-43v141l-247 -248l-30 30l247 248h-140v42z" />
-<glyph unicode="&#xf2ee;" horiz-adv-x="341" d="M171 363l170 -171l-170 -171l-30 30l119 120h-260v42h260l-119 120z" />
-<glyph unicode="&#xf2ef;" horiz-adv-x="341" d="M213 363h128v-128l-49 49l-61 -62l-30 30l61 62zM128 363l-49 -49l113 -113v-180h-43v162l-100 101l-49 -49v128h128z" />
-<glyph unicode="&#xf2f0;" horiz-adv-x="469" d="M192 256v64h-64l107 107l106 -107h-64v-64h-85zM171 235v-86h-64v-64l-107 107l107 107v-64h64zM469 192l-106 -107v64h-64v86h64v64zM277 128v-64h64l-106 -107l-107 107h64v64h85z" />
-<glyph unicode="&#xf2f1;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM107 235l106 -107l107 107h-213z" />
-<glyph unicode="&#xf2f2;" horiz-adv-x="213" d="M0 245h213l-106 -106z" />
-<glyph unicode="&#xf2f3;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM256 299l-107 -107l107 -107v214z" />
-<glyph unicode="&#xf2f4;" horiz-adv-x="107" d="M107 299v-214l-107 107z" />
-<glyph unicode="&#xf2f5;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 299v-214l106 107z" />
-<glyph unicode="&#xf2f6;" horiz-adv-x="107" d="M0 85v214l107 -107z" />
-<glyph unicode="&#xf2f7;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213 260l-106 -106h213z" />
-<glyph unicode="&#xf2f8;" horiz-adv-x="213" d="M213 139h-213l107 106z" />
-<glyph unicode="&#xf2f9;" horiz-adv-x="256" d="M226 265l30 -30l-128 -128l-128 128l30 30l98 -98z" />
-<glyph unicode="&#xf2fa;" horiz-adv-x="158" d="M158 290l-98 -98l98 -98l-30 -30l-128 128l128 128z" />
-<glyph unicode="&#xf2fb;" horiz-adv-x="158" d="M30 320l128 -128l-128 -128l-30 30l98 98l-98 98z" />
-<glyph unicode="&#xf2fc;" horiz-adv-x="256" d="M128 277l128 -128l-30 -30l-98 98l-98 -98l-30 30z" />
-<glyph unicode="&#xf2fd;" horiz-adv-x="341" d="M171 277v86l170 -171l-170 -171v86h-171v170h171z" />
-<glyph unicode="&#xf2fe;" horiz-adv-x="256" d="M149 384v-302l77 76l30 -30l-128 -128l-128 128l30 30l77 -76v302h42z" />
-<glyph unicode="&#xf2ff;" horiz-adv-x="384" d="M384 213v-42h-302l76 -77l-30 -30l-128 128l128 128l30 -30l-76 -77h302z" />
-<glyph unicode="&#xf300;" horiz-adv-x="405" d="M363 299h42v-128h-323l76 -77l-30 -30l-128 128l128 128l30 -30l-76 -77h281v86z" />
-<glyph unicode="&#xf301;" horiz-adv-x="384" d="M0 213h302l-76 77l30 30l128 -128l-128 -128l-30 30l76 77h-302v42z" />
-<glyph unicode="&#xf302;" horiz-adv-x="448" d="M226 290l30 30l128 -128l-128 -128l-30 30l76 77h-302v42h302zM405 320h43v-256h-43v256z" />
-<glyph unicode="&#xf303;" horiz-adv-x="256" d="M107 0v302l-77 -76l-30 30l128 128l128 -128l-30 -30l-77 76v-302h-42z" />
-<glyph unicode="&#xf304;" horiz-adv-x="451" d="M138 298l139 -138l-139 -139l-138 139zM60 160l78 -78l78 78l-78 78zM394 293q57 -56 57 -135.5t-57 -135.5q-56 -56 -135 -56q-49 0 -93 24l32 31q29 -13 61 -13q62 0 105.5 44t43.5 105.5t-43.5 105.5t-105.5 44v-69l-91 90l91 90v-69q79 0 135 -56z" />
-<glyph unicode="&#xf305;" horiz-adv-x="451" d="M312 298l139 -138l-139 -139l-138 139zM390 160l-78 78l-78 -78l78 -78zM56 293q56 56 136 56v69l90 -90l-90 -90v69q-62 0 -105.5 -44t-43.5 -105.5t43.5 -105.5t105.5 -44q31 0 60 13l32 -31q-43 -24 -92 -24q-80 0 -136 56t-56 135.5t56 135.5z" />
-<glyph unicode="&#xf306;" horiz-adv-x="340" d="M65 266q-17 -24 -22 -53h-43q6 46 35 83zM43 171q5 -28 22 -53l-30 -30q-29 37 -35 83h43zM65 57l30 31q24 -17 53 -22v-43q-46 5 -83 34zM191 361q63 -8 106 -56t43 -113t-43 -113t-106 -56v43q45 8 75.5 43.5t30.5 82.5t-30.5 82.5t-75.5 43.5v-83l-98 95l98 97v-66z " />
-<glyph unicode="&#xf307;" horiz-adv-x="340" d="M246 330l-97 -95v83q-45 -8 -75.5 -43.5t-30.5 -82.5t30.5 -82.5t75.5 -43.5v-43q-63 8 -106 56t-43 113t43 113t106 56v66zM340 213h-43q-5 29 -22 53l30 30q29 -37 35 -83zM192 66q28 5 52 22l31 -31q-37 -28 -83 -34v43zM275 118q17 24 22 53h43q-6 -46 -35 -83z" />
-<glyph unicode="&#xf308;" horiz-adv-x="469" d="M235 96l-86 85h64v192h43v-192h64zM427 373q17 0 29.5 -12.5t12.5 -29.5v-299q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v299q0 17 12.5 29.5t30.5 12.5h128v-42h-128v-299h384v299h-128v42h128z" />
-<glyph unicode="&#xf309;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 29.5v86h43v-86h384v300h-384v-86h-43v85q0 18 12.5 30.5t30.5 12.5h384zM213 107v64h-213v42h213v64l86 -85z" />
-<glyph unicode="&#xf30a;" d="M341 363l86 -86h-64v-149q0 -35 -25 -60t-60.5 -25t-60.5 25t-25 60v149q0 18 -12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5v-149h64l-86 -85l-85 85h64v149q0 36 25 61t60.5 25t60.5 -25t25 -61v-149q0 -18 12.5 -30.5t30 -12.5t30 12.5t12.5 30.5v149h-64z" />
-<glyph unicode="&#xf30b;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM96 256h53v-85h43v85h53l-74 75zM331 128h-54v85h-42v-85h-54l75 -75z" />
-<glyph unicode="&#xf30c;" horiz-adv-x="299" d="M235 85h64l-86 -85l-85 85h64v150h43v-150zM85 384l86 -85h-64v-150h-43v150h-64z" />
-<glyph unicode="&#xf30d;" horiz-adv-x="384" d="M85 213v-64h150v-42h-150v-64l-85 85zM384 256l-85 -85v64h-150v42h150v64z" />
-<glyph unicode="&#xf30e;" d="M299 64l49 49l-105 104l-85 -85l-158 158l30 30l128 -128l85 85l135 -134l49 49v-128h-128z" />
-<glyph unicode="&#xf30f;" horiz-adv-x="405" d="M405 192l-85 -85v64h-320v42h320v64z" />
-<glyph unicode="&#xf310;" d="M299 320h128v-128l-49 49l-135 -134l-85 85l-128 -128l-30 30l158 158l85 -85l105 104z" />
-<glyph unicode="&#xf311;" horiz-adv-x="196" d="M0 51l98 98l98 -98l-30 -30l-68 68l-68 -68zM196 333l-98 -98l-98 98l30 30l68 -68l68 68z" />
-<glyph unicode="&#xf312;" horiz-adv-x="196" d="M98 324l-68 -68l-30 30l98 98l98 -98l-30 -30zM98 60l68 68l30 -30l-98 -98l-98 98l30 30z" />
-<glyph unicode="&#xf313;" horiz-adv-x="341" d="M0 277v86h85v-86h-85zM128 21v86h85v-86h-85zM0 21v86h85v-86h-85zM0 149v86h85v-86h-85zM128 149v86h85v-86h-85zM256 363h85v-86h-85v86zM128 277v86h85v-86h-85zM256 149v86h85v-86h-85zM256 21v86h85v-86h-85z" />
-<glyph unicode="&#xf314;" horiz-adv-x="485" d="M171 363h-31l-43 42h330q17 0 29.5 -12.5t12.5 -29.5v-330l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31h-31l-43 42h74v86h-86v-74l-42 43v31zM341 363v-86h86v86h-86zM27 421l458 -458l-27 -27l-43 43h-330q-17 0 -29.5 12.5t-12.5 29.5v330l-43 43zM213 180v-31h31z M85 308v-31h31zM171 21v86h-86v-86h86zM171 149v74l-12 12h-74v-86h86zM299 21v74l-12 12h-74v-86h86zM341 21h31l-31 31v-31z" />
-<glyph unicode="&#xf315;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM128 21v86h-85v-86h85zM128 149v86h-85v-86h85zM128 277v86h-85v-86h85zM256 21v86h-85v-86h85zM256 149v86h-85v-86h85z M256 277v86h-85v-86h85zM384 21v86h-85v-86h85zM384 149v86h-85v-86h85zM384 277v86h-85v-86h85z" />
-<glyph unicode="&#xf316;" horiz-adv-x="405" d="M384 171q9 0 15 -6.5t6 -15.5v-128q0 -8 -6 -14.5t-15 -6.5h-363q-8 0 -14.5 6.5t-6.5 14.5v128q0 9 6.5 15.5t14.5 6.5h363zM384 384q9 0 15 -6.5t6 -14.5v-128q0 -9 -6 -15.5t-15 -6.5h-363q-8 0 -14.5 6.5t-6.5 15.5v128q0 8 6.5 14.5t14.5 6.5h363z" />
-<glyph unicode="&#xf317;" horiz-adv-x="363" d="M0 64v277h64v-277h-64zM299 341h64v-277h-64v277zM85 64v277h192v-277h-192z" />
-<glyph unicode="&#xf318;" d="M107 43v320h213v-320h-213zM0 85v235h85v-235h-85zM341 320h86v-235h-86v235z" />
-<glyph unicode="&#xf319;" horiz-adv-x="363" d="M128 64v277h107v-277h-107zM0 64v277h107v-277h-107zM256 341h107v-277h-107v277z" />
-<glyph unicode="&#xf31a;" horiz-adv-x="405" d="M0 256v85h85v-85h-85zM0 149v86h85v-86h-85zM107 149v86h85v-86h-85zM213 149v86h86v-86h-86zM107 256v85h85v-85h-85zM213 341h86v-85h-86v85zM320 149v86h85v-86h-85zM0 43v85h85v-85h-85zM107 43v85h85v-85h-85zM213 43v85h86v-85h-86zM320 43v85h85v-85h-85zM320 341 h85v-85h-85v85z" />
-<glyph unicode="&#xf31b;" horiz-adv-x="405" d="M0 43v149h128v-149h-128zM149 43v149h256v-149h-256zM0 341h405v-128h-405v128z" />
-<glyph unicode="&#xf31c;" horiz-adv-x="384" d="M0 171v213h171v-213h-171zM0 0v128h171v-128h-171zM213 0v213h171v-213h-171zM213 384h171v-128h-171v128z" />
-<glyph unicode="&#xf31d;" horiz-adv-x="405" d="M0 0v64h405v-64h-405zM384 277q9 0 15 -6t6 -15v-128q0 -9 -6 -15t-15 -6h-363q-8 0 -14.5 6t-6.5 15v128q0 9 6.5 15t14.5 6h363zM0 384h405v-64h-405v64z" />
-<glyph unicode="&#xf31e;" horiz-adv-x="341" d="M0 128v43h341v-43h-341zM0 43v42h341v-42h-341zM0 213v43h341v-43h-341zM0 341h341v-42h-341v42z" />
-<glyph unicode="&#xf31f;" horiz-adv-x="384" d="M0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM0 256v43h43v-43h-43zM85 171v42h299v-42h-299zM85 85v43h299v-43h-299zM85 299h299v-43h-299v43z" />
-<glyph unicode="&#xf320;" horiz-adv-x="363" d="M0 149v86h85v-86h-85zM0 43v85h85v-85h-85zM0 256v85h85v-85h-85zM107 149v86h256v-86h-256zM107 43v85h256v-85h-256zM107 341h256v-85h-256v85z" />
-<glyph unicode="&#xf321;" horiz-adv-x="363" d="M0 213v128h107v-128h-107zM0 64v128h107v-128h-107zM128 64v128h107v-128h-107zM256 64v128h107v-128h-107zM128 213v128h107v-128h-107zM256 341h107v-128h-107v128z" />
-<glyph unicode="&#xf322;" horiz-adv-x="363" d="M128 64v128h107v-128h-107zM0 64v277h107v-277h-107zM256 64v128h107v-128h-107zM128 341h235v-128h-235v128z" />
-<glyph unicode="&#xf323;" horiz-adv-x="363" d="M0 64v128h363v-128h-363zM0 341h363v-128h-363v128z" />
-<glyph unicode="&#xf324;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM43 192v-43h85v43h-85zM256 64v43h-213v-43h213zM384 64v43h-85v-43h85zM384 149v43h-213v-43h213z" />
-<glyph unicode="&#xf325;" horiz-adv-x="384" d="M0 256v43h299v-43h-299zM0 171v42h299v-42h-299zM0 85v43h299v-43h-299zM341 85v43h43v-43h-43zM341 299h43v-43h-43v43zM341 171v42h43v-42h-43z" />
-<glyph unicode="&#xf326;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM277 64v85h-234v-85h234zM277 171v85h-234v-85h234zM384 64v192h-85v-192h85z" />
-<glyph unicode="&#xf327;" horiz-adv-x="405" d="M85 341q9 0 15.5 -6t6.5 -15v-256q0 -9 -6.5 -15t-15.5 -6h-64q-8 0 -14.5 6t-6.5 15v256q0 9 6.5 15t14.5 6h64zM384 341q9 0 15 -6t6 -15v-256q0 -9 -6 -15t-15 -6h-64q-9 0 -15 6t-6 15v256q0 9 6 15t15 6h64zM235 341q8 0 14.5 -6t6.5 -15v-256q0 -9 -6.5 -15 t-14.5 -6h-64q-9 0 -15.5 6t-6.5 15v256q0 9 6.5 15t15.5 6h64z" />
-<glyph unicode="&#xf328;" horiz-adv-x="412" d="M213 171h171v-171h-171v171zM0 0v171h171v-171h-171zM0 384h171v-171h-171v171zM291 412l121 -121l-121 -120l-120 120z" />
-<glyph unicode="&#xf329;" d="M427 326l-28 -33l-98 83l28 32zM125 376l-97 -82l-28 32l98 82zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M182 138l105 106l23 -23l-128 -128l-68 68l23 22z" />
-<glyph unicode="&#xf32a;" horiz-adv-x="434" d="M221 320q-26 0 -51 -9l-33 32q40 20 84 20q79 0 135.5 -56.5t56.5 -135.5q0 -44 -20 -84l-32 32q9 26 9 52q0 62 -43.5 105.5t-105.5 43.5zM434 326l-27 -33l-99 83l28 32zM27 399l21 -21l372 -372l-27 -27l-47 47q-54 -47 -125 -47q-80 0 -136 56t-56 136q0 71 47 125 l-17 17l-24 -20l-30 31l23 19l-28 29zM316 56l-210 210q-35 -42 -35 -95q0 -62 44 -106t106 -44q54 0 95 35zM136 378l-18 -15l-31 30l19 15z" />
-<glyph unicode="&#xf32b;" d="M125 376l-97 -82l-28 32l98 82zM427 326l-28 -33l-98 83l28 32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M235 256v-64h64v-43h-64v-64h-43v64h-64v43h64v64h43z" />
-<glyph unicode="&#xf32c;" d="M125 376l-97 -82l-28 32l98 82zM427 326l-28 -33l-98 83l28 32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z M149 213v43h128v-38l-77 -90h77v-43h-128v39l78 89h-78z" />
-<glyph unicode="&#xf32d;" d="M427 326l-28 -33l-98 83l28 32zM125 376l-97 -82l-28 32l98 82zM224 277v-112l85 -50l-16 -26l-101 60v128h32zM213.5 363q79.5 0 135.5 -56.5t56 -136t-56 -135.5t-135.5 -56t-136 56t-56.5 135.5t56.5 136t136 56.5zM213 21q62 0 106 44t44 106t-44 105.5t-106 43.5 t-105.5 -43.5t-43.5 -105.5t43.5 -106t105.5 -44z" />
-<glyph unicode="&#xf32e;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298zM85 235h107v-107h-107v107z" />
-<glyph unicode="&#xf32f;" horiz-adv-x="384" d="M289 212l-127 -127l-68 68l23 23l45 -45l104 104zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298z" />
-<glyph unicode="&#xf330;" horiz-adv-x="384" d="M135 85l-23 23l52 52l-52 52l23 23l52 -52l52 52l22 -23l-52 -52l52 -52l-22 -23l-52 52zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21z M341 43v234h-298v-234h298z" />
-<glyph unicode="&#xf331;" horiz-adv-x="384" d="M299 235v-43h-214v43h214zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43h43v-43h21zM341 43v234h-298v-234h298zM235 149v-42h-150v42h150z" />
-<glyph unicode="&#xf332;" horiz-adv-x="384" d="M299 192v-107h-107v107h107zM277 427h43v-43h21q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h21v43h43v-43h170v43zM341 43v234h-298v-234h298z" />
-<glyph unicode="&#xf333;" horiz-adv-x="384" d="M171 85.5q0 8.5 6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15zM171 384h21q80 0 136 -56t56 -136t-56 -136t-136 -56t-136 56t-56 136q0 46 20.5 86.5t56.5 66.5v1l145 -145l-30 -30l-116 115q-33 -41 -33 -94q0 -62 43.5 -105.5t105.5 -43.5t105.5 43.5 t43.5 105.5q0 56 -36.5 98t-91.5 50v-41h-42v85zM320 192q0 -9 -6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15zM64 192q0 9 6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15z" />
-<glyph unicode="&#xf334;" d="M303.5 282.5q37.5 -37.5 37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90 38l90 90v128q53 0 90.5 -37.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50 t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf335;" horiz-adv-x="448" d="M299 192q0 -18 -12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5t30.5 12.5t30.5 -12.5t12.5 -30.5zM256 384q80 0 136 -56t56 -136t-56 -136t-136 -56q-65 0 -117 40l30 30q40 -27 87 -27q62 0 105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5 t-43.5 -105.5h64l-86 -85l-85 85h64q0 80 56 136t136 56z" />
-<glyph unicode="&#xf336;" horiz-adv-x="448" d="M256 384q80 0 136 -56t56 -136t-56 -136t-136 -56q-79 0 -136 56l31 31q43 -44 105 -44t105.5 43.5t43.5 105.5t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5h64l-87 -86l-1 3l-83 83h64q0 80 56 136t136 56zM235 277h32v-90l74 -45l-15 -26l-91 55v106z" />
-<glyph unicode="&#xf337;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM224 299v-112l96 -57l-16 -27l-112 68v128h32z" />
-<glyph unicode="&#xf338;" horiz-adv-x="411" d="M369 351l30 -30l-30 -31q42 -52 42 -119q0 -58 -32 -106l-31 31q20 35 20 75q0 62 -43.5 105.5t-105.5 43.5q-40 0 -75 -20l-31 31q48 32 106 32q67 0 120 -42zM283 427v-43h-128v43h128zM197 247v30h43v-73zM27 363l214 -214l164 -165l-27 -27l-53 54q-48 -32 -106 -32 q-80 0 -136 56t-56 136q0 58 32 106l-59 59zM219 21q40 0 75 21l-204 204q-21 -35 -21 -75q0 -62 44 -106t106 -44z" />
-<glyph unicode="&#xf339;" horiz-adv-x="384" d="M256 427v-43h-128v43h128zM171 149v128h42v-128h-42zM342 290q42 -52 42 -119q0 -80 -56 -136t-136 -56t-136 56t-56 135.5t56 136t136 56.5q67 0 120 -43l30 31q16 -13 30 -30zM192 21q62 0 105.5 44t43.5 106t-43.5 105.5t-105.5 43.5t-105.5 -43.5t-43.5 -105.5 t43.5 -106t105.5 -44z" />
-<glyph unicode="&#xf33a;" horiz-adv-x="299" d="M0 107v85h299v-85q0 -62 -44 -106t-106 -44t-105.5 44t-43.5 106zM237 355q29 -21 45.5 -52.5t16.5 -67.5v-22h-299v22q0 36 16.5 67.5t44.5 52.5l-44 45l17 17l49 -49q32 16 66 16t66 -16l50 49l17 -17zM85.5 256q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5 t-6.5 -15t6.5 -15t15 -6.5zM213.5 256q8.5 0 15 6.5t6.5 15t-6.5 15t-15 6.5t-15 -6.5t-6.5 -15t6.5 -15t15 -6.5z" />
-<glyph unicode="&#xf33b;" d="M85 64v213h256v-213q0 -9 -6 -15t-15 -6h-21v-75q0 -13 -9.5 -22.5t-23 -9.5t-22.5 9.5t-9 22.5v75h-43v-75q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5t-9.5 22.5v75h-21q-9 0 -15.5 6t-6.5 15zM32 277q13 0 22.5 -9t9.5 -23v-149q0 -13 -9.5 -22.5t-22.5 -9.5t-22.5 9.5 t-9.5 22.5v149q0 14 9.5 23t22.5 9zM394.5 277q13.5 0 23 -9t9.5 -23v-149q0 -13 -9.5 -22.5t-23 -9.5t-22.5 9.5t-9 22.5v149q0 14 9 23t22.5 9zM289 402q52 -38 52 -103h-256q0 64 53 103l-28 28q-8 7 -0.5 14.5t15.5 0.5l32 -32q26 14 56 14t57 -14l31 32q8 7 15.5 -0.5 t-0.5 -14.5zM171 341v22h-22v-22h22zM277 341v22h-21v-22h21z" />
-<glyph unicode="&#xf33c;" horiz-adv-x="363" d="M353 262q-21 -7 -35 -32.5t-14 -50.5q0 -31 16 -57.5t43 -33.5q-8 -27 -26.5 -55.5t-37.5 -42.5q-16 -11 -40 -11q-16 0 -37 8q-18 9 -31 9q-10 0 -40 -12q-18 -5 -26 -5q-24 0 -49 20q-36 34 -56 81t-20 98q0 53 30.5 93.5t77.5 40.5q26 0 48 -11q17 -11 34 -11 q16 0 31 6q39 16 52 16q35 0 61 -23q12 -12 19 -27zM179 309q0 32 25 63q25 27 61 33q0 -38 -24 -67q-27 -29 -62 -29z" />
-<glyph unicode="&#xf33d;" d="M384 281h-107v26h107v-26zM208 180.5q12 -17.5 12 -42.5q0 -20 -8 -35q-7 -14 -21 -23q-12 -9 -30 -14q-14 -4 -34 -4h-127v266h124q12 0 34 -5q13 -3 26 -12q11 -7 18 -20q6 -13 6 -31q0 -20 -9.5 -33.5t-26.5 -21.5q24 -7 36 -24.5zM55 221h61q17 0 26 6q10 7 10 23 q0 9 -3.5 15t-9.5 9q-6 4 -12 5q-9 2 -15 2h-57v-60zM162 141q0 20 -11 29q-11 8 -30 8h-66v-73h64q7 0 17 2q8 2 13.5 5.5t9.5 11.5q3 6 3 17zM426 144h-137q0 -24 13 -37q12 -11 34 -11q15 0 27 8q12 9 14 18h46q-10 -35 -34 -50q-24 -16 -55 -16q-22 0 -40 7t-31 21 q-13 13 -19 32q-7 18 -7 40t7 40.5t20 32.5q13 13 30 21q18 8 40 8q24 0 42 -9.5t30 -25.5q11 -15 17 -37q5 -21 3 -42zM374 178q-2 18 -12 30q-9 10 -29 10q-13 0 -21 -4.5t-13.5 -10.5t-6.5 -13q-3 -7 -3 -12h85z" />
-<glyph unicode="&#xf33e;" d="M390 161v62l-46 -31zM232 31l143 96l-64 43l-79 -53v-86zM213 149l65 43l-65 43l-65 -43zM195 31v86l-80 53l-64 -43zM37 223v-62l46 31zM195 353l-144 -96l64 -43l80 53v86zM232 353v-86l79 -53l64 43zM427 259v-2v-130v-2v-1q0 -1 -1 -2v-1q-1 0 -1 -1v-1l-1 -1v-1 l-0.5 -0.5l-0.5 -0.5q0 -1 -1 -1l-1 -1v0l-1 -1l-1 -1l-195 -130q-5 -3 -10.5 -3t-10.5 3l-195 130h-1v1l-1 0.5l-1 0.5v1h-1v1l-1 1v1h-1v1l-1 1v1v1q-1 1 -1 2v1v2v130v2v1q0 1 1 2v1v1l1 1v1l1 1l0.5 0.5l0.5 0.5v1q1 0 1 0.5v0.5h0.5t0.5 1h1l1 1l195 130q10 7 21 0 l195 -130v0l1 -1h1v-1q1 0 1 -1q1 0 1 -0.5v-0.5l1 -1v-1q1 0 1 -1v-1l1 -1v-1q1 -1 1 -2v-1z" />
-<glyph unicode="&#xf33f;" d="M308 42q56 40 69 107q-35 8 -66 8v0q-17 0 -34 -3q19 -57 31 -112zM213 13q31 0 59 11q-12 63 -32 121q-49 -16 -87 -52q-23 -22 -39 -47q44 -33 99 -33zM47 179q0 -60 39 -106q19 28 46 53q42 38 94 55q-4 10 -10 22q-67 -21 -151 -22q-13 0 -18 1v-3zM140 329 q-33 -16 -56 -45t-32 -64q3 -1 13 -1h3q70 0 131 19q-29 54 -59 91zM213 346q-16 0 -35 -4q32 -42 57 -91q53 23 82 58q-45 37 -104 37zM344 282q-36 -41 -92 -66q4 -8 11 -25q24 4 48 4v0q33 0 69 -8q-3 53 -36 95zM213.5 393q88.5 0 151 -62.5t62.5 -151t-62.5 -151 t-151 -62.5t-151 62.5t-62.5 151t62.5 151t151 62.5z" />
-<glyph unicode="&#xf340;" d="M126 389l87 -72l88 72l126 -81l-87 -69l87 -69l-126 -82l-88 73l-87 -73l-126 82l87 69l-87 69zM213 317l-126 -78l126 -78l127 78zM213 145l89 -73l37 25v-27l-126 -75l-125 75v27l38 -25z" />
-<glyph unicode="&#xf341;" horiz-adv-x="366" d="M249 200h50q3 10 -8 21q-12 12 -27 3.5t-15 -24.5zM332 348q11 -14 17.5 -34.5t8 -32t4.5 -38.5q4 -39 3.5 -88.5t-10.5 -87.5q-9 -61 -49 -80.5t-95 -4.5q-22 6 -32 27t-7 44q4 21 24 31.5t43 10.5v-21q2 -7 -1 -9.5t-8.5 -2t-11.5 -0.5q-8 -5 -9 -16.5t8.5 -21 t27.5 -9.5q33 1 40 12t5 48q2 19 -14 32t-36 14q-37 -3 -65 43q-1 -2 -1 -10.5v-16.5v-15q-1 -15 -15 -23.5t-31 -11.5q-60 -5 -84 19q-34 36 -43 120q-7 48 22 69h81q4 2 10.5 9.5t7.5 8.5v43q1 4 0.5 14.5t1 17t6.5 11.5q22 11 47 4t38 -28h27h28q43 -6 62 -27zM87 313 h-69l86 88v-70z" />
-<glyph unicode="&#xf342;" d="M363 320h-54q-31 0 -52.5 -22t-21.5 -53v-53h-43v-64h43v-149h64v149h64v64h-64v43q0 8 6 14.5t15 6.5h43v64zM0 405h427v-426h-427v426z" />
-<glyph unicode="&#xf343;" horiz-adv-x="224" d="M145 -21h-79v194h-66v76h66v56q0 48 27 74t72 26q36 0 59 -3v-67l-41 -1q-22 0 -30 -9t-8 -27v-49h76l-10 -76h-66v-194z" />
-<glyph unicode="&#xf344;" d="M43 405h341q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-110q-7 1 -7 21v58q0 27 -15 40q44 5 70.5 27t26.5 78q0 33 -22 57q11 26 -2 57q-18 6 -58 -22q-26 7 -54 7t-53 -7q-18 12 -32.5 17.5t-20.5 4.5h-6q-12 -31 -2 -57q-22 -24 -22 -57 q0 -55 27 -77.5t70 -27.5q-11 -10 -13 -29q-42 -18 -62 18q-12 20 -33 22q-2 0 -4.5 -0.5t-5.5 -3.5t8 -9q15 -7 24 -31q1 -2 2 -4.5t6.5 -9.5t13 -10.5t20.5 -6.5t30 2v-36q0 -20 -8 -21h-109q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5z" />
-<glyph unicode="&#xf345;" d="M213.5 400q88.5 0 151 -62.5t62.5 -150.5q0 -70 -41 -125.5t-105 -77.5q-14 -2 -14 11v58q0 27 -15 40q44 5 70.5 27t26.5 77q0 34 -22 58q11 26 -2 57q-18 5 -58 -22q-26 7 -54 7t-53 -7q-18 12 -32.5 17.5t-20.5 4.5h-6q-12 -31 -2 -57q-22 -24 -22 -58q0 -55 27 -77 t70 -27q-11 -10 -13 -29q-42 -18 -62 18q-12 20 -33 22q-2 0 -4.5 -0.5t-5 -3.5t8.5 -9q14 -7 23 -31q1 -2 2 -4.5t6.5 -9.5t13 -10.5t20.5 -6.5t30 2v-36q0 -13 -14 -11q-64 22 -105 77.5t-41 125.5q0 88 62.5 150.5t151 62.5z" />
-<glyph unicode="&#xf346;" horiz-adv-x="463" d="M140 373l73 -128l-140 -245l-73 128zM183 128h280l-73 -128h-280zM451 149h-146l-147 256h1h145z" />
-<glyph unicode="&#xf347;" d="M222 287q114 -108 165 -114q1 11 1 19q0 25 -7 50q-4 -9 -11 -10t-15.5 5.5t-15.5 14.5t-14.5 18.5t-10 15t-3.5 6.5q-47 66 -163 62q-32 -13 -56 -36q65 30 130 -31zM365 105q11 20 16 39q-33 3 -85.5 29.5t-87.5 51.5l-35 25q-74 58 -127 -9q-8 -24 -8 -49 q0 -38 16 -73q9 26 25 26q15 0 40.5 -13.5t41.5 -18.5q10 -3 31 -10l31.5 -10.5t26.5 -6.5t30 -3q12 0 22 1.5t20 4.5t15.5 4.5t15.5 6t12 5.5zM213 17q76 0 128 56q-45 -13 -83.5 -13t-62.5 7l-25 8q-26 8 -31 -6t7 -38q32 -14 67 -14zM213 405q88 0 151 -62.5t63 -150.5 t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t150.5 62.5z" />
-<glyph unicode="&#xf348;" horiz-adv-x="416" d="M235 213h181v-21q0 -89 -58 -151t-145 -62q-88 0 -150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5q89 0 148 -65l-38 -38q-43 50 -110 50q-66 0 -113 -47t-47 -113t47 -113t113 -47q56 0 96.5 36t50.5 92h-125v53z" />
-<glyph unicode="&#xf349;" horiz-adv-x="448" d="M341 427q44 0 75.5 -31.5t31.5 -75.5q0 -22 -26.5 -67.5t-52 -92.5t-22.5 -75q0 -5 -5.5 -5t-5.5 5q2 28 -23 75t-51.5 92.5t-26.5 67.5q0 44 31 75.5t75 31.5zM341.5 363q-17.5 0 -30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5t30 12.5t12.5 30.5t-12.5 30.5t-30 12.5z M43 384h185q-20 -32 -20 -69q0 -26 32 -83l-239 -239l-1 7v341q0 18 12.5 30.5t30.5 12.5zM310 109l-51 51l14 15q24 -39 37 -66zM371 -43h-315l157 158zM427 205v-205l-1 -7l-72 72q3 9 7 18.5t9 20t9.5 19t12 21.5t11 19.5t12.5 21.5zM100 181q-17 0 -27 7t-10 19 q0 14 18 21q10 3 22 3h5q13 -10 18 -15t5 -12q0 -9 -9 -16t-22 -7zM75 303q0 10 5.5 15.5t12.5 5.5q13 0 20.5 -12t7.5 -25q0 -11 -6.5 -15.5t-13.5 -4.5q-11 0 -18.5 11.5t-7.5 24.5zM127 241l-7 6q-6 5 -6 9q0 7 7 12q17 13 17 29q0 14 -14 26h12l9 9h-43 q-21 0 -32.5 -11.5t-11.5 -27.5q0 -13 9 -23t25 -10h5l-2 -8q0 -7 6 -14q-24 -1 -40 -11q-16 -9 -16 -25q0 -13 11.5 -21.5t33.5 -8.5q25 0 39.5 12t14.5 27q0 16 -17 30z" />
-<glyph unicode="&#xf34a;" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h128v-107l-86 22l22 -86h-107v128zM107 171l-22 -86l86 22v-107h-128q-18 0 -30.5 12.5t-12.5 30.5v128h107zM299 85l-22 86h107v-128q0 -18 -12.5 -30.5t-30.5 -12.5h-128v107zM341 384q18 0 30.5 -12.5t12.5 -30.5v-128h-107l22 86 l-86 -22v107h128z" />
-<glyph unicode="&#xf34b;" horiz-adv-x="379" d="M0 11v362q0 21 18 29l210 -210l-210 -210q-18 9 -18 29zM295 125l-230 -132l181 181zM366 217q13 -10 13 -25t-12 -25l-49 -28l-54 53l54 53zM65 391l230 -132l-49 -49z" />
-<glyph unicode="&#xf34c;" d="M43 405h340q17 0 30.5 -17t13.5 -36v-330q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v341q0 18 12.5 30.5t30.5 12.5zM151 301q-45 0 -76.5 -32t-31.5 -77t31.5 -77t76.5 -32q47 0 75.5 29.5t28.5 76.5q0 13 -2 19h-102v-38h62q-3 -17 -18 -31.5 t-44 -14.5q-28 0 -47.5 20t-19.5 48t19.5 48t47.5 20q27 0 43 -16l30 28q-29 29 -73 29zM322 239v-31h-31v-31h31v-31h31v31h30l1 31h-31v31h-31z" />
-<glyph unicode="&#xf34d;" d="M137 217h128q7 -37 -3 -72q-10 -34 -35 -57q-23 -21 -56 -29q-36 -8 -70 1q-27 7 -49 25q-24 19 -37 45q-22 42 -12 89q3 18 12 34q24 50 77 68q46 16 92 -1q24 -9 44 -27q-2 -3 -7 -7.5t-6 -6.5q-4 -3 -12.5 -11.5t-12.5 -13.5q-13 13 -30 18q-20 6 -40 1 q-24 -5 -41 -22q-13 -14 -20 -33q-9 -26 0 -53q9 -26 32 -42q14 -10 30 -13q15 -3 33 0q17 3 30 12q23 15 27 42h-74v26.5v26.5zM427 214v-34h-47v-46h-34v46h-47v34h47v47h34v-47h47z" />
-<glyph unicode="&#xf34e;" horiz-adv-x="418" d="M214 222v1h201q3 -12 3 -36q0 -93 -56.5 -150.5t-148.5 -57.5q-88 0 -150.5 62t-62.5 151t62 151t151 62q87 0 144 -57l-57 -56q-33 33 -86 33q-54 0 -92.5 -39.5t-38.5 -95t38.5 -94.5t92.5 -39q31 0 55 9.5t37.5 24.5t20.5 29.5t10 27.5h-123v74z" />
-<glyph unicode="&#xf34f;" d="M384 309v43q0 11 -11 11h-42q-11 0 -11 -11v-43q0 -10 11 -10h42q11 0 11 10zM53 21h320q11 0 11 11v181h-45q2 -12 2 -21q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5q0 11 2 21h-44v-181q0 -11 10 -11zM213.5 277q-35.5 0 -60.5 -25t-25 -60t25 -60t60.5 -25 t60.5 25t25 60t-25 60t-60.5 25zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" />
-<glyph unicode="&#xf350;" horiz-adv-x="401" d="M59 354h342l-31 -156l-5 -25l-24 -121l-183 -61l-158 61l16 80h67l-6 -33l95 -36l111 36l15 77h-274l13 67h274l9 44h-274z" />
-<glyph unicode="&#xf351;" horiz-adv-x="357" d="M179 50l91 25l13 138h-163l-4 45h171l4 45h-225l13 -135h155l-5 -58l-50 -14l-50 14l-4 37h-45l7 -72zM0 378h357l-32 -365l-146 -51l-147 51z" />
-<glyph unicode="&#xf352;" horiz-adv-x="384" d="M0 384h384v-384h-384v384zM101 63q15 -33 54 -33q25 0 39.5 13.5t14.5 40.5v124h-36v-123q0 -23 -19 -23q-13 0 -24 19zM228 67q19 -37 66 -37q27 0 43.5 13.5t16.5 36.5q0 22 -11.5 34t-36.5 23l-9 4q-12 5 -17 9.5t-5 12.5q0 6 4.5 10.5t12.5 4.5q15 0 24 -15l27 18 q-16 29 -51 29q-24 0 -38.5 -13.5t-14.5 -34.5t11 -33t33 -21l9 -4q10 -5 14.5 -7t8 -6.5t3.5 -10.5q0 -8 -6.5 -13t-17.5 -5q-23 0 -36 22z" />
-<glyph unicode="&#xf353;" horiz-adv-x="458" d="M0 294q45 29 82 35.5t60 -5.5t39 -35.5t23 -48t8 -49.5q3 -37 -18.5 -72.5t-57.5 -47.5t-83 16v-120l-53 34v293zM51 256v-121q41 -25 65.5 -21t35 24.5t10.5 56.5q0 47 -17 68t-41.5 17.5t-52.5 -24.5zM299 328q-4 -78 0 -155q3 -21 14.5 -30.5t26.5 -8t30 6t25 10.5 l10 5v155l53 -6v-207q0 -28 -8 -50.5t-20 -36t-27 -23t-30.5 -13.5t-27.5 -6t-20 -2h-8l-18 51q35 0 59 8.5t33 20t13.5 23.5t3.5 20l-1 8q-42 -16 -73.5 -17.5t-47.5 7.5t-25.5 20.5t-11.5 20.5l-2 10v155z" />
-<glyph unicode="&#xf354;" d="M366 288q25 0 43 -18t18 -43v-81q0 -25 -18 -43t-43 -18h-153q0 -6 5 -13t10 -7h92v-36q0 -25 -18 -43t-43 -18h-91q-26 0 -43.5 18t-17.5 43v80q0 25 17.5 43t43.5 18h112q25 0 42.5 18t17.5 43v57h26zM274 36q-15 0 -15 -19q0 -15 15 -15q7 0 11 4.5t4 10.5 q0 19 -15 19zM61 75q-25 0 -43 17.5t-18 43.5v80q0 26 18 43.5t43 17.5h152q0 7 -4.5 14t-10.5 7h-91v36q0 25 17.5 43t43.5 18h91q25 0 43 -18t18 -43v-80q0 -26 -18 -43.5t-43 -17.5h-112q-25 0 -43 -18t-18 -43v-57h-25zM152 326q16 0 16 19q0 15 -16 15q-15 0 -15 -15 q0 -19 15 -19z" />
-<glyph unicode="&#xf355;" d="M325 72q-58 0 -87 22.5t-42 64.5l-16 49q-11 32 -25 48t-44 16q-25 0 -42.5 -20t-17.5 -62q0 -35 16 -56t42 -21q17 0 33 7t23 14l8 7l15 -43q-3 -3 -9 -7t-27 -11.5t-45 -7.5q-52 0 -79.5 30t-27.5 86q0 59 28.5 91.5t81.5 32.5q49 0 76 -20t42 -68l16 -50 q10 -30 28.5 -46t53.5 -16q51 0 51 26q0 23 -33 30l-34 8q-56 14 -56 65q0 38 24.5 54.5t62.5 16.5q78 0 84 -63l-49 -6q-3 30 -38 30t-35 -26q0 -23 28 -29l31 -7q65 -15 65 -71q0 -68 -102 -68z" />
-<glyph unicode="&#xf356;" d="M363 43v121q0 31 -22 53t-53 22q-15 0 -30 -8.5t-23 -21.5v26h-64v-192h64v113q0 13 9 22.5t22.5 9.5t23 -9.5t9.5 -22.5v-113h64zM96 271q16 0 27.5 11t11.5 27t-11.5 27.5t-27.5 11.5t-27.5 -11.5t-11.5 -27.5t11.5 -27t27.5 -11zM128 43v192h-64v-192h64zM384 405 q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" />
-<glyph unicode="&#xf357;" horiz-adv-x="371" d="M237 405q79 0 112 -39q30 -35 20 -99q-23 -146 -175 -146h-49q-8 0 -14 -5t-7 -13l-17 -106q-1 -8 -7 -13t-14 -5h-73q-6 0 -10 4.5t-3 9.5l62 394q2 8 7.5 13t13.5 5h154zM255 261q4 29 -8 43q-6 8 -18 11.5t-21.5 4t-27.5 0.5h-11q-11 0 -12 -11l-17 -103h23 q17 0 25.5 0.5t22 3.5t21 8.5t14 16.5t9.5 26z" />
-<glyph unicode="&#xf358;" d="M235 102q53 0 82 35t29 82q0 52 -39 89.5t-93.5 37.5t-93.5 -37.5t-39 -89.5q0 -34 18 -63q6 -11 18 -11q9 0 15.5 6.5t6.5 14.5q0 5 -4 11q-11 20 -11 42q0 35 26 59.5t63 24.5t63.5 -24.5t26.5 -59.5q0 -30 -16.5 -51.5t-51.5 -21.5q-12 0 -20 8.5t-8 20.5 q0 9 9.5 28.5t9.5 35.5q0 28 -31 28q-14 0 -24.5 -11.5t-10.5 -36.5q0 -8 1 -16t2 -12l1 -3l-39 -119l-1 -4v-1.5v-1.5q0 -10 6.5 -17t16.5 -7q14 0 20 12l1 -1l1 4l20 69q19 -20 46 -20zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341 q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" />
-<glyph unicode="&#xf359;" d="M427 332v-37v-75q0 -39 -10 -69q-18 -60 -68 -102q-53 -44 -121 -48q-70 -5 -129 32q-54 35 -80 93q-15 33 -18 66q-1 18 -1 75v36.5v38.5q0 14 7.5 25t20.5 15q8 2 16 2h20h38h74h21h16q25 0 75.5 -0.5t75.5 -0.5q27 0 35 -2q14 -4 22 -17q6 -9 6 -32zM342 235 q5 15 -6 27q-10 13 -27 10q-5 0 -9.5 -3t-7 -5t-8 -7.5l-6.5 -6.5q-56 -55 -64 -62q-2 1 -56 53q-7 7 -15 14q-11 11 -14 13q-13 9 -27 2q-15 -6 -17.5 -21.5t8.5 -26.5q1 0 58 -56l28 -26q1 -2 5.5 -6.5t7 -6.5t7 -5t8.5 -4q15 -3 27 8q4 4 9 8.5t11 10.5l9 9q52 50 58 55 l5.5 5.5l6.5 6.5t5 6t4 8z" />
-<glyph unicode="&#xf35a;" horiz-adv-x="491" d="M395 363l96 -171l-96 -171h-86l96 171l-55 99l-169 -270h-85l-96 171l96 171h85l-96 -171l56 -99l168 270h86z" />
-<glyph unicode="&#xf35b;" horiz-adv-x="384" d="M320 105q26 0 44 -18.5t18 -44t-18 -44t-44 -18.5t-44 18.5t-18 44.5q0 6 1 14l-151 88q-19 -17 -44 -17q-27 0 -45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5q25 0 44 -17l150 87q-2 9 -2 15q0 27 18.5 45.5t45.5 18.5t45.5 -18.5t18.5 -45t-18.5 -45.5t-45.5 -19 q-25 0 -44 18l-150 -88q2 -9 2 -15t-2 -15l152 -88q18 16 42 16z" />
-<glyph unicode="&#xf35c;" horiz-adv-x="336" d="M245 13v145h34v-179h-279v178l32 -1l-1 -143h214zM52 73h167v-35h-167v35zM57 136l168 -16l-4 -36l-168 16zM72 209l163 -46l-10 -35l-163 46zM112 291l144 -87l-19 -32l-144 87zM262 210l-98 137l30 21l98 -137zM272 399l36 6l28 -166l-36 -6z" />
-<glyph unicode="&#xf35d;" horiz-adv-x="439" d="M355 263q0 23 -16.5 39t-39 16t-39 -16t-16.5 -39t16.5 -39t39 -16t39 16t16.5 39zM181 95q0 -24 -17 -40t-40 -16q-16 0 -29.5 8t-20.5 22q15 -6 28 -12q17 -6 34 1t25 25q6 17 -1 34t-25 24l-23 9q6 2 12 2q23 0 40 -16.5t17 -40.5zM439 329v-274q0 -34 -24 -58 t-58 -24h-275q-34 0 -58 24t-24 58v44l49 -20q6 -26 27 -43.5t48 -17.5q30 0 52 20t25 50l98 72q43 0 73 30t30 73q0 42 -30 72.5t-73 30.5q-42 0 -72 -30t-31 -72l-64 -92h-8q-21 0 -39 -11l-85 34v134q0 34 24 58t58 24h275q34 0 58 -24t24 -58zM368 263q0 -29 -20 -49 t-48.5 -20t-49 20t-20.5 48.5t20.5 49t48.5 20.5q29 0 49 -20.5t20 -48.5z" />
-<glyph unicode="&#xf35e;" d="M372 273q0 -26 -18 -44.5t-44 -18.5t-44.5 18.5t-18.5 44.5t18.5 44.5t44.5 18.5t44 -18.5t18 -44.5zM0 73v110l65 -26q20 12 45 12h9l73 105q0 48 34.5 82t82.5 34q49 0 83.5 -34.5t34.5 -83t-34.5 -83t-83.5 -34.5l-112 -82q-3 -34 -28 -56.5t-59 -22.5q-32 0 -56 19.5 t-30 49.5zM309.5 352q-32.5 0 -55.5 -23.5t-23 -56t23 -55.5t55.5 -23t55.5 23t23 55.5t-23 56t-55.5 23.5zM110 146q-7 0 -14 -2l27 -10q19 -8 27.5 -27.5t0.5 -39.5t-27.5 -28t-39.5 -1q-6 3 -16.5 7.5t-14.5 5.5q18 -34 57 -34q26 0 45 19t19 45.5t-19 45.5t-45 19z" />
-<glyph unicode="&#xf35f;" d="M335 249q22 18 28 30q-13 -6 -31 -9q18 13 24 32q-20 -11 -37 -14q-12 14 -31 16.5t-35.5 -5t-26.5 -25t-5 -38.5q-67 4 -118 59q-11 -20 -4.5 -43.5t21.5 -32.5q-11 1 -24 7q1 -43 44 -57q-12 -3 -24 -1q12 -36 53 -40q-15 -13 -39 -19.5t-45 -3.5q45 -28 92 -26 q70 3 113.5 49.5t44.5 120.5zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341z" />
-<glyph unicode="&#xf360;" d="M383 279v-11q0 -45 -16.5 -88.5t-47 -79.5t-79 -58.5t-106.5 -22.5q-73 0 -134 39q10 -1 21 -1q61 0 109 37q-29 1 -51.5 18t-30.5 43q8 -2 16 -2q12 0 23 4q-30 6 -50 30t-20 55v1q19 -10 40 -11q-39 27 -39 73q0 24 12 44q33 -40 79.5 -64t100.5 -27q-2 10 -2 20 q0 36 25.5 61.5t61.5 25.5q38 0 64 -27q30 6 56 21q-10 -31 -39 -48q27 3 51 13q-18 -26 -44 -45z" />
-<glyph unicode="&#xf361;" horiz-adv-x="549" d="M548 299q7 -18 -43 -84q-7 -9 -18 -24q-23 -28 -26 -37q-5 -12 4 -23q5 -6 23 -24h1v-1q41 -37 55 -63l2 -4t2 -7.5t0 -9.5t-7 -7.5t-17 -3.5l-73 -2q-7 -1 -16.5 2t-14.5 6l-6 4q-9 6 -20 18t-19.5 22t-17.5 16.5t-16 4.5q-1 0 -2.5 -1t-5 -4.5t-6 -8.5t-4.5 -14.5 t-2 -22.5q0 -4 -1 -7.5t-2 -5.5l-1 -1q-6 -6 -16 -6h-32q-21 -2 -42.5 4t-37.5 15.5t-29 19t-20 16.5l-7 7q-3 2 -8 8t-20.5 26t-30.5 43t-35 60.5t-37 77.5q-2 5 -2 8t1 5l1 1q4 6 16 6h79q3 0 6 -1.5l5 -2.5l1 -1q5 -3 7 -9q6 -14 13.5 -29.5t11.5 -23.5l4 -8 q9 -17 16.5 -29.5t13.5 -19.5t12 -11t10 -4t8 1l1 1.5t3.5 6.5t4 13t2.5 23t0 36q-1 11 -3 20.5t-4 13.5l-1 3q-7 10 -25 13q-3 0 2 7q5 5 11 8q15 8 68 7q23 0 39 -4q5 -1 9 -3.5t6 -7t3 -9t1 -13v-15.5q-1 -8 -1 -20v-24q0 -3 -0.5 -12t-0.5 -14t1 -11.5t3.5 -11t6.5 -6.5 q2 -1 4.5 -1.5t7.5 3t11 10t15 19.5t19 30q17 30 31 65q1 2 2.5 4.5t3.5 3.5h1l1 1l4 1h6l82 1q11 1 18.5 -1t8.5 -5z" />
-<glyph unicode="&#xf362;" d="M40 280q-17 29 -38 37l-2 1v15h1h109v-15q-13 -1 -21.5 -7t-5.5 -17q14 -33 40.5 -94t38.5 -89l46 87q-7 14 -23 51.5t-27 58.5q-7 10 -36 11v14h102l1 -14q-6 -1 -10 -2t-7 -4.5t-2 -8.5l29 -64q28 60 28 61q3 11 -5 14.5t-21 3.5l-1 14h92v-14q-24 -2 -33 -15 q-14 -20 -46 -89q23 -53 43 -95l78 180q-6 13 -29 19l-1 14l87 -1v-14q-6 -1 -11 -3q-11 -5 -18 -17l-107 -247h-18l-52 120l-62 -120h-18q-16 33 -48 111t-53 118z" />
-<glyph unicode="&#xf363;" horiz-adv-x="363" d="M0 192v112l128 28v-138zM363 384v-187l-214 -3v143zM0 171l128 -2v-146l-128 25v123zM363 165v-186l-214 40v150z" />
-<glyph unicode="&#xf364;" horiz-adv-x="469" d="M384 192v-107h-107v43h64v64h43zM128 256v-64h-43v107h107v-43h-64zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" />
-<glyph unicode="&#xf365;" d="M299 235v-43h-43v43h43zM299 149v-42h-43v42h43zM128 235v-43h-43v43h43zM213 235v-43h-42v43h42zM384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM384 64v256h-341v-256 h341z" />
-<glyph unicode="&#xf366;" d="M170.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM170.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM106.5 245q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM170.5 96q10.5 0 10.5 -10.5 t-10.5 -10.5t-10.5 10.5t10.5 10.5zM106.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM170.5 288q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM256 256q9 0 15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15t6 15t15 6.5zM256 288q-11 0 -11 10.5 t11 10.5t11 -10.5t-11 -10.5zM320 160q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM320 245q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21 q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM256 96q11 0 11 -10.5t-11 -10.5t-11 10.5t11 10.5zM256 171q9 0 15 -6.5t6 -15t-6 -15t-15 -6.5t-15 6.5t-6 15t6 15t15 6.5z" />
-<glyph unicode="&#xf367;" horiz-adv-x="384" d="M42.5 75q-13.5 0 -22.5 9t-9 22.5t9 23t22.5 9.5t23 -9.5t9.5 -23t-9.5 -22.5t-23 -9zM128 171q-9 0 -15 6t-6 15t6 15t15 6t15 -6t6 -15t-6 -15t-15 -6zM128 256q-9 0 -15 6.5t-6 15t6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5zM0 0v43h384v-43h-384zM42.5 245 q-13.5 0 -22.5 9.5t-9 23t9 22.5t22.5 9t23 -9t9.5 -22.5t-9.5 -23t-23 -9.5zM42.5 160q-13.5 0 -22.5 9.5t-9 22.5t9 22.5t22.5 9.5t23 -9.5t9.5 -22.5t-9.5 -22.5t-23 -9.5zM128 85q-9 0 -15 6.5t-6 15t6 15t15 6.5t15 -6.5t6 -15t-6 -15t-15 -6.5zM298.5 96 q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM0 384h384v-43h-384v43zM298.5 267q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM298.5 181q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM213.5 256q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5 t6.5 -15t-6.5 -15t-15 -6.5zM213.5 171q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM213.5 85q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5z" />
-<glyph unicode="&#xf368;" horiz-adv-x="405" d="M245.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM241 203q-11 2 -18.5 9.5t-8.5 17.5l-1 5q0 13 9.5 22.5t23 9.5t22.5 -9.5t9 -23t-9 -22.5t-23 -9h-4zM245.5 373q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM160 373q-11 0 -11 11 t11 11t11 -11t-11 -11zM394.5 224q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM160 299q-9 0 -15 6t-6 15t6 15t15 6t15 -6t6 -15t-6 -15t-15 -6zM330.5 128q-8.5 0 -15 6.5t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5zM330.5 213q-8.5 0 -15 6.5 t-6.5 15t6.5 15t15 6.5t15 -6.5t6.5 -15t-6.5 -15t-15 -6.5zM330.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15t-15 -6zM245.5 11q10.5 0 10.5 -11t-10.5 -11t-10.5 11t10.5 11zM0 336l27 27l346 -347l-27 -27l-81 81q2 -4 2 -6q0 -9 -6.5 -15t-15 -6 t-15 6t-6.5 15t6.5 15t14.5 6q2 0 6 -1l-60 60q-1 -11 -10 -19t-21 -8q-13 0 -22.5 9.5t-9.5 22.5q0 12 7.5 21t19.5 11l-60 60q1 -4 1 -6q0 -9 -6.5 -15.5t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15.5 6.5l6 -1zM160 85q9 0 15 -6t6 -15t-6 -15t-15 -6t-15 6t-6 15t6 15t15 6z M394.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM74.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM10.5 245q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM160 11q11 0 11 -11t-11 -11t-11 11t11 11zM74.5 85 q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM10.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5z" />
-<glyph unicode="&#xf369;" horiz-adv-x="405" d="M74.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM74.5 85q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM74.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM10.5 245 q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM74.5 341q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM394.5 224q-10.5 0 -10.5 10.5t10.5 10.5t10.5 -10.5t-10.5 -10.5zM245.5 299q-8.5 0 -15 6t-6.5 15t6.5 15t15 6t15 -6t6.5 -15t-6.5 -15 t-15 -6zM245.5 373q-10.5 0 -10.5 11t10.5 11t10.5 -11t-10.5 -11zM10.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM160 11q11 0 11 -11t-11 -11t-11 11t11 11zM160 373q-11 0 -11 11t11 11t11 -11t-11 -11zM160 299q-9 0 -15 6t-6 15t6 15t15 6t15 -6 t6 -15t-6 -15t-15 -6zM160 181q13 0 22.5 -9t9.5 -22.5t-9.5 -23t-22.5 -9.5t-22.5 9.5t-9.5 23t9.5 22.5t22.5 9zM330.5 171q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM330.5 85q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15 t15 6zM330.5 256q8.5 0 15 -6.5t6.5 -15t-6.5 -15t-15 -6.5t-15 6.5t-6.5 15t6.5 15t15 6.5zM330.5 341q8.5 0 15 -6t6.5 -15t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM394.5 160q10.5 0 10.5 -10.5t-10.5 -10.5t-10.5 10.5t10.5 10.5zM245.5 85q8.5 0 15 -6t6.5 -15 t-6.5 -15t-15 -6t-15 6t-6.5 15t6.5 15t15 6zM245.5 11q10.5 0 10.5 -11t-10.5 -11t-10.5 11t10.5 11zM160 267q13 0 22.5 -9.5t9.5 -23t-9.5 -22.5t-22.5 -9t-22.5 9t-9.5 22.5t9.5 23t22.5 9.5zM160 85q9 0 15 -6t6 -15t-6 -15t-15 -6t-15 6t-6 15t6 15t15 6zM245.5 181 q13.5 0 22.5 -9t9 -22.5t-9 -23t-22.5 -9.5t-23 9.5t-9.5 23t9.5 22.5t23 9zM245.5 267q13.5 0 22.5 -9.5t9 -23t-9 -22.5t-22.5 -9t-23 9t-9.5 22.5t9.5 23t23 9.5z" />
-<glyph unicode="&#xf36a;" horiz-adv-x="320" d="M107 405q88 0 150.5 -62.5t62.5 -150.5t-62.5 -150.5t-150.5 -62.5q-57 0 -107 28q49 29 78 78t29 107t-29 107t-78 78q50 28 107 28z" />
-<glyph unicode="&#xf36b;" horiz-adv-x="277" d="M64 405q88 0 150.5 -62.5t62.5 -150.5t-62.5 -150.5t-150.5 -62.5q-33 0 -64 9q66 21 107.5 77t41.5 127t-41.5 127t-107.5 77q31 9 64 9z" />
-<glyph unicode="&#xf36c;" horiz-adv-x="483" d="M412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5q-28 0 -53 -12q33 -15 54 -46.5t21 -69.5t-21 -69.5t-54 -46.5q25 -12 53 -12z" />
-<glyph unicode="&#xf36d;" horiz-adv-x="483" d="M412 121v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100l71 -71zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5z" />
-<glyph unicode="&#xf36e;" horiz-adv-x="483" d="M412 121v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100l71 -71zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5v-256z" />
-<glyph unicode="&#xf36f;" horiz-adv-x="483" d="M412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM241 64q53 0 90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5t-90.5 -37.5t-37.5 -90.5t37.5 -90.5t90.5 -37.5zM241.5 277q35.5 0 60.5 -25t25 -60t-25 -60 t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25z" />
-<glyph unicode="&#xf370;" horiz-adv-x="483" d="M217 178l24 78l25 -78h-49zM412 263l71 -71l-71 -71v-100h-100l-71 -70l-70 70h-100v100l-71 71l71 71v100h100l70 70l71 -70h100v-100zM290 107h41l-68 192h-43l-68 -192h40l15 42h68z" />
-<glyph unicode="&#xf371;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384zM149 107v53l-32 32l32 32v53h54l32 32l32 -32h53v-53l32 -32l-32 -32v-53h-53l-32 -32l-32 32 h-54zM235 256v-128q26 0 45 18.5t19 45.5t-19 45.5t-45 18.5z" />
-<glyph unicode="&#xf372;" horiz-adv-x="384" d="M384 341v-140l-64 64l-85 -86l-86 86l-85 -86l-64 65v97q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5zM320 204l64 -64v-97q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v140l64 -64l85 86l86 -86z" />
-<glyph unicode="&#xf373;" horiz-adv-x="384" d="M192 277q35 0 60 -25t25 -60t-25 -60t-60 -25t-60 25t-25 60t25 60t60 25zM43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85 h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85z" />
-<glyph unicode="&#xf374;" horiz-adv-x="384" d="M43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM192 277q35 0 60 -25 t25 -60t-25 -60t-60 -25t-60 25t-25 60t25 60t60 25zM192 149q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5t-30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5z" />
-<glyph unicode="&#xf375;" horiz-adv-x="384" d="M149 384v43h43v-470h-43v43h-106q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h106zM149 64v128l-106 -128h106zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-106v192l106 -128v277h-106v43h106z" />
-<glyph unicode="&#xf376;" horiz-adv-x="384" d="M341 320q18 0 30.5 -12.5t12.5 -30.5v-170q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v170q0 18 12.5 30.5t30.5 12.5h298zM341 107v170h-298v-170h298z" />
-<glyph unicode="&#xf377;" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM341 64v256h-298v-256h298z" />
-<glyph unicode="&#xf378;" horiz-adv-x="384" d="M341 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h298zM341 85v214h-298v-214h298z" />
-<glyph unicode="&#xf379;" horiz-adv-x="384" d="M341 299q18 0 30.5 -12.5t12.5 -30.5v-128q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v128q0 18 12.5 30.5t30.5 12.5h298zM341 128v128h-298v-128h298z" />
-<glyph unicode="&#xf37a;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298z" />
-<glyph unicode="&#xf37b;" horiz-adv-x="384" d="M0 341q0 18 12.5 30.5t30.5 12.5h85v-43h-85v-85h-43v85zM43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85z" />
-<glyph unicode="&#xf37c;" horiz-adv-x="384" d="M341 341q18 0 30.5 -12.5t12.5 -29.5v-214q0 -17 -12.5 -29.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 29.5v214q0 17 12.5 29.5t30.5 12.5h298zM341 85v214h-298v-214h298z" />
-<glyph unicode="&#xf37d;" horiz-adv-x="299" d="M256 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h213zM256 43v298h-213v-298h213z" />
-<glyph unicode="&#xf37e;" horiz-adv-x="341" d="M299 363q17 0 29.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-29.5 -12.5h-256q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h256zM299 64v256h-256v-256h256z" />
-<glyph unicode="&#xf37f;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM53 288v-32h43v-43h32v43h43v32h-43v43h-32v-43h-43zM341 43v298l-298 -298h298zM299 85h-107v32h107v-32z" />
-<glyph unicode="&#xf380;" d="M277 85h-42v43h42v43h43v-43h43v-43h-43v-42h-43v42zM384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM64 341v-42h128v42h-128zM384 21v342l-341 -342h341z" />
-<glyph unicode="&#xf381;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-149v-128l-149 -170h149v170z" />
-<glyph unicode="&#xf382;" horiz-adv-x="384" d="M43 128v-85h85v-43h-85q-18 0 -30.5 12.5t-12.5 30.5v85h43zM43 341v-85h-43v85q0 18 12.5 30.5t30.5 12.5h85v-43h-85zM341 384q18 0 30.5 -12.5t12.5 -30.5v-85h-43v85h-85v43h85zM341 43v85h43v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-85v43h85zM192 256q27 0 45.5 -18.5 t18.5 -45.5t-18.5 -45.5t-45.5 -18.5t-45.5 18.5t-18.5 45.5t18.5 45.5t45.5 18.5z" />
-<glyph unicode="&#xf383;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-299q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v299q0 18 12.5 30.5t30.5 12.5h85l85 85l86 -85h85zM384 21v299h-96l-74 75l-75 -75h-96v-299h341zM341 277h-256v-213h256v213z" />
-<glyph unicode="&#xf384;" horiz-adv-x="425" d="M191 361q-46 -5 -83 -34l-31 30q50 41 114 47v-43zM347 357l-30 -30q-38 29 -83 34v43q63 -6 113 -47zM381 213q-5 46 -34 84l30 30q41 -50 48 -114h-44zM78 297q-29 -38 -35 -84h-43q6 64 47 114zM43 171q6 -46 35 -83l-31 -31q-41 50 -47 114h43zM276 192 q0 -27 -18.5 -45.5t-45 -18.5t-45.5 18.5t-19 45.5t19 45.5t45.5 18.5t45 -18.5t18.5 -45.5zM347 87q29 38 34 83h44q-7 -63 -48 -113zM234 23q46 6 83 34l30 -30q-50 -41 -113 -47v43zM77 27l31 30q37 -29 83 -34v-43q-64 6 -114 47z" />
-<glyph unicode="&#xf385;" horiz-adv-x="384" d="M171 256h42v-43h-42v43zM128 213h43v-42h-43v42zM213 213h43v-42h-43v42zM256 256h43v-43h-43v43zM85 256h43v-43h-43v43zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298z M128 64v43h-43v-43h43zM213 64v43h-42v-43h42zM299 64v43h-43v-43h43zM341 213v128h-298v-128h42v-42h-42v-43h42v43h43v-43h43v43h42v-43h43v43h43v-43h42v43h-42v42h42z" />
-<glyph unicode="&#xf386;" horiz-adv-x="341" d="M128 192q18 0 30.5 -12.5t12.5 -30t-12.5 -30t-30.5 -12.5t-30.5 12.5t-12.5 30t12.5 30t30.5 12.5zM42.5 277q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM42.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5 t-12.5 30.5t12.5 30.5t30 12.5zM298.5 277q-17.5 0 -30 12.5t-12.5 30.5t12.5 30.5t30 12.5t30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5zM213.5 107q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5zM298.5 192q17.5 0 30 -12.5 t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM213.5 277q17.5 0 30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5t-12.5 30t12.5 30t30 12.5zM128 363q18 0 30.5 -12.5t12.5 -30.5t-12.5 -30.5t-30.5 -12.5t-30.5 12.5t-12.5 30.5t12.5 30.5 t30.5 12.5z" />
-<glyph unicode="&#xf387;" horiz-adv-x="384" d="M85 64v256h43v-256h-43zM171 -21v426h42v-426h-42zM0 149v86h43v-86h-43zM256 64v256h43v-256h-43zM341 235h43v-86h-43v86z" />
-<glyph unicode="&#xf388;" horiz-adv-x="431" d="M343 128h-8l-24 23v105h75q13 0 22.5 -9.5t9.5 -22.5v-21q0 -10 -5.5 -18.5t-13.5 -11.5l19 -45h-32l-19 43h-24v-43zM343 224v-21h43v21h-43zM247 224h-8l-32 32h40q13 0 22.5 -9.5t9.5 -22.5v-41l-32 32v9zM173 245l258 -256l-24 -23l-162 162h-72v73l-32 32v-105h-32 v53h-43v-53h-32v128h32v-43h43v43h8l-117 117l23 22z" />
-<glyph unicode="&#xf389;" horiz-adv-x="469" d="M341 320q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5zM85.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM85.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5 t-12.5 -30.5t12.5 -30.5t30 -12.5z" />
-<glyph unicode="&#xf38a;" horiz-adv-x="469" d="M85.5 277q35.5 0 60.5 -25t25 -60t-25 -60t-60.5 -25t-60.5 25t-25 60t25 60t60.5 25zM341 320q53 0 90.5 -37.5t37.5 -90.5t-37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5t37.5 90.5t90.5 37.5zM341.5 107q35.5 0 60.5 25t25 60t-25 60t-60.5 25t-60.5 -25t-25 -60 t25 -60t60.5 -25z" />
-<glyph unicode="&#xf38b;" horiz-adv-x="384" d="M384 203q0 -19 -19 -30l19 -45h-32l-19 43h-24v-43h-32v128h75q13 0 22.5 -9.5t9.5 -22.5v-21zM352 203v21h-43v-21h43zM75 213v43h32v-128h-32v53h-43v-53h-32v128h32v-43h43zM213 256q13 0 22.5 -9.5t9.5 -22.5v-64q0 -13 -9.5 -22.5t-22.5 -9.5h-74v128h74zM213 160 v64h-42v-64h42z" />
-<glyph unicode="&#xf38c;" horiz-adv-x="361" d="M31 139v128h299v-128h-299zM159 436h43v-63h-43v63zM330 383l31 -30l-39 -38l-30 30zM202 -31h-43v63h43v-63zM361 52l-31 -30l-38 39l30 30zM0 353l30 30l38 -38l-30 -30zM30 22l-30 31l38 38l30 -30z" />
-<glyph unicode="&#xf38d;" horiz-adv-x="384" d="M149 384q0 -30 -11 -57l-34 34q3 11 3 23h42zM0 357l27 27l357 -357l-27 -27l-61 61q-19 -28 -19 -61h-42q0 51 31 91l-31 30q-43 -52 -43 -121h-43q0 86 56 152l-53 53q-66 -56 -152 -56v43q68 0 122 43l-31 31q-40 -31 -91 -31v42q33 0 61 19zM235 384q0 -64 -34 -120 l-31 31q22 42 22 89h43zM361 104l-34 34q28 11 57 11v-42q-12 0 -23 -3zM264 201q56 34 120 34v-43q-47 0 -89 -22z" />
-<glyph unicode="&#xf38e;" horiz-adv-x="384" d="M64 384q0 -27 -18.5 -45.5t-45.5 -18.5v64h64zM235 384q0 -97 -69 -166t-166 -69v43q80 0 136 56t56 136h43zM149 384q0 -62 -43.5 -105.5t-105.5 -43.5v42q44 0 75.5 31.5t31.5 75.5h42zM149 0q0 97 69 166t166 69v-43q-80 0 -136 -56t-56 -136h-43zM320 0 q0 27 18.5 45.5t45.5 18.5v-64h-64zM235 0q0 62 43.5 105.5t105.5 43.5v-42q-44 0 -75.5 -31.5t-31.5 -75.5h-42z" />
-<glyph unicode="&#xf38f;" horiz-adv-x="469" d="M234.5 235q61.5 0 105.5 -44t44 -106h-43q0 44 -31 75.5t-75 31.5t-75.5 -31.5t-31.5 -75.5h-43q0 62 44 106t105.5 44zM235 320q97 0 165.5 -69t68.5 -166h-42q0 80 -56.5 136t-136 56t-135.5 -56t-56 -136h-43q0 97 69 166t166 69z" />
-<glyph unicode="&#xf390;" d="M235 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM213 405q88 0 151 -62.5t63 -150.5v-171q0 -17 -12.5 -29.5t-30.5 -12.5h-171q-88 0 -150.5 62.5t-62.5 150.5t62.5 150.5t150.5 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121 t50 -121t120.5 -50z" />
-<glyph unicode="&#xf391;" d="M384 308q-84 -25 -171 -24q-87 0 -170 24v-232q83 24 170 24t171 -24v232zM415 363q12 0 12 -14v-314q0 -14 -12 -14q-4 0 -7 2q-94 35 -195 35t-194 -35q-4 -2 -7 -2q-12 0 -12 14v314q0 14 12 14q3 0 7 -2q94 -35 194 -35q101 0 195 35q3 2 7 2z" />
-<glyph unicode="&#xf392;" horiz-adv-x="342" d="M340 -3l2 -6q0 -12 -14 -12h-315q-13 0 -13 12q0 3 1 6q35 95 35 195t-35 195q-1 3 -1 6q0 12 13 12h315q13 0 13 -12q0 -3 -1 -6q-35 -95 -35 -195q0 -101 35 -195zM54 21h233q-25 84 -25 171t25 171h-233q25 -84 25 -171t-25 -171z" />
-<glyph unicode="&#xf393;" d="M213.5 320q-75.5 0 -155.5 -14q-15 -57 -15 -114t15 -114q80 -14 155.5 -14t155.5 14q15 57 15 114t-15 114q-80 14 -155.5 14zM213 363q83 0 170 -16l20 -3l5 -19q19 -67 19 -133t-19 -133l-5 -19l-20 -3q-87 -16 -170 -16t-169 16l-20 3l-5 19q-19 67 -19 133t19 133 l5 19l20 3q87 16 169 16z" />
-<glyph unicode="&#xf394;" horiz-adv-x="469" d="M427 128h42v-43h-42v43zM427 213h42v-42h-42v42zM469 43q0 -16 -13 -29.5t-29 -13.5v43h42zM256 384h43v-43h-43v43zM427 299h42v-43h-42v43zM427 384q16 0 29 -13.5t13 -29.5h-42v43zM0 299h43v-43h-43v43zM341 384h43v-43h-43v43zM341 43h43v-43h-43v43zM43 384v-43 h-43q0 16 13.5 29.5t29.5 13.5zM171 384h42v-43h-42v43zM85 384h43v-43h-43v43zM0 213h299v-213h-256q-18 0 -30.5 12.5t-12.5 30.5v170zM43 43h213l-68 91l-54 -69l-38 46z" />
-<glyph unicode="&#xf395;" horiz-adv-x="469" d="M469 128v-43h-42v43h42zM469 213v-42h-42v42h42zM469 43q0 -16 -13 -29.5t-29 -13.5v43h42zM299 384v-43h-43v43h43zM469 299v-43h-42v43h42zM427 384q16 0 29 -13.5t13 -29.5h-42v43zM43 0q-18 0 -30.5 12.5t-12.5 30.5v85h213v-128h-170zM43 299v-43h-43v43h43zM299 43 v-43h-43v43h43zM384 384v-43h-43v43h43zM384 43v-43h-43v43h43zM43 384v-43h-43q0 16 13.5 29.5t29.5 13.5zM43 213v-42h-43v42h43zM213 384v-43h-42v43h42zM128 384v-43h-43v43h43z" />
-<glyph unicode="&#xf396;" horiz-adv-x="469" d="M384 299v-128h-171v128h171zM427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384z" />
-<glyph unicode="&#xf397;" horiz-adv-x="384" d="M149 277l107 -85l-107 -85v170zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM341 43v298h-298v-298h298z" />
-<glyph unicode="&#xf398;" horiz-adv-x="384" d="M352 382q24 -6 31 -30l-351 -350q-11 3 -19 11t-11 19zM189 384h61l-250 -250v61zM43 384h42l-85 -85v42q0 18 12.5 30.5t30.5 12.5zM341 0h-42l85 85v-42q0 -18 -13 -30q-12 -13 -30 -13zM134 0l250 250v-61l-189 -189h-61z" />
-<glyph unicode="&#xf399;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 23v338q-64 -8 -106.5 -56t-42.5 -113t43 -113t106 -56zM235 361v-20h61q-29 16 -61 20zM235 299v-22h126q-7 12 -15 22h-111zM235 235v-22h148 q-2 9 -5 22h-143zM235 23q32 4 61 20h-61v-20zM346 85q8 10 15 22h-126v-22h111zM378 149q3 13 5 22h-148v-22h143z" />
-<glyph unicode="&#xf39a;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM234.5 64q70.5 0 120.5 37.5t50 90.5t-50 90.5t-120.5 37.5t-120.5 -37.5t-50 -90.5t50 -90.5t120.5 -37.5z" />
-<glyph unicode="&#xf39b;" horiz-adv-x="508" d="M146 178l25 78l24 -78h-49zM469 299h39l-44 -192h-37l-32 130l-32 -130h-38l-2 9q-21 -43 -62 -69t-90 -26q-71 0 -121 50t-50 121t50 121t121 50q81 0 133 -64h16l26 -135l32 135h34l32 -135zM220 107h40l-68 192h-43l-68 -192h41l15 42h68z" />
-<glyph unicode="&#xf39c;" horiz-adv-x="256" d="M128 269l-98 -98l-30 30l128 128l128 -128l-30 -30zM0 64v43h256v-43h-256z" />
-<glyph unicode="&#xf39d;" horiz-adv-x="299" d="M0 85h299v-42h-299v42zM149 299l143 -171h-285z" />
-<glyph unicode="&#xf39e;" horiz-adv-x="341" d="M128 21v342h85v-342h-85zM0 21v171h85v-171h-85zM256 256h85v-235h-85v235z" />
-<glyph unicode="&#xf39f;" horiz-adv-x="373" d="M0 64v256l181 -128zM192 320l181 -128l-181 -128v256z" />
-<glyph unicode="&#xf3a0;" horiz-adv-x="373" d="M181 64l-181 128l181 128v-256zM192 192l181 128v-256z" />
-<glyph unicode="&#xf3a1;" horiz-adv-x="341" d="M0 170.5q0 70.5 50 120.5t121 50v86l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5zM145 107h-17v70l-21 -6v15l38 12h2v-91h-2zM239 145q0 -13 -2 -17l-7 -13 q-6 -6 -10 -6q-2 0 -6.5 -1t-6.5 -1q-9 0 -13 2q-2 1 -5 3t-6 3q-2 1 -6 13q-2 6 -2 17v15q0 13 2 17l6 13q7 6 11 6q2 0 6.5 1t6.5 1q8 0 13 -2q2 -1 5 -3t5 -3q3 -1 7 -13q2 -6 2 -17v-15zM222 162v11q-2 4 -2 6l-5 4q-2 3 -6 3t-6 -3l-5 -4q-2 -4 -2 -6v-43q2 -4 2 -6 t2 -3t3 -2q2 -2 6 -2t6 2l5 5q2 4 2 6v32z" />
-<glyph unicode="&#xf3a2;" horiz-adv-x="341" d="M119 160h9q6 0 10.5 4.5t4.5 8.5v4q-2 2 -2 4t-4 2h-11q-2 -2 -4.5 -2t-2.5 -4v-4h-21q0 6 2 10.5t6.5 8.5t8.5 4q1 0 5.5 1t5.5 1q8 0 13 -2q2 -1 5 -2t5 -2q3 -1 7 -9q2 -4 2 -10v-7q-2 -4 -2 -6q0 -4 -5 -4q-2 0 -6 -5q9 -4 11 -8q4 -9 4 -13q0 -8 -2 -11q-1 -1 -3 -4 t-4 -4q-4 -4 -10 -4q-2 0 -6.5 -1t-6.5 -1q-9 0 -11 2q-1 1 -5 2t-5 2q-3 1 -7 8q-2 5 -2 13h17v-4q2 -2 2 -4t5 -2h10q2 2 4.5 2t2.5 4v11q-2 2 -2 4t-5 2h-13v15zM241 145q0 -13 -2 -17l-6 -13q-7 -6 -11 -6q-2 0 -6.5 -1t-6.5 -1q-8 0 -13 2q-2 1 -5 3t-5 3q-3 1 -7 13 q-2 6 -2 17v15q0 13 2 17l7 13q6 6 10 6q2 0 6.5 1t6.5 1q9 0 13 -2q2 -1 5 -3t6 -3q2 -1 6 -13q2 -6 2 -17v-15zM222 162v11q-2 4 -2 6l-5 4q-2 3 -6 3t-6 -3l-5 -4q-2 -4 -2 -6v-43q2 -4 2 -6l5 -5q2 -2 6 -2t6 2l5 5q2 4 2 6v32zM0 170.5q0 70.5 50 120.5t121 50v86 l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5z" />
-<glyph unicode="&#xf3a3;" horiz-adv-x="341" d="M0 170.5q0 70.5 50 120.5t121 50v86l106 -107l-106 -107v86q-53 0 -90.5 -38t-37.5 -90.5t37.5 -90t90 -37.5t90.5 37.5t38 90.5h42q0 -71 -50 -121t-120.5 -50t-120.5 50t-50 120.5zM143 151l4 47h51v-15h-36l-2 -19q2 0 2 2q0 1 1 1t1 2h5h4q8 0 10 -3q2 -1 5 -3t4 -3 q2 -2 6 -11q3 -4 3 -12.5t-3 -10.5q0 -1 -2 -4.5t-4 -6.5q-2 -2 -11 -6q-4 -2 -12.5 -2t-10.5 2q-1 1 -5 2t-6 2q-3 1 -6 9q-2 4 -2 10h17q0 -4 4 -8q2 -2 9 -2q4 0 6 2l4 4q2 4 2 6v13l-2 4l-4 5q-4 2 -6 2h-5q-2 0 -4 -2q-1 -1 -1.5 -1t-0.5 -1l-2 -3h-13z" />
-<glyph unicode="&#xf3a4;" horiz-adv-x="384" d="M299 21q17 0 29.5 12.5t12.5 30.5h43q0 -35 -25 -60t-60 -25q-19 0 -35 7q-41 21 -59 76q-4 14 -12 22.5t-24 21.5q-41 31 -61 67q-23 41 -23 83q0 63 43.5 106t106.5 43t106 -43t43 -106h-43q0 45 -31 76t-75.5 31t-75.5 -31t-31 -76q0 -31 17 -63q16 -27 50 -54 q13 -10 20 -16t16.5 -19t14.5 -29q13 -38 36 -50q8 -4 17 -4zM99 392q-56 -56 -56 -136q0 -79 56 -136l-30 -30q-69 69 -69 166t69 166zM181 256q0 22 16 37.5t38 15.5t37.5 -15.5t15.5 -37.5t-15.5 -37.5t-37.5 -15.5t-38 15.5t-16 37.5z" />
-<glyph unicode="&#xf3a5;" d="M149 107v170h43v-170h-43zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50zM235 107v170h42v-170h-42z" />
-<glyph unicode="&#xf3a6;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM192 107v170h-43v-170h43zM277 107v170h-42v-170h42z" />
-<glyph unicode="&#xf3a7;" horiz-adv-x="256" d="M0 43v298h85v-298h-85zM171 341h85v-298h-85v298z" />
-<glyph unicode="&#xf3a8;" d="M171 96v192l128 -96zM213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM213.5 21q70.5 0 120.5 50t50 121t-50 121t-120.5 50t-120.5 -50t-50 -121t50 -121t120.5 -50z" />
-<glyph unicode="&#xf3a9;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM171 96l128 96l-128 96v-192z" />
-<glyph unicode="&#xf3aa;" horiz-adv-x="235" d="M0 341l235 -149l-235 -149v298z" />
-<glyph unicode="&#xf3ab;" horiz-adv-x="405" d="M256 320v-43h-256v43h256zM256 235v-43h-256v43h256zM0 107v42h171v-42h-171zM299 320h106v-43h-64v-192q0 -26 -18.5 -45t-45 -19t-45.5 19t-19 45.5t19 45t45 18.5q11 0 22 -4v175z" />
-<glyph unicode="&#xf3ac;" d="M256 235v-43h-256v43h256zM256 320v-43h-256v43h256zM341 149h86v-42h-86v-86h-42v86h-86v42h86v86h42v-86zM0 107v42h171v-42h-171z" />
-<glyph unicode="&#xf3ad;" horiz-adv-x="384" d="M85 299v-86h-42v128h256v64l85 -85l-85 -85v64h-214zM299 85v86h42v-128h-256v-64l-85 85l85 85v-64h214zM213 128h-32v85h-32v22l43 21h21v-128z" />
-<glyph unicode="&#xf3ae;" horiz-adv-x="384" d="M85 299v-86h-42v128h256v64l85 -85l-85 -85v64h-214zM299 85v86h42v-128h-256v-64l-85 85l85 85v-64h214z" />
-<glyph unicode="&#xf3af;" horiz-adv-x="341" d="M239 124q0 -20 -8 -30t-23 -10t-23 10t-8 29v17q0 19 8 29t23 10t23 -10t8 -28v-17zM221 142q0 12 -3 17t-10 5t-10 -5t-3 -15v-23q0 -11 3 -16.5t10 -5.5t10 5t3 16v22zM147 85h-19v71l-22 -7v15l39 14h2v-93zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50 t-120.5 50t-50 120h43q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" />
-<glyph unicode="&#xf3b0;" horiz-adv-x="341" d="M239 123q0 -20 -8 -30t-23.5 -10t-23.5 10t-8 29v17q0 20 8 30t23.5 10t23.5 -10t8 -29v-17zM221 142q0 11 -3.5 16.5t-10 5.5t-9.5 -5t-3 -16v-23q0 -11 3 -16.5t10 -5.5t10 5t3 16v23zM120 139h10q7 0 10 3.5t3 9.5t-3 9t-9 3t-9.5 -3t-3.5 -8h-18q0 8 4 13.5t11 9 t15 3.5q15 0 23.5 -7t8.5 -20q0 -6 -4 -11.5t-10 -8.5q8 -3 11.5 -8.5t3.5 -13.5q0 -12 -9 -19.5t-24 -7.5q-14 0 -23 7t-9 20h19q0 -6 4 -9t10 -3t10 3.5t4 8.5q0 14 -16 14h-9v15zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50t-120.5 50t-50 120h43 q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" />
-<glyph unicode="&#xf3b1;" horiz-adv-x="341" d="M142 131l5 46h51v-15h-36l-2 -20q6 4 13 4q13 0 20.5 -8t7.5 -23q0 -8 -4 -15t-10.5 -11t-16.5 -4q-8 0 -15 3.5t-11 9.5t-4 13h18q0 -5 3.5 -8t8.5 -3q6 0 9.5 4t3.5 12t-4 12t-11 4q-6 0 -10 -3l-2 -2zM171 320q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50 t-120.5 50t-50 120h43q0 -52 37.5 -90t90 -38t90.5 38t38 90.5t-38 90t-90 37.5v-85l-107 107l107 106v-85z" />
-<glyph unicode="&#xf3b2;" horiz-adv-x="341" d="M171 341q70 0 120 -50t50 -120.5t-50 -120.5t-120.5 -50t-120.5 50t-50 121h43q0 -53 37.5 -90.5t90.5 -37.5t90.5 37.5t37.5 90.5t-37.5 90.5t-90.5 37.5v-86l-107 107l107 107v-86z" />
-<glyph unicode="&#xf3b3;" horiz-adv-x="341" d="M141 252l-31 -30l-110 111l30 30zM224 363h117v-118l-43 44l-268 -268l-30 30l268 268zM231 162l67 -67l43 44v-118h-117l44 44l-67 67z" />
-<glyph unicode="&#xf3b4;" horiz-adv-x="256" d="M0 64v256l181 -128zM213 320h43v-256h-43v256z" />
-<glyph unicode="&#xf3b5;" horiz-adv-x="256" d="M0 320h43v-256h-43v256zM75 192l181 128v-256z" />
-<glyph unicode="&#xf3b6;" horiz-adv-x="256" d="M0 320h256v-256h-256v256z" />
-<glyph unicode="&#xf3b7;" d="M384 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h341zM123 102q-38 37 -38 90t38 91l-30 30q-50 -50 -50 -121t50 -121zM213.5 107q35.5 0 60.5 25t25 60t-25 60t-60.5 25 t-60.5 -25t-25 -60t25 -60t60.5 -25zM334 71q50 50 50 121t-50 121l-30 -31q37 -37 37 -90t-37 -91zM213.5 235q17.5 0 30 -12.5t12.5 -30.5t-12.5 -30.5t-30 -12.5t-30 12.5t-12.5 30.5t12.5 30.5t30 12.5z" />
-<glyph unicode="&#xf3b8;" horiz-adv-x="384" d="M0 85h128v-42h-128v42zM0 341h213v-42h-213v42zM213 0h-42v128h42v-43h171v-42h-171v-43zM85 256h43v-128h-43v43h-85v42h85v43zM384 171h-213v42h213v-42zM256 256v128h43v-43h85v-42h-85v-43h-43z" />
-<glyph unicode="&#xf3b9;" horiz-adv-x="288" d="M288 192q0 -28 -14.5 -51t-38.5 -35v172q24 -12 38.5 -35t14.5 -51zM0 256h85l107 107v-342l-107 107h-85v128z" />
-<glyph unicode="&#xf3ba;" horiz-adv-x="192" d="M0 256h85l107 107v-342l-107 107h-85v128z" />
-<glyph unicode="&#xf3bb;" horiz-adv-x="384" d="M288 192q0 -6 -1 -13l-52 52v47q24 -12 38.5 -35t14.5 -51zM341 192q0 50 -30 89.5t-76 53.5v44q64 -15 106.5 -67t42.5 -120q0 -47 -22 -89l-32 33q11 27 11 56zM27 384l165 -165l192 -192l-27 -27l-44 44q-35 -29 -78 -39v44q25 8 48 25l-91 91v-144l-107 107h-85v128 h101l-101 101zM192 363v-90l-45 45z" />
-<glyph unicode="&#xf3bc;" horiz-adv-x="384" d="M0 256h85l107 107v-342l-107 107h-85v128zM288 192q0 -28 -14.5 -51t-38.5 -35v172q24 -12 38.5 -35t14.5 -51zM235 379q64 -15 106.5 -67t42.5 -120t-42.5 -120t-106.5 -67v44q46 14 76 53.5t30 89.5t-30 89.5t-76 53.5v44z" />
-<glyph unicode="&#xf3bd;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM235 85v214h-86v-43h43v-171h43z" />
-<glyph unicode="&#xf3be;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 213v43q0 18 -12.5 30.5t-30.5 12.5h-85v-43h85v-43h-42q-18 0 -30.5 -12.5t-12.5 -29.5v-86h128v43h-85v43h42 q18 0 30.5 12.5t12.5 29.5z" />
-<glyph unicode="&#xf3bf;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 224v32q0 18 -12.5 30.5t-30.5 12.5h-85v-43h85v-43h-42v-42h42v-43h-85v-43h85q18 0 30.5 12.5t12.5 30.5v32 q0 13 -9.5 22.5t-22.5 9.5q13 0 22.5 9.5t9.5 22.5z" />
-<glyph unicode="&#xf3c0;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 85v214h-43v-86h-42v86h-43v-128h85v-86h43z" />
-<glyph unicode="&#xf3c1;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-128v-128h85v-43h-85v-43h85q18 0 30.5 12.5t12.5 30.5v43q0 17 -12.5 29.5t-30.5 12.5h-42v43h85z" />
-<glyph unicode="&#xf3c2;" horiz-adv-x="384" d="M171 128v43h42v-43h-42zM341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-85q-18 0 -30.5 -12.5t-12.5 -30.5v-128q0 -18 12.5 -30.5t30.5 -12.5h42 q18 0 30.5 12.5t12.5 30.5v43q0 17 -12.5 29.5t-30.5 12.5h-42v43h85z" />
-<glyph unicode="&#xf3c3;" horiz-adv-x="320" d="M0 213h171v-42h-171v42zM320 64h-43v227l-64 -22v36l101 36h6v-277z" />
-<glyph unicode="&#xf3c4;" horiz-adv-x="405" d="M278 100h127v-36h-184v32l89 97q10 11 19 22q7 8 12 18q4 7 6 14q2 8 2 14q0 9 -3 18q-3 8 -8 13q-5 7 -12.5 10t-17.5 3q-12 0 -20 -4q-9 -4 -15 -10q-6 -8 -8 -16q-3 -9 -3 -19h-46q1 17 6 32q6 16 18 28t29 19q18 6 40 6q20 0 36 -5q17 -6 27 -15q11 -10 17 -24t6 -31 q0 -13 -4 -25q-5 -12 -12 -25q-8 -13 -17 -25q-13 -15 -23 -25zM0 213h171v-42h-171v42z" />
-<glyph unicode="&#xf3c5;" horiz-adv-x="341" d="M128 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43zM341 64h-42v227l-64 -22v36l100 36h6v-277z" />
-<glyph unicode="&#xf3c6;" d="M300 100h127v-36h-184v32l89 97q10 11 18 22q7 8 12 18q4 7 6 14q2 8 2 14q0 9 -3 18q-3 8 -8 13q-5 7 -12 10t-17 3q-12 0 -21 -4t-14 -10q-6 -8 -9 -16q-2 -9 -3 -19h-45q0 17 6 32q6 16 17.5 28t29.5 19q17 6 39 6q20 0 37 -5q16 -6 27 -15q10 -10 16 -24t6 -31 q0 -13 -4 -25t-12 -25q-7 -13 -17 -25q-13 -15 -22 -25zM128 299v-86h85v-42h-85v-86h-43v86h-85v42h85v86h43z" />
-<glyph unicode="&#xf3c7;" horiz-adv-x="512" d="M0 283l101 37h6v-256h-43v205l-64 -22v36zM507 141q5 -8 5 -21t-5 -23q-6 -11 -15 -18q-10 -7 -24 -11q-13 -4 -30 -4q-20 0 -34.5 5t-24.5 14q-9 9 -14.5 20t-5.5 22h41q0 -8 3 -14q4 -6 9 -9q5 -4 12 -5q6 -2 14 -2q16 0 24.5 6t8.5 17q0 4 -1 8q-2 4 -6 7q-5 4 -12 6 q-8 3 -20 6q-16 3 -28 8t-20 11q-9 6 -14 15t-5 21t5 21q5 11 14 18.5t23 12.5q13 4 29 4q18 0 32 -5t23 -12q10 -8 15 -19t5 -23h-42q0 4 -2 10t-6 9q-5 4 -10 6q-7 3 -14.5 3t-13.5 -2t-10 -5q-3 -3 -6 -8q-1 -4 -1 -8.5t1.5 -8t5.5 -6.5t12 -5q8 -3 19 -5q15 -4 28 -8 q12 -5 22 -12q9 -6 13 -16zM295 298q11 -13 16 -34q6 -21 6 -51v-41q0 -30 -6 -51q-5 -21 -16 -34q-11 -14 -26 -19q-15 -6 -34 -6q-18 0 -34 6q-15 5 -26 19q-11 12 -17 34q-6 20 -6 51v41q0 29 6 51q6 21 16.5 34t26 18.5t34.5 5.5t34 -5.5t26 -18.5zM275 166v54 q0 18 -2 32q-3 13 -8 21t-13 11.5t-17 3.5q-10 0 -18 -3q-7 -4 -12.5 -12t-8.5 -21q-2 -13 -2 -33v-53q0 -20 2 -33q3 -13 9 -21q5 -9 12.5 -12.5t17.5 -3.5t17.5 3.5t12.5 12t7.5 22t2.5 32.5z" />
-<glyph unicode="&#xf3c8;" horiz-adv-x="361" d="M158 171q5 -7 8 -16q2 -9 2 -18q0 -18 -6.5 -32t-17.5 -23q-12 -10 -27 -15q-16 -5 -34 -5q-16 0 -31 4.5t-27 13.5t-18 23q-7 13 -7 31h42q0 -9 3 -16t8.5 -12t13.5 -7q7 -3 17 -3q20 0 31 10q11 11 11 31q0 10 -3 18t-10 13q-5 5 -14 8q-9 2 -20 2h-25v33h25q11 0 19 3 t13 8q6 5 8.5 12t2.5 16q0 18 -9 28q-10 10 -29 10q-9 0 -16 -2.5t-12 -6.5q-5 -5 -8 -11.5t-3 -14.5h-43q0 15 7 27q5 12 16 22t26 15q14 5 32 5t32.5 -4t25.5 -13.5t17 -22.5q6 -14 6 -32q0 -8 -2 -15t-8 -15q-4 -7 -12 -14q-6 -6 -17 -11q12 -4 20 -10t13 -14zM356 141 q4 -8 5 -21q0 -13 -5 -23q-6 -11 -16 -18q-9 -7 -23 -11t-31 -4q-19 0 -33.5 5t-24.5 14t-15 20t-5 22h40q0 -8 4 -14t9 -9q5 -4 12 -5q6 -2 13 -2q17 0 25.5 6t8.5 17q0 4 -2 8q-1 4 -5 7q-5 4 -13 6q-8 3 -20 6q-15 3 -27 8q-13 5 -21 11q-9 7 -14 15q-4 10 -4 21 q0 12 4 21q6 11 15 18.5t22 12.5q13 4 30 4q18 0 31 -5q14 -5 23 -12q10 -8 15 -19t5 -23h-41q0 4 -2 10q-3 6 -7 9q-4 4 -10 6q-6 3 -14 3t-13.5 -2t-9.5 -5t-6 -8q-2 -4 -2 -8.5t1.5 -8t6 -6.5t11.5 -5q9 -3 19 -5q15 -4 29 -8q12 -5 21 -12q9 -6 14 -16z" />
-<glyph unicode="&#xf3c9;" horiz-adv-x="177" d="M177 181q0 -32 -6.5 -54t-18 -36t-28 -20.5t-35.5 -6.5q-20 0 -37 6q-16 7 -27 21q-12 14 -19 36q-6 22 -6 54v44q0 32 6.5 54t18 36t28 20t36 6t36 -6t28 -20t18 -36t6.5 -54v-44zM132 232q0 19 -3 34q-3 14 -8 23q-6 8 -14 12t-18 4q-11 0 -19 -4t-13 -12 q-6 -9 -9 -22.5t-3 -34.5v-57q0 -20 3 -35q3 -13 9 -23q5 -9 13 -13t19 -4t19 4t13 13t8 23t3 35v57z" />
-<glyph unicode="&#xf3ca;" horiz-adv-x="448" d="M443 143l-15 -40l-264 95l45 121l182 -66q34 -12 49 -44t3 -66zM0 189l15 40l405 -146l-14 -40l-97 34v-34h-170v96zM124 230.5q-24 -11.5 -49 -3t-36.5 32.5t-3 49t32.5 36.5t49 3t36.5 -32.5t3 -49t-32.5 -36.5z" />
-<glyph unicode="&#xf3cb;" d="M427 213v-42h-278v128h192q36 0 61 -25t25 -61zM0 149h427v-42h-128v-43h-171v43h-128v42zM109.5 190q-18.5 -19 -45 -19.5t-45.5 18.5t-19 45t18.5 45t45 19.5t45.5 -18t19 -45t-18.5 -45.5z" />
-<glyph unicode="&#xf3cc;" horiz-adv-x="469" d="M128 171q-26 0 -45 18.5t-19 45t19 45.5t45 19t45 -19t19 -45.5t-19 -45t-45 -18.5zM384 299q35 0 60 -25t25 -61v-128h-469v214h43v-150h170v150h171z" />
-<glyph unicode="&#xf3cd;" horiz-adv-x="448" d="M43 192q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM444 80q7 -12 2.5 -25t-17.5 -19l-79 -36l-73 149h-149q-27 0 -45.5 19t-18.5 45v171h128v-128h75q26 0 38 -24l73 -149l23 11q12 5 24.5 1.5t18.5 -15.5z" />
-<glyph unicode="&#xf3ce;" horiz-adv-x="405" d="M43 192q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM373 64q14 0 23 -9.5t9 -22.5t-9 -22.5t-23 -9.5h-96v149h-149q-26 0 -45 19t-19 45v171h128v-128h107q17 0 29.5 -12.5t12.5 -30.5v-149h32z" />
-<glyph unicode="&#xf3cf;" horiz-adv-x="363" d="M362 38q3 -15 -6.5 -26.5t-24.5 -11.5h-96v64l21 85h-128q-26 0 -45 19t-19 45v171h128v-128h107q17 0 29.5 -12.5t12.5 -30.5l-42 -149h30q12 0 21.5 -7t11.5 -19zM43 192q0 -27 18.5 -45.5t45.5 -18.5h85v-43h-85q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192z" />
-<glyph unicode="&#xf3d0;" d="M71.5 328q-14.5 10 -17.5 27.5t7 32t27.5 17.5t32 -7.5t17.5 -27.5t-7 -31.5t-27.5 -17.5t-32 7zM299 43v-43h-151q-39 0 -69 25.5t-37 64.5l-42 209h43l42 -202q3 -24 21 -39t42 -15h151zM304 128l123 -96l-32 -32l-82 64h-146q-23 0 -40.5 14.5t-22.5 37.5l-29 126 q-3 20 8.5 36.5t31.5 19.5q10 2 21 -1q10 -3 16 -8l35 -27q47 -37 100 -27v-46q-48 -8 -110 26l22 -87h105z" />
-<glyph unicode="&#xf3d1;" horiz-adv-x="341" d="M76.5 332.5q-12.5 12.5 -12.5 30t12.5 30t30 12.5t30 -12.5t12.5 -30t-12.5 -30t-30 -12.5t-30 12.5zM43 107q0 -27 18.5 -45.5t45.5 -18.5h128v-43h-128q-44 0 -75.5 31.5t-31.5 75.5v192h43v-192zM341 20l-30 -31l-75 75h-108q-27 0 -45.5 18.5t-18.5 45.5v123 q0 20 14 34t34 14h1q10 0 20 -5q9 -4 15 -11l30 -33q17 -19 45 -31.5t54 -11.5v-47q-29 0 -61 13.5t-56 33.5v-79h73z" />
-<glyph unicode="&#xf3d2;" horiz-adv-x="469" d="M107 -21l128 128l128 -128h-256zM427 384q17 0 29.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-29.5 -12.5h-86v42h86v256h-384v-256h85v-42h-85q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h384z" />
-<glyph unicode="&#xf3d3;" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM171 213v22q0 8 -6.5 14.5t-15.5 6.5h-64q-8 0 -14.5 -6.5t-6.5 -14.5v-86q0 -8 6.5 -14.5t14.5 -6.5h64q9 0 15.5 6.5 t6.5 14.5v22h-32v-11h-43v64h43v-11h32zM320 213v22q0 8 -6.5 14.5t-14.5 6.5h-64q-9 0 -15.5 -6.5t-6.5 -14.5v-86q0 -8 6.5 -14.5t15.5 -6.5h64q8 0 14.5 6.5t6.5 14.5v22h-32v-11h-43v64h43v-11h32z" />
-<glyph unicode="&#xf3d4;" d="M427 235q-18 0 -30.5 -12.5t-12.5 -30.5t12.5 -30.5t30.5 -12.5v-85q0 -18 -12.5 -30.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 30.5v85q18 0 30.5 12.5t12.5 30.5t-12.5 30.5t-30.5 12.5v85q0 18 12.5 30.5t30.5 12.5h341q18 0 30.5 -12.5t12.5 -30.5v-85zM235 75v42 h-43v-42h43zM235 171v42h-43v-42h43zM235 267v42h-43v-42h43z" />
-<glyph unicode="&#xf3d5;" d="M427 256h-43v-43h43v-42h-43v-43h43v-43h-43v-42q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298q18 0 30.5 -12.5t12.5 -30.5v-42h43v-43zM341 43v298h-298v-298h298zM85 171h107v-86h-107v86zM213 213h86v-64h-86 v64zM85 299h107v-107h-107v107zM213 107h86v-128h-86v128z" />
-<glyph unicode="&#xf3d6;" d="M384 107v42h43v-42h-43zM384 299h43v-107h-43v107zM170.5 363q70.5 0 120.5 -50t50 -121t-50 -121t-120.5 -50t-120.5 50t-50 121t50 121t120.5 50zM170.5 149q17.5 0 30 12.5t12.5 30.5t-12.5 30.5t-30 12.5t-30 -12.5t-12.5 -30.5t12.5 -30.5t30 -12.5z" />
-<glyph unicode="&#xf3d7;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM256 256v43h-128v-214h128v43h-85v43h85v42h-85v43h85z" />
-<glyph unicode="&#xf3d8;" horiz-adv-x="405" d="M0 32h405v-43h-405v43zM153 154l-113 31l-34 9v110l31 -8l20 -50l106 -28v177l41 -11l59 -193l113 -30q13 -3 19.5 -14.5t3 -24.5t-15 -19.5t-24.5 -3.5l-113 30z" />
-<glyph unicode="&#xf3d9;" horiz-adv-x="433" d="M14 49h405v-43h-405v43zM431.5 248.5q3.5 -12.5 -3 -24t-19.5 -15.5l-114 -30l-92 -25l-114 -30l-34 -10l-16 29l-39 67l31 9l42 -33l106 28l-88 153l41 11l147 -137l113 30q13 4 24.5 -3t15 -19.5z" />
-<glyph unicode="&#xf3da;" horiz-adv-x="384" d="M128 299v-43h-43v43h43zM128 213v-42h-43v42h43zM128 384v-43h-43q0 18 12.5 30.5t30.5 12.5zM213 128v-43h-42v43h42zM341 384q18 0 30.5 -12.5t12.5 -30.5h-43v43zM213 384v-43h-42v43h42zM128 85q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM341 171v42h43v-42h-43zM341 256 v43h43v-43h-43zM341 85v43h43q0 -18 -12.5 -30.5t-30.5 -12.5zM43 299v-256h256v-43h-256q-18 0 -30.5 12.5t-12.5 30.5v256h43zM256 341v43h43v-43h-43zM256 85v43h43v-43h-43z" />
-<glyph unicode="&#xf3db;" horiz-adv-x="384" d="M0 171v42h43v-42h-43zM0 85v43h43v-43h-43zM43 0q-18 0 -30.5 12.5t-12.5 30.5h43v-43zM0 256v43h43v-43h-43zM256 0v43h43v-43h-43zM341 384q18 0 30.5 -12.5t12.5 -30.5v-213q0 -18 -12.5 -30.5t-30.5 -12.5h-213q-18 0 -30.5 12.5t-12.5 30.5v213q0 18 12.5 30.5 t30.5 12.5h213zM341 128v213h-213v-213h213zM171 0v43h42v-43h-42zM85 0v43h43v-43h-43z" />
-<glyph unicode="&#xf3dc;" d="M213.5 405q88.5 0 151 -62.5t62.5 -150.5t-62.5 -150.5t-151 -62.5t-151 62.5t-62.5 150.5t62.5 150.5t151 62.5zM128 75q22 0 37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5t-37.5 -15.5t-15.5 -37.5t15.5 -37.5t37.5 -15.5zM160 277q0 -22 15.5 -37.5t37.5 -15.5t38 15.5 t16 37.5t-16 38t-38 16t-37.5 -16t-15.5 -38zM299 75q22 0 37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5t-38 -15.5t-16 -37.5t16 -37.5t38 -15.5z" />
-<glyph unicode="&#xf3dd;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM171 128v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM213 256v-128h86q8 0 14.5 6.5t6.5 14.5v86q0 8 -6.5 14.5 t-14.5 6.5h-86zM245 160v64h43v-64h-43z" />
-<glyph unicode="&#xf3de;" horiz-adv-x="384" d="M341 363q18 0 30.5 -12.5t12.5 -30.5v-256q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v256q0 18 12.5 30.5t30.5 12.5h298zM171 128v128h-32v-53h-43v53h-32v-128h32v43h43v-43h32zM320 149v86q0 8 -6.5 14.5t-14.5 6.5h-64q-9 0 -15.5 -6.5 t-6.5 -14.5v-86q0 -8 6.5 -14.5t15.5 -6.5h16v-32h32v32h16q8 0 14.5 6.5t6.5 14.5zM245 160v64h43v-64h-43z" />
-<glyph unicode="&#xf3df;" d="M384 320q18 0 30.5 -12.5t12.5 -30.5v-256q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v256q0 18 12.5 30.5t30.5 12.5h42v128h171v-85h-128v-171h43v128h213z" />
-<glyph unicode="&#xf3e0;" horiz-adv-x="384" d="M256 256v-128h-128v128h128zM213 171v42h-42v-42h42zM384 213h-43v-42h43v-43h-43v-43q0 -17 -12.5 -29.5t-29.5 -12.5h-43v-43h-43v43h-42v-43h-43v43h-43q-17 0 -29.5 12.5t-12.5 29.5v43h-43v43h43v42h-43v43h43v43q0 17 12.5 29.5t29.5 12.5h43v43h43v-43h42v43h43 v-43h43q17 0 29.5 -12.5t12.5 -29.5v-43h43v-43zM299 85v214h-214v-214h214z" />
-<glyph unicode="&#xf3e1;" d="M384 405q18 0 30.5 -12.5t12.5 -29.5v-342q0 -17 -12.5 -29.5t-30.5 -12.5h-341q-18 0 -30.5 12.5t-12.5 29.5v342q0 17 12.5 29.5t30.5 12.5h341zM384 21v342h-341v-342h341zM341 320v-256h-256v256h86v-43h-43v-170h171v170h-64v-48q21 -12 21 -37q0 -18 -12.5 -30.5 t-30 -12.5t-30 12.5t-12.5 30.5q0 24 21 37v48q0 18 12.5 30.5t30.5 12.5h106z" />
-<glyph unicode="&#xf3e2;" horiz-adv-x="256" d="M107 341h42v-119h75l-96 -96l-96 96h75v119zM0 149h43q0 -35 25 -60t60 -25t60 25t25 60h43q0 -53 -37.5 -90.5t-90.5 -37.5t-90.5 37.5t-37.5 90.5z" />
-<glyph unicode="&#xf3e3;" horiz-adv-x="405" d="M0 256h405v-43h-405v43zM0 128v43h107v-43h-107zM149 128v43h107v-43h-107zM299 128v43h106v-43h-106z" />
-<glyph unicode="&#xf3e4;" horiz-adv-x="469" d="M427 384q17 0 29.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-29.5 -12.5h-384q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h384zM427 42v300h-384v-300h384zM192 192h-43l86 85l85 -85h-43v-85h-85v85z" />
-<glyph unicode="&#xf3e5;" horiz-adv-x="384" d="M341 384q18 0 30.5 -12.5t12.5 -30.5v-298q0 -18 -12.5 -30.5t-30.5 -12.5h-298q-18 0 -30.5 12.5t-12.5 30.5v298q0 18 12.5 30.5t30.5 12.5h298zM43 342v-65q26 0 45 19t19 46h-64zM43 192q62 0 105.5 44t43.5 106h-43q0 -45 -31 -76t-75 -31v-43zM43 64h298l-96 128 l-74 -96l-54 64z" />
-<glyph unicode="&#xf3e6;" horiz-adv-x="363" d="M0 107q62 0 105.5 -44t43.5 -106h-42q0 44 -31.5 75.5t-75.5 31.5v43zM0 21q27 0 45.5 -18.5t18.5 -45.5h-64v64zM0 192q97 0 166 -68.5t69 -166.5h-43q0 80 -56 136t-136 56v43zM320 426q18 0 30.5 -12t12.5 -30v-363q0 -17 -12.5 -29.5t-30.5 -12.5h-44q-4 45 -21 85 h65v277h-213v-128q-20 8 -43 14v157q0 18 12.5 30.5t30.5 12.5z" />
-<glyph unicode="&#xf3e7;" horiz-adv-x="512" d="M0 128v128h43v-128h-43zM64 85v214h43v-214h-43zM469 256h43v-128h-43v128zM405 85v214h43v-214h-43zM352 384q13 0 22.5 -9.5t9.5 -22.5v-320q0 -13 -9.5 -22.5t-22.5 -9.5h-192q-13 0 -22.5 9.5t-9.5 22.5v320q0 13 9.5 22.5t22.5 9.5h192zM341 43v298h-170v-298h170z " />
-<glyph unicode="&#xf3e8;" horiz-adv-x="512" d="M394.5 320q48.5 0 83 -34.5t34.5 -83t-34.5 -83t-82.5 -34.5h-278q-48 0 -82.5 34.5t-34.5 83t34.5 83t83 34.5t83 -34.5t34.5 -82.5q0 -43 -27 -75h96q-27 32 -27 75q0 48 34.5 82.5t83 34.5zM117 128q31 0 53 22t22 53t-22 52.5t-53 21.5t-52.5 -21.5t-21.5 -52.5 t21.5 -53t52.5 -22zM395 128q31 0 52.5 22t21.5 53t-21.5 52.5t-52.5 21.5t-53 -21.5t-22 -52.5t22 -53t53 -22z" />
-<glyph unicode="&#xf3e9;" horiz-adv-x="469" d="M149 277v-85h107v85h-107zM0 427h85v-22h299v22h85v-86h-21v-298h21v-86h-85v22h-299v-22h-85v86h21v298h-21v86zM85 43v-22h299v22h21v298h-21v22h-299v-22h-21v-298h21zM107 320h192v-85h64v-171h-214v85h-42v171zM299 149h-107v-42h128v85h-21v-43z" />
-<glyph unicode="&#xf3ea;" horiz-adv-x="341" d="M47 115q19 0 33 -13.5t14 -33t-14 -33.5t-33 -14t-33 14t-14 33.5t14 33t33 13.5zM0 238q90 0 153.5 -63.5t63.5 -153.5h-62q0 64 -45.5 109.5t-109.5 45.5v62zM0 363q93 0 171.5 -46t124 -124.5t45.5 -171.5h-62q0 116 -81.5 198t-197.5 82v62z" />
-<glyph unicode="&#xf3eb;" horiz-adv-x="474" d="M79 384h164q16 2 29.5 -9t14.5 -28v-55.5v-55.5l36 59q30 -47 84 -135.5t67 -110.5h-241q-29 -30 -52 -39q-42 -18 -88 -4t-71 53q-27 39 -21 89t41 82v106q-2 18 8.5 33t28.5 15zM91 331v-72q40 13 82 -1t65 -49v122h-147zM131 217q-30 -1 -51 -18.5t-31 -47.5 q-8 -34 13 -65.5t56 -36.5q34 -6 64 17t32 58q5 36 -21 65t-62 28zM323 201l-62 -102h125z" />
-<glyph unicode="&#xf3ec;" horiz-adv-x="423" d="M212.5 409q18.5 0 31.5 -13.5t13 -31.5t-13 -31.5t-31.5 -13.5t-31.5 13.5t-13 31.5t13 31.5t31.5 13.5zM337 362q22 0 37.5 -16t15.5 -37.5t-15.5 -37.5t-37.5 -16t-38 16t-16 37.5t16 37.5t38 16zM91.5 352q16.5 0 28 -12t11.5 -28.5t-11.5 -28.5t-28 -12t-28.5 12 t-12 28.5t12 28.5t28.5 12zM34 218q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM389 218q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM85 91q14 0 24 -10t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM340 91q14 0 24 -10 t10 -24t-10 -24t-24 -10t-24 10t-10 24t10 24t24 10zM212 44q14 0 24.5 -10.5t10.5 -24.5t-10.5 -24t-24.5 -10t-24 10t-10 24t10 24.5t24 10.5z" />
-<glyph unicode="&#xf3ed;" d="M0 405h85v-21h150v21h85v-85h-21v-64h42v21h86v-85h-22v-128h22v-85h-86v21h-128v-21h-85v85h21v43h-64v-22h-85v86h21v149h-21v85zM341 192v21h-42v-42h21v-86h-85v22h-43v-43h21v-21h128v21h22v128h-22zM235 320v21h-150v-21h-21v-149h21v-22h64v43h-21v85h85v-21h43 v64h-21zM213 192h-21v-43h43v22h21v42h-43v-21z" />
-<glyph unicode="&#xf3ee;" d="M281 137q-12 -13 -12 -14q-14 -13 -21 -17q-26 -19 -59 -12q-30 6 -45 36q-1 2 -2 3q-8 -12 -8 -13q-21 -28 -57 -29q-23 -1 -40 6q-36 16 -37 56h40l1 -4q5 -20 21 -24q21 -5 35 9q9 10 10.5 25t-6.5 26q-8 12 -23 14.5t-26 -6.5q-4 -3 -6 -5q-3 -5 -11 -5h-29 q9 53 20 110h111v-33h-4h-75q-3 0 -4 -3q-1 -4 -7 -39v-3q21 19 52 14q27 -5 42 -34q1 1 1 3q2 2 2 3q21 43 69 36q26 -3 46 -22q1 -1 23 -24l2 2q22 23 24 25q17 16 38 19q23 3 43 -5.5t30 -30.5q16 -38 -2 -74q-16 -33 -55 -35q-29 -1 -51 17q-3 2 -25 22q0 1 -5 6z M205 132q12 0 24 7q8 4 28 23q1 2 0 4q-2 1 -9.5 8t-11.5 11q-9 8 -21 12q-14 4 -25 -2t-15 -20q-1 -4 -1 -8q-1 -16 8 -25.5t23 -9.5zM304 164q22 -20 24 -21q13 -12 30 -11q25 0 30 24q1 7 0 15q-2 13 -11.5 21t-22.5 6q-15 -1 -28 -13q-1 -1 -22 -21z" />
-<glyph unicode="&#xf3ef;" d="M117 213h193q31 0 53 22t22 53t-22 53.5t-53.5 22.5t-53.5 -22.5t-22 -53.5v-33h-42v33q0 49 34.5 83.5t83 34.5t83 -34.5t34.5 -83t-34.5 -83t-82.5 -34.5h-193q-31 0 -53 -22t-22 -53t22 -53t53 -22t53 22t22 53v34h42v-34q0 -48 -34 -82.5t-82.5 -34.5t-83 34.5 t-34.5 83t34.5 82.5t82.5 34z" />
-<glyph unicode="&#xf3f0;" d="M379 87q6 2 9 -2.5t-2 -8.5q-34 -25 -81 -39t-92 -14q-122 0 -211 81q-3 3 -1 5.5t6 0.5q96 -56 211 -56q83 0 161 33zM425 113q5 -6 -2.5 -31.5t-23.5 -39.5q-3 -3 -5 -2t-1 5q18 45 12 53t-54 2q-4 0 -4.5 2t2.5 4q18 13 46 13.5t30 -6.5zM237 271v6q0 22 -6 30 q-7 11 -23 11q-28 0 -33 -25q-2 -8 -8 -8l-40 4q-8 2 -6 9q6 34 32.5 49t60.5 15q41 0 63 -21q3 -3 5.5 -6t4.5 -7.5t3.5 -7t2 -8t1.5 -8t1 -9v-8v-9v-9.5v-65q0 -17 16 -38q5 -7 0 -12q-16 -12 -32 -27q-5 -4 -10 -1q-11 9 -24 28q-17 -18 -32 -24.5t-37 -6.5 q-27 0 -44.5 17t-17.5 48q0 49 44 69q17 7 79 14zM229 184q8 14 8 45v9q-62 0 -62 -42q0 -14 6.5 -22.5t18.5 -8.5q18 0 29 19z" />
-<glyph unicode="&#xf3f1;" d="M397 243q30 0 30 -31v-103q0 -53 -39.5 -91.5t-92.5 -38.5h-171q-48 0 -86 38.5t-38 90.5v162q0 57 39 96t96 39h90q44 0 84.5 -39.5t40.5 -85.5v-11q0 -11 7.5 -18.5t20.5 -7.5h19zM135 294q-10 0 -17.5 -7.5t-7.5 -18t7.5 -18t17.5 -7.5h78q10 0 17 8t7 18t-7 17.5 t-17 7.5h-78zM289 90q10 0 17.5 6.5t7.5 16.5t-7.5 17t-17.5 7h-154q-10 0 -17.5 -7t-7.5 -17t7.5 -16.5t17.5 -6.5h154z" />
-<glyph unicode="&#xf3f2;" d="M427 192h-214v-213h-213v213h213v213h214v-213z" />
-<glyph unicode="&#xf3f3;" d="M219 243q26 0 42 -13t16 -38t-16 -38t-42 -13h-23v102h23zM221 400q85 0 145.5 -61t60.5 -147t-60.5 -147t-145.5 -61q-75 0 -133 49l-88 -12l34 85q-18 41 -18 86q0 86 60 147t145 61zM333 193v0q0 46 -30.5 74t-83.5 28h-78v-206h76q54 0 85 29t31 75z" />
-<glyph unicode="&#xf3f4;" d="M426 145q0 -46 -13 -81q-25 -66 -96 -81q-20 -4 -43 -4h-240h-3v1l45 45l124 124l0.5 0.5t1.5 0.5q4 4 7 3q4 -2 4 -8v-63v-4q0 -1 2 -1q47 1 55 1q8 1 19 5q28 9 35 42q3 16 3 33v114q0 3 3 6l93 93q0 1 2 4l1 -1h1v-4q0 -24 -1 -225zM100 112q0 -3 -3 -6l-94 -94l-3 -3 v5v111.5v112.5q0 45 12 79q25 69 99 84q19 4 42 4h75h89h75h4q-1 0 -2 -2q0 -1 -1 -1q-27 -28 -82.5 -83.5l-83.5 -83.5q-3 -2 -3 -3q-4 -3 -7 -1q-1 2 -4 6v3v32v31v3q0 1 -1 1q-50 -1 -59 -2q-4 0 -13 -3q-31 -9 -37 -44q-3 -15 -3 -34q-1 -25 0 -112z" />
-<glyph unicode="&#xf3f5;" d="M97 95q-40 0 -68.5 28.5t-28.5 68t28.5 67.5t68.5 28t68 -28t28 -67.5t-28 -68t-68 -28.5zM330 95q-40 0 -68.5 28.5t-28.5 68t28.5 67.5t68.5 28t68.5 -28t28.5 -67.5t-28.5 -68t-68.5 -28.5z" />
-<glyph unicode="&#xf3f6;" horiz-adv-x="384" d="M384 257q0 -38 -10.5 -65t-30.5 -41.5t-40 -21t-47 -9.5q19 -16 19 -51v-55.5v-34.5h-139v14v26.5v24.5q-16 -3 -29.5 -3t-23 2.5t-17 6.5t-12 8.5t-7.5 8.5t-4 7l-1 3q-6 14 -13.5 24t-12.5 13l-5 3q-11 9 -11 12.5t7 4.5h6q12 -1 23 -8t15 -14l5 -6q27 -47 81 -23 q3 24 18 37q-27 3 -47 9.5t-39.5 21t-30.5 41.5t-11 65q0 43 29 74q-13 33 3 74q3 -1 8 0.5t25 -6t44 -23.5q33 9 70 10q36 -1 70 -10q23 16 42.5 23t26.5 7l7 -1q17 -41 3 -74q29 -31 29 -74zM32 121.5q1 2.5 -2.5 4t-4.5 -1t2.5 -4t4.5 1zM43.5 109q2.5 2 -1 5.5t-6 1.5 t1 -5.5t6 -1.5zM54 93q3 2 0 6.5t-6 2.5t0 -6.5t6 -2.5zM69.5 77q2.5 3 -1.5 7.5t-7 1.5t1.5 -7.5t7 -1.5zM90 68.5q1 3.5 -4.5 5.5t-6.5 -2t4.5 -5.5t6.5 2zM107 63q6 0 6 4t-6 4t-6 -4t6 -4zM129 65q3 1 4.5 2.5t0.5 2.5q0 5 -6 4q-3 -1 -4.5 -2.5t-0.5 -3.5q0 -4 6 -3z " />
-<glyph unicode="&#xf3f7;" horiz-adv-x="267" d="M147 5q36 0 59 17.5t23 41.5q0 20 -12 33.5t-48 39.5h-14q-33 0 -59 -9q-48 -17 -48 -57q0 -30 27 -48t72 -18zM81 329q0 -36 19 -66.5t50 -30.5q17 0 34.5 12.5t17.5 42.5q0 33 -20 66t-52 33q-21 0 -35 -14.5t-14 -42.5zM220 164q22 -19 33.5 -36t11.5 -43 q0 -43 -38.5 -74.5t-107.5 -31.5q-58 0 -88.5 23.5t-30.5 57.5q0 43 42 67q39 24 107 29q-17 19 -17 36q0 6 7 23h-15q-41 0 -65.5 26.5t-24.5 60.5q0 44 31.5 73.5t88.5 29.5h113l-23 -22h-32q37 -32 37 -71q0 -19 -7.5 -34.5t-15.5 -23.5t-23 -20q-18 -14 -18 -29 q0 -13 15 -26z" />
-<glyph unicode="&#xf3f8;" d="M319 186.5q-8 10.5 -30 10.5q-27 0 -38 -16t-11 -45v-146q0 -5 -3 -8t-8 -3h-76q-4 0 -7.5 3t-3.5 8v270q0 4 3.5 7.5t7.5 3.5h74q4 0 6.5 -2t3.5 -6v-5q1 -2 1 -7q28 27 76 27q53 0 83 -27t30 -79v-182q0 -5 -3.5 -8t-7.5 -3h-78q-4 0 -7.5 3t-3.5 8v164q0 22 -8 32.5z M88 316.5q-15 -15.5 -36.5 -15.5t-36.5 15.5t-15 37t15 36.5t36.5 15t36.5 -15t15 -36.5t-15 -37zM101 260v-270q0 -5 -3.5 -8t-7.5 -3h-76q-5 0 -8 3t-3 8v270q0 4 3 7.5t8 3.5h76q4 0 7.5 -3.5t3.5 -7.5z" />
-<glyph unicode="&#xf3f9;" horiz-adv-x="256" d="M128 189q-45 0 -76.5 32t-31.5 76.5t31.5 76t76.5 31.5t76.5 -31.5t31.5 -76t-31.5 -76.5t-76.5 -32zM128 350q-22 0 -37.5 -15.5t-15.5 -37.5t15.5 -37.5t37.5 -15.5t37.5 15.5t15.5 37.5t-15.5 37.5t-37.5 15.5zM252 176q8 -15 1 -24.5t-29 -24.5q-27 -17 -75 -22 l81 -81q7 -7 7 -17.5t-7 -17.5l-3 -3q-8 -7 -18 -7t-17 7q-12 11 -64 64l-63 -64q-7 -7 -17.5 -7t-17.5 7l-3 3q-7 7 -7 17.5t7 17.5l63 63l18 18q-48 4 -76 22q-22 15 -29 24.5t1 24.5q5 11 16 13.5t29 -8.5q14 -11 33.5 -17t32.5 -6l13 -1q49 0 79 24q18 11 29 8.5 t16 -13.5z" />
-<glyph unicode="&#xf3fa;" d="M267 315h145q4 0 9.5 -5t5.5 -12l-127 -85h-4l-29 18v84zM267 200l27 -18q2 -1 4 -1h3l1 1q-2 -1 29 19.5t64 41.5l32 21v-153q0 -12 -6.5 -18t-16.5 -6h-137v113v0zM128 239q13 0 20.5 -12.5t7.5 -34.5t-7.5 -34t-21.5 -12q-13 0 -21 12.5t-8 33.5t8 34t22 13zM0 357 l251 48v-426l-251 52v326zM168 139q16 21 16 54t-15.5 53.5t-40.5 20.5q-26 0 -42 -21t-16 -56q0 -32 16 -52t41 -20t41 21z" />
-<glyph unicode="&#xf3fb;" horiz-adv-x="356" d="M225 276q0 34 -52 34h-15q-7 0 -13 -4.5t-7 -11.5l-14 -60v-3q0 -5 3.5 -8.5t8.5 -3.5h12q15 0 28 3t24.5 9t18 17.5t6.5 27.5zM356 243q0 -58 -48 -93q-47 -35 -133 -35h-13q-7 0 -13 -4.5t-7 -11.5l-16 -69q-2 -7 -9 -12.5t-15 -5.5h-46q-7 0 -11.5 4t-4.5 11q0 2 3 14 h32q8 0 14.5 5t7.5 12l16 69q2 7 8.5 12t13.5 5h13q85 0 132 35t47 92q0 28 -11 44q40 -20 40 -72zM316 283q0 -57 -48 -93q-47 -35 -133 -35h-13q-7 0 -13 -4.5t-7 -11.5l-16 -68q-2 -8 -8.5 -13.5t-15.5 -5.5h-46q-7 0 -11.5 4t-4.5 11v4l66 283q1 7 8 12.5t15 5.5h97 q14 0 26.5 -0.5t26.5 -3t24.5 -6.5t21 -11t17 -16t10.5 -22.5t4 -29.5z" />
-<glyph unicode="&#xf3fc;" horiz-adv-x="341" d="M99 242q0 27 14 46t34 19q17 0 25.5 -11t8.5 -27q0 -10 -3 -25q-4 -14 -10 -34q-6 -19 -9 -31q-5 -20 7.5 -34.5t32.5 -14.5q35 0 57.5 39.5t22.5 95.5q0 43 -27.5 70t-77.5 27q-56 0 -90.5 -35.5t-34.5 -85.5q0 -29 17 -50q6 -6 4 -14q-2 -5 -5 -20q-2 -5 -5.5 -6.5 t-7.5 -0.5q-26 11 -39 37t-13 60q0 22 7 44t22 42.5t36 36.5t51 25.5t65 9.5t65.5 -12t51 -32t32 -46.5t11.5 -54.5q0 -75 -38 -124t-98 -49q-20 0 -37.5 9t-24.5 22q-15 -58 -18 -69q-8 -30 -36 -70h-17q-6 51 2 84l33 138q-8 17 -8 41z" />
-<glyph unicode="&#xf3fd;" d="M426 121q2 -9 -6.5 -18t-27.5 -15l-2 -1l-64 20l17 6q21 7 21 13q-2 10 -37 4l-36 -12l-61 -21v-22l96 32l64 -20l-99 -34l-61 -21v1v-1l-69 22v39v-19q-40 -14 -84 -6q-3 0 -11 1.5t-12 2t-11 1.5t-11.5 2.5t-10 3t-8.5 3t-6.5 4t-5 5t-1.5 5.5q-2 25 34 37l59 -18 l-15 -6q-15 -5 -6 -13q9 -9 25 -4l64 22v44l-27 8l27 9v177l88 -23q91 -24 90 -95q-1 -90 -82 -67v117q0 6 -7 9t-13.5 1t-6.5 -9v-148l6 2q58 20 104 17q80 -6 86 -35zM34 133h0.5h1.5l98 33l27 -8v-19l-68 -24z" />
-<glyph unicode="&#xf3fe;" d="M427 195q0 -28 -27 -39q2 -9 2 -19q0 -51 -55.5 -87.5t-134 -36.5t-134 36.5t-55.5 87.5q0 10 2 20q-25 11 -25 38q0 18 12.5 30.5t29.5 12.5q19 0 32 -15q52 36 129 39l35 104q3 7 10 5l83 -20q1 0 3 -1q8 20 30 20q13 0 23 -10t10 -23.5t-10 -23.5t-23 -10 q-14 0 -23.5 9.5t-9.5 23.5q-2 -1 -3 0l-77 18l-31 -92q79 -2 132 -40q13 16 33 16q17 0 29.5 -12.5t12.5 -30.5zM116 161.5q0 -12.5 9 -21.5t21.5 -9t21.5 9t9 21.5t-9 22t-21.5 9.5t-21.5 -9.5t-9 -22zM282 77q4 3 0.5 6.5t-7.5 0.5q-18 -19 -62 -19t-62 19 q-3 3 -6.5 -0.5t-0.5 -6.5q21 -22 70 -22q47 0 68 22zM280.5 131q12.5 0 21.5 9t9 21.5t-9 22t-21.5 9.5t-22 -9.5t-9.5 -22t9.5 -21.5t22 -9z" />
-<glyph unicode="&#xf3ff;" d="M414 147q13 -25 13 -52q0 -48 -34.5 -82t-83.5 -34q-30 0 -56 13q-19 -3 -37 -3q-85 0 -144.5 59t-59.5 142q0 20 4 40q-16 27 -16 59q0 48 34.5 82t83.5 34q34 0 63 -18q17 3 35 3q84 0 143.5 -58.5t59.5 -141.5q0 -22 -5 -43zM318.5 94.5q14.5 19.5 14.5 44.5 q0 21 -8.5 35.5t-23.5 23.5q-14 10 -34 16q-21 6 -45 12q-20 4 -29 7q-8 2 -16 6t-12 9t-4 12q0 11 12 19q14 8 36 8q23 0 34 -7q10 -8 18 -23q6 -11 12 -16t18 -5t20.5 8.5t8.5 19.5t-6.5 22.5t-20 22t-33.5 17t-47 6.5q-35 0 -60 -10q-26 -9 -39.5 -27t-13.5 -40 q0 -24 13 -41q13 -16 35 -25q21 -9 53 -16q23 -4 37 -9q14 -4 22 -11q8 -8 8 -20q0 -14 -15 -25q-16 -10 -41 -10q-18 0 -29.5 5t-17.5 13t-11 21q-5 11 -12 17q-8 6 -18 6q-13 0 -21.5 -8t-8.5 -19q0 -18 13 -36t34 -29q28 -15 72 -15q37 0 64 11t41.5 30.5z" />
-<glyph unicode="&#xf400;" horiz-adv-x="420" d="M153 276q21 0 35.5 -14t14.5 -33.5t-14.5 -33t-35.5 -13.5t-36 13.5t-15 33t15 33.5t36 14zM272 276q21 0 35.5 -13.5t14.5 -33t-14.5 -33.5t-35.5 -14t-36 14t-15 33.5t15 33t36 13.5zM403 202q10 7 15 0.5t-1 -15.5q-29 -36 -88 -60q26 -89 -22 -131q-32 -27 -64 -14 q-27 10 -26 42q0 -1 -0.5 24.5t-0.5 53.5l-4 1t-7 2v-36v-33t0 -12q1 -36 -32 -44q-36 -9 -65 23q-40 43 -16 124q-60 25 -89 60q-6 9 -1 15.5t14 -0.5l4 -3v165q0 17 12.5 29t28.5 12h300q16 0 26 -12t10 -29v-165q2 0 6 3zM376 186v159q0 22 -6.5 30.5t-24.5 8.5h-266 q-20 0 -26.5 -8.5t-6.5 -30.5v-160q23 -14 51 -19.5t46 -4.5t34 0q15 1 22 -6q1 0 1.5 -1l0.5 -1q9 -8 15 -12q1 22 27 20q16 1 34 0t46 5t53 20z" />
-<glyph unicode="&#xf401;" d="M9 124h-9v51h9v-51zM30 107h-9v81h9v-81zM47 103h-9v94h9v-94zM64 99h-9v94h9v-94zM85 99h-8v123h8v-123zM102 99h-8v140h8v-140zM124 99h-9v149h9v-149zM141 99h-9v153h9v-153zM162 99h-8v149h8v-149zM179 99h-8v145h8v-145zM196 99h-8v162h8v-162zM218 99h-9v175h9 v-175zM374 100h-146q-6 0 -6 6v167q0 4 5 6q17 6 34 6q36 0 62.5 -24.5t30.5 -59.5q9 4 20 4q22 0 37.5 -15.5t15.5 -37.5t-15.5 -37t-37.5 -15z" />
-<glyph unicode="&#xf402;" horiz-adv-x="265" d="M0 231v60q25 8 43 23.5t29 36.5t15 54h61v-108h102v-66h-102v-110q0 -37 4 -47.5t15 -16.5q14 -9 33 -9q32 0 65 21v-67q-28 -13 -50.5 -18t-48.5 -5q-29 0 -51.5 7t-38.5 21t-22.5 29.5t-6.5 44.5v149h-47v1z" />
-<glyph unicode="&#xf403;" horiz-adv-x="407" d="M296 34h-83l-56 -55h-55v55h-102v297l28 74h379v-259zM370 164v204h-305v-269h83v-55l56 55h102zM269 294h37v-111h-37v111zM167 183v111h37v-111h-37z" />
-<glyph unicode="&#xf404;" d="M276 284q-15 0 -32 -7q32 103 120 101q66 -2 62 -86q-2 -63 -87 -172q-87 -114 -147 -114q-37 0 -63 70q-18 66 -34 127q-19 69 -41 69q-5 0 -34 -20l-20 26q33 29 62 56q42 36 63 38q50 5 62 -68q12 -80 17 -99q14 -65 32 -65q13 0 40 42.5t29 64.5q3 37 -29 37z" />
-<glyph unicode="&#xf405;" d="M364.5 343q62.5 -62 62.5 -149.5t-62.5 -149.5t-150.5 -62v0q-54 0 -101 26l-113 -29l30 109q-28 49 -28 106q0 87 62 149t150 62t150.5 -62zM214 18q73 0 125 51.5t52 124.5t-52 124.5t-125 51.5t-124.5 -51.5t-51.5 -124.5q0 -51 27 -94l4 -6l-18 -65l67 17l6 -3 q42 -25 90 -25zM311 150q9 -5 10 -7q4 -6 -3 -25q-3 -8 -15 -15.5t-21 -9.5q-18 -2 -33 2q-17 6 -30 11q-8 4 -15.5 8.5t-14.5 9t-13 9.5t-11.5 10t-10.5 10.5t-8.5 9.5t-7 8.5t-5.5 7t-3.5 5l-1.5 2.5q-22 29 -22 55q0 24 19 44q6 7 14 7q6 0 10 -1q8 0 12 -9q2 -3 6 -13 l7 -17.5t3 -8.5q3 -5 1 -9q-3 -7 -5 -9l-3 -3t-3 -3.5t-2 -2.5q-6 -6 -3 -11q13 -22 30 -37q13 -11 43 -26q7 -3 11 1q12 15 17 21q4 6 12 3q6 -3 36 -17z" />
-<glyph unicode="&#xf406;" d="M213 323q-24 18 -47 27.5t-38.5 10.5t-28 0t-18.5 -4l-6 -3q59 51 138 51t139 -51q-3 1 -7 3t-17.5 4t-28.5 0t-38.5 -11t-47.5 -27v0zM157 282q-39 -40 -65 -78t-34.5 -63.5t-12 -44.5t-1.5 -28l3 -9q-47 58 -47 133q0 84 57 145q38 -16 100 -55zM427 192 q0 -75 -47 -133q1 3 2.5 9t-1.5 27.5t-12 45.5t-34.5 62.5t-65.5 78.5q28 17 53 31t36 19l11 5q58 -61 58 -145zM212 236q38 -27 67.5 -57t45 -53t26 -42t13.5 -29l3 -10q-62 -66 -153.5 -66t-154.5 66q2 4 5 11.5t15 30t28 44.5t44 51t61 54z" />
-<glyph unicode="&#xf407;" d="M414 271q-5 0 -49 -10q-10 -3 -62.5 -45.5t-56.5 -55.5q-2 -10 -2 -27l-1 -15q0 -9 4 -39q4 -1 32 -1t32 -1l-1 -20q-6 1 -105 1q-6 0 -44 -1t-49 -1l4 19h15.5t27 2t15.5 6q1 1 1.5 2t1 2.5t0.5 3v4.5v6v8v10v13q0 17 -1 27q-3 10 -51.5 69.5t-65.5 72.5q-3 1 -28.5 4 t-29.5 4l-1 18q2 1 17.5 1t35.5 -0.5t44 0.5q23 0 61 -0.5t45 -0.5l-3 -16q-4 -1 -30.5 -2.5t-31.5 -3.5q16 -24 50 -68.5t39 -51.5q2 3 41.5 36t40.5 43q-38 7 -54 7l-3 20h20h38.5h30.5q72 0 86 -2z" />
-<glyph unicode="&#xf408;" d="M422 277q5 -35 5 -69v-32l-5 -69q-4 -29 -17 -42q-14 -14 -42 -18q-27 -2 -64.5 -3t-61.5 -1h-24q-111 1 -145 4l-8 1t-13 2t-12.5 5t-13 10t-10 16.5t-5.5 18.5l-2 7q-4 35 -4 69v32l4 69q4 29 17 42q14 15 43 18q27 2 64 3t61 1h24q90 0 150 -4q28 -3 42 -18 q4 -4 7 -9.5t5 -11t3 -10.5t2 -8v-3zM271 189l14 7l-115 60v-120z" />
-<glyph unicode="&#xf409;" horiz-adv-x="352" d="M170 224q18 0 57.5 -1t59.5 -2q15 0 26 -3q28 -6 34 -40q5 -35 5 -59q0 -39 -3 -87q-1 -12 -7 -25q-11 -24 -43 -25q-103 -3 -152 -3q-17 0 -47.5 1t-40.5 1t-22 4q-20 5 -29 26q-6 17 -8 52q-1 41 2 94q1 15 5 31q9 31 42 33q31 0 121 3zM202 33q4 -3 13 -9 q9 -5 17.5 -1t10.5 15q2 9 2 14v60q0 8 -3 15q-3 13 -12 16.5t-20 -4.5q-2 -1 -4.5 -3.5l-3.5 -3.5v50h-21v-158h21q-1 4 0 9zM162 24v118h-22v-7v-76q0 -8 -6 -12q-4 -5 -9 -3q-3 1 -3 7v84v7h-22v-3v-96q0 -3 1 -9q4 -16 20 -11q4 1 13 7q2 1 6 6v-12h22zM323 79 q0 4 0.5 11t0.5 12.5t-1 10.5q-1 14 -9 22t-21 9q-14 1 -23.5 -6.5t-10.5 -21.5q-3 -33 0 -67q2 -15 14 -22.5t28 -3.5q13 3 19.5 15.5t2.5 26.5h-22q0 -10 -1 -14q-1 -9 -9 -9t-9 8q-1 9 -2 30q16 -1 43 -1zM103 159v23h-74v-23h24v-135h25v135h25zM247 364v-34v-59 q0 -6 4 -7q3 -1 7 2q7 5 7 14v26v31v27h22v-119h-22v12l-5 -5q-8 -6 -11 -7q-8 -4 -14.5 -0.5t-8.5 11.5q-1 4 -1 7v100q7 1 22 1zM66 405h22q2 0 4 -4q10 -34 14 -51q0 -1 2 -3q4 18 9 32q1 3 3 10.5t3 11.5q1 3 4 4h22q0 -1 -1 -4q-1 -1 -1 -2q-4 -14 -13 -42t-13 -42 q-2 -6 -2 -10v-59h-23q0 3 -0.5 8.5t-0.5 9.5t1 8q2 36 -13 78q-9 27 -17 55zM208 304v-11t-0.5 -13t-1.5 -11q-1 -11 -10 -18.5t-21 -7.5t-20 7.5t-11 18.5q-1 7 -1 21q0 38 1 49q4 27 31 27q26 0 31 -27q0 -1 0.5 -2.5t0.5 -2.5q0 -5 0.5 -15t0.5 -15zM167 305v-28 q0 -6 1 -8q4 -5 8 -5t8 5q1 2 1 8v49v12q-1 7 -9 7q-7 0 -9 -7q-1 -2 -1 -6t0.5 -13t0.5 -14zM206 83v31q0 9 11 9q8 0 8 -7v-5.5v-4.5v-50v-3.5v-3.5q-1 -7 -8 -7q-11 1 -11 9q-1 16 0 32zM299 97h-20q0 4 0.5 10.5t0.5 10.5q1 6 9 6q7 0 8 -6q2 -10 2 -21z" />
-</font>
-</defs></svg> \ No newline at end of file
diff --git a/packages/website/public/fonts/Material-Design-Iconic-Font.ttf b/packages/website/public/fonts/Material-Design-Iconic-Font.ttf
deleted file mode 100755
index 5d489fdd1..000000000
--- a/packages/website/public/fonts/Material-Design-Iconic-Font.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Material-Design-Iconic-Font.woff b/packages/website/public/fonts/Material-Design-Iconic-Font.woff
deleted file mode 100755
index 933b2bf85..000000000
--- a/packages/website/public/fonts/Material-Design-Iconic-Font.woff
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Material-Design-Iconic-Font.woff2 b/packages/website/public/fonts/Material-Design-Iconic-Font.woff2
deleted file mode 100755
index 35970e277..000000000
--- a/packages/website/public/fonts/Material-Design-Iconic-Font.woff2
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Black.ttf b/packages/website/public/fonts/Roboto-Black.ttf
deleted file mode 100755
index 689fe5cb3..000000000
--- a/packages/website/public/fonts/Roboto-Black.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-BlackItalic.ttf b/packages/website/public/fonts/Roboto-BlackItalic.ttf
deleted file mode 100755
index 0b4e0ee10..000000000
--- a/packages/website/public/fonts/Roboto-BlackItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Bold.ttf b/packages/website/public/fonts/Roboto-Bold.ttf
deleted file mode 100755
index d3f01ad24..000000000
--- a/packages/website/public/fonts/Roboto-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-BoldItalic.ttf b/packages/website/public/fonts/Roboto-BoldItalic.ttf
deleted file mode 100755
index 41cc1e753..000000000
--- a/packages/website/public/fonts/Roboto-BoldItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Italic.ttf b/packages/website/public/fonts/Roboto-Italic.ttf
deleted file mode 100755
index 6a1cee5b2..000000000
--- a/packages/website/public/fonts/Roboto-Italic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Light.ttf b/packages/website/public/fonts/Roboto-Light.ttf
deleted file mode 100755
index 219063a57..000000000
--- a/packages/website/public/fonts/Roboto-Light.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-LightItalic.ttf b/packages/website/public/fonts/Roboto-LightItalic.ttf
deleted file mode 100755
index 0e81e876f..000000000
--- a/packages/website/public/fonts/Roboto-LightItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Medium.ttf b/packages/website/public/fonts/Roboto-Medium.ttf
deleted file mode 100755
index 1a7f3b0bb..000000000
--- a/packages/website/public/fonts/Roboto-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-MediumItalic.ttf b/packages/website/public/fonts/Roboto-MediumItalic.ttf
deleted file mode 100755
index 003029527..000000000
--- a/packages/website/public/fonts/Roboto-MediumItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Regular.ttf b/packages/website/public/fonts/Roboto-Regular.ttf
deleted file mode 100755
index 2c97eeadf..000000000
--- a/packages/website/public/fonts/Roboto-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-Thin.ttf b/packages/website/public/fonts/Roboto-Thin.ttf
deleted file mode 100755
index b74a4fd1a..000000000
--- a/packages/website/public/fonts/Roboto-Thin.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/Roboto-ThinItalic.ttf b/packages/website/public/fonts/Roboto-ThinItalic.ttf
deleted file mode 100755
index dd0ddb852..000000000
--- a/packages/website/public/fonts/Roboto-ThinItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Bold.ttf b/packages/website/public/fonts/RobotoMono-Bold.ttf
deleted file mode 100755
index 07ef607d5..000000000
--- a/packages/website/public/fonts/RobotoMono-Bold.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-BoldItalic.ttf b/packages/website/public/fonts/RobotoMono-BoldItalic.ttf
deleted file mode 100755
index 1cca0bf45..000000000
--- a/packages/website/public/fonts/RobotoMono-BoldItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Italic.ttf b/packages/website/public/fonts/RobotoMono-Italic.ttf
deleted file mode 100755
index ef92c372c..000000000
--- a/packages/website/public/fonts/RobotoMono-Italic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Light.ttf b/packages/website/public/fonts/RobotoMono-Light.ttf
deleted file mode 100755
index 63229b280..000000000
--- a/packages/website/public/fonts/RobotoMono-Light.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-LightItalic.ttf b/packages/website/public/fonts/RobotoMono-LightItalic.ttf
deleted file mode 100755
index f25bed56a..000000000
--- a/packages/website/public/fonts/RobotoMono-LightItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Medium.ttf b/packages/website/public/fonts/RobotoMono-Medium.ttf
deleted file mode 100755
index 88ff0c15a..000000000
--- a/packages/website/public/fonts/RobotoMono-Medium.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-MediumItalic.ttf b/packages/website/public/fonts/RobotoMono-MediumItalic.ttf
deleted file mode 100755
index 307efad8f..000000000
--- a/packages/website/public/fonts/RobotoMono-MediumItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Regular.ttf b/packages/website/public/fonts/RobotoMono-Regular.ttf
deleted file mode 100755
index b158a334e..000000000
--- a/packages/website/public/fonts/RobotoMono-Regular.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-Thin.ttf b/packages/website/public/fonts/RobotoMono-Thin.ttf
deleted file mode 100755
index 309484d32..000000000
--- a/packages/website/public/fonts/RobotoMono-Thin.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/fonts/RobotoMono-ThinItalic.ttf b/packages/website/public/fonts/RobotoMono-ThinItalic.ttf
deleted file mode 100755
index e1bb9121e..000000000
--- a/packages/website/public/fonts/RobotoMono-ThinItalic.ttf
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/gifs/genesis.gif b/packages/website/public/gifs/genesis.gif
deleted file mode 100644
index 009ecf2f8..000000000
--- a/packages/website/public/gifs/genesis.gif
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/0x-instant-widgets.png b/packages/website/public/images/0x-instant/0x-instant-widgets.png
deleted file mode 100644
index 707f0eccc..000000000
--- a/packages/website/public/images/0x-instant/0x-instant-widgets.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/0x-instant-widgets@2x.png b/packages/website/public/images/0x-instant/0x-instant-widgets@2x.png
deleted file mode 100644
index 35d51387c..000000000
--- a/packages/website/public/images/0x-instant/0x-instant-widgets@2x.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-1.png b/packages/website/public/images/0x-instant/widget-1.png
deleted file mode 100755
index 622c1f42c..000000000
--- a/packages/website/public/images/0x-instant/widget-1.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-2.png b/packages/website/public/images/0x-instant/widget-2.png
deleted file mode 100755
index 7fec16cfb..000000000
--- a/packages/website/public/images/0x-instant/widget-2.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-3.png b/packages/website/public/images/0x-instant/widget-3.png
deleted file mode 100755
index 91ac7d36a..000000000
--- a/packages/website/public/images/0x-instant/widget-3.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-4.png b/packages/website/public/images/0x-instant/widget-4.png
deleted file mode 100755
index 3db35e068..000000000
--- a/packages/website/public/images/0x-instant/widget-4.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-5.png b/packages/website/public/images/0x-instant/widget-5.png
deleted file mode 100755
index 05cebf28b..000000000
--- a/packages/website/public/images/0x-instant/widget-5.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x-instant/widget-6.png b/packages/website/public/images/0x-instant/widget-6.png
deleted file mode 100755
index 33def6e04..000000000
--- a/packages/website/public/images/0x-instant/widget-6.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/0x_logo.png b/packages/website/public/images/0x_logo.png
deleted file mode 100644
index 7b7eafe7d..000000000
--- a/packages/website/public/images/0x_logo.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/about/about-office.png b/packages/website/public/images/about/about-office.png
deleted file mode 100755
index 432d18a8b..000000000
--- a/packages/website/public/images/about/about-office.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/banner/bottomofcta.png b/packages/website/public/images/banner/bottomofcta.png
deleted file mode 100644
index 910022a28..000000000
--- a/packages/website/public/images/banner/bottomofcta.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/banner/topofcta.png b/packages/website/public/images/banner/topofcta.png
deleted file mode 100644
index 710c390ab..000000000
--- a/packages/website/public/images/banner/topofcta.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/clients/bamboo.svg b/packages/website/public/images/clients/bamboo.svg
deleted file mode 100644
index 702b7d5aa..000000000
--- a/packages/website/public/images/clients/bamboo.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg width="70" height="55" viewBox="0 0 70 55" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M44.2922 11.0005C44.2962 10.9978 44.299 10.9951 44.303 10.9924C43.188 10.5459 41.9506 10.3193 40.5868 10.3193C37.1329 10.3193 34.5249 11.6898 32.7657 14.4281H32.4698C32.5599 13.2896 32.6272 12.3008 32.6769 11.4456C32.2358 11.4793 31.7933 11.4996 31.3495 11.4996C30.0798 11.4996 28.8007 11.3606 27.5297 11.0787C26.0812 10.7577 24.7012 10.2626 23.4087 9.61108L24.4685 26.3337C27.3535 27.1592 30.3878 26.6115 32.7738 24.9996C32.7711 24.8566 32.7657 24.7203 32.7657 24.5733V23.7572C32.798 21.1174 33.2419 19.2248 34.0972 18.0783C34.9527 16.9303 36.3097 16.3584 38.1699 16.3584C38.954 16.3584 39.6574 16.5243 40.2801 16.8548C40.9916 14.5522 42.385 12.4964 44.2922 11.0005Z" fill="white"/>
-<path d="M27.9314 9.26574C29.5387 9.62185 31.1634 9.72033 32.7586 9.57464C32.7626 9.35342 32.7667 9.14299 32.7667 8.95818V-9.39018e-08H22.8017L23.2711 7.41367C24.6968 8.26619 26.2623 8.89613 27.9314 9.26574Z" fill="white"/>
-<path d="M48.2361 14.1434C47.608 13.2747 46.8951 12.5571 46.1029 11.9851C43.9079 13.4285 42.3746 15.6919 41.8232 18.2387C41.8635 18.294 41.9052 18.3426 41.9442 18.3992C42.8656 19.7603 43.3269 21.8026 43.3269 24.5247C43.3269 27.2455 42.8696 29.3214 41.9564 30.7473C41.0444 32.1744 39.8138 32.888 38.2684 32.888C36.3599 32.888 34.9651 32.2445 34.0855 30.9577C33.4803 30.0728 33.0889 28.7778 32.8993 27.0944C31.1588 28.0548 29.1911 28.5741 27.1817 28.5741C26.3209 28.5741 25.4521 28.4757 24.5927 28.2801L25.2409 38.5062H30.9894L32.2469 35.4617H32.7661C34.6087 37.821 37.1494 38.9999 40.3908 38.9999C43.6631 38.9999 46.2509 37.7468 48.15 35.2392C50.0505 32.7315 51 29.1933 51 24.6231C51 20.1852 50.0787 16.6915 48.2361 14.1434Z" fill="white"/>
-<path d="M11.4923 11.5399C14.6059 11.5426 17.5366 10.7386 20.3234 9.40857C21.2568 8.96208 22.1042 8.33078 22.9918 7.78447C23.3308 7.57539 23.4195 7.28402 23.3873 6.88609C23.1734 4.32179 21.8486 2.37799 20.0019 0.720171C19.928 0.652725 19.811 0.631142 19.6724 0.569092C19.663 0.729613 19.6375 0.832131 19.6563 0.923857C19.9293 2.30245 20.2992 3.64463 21.1264 4.81415C21.2434 4.98276 21.3039 5.19184 21.3913 5.38069L21.2851 5.46567C18.3059 3.95353 15.1519 3.51379 11.8917 3.71612C11.8742 3.80785 11.8567 3.89958 11.8393 3.9913C13.1116 4.58888 14.3624 5.24175 15.6631 5.76514C16.9609 6.28852 18.31 6.68105 19.6361 7.13159C15.5904 7.36496 11.9133 8.39688 9 11.432C9.83793 11.5196 10.6651 11.5385 11.4923 11.5399Z" fill="white"/>
-<path d="M25.6998 43.0121C25.6998 44.114 25.6998 45.2159 25.6998 46.4026C26.3626 45.6155 27.1068 45.3007 28.0254 45.5187C28.7463 45.6882 29.2347 46.1362 29.5254 46.8264C30.0487 48.11 30.072 49.4299 29.5952 50.7134C28.9905 52.3724 27.1766 52.7962 25.8975 51.6216C25.8393 51.5732 25.7812 51.5247 25.7114 51.4642C25.4091 51.6337 25.5021 52.1665 25.0719 52.1665C24.7463 52.1544 24.4207 52.2149 24.1067 52.1302C23.9207 51.9243 24.0021 51.6942 24.0021 51.4763C24.0021 48.8729 24.0021 46.2694 24.0021 43.666C24.0021 43.448 23.9788 43.2301 23.9788 43C24.537 43.0121 25.1184 43.0121 25.6998 43.0121ZM28.1417 48.8729C28.1766 48.4248 28.1068 47.9889 27.9208 47.5772C27.7114 47.0807 27.3161 46.8385 26.8161 46.8991C26.3044 46.9596 25.9556 47.2624 25.8277 47.7709C25.6649 48.4612 25.6765 49.1635 25.8277 49.8537C25.9556 50.4107 26.3161 50.7497 26.8161 50.774C27.3975 50.8103 27.758 50.5681 27.9673 49.9869C28.0952 49.6357 28.1649 49.2603 28.1417 48.8729Z" fill="white"/>
-<path d="M1.74422 43.0122C1.6977 44.1141 1.80236 45.2282 1.65119 46.3301C1.83724 46.3422 1.88375 46.1848 1.97678 46.1C3.00005 45.0707 4.6745 45.2766 5.36056 46.5722C6.11639 48.0011 6.12802 49.5268 5.45358 50.9799C4.79078 52.433 3.10471 52.7115 1.93027 51.6459C1.8605 51.5854 1.79073 51.5006 1.68608 51.4885C1.65119 51.5006 1.59305 51.5127 1.59305 51.5369C1.46514 52.0576 1.12793 52.215 0.639546 52.1303C0.43024 52.0939 0.209306 52.1061 0 52.0939C0 49.0667 0 46.0395 0 43.0122C0.581406 43.0122 1.16281 43.0122 1.74422 43.0122ZM1.73259 48.8124C1.72096 49.2604 1.73259 49.6964 1.90701 50.1202C2.08143 50.5561 2.39539 50.7741 2.84889 50.7862C3.30238 50.8104 3.65123 50.653 3.8489 50.2171C4.23263 49.3452 4.20938 48.4491 3.90705 47.5773C3.74425 47.1172 3.29076 46.8629 2.83726 46.8871C2.32562 46.9113 2.01166 47.2019 1.82561 47.7347C1.72096 48.0859 1.74422 48.4491 1.73259 48.8124Z" fill="white"/>
-<path d="M64.0688 54.9999C64.0688 54.6608 64.0688 54.3218 64.0688 53.9827C64.3247 53.8374 64.5572 53.9222 64.7782 53.9101C65.2433 53.8859 65.6154 53.7042 65.8479 53.2925C66.1735 52.7234 66.3945 52.1664 66.0805 51.4398C65.3712 49.7688 64.7549 48.0493 64.1037 46.3541C64.0223 46.1482 63.8944 45.9666 63.9642 45.7002C64.3828 45.6154 64.8014 45.6639 65.2898 45.676C65.8363 47.2986 66.4526 48.9091 66.941 50.5922C67.1503 50.3985 67.1154 50.1321 67.1852 49.9141C67.6154 48.6427 68.034 47.3712 68.441 46.0877C68.5457 45.7728 68.6736 45.6154 69.0108 45.6396C69.3364 45.676 69.6736 45.6517 69.9992 45.6517C69.9992 45.7365 69.9992 45.8092 69.9992 45.8939C69.8945 45.9424 69.8945 46.0513 69.8596 46.1361C69.1038 48.2188 68.3131 50.2895 67.5922 52.3843C67.2201 53.4741 66.7433 54.4429 65.6968 54.9757C65.1503 54.9999 64.6154 54.9999 64.0688 54.9999Z" fill="white"/>
-<path d="M56.6293 43.0122C56.6293 46.0273 56.6293 49.0425 56.6293 52.0939C56.1991 52.1545 55.827 52.1303 55.3502 52.1061C55.3502 49.0788 55.3502 46.0516 55.3502 43.0243C55.7805 43.0122 56.1991 43.0122 56.6293 43.0122Z" fill="white"/>
-<path d="M14.9528 46.3544C15.9761 45.1798 17.7203 45.0829 18.8482 46.4391C19.2436 45.9064 19.7436 45.5915 20.3831 45.4704C21.8483 45.2161 22.8832 46.0517 22.9064 47.5895C22.9297 48.9578 22.918 50.3261 22.918 51.7066C22.918 51.8276 22.9413 51.9487 22.825 52.0819C22.325 52.0819 21.7901 52.0819 21.2669 52.0819C21.1273 51.8761 21.1855 51.6702 21.1855 51.4644C21.1738 50.3503 21.1855 49.2484 21.1738 48.1344C21.1622 47.2989 20.8715 46.9114 20.2901 46.8751C19.6622 46.8387 19.1505 47.311 19.0691 48.0618C18.9761 48.9094 19.0343 49.757 19.0226 50.6046C19.0226 51.089 19.0226 51.5612 19.0226 52.0819C18.418 52.1062 17.8947 52.1183 17.29 52.0698C17.29 51.7792 17.3017 51.5249 17.29 51.2585C17.2552 50.1082 17.3714 48.9578 17.2203 47.8196C17.1389 47.2504 16.9063 46.9598 16.4644 46.8751C15.9877 46.7903 15.5342 47.0325 15.3133 47.5047C15.1505 47.8559 15.0923 48.2313 15.0923 48.6188C15.0923 49.7449 15.0923 50.871 15.0923 52.0335C14.4993 52.1425 13.9644 52.094 13.383 52.0698C13.383 49.9023 13.383 47.7711 13.383 45.6157C13.7086 45.4704 14.0574 45.5552 14.3946 45.5552C14.9179 45.5673 14.6853 46.1606 14.9528 46.3544Z" fill="white"/>
-<path d="M10.5367 48.1098C10.6065 47.0805 10.2111 46.6809 9.35062 46.7899C8.83898 46.8504 8.33897 47.0199 7.83896 47.25C7.6064 46.8746 7.43198 46.5114 7.30407 46.1118C7.46686 45.8212 7.76919 45.7969 8.01338 45.7122C8.83898 45.4458 9.6762 45.3368 10.5251 45.5305C11.653 45.7969 12.2344 46.3903 12.2925 47.5891C12.3507 49.0785 12.3042 50.5679 12.3042 52.0573C11.9437 52.251 11.5948 52.1905 11.2576 52.142C10.8506 52.0815 10.9902 51.5608 10.7227 51.3671C10.6065 51.355 10.5483 51.4518 10.4785 51.5245C9.7576 52.3237 8.83898 52.3963 7.90873 52.1663C7.11802 51.9725 6.76917 51.3186 6.66452 50.5194C6.54824 49.6476 6.8622 48.9332 7.50175 48.5578C8.03664 48.243 8.62967 48.1461 9.22271 48.1098C9.65295 48.0855 10.0716 48.1098 10.5367 48.1098ZM10.5134 49.0785C10.025 49.1753 9.55992 49.1148 9.10643 49.2722C8.54828 49.466 8.33897 49.8777 8.46688 50.4468C8.5599 50.8585 8.97852 51.0522 9.51341 50.9311C10.3506 50.7495 10.6646 50.2046 10.5134 49.0785Z" fill="white"/>
-<path d="M33.7683 52.2389C32.0124 52.3358 30.8147 51.0522 30.7101 49.1874C30.6868 48.7515 30.7101 48.3156 30.7915 47.8676C31.1636 45.8817 32.8148 45.2762 34.2683 45.4942C36.3381 45.809 36.9079 47.6133 36.8148 49.1874C36.78 49.7929 36.6404 50.3741 36.3265 50.9069C35.8148 51.7909 34.9776 52.2389 33.7683 52.2389ZM35.0241 48.8847C35.0241 48.4609 35.0357 48.0371 34.8729 47.6375C34.6636 47.141 34.2799 46.9231 33.7799 46.8989C33.2683 46.8746 32.8613 47.1168 32.6752 47.6012C32.3496 48.4125 32.3729 49.248 32.6636 50.0714C32.8613 50.6284 33.2101 50.8222 33.8613 50.7858C34.4195 50.7616 34.6985 50.5437 34.8962 49.9987C35.0241 49.6476 35.0241 49.2601 35.0241 48.8847Z" fill="white"/>
-<path d="M40.6856 52.2391C39.0344 52.3238 37.7669 51.1371 37.6506 49.3087C37.5925 48.3884 37.639 47.4923 38.1623 46.7053C38.8832 45.6154 39.953 45.349 41.1275 45.4822C42.3833 45.6276 43.2205 46.3662 43.581 47.6376C43.8135 48.4611 43.8135 49.3208 43.581 50.1442C43.2089 51.4278 42.2205 52.2996 40.6856 52.2391ZM41.9647 48.8243C41.9996 48.5216 41.9414 48.2068 41.86 47.8919C41.6856 47.238 41.3368 46.9353 40.7088 46.899C40.1158 46.8748 39.7088 47.1291 39.5228 47.7466C39.3018 48.4974 39.3135 49.2602 39.5344 49.9989C39.6972 50.5559 40.1158 50.8223 40.6856 50.8223C41.2437 50.8223 41.6391 50.5317 41.8135 49.9626C41.9298 49.6114 42.0112 49.236 41.9647 48.8243Z" fill="white"/>
-<path d="M54.5122 49.1998C53.1052 49.1998 51.768 49.1998 50.4424 49.1998C50.3377 50.3381 50.9656 51.0888 52.0122 51.1373C52.7331 51.1736 53.4308 51.0525 54.082 50.7498C54.1401 50.8103 54.1866 50.8467 54.1866 50.8709C54.2099 51.9849 54.3843 51.8638 53.2796 52.1544C52.5936 52.3361 51.8494 52.324 51.1401 52.1544C50.0703 51.888 49.3842 51.1494 49.1168 50.0475C48.8958 49.1514 48.9424 48.2432 49.2447 47.3714C49.7098 46.0152 50.9191 45.3371 52.4308 45.5671C53.5703 45.7367 54.4076 46.7296 54.5238 48.0495C54.5471 48.4006 54.5122 48.7639 54.5122 49.1998ZM53.1982 48.1948C53.0587 46.9355 52.5936 46.4995 51.5703 46.6327C50.861 46.7175 50.3959 47.3956 50.5122 48.1948C51.3959 48.1948 52.2796 48.1948 53.1982 48.1948Z" fill="white"/>
-<path d="M58.9435 46.9957C58.7458 46.7656 58.6876 46.4387 58.5597 46.1481C58.99 45.809 59.4551 45.7121 59.9319 45.6274C60.583 45.5063 61.2458 45.4942 61.8854 45.7C62.6296 45.9422 63.1063 46.4871 63.1296 47.2742C63.1877 48.8605 63.1412 50.4468 63.1412 52.033C62.3156 52.2389 62.3156 52.2389 61.9551 51.3307C61.8621 51.3065 61.8156 51.367 61.7691 51.4276C61.083 52.3358 60.1295 52.3358 59.176 52.1783C58.5248 52.0694 58.0132 51.4276 57.9202 50.7495C57.7923 49.7686 58.0597 49.0784 58.769 48.6788C59.2807 48.3761 59.8505 48.2429 60.4319 48.2308C60.897 48.2187 61.3505 48.2308 61.7923 48.2308C61.9668 47.0562 61.6063 46.6203 60.5946 46.6203C60.2225 46.6203 59.8737 46.693 59.5249 46.8383C59.3388 46.9109 59.176 47.0441 58.9435 46.9957ZM61.8272 49.0663C61.1412 49.0542 60.5016 49.03 59.897 49.2964C59.3853 49.5144 59.1993 49.9261 59.2923 50.5194C59.3621 50.9432 59.7109 51.2096 60.2458 51.2096C60.5714 51.2096 60.897 51.137 61.1877 50.9432C61.8389 50.5073 61.897 49.8534 61.8272 49.0663Z" fill="white"/>
-<path d="M46.1743 52.0816C45.7208 52.1301 45.3371 52.1301 44.9185 52.0816C44.9185 49.9626 44.9185 47.8556 44.9185 45.7244C45.2092 45.5912 45.5347 45.6639 45.872 45.6881C45.9417 46.0393 46.0115 46.3662 46.0813 46.7416C46.4417 46.3904 46.6976 45.9666 47.1511 45.7486C47.6162 45.5307 48.0697 45.5186 48.6046 45.5912C48.6627 46.0272 48.6046 46.4267 48.5813 46.8142C48.2906 46.9353 48.0813 46.7779 47.8371 46.8142C46.7906 46.9595 46.2092 47.6255 46.1859 48.7759C46.1743 49.6598 46.1859 50.5438 46.1859 51.4399C46.1743 51.6215 46.1743 51.8274 46.1743 52.0816Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/emoon.svg b/packages/website/public/images/clients/emoon.svg
deleted file mode 100644
index 1b14c41b0..000000000
--- a/packages/website/public/images/clients/emoon.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="56" height="57" viewBox="0 0 56 57" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M45.9154 25.5331C40.1112 25.5331 34.2797 25.5331 28.2302 25.5331C28.2302 29.7282 28.2302 33.7069 28.2302 37.6585C23.2979 38.281 14.7414 34.9519 10.9537 27.0487C7.1932 19.1727 9.50944 9.34786 16.4309 4.01594C23.5432 -1.47838 33.6802 -1.37011 40.6562 4.55725C46.9509 9.8621 48.9129 18.9832 45.9154 25.5331ZM16.5672 18.5772C24.3607 18.5772 31.9907 18.5772 39.8114 18.5772C39.6479 14.7068 38.0402 11.7296 35.0699 9.61851C31.1732 6.83076 26.9494 6.50597 22.6712 8.83361C18.8562 10.8635 16.9759 14.1655 16.5672 18.5772Z" fill="white"/>
-<path d="M8.85624 52.382H2.86125C3.13375 53.3564 3.84225 53.8977 4.82324 53.8977C5.55899 53.8977 6.26749 53.6 6.83974 53.0316L8.31124 54.4931C7.43924 55.4675 6.13124 56.0088 4.55074 56.0088C1.71675 56.0088 0 54.2766 0 51.6783C0 49.0259 1.7985 47.2666 4.49624 47.2666C7.52099 47.2396 9.04699 49.2424 8.85624 52.382ZM6.10399 50.8663C6.10399 49.892 5.47724 49.2153 4.49624 49.2153C3.56975 49.2153 2.97025 49.892 2.7795 50.8663H6.10399Z" fill="white"/>
-<path d="M24.9048 50.4874V55.8734H22.0708V51.2723C22.0708 50.2979 21.5258 49.7025 20.6538 49.7025C19.6456 49.7296 19.0188 50.5145 19.0188 51.6241V55.8464H16.1848V51.2452C16.1848 50.2709 15.6398 49.6754 14.7678 49.6754C13.7596 49.7025 13.1328 50.4874 13.1328 51.5971V55.8193H10.2988V47.2666H13.1328V48.674C13.7323 47.6726 14.6861 47.1583 15.9396 47.1583C17.3293 47.1583 18.3921 47.862 18.8008 49.08C19.3458 47.8079 20.4086 47.1583 21.8256 47.1583C23.6786 47.2125 24.9048 48.4845 24.9048 50.4874Z" fill="white"/>
-<path d="M35.5633 51.5971C35.5633 54.2495 33.683 55.9817 30.849 55.9817C28.015 55.9817 26.1348 54.2495 26.1348 51.5971C26.1348 48.9717 27.9878 47.2395 30.849 47.2395C33.7103 47.2395 35.5633 48.9717 35.5633 51.5971ZM28.996 51.6512C28.996 52.9233 29.759 53.7894 30.849 53.7894C31.9663 53.7894 32.702 52.9233 32.702 51.6512C32.702 50.3791 31.9663 49.5401 30.849 49.5401C29.759 49.513 28.996 50.3791 28.996 51.6512Z" fill="white"/>
-<path d="M45.7254 51.5971C45.7254 54.2495 43.8451 55.9817 41.0111 55.9817C38.1771 55.9817 36.2969 54.2495 36.2969 51.5971C36.2969 48.9717 38.1499 47.2395 41.0111 47.2395C43.8724 47.2395 45.7254 48.9717 45.7254 51.5971ZM39.1581 51.6512C39.1581 52.9233 39.9211 53.7894 41.0111 53.7894C42.1284 53.7894 42.8641 52.9233 42.8641 51.6512C42.8641 50.3791 42.1284 49.5401 41.0111 49.5401C39.9211 49.513 39.1581 50.3791 39.1581 51.6512Z" fill="white"/>
-<path d="M56.0009 50.4874V55.8734H53.1669V51.2723C53.1669 50.2979 52.5946 49.7025 51.6954 49.7025C50.7416 49.7296 50.1149 50.3791 50.0059 51.3264V55.8464H47.1719V47.2937H50.0059V48.674C50.6054 47.6996 51.6136 47.1583 52.8671 47.1583C54.7474 47.2125 56.0009 48.4845 56.0009 50.4874Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/ercdex.svg b/packages/website/public/images/clients/ercdex.svg
deleted file mode 100644
index 41a0ff3b0..000000000
--- a/packages/website/public/images/clients/ercdex.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<svg width="33" height="48" viewBox="0 0 33 48" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16152 21.0377C2.1613 23.4544 2.16546 25.8711 2.1567 28.288C2.15538 28.6091 2.30283 29.0977 1.96829 29.202C1.56255 29.3284 1.20567 28.9928 0.973885 28.6151C0.501547 27.8461 0.13415 27.0646 0.138093 26.1145C0.159563 20.8668 0.138312 15.619 0.1554 10.3711C0.159344 9.16291 0.21981 9.12677 1.28695 9.63525C5.56493 11.6742 9.8278 13.7439 14.1045 15.7853C14.8239 16.1288 15.429 16.5203 15.5061 17.4008C15.5692 18.1211 15.2474 18.4863 14.5404 18.2975C14.0173 18.1577 13.53 17.8755 13.0349 17.6398C9.74783 16.0747 6.45308 14.5253 3.18462 12.9226C2.34314 12.5098 2.1326 12.6693 2.14772 13.5807C2.18847 16.0659 2.16152 18.552 2.16152 21.0377" fill="white"/>
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="17" y="9" width="16" height="27">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5312 9.59204H32.9286V35.2771H17.5312V9.59204Z" fill="white"/>
-</mask>
-<g mask="url(#mask0)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M17.5488 25.3121C17.5488 22.8275 17.5799 20.3425 17.5324 17.859C17.5151 16.9481 17.689 16.3417 18.6181 15.9169C22.8626 13.9771 27.0738 11.964 31.2972 9.97869C31.7776 9.75281 32.3431 9.27566 32.7512 9.90486C33.1142 10.4646 32.8827 11.0857 32.3961 11.5826C31.9457 12.0431 31.3539 12.2411 30.8019 12.5062C27.5847 14.0499 24.3806 15.6233 21.1266 17.0859C19.8779 17.6472 19.4552 18.3837 19.4885 19.7705C19.5935 24.1157 19.5273 28.4653 19.5269 32.813C19.5269 33.2961 19.5433 33.7802 19.5157 34.262C19.4861 34.7762 19.3181 35.2231 18.7066 35.2735C18.0888 35.3243 17.8479 34.8237 17.6991 34.3967C17.5462 33.9579 17.5569 33.4503 17.5547 32.9727C17.5427 30.4193 17.549 27.8655 17.5488 25.3121" fill="white"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M31.5424 7.52054C31.5145 7.78979 31.3307 7.86997 31.1704 7.99616C30.3475 8.64508 29.6074 8.1872 28.8704 7.83689C25.6554 6.30837 22.4468 4.7667 19.234 3.23379C18.7406 2.99828 18.2135 2.82477 17.7442 2.55092C16.8795 2.04616 16.1101 2.17651 15.236 2.60963C11.9848 4.22119 8.70081 5.76702 5.42491 7.32841C4.74598 7.65221 4.0493 7.9392 3.35876 8.23825C2.94776 8.41658 2.49054 8.46324 2.28658 8.01237C2.08546 7.56764 2.09423 7.05959 2.6347 6.76033C2.87547 6.62713 3.10594 6.47334 3.35394 6.35635C7.5031 4.39974 11.6597 2.45891 15.7992 0.482144C16.4076 0.191644 16.8819 0.174774 17.5087 0.481487C21.8126 2.58751 26.1438 4.6381 30.4577 6.72396C30.8641 6.92048 31.3794 7.02432 31.5424 7.52054" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M22.7216 31.8144C22.4408 31.7018 22.2732 31.4792 22.2309 31.1979C22.1091 30.3845 22.2666 29.6725 23.0855 29.2807C25.998 27.8867 28.9054 26.482 31.8349 25.1252C32.5575 24.7907 33.0103 25.2308 32.8745 26.0445C32.7674 26.6879 32.4532 27.1876 31.8363 27.4808C28.9196 28.8651 26.0072 30.2585 23.093 31.6481C22.9705 31.7068 22.8452 31.7599 22.7216 31.8144" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M25.3483 10.558C25.2596 10.6741 25.1682 10.8647 25.0184 10.978C24.4579 11.4008 23.8897 11.2926 23.276 11.0323C20.2472 9.74786 17.3273 8.23905 14.3851 6.77538C14.1441 6.65576 13.8244 6.5942 13.8481 6.25374C13.8759 5.85392 14.2457 5.70823 14.5408 5.58007C14.9992 5.38159 15.4555 5.45016 15.9252 5.67756C18.8206 7.07902 21.7311 8.44915 24.6271 9.84973C24.9077 9.98534 25.3097 10.0528 25.3483 10.558" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M7.66389 9.32442C7.61438 8.98528 7.81111 8.88451 7.98747 8.79403C8.5297 8.51645 9.00882 8.23274 9.70572 8.57911C12.5794 10.0066 15.4932 11.3533 18.3824 12.75C18.7121 12.9092 19.278 12.9982 19.0979 13.5603C18.9652 13.9753 18.5588 14.1871 18.1112 14.1615C17.7771 14.1422 17.4173 14.1052 17.1214 13.9656C14.0959 12.5368 11.08 11.0874 8.06546 9.63573C7.89896 9.55555 7.76598 9.40526 7.66389 9.32442" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M10.4641 44.7585C10.4641 44.1654 10.4604 43.5722 10.4669 42.9791C10.4685 42.8461 10.4249 42.7688 10.3092 42.7046C10.0297 42.5497 9.73455 42.4448 9.42192 42.3834C9.07468 42.3151 8.7213 42.2791 8.37801 42.3609C7.75757 42.5083 7.2653 42.8483 6.95595 43.421C6.63281 44.0189 6.55285 44.6586 6.63062 45.3268C6.70335 45.9525 6.92068 46.5056 7.39609 46.9396C7.87675 47.3785 8.45118 47.5152 9.07556 47.4245C9.54483 47.3561 9.95451 47.1353 10.318 46.8253C10.4264 46.733 10.4685 46.6423 10.4669 46.5032C10.4604 45.9218 10.4641 45.3401 10.4641 44.7585M10.445 42.2412C10.4779 42.1709 10.4641 42.1008 10.4641 42.0329C10.4652 41.1277 10.4687 40.2226 10.4608 39.3176C10.4597 39.1743 10.5024 39.1034 10.6387 39.0795C10.7439 39.0611 10.8378 38.9868 10.9621 39.012V47.7669C10.8004 47.7873 10.6426 47.7816 10.4779 47.7706C10.4409 47.6019 10.4895 47.4332 10.4483 47.2746C10.3703 47.2547 10.3331 47.3079 10.2901 47.3408C9.83423 47.6904 9.32115 47.9032 8.74606 47.9056C7.95365 47.9093 7.27165 47.6348 6.7544 47.0111C6.30616 46.4706 6.11578 45.8353 6.07722 45.1467C6.04392 44.5523 6.11841 43.9733 6.37561 43.4302C6.79931 42.5361 7.49423 42.0033 8.4836 41.8743C9.13164 41.7897 9.74156 41.9192 10.3208 42.2123C10.3552 42.2296 10.3865 42.2621 10.445 42.2412" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13.9915 39.773C14.0598 39.747 14.1181 39.7544 14.1753 39.7544C15.5701 39.754 16.9648 39.754 18.3595 39.7542C18.5547 39.7542 18.5562 39.7548 18.5547 39.9542C18.554 40.0458 18.5667 40.1387 18.5418 40.2296C18.4819 40.2646 18.4169 40.2478 18.3551 40.2478C17.1449 40.2489 15.9345 40.2486 14.7243 40.2486C14.5216 40.2486 14.5218 40.2491 14.5218 40.4577C14.5218 41.4258 14.5218 42.3941 14.5216 43.3624C14.5216 43.527 14.5216 43.5274 14.6921 43.5274C15.6891 43.5276 16.6861 43.5274 17.6832 43.5276C17.8858 43.5276 17.8858 43.5281 17.8856 43.7362C17.8856 43.8216 17.8856 43.9066 17.8856 43.9798C17.8335 44.03 17.7848 44.0118 17.741 44.0118C16.7324 44.0129 15.7237 44.0124 14.7151 44.0127C14.5216 44.0127 14.5218 44.0131 14.5218 44.2118C14.5218 45.1801 14.5216 46.1483 14.5225 47.1166C14.5225 47.167 14.5076 47.22 14.5446 47.2853H18.5332C18.5713 47.4511 18.5549 47.6025 18.5457 47.7653H13.9915V39.773Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M20.6225 39.7707C20.8164 39.7411 20.9831 39.7597 21.1489 39.7547C21.235 39.752 21.2644 39.8219 21.3027 39.8765C21.6811 40.4132 22.0579 40.9506 22.4354 41.4878C22.8323 42.0533 23.2298 42.6185 23.6267 43.1839C23.6532 43.2216 23.6754 43.2624 23.7214 43.2856C23.7959 43.2464 23.8292 43.1695 23.8743 43.1053C24.6264 42.0359 25.3781 40.9664 26.1251 39.8938C26.2428 39.7271 26.2666 39.7562 26.3922 39.7518C26.5499 39.7463 26.6875 39.7463 26.8198 39.7463C26.7738 39.8302 26.7526 39.8727 26.7219 39.9155C25.8697 41.097 25.0161 42.2774 24.1639 43.4591C24.0088 43.6742 24.0046 43.6085 24.1694 43.8361C25.074 45.0864 25.9814 46.3345 26.8871 47.5842C26.9237 47.6348 26.9721 47.6784 26.9968 47.7743C26.7981 47.7743 26.6071 47.7791 26.4167 47.7697C26.3852 47.7682 26.3532 47.7077 26.3269 47.6705C25.5531 46.5814 24.7804 45.4919 24.0071 44.4027C23.9111 44.2675 23.814 44.1336 23.7205 44.0033C23.6397 44.0173 23.6215 44.0784 23.5897 44.1236C22.76 45.2998 21.9299 46.4758 21.104 47.6549C21.0403 47.7461 20.9756 47.7866 20.8641 47.7787C20.7226 47.7686 20.5795 47.7763 20.4211 47.7763C20.4389 47.6884 20.4891 47.64 20.527 47.5874C21.4258 46.3472 22.3267 45.1083 23.2245 43.8675C23.4263 43.5888 23.4116 43.6801 23.2262 43.4199C22.404 42.2664 21.5779 41.1156 20.7537 39.9637C20.7138 39.9078 20.6766 39.8502 20.6225 39.7707" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/godsUnchained.svg b/packages/website/public/images/clients/godsUnchained.svg
deleted file mode 100644
index f039b00f9..000000000
--- a/packages/website/public/images/clients/godsUnchained.svg
+++ /dev/null
@@ -1,16 +0,0 @@
-<svg width="64" height="56" viewBox="0 0 64 56" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M49.6638 13.9894C49.7509 13.7863 49.7654 13.5106 49.6929 13.3075C49.3011 12.1903 48.8948 11.0875 48.4741 9.98483C48.4015 9.7962 48.2564 9.56405 48.0823 9.50602C46.7765 9.0127 45.4706 8.54839 44.1503 8.06958C43.7585 7.92449 43.1491 7.44568 42.975 6.90883C42.4382 5.24024 41.9884 4.05047 41.437 2.38189C41.3209 2.01915 41.1033 1.83053 40.7551 1.71446C39.6669 1.3227 38.5641 0.945456 37.4904 0.510173C36.9536 0.292532 36.4893 0.33606 35.967 0.568211C34.7772 1.10506 33.5729 1.61289 32.3686 2.0917C32.122 2.19327 31.7447 2.17876 31.4981 2.07719C30.0036 1.45329 28.4946 0.800362 27.0001 0.118419C26.6229 -0.0556942 26.3327 -0.0266754 25.9845 0.132928C24.9253 0.59723 23.8516 1.03251 22.8069 1.52583C22.5748 1.6274 22.3571 1.87406 22.241 2.10621C21.5881 3.48461 20.9642 4.863 20.3693 6.2559C20.1952 6.67668 19.9486 6.90883 19.5278 7.06843C18.2655 7.53273 17.0177 8.05507 15.7408 8.51937C15.291 8.67898 15.0154 8.92564 14.8412 9.37543C14.4495 10.3911 13.9852 11.3632 13.6079 12.3789C13.5064 12.6401 13.5064 12.9883 13.5934 13.264C14.0142 14.4392 14.493 15.6 14.9138 16.7897C15.0008 17.0364 15.0008 17.3556 14.9138 17.6023C14.2899 19.1548 13.637 20.7073 12.955 22.2598C12.8099 22.579 12.8244 22.8257 12.955 23.1449C13.4483 24.3492 13.9271 25.5679 14.3624 26.7867C14.493 27.164 14.7107 27.3526 15.0879 27.4977C16.5098 28.0491 17.9172 28.6294 19.3101 29.2388C19.5858 29.3549 19.847 29.6451 19.9631 29.9208C20.5725 31.4152 21.1383 32.9387 21.7042 34.4477C21.8493 34.8395 22.0814 35.0861 22.4732 35.2312C23.3583 35.5649 24.2143 35.9277 25.0849 36.3049C25.5347 36.4935 25.9555 36.5081 26.4052 36.3049C27.7111 35.7245 29.0169 35.1587 30.3373 34.6218C30.5695 34.5203 30.9177 34.4767 31.1353 34.5783C32.6733 35.2312 34.1823 35.9277 35.7058 36.6096C35.8944 36.6967 36.112 36.7547 36.2717 36.8127C36.4603 36.7547 36.6054 36.7402 36.736 36.6822C37.6936 36.2904 38.6512 35.8696 39.6088 35.4924C40.0151 35.3328 40.2763 35.0861 40.4504 34.6799C41.0017 33.3885 41.5966 32.1262 42.1335 30.8349C42.3076 30.4141 42.5542 30.1819 42.975 30.0223C44.484 29.4275 45.7898 28.8035 47.2988 28.2087C47.6761 28.0636 47.9517 27.8604 48.1113 27.4542C48.4741 26.5546 49.1125 25.684 49.4027 24.7699C49.5333 24.3492 49.5042 23.8123 49.3446 23.3915C48.9094 22.2163 48.387 21.07 47.8792 19.9238C47.647 19.4014 47.6325 18.9371 47.8647 18.4003C48.4886 16.9494 49.0835 15.4694 49.6638 13.9894ZM35.227 2.23679C35.8509 1.99013 36.3442 2.17876 36.9681 2.3964C37.7516 2.67208 38.5496 2.90423 39.3477 3.19442C39.5073 3.25245 39.6959 3.39755 39.7684 3.55715C40.0006 4.03596 40.3488 5.03711 40.3488 5.03711C40.3488 5.03711 41.1468 7.05392 41.1323 7.11196C40.8856 7.06843 38.0998 5.84964 36.9681 5.37083C36.823 5.31279 36.5909 5.31279 36.4313 5.38534C35.5027 5.82062 30.1777 7.90998 30.1777 7.90998C30.1777 7.90998 29.6844 8.62094 29.4087 9.07073C29.4087 9.07073 29.1185 9.62209 29.0024 9.9413C28.6542 10.8554 28.277 11.7695 27.9142 12.6691L26.3907 16.3109C25.6072 18.1681 24.7947 20.0253 24.0112 21.8971C23.9386 22.0857 23.8081 22.2453 23.7065 22.4194C23.6485 22.4049 23.6049 22.4049 23.5469 22.3904C23.4598 22.0276 23.4018 21.6504 23.2567 21.3167C23.0826 20.8814 22.8214 20.5042 22.6183 20.0834C22.2556 19.3289 21.8058 18.6324 22.212 17.6893C23.7936 13.9314 25.3461 10.1589 26.8695 6.37198C27.0872 5.83513 27.4064 5.51592 27.9432 5.29828C30.3373 4.36968 32.8329 3.20893 35.227 2.23679ZM30.0906 10.3911C32.4992 11.4067 34.8207 12.3789 37.1712 13.3655L35.7783 16.6882L28.6687 13.7283L29.9455 10.6523C30.0181 10.5652 30.0471 10.4781 30.0906 10.3911ZM34.7627 19.1548L34.3709 20.0834C34.2548 20.301 34.1388 20.5042 34.0952 20.7363L33.8776 21.2732L26.768 18.3132L28.1174 15.0921L35.227 18.0521L35.1544 18.2117C35.0238 18.5309 34.8933 18.8501 34.7627 19.1548ZM24.9253 22.7386L26.1731 19.7497C28.5381 20.7508 30.8451 21.7229 33.2247 22.7096C32.7459 23.8558 32.3106 24.886 31.8463 25.9887C31.6286 25.9307 31.3239 25.8872 31.0483 25.7711C29.2346 25.0021 27.4209 24.2041 25.6072 23.4206C25.1429 23.2319 24.9398 23.0433 24.9253 22.7386ZM19.847 11.2617C21.0077 8.72251 22.0669 6.12532 23.1551 3.54264C23.3873 2.97678 23.8806 2.78815 24.3739 2.61404C24.4755 2.58502 25.6798 1.88857 26.5649 1.71446C27.0292 1.6274 27.2178 1.85955 27.5515 1.99013C28.2479 2.28032 28.9299 2.58502 29.6118 2.88972C29.6989 2.91874 29.7569 2.99128 29.9601 3.13638C29.0605 3.52813 27.4354 4.21008 27.4354 4.21008C27.4354 4.21008 26.5358 4.60183 26.3472 4.81947C25.999 5.21123 25.5782 5.76258 25.4186 6.19787C24.1128 9.57856 22.6908 12.9157 21.3124 16.2674C21.2979 16.3109 21.2399 16.3254 21.1383 16.427C20.9497 16.0933 20.7611 15.7886 20.6015 15.4549C20.3548 14.918 20.0936 14.3667 19.905 13.8008C19.7744 13.4091 19.5568 12.7416 19.5133 12.3354C19.4697 11.9001 19.6293 11.7405 19.847 11.2617ZM15.262 12.9302C15.5087 12.495 16.031 11.5083 16.031 11.5083C16.031 11.5083 16.4518 10.4636 16.7275 10.0574C16.9306 9.75268 17.7141 9.53503 17.7141 9.53503C17.7141 9.53503 19.2086 8.88211 19.5423 8.63545C19.4262 8.96917 19.2666 9.43347 19.0925 9.89777C18.8458 10.5217 18.6137 11.1601 18.3235 11.7695C18.1349 12.1612 18.1784 12.4804 18.3525 12.8722C19.8035 16.3254 21.2399 19.7787 22.6763 23.2319C22.7344 23.377 22.7779 23.5511 22.8359 23.7398C22.241 23.8994 22.212 23.8413 21.3995 23.3915C21.2979 23.3335 19.4552 22.7096 18.6862 22.4049C18.5121 22.3323 18.3235 22.1002 18.309 21.9261C18.251 20.9975 17.7431 20.2575 17.3949 19.445C17.0757 18.6905 16.829 17.9215 16.5098 17.1815C16.0455 16.1368 15.7698 15.0341 15.32 13.9894C15.0879 13.5541 15.0444 13.293 15.262 12.9302ZM18.8168 27.2075C17.9898 26.8593 15.6247 25.9887 15.6247 25.9887L14.522 23.2755C14.4495 23.1013 14.464 22.8982 14.5656 22.7241C15.0008 21.9696 16.0455 19.5465 16.1906 19.3869C16.4663 19.9963 17.2643 22.0131 17.511 22.608C17.6851 23.0433 17.9608 23.3045 18.396 23.4931C21.7767 24.857 25.1429 26.2499 28.5091 27.6428C28.7268 27.7298 28.9154 27.8459 29.2781 28.0345C28.9009 28.1942 28.6687 28.3102 28.4366 28.3973C27.537 28.76 26.6519 29.1228 25.7523 29.5C25.23 29.7322 24.7512 29.6886 24.2143 29.4565C22.4297 28.6875 20.616 27.962 18.8168 27.2075ZM28.9299 33.2144C28.3205 33.4756 25.8394 34.5058 25.7233 34.4767C25.5492 34.4332 22.9665 33.7513 22.7489 33.5336C22.6618 33.4466 21.472 29.8627 21.1528 29.6451C21.1964 29.5725 22.4732 30.1384 22.5022 30.0659C23.2277 30.3561 23.9677 30.6317 24.6786 30.9655C25.0994 31.1686 25.4621 31.1831 25.9119 30.98C27.8127 30.1384 29.7279 29.3404 31.6431 28.5424C32.151 28.3392 32.4992 28.0781 32.7168 27.5122C32.949 26.8883 33.1957 26.2644 33.4423 25.6405H33.4568L38.361 13.9024C38.4045 13.9459 38.4626 14.0039 38.5351 14.062C38.5496 14.0765 38.5641 14.091 38.5641 14.1055L40.1312 17.907C40.1602 18.1391 40.1457 18.4003 40.0731 18.6034C38.5061 22.4194 36.8956 26.2209 35.3285 30.0514C35.1254 30.5302 34.8497 30.8349 34.3564 31.0235C32.5427 31.7345 30.7291 32.4599 28.9299 33.2144ZM42.5107 24.7554C41.5821 27.0044 39.5218 33.1419 38.7092 33.5917C37.8242 34.085 35.8219 35.1732 35.8219 35.1732C35.8219 35.1732 32.92 33.8964 32.4121 33.6207C32.3106 33.5626 32.1945 33.5191 32.0059 33.4321C32.1945 33.3015 32.2961 33.1854 32.4267 33.1274C33.5294 32.6485 34.6321 32.1552 35.7493 31.6909C36.112 31.5458 36.3297 31.3427 36.4748 30.9655C37.592 28.1361 38.7528 25.3213 39.8845 22.4919C40.0296 22.1292 40.1602 21.7665 40.3053 21.4183C40.2908 21.4473 40.2617 21.4763 40.2472 21.5053L40.9002 19.8222C40.9582 19.9093 42.1625 22.7966 42.1625 22.7966C42.2786 23.1013 42.3946 23.406 42.4672 23.7252C42.5687 24.059 42.6268 24.4652 42.5107 24.7554ZM47.4729 24.059C47.1392 24.7554 46.2832 26.7867 46.2832 26.7867C46.2832 26.7867 43.4683 28.0781 42.7429 28.1942C42.975 27.5702 43.6715 25.1762 43.9762 24.5523C44.2373 24.0009 44.0487 23.5947 43.7585 23.1739L39.3477 12.4514C39.5653 12.4659 39.7829 12.5675 40.0006 12.6546C41.0453 13.0753 42.0899 13.5251 43.1491 13.9459C43.5409 14.1055 43.773 14.3522 43.9181 14.7439C44.8903 17.167 45.8769 19.5756 46.878 21.9841C47.1392 22.608 47.7776 23.4206 47.4729 24.059ZM46.5298 15.658C46.3412 16.1513 46.022 17.2686 45.9639 17.2831C45.8479 17.138 44.9048 14.8745 44.4985 13.8734C44.3389 13.4671 44.0777 13.2204 43.6715 13.0463C40.3778 11.7114 37.0987 10.3766 33.8196 9.0272C33.5004 8.89662 33.1811 8.72251 32.8764 8.5629C32.8764 8.47585 32.8764 8.38879 32.8619 8.30173C34.2984 7.72136 35.7348 7.12647 37.1857 6.5606C37.3018 6.51707 37.4759 6.60413 37.6065 6.64766C39.7974 7.57626 42.0319 8.46134 44.1793 9.50602C44.8177 9.81071 45.8624 10.0138 46.4282 10.5942C46.8925 11.073 47.5455 13.2785 47.5455 13.2785C47.5455 13.2785 46.6314 15.3823 46.5298 15.658Z" fill="white"/>
-<path d="M0 55.3291V46.5164L0.638921 45.8995H3.15054L3.76743 46.5164V47.7943L3.92165 48.4112H2.3574L2.53365 47.7943V47.2875L2.37943 47.1333H1.41003L1.27784 47.2875V54.536L1.43206 54.6902H2.40146L2.55568 54.536V52.1786H2.15911L1.8727 50.9007H3.89962L3.7454 51.5397V55.3291L3.12851 55.946H0.638921L0 55.3291Z" fill="white"/>
-<path d="M8.61313 46.5164V55.3291L7.99624 55.946H5.46259L4.8457 55.3291V46.5164L5.46259 45.8995H7.97421L8.61313 46.5164ZM7.18107 47.1774H6.2337L6.07948 47.3316V54.558L6.2337 54.7122H7.18107L7.33529 54.558V47.3096L7.18107 47.1774Z" fill="white"/>
-<path d="M9.51758 45.8995H12.8003L13.4392 46.5164V55.3291L12.8003 55.946H9.51758L9.6718 55.3291V46.5164L9.51758 45.8995ZM10.9276 54.536L11.0818 54.6902H12.0512L12.2055 54.536V47.2875L12.0512 47.1333H11.0818L10.9276 47.2875V54.536Z" fill="white"/>
-<path d="M18.4182 48.4112H16.854L17.0082 47.7943V47.3096L16.854 47.1553H15.8846L15.7303 47.3096V50.1517L15.8846 50.3059H17.6251L18.242 50.9228V55.3291L17.6251 55.946H15.1135L14.4745 55.3291V54.0513L14.3203 53.4564H15.8846L15.7303 54.0513V54.536L15.8846 54.6902H16.854L17.0082 54.536V51.6939L16.854 51.5397H15.1135L14.4745 50.9007V46.4944L15.1135 45.8995H17.6251L18.242 46.5164V47.7943L18.4182 48.4112Z" fill="white"/>
-<path d="M26.1072 46.5164V55.3291L25.4683 55.946H22.9567L22.3398 55.3291V46.5164L22.1855 45.8995H23.7498L23.5735 46.5164V54.536L23.7278 54.6902H24.6972L24.8514 54.536V46.5164L24.6972 45.8995H26.2614L26.1072 46.5164Z" fill="white"/>
-<path d="M28.6404 55.946H27.0762L27.2304 55.3291V46.5164L27.0762 45.8995H28.4862L30.0505 51.804V46.5164L29.8962 45.8995H31.4605L31.3063 46.5164V55.3291L31.4605 55.946H30.0505L28.4862 50.0415V55.3512L28.6404 55.946Z" fill="white"/>
-<path d="M32.3652 55.3291V46.5164L33.0042 45.8995H35.5158L36.1327 46.5164V47.7943L36.2869 48.4112H34.7226L34.8989 47.7943V47.2875L34.7447 47.1333H33.7753L33.621 47.2875V54.536L33.7753 54.6902H34.7447L34.8989 54.536V54.0513L34.7226 53.4344H36.2869L36.1327 54.0513V55.3291L35.5158 55.946H33.0042L32.3652 55.3291Z" fill="white"/>
-<path d="M37.0787 45.8995H38.6429L38.4887 46.5164V50.1517L38.6429 50.3059H39.6123L39.7665 50.1517V46.5164L39.5903 45.8995H41.1545L41.0003 46.5164V55.3291L41.1545 55.946H39.5903L39.7445 55.3291V51.6939L39.5903 51.5397H38.6209L38.4667 51.6939V55.3291L38.6209 55.946H37.0566L37.2109 55.3291V46.5164L37.0787 45.8995Z" fill="white"/>
-<path d="M46.7068 55.946H45.1426L45.2527 55.5274L44.9223 53.6106L44.746 53.4344H43.6444L43.4682 53.6106L43.1597 55.5274L43.2478 55.946H41.6836L41.97 55.0868L43.4461 46.4724L43.3139 45.8995H45.0324L44.9002 46.4724L46.3984 55.0868L46.7068 55.946ZM43.8427 52.1566H44.5257L44.6579 52.0464L44.1952 49.3585L43.7105 52.0684L43.8427 52.1566Z" fill="white"/>
-<path d="M48.8006 55.946H47.2363L47.3906 55.3291V46.5164L47.2363 45.8995H48.8006L48.6464 46.5164V55.3291L48.8006 55.946Z" fill="white"/>
-<path d="M51.1795 55.946H49.6152L49.7695 55.3291V46.5164L49.6152 45.8995H51.0253L52.5895 51.804V46.5164L52.4353 45.8995H53.9996L53.8453 46.5164V55.3291L53.9996 55.946H52.5895L51.0253 50.0415V55.3512L51.1795 55.946Z" fill="white"/>
-<path d="M54.8164 55.946L54.9706 55.3291V46.5164L54.8164 45.8995H58.5838L58.8042 47.2875L58.1652 47.1333H56.3586L56.2044 47.2875V50.1517L56.3586 50.3059H56.8654L57.4822 50.1517V51.7159L56.8654 51.5617H56.3586L56.2044 51.7159V54.558L56.3586 54.7122H58.1652L58.8042 54.558L58.5838 55.968H54.8164V55.946Z" fill="white"/>
-<path d="M59.3965 45.8995H62.6792L63.3181 46.5164V55.3291L62.6792 55.946H59.3965L59.5507 55.3291V46.5164L59.3965 45.8995ZM60.8065 54.536L60.9607 54.6902H61.9301L62.0844 54.536V47.2875L61.9081 47.1333H60.9387L60.8065 47.2875V54.536Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/instex.svg b/packages/website/public/images/clients/instex.svg
deleted file mode 100644
index c92033b93..000000000
--- a/packages/website/public/images/clients/instex.svg
+++ /dev/null
@@ -1,40 +0,0 @@
-<svg width="43" height="55" viewBox="0 0 43 55" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M5.36442 47.6098C5.31169 47.7017 5.33806 47.7804 5.33806 47.8461C5.33806 49.9726 5.33806 52.0859 5.33806 54.2124C5.33806 54.3831 5.29851 54.4356 5.12714 54.4224C4.77122 54.4093 4.4153 54.4093 4.05938 54.4224C3.88801 54.4224 3.83529 54.3699 3.83529 54.1993C3.84847 53.2804 3.83529 52.3616 3.83529 51.4427C3.83529 49.0406 3.83529 46.6516 3.83529 44.2494C3.83529 44.1706 3.80892 44.0919 3.87483 44C6.23444 46.4547 8.59406 48.9093 10.9932 51.4033C10.9932 51.2721 10.9932 51.2064 10.9932 51.1277C10.9932 49.0406 10.9932 46.9535 10.9932 44.8663C10.9932 44.6957 11.0459 44.6301 11.2041 44.6432C11.5732 44.6432 11.9292 44.6432 12.2983 44.6432C12.4169 44.6432 12.496 44.6563 12.496 44.827C12.496 48.1874 12.496 51.5346 12.496 54.895C12.496 54.9081 12.496 54.9344 12.4828 55C10.0836 52.5191 7.73721 50.0644 5.36442 47.6098Z" fill="#FBFBFB"/>
-<path d="M28.9219 49.5394C28.9219 47.9774 28.9219 46.4285 28.9219 44.8664C28.9219 44.6826 28.9746 44.6301 29.146 44.6301C30.8069 44.6301 32.4547 44.6301 34.1157 44.6301C34.2738 44.6301 34.3661 44.6695 34.3529 44.8533C34.3398 45.1289 34.3529 45.4046 34.3529 45.6934C34.3529 46.0478 34.3529 46.0478 34.0102 46.0478C32.9029 46.0478 31.8088 46.0478 30.7015 46.0478C30.3851 46.0478 30.4378 46.0215 30.4378 46.3234C30.4378 46.9273 30.451 47.5442 30.4378 48.148C30.4378 48.3449 30.4906 48.3712 30.6751 48.3712C31.7956 48.358 32.9161 48.3712 34.0497 48.3581C34.2211 48.3581 34.2738 48.4106 34.2607 48.5681C34.2475 48.8962 34.2475 49.2113 34.2607 49.5394C34.2738 49.7101 34.2211 49.7626 34.0497 49.7626C32.9161 49.7495 31.7956 49.7626 30.6619 49.7495C30.4774 49.7495 30.4378 49.802 30.4378 49.9726C30.451 50.9177 30.451 51.8628 30.4378 52.8079C30.4378 52.9917 30.4906 53.018 30.6487 53.018C31.822 53.0048 32.982 53.018 34.1552 53.0048C34.3134 53.0048 34.3661 53.0442 34.3661 53.2017C34.3529 53.5561 34.3529 53.8974 34.3661 54.2518C34.3661 54.37 34.3266 54.4094 34.2079 54.4094C32.4942 54.4094 30.7937 54.4094 29.0801 54.4094C28.9087 54.4094 28.9351 54.3175 28.9351 54.2125C28.9219 52.6635 28.9219 51.1015 28.9219 49.5394Z" fill="#FCFCFC"/>
-<path d="M35.3016 54.4094C35.2884 54.2125 35.4466 54.1075 35.5257 53.9762C35.7629 53.5299 36.0134 53.0968 36.2902 52.6767C36.5275 52.3223 36.7252 51.9416 36.9625 51.5741C37.1602 51.259 37.358 50.9309 37.5425 50.6158C37.7534 50.2614 37.9644 49.907 38.1885 49.5526C38.2939 49.382 38.3071 49.2376 38.2016 49.0538C37.9907 48.7256 37.7666 48.3843 37.5953 48.0299C37.4107 47.6493 37.1866 47.2948 36.9757 46.9404C36.7516 46.5729 36.5539 46.2053 36.3298 45.8378C36.1057 45.4571 35.8552 45.0896 35.6707 44.6695C35.7366 44.6039 35.8157 44.6302 35.8816 44.6302C36.2375 44.6302 36.5934 44.6433 36.9493 44.6302C37.2393 44.617 37.4107 44.7089 37.5425 44.9583C37.793 45.4834 38.1094 45.9559 38.3862 46.4679C38.6235 46.901 38.8871 47.3211 39.098 47.7674C39.1244 47.8199 39.1903 47.8199 39.1903 47.8855C39.4012 47.7018 39.4803 47.4524 39.6253 47.2292C39.8758 46.8485 40.0867 46.4416 40.3372 46.0478C40.4822 45.8378 40.5876 45.5884 40.7194 45.3652C40.8381 45.1552 40.9963 44.9583 41.1017 44.7483C41.1676 44.6302 41.2467 44.617 41.3522 44.617C41.7872 44.617 42.2222 44.617 42.6572 44.617C42.7231 44.617 42.8022 44.6039 42.8286 44.6695C42.8681 44.7483 42.7759 44.7746 42.7363 44.8271C42.5781 45.1027 42.4068 45.3652 42.2486 45.6409C42.0772 45.9034 41.919 46.1791 41.7608 46.4547C41.5499 46.8092 41.3258 47.1505 41.1281 47.5049C40.9831 47.7674 40.8249 48.0037 40.6667 48.2531C40.469 48.5812 40.2581 48.8963 40.0735 49.2244C39.9944 49.382 40.1526 49.5132 40.2317 49.6182C40.4162 49.8939 40.5481 50.1958 40.7326 50.4715C40.8908 50.734 41.049 50.9965 41.194 51.2722C41.4181 51.6791 41.6686 52.0729 41.9058 52.4667C42.1431 52.8736 42.3936 53.2936 42.6177 53.7137C42.7363 53.9368 42.9209 54.1206 43 54.3831C42.4595 54.3831 41.9454 54.3831 41.4445 54.3831C41.2335 54.3831 41.2467 54.1994 41.194 54.0944C40.9172 53.5956 40.6272 53.1099 40.3503 52.6111C40.034 52.0466 39.678 51.4953 39.3749 50.9178C39.2299 50.6421 39.1903 50.6421 39.0321 50.9046C38.6762 51.4953 38.3466 52.0991 37.9775 52.6898C37.648 53.228 37.3052 53.7531 37.0152 54.3175C36.9757 54.3963 36.9098 54.3831 36.8439 54.3831C36.3298 54.4094 35.8288 54.4094 35.3016 54.4094Z" fill="#FCFCFC"/>
-<path d="M15.833 51.4034C15.9385 51.7315 15.978 52.0991 16.1362 52.4141C16.3076 52.7554 16.5844 52.9917 16.9535 53.123C17.1908 53.2017 17.4412 53.2542 17.6917 53.228C18.1267 53.1886 18.4958 53.0048 18.7858 52.6635C19.1154 52.2829 19.2076 51.8366 19.1549 51.3771C19.1154 51.049 18.9835 50.7602 18.7199 50.5239C18.4035 50.2351 18.0344 50.0514 17.6521 49.8938C17.0853 49.6576 16.5185 49.4607 16.0044 49.1194C15.5957 48.8437 15.2398 48.5024 15.0157 48.043C14.8575 47.728 14.8048 47.3998 14.8048 47.0848C14.8048 46.7697 14.8048 46.4284 14.9893 46.1397C15.1212 45.9034 15.2266 45.6409 15.4243 45.4571C15.7539 45.142 16.0966 44.8664 16.5317 44.7089C16.848 44.5776 17.1776 44.5514 17.5203 44.4988C17.8631 44.4463 18.2058 44.4988 18.5353 44.5645C18.799 44.617 19.0626 44.7483 19.2867 44.8926C19.5504 45.0633 19.7877 45.2602 19.9854 45.5096C20.1172 45.6802 20.249 45.864 20.3677 46.0478C20.4336 46.1397 20.3413 46.179 20.2886 46.2053C20.1568 46.2972 20.0249 46.3891 19.8667 46.4547C19.6954 46.5203 19.5636 46.6516 19.4054 46.7304C19.2076 46.8222 19.1681 46.8354 19.0758 46.6516C18.9308 46.3759 18.7067 46.179 18.4431 46.0215C18.2453 45.9034 18.0212 45.9296 17.8103 45.9034C17.3094 45.864 16.8744 46.0215 16.558 46.4284C16.1626 46.9272 16.268 47.5048 16.7557 47.8724C17.0194 48.0824 17.3226 48.2136 17.6258 48.3318C18.0081 48.4762 18.364 48.6731 18.7463 48.8175C19.1813 48.9881 19.5372 49.2506 19.8667 49.5657C20.3018 49.9857 20.5522 50.4845 20.6313 51.1015C20.6972 51.5215 20.6445 51.9284 20.5654 52.3222C20.4599 52.9129 20.1436 53.4117 19.6822 53.8187C19.4317 54.0418 19.1549 54.2125 18.8649 54.37C18.7331 54.4487 18.5881 54.4881 18.4563 54.5144C17.784 54.6588 17.1117 54.685 16.4394 54.475C15.688 54.2387 15.1475 53.753 14.7784 53.0704C14.5675 52.6898 14.4357 52.2697 14.3698 51.8366C14.3566 51.7709 14.3961 51.7447 14.4357 51.7447C14.528 51.7315 14.6202 51.679 14.7125 51.6659C15.0157 51.6397 15.2925 51.5084 15.5957 51.5084C15.688 51.469 15.7407 51.3771 15.833 51.4034Z" fill="#FCFCFC"/>
-<path d="M25.3497 50.2351C25.3497 51.5608 25.3497 52.8866 25.3497 54.2124C25.3497 54.3699 25.3101 54.4224 25.152 54.4224C24.7829 54.4093 24.4269 54.4093 24.0578 54.4224C23.8997 54.4224 23.8337 54.383 23.8337 54.2124C23.8469 52.5453 23.8337 50.8783 23.8337 49.2112C23.8337 48.2267 23.8337 47.2422 23.8337 46.2577C23.8337 46.1002 23.7942 46.0477 23.6228 46.0477C23.0164 46.0608 22.4101 46.0477 21.8169 46.0477C21.5796 46.0477 21.5664 46.0346 21.5664 45.7983C21.5664 45.4702 21.5664 45.142 21.5664 44.8138C21.5664 44.6957 21.6191 44.6563 21.7246 44.6432C21.7773 44.6432 21.8301 44.6432 21.8828 44.6432C23.6887 44.6432 25.4947 44.6432 27.3007 44.6432C27.6039 44.6432 27.6038 44.6432 27.6038 44.9582C27.6038 45.247 27.5907 45.5358 27.6038 45.8246C27.617 46.0083 27.5248 46.0609 27.3666 46.0609C26.7734 46.0609 26.1802 46.0609 25.6002 46.0609C25.3497 46.0609 25.3497 46.0608 25.3497 46.3103C25.3497 47.6098 25.3497 48.9224 25.3497 50.2351Z" fill="#FBFBFB"/>
-<path d="M0 49.5394C0 47.9905 0 46.4416 0 44.8795C0 44.6301 0 44.6301 0.263644 44.6301C0.606381 44.6301 0.935936 44.6301 1.27867 44.6301C1.43686 44.6301 1.51595 44.6826 1.51595 44.8664C1.51595 47.9774 1.51595 51.0884 1.51595 54.1993C1.51595 54.37 1.47641 54.4225 1.30504 54.4225C0.949118 54.4094 0.606381 54.4094 0.250462 54.4225C0.065911 54.4225 0 54.3831 0 54.1731C0.0131822 52.6373 0 51.0884 0 49.5394Z" fill="#FBFBFB"/>
-<path opacity="0.5" d="M37.9992 14.1879C37.9992 19.2408 37.9992 24.3186 37.9752 29.3715C37.9752 29.5458 38.0232 29.7449 37.9033 29.8943C37.8314 29.8445 37.7595 29.7698 37.6636 29.72C36.8724 29.2471 36.0572 28.7741 35.266 28.2763C34.5227 27.8283 33.7795 27.3802 33.0362 26.9322C32.5567 26.6584 32.0772 26.3846 31.6217 26.0859C31.1661 25.7872 30.6866 25.5383 30.2311 25.2396C29.8954 25.0156 29.5118 24.8413 29.1522 24.6173C28.337 24.0946 27.4739 23.6217 26.6587 23.099C26.2751 22.8749 25.8435 22.7505 25.5318 22.3771C25.5078 22.3771 25.5078 22.3771 25.4839 22.3771C25.5558 22.2776 25.6277 22.1531 25.6757 22.0535C25.6997 22.0286 25.6997 22.0038 25.7236 21.954C25.7476 21.9291 25.7716 21.9042 25.7956 21.8544C26.0113 21.5059 26.1792 21.257 26.2751 21.0828C26.299 21.0579 26.299 21.033 26.323 21.0081C26.347 20.9583 26.371 20.9334 26.371 20.9085C26.347 20.9085 26.323 20.9085 26.323 20.9334C26.2031 20.9832 26.0833 21.0579 25.9874 21.1077C25.9634 21.1326 25.9154 21.1326 25.8915 21.1575C25.8675 21.1575 25.8675 21.1823 25.8435 21.1823C25.8195 21.1823 25.7956 21.2072 25.7716 21.2321C25.7476 21.257 25.6997 21.2819 25.6517 21.3068C25.4359 21.4313 25.1003 21.6553 24.7166 21.8793C24.6927 21.8793 24.6927 21.8793 24.6687 21.9042C24.381 21.8046 24.1652 21.5059 23.8535 21.4313C24.357 21.1077 24.8605 20.809 25.34 20.4356C25.7236 20.1618 26.2271 20.0622 26.4909 19.5893C26.4909 19.5893 26.4908 19.5644 26.4669 19.5644C26.4429 19.5146 26.4189 19.4898 26.3949 19.44C26.371 19.4151 26.371 19.3902 26.347 19.3653C26.2271 19.1413 26.1072 18.9173 26.0113 18.743C25.5558 17.9465 25.2441 17.3242 24.8125 16.6771C24.7886 16.6273 24.7646 16.5775 24.7166 16.5526C24.4529 16.1792 24.333 15.7063 24.0213 15.3578C24.0933 15.3329 24.1892 15.308 24.2371 15.2583C25.364 14.4368 26.5628 13.7897 27.7136 13.0181C28.0493 12.794 28.1452 12.57 28.1452 12.1966C28.1212 9.73242 28.1452 7.24331 28.1452 4.77908C28.1452 4.60485 28.0972 4.43061 28.2651 4.30615C29.2241 4.90354 30.1831 5.47604 31.1422 6.04853C32.0532 6.59614 32.9643 7.11885 33.8754 7.66646C34.6666 8.13939 35.4818 8.63721 36.273 9.13503C36.7285 9.43373 37.184 9.75731 37.6875 9.98133C37.9033 10.0809 37.9513 10.2551 37.9513 10.4792C37.9992 11.7237 37.9992 12.9683 37.9992 14.1879Z" fill="white"/>
-<path opacity="0.39" d="M18.7722 21.5556C18.4845 21.8294 18.3646 21.929 18.1728 22.1032L18.1488 22.1281C18.1249 22.1281 18.1249 22.153 18.1249 22.153C18.1009 22.1281 18.0769 22.1281 18.0529 22.1032C18.0529 22.1032 18.0529 22.1032 18.029 22.1032C18.005 22.0784 17.981 22.0784 17.957 22.0535C17.7413 21.9041 17.5494 21.8045 17.4775 21.7299C17.4535 21.705 17.4296 21.705 17.4296 21.705C17.046 21.4561 16.6623 21.1823 16.2068 21.0329C16.5664 21.5805 16.9021 22.1281 17.2617 22.6509C17.1419 22.7255 17.022 22.8002 16.9021 22.8749C16.9021 22.8749 16.9021 22.8749 16.8781 22.8749C16.7582 22.9495 16.6384 23.0242 16.5185 23.074C15.7273 23.5469 14.9361 24.0696 14.1209 24.5177C13.2578 24.9906 12.4426 25.5133 11.5795 26.036C10.7883 26.509 9.9731 26.957 9.1819 27.4797C8.12697 28.1518 7.04806 28.7492 5.99312 29.3964C5.72939 29.5706 5.39373 29.6453 5.17794 29.944C4.93819 29.9191 5.01012 29.7199 5.01012 29.5706C5.01012 28.5749 5.01012 27.5793 5.01012 26.5836C5.01012 21.2818 5.01012 16.0049 5.01012 10.7031C5.01012 10.3048 5.15397 10.1057 5.44168 9.93147C6.54456 9.2843 7.6954 8.68692 8.75034 7.96507C9.39768 7.54192 10.093 7.16856 10.7643 6.74541C11.6514 6.1978 12.5145 5.6502 13.4256 5.17727C13.8812 4.92835 14.3127 4.65455 14.7443 4.40564C14.7443 6.89475 14.7683 9.40876 14.7443 11.8979C14.7443 11.9477 14.7443 11.9974 14.7443 12.0472C14.7443 12.1717 14.7443 12.2961 14.7443 12.4206C14.7443 12.4455 14.7443 12.4455 14.7443 12.4704C14.7922 12.7691 14.9361 13.018 15.4636 13.2669L15.4875 13.2918C16.0869 13.69 16.7103 14.0634 17.2857 14.4368C17.2857 14.4368 17.3097 14.4368 17.3097 14.4617C17.4775 14.5612 17.6214 14.6608 17.7652 14.7355C17.7892 14.7604 17.8372 14.7852 17.8611 14.8101C17.8851 14.835 17.9091 14.8599 17.957 14.8599C17.981 14.8848 18.005 14.8848 18.029 14.9097C18.1488 14.9844 18.2687 15.059 18.3406 15.1088C18.3646 15.1337 18.4126 15.1586 18.4365 15.1835C18.4605 15.2084 18.4845 15.2084 18.4845 15.2084C18.5085 15.2333 18.5325 15.2582 18.5564 15.2582C18.0769 16.0796 17.5974 17.0006 17.1179 17.822C16.7582 18.4194 16.3986 19.0416 16.1349 19.6888C16.1109 19.7884 16.1589 19.863 16.2548 19.9128C16.8062 20.2613 17.3576 20.5849 17.8851 20.9583C18.1728 21.1325 18.3646 21.2818 18.7722 21.5556Z" fill="white"/>
-<path opacity="0.39" d="M18.0758 22.1283C18.0519 22.1034 18.0279 22.1034 18.0039 22.0785C18.0279 22.1034 18.0519 22.1283 18.0758 22.1283Z" fill="white"/>
-<path opacity="0.56" d="M37.9062 29.8944C37.6664 30.218 37.2828 30.2926 36.9711 30.4918C36.0121 31.0891 35.0291 31.6616 34.0461 32.2341C33.3508 32.6324 32.6794 33.0555 32.0081 33.4538C31.5526 33.7276 31.097 34.0014 30.6415 34.2752C29.7784 34.7979 28.9152 35.3206 28.0521 35.8434C28.0521 33.1551 28.0521 30.4669 28.0521 27.7537C28.0521 27.6293 28.0761 27.4799 27.9322 27.4053C27.9083 27.3306 27.8363 27.2808 27.7644 27.231C27.165 26.8576 26.5656 26.5092 25.9662 26.1109C25.2949 25.6629 24.5756 25.2397 23.9043 24.8166C23.9283 24.7917 23.9522 24.7419 23.9762 24.717C24.0002 24.6921 24.0242 24.6672 24.0242 24.6423C24.0721 24.5428 24.1441 24.4432 24.216 24.3436C24.216 24.3436 24.216 24.3188 24.24 24.3188C24.5277 23.8707 24.8394 23.4227 25.1031 23.0244C25.151 22.9497 25.199 22.8751 25.2469 22.8253C25.2709 22.8004 25.2949 22.7506 25.3189 22.7257C25.3668 22.6262 25.4387 22.5515 25.4867 22.4768C25.5107 22.4768 25.5107 22.4768 25.5346 22.4768C25.8224 22.8502 26.2779 22.9746 26.6615 23.1986C27.5007 23.7214 28.3398 24.1943 29.155 24.717C29.4907 24.941 29.8743 25.0904 30.2339 25.3393C30.6894 25.638 31.169 25.8869 31.6245 26.1856C32.08 26.4843 32.5835 26.7581 33.0391 27.0319C33.7823 27.4799 34.5256 27.928 35.2688 28.376C36.06 28.8489 36.8512 29.3219 37.6664 29.8197C37.7623 29.7948 37.8342 29.8446 37.9062 29.8944Z" fill="white"/>
-<path opacity="0.32" d="M21.4588 8.46298C21.4588 8.81146 21.4588 9.18483 21.4588 9.5333C21.4588 10.2551 21.4588 10.977 21.4348 11.6988L21.4108 13.3168C21.4108 13.8644 21.4108 14.412 21.3868 14.9347C21.3868 15.6565 21.3868 16.3784 21.3868 17.0753C20.8594 16.7766 20.1401 16.229 19.6126 15.9054C19.5647 15.8805 19.5167 15.8557 19.4928 15.8308C19.2051 15.6316 18.9173 15.4574 18.5817 15.2583C18.5577 15.2334 18.5337 15.2334 18.5098 15.2085C18.4858 15.2085 18.4858 15.1836 18.4618 15.1836C18.4378 15.1587 18.3899 15.1338 18.3659 15.1089C18.27 15.0591 18.1741 14.9845 18.0542 14.9098C18.0302 14.8849 18.0063 14.8849 17.9823 14.86C17.9583 14.8351 17.9343 14.8351 17.8864 14.8102C17.8624 14.7853 17.8145 14.7604 17.7905 14.7356C17.6466 14.636 17.5028 14.5613 17.3349 14.4618C17.3349 14.4618 17.311 14.4618 17.311 14.4369C16.7355 14.0635 16.1122 13.6901 15.5128 13.2919L15.4888 13.267C14.9853 12.9932 14.8175 12.7692 14.7695 12.4705C14.7695 12.4456 14.7695 12.4456 14.7695 12.4207C14.7695 12.2962 14.7695 12.1718 14.7695 12.0473C14.7695 11.9975 14.7695 11.9477 14.7695 11.898C14.7935 9.40885 14.7695 6.89484 14.7695 4.40573C14.7935 4.38084 14.8175 4.35595 14.8415 4.33105C15.8724 4.97822 16.9034 5.65029 17.9583 6.29746C18.7255 6.77039 19.4928 7.21843 20.236 7.71625C20.5956 7.96516 21.0032 8.23896 21.4588 8.46298Z" fill="white"/>
-<path opacity="0.32" d="M18.5566 15.2583C18.9163 15.4574 19.18 15.6317 19.4677 15.8308C19.18 15.6566 18.8923 15.4574 18.5566 15.2583Z" fill="white"/>
-<path opacity="0.32" d="M21.4093 17.1252C21.4093 17.1003 21.4093 17.1003 21.4093 17.1252C21.3853 17.1252 21.3853 17.1003 21.3853 17.1003C21.3853 17.1003 21.3853 17.1003 21.3613 17.1003L21.4093 17.1252C21.4093 17.1003 21.4093 17.1003 21.4093 17.1252C21.4093 17.1003 21.4093 17.1003 21.4093 17.1252C21.4093 17.1003 21.4093 17.1003 21.4093 17.1252Z" fill="white"/>
-<path opacity="0.21" d="M28.1939 4.82888C28.1939 7.2931 28.1939 9.78222 28.1939 12.2464C28.1939 12.6198 28.098 12.8438 27.7623 13.0678C26.6115 13.8146 25.4127 14.4866 24.2858 15.308C24.2139 15.3578 24.142 15.3827 24.0701 15.4076C23.2069 15.9552 22.2719 16.5526 21.3848 17.1002C21.3848 16.3784 21.3848 15.6814 21.3848 14.9596C21.3848 14.412 21.3848 13.8644 21.4087 13.3416L21.4327 11.7237C21.4327 11.0019 21.4567 10.28 21.4567 9.5582C21.4567 9.20972 21.4567 8.83635 21.4567 8.48788C22.104 8.08962 22.7514 7.71625 23.3748 7.31799C24.118 6.84506 24.8373 6.37213 25.5566 5.8992C26.108 5.55072 26.6834 5.27692 27.2109 4.87866C27.5226 4.65464 27.8582 4.50529 28.1939 4.33105C28.2418 4.35595 28.2898 4.38084 28.3138 4.40573C28.1459 4.4804 28.1939 4.67953 28.1939 4.82888Z" fill="white"/>
-<path opacity="0.21" d="M28.0996 27.7536C28.0996 30.4419 28.0996 33.1301 28.0996 35.8433C27.1645 36.4406 26.2295 37.0131 25.2944 37.5856C24.5272 38.0337 23.8079 38.5315 23.0407 38.9795C22.5852 39.2533 22.1057 39.5271 21.6741 39.8507C21.5542 39.9254 21.4583 40.0001 21.3145 40.0001C21.3145 37.1874 21.3145 34.3747 21.3145 31.562C21.4104 31.5371 21.5063 31.4873 21.6022 31.4375C21.9378 31.1886 22.2975 30.9646 22.6811 30.7406C23.5202 30.2427 24.3354 29.72 25.1506 29.1973C26.0856 28.5999 27.0207 28.0025 27.9797 27.4052C28.1236 27.4798 28.0996 27.6292 28.0996 27.7536Z" fill="white"/>
-<path opacity="0.7" d="M28.1954 4.28128C27.8598 4.45552 27.5241 4.60486 27.2124 4.82888C26.685 5.22714 26.1095 5.50094 25.5581 5.84942C24.8148 6.32235 24.0956 6.79528 23.3763 7.26822C22.7529 7.66647 22.1056 8.06473 21.4582 8.4381C21.0267 8.21408 20.5951 7.94028 20.1875 7.66647C19.4443 7.16865 18.6531 6.72061 17.9098 6.24768C16.8789 5.60051 15.8239 4.92845 14.793 4.28128C15.0807 3.90791 15.5122 3.78345 15.8719 3.53454C16.6631 3.01183 17.4783 2.48911 18.2934 1.99129C19.0367 1.51836 19.7799 1.07032 20.5232 0.597388C20.7629 0.448041 21.0027 0.298694 21.2185 0.124456C21.4343 -0.0497823 21.6021 -0.0248911 21.7939 0.0995646C22.8488 0.821408 23.9517 1.46858 25.0546 2.16553C25.9177 2.71314 26.7809 3.23585 27.62 3.80835C27.8118 3.98258 28.0995 3.98258 28.1954 4.28128Z" fill="white"/>
-<path opacity="0.32" d="M21.3146 31.5371C21.3146 34.3498 21.3146 37.1625 21.3146 39.9752C20.8111 39.7512 20.3316 39.4276 19.876 39.1289C19.5164 38.9049 19.1328 38.6809 18.7731 38.4319C18.3176 38.1084 17.8381 37.8346 17.3586 37.5359C16.5674 37.038 15.7762 36.5153 14.961 36.0175C14.7932 35.9179 14.7212 35.8184 14.6973 35.6192C14.6973 33.4039 14.6973 31.2135 14.7212 28.9982C14.7212 28.4755 14.7212 27.9528 14.7212 27.4301C15.1288 27.6541 15.5124 27.903 15.92 28.1519C16.4954 28.5004 17.0709 28.8488 17.6223 29.2222C18.4135 29.7449 19.2527 30.2179 20.0439 30.7157C20.4754 31.0144 20.859 31.338 21.3146 31.5371Z" fill="white"/>
-<path opacity="0.12" d="M26.5172 19.689C26.2535 20.1371 25.75 20.2366 25.3664 20.5353C24.8868 20.8838 24.3834 21.1825 23.8799 21.531C23.2805 21.9043 22.6811 22.2777 22.0817 22.6262C21.8419 22.7755 21.6261 22.9249 21.3145 23.0493C21.3145 21.1327 21.3864 19.017 21.3864 17.1003C21.3864 17.1003 21.3864 17.1003 21.4104 17.1003C22.8489 17.7973 24.4313 18.7183 25.8459 19.4152C25.8459 19.4152 25.8699 19.4152 25.8699 19.4401C25.8938 19.4401 25.9178 19.465 25.9418 19.465C26.1336 19.5646 26.3494 19.6392 26.5172 19.689Z" fill="white"/>
-<path opacity="0.24" d="M21.3875 17.1003C21.3875 17.1003 21.3594 17.1293 21.3875 17.1003V17.1003Z" fill="white"/>
-<path opacity="0.24" d="M26.5156 19.689C26.3478 19.6392 26.132 19.5645 25.9641 19.4899C25.9402 19.4899 25.9162 19.465 25.8922 19.465C25.8922 19.465 25.8682 19.465 25.8682 19.4401C24.4297 18.7431 22.8473 17.8222 21.4327 17.1252C21.4327 17.1252 21.4327 17.1252 21.4087 17.1252C21.4087 17.1252 21.4087 17.1252 21.3848 17.1252C22.2719 16.5776 23.1829 15.9802 24.0701 15.4326C24.4057 15.7562 24.5256 16.254 24.7654 16.6274C24.7893 16.6772 24.8133 16.727 24.8613 16.7518C25.2928 17.399 25.6045 18.0462 26.06 18.8178C26.1559 18.9672 26.2758 19.2161 26.3957 19.4401C26.4197 19.465 26.4197 19.4899 26.4437 19.5148C26.4676 19.5645 26.4916 19.6143 26.5156 19.6392C26.4916 19.6641 26.5156 19.6641 26.5156 19.689Z" fill="white"/>
-<path opacity="0.56" d="M20.8359 23.572C20.9079 23.5222 20.9798 23.4724 21.0277 23.4475C20.9798 23.4724 20.9079 23.5222 20.8359 23.572Z" fill="white"/>
-<path opacity="0.56" d="M21.3145 23.2483C21.3384 23.2234 21.3624 23.1986 21.4104 23.2234C21.3864 23.2234 21.3624 23.2234 21.3145 23.2483Z" fill="white"/>
-<path opacity="0.56" d="M22.1496 23.5966C22.0297 23.5468 21.9098 23.4721 21.8379 23.4224C21.9338 23.497 22.0297 23.5468 22.1496 23.5966Z" fill="white"/>
-<path opacity="0.24" d="M21.3857 17.1003C21.3857 19.017 21.3138 21.1327 21.3138 23.0493C21.2658 23.0244 21.2179 22.9995 21.1699 22.9747C21.122 22.9498 21.098 22.9249 21.0501 22.9249C20.9781 22.8751 20.9062 22.8502 20.8343 22.8004C20.7863 22.7755 20.7623 22.7506 20.7144 22.7257C20.6904 22.7257 20.6664 22.7008 20.6664 22.7008C20.6185 22.676 20.5466 22.6262 20.4986 22.6013C19.9232 22.2528 19.3957 21.8546 18.7724 21.5559C18.3887 21.3069 18.1969 21.1576 17.8852 20.9336C17.3578 20.5602 16.8063 20.2366 16.2549 19.8881C16.159 19.8384 16.111 19.7637 16.135 19.6641C16.7824 19.3903 17.3818 19.0419 18.0291 18.768C18.101 18.7432 18.173 18.6934 18.2449 18.6685C19.2519 18.1956 20.3548 17.5982 21.3857 17.1003Z" fill="white"/>
-<path opacity="0.24" d="M21.3875 17.1003C21.3875 17.1003 21.3594 17.1293 21.3875 17.1003V17.1003Z" fill="white"/>
-<path opacity="0.6" d="M21.384 17.1001C20.3531 17.573 19.2502 18.1953 18.2192 18.6683C18.1473 18.6931 18.0754 18.7429 18.0035 18.7678C17.3801 19.0665 16.7567 19.3901 16.1094 19.6639C16.3971 19.0167 16.7567 18.4193 17.0924 17.7971C17.5719 16.9757 18.0514 16.0547 18.5309 15.2333C18.8906 15.4324 19.1543 15.6066 19.442 15.8058C19.49 15.8307 19.5139 15.8556 19.5619 15.8804C20.1133 16.2289 20.8326 16.8014 21.384 17.1001C21.384 17.1001 21.3601 17.1001 21.384 17.1001Z" fill="white"/>
-<path opacity="0.6" d="M21.4087 17.1252C21.4087 17.1003 21.4087 17.1003 21.4087 17.1252C21.3848 17.1003 21.3848 17.1003 21.3848 17.1003C21.4327 17.1003 21.4567 17.1252 21.4087 17.1252Z" fill="white"/>
-<path opacity="0.7" d="M27.9553 27.4051C27.0203 28.0025 26.0852 28.5998 25.1262 29.1972C24.311 29.72 23.4958 30.2427 22.6567 30.7405C22.297 30.9645 21.9374 31.1885 21.5778 31.4374C21.4819 31.5121 21.386 31.537 21.2901 31.5619C20.8345 31.3628 20.4509 31.0392 20.0433 30.7654C19.2282 30.2676 18.413 29.7697 17.6218 29.2719C17.0464 28.8985 16.4709 28.575 15.9195 28.2016C15.5359 27.9527 15.1283 27.7038 14.7207 27.4797C14.8166 27.4051 14.8885 27.3304 14.9844 27.2557C15.0324 27.2308 15.0803 27.1811 15.1283 27.1562C15.2242 27.0815 15.3201 27.0317 15.416 26.957C15.9435 26.6086 16.4949 26.3099 17.0224 25.9614C17.1902 25.8618 17.382 25.7374 17.5738 25.6129C17.6457 25.5631 17.7177 25.5133 17.8136 25.4636C17.9335 25.3889 18.0533 25.3142 18.1732 25.2395C18.2451 25.1898 18.3171 25.14 18.413 25.1151C18.4849 25.0653 18.5808 25.0404 18.6527 24.9906C18.6527 24.9906 18.6527 24.9906 18.6767 24.9906C18.7007 24.9657 18.7247 24.9657 18.7486 24.9409C18.9884 25.2893 19.2281 25.6627 19.4679 26.0112C19.5638 26.1605 19.6597 26.285 19.7556 26.4343C20.0433 26.8575 20.331 27.2806 20.6187 27.7038C20.6427 27.7287 20.6667 27.7784 20.6907 27.8033C20.7146 27.8531 20.7386 27.9029 20.7866 27.9278C20.8585 28.0522 20.9304 28.1518 20.9784 28.2016C21.0503 28.326 21.1222 28.4505 21.2421 28.5501C21.2901 28.575 21.314 28.5999 21.386 28.6247C21.4339 28.6247 21.4819 28.5998 21.5298 28.575C21.5538 28.5501 21.5778 28.5252 21.6018 28.5003C21.6257 28.4505 21.6497 28.4256 21.6737 28.3758C21.7936 28.2016 22.0333 27.8531 22.321 27.4051C22.369 27.3304 22.4169 27.2557 22.4889 27.1562C22.5608 27.0317 22.6567 26.9073 22.7526 26.7579C23.0403 26.3348 23.352 25.8618 23.6876 25.364C23.7835 25.2395 23.8555 25.1151 23.9514 24.9657C23.9514 24.9409 23.9754 24.9409 23.9754 24.916C23.9993 24.8662 24.0233 24.8413 24.0473 24.7915C24.7186 25.2147 25.4379 25.6378 26.1092 26.0858C26.6846 26.4841 27.308 26.8326 27.9074 27.2059C27.8594 27.2806 27.9314 27.3304 27.9553 27.4051Z" fill="white"/>
-<path opacity="0.7" d="M23.9528 24.7915C23.9288 24.8413 23.9048 24.8662 23.8809 24.916C23.8809 24.8662 23.9048 24.8164 23.9528 24.7915Z" fill="white"/>
-<path opacity="0.24" d="M26.395 20.9832C26.395 21.008 26.371 21.0329 26.3471 21.0827C26.3471 21.1076 26.3231 21.1325 26.2991 21.1574C26.2032 21.3316 26.0354 21.5805 25.8196 21.929C25.7956 21.9539 25.7717 21.9788 25.7477 22.0286C25.7237 22.0535 25.6997 22.0784 25.6997 22.1281C25.6278 22.2277 25.5798 22.3273 25.5079 22.4517C25.46 22.5264 25.388 22.626 25.3401 22.7006C25.3161 22.7255 25.2921 22.7504 25.2682 22.8002C25.2202 22.8749 25.1723 22.9247 25.1243 22.9993C24.8606 23.3976 24.5729 23.8456 24.2612 24.2937C24.2612 24.2937 24.2612 24.3186 24.2372 24.3186C24.1653 24.4181 24.0934 24.5177 24.0454 24.6173C24.0214 24.6422 23.9975 24.667 23.9975 24.6919C23.9735 24.7168 23.9495 24.7666 23.9255 24.7915C23.8776 24.8164 23.8776 24.8662 23.8536 24.916C23.8536 24.9408 23.8296 24.9408 23.8296 24.9657C23.7337 25.0902 23.6618 25.2146 23.5659 25.364C23.2302 25.8618 22.9185 26.3348 22.6308 26.7579C22.5349 26.8824 22.463 27.0317 22.3671 27.1562C22.3191 27.2308 22.2712 27.3055 22.1993 27.4051C21.8876 27.8531 21.6478 28.2265 21.5519 28.3758C21.5279 28.4256 21.504 28.4505 21.48 28.5003C21.456 28.5252 21.432 28.5501 21.4081 28.575C21.3841 28.5998 21.3361 28.6247 21.2642 28.6247C21.2642 27.1562 21.2642 25.6876 21.2402 24.219C21.2642 24.1941 21.2882 24.1941 21.3122 24.1692C21.3361 24.1692 21.3361 24.1443 21.3601 24.1443C21.3841 24.1194 21.4081 24.1194 21.432 24.0945C21.432 24.0945 21.432 24.0945 21.456 24.0945C21.48 24.0697 21.504 24.0697 21.5279 24.0448C21.5999 23.995 21.6478 23.9701 21.7198 23.9203C21.8157 23.8705 21.9116 23.7959 22.0075 23.7461C22.0314 23.7461 22.0554 23.7212 22.0554 23.7212C22.0554 23.7212 22.0794 23.7212 22.0794 23.6963C22.0794 23.6963 22.1034 23.6963 22.1034 23.6714C22.1753 23.6216 22.2712 23.5718 22.3431 23.5221C22.3431 23.5221 22.3431 23.5221 22.3671 23.5221C23.0624 23.074 23.9255 22.5264 24.6448 22.0784C24.6688 22.0784 24.6927 22.0535 24.6927 22.0535C25.0764 21.8046 25.412 21.6054 25.6278 21.481C25.6758 21.4561 25.6997 21.4312 25.7477 21.4063C25.7717 21.3814 25.7956 21.3814 25.8196 21.3565C25.8436 21.3565 25.8676 21.3316 25.8676 21.3316C25.8915 21.3067 25.9155 21.3067 25.9635 21.2818C26.0594 21.2321 26.1792 21.1574 26.2991 21.1076C26.371 21.008 26.3711 20.9832 26.395 20.9832Z" fill="white"/>
-<path opacity="0.24" d="M22.1536 23.5969C22.1536 23.5969 22.1289 23.5969 22.1289 23.6227C22.1289 23.6227 22.1536 23.6227 22.1536 23.5969Z" fill="white"/>
-<path opacity="0.24" d="M23.9528 24.7915C23.9288 24.8413 23.9048 24.8662 23.8809 24.916C23.8809 24.8662 23.9048 24.8164 23.9528 24.7915Z" fill="white"/>
-<path d="M21.7696 23.8706C21.6977 23.9204 21.6497 23.9453 21.5778 23.9951C21.5538 24.02 21.5298 24.02 21.5059 24.0448C21.5298 24.02 21.5778 23.9951 21.6257 23.9702C21.6497 23.9702 21.6497 23.9453 21.6737 23.9453C21.6977 23.9204 21.7216 23.9204 21.7456 23.8955C21.7456 23.8706 21.7456 23.8706 21.7696 23.8706Z" fill="white"/>
-<path opacity="0.7" d="M22.1516 23.5969C22.1516 23.5969 22.1277 23.5969 22.1277 23.6218C22.1277 23.6218 22.1037 23.6218 22.1037 23.6467C22.0797 23.6467 22.0557 23.6716 22.0557 23.6716C21.9359 23.7463 21.84 23.8209 21.744 23.8707C21.7201 23.8956 21.6961 23.8956 21.6721 23.9205C21.6481 23.9205 21.6481 23.9454 21.6242 23.9454L21.6002 23.9703C21.5762 23.9952 21.5522 23.9952 21.5283 24.0201C21.5283 24.0201 21.5283 24.0201 21.5043 24.0201C21.4803 24.045 21.4563 24.045 21.4324 24.0699C21.4084 24.0699 21.4084 24.0947 21.3844 24.0947C21.3604 24.1196 21.3365 24.1196 21.3125 24.1445C21.3125 24.1445 21.2885 24.1196 21.2645 24.1196C21.1686 24.045 20.9289 23.9205 20.6412 23.7214C20.6412 23.7214 20.6172 23.7214 20.6172 23.6965C20.6891 23.6467 20.7371 23.5969 20.785 23.572C20.809 23.5471 20.833 23.5223 20.8569 23.5223C20.9289 23.4725 21.0008 23.4227 21.0488 23.3978C21.0727 23.3729 21.0967 23.3729 21.1207 23.348C21.1686 23.3231 21.2166 23.2982 21.2885 23.2484C21.3125 23.2484 21.3125 23.2236 21.3365 23.2236C21.3604 23.1987 21.3844 23.1738 21.4324 23.1987H21.4563C21.5043 23.1987 21.5522 23.2236 21.6242 23.2733C21.6481 23.2733 21.6481 23.2982 21.6721 23.2982C21.7201 23.3231 21.792 23.3729 21.84 23.3978C21.9359 23.4974 22.0318 23.5471 22.1516 23.5969Z" fill="white"/>
-<path opacity="0.6" d="M21.3146 28.6C21.2667 28.5751 21.2187 28.5751 21.1708 28.5253C21.0509 28.4507 20.9789 28.3013 20.907 28.1769C20.8591 28.1022 20.7871 28.0275 20.7152 27.903C20.6912 27.8533 20.6673 27.8035 20.6193 27.7786C20.5953 27.7537 20.5714 27.7288 20.5474 27.679C20.2597 27.2559 19.9959 26.8327 19.6843 26.4096C19.5884 26.2851 19.4924 26.1358 19.3965 25.9864C19.1568 25.638 18.917 25.2646 18.6773 24.9161C18.6533 24.9161 18.6293 24.941 18.6053 24.9659C18.6293 24.941 18.6533 24.941 18.6773 24.9161C18.6053 24.8165 18.4615 24.5676 18.2697 24.3187C18.2217 24.2689 18.1978 24.1943 18.1498 24.1196C18.0779 24.02 18.006 23.9205 17.934 23.8209C17.9101 23.7711 17.8861 23.7462 17.8621 23.6964C17.8621 23.6964 17.8621 23.6964 17.8621 23.6716C17.8381 23.6467 17.8141 23.5969 17.7902 23.572C17.7662 23.5471 17.7422 23.4973 17.7182 23.4724C17.5984 23.2733 17.4785 23.0991 17.3826 22.9497C17.3586 22.9248 17.3586 22.9248 17.3346 22.8999C17.3107 22.875 17.3107 22.8501 17.2867 22.8501C17.2867 22.8253 17.2627 22.8253 17.2627 22.8004C17.2627 22.8004 17.2627 22.7755 17.2387 22.7755C17.2387 22.7755 17.2387 22.7506 17.2148 22.7506L17.1908 22.7257C17.1908 22.7257 17.1908 22.7008 17.1668 22.7008C17.1668 22.6759 17.1428 22.6759 17.1428 22.6759C16.7832 22.1283 16.4475 21.5807 16.0879 21.058C16.5434 21.2073 16.927 21.4811 17.3107 21.73C17.3107 21.73 17.3346 21.7549 17.3586 21.7549C17.4545 21.8047 17.6223 21.9292 17.8381 22.0785C17.8621 22.1034 17.8861 22.1034 17.91 22.1283C17.91 22.1283 17.9101 22.1283 17.934 22.1283C17.958 22.1283 17.982 22.1532 18.006 22.1781C18.006 22.1781 18.0299 22.1781 18.0299 22.203C18.0539 22.2279 18.0779 22.2279 18.1019 22.2528C18.1498 22.2776 18.1738 22.3025 18.2217 22.3274C18.2937 22.3772 18.3656 22.4021 18.4375 22.4519C18.5094 22.5017 18.5814 22.5515 18.6533 22.5763C18.7492 22.651 18.8451 22.7008 18.941 22.7755C18.989 22.8004 19.0369 22.8501 19.0849 22.875C19.1808 22.9497 19.3006 22.9995 19.3965 23.0742C19.5884 23.1986 19.7802 23.3231 19.972 23.4475C20.0199 23.4724 20.0679 23.4973 20.1158 23.5471C20.2597 23.6218 20.3796 23.7213 20.4994 23.796C20.4994 23.796 20.5234 23.796 20.5234 23.8209C20.8111 23.9951 21.0509 24.1445 21.1468 24.2192C21.1708 24.244 21.1947 24.244 21.1947 24.244C21.2906 25.638 21.2906 27.1314 21.3146 28.6Z" fill="white"/>
-<path opacity="0.6" d="M18.0758 22.1283C18.0519 22.1034 18.0279 22.1034 18.0039 22.0785C18.0279 22.1034 18.0519 22.1283 18.0758 22.1283Z" fill="white"/>
-<path opacity="0.6" d="M24.6944 21.9788C23.9751 22.4517 23.088 22.9993 22.4167 23.4474C22.4167 23.4474 22.4167 23.4474 22.3927 23.4474C22.2968 23.4971 22.2249 23.5469 22.1529 23.5967C22.0331 23.5469 21.9372 23.4722 21.8412 23.4225C21.7933 23.3976 21.7214 23.3478 21.6734 23.3229C21.6494 23.3229 21.6494 23.298 21.6255 23.298C21.5775 23.2731 21.5056 23.2233 21.4576 23.2233H21.4337C21.3857 23.2233 21.3617 23.2233 21.3378 23.2482C21.3378 23.2482 21.3138 23.2731 21.2898 23.2731C21.2179 23.3229 21.1699 23.3478 21.122 23.3727C21.098 23.3976 21.074 23.3976 21.05 23.4225C21.0021 23.4474 20.9302 23.4971 20.8582 23.5469C20.8343 23.5718 20.8103 23.5718 20.7863 23.5967C20.7384 23.6216 20.6904 23.6714 20.6185 23.7212C20.4986 23.6465 20.3787 23.5718 20.2349 23.4722C20.1869 23.4474 20.139 23.4225 20.091 23.3727C19.8992 23.2482 19.7074 23.1238 19.5156 22.9993C19.4197 22.9246 19.2998 22.8749 19.2039 22.8002C19.156 22.7753 19.108 22.7255 19.0601 22.7006C18.9642 22.6259 18.8682 22.5762 18.7723 22.5015C18.7004 22.4517 18.6285 22.4019 18.5566 22.377C18.4846 22.3273 18.4127 22.2775 18.3408 22.2526C18.2928 22.2277 18.2689 22.2028 18.2209 22.1779C18.1969 22.153 18.173 22.153 18.149 22.1281L18.125 22.1032L18.149 22.0783L18.173 22.0535C18.3648 21.8792 18.5086 21.7797 18.7723 21.5058C19.3717 21.7797 19.9232 22.2028 20.4986 22.5513C20.5466 22.5762 20.6185 22.626 20.6664 22.6508C20.6904 22.6508 20.7144 22.6757 20.7144 22.6757C20.7623 22.7006 20.7863 22.7255 20.8343 22.7504C20.9062 22.8002 20.9781 22.8251 21.05 22.8749C21.098 22.8998 21.122 22.9246 21.1699 22.9246C21.2179 22.9495 21.2658 22.9744 21.3138 22.9993C21.6255 22.8749 21.8412 22.7255 22.081 22.5762C22.6804 22.2028 23.2798 21.8294 23.8792 21.481C24.1909 21.5556 24.4067 21.8543 24.6944 21.9788Z" fill="white"/>
-<path opacity="0.6" d="M18.7237 24.9409C18.6997 24.9658 18.6758 24.9658 18.6518 24.9906C18.6518 24.9906 18.6518 24.9906 18.6278 24.9906C18.5559 25.0404 18.46 25.0653 18.388 25.1151C18.3161 25.1649 18.2202 25.1898 18.1483 25.2396C18.0284 25.3142 17.9085 25.3889 17.7887 25.4636C17.7167 25.5134 17.6208 25.5631 17.5489 25.6129C17.3571 25.7374 17.1653 25.8618 16.9975 25.9614C16.47 26.3099 15.9185 26.6086 15.3911 26.957C15.2952 27.0317 15.1993 27.0815 15.1034 27.1562C15.0554 27.1811 15.0075 27.2309 14.9595 27.2557C14.8636 27.3304 14.7677 27.4051 14.6958 27.4798C14.6958 28.0025 14.6958 28.5252 14.6958 29.0479C14.6958 31.2632 14.6958 33.4536 14.6718 35.6689C14.1923 35.5196 13.7847 35.1711 13.3531 34.9471C12.3462 34.3746 11.3631 33.7772 10.3801 33.1798C9.75677 32.8065 9.15737 32.4082 8.534 32.0348C7.43112 31.3877 6.35221 30.7405 5.24932 30.0933C5.1774 30.0684 5.12945 30.0435 5.10547 29.944C5.32125 29.6702 5.65691 29.5706 5.92064 29.3964C6.97558 28.7243 8.07847 28.1518 9.10942 27.4798C9.90062 26.9819 10.7158 26.509 11.507 26.0361C12.3462 25.5383 13.1613 24.9906 14.0484 24.5177C14.8636 24.0697 15.6548 23.547 16.446 23.074C16.5659 22.9994 16.6858 22.9247 16.8057 22.8749C16.8057 22.8749 16.8056 22.8749 16.8296 22.8749C16.9495 22.8002 17.0694 22.7504 17.1893 22.6509C17.1893 22.6509 17.1893 22.6509 17.2132 22.6758L17.2372 22.7007L17.2612 22.7256C17.2612 22.7504 17.2852 22.7504 17.2852 22.7753C17.2852 22.7753 17.3091 22.8002 17.3091 22.8251C17.3331 22.85 17.3571 22.8998 17.3811 22.9496C17.477 23.0989 17.5968 23.2732 17.7167 23.4723C17.7887 23.5967 17.8846 23.7212 17.9565 23.8457C18.0284 23.9452 18.1003 24.0448 18.1723 24.1443C18.2202 24.219 18.2442 24.2688 18.2921 24.3435C18.5079 24.5924 18.6518 24.8164 18.7237 24.9409Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/laketrade.svg b/packages/website/public/images/clients/laketrade.svg
deleted file mode 100644
index 6ab08bcec..000000000
--- a/packages/website/public/images/clients/laketrade.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="78" height="53" viewBox="0 0 78 53" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0 52.4754H5.63871V50.785H1.93548V43.7012H0V52.4754Z" fill="white"/>
-<path d="M6.54294 52.4754H8.50423L9.05907 50.7076H11.8204L12.3752 52.4754H14.4268L11.4849 43.7012H9.48488L6.54294 52.4754ZM9.53649 49.0947L10.4397 45.8947L11.3429 49.0947H9.53649Z" fill="white"/>
-<path d="M16.2298 52.4754H18.1653V50.1528L19.1976 48.8367L21.1976 52.4754H23.404L20.5395 47.3012L23.3653 43.7012H21.146L18.1653 47.5334V43.7012H16.2298V52.4754Z" fill="white"/>
-<path d="M25.063 52.4754H31.2049V50.8108H26.9985V48.8367H30.4307V47.185H26.9985V45.3657H31.0759V43.7012H25.063V52.4754Z" fill="white"/>
-<path d="M39.0649 52.4754H40.2262V44.7721H42.8198V43.7012H36.4714V44.7721H39.0649V52.4754Z" fill="white"/>
-<path d="M44.9018 52.4754H46.0631V48.9141H47.9857L50.076 52.4754H51.4179L49.276 48.8367C50.5534 48.5915 51.0954 47.8044 51.0954 46.3076C51.0954 44.4625 50.2696 43.7012 48.2696 43.7012H44.9018V52.4754ZM46.0631 47.856V44.7592H48.1663C49.4825 44.7592 49.9341 45.185 49.9341 46.3076C49.9341 47.4302 49.4825 47.856 48.1663 47.856H46.0631Z" fill="white"/>
-<path d="M52.7774 52.4754H53.9774L54.7774 50.2302H58.3129L59.1129 52.4754H60.3516L57.1516 43.7012H55.9774L52.7774 52.4754ZM55.1516 49.1721L56.5452 45.185L57.9387 49.1721H55.1516Z" fill="white"/>
-<path d="M62.4673 52.4754H65.4867C67.7835 52.4754 68.8157 51.4044 68.8157 49.0689V47.1076C68.8157 44.7721 67.7835 43.7012 65.4867 43.7012H62.4673V52.4754ZM63.6286 51.4173V44.7592H65.3448C66.9964 44.7592 67.6544 45.4302 67.6544 47.1205V49.056C67.6544 50.7463 66.9964 51.4173 65.3448 51.4173H63.6286Z" fill="white"/>
-<path d="M71.6155 52.4754H77.4865V51.4173H72.7768V48.5141H76.7123V47.456H72.7768V44.7592H77.3575V43.7012H71.6155V52.4754Z" fill="white"/>
-<path d="M38.5883 16.5883H37.9916C29.1604 16.5883 22 9.42787 22 0.5967V0H38.5883V16.5883Z" fill="white"/>
-<path d="M39.1846 33.1765H38.5879V16.5883H55.1762V17.185C55.1762 26.0161 48.0158 33.1765 39.1846 33.1765Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/ledgerdex.svg b/packages/website/public/images/clients/ledgerdex.svg
deleted file mode 100644
index 44126012e..000000000
--- a/packages/website/public/images/clients/ledgerdex.svg
+++ /dev/null
@@ -1,19 +0,0 @@
-<svg width="69" height="55" viewBox="0 0 69 55" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0)">
-<path d="M43.2016 50.8792C43.1515 50.6793 43.1515 50.5793 43.3268 50.4543C44.0531 50.0045 44.2785 49.3047 44.2785 48.48C44.2785 47.2054 44.2785 45.9308 44.2785 44.6562C44.2785 43.3066 43.452 42.5068 42.1247 42.5068C40.8725 42.5068 39.6202 42.5068 38.368 42.5068C37.817 42.5068 37.792 42.5068 37.792 43.0817V52.5787C37.792 53.2035 37.792 53.8283 37.792 54.4531C37.792 54.803 37.9423 54.9779 38.2929 54.9529C38.6685 54.9529 39.0442 54.9529 39.4199 54.9529C39.8707 54.9529 39.9458 54.878 39.9458 54.4031C39.9458 53.3534 39.9458 52.3038 39.9458 51.2791C39.9458 51.1041 39.8957 50.9292 40.046 50.7792H41.0478C41.3733 52.0289 41.724 53.2535 42.0245 54.4781C42.1247 54.828 42.2499 55.0279 42.6506 54.9779C43.0012 54.9529 43.3268 54.9779 43.6774 54.9779C44.1533 54.9779 44.2284 54.878 44.1282 54.4281C43.8277 53.2285 43.5272 52.0538 43.2016 50.8792ZM42.0996 48.1301C42.0996 48.455 41.8993 48.6549 41.5737 48.6799C41.0728 48.7049 40.5469 48.6799 39.9709 48.6799V44.5562C40.5469 44.5562 41.0979 44.5312 41.6739 44.5562C41.9243 44.5812 42.0996 44.7811 42.0996 45.081C42.0996 46.1057 42.0996 47.1304 42.0996 48.1301Z" fill="white"/>
-<path d="M51.9679 44.7561C51.9679 43.2816 51.1915 42.5068 49.7139 42.5068C48.5618 42.5068 47.4348 42.5068 46.2828 42.5068C45.7068 42.5068 45.7068 42.5068 45.7068 43.0817C45.7068 44.9811 45.7068 46.8555 45.7068 48.7549C45.7068 50.6543 45.7068 52.5537 45.7068 54.4531C45.7068 54.828 45.7819 54.9779 46.2077 54.9779C47.3848 54.9529 48.5869 54.9779 49.764 54.9779C51.1915 54.9779 51.9679 54.2032 51.9679 52.7786C51.9679 50.0795 51.9679 47.4053 51.9679 44.7561ZM49.8892 52.1288C49.8892 52.7036 49.7139 52.8786 49.1379 52.8786C48.7121 52.8786 48.3114 52.8786 47.8606 52.8786V44.5562C48.3615 44.5562 48.8373 44.5312 49.3132 44.5562C49.7389 44.5812 49.8892 44.7811 49.8892 45.281C49.8892 46.5806 49.8892 47.8801 49.8892 49.1548C49.8892 50.1794 49.8892 51.1541 49.8892 52.1288Z" fill="white"/>
-<path d="M20.9879 44.6063C20.9879 43.3317 20.1615 42.5069 18.8842 42.4819C17.657 42.4819 16.4549 42.4819 15.2277 42.4819C14.7268 42.4819 14.7018 42.5069 14.7018 43.0068C14.7018 44.9062 14.7018 46.8056 14.7018 48.705C14.7018 50.6044 14.7018 52.4788 14.7018 54.3782C14.7018 54.903 14.7018 54.928 15.2528 54.928C16.4549 54.928 17.657 54.928 18.8592 54.928C20.1364 54.928 20.9629 54.1033 20.9629 52.8287C20.9879 50.1045 20.9879 47.3554 20.9879 44.6063ZM18.9343 47.4304C18.9343 48.9799 18.9343 50.5044 18.9343 52.0539C18.9343 52.7037 18.759 52.8787 18.1078 52.8787C17.7572 52.8787 17.4316 52.8787 17.081 52.8787C17.0309 52.8787 16.9808 52.8537 16.9057 52.8287V44.5813C17.4066 44.5063 17.9075 44.5313 18.3833 44.5563C18.784 44.5813 18.9343 44.8562 18.9343 45.2311C18.9343 45.9808 18.9343 46.7056 18.9343 47.4304Z" fill="white"/>
-<path d="M28.851 52.9786C28.801 54.0283 28.3752 54.778 27.0979 54.903C26.021 55.0279 24.9191 55.0529 23.8422 54.853C23.0658 54.703 22.615 54.2032 22.4397 53.4784C22.3645 53.1285 22.3145 52.7787 22.3145 52.4288C22.3145 49.9046 22.3145 47.4053 22.3145 44.8811C22.3145 44.5062 22.3896 44.1314 22.4898 43.7815C22.7152 42.9817 23.3162 42.5818 24.0676 42.5319C25.1445 42.4569 26.2214 42.4069 27.2983 42.5818C28.3502 42.7318 28.801 43.5066 28.8761 44.4563C28.9262 45.0561 28.8761 45.6309 28.8761 46.2307C28.8761 46.5056 28.7759 46.6306 28.5004 46.6306C28.0747 46.6306 27.6239 46.6306 27.1981 46.6306C26.9477 46.6306 26.8224 46.5306 26.8224 46.2557C26.8224 45.9058 26.8224 45.5809 26.8224 45.231C26.7974 44.7812 26.597 44.5812 26.1462 44.5562C25.7956 44.5562 25.42 44.5562 25.0693 44.5562C24.6937 44.5562 24.4683 44.7562 24.4683 45.131C24.4683 47.5053 24.4683 49.8796 24.4683 52.2538C24.4683 52.6787 24.6937 52.8786 25.0944 52.9036C25.445 52.9286 25.8207 52.9036 26.1713 52.9036C26.5219 52.9036 26.7724 52.7287 26.7974 52.3788C26.8224 51.679 26.7974 50.9542 26.7974 50.2794C26.597 50.1545 26.4217 50.1795 26.2464 50.2045C25.9208 50.2295 25.7455 50.1045 25.7706 49.7546C25.7956 49.3547 25.7956 48.9798 25.7706 48.58C25.7706 48.2551 25.8708 48.1301 26.1963 48.1301C26.9477 48.1551 27.699 48.1301 28.4503 48.1301C28.7509 48.1301 28.8761 48.2301 28.8761 48.53C28.8761 50.0045 28.9262 51.5041 28.851 52.9786Z" fill="white"/>
-<path d="M67.4444 54.9532C67.0688 54.9532 66.6931 54.9282 66.3174 54.9532C65.9418 54.9782 65.7665 54.8033 65.6412 54.4784C65.2405 53.4037 64.8148 52.354 64.389 51.3044C64.364 51.2294 64.3139 51.1794 64.2387 51.0045C63.7629 52.2041 63.3121 53.2788 62.9114 54.3534C62.7361 54.8033 62.5107 55.0032 62.0348 54.9532C61.6842 54.9032 61.3085 54.9532 60.9579 54.9532C60.4821 54.9532 60.432 54.8533 60.6073 54.4284C61.3586 52.604 62.0849 50.8045 62.8613 48.9801C62.9865 48.7052 62.9865 48.4803 62.8613 48.1804C62.135 46.4809 61.4338 44.7564 60.7325 43.057C60.5071 42.5321 60.5572 42.4821 61.1332 42.4821C61.4839 42.4821 61.8595 42.5071 62.2101 42.4821C62.6109 42.4571 62.7862 42.6321 62.9364 42.982C63.2871 43.9567 63.6878 44.9064 64.0634 45.8561C64.1135 46.006 64.1386 46.156 64.3139 46.2809C64.7396 45.2063 65.1904 44.1566 65.5661 43.057C65.7164 42.6071 65.9668 42.4322 66.4176 42.4821C66.7682 42.5071 67.1439 42.4821 67.4945 42.4821C67.9453 42.4821 67.9954 42.5571 67.8201 42.982C67.0938 44.7064 66.3926 46.4309 65.6663 48.1554C65.541 48.4553 65.516 48.6802 65.6663 48.9801C66.4176 50.7545 67.1439 52.554 67.8952 54.3284C68.0956 54.8783 68.0455 54.9532 67.4444 54.9532Z" fill="white"/>
-<path d="M59.5306 54.5532C59.5306 54.8531 59.4304 54.9781 59.1299 54.9781C57.3267 54.9781 55.4985 54.9781 53.6953 54.9781C53.3947 54.9781 53.2946 54.8781 53.2946 54.5532C53.2946 50.6795 53.2946 46.7807 53.2946 42.9069C53.2946 42.657 53.3446 42.482 53.6452 42.507C55.5235 42.507 57.4269 42.507 59.3303 42.507C59.3803 42.507 59.4304 42.532 59.5056 42.557C59.6057 43.1568 59.5557 43.7566 59.5306 44.3564C59.5056 44.6313 59.2802 44.5814 59.0798 44.5814C58.028 44.5814 56.951 44.5814 55.8992 44.5814H55.3983V47.6804C56.2999 47.6804 57.1764 47.6804 58.078 47.6804C58.604 47.6804 58.629 47.7054 58.629 48.2302C58.629 48.5551 58.629 48.88 58.629 49.2049C58.629 49.7298 58.629 49.7547 58.078 49.7547C57.2015 49.7547 56.3249 49.7547 55.4233 49.7547V52.9287C56.6255 52.9287 57.8025 52.9287 59.0047 52.9287C59.5807 52.9287 59.5807 52.9287 59.5807 53.5036C59.5306 53.8285 59.5056 54.1784 59.5306 54.5532Z" fill="white"/>
-<path d="M13.5004 53.3284C13.5004 53.7283 13.5004 54.1032 13.5004 54.5031C13.5004 54.803 13.3752 54.9529 13.0496 54.9529C11.2464 54.9529 9.46823 54.9529 7.66503 54.9529C7.33946 54.9529 7.21423 54.853 7.21423 54.5281C7.21423 50.6543 7.21423 46.8055 7.21423 42.9317C7.21423 42.6068 7.3645 42.5068 7.66503 42.5068C9.46823 42.5068 11.2464 42.5068 13.0496 42.5068C13.2499 42.5068 13.4503 42.5568 13.4753 42.7817C13.5004 43.3566 13.6006 43.9564 13.3501 44.5812H9.29292V47.6052C9.66859 47.7052 10.0443 47.6302 10.4199 47.6552C10.9709 47.6552 11.5469 47.6552 12.0979 47.6552C12.4235 47.6552 12.5487 47.7552 12.5487 48.0801C12.5236 48.48 12.5236 48.8548 12.5487 49.2547C12.5737 49.6046 12.4235 49.7296 12.0728 49.7296C11.2965 49.7046 10.5451 49.7296 9.76876 49.7296C9.6185 49.7296 9.46823 49.7046 9.26787 49.8045V52.8036C9.41814 52.9286 9.59345 52.8786 9.76876 52.8786C10.8206 52.8786 11.8975 52.9036 12.9494 52.8786C13.3251 52.8786 13.5004 53.0035 13.5004 53.3284Z" fill="white"/>
-<path d="M36.5656 53.3534C36.5656 53.7283 36.5656 54.1032 36.5656 54.4781C36.5656 54.803 36.4654 54.9529 36.0897 54.9529C34.3116 54.9529 32.5334 54.9529 30.7553 54.9529C30.4297 54.9529 30.2794 54.853 30.2794 54.5031C30.2794 50.6543 30.2794 46.8055 30.2794 42.9567C30.2794 42.6068 30.4046 42.5068 30.7553 42.5068C32.5334 42.5068 34.3116 42.5068 36.0897 42.5068C36.3151 42.5068 36.5405 42.5318 36.5405 42.7817C36.5656 43.3566 36.6657 43.9564 36.4153 44.5562H32.3831V47.5553C32.5084 47.6802 32.6837 47.6302 32.859 47.6302C33.6103 47.6302 34.3617 47.6552 35.113 47.6302C35.4887 47.6302 35.664 47.7302 35.6389 48.1301C35.6139 48.48 35.6389 48.8049 35.6389 49.1548C35.6389 49.6546 35.6139 49.6796 35.113 49.6796C34.2114 49.6796 33.3348 49.6796 32.3831 49.6796C32.308 50.7293 32.3581 51.7789 32.3581 52.8536H33.7606C34.537 52.8536 35.3133 52.8786 36.1148 52.8536C36.4403 52.8786 36.5656 53.0285 36.5656 53.3534Z" fill="white"/>
-<path d="M6.08579 54.603C6.08579 54.828 5.96057 54.9529 5.73517 54.9529C3.93197 54.9529 2.12877 54.9529 0.350622 54.9529C0.0500888 54.9529 0 54.778 0 54.5281C0 53.9033 0 53.2785 0 52.6537V43.1066C0 42.5068 0 42.5068 0.601066 42.5068C0.951688 42.5068 1.27726 42.5068 1.62789 42.5068C2.12877 42.5068 2.15382 42.5318 2.15382 43.0317C2.15382 44.9311 2.15382 46.8055 2.15382 48.7049V52.9036H4.55808C4.95879 52.9036 5.33446 52.9036 5.73517 52.9036C5.98561 52.9036 6.11084 53.0035 6.11084 53.2785C6.06075 53.7033 6.06075 54.1532 6.08579 54.603Z" fill="white"/>
-<path d="M41.3723 17.8194C39.8947 17.8194 38.5172 18.2193 37.3401 18.9191L35.1863 16.3949C35.9377 15.5701 36.3885 14.4705 36.3885 13.2708C36.3885 12.3711 36.138 11.5464 35.6872 10.8216L39.2936 6.62292C39.7945 6.89784 40.3705 7.04779 40.9966 7.04779C42.9501 7.04779 44.5279 5.47329 44.5279 3.5239C44.5529 1.57451 42.9751 0 41.0217 0C39.0682 0 37.4904 1.57451 37.4904 3.5239C37.4904 4.24867 37.7158 4.89847 38.0664 5.44829L34.5352 9.54701C33.7588 8.9472 32.7821 8.59731 31.7302 8.59731C30.8036 8.59731 29.952 8.87222 29.2258 9.32208L27.673 7.49765C27.9234 7.09778 28.0737 6.62292 28.0737 6.09809C28.0737 4.64854 26.8966 3.47391 25.444 3.47391C23.9915 3.47391 22.8144 4.64854 22.8144 6.09809C22.8144 7.54764 23.9915 8.72227 25.444 8.72227C25.7446 8.72227 26.0201 8.67228 26.2956 8.57231L27.9485 10.5217C27.3975 11.2965 27.0719 12.2212 27.0719 13.2458C27.0719 13.4458 27.097 13.6457 27.122 13.8457L24.0416 16.02C23.3904 15.3702 22.5139 14.9953 21.5371 14.9953C19.5837 14.9953 18.0059 16.5698 18.0059 18.5192C18.0059 20.4686 19.5837 22.0431 21.5371 22.0431C23.4906 22.0431 25.0684 20.4686 25.0684 18.5192C25.0684 18.1693 25.0183 17.8194 24.9181 17.4945L27.673 15.5451C28.4744 16.9447 30.0021 17.9194 31.7302 17.9194C32.4815 17.9194 33.1577 17.7444 33.7838 17.4445L35.9377 19.9687C34.435 21.3933 33.4833 23.4177 33.4833 25.667C33.4833 30.0156 37.0146 33.5395 41.3723 33.5395C45.73 33.5395 49.2613 30.0156 49.2613 25.667C49.2613 21.3183 45.705 17.8194 41.3723 17.8194Z" fill="white"/>
-</g>
-<defs>
-<clipPath id="clip0">
-<rect width="69" height="55" fill="white"/>
-</clipPath>
-</defs>
-</svg>
diff --git a/packages/website/public/images/clients/openrelay.svg b/packages/website/public/images/clients/openrelay.svg
deleted file mode 100644
index 21e32cc18..000000000
--- a/packages/website/public/images/clients/openrelay.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-<svg width="64" height="52" viewBox="0 0 64 52" fill="none" xmlns="http://www.w3.org/2000/svg">
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="15" y="0" width="33" height="36">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M15.9592 0.240479H47.5748V35.1917H15.9592V0.240479Z" fill="white"/>
-</mask>
-<g mask="url(#mask0)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M29.5768 30.5355C29.5208 30.4346 29.4727 30.3452 29.4219 30.2572C28.9351 29.4126 28.448 28.568 27.9605 27.7238C26.4156 25.0481 24.8706 22.3725 23.3258 19.6967C23.2905 19.6355 23.2543 19.5742 23.2253 19.51C23.0158 19.0477 23.2174 18.5524 23.527 18.3231C23.9571 18.0045 24.5702 18.0907 24.8939 18.5213C24.9503 18.5965 24.9975 18.6791 25.0446 18.7606C25.8588 20.1697 26.6724 21.5791 27.486 22.9885C28.7006 25.0925 29.9154 27.1962 31.1301 29.3C31.1617 29.3546 31.1941 29.4081 31.2262 29.4625C31.2616 29.5229 31.3156 29.5469 31.3843 29.5431C31.4471 29.5397 31.5102 29.5342 31.5728 29.5354C31.7692 29.5397 31.9686 29.526 32.1612 29.5556C32.9428 29.6754 33.5783 30.0487 34.0519 30.6876C34.0847 30.7317 34.1177 30.7759 34.1471 30.8224C34.1955 30.8985 34.2644 30.9217 34.3498 30.9086C34.3886 30.9024 34.4279 30.8987 34.4664 30.8911C34.6358 30.857 34.8056 30.8242 34.9746 30.7871C36.1347 30.5325 37.2313 30.1105 38.2708 29.5377C39.6658 28.7688 40.8629 27.7657 41.8505 26.5146C42.8969 25.1889 43.6297 23.703 44.1116 22.0889C44.4689 20.8922 44.655 19.6665 44.7153 18.4216C44.7517 17.6675 44.7368 16.9121 44.6675 16.1597C44.6113 15.5492 44.5255 14.9421 44.3982 14.3414C44.0858 12.8685 43.5671 11.4744 42.8031 10.175C41.9921 8.79579 40.9569 7.61379 39.6708 6.6586C38.2628 5.61297 36.7021 4.89506 34.9899 4.51033C34.7984 4.46722 34.6046 4.43318 34.4116 4.39733C34.3349 4.38322 34.2783 4.41143 34.2321 4.47931C34.1215 4.64146 34.0037 4.79838 33.8897 4.95831C33.872 4.98309 33.8593 5.01169 33.8399 5.04594C33.8764 5.09851 33.9113 5.14967 33.9469 5.20043C34.1322 5.46391 34.3282 5.72073 34.5012 5.99206C35.3765 7.36563 35.8651 8.87113 35.9862 10.4917C36.0392 11.1977 36.0182 11.9053 35.9135 12.6091C35.7676 13.5883 35.4895 14.5253 35.0655 15.4205C34.6032 16.3964 33.9818 17.2606 33.2443 18.0445C33.064 18.2361 32.8398 18.3477 32.5772 18.3545C32.184 18.3646 31.8679 18.2065 31.678 17.8572C31.4854 17.5031 31.506 17.146 31.7354 16.8092C31.7793 16.7449 31.8351 16.6881 31.8889 16.6309C32.5417 15.9374 33.0658 15.1592 33.4401 14.2816C33.8111 13.4112 34.014 12.5025 34.0587 11.5594C34.1006 10.6723 33.9868 9.80195 33.731 8.9513C33.4115 7.88935 32.8858 6.9396 32.1606 6.10144C31.963 5.87302 31.991 5.91169 31.7408 5.90424C30.7522 5.87483 29.9755 5.45323 29.4121 4.63985C29.3762 4.58828 29.3422 4.53531 29.3097 4.48132C29.2682 4.41263 29.2086 4.38564 29.1307 4.39692C29.0841 4.40377 29.0378 4.41243 28.9915 4.42089C27.6969 4.65899 26.4742 5.10032 25.3194 5.7298C24.4665 6.1947 23.6771 6.75045 22.963 7.40974C21.6426 8.62921 20.655 10.0805 19.9564 11.7333C19.2851 13.3222 18.9289 14.9832 18.8379 16.7004C18.7889 17.6191 18.8045 18.5387 18.9088 19.4558C18.9847 20.1207 19.0923 20.7792 19.2524 21.4286C19.6634 23.095 20.3376 24.6427 21.3373 26.043C22.0509 27.0427 22.8955 27.9153 23.8832 28.6457C25.3661 29.7423 27.0122 30.4757 28.8205 30.8427C28.9435 30.8677 29.0678 30.8874 29.1919 30.9074C29.2686 30.9197 29.3287 30.8937 29.3732 30.8262C29.4336 30.7346 29.4989 30.6463 29.5768 30.5355M15.9592 17.91C15.9721 15.9986 16.1546 14.3622 16.6099 12.7634C17.2053 10.6731 18.1635 8.76739 19.5361 7.07738C20.7773 5.54932 22.2786 4.3375 24.0199 3.42098C25.4433 2.67166 26.9451 2.15216 28.5276 1.86512C28.7208 1.83007 28.9143 1.79563 29.1091 1.77005C29.2213 1.75534 29.2924 1.70156 29.349 1.60608C29.5309 1.29769 29.7688 1.03784 30.0536 0.8209C31.3462 -0.162491 33.1923 0.135225 34.1111 1.47535C34.1199 1.48845 34.1316 1.50033 34.1371 1.51483C34.215 1.7205 34.3834 1.76823 34.582 1.79805C36.8159 2.13303 38.8774 2.92466 40.7698 4.15601C41.4237 4.58103 42.0342 5.06286 42.6075 5.59222C43.7971 6.69023 44.7696 7.95542 45.5466 9.37431C46.4115 10.9541 46.9955 12.6319 47.3049 14.4051C47.4048 14.9783 47.4711 15.5557 47.5172 16.1362C47.5847 16.9844 47.5901 17.8338 47.548 18.6815C47.3957 21.7463 46.5302 24.5877 44.8218 27.1515C43.3669 29.3352 41.4464 30.9888 39.0816 32.1261C37.7334 32.7741 36.321 33.2184 34.8455 33.4615C34.7369 33.4795 34.6284 33.4974 34.5192 33.5117C34.4106 33.526 34.3306 33.5711 34.2789 33.6751C34.2265 33.78 34.1636 33.8813 34.0944 33.9764C33.5239 34.7588 32.7522 35.1858 31.7855 35.1916C30.7296 35.1979 29.915 34.7245 29.3474 33.832C29.322 33.7921 29.296 33.752 29.2777 33.7089C29.2223 33.5806 29.1266 33.524 28.9881 33.5043C28.7002 33.4638 28.4132 33.4154 28.1285 33.3568C25.8046 32.878 23.6878 31.9411 21.807 30.4864C20.7485 29.6678 19.8326 28.71 19.05 27.6263C17.6805 25.7298 16.7831 23.6266 16.3216 21.3353C16.185 20.6565 16.0819 19.9729 16.037 19.2815C16.0019 18.7405 15.9753 18.199 15.9592 17.91" fill="white"/>
-</g>
-<mask id="mask1" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="39" width="10" height="10">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M0.784973 39.8586H9.01565V48.5607H0.784973V39.8586Z" fill="white"/>
-</mask>
-<g mask="url(#mask1)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M2.16291 44.2098C2.16291 44.6126 2.22717 45.0032 2.35628 45.3819C2.485 45.7606 2.6683 46.095 2.90599 46.385C3.14368 46.6751 3.43193 46.907 3.77013 47.0802C4.10854 47.2532 4.48723 47.3398 4.90621 47.3398C5.3413 47.3398 5.72604 47.2494 6.06062 47.0679C6.39479 46.8866 6.67881 46.6471 6.91247 46.3488C7.14614 46.0511 7.3234 45.7163 7.44446 45.3457C7.56511 44.9752 7.62554 44.5965 7.62554 44.2098C7.62554 43.7987 7.56108 43.4061 7.43217 43.0312C7.30345 42.6565 7.11995 42.3262 6.88246 42.0402C6.64457 41.7545 6.35854 41.5247 6.02436 41.3513C5.68978 41.178 5.31713 41.0916 4.90621 41.0916C4.47132 41.0916 4.08457 41.1821 3.74596 41.3633C3.40776 41.5448 3.12152 41.7803 2.88806 42.0704C2.654 42.3604 2.47493 42.6928 2.35024 43.0675C2.22515 43.4421 2.16291 43.8228 2.16291 44.2098M4.89433 48.5607C4.28197 48.5607 3.72381 48.4378 3.22043 48.1921C2.71665 47.9463 2.28377 47.62 1.92119 47.2129C1.55861 46.8064 1.27842 46.3409 1.08122 45.817C0.883614 45.2933 0.784912 44.7577 0.784912 44.2098C0.784912 43.6377 0.889657 43.0896 1.09935 42.5661C1.30864 42.0424 1.59648 41.5789 1.96349 41.176C2.3299 40.7731 2.76499 40.4531 3.26857 40.2154C3.77215 39.9777 4.32206 39.8586 4.9185 39.8586C5.53065 39.8586 6.08862 39.9855 6.5922 40.2393C7.09578 40.4932 7.52684 40.8255 7.88539 41.2364C8.24374 41.6474 8.52192 42.1129 8.71952 42.6326C8.91672 43.1523 9.01563 43.682 9.01563 44.2217C9.01563 44.7939 8.9129 45.3416 8.70723 45.8653C8.50197 46.3893 8.21372 46.8503 7.84309 47.2494C7.47246 47.648 7.03515 47.9665 6.53177 48.204C6.02819 48.4419 5.48231 48.5607 4.89433 48.5607" fill="white"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M13.4028 47.485C13.6846 47.485 13.9406 47.4244 14.1702 47.3037C14.3999 47.1829 14.5973 47.0215 14.7624 46.8201C14.9274 46.6188 15.0543 46.3894 15.1432 46.1312C15.2316 45.8736 15.2761 45.6077 15.2761 45.3335C15.2761 45.0434 15.2257 44.7697 15.125 44.5119C15.0241 44.254 14.8871 44.0284 14.7141 43.8349C14.5407 43.6417 14.3334 43.4886 14.0917 43.3758C13.85 43.263 13.5881 43.2066 13.3061 43.2066C13.1369 43.2066 12.9596 43.2388 12.7743 43.3033C12.5888 43.3679 12.4158 43.4564 12.2546 43.5692C12.0933 43.682 11.9525 43.8129 11.8316 43.962C11.7107 44.111 11.6261 44.2744 11.5776 44.4512V46.1072C11.6582 46.3004 11.7629 46.4819 11.892 46.6509C12.021 46.8201 12.164 46.9653 12.3211 47.0862C12.4782 47.2068 12.6492 47.3037 12.8347 47.376C13.0201 47.4485 13.2094 47.485 13.4028 47.485M13.8379 48.6211C13.3303 48.6211 12.8831 48.5 12.4963 48.2585C12.1096 48.0168 11.8034 47.7026 11.5776 47.3158V51.0743H10.2484V42.1793H11.4207V43.3152C11.6624 42.9367 11.9744 42.6345 12.3573 42.4087C12.7399 42.1833 13.1731 42.0703 13.6566 42.0703C14.0917 42.0703 14.4903 42.1593 14.8531 42.3362C15.2157 42.5137 15.5299 42.7514 15.7958 43.0493C16.0617 43.3476 16.269 43.6941 16.4182 44.0889C16.5673 44.4837 16.6418 44.8986 16.6418 45.3335C16.6418 45.793 16.5731 46.2218 16.4363 46.6207C16.2992 47.0195 16.1058 47.3662 15.8562 47.6601C15.6062 47.9543 15.3103 48.188 14.9679 48.3612C14.6253 48.5343 14.2488 48.6211 13.8379 48.6211" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M22.6242 44.8622C22.6 44.5965 22.5335 44.3505 22.425 44.1249C22.3162 43.8995 22.177 43.7082 22.0078 43.5508C21.8388 43.3937 21.6412 43.271 21.4156 43.1822C21.19 43.0936 20.9521 43.0493 20.7025 43.0493C20.4528 43.0493 20.2171 43.0936 19.9955 43.1822C19.7739 43.271 19.5785 43.3937 19.4093 43.5508C19.2401 43.7082 19.1032 43.8995 18.9984 44.1249C18.8935 44.3505 18.8292 44.5965 18.805 44.8622H22.6242ZM20.7025 48.6209C20.211 48.6209 19.7639 48.5341 19.361 48.361C18.9581 48.188 18.6137 47.9523 18.3276 47.654C18.0416 47.3561 17.82 47.0094 17.6629 46.6146C17.5058 46.22 17.4272 45.8008 17.4272 45.3577C17.4272 44.9147 17.5058 44.4935 17.6629 44.0947C17.82 43.6959 18.0416 43.3454 18.3276 43.0432C18.6137 42.7411 18.9581 42.5034 19.361 42.3304C19.7639 42.1569 20.2151 42.0703 20.7148 42.0703C21.2061 42.0703 21.6513 42.1591 22.0501 42.3362C22.4489 42.5137 22.7892 42.7493 23.0716 43.0432C23.3534 43.3375 23.5687 43.6798 23.7182 44.0703C23.867 44.4615 23.9416 44.8702 23.9416 45.2973C23.9416 45.3939 23.9375 45.4846 23.9295 45.5694C23.9214 45.654 23.9132 45.7243 23.9053 45.7807H18.8415C18.8655 46.0627 18.9319 46.3167 19.0407 46.5421C19.1495 46.7677 19.2903 46.9633 19.4639 47.1283C19.637 47.2934 19.8342 47.4203 20.0559 47.509C20.2775 47.5978 20.5092 47.6419 20.7509 47.6419C20.9281 47.6419 21.1032 47.6198 21.2768 47.5754C21.4498 47.5313 21.609 47.4669 21.7542 47.3823C21.899 47.2975 22.028 47.1947 22.141 47.0737C22.2536 46.953 22.3422 46.8201 22.4066 46.675L23.5429 47.0014C23.3252 47.4767 22.9644 47.8655 22.461 48.1677C21.9575 48.4698 21.3713 48.6209 20.7025 48.6209V48.6209Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M30.6972 48.5H29.3678V44.9588C29.3678 44.3628 29.2731 43.9297 29.0838 43.6598C28.8944 43.3899 28.6144 43.2549 28.2438 43.2549C28.0504 43.2549 27.857 43.2912 27.6637 43.3635C27.4703 43.436 27.289 43.539 27.1198 43.6717C26.9506 43.8046 26.7995 43.962 26.6666 44.1432C26.5336 44.3245 26.4309 44.5238 26.3584 44.7413V48.5H25.0289V42.1793H26.2375V43.4481C26.4794 43.0213 26.8299 42.6849 27.289 42.4389C27.7483 42.1934 28.2561 42.0703 28.812 42.0703C29.1907 42.0703 29.5009 42.139 29.7426 42.276C29.9842 42.4129 30.1755 42.6003 30.3165 42.838C30.4575 43.0755 30.5562 43.3498 30.6126 43.6598C30.6688 43.97 30.6972 44.2984 30.6972 44.6446V48.5Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M33.7669 44.3182H36.1359C36.3293 44.3182 36.5046 44.2759 36.6615 44.1913C36.8186 44.1067 36.9535 43.9901 37.0666 43.841C37.1792 43.692 37.2678 43.5205 37.3322 43.3272C37.3969 43.1338 37.4291 42.9283 37.4291 42.7108C37.4291 42.4932 37.3907 42.2878 37.3141 42.0946C37.2374 41.901 37.1368 41.7318 37.012 41.5868C36.8871 41.442 36.742 41.327 36.5769 41.2424C36.4117 41.158 36.2405 41.1155 36.0632 41.1155H33.7669V44.3182ZM32.4133 48.4999V39.9189H36.1478C36.5346 39.9189 36.8913 39.9997 37.2176 40.1607C37.5437 40.3218 37.8237 40.5335 38.0576 40.7952C38.2911 41.0572 38.4744 41.3554 38.6073 41.6895C38.7402 42.0239 38.8069 42.3645 38.8069 42.7108C38.8069 43.0011 38.7664 43.2788 38.6861 43.5447C38.6055 43.8106 38.4927 44.0566 38.3475 44.282C38.2026 44.5076 38.0254 44.703 37.8159 44.8681C37.6062 45.0335 37.3766 45.1562 37.127 45.237L39.1451 48.4999H37.6102L35.7492 45.5147H33.7669V48.4999H32.4133Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M44.8376 44.8622C44.8135 44.5965 44.747 44.3505 44.6384 44.1249C44.5296 43.8995 44.3905 43.7082 44.2213 43.5508C44.0522 43.3937 43.8546 43.271 43.629 43.1822C43.4034 43.0936 43.1655 43.0493 42.916 43.0493C42.6662 43.0493 42.4305 43.0936 42.2089 43.1822C41.9874 43.271 41.792 43.3937 41.6228 43.5508C41.4536 43.7082 41.3166 43.8995 41.2119 44.1249C41.1069 44.3505 41.0427 44.5965 41.0185 44.8622H44.8376ZM42.916 48.6209C42.4245 48.6209 41.9773 48.5341 41.5744 48.361C41.1716 48.188 40.8271 47.9523 40.5411 47.654C40.2551 47.3561 40.0335 47.0094 39.8764 46.6146C39.7192 46.22 39.6407 45.8008 39.6407 45.3577C39.6407 44.9147 39.7192 44.4935 39.8764 44.0947C40.0335 43.6959 40.2551 43.3454 40.5411 43.0432C40.8271 42.7411 41.1716 42.5034 41.5744 42.3304C41.9773 42.1569 42.4285 42.0703 42.9283 42.0703C43.4196 42.0703 43.8647 42.1591 44.2636 42.3362C44.6624 42.5137 45.0026 42.7493 45.285 43.0432C45.5668 43.3375 45.7821 43.6798 45.9316 44.0703C46.0805 44.4615 46.155 44.8702 46.155 45.2973C46.155 45.3939 46.151 45.4846 46.1429 45.5694C46.1349 45.654 46.1266 45.7243 46.1187 45.7807H41.0549C41.0789 46.0627 41.1454 46.3167 41.2542 46.5421C41.3629 46.7677 41.5037 46.9633 41.6774 47.1283C41.8504 47.2934 42.0476 47.4203 42.2694 47.509C42.4909 47.5978 42.7226 47.6419 42.9643 47.6419C43.1416 47.6419 43.3166 47.6198 43.4903 47.5754C43.6633 47.5313 43.8224 47.4669 43.9676 47.3823C44.1125 47.2975 44.2414 47.1947 44.3544 47.0737C44.467 46.953 44.5556 46.8201 44.6201 46.675L45.7564 47.0014C45.5386 47.4767 45.1779 47.8655 44.6745 48.1677C44.1709 48.4698 43.5847 48.6209 42.916 48.6209V48.6209Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.2546 39.6775H48.5842V46.675C48.5842 46.9089 48.6445 47.092 48.7653 47.2249C48.8864 47.3579 49.0554 47.4244 49.2731 47.4244C49.3616 47.4244 49.4643 47.4082 49.5813 47.376C49.6979 47.3442 49.8087 47.3077 49.9135 47.2674L50.1069 48.3068C49.9135 48.3953 49.684 48.4658 49.418 48.5181C49.1523 48.5703 48.9144 48.5967 48.7049 48.5967C48.2458 48.5967 47.8891 48.472 47.6355 48.2222C47.3817 47.9725 47.2546 47.6179 47.2546 47.1585V39.6775Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M52.9228 47.6419C53.2451 47.6419 53.5493 47.5837 53.8353 47.4669C54.1213 47.35 54.3449 47.1867 54.5061 46.9772C54.6753 46.8322 54.7599 46.6793 54.7599 46.5179V45.684C54.5343 45.5954 54.2948 45.5269 54.041 45.4785C53.7869 45.4302 53.5394 45.406 53.2975 45.406C52.8221 45.406 52.4333 45.5088 52.1312 45.7142C51.829 45.9197 51.678 46.1918 51.678 46.53C51.678 46.8443 51.7946 47.1085 52.0286 47.3216C52.2621 47.5354 52.5602 47.6419 52.9228 47.6419M52.5602 48.6209C52.2541 48.6209 51.97 48.5703 51.7084 48.4698C51.4463 48.3691 51.2207 48.2301 51.0314 48.0528C50.842 47.8756 50.6932 47.6661 50.5844 47.4244C50.4756 47.1829 50.421 46.921 50.421 46.6388C50.421 46.3409 50.4855 46.0708 50.6144 45.829C50.7433 45.5875 50.9266 45.378 51.1645 45.2008C51.402 45.0235 51.6842 44.8863 52.0105 44.7896C52.3368 44.693 52.6972 44.6446 53.0922 44.6446C53.3899 44.6446 53.6842 44.6708 53.9745 44.7232C54.2643 44.7757 54.5262 44.8462 54.7599 44.9349V44.4996C54.7599 44.0325 54.6269 43.6679 54.3612 43.406C54.0951 43.1441 53.7124 43.013 53.2129 43.013C52.8747 43.013 52.5421 43.0755 52.2158 43.2003C51.8895 43.3252 51.5531 43.5047 51.2066 43.7382L50.7957 42.8922C51.6095 42.3445 52.4555 42.0703 53.3337 42.0703C54.2039 42.0703 54.8809 42.2921 55.3642 42.7352C55.8478 43.1782 56.0895 43.8149 56.0895 44.6446V46.9291C56.0895 47.2111 56.2061 47.3561 56.4398 47.3639V48.5C56.3109 48.5244 56.2001 48.5403 56.1076 48.5484C56.0148 48.5562 55.9241 48.5607 55.8355 48.5607C55.5777 48.5607 55.3781 48.496 55.2373 48.3671C55.0963 48.2384 55.0094 48.0732 54.9774 47.8718L54.9414 47.4727C54.6591 47.8434 54.3107 48.1274 53.8957 48.325C53.4808 48.5222 53.0358 48.6209 52.5602 48.6209" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M57.7574 49.9867C57.8783 50.0107 57.9969 50.0308 58.1139 50.0471C58.2308 50.063 58.3254 50.0713 58.398 50.0713C58.5025 50.0713 58.5931 50.0489 58.6699 50.0048C58.7462 49.9603 58.825 49.8818 58.9056 49.7692C58.9861 49.6562 59.0687 49.4972 59.1533 49.2918C59.2379 49.0861 59.3364 48.8222 59.4494 48.4999L56.851 42.1792H58.2167L60.1746 47.3278L61.915 42.1792H63.1719L60.3075 49.9623C60.1786 50.3251 59.9548 50.6291 59.6368 50.875C59.3183 51.1206 58.9096 51.2436 58.41 51.2436C58.3133 51.2436 58.2126 51.2374 58.1079 51.2253C58.0031 51.2134 57.8863 51.187 57.7574 51.147V49.9867Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/paradex.svg b/packages/website/public/images/clients/paradex.svg
deleted file mode 100644
index e3bdf48b1..000000000
--- a/packages/website/public/images/clients/paradex.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="82" height="47" viewBox="0 0 82 47" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M51.9065 2.40902L48.5125 19.4016C48.3937 19.9971 47.8718 20.4258 47.2653 20.4258H43.9271C42.6671 20.4258 41.4348 20.7925 40.379 21.4809L40.2783 21.5467L43.9832 2.99693C44.2283 1.76899 45.3053 0.885254 46.5559 0.885254H50.659C51.4619 0.885254 52.064 1.62077 51.9065 2.40902M29.1543 26.9147L32.5483 9.92205C32.6671 9.32634 33.1894 8.89757 33.7958 8.89757H37.134C38.3941 8.89757 39.6263 8.53122 40.6818 7.84283L40.7822 7.77698L37.0776 26.3265C36.8322 27.5547 35.7555 28.4384 34.5049 28.4384H30.4015C29.5989 28.4384 28.9965 27.7029 29.1543 26.9147" fill="white"/>
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="34" width="82" height="13">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M0.00012207 46.4356H81.0604V34.6733H0.00012207L0.00012207 46.4356Z" fill="white"/>
-</mask>
-<g mask="url(#mask0)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M32.561 46.4356H30.7493L27.027 41.1475H28.3166C29.7831 41.1475 30.716 40.0956 30.716 38.8942C30.716 37.6095 29.8164 36.6252 28.3001 36.6252H25.3177V46.4356H23.2678V35.1377C23.2678 34.9274 23.4384 34.757 23.6486 34.757H28.4669C31.1494 34.757 32.7989 36.492 32.7989 38.7775C32.7989 40.5724 31.8089 41.9505 30.3627 42.5006L32.8148 45.9429C32.9613 46.1492 32.8141 46.4356 32.561 46.4356V46.4356ZM62.2248 41.4721H68.073V39.6369H62.2248V37.9942H60.1756V46.4356H62.2248H68.5118C68.6836 46.4356 68.8229 46.2958 68.8229 46.1239V44.6004H62.2248V41.4721ZM51.8391 34.757H48.3543C48.1445 34.757 47.9742 34.9274 47.9742 35.1377V36.6252H51.8391C54.2883 36.6252 55.8879 38.31 55.8879 40.613C55.8879 42.915 54.2883 44.5667 51.8391 44.5667H50.0231V37.9942H47.9742V46.4356H51.8391C55.5047 46.4356 58.0372 43.8827 58.0372 40.5796C58.0372 37.2759 55.5047 34.757 51.8391 34.757V34.757ZM60.1756 36.5919H68.8229V34.757H60.556C60.3458 34.757 60.1756 34.9274 60.1756 35.1377V36.5919ZM81.0605 34.757H78.7113L70.3137 46.4356H72.6628L75.6874 42.2297L78.7113 46.4356H80.4531C80.7066 46.4356 80.8537 46.1479 80.7056 45.9416L76.8617 40.5961L81.0605 34.757ZM74.7872 37.6934L72.6629 34.757H71.0583C70.7474 34.757 70.5678 35.109 70.7499 35.3608L73.6123 39.3273L74.7872 37.6934ZM39.2427 34.9015L34.2104 46.4356H36.3098L40.2585 37.1258L42.7826 43.0985H38.9758L38.267 44.9172H43.554L44.2076 46.4356H45.8979C46.1224 46.4356 46.273 46.205 46.1832 45.9991L41.3415 34.9015C41.281 34.7629 41.1441 34.6733 40.9929 34.6733H39.591C39.4401 34.6733 39.3032 34.7629 39.2427 34.9015V34.9015ZM14.5088 34.9015L9.47689 46.4356H11.576L15.525 37.1258L18.0488 43.0985H14.2423L13.5335 44.9172H18.8199L19.4738 46.4356H21.1641C21.3886 46.4356 21.5392 46.205 21.4494 45.9991L16.6079 34.9015C16.5471 34.7629 16.4102 34.6733 16.259 34.6733H14.8574C14.7062 34.6733 14.5693 34.7629 14.5088 34.9015V34.9015ZM4.84842 34.757H0.380527C0.170369 34.757 0.00012207 34.9274 0.00012207 35.1377V46.4356H1.73814C1.91026 46.4356 2.04932 46.2958 2.04932 46.1239V36.6252H4.6816C6.33948 36.6252 7.19758 37.8117 7.19758 39.2696C7.19758 40.8417 6.23129 42.1558 4.6816 42.1558H3.5064V44.0081H4.61488C7.53495 44.0081 9.28014 41.7804 9.28014 39.2197C9.28014 36.6593 7.56426 34.757 4.84842 34.757V34.757Z" fill="white"/>
-</g>
-</svg>
diff --git a/packages/website/public/images/clients/radar-relay.svg b/packages/website/public/images/clients/radar-relay.svg
deleted file mode 100644
index ecc759fab..000000000
--- a/packages/website/public/images/clients/radar-relay.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="61" height="49" viewBox="0 0 61 49" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M16.3814 36.7544L12.573 48.1516H13.6538L17.3935 36.7544H16.3814Z" fill="white"/>
-<path d="M17.1706 39.4236L18.7831 44.3179H15.5923L15.2664 45.2933H19.0919L20.0354 48.1512H21.1677L17.7024 37.8149L17.1706 39.4236Z" fill="white"/>
-<path d="M43.9152 39.4236L45.5278 44.3179H42.3198L42.011 45.2933H45.8365L46.7801 48.1512H47.9123L44.447 37.8149L43.9152 39.4236Z" fill="white"/>
-<path d="M43.1089 36.7544L39.3176 48.1516H40.3984L44.1382 36.7544H43.1089Z" fill="white"/>
-<path d="M1.31935 38.3286H0.255737V48.1514H1.31935V38.3286Z" fill="white"/>
-<path d="M7.40936 40.1086C7.40936 38.0892 5.86542 36.7373 3.54949 36.7373H0.255737V37.6956H3.51518C5.23068 37.6956 6.31145 38.6197 6.31145 40.1086C6.31145 41.6316 5.21353 42.6242 3.51518 42.6242H1.95408V43.5654H3.54949C3.7382 43.5654 3.9269 43.5483 4.11561 43.5311L6.22567 48.1516H7.39221L5.17922 43.2916C6.56877 42.7782 7.40936 41.5974 7.40936 40.1086Z" fill="white"/>
-<path d="M54.6542 38.3286H53.5906V48.1514H54.6542V38.3286Z" fill="white"/>
-<path d="M60.7442 40.1086C60.7442 38.0892 59.2003 36.7373 56.8843 36.7373H53.5906V37.6956H56.85C58.5655 37.6956 59.6463 38.6197 59.6463 40.1086C59.6463 41.6316 58.5484 42.6242 56.85 42.6242H55.2889V43.5654H56.8843C57.073 43.5654 57.2617 43.5483 57.4504 43.5311L59.5605 48.1516H60.727L58.5141 43.2916C59.9036 42.7782 60.7442 41.5974 60.7442 40.1086Z" fill="white"/>
-<path d="M27.9267 36.7544H26.8631V48.1687H27.9267V36.7544Z" fill="white"/>
-<path d="M30.3456 36.7544H28.5443V37.7298H30.3456C31.9753 37.7298 33.0218 38.7737 33.0218 40.3823V44.5408C33.0218 46.1494 31.9753 47.1933 30.3456 47.1933H28.5443V48.1687H30.3456C32.5757 48.1687 34.0854 46.6799 34.0854 44.4723V40.4337C34.0854 38.2261 32.5929 36.7544 30.3456 36.7544Z" fill="white"/>
-<path d="M37.0055 22.2375C39.835 19.9572 41.6467 16.4218 41.6467 12.4471C41.6467 5.58552 36.2116 0 29.5348 0H19.4584V1.19241H29.5348C35.5805 1.19241 40.4864 6.23402 40.4864 12.4471C40.4864 16.0871 38.7968 19.3296 36.1709 21.4007L34.9292 20.1246C37.2498 18.4092 38.7561 15.606 38.7561 12.4471C38.7561 7.21724 34.6238 2.97057 29.5348 2.97057H19.4584V4.14207H29.5348C33.9928 4.14207 37.6162 7.86574 37.6162 12.4471C37.6162 15.2713 36.2319 17.7816 34.1149 19.2878L32.8732 18.0117C34.6849 16.8611 35.8859 14.811 35.8859 12.468C35.8859 8.86988 33.036 5.94115 29.5348 5.94115H19.4788L30.8579 17.6142C30.4304 17.7188 30.003 17.7816 29.5551 17.7816H19.4788V18.974H29.5551C30.349 18.974 31.0818 18.8276 31.7943 18.5556L33.1174 19.8945C32.0386 20.4384 30.8376 20.7313 29.5755 20.7313H19.4991V21.9237H29.5755C31.1633 21.9237 32.6696 21.5053 33.9724 20.7731L35.2345 22.0701C33.5856 23.0952 31.6314 23.7018 29.5755 23.7018H19.4991V24.8733H29.5755C31.9775 24.8733 34.1963 24.1621 36.0895 22.9278L39.7129 26.6515H19.4991V27.8439H42.5017L37.0055 22.2375ZM22.2676 7.11264H29.5348C32.405 7.11264 34.7256 9.49747 34.7256 12.4471C34.7256 14.4554 33.6264 16.2336 32.0182 17.1331L22.2676 7.11264Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/sharkrelay.svg b/packages/website/public/images/clients/sharkrelay.svg
deleted file mode 100644
index 41d5376de..000000000
--- a/packages/website/public/images/clients/sharkrelay.svg
+++ /dev/null
@@ -1,32 +0,0 @@
-<svg width="69" height="49" viewBox="0 0 69 49" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0)">
-<path d="M64.9397 26.25C64.9397 26.2761 64.9136 26.2761 64.9136 26.3023C64.9397 26.3023 64.9397 26.3023 64.9659 26.3023C64.9659 26.2761 64.9397 26.2761 64.9397 26.25Z" fill="white"/>
-<path d="M68.0002 40.2872C67.8956 40.3918 67.8695 40.5225 67.791 40.6532C66.9541 42.3004 66.091 43.9476 65.2541 45.5947C65.2018 45.7255 65.1756 45.8301 65.1495 45.9608C65.1233 46.8759 65.1233 47.8171 65.0972 48.7322C65.0972 48.8106 65.0972 48.8891 65.0972 48.9675C64.9925 49.0198 64.9141 48.9937 64.8356 48.9937C64.5479 48.9937 64.2864 48.9937 63.9987 48.9675C63.8418 48.9675 63.8156 48.9675 63.8418 48.7845C63.8679 47.8433 63.8941 46.8759 63.8941 45.9346C63.8941 45.8039 63.8679 45.6732 63.8156 45.5425C63.1356 44.0522 62.4556 42.5619 61.7756 41.0716C61.6449 40.7578 61.4879 40.4441 61.3572 40.1303C61.4095 40.078 61.4618 40.1042 61.5141 40.1042C61.9064 40.1042 62.2987 40.1303 62.6649 40.1303C62.7956 40.1303 62.8479 40.1826 62.9002 40.2872C63.4233 41.5422 63.9726 42.7972 64.4956 44.0522C64.5218 44.0783 64.5218 44.1306 64.5741 44.1567C64.6264 44.1045 64.6525 44.0522 64.6787 43.9737C65.2541 42.7972 65.8556 41.5945 66.431 40.4179C66.5095 40.2349 66.6141 40.1826 66.7971 40.2088C67.1895 40.2349 67.5818 40.2349 67.9741 40.2349C68.0002 40.2611 68.0002 40.2872 68.0002 40.2872Z" fill="white"/>
-<path d="M49.8744 0.0784365C49.8744 0.104582 49.8483 0.104582 49.8483 0.130728V0.156873C48.8806 0.130728 47.9129 0.104582 46.9452 0.0784365C46.9452 0.052291 46.9452 0.0261455 46.9452 -3.89598e-10C47.939 0.052291 48.9067 0.0784365 49.8744 0.0784365Z" fill="white"/>
-<path d="M46.972 0.104492C47.9396 0.130638 48.9073 0.156783 49.875 0.182929C50.8427 0.209074 51.7842 0.339802 52.7258 0.496675C54.1642 0.731984 55.6027 1.07188 57.015 1.46406C57.0411 1.46406 57.0934 1.4902 57.1196 1.51635C57.0673 1.67322 56.9104 1.64708 56.8319 1.69937C55.1319 2.37915 53.4319 3.08508 51.8888 4.05246C51.3135 4.4185 50.7642 4.78454 50.3458 5.33359C50.2412 5.46432 50.1104 5.46432 49.9796 5.43818C49.1689 5.33359 48.3581 5.20287 47.5473 5.09828C46.9981 5.01985 46.4227 4.94141 45.795 4.86297C46.6843 5.67349 47.495 6.40556 48.3319 7.16378C47.9658 7.68669 47.5996 8.18345 47.2858 8.73251C46.1612 10.5888 45.3243 12.5236 44.9058 14.6414C44.3304 17.5958 44.6704 20.4195 46.1873 23.0602C46.2135 23.1125 46.2396 23.1648 46.2396 23.2171C46.2135 23.2433 46.1873 23.2694 46.1873 23.2956C45.2197 22.9034 44.252 22.485 43.2843 22.119C40.2766 20.9425 37.1905 20.0274 34.0259 19.3737C32.2213 19.0077 30.4167 18.7462 28.5859 18.6155C27.069 18.5109 25.5782 18.5371 24.0613 18.6417C23.0936 18.7201 22.1521 18.877 21.2105 19.0861C21.0798 19.1123 20.949 19.1646 20.8182 19.1123C20.8705 18.7462 21.0798 18.4586 21.2367 18.1449C22.7798 15.0597 24.7151 12.2622 27.0167 9.72604C28.8997 7.66054 30.9659 5.8565 33.3197 4.34006C36.1705 2.50988 39.2566 1.22875 42.5781 0.601257C44.0166 0.287511 45.4812 0.104492 46.972 0.104492Z" fill="white"/>
-<path d="M8.78805 29.6229C8.70959 29.0739 8.84036 28.6294 9.12805 28.1849C10.6973 25.858 12.7373 24.1062 15.1696 22.7467C17.3926 21.5178 19.7726 20.7596 22.2834 20.3674C23.5649 20.1583 24.8726 20.0798 26.1803 20.0275C28.0372 19.9752 29.8941 20.1583 31.7249 20.3936C34.1833 20.7335 36.6156 21.3087 38.9956 22.0407C40.0679 22.3806 41.114 22.8251 42.1602 23.2434C44.8017 24.2631 47.4171 25.2828 50.0586 26.3025C51.0001 26.6685 51.9678 27.0345 52.9878 27.2176C55.3417 27.6359 57.5909 27.4267 59.657 26.041C59.8662 25.9103 60.0493 25.7796 60.2586 25.6227C60.2586 25.6227 60.2847 25.6227 60.3109 25.6227C60.4155 25.7011 60.3109 25.7795 60.2586 25.8318C59.5001 26.7992 58.4801 27.4267 57.3555 27.8973C56.0217 28.4202 54.6355 28.6294 53.2232 28.6556C50.8694 28.6817 48.594 28.2372 46.3709 27.5574C45.5863 27.3221 44.854 26.93 44.0956 26.6424C41.5587 25.7011 38.9956 24.969 36.3541 24.4461C34.8895 24.1585 33.451 23.9494 31.9602 23.7925C30.3126 23.6095 28.6649 23.531 26.991 23.5572C25.1864 23.5833 23.3818 23.7402 21.6034 24.0278C18.5695 24.5246 15.6403 25.4135 12.868 26.7731C11.7696 27.296 10.7234 27.8973 9.70343 28.551C9.41574 28.734 9.20651 28.9432 9.07574 29.2569C8.94497 29.3615 8.89266 29.4922 8.78805 29.6229Z" fill="white"/>
-<path d="M47.4944 48.6012C45.8468 48.575 44.1991 48.5227 42.5514 48.4966C42.6037 45.5683 42.6822 42.64 42.7345 39.6855C44.3822 39.7117 46.0298 39.764 47.6775 39.7901C47.6775 40.2085 47.6514 40.6268 47.6514 41.0713C46.4221 41.0451 45.2191 41.019 43.9898 40.9928C43.9637 41.8033 43.9637 42.6138 43.9375 43.4244C44.9837 43.4505 46.0298 43.4766 47.076 43.5028C47.076 43.9473 47.0498 44.3656 47.0498 44.8101C46.0037 44.7839 44.9575 44.7578 43.9114 44.7316C43.8852 45.5683 43.8852 46.3527 43.8591 47.1893C45.0883 47.2155 46.3175 47.2416 47.5468 47.2677C47.4944 47.7384 47.4944 48.1567 47.4944 48.6012Z" fill="white"/>
-<path d="M50.2149 47.3463C51.4702 47.3725 52.6733 47.3986 53.9025 47.4248C53.9548 47.5293 53.9287 47.6339 53.9287 47.7123C53.9287 47.9999 53.9025 48.3137 53.9025 48.6013C53.9025 48.7059 53.8764 48.732 53.7718 48.732C53.7456 48.732 53.7194 48.732 53.6933 48.732C52.1764 48.7059 50.6595 48.6536 49.1425 48.6274C49.0902 48.6274 49.0379 48.6274 48.9595 48.6013C49.0118 45.673 49.0902 42.7447 49.1425 39.8164C49.561 39.8164 49.9533 39.8426 50.3718 39.8426C50.3456 42.3525 50.2933 44.8363 50.2149 47.3463Z" fill="white"/>
-<path d="M64.9129 26.3022C64.9129 26.5114 64.7299 26.616 64.6253 26.7729C63.1606 28.5246 61.3822 29.8842 59.3422 30.9039C57.2761 31.9235 55.1053 32.4987 52.8038 32.7079C50.9992 32.8648 49.2207 32.734 47.4684 32.3941C45.4546 32.002 43.4669 31.5313 41.5577 30.8254C40.0408 30.2764 38.6023 29.5966 37.3208 28.6031C36.9023 28.2893 36.5362 27.9494 36.2223 27.5572C36.17 27.4788 36.0916 27.4265 36.0916 27.3219C36.2223 27.2696 36.3008 27.3742 36.3792 27.4265C38.8377 28.6031 41.4008 29.3874 44.0684 29.9103C46.1869 30.3287 48.3576 30.564 50.5284 30.5378C53.9022 30.4855 57.1714 29.8842 60.336 28.6292C61.853 28.0278 63.2914 27.2958 64.6776 26.433C64.756 26.3545 64.8083 26.3022 64.9129 26.3022Z" fill="white"/>
-<path d="M58.3758 40.6791C57.7481 42.2217 57.1204 43.7382 56.4665 45.2546C55.9958 46.3789 55.5512 47.5031 55.0804 48.6274C55.0281 48.7581 54.9758 48.8365 54.8189 48.7842C54.7404 48.7581 54.6881 48.7842 54.6096 48.7581C54.7142 48.4966 54.8188 48.2352 54.9235 47.9737C55.9958 45.3853 57.0681 42.7969 58.1404 40.2347C58.1665 40.1562 58.1665 40.0255 58.2973 39.9993C58.4281 39.9732 58.5588 39.9993 58.6111 40.1301C58.7419 40.4961 58.8727 40.836 59.0034 41.202C59.9188 43.6859 60.808 46.1958 61.7234 48.6797C61.7496 48.7581 61.7757 48.8365 61.8019 48.9411C61.6973 48.9934 61.5665 48.9673 61.4619 48.9411C61.3834 48.9411 61.3834 48.8365 61.3573 48.7842C61.1219 48.1567 60.9127 47.5293 60.6773 46.9279C59.945 44.8886 59.1865 42.8492 58.4542 40.8099C58.4542 40.7314 58.4542 40.7053 58.3758 40.6791Z" fill="white"/>
-<path d="M27.1739 48.3659C26.9385 48.3659 26.86 48.1567 26.8077 48.0783L26.3108 46.8233C26.3108 46.8233 25.6046 45.0715 25.4216 44.6532C25.0554 44.6793 24.6631 44.6793 24.14 44.6793C23.9046 44.6793 23.6954 44.6793 23.46 44.6532C23.2246 44.6532 23.0154 44.6271 22.78 44.6271C22.6231 44.6271 22.4662 44.6271 22.3093 44.6271H22.2831C22.257 45.4114 22.257 46.1696 22.2308 46.954L22.2047 47.7645C22.2047 47.8429 22.2047 47.8952 22.2047 47.9475C22.1785 48.1306 22.0477 48.2351 21.8647 48.2351C21.6816 48.2351 21.5508 48.1044 21.5247 47.9475C21.5247 47.8952 21.5247 47.843 21.5247 47.8168L21.7077 39.4502C21.7077 39.4241 21.7077 39.398 21.7077 39.3718L21.7339 39.2411L21.8647 39.1626C21.9431 39.1104 22.0216 39.1104 22.1262 39.1104C22.1523 39.1104 22.2308 39.1104 22.2308 39.1104C22.2308 39.1104 23.4077 39.1365 23.8785 39.1365C24.2446 39.1365 24.6369 39.1626 25.0031 39.1626C25.4477 39.1626 25.84 39.2411 26.18 39.398C26.86 39.6856 27.2785 40.1562 27.4877 40.8621C27.7231 41.6465 27.6969 42.4308 27.4092 43.189C27.1739 43.8427 26.7031 44.3133 26.0493 44.5225L27.54 48.209L27.3308 48.3136C27.3308 48.3659 27.2523 48.3659 27.1739 48.3659ZM23.8 43.9996C24.1662 43.9996 24.5323 44.0257 24.8985 44.0257C25.0816 44.0257 25.2908 44.0257 25.5 43.9996C26.1539 43.8688 26.5723 43.5289 26.8077 42.9537C26.9646 42.5354 26.9908 42.1171 26.9646 41.6988C26.9646 41.3327 26.8862 41.0451 26.7292 40.7575C26.4416 40.2085 25.9446 39.9209 25.2908 39.8947C24.8985 39.8686 24.48 39.8686 23.957 39.8424C23.6693 39.8424 23.3816 39.8424 23.0939 39.8163C22.8585 39.8163 22.6493 39.8163 22.4139 39.8163L22.3093 43.9734L23.8 43.9996Z" fill="white"/>
-<path d="M25.8133 44.3396C25.8657 44.3135 25.8918 44.3135 25.9441 44.2873C26.5718 44.0782 26.9903 43.686 27.1995 43.0847C27.461 42.3787 27.4872 41.6467 27.2518 40.9407C27.0687 40.3394 26.6764 39.8949 26.101 39.6596C25.761 39.5027 25.3949 39.4504 25.0026 39.4504C24.0872 39.4243 23.1718 39.3981 22.2564 39.3981C22.178 39.3981 22.1257 39.372 22.0472 39.4243C22.0472 39.4504 22.0472 39.4766 22.0472 39.5027C21.9949 42.3003 21.9164 45.0717 21.8641 47.8693C21.8641 47.8954 21.8641 47.9477 21.8641 47.9739C21.8641 48 21.8903 48.0262 21.9426 48.0262C21.9688 48.0262 22.0211 48 22.0211 47.9739C22.0211 47.9216 22.0211 47.8693 22.0211 47.817C22.0472 46.7712 22.0734 45.6992 22.0995 44.6534C22.0995 44.5749 22.0734 44.4965 22.1518 44.4181C22.2303 44.4181 22.3087 44.4181 22.3872 44.4181C23.4334 44.4181 24.4795 44.5227 25.5257 44.4442C25.6303 44.4442 25.6564 44.5227 25.6826 44.5749C25.9703 45.307 26.2841 46.0391 26.5718 46.7712C26.7287 47.1895 26.9118 47.6078 27.0687 48.0262C27.0949 48.1046 27.1472 48.183 27.278 48.1307C26.781 46.8758 26.258 45.6469 25.761 44.4181C25.7872 44.3396 25.8133 44.3396 25.8133 44.3396ZM25.578 44.2351C25.3687 44.2873 25.1334 44.2873 24.9241 44.2873C24.0349 44.2612 23.1195 44.2612 22.2303 44.2351C22.2041 44.2351 22.1518 44.2351 22.0995 44.2351L22.2041 39.5812C22.2303 39.5812 22.2564 39.555 22.2564 39.555C23.2764 39.5812 24.3226 39.5812 25.3426 39.6334C26.0487 39.6596 26.6503 39.9995 26.9903 40.6531C27.1733 40.9669 27.2518 41.3329 27.2518 41.6989C27.278 42.1696 27.2518 42.614 27.0687 43.0585C26.8072 43.7383 26.2841 44.1043 25.578 44.2351Z" fill="white"/>
-<path d="M7.63696 47.9477C7.45389 47.9477 7.32312 47.817 7.32312 47.6601C7.32312 47.5817 7.32312 47.5032 7.32312 47.451L7.5062 39.2151C7.5062 39.1628 7.5062 39.1367 7.5062 39.0844C7.53235 38.9014 7.66312 38.7706 7.84619 38.7968C8.05542 38.8229 8.16004 38.9537 8.18619 39.1105C8.18619 39.1628 8.18619 39.2151 8.18619 39.2674L8.10773 43.0062L12.9462 43.1108C12.9723 42.0911 12.9985 41.0453 13.0246 40.0256L13.0508 39.2413C13.0508 39.0582 13.1816 38.9014 13.3646 38.9014C13.4692 38.9014 13.5477 38.9275 13.6262 39.006C13.6785 39.0844 13.7308 39.1628 13.7046 39.2674L13.5216 47.5817C13.5216 47.6601 13.5216 47.7124 13.5216 47.7647C13.4954 47.9477 13.3646 48.0523 13.1816 48.0523C12.9985 48.0523 12.8677 47.9216 12.8416 47.7386C12.8416 47.6863 12.8416 47.634 12.8416 47.5817L12.92 43.8167L8.08158 43.7121C8.05542 44.6795 8.02927 45.6469 8.00312 46.6143L7.97696 47.5032C7.97696 47.5555 7.97696 47.6078 7.97696 47.634C7.95081 47.817 7.82004 47.9477 7.63696 47.9477Z" fill="white"/>
-<path d="M13.1557 43.5551C11.3772 43.5028 9.62495 43.4767 7.8465 43.4244C7.79419 43.5028 7.82034 43.5813 7.82034 43.6597C7.79419 44.9147 7.76804 46.1958 7.74188 47.4508C7.74188 47.5031 7.74188 47.5554 7.74188 47.6077C7.74188 47.66 7.71573 47.66 7.66342 47.66C7.63727 47.66 7.58496 47.6338 7.58496 47.6077C7.58496 47.5554 7.58496 47.477 7.58496 47.4247C7.63727 44.8363 7.68958 42.274 7.76804 39.6856C7.76804 39.5287 7.76804 39.3719 7.76804 39.215C7.76804 39.1888 7.76804 39.1365 7.76804 39.1104C7.76804 39.0581 7.82034 39.032 7.8465 39.0581C7.89881 39.0581 7.89881 39.0843 7.89881 39.1365C7.89881 39.1888 7.89881 39.2411 7.89881 39.2934C7.87265 40.5484 7.8465 41.8034 7.82034 43.0322C7.82034 43.1107 7.79419 43.1891 7.82034 43.2675C9.5988 43.3198 11.3511 43.346 13.1295 43.3983C13.1819 43.3198 13.1557 43.2414 13.1557 43.163C13.1819 41.908 13.208 40.6791 13.2342 39.4241C13.2342 39.3719 13.2342 39.3196 13.2342 39.2673C13.2342 39.215 13.2603 39.1888 13.3126 39.1888C13.3911 39.1888 13.3911 39.2411 13.3911 39.2934C13.3911 39.3457 13.3911 39.3719 13.3911 39.4241C13.3388 42.1433 13.2603 44.8886 13.208 47.6077C13.208 47.66 13.208 47.7123 13.208 47.7646C13.208 47.7907 13.1819 47.8169 13.1295 47.8169C13.1034 47.8169 13.0511 47.7907 13.0511 47.7646C13.0511 47.7123 13.0511 47.66 13.0511 47.6077C13.0772 46.3527 13.1034 45.0977 13.1295 43.8427C13.1557 43.7382 13.1819 43.6597 13.1557 43.5551Z" fill="white"/>
-<path d="M3.00768 47.9475C2.90306 47.9475 2.79845 47.9475 2.69383 47.9214C2.27537 47.8952 1.93537 47.8168 1.62153 47.7122C0.758458 47.3723 0.20923 46.7187 0.0523074 45.7513C0 45.5422 0 45.333 0 45.1238C0.0261537 44.7839 0.287691 44.7839 0.339998 44.7839H0.366152C0.418459 44.7839 0.653843 44.8362 0.653843 45.1238C0.653843 45.3853 0.679996 45.5944 0.732304 45.8036C0.889226 46.5357 1.35999 47.0063 2.11845 47.1893C2.4323 47.2678 2.71999 47.32 3.03383 47.32C3.39998 47.32 3.79229 47.2678 4.15844 47.1632C5.28305 46.8494 5.46613 45.9343 5.41382 45.2284C5.38766 44.9147 5.3092 44.6532 5.15228 44.4179C4.9169 44.1042 4.60305 43.895 4.10613 43.7643C3.71383 43.6597 3.32152 43.5812 2.95537 43.4767C2.69383 43.4244 2.43229 43.3459 2.19691 43.2936C1.88307 43.2152 1.62153 43.1106 1.38615 42.9799C0.810765 42.6661 0.470767 42.1955 0.339998 41.568C0.235383 41.0451 0.261537 40.5745 0.418459 40.1039C0.627689 39.4764 1.0723 39.0058 1.7523 38.7705C2.22307 38.5874 2.69383 38.5613 3.26921 38.5352C3.68767 38.5613 4.13229 38.6136 4.55075 38.7705C5.38766 39.0842 5.88459 39.6856 6.06766 40.6007C6.09381 40.7575 6.11997 40.8883 6.11997 41.0451L6.14612 41.1759C6.14612 41.2281 6.14612 41.3066 6.14612 41.3589C6.14612 41.6988 5.85843 41.7249 5.80612 41.7249C5.67536 41.7249 5.59689 41.6726 5.54459 41.6203C5.43997 41.5157 5.46613 41.4112 5.46613 41.3589C5.46613 41.1497 5.43997 40.9144 5.41382 40.7052C5.28305 39.9993 4.89074 39.5548 4.2369 39.3718C3.8969 39.2672 3.5569 39.2149 3.24306 39.2149C2.79845 39.2149 2.37999 39.2934 1.96153 39.4503C1.43845 39.6594 1.12461 40.0516 1.04615 40.6529C0.993841 40.9667 1.01999 41.2543 1.0723 41.5419C1.20307 42.0387 1.54307 42.3785 2.0923 42.5877C2.30153 42.6661 2.53691 42.7184 2.79845 42.7707C2.90306 42.7969 3.00768 42.823 3.11229 42.8492C3.26921 42.8753 3.42614 42.9276 3.58306 42.9537C3.87075 43.0322 4.15844 43.0845 4.44613 43.1629C5.12613 43.3459 5.59689 43.712 5.91074 44.2349C6.06766 44.4963 6.14612 44.7839 6.17228 45.0715C6.19843 45.4376 6.22458 45.9605 6.01535 46.4834C5.75382 47.1109 5.3092 47.5292 4.62921 47.7645C4.02767 47.8952 3.5569 47.9737 3.00768 47.9475Z" fill="white"/>
-<path d="M3.19118 38.8228C3.58348 38.8489 3.97579 38.875 4.3681 39.0319C5.12655 39.3195 5.54501 39.8686 5.70194 40.6529C5.72809 40.836 5.75424 41.019 5.75424 41.202C5.75424 41.2543 5.75424 41.3066 5.75424 41.3589C5.75424 41.4112 5.7804 41.4896 5.67578 41.4896C5.59732 41.4896 5.59732 41.4112 5.59732 41.3589C5.59732 41.1236 5.57117 40.8882 5.51886 40.6529C5.36194 39.8686 4.91732 39.3457 4.15887 39.1104C3.3481 38.875 2.51118 38.875 1.70042 39.1888C1.07273 39.4241 0.706576 39.9209 0.601961 40.5745C0.549654 40.9144 0.549654 41.2281 0.654269 41.568C0.811191 42.1955 1.22965 42.5877 1.83119 42.7969C2.17118 42.9276 2.51118 42.9799 2.87733 43.0583C3.32195 43.1629 3.76656 43.2675 4.21117 43.3721C4.7604 43.5289 5.23117 43.8165 5.51886 44.3133C5.64963 44.5486 5.72809 44.7839 5.75424 45.0454C5.7804 45.4899 5.7804 45.9082 5.62347 46.3265C5.38809 46.9017 4.96963 47.2678 4.39425 47.4769C3.84502 47.6599 3.29579 47.7122 2.72041 47.6599C2.38041 47.6338 2.04042 47.5815 1.70042 47.4508C0.889652 47.137 0.445039 46.5357 0.288117 45.699C0.261963 45.5421 0.261963 45.333 0.261963 45.1238C0.261963 45.0715 0.261963 45.0192 0.340424 45.0192C0.392731 45.0192 0.392731 45.0715 0.392731 45.1238C0.392731 45.3591 0.418885 45.5944 0.471193 45.8297C0.654269 46.6926 1.2035 47.2155 2.04042 47.4246C2.77272 47.6076 3.47887 47.6076 4.21117 47.3985C5.30963 47.0847 5.72809 46.2219 5.64963 45.2023C5.62347 44.8624 5.54501 44.5486 5.33578 44.261C5.04809 43.8427 4.62963 43.6335 4.13271 43.5028C3.50502 43.3459 2.85118 43.1891 2.19734 43.0322C1.9358 42.9799 1.67426 42.8753 1.43888 42.7446C0.941959 42.457 0.628115 42.0648 0.5235 41.5157C0.445039 41.0713 0.445039 40.6268 0.575807 40.1823C0.758883 39.6071 1.17734 39.2149 1.75272 39.0058C2.22349 38.875 2.69426 38.8228 3.19118 38.8228Z" fill="white"/>
-<path d="M33.9471 48.5228C33.764 48.5228 33.6594 48.3659 33.6071 48.3137L33.1101 47.6077L30.4425 43.8166L30.2071 44.0519C29.9194 44.3395 29.6578 44.6533 29.3702 44.9409C29.344 44.967 29.344 44.9932 29.344 45.0455C29.3178 45.7775 29.3178 46.5358 29.2917 47.2678L29.2655 47.9476C29.2655 47.9999 29.2655 48.0522 29.2655 48.1045C29.2655 48.2875 29.1086 48.3921 28.9517 48.4182C28.7686 48.4182 28.6378 48.2875 28.6117 48.1045C28.6117 48.0522 28.6117 47.9999 28.6117 47.9738L28.7948 39.7641C28.7948 39.7118 28.7948 39.6334 28.7948 39.5811C28.8209 39.398 28.9517 39.2935 29.1348 39.2935C29.3178 39.2935 29.4486 39.4242 29.4486 39.6072C29.4486 39.6595 29.4486 39.7118 29.4486 39.7641L29.344 43.9996C30.1025 43.1891 30.8871 42.3525 31.6455 41.542L33.5024 39.5549C33.5547 39.5026 33.6594 39.3719 33.8424 39.3719C33.9209 39.3719 33.9994 39.398 34.0778 39.4503L34.3394 39.6333L30.8871 43.3199L34.3917 48.3137L34.1563 48.4705C34.104 48.4967 34.0255 48.5228 33.9471 48.5228Z" fill="white"/>
-<path d="M33.9464 39.6856C32.8218 40.8883 31.6972 42.091 30.5726 43.2937C31.7233 44.9409 32.8741 46.5881 34.051 48.2352C33.9464 48.3137 33.8941 48.2352 33.8418 48.1829C33.6849 47.9476 33.5018 47.7123 33.3449 47.477C32.4295 46.1959 31.5141 44.8886 30.6249 43.6075C30.5987 43.5552 30.5464 43.5029 30.5203 43.4767C30.468 43.4767 30.4418 43.5029 30.4157 43.529C30.0234 43.9474 29.631 44.3918 29.2387 44.8102C29.1603 44.8886 29.1341 44.967 29.1341 45.0978C29.108 46.0651 29.0818 47.0064 29.0818 47.9738C29.0818 48.0261 29.0818 48.0783 29.0818 48.1306C29.0818 48.1829 29.0557 48.1829 29.0034 48.1829C28.9511 48.1829 28.951 48.1568 28.951 48.1306C28.951 48.0783 28.951 48.0261 28.951 47.9738C29.0034 45.2546 29.0818 42.5093 29.1341 39.7902C29.1341 39.7379 29.1341 39.6856 29.1341 39.6333C29.1341 39.6072 29.1603 39.5811 29.2126 39.5811C29.2649 39.5811 29.2649 39.6072 29.2649 39.6333C29.2649 39.6856 29.2649 39.7379 29.2649 39.7902C29.2387 41.3328 29.1864 42.8754 29.1603 44.418C29.1603 44.4964 29.1603 44.5748 29.1603 44.6794C29.3172 44.5748 29.4218 44.418 29.5264 44.3134C30.5987 43.1891 31.6449 42.0387 32.7172 40.9145C33.0833 40.5223 33.4233 40.1563 33.7895 39.7641C33.7633 39.6595 33.8156 39.5811 33.9464 39.6856Z" fill="white"/>
-<path d="M14.2026 48.0786C14.1503 48.0786 14.098 48.0524 14.0457 48.0524L13.8364 47.974L13.8887 47.7387C13.941 47.5557 14.0195 47.3988 14.0718 47.2419C14.098 47.1896 14.1241 47.1373 14.1241 47.085C15.1964 44.4966 16.2687 41.9344 17.3149 39.3721C17.3933 39.0845 17.5764 39.0322 17.7072 39.0322C17.9164 39.0322 18.0472 39.163 18.0995 39.3721V39.3983C19.041 41.9605 19.9564 44.5489 20.8979 47.1112L21.081 47.5818C21.1072 47.6341 21.1333 47.7125 21.1595 47.7648L21.2641 48.0786L21.0549 48.1832C20.9764 48.2093 20.9241 48.2354 20.8456 48.2354C20.6887 48.2354 20.5841 48.1309 20.5056 47.9478C20.401 47.6864 20.3225 47.4249 20.2179 47.1635L20.061 46.6929L17.7072 40.1826L14.5687 47.791C14.4903 48.0001 14.3595 48.0786 14.2026 48.0786Z" fill="white"/>
-<path d="M14.1241 47.7907C14.1765 47.5816 14.2811 47.3724 14.3595 47.1894C15.4318 44.601 16.5041 42.0387 17.5503 39.4765C17.5764 39.398 17.5764 39.2935 17.7072 39.2935C17.838 39.2935 17.8118 39.4242 17.8641 39.5026C18.858 42.2218 19.8518 44.967 20.8456 47.6862C20.8718 47.7646 20.898 47.8692 20.9503 47.9738C20.8195 48.0261 20.7933 47.9738 20.7672 47.8692C20.6103 47.4509 20.4533 47.0325 20.3226 46.6403C19.6949 44.8625 19.041 43.1107 18.4134 41.3328C18.2041 40.7576 17.9949 40.1824 17.7857 39.6072C17.7857 39.5811 17.7857 39.5549 17.7334 39.5288C17.6549 39.7118 17.5764 39.921 17.498 40.104C16.4518 42.6401 15.4057 45.1762 14.3595 47.6862C14.2811 47.7646 14.2811 47.8692 14.1241 47.7907Z" fill="white"/>
-<path d="M46.214 23.2173C46.2401 23.2434 46.2663 23.2696 46.2401 23.2957C46.214 23.3219 46.1878 23.2957 46.1355 23.2696C46.1878 23.2434 46.214 23.2173 46.214 23.2173Z" fill="white"/>
-<path d="M64.9136 26.3023C64.9136 26.2761 64.9397 26.2761 64.9397 26.25C64.9397 26.2761 64.9659 26.2761 64.9659 26.3023C64.9397 26.3023 64.9136 26.3023 64.9136 26.3023Z" fill="white"/>
-<path d="M20.7912 19.1123C20.8174 19.1385 20.7912 19.1646 20.765 19.1646C20.765 19.1646 20.7389 19.1646 20.7389 19.1384C20.765 19.1384 20.7912 19.1123 20.7912 19.1123Z" fill="white"/>
-<path d="M39.6746 45.0976C39.7269 45.0714 39.7531 45.0453 39.7792 45.0453C40.2761 44.81 40.6161 44.4178 40.7992 43.8949C41.113 43.0844 41.1392 42.2216 40.9561 41.3849C40.7207 40.2345 39.9884 39.6332 38.8115 39.5809C37.7654 39.5286 36.7454 39.5286 35.6992 39.5024C35.6731 39.5024 35.6469 39.5024 35.6208 39.5286C35.5946 39.5809 35.6208 39.6593 35.6208 39.7116C35.5685 42.483 35.49 45.2806 35.4377 48.052C35.4377 48.0782 35.4377 48.1043 35.4377 48.1305C35.4115 48.2612 35.4638 48.2873 35.5946 48.2873C35.9085 48.2873 36.2223 48.2873 36.5361 48.3135C36.5885 48.3135 36.6408 48.3396 36.7192 48.2612L36.7977 45.176C37.2684 45.176 37.7392 45.2022 38.1838 45.2022C38.3669 45.2022 38.3669 45.2022 38.4454 45.3852C38.8115 46.3264 39.1515 47.2677 39.5177 48.2089C39.5438 48.2873 39.57 48.3658 39.7007 48.3658C40.1454 48.3658 40.5638 48.3919 41.0346 48.3919C40.5638 47.3199 40.1192 46.2218 39.6746 45.0976ZM39.5961 43.2935C39.4392 43.7119 39.1254 43.9472 38.6546 43.9472C38.0531 43.9472 37.4254 43.921 36.7977 43.921L36.8761 40.8882C36.9285 40.8359 36.9808 40.862 37.0331 40.862C37.53 40.862 38.0269 40.8882 38.55 40.8882C38.6807 40.8882 38.8377 40.9143 38.9684 40.9404C39.3084 41.0189 39.5177 41.228 39.6484 41.5679C39.8054 42.1431 39.8054 42.7445 39.5961 43.2935Z" fill="white"/>
-</g>
-<defs>
-<clipPath id="clip0">
-<rect width="69" height="49" fill="white"/>
-</clipPath>
-</defs>
-</svg>
diff --git a/packages/website/public/images/clients/starbitex.svg b/packages/website/public/images/clients/starbitex.svg
deleted file mode 100644
index eee21b3fc..000000000
--- a/packages/website/public/images/clients/starbitex.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-<svg width="64" height="50" viewBox="0 0 64 50" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M28.6823 41.0316C28.7604 40.9785 28.8125 40.9785 28.8646 40.9785C29.7499 40.9785 30.6352 40.9785 31.5205 41.0051C32.0153 41.0316 32.51 41.1113 32.9526 41.3237C33.6557 41.6423 33.9682 42.2265 33.9161 42.9966C33.89 43.6338 33.6297 44.1649 33.0828 44.5101C33.0568 44.5366 33.0047 44.5632 32.9787 44.6163C33.0568 44.7225 33.161 44.7756 33.2651 44.8022C33.9421 45.0943 34.2806 45.5988 34.3327 46.3157C34.4369 47.6434 33.6557 48.3603 32.5621 48.679C32.1194 48.7852 31.6767 48.8383 31.2341 48.8117C30.479 48.8117 29.7499 48.8117 28.9948 48.8117C28.8906 48.8117 28.7864 48.8383 28.6563 48.7586C28.6823 46.2095 28.6823 43.6338 28.6823 41.0316ZM30.1665 46.4485C30.1665 46.714 30.1665 47.0061 30.1665 47.2716C30.1665 47.5637 30.1925 47.5903 30.505 47.5903C30.8175 47.5903 31.1039 47.5903 31.4164 47.5903C31.7028 47.5903 31.9632 47.5372 32.2236 47.431C32.6402 47.2451 32.8485 46.8733 32.8485 46.3954C32.8225 45.944 32.6141 45.6784 32.1975 45.5191C31.5986 45.2801 30.9737 45.4129 30.3748 45.3863C30.2446 45.3863 30.1925 45.466 30.1925 45.6253C30.1665 45.8909 30.1665 46.1564 30.1665 46.4485ZM31.0258 42.2C30.7654 42.2 30.5831 42.2 30.4008 42.2C30.2446 42.2 30.1665 42.2796 30.1925 42.4389C30.1925 42.9435 30.1925 43.4214 30.1925 43.9259C30.1925 44.1118 30.2707 44.1915 30.4529 44.1915C30.7914 44.1915 31.1039 44.1915 31.4164 44.1649C31.6507 44.1649 31.833 44.0852 32.0152 43.979C32.3798 43.7666 32.4839 43.448 32.4579 43.0497C32.4319 42.7045 32.2496 42.4655 31.9371 42.3327C31.5986 42.2 31.2862 42.2265 31.0258 42.2Z" fill="white"/>
-<path d="M19.229 41.0315C19.3331 40.9518 19.4113 40.9784 19.4894 40.9784C20.2966 40.9784 21.0777 40.9784 21.8849 40.9784C22.5099 40.9784 23.1088 41.058 23.6816 41.3767C24.3326 41.7219 24.6711 42.306 24.7232 43.023C24.7752 43.5275 24.7492 44.0054 24.5149 44.4568C24.3065 44.8817 24.0201 45.2003 23.6035 45.4393C23.3171 45.5986 23.291 45.6252 23.4733 45.9438C23.968 46.8201 24.4367 47.6698 24.9315 48.546C24.9836 48.6257 25.0096 48.6788 25.0096 48.785C24.8534 48.8647 24.6971 48.8381 24.5409 48.8381C24.2545 48.8381 23.942 48.8381 23.6556 48.8381C23.4473 48.8381 23.3171 48.785 23.2129 48.5726C22.7963 47.7494 22.3536 46.9529 21.911 46.1297C21.8329 45.9704 21.7287 45.8907 21.5464 45.8907C21.3642 45.8907 21.1819 45.8907 20.9996 45.8907C20.7392 45.8907 20.7132 45.9438 20.7132 46.2094C20.7132 46.9263 20.7132 47.6698 20.7132 48.3867C20.7132 48.5195 20.7392 48.6523 20.6611 48.8116C20.1924 48.8116 19.7237 48.8116 19.229 48.8116C19.1769 48.5726 19.1509 41.4829 19.229 41.0315ZM20.6872 43.3947C20.6872 43.7133 20.6872 44.0054 20.6872 44.3241C20.6872 44.5365 20.7653 44.6162 20.9736 44.6162C21.4162 44.6162 21.8849 44.6162 22.3276 44.5365C22.588 44.4834 22.8223 44.3772 22.9786 44.1382C23.5514 43.4213 23.1869 42.4388 22.3016 42.2795C21.8589 42.1998 21.4423 42.1998 20.9996 42.1998C20.7913 42.1998 20.7132 42.2795 20.7132 42.4919C20.7132 42.8105 20.7132 43.1026 20.6872 43.3947Z" fill="white"/>
-<path d="M51.1289 48.7853C51.1289 46.1831 51.1289 43.6074 51.1289 41.0583C51.2331 40.9787 51.3372 41.0052 51.4153 41.0052C52.7693 41.0052 54.0973 41.0052 55.4513 41.0052C55.8419 41.0052 55.8419 41.0052 55.8419 41.4035C55.8419 41.6159 55.8419 41.8284 55.8419 42.0143C55.8419 42.2798 55.8159 42.3063 55.5034 42.3063C54.8264 42.3063 54.1494 42.3063 53.4724 42.3063C53.2901 42.3063 53.0818 42.3063 52.8995 42.3063C52.7173 42.3063 52.6392 42.386 52.6392 42.5719C52.6392 42.9702 52.6392 43.3685 52.6392 43.7668C52.6392 44.0323 52.6912 44.0854 52.9777 44.0854C53.6547 44.0854 54.3317 44.0854 55.0087 44.0854C55.3472 44.0854 55.3472 44.0854 55.3472 44.4306C55.3472 44.643 55.3472 44.8554 55.3472 45.0944C55.3472 45.36 55.3211 45.3865 55.0608 45.3865C54.4098 45.3865 53.7849 45.3865 53.1339 45.3865C53.0558 45.3865 53.0037 45.3865 52.9256 45.3865C52.7433 45.3865 52.6392 45.4662 52.6392 45.652C52.6392 46.1565 52.6392 46.6876 52.6392 47.1921C52.6392 47.4046 52.6912 47.4577 52.9777 47.4577C53.7849 47.4577 54.566 47.4577 55.3732 47.4577C55.4513 47.4577 55.5295 47.4577 55.6076 47.4577C55.894 47.4577 55.92 47.5108 55.92 47.7763C55.92 48.0418 55.92 48.3074 55.92 48.5729C55.92 48.7057 55.868 48.7853 55.7117 48.7853C55.6596 48.7853 55.6076 48.7853 55.5555 48.7853C54.1754 48.7853 52.7954 48.7853 51.3893 48.7853C51.3372 48.8384 51.2331 48.8384 51.1289 48.7853Z" fill="white"/>
-<path d="M11.5742 48.8383C11.7044 48.3869 11.8346 48.0151 11.9388 47.6168C12.2773 46.5281 12.6158 45.466 12.9543 44.3773C13.2928 43.3418 13.6052 42.2796 13.9437 41.244C13.9958 41.0847 14.1 40.9785 14.2822 40.9785C14.6989 40.9785 15.1415 40.9785 15.5581 40.9785C15.7404 40.9785 15.8446 41.0582 15.9227 41.2175C16.2352 42.2531 16.5737 43.2886 16.8861 44.3242C17.1726 45.2536 17.459 46.1829 17.7714 47.1123C17.9277 47.5903 18.0839 48.0682 18.2141 48.5462C18.2401 48.6259 18.2662 48.7055 18.2141 48.8117C17.7714 48.8117 17.3027 48.8117 16.834 48.8117C16.7039 48.8117 16.6518 48.7321 16.6257 48.6258C16.4955 48.1213 16.3393 47.6434 16.2352 47.1389C16.1831 46.9264 16.0789 46.8202 15.8706 46.8202C15.2196 46.8202 14.5947 46.8202 13.9437 46.8202C13.7354 46.8202 13.6573 46.8999 13.6052 47.1123C13.5011 47.5903 13.3449 48.0417 13.2407 48.4931C13.1626 48.7852 13.1365 48.8117 12.8241 48.8383C12.4335 48.8383 12.0429 48.8383 11.5742 48.8383ZM14.9332 42.2796C14.803 42.439 14.7509 42.5983 14.7249 42.731C14.6468 43.0762 14.5687 43.3949 14.4645 43.7401C14.3083 44.2446 14.1781 44.7756 14.0479 45.3067C13.9698 45.5722 14.0219 45.6519 14.3083 45.6519C14.6989 45.6519 15.0895 45.6519 15.48 45.6519C15.7925 45.6519 15.8185 45.5988 15.7144 45.3067C15.5581 44.696 15.4019 44.0852 15.2196 43.5011C15.1415 43.0762 15.0634 42.6779 14.9332 42.2796Z" fill="white"/>
-<path d="M5.22159 41.8547C5.03932 42.1468 4.80497 42.3858 4.6227 42.6513C4.4925 42.8106 4.38835 42.7841 4.25816 42.6779C3.99777 42.4654 3.6853 42.3327 3.37284 42.253C2.98226 42.1468 2.59167 42.1468 2.22713 42.3327C1.70636 42.5716 1.6022 43.1293 2.01882 43.5276C2.25317 43.7665 2.56564 43.8462 2.85206 43.979C3.3468 44.1914 3.8155 44.3773 4.31023 44.6428C5.11743 45.0676 5.56009 45.7315 5.53405 46.6609C5.50802 47.6168 5.01328 48.2806 4.18004 48.6789C3.13849 49.1569 2.0709 49.0772 1.05539 48.5992C0.716884 48.4399 0.430457 48.254 0.144031 48.0151C-0.0382406 47.8557 -0.0382406 47.8026 0.0919532 47.6168C0.300263 47.3512 0.534612 47.0857 0.768961 46.7936C0.951232 46.7936 1.02935 46.9264 1.15954 47.006C1.75843 47.4309 2.38336 47.6699 3.11245 47.5637C3.6853 47.484 3.99777 47.1122 3.97173 46.6343C3.94569 46.2891 3.73738 46.0767 3.47699 45.9439C3.06037 45.7315 2.61771 45.5456 2.17505 45.3597C1.75843 45.1739 1.36785 44.9614 1.00331 44.6959C-0.0642794 43.9524 -0.0642794 42.1733 1.10746 41.3767C1.96674 40.7926 2.90414 40.7129 3.89361 41.0316C4.38835 41.1909 4.85705 41.4299 5.22159 41.8547Z" fill="white"/>
-<path d="M63.0006 48.8115C62.584 48.8646 62.1934 48.8115 61.8289 48.8381C61.4383 48.8912 61.256 48.7319 61.0998 48.3867C60.7613 47.6432 60.3707 46.9262 60.0582 46.2093C60.0062 46.1031 59.9541 46.0234 59.876 45.8907C59.6416 46.1827 59.5635 46.5279 59.4073 46.8466C59.1208 47.4307 58.8344 48.0415 58.574 48.6522C58.5219 48.785 58.4438 48.8646 58.2876 48.8646C57.8449 48.8646 57.4023 48.8646 56.9596 48.8646C56.9336 48.8646 56.9075 48.8381 56.8555 48.8115C57.1159 48.2804 57.4023 47.7759 57.6627 47.2714C58.0272 46.5545 58.4178 45.8641 58.8084 45.1737C58.9386 44.9347 58.9386 44.7489 58.8084 44.5099C58.2616 43.5009 57.7147 42.4653 57.1679 41.4297C57.1159 41.3235 57.0638 41.2173 57.0638 41.1111C57.1159 41.0049 57.22 41.0314 57.2981 41.0314C57.6366 41.0314 58.0012 41.058 58.3397 41.0314C58.574 41.0049 58.7042 41.1111 58.8084 41.3235C59.1208 42.0404 59.4593 42.7308 59.7978 43.4212C59.8499 43.554 59.928 43.6602 59.9801 43.7929C60.1103 43.7133 60.1624 43.6071 60.2145 43.5009C60.5269 42.7574 60.8654 42.0139 61.1779 41.2704C61.256 41.1111 61.3602 41.0049 61.5685 41.0314C61.9851 41.058 62.4017 41.0314 62.8183 41.0314C62.8444 41.1907 62.7663 41.2969 62.7142 41.4031C62.1674 42.4653 61.6206 43.5009 61.0477 44.563C60.9175 44.802 60.8915 45.0144 61.0477 45.2534C61.6726 46.3421 62.2455 47.4573 62.8444 48.546C62.8965 48.5725 62.9225 48.6522 63.0006 48.8115Z" fill="white"/>
-<path d="M40.6345 48.8381C40.5564 48.6522 40.5824 48.5195 40.5824 48.4132C40.5824 46.5545 40.5824 44.7223 40.5824 42.8636C40.5824 42.7839 40.5824 42.7043 40.5824 42.6246C40.6085 42.4122 40.5043 42.3325 40.3221 42.3325C39.8273 42.3325 39.3326 42.3325 38.8378 42.3325C38.4473 42.3325 38.4473 42.3325 38.4473 41.9342C38.4473 41.7218 38.4473 41.5094 38.4473 41.3235C38.4473 41.0314 38.4733 41.0314 38.7597 41.0049C38.916 41.0049 39.0982 41.0049 39.2545 41.0049C40.8168 41.0049 42.3791 41.0049 43.9414 41.0049C44.306 41.0049 44.332 41.0049 44.332 41.3766C44.332 41.5891 44.332 41.8015 44.332 42.0405C44.332 42.306 44.306 42.3325 44.0456 42.3325C43.5509 42.3325 43.0561 42.3325 42.5614 42.3325C42.1708 42.3325 42.1708 42.3325 42.1708 42.7308C42.1708 44.6161 42.1708 46.5014 42.1708 48.3867C42.1708 48.4664 42.1708 48.546 42.1708 48.6257C42.1708 48.7584 42.1187 48.8381 41.9885 48.8381C41.5198 48.8381 41.0772 48.8381 40.6345 48.8381Z" fill="white"/>
-<path d="M8.16577 48.8381C8.08766 48.6522 8.11369 48.5195 8.11369 48.4132C8.11369 46.5545 8.11369 44.7223 8.11369 42.8636C8.11369 42.7839 8.11369 42.7043 8.11369 42.6246C8.13973 42.4122 8.03558 42.3325 7.85331 42.3325C7.35857 42.3325 6.86383 42.3325 6.3691 42.3325C5.97852 42.3325 5.97852 42.3325 5.97852 41.9342C5.97852 41.7218 5.97852 41.5094 5.97852 41.3235C5.97852 41.0314 6.00455 41.0314 6.29098 41.0049C6.44721 41.0049 6.62948 41.0049 6.78572 41.0049C8.34804 41.0049 9.91037 41.0049 11.4727 41.0049C11.8372 41.0049 11.8633 41.0049 11.8633 41.3766C11.8633 41.5891 11.8633 41.8015 11.8633 42.0405C11.8633 42.306 11.8372 42.3325 11.5768 42.3325C11.0821 42.3325 10.5874 42.3325 10.0926 42.3325C9.70206 42.3325 9.70206 42.3325 9.70206 42.7308C9.70206 44.6161 9.70206 46.5014 9.70206 48.3867C9.70206 48.4664 9.70206 48.546 9.70206 48.6257C9.70206 48.7584 9.64998 48.8381 9.51979 48.8381C9.05109 48.8381 8.60843 48.8381 8.16577 48.8381Z" fill="white"/>
-<path d="M37.173 48.8115C36.7043 48.8115 36.2356 48.8115 35.7148 48.8115C35.7148 46.2093 35.7148 43.6336 35.7148 41.0049C36.1835 41.0049 36.6262 41.0049 37.0689 41.0049C37.173 41.0049 37.1991 41.0845 37.2251 41.1642C37.2251 41.2704 37.2251 41.3766 37.2251 41.4828C37.2251 43.793 37.2251 46.1297 37.2251 48.4398C37.2251 48.546 37.2511 48.6522 37.173 48.8115Z" fill="white"/>
-<path d="M45.2448 42.5451C45.2708 41.1643 46.3905 40.1287 47.7705 40.2615C48.9162 40.3677 49.9057 41.3502 49.8276 42.7575C49.7495 44.3772 48.5257 45.1207 47.406 45.0676C46.1041 44.988 45.1667 43.8727 45.2448 42.5451ZM49.2027 42.2795C49.2547 42.0937 49.1506 41.9343 49.0725 41.8016C48.8381 41.2705 48.4475 40.9253 47.8747 40.8722C47.6664 40.8191 47.4841 40.8191 47.2758 40.8722C47.1977 40.8456 47.1196 40.8722 47.0415 40.8988C46.4165 41.1112 46.052 41.536 45.8957 42.1733C45.6874 43.1292 46.052 44.2976 47.2758 44.5366C48.083 44.6693 49.0985 44.1914 49.2027 43.0761C49.2287 42.784 49.2287 42.5185 49.2027 42.2795Z" fill="white"/>
-<path d="M48.576 42.2C48.576 42.1204 48.576 42.0673 48.5499 41.9876C48.3676 41.6955 48.1593 41.5097 47.7948 41.4831C47.5084 41.4565 47.2219 41.4565 46.9095 41.4565C46.6491 41.4565 46.623 41.4831 46.623 41.7486C46.623 42.3328 46.623 42.9435 46.623 43.5277C46.623 43.7932 46.6491 43.8198 46.9095 43.8198C47.1699 43.8198 47.1959 43.7932 47.2219 43.5277C47.2219 43.448 47.2219 43.3684 47.2219 43.2887C47.2219 43.1825 47.248 43.0763 47.3782 43.0497C47.5084 43.0232 47.6125 43.0763 47.6646 43.1825C47.7427 43.2887 47.7688 43.3949 47.8469 43.5277C48.0291 43.8994 48.1593 43.926 48.5499 43.7667C48.5239 43.5277 48.3676 43.3684 48.2895 43.156C48.2374 43.0497 48.1333 42.917 48.3156 42.8108C48.3416 42.7577 48.3937 42.7046 48.4458 42.678H48.4718C48.4718 42.5983 48.5239 42.5452 48.576 42.5187C48.576 42.4656 48.576 42.439 48.602 42.3859C48.5499 42.3062 48.5499 42.2531 48.576 42.2ZM47.7948 42.4656C47.6646 42.6514 47.4563 42.6514 47.274 42.5718C47.3261 42.3859 47.3261 42.2 47.274 42.0142C47.3782 41.9345 47.4823 41.9611 47.5865 41.9876C47.6646 41.9611 47.6906 41.9876 47.7167 42.0407C47.8729 42.1469 47.925 42.3062 47.7948 42.4656Z" fill="white"/>
-<path d="M48.4453 42.6513C48.4453 42.5716 48.4974 42.5185 48.5495 42.4919Z" fill="white"/>
-<path d="M45.4291 23.2415H32.5582C31.196 21.8744 29.6928 20.6487 28.2836 19.3287C25.7 16.9244 23.1164 14.5672 20.4859 12.1629C20.251 11.9272 20.0161 11.6915 19.7813 11.4558H33.0749C33.4507 11.8329 33.8735 12.163 34.2023 12.493C37.6784 15.8401 41.1545 19.1401 44.6306 22.4872C44.9594 22.723 45.1943 23.0058 45.4291 23.2415Z" fill="white"/>
-<path d="M46.0399 24.1843C45.9929 24.2786 45.9459 24.3729 45.852 24.5143C44.8655 25.74 43.926 26.9657 42.9396 28.1915C41.4364 30.0772 39.9332 31.9158 38.477 33.8015C38.0542 34.3672 37.5375 34.5558 36.8799 34.5558C32.981 34.5558 29.0352 34.5558 25.1364 34.5086C24.9015 34.5086 24.5727 34.5557 24.3848 34.4615L29.0822 28.8043L29.1761 28.6629C29.411 28.38 29.6459 28.0972 29.8807 27.8615C29.9747 27.7672 30.0217 27.6729 30.0686 27.5786L30.7732 26.73C30.9142 26.6829 31.0551 26.5886 31.196 26.4472C31.8537 25.6929 32.5113 25.0329 33.028 24.1843H46.0399Z" fill="white"/>
-<path d="M40.1691 0.471334C40.1691 0.518477 40.1691 0.565614 40.1691 0.612757C40.1691 0.659899 40.1222 0.754197 40.1222 0.80134C40.1222 0.848482 40.0752 0.848488 40.0752 0.895631C40.0752 0.942774 40.0282 0.989894 40.0282 0.989894C39.9812 1.08418 39.8873 1.17848 39.8403 1.27277C39.6524 1.55563 33.4988 9.5699 32.7942 10.5128H19.2656C19.3596 10.3242 19.5005 10.1828 19.6414 10.0413C20.44 9.00419 21.2855 8.06134 22.0841 7.07134C23.7282 5.04419 25.4192 3.01704 27.0164 0.989894C27.4391 0.471322 27.9558 0.188488 28.6135 0.188488C32.1365 0.188488 35.6126 0.188488 39.1357 0.188488C39.5115 0.188488 39.8403 0.188477 40.1691 0.471334Z" fill="white"/>
-<path d="M29.8352 26.3999L23.6816 33.8013C22.0375 32.1042 20.3934 30.4542 18.7493 28.7099C18.0447 27.9556 18.0447 27.9084 18.7024 27.1541C20.2525 25.3156 21.8496 23.4299 23.3998 21.5913C24.1514 20.6956 24.2453 20.6956 25.0439 21.497C26.688 23.147 28.2381 24.7499 29.8352 26.3999Z" fill="white"/>
-<path d="M30.0683 27.5786C30.0213 27.6729 29.9743 27.7672 29.8804 27.8615C29.6455 28.1443 29.4107 28.38 29.1758 28.6629L30.0683 27.5786Z" fill="white"/>
-<path d="M45.8993 6.93004C44.5841 8.67433 43.3158 10.3715 42.0944 12.1629C41.7656 12.6343 41.4838 12.6815 41.061 12.3043C39.4639 10.7486 37.7728 9.28719 36.2227 7.63719L41.2489 0.895763C42.7521 2.45148 44.2552 4.00719 45.7584 5.51576C46.2751 5.98719 46.3221 6.36433 45.8993 6.93004Z" fill="white"/>
-<path d="M52.8997 5.98715C52.0072 5.84572 51.6784 4.99715 50.8798 5.04429C50.1752 5.09143 49.7994 5.89286 49.0479 5.98715C48.9539 5.46858 49.0479 5.0443 49.2358 4.66715C49.5646 4.00715 49.2827 3.58286 48.766 3.15858C48.4372 2.87572 47.8735 2.73429 47.9675 2.12143C48.2963 1.79143 48.719 1.93285 49.0948 1.93285C49.8464 1.97999 50.2692 1.65001 50.4101 0.895726C50.5041 0.518583 50.5041 0.0942857 51.0677 0C51.5845 0.471429 51.3496 1.41428 52.0072 1.79142C52.6179 2.16857 53.4164 1.69714 54.0271 2.12143C54.0271 2.78143 53.4634 2.87572 53.1346 3.15858C52.6179 3.58286 52.336 4.00715 52.6649 4.66715C52.8528 4.99716 52.9467 5.46858 52.8997 5.98715Z" fill="white"/>
-<path d="M39.1818 2.1214L40.0274 1.03712C39.9804 1.1314 39.8865 1.22568 39.8395 1.31996C39.6046 1.64996 39.3697 1.93282 39.0879 2.26282L39.1818 2.1214Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/tokenjar.svg b/packages/website/public/images/clients/tokenjar.svg
deleted file mode 100644
index f36a6c6aa..000000000
--- a/packages/website/public/images/clients/tokenjar.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="65" height="54" viewBox="0 0 65 54" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M13.4087 47.2394C13.4087 48.5078 13.4276 49.7763 13.4087 51.0639C13.3898 52.1786 12.6333 52.9665 11.5554 52.9665C10.7043 52.9665 9.79657 53.2164 9.13465 52.3515C8.83206 51.9672 8.64294 51.6212 8.64294 51.1023C8.66186 48.5078 8.66186 45.9325 8.64294 43.338C8.64294 42.7615 8.86989 42.3771 9.26703 42.0312C10.137 41.2816 11.8769 41.2816 12.7657 41.9927C13.2196 42.3579 13.4466 42.7807 13.4276 43.4149C13.3709 44.6833 13.4087 45.971 13.4087 47.2394ZM10.137 47.2394C10.137 48.2964 10.1181 49.3534 10.137 50.4105C10.1559 51.2561 10.345 51.4291 11.0447 51.4291C11.7067 51.4291 11.8958 51.0831 11.8958 50.4681C11.8769 48.3156 11.8769 46.1439 11.8958 43.9915C11.8958 43.3765 11.7067 43.0305 11.0447 43.0305C10.345 43.0305 10.1559 43.2227 10.137 44.0491C10.1181 45.1254 10.137 46.1824 10.137 47.2394Z" fill="white"/>
-<path d="M56.0165 52.7551H54.5414L54.4847 48.7L52.9906 48.6808V52.6975L51.4398 52.7359C51.4398 52.7359 51.4777 52.1593 51.4777 51.7942C51.4588 49.1228 51.5533 46.4514 51.4398 43.78C51.3642 41.935 52.4611 41.6083 53.766 41.5315C55.2979 41.4354 55.9787 42.2618 55.9787 43.8761C55.9787 46.4706 55.9787 49.0459 55.9787 51.6404C55.9976 52.044 56.0165 52.7551 56.0165 52.7551ZM54.4847 47.2586C54.4847 47.2586 54.4847 44.9331 54.4847 43.8185C54.4847 43.2996 54.2199 43.0497 53.7093 43.0497C53.1797 43.0689 52.9717 43.3572 52.9717 43.8569C52.9717 44.9716 52.9717 47.297 52.9717 47.297L54.4847 47.2586Z" fill="white"/>
-<path d="M61.7656 52.8895C60.9713 52.928 60.4418 52.9087 60.4418 52.9087V41.5121H61.4063C61.4063 41.5121 63.0705 41.3391 63.8648 41.7812C64.4322 42.0887 64.7726 42.4922 64.7537 43.1649C64.7537 44.3949 64.7537 45.6249 64.7537 46.8549C64.7537 47.1047 64.6402 47.4891 64.4133 47.6428C64.1863 47.7966 63.9783 47.9503 63.9783 47.9503C63.9783 47.9503 64.262 49.2188 64.3376 49.7569C64.4889 50.737 64.9995 52.8895 64.9995 52.8895H63.6757C63.6757 52.8895 63.5811 52.4283 63.4866 52.0631C63.2218 51.0061 62.976 49.9491 62.749 48.8728C62.7112 48.6999 62.6355 48.3731 62.6355 48.3731L61.7278 48.3924C61.7278 48.3924 61.7278 48.7767 61.7278 48.9689C61.7656 50.2758 61.7656 51.5442 61.7656 52.8895ZM61.8223 46.951C63.1651 47.1816 63.4866 46.9317 63.5055 45.7018C63.5055 45.2789 63.5244 44.8561 63.5055 44.4333C63.4677 43.2226 63.1083 42.8766 61.8223 43.0688C61.8223 44.2988 61.8223 45.7018 61.8223 46.951Z" fill="white"/>
-<path d="M35.459 45.2022C35.459 46.4514 35.3833 52.9089 35.3833 52.9089H34.2108L34.2865 41.5891L35.5536 41.6083L37.18 46.4514V41.6468L38.5038 41.5891V52.8897C38.5038 52.8897 37.7095 52.8897 37.2178 52.9089C37.2178 52.1401 37.2178 49.8916 37.2178 49.8916C37.2178 49.8916 35.5536 45.183 35.459 45.2022Z" fill="white"/>
-<path d="M22.7515 52.7935L21.2196 52.755C21.2196 52.755 20.0471 49.6993 19.6877 48.5269C19.5932 48.2386 19.4419 47.7966 19.1771 47.1047C19.1771 48.8536 19.1771 52.755 19.1771 52.755H17.6831C17.6831 52.755 17.6831 52.2169 17.6831 51.7172C17.6831 48.7191 17.6642 45.7018 17.6831 42.7037C17.6831 42.1848 17.6831 41.6659 17.6831 41.6659L19.1204 41.6274C19.1204 41.6274 19.1204 45.0676 19.1204 46.9126C19.4419 46.3168 20.7846 41.6659 20.7846 41.6659H22.2598C22.2598 41.6659 21.0872 45.8555 20.7846 47.0471C21.0683 47.9696 22.7515 52.7935 22.7515 52.7935Z" fill="white"/>
-<path d="M26.4768 52.8511C26.4768 49.065 26.4768 41.6274 26.4768 41.6274L29.9188 41.5505L29.8998 43.0112H27.9898V46.3168L29.5783 46.3552L29.6162 47.8542L27.9898 47.9119V51.2752H29.8998C29.8998 51.2752 29.8809 52.3898 29.8998 52.8703C28.7273 52.8511 27.6115 52.8511 26.4768 52.8511Z" fill="white"/>
-<path d="M45.7101 41.5122H47.1664C47.1664 41.5122 47.2231 48.085 47.2042 50.7564C47.2042 52.217 46.4477 52.9857 45.105 52.9473C44.5944 52.9473 44.0648 52.8896 44.0648 52.8896C44.0648 52.8896 44.0648 52.1401 44.0648 51.3906C44.2161 51.3906 44.3107 51.4482 44.4241 51.429C45.5399 51.2368 45.6912 51.0831 45.7101 50.0068C45.7291 47.6429 45.7101 41.5122 45.7101 41.5122Z" fill="white"/>
-<path d="M4.29299 41.8582V43.0305H2.78004V52.7167L1.4373 52.7551C1.4373 52.7551 1.47512 47.2586 1.47512 44.8947C1.47512 43.8185 1.47512 43.1074 1.47512 43.1074L0.0189118 43.0497L3.60715e-08 41.8966L4.29299 41.8582Z" fill="white"/>
-<path d="M38.9414 6.9187V9.80149H35.594V30.9804L32.6059 31.0573C32.6059 31.0573 32.6815 18.8727 32.6815 13.6068C32.6815 11.2237 32.6815 9.78227 32.6815 9.78227H29.4665L29.4098 6.95714L38.9414 6.9187Z" fill="white"/>
-<path d="M38.0325 36.3808C38.0325 36.3808 43.9141 33.671 43.9141 29.8657C43.9141 24.9842 43.9141 18.4691 43.9141 18.4691C43.9141 18.4691 43.9141 11.954 43.9141 7.07245C43.9141 2.19092 38.0325 0 38.0325 0C43.1008 2.97888 42.5713 8.68681 42.5713 8.68681V28.2321C42.5713 28.2321 43.1198 33.3827 38.0325 36.3808Z" fill="white"/>
-<path d="M30.033 36.3808C30.033 36.3808 24.1514 33.671 24.1514 29.8657C24.1514 24.9842 24.1514 18.4691 24.1514 18.4691C24.1514 18.4691 24.1514 11.954 24.1514 7.07245C24.1514 2.19092 30.033 0 30.033 0C24.9646 2.97888 25.4941 8.68681 25.4941 8.68681V28.2321C25.4752 28.2321 24.9457 33.3827 30.033 36.3808Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/clients/veil.svg b/packages/website/public/images/clients/veil.svg
deleted file mode 100644
index b4b36ce57..000000000
--- a/packages/website/public/images/clients/veil.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M43.9675 22.0108C43.9675 15.6664 43.9675 9.32189 43.9675 2.98825C43.9675 1.11523 42.8537 7.4544e-05 40.9722 7.4544e-05C28.3204 7.4544e-05 15.6687 7.4544e-05 3.01695 7.4544e-05C1.17867 -0.0107522 0.0108135 1.15854 0.0108135 3.00991C0.0108135 15.6555 0.0216269 28.312 0 40.9576C0 42.6899 1.27599 44.0108 3.03858 43.9999C15.6687 43.9566 28.2988 43.9566 40.9397 43.9999C42.6807 44.0108 44.0107 42.7116 43.9999 40.9251C43.9351 34.624 43.9675 28.312 43.9675 22.0108ZM18.4802 29.438C17.7557 31.2244 17.0312 33.0108 16.3067 34.7972C15.8525 35.9124 15.3875 37.0275 14.955 38.1535C14.7712 38.6299 14.4792 38.8139 13.971 38.8031C11.9489 38.749 12.3165 39.1062 11.5163 37.1358C10.4999 34.6132 9.4834 32.0905 8.46693 29.5679C8.1209 28.7126 8.23985 28.5285 9.14818 28.5394C10.9432 28.561 10.5756 28.2795 11.2352 29.9793C11.9597 31.8632 12.6626 33.747 13.4411 35.8041C14.1116 34.0285 14.7387 32.3937 15.3551 30.7697C15.5714 30.1958 15.7985 29.622 16.0039 29.0482C16.1337 28.7018 16.3499 28.5285 16.7392 28.5394C17.1177 28.561 17.4962 28.5394 17.8746 28.5394C18.5883 28.5502 18.7505 28.7667 18.4802 29.438ZM28.5583 34.4724C26.6984 34.4832 24.8385 34.4724 22.9894 34.4724H22.3622C22.2216 35.5659 22.7515 36.6269 23.5733 36.995C24.4276 37.374 25.4981 37.1358 26.1794 36.3563C26.4497 36.0423 26.7309 35.8799 27.1526 35.9124C27.5635 35.9448 27.9852 35.9124 28.3961 35.9232C29.0017 35.934 29.2288 36.248 28.8935 36.746C28.5475 37.2549 28.1366 37.7746 27.6176 38.1102C25.9523 39.1929 24.1248 39.312 22.2865 38.619C20.9673 38.121 20.1671 37.0816 19.7994 35.7283C19.4534 34.4724 19.4426 33.184 19.7345 31.9281C20.405 29.059 22.7948 28.063 25.1737 28.3878C27.6284 28.7234 29.0557 30.3366 29.2612 32.8267C29.2828 33.1191 29.3261 33.4006 29.3261 33.6929C29.3261 34.2992 29.1639 34.4616 28.5583 34.4724ZM33.9867 33.6929C33.9867 35.1004 33.9867 36.5078 33.9867 37.9153C33.9867 38.7165 33.9002 38.8031 33.0783 38.8031C32.6999 38.8031 32.3214 38.8031 31.9429 38.8031C31.5645 38.8031 31.3806 38.619 31.3806 38.2401C31.3806 35.2086 31.3806 32.1771 31.3806 29.1348C31.3806 28.7342 31.5753 28.5394 31.9754 28.5394C32.3863 28.5394 32.808 28.5394 33.2189 28.5394C33.8461 28.5394 33.9867 28.6801 33.9867 29.2972C33.9867 30.7697 33.9867 32.2313 33.9867 33.6929ZM34.0948 26.0925C34.084 26.6988 33.9434 26.8504 33.3811 26.8504C33.1324 26.8504 32.8729 26.8504 32.6242 26.8504C31.2833 26.8504 31.2617 26.9911 31.2725 25.497C31.2833 24.5335 31.359 24.4577 32.3214 24.4577H33.1324C33.2189 24.4577 33.3162 24.4577 33.4028 24.4577C34.0516 24.501 34.1273 24.685 34.0948 26.0925ZM39.2096 30.7047C39.2096 33.1191 39.2096 35.5443 39.2096 37.9586C39.2096 38.7057 39.1123 38.8031 38.3769 38.8031C38.0201 38.8031 37.6524 38.7923 37.2956 38.8031C36.7874 38.8248 36.5819 38.5974 36.5927 38.0885C36.6035 35.9773 36.5927 33.8661 36.5927 31.7549C36.5927 29.7303 36.5927 27.7165 36.5927 25.6919C36.5927 24.8799 36.7009 24.7716 37.5335 24.7716C37.8579 24.7716 38.1823 24.7825 38.5067 24.7716C39.0041 24.7608 39.2204 24.999 39.2204 25.497C39.1988 27.2401 39.2096 28.9724 39.2096 30.7047Z" fill="white"/>
-<path d="M26.8125 33H22.7184C22.5194 31.2688 23.3047 29.7122 24.4147 29.5812C25.9015 29.3921 26.802 30.6432 26.8125 33Z" fill="white"/>
-</svg>
diff --git a/packages/website/public/images/coinbase_wallet_logo.png b/packages/website/public/images/coinbase_wallet_logo.png
deleted file mode 100644
index 04c1b7290..000000000
--- a/packages/website/public/images/coinbase_wallet_logo.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/developers/logo/0x.svg b/packages/website/public/images/developers/logo/0x.svg
deleted file mode 100644
index f02903925..000000000
--- a/packages/website/public/images/developers/logo/0x.svg
+++ /dev/null
@@ -1,24 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
-<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- viewBox="0 0 263.9 130.3" style="enable-background:new 0 0 263.9 130.3;" xml:space="preserve">
-<title>Asset 1</title>
-<g>
- <g id="Layer_1-2">
- <path d="M208.4,72.9c0,3.6-0.4,7.2-1.4,10.7c-0.8,2.8-2.2,5.5-4,7.8c-1.7,2.1-3.9,3.7-6.4,4.7c-5.5,2.1-11.6,2.1-17.1,0
- c-2.5-1.1-4.7-2.7-6.5-4.7c-1.9-2.3-3.3-5-4.1-7.8c-1-3.5-1.5-7.1-1.4-10.7v-15c0-3.6,0.4-7.2,1.4-10.7c0.8-2.8,2.2-5.5,4.1-7.8
- c1.7-2.1,3.9-3.7,6.4-4.7c2.7-1.1,5.6-1.7,8.5-1.6c2.9-0.1,5.9,0.5,8.6,1.6c2.5,1.1,4.7,2.7,6.5,4.7c1.9,2.3,3.3,5,4.1,7.8
- c1,3.5,1.5,7.1,1.4,10.7v15H208.4z M177.8,69l20.1-15c-0.2-4.3-1.2-7.5-2.8-9.5c-1.8-2.1-4.4-3.3-7.2-3.1c-3.4,0-5.9,1.2-7.6,3.6
- s-2.5,6.1-2.5,11V69z M198,62.1l-20.1,15c0.5,8.2,3.9,12.4,10.1,12.4c6.7,0,10.1-4.9,10.1-14.7V62.1L198,62.1z"/>
- <path d="M240.7,63.9l11.2-15.8h11.5l-16.5,23l17,23.7h-11.5l-11.6-16.4l-11.5,16.4h-11.5l17-23.7l-16.5-23h11.5L240.7,63.9z"/>
- <path d="M32.4,121.4c21,12.3,47.2,11.7,67.7-1.4c5.6-3.6,10.6-8,14.9-13.1c-3.5-4.9-7.3-10-11.3-15.2l-3.3-4.2
- C96.2,94.3,90,99.7,82.7,103L71.6,92.1L32.4,121.4z"/>
- <path d="M8.6,32.7C3.7,41.4,0.8,51,0.1,60.9c-0.9,13.8,2.6,27.5,10.1,39.2c3.6,5.6,8,10.6,13.1,14.9c4.9-3.5,10-7.3,15.2-11.3
- l4.2-3.3C36,96.1,30.6,89.9,27.2,82.7l11-11.2L8.6,32.7z"/>
- <path d="M97.8,8.8c-21-12.3-47.2-11.7-67.7,1.4c-5.6,3.6-10.6,8-14.9,13.1c3.5,4.9,7.3,10,11.3,15.2l3.3,4.2
- c4.3-6.7,10.5-12.1,17.7-15.5l0,0L58,37.4L97.8,8.8z"/>
- <path d="M121.7,97.2c12-20.9,11.3-46.8-1.7-67.1c-3.6-5.6-8-10.6-13.1-14.9c-4.9,3.5-10,7.3-15.2,11.3l-4.2,3.3
- c6.8,4.3,12.2,10.4,15.6,17.7l0.1,0.2l-10.6,11L121.7,97.2z"/>
- </g>
-</g>
-</svg>
diff --git a/packages/website/public/images/developers/logo/docs.svg b/packages/website/public/images/developers/logo/docs.svg
deleted file mode 100644
index d3d14f66e..000000000
--- a/packages/website/public/images/developers/logo/docs.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="46" height="18" viewBox="0 0 46 18" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M0.0195312 11.0918C0.0195312 9.30859 0.442057 7.8763 1.28711 6.79492C2.13216 5.70638 3.23861 5.16211 4.60645 5.16211C5.96712 5.16211 7.04492 5.6276 7.83984 6.55859V0.5H9.82715V17H8.00098L7.9043 15.7539C7.10938 16.7279 6.00293 17.2148 4.58496 17.2148C3.23861 17.2148 2.13932 16.6634 1.28711 15.5605C0.442057 14.4577 0.0195312 13.0182 0.0195312 11.2422V11.0918ZM2.00684 11.3174C2.00684 12.6351 2.27897 13.6663 2.82324 14.4111C3.36751 15.1559 4.11947 15.5283 5.0791 15.5283C6.33952 15.5283 7.25977 14.9626 7.83984 13.8311V8.49219C7.24544 7.39648 6.33236 6.84863 5.10059 6.84863C4.12663 6.84863 3.36751 7.22461 2.82324 7.97656C2.27897 8.72852 2.00684 9.84212 2.00684 11.3174Z" fill="#888888"/>
-<path d="M12.3945 11.0811C12.3945 9.94238 12.6165 8.91829 13.0605 8.00879C13.5117 7.09928 14.1348 6.39746 14.9297 5.90332C15.7318 5.40918 16.6449 5.16211 17.6689 5.16211C19.2516 5.16211 20.5299 5.70996 21.5039 6.80566C22.485 7.90137 22.9756 9.35872 22.9756 11.1777V11.3174C22.9756 12.4489 22.7572 13.4658 22.3203 14.3682C21.8906 15.2633 21.2712 15.9616 20.4619 16.4629C19.6598 16.9642 18.736 17.2148 17.6904 17.2148C16.1149 17.2148 14.8366 16.667 13.8555 15.5713C12.8815 14.4756 12.3945 13.0254 12.3945 11.2207V11.0811ZM14.3926 11.3174C14.3926 12.6064 14.6898 13.6413 15.2842 14.4219C15.8857 15.2025 16.6878 15.5928 17.6904 15.5928C18.7002 15.5928 19.5023 15.1989 20.0967 14.4111C20.6911 13.6162 20.9883 12.5062 20.9883 11.0811C20.9883 9.80632 20.6839 8.77507 20.0752 7.9873C19.4736 7.19238 18.6715 6.79492 17.6689 6.79492C16.6878 6.79492 15.8965 7.18522 15.2949 7.96582C14.6934 8.74642 14.3926 9.86361 14.3926 11.3174Z" fill="#888888"/>
-<path d="M30.1299 15.5928C30.8389 15.5928 31.4583 15.3779 31.9883 14.9482C32.5182 14.5186 32.8118 13.9814 32.8691 13.3369H34.749C34.7132 14.0029 34.484 14.6367 34.0615 15.2383C33.639 15.8398 33.0732 16.3197 32.3643 16.6777C31.6624 17.0358 30.9176 17.2148 30.1299 17.2148C28.5472 17.2148 27.2868 16.6885 26.3486 15.6357C25.4176 14.5758 24.9521 13.1292 24.9521 11.2959V10.9629C24.9521 9.83138 25.1598 8.8252 25.5752 7.94434C25.9906 7.06348 26.585 6.37956 27.3584 5.89258C28.139 5.4056 29.0592 5.16211 30.1191 5.16211C31.4225 5.16211 32.5039 5.55241 33.3633 6.33301C34.2298 7.11361 34.6917 8.12695 34.749 9.37305H32.8691C32.8118 8.62109 32.5254 8.00521 32.0098 7.52539C31.5013 7.03841 30.8711 6.79492 30.1191 6.79492C29.1094 6.79492 28.3252 7.16016 27.7666 7.89062C27.2152 8.61393 26.9395 9.66309 26.9395 11.0381V11.4141C26.9395 12.7533 27.2152 13.7845 27.7666 14.5078C28.318 15.2311 29.1058 15.5928 30.1299 15.5928Z" fill="#888888"/>
-<path d="M43.751 13.917C43.751 13.3799 43.5469 12.9645 43.1387 12.6709C42.7376 12.3701 42.0322 12.1123 41.0225 11.8975C40.0199 11.6826 39.2214 11.4248 38.627 11.124C38.0397 10.8232 37.6029 10.4652 37.3164 10.0498C37.0371 9.63444 36.8975 9.1403 36.8975 8.56738C36.8975 7.61491 37.2985 6.80924 38.1006 6.15039C38.9098 5.49154 39.9411 5.16211 41.1943 5.16211C42.512 5.16211 43.5791 5.50228 44.3955 6.18262C45.2191 6.86296 45.6309 7.73307 45.6309 8.79297H43.6328C43.6328 8.2487 43.4001 7.77962 42.9346 7.38574C42.4762 6.99186 41.8962 6.79492 41.1943 6.79492C40.471 6.79492 39.9053 6.95247 39.4971 7.26758C39.0889 7.58268 38.8848 7.99447 38.8848 8.50293C38.8848 8.98275 39.0745 9.3444 39.4541 9.58789C39.8337 9.83138 40.5176 10.0641 41.5059 10.2861C42.5013 10.5081 43.307 10.7731 43.9229 11.0811C44.5387 11.389 44.9935 11.7614 45.2871 12.1982C45.5879 12.6279 45.7383 13.1543 45.7383 13.7773C45.7383 14.8158 45.3229 15.6501 44.4922 16.2803C43.6615 16.9033 42.5837 17.2148 41.2588 17.2148C40.3278 17.2148 39.5042 17.0501 38.7881 16.7207C38.0719 16.3913 37.5098 15.9329 37.1016 15.3457C36.7005 14.7513 36.5 14.1104 36.5 13.4229H38.4873C38.5231 14.0889 38.7881 14.6188 39.2822 15.0127C39.7835 15.3994 40.4424 15.5928 41.2588 15.5928C42.0107 15.5928 42.6123 15.4424 43.0635 15.1416C43.5218 14.8337 43.751 14.4255 43.751 13.917Z" fill="#888888"/>
-</svg>
diff --git a/packages/website/public/images/developers/tutorials/0x_order_basics.svg b/packages/website/public/images/developers/tutorials/0x_order_basics.svg
deleted file mode 100644
index 57b04dfa5..000000000
--- a/packages/website/public/images/developers/tutorials/0x_order_basics.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 72 72"><defs><style>.cls-1{fill:#3289f1;}.cls-2{fill:#fff;}</style></defs><title>Artboard 1</title><path class="cls-1" d="M62.64,26.77a0,0,0,0,0,0,0A2.44,2.44,0,0,0,62,25.28L48.2,11.43a2.38,2.38,0,0,0-1.53-.71H35.45a16.12,16.12,0,0,1,.44,3.5H45v9.26a5,5,0,0,0,5,5h9.15V65.41A2.16,2.16,0,0,1,57,67.57H21.8a2.16,2.16,0,0,1-2.15-2.16V31.46H19a16.81,16.81,0,0,1-2.86-.24V65.41a5.67,5.67,0,0,0,5.65,5.66H57a5.67,5.67,0,0,0,5.66-5.66V27A1.48,1.48,0,0,0,62.64,26.77ZM50,25a1.49,1.49,0,0,1-1.49-1.49V16.71L56.69,25Z"/><path class="cls-1" d="M48,11.23a1.75,1.75,0,0,0-1.34-.51,2.38,2.38,0,0,1,1.53.71ZM62.14,25.47,62,25.28a2.44,2.44,0,0,1,.69,1.46A1.71,1.71,0,0,0,62.14,25.47Z"/><path class="cls-2" d="M17.26,12.83V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Z"/><path class="cls-2" d="M17.26,12.83V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Zm0,0V13a1.33,1.33,0,0,1,.14-.19Z"/><path class="cls-1" d="M32.65,14.21a13.47,13.47,0,0,0-.55-3.5,13.66,13.66,0,1,0-16,17.23,13.47,13.47,0,0,0,2.86.3c.22,0,.43,0,.64,0a13.67,13.67,0,0,0,13-13.64C32.66,14.46,32.66,14.33,32.65,14.21Zm-13,10.51-.64,0a9.94,9.94,0,0,1-2.86-.41A10.15,10.15,0,1,1,28.39,10.71a9.92,9.92,0,0,1,.76,3.5c0,.12,0,.25,0,.37A10.17,10.17,0,0,1,19.65,24.72Z"/><path class="cls-1" d="M25,12.83v3.5H20.76v4.22h-3.5V16.33H13v-3.5h4.22V13a1.33,1.33,0,0,1,.14-.19h-.14V8.61h3.5v4.22Z"/><path class="cls-1" d="M17.4,12.83a1.33,1.33,0,0,0-.14.19v-.19Z"/><path class="cls-1" d="M17.4,12.83a1.33,1.33,0,0,0-.14.19v-.19Z"/><rect class="cls-1" x="27.4" y="35.38" width="22" height="3.5"/><rect class="cls-1" x="27.4" y="55.38" width="22" height="3.5"/><rect class="cls-1" x="27.4" y="45.38" width="16" height="3.5"/></svg> \ No newline at end of file
diff --git a/packages/website/public/images/developers/tutorials/build_a_relayer.svg b/packages/website/public/images/developers/tutorials/build_a_relayer.svg
deleted file mode 100644
index afda40d88..000000000
--- a/packages/website/public/images/developers/tutorials/build_a_relayer.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="76" height="76" viewBox="0 0 76 76" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M70.0766 46.9825C70.3778 45.294 70.4782 43.6054 70.4782 41.8174C70.4782 30.8913 64.9564 20.8591 55.72 14.8993C54.8164 14.3034 53.712 14.6013 53.1096 15.4953C52.5073 16.3892 52.8085 17.4819 53.6116 18.0778C61.8441 23.3423 66.6631 32.2819 66.6631 41.9168C66.6631 43.208 66.5627 44.4993 66.362 45.7906C65.7596 45.6913 65.0568 45.592 64.4544 45.592C58.1295 45.592 52.9089 50.6577 52.9089 57.0148C52.9089 63.3718 58.0291 68.4376 64.4544 68.4376C70.8798 68.4376 76 63.3718 76 57.0148C76 52.6443 73.5905 48.9691 70.0766 46.9825ZM64.4544 64.6631C60.1374 64.6631 56.7239 61.1866 56.7239 57.0148C56.7239 52.7436 60.2378 49.3664 64.4544 49.3664C68.7715 49.3664 72.1849 52.843 72.1849 57.0148C72.2853 61.1866 68.7715 64.6631 64.4544 64.6631ZM50.3989 67.5436C46.4835 69.4309 42.2668 70.3248 37.9498 70.3248C31.5244 70.3248 25.2999 68.2389 20.2801 64.2658C21.9868 62.2792 23.0912 59.6966 23.0912 56.8161C23.0912 50.5584 17.9709 45.3933 11.5456 45.3933C5.22061 45.3933 6.1277e-06 50.4591 6.1277e-06 56.8161C6.1277e-06 63.1731 5.12022 68.2389 11.5456 68.2389C13.6539 68.2389 15.5614 67.6429 17.2682 66.6497C23.0912 71.4174 30.3197 74 37.8494 74C42.7688 74 47.4875 72.9074 51.9049 70.8215C52.8085 70.4242 53.21 69.2322 52.8085 68.3383C52.5073 67.5436 51.3025 67.1463 50.3989 67.5436ZM3.81505 56.9154C3.81505 52.6443 7.32894 49.2671 11.5456 49.2671C15.7622 49.2671 19.2761 52.7436 19.2761 56.9154C19.2761 61.1866 15.7622 64.5638 11.5456 64.5638C7.32894 64.5638 3.81505 61.1866 3.81505 56.9154ZM7.42933 42.5128C7.42933 42.5128 7.52972 42.5128 7.42933 42.5128C8.53369 42.5128 9.33685 41.7181 9.33685 40.7248C9.63804 31.0899 14.8586 22.349 23.1915 17.3826C24.3963 16.6873 25.6011 16.0913 26.8058 15.5946C28.5126 19.7664 32.6288 22.8456 37.5482 22.8456C43.8732 22.8456 49.0938 17.7799 49.0938 11.4228C49.0938 5.06578 43.9736 1.21251e-05 37.5482 1.21251e-05C31.2233 1.21251e-05 26.0026 5.06578 26.0026 11.4228C26.0026 11.6215 26.0026 11.7208 26.0026 11.9195C24.3963 12.6148 22.79 13.3101 21.1836 14.3034C11.7464 19.9651 5.92339 29.7987 5.5218 40.7248C5.6222 41.6188 6.42536 42.5128 7.42933 42.5128ZM37.5482 3.67516C41.8653 3.67516 45.2787 7.15168 45.2787 11.3235C45.2787 15.5946 41.7649 18.9718 37.5482 18.9718C33.2312 18.9718 29.8177 15.4953 29.8177 11.3235C29.8177 7.15168 33.3316 3.67516 37.5482 3.67516Z" fill="#3289F1"/>
-</svg>
diff --git a/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg b/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg
deleted file mode 100644
index 960616bfe..000000000
--- a/packages/website/public/images/developers/tutorials/build_a_trading_bot.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M72 36.63C72 35.1978 71.4436 33.8243 70.4532 32.8116C69.4628 31.7989 68.1195 31.23 66.7188 31.23H65.6626V23.76C65.6626 21.8504 64.9207 20.0191 63.6002 18.6688C62.2796 17.3186 60.4886 16.56 58.621 16.56H37.7604V1.8C37.7604 1.32261 37.5749 0.864774 37.2448 0.527208C36.9146 0.189643 36.4669 0 36 0C35.5331 0 35.0854 0.189643 34.7552 0.527208C34.4251 0.864774 34.2396 1.32261 34.2396 1.8V16.56H13.379C11.5114 16.56 9.72038 17.3186 8.39983 18.6688C7.07929 20.0191 6.33741 21.8504 6.33741 23.76V31.23H5.28117C3.88052 31.23 2.53723 31.7989 1.54682 32.8116C0.556407 33.8243 3.35768e-07 35.1978 3.35768e-07 36.63V47.25C3.35768e-07 48.6822 0.556407 50.0557 1.54682 51.0684C2.53723 52.0811 3.88052 52.65 5.28117 52.65H6.33741V64.8C6.33741 66.7096 7.07929 68.5409 8.39983 69.8912C9.72038 71.2414 11.5114 72 13.379 72H58.621C60.4886 72 62.2796 71.2414 63.6002 69.8912C64.9207 68.5409 65.6626 66.7096 65.6626 64.8V52.65H66.7188C68.1195 52.65 69.4628 52.0811 70.4532 51.0684C71.4436 50.0557 72 48.6822 72 47.25V36.63ZM68.4792 47.25C68.4792 47.7274 68.2937 48.1852 67.9636 48.5228C67.6335 48.8604 67.1857 49.05 66.7188 49.05H63.9022C63.4353 49.05 62.9876 49.2396 62.6574 49.5772C62.3273 49.9148 62.1418 50.3726 62.1418 50.85V64.8C62.1418 65.7548 61.7709 66.6705 61.1106 67.3456C60.4503 68.0207 59.5548 68.4 58.621 68.4H13.379C12.4452 68.4 11.5497 68.0207 10.8894 67.3456C10.2291 66.6705 9.85819 65.7548 9.85819 64.8V50.85C9.85819 50.3726 9.67272 49.9148 9.34258 49.5772C9.01245 49.2396 8.56468 49.05 8.0978 49.05H5.28117C4.81429 49.05 4.36653 48.8604 4.03639 48.5228C3.70625 48.1852 3.52078 47.7274 3.52078 47.25V36.63C3.52078 36.1526 3.70625 35.6948 4.03639 35.3572C4.36653 35.0196 4.81429 34.83 5.28117 34.83H8.0978C8.56468 34.83 9.01245 34.6404 9.34258 34.3028C9.67272 33.9652 9.85819 33.5074 9.85819 33.03V23.76C9.85819 22.8052 10.2291 21.8895 10.8894 21.2144C11.5497 20.5393 12.4452 20.16 13.379 20.16H58.621C59.5548 20.16 60.4503 20.5393 61.1106 21.2144C61.7709 21.8895 62.1418 22.8052 62.1418 23.76V33.03C62.1418 33.5074 62.3273 33.9652 62.6574 34.3028C62.9876 34.6404 63.4353 34.83 63.9022 34.83H66.7188C67.1857 34.83 67.6335 35.0196 67.9636 35.3572C68.2937 35.6948 68.4792 36.1526 68.4792 36.63V47.25Z" fill="#3289F1"/>
-<path d="M32.2998 38.5204C32.2998 36.9718 31.8507 35.458 31.0092 34.1703C30.1678 32.8827 28.9718 31.8791 27.5726 31.2865C26.1733 30.6938 24.6336 30.5388 23.1481 30.8409C21.6627 31.143 20.2982 31.8887 19.2273 32.9838C18.1563 34.0788 17.427 35.474 17.1315 36.9929C16.836 38.5117 16.9877 40.0861 17.5673 41.5168C18.1469 42.9476 19.1284 44.1705 20.3877 45.0308C21.647 45.8912 23.1275 46.3504 24.6421 46.3504C26.673 46.3504 28.6208 45.5255 30.0569 44.0571C31.493 42.5887 32.2998 40.5971 32.2998 38.5204ZM24.6421 42.7504C24.0988 42.7504 23.5609 42.641 23.0589 42.4284C22.557 42.2159 22.101 41.9043 21.7168 41.5115C21.3327 41.1187 21.028 40.6524 20.8201 40.1392C20.6122 39.626 20.5052 39.0759 20.5052 38.5204C20.5052 37.3986 20.941 36.3226 21.7168 35.5294C22.4927 34.7361 23.5449 34.2904 24.6421 34.2904C25.7393 34.2904 26.7915 34.7361 27.5673 35.5294C28.3431 36.3226 28.779 37.3986 28.779 38.5204C28.779 39.6423 28.3431 40.7182 27.5673 41.5115C26.7915 42.3048 25.7393 42.7504 24.6421 42.7504Z" fill="#3289F1"/>
-<path d="M47.3533 30.6001C45.8177 30.5823 44.3116 31.0316 43.0263 31.8909C41.741 32.7503 40.7345 33.9809 40.1347 35.4264C39.5349 36.8719 39.3689 38.4671 39.6578 40.0093C39.9466 41.5515 40.6773 42.9711 41.757 44.0878C42.8367 45.2045 44.2166 45.9678 45.7215 46.2807C47.2264 46.5937 48.7882 46.4422 50.2087 45.8455C51.6292 45.2487 52.8442 44.2338 53.6992 42.9294C54.5543 41.6251 55.0109 40.0904 55.011 38.5201C55.0226 37.4843 54.8331 36.4565 54.4535 35.4961C54.0739 34.5357 53.5117 33.6618 52.7994 32.9252C52.0872 32.1886 51.2391 31.6037 50.3042 31.2046C49.3694 30.8055 48.3664 30.6001 47.3533 30.6001ZM47.3533 42.7501C46.2561 42.7501 45.2039 42.3045 44.428 41.5112C43.6522 40.7179 43.2164 39.642 43.2164 38.5201C43.2164 37.9646 43.3234 37.4146 43.5313 36.9014C43.7392 36.3882 44.0439 35.9218 44.428 35.5291C44.8122 35.1363 45.2682 34.8247 45.7701 34.6121C46.2721 34.3995 46.81 34.2901 47.3533 34.2901C47.8965 34.2901 48.4345 34.3995 48.9364 34.6121C49.4383 34.8247 49.8944 35.1363 50.2785 35.5291C50.6627 35.9218 50.9674 36.3882 51.1753 36.9014C51.3832 37.4146 51.4902 37.9646 51.4902 38.5201C51.4902 39.642 51.0543 40.7179 50.2785 41.5112C49.5027 42.3045 48.4505 42.7501 47.3533 42.7501Z" fill="#3289F1"/>
-<path d="M46.7424 55.7109H25.2656V59.3109H46.7424V55.7109Z" fill="#3289F1"/>
-</svg>
diff --git a/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg b/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg
deleted file mode 100644
index e2c492ecd..000000000
--- a/packages/website/public/images/developers/tutorials/develop_on_ethereum.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="76" height="76" viewBox="0 0 76 76" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M14.0349 38.5774C14.0366 38.5844 14.0366 38.5914 14.0383 38.5975C14.0459 38.6273 14.0595 38.6553 14.0688 38.6842C14.079 38.7148 14.085 38.7463 14.0977 38.7761C14.1003 38.7813 14.1045 38.7848 14.1062 38.7901C14.1461 38.8802 14.1979 38.9625 14.2582 39.0387C14.2752 39.0597 14.293 39.0781 14.3109 39.0973C14.3627 39.1534 14.4187 39.2041 14.4816 39.2488C14.4994 39.2619 14.5164 39.2768 14.5351 39.289C14.5436 39.2943 14.5503 39.3013 14.5588 39.3065L36.3144 52.3229C36.4876 52.4262 36.6812 52.4779 36.874 52.4779C36.9173 52.4779 36.9589 52.4656 37.0014 52.4603C37.0439 52.4656 37.0863 52.4779 37.1288 52.4779C37.3224 52.4779 37.5152 52.4262 37.6884 52.3229L59.444 39.3065C59.703 39.1516 59.8898 38.896 59.9645 38.5975C60.0384 38.299 59.9934 37.9821 59.8389 37.7178L38.0859 0.552394C37.8659 0.177746 37.4642 -0.0148298 37.0515 0.014932C36.6065 -0.0594723 36.1564 0.147984 35.9195 0.552394L14.1631 37.7187C14.1487 37.7432 14.1402 37.7703 14.1274 37.7966C14.1087 37.8351 14.0884 37.8718 14.0739 37.9121C14.0629 37.9427 14.0569 37.9751 14.0476 38.0075C14.0366 38.0478 14.0247 38.0881 14.0179 38.1292C14.0128 38.1607 14.0128 38.1931 14.0102 38.2255C14.0068 38.2684 14.0026 38.3104 14.0043 38.3542C14.0051 38.3874 14.0111 38.4198 14.0153 38.4531C14.0213 38.4942 14.0247 38.5354 14.0349 38.5774ZM38.2455 5.27838L56.1991 35.9496L38.2455 27.7826V5.27838ZM38.2455 30.2957L56.3197 38.5179L38.2455 49.3319V30.2957ZM35.759 5.27838V27.6662L17.898 35.7912L35.759 5.27838ZM35.759 30.1802V49.331L17.5744 38.4522L35.759 30.1802Z" fill="#3289F1"/>
-<path d="M58.3132 42.4975L36.9993 55.5568L15.6854 42.4975C15.2327 42.2192 14.651 42.3076 14.2943 42.7076C13.9368 43.1085 13.9011 43.7125 14.2085 44.1546L35.9641 75.5182C36.1772 75.8263 36.5186 75.9996 36.8719 75.9996C36.9144 75.9996 36.9568 75.9839 36.9993 75.9786C37.0418 75.9839 37.0842 75.9996 37.1267 75.9996C37.48 75.9996 37.8205 75.8263 38.0345 75.5182L59.79 44.1546C60.0975 43.7125 60.0609 43.1085 59.7043 42.7076C59.3467 42.3076 58.7659 42.22 58.3132 42.4975ZM35.756 71.2649L19.1145 47.2743L35.756 57.4703V71.2649ZM38.2426 71.2649V57.4703L54.884 47.2743L38.2426 71.2649Z" fill="#3289F1"/>
-</svg>
diff --git a/packages/website/public/images/developers/tutorials/integrate_0x_instant.svg b/packages/website/public/images/developers/tutorials/integrate_0x_instant.svg
deleted file mode 100644
index e9c9278a8..000000000
--- a/packages/website/public/images/developers/tutorials/integrate_0x_instant.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="32" height="39" viewBox="0 0 32 39" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M16 1L1 23.242H16L16.0412 38L31 15.7159H16V1Z" stroke="#3289F1" stroke-width="1.5" stroke-miterlimit="10" stroke-linejoin="round"/>
-</svg>
diff --git a/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg b/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg
deleted file mode 100644
index c402964aa..000000000
--- a/packages/website/public/images/developers/tutorials/use_shared_liquidity.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="70" height="74" viewBox="0 0 70 74" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M47.5152 52.7109C46.8864 53.3447 46.3452 54.0413 45.8772 54.7779L25.1416 42.092C25.69 40.7084 26.0008 39.2038 26.0008 37.6255C26.0008 36.0472 25.69 34.5426 25.1428 33.159L45.8832 20.5699C48.0132 23.9418 51.7475 26.1889 56.0002 26.1889C62.6169 26.1889 68 20.7634 68 14.0945C68 7.42558 62.6169 2 56.0002 2C49.3835 2 44.0004 7.42558 44.0004 14.0945C44.0004 15.6135 44.292 17.0625 44.8008 18.4025L24.0328 31.0086C21.8872 27.7141 18.1937 25.531 13.9998 25.531C7.3831 25.531 2 30.9566 2 37.6255C2 44.2944 7.3831 49.72 13.9998 49.72C18.1937 49.72 21.886 47.5369 24.0316 44.2424L44.796 56.9452C44.28 58.307 43.9992 59.762 43.9992 61.2629C43.9992 64.4934 45.2472 67.5315 47.514 69.8149C49.8527 72.1721 52.9259 73.3513 55.999 73.3513C59.0722 73.3513 62.1453 72.1721 64.4841 69.8149C66.7508 67.5303 67.9988 64.4934 67.9988 61.2629C67.9988 58.0325 66.7508 54.9944 64.4841 52.7109C59.8054 47.9941 52.1939 47.9941 47.5152 52.7109ZM56.0002 4.41889C61.2933 4.41889 65.6 8.7596 65.6 14.0945C65.6 19.4293 61.2933 23.7701 56.0002 23.7701C50.7071 23.7701 46.4004 19.4293 46.4004 14.0945C46.4004 8.7596 50.7059 4.41889 56.0002 4.41889ZM14.001 47.3011C8.70788 47.3011 4.40116 42.9604 4.40116 37.6255C4.40116 32.2906 8.70788 27.9499 14.001 27.9499C19.2941 27.9499 23.6008 32.2906 23.6008 37.6255C23.6008 42.9604 19.2941 47.3011 14.001 47.3011ZM62.7873 68.1048C59.0446 71.877 52.9547 71.877 49.2119 68.1048C47.3988 66.2773 46.4004 63.8463 46.4004 61.2629C46.4004 58.6795 47.3988 56.2486 49.2119 54.4211C51.0839 52.5343 53.5415 51.5922 56.0002 51.5922C58.459 51.5922 60.9165 52.5343 62.7885 54.4211C64.6017 56.2486 65.6 58.6795 65.6 61.2629C65.6 63.8463 64.6017 66.2773 62.7873 68.1048Z" fill="#3289F1" stroke="#3289F1" stroke-width="0.5"/>
-</svg>
diff --git a/packages/website/public/images/doc_icons/connect.png b/packages/website/public/images/doc_icons/connect.png
deleted file mode 100644
index 244f504b3..000000000
--- a/packages/website/public/images/doc_icons/connect.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/doc_icons/contracts.png b/packages/website/public/images/doc_icons/contracts.png
deleted file mode 100644
index 03956f162..000000000
--- a/packages/website/public/images/doc_icons/contracts.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/doc_icons/docs.png b/packages/website/public/images/doc_icons/docs.png
deleted file mode 100644
index 17df04310..000000000
--- a/packages/website/public/images/doc_icons/docs.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/doc_icons/wiki.png b/packages/website/public/images/doc_icons/wiki.png
deleted file mode 100644
index d7854d54b..000000000
--- a/packages/website/public/images/doc_icons/wiki.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/doc_icons/zeroExJs.png b/packages/website/public/images/doc_icons/zeroExJs.png
deleted file mode 100644
index fe0c49a0f..000000000
--- a/packages/website/public/images/doc_icons/zeroExJs.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/eth_dollar.svg b/packages/website/public/images/eth_dollar.svg
deleted file mode 100644
index 0afec94fa..000000000
--- a/packages/website/public/images/eth_dollar.svg
+++ /dev/null
@@ -1,29 +0,0 @@
-<svg width="76" height="46" viewBox="0 0 76 46" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g filter="url(#filter0_d)">
-<path d="M-2.34315e-08 10.7545L18.9187 -1.15499e-08L65.2081 26.3534L46.2894 37.1079L-2.34315e-08 10.7545Z" transform="translate(5.62109 1.17188)" fill="#DCD3EB"/>
-<path d="M20.5403 1.84086L65.2081 27.2738L47.911 37.1079L3.24321 11.6749L20.5403 1.84086ZM20.5403 0L0 11.6749L47.911 38.9487L68.4513 27.2738L20.5403 0Z" transform="translate(4 0.25)" fill="#AAA7C9"/>
-<path d="M9.92618 13.54C7.05152 13.54 4.44712 12.9587 2.62896 11.9171C0.90908 10.9483 3.74905e-07 9.66451 3.74905e-07 8.2112C3.74905e-07 6.27346 1.6216 4.23882 4.44712 2.64018C7.39549 0.944652 11.2775 3.69596e-07 15.0613 3.69596e-07C17.9359 3.69596e-07 20.5403 0.581324 22.3585 1.62286C24.0784 2.59174 24.9874 3.87549 24.9874 5.3288C24.9874 7.26655 23.3658 9.30118 20.5403 10.8998C17.5919 12.5711 13.7099 13.54 9.92618 13.54Z" transform="translate(26.3359 13.3047)" fill="#CAC3E5"/>
-<path d="M15.8578 1.59864C18.585 1.59864 21.042 2.13152 22.7619 3.1004C23.7692 3.68172 24.9731 4.67482 24.9731 6.1039C24.9731 7.72677 23.4744 9.5434 20.9437 10.9967C18.0936 12.6196 14.3836 13.54 10.7473 13.54C8.02001 13.54 5.56304 13.0071 3.84316 12.0383C2.8358 11.4569 1.63188 10.4638 1.63188 9.03475C1.63188 7.41188 3.13063 5.59524 5.66132 4.14193C8.48684 2.51907 12.1969 1.59864 15.8578 1.59864ZM15.8578 -3.69596e-07C12.0986 -3.69596e-07 8.04458 0.944652 4.85051 2.76129C-0.825098 5.98279 -1.6359 10.7545 3.03235 13.4189C5.07164 14.5815 7.82345 15.1386 10.7473 15.1386C14.5064 15.1386 18.5604 14.194 21.7545 12.3774C27.4301 9.15585 28.2409 4.38415 23.5727 1.71975C21.5088 0.557102 18.757 -3.69596e-07 15.8578 -3.69596e-07Z" transform="translate(25.5391 12.5078)" fill="#AAA7C9"/>
-<path d="M1.81816 5.69213L8.89425 6.73367L11.8426 0L-7.49809e-07 1.64709L1.81816 5.69213Z" transform="translate(34.3945 15.875)" fill="#AAA7C9"/>
-<path d="M3.74905e-07 6.07968L10.7124 5.03814L3.63632 4.02083L1.81816 3.69596e-07L3.74905e-07 6.07968Z" transform="translate(31.7422 18.0312)" fill="#AAA7C9"/>
-<path d="M2.9238 3.63328C2.01472 3.63328 1.20392 3.46372 0.638813 3.14884C0.343976 2.97929 -4.68631e-08 2.68862 -4.68631e-08 2.3253C-4.68631e-08 1.86508 0.491395 1.28376 1.27763 0.847764C2.23585 0.314884 3.46433 0 4.69282 0C5.6019 0 6.4127 0.169553 6.97781 0.484437C7.27265 0.65399 7.61662 0.944652 7.61662 1.30798C7.61662 1.76819 7.12523 2.34952 6.339 2.78551C5.40534 3.31839 4.15229 3.63328 2.9238 3.63328Z" transform="translate(7.85938 9.69531)" fill="#DCD3EB"/>
-<path d="M5.5202 1.59864C6.28186 1.59864 6.96981 1.74397 7.3875 1.98619C7.51035 2.05886 7.58406 2.1073 7.60863 2.15574C7.55949 2.27685 7.33836 2.59174 6.74868 2.93084C5.93788 3.39106 4.80767 3.68172 3.7266 3.68172C2.96494 3.68172 2.27699 3.53639 1.8593 3.29417C1.73645 3.2215 1.66275 3.17306 1.63818 3.12462C1.68732 3.00351 1.90844 2.68862 2.49812 2.34952C3.30892 1.8893 4.43913 1.59864 5.5202 1.59864ZM5.5202 0C4.218 0 2.79295 0.314884 1.68732 0.968874C-0.278265 2.08308 -0.573102 3.75438 1.0485 4.67482C1.76102 5.08659 2.71924 5.28036 3.7266 5.28036C5.0288 5.28036 6.45385 4.96548 7.55949 4.31149C9.52507 3.19728 9.8199 1.52598 8.1983 0.605546C7.48578 0.217997 6.52756 0 5.5202 0Z" transform="translate(7.05469 8.85156)" fill="#AAA7C9"/>
-<path d="M2.9238 3.63327C2.01472 3.63327 1.20392 3.46372 0.638815 3.14884C0.343978 2.97928 0 2.68862 0 2.3253C0 1.86508 0.491394 1.28376 1.27763 0.847763C2.23585 0.314882 3.46434 -1.47838e-06 4.69282 -1.47838e-06C5.6019 -1.47838e-06 6.4127 0.169551 6.97781 0.484435C7.27264 0.653988 7.61662 0.944652 7.61662 1.30798C7.61662 1.76819 7.12523 2.34952 6.339 2.78551C5.40535 3.31839 4.15229 3.63327 2.9238 3.63327Z" transform="translate(49.332 33.2891)" fill="#CAC3E5"/>
-<path d="M5.5202 1.59864C6.28186 1.59864 6.96981 1.74397 7.3875 1.98619C7.51035 2.05886 7.58405 2.1073 7.60862 2.15574C7.55948 2.27685 7.33836 2.59174 6.74868 2.93084C5.93788 3.39106 4.80767 3.68172 3.7266 3.68172C2.96494 3.68172 2.27699 3.53639 1.8593 3.29417C1.73646 3.22151 1.66274 3.17306 1.63817 3.12462C1.68731 3.00351 1.90844 2.68862 2.49812 2.34952C3.30892 1.86508 4.43913 1.59864 5.5202 1.59864ZM5.5202 0C4.218 0 2.79296 0.314884 1.68732 0.968874C-0.278264 2.08308 -0.573102 3.75439 1.0485 4.67482C1.76102 5.08659 2.71924 5.28036 3.7266 5.28036C5.0288 5.28036 6.45385 4.96548 7.55949 4.31149C9.52507 3.19728 9.8199 1.52598 8.1983 0.605546C7.48578 0.193775 6.52756 0 5.5202 0Z" transform="translate(48.5273 32.4648)" fill="#AAA7C9"/>
-<path d="M2.9238 3.63328C2.01472 3.63328 1.20392 3.46372 0.638813 3.14884C0.343976 2.97929 1.49962e-06 2.68862 1.49962e-06 2.3253C1.49962e-06 1.86508 0.491396 1.28376 1.27763 0.847764C2.23585 0.314884 3.46433 -3.69596e-07 4.69282 -3.69596e-07C5.6019 -3.69596e-07 6.4127 0.169553 6.97781 0.484436C7.27265 0.653989 7.61662 0.944652 7.61662 1.30798C7.61662 1.76819 7.12523 2.34952 6.33899 2.78551C5.40534 3.31839 4.15229 3.63328 2.9238 3.63328Z" transform="translate(61.3945 26.4336)" fill="#DCD3EB"/>
-<path d="M5.5202 1.59864C6.28186 1.59864 6.96981 1.74397 7.3875 1.98619C7.51034 2.05886 7.58405 2.1073 7.60862 2.15574C7.55948 2.27685 7.33836 2.59174 6.74868 2.93084C5.93788 3.39106 4.80767 3.68172 3.7266 3.68172C2.96494 3.68172 2.27699 3.53639 1.8593 3.29417C1.73645 3.2215 1.66275 3.17306 1.63818 3.12462C1.68732 3.00351 1.90844 2.68863 2.49812 2.34952C3.30892 1.8893 4.43913 1.59864 5.5202 1.59864ZM5.5202 -3.69596e-07C4.218 -3.69596e-07 2.79295 0.314884 1.68731 0.968873C-0.278266 2.08308 -0.5731 3.75439 1.0485 4.67482C1.76103 5.08659 2.71924 5.28036 3.7266 5.28036C5.0288 5.28036 6.45385 4.96548 7.55949 4.31149C9.52507 3.19728 9.81991 1.52598 8.1983 0.605546C7.48578 0.217996 6.52756 -3.69596e-07 5.5202 -3.69596e-07Z" transform="translate(60.5938 25.5859)" fill="#AAA7C9"/>
-<path d="M2.9238 3.63328C2.01472 3.63328 1.20392 3.46372 0.638814 3.14884C0.343977 2.97929 7.49809e-07 2.68862 7.49809e-07 2.3253C7.49809e-07 1.86508 0.491395 1.28376 1.27763 0.847764C2.23585 0.314884 3.46434 9.2399e-08 4.69282 9.2399e-08C5.6019 9.2399e-08 6.4127 0.169553 6.97781 0.484437C7.27264 0.65399 7.61662 0.944652 7.61662 1.30798C7.61662 1.76819 7.12523 2.34952 6.339 2.78551C5.40534 3.31839 4.15229 3.63328 2.9238 3.63328Z" transform="translate(19.9219 2.82031)" fill="#CAC3E5"/>
-<path d="M5.5202 1.59864C6.28186 1.59864 6.96981 1.74397 7.3875 1.98619C7.51035 2.05886 7.58406 2.1073 7.60863 2.15574C7.55949 2.27685 7.33836 2.59174 6.74868 2.93084C5.93788 3.39106 4.80767 3.68172 3.7266 3.68172C2.96494 3.68172 2.27699 3.53639 1.8593 3.29417C1.73645 3.2215 1.66274 3.17306 1.63817 3.12462C1.68731 3.00351 1.90844 2.68862 2.49812 2.34952C3.30892 1.86508 4.43913 1.59864 5.5202 1.59864ZM5.5202 -4.61995e-08C4.218 -4.61995e-08 2.79295 0.314884 1.68732 0.968874C-0.278265 2.08308 -0.573101 3.75439 1.0485 4.67482C1.76103 5.08659 2.71924 5.28036 3.7266 5.28036C5.0288 5.28036 6.45385 4.96548 7.55949 4.31149C9.52507 3.19728 9.8199 1.52598 8.1983 0.605546C7.48578 0.193775 6.52756 -4.61995e-08 5.5202 -4.61995e-08Z" transform="translate(19.1172 1.99219)" fill="#AAA7C9"/>
-</g>
-<defs>
-<filter id="filter0_d" x="0.799705" y="0.25" width="74.8519" height="45.3493" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="3.20029"/>
-<feGaussianBlur stdDeviation="1.60015"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-</defs>
-</svg>
diff --git a/packages/website/public/images/eth_token.svg b/packages/website/public/images/eth_token.svg
deleted file mode 100644
index 9392692f9..000000000
--- a/packages/website/public/images/eth_token.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-<svg width="54" height="36" viewBox="0 0 54 36" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g filter="url(#filter0_d)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M45.9288 8.37974H44.6437C43.5923 6.66375 41.7231 5.06216 39.2698 3.68937C30.2743 -1.22979 15.788 -1.22979 6.79252 3.68937C4.3392 5.06216 2.47001 6.66375 1.41859 8.37974H0.0166892V12.2693C-0.21696 15.5869 2.00271 19.0189 6.67569 21.5356C15.6712 26.4548 30.1575 26.4548 39.153 21.5356C43.8259 19.0189 46.0456 15.5869 45.812 12.2693V8.37974H45.9288Z" transform="translate(4.07422 6.77344)" fill="#AAA7C9"/>
-<path d="M39.2239 21.4212C30.2284 26.3404 15.7421 26.3404 6.74662 21.4212C-2.24888 16.5021 -2.24888 8.60854 6.74662 3.68937C15.7421 -1.22979 30.2284 -1.22979 39.2239 3.68937C48.2194 8.60854 48.2194 16.6165 39.2239 21.4212Z" transform="translate(4 3)" fill="#CAC3E6"/>
-<path d="M19.7434 21.2782C30.6473 21.2782 39.4867 16.5149 39.4867 10.6391C39.4867 4.7633 30.6473 0 19.7434 0C8.83941 0 0 4.7633 0 10.6391C0 16.5149 8.83941 21.2782 19.7434 21.2782Z" transform="translate(7.35938 4.51562)" fill="#DCD3EB"/>
-<path d="M2.45332 7.89354L12.6171 9.49513L16.8228 -2.18199e-07L-4.45651e-07 2.17358L2.45332 7.89354Z" transform="translate(20.3242 9.55078)" fill="#AAA7C9"/>
-<path d="M0 8.69434L15.304 7.43595L5.25711 5.71996L2.68697 4.36398e-07L0 8.69434Z" transform="translate(16.3516 12.2969)" fill="#AAA7C9"/>
-</g>
-<defs>
-<filter id="filter0_d" x="0.799705" y="0.599779" width="52.4036" height="35.399" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="0.800074"/>
-<feGaussianBlur stdDeviation="1.60015"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-</defs>
-</svg>
diff --git a/packages/website/public/images/eth_token_erc20.svg b/packages/website/public/images/eth_token_erc20.svg
deleted file mode 100644
index 6313c826d..000000000
--- a/packages/website/public/images/eth_token_erc20.svg
+++ /dev/null
@@ -1,22 +0,0 @@
-<svg width="66" height="38" viewBox="0 0 66 38" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect width="36.2389" height="14.3077" rx="2.40022" transform="translate(26.7617 0.457031)" fill="#3289F1"/>
-<path d="M3.01758 9.09766C2.20703 9.09766 1.55111 8.85677 1.0498 8.375C0.548503 7.88997 0.297852 7.26009 0.297852 6.48535V6.34863C0.297852 5.80827 0.397135 5.33138 0.595703 4.91797C0.797526 4.50456 1.09049 4.18555 1.47461 3.96094C1.85872 3.73307 2.31445 3.61914 2.8418 3.61914C3.58398 3.61914 4.16992 3.85026 4.59961 4.3125C5.0293 4.77148 5.24414 5.41276 5.24414 6.23633V6.87598H1.97266C2.03125 7.1722 2.15983 7.40495 2.3584 7.57422C2.55697 7.74349 2.81413 7.82812 3.12988 7.82812C3.65072 7.82812 4.05762 7.64583 4.35059 7.28125L5.10254 8.16992C4.89746 8.45312 4.60612 8.67936 4.22852 8.84863C3.85417 9.01465 3.45052 9.09766 3.01758 9.09766ZM2.83203 4.88867C2.35026 4.88867 2.0638 5.20768 1.97266 5.8457H3.63281V5.71875C3.63932 5.45508 3.57259 5.25163 3.43262 5.1084C3.29264 4.96191 3.09245 4.88867 2.83203 4.88867ZM9.31514 5.20605L8.77315 5.16699C8.25557 5.16699 7.92354 5.32975 7.77706 5.65527V9H6.13155V3.7168H7.67452L7.72823 4.39551C8.00492 3.87793 8.39066 3.61914 8.88545 3.61914C9.06123 3.61914 9.21423 3.63867 9.34444 3.67773L9.31514 5.20605ZM12.2533 7.82812C12.4844 7.82812 12.6635 7.76628 12.7904 7.64258C12.9174 7.51562 12.9792 7.33984 12.976 7.11523H14.519C14.519 7.69466 14.3106 8.16992 13.894 8.54102C13.4805 8.91211 12.9467 9.09766 12.2924 9.09766C11.5242 9.09766 10.9187 8.85677 10.476 8.375C10.0333 7.89323 9.81192 7.22591 9.81192 6.37305V6.30469C9.81192 5.77083 9.90958 5.30046 10.1049 4.89355C10.3035 4.4834 10.5883 4.16927 10.9594 3.95117C11.3305 3.72982 11.7699 3.61914 12.2777 3.61914C12.9646 3.61914 13.5098 3.80957 13.9135 4.19043C14.3171 4.57129 14.519 5.08724 14.519 5.73828H12.976C12.976 5.46484 12.9093 5.25488 12.7758 5.1084C12.6423 4.96191 12.4633 4.88867 12.2387 4.88867C11.8122 4.88867 11.5632 5.16048 11.4916 5.7041C11.4688 5.87663 11.4574 6.11426 11.4574 6.41699C11.4574 6.94759 11.5209 7.31543 11.6479 7.52051C11.7748 7.72559 11.9766 7.82812 12.2533 7.82812ZM20.3575 9H15.3966V7.92578L17.6818 5.52344C18.2449 4.88216 18.5265 4.37272 18.5265 3.99512C18.5265 3.68913 18.4597 3.45638 18.3263 3.29688C18.1928 3.13737 17.9991 3.05762 17.7452 3.05762C17.4946 3.05762 17.2911 3.16504 17.1349 3.37988C16.9786 3.59147 16.9005 3.85677 16.9005 4.17578H15.2501C15.2501 3.73958 15.3592 3.33757 15.5773 2.96973C15.7954 2.59863 16.0981 2.30892 16.4855 2.10059C16.8728 1.89225 17.3058 1.78809 17.7843 1.78809C18.5525 1.78809 19.1433 1.96549 19.5568 2.32031C19.9734 2.67513 20.1818 3.18457 20.1818 3.84863C20.1818 4.12858 20.1297 4.40202 20.0255 4.66895C19.9213 4.93262 19.7586 5.21094 19.5372 5.50391C19.3191 5.79362 18.9659 6.18262 18.4776 6.6709L17.5597 7.73047H20.3575V9ZM26.3328 6.09473C26.3328 7.05501 26.1164 7.79557 25.6834 8.31641C25.2537 8.83724 24.6466 9.09766 23.8621 9.09766C23.0711 9.09766 22.4591 8.83561 22.0262 8.31152C21.5932 7.78743 21.3768 7.0485 21.3768 6.09473V4.7959C21.3768 3.83561 21.5916 3.09505 22.0213 2.57422C22.4542 2.05339 23.0646 1.79297 23.8524 1.79297C24.6401 1.79297 25.2505 2.05501 25.6834 2.5791C26.1164 3.10319 26.3328 3.84375 26.3328 4.80078V6.09473ZM24.6873 4.58594C24.6873 4.07487 24.6206 3.69401 24.4871 3.44336C24.3537 3.18945 24.1421 3.0625 23.8524 3.0625C23.5692 3.0625 23.3625 3.17969 23.2322 3.41406C23.1053 3.64844 23.0369 4.00326 23.0272 4.47852V6.29492C23.0272 6.82552 23.0939 7.21452 23.2274 7.46191C23.3608 7.70605 23.5724 7.82812 23.8621 7.82812C24.1421 7.82812 24.3488 7.70931 24.4822 7.47168C24.6157 7.23079 24.6841 6.85482 24.6873 6.34375V4.58594Z" transform="translate(32 2.19922)" fill="white"/>
-<g filter="url(#filter0_d)">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M36.9872 6.66078H35.9523C35.1056 5.2968 33.6003 4.02375 31.6246 2.93256C24.3804 -0.977521 12.7144 -0.977521 5.47013 2.93256C3.49443 4.02375 1.98914 5.2968 1.14241 6.66078H0.0134401V9.75247C-0.174722 12.3895 1.61281 15.1175 5.37605 17.118C12.6203 21.0281 24.2863 21.0281 31.5305 17.118C35.2938 15.1175 37.0813 12.3895 36.8931 9.75247V6.66078H36.9872Z" transform="translate(3.46484 12.9961)" fill="#AAA7C9"/>
-<path d="M31.5877 17.027C24.3434 20.9371 12.6774 20.9371 5.43317 17.027C-1.81106 13.117 -1.81106 6.84264 5.43317 2.93256C12.6774 -0.977521 24.3434 -0.977521 31.5877 2.93256C38.8319 6.84264 38.8319 13.2079 31.5877 17.027Z" transform="translate(3.40625 9.99609)" fill="#CAC3E6"/>
-<path d="M15.8997 16.9134C24.6808 16.9134 31.7993 13.1272 31.7993 8.45669C31.7993 3.78619 24.6808 0 15.8997 0C7.11853 0 0 3.78619 0 8.45669C0 13.1272 7.11853 16.9134 15.8997 16.9134Z" transform="translate(6.11328 11.1992)" fill="#DCD3EB"/>
-<path d="M1.9757 6.27432L10.1607 7.54737L13.5476 -1.73439e-07L-3.5889e-07 1.72771L1.9757 6.27432Z" transform="translate(16.5547 15.2031)" fill="#AAA7C9"/>
-<path d="M0 6.91084L12.3246 5.91059L4.23364 4.54661L2.16386 3.46879e-07L0 6.91084Z" transform="translate(13.3555 17.3867)" fill="#AAA7C9"/>
-</g>
-<defs>
-<filter id="filter0_d" x="0.205955" y="7.59587" width="43.4464" height="29.4511" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="0.800074"/>
-<feGaussianBlur stdDeviation="1.60015"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-</defs>
-</svg>
diff --git a/packages/website/public/images/ether.png b/packages/website/public/images/ether.png
deleted file mode 100644
index c92f45681..000000000
--- a/packages/website/public/images/ether.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/ether_alt.svg b/packages/website/public/images/ether_alt.svg
deleted file mode 100644
index 82199d14d..000000000
--- a/packages/website/public/images/ether_alt.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="29" height="47" viewBox="0 0 29 47" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M14.4883 6.11532e-07L0 6.49253L14.4883 14.9288L28.9665 6.49253L14.4883 6.11532e-07Z" transform="translate(0 17.1875)" fill="#267DFF"/>
-<path d="M0 23.6857L14.4883 32.122V0L0 23.6857Z" fill="#267DFF"/>
-<path d="M0 0V32.112L14.4782 23.6757L0 0Z" transform="translate(14.5039)" fill="#267DFF"/>
-<path d="M0 -1.22306e-06L14.4883 20.1088V8.43629L0 -1.22306e-06Z" transform="translate(0 26.8906)" fill="#267DFF"/>
-<path d="M0 8.43629V20.1088L14.4883 -1.22306e-06L0 8.43629Z" transform="translate(14.5117 26.8594)" fill="#267DFF"/>
-</svg>
diff --git a/packages/website/public/images/events/berlin.jpg b/packages/website/public/images/events/berlin.jpg
deleted file mode 100644
index 0bcc0fa63..000000000
--- a/packages/website/public/images/events/berlin.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/events/event-sample.jpg b/packages/website/public/images/events/event-sample.jpg
deleted file mode 100644
index f7a832a5c..000000000
--- a/packages/website/public/images/events/event-sample.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/events/london.jpg b/packages/website/public/images/events/london.jpg
deleted file mode 100644
index 4b6b7ef06..000000000
--- a/packages/website/public/images/events/london.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/events/sf.jpg b/packages/website/public/images/events/sf.jpg
deleted file mode 100644
index efd7f7c29..000000000
--- a/packages/website/public/images/events/sf.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/favicon/favicon-2-16x16.png b/packages/website/public/images/favicon/favicon-2-16x16.png
deleted file mode 100755
index 68c493c4f..000000000
--- a/packages/website/public/images/favicon/favicon-2-16x16.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/favicon/favicon-2-32x32.png b/packages/website/public/images/favicon/favicon-2-32x32.png
deleted file mode 100755
index a5abb0eb3..000000000
--- a/packages/website/public/images/favicon/favicon-2-32x32.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/favicon/favicon.ico b/packages/website/public/images/favicon/favicon.ico
deleted file mode 100755
index b7ada2a1c..000000000
--- a/packages/website/public/images/favicon/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/jobs/map@2x.png b/packages/website/public/images/jobs/map@2x.png
deleted file mode 100644
index 08fa60ec0..000000000
--- a/packages/website/public/images/jobs/map@2x.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/0x_chips.png b/packages/website/public/images/landing/0x_chips.png
deleted file mode 100644
index 2e79637b0..000000000
--- a/packages/website/public/images/landing/0x_chips.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/0x_homepage.svg b/packages/website/public/images/landing/0x_homepage.svg
deleted file mode 100644
index d2ccef8f4..000000000
--- a/packages/website/public/images/landing/0x_homepage.svg
+++ /dev/null
@@ -1,341 +0,0 @@
-<svg width="410" height="254" viewBox="0 0 410 254" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M409.979 122.524C410.195 134.531 408.758 137.636 404.251 140.251L210.864 252.464C207.334 254.512 202.985 254.512 199.455 252.464L6.06657 140.251C1.55911 137.635 -1.2295 135.189 0.536218 121.797L409.979 122.524Z" fill="#D0CAFF"/>
-<path d="M178.097 125.679L87.1703 178.372" stroke="#C4AED9" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M181.659 127.746L90.732 180.439" stroke="#C4AED9" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M185.338 129.88L94.41 182.573" stroke="#C4AED9" stroke-width="1.32046" stroke-linecap="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M199.455 245.823L6.06657 133.61C-1.53963 129.196 -1.53963 118.163 6.06657 113.749L199.453 1.53604C202.984 -0.512014 207.333 -0.512014 210.863 1.53604L404.251 113.75C411.858 118.163 411.858 129.197 404.251 133.611L210.864 245.823C207.334 247.871 202.985 247.871 199.455 245.823Z" fill="#F0EEFF"/>
-<path d="M79.7358 107.066L133.382 75.8612C136.304 73.965 139.326 73.974 141.767 75.4102L186.939 101.973" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M82.4662 108.801L134.79 78.5156C136.798 77.3507 139.273 77.3583 141.274 78.5356L184.001 103.681" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M85.1381 110.605L134.534 82.5144C136.541 81.3495 139.017 81.3571 141.017 82.5348L180.403 105.714" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M330.5 124L270.289 160.234C267.367 162.131 264.345 162.121 261.903 160.685L226.643 140.288" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M325.5 123.5L268.881 157.58C266.873 158.745 264.398 158.737 262.397 157.56L229.58 138.58" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M322.5 122L269.137 153.581C267.129 154.746 264.654 154.739 262.653 153.561L233.178 136.547" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M323.711 121.778C316.096 117.482 316.096 110.517 323.711 106.222C331.327 101.926 343.673 101.926 351.289 106.222C358.904 110.517 358.904 117.482 351.289 121.778C343.673 126.074 331.327 126.074 323.711 121.778Z" stroke="#DBDBFF" stroke-width="2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M52.7112 125.924C45.0963 121.824 45.0963 115.176 52.7112 111.075C60.3266 106.975 72.6734 106.975 80.2888 111.075C87.9038 115.176 87.9038 121.824 80.2888 125.924C72.6734 130.025 60.3266 130.025 52.7112 125.924Z" stroke="#DBDBFF" stroke-width="2"/>
-<g opacity="0.372566">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M171.171 194.759L170.656 194.461C170.619 194.439 170.596 194.399 170.596 194.357V192.616C170.596 192.524 170.695 192.466 170.775 192.513L171.29 192.811C171.327 192.833 171.35 192.872 171.35 192.915V194.655C171.35 194.748 171.251 194.805 171.171 194.759Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M172.622 195.59L172.107 195.291C172.07 195.269 172.047 195.23 172.047 195.187V193.447C172.047 193.354 172.146 193.297 172.226 193.343L172.741 193.642C172.778 193.663 172.801 193.703 172.801 193.745V195.486C172.801 195.578 172.702 195.635 172.622 195.59Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M174.073 196.42L173.558 196.122C173.521 196.1 173.499 196.06 173.499 196.018V194.277C173.499 194.185 173.598 194.127 173.677 194.174L174.192 194.472C174.23 194.494 174.252 194.533 174.252 194.576V196.316C174.252 196.409 174.153 196.466 174.073 196.42Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M175.525 197.251L175.009 196.952C174.973 196.93 174.95 196.891 174.95 196.848V195.108C174.95 195.015 175.049 194.958 175.128 195.004L175.644 195.303C175.681 195.324 175.703 195.364 175.703 195.406V197.147C175.703 197.239 175.604 197.296 175.525 197.251Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.976 198.081L176.46 197.783C176.424 197.761 176.401 197.721 176.401 197.679V195.938C176.401 195.846 176.5 195.789 176.579 195.835L177.095 196.133C177.132 196.155 177.154 196.194 177.154 196.237V197.978C177.154 198.07 177.055 198.127 176.976 198.081Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M178.427 198.912L177.912 198.613C177.875 198.591 177.852 198.552 177.852 198.509V196.769C177.852 196.676 177.951 196.619 178.031 196.665L178.546 196.964C178.583 196.985 178.606 197.025 178.606 197.067V198.808C178.606 198.9 178.506 198.958 178.427 198.912Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M179.878 199.742L179.363 199.444C179.326 199.422 179.303 199.382 179.303 199.34V197.599C179.303 197.507 179.402 197.45 179.482 197.496L179.997 197.794C180.034 197.816 180.057 197.855 180.057 197.898V199.639C180.057 199.731 179.958 199.788 179.878 199.742Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M181.33 200.652L180.814 200.353C180.777 200.332 180.754 200.293 180.754 200.25V198.509C180.754 198.417 180.854 198.359 180.933 198.406L181.449 198.704C181.485 198.725 181.508 198.765 181.508 198.808V200.548C181.508 200.64 181.409 200.698 181.33 200.652Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M182.781 201.443L182.265 201.144C182.228 201.123 182.205 201.083 182.205 201.041V199.3C182.205 199.208 182.305 199.15 182.384 199.196L182.9 199.495C182.936 199.517 182.959 199.556 182.959 199.599V201.339C182.959 201.432 182.86 201.489 182.781 201.443Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M184.232 202.313L183.716 202.014C183.679 201.993 183.657 201.954 183.657 201.911V200.17C183.657 200.078 183.756 200.02 183.836 200.067L184.351 200.365C184.388 200.387 184.41 200.426 184.41 200.469V202.209C184.41 202.302 184.311 202.359 184.232 202.313Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M185.683 203.144L185.168 202.845C185.131 202.824 185.108 202.784 185.108 202.741V201.001C185.108 200.909 185.207 200.851 185.287 200.897L185.802 201.196C185.839 201.217 185.862 201.256 185.862 201.299V203.04C185.862 203.132 185.763 203.19 185.683 203.144Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M202.343 194.776L202.869 194.471C202.907 194.449 202.93 194.409 202.93 194.365V192.588C202.93 192.494 202.829 192.435 202.748 192.482L202.221 192.786C202.184 192.808 202.161 192.849 202.161 192.893V194.67C202.161 194.764 202.262 194.823 202.343 194.776Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M200.861 195.624L201.387 195.319C201.425 195.297 201.448 195.257 201.448 195.214V193.436C201.448 193.342 201.347 193.283 201.266 193.33L200.74 193.635C200.702 193.656 200.679 193.697 200.679 193.741V195.518C200.679 195.612 200.78 195.671 200.861 195.624Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M199.379 196.472L199.905 196.167C199.943 196.145 199.966 196.105 199.966 196.062V194.284C199.966 194.19 199.865 194.131 199.784 194.178L199.257 194.483C199.22 194.505 199.197 194.545 199.197 194.589V196.366C199.197 196.461 199.298 196.519 199.379 196.472Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M197.897 197.32L198.423 197.015C198.461 196.993 198.484 196.953 198.484 196.91V195.132C198.484 195.038 198.383 194.979 198.302 195.026L197.775 195.331C197.738 195.353 197.715 195.393 197.715 195.437V197.214C197.715 197.309 197.816 197.367 197.897 197.32Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M196.415 198.168L196.941 197.863C196.979 197.841 197.002 197.801 197.002 197.758V195.98C197.002 195.886 196.901 195.827 196.82 195.874L196.294 196.179C196.256 196.201 196.233 196.242 196.233 196.285V198.062C196.233 198.157 196.334 198.215 196.415 198.168Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M194.933 199.017L195.459 198.711C195.497 198.69 195.52 198.649 195.52 198.606V196.828C195.52 196.735 195.419 196.676 195.338 196.722L194.811 197.027C194.774 197.049 194.751 197.09 194.751 197.133V198.91C194.751 199.005 194.852 199.063 194.933 199.017Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M193.451 199.865L193.977 199.56C194.015 199.538 194.038 199.498 194.038 199.454V197.676C194.038 197.583 193.937 197.524 193.856 197.571L193.329 197.876C193.292 197.897 193.269 197.938 193.269 197.982V199.758C193.269 199.853 193.37 199.912 193.451 199.865Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M191.969 200.794L192.495 200.489C192.533 200.467 192.556 200.427 192.556 200.383V198.605C192.556 198.512 192.455 198.453 192.374 198.5L191.848 198.805C191.81 198.827 191.787 198.867 191.787 198.91V200.688C191.787 200.782 191.888 200.841 191.969 200.794Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M190.487 201.601L191.013 201.296C191.051 201.274 191.074 201.234 191.074 201.191V199.413C191.074 199.319 190.973 199.26 190.892 199.307L190.366 199.612C190.328 199.634 190.305 199.674 190.305 199.718V201.496C190.305 201.59 190.406 201.649 190.487 201.601Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M189.005 202.49L189.531 202.185C189.569 202.163 189.592 202.123 189.592 202.08V200.302C189.592 200.208 189.491 200.149 189.41 200.196L188.883 200.501C188.846 200.523 188.823 200.563 188.823 200.607V202.384C188.823 202.478 188.924 202.537 189.005 202.49Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M187.523 203.338L188.049 203.033C188.087 203.011 188.11 202.971 188.11 202.928V201.15C188.11 201.056 188.009 200.998 187.928 201.044L187.402 201.349C187.364 201.371 187.341 201.411 187.341 201.455V203.232C187.341 203.327 187.442 203.386 187.523 203.338Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M169.65 190.038L169.661 192.12C169.591 192.497 169.745 192.91 170.122 193.129L186.297 202.514C186.592 202.686 186.956 202.686 187.251 202.514L203.426 193.129C203.803 192.911 203.957 192.497 203.887 192.12L203.897 190.038" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M186.297 200.143L170.122 190.757C169.485 190.389 169.485 189.466 170.122 189.097L186.297 179.711C186.592 179.54 186.956 179.54 187.251 179.711L203.426 189.097C204.062 189.466 204.062 190.389 203.426 190.757L187.251 200.143C186.956 200.314 186.592 200.314 186.297 200.143Z" fill="#A59EF7"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M98.8553 102.466C96.2624 102.466 94.1604 100.354 94.1604 97.7481C94.1604 95.1427 96.2624 93.0301 98.8553 93.0301C101.448 93.0301 103.55 95.1427 103.55 97.7481C103.55 100.354 101.448 102.466 98.8553 102.466Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M117.665 88.5403C117.665 91.1457 115.563 93.2582 112.97 93.2582C110.377 93.2582 108.275 91.1457 108.275 88.5403C108.275 85.9345 110.377 83.8219 112.97 83.8219C115.563 83.8219 117.665 85.9345 117.665 88.5403Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M131.779 80.8495C131.779 83.4553 129.677 85.5679 127.085 85.5679C124.492 85.5679 122.39 83.4553 122.39 80.8495C122.39 78.2436 124.492 76.1315 127.085 76.1315C129.677 76.1315 131.779 78.2436 131.779 80.8495Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M141.021 82.3654C138.429 82.3654 136.326 80.2528 136.326 77.647C136.326 75.0416 138.429 72.9291 141.021 72.9291C143.614 72.9291 145.716 75.0416 145.716 77.647C145.716 80.2528 143.614 82.3654 141.021 82.3654Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M159.481 85.568C159.481 88.1734 157.379 90.2859 154.786 90.2859C152.194 90.2859 150.092 88.1734 150.092 85.568C150.092 82.9622 152.194 80.8496 154.786 80.8496C157.379 80.8496 159.481 82.9622 159.481 85.568Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M171.279 95.0541C171.279 97.6595 169.177 99.7721 166.585 99.7721C163.992 99.7721 161.89 97.6595 161.89 95.0541C161.89 92.4483 163.992 90.3357 166.585 90.3357C169.177 90.3357 171.279 92.4483 171.279 95.0541Z" fill="#92F6D2"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M244.927 140.363C244.927 142.969 242.825 145.082 240.232 145.082C237.639 145.082 235.537 142.969 235.537 140.363C235.537 137.758 237.639 135.645 240.232 135.645C242.825 135.645 244.927 137.758 244.927 140.363Z" fill="#8CB6FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M258.321 149.423C258.321 152.029 256.219 154.141 253.626 154.141C251.033 154.141 248.931 152.029 248.931 149.423C248.931 146.817 251.033 144.705 253.626 144.705C256.219 144.705 258.321 146.817 258.321 149.423Z" fill="#8CB6FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M267.921 161.512C265.328 161.512 263.226 159.399 263.226 156.793C263.226 154.188 265.328 152.075 267.921 152.075C270.514 152.075 272.616 154.188 272.616 156.793C272.616 159.399 270.514 161.512 267.921 161.512Z" fill="#8CB6FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M288.178 149.398C288.178 152.004 286.076 154.116 283.483 154.116C280.891 154.116 278.789 152.004 278.789 149.398C278.789 146.792 280.891 144.68 283.483 144.68C286.076 144.68 288.178 146.792 288.178 149.398Z" fill="#8CB6FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M302.505 141.805C302.505 144.411 300.403 146.523 297.811 146.523C295.218 146.523 293.116 144.411 293.116 141.805C293.116 139.199 295.218 137.087 297.811 137.087C300.403 137.087 302.505 139.199 302.505 141.805Z" fill="#8CB6FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M315.374 133.208C315.374 135.813 313.272 137.926 310.679 137.926C308.086 137.926 305.984 135.813 305.984 133.208C305.984 130.602 308.086 128.489 310.679 128.489C313.272 128.489 315.374 130.602 315.374 133.208Z" fill="#8CB6FF"/>
-<path d="M177.154 130.896L89.638 182.735" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M180.715 132.963L93.2464 184.097" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path d="M184.394 135.097L96.4554 185.742" stroke="#DBDBFF" stroke-width="1.32046" stroke-linecap="round"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M157.606 126.233L156.096 125.357C155.988 125.295 155.922 125.178 155.922 125.053V119.944C155.922 119.674 156.212 119.505 156.445 119.64L157.956 120.516C158.064 120.579 158.13 120.695 158.13 120.821V125.929C158.13 126.2 157.839 126.368 157.606 126.233Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M161.866 128.671L160.355 127.795C160.247 127.732 160.181 127.616 160.181 127.491V122.382C160.181 122.112 160.472 121.943 160.705 122.078L162.215 122.954C162.323 123.017 162.389 123.133 162.389 123.258V128.367C162.389 128.637 162.099 128.806 161.866 128.671Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M166.125 131.109L164.615 130.232C164.507 130.17 164.44 130.054 164.44 129.929V124.819C164.44 124.549 164.731 124.38 164.964 124.516L166.474 125.392C166.582 125.455 166.649 125.57 166.649 125.696V130.805C166.649 131.075 166.358 131.244 166.125 131.109Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M170.384 133.546L168.874 132.67C168.766 132.608 168.699 132.491 168.699 132.366V127.257C168.699 126.987 168.991 126.818 169.223 126.953L170.733 127.829C170.841 127.892 170.908 128.008 170.908 128.133V133.242C170.908 133.513 170.617 133.681 170.384 133.546Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M174.644 135.984L173.133 135.107C173.025 135.045 172.959 134.929 172.959 134.804V129.695C172.959 129.425 173.249 129.255 173.483 129.391L174.993 130.267C175.101 130.33 175.167 130.445 175.167 130.571V135.68C175.167 135.95 174.876 136.119 174.644 135.984Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M178.903 138.422L177.393 137.545C177.285 137.483 177.218 137.366 177.218 137.242V132.132C177.218 131.862 177.509 131.693 177.742 131.828L179.252 132.704C179.36 132.767 179.427 132.883 179.427 133.008V138.118C179.427 138.388 179.136 138.556 178.903 138.422Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M183.162 140.859L181.652 139.983C181.544 139.92 181.477 139.804 181.477 139.679V134.57C181.477 134.3 181.768 134.13 182.001 134.266L183.511 135.142C183.619 135.205 183.686 135.321 183.686 135.446V140.555C183.686 140.826 183.395 140.994 183.162 140.859Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M187.422 143.53L185.911 142.653C185.803 142.591 185.737 142.475 185.737 142.35V137.24C185.737 136.97 186.028 136.801 186.261 136.936L187.771 137.812C187.879 137.876 187.945 137.991 187.945 138.117V143.226C187.945 143.496 187.654 143.665 187.422 143.53Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M191.681 145.851L190.171 144.974C190.063 144.912 189.996 144.796 189.996 144.671V139.562C189.996 139.292 190.287 139.122 190.52 139.258L192.03 140.134C192.138 140.197 192.205 140.312 192.205 140.438V145.547C192.205 145.817 191.913 145.986 191.681 145.851Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M195.94 148.405L194.43 147.528C194.322 147.466 194.255 147.35 194.255 147.225V142.116C194.255 141.846 194.546 141.676 194.779 141.812L196.289 142.688C196.398 142.751 196.464 142.866 196.464 142.992V148.101C196.464 148.371 196.173 148.54 195.94 148.405Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M200.199 150.843L198.689 149.966C198.581 149.904 198.515 149.788 198.515 149.663V144.553C198.515 144.283 198.805 144.114 199.038 144.249L200.549 145.125C200.657 145.188 200.723 145.304 200.723 145.43V150.539C200.723 150.809 200.432 150.978 200.199 150.843Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M249.098 126.283L250.641 125.388C250.751 125.324 250.819 125.206 250.819 125.078V119.86C250.819 119.584 250.522 119.412 250.284 119.55L248.742 120.445C248.632 120.509 248.564 120.627 248.564 120.755V125.973C248.564 126.249 248.861 126.421 249.098 126.283Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M244.749 128.773L246.291 127.877C246.401 127.813 246.469 127.695 246.469 127.567V122.349C246.469 122.073 246.172 121.901 245.934 122.039L244.392 122.934C244.282 122.998 244.214 123.116 244.214 123.244V128.462C244.214 128.738 244.511 128.91 244.749 128.773Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M240.399 131.262L241.941 130.367C242.052 130.303 242.12 130.185 242.12 130.057V124.839C242.12 124.563 241.822 124.391 241.585 124.528L240.043 125.423C239.932 125.488 239.864 125.606 239.864 125.734V130.952C239.864 131.227 240.162 131.4 240.399 131.262Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M236.049 133.751L237.592 132.856C237.702 132.792 237.77 132.674 237.77 132.546V127.328C237.77 127.052 237.473 126.88 237.235 127.018L235.693 127.913C235.583 127.977 235.515 128.095 235.515 128.223V133.441C235.515 133.717 235.812 133.889 236.049 133.751Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M231.7 136.24L233.242 135.345C233.353 135.282 233.42 135.163 233.42 135.035V129.818C233.42 129.541 233.123 129.369 232.885 129.507L231.343 130.402C231.233 130.466 231.165 130.584 231.165 130.713V135.93C231.165 136.206 231.462 136.378 231.7 136.24Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M227.35 138.73L228.892 137.835C229.003 137.771 229.071 137.653 229.071 137.525V132.307C229.071 132.031 228.773 131.858 228.536 131.996L226.994 132.891C226.883 132.956 226.815 133.074 226.815 133.202V138.42C226.815 138.695 227.113 138.868 227.35 138.73Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M223 141.219L224.543 140.324C224.653 140.26 224.721 140.142 224.721 140.014V134.796C224.721 134.52 224.424 134.348 224.186 134.486L222.644 135.381C222.534 135.445 222.466 135.563 222.466 135.691V140.909C222.466 141.185 222.763 141.357 223 141.219Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M218.651 143.946L220.193 143.051C220.304 142.988 220.371 142.869 220.371 142.741V137.523C220.371 137.247 220.074 137.075 219.836 137.213L218.294 138.107C218.184 138.172 218.116 138.29 218.116 138.419V143.636C218.116 143.912 218.413 144.084 218.651 143.946Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M214.301 146.316L215.843 145.421C215.954 145.358 216.022 145.239 216.022 145.111V139.894C216.022 139.618 215.724 139.446 215.487 139.584L213.945 140.478C213.834 140.542 213.766 140.661 213.766 140.789V146.006C213.766 146.282 214.064 146.454 214.301 146.316Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M209.951 148.925L211.494 148.03C211.604 147.966 211.672 147.847 211.672 147.719V142.502C211.672 142.226 211.375 142.054 211.137 142.192L209.595 143.086C209.485 143.15 209.417 143.269 209.417 143.397V148.614C209.417 148.89 209.714 149.063 209.951 148.925Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M205.602 151.414L207.144 150.519C207.255 150.456 207.322 150.337 207.322 150.209V144.991C207.322 144.716 207.025 144.543 206.787 144.681L205.245 145.575C205.135 145.64 205.067 145.758 205.067 145.886V151.104C205.067 151.38 205.364 151.552 205.602 151.414Z" fill="#6D6475"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M153.145 112.376L153.176 118.488C152.971 119.595 153.422 120.808 154.529 121.45L202.003 148.997C202.87 149.5 203.937 149.5 204.804 148.997L252.278 121.45C253.384 120.808 253.834 119.595 253.63 118.488L253.661 112.376" fill="#454545"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M202.003 141.196L154.529 113.649C152.661 112.566 152.661 109.857 154.529 108.774L202.003 81.2263C202.869 80.724 203.937 80.724 204.803 81.2263L252.277 108.774C254.145 109.857 254.145 112.566 252.277 113.649L204.804 141.196C203.937 141.699 202.869 141.699 202.003 141.196Z" fill="#545454"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M175.567 115.451C176.655 117.855 178.687 120.153 181.699 122.145C185.86 124.897 191.256 126.654 196.991 127.388C199.842 127.753 202.776 127.865 205.685 127.718C206.117 126.191 206.527 124.595 206.902 122.944C207.004 122.499 207.098 122.046 207.194 121.595C203.77 122.037 200.182 121.902 196.884 121.206L196.817 117.242L175.567 115.451Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M195.709 95.2149C191.624 95.8524 187.723 97.0234 184.334 98.748C179.587 101.165 176.557 104.299 175.295 107.631C174.67 109.279 174.479 110.975 174.729 112.656C177.361 112.907 180.112 113.146 182.96 113.364C183.724 113.423 184.504 113.478 185.281 113.534C184.522 111.549 184.756 109.47 185.953 107.559L192.84 107.513L195.709 95.2149Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M230.792 106.981C229.705 104.573 227.673 102.272 224.657 100.277C220.492 97.5232 215.09 95.7649 209.349 95.0321C206.508 94.6693 203.586 94.5587 200.688 94.7034C200.256 96.2311 199.844 97.8272 199.468 99.4797C199.366 99.9231 199.271 100.376 199.175 100.826C202.597 100.386 206.182 100.522 209.476 101.217L209.48 101.218L209.558 104.945L230.792 106.981Z" fill="white"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M210.774 127.184C214.812 126.542 218.668 125.381 222.022 123.674C226.764 121.26 229.793 118.129 231.057 114.802C231.686 113.147 231.878 111.444 231.626 109.757C228.994 109.506 226.244 109.268 223.397 109.051C222.632 108.992 221.851 108.936 221.073 108.881C221.837 110.871 221.602 112.957 220.398 114.873L220.371 114.912L213.699 114.981L210.774 127.184Z" fill="white"/>
-<g opacity="0.372566">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M183.395 216.512L182.537 216.014C182.475 215.978 182.437 215.912 182.437 215.842V212.937C182.437 212.784 182.603 212.687 182.735 212.764L183.593 213.262C183.655 213.298 183.693 213.364 183.693 213.435V216.34C183.693 216.493 183.527 216.589 183.395 216.512Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M185.816 217.898L184.958 217.399C184.896 217.364 184.858 217.298 184.858 217.227V214.323C184.858 214.169 185.024 214.073 185.156 214.15L186.014 214.648C186.076 214.683 186.114 214.75 186.114 214.821V217.725C186.114 217.879 185.948 217.974 185.816 217.898Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M188.237 219.284L187.379 218.785C187.317 218.75 187.279 218.684 187.279 218.613V215.709C187.279 215.555 187.445 215.459 187.577 215.536L188.435 216.034C188.497 216.069 188.535 216.135 188.535 216.207V219.111C188.535 219.264 188.369 219.36 188.237 219.284Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M190.658 220.669L189.8 220.171C189.738 220.135 189.7 220.069 189.7 219.998V217.094C189.7 216.94 189.866 216.844 189.998 216.921L190.856 217.419C190.918 217.455 190.956 217.521 190.956 217.592V220.496C190.956 220.65 190.79 220.746 190.658 220.669Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M193.079 222.054L192.221 221.556C192.159 221.521 192.121 221.455 192.121 221.384V218.48C192.121 218.326 192.287 218.23 192.419 218.307L193.277 218.805C193.339 218.84 193.377 218.906 193.377 218.978V221.882C193.377 222.035 193.211 222.131 193.079 222.054Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M195.5 223.44L194.642 222.942C194.58 222.906 194.542 222.84 194.542 222.769V219.865C194.542 219.711 194.708 219.615 194.84 219.692L195.698 220.19C195.76 220.226 195.798 220.292 195.798 220.363V223.268C195.798 223.421 195.632 223.517 195.5 223.44Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M197.921 224.826L197.063 224.327C197.001 224.292 196.963 224.226 196.963 224.155V221.251C196.963 221.097 197.129 221.001 197.261 221.078L198.119 221.576C198.181 221.611 198.219 221.677 198.219 221.749V224.653C198.219 224.807 198.053 224.902 197.921 224.826Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M200.342 226.343L199.484 225.846C199.422 225.81 199.385 225.744 199.385 225.673V222.769C199.385 222.615 199.55 222.519 199.682 222.596L200.541 223.094C200.602 223.13 200.64 223.195 200.64 223.267V226.171C200.64 226.324 200.474 226.42 200.342 226.343Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M202.763 227.663L201.905 227.165C201.843 227.129 201.806 227.063 201.806 226.992V224.088C201.806 223.934 201.971 223.839 202.103 223.915L202.962 224.413C203.023 224.449 203.061 224.515 203.061 224.586V227.49C203.061 227.644 202.895 227.74 202.763 227.663Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M205.184 229.115L204.326 228.616C204.264 228.581 204.227 228.515 204.227 228.444V225.54C204.227 225.386 204.392 225.29 204.524 225.367L205.383 225.865C205.444 225.9 205.482 225.966 205.482 226.038V228.942C205.482 229.095 205.316 229.191 205.184 229.115Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M207.605 230.5L206.747 230.002C206.685 229.967 206.648 229.901 206.648 229.83V226.926C206.648 226.772 206.813 226.676 206.945 226.752L207.804 227.251C207.865 227.286 207.903 227.352 207.903 227.424V230.328C207.903 230.481 207.738 230.577 207.605 230.5Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M235.4 216.54L236.277 216.032C236.339 215.995 236.378 215.928 236.378 215.855V212.889C236.378 212.733 236.209 212.635 236.074 212.713L235.197 213.222C235.134 213.258 235.096 213.325 235.096 213.398V216.364C235.096 216.521 235.265 216.619 235.4 216.54Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M232.927 217.955L233.804 217.447C233.867 217.41 233.906 217.343 233.906 217.27V214.305C233.906 214.148 233.737 214.05 233.601 214.128L232.725 214.637C232.662 214.673 232.624 214.74 232.624 214.813V217.779C232.624 217.936 232.792 218.034 232.927 217.955Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M230.455 219.37L231.332 218.862C231.395 218.825 231.433 218.758 231.433 218.685V215.719C231.433 215.562 231.264 215.464 231.129 215.543L230.253 216.052C230.19 216.088 230.151 216.155 230.151 216.228V219.194C230.151 219.351 230.32 219.449 230.455 219.37Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M227.983 220.785L228.859 220.277C228.922 220.24 228.961 220.173 228.961 220.1V217.134C228.961 216.977 228.792 216.879 228.657 216.958L227.78 217.467C227.717 217.503 227.678 217.57 227.678 217.643V220.609C227.678 220.765 227.848 220.863 227.983 220.785Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M225.51 222.2L226.387 221.692C226.45 221.655 226.489 221.588 226.489 221.515V218.549C226.489 218.392 226.319 218.295 226.184 218.373L225.308 218.882C225.245 218.918 225.206 218.985 225.206 219.058V222.024C225.206 222.18 225.375 222.278 225.51 222.2Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M223.038 223.615L223.915 223.107C223.977 223.07 224.016 223.003 224.016 222.93V219.964C224.016 219.808 223.847 219.71 223.712 219.788L222.835 220.297C222.772 220.333 222.734 220.4 222.734 220.473V223.439C222.734 223.595 222.903 223.693 223.038 223.615Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M220.565 225.03L221.442 224.522C221.505 224.485 221.544 224.418 221.544 224.345V221.379C221.544 221.222 221.375 221.124 221.239 221.203L220.363 221.712C220.3 221.748 220.262 221.815 220.262 221.888V224.854C220.262 225.011 220.43 225.109 220.565 225.03Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M218.093 226.58L218.97 226.072C219.033 226.035 219.071 225.968 219.071 225.895V222.929C219.071 222.773 218.902 222.675 218.767 222.753L217.891 223.262C217.828 223.298 217.789 223.365 217.789 223.438V226.404C217.789 226.561 217.958 226.658 218.093 226.58Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M215.621 227.928L216.498 227.419C216.56 227.382 216.599 227.315 216.599 227.242V224.277C216.599 224.12 216.43 224.022 216.295 224.1L215.418 224.609C215.355 224.646 215.317 224.713 215.317 224.786V227.751C215.317 227.908 215.486 228.006 215.621 227.928Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M213.148 229.41L214.025 228.902C214.088 228.865 214.127 228.798 214.127 228.725V225.759C214.127 225.602 213.958 225.504 213.822 225.583L212.946 226.092C212.883 226.128 212.844 226.195 212.844 226.268V229.234C212.844 229.391 213.013 229.489 213.148 229.41Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M210.676 230.825L211.552 230.317C211.615 230.28 211.654 230.213 211.654 230.14V227.174C211.654 227.017 211.485 226.919 211.35 226.998L210.473 227.507C210.411 227.543 210.372 227.61 210.372 227.683V230.649C210.372 230.805 210.541 230.903 210.676 230.825Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M180.859 208.635L180.877 212.11C180.76 212.739 181.017 213.428 181.646 213.793L208.63 229.452C209.123 229.737 209.73 229.737 210.222 229.452L237.207 213.793C237.836 213.429 238.092 212.739 237.975 212.11L237.993 208.635" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M208.63 225.495L181.646 209.837C180.584 209.221 180.584 207.682 181.646 207.065L208.63 191.408C209.123 191.122 209.73 191.122 210.222 191.408L237.207 207.065C238.268 207.682 238.268 209.221 237.207 209.837L210.222 225.495C209.73 225.781 209.123 225.781 208.63 225.495Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.327785">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M203.593 62.7101L202.489 62.0689C202.41 62.0228 202.361 61.9378 202.361 61.8468V58.1075C202.361 57.9094 202.574 57.7857 202.744 57.8848L203.848 58.5259C203.927 58.5721 203.976 58.657 203.976 58.7487V62.4879C203.976 62.6855 203.763 62.8085 203.593 62.7101Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M206.707 64.4942L205.603 63.8524C205.524 63.8069 205.475 63.722 205.475 63.6303V59.8916C205.475 59.6935 205.688 59.5698 205.858 59.6689L206.963 60.31C207.042 60.3556 207.09 60.4411 207.09 60.5328V64.2721C207.09 64.4696 206.878 64.5926 206.707 64.4942Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M209.822 66.2782L208.718 65.6365C208.638 65.5909 208.59 65.506 208.59 65.4143V61.6757C208.59 61.4775 208.803 61.3539 208.973 61.4529L210.077 62.0941C210.156 62.1396 210.205 62.2245 210.205 62.3168V66.0555C210.205 66.253 209.992 66.3767 209.822 66.2782Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M212.937 68.0617L211.833 67.4205C211.753 67.375 211.705 67.2901 211.705 67.1984V63.4591C211.705 63.261 211.918 63.1379 212.088 63.2364L213.192 63.8781C213.271 63.9237 213.32 64.0086 213.32 64.1009V67.8395C213.32 68.0371 213.107 68.1607 212.937 68.0617Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M216.052 69.8457L214.947 69.2046C214.868 69.1584 214.819 69.0735 214.819 68.9824V65.2431C214.819 65.045 215.032 64.922 215.202 65.0204L216.307 65.6616C216.386 65.7077 216.435 65.7926 216.435 65.8849V69.6236C216.435 69.8211 216.222 69.9448 216.052 69.8457Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M219.166 71.6298L218.062 70.9886C217.983 70.9425 217.934 70.8576 217.934 70.7659V67.0272C217.934 66.8291 218.147 66.7054 218.317 66.8045L219.421 67.4456C219.5 67.4918 219.549 67.5767 219.549 67.6684V71.4076C219.549 71.6052 219.336 71.7282 219.166 71.6298Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M222.281 73.4138L221.177 72.772C221.097 72.7265 221.049 72.6416 221.049 72.5499V68.8112C221.049 68.6131 221.262 68.4894 221.432 68.5885L222.536 69.2297C222.615 69.2752 222.664 69.3601 222.664 69.4524V73.1917C222.664 73.3892 222.451 73.5123 222.281 73.4138Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M225.396 75.3679L224.292 74.7268C224.212 74.6806 224.164 74.5957 224.164 74.5047V70.7654C224.164 70.5672 224.377 70.4442 224.547 70.5426L225.651 71.1838C225.73 71.2299 225.779 71.3149 225.779 71.4071V75.1458C225.779 75.3433 225.566 75.467 225.396 75.3679Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M228.51 77.0667L227.406 76.4255C227.327 76.3794 227.278 76.2945 227.278 76.2034V72.4641C227.278 72.266 227.491 72.1429 227.661 72.2414L228.766 72.8825C228.844 72.9287 228.893 73.0136 228.893 73.1053V76.8446C228.893 77.0421 228.681 77.1658 228.51 77.0667Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M231.625 78.9361L230.52 78.2943C230.441 78.2488 230.393 78.1639 230.393 78.0722V74.3335C230.393 74.1354 230.605 74.0117 230.776 74.1108L231.88 74.7519C231.959 74.7975 232.008 74.8824 232.008 74.9747V78.7134C232.008 78.9109 231.795 79.0346 231.625 78.9361Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M234.74 80.7195L233.635 80.0784C233.556 80.0328 233.508 79.9479 233.508 79.8562V76.1176C233.508 75.9195 233.72 75.7958 233.891 75.8942L234.995 76.536C235.074 76.5815 235.123 76.6664 235.123 76.7587V80.4974C235.123 80.6949 234.91 80.8186 234.74 80.7195Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M270.498 62.7461L271.626 62.0914C271.707 62.0441 271.756 61.9579 271.756 61.8638V58.0457C271.756 57.8439 271.539 57.7178 271.365 57.8187L270.237 58.474C270.157 58.5208 270.107 58.6069 270.107 58.701V62.5191C270.107 62.7209 270.324 62.847 270.498 62.7461Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M267.317 64.5681L268.445 63.9134C268.526 63.866 268.576 63.7799 268.576 63.6857V59.8677C268.576 59.6659 268.358 59.5397 268.184 59.6406L267.057 60.2959C266.976 60.3421 266.926 60.4289 266.926 60.523V64.341C266.926 64.5429 267.143 64.669 267.317 64.5681Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M264.136 66.39L265.265 65.7353C265.345 65.6879 265.395 65.6018 265.395 65.5076V61.689C265.395 61.4871 265.178 61.361 265.003 61.4619L263.876 62.1172C263.795 62.164 263.746 62.2501 263.746 62.3443V66.1629C263.746 66.3647 263.963 66.4909 264.136 66.39Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M260.956 68.2113L262.083 67.5572C262.165 67.5098 262.214 67.4231 262.214 67.3296V63.5109C262.214 63.3091 261.996 63.1829 261.823 63.2839L260.695 63.9392C260.614 63.9859 260.564 64.0721 260.564 64.1662V67.9843C260.564 68.1861 260.782 68.3122 260.956 68.2113Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M257.775 70.0332L258.902 69.3785C258.983 69.3311 259.033 69.245 259.033 69.1508V65.3328C259.033 65.131 258.816 65.0048 258.642 65.1057L257.514 65.7611C257.434 65.8078 257.383 65.894 257.383 65.9881V69.8061C257.383 70.008 257.601 70.1341 257.775 70.0332Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M254.594 71.8551L255.722 71.2004C255.803 71.153 255.852 71.0669 255.852 70.9727V67.1547C255.852 66.9529 255.635 66.8267 255.461 66.9277L254.333 67.583C254.253 67.6297 254.203 67.7159 254.203 67.81V71.6281C254.203 71.8299 254.42 71.956 254.594 71.8551Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M251.413 73.6771L252.541 73.0224C252.622 72.975 252.672 72.8888 252.672 72.7947V68.976C252.672 68.7742 252.455 68.6481 252.28 68.749L251.153 69.4043C251.072 69.4511 251.022 69.5372 251.022 69.6313V73.45C251.022 73.6518 251.24 73.778 251.413 73.6771Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M248.233 75.6726L249.361 75.0179C249.441 74.9705 249.491 74.8844 249.491 74.7902V70.9722C249.491 70.7704 249.274 70.6442 249.099 70.7451L247.972 71.4004C247.891 71.4472 247.842 71.5333 247.842 71.6275V75.4455C247.842 75.6474 248.059 75.7735 248.233 75.6726Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M245.052 77.4074L246.18 76.7527C246.261 76.7053 246.31 76.6192 246.31 76.525V72.707C246.31 72.5052 246.093 72.379 245.919 72.4799L244.791 73.1353C244.711 73.182 244.661 73.2682 244.661 73.3623V77.1803C244.661 77.3822 244.878 77.5083 245.052 77.4074Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M241.871 79.3164L242.999 78.6617C243.08 78.6144 243.129 78.5282 243.129 78.4341V74.6154C243.129 74.4136 242.912 74.2874 242.738 74.3884L241.61 75.0437C241.53 75.0904 241.48 75.1766 241.48 75.2707V79.0894C241.48 79.2912 241.697 79.4173 241.871 79.3164Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M238.69 81.1378L239.818 80.4837C239.899 80.4363 239.949 80.3495 239.949 80.256V76.4374C239.949 76.2355 239.731 76.1094 239.557 76.2103L238.43 76.8656C238.349 76.9124 238.299 76.9985 238.299 77.0927V80.9107C238.299 81.1125 238.517 81.2387 238.69 81.1378Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M200.331 52.5682L200.353 57.0421C200.203 57.8519 200.533 58.7392 201.342 59.2093L236.058 79.3695C236.692 79.7369 237.473 79.7369 238.107 79.3695L272.823 59.2093C273.632 58.7398 273.961 57.8519 273.811 57.0421L273.835 52.5682" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M236.058 74.2755L201.342 54.1153C199.977 53.3227 199.977 51.3408 201.342 50.547L236.058 30.388C236.692 30.0201 237.473 30.0201 238.107 30.388L272.823 50.547C274.188 51.3408 274.188 53.3227 272.823 54.1153L238.107 74.2755C237.473 74.6435 236.692 74.6435 236.058 74.2755Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.120697">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M81.1767 162.008L80.746 161.754C80.7152 161.736 80.6961 161.702 80.6961 161.666V160.186C80.6961 160.107 80.7792 160.058 80.8455 160.098L81.2762 160.351C81.3072 160.37 81.3261 160.403 81.3261 160.44V161.92C81.3261 161.998 81.243 162.047 81.1767 162.008Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M82.3781 162.714L81.9474 162.46C81.9166 162.442 81.8975 162.408 81.8975 162.372V160.892C81.8975 160.814 81.9806 160.765 82.0469 160.804L82.4776 161.058C82.5084 161.076 82.5275 161.11 82.5275 161.146V162.626C82.5275 162.704 82.4444 162.753 82.3781 162.714Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M83.5795 163.42L83.1488 163.166C83.1178 163.148 83.0989 163.114 83.0989 163.078V161.598C83.0989 161.52 83.182 161.471 83.2483 161.51L83.679 161.764C83.7098 161.782 83.7288 161.815 83.7288 161.852V163.332C83.7288 163.41 83.6458 163.459 83.5795 163.42Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M84.7808 164.126L84.3502 163.872C84.3191 163.854 84.3003 163.821 84.3003 163.784V162.304C84.3003 162.226 84.3833 162.177 84.4497 162.216L84.8803 162.47C84.9111 162.488 84.9302 162.522 84.9302 162.558V164.038C84.9302 164.116 84.8472 164.165 84.7808 164.126Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M85.9823 164.832L85.5516 164.578C85.5205 164.56 85.5017 164.527 85.5017 164.49V163.01C85.5017 162.932 85.5847 162.883 85.6511 162.922L86.0817 163.176C86.1125 163.194 86.1316 163.228 86.1316 163.264V164.744C86.1316 164.822 86.0486 164.871 85.9823 164.832Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M87.1837 165.538L86.753 165.285C86.7219 165.266 86.7031 165.233 86.7031 165.196V163.717C86.7031 163.638 86.7861 163.589 86.8525 163.628L87.2832 163.882C87.3139 163.9 87.333 163.934 87.333 163.97V165.45C87.333 165.529 87.25 165.577 87.1837 165.538Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M88.385 166.245L87.9543 165.991C87.9233 165.972 87.9045 165.939 87.9045 165.903V164.423C87.9045 164.344 87.9875 164.295 88.0538 164.335L88.4845 164.588C88.5153 164.606 88.5344 164.64 88.5344 164.676V166.157C88.5344 166.235 88.4514 166.284 88.385 166.245Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M89.5864 167.018L89.1557 166.764C89.1247 166.746 89.1059 166.712 89.1059 166.676V165.196C89.1059 165.118 89.1889 165.069 89.2552 165.108L89.6859 165.362C89.7167 165.38 89.7358 165.414 89.7358 165.45V166.93C89.7358 167.008 89.6528 167.057 89.5864 167.018Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M90.7878 167.69L90.3571 167.437C90.3261 167.418 90.3073 167.385 90.3073 167.349V165.869C90.3073 165.79 90.39 165.742 90.4566 165.78L90.8873 166.034C90.9181 166.053 90.9372 166.086 90.9372 166.122V167.603C90.9372 167.681 90.8541 167.73 90.7878 167.69Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M91.9892 168.43L91.5583 168.176C91.5275 168.158 91.5086 168.125 91.5086 168.089V166.609C91.5086 166.53 91.5914 166.481 91.658 166.52L92.0887 166.774C92.1195 166.792 92.1386 166.826 92.1386 166.862V168.342C92.1386 168.42 92.0555 168.469 91.9892 168.43Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M93.1906 169.136L92.7596 168.883C92.7289 168.865 92.71 168.831 92.71 168.795V167.315C92.71 167.236 92.7928 167.187 92.8594 167.226L93.2901 167.48C93.3209 167.498 93.3399 167.532 93.3399 167.569V169.048C93.3399 169.127 93.2569 169.176 93.1906 169.136Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M106.978 162.022L107.413 161.763C107.444 161.744 107.463 161.71 107.463 161.673V160.161C107.463 160.081 107.379 160.032 107.312 160.071L106.877 160.331C106.846 160.349 106.827 160.383 106.827 160.421V161.932C106.827 162.012 106.911 162.062 106.978 162.022Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M105.751 162.743L106.186 162.484C106.217 162.465 106.236 162.431 106.236 162.394V160.883C106.236 160.803 106.152 160.753 106.085 160.793L105.65 161.052C105.619 161.07 105.6 161.105 105.6 161.142V162.653C105.6 162.733 105.684 162.783 105.751 162.743Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M104.524 163.464L104.959 163.205C104.99 163.186 105.009 163.152 105.009 163.115V161.603C105.009 161.524 104.926 161.474 104.858 161.514L104.423 161.773C104.392 161.791 104.373 161.826 104.373 161.863V163.374C104.373 163.454 104.457 163.504 104.524 163.464Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M103.297 164.185L103.732 163.926C103.763 163.908 103.782 163.873 103.782 163.836V162.325C103.782 162.245 103.698 162.195 103.631 162.235L103.197 162.494C103.165 162.513 103.146 162.547 103.146 162.584V164.095C103.146 164.175 103.23 164.225 103.297 164.185Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M102.07 164.906L102.505 164.647C102.536 164.628 102.556 164.594 102.556 164.557V163.046C102.556 162.966 102.472 162.916 102.405 162.956L101.97 163.215C101.939 163.234 101.919 163.268 101.919 163.305V164.817C101.919 164.896 102.003 164.946 102.07 164.906Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M100.843 165.628L101.278 165.368C101.31 165.35 101.329 165.316 101.329 165.278V163.767C101.329 163.687 101.245 163.637 101.178 163.677L100.743 163.937C100.712 163.955 100.693 163.989 100.693 164.026V165.538C100.693 165.618 100.776 165.668 100.843 165.628Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M99.6164 166.349L100.052 166.09C100.083 166.071 100.102 166.037 100.102 165.999V164.488C100.102 164.408 100.018 164.358 99.9508 164.398L99.5159 164.657C99.4848 164.676 99.4657 164.71 99.4657 164.747V166.259C99.4657 166.339 99.5494 166.389 99.6164 166.349Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M98.3896 167.139L98.8247 166.879C98.8559 166.861 98.875 166.827 98.875 166.789V165.278C98.875 165.198 98.7912 165.148 98.724 165.188L98.2891 165.448C98.2579 165.466 98.2388 165.5 98.2388 165.537V167.049C98.2388 167.129 98.3226 167.179 98.3896 167.139Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M97.1627 167.825L97.5979 167.566C97.629 167.547 97.6481 167.513 97.6481 167.476V165.965C97.6481 165.885 97.5644 165.835 97.4971 165.875L97.0622 166.134C97.0311 166.153 97.012 166.187 97.012 166.224V167.735C97.012 167.815 97.0957 167.865 97.1627 167.825Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M95.9359 168.581L96.371 168.322C96.4021 168.303 96.4213 168.269 96.4213 168.232V166.72C96.4213 166.64 96.3375 166.59 96.2702 166.63L95.8353 166.89C95.8042 166.908 95.7849 166.942 95.7849 166.98V168.491C95.7849 168.571 95.8689 168.621 95.9359 168.581Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M94.709 169.302L95.1439 169.043C95.1751 169.024 95.1944 168.99 95.1944 168.953V167.441C95.1944 167.361 95.1104 167.312 95.0434 167.352L94.6085 167.611C94.5774 167.629 94.558 167.664 94.558 167.701V169.212C94.558 169.292 94.642 169.342 94.709 169.302Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.9131 157.993L79.9218 159.764C79.864 160.085 79.9912 160.436 80.3034 160.622L93.6939 168.602C93.9383 168.747 94.2394 168.747 94.4839 168.602L107.874 160.622C108.186 160.436 108.314 160.085 108.256 159.764L108.265 157.993" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M93.6938 166.586L80.3033 158.606C79.7767 158.292 79.7767 157.507 80.3033 157.193L93.6938 149.214C93.9383 149.068 94.2394 149.068 94.4839 149.214L107.874 157.193C108.401 157.507 108.401 158.292 107.874 158.606L94.4839 166.586C94.2396 166.731 93.9383 166.731 93.6938 166.586Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.120697">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M100.479 150.186L100.048 149.932C100.018 149.914 99.9986 149.88 99.9986 149.844V148.364C99.9986 148.286 100.082 148.237 100.148 148.276L100.579 148.53C100.61 148.548 100.629 148.582 100.629 148.618V150.098C100.629 150.176 100.545 150.225 100.479 150.186Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M101.681 150.892L101.25 150.638C101.219 150.62 101.2 150.587 101.2 150.55V149.07C101.2 148.992 101.283 148.943 101.349 148.982L101.78 149.236C101.811 149.254 101.83 149.288 101.83 149.324V150.804C101.83 150.882 101.747 150.931 101.681 150.892Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M102.882 151.598L102.451 151.344C102.42 151.326 102.401 151.293 102.401 151.256V149.777C102.401 149.698 102.484 149.649 102.551 149.688L102.981 149.942C103.012 149.96 103.031 149.994 103.031 150.03V151.51C103.031 151.588 102.948 151.637 102.882 151.598Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M104.083 152.304L103.653 152.051C103.622 152.033 103.603 151.999 103.603 151.963V150.482C103.603 150.404 103.686 150.355 103.752 150.394L104.183 150.648C104.214 150.666 104.233 150.7 104.233 150.737V152.216C104.233 152.295 104.15 152.344 104.083 152.304Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M105.285 153.011L104.854 152.757C104.823 152.738 104.804 152.705 104.804 152.669V151.189C104.804 151.11 104.887 151.062 104.954 151.101L105.384 151.354C105.415 151.373 105.434 151.406 105.434 151.443V152.923C105.434 153.001 105.351 153.05 105.285 153.011Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M106.486 153.717L106.055 153.463C106.024 153.445 106.006 153.411 106.006 153.375V151.895C106.006 151.816 106.089 151.767 106.155 151.807L106.586 152.06C106.616 152.079 106.635 152.112 106.635 152.149V153.629C106.635 153.707 106.552 153.756 106.486 153.717Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M107.687 154.423L107.257 154.169C107.226 154.151 107.207 154.117 107.207 154.081V152.601C107.207 152.523 107.29 152.474 107.356 152.513L107.787 152.767C107.818 152.785 107.837 152.818 107.837 152.855V154.335C107.837 154.413 107.754 154.462 107.687 154.423Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M108.889 155.196L108.458 154.943C108.427 154.924 108.408 154.891 108.408 154.855V153.375C108.408 153.296 108.491 153.247 108.558 153.286L108.988 153.54C109.019 153.558 109.038 153.592 109.038 153.629V155.108C109.038 155.187 108.955 155.236 108.889 155.196Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M110.09 155.869L109.66 155.615C109.629 155.597 109.61 155.563 109.61 155.527V154.047C109.61 153.969 109.693 153.92 109.759 153.959L110.19 154.213C110.221 154.231 110.24 154.264 110.24 154.301V155.781C110.24 155.859 110.157 155.908 110.09 155.869Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M111.292 156.609L110.861 156.355C110.83 156.337 110.811 156.303 110.811 156.267V154.787C110.811 154.709 110.894 154.66 110.96 154.699L111.391 154.953C111.422 154.971 111.441 155.004 111.441 155.041V156.521C111.441 156.599 111.358 156.648 111.292 156.609Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M112.493 157.315L112.062 157.061C112.031 157.043 112.012 157.009 112.012 156.973V155.493C112.012 155.415 112.095 155.366 112.162 155.405L112.593 155.659C112.623 155.677 112.642 155.71 112.642 155.747V157.227C112.642 157.305 112.559 157.354 112.493 157.315Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M126.28 150.2L126.715 149.941C126.746 149.922 126.766 149.888 126.766 149.851V148.34C126.766 148.26 126.682 148.21 126.614 148.25L126.18 148.509C126.148 148.528 126.129 148.562 126.129 148.599V150.11C126.129 150.19 126.213 150.24 126.28 150.2Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M125.053 150.921L125.488 150.662C125.52 150.644 125.539 150.609 125.539 150.572V149.061C125.539 148.981 125.455 148.931 125.388 148.971L124.953 149.23C124.922 149.249 124.902 149.283 124.902 149.32V150.832C124.902 150.911 124.986 150.961 125.053 150.921Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M123.826 151.643L124.262 151.383C124.293 151.365 124.312 151.331 124.312 151.293V149.782C124.312 149.702 124.228 149.652 124.161 149.692L123.726 149.951C123.695 149.97 123.676 150.004 123.676 150.041V151.553C123.676 151.633 123.759 151.683 123.826 151.643Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M122.6 152.364L123.034 152.105C123.066 152.086 123.085 152.052 123.085 152.015V150.503C123.085 150.423 123.001 150.373 122.934 150.413L122.499 150.673C122.468 150.691 122.449 150.725 122.449 150.762V152.274C122.449 152.354 122.533 152.404 122.6 152.364Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M121.373 153.085L121.808 152.826C121.839 152.807 121.858 152.773 121.858 152.735V151.224C121.858 151.144 121.774 151.094 121.707 151.134L121.272 151.394C121.241 151.412 121.222 151.446 121.222 151.484V152.995C121.222 153.075 121.306 153.125 121.373 153.085Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M120.146 153.806L120.581 153.547C120.612 153.528 120.631 153.494 120.631 153.457V151.945C120.631 151.865 120.547 151.816 120.48 151.855L120.045 152.115C120.014 152.133 119.995 152.167 119.995 152.205V153.716C119.995 153.796 120.079 153.846 120.146 153.806Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M118.919 154.527L119.354 154.268C119.385 154.249 119.404 154.215 119.404 154.178V152.666C119.404 152.586 119.321 152.536 119.253 152.576L118.818 152.836C118.787 152.854 118.768 152.888 118.768 152.926V154.437C118.768 154.517 118.852 154.567 118.919 154.527Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M117.692 155.317L118.127 155.058C118.158 155.039 118.177 155.005 118.177 154.968V153.456C118.177 153.377 118.094 153.327 118.026 153.367L117.592 153.626C117.56 153.644 117.541 153.679 117.541 153.716V155.227C117.541 155.307 117.625 155.357 117.692 155.317Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M116.465 156.004L116.9 155.745C116.931 155.726 116.951 155.692 116.951 155.654V154.143C116.951 154.063 116.867 154.013 116.8 154.053L116.365 154.313C116.334 154.331 116.314 154.365 116.314 154.403V155.914C116.314 155.994 116.398 156.044 116.465 156.004Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M115.238 156.759L115.673 156.5C115.705 156.481 115.724 156.447 115.724 156.41V154.899C115.724 154.819 115.64 154.769 115.573 154.809L115.138 155.068C115.107 155.087 115.087 155.121 115.087 155.158V156.669C115.087 156.749 115.171 156.799 115.238 156.759Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M114.011 157.48L114.446 157.221C114.478 157.203 114.497 157.168 114.497 157.131V155.62C114.497 155.54 114.413 155.49 114.346 155.53L113.911 155.789C113.88 155.808 113.86 155.842 113.86 155.879V157.39C113.86 157.47 113.944 157.52 114.011 157.48Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M99.2155 146.172L99.2243 147.942C99.1665 148.263 99.2936 148.614 99.6058 148.8L112.996 156.78C113.241 156.926 113.542 156.926 113.786 156.78L127.177 148.8C127.489 148.614 127.616 148.263 127.558 147.942L127.567 146.172" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M112.996 154.764L99.6058 146.784C99.0791 146.47 99.0791 145.686 99.6058 145.371L112.996 137.392C113.241 137.246 113.542 137.246 113.786 137.392L127.177 145.371C127.703 145.686 127.703 146.47 127.177 146.784L113.786 154.764C113.542 154.91 113.241 154.91 112.996 154.764Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.120697">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M269.912 70.6586L269.481 70.4048C269.45 70.3865 269.431 70.3529 269.431 70.3169V68.8367C269.431 68.7583 269.514 68.7093 269.581 68.7486L270.011 69.0024C270.042 69.0206 270.061 69.0542 270.061 69.0905V70.5707C270.061 70.6488 269.978 70.6975 269.912 70.6586Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M271.113 71.3648L270.683 71.1108C270.652 71.0927 270.633 71.0591 270.633 71.0228V69.5429C270.633 69.4645 270.716 69.4156 270.782 69.4548L271.213 69.7086C271.243 69.7266 271.263 69.7604 271.263 69.7967V71.2769C271.263 71.355 271.18 71.4038 271.113 71.3648Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M272.315 72.071L271.884 71.8169C271.853 71.7989 271.834 71.7653 271.834 71.729V70.2491C271.834 70.1707 271.917 70.1217 271.983 70.161L272.414 70.4147C272.445 70.4328 272.464 70.4664 272.464 70.5029V71.9828C272.464 72.061 272.381 72.1099 272.315 72.071Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M273.516 72.7769L273.085 72.5231C273.054 72.5051 273.035 72.4715 273.035 72.4352V70.9551C273.035 70.8766 273.118 70.8279 273.185 70.8669L273.616 71.1209C273.646 71.1389 273.665 71.1726 273.665 71.2091V72.689C273.665 72.7672 273.582 72.8161 273.516 72.7769Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M274.717 73.4831L274.287 73.2293C274.256 73.211 274.237 73.1774 274.237 73.1414V71.6613C274.237 71.5828 274.32 71.5341 274.386 71.5731L274.817 71.8269C274.848 71.8451 274.867 71.8788 274.867 71.9153V73.3952C274.867 73.4734 274.784 73.5223 274.717 73.4831Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M275.919 74.1893L275.488 73.9355C275.457 73.9172 275.438 73.8836 275.438 73.8473V72.3674C275.438 72.289 275.521 72.2401 275.588 72.2793L276.018 72.5331C276.049 72.5513 276.068 72.5849 276.068 72.6212V74.1014C276.068 74.1795 275.985 74.2283 275.919 74.1893Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M277.12 74.8955L276.689 74.6414C276.658 74.6234 276.64 74.5898 276.64 74.5535V73.0736C276.64 72.9952 276.723 72.9462 276.789 72.9855L277.22 73.2393C277.25 73.2573 277.27 73.2909 277.27 73.3274V74.8076C277.27 74.8857 277.186 74.9344 277.12 74.8955Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M278.322 75.669L277.891 75.4152C277.86 75.3969 277.841 75.3633 277.841 75.3273V73.8471C277.841 73.7687 277.924 73.72 277.99 73.759L278.421 74.0128C278.452 74.031 278.471 74.0646 278.471 74.1012V75.5811C278.471 75.6592 278.388 75.7082 278.322 75.669Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M279.523 76.3414L279.092 76.0876C279.061 76.0693 279.042 76.0357 279.042 75.9997V74.5196C279.042 74.4411 279.125 74.3924 279.192 74.4314L279.622 74.6852C279.653 74.7034 279.672 74.7371 279.672 74.7733V76.2535C279.672 76.3317 279.589 76.3806 279.523 76.3414Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M280.724 77.0814L280.293 76.8273C280.263 76.8093 280.244 76.7757 280.244 76.7394V75.2595C280.244 75.1811 280.327 75.1322 280.393 75.1714L280.824 75.4252C280.855 75.4432 280.874 75.4768 280.874 75.5133V76.9932C280.874 77.0714 280.791 77.1204 280.724 77.0814Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M281.926 77.7873L281.495 77.5335C281.464 77.5155 281.445 77.4819 281.445 77.4456V75.9657C281.445 75.8873 281.528 75.8383 281.595 75.8773L282.025 76.1313C282.056 76.1494 282.075 76.183 282.075 76.2195V77.6994C282.075 77.7776 281.992 77.8265 281.926 77.7873Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M295.713 70.6729L296.148 70.4137C296.179 70.3949 296.198 70.3608 296.198 70.3236V68.8123C296.198 68.7324 296.114 68.6825 296.047 68.7224L295.612 68.9818C295.581 69.0003 295.562 69.0344 295.562 69.0717V70.583C295.562 70.6629 295.646 70.7128 295.713 70.6729Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M294.486 71.394L294.921 71.1349C294.952 71.1161 294.971 71.082 294.971 71.0448V69.5335C294.971 69.4536 294.888 69.4036 294.82 69.4436L294.385 69.703C294.354 69.7212 294.335 69.7556 294.335 69.7929V71.3042C294.335 71.3841 294.419 71.434 294.486 71.394Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M293.259 72.1152L293.694 71.856C293.725 71.8373 293.744 71.8032 293.744 71.7659V70.2544C293.744 70.1745 293.661 70.1246 293.593 70.1645L293.159 70.4239C293.127 70.4424 293.108 70.4765 293.108 70.5138V72.0253C293.108 72.1052 293.192 72.1551 293.259 72.1152Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M292.032 72.8362L292.467 72.5772C292.499 72.5585 292.518 72.5241 292.518 72.4871V70.9756C292.518 70.8957 292.434 70.8458 292.367 70.8857L291.932 71.1451C291.901 71.1636 291.881 71.1977 291.881 71.235V72.7463C291.881 72.8262 291.965 72.8761 292.032 72.8362Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M290.805 73.5573L291.24 73.2982C291.271 73.2794 291.291 73.2453 291.291 73.2081V71.6967C291.291 71.6169 291.207 71.5669 291.14 71.6069L290.705 71.8663C290.674 71.8848 290.654 71.9189 290.654 71.9561V73.4674C290.654 73.5473 290.738 73.5973 290.805 73.5573Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M289.578 74.2785L290.014 74.0193C290.045 74.0006 290.064 73.9665 290.064 73.9292V72.4179C290.064 72.338 289.98 72.2881 289.913 72.328L289.478 72.5874C289.447 72.6059 289.428 72.64 289.428 72.6773V74.1886C289.428 74.2685 289.511 74.3184 289.578 74.2785Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M288.352 74.9997L288.787 74.7405C288.818 74.7218 288.837 74.6877 288.837 74.6504V73.1389C288.837 73.059 288.753 73.009 288.686 73.049L288.251 73.3084C288.22 73.3269 288.201 73.361 288.201 73.3982V74.9098C288.201 74.9897 288.285 75.0396 288.352 74.9997Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M287.125 75.7896L287.56 75.5304C287.591 75.5117 287.61 75.4776 287.61 75.4403V73.929C287.61 73.8491 287.526 73.7992 287.459 73.8391L287.024 74.0985C286.993 74.117 286.974 74.1511 286.974 74.1884V75.6997C286.974 75.7796 287.058 75.8295 287.125 75.7896Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M285.898 76.4763L286.333 76.2171C286.364 76.1984 286.383 76.1643 286.383 76.127V74.6157C286.383 74.5358 286.3 74.4859 286.232 74.5258L285.797 74.7852C285.766 74.8037 285.747 74.8378 285.747 74.8751V76.3864C285.747 76.4663 285.831 76.5162 285.898 76.4763Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M284.671 77.2319L285.106 76.9728C285.137 76.954 285.156 76.9199 285.156 76.8827V75.3711C285.156 75.2912 285.073 75.2413 285.005 75.2812L284.57 75.5406C284.539 75.5591 284.52 75.5932 284.52 75.6305V77.1421C284.52 77.2219 284.604 77.2719 284.671 77.2319Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M283.444 77.9529L283.879 77.694C283.91 77.6752 283.93 77.6409 283.93 77.6038V76.0923C283.93 76.0124 283.846 75.9625 283.779 76.0024L283.344 76.2618C283.313 76.2803 283.293 76.3144 283.293 76.3517V77.863C283.293 77.9429 283.377 77.9928 283.444 77.9529Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M268.648 66.6441L268.657 68.415C268.599 68.7355 268.726 69.0868 269.039 69.2728L282.429 77.2529C282.673 77.3983 282.975 77.3983 283.219 77.2529L296.61 69.2728C296.921 69.087 297.049 68.7355 296.991 68.415L297 66.6441" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M282.429 75.2366L269.038 67.2565C268.512 66.9428 268.512 66.1582 269.038 65.844L282.429 57.8644C282.673 57.7188 282.974 57.7188 283.219 57.8644L296.609 65.844C297.136 66.1582 297.136 66.9428 296.609 67.2565L283.219 75.2366C282.975 75.3822 282.673 75.3822 282.429 75.2366Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.327785">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M182.898 33.788L182.147 33.3494C182.093 33.3176 182.06 33.2598 182.06 33.1975V30.6391C182.06 30.5041 182.205 30.4195 182.32 30.4867L183.071 30.9253C183.125 30.957 183.158 31.0149 183.158 31.0784V33.6362C183.158 33.7712 183.013 33.8552 182.898 33.788Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M185.015 35.0087L184.264 34.57C184.21 34.5383 184.177 34.4798 184.177 34.4176V31.8592C184.177 31.7248 184.322 31.6395 184.438 31.7073L185.188 32.146C185.242 32.1777 185.275 32.2356 185.275 32.2984V34.8562C185.275 34.9919 185.13 35.0759 185.015 35.0087Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M187.132 36.2287L186.381 35.7901C186.327 35.759 186.295 35.7005 186.295 35.6383V33.0798C186.295 32.9448 186.439 32.8602 186.555 32.9274L187.306 33.3667C187.359 33.3978 187.392 33.4563 187.392 33.5191V36.0769C187.392 36.2119 187.247 36.2966 187.132 36.2287Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M189.249 37.4495L188.498 37.0108C188.445 36.9791 188.411 36.9212 188.411 36.8584V34.2999C188.411 34.1656 188.557 34.0809 188.672 34.1481L189.423 34.5868C189.477 34.6185 189.509 34.6764 189.509 34.7398V37.297C189.509 37.4327 189.365 37.5167 189.249 37.4495Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M191.366 38.6695L190.616 38.2309C190.562 38.1998 190.529 38.1413 190.529 38.0791V35.5206C190.529 35.3856 190.674 35.301 190.789 35.3688L191.54 35.8075C191.594 35.8386 191.627 35.8971 191.627 35.9599V38.5177C191.627 38.6534 191.482 38.7374 191.366 38.6695Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M193.484 39.8902L192.733 39.4516C192.679 39.4198 192.646 39.362 192.646 39.2998V36.7413C192.646 36.6063 192.791 36.5217 192.906 36.5889L193.657 37.0275C193.711 37.0593 193.744 37.1171 193.744 37.1806V39.7384C193.744 39.8734 193.599 39.9574 193.484 39.8902Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M195.601 41.1109L194.85 40.6722C194.796 40.6405 194.763 40.582 194.763 40.5198V37.9614C194.763 37.827 194.908 37.7423 195.024 37.8095L195.774 38.2482C195.828 38.2799 195.861 38.3378 195.861 38.4006V40.9585C195.861 41.0941 195.717 41.1781 195.601 41.1109Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M197.718 42.4477L196.967 42.009C196.913 41.9773 196.881 41.9194 196.881 41.8572V39.2988C196.881 39.1637 197.025 39.0791 197.141 39.1463L197.892 39.585C197.945 39.6167 197.979 39.6752 197.979 39.738V42.2959C197.979 42.4309 197.834 42.5155 197.718 42.4477Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M199.835 43.61L199.084 43.1713C199.031 43.1396 198.998 43.0817 198.998 43.0189V40.4605C198.998 40.3261 199.143 40.2414 199.258 40.3086L200.009 40.7473C200.063 40.779 200.095 40.8369 200.095 40.9003V43.4576C200.095 43.5932 199.951 43.6772 199.835 43.61Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M201.953 44.8884L201.202 44.4498C201.148 44.4187 201.115 44.3602 201.115 44.2979V41.7395C201.115 41.6045 201.26 41.5199 201.375 41.5877L202.126 42.0263C202.18 42.0574 202.213 42.1159 202.213 42.1788V44.7366C202.213 44.8722 202.068 44.9562 201.953 44.8884Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M204.07 46.1091L203.319 45.6704C203.265 45.6387 203.233 45.5808 203.233 45.518V42.9602C203.233 42.8252 203.377 42.7405 203.493 42.8077L204.243 43.2464C204.297 43.2781 204.33 43.336 204.33 43.3994V45.9573C204.33 46.0923 204.185 46.1763 204.07 46.1091Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M228.377 33.8129L229.143 33.3643C229.198 33.3332 229.232 33.2735 229.232 33.2094V30.5968C229.232 30.4587 229.084 30.3728 228.966 30.4419L228.199 30.8898C228.144 30.9222 228.111 30.9807 228.111 31.0454V33.6574C228.111 33.7955 228.259 33.8813 228.377 33.8129Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M226.215 35.0591L226.981 34.6112C227.036 34.5794 227.07 34.5197 227.07 34.4556V31.8437C227.07 31.7049 226.922 31.619 226.803 31.6881L226.037 32.1361C225.982 32.1684 225.949 32.2275 225.949 32.2916V34.9036C225.949 35.0423 226.097 35.1282 226.215 35.0591Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M224.052 36.3053L224.819 35.8574C224.873 35.8256 224.908 35.7665 224.908 35.7018V33.0899C224.908 32.9511 224.76 32.8652 224.642 32.9343L223.875 33.3829C223.821 33.4146 223.786 33.4737 223.786 33.5378V36.1498C223.786 36.2885 223.934 36.3744 224.052 36.3053Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M221.89 37.5515L222.657 37.1035C222.711 37.0718 222.746 37.0127 222.746 36.948V34.336C222.746 34.1979 222.598 34.112 222.48 34.1805L221.713 34.6291C221.658 34.6608 221.624 34.7199 221.624 34.784V37.3966C221.624 37.5347 221.772 37.6206 221.89 37.5515Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M219.728 38.7983L220.495 38.3497C220.549 38.3186 220.583 38.2589 220.583 38.1948V35.5822C220.583 35.4441 220.436 35.3582 220.318 35.4273L219.551 35.8753C219.496 35.9076 219.462 35.9661 219.462 36.0308V38.6428C219.462 38.7809 219.61 38.8668 219.728 38.7983Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M217.566 40.0446L218.333 39.596C218.388 39.5649 218.421 39.5051 218.421 39.4411V36.8285C218.421 36.6903 218.273 36.6045 218.155 36.6735L217.389 37.1215C217.334 37.1539 217.3 37.2124 217.3 37.2771V39.889C217.3 40.0272 217.448 40.1136 217.566 40.0446Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M215.404 41.2908L216.171 40.8428C216.225 40.8111 216.259 40.7513 216.259 40.6873V38.0753C216.259 37.9365 216.111 37.8507 215.993 37.9197L215.226 38.3677C215.172 38.4001 215.138 38.4592 215.138 38.5233V41.1352C215.138 41.274 215.286 41.3598 215.404 41.2908Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M213.242 42.656L214.008 42.2081C214.063 42.1763 214.097 42.1172 214.097 42.0525V39.4406C214.097 39.3024 213.949 39.2159 213.831 39.285L213.064 39.7336C213.009 39.7653 212.975 39.8245 212.975 39.8885V42.5011C212.975 42.6392 213.124 42.7251 213.242 42.656Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M211.08 43.8433L211.846 43.3947C211.901 43.363 211.935 43.3039 211.935 43.2392V40.6272C211.935 40.4891 211.787 40.4032 211.668 40.4717L210.902 40.9203C210.847 40.9526 210.813 41.0111 210.813 41.0758V43.6878C210.813 43.8259 210.962 43.9118 211.08 43.8433Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M208.917 45.1491L209.684 44.7005C209.738 44.6694 209.773 44.6097 209.773 44.5456V41.933C209.773 41.7949 209.625 41.709 209.507 41.7781L208.74 42.2261C208.686 42.2584 208.651 42.3169 208.651 42.3816V44.9936C208.651 45.1317 208.799 45.2176 208.917 45.1491Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M206.755 46.3953L207.522 45.9473C207.576 45.9156 207.611 45.8559 207.611 45.7918V43.1798C207.611 43.0411 207.463 42.9552 207.345 43.0243L206.578 43.4722C206.523 43.5046 206.489 43.5631 206.489 43.6278V46.2397C206.489 46.3785 206.637 46.4644 206.755 46.3953Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M180.68 26.8497L180.695 29.9103C180.593 30.4646 180.818 31.0713 181.368 31.3936L204.966 45.1851C205.397 45.437 205.928 45.437 206.359 45.1851L229.957 31.3936C230.507 31.0719 230.731 30.4646 230.629 29.9103L230.645 26.8497" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M204.966 41.7003L181.368 27.9082C180.439 27.3656 180.439 26.0092 181.368 25.4673L204.966 11.6752C205.397 11.4238 205.927 11.4238 206.358 11.6752L229.957 25.4673C230.885 26.0099 230.885 27.3656 229.957 27.9082L206.358 41.7003C205.927 41.9517 205.397 41.9517 204.966 41.7003Z" fill="#A59EF7"/>
-</g>
-<g opacity="0.327785">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M169.36 52.459L168.834 52.1463C168.797 52.1237 168.774 52.0822 168.774 52.0375V50.215C168.774 50.1181 168.875 50.0584 168.956 50.1062L169.482 50.4188C169.52 50.4415 169.543 50.4824 169.543 50.5277V52.3501C169.543 52.4464 169.442 52.5068 169.36 52.459Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M170.842 53.3282L170.316 53.0156C170.278 52.9936 170.255 52.952 170.255 52.9074V51.0849C170.255 50.988 170.357 50.9283 170.437 50.9761L170.963 51.2887C171.001 51.3108 171.024 51.3523 171.024 51.3976V53.22C171.024 53.3163 170.923 53.3767 170.842 53.3282Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M172.323 54.1982L171.797 53.8855C171.76 53.8635 171.737 53.822 171.737 53.7773V51.9542C171.737 51.8573 171.838 51.7976 171.919 51.846L172.445 52.1586C172.483 52.1807 172.505 52.2222 172.505 52.2669V54.09C172.505 54.1862 172.405 54.2466 172.323 54.1982Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M173.805 55.0681L173.279 54.7554C173.241 54.7334 173.218 54.6912 173.218 54.6472V52.8241C173.218 52.7272 173.319 52.6675 173.4 52.7159L173.926 53.0286C173.964 53.0506 173.987 53.0915 173.987 53.1368V54.9599C173.987 55.0555 173.885 55.1159 173.805 55.0681Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M175.286 55.938L174.76 55.6254C174.723 55.6027 174.699 55.5612 174.699 55.5165V53.6941C174.699 53.5972 174.801 53.5374 174.882 53.5852L175.408 53.8979C175.446 53.9205 175.469 53.9614 175.469 54.0067V55.8292C175.469 55.9254 175.367 55.9858 175.286 55.938Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M176.768 56.8079L176.241 56.4953C176.204 56.4726 176.181 56.4311 176.181 56.3864V54.564C176.181 54.4671 176.282 54.4073 176.363 54.4551L176.889 54.7678C176.926 54.7904 176.95 54.8313 176.95 54.8766V56.6991C176.95 56.7953 176.848 56.8557 176.768 56.8079Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M178.249 57.6772L177.723 57.3645C177.685 57.3425 177.662 57.301 177.662 57.2563V55.4332C177.662 55.337 177.764 55.2772 177.844 55.325L178.37 55.6377C178.408 55.6597 178.432 55.7012 178.432 55.7459V57.569C178.432 57.6653 178.33 57.7256 178.249 57.6772Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M179.73 58.6301L179.204 58.3174C179.166 58.2954 179.144 58.2539 179.144 58.2092V56.3868C179.144 56.2899 179.245 56.2301 179.326 56.2779L179.852 56.5906C179.889 56.6126 179.912 56.6541 179.912 56.6994V58.5219C179.912 58.6181 179.811 58.6785 179.73 58.6301Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M181.212 59.4588L180.686 59.1461C180.648 59.1235 180.625 59.082 180.625 59.0373V57.2148C180.625 57.1179 180.726 57.0582 180.807 57.106L181.333 57.4187C181.371 57.4413 181.394 57.4822 181.394 57.5275V59.35C181.394 59.4462 181.293 59.5066 181.212 59.4588Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M182.693 60.3699L182.167 60.0573C182.129 60.0352 182.107 59.9931 182.107 59.9491V58.1259C182.107 58.0291 182.207 57.9693 182.289 58.0177L182.815 58.3304C182.852 58.3524 182.875 58.3933 182.875 58.4386V60.2617C182.875 60.3573 182.774 60.4177 182.693 60.3699Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M184.174 61.2398L183.648 60.9272C183.611 60.9045 183.588 60.863 183.588 60.8183V58.9959C183.588 58.899 183.689 58.8392 183.77 58.887L184.296 59.1997C184.334 59.2223 184.357 59.2632 184.357 59.3085V61.131C184.357 61.2272 184.256 61.2876 184.174 61.2398Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M201.181 52.4761L201.718 52.1572C201.757 52.1339 201.78 52.0924 201.78 52.0459V50.1844C201.78 50.0862 201.677 50.0252 201.594 50.0743L201.057 50.3926C201.018 50.4165 200.995 50.458 200.995 50.504V52.3654C200.995 52.4636 201.099 52.5252 201.181 52.4761Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M199.668 53.3645L200.205 53.0449C200.244 53.0223 200.268 52.9807 200.268 52.9342V51.0727C200.268 50.9746 200.164 50.9129 200.081 50.9626L199.544 51.2809C199.506 51.3042 199.482 51.3464 199.482 51.3923V53.2538C199.482 53.3519 199.586 53.4136 199.668 53.3645Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M198.155 54.2528L198.693 53.9332C198.731 53.9106 198.755 53.8684 198.755 53.8225V51.9611C198.755 51.8623 198.652 51.8013 198.569 51.8503L198.031 52.1693C197.993 52.1926 197.969 52.2347 197.969 52.28V54.1421C197.969 54.2402 198.073 54.3019 198.155 54.2528Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M196.643 55.1412L197.18 54.8217C197.218 54.799 197.242 54.7569 197.242 54.7109V52.8488C197.242 52.7507 197.139 52.6897 197.056 52.7387L196.519 53.0577C196.48 53.081 196.456 53.1231 196.456 53.1684V55.0305C196.456 55.1286 196.56 55.1903 196.643 55.1412Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M195.13 56.0296L195.667 55.71C195.705 55.6873 195.729 55.6452 195.729 55.5993V53.7372C195.729 53.639 195.626 53.578 195.543 53.6271L195.006 53.946C194.967 53.9693 194.943 54.0114 194.943 54.0567V55.9182C194.943 56.017 195.047 56.0786 195.13 56.0296Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M193.617 56.9179L194.154 56.5983C194.193 56.5757 194.216 56.5335 194.216 56.487V54.6255C194.216 54.5274 194.113 54.4663 194.03 54.5154L193.493 54.8344C193.454 54.8576 193.431 54.8998 193.431 54.9451V56.8066C193.431 56.9047 193.534 56.967 193.617 56.9179Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M192.104 57.8056L192.641 57.4867C192.68 57.4634 192.704 57.4219 192.704 57.3753V55.5138C192.704 55.4157 192.6 55.3547 192.517 55.4037L191.98 55.7221C191.942 55.746 191.918 55.7875 191.918 55.8334V57.6949C191.918 57.793 192.022 57.8547 192.104 57.8056Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M190.591 58.7787L191.128 58.4598C191.167 58.4365 191.191 58.395 191.191 58.3485V56.487C191.191 56.3888 191.087 56.3272 191.004 56.3769L190.467 56.6952C190.429 56.7191 190.405 56.7606 190.405 56.8066V58.668C190.405 58.7662 190.509 58.8278 190.591 58.7787Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M189.078 59.6247L189.616 59.3051C189.654 59.2825 189.678 59.2403 189.678 59.1944V57.3329C189.678 57.2341 189.575 57.1731 189.492 57.2222L188.954 57.5411C188.916 57.5644 188.892 57.6066 188.892 57.6519V59.514C188.892 59.6121 188.996 59.6737 189.078 59.6247Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M187.566 60.5554L188.103 60.2358C188.141 60.2132 188.165 60.171 188.165 60.1251V58.2636C188.165 58.1649 188.062 58.1039 187.979 58.1529L187.442 58.4719C187.403 58.4952 187.379 58.5373 187.379 58.5826V60.4447C187.379 60.5428 187.483 60.6045 187.566 60.5554Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M186.053 61.4438L186.59 61.1242C186.628 61.1015 186.652 61.0594 186.652 61.0135V59.1514C186.652 59.0532 186.549 58.9922 186.466 59.0413L185.929 59.3602C185.89 59.3835 185.866 59.4256 185.866 59.4709V61.333C185.866 61.4312 185.97 61.4928 186.053 61.4438Z" fill="#8C87C4"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M167.808 47.5141L167.819 49.6951C167.747 50.0902 167.904 50.5224 168.289 50.7514L184.801 60.5809C185.102 60.7608 185.474 60.7608 185.775 60.5809L202.286 50.752C202.671 50.523 202.828 50.0902 202.757 49.6951L202.768 47.5141" fill="#8B81E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M184.801 58.0974L168.289 48.2686C167.64 47.8817 167.64 46.9154 168.289 46.5285L184.801 36.6996C185.102 36.5203 185.473 36.5203 185.775 36.6996L202.287 46.5285C202.936 46.9154 202.936 47.8823 202.287 48.2686L185.775 58.0974C185.474 58.2767 185.102 58.2767 184.801 58.0974Z" fill="#A59EF7"/>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M189.659 43.6672L204.642 52.5638V18.6826L189.659 43.6672Z" fill="#6659FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M204.672 18.6826V52.5638L219.649 43.6672L204.672 18.6826Z" fill="#5135E6"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M189.659 46.6247L204.861 68.4196L204.642 55.5213L189.659 46.6247Z" fill="#6659FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M204.672 54.7454L204.917 67.4584L219.482 45.55L204.672 54.7454Z" fill="#4259DB"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 120.595C343.56 124.699 331.678 124.699 324.349 120.595C317.02 116.492 317.02 109.838 324.349 105.734C331.677 101.631 343.56 101.631 350.888 105.735C358.217 109.838 358.217 116.492 350.888 120.595Z" fill="#7F95EF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M318.852 112.846H356.385V109.662H318.852V112.846Z" fill="#838DB7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 117.411C343.56 121.515 331.678 121.515 324.349 117.411C317.02 113.307 317.02 106.654 324.349 102.55C331.677 98.4465 343.56 98.4465 350.888 102.55C358.217 106.654 358.217 113.307 350.888 117.411Z" fill="#93A8FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M326.211 115.967C319.911 112.485 319.911 106.839 326.211 103.358C332.511 99.8757 342.726 99.8757 349.026 103.358C355.326 106.84 355.326 112.485 349.026 115.967C342.726 119.449 332.511 119.449 326.211 115.967Z" fill="#9ABFFF"/>
-<g opacity="0.370867">
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M342.161 110.157C342.497 110.398 342.355 110.571 342.298 110.734C341.315 113.539 336.078 115.549 331.129 115.025C328.909 114.79 327.621 114.016 327.452 112.816C327.266 111.493 328.324 110.596 330.572 110.173C331.906 109.922 333.285 109.901 334.667 109.943C337.204 110.021 339.711 110.353 342.161 110.157Z" fill="#4562DF"/>
-</g>
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M331.818 108.942C332.063 106.358 336.216 104.162 340.869 104.029C341.632 104.007 342.397 104.01 343.152 104.108C345.409 104.4 346.637 105.208 346.723 106.465C346.805 107.672 345.734 108.521 343.592 108.934C342.419 109.16 341.201 109.235 339.972 109.201C337.284 109.128 334.63 108.791 331.818 108.942Z" fill="#4562DF"/>
-</g>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 116.296C343.56 120.4 331.678 120.4 324.349 116.296C317.02 112.193 317.02 105.539 324.349 101.436C331.677 97.332 343.56 97.332 350.888 101.436C358.217 105.539 358.217 112.193 350.888 116.296Z" fill="#7F95EF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M318.852 108.548H356.385V105.363H318.852V108.548Z" fill="#838DB7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 113.112C343.56 117.216 331.678 117.216 324.349 113.112C317.02 109.008 317.02 102.355 324.349 98.2514C331.677 94.1478 343.56 94.1478 350.888 98.2515C358.217 102.355 358.217 109.009 350.888 113.112Z" fill="#93A8FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M326.211 111.668C319.911 108.186 319.911 102.541 326.211 99.0588C332.511 95.5769 342.726 95.5769 349.026 99.0588C355.326 102.541 355.326 108.186 349.026 111.668C342.726 115.15 332.511 115.15 326.211 111.668Z" fill="#9ABFFF"/>
-<g opacity="0.370867">
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M342.161 105.859C342.497 106.1 342.355 106.272 342.298 106.435C341.315 109.24 336.078 111.251 331.129 110.726C328.909 110.491 327.621 109.717 327.452 108.517C327.266 107.194 328.324 106.297 330.572 105.874C331.906 105.624 333.285 105.603 334.667 105.644C337.204 105.722 339.711 106.054 342.161 105.859Z" fill="#4562DF"/>
-</g>
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M331.818 104.643C332.063 102.059 336.216 99.8633 340.869 99.7298C341.632 99.7079 342.397 99.7109 343.152 99.8089C345.409 100.102 346.637 100.909 346.723 102.166C346.805 103.373 345.734 104.222 343.592 104.635C342.419 104.861 341.201 104.936 339.972 104.903C337.284 104.829 334.63 104.492 331.818 104.643Z" fill="#4562DF"/>
-</g>
-</g>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.5817 124.894C72.253 128.998 60.3709 128.998 53.0422 124.894C45.7135 120.79 45.7134 114.137 53.0421 110.033C60.3708 105.93 72.2529 105.93 79.5816 110.033C86.9103 114.137 86.9104 120.79 79.5817 124.894Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.5456 117.145H85.0782V113.961H47.5456V117.145Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M53.0422 121.71C45.7135 117.606 45.7134 110.953 53.0421 106.849C60.3708 102.745 72.2529 102.745 79.5816 106.849C86.9103 110.953 86.9104 117.606 79.5817 121.71C72.253 125.813 60.3709 125.813 53.0422 121.71Z" fill="#86F7D1"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.9046 120.265C48.6045 116.784 48.6044 111.138 54.9046 107.656C61.2046 104.174 71.4191 104.174 77.7192 107.656C84.0193 111.138 84.0194 116.784 77.7193 120.266C71.4192 123.747 61.2047 123.747 54.9046 120.265Z" fill="#95FFDA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M78.1519 112.724C78.1579 112.71 78.1629 112.697 78.1681 112.684C78.1741 112.687 78.1793 112.69 78.1852 112.692L78.2281 112.712L78.1519 112.724ZM75.2505 115.293C74.8038 115.693 74.3155 116.07 73.7899 116.421C73.5585 116.576 73.3192 116.726 73.0736 116.871C71.4102 116.816 70.5534 116.576 70.1138 116.331C69.5898 116.039 69.6552 115.742 69.6552 115.742C69.6552 115.702 69.6552 115.662 69.6711 115.622C69.6711 115.622 69.6791 115.586 69.7054 115.531C69.7421 115.454 69.8139 115.34 69.9495 115.225C70.1816 115.027 70.6037 114.83 71.3568 114.828H71.3703C71.5698 114.824 71.7692 114.842 71.9367 114.886C72.7345 115.083 72.216 115.45 72.216 115.45C72.2758 115.446 72.3364 115.44 72.3978 115.433C73.3567 115.315 74.4376 114.814 74.2502 113.976C74.2079 113.785 74.0682 113.615 73.8744 113.464C73.3862 113.083 72.5533 112.83 72.0795 112.708C71.8632 112.653 71.7213 112.625 71.7213 112.625C71.7452 112.557 71.7532 112.504 71.7532 112.464C71.7532 112.456 71.7532 112.449 71.7515 112.442C71.7476 112.377 71.7213 112.352 71.7213 112.352C66.7753 110.986 62.9222 111.281 62.9222 111.281L63.8795 111.718C63.8755 111.718 63.8723 111.718 63.8684 111.718C63.7758 111.715 63.6761 111.715 63.5844 111.715C62.2306 111.737 60.9685 111.926 59.8908 112.241C57.7728 112.857 56.3649 113.954 56.3649 115.207C56.3649 115.265 56.3687 115.322 56.3752 115.376C56.3464 115.351 56.3186 115.326 56.2898 115.3C56.1422 115.169 56.0042 115.039 55.875 114.911C54.8969 113.945 54.4 113.097 54.1861 112.662C59.0388 110.884 64.9445 109.989 65.7701 109.872C66.0015 109.905 66.6285 109.999 67.5188 110.155C68.5295 110.333 69.8785 110.592 71.3719 110.935C73.2681 111.372 75.3956 111.944 77.3542 112.66C77.11 113.151 76.5037 114.17 75.2505 115.293ZM67.8363 112.25C69.1517 112.246 70.3396 112.388 71.2092 112.628C71.1812 112.624 70.7249 112.558 70.2615 112.53C70.0221 112.643 69.8147 112.691 69.7509 112.705C69.7429 112.709 69.7349 112.712 69.7349 112.712C68.3389 112.578 67.8363 112.25 67.8363 112.25ZM78.3792 112.23C73.4834 110.339 67.3313 109.373 66.1507 109.199L65.7677 109.145L65.3928 109.198C64.2081 109.373 58.0481 110.34 53.1515 112.233L52.9074 112.327L52.9672 112.482C53.0685 112.733 53.6549 114.058 55.291 115.528C56.3425 116.47 57.6284 117.296 59.1131 117.985C60.9223 118.822 63.0339 119.442 65.3929 119.83L65.7758 119.892L66.0246 119.847L66.1571 119.826C68.5016 119.441 70.6133 118.82 72.4345 117.982C73.9111 117.301 75.197 116.474 76.2572 115.524C77.903 114.049 78.5212 112.682 78.5842 112.468H78.585L78.644 112.316L78.3792 112.23Z" fill="#6CF0D1"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.9765 112.492L78.644 112.548C78.6703 112.485 78.6928 112.425 78.7153 112.369C78.7416 112.382 78.7636 112.392 78.7899 112.405L78.9765 112.492Z" fill="#000CA5"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.7893 112.405C78.7631 112.392 78.7411 112.382 78.7148 112.369C78.6923 112.425 78.6698 112.485 78.644 112.548L78.9759 112.492L78.7893 112.405Z" fill="#000CA5"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.5817 120.595C72.253 124.699 60.3709 124.699 53.0422 120.595C45.7135 116.492 45.7134 109.838 53.0421 105.734C60.3708 101.631 72.2529 101.631 79.5816 105.735C86.9103 109.838 86.9104 116.492 79.5817 120.595Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.5456 112.846H85.0782V109.662H47.5456V112.846Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M53.0422 117.411C45.7135 113.307 45.7134 106.654 53.0421 102.55C60.3708 98.4465 72.2529 98.4465 79.5816 102.55C86.9103 106.654 86.9104 113.307 79.5817 117.411C72.253 121.515 60.3709 121.515 53.0422 117.411Z" fill="#86F7D1"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.9046 115.967C48.6045 112.485 48.6044 106.839 54.9046 103.358C61.2046 99.8757 71.4191 99.8757 77.7192 103.358C84.0193 106.84 84.0194 112.485 77.7193 115.967C71.4192 119.449 61.2047 119.449 54.9046 115.967Z" fill="#95FFDA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M78.1519 108.426C78.1579 108.412 78.1629 108.398 78.1681 108.386C78.1741 108.388 78.1793 108.391 78.1852 108.394L78.2281 108.413L78.1519 108.426ZM75.2505 110.994C74.8038 111.395 74.3155 111.771 73.7899 112.122C73.5585 112.277 73.3192 112.427 73.0736 112.572C71.4102 112.517 70.5534 112.277 70.1138 112.032C69.5898 111.741 69.6552 111.443 69.6552 111.443C69.6552 111.403 69.6552 111.363 69.6711 111.323C69.6711 111.323 69.6791 111.288 69.7054 111.232C69.7421 111.155 69.8139 111.041 69.9495 110.926C70.1816 110.729 70.6037 110.532 71.3568 110.529H71.3703C71.5698 110.525 71.7692 110.544 71.9367 110.587C72.7345 110.784 72.216 111.152 72.216 111.152C72.2758 111.147 72.3364 111.142 72.3978 111.134C73.3567 111.016 74.4376 110.516 74.2502 109.677C74.2079 109.487 74.0682 109.316 73.8744 109.165C73.3862 108.784 72.5533 108.531 72.0795 108.41C71.8632 108.354 71.7213 108.326 71.7213 108.326C71.7452 108.258 71.7532 108.205 71.7532 108.165C71.7532 108.157 71.7532 108.15 71.7515 108.143C71.7476 108.078 71.7213 108.053 71.7213 108.053C66.7753 106.688 62.9222 106.983 62.9222 106.983L63.8795 107.42C63.8755 107.42 63.8723 107.419 63.8684 107.419C63.7758 107.416 63.6761 107.416 63.5844 107.416C62.2306 107.438 60.9685 107.627 59.8908 107.942C57.7728 108.558 56.3649 109.656 56.3649 110.908C56.3649 110.966 56.3687 111.023 56.3752 111.077C56.3464 111.052 56.3186 111.027 56.2898 111.002C56.1422 110.87 56.0042 110.74 55.875 110.612C54.8969 109.646 54.4 108.798 54.1861 108.363C59.0388 106.586 64.9445 105.691 65.7701 105.573C66.0015 105.606 66.6285 105.7 67.5188 105.856C68.5295 106.034 69.8785 106.293 71.3719 106.637C73.2681 107.073 75.3956 107.645 77.3542 108.361C77.11 108.852 76.5037 109.871 75.2505 110.994ZM67.8363 107.951C69.1517 107.948 70.3396 108.09 71.2092 108.329C71.1812 108.325 70.7249 108.26 70.2615 108.232C70.0221 108.344 69.8147 108.392 69.7509 108.406C69.7429 108.41 69.7349 108.414 69.7349 108.414C68.3389 108.279 67.8363 107.951 67.8363 107.951ZM78.3792 107.931C73.4834 106.04 67.3313 105.074 66.1507 104.9L65.7677 104.846L65.3928 104.899C64.2081 105.074 58.0481 106.041 53.1515 107.935L52.9074 108.029L52.9672 108.183C53.0685 108.434 53.6549 109.759 55.291 111.229C56.3425 112.171 57.6284 112.997 59.1131 113.686C60.9223 114.523 63.0339 115.144 65.3929 115.531L65.7758 115.593L66.0246 115.548L66.1571 115.527C68.5016 115.142 70.6133 114.522 72.4345 113.683C73.9111 113.002 75.197 112.175 76.2572 111.225C77.903 109.75 78.5212 108.383 78.5842 108.17H78.585L78.644 108.017L78.3792 107.931Z" fill="#6CF0D1"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.9765 108.193L78.644 108.249C78.6703 108.186 78.6928 108.126 78.7153 108.07C78.7416 108.083 78.7636 108.093 78.7899 108.107L78.9765 108.193Z" fill="#000CA5"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.7893 108.107C78.7631 108.094 78.7411 108.083 78.7148 108.07C78.6923 108.126 78.6698 108.186 78.644 108.249L78.9759 108.193L78.7893 108.107Z" fill="#000CA5"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.5817 116.296C72.253 120.4 60.3709 120.4 53.0422 116.296C45.7135 112.193 45.7134 105.539 53.0421 101.436C60.3708 97.332 72.2529 97.332 79.5816 101.436C86.9103 105.539 86.9104 112.193 79.5817 116.296Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.5456 108.548H85.0782V105.363H47.5456V108.548Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M53.0422 113.112C45.7135 109.008 45.7134 102.355 53.0421 98.2514C60.3708 94.1478 72.2529 94.1478 79.5816 98.2515C86.9103 102.355 86.9104 109.009 79.5817 113.112C72.253 117.216 60.3709 117.216 53.0422 113.112Z" fill="#86F7D1"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.9046 111.668C48.6045 108.186 48.6044 102.541 54.9046 99.0588C61.2046 95.5769 71.4191 95.5769 77.7192 99.0588C84.0193 102.541 84.0194 108.186 77.7193 111.668C71.4192 115.15 61.2047 115.15 54.9046 111.668Z" fill="#95FFDA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M78.1519 104.127C78.1579 104.113 78.1629 104.099 78.1681 104.087C78.1741 104.09 78.1793 104.092 78.1852 104.095L78.2281 104.114L78.1519 104.127ZM75.2505 106.696C74.8038 107.096 74.3155 107.472 73.7899 107.824C73.5585 107.978 73.3192 108.128 73.0736 108.273C71.4102 108.218 70.5534 107.978 70.1138 107.733C69.5898 107.442 69.6552 107.144 69.6552 107.144C69.6552 107.104 69.6552 107.064 69.6711 107.024C69.6711 107.024 69.6791 106.989 69.7054 106.933C69.7421 106.857 69.8139 106.742 69.9495 106.627C70.1816 106.43 70.6037 106.233 71.3568 106.23H71.3703C71.5698 106.227 71.7692 106.245 71.9367 106.289C72.7345 106.485 72.216 106.853 72.216 106.853C72.2758 106.849 72.3364 106.843 72.3978 106.835C73.3567 106.717 74.4376 106.217 74.2502 105.378C74.2079 105.188 74.0682 105.017 73.8744 104.867C73.3862 104.485 72.5533 104.232 72.0795 104.111C71.8632 104.055 71.7213 104.027 71.7213 104.027C71.7452 103.959 71.7532 103.907 71.7532 103.866C71.7532 103.858 71.7532 103.851 71.7515 103.844C71.7476 103.779 71.7213 103.754 71.7213 103.754C66.7753 102.389 62.9222 102.684 62.9222 102.684L63.8795 103.121C63.8755 103.121 63.8723 103.12 63.8684 103.12C63.7758 103.117 63.6761 103.117 63.5844 103.117C62.2306 103.139 60.9685 103.329 59.8908 103.643C57.7728 104.26 56.3649 105.357 56.3649 106.609C56.3649 106.668 56.3687 106.724 56.3752 106.779C56.3464 106.754 56.3186 106.728 56.2898 106.703C56.1422 106.572 56.0042 106.441 55.875 106.313C54.8969 105.348 54.4 104.5 54.1861 104.065C59.0388 102.287 64.9445 101.392 65.7701 101.275C66.0015 101.307 66.6285 101.401 67.5188 101.558C68.5295 101.735 69.8785 101.994 71.3719 102.338C73.2681 102.774 75.3956 103.347 77.3542 104.062C77.11 104.553 76.5037 105.573 75.2505 106.696ZM67.8363 103.652C69.1517 103.649 70.3396 103.791 71.2092 104.031C71.1812 104.027 70.7249 103.961 70.2615 103.933C70.0221 104.046 69.8147 104.093 69.7509 104.108C69.7429 104.111 69.7349 104.115 69.7349 104.115C68.3389 103.98 67.8363 103.652 67.8363 103.652ZM78.3792 103.632C73.4834 101.741 67.3313 100.775 66.1507 100.601L65.7677 100.547L65.3928 100.601C64.2081 100.775 58.0481 101.742 53.1515 103.636L52.9074 103.73L52.9672 103.884C53.0685 104.135 53.6549 105.46 55.291 106.93C56.3425 107.872 57.6284 108.699 59.1131 109.388C60.9223 110.224 63.0339 110.845 65.3929 111.232L65.7758 111.294L66.0246 111.25L66.1571 111.229C68.5016 110.843 70.6133 110.223 72.4345 109.384C73.9111 108.703 75.197 107.876 76.2572 106.927C77.903 105.451 78.5212 104.084 78.5842 103.871H78.585L78.644 103.718L78.3792 103.632Z" fill="#6CF0D1"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.9765 103.894L78.644 103.95C78.6703 103.887 78.6928 103.827 78.7153 103.771C78.7416 103.784 78.7636 103.794 78.7899 103.808L78.9765 103.894Z" fill="#000CA5"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.7893 103.808C78.7631 103.795 78.7411 103.784 78.7148 103.771C78.6923 103.827 78.6698 103.887 78.644 103.951L78.9759 103.894L78.7893 103.808Z" fill="#000CA5"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.5817 111.998C72.253 116.101 60.3709 116.101 53.0422 111.998C45.7135 107.894 45.7134 101.241 53.0421 97.1369C60.3708 93.0333 72.2529 93.0333 79.5816 97.137C86.9103 101.241 86.9104 107.894 79.5817 111.998Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.5456 104.249H85.0782V101.065H47.5456V104.249Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M53.0422 108.813C45.7135 104.71 45.7134 98.0563 53.0421 93.9526C60.3708 89.849 72.2529 89.849 79.5816 93.9527C86.9103 98.0564 86.9104 104.71 79.5817 108.813C72.253 112.917 60.3709 112.917 53.0422 108.813Z" fill="#86F7D1"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.9046 107.369C48.6045 103.887 48.6044 98.2419 54.9046 94.7601C61.2046 91.2781 71.4191 91.2781 77.7192 94.7601C84.0193 98.242 84.0194 103.887 77.7193 107.369C71.4192 110.851 61.2047 110.851 54.9046 107.369Z" fill="#95FFDA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M78.1519 99.828C78.1579 99.814 78.1629 99.8006 78.1681 99.788C78.1741 99.7909 78.1793 99.7933 78.1852 99.7962L78.2281 99.8156L78.1519 99.828ZM75.2505 102.397C74.8038 102.797 74.3155 103.174 73.7899 103.525C73.5585 103.68 73.3192 103.829 73.0736 103.974C71.4102 103.92 70.5534 103.679 70.1138 103.434C69.5898 103.143 69.6552 102.845 69.6552 102.845C69.6552 102.805 69.6552 102.765 69.6711 102.725C69.6711 102.725 69.6791 102.69 69.7054 102.634C69.7421 102.558 69.8139 102.443 69.9495 102.328C70.1816 102.131 70.6037 101.934 71.3568 101.932H71.3703C71.5698 101.928 71.7692 101.946 71.9367 101.99C72.7345 102.186 72.216 102.554 72.216 102.554C72.2758 102.55 72.3364 102.544 72.3978 102.536C73.3567 102.419 74.4376 101.918 74.2502 101.08C74.2079 100.889 74.0682 100.719 73.8744 100.568C73.3862 100.187 72.5533 99.9333 72.0795 99.812C71.8632 99.7567 71.7213 99.7287 71.7213 99.7287C71.7452 99.6605 71.7532 99.6078 71.7532 99.5673C71.7532 99.5597 71.7532 99.5524 71.7515 99.5455C71.7476 99.4806 71.7213 99.4555 71.7213 99.4555C66.7753 98.0901 62.9222 98.3851 62.9222 98.3851L63.8795 98.822C63.8755 98.822 63.8723 98.8216 63.8684 98.8216C63.7758 98.8183 63.6761 98.8183 63.5844 98.8183C62.2306 98.8405 60.9685 99.0299 59.8908 99.3442C57.7728 99.9609 56.3649 101.058 56.3649 102.31C56.3649 102.369 56.3687 102.425 56.3752 102.48C56.3464 102.455 56.3186 102.43 56.2898 102.404C56.1422 102.273 56.0042 102.142 55.875 102.015C54.8969 101.049 54.4 100.201 54.1861 99.7658C59.0388 97.9881 64.9445 97.0932 65.7701 96.9759C66.0015 97.0086 66.6285 97.1023 67.5188 97.2588C68.5295 97.4365 69.8785 97.6953 71.3719 98.0391C73.2681 98.4754 75.3956 99.0478 77.3542 99.7635C77.11 100.254 76.5037 101.274 75.2505 102.397ZM67.8363 99.3536C69.1517 99.35 70.3396 99.4919 71.2092 99.7319C71.1812 99.7279 70.7249 99.662 70.2615 99.634C70.0221 99.7469 69.8147 99.7942 69.7509 99.8087C69.7429 99.8125 69.7349 99.8161 69.7349 99.8161C68.3389 99.6813 67.8363 99.3536 67.8363 99.3536ZM78.3792 99.3332C73.4834 97.4423 67.3313 96.4767 66.1507 96.3026L65.7677 96.2484L65.3928 96.3019C64.2081 96.4767 58.0481 97.4434 53.1515 99.3371L52.9074 99.4312L52.9672 99.5855C53.0685 99.8364 53.6549 101.161 55.291 102.631C56.3425 103.573 57.6284 104.4 59.1131 105.089C60.9223 105.926 63.0339 106.546 65.3929 106.933L65.7758 106.995L66.0246 106.951L66.1571 106.93C68.5016 106.545 70.6133 105.924 72.4345 105.085C73.9111 104.404 75.197 103.577 76.2572 102.628C77.903 101.153 78.5212 99.7855 78.5842 99.572H78.585L78.644 99.4196L78.3792 99.3332Z" fill="#6CF0D1"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.9765 99.5955L78.644 99.6514C78.6703 99.5885 78.6928 99.5284 78.7153 99.4725C78.7416 99.4854 78.7636 99.4956 78.7899 99.509L78.9765 99.5955Z" fill="#000CA5"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.7893 99.509C78.7631 99.4961 78.7411 99.4854 78.7148 99.4725C78.6923 99.5284 78.6698 99.5885 78.644 99.6519L78.9759 99.5955L78.7893 99.509Z" fill="#000CA5"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M79.5817 107.699C72.253 111.803 60.3709 111.803 53.0422 107.699C45.7135 103.595 45.7134 96.9418 53.0421 92.8381C60.3708 88.7345 72.2529 88.7345 79.5816 92.8382C86.9103 96.9419 86.9104 103.595 79.5817 107.699Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.5456 99.9501H85.0782V96.7658H47.5456V99.9501Z" fill="#61C9A7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M53.0422 104.515C45.7135 100.411 45.7134 93.7575 53.0421 89.6539C60.3708 85.5502 72.2529 85.5502 79.5816 89.6539C86.9103 93.7576 86.9104 100.411 79.5817 104.515C72.253 108.618 60.3709 108.618 53.0422 104.515Z" fill="#86F7D1"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M54.9046 103.07C48.6045 99.5884 48.6044 93.9431 54.9046 90.4613C61.2046 86.9794 71.4191 86.9794 77.7192 90.4613C84.0193 93.9432 84.0194 99.5885 77.7193 103.07C71.4192 106.552 61.2047 106.552 54.9046 103.07Z" fill="#95FFDA"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M78.1519 95.5293C78.1579 95.5152 78.1629 95.5018 78.1681 95.4892C78.1741 95.4921 78.1793 95.4945 78.1852 95.4974L78.2281 95.5168L78.1519 95.5293ZM75.2505 98.0981C74.8038 98.4983 74.3155 98.8747 73.7899 99.2261C73.5585 99.3809 73.3192 99.5305 73.0736 99.6755C71.4102 99.6208 70.5534 99.3805 70.1138 99.1355C69.5898 98.8442 69.6552 98.5467 69.6552 98.5467C69.6552 98.5067 69.6552 98.4665 69.6711 98.4266C69.6711 98.4266 69.6791 98.3912 69.7054 98.3355C69.7421 98.259 69.8139 98.1444 69.9495 98.0297C70.1816 97.8323 70.6037 97.6353 71.3568 97.6327H71.3703C71.5698 97.6291 71.7692 97.6473 71.9367 97.6911C72.7345 97.8876 72.216 98.2554 72.216 98.2554C72.2758 98.251 72.3364 98.2452 72.3978 98.2376C73.3567 98.1199 74.4376 97.6193 74.2502 96.7808C74.2079 96.5903 74.0682 96.4199 73.8744 96.2691C73.3862 95.8879 72.5533 95.6345 72.0795 95.5132C71.8632 95.4579 71.7213 95.4299 71.7213 95.4299C71.7452 95.3618 71.7532 95.309 71.7532 95.2685C71.7532 95.2609 71.7532 95.2536 71.7515 95.2467C71.7476 95.1818 71.7213 95.1567 71.7213 95.1567C66.7753 93.7913 62.9222 94.0863 62.9222 94.0863L63.8795 94.5232C63.8755 94.5232 63.8723 94.5228 63.8684 94.5228C63.7758 94.5195 63.6761 94.5195 63.5844 94.5195C62.2306 94.5417 60.9685 94.7311 59.8908 95.0454C57.7728 95.6622 56.3649 96.7592 56.3649 98.0115C56.3649 98.07 56.3687 98.1264 56.3752 98.1811C56.3464 98.1561 56.3186 98.1309 56.2898 98.1053C56.1422 97.974 56.0042 97.8435 55.875 97.7158C54.8969 96.7501 54.4 95.9021 54.1861 95.467C59.0388 93.6893 64.9445 92.7944 65.7701 92.6771C66.0015 92.7099 66.6285 92.8035 67.5188 92.9601C68.5295 93.1377 69.8785 93.3965 71.3719 93.7403C73.2681 94.1766 75.3956 94.749 77.3542 95.4648C77.11 95.9556 76.5037 96.9751 75.2505 98.0981ZM67.8363 95.0548C69.1517 95.0512 70.3396 95.1932 71.2092 95.4331C71.1812 95.4292 70.7249 95.3632 70.2615 95.3352C70.0221 95.4481 69.8147 95.4954 69.7509 95.51C69.7429 95.5137 69.7349 95.5173 69.7349 95.5173C68.3389 95.3825 67.8363 95.0548 67.8363 95.0548ZM78.3792 95.0344C73.4834 93.1435 67.3313 92.1779 66.1507 92.0039L65.7677 91.9496L65.3928 92.0031C64.2081 92.1779 58.0481 93.1446 53.1515 95.0383L52.9074 95.1324L52.9672 95.2867C53.0685 95.5376 53.6549 96.8626 55.291 98.3326C56.3425 99.2745 57.6284 100.101 59.1131 100.79C60.9223 101.627 63.0339 102.247 65.3929 102.635L65.7758 102.697L66.0246 102.652L66.1571 102.631C68.5016 102.246 70.6133 101.625 72.4345 100.786C73.9111 100.106 75.197 99.2786 76.2572 98.329C77.903 96.8539 78.5212 95.4867 78.5842 95.2732H78.585L78.644 95.1208L78.3792 95.0344Z" fill="#6CF0D1"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.9765 95.2967L78.644 95.3526C78.6703 95.2898 78.6928 95.2296 78.7153 95.1737C78.7416 95.1866 78.7636 95.1968 78.7899 95.2102L78.9765 95.2967Z" fill="#000CA5"/>
-<path opacity="0.175894" fill-rule="evenodd" clip-rule="evenodd" d="M78.7893 95.2102C78.7631 95.1973 78.7411 95.1866 78.7148 95.1737C78.6923 95.2296 78.6698 95.2898 78.644 95.3532L78.9759 95.2967L78.7893 95.2102Z" fill="#000CA5"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 111.998C343.56 116.101 331.678 116.101 324.349 111.998C317.02 107.894 317.02 101.241 324.349 97.1369C331.677 93.0333 343.56 93.0333 350.888 97.137C358.217 101.241 358.217 107.894 350.888 111.998Z" fill="#7F95EF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M318.852 104.249H356.385V101.065H318.852V104.249Z" fill="#838DB7"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M350.888 108.813C343.56 112.917 331.678 112.917 324.349 108.813C317.02 104.71 317.02 98.0563 324.349 93.9526C331.677 89.849 343.56 89.849 350.888 93.9527C358.217 98.0564 358.217 104.71 350.888 108.813Z" fill="#93A8FF"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M326.211 107.369C319.911 103.887 319.911 98.2419 326.211 94.7601C332.511 91.2781 342.726 91.2781 349.026 94.7601C355.326 98.242 355.326 103.887 349.026 107.369C342.726 110.851 332.511 110.851 326.211 107.369Z" fill="#9ABFFF"/>
-<g opacity="0.370867">
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M342.161 101.56C342.497 101.801 342.355 101.973 342.298 102.137C341.315 104.941 336.078 106.952 331.129 106.428C328.909 106.192 327.621 105.418 327.452 104.219C327.266 102.896 328.324 101.998 330.572 101.576C331.906 101.325 333.285 101.304 334.667 101.346C337.204 101.423 339.711 101.755 342.161 101.56Z" fill="#4562DF"/>
-</g>
-<g opacity="0.653363">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M331.818 100.345C332.063 97.7602 336.216 95.5645 340.869 95.4311C341.632 95.4091 342.397 95.4121 343.152 95.5101C345.409 95.8029 346.637 96.6105 346.723 97.8673C346.805 99.0741 345.734 99.9235 343.592 100.336C342.419 100.562 341.201 100.637 339.972 100.604C337.284 100.53 334.63 100.194 331.818 100.345Z" fill="#4562DF"/>
-</g>
-</g>
-</svg>
diff --git a/packages/website/public/images/landing/aragon.png b/packages/website/public/images/landing/aragon.png
deleted file mode 100644
index 360b03077..000000000
--- a/packages/website/public/images/landing/aragon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/augur.png b/packages/website/public/images/landing/augur.png
deleted file mode 100644
index 60a2ee86b..000000000
--- a/packages/website/public/images/landing/augur.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/currency.png b/packages/website/public/images/landing/currency.png
deleted file mode 100644
index 280995861..000000000
--- a/packages/website/public/images/landing/currency.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/dharma.png b/packages/website/public/images/landing/dharma.png
deleted file mode 100644
index 5aa464c20..000000000
--- a/packages/website/public/images/landing/dharma.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/digital_goods.png b/packages/website/public/images/landing/digital_goods.png
deleted file mode 100644
index bbe848441..000000000
--- a/packages/website/public/images/landing/digital_goods.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/distributed_network.png b/packages/website/public/images/landing/distributed_network.png
deleted file mode 100644
index 8dbb23083..000000000
--- a/packages/website/public/images/landing/distributed_network.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/ethfinex.png b/packages/website/public/images/landing/ethfinex.png
deleted file mode 100644
index 53e7913d6..000000000
--- a/packages/website/public/images/landing/ethfinex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/exchange_everywhere.png b/packages/website/public/images/landing/exchange_everywhere.png
deleted file mode 100644
index e63093929..000000000
--- a/packages/website/public/images/landing/exchange_everywhere.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/fund_management_icon.png b/packages/website/public/images/landing/fund_management_icon.png
deleted file mode 100644
index c45061469..000000000
--- a/packages/website/public/images/landing/fund_management_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/gnosis.png b/packages/website/public/images/landing/gnosis.png
deleted file mode 100644
index b9dd94f52..000000000
--- a/packages/website/public/images/landing/gnosis.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/governance_icon.png b/packages/website/public/images/landing/governance_icon.png
deleted file mode 100644
index d21dc313d..000000000
--- a/packages/website/public/images/landing/governance_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/hero_chip_image.png b/packages/website/public/images/landing/hero_chip_image.png
deleted file mode 100644
index 447489aa7..000000000
--- a/packages/website/public/images/landing/hero_chip_image.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/lendroid.png b/packages/website/public/images/landing/lendroid.png
deleted file mode 100644
index 3b8d0c86c..000000000
--- a/packages/website/public/images/landing/lendroid.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/liquidity.png b/packages/website/public/images/landing/liquidity.png
deleted file mode 100644
index dc005dd13..000000000
--- a/packages/website/public/images/landing/liquidity.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/loans_icon.png b/packages/website/public/images/landing/loans_icon.png
deleted file mode 100644
index b10bd83e9..000000000
--- a/packages/website/public/images/landing/loans_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/maker.png b/packages/website/public/images/landing/maker.png
deleted file mode 100644
index f7a04191e..000000000
--- a/packages/website/public/images/landing/maker.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/melonport.png b/packages/website/public/images/landing/melonport.png
deleted file mode 100644
index bdb95707c..000000000
--- a/packages/website/public/images/landing/melonport.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/open_source.png b/packages/website/public/images/landing/open_source.png
deleted file mode 100644
index 2c280742a..000000000
--- a/packages/website/public/images/landing/open_source.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/paradex.png b/packages/website/public/images/landing/paradex.png
deleted file mode 100644
index f6a1e479f..000000000
--- a/packages/website/public/images/landing/paradex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/prediction_market_icon.png b/packages/website/public/images/landing/prediction_market_icon.png
deleted file mode 100644
index 063595c49..000000000
--- a/packages/website/public/images/landing/prediction_market_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/amadeus.png b/packages/website/public/images/landing/project_logos/amadeus.png
deleted file mode 100644
index e3926b79f..000000000
--- a/packages/website/public/images/landing/project_logos/amadeus.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/anx.png b/packages/website/public/images/landing/project_logos/anx.png
deleted file mode 100644
index fa04ce327..000000000
--- a/packages/website/public/images/landing/project_logos/anx.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/aragon.png b/packages/website/public/images/landing/project_logos/aragon.png
deleted file mode 100644
index b0cf805d3..000000000
--- a/packages/website/public/images/landing/project_logos/aragon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/auctus.png b/packages/website/public/images/landing/project_logos/auctus.png
deleted file mode 100644
index 2bdc9a42c..000000000
--- a/packages/website/public/images/landing/project_logos/auctus.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/augur.png b/packages/website/public/images/landing/project_logos/augur.png
deleted file mode 100644
index 47d4f8465..000000000
--- a/packages/website/public/images/landing/project_logos/augur.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/blocknet.png b/packages/website/public/images/landing/project_logos/blocknet.png
deleted file mode 100644
index 96aa97953..000000000
--- a/packages/website/public/images/landing/project_logos/blocknet.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/chronobank.png b/packages/website/public/images/landing/project_logos/chronobank.png
deleted file mode 100644
index ad5ff0e5b..000000000
--- a/packages/website/public/images/landing/project_logos/chronobank.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/ddex.png b/packages/website/public/images/landing/project_logos/ddex.png
deleted file mode 100644
index a1a8def26..000000000
--- a/packages/website/public/images/landing/project_logos/ddex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/decent_ex.png b/packages/website/public/images/landing/project_logos/decent_ex.png
deleted file mode 100644
index 1fac76947..000000000
--- a/packages/website/public/images/landing/project_logos/decent_ex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/dextroid.png b/packages/website/public/images/landing/project_logos/dextroid.png
deleted file mode 100644
index 5fdcd7f8e..000000000
--- a/packages/website/public/images/landing/project_logos/dextroid.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/dharma.png b/packages/website/public/images/landing/project_logos/dharma.png
deleted file mode 100644
index a74736ca2..000000000
--- a/packages/website/public/images/landing/project_logos/dharma.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/district0x.png b/packages/website/public/images/landing/project_logos/district0x.png
deleted file mode 100644
index 12aa310f0..000000000
--- a/packages/website/public/images/landing/project_logos/district0x.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/dydx.png b/packages/website/public/images/landing/project_logos/dydx.png
deleted file mode 100644
index f2525292c..000000000
--- a/packages/website/public/images/landing/project_logos/dydx.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/ercdex.png b/packages/website/public/images/landing/project_logos/ercdex.png
deleted file mode 100644
index 31d137be7..000000000
--- a/packages/website/public/images/landing/project_logos/ercdex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/ethfinex.png b/packages/website/public/images/landing/project_logos/ethfinex.png
deleted file mode 100644
index 5aa0c556f..000000000
--- a/packages/website/public/images/landing/project_logos/ethfinex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/ethix.png b/packages/website/public/images/landing/project_logos/ethix.png
deleted file mode 100644
index 9b202502c..000000000
--- a/packages/website/public/images/landing/project_logos/ethix.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/idt.png b/packages/website/public/images/landing/project_logos/idt.png
deleted file mode 100644
index 859c289d2..000000000
--- a/packages/website/public/images/landing/project_logos/idt.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/imToken.png b/packages/website/public/images/landing/project_logos/imToken.png
deleted file mode 100644
index ffb3b2fd3..000000000
--- a/packages/website/public/images/landing/project_logos/imToken.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/lendroid.png b/packages/website/public/images/landing/project_logos/lendroid.png
deleted file mode 100644
index a5e1eb51e..000000000
--- a/packages/website/public/images/landing/project_logos/lendroid.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/maker.png b/packages/website/public/images/landing/project_logos/maker.png
deleted file mode 100644
index d3bb927a5..000000000
--- a/packages/website/public/images/landing/project_logos/maker.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/melonport.png b/packages/website/public/images/landing/project_logos/melonport.png
deleted file mode 100644
index 9533faee2..000000000
--- a/packages/website/public/images/landing/project_logos/melonport.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/open_relay.png b/packages/website/public/images/landing/project_logos/open_relay.png
deleted file mode 100644
index fa1853df6..000000000
--- a/packages/website/public/images/landing/project_logos/open_relay.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/paradex.png b/packages/website/public/images/landing/project_logos/paradex.png
deleted file mode 100644
index 7948eb938..000000000
--- a/packages/website/public/images/landing/project_logos/paradex.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/radar_relay.png b/packages/website/public/images/landing/project_logos/radar_relay.png
deleted file mode 100644
index af0e610f8..000000000
--- a/packages/website/public/images/landing/project_logos/radar_relay.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/status.png b/packages/website/public/images/landing/project_logos/status.png
deleted file mode 100644
index 24c7e177a..000000000
--- a/packages/website/public/images/landing/project_logos/status.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/project_logos/the_ocean.png b/packages/website/public/images/landing/project_logos/the_ocean.png
deleted file mode 100644
index 0677abc29..000000000
--- a/packages/website/public/images/landing/project_logos/the_ocean.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/radar_relay.png b/packages/website/public/images/landing/radar_relay.png
deleted file mode 100644
index 297f55cfb..000000000
--- a/packages/website/public/images/landing/radar_relay.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/relayer_diagram.png b/packages/website/public/images/landing/relayer_diagram.png
deleted file mode 100644
index 44c4ef707..000000000
--- a/packages/website/public/images/landing/relayer_diagram.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/stable_tokens_icon.png b/packages/website/public/images/landing/stable_tokens_icon.png
deleted file mode 100644
index 40e372606..000000000
--- a/packages/website/public/images/landing/stable_tokens_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/stocks.png b/packages/website/public/images/landing/stocks.png
deleted file mode 100644
index e244cd0c5..000000000
--- a/packages/website/public/images/landing/stocks.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/landing/tokenized_world.png b/packages/website/public/images/landing/tokenized_world.png
deleted file mode 100644
index b284eaa88..000000000
--- a/packages/website/public/images/landing/tokenized_world.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/launch_kit/0x_cupboard.svg b/packages/website/public/images/launch_kit/0x_cupboard.svg
deleted file mode 100644
index 4c4e6ba1b..000000000
--- a/packages/website/public/images/launch_kit/0x_cupboard.svg
+++ /dev/null
@@ -1,53 +0,0 @@
-<svg width="325" height="356" viewBox="0 0 325 356" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path opacity="0.4" d="M74 108.5L149 85.5" stroke="white" stroke-width="3" stroke-dasharray="7 4"/>
-<path opacity="0.4" d="M32 90L107 67" stroke="white" stroke-width="3" stroke-dasharray="7 4"/>
-<path opacity="0.4" d="M71.5 161.5L122.5 146.5" stroke="white" stroke-width="3" stroke-dasharray="7 4"/>
-<path opacity="0.18" d="M235 352.304L320.3 311.604C321.4 311.104 322 310.004 322 308.804V80.5041C322 79.3041 321.3 78.204 320.2 77.604L160.8 3.30405C160.2 3.00405 159.5 2.90405 158.8 3.10405L58.8996 24.4041C56.5996 24.8041 59.4996 25.6041 61.5996 26.6041L233 107.904C234.3 108.504 235.8 108.604 237.2 108.104L322.1 78.5041" stroke="white" stroke-width="4.1573" stroke-miterlimit="10" stroke-linecap="round"/>
-<path d="M55 98.6042V83.2042V28.4042C55 26.4042 56.8 25.0042 58.7 25.3042C58.9 25.4042 59.2 25.4042 59.5 25.5042L61.3 26.3042L160.1 73.1042L233 107.704L233.3 107.804C234.4 108.304 235.1 109.404 235.1 110.604V233.504V349.904C235.1 352.304 232.6 353.804 230.5 352.604L56.6 255.904C55.6 255.404 55 254.304 55 253.204V168.004V167.504" stroke="white" stroke-width="4" stroke-miterlimit="10"/>
-<path d="M160 95.8042V73.3042" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M123.5 116.704L74 131.704" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M74.5 148L235 233.604" stroke="white" stroke-width="4" stroke-miterlimit="10" stroke-linecap="round" stroke-linejoin="round"/>
-<path d="M55 253.204L73.2 246.904" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M235.999 257.304L212.499 245.804C211.499 245.304 210.399 245.204 209.399 245.504L181.199 254.004C179.399 254.504 178.199 256.204 178.199 258.104V305.004C178.199 306.504 178.999 308.004 180.399 308.704L215.899 328.504C216.999 329.104 218.299 329.204 219.499 328.804L236.099 322.504" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M217.699 328.504V274.104L237.599 267.904" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M178.199 254.904L217.699 274.104" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M191.6 301.405C195.7 306.505 200.8 309.405 204.8 308.705C205.9 308.505 206.9 308.105 207.7 307.405C207 305.905 206.3 304.305 205.5 302.705L204.9 301.405C204.1 302.405 202.9 303.005 201.4 302.905L199.2 299.205L191.6 301.405Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M186.899 278.805C185.899 280.205 185.399 282.005 185.199 284.205C184.999 287.205 185.699 290.705 187.199 294.205C187.899 295.905 188.799 297.505 189.799 299.005C190.799 298.805 191.799 298.505 192.799 298.205L193.599 297.905C192.299 296.205 191.199 294.205 190.599 292.205L192.699 290.905L186.899 278.805Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M204.299 283.404C200.199 278.304 195.099 275.404 191.099 276.104C189.999 276.304 188.999 276.704 188.199 277.404C188.899 278.904 189.599 280.504 190.399 282.104L190.999 283.404C191.799 282.404 192.999 281.804 194.499 281.904L196.499 285.404L204.299 283.404Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M208.999 306.104C211.299 302.704 211.199 296.804 208.699 290.804C207.999 289.104 207.099 287.504 206.099 286.004C205.099 286.204 204.099 286.504 203.099 286.804L202.299 287.104C203.599 288.804 204.699 290.804 205.299 292.804V292.904L203.199 294.204L208.999 306.104Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M197.5 249.004V237.604C197.5 236.004 196.6 234.504 195.1 233.804L159.8 216.504C158.8 216.004 157.7 215.904 156.7 216.204L128.5 224.704C126.7 225.204 125.5 226.904 125.5 228.804V275.704C125.5 277.204 126.3 278.704 127.7 279.404L163.2 299.204C164.3 299.804 165.6 299.904 166.8 299.504L178.2 295.204" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M165 299.204V244.804L196.5 235.004" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M125.5 225.604L165 244.804" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M138.9 272.204C143 277.304 148.1 280.204 152.1 279.504C153.2 279.304 154.2 278.904 155 278.204C154.3 276.704 153.6 275.104 152.8 273.504L152.2 272.204C151.4 273.204 150.2 273.804 148.7 273.704L146.5 270.004L138.9 272.204Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M134.2 249.504C133.2 250.904 132.7 252.704 132.5 254.904C132.3 257.904 133 261.404 134.5 264.904C135.2 266.604 136.1 268.204 137.1 269.704C138.1 269.504 139.1 269.204 140.1 268.904L140.9 268.604C139.6 266.904 138.5 264.904 137.9 262.904L140 261.604L134.2 249.504Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M151.6 254.104C147.5 249.004 142.4 246.104 138.4 246.804C137.3 247.004 136.3 247.404 135.5 248.104C136.2 249.604 136.9 251.204 137.7 252.804L138.3 254.104C139.1 253.104 140.3 252.504 141.8 252.604L143.8 256.104L151.6 254.104Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M156.3 276.804C158.6 273.404 158.5 267.504 156 261.504C155.3 259.804 154.4 258.204 153.4 256.704C152.4 256.904 151.4 257.204 150.4 257.504L149.6 257.804C150.9 259.504 152 261.504 152.6 263.504V263.604L150.5 264.904L156.3 276.804Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M146 220.504V208.304C146 206.704 145.1 205.204 143.6 204.504L108.3 187.204C107.3 186.704 106.2 186.604 105.2 186.904L77 195.404C75.2 195.904 74 197.604 74 199.504V246.404C74 247.904 74.8 249.404 76.2 250.104L111.7 269.904C112.8 270.504 114.1 270.604 115.3 270.204L125.8 266.204" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M113.5 270.004V215.504L145 205.704" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M74 196.404L113.5 215.504" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M87.3008 242.904C91.4008 248.004 96.5008 250.904 100.501 250.204C101.601 250.004 102.601 249.604 103.401 248.904C102.701 247.404 102.001 245.804 101.201 244.204L100.601 242.904C99.8008 243.904 98.6008 244.504 97.1008 244.404L94.9008 240.704L87.3008 242.904Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M82.7003 220.204C81.7003 221.604 81.2003 223.404 81.0003 225.604C80.8003 228.604 81.5003 232.104 83.0003 235.604C83.7003 237.304 84.6003 238.904 85.6003 240.404C86.6003 240.204 87.6003 239.904 88.6003 239.604L89.4003 239.304C88.1003 237.604 87.0003 235.604 86.4003 233.604L88.5003 232.304L82.7003 220.204Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M100.1 224.904C96 219.804 90.9 216.904 86.9 217.604C85.8 217.804 84.8 218.204 84 218.904C84.7 220.404 85.4 222.004 86.2 223.604L86.8 224.904C87.6 223.904 88.8 223.304 90.3 223.404L92.3 226.904L100.1 224.904Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M104.8 247.504C107.1 244.104 107 238.204 104.5 232.204C103.8 230.504 102.9 228.904 101.9 227.404C100.9 227.604 99.8996 227.904 98.8996 228.204L98.0996 228.504C99.3996 230.204 100.5 232.204 101.1 234.204V234.304L98.9996 235.604L104.8 247.504Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M234.999 133.504L211.499 122.004C210.499 121.504 209.399 121.404 208.399 121.704L180.199 130.204C178.399 130.704 177.199 132.404 177.199 134.304V181.204C177.199 182.704 177.999 184.204 179.399 184.904L214.899 204.704C215.999 205.304 217.299 205.404 218.499 205.004L235.099 198.704" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M216.699 204.804V150.304L234.999 144.604" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M177.199 131.204L216.699 150.304" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M190.6 177.704C194.7 182.804 199.8 185.704 203.8 185.004C204.9 184.804 205.9 184.404 206.7 183.704C206 182.204 205.3 180.604 204.5 179.004L203.9 177.704C203.1 178.704 201.9 179.304 200.4 179.204L198.2 175.504L190.6 177.704Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M185.899 155.004C184.899 156.404 184.399 158.204 184.199 160.404C183.999 163.404 184.699 166.904 186.199 170.404C186.899 172.104 187.799 173.704 188.799 175.204C189.799 175.004 190.799 174.704 191.799 174.404L192.599 174.104C191.299 172.404 190.199 170.404 189.599 168.404L191.699 167.104L185.899 155.004Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M203.299 159.704C199.199 154.604 194.099 151.704 190.099 152.404C188.999 152.604 187.999 153.004 187.199 153.704C187.899 155.204 188.599 156.804 189.399 158.404L189.999 159.704C190.799 158.704 191.999 158.104 193.499 158.204L195.499 161.704L203.299 159.704Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M207.999 182.304C210.299 178.904 210.199 173.004 207.699 167.004C206.999 165.304 206.099 163.704 205.099 162.204C204.099 162.404 203.099 162.704 202.099 163.004L201.299 163.304C202.599 165.004 203.699 167.004 204.299 169.004V169.104L202.199 170.404L207.999 182.304Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M195.5 125.704V115.904C195.5 114.304 194.6 112.804 193.1 112.104L157.8 94.8042C156.8 94.3042 155.7 94.2042 154.7 94.5042L126.5 103.004C124.7 103.504 123.5 105.204 123.5 107.104V154.004C123.5 155.504 124.3 157.004 125.7 157.704L161.2 177.504C162.3 178.104 163.6 178.204 164.8 177.804L177.2 173.104" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M163 177.504V123.104L194.5 113.204" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M123.5 103.904L163 123.104" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M136.9 150.405C141 155.505 146.1 158.405 150.1 157.705C151.2 157.505 152.2 157.105 153 156.405C152.3 154.905 151.6 153.305 150.8 151.705L150.2 150.405C149.4 151.405 148.2 152.005 146.7 151.905L144.5 148.205L136.9 150.405Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M132.2 127.705C131.2 129.105 130.7 130.905 130.5 133.105C130.3 136.105 131 139.605 132.5 143.105C133.2 144.805 134.1 146.405 135.1 147.905C136.1 147.705 137.1 147.405 138.1 147.105L138.9 146.805C137.6 145.105 136.5 143.105 135.9 141.105L138 139.805L132.2 127.705Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M149.6 132.404C145.5 127.304 140.4 124.404 136.4 125.104C135.3 125.304 134.3 125.704 133.5 126.404C134.2 127.904 134.9 129.504 135.7 131.104L136.3 132.404C137.1 131.404 138.3 130.804 139.8 130.904L141.8 134.404L149.6 132.404Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M154.3 155.004C156.6 151.604 156.5 145.704 154 139.704C153.3 138.004 152.4 136.404 151.4 134.904C150.4 135.104 149.4 135.404 148.4 135.704L147.6 136.004C148.9 137.704 150 139.704 150.6 141.704V141.804L148.5 143.104L154.3 155.004Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M43.3 172.504L71.2 161.904C72.9 161.304 74 159.704 74 157.904V110.504C74 108.904 73.1 107.404 71.6 106.704L36.3 89.4043C35.3 88.9043 34.2 88.8043 33.2 89.1043L5 97.7043C3.2 98.2043 2 99.9043 2 101.804V148.704C2 150.204 2.8 151.704 4.2 152.404L39.7 172.204C40.8 172.804 42.1 172.904 43.3 172.504Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M41.5 172.204V117.804L73 107.904" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M2 98.6045L41.5 117.804" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M15.3008 145.104C19.4008 150.204 24.5008 153.104 28.5008 152.404C29.6008 152.204 30.6008 151.804 31.4008 151.104C30.7008 149.604 30.0008 148.004 29.2008 146.404L28.6008 145.104C27.8008 146.104 26.6008 146.704 25.1008 146.604L22.9008 142.904L15.3008 145.104Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M10.7003 122.404C9.70027 123.804 9.20027 125.604 9.00027 127.804C8.80027 130.804 9.50027 134.304 11.0003 137.804C11.7003 139.504 12.6003 141.104 13.6003 142.604C14.6003 142.404 15.6003 142.104 16.6003 141.804L17.4003 141.504C16.1003 139.804 15.0003 137.804 14.4003 135.804L16.5003 134.504L10.7003 122.404Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M28.1 127.104C24 122.004 18.9 119.104 14.9 119.804C13.8 120.004 12.8 120.404 12 121.104C12.7 122.604 13.4 124.204 14.2 125.804L14.8 127.104C15.6 126.104 16.8 125.504 18.3 125.604L20.3 129.104L28.1 127.104Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-<path d="M32.7996 149.704C35.0996 146.304 34.9996 140.404 32.4996 134.404C31.7996 132.704 30.8996 131.104 29.8996 129.604C28.8996 129.804 27.8996 130.104 26.8996 130.404L26.0996 130.704C27.3996 132.404 28.4996 134.404 29.0996 136.404V136.504L26.9996 137.804L32.7996 149.704Z" stroke="white" stroke-width="1.5" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/public/images/launch_kit/enable_trading.svg b/packages/website/public/images/launch_kit/enable_trading.svg
deleted file mode 100644
index 9fcb78c05..000000000
--- a/packages/website/public/images/launch_kit/enable_trading.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="62" height="67" viewBox="0 0 62 67" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle r="29" transform="matrix(1 0 0 -1 30.5 30.5)" stroke="white" stroke-width="3"/>
-<circle cx="25.5" cy="16.5" r="12" stroke="white" stroke-width="3"/>
-<circle cx="9" cy="25" r="4.5" stroke="white" stroke-width="3"/>
-<circle cx="50" cy="31" r="7.5" stroke="white" stroke-width="3"/>
-<circle cx="19.5" cy="41.5" r="11" stroke="white" stroke-width="3"/>
-<rect x="40.5" y="12.5" width="9" height="10" stroke="white" stroke-width="3"/>
-<path d="M33.9032 56.2038L32.5823 33.8826L52.5734 43.8992L33.9032 56.2038Z" stroke="white" stroke-width="2.5"/>
-</svg>
diff --git a/packages/website/public/images/launch_kit/fork.svg b/packages/website/public/images/launch_kit/fork.svg
deleted file mode 100644
index 83d2f6d65..000000000
--- a/packages/website/public/images/launch_kit/fork.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="61" height="61" viewBox="0 0 61 61" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle r="29" transform="matrix(1 0 0 -1 30.5 30.5)" stroke="white" stroke-width="3"/>
-<path d="M31 58.5V46.5M31 1.5V24M31 46.5L42 38V3.5M31 46.5V24M31 24L19.5 16.5V3.5" stroke="white" stroke-width="3"/>
-</svg>
diff --git a/packages/website/public/images/launch_kit/in_game_marketplace.svg b/packages/website/public/images/launch_kit/in_game_marketplace.svg
deleted file mode 100644
index 77422a667..000000000
--- a/packages/website/public/images/launch_kit/in_game_marketplace.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="62" height="62" viewBox="0 0 62 62" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M31 60C47.0163 60 60 47.0163 60 31C60 14.9837 47.0163 2 31 2C14.9837 2 2 14.9837 2 31C2 47.0163 14.9837 60 31 60Z" stroke="white" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M48.3159 26.5213L31.1692 49.7925L14 26.5213L16.854 19.5693H31.1692H45.4618L48.3159 26.5213Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M31.0004 49.7925L24.0742 19.5693" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M31 49.7925L37.9261 19.5693" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M14 26.8101H48.001" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M18 20.5L8.5 12" stroke="white" stroke-width="3"/>
-<path d="M15.5 27L2.5 27" stroke="white" stroke-width="3"/>
-<path d="M44 20.5L53.5 12" stroke="white" stroke-width="3"/>
-<path d="M46.5 27L59.5 27" stroke="white" stroke-width="3"/>
-<path d="M40.9995 35.3153L55.5 46.5" stroke="white" stroke-width="3"/>
-<path d="M21.5005 35.3153L7 46.5" stroke="white" stroke-width="3"/>
-<path d="M26.8774 20.8714L22.5 4.5" stroke="white" stroke-width="3"/>
-<path d="M34.271 20.3714L38.6484 4" stroke="white" stroke-width="3"/>
-</svg>
diff --git a/packages/website/public/images/launch_kit/local_market.svg b/packages/website/public/images/launch_kit/local_market.svg
deleted file mode 100644
index cf5af8bcb..000000000
--- a/packages/website/public/images/launch_kit/local_market.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="61" height="61" viewBox="0 0 61 61" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g style="mix-blend-mode:screen">
-<line x1="1" y1="32.5" x2="60" y2="32.5" stroke="white" stroke-width="3"/>
-<circle r="29" transform="matrix(1 0 0 -1 30.5 30.5)" stroke="white" stroke-width="3"/>
-<mask id="path-3-inside-1" fill="white">
-<path d="M13 19.2842C13 9.73842 20.8063 2 30.4359 2H30.5641C40.1937 2 48 9.73842 48 19.2842C48 24.3185 46.0144 27.2967 44.7837 29.2892C39.8746 36.5685 33.9497 40.9315 30.5641 51H30.4359C27.0503 40.9315 21.1254 36.5685 16.2163 29.2892C14.9856 27.2967 13 24.3185 13 19.2842Z"/>
-</mask>
-<path d="M13 19.2842C13 9.73842 20.8063 2 30.4359 2H30.5641C40.1937 2 48 9.73842 48 19.2842C48 24.3185 46.0144 27.2967 44.7837 29.2892C39.8746 36.5685 33.9497 40.9315 30.5641 51H30.4359C27.0503 40.9315 21.1254 36.5685 16.2163 29.2892C14.9856 27.2967 13 24.3185 13 19.2842Z" fill="black"/>
-<path d="M13 19.2842L16 19.2843V19.2842H13ZM30.4359 51L27.5923 51.9562L28.2796 54H30.4359V51ZM16.2163 29.2892L13.664 30.8657L13.6955 30.9168L13.7291 30.9666L16.2163 29.2892ZM48 19.2842H45V19.2843L48 19.2842ZM30.5641 51V54H32.7204L33.4077 51.9562L30.5641 51ZM44.7837 29.2892L47.2709 30.9666L47.3045 30.9168L47.336 30.8657L44.7837 29.2892ZM30.4359 -1C19.1742 -1 10 8.05692 10 19.2842H16C16 11.4199 22.4384 5 30.4359 5V-1ZM33.2794 50.0438C31.4467 44.5934 28.9179 40.69 26.2714 37.2645C23.5142 33.6957 21.1115 31.1823 18.7036 27.6118L13.7291 30.9666C16.2303 34.6754 19.2445 37.9831 21.5234 40.9328C23.913 44.0258 26.0395 47.3381 27.5923 51.9562L33.2794 50.0438ZM18.7687 27.7127C17.5609 25.7573 16 23.408 16 19.2843L10 19.2842C9.99996 25.229 12.4103 28.8361 13.664 30.8657L18.7687 27.7127ZM30.5641 5C38.5616 5 45 11.4199 45 19.2842H51C51 8.05692 41.8258 -1 30.5641 -1V5ZM33.4077 51.9562C34.9605 47.3381 37.087 44.0258 39.4766 40.9328C41.7555 37.9831 44.7697 34.6754 47.2709 30.9666L42.2964 27.6118C39.8885 31.1823 37.4858 33.6957 34.7286 37.2645C32.0821 40.69 29.5533 44.5934 27.7206 50.0438L33.4077 51.9562ZM47.336 30.8657C48.5897 28.8361 51 25.229 51 19.2842L45 19.2843C45 23.408 43.4391 25.7573 42.2313 27.7127L47.336 30.8657ZM30.4359 5H30.5641V-1H30.4359V5ZM30.5641 48H30.4359V54H30.5641V48Z" fill="white" mask="url(#path-3-inside-1)"/>
-<path d="M36.5 17.9247C36.5 21.1271 33.8424 23.7747 30.5 23.7747C27.1576 23.7747 24.5 21.1271 24.5 17.9247C24.5 14.7223 27.1576 12.0747 30.5 12.0747C33.8424 12.0747 36.5 14.7223 36.5 17.9247Z" stroke="white" stroke-width="3"/>
-</g>
-</svg>
diff --git a/packages/website/public/images/launch_kit/secondary_market.svg b/packages/website/public/images/launch_kit/secondary_market.svg
deleted file mode 100644
index f57152516..000000000
--- a/packages/website/public/images/launch_kit/secondary_market.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="62" height="62" viewBox="0 0 62 62" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M60 31C60 14.9837 47.0163 2 31 2C14.9837 2 2 14.9837 2 31C2 47.0163 14.9837 60 31 60C47.0163 60 60 47.0163 60 31Z" fill="#1B1B1B" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M34.9134 41.2225C34.9134 33.4233 28.5909 27.1008 20.7917 27.1008C12.9924 27.1008 6.66992 33.4233 6.66992 41.2225C6.66992 49.0217 12.9924 55.3442 20.7917 55.3442C28.5909 55.3442 34.9134 49.0217 34.9134 41.2225Z" fill="#1B1B1B" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M45.1361 30.9998C45.1361 23.2006 38.8135 16.8781 31.0143 16.8781C23.2151 16.8781 16.8926 23.2006 16.8926 30.9998C16.8926 38.7991 23.2151 45.1216 31.0143 45.1216C38.8135 45.1216 45.1361 38.7991 45.1361 30.9998Z" fill="#1B1B1B" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M55.3587 20.7772C55.3587 12.978 49.0362 6.65544 41.237 6.65544C33.4378 6.65544 27.1152 12.978 27.1152 20.7772C27.1152 28.5764 33.4378 34.8989 41.237 34.8989C49.0362 34.8989 55.3587 28.5764 55.3587 20.7772Z" fill="#1B1B1B" stroke="white" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-</svg>
diff --git a/packages/website/public/images/launch_kit/shared_liquidity.svg b/packages/website/public/images/launch_kit/shared_liquidity.svg
deleted file mode 100644
index abab3444c..000000000
--- a/packages/website/public/images/launch_kit/shared_liquidity.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-<svg width="70" height="70" viewBox="0 0 70 70" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M57.4993 18.3314C60.2035 21.9755 62.0433 26.2995 62.7157 31M51.6681 12.5002C48.2838 9.98885 44.3133 8.22296 39.9993 7.44531M29.9993 7.44531C25.6853 8.22296 21.7147 9.98885 18.3305 12.5002M62.7157 39.0004C62.0343 43.7638 60.154 48.1404 57.3903 51.8148M51.8193 57.3872C48.4023 59.9585 44.3777 61.7658 39.9993 62.555M29.9993 62.555C25.6209 61.7658 21.5963 59.9585 18.1793 57.3872M12.6083 51.8148C9.84454 48.1404 7.96424 43.7638 7.28286 39.0004M7.25195 31.2224C7.83085 26.9301 9.38234 22.9462 11.6773 19.5" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M35 12C37.7614 12 40 9.76142 40 7C40 4.23858 37.7614 2 35 2C32.2386 2 30 4.23858 30 7C30 9.76142 32.2386 12 35 12Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M15 21C17.7614 21 20 18.7614 20 16C20 13.2386 17.7614 11 15 11C12.2386 11 10 13.2386 10 16C10 18.7614 12.2386 21 15 21Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M54 21C56.7614 21 59 18.7614 59 16C59 13.2386 56.7614 11 54 11C51.2386 11 49 13.2386 49 16C49 18.7614 51.2386 21 54 21Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M63 40C65.7614 40 68 37.7614 68 35C68 32.2386 65.7614 30 63 30C60.2386 30 58 32.2386 58 35C58 37.7614 60.2386 40 63 40Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M55 60C57.7614 60 60 57.7614 60 55C60 52.2386 57.7614 50 55 50C52.2386 50 50 52.2386 50 55C50 57.7614 52.2386 60 55 60Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M35 68C37.7614 68 40 65.7614 40 63C40 60.2386 37.7614 58 35 58C32.2386 58 30 60.2386 30 63C30 65.7614 32.2386 68 35 68Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M15 60C17.7614 60 20 57.7614 20 55C20 52.2386 17.7614 50 15 50C12.2386 50 10 52.2386 10 55C10 57.7614 12.2386 60 15 60Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M7 40C9.76142 40 12 37.7614 12 35C12 32.2386 9.76142 30 7 30C4.23858 30 2 32.2386 2 35C2 37.7614 4.23858 40 7 40Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M32.163 37.837C30.6123 36.2863 30.6123 33.7489 32.163 32.163C33.7137 30.6123 36.2511 30.6123 37.837 32.163C39.3877 33.7137 39.3877 36.2511 37.837 37.837C36.2511 39.3877 33.7137 39.3877 32.163 37.837Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M19.8722 37.1278C18.7093 35.9648 18.7093 34.0617 19.8722 32.8722C21.0352 31.7093 22.9383 31.7093 24.1278 32.8722C25.2907 34.0352 25.2907 35.9383 24.1278 37.1278C22.9383 38.2907 21.0352 38.2907 19.8722 37.1278Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.8722 37.1278C44.7093 35.9648 44.7093 34.0617 45.8722 32.8722C47.0352 31.7093 48.9383 31.7093 50.1278 32.8722C51.2907 34.0352 51.2907 35.9383 50.1278 37.1278C48.9383 38.2907 47.0352 38.2907 45.8722 37.1278Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M23 26C23 24.3274 24.354 23 26 23C27.6726 23 29 24.354 29 26C29 27.6726 27.646 29 26 29C24.3274 29 23 27.6726 23 26Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M41 44C41 42.3274 42.354 41 44 41C45.6726 41 47 42.354 47 44C47 45.6726 45.646 47 44 47C42.354 47 41 45.646 41 44Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M44.0002 23C45.6727 23 47 24.354 47 26C47 27.6726 45.6461 29 44.0002 29C42.3277 29 41.0004 27.646 41.0004 26C40.9738 24.3274 42.3277 23 44.0002 23Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M26 41C27.6726 41 29 42.354 29 44C29 45.6726 27.646 47 26 47C24.3274 47 23 45.646 23 44C23 42.354 24.3274 41 26 41Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M32.8891 18.8722C34.0483 17.7093 35.9451 17.7093 37.1306 18.8722C38.2898 20.0352 38.2898 21.9383 37.1306 23.1278C35.9715 24.2907 34.0746 24.2907 32.8891 23.1278C31.7036 21.9383 31.7036 20.0352 32.8891 18.8722Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M32.8891 45.8722C34.0483 44.7093 35.9451 44.7093 37.1306 45.8722C38.2898 47.0352 38.2898 48.9383 37.1306 50.1278C35.9715 51.2907 34.0746 51.2907 32.8891 50.1278C31.7036 48.9383 31.7036 47.0352 32.8891 45.8722Z" stroke="white" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/public/images/ledger_icon.png b/packages/website/public/images/ledger_icon.png
deleted file mode 100644
index 29b8df08f..000000000
--- a/packages/website/public/images/ledger_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/lock_icon.svg b/packages/website/public/images/lock_icon.svg
deleted file mode 100644
index 83e8191a1..000000000
--- a/packages/website/public/images/lock_icon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="26" height="32" viewBox="0 0 26 32" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6.47619 0C3.79509 0 1.60489 2.21216 1.60489 4.92014V6.33135C0.717479 6.33135 -3.60127e-08 7.05602 -3.60127e-08 7.95232V14.379C-3.60127e-08 15.2753 0.717479 16 1.60489 16H11.3475C12.2349 16 12.9524 15.2753 12.9524 14.379V7.95232C12.9524 7.05602 12.2349 6.33135 11.3475 6.33135V4.92014C11.3475 2.21216 9.1573 0 6.47619 0ZM9.6482 6.33135H3.30418V4.92014C3.30418 3.16567 4.72026 1.71633 6.47619 1.71633C8.23213 1.71633 9.6482 3.16567 9.6482 4.92014V6.33135Z" transform="scale(2)" fill="black"/>
-</svg>
diff --git a/packages/website/public/images/logos/FBG.png b/packages/website/public/images/logos/FBG.png
deleted file mode 100644
index 0a91bcabc..000000000
--- a/packages/website/public/images/logos/FBG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/aragon.png b/packages/website/public/images/logos/aragon.png
deleted file mode 100644
index db4d81905..000000000
--- a/packages/website/public/images/logos/aragon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/augur.png b/packages/website/public/images/logos/augur.png
deleted file mode 100644
index 709da2f1a..000000000
--- a/packages/website/public/images/logos/augur.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/blockchain_capital.png b/packages/website/public/images/logos/blockchain_capital.png
deleted file mode 100644
index 42fdcbfa1..000000000
--- a/packages/website/public/images/logos/blockchain_capital.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/chronobank.png b/packages/website/public/images/logos/chronobank.png
deleted file mode 100644
index f94aa3fee..000000000
--- a/packages/website/public/images/logos/chronobank.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/dharma.png b/packages/website/public/images/logos/dharma.png
deleted file mode 100644
index 65d902a1e..000000000
--- a/packages/website/public/images/logos/dharma.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/district0x.png b/packages/website/public/images/logos/district0x.png
deleted file mode 100644
index e2b4c7e4a..000000000
--- a/packages/website/public/images/logos/district0x.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/jen_advisors.png b/packages/website/public/images/logos/jen_advisors.png
deleted file mode 100644
index de0395d3d..000000000
--- a/packages/website/public/images/logos/jen_advisors.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/maker.png b/packages/website/public/images/logos/maker.png
deleted file mode 100644
index 48c08d15d..000000000
--- a/packages/website/public/images/logos/maker.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/melonport.png b/packages/website/public/images/logos/melonport.png
deleted file mode 100644
index b973e081f..000000000
--- a/packages/website/public/images/logos/melonport.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/openANX.png b/packages/website/public/images/logos/openANX.png
deleted file mode 100644
index e0167257f..000000000
--- a/packages/website/public/images/logos/openANX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/pantera_capital.png b/packages/website/public/images/logos/pantera_capital.png
deleted file mode 100644
index 9cffdf39f..000000000
--- a/packages/website/public/images/logos/pantera_capital.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/logos/polychain_capital.png b/packages/website/public/images/logos/polychain_capital.png
deleted file mode 100644
index 2b7782134..000000000
--- a/packages/website/public/images/logos/polychain_capital.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/metamask_icon.png b/packages/website/public/images/metamask_icon.png
deleted file mode 100644
index ab497ecb7..000000000
--- a/packages/website/public/images/metamask_icon.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/metamask_or_parity.png b/packages/website/public/images/metamask_or_parity.png
deleted file mode 100644
index fda646558..000000000
--- a/packages/website/public/images/metamask_or_parity.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/network_icons/kovan.png b/packages/website/public/images/network_icons/kovan.png
deleted file mode 100644
index f47a12e74..000000000
--- a/packages/website/public/images/network_icons/kovan.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/network_icons/mainnet.png b/packages/website/public/images/network_icons/mainnet.png
deleted file mode 100644
index 6693635d6..000000000
--- a/packages/website/public/images/network_icons/mainnet.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/network_icons/rinkeby.png b/packages/website/public/images/network_icons/rinkeby.png
deleted file mode 100644
index f9ba18778..000000000
--- a/packages/website/public/images/network_icons/rinkeby.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/network_icons/ropsten.png b/packages/website/public/images/network_icons/ropsten.png
deleted file mode 100644
index 894910b34..000000000
--- a/packages/website/public/images/network_icons/ropsten.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/og_image.png b/packages/website/public/images/og_image.png
deleted file mode 100644
index b9bafeb7e..000000000
--- a/packages/website/public/images/og_image.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/press/logo-forbes.png b/packages/website/public/images/press/logo-forbes.png
deleted file mode 100644
index 6849c672b..000000000
--- a/packages/website/public/images/press/logo-forbes.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/press/logo-fortune.png b/packages/website/public/images/press/logo-fortune.png
deleted file mode 100644
index 981f8c357..000000000
--- a/packages/website/public/images/press/logo-fortune.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/press/logo-techcrunch.png b/packages/website/public/images/press/logo-techcrunch.png
deleted file mode 100644
index 7f260d0ea..000000000
--- a/packages/website/public/images/press/logo-techcrunch.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/press/logo-venturebeat.png b/packages/website/public/images/press/logo-venturebeat.png
deleted file mode 100644
index 2086bf0b7..000000000
--- a/packages/website/public/images/press/logo-venturebeat.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/protocol_logo_black.png b/packages/website/public/images/protocol_logo_black.png
deleted file mode 100644
index 36a905d5a..000000000
--- a/packages/website/public/images/protocol_logo_black.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/protocol_logo_white.png b/packages/website/public/images/protocol_logo_white.png
deleted file mode 100644
index a405ad6d5..000000000
--- a/packages/website/public/images/protocol_logo_white.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo.png b/packages/website/public/images/relayer-logos/logo.png
deleted file mode 100755
index d810cef4a..000000000
--- a/packages/website/public/images/relayer-logos/logo.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_1.png b/packages/website/public/images/relayer-logos/logo_1.png
deleted file mode 100755
index 0068a7445..000000000
--- a/packages/website/public/images/relayer-logos/logo_1.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_2.1.png b/packages/website/public/images/relayer-logos/logo_2.1.png
deleted file mode 100755
index f6cd92b0e..000000000
--- a/packages/website/public/images/relayer-logos/logo_2.1.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_2.2.png b/packages/website/public/images/relayer-logos/logo_2.2.png
deleted file mode 100755
index 9461e91ee..000000000
--- a/packages/website/public/images/relayer-logos/logo_2.2.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_2.3.png b/packages/website/public/images/relayer-logos/logo_2.3.png
deleted file mode 100755
index fde896972..000000000
--- a/packages/website/public/images/relayer-logos/logo_2.3.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_2.png b/packages/website/public/images/relayer-logos/logo_2.png
deleted file mode 100755
index e3015110c..000000000
--- a/packages/website/public/images/relayer-logos/logo_2.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_3.png b/packages/website/public/images/relayer-logos/logo_3.png
deleted file mode 100755
index b3d397fe1..000000000
--- a/packages/website/public/images/relayer-logos/logo_3.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_4.png b/packages/website/public/images/relayer-logos/logo_4.png
deleted file mode 100755
index 578be0af8..000000000
--- a/packages/website/public/images/relayer-logos/logo_4.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer-logos/logo_5.png b/packages/website/public/images/relayer-logos/logo_5.png
deleted file mode 100755
index baf3c4080..000000000
--- a/packages/website/public/images/relayer-logos/logo_5.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/relayer_fallback.png b/packages/website/public/images/relayer_fallback.png
deleted file mode 100644
index 587fc9ef7..000000000
--- a/packages/website/public/images/relayer_fallback.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/setup_account_icon.svg b/packages/website/public/images/setup_account_icon.svg
deleted file mode 100644
index eaa5b2fd6..000000000
--- a/packages/website/public/images/setup_account_icon.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="36" height="36" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M16.5 9C16.5 13.1421 13.1421 16.5 9 16.5C4.85791 16.5 1.5 13.1421 1.5 9C1.5 4.85791 4.85791 1.5 9 1.5C13.1421 1.5 16.5 4.85791 16.5 9ZM18 9C18 13.9706 13.9707 18 9 18C4.0293 18 0 13.9706 0 9C0 4.02942 4.0293 0 9 0C13.9707 0 18 4.02942 18 9ZM9.21973 5.7196C9.5127 5.42664 9.9873 5.42664 10.2803 5.7196L13.0806 8.51953C13.373 8.8125 13.373 9.28735 13.0806 9.5802L10.2803 12.3802C9.9873 12.6731 9.5127 12.6731 9.21973 12.3802C8.92676 12.0873 8.92676 11.6124 9.21973 11.3196L10.7393 9.7998H4.75C4.33594 9.7998 4 9.46399 4 9.0498C4 8.63562 4.33594 8.2998 4.75 8.2998H10.7393L9.21973 6.78015C8.92676 6.4873 8.92676 6.01245 9.21973 5.7196Z" transform="scale(2)" fill="#3289F1"/>
-</svg>
diff --git a/packages/website/public/images/social/discord.png b/packages/website/public/images/social/discord.png
deleted file mode 100644
index 1bdb07394..000000000
--- a/packages/website/public/images/social/discord.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/discourse.png b/packages/website/public/images/social/discourse.png
deleted file mode 100644
index 4bca3de0d..000000000
--- a/packages/website/public/images/social/discourse.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/github.png b/packages/website/public/images/social/github.png
deleted file mode 100644
index 2c2a3e918..000000000
--- a/packages/website/public/images/social/github.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/medium.png b/packages/website/public/images/social/medium.png
deleted file mode 100644
index 11e8f2c44..000000000
--- a/packages/website/public/images/social/medium.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/reddit.png b/packages/website/public/images/social/reddit.png
deleted file mode 100644
index 3fbe6229a..000000000
--- a/packages/website/public/images/social/reddit.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/slack.png b/packages/website/public/images/social/slack.png
deleted file mode 100644
index c4b2d7b81..000000000
--- a/packages/website/public/images/social/slack.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/social/twitter.png b/packages/website/public/images/social/twitter.png
deleted file mode 100644
index fe0d691a9..000000000
--- a/packages/website/public/images/social/twitter.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/advisors/davids.jpg b/packages/website/public/images/team/advisors/davids.jpg
deleted file mode 100755
index 904ebda01..000000000
--- a/packages/website/public/images/team/advisors/davids.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/advisors/frede.jpg b/packages/website/public/images/team/advisors/frede.jpg
deleted file mode 100755
index cb882c53f..000000000
--- a/packages/website/public/images/team/advisors/frede.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/advisors/joeyk.jpg b/packages/website/public/images/team/advisors/joeyk.jpg
deleted file mode 100755
index c6050242f..000000000
--- a/packages/website/public/images/team/advisors/joeyk.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/advisors/lindax.jpg b/packages/website/public/images/team/advisors/lindax.jpg
deleted file mode 100755
index 766532068..000000000
--- a/packages/website/public/images/team/advisors/lindax.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/advisors/olafc.jpg b/packages/website/public/images/team/advisors/olafc.jpg
deleted file mode 100755
index bb0dc6cb5..000000000
--- a/packages/website/public/images/team/advisors/olafc.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/alexb.jpg b/packages/website/public/images/team/alexb.jpg
deleted file mode 100755
index c076de14b..000000000
--- a/packages/website/public/images/team/alexb.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/alexv.jpg b/packages/website/public/images/team/alexv.jpg
deleted file mode 100755
index 686f4a2e3..000000000
--- a/packages/website/public/images/team/alexv.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/amirb.jpg b/packages/website/public/images/team/amirb.jpg
deleted file mode 100755
index 19502735d..000000000
--- a/packages/website/public/images/team/amirb.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/benb.jpg b/packages/website/public/images/team/benb.jpg
deleted file mode 100755
index ef7fb69a9..000000000
--- a/packages/website/public/images/team/benb.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/blake.jpg b/packages/website/public/images/team/blake.jpg
deleted file mode 100755
index 0f5512af4..000000000
--- a/packages/website/public/images/team/blake.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/brandonm.jpg b/packages/website/public/images/team/brandonm.jpg
deleted file mode 100755
index 72368f994..000000000
--- a/packages/website/public/images/team/brandonm.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/chrisk.jpg b/packages/website/public/images/team/chrisk.jpg
deleted file mode 100755
index cf900faea..000000000
--- a/packages/website/public/images/team/chrisk.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/clayr.jpg b/packages/website/public/images/team/clayr.jpg
deleted file mode 100755
index 3fa550727..000000000
--- a/packages/website/public/images/team/clayr.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/eugenea.jpg b/packages/website/public/images/team/eugenea.jpg
deleted file mode 100755
index dc9aecea1..000000000
--- a/packages/website/public/images/team/eugenea.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/fabiob.jpg b/packages/website/public/images/team/fabiob.jpg
deleted file mode 100755
index c06a06c9f..000000000
--- a/packages/website/public/images/team/fabiob.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/francesco.jpg b/packages/website/public/images/team/francesco.jpg
deleted file mode 100755
index 56ae0e870..000000000
--- a/packages/website/public/images/team/francesco.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/greg.jpg b/packages/website/public/images/team/greg.jpg
deleted file mode 100755
index 0b6df7083..000000000
--- a/packages/website/public/images/team/greg.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/jacobe.jpg b/packages/website/public/images/team/jacobe.jpg
deleted file mode 100755
index 29eed406d..000000000
--- a/packages/website/public/images/team/jacobe.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/jasons.jpg b/packages/website/public/images/team/jasons.jpg
deleted file mode 100755
index b0a40edba..000000000
--- a/packages/website/public/images/team/jasons.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/leonidL.jpg b/packages/website/public/images/team/leonidL.jpg
deleted file mode 100755
index e3dfd6a7d..000000000
--- a/packages/website/public/images/team/leonidL.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/mattt.jpg b/packages/website/public/images/team/mattt.jpg
deleted file mode 100755
index 03f95a7c1..000000000
--- a/packages/website/public/images/team/mattt.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/melo.jpg b/packages/website/public/images/team/melo.jpg
deleted file mode 100755
index 2db8ec796..000000000
--- a/packages/website/public/images/team/melo.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/oshirob.png b/packages/website/public/images/team/oshirob.png
deleted file mode 100644
index 094bab79b..000000000
--- a/packages/website/public/images/team/oshirob.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/peterz.jpg b/packages/website/public/images/team/peterz.jpg
deleted file mode 100755
index 7708c75db..000000000
--- a/packages/website/public/images/team/peterz.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/rahuls.jpg b/packages/website/public/images/team/rahuls.jpg
deleted file mode 100755
index ef2f001dd..000000000
--- a/packages/website/public/images/team/rahuls.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/remcoB.jpg b/packages/website/public/images/team/remcoB.jpg
deleted file mode 100755
index bc997a18e..000000000
--- a/packages/website/public/images/team/remcoB.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/steveK.jpg b/packages/website/public/images/team/steveK.jpg
deleted file mode 100755
index aeede8bc5..000000000
--- a/packages/website/public/images/team/steveK.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/toms.jpg b/packages/website/public/images/team/toms.jpg
deleted file mode 100755
index 9d9dd2db8..000000000
--- a/packages/website/public/images/team/toms.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/weijew.jpg b/packages/website/public/images/team/weijew.jpg
deleted file mode 100755
index 0b2464e67..000000000
--- a/packages/website/public/images/team/weijew.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/willw.jpg b/packages/website/public/images/team/willw.jpg
deleted file mode 100755
index c1bd8f406..000000000
--- a/packages/website/public/images/team/willw.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/xianny.jpg b/packages/website/public/images/team/xianny.jpg
deleted file mode 100755
index 4e6a3bb8c..000000000
--- a/packages/website/public/images/team/xianny.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/team/zack.jpg b/packages/website/public/images/team/zack.jpg
deleted file mode 100755
index 9060d7592..000000000
--- a/packages/website/public/images/team/zack.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/1ST.png b/packages/website/public/images/token_icons/1ST.png
deleted file mode 100644
index 9cd23b10e..000000000
--- a/packages/website/public/images/token_icons/1ST.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ABYSS.png b/packages/website/public/images/token_icons/ABYSS.png
deleted file mode 100644
index 6ed2efef8..000000000
--- a/packages/website/public/images/token_icons/ABYSS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ADT.png b/packages/website/public/images/token_icons/ADT.png
deleted file mode 100644
index 2e7f3f54f..000000000
--- a/packages/website/public/images/token_icons/ADT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/AE.png b/packages/website/public/images/token_icons/AE.png
deleted file mode 100644
index 01dc13dda..000000000
--- a/packages/website/public/images/token_icons/AE.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/AION.png b/packages/website/public/images/token_icons/AION.png
deleted file mode 100644
index a2bfb9253..000000000
--- a/packages/website/public/images/token_icons/AION.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/AIR.png b/packages/website/public/images/token_icons/AIR.png
deleted file mode 100644
index ab3a13b6d..000000000
--- a/packages/website/public/images/token_icons/AIR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ANT.png b/packages/website/public/images/token_icons/ANT.png
deleted file mode 100644
index 437a8f21a..000000000
--- a/packages/website/public/images/token_icons/ANT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/APCC.png b/packages/website/public/images/token_icons/APCC.png
deleted file mode 100644
index 4294618be..000000000
--- a/packages/website/public/images/token_icons/APCC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/APPC.png b/packages/website/public/images/token_icons/APPC.png
deleted file mode 100644
index 4294618be..000000000
--- a/packages/website/public/images/token_icons/APPC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ARN.png b/packages/website/public/images/token_icons/ARN.png
deleted file mode 100644
index 0d17bb0dd..000000000
--- a/packages/website/public/images/token_icons/ARN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ART.png b/packages/website/public/images/token_icons/ART.png
deleted file mode 100644
index 194f58fa0..000000000
--- a/packages/website/public/images/token_icons/ART.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/AST.png b/packages/website/public/images/token_icons/AST.png
deleted file mode 100644
index 25d7c00ee..000000000
--- a/packages/website/public/images/token_icons/AST.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/BAT.png b/packages/website/public/images/token_icons/BAT.png
deleted file mode 100644
index 840ed0a16..000000000
--- a/packages/website/public/images/token_icons/BAT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/BCAP.png b/packages/website/public/images/token_icons/BCAP.png
deleted file mode 100644
index acf50e368..000000000
--- a/packages/website/public/images/token_icons/BCAP.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/BCPT.png b/packages/website/public/images/token_icons/BCPT.png
deleted file mode 100644
index e1ecbeafe..000000000
--- a/packages/website/public/images/token_icons/BCPT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/BNT.png b/packages/website/public/images/token_icons/BNT.png
deleted file mode 100644
index a3b91ec34..000000000
--- a/packages/website/public/images/token_icons/BNT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/BRM.png b/packages/website/public/images/token_icons/BRM.png
deleted file mode 100644
index 109c21ef5..000000000
--- a/packages/website/public/images/token_icons/BRM.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/CAG.png b/packages/website/public/images/token_icons/CAG.png
deleted file mode 100644
index 2aa368381..000000000
--- a/packages/website/public/images/token_icons/CAG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/CAN.png b/packages/website/public/images/token_icons/CAN.png
deleted file mode 100644
index 7fdf3a9b9..000000000
--- a/packages/website/public/images/token_icons/CAN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/CAT.png b/packages/website/public/images/token_icons/CAT.png
deleted file mode 100644
index c59b6b15d..000000000
--- a/packages/website/public/images/token_icons/CAT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/CFI.png b/packages/website/public/images/token_icons/CFI.png
deleted file mode 100644
index b1f2e6db9..000000000
--- a/packages/website/public/images/token_icons/CFI.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/CVC.png b/packages/website/public/images/token_icons/CVC.png
deleted file mode 100644
index 1daf28d00..000000000
--- a/packages/website/public/images/token_icons/CVC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DAI.png b/packages/website/public/images/token_icons/DAI.png
deleted file mode 100644
index bf7da4a01..000000000
--- a/packages/website/public/images/token_icons/DAI.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DATA.png b/packages/website/public/images/token_icons/DATA.png
deleted file mode 100644
index 43f2e6dde..000000000
--- a/packages/website/public/images/token_icons/DATA.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DEB.png b/packages/website/public/images/token_icons/DEB.png
deleted file mode 100644
index c729fd265..000000000
--- a/packages/website/public/images/token_icons/DEB.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DGD.png b/packages/website/public/images/token_icons/DGD.png
deleted file mode 100644
index cb81ecb45..000000000
--- a/packages/website/public/images/token_icons/DGD.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DIVX.png b/packages/website/public/images/token_icons/DIVX.png
deleted file mode 100644
index d8d50f1f8..000000000
--- a/packages/website/public/images/token_icons/DIVX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/DNT.png b/packages/website/public/images/token_icons/DNT.png
deleted file mode 100644
index b4ac550f6..000000000
--- a/packages/website/public/images/token_icons/DNT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/EDG.png b/packages/website/public/images/token_icons/EDG.png
deleted file mode 100644
index 606784154..000000000
--- a/packages/website/public/images/token_icons/EDG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/EDU.png b/packages/website/public/images/token_icons/EDU.png
deleted file mode 100644
index d74785e5a..000000000
--- a/packages/website/public/images/token_icons/EDU.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ELEC.png b/packages/website/public/images/token_icons/ELEC.png
deleted file mode 100644
index cc1a3745a..000000000
--- a/packages/website/public/images/token_icons/ELEC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/EMONT.png b/packages/website/public/images/token_icons/EMONT.png
deleted file mode 100644
index ba7fe4a3d..000000000
--- a/packages/website/public/images/token_icons/EMONT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ENG.png b/packages/website/public/images/token_icons/ENG.png
deleted file mode 100644
index 6f83a35ea..000000000
--- a/packages/website/public/images/token_icons/ENG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ENTR.png b/packages/website/public/images/token_icons/ENTR.png
deleted file mode 100644
index 2936c20e2..000000000
--- a/packages/website/public/images/token_icons/ENTR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/EOS.png b/packages/website/public/images/token_icons/EOS.png
deleted file mode 100644
index 622df61bc..000000000
--- a/packages/website/public/images/token_icons/EOS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/EVE.png b/packages/website/public/images/token_icons/EVE.png
deleted file mode 100644
index d78362134..000000000
--- a/packages/website/public/images/token_icons/EVE.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/FUN.png b/packages/website/public/images/token_icons/FUN.png
deleted file mode 100644
index a473a1c72..000000000
--- a/packages/website/public/images/token_icons/FUN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/GEE.png b/packages/website/public/images/token_icons/GEE.png
deleted file mode 100644
index 887cc8429..000000000
--- a/packages/website/public/images/token_icons/GEE.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/GEN.png b/packages/website/public/images/token_icons/GEN.png
deleted file mode 100644
index b1fe28370..000000000
--- a/packages/website/public/images/token_icons/GEN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/GET.png b/packages/website/public/images/token_icons/GET.png
deleted file mode 100644
index 6a5fbdf63..000000000
--- a/packages/website/public/images/token_icons/GET.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/GNO.png b/packages/website/public/images/token_icons/GNO.png
deleted file mode 100644
index 7c7d09433..000000000
--- a/packages/website/public/images/token_icons/GNO.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/GNT.png b/packages/website/public/images/token_icons/GNT.png
deleted file mode 100644
index e61a4367d..000000000
--- a/packages/website/public/images/token_icons/GNT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/HGT.png b/packages/website/public/images/token_icons/HGT.png
deleted file mode 100644
index b35c601a3..000000000
--- a/packages/website/public/images/token_icons/HGT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/HOT.png b/packages/website/public/images/token_icons/HOT.png
deleted file mode 100644
index 0c7f61755..000000000
--- a/packages/website/public/images/token_icons/HOT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ICN.png b/packages/website/public/images/token_icons/ICN.png
deleted file mode 100644
index e7eebad10..000000000
--- a/packages/website/public/images/token_icons/ICN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/IND.png b/packages/website/public/images/token_icons/IND.png
deleted file mode 100644
index edc3d217b..000000000
--- a/packages/website/public/images/token_icons/IND.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/J8T.png b/packages/website/public/images/token_icons/J8T.png
deleted file mode 100644
index 74a2f4855..000000000
--- a/packages/website/public/images/token_icons/J8T.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/JET.png b/packages/website/public/images/token_icons/JET.png
deleted file mode 100644
index f34a28481..000000000
--- a/packages/website/public/images/token_icons/JET.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/KIN.png b/packages/website/public/images/token_icons/KIN.png
deleted file mode 100644
index a38d656e1..000000000
--- a/packages/website/public/images/token_icons/KIN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/KNC.png b/packages/website/public/images/token_icons/KNC.png
deleted file mode 100644
index 7ebe359b7..000000000
--- a/packages/website/public/images/token_icons/KNC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/LINK.png b/packages/website/public/images/token_icons/LINK.png
deleted file mode 100644
index 0873f72c9..000000000
--- a/packages/website/public/images/token_icons/LINK.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/LOOM.png b/packages/website/public/images/token_icons/LOOM.png
deleted file mode 100644
index 0da2c41c9..000000000
--- a/packages/website/public/images/token_icons/LOOM.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/LUN.png b/packages/website/public/images/token_icons/LUN.png
deleted file mode 100644
index d661bdc9f..000000000
--- a/packages/website/public/images/token_icons/LUN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MANA.png b/packages/website/public/images/token_icons/MANA.png
deleted file mode 100644
index 52cdffa69..000000000
--- a/packages/website/public/images/token_icons/MANA.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MCO.png b/packages/website/public/images/token_icons/MCO.png
deleted file mode 100644
index 7c3c5bfa0..000000000
--- a/packages/website/public/images/token_icons/MCO.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MKR.png b/packages/website/public/images/token_icons/MKR.png
deleted file mode 100644
index 6da588979..000000000
--- a/packages/website/public/images/token_icons/MKR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MLN.png b/packages/website/public/images/token_icons/MLN.png
deleted file mode 100644
index 29f58e631..000000000
--- a/packages/website/public/images/token_icons/MLN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MOD.png b/packages/website/public/images/token_icons/MOD.png
deleted file mode 100644
index 4fbe66b83..000000000
--- a/packages/website/public/images/token_icons/MOD.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MORPH.png b/packages/website/public/images/token_icons/MORPH.png
deleted file mode 100644
index a9a8dd067..000000000
--- a/packages/website/public/images/token_icons/MORPH.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MOT.png b/packages/website/public/images/token_icons/MOT.png
deleted file mode 100644
index b5457f9f1..000000000
--- a/packages/website/public/images/token_icons/MOT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/MTL.png b/packages/website/public/images/token_icons/MTL.png
deleted file mode 100644
index 3297462ce..000000000
--- a/packages/website/public/images/token_icons/MTL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NANJ.png b/packages/website/public/images/token_icons/NANJ.png
deleted file mode 100644
index 0c54c5bde..000000000
--- a/packages/website/public/images/token_icons/NANJ.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NAVI.png b/packages/website/public/images/token_icons/NAVI.png
deleted file mode 100644
index 3dc359c47..000000000
--- a/packages/website/public/images/token_icons/NAVI.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NCT.png b/packages/website/public/images/token_icons/NCT.png
deleted file mode 100644
index 879c8d085..000000000
--- a/packages/website/public/images/token_icons/NCT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NDC.png b/packages/website/public/images/token_icons/NDC.png
deleted file mode 100644
index b16890ca3..000000000
--- a/packages/website/public/images/token_icons/NDC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NEXO.png b/packages/website/public/images/token_icons/NEXO.png
deleted file mode 100644
index f6459a39f..000000000
--- a/packages/website/public/images/token_icons/NEXO.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/NMR.png b/packages/website/public/images/token_icons/NMR.png
deleted file mode 100644
index 8767f019a..000000000
--- a/packages/website/public/images/token_icons/NMR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/OAX.png b/packages/website/public/images/token_icons/OAX.png
deleted file mode 100644
index 7a53e71af..000000000
--- a/packages/website/public/images/token_icons/OAX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/OCC.png b/packages/website/public/images/token_icons/OCC.png
deleted file mode 100644
index 049812208..000000000
--- a/packages/website/public/images/token_icons/OCC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/OMG.png b/packages/website/public/images/token_icons/OMG.png
deleted file mode 100644
index c1552abf2..000000000
--- a/packages/website/public/images/token_icons/OMG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/OMX.png b/packages/website/public/images/token_icons/OMX.png
deleted file mode 100644
index 0c3485d79..000000000
--- a/packages/website/public/images/token_icons/OMX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/PAL.png b/packages/website/public/images/token_icons/PAL.png
deleted file mode 100644
index 211e42ea5..000000000
--- a/packages/website/public/images/token_icons/PAL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/PAY.png b/packages/website/public/images/token_icons/PAY.png
deleted file mode 100644
index d9ffca043..000000000
--- a/packages/website/public/images/token_icons/PAY.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/PKT.png b/packages/website/public/images/token_icons/PKT.png
deleted file mode 100644
index 169390929..000000000
--- a/packages/website/public/images/token_icons/PKT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/PLAY.png b/packages/website/public/images/token_icons/PLAY.png
deleted file mode 100644
index 9b141a6ec..000000000
--- a/packages/website/public/images/token_icons/PLAY.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/PLU.png b/packages/website/public/images/token_icons/PLU.png
deleted file mode 100644
index 6f9b0344e..000000000
--- a/packages/website/public/images/token_icons/PLU.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/POLY.png b/packages/website/public/images/token_icons/POLY.png
deleted file mode 100644
index 03ded07dc..000000000
--- a/packages/website/public/images/token_icons/POLY.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/QTUM.png b/packages/website/public/images/token_icons/QTUM.png
deleted file mode 100644
index b7f09dfd2..000000000
--- a/packages/website/public/images/token_icons/QTUM.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/REN.png b/packages/website/public/images/token_icons/REN.png
deleted file mode 100644
index f70856e9f..000000000
--- a/packages/website/public/images/token_icons/REN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/REP.png b/packages/website/public/images/token_icons/REP.png
deleted file mode 100644
index c767f4b6f..000000000
--- a/packages/website/public/images/token_icons/REP.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/REQ.png b/packages/website/public/images/token_icons/REQ.png
deleted file mode 100644
index 3c0e8ed9a..000000000
--- a/packages/website/public/images/token_icons/REQ.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/RFR.png b/packages/website/public/images/token_icons/RFR.png
deleted file mode 100644
index 05d71c4f3..000000000
--- a/packages/website/public/images/token_icons/RFR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/RLC.png b/packages/website/public/images/token_icons/RLC.png
deleted file mode 100644
index c21dee4c4..000000000
--- a/packages/website/public/images/token_icons/RLC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ROL.png b/packages/website/public/images/token_icons/ROL.png
deleted file mode 100644
index 430fa9af1..000000000
--- a/packages/website/public/images/token_icons/ROL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/RVT.png b/packages/website/public/images/token_icons/RVT.png
deleted file mode 100644
index 4f32c0e87..000000000
--- a/packages/website/public/images/token_icons/RVT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SALT.png b/packages/website/public/images/token_icons/SALT.png
deleted file mode 100644
index ce425eed5..000000000
--- a/packages/website/public/images/token_icons/SALT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SAN.png b/packages/website/public/images/token_icons/SAN.png
deleted file mode 100644
index 36aa6a554..000000000
--- a/packages/website/public/images/token_icons/SAN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SIG.png b/packages/website/public/images/token_icons/SIG.png
deleted file mode 100644
index 33af7f085..000000000
--- a/packages/website/public/images/token_icons/SIG.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SNGLS.png b/packages/website/public/images/token_icons/SNGLS.png
deleted file mode 100644
index 16bf28819..000000000
--- a/packages/website/public/images/token_icons/SNGLS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SNT.png b/packages/website/public/images/token_icons/SNT.png
deleted file mode 100644
index 6f072cffb..000000000
--- a/packages/website/public/images/token_icons/SNT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SPANK.png b/packages/website/public/images/token_icons/SPANK.png
deleted file mode 100644
index aab84ef90..000000000
--- a/packages/website/public/images/token_icons/SPANK.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SPN.png b/packages/website/public/images/token_icons/SPN.png
deleted file mode 100644
index c569c4687..000000000
--- a/packages/website/public/images/token_icons/SPN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SS.png b/packages/website/public/images/token_icons/SS.png
deleted file mode 100644
index 127e42c45..000000000
--- a/packages/website/public/images/token_icons/SS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/STORJ.png b/packages/website/public/images/token_icons/STORJ.png
deleted file mode 100644
index 4539afb4a..000000000
--- a/packages/website/public/images/token_icons/STORJ.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SUB.png b/packages/website/public/images/token_icons/SUB.png
deleted file mode 100644
index 633bcbbd1..000000000
--- a/packages/website/public/images/token_icons/SUB.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SWT.png b/packages/website/public/images/token_icons/SWT.png
deleted file mode 100644
index 910d9fdbf..000000000
--- a/packages/website/public/images/token_icons/SWT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/SXDT.png b/packages/website/public/images/token_icons/SXDT.png
deleted file mode 100644
index b37e92050..000000000
--- a/packages/website/public/images/token_icons/SXDT.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TAAS.png b/packages/website/public/images/token_icons/TAAS.png
deleted file mode 100644
index 266e3690b..000000000
--- a/packages/website/public/images/token_icons/TAAS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TIME.png b/packages/website/public/images/token_icons/TIME.png
deleted file mode 100644
index 920cc7636..000000000
--- a/packages/website/public/images/token_icons/TIME.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TKN.png b/packages/website/public/images/token_icons/TKN.png
deleted file mode 100644
index e1b276416..000000000
--- a/packages/website/public/images/token_icons/TKN.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TRL.png b/packages/website/public/images/token_icons/TRL.png
deleted file mode 100644
index afd5815ba..000000000
--- a/packages/website/public/images/token_icons/TRL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TRST.png b/packages/website/public/images/token_icons/TRST.png
deleted file mode 100644
index 0ba34778f..000000000
--- a/packages/website/public/images/token_icons/TRST.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/TRX.png b/packages/website/public/images/token_icons/TRX.png
deleted file mode 100644
index 56338957c..000000000
--- a/packages/website/public/images/token_icons/TRX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/UPP.png b/packages/website/public/images/token_icons/UPP.png
deleted file mode 100644
index bc90081a0..000000000
--- a/packages/website/public/images/token_icons/UPP.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/VSL.png b/packages/website/public/images/token_icons/VSL.png
deleted file mode 100644
index b3d0950d2..000000000
--- a/packages/website/public/images/token_icons/VSL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/WAND.png b/packages/website/public/images/token_icons/WAND.png
deleted file mode 100644
index e22531e21..000000000
--- a/packages/website/public/images/token_icons/WAND.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/WETH.png b/packages/website/public/images/token_icons/WETH.png
deleted file mode 100644
index bc8beae8b..000000000
--- a/packages/website/public/images/token_icons/WETH.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/WINGS.png b/packages/website/public/images/token_icons/WINGS.png
deleted file mode 100644
index c0a9ce527..000000000
--- a/packages/website/public/images/token_icons/WINGS.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/WTC.png b/packages/website/public/images/token_icons/WTC.png
deleted file mode 100644
index 06aac0617..000000000
--- a/packages/website/public/images/token_icons/WTC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/WYV.png b/packages/website/public/images/token_icons/WYV.png
deleted file mode 100644
index d63aa857b..000000000
--- a/packages/website/public/images/token_icons/WYV.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/XAUR.png b/packages/website/public/images/token_icons/XAUR.png
deleted file mode 100644
index c356cc9dd..000000000
--- a/packages/website/public/images/token_icons/XAUR.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/XNK.png b/packages/website/public/images/token_icons/XNK.png
deleted file mode 100644
index 04b2ebf80..000000000
--- a/packages/website/public/images/token_icons/XNK.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/XSC.png b/packages/website/public/images/token_icons/XSC.png
deleted file mode 100644
index 7f70686aa..000000000
--- a/packages/website/public/images/token_icons/XSC.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/XYO.png b/packages/website/public/images/token_icons/XYO.png
deleted file mode 100644
index 81314d2ff..000000000
--- a/packages/website/public/images/token_icons/XYO.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ZIL.png b/packages/website/public/images/token_icons/ZIL.png
deleted file mode 100644
index 197227803..000000000
--- a/packages/website/public/images/token_icons/ZIL.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/token_icons/ZRX.png b/packages/website/public/images/token_icons/ZRX.png
deleted file mode 100644
index 8ed9a984b..000000000
--- a/packages/website/public/images/token_icons/ZRX.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/toshi_logo.jpg b/packages/website/public/images/toshi_logo.jpg
deleted file mode 100644
index 3cf451d24..000000000
--- a/packages/website/public/images/toshi_logo.jpg
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/trade_arrows.png b/packages/website/public/images/trade_arrows.png
deleted file mode 100644
index 21a8e1881..000000000
--- a/packages/website/public/images/trade_arrows.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/unlock-mm.png b/packages/website/public/images/unlock-mm.png
deleted file mode 100644
index 531c95dd2..000000000
--- a/packages/website/public/images/unlock-mm.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/wrapped_eth_gray.png b/packages/website/public/images/wrapped_eth_gray.png
deleted file mode 100644
index 397b31b1c..000000000
--- a/packages/website/public/images/wrapped_eth_gray.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/zrx_ecosystem.svg b/packages/website/public/images/zrx_ecosystem.svg
deleted file mode 100644
index 3b4fa0a6e..000000000
--- a/packages/website/public/images/zrx_ecosystem.svg
+++ /dev/null
@@ -1,158 +0,0 @@
-<svg width="267" height="171" viewBox="0 0 267 171" fill="none" xmlns="http://www.w3.org/2000/svg">
-<rect x="1" y="1" width="153" height="169" rx="9" transform="translate(112)" stroke="#3289F1" stroke-width="2"/>
-<g filter="url(#filter0_d)">
-<rect width="38" height="44" rx="5" transform="translate(125 12)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(125 12)" fill="#5C5E9A"/>
-<rect width="16" height="3" rx="1" transform="translate(130 38)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(129.605 44)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter1_d)">
-<rect width="38" height="44" rx="5" transform="translate(171 12)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(171 12)" fill="#737592"/>
-<rect width="16" height="3" rx="1" transform="translate(176 38)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(175.605 44)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter2_d)">
-<rect width="38" height="44" rx="5" transform="translate(217 12)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(217 12)" fill="#434456"/>
-<rect width="16" height="3" rx="1" transform="translate(222 38)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(221.605 44)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter3_d)">
-<rect width="38" height="44" rx="5" transform="translate(125 63)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(125 63)" fill="#434456"/>
-<rect width="16" height="3" rx="1" transform="translate(130 89)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(129.605 95)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter4_d)">
-<rect width="38" height="44" rx="5" transform="translate(171 63)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(171 63)" fill="#5C5E9A"/>
-<rect width="16" height="3" rx="1" transform="translate(176 89)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(175.605 95)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter5_d)">
-<rect width="38" height="44" rx="5" transform="translate(217 63)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(217 63)" fill="#4E6B77"/>
-<rect width="16" height="3" rx="1" transform="translate(222 89)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(221.605 95)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter6_d)">
-<rect width="38" height="44" rx="5" transform="translate(125 114)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(125 114)" fill="#4E6B77"/>
-<rect width="16" height="3" rx="1" transform="translate(130 140)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(129.605 146)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter7_d)">
-<rect width="38" height="44" rx="5" transform="translate(171 114)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(171 114)" fill="#434456"/>
-<rect width="16" height="3" rx="1" transform="translate(176 140)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(175.605 146)" fill="#89BFFF"/>
-</g>
-<g filter="url(#filter8_d)">
-<rect width="38" height="44" rx="5" transform="translate(217 114)" fill="#F2F2F2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H33C35.7614 0 38 2.23858 38 5V22H0V5Z" transform="translate(217 114)" fill="#737492"/>
-<rect width="16" height="3" rx="1" transform="translate(222 140)" fill="#C4C4C4"/>
-<rect width="13.8182" height="2.55072" rx="1" transform="translate(221.605 146)" fill="#89BFFF"/>
-</g>
-<rect x="-1" y="-1" width="68" height="76" rx="6" transform="translate(2 50)" fill="#F2F2F2" stroke="#3289F1" stroke-width="2"/>
-<path d="M0 5C0 2.23858 2.23858 0 5 0H59C61.7614 0 64 2.23858 64 5V15H0V5Z" transform="translate(3 51)" fill="#F6F6F6"/>
-<rect width="6" height="4" rx="2" transform="translate(57 70)" fill="#89BFFF"/>
-<rect width="6" height="4" rx="2" transform="translate(57 83)" fill="#89BFFF"/>
-<rect width="6" height="4" rx="2" transform="translate(57 95)" fill="#89BFFF"/>
-<rect width="6" height="4" rx="2" transform="translate(57 107)" fill="#89BFFF"/>
-<rect width="18" height="4" rx="1" transform="translate(18 70)" fill="#E0E0E0"/>
-<rect width="18" height="4" rx="1" transform="translate(18 56)" fill="#E0E0E0"/>
-<rect width="18" height="4" transform="translate(18 83)" fill="#E0E0E0"/>
-<rect width="18" height="4" transform="translate(18 95)" fill="#E0E0E0"/>
-<rect width="18" height="4" transform="translate(18 107)" fill="#E0E0E0"/>
-<circle cx="3" cy="3" r="3" transform="translate(7 70)" fill="#E0E0E0"/>
-<circle cx="3" cy="3" r="3" transform="translate(7 55)" fill="#3289F1"/>
-<circle cx="3" cy="3" r="3" transform="translate(7 82)" fill="#E0E0E0"/>
-<circle cx="3" cy="3" r="3" transform="translate(7 94)" fill="#E0E0E0"/>
-<circle cx="3" cy="3" r="3" transform="translate(7 106)" fill="#E0E0E0"/>
-<path d="M22.7368 20V21.3333C22.7368 22.8 21.6 24 20.2105 24H2.52632C1.12421 24 0 22.8 0 21.3333V2.66667C0 1.2 1.12421 0 2.52632 0H20.2105C21.6 0 22.7368 1.2 22.7368 2.66667V4H11.3684C9.96632 4 8.8421 5.2 8.8421 6.66667V17.3333C8.8421 18.8 9.96632 20 11.3684 20H22.7368ZM11.3684 17.3333H24V6.66667H11.3684V17.3333ZM16.4211 14C15.3726 14 14.5263 13.1067 14.5263 12C14.5263 10.8933 15.3726 10 16.4211 10C17.4695 10 18.3158 10.8933 18.3158 12C18.3158 13.1067 17.4695 14 16.4211 14Z" transform="translate(24 16)" fill="#3289F1"/>
-<line y1="-1" x2="42" y2="-1" transform="translate(70 86)" stroke="#3289F1" stroke-width="2"/>
-<defs>
-<filter id="filter0_d" x="123" y="11" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter1_d" x="169" y="11" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter2_d" x="215" y="11" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter3_d" x="123" y="62" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter4_d" x="169" y="62" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter5_d" x="215" y="62" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter6_d" x="123" y="113" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter7_d" x="169" y="113" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-<filter id="filter8_d" x="215" y="113" width="42" height="48" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
-<feFlood flood-opacity="0" result="BackgroundImageFix"/>
-<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 255 0"/>
-<feOffset dy="1"/>
-<feGaussianBlur stdDeviation="1"/>
-<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
-<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow"/>
-<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow" result="shape"/>
-</filter>
-</defs>
-</svg>
diff --git a/packages/website/public/images/zrx_pie_chart.png b/packages/website/public/images/zrx_pie_chart.png
deleted file mode 100644
index 16f5126b9..000000000
--- a/packages/website/public/images/zrx_pie_chart.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/images/zrx_token.png b/packages/website/public/images/zrx_token.png
deleted file mode 100644
index 8c71798de..000000000
--- a/packages/website/public/images/zrx_token.png
+++ /dev/null
Binary files differ
diff --git a/packages/website/public/index.html b/packages/website/public/index.html
deleted file mode 100644
index 738b675e7..000000000
--- a/packages/website/public/index.html
+++ /dev/null
@@ -1,134 +0,0 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=device-width, initial-scale=1" />
- <meta name="description" content="An Open Protocol For Decentralized Exchange On The Ethereum Blockchain" />
- <meta property="og:type" content="website" />
- <meta property="og:title" content="0x" />
- <meta
- property="og:description"
- content="An Open Protocol For Decentralized Exchange On The Ethereum Blockchain"
- />
- <meta property="og:image" content="/images/og_image.png" />
- <title>0x: The Protocol for Trading Tokens</title>
- <link rel="icon" type="image/png" href="/images/favicon/favicon-2-32x32.png" sizes="32x32" />
- <link rel="icon" type="image/png" href="/images/favicon/favicon-2-16x16.png" sizes="16x16" />
- <link rel="stylesheet" href="/css/material-design-iconic-font.min.css" />
- <link rel="stylesheet" href="/css/roboto.css" />
- <link rel="stylesheet" href="/css/roboto_mono.css" />
- <link rel="stylesheet" href="/css/formular.css" />
- <link rel="stylesheet" href="/css/basscss.min.css" />
- <link rel="stylesheet" href="/css/basscss_responsive_custom.css" />
- <link rel="stylesheet" href="/css/basscss_responsive_padding.css" />
- <link rel="stylesheet" href="/css/basscss_responsive_margin.css" />
- <link rel="stylesheet" href="/css/basscss_responsive_type_scale.css" />
- </head>
-
- <body style="margin: 0px; min-width: 355px;">
- <!-- Heap SDK -->
- <script type="text/javascript">
- (window.heap = window.heap || []),
- (heap.load = function(e, t) {
- (window.heap.appid = e), (window.heap.config = t = t || {});
- var r = t.forceSSL || 'https:' === document.location.protocol,
- a = document.createElement('script');
- (a.type = 'text/javascript'),
- (a.async = !0),
- (a.src = (r ? 'https:' : 'http:') + '//cdn.heapanalytics.com/js/heap-' + e + '.js');
- var n = document.getElementsByTagName('script')[0];
- n.parentNode.insertBefore(a, n);
- for (
- var o = function(e) {
- return function() {
- heap.push([e].concat(Array.prototype.slice.call(arguments, 0)));
- };
- },
- p = [
- 'addEventProperties',
- 'addUserProperties',
- 'clearEventProperties',
- 'identify',
- 'resetIdentity',
- 'removeEventProperty',
- 'setEventProperties',
- 'track',
- 'unsetEventProperty',
- ],
- c = 0;
- c < p.length;
- c++
- )
- heap[p[c]] = o(p[c]);
- });
- heap.load('410099666');
- </script>
- <!-- End Heap SDK -->
- <!-- Global site tag (gtag.js) - Google Analytics -->
- <script async src="https://www.googletagmanager.com/gtag/js?id=UA-98720122-1"></script>
- <script>
- window.dataLayer = window.dataLayer || [];
- function gtag() {
- dataLayer.push(arguments);
- }
- gtag('js', new Date());
-
- gtag('config', 'UA-98720122-1');
- </script>
- <!-- End Google Analytics -->
- <!-- Facebook SDK -->
- <div id="fb-root"></div>
- <script>
- (function(d, s, id) {
- var js,
- fjs = d.getElementsByTagName(s)[0];
- if (d.getElementById(id)) return;
- js = d.createElement(s);
- js.id = id;
- js.src = '//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.8&appId=1687545238205192';
- fjs.parentNode.insertBefore(js, fjs);
- })(document, 'script', 'facebook-jssdk');
- </script>
- <div id="app"></div>
- <!-- End Facebook SDK -->
- <!-- Twitter SDK -->
- <script>
- window.twttr = (function(d, s, id) {
- var js,
- fjs = d.getElementsByTagName(s)[0],
- t = window.twttr || {};
- if (d.getElementById(id)) return t;
- js = d.createElement(s);
- js.id = id;
- js.src = 'https://platform.twitter.com/widgets.js';
- fjs.parentNode.insertBefore(js, fjs);
-
- t._e = [];
- t.ready = function(f) {
- t._e.push(f);
- };
- return t;
- })(document, 'script', 'twitter-wjs');
- </script>
- <!-- End Twitter SDK -->
- <!-- Hotjar Tracking Code for https://0x.org/ -->
- <script>
- (function(h, o, t, j, a, r) {
- h.hj =
- h.hj ||
- function() {
- (h.hj.q = h.hj.q || []).push(arguments);
- };
- h._hjSettings = { hjid: 935597, hjsv: 6 };
- a = o.getElementsByTagName('head')[0];
- r = o.createElement('script');
- r.async = 1;
- r.src = t + h._hjSettings.hjid + j + h._hjSettings.hjsv;
- a.appendChild(r);
- })(window, document, 'https://static.hotjar.com/c/hotjar-', '.js?sv=');
- </script>
- <!-- End Hotjar Tracking Code -->
- <!-- Main -->
- <script type="text/javascript" crossorigin="anonymous" src="/bundle.js" charset="utf-8"></script>
- </body>
-</html>
diff --git a/packages/website/public/js/rollbar.umd.min.js b/packages/website/public/js/rollbar.umd.min.js
deleted file mode 100644
index 2734bb8be..000000000
--- a/packages/website/public/js/rollbar.umd.min.js
+++ /dev/null
@@ -1,2 +0,0 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.rollbar=e():t.rollbar=e()}(this,function(){return function(t){function e(n){if(r[n])return r[n].exports;var o=r[n]={exports:{},id:n,loaded:!1};return t[n].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var r={};return e.m=t,e.c=r,e.p="",e(0)}([function(t,e,r){t.exports=r(1)},function(t,e,r){"use strict";var n=r(2),o="undefined"!=typeof window&&window._rollbarConfig,i=o&&o.globalAlias||"Rollbar",a="undefined"!=typeof window&&window[i]&&"function"==typeof window[i].shimId&&void 0!==window[i].shimId();if("undefined"==typeof window||window._rollbarStartTime||(window._rollbarStartTime=(new Date).getTime()),!a&&o){var s=new n(o);window[i]=s}else"undefined"!=typeof window?(window.rollbar=n,window._rollbarDidLoad=!0):"undefined"!=typeof self&&(self.rollbar=n,self._rollbarDidLoad=!0);t.exports=n},function(t,e,r){"use strict";function n(t,e){this.options=c.merge(x,t);var r=new l(this.options,h,d);this.client=e||new u(this.options,r,p,"browser");var n="undefined"!=typeof window&&window||"undefined"!=typeof self&&self,o="undefined"!=typeof document&&document;i(this.client.notifier),a(this.client.queue),(this.options.captureUncaught||this.options.handleUncaughtExceptions)&&(f.captureUncaughtExceptions(n,this),f.wrapGlobals(n,this)),(this.options.captureUnhandledRejections||this.options.handleUnhandledRejections)&&f.captureUnhandledRejections(n,this),this.instrumenter=new w(this.options,this.client.telemeter,this,n,o),this.instrumenter.instrument()}function o(t){var e="Rollbar is not initialized";p.error(e),t&&t(new Error(e))}function i(t){t.addTransform(m.handleItemWithError).addTransform(m.ensureItemHasSomethingToSay).addTransform(m.addBaseInfo).addTransform(m.addRequestInfo(window)).addTransform(m.addClientInfo(window)).addTransform(m.addPluginInfo(window)).addTransform(m.addBody).addTransform(g.addMessageWithError).addTransform(g.addTelemetryData).addTransform(g.addConfigToPayload).addTransform(m.scrubPayload).addTransform(g.userTransform(p)).addTransform(g.itemToPayload)}function a(t){t.addPredicate(y.checkLevel).addPredicate(v.checkIgnore).addPredicate(y.userCheckIgnore(p)).addPredicate(y.urlIsNotBlacklisted(p)).addPredicate(y.urlIsWhitelisted(p)).addPredicate(y.messageIsIgnored(p))}function s(t){for(var e=0,r=t.length;e<r;++e)if(c.isFunction(t[e]))return t[e]}var u=r(3),c=r(6),l=r(11),p=r(13),f=r(16),h=r(17),d=r(19),m=r(20),g=r(24),v=r(25),y=r(26),b=r(21),w=r(27),_=null;n.init=function(t,e){return _?_.global(t).configure(t):_=new n(t,e)},n.prototype.global=function(t){return this.client.global(t),this},n.global=function(t){return _?_.global(t):void o()},n.prototype.configure=function(t,e){var r=this.options,n={};return e&&(n={payload:e}),this.options=c.merge(r,t,n),this.client.configure(t,e),this.instrumenter.configure(t),this},n.configure=function(t,e){return _?_.configure(t,e):void o()},n.prototype.lastError=function(){return this.client.lastError},n.lastError=function(){return _?_.lastError():void o()},n.prototype.log=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.log(t),{uuid:e}},n.log=function(){if(_)return _.log.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.debug=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.debug(t),{uuid:e}},n.debug=function(){if(_)return _.debug.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.info=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.info(t),{uuid:e}},n.info=function(){if(_)return _.info.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.warn=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warn(t),{uuid:e}},n.warn=function(){if(_)return _.warn.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.warning=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.warning(t),{uuid:e}},n.warning=function(){if(_)return _.warning.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.error=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.error(t),{uuid:e}},n.error=function(){if(_)return _.error.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.critical=function(){var t=this._createItem(arguments),e=t.uuid;return this.client.critical(t),{uuid:e}},n.critical=function(){if(_)return _.critical.apply(_,arguments);var t=s(arguments);o(t)},n.prototype.handleUncaughtException=function(t,e,r,n,o,i){var a,s=c.makeUnhandledStackInfo(t,e,r,n,o,"onerror","uncaught exception",b);c.isError(o)?(a=this._createItem([t,o,i]),a._unhandledStackInfo=s):c.isError(e)?(a=this._createItem([t,e,i]),a._unhandledStackInfo=s):(a=this._createItem([t,i]),a.stackInfo=s),a.level=this.options.uncaughtErrorLevel,a._isUncaught=!0,this.client.log(a)},n.prototype.handleUnhandledRejection=function(t,e){var r="unhandled rejection was null or undefined!";r=t?t.message||String(t):r;var n,o=t&&t._rollbarContext||e&&e._rollbarContext;c.isError(t)?n=this._createItem([r,t,o]):(n=this._createItem([r,t,o]),n.stackInfo=c.makeUnhandledStackInfo(r,"",0,0,null,"unhandledrejection","",b)),n.level=this.options.uncaughtErrorLevel,n._isUncaught=!0,n._originalArgs=n._originalArgs||[],n._originalArgs.push(e),this.client.log(n)},n.prototype.wrap=function(t,e,r){try{var n;if(n=c.isFunction(e)?e:function(){return e||{}},!c.isFunction(t))return t;if(t._isWrap)return t;if(!t._rollbar_wrapped&&(t._rollbar_wrapped=function(){r&&c.isFunction(r)&&r.apply(this,arguments);try{return t.apply(this,arguments)}catch(r){var e=r;throw e&&(c.isType(e,"string")&&(e=new String(e)),e._rollbarContext=n()||{},e._rollbarContext._wrappedSource=t.toString(),window._rollbarWrappedError=e),e}},t._rollbar_wrapped._isWrap=!0,t.hasOwnProperty))for(var o in t)t.hasOwnProperty(o)&&(t._rollbar_wrapped[o]=t[o]);return t._rollbar_wrapped}catch(e){return t}},n.wrap=function(t,e){return _?_.wrap(t,e):void o()},n.prototype.captureEvent=function(t,e){return this.client.captureEvent(t,e)},n.captureEvent=function(t,e){return _?_.captureEvent(t,e):void o()},n.prototype.captureDomContentLoaded=function(t,e){return e||(e=new Date),this.client.captureDomContentLoaded(e)},n.prototype.captureLoad=function(t,e){return e||(e=new Date),this.client.captureLoad(e)},n.prototype._createItem=function(t){return c.createItem(t,p,this)};var x={version:"2.4.2",scrubFields:["pw","pass","passwd","password","secret","confirm_password","confirmPassword","password_confirmation","passwordConfirmation","access_token","accessToken","secret_key","secretKey","secretToken","cc-number","card number","cardnumber","cardnum","ccnum","ccnumber","cc num","creditcardnumber","credit card number","newcreditcardnumber","new credit card","creditcardno","credit card no","card#","card #","cc-csc","cvc2","cvv2","ccv2","security code","card verification","name on credit card","name on card","nameoncard","cardholder","card holder","name des karteninhabers","card type","cardtype","cc type","cctype","payment type","expiration date","expirationdate","expdate","cc-exp"],logLevel:"debug",reportLevel:"debug",uncaughtErrorLevel:"error",endpoint:"api.rollbar.com/api/1/item/",verbose:!1,enabled:!0,sendConfig:!1,includeItemsInTelemetry:!0,captureIp:!0};t.exports=n},function(t,e,r){"use strict";function n(t,e,r,o){this.options=c.merge(t),this.logger=r,n.rateLimiter.configureGlobal(this.options),n.rateLimiter.setPlatformOptions(o,this.options),this.queue=new a(n.rateLimiter,e,r,this.options),this.notifier=new s(this.queue,this.options),this.telemeter=new u(this.options),this.lastError=null,this.lastErrorHash="none"}function o(t){var e=t.message||"",r=(t.err||{}).stack||String(t.err);return e+"::"+r}var i=r(4),a=r(5),s=r(9),u=r(10),c=r(6),l={maxItems:0,itemsPerMinute:60};n.rateLimiter=new i(l),n.prototype.global=function(t){return n.rateLimiter.configureGlobal(t),this},n.prototype.configure=function(t,e){this.notifier&&this.notifier.configure(t),this.telemeter&&this.telemeter.configure(t);var r=this.options,n={};return e&&(n={payload:e}),this.options=c.merge(r,t,n),this.global(this.options),this},n.prototype.log=function(t){var e=this._defaultLogLevel();return this._log(e,t)},n.prototype.debug=function(t){this._log("debug",t)},n.prototype.info=function(t){this._log("info",t)},n.prototype.warn=function(t){this._log("warning",t)},n.prototype.warning=function(t){this._log("warning",t)},n.prototype.error=function(t){this._log("error",t)},n.prototype.critical=function(t){this._log("critical",t)},n.prototype.wait=function(t){this.queue.wait(t)},n.prototype.captureEvent=function(t,e){return this.telemeter.captureEvent(t,e)},n.prototype.captureDomContentLoaded=function(t){return this.telemeter.captureDomContentLoaded(t)},n.prototype.captureLoad=function(t){return this.telemeter.captureLoad(t)},n.prototype._log=function(t,e){var r;if(e.callback&&(r=e.callback,delete e.callback),this._sameAsLastError(e)){if(r){var n=new Error("ignored identical item");n.item=e,r(n)}}else try{e.level=e.level||t,this.telemeter._captureRollbarItem(e),e.telemetryEvents=this.telemeter.copyEvents(),this.notifier.log(e,r)}catch(t){this.logger.error(t)}},n.prototype._defaultLogLevel=function(){return this.options.logLevel||"debug"},n.prototype._sameAsLastError=function(t){if(!t._isUncaught)return!1;var e=o(t);return this.lastErrorHash===e||(this.lastError=t.err,this.lastErrorHash=e,!1)},t.exports=n},function(t,e){"use strict";function r(t){this.startTime=(new Date).getTime(),this.counter=0,this.perMinCounter=0,this.platform=null,this.platformOptions={},this.configureGlobal(t)}function n(t,e,r){return!t.ignoreRateLimit&&e>=1&&r>e}function o(t,e,r,n,o,a,s){var u=null;return r&&(r=new Error(r)),r||n||(u=i(t,e,o,a,s)),{error:r,shouldSend:n,payload:u}}function i(t,e,r,n,o){var i,a=e.environment||e.payload&&e.payload.environment;i=o?"item per minute limit reached, ignoring errors until timeout":"maxItems has been hit, ignoring errors until reset.";var s={body:{message:{body:i,extra:{maxItems:r,itemsPerMinute:n}}},language:"javascript",environment:a,notifier:{version:e.notifier&&e.notifier.version||e.version}};return"browser"===t?(s.platform="browser",s.framework="browser-js",s.notifier.name="rollbar-browser-js"):"server"===t?(s.framework=e.framework||"node-js",s.notifier.name=e.notifier.name):"react-native"===t&&(s.framework=e.framework||"react-native",s.notifier.name=e.notifier.name),s}r.globalSettings={startTime:(new Date).getTime(),maxItems:void 0,itemsPerMinute:void 0},r.prototype.configureGlobal=function(t){void 0!==t.startTime&&(r.globalSettings.startTime=t.startTime),void 0!==t.maxItems&&(r.globalSettings.maxItems=t.maxItems),void 0!==t.itemsPerMinute&&(r.globalSettings.itemsPerMinute=t.itemsPerMinute)},r.prototype.shouldSend=function(t,e){e=e||(new Date).getTime(),e-this.startTime>=6e4&&(this.startTime=e,this.perMinCounter=0);var i=r.globalSettings.maxItems,a=r.globalSettings.itemsPerMinute;if(n(t,i,this.counter))return o(this.platform,this.platformOptions,i+" max items reached",!1);if(n(t,a,this.perMinCounter))return o(this.platform,this.platformOptions,a+" items per minute reached",!1);this.counter++,this.perMinCounter++;var s=!n(t,i,this.counter),u=s;return s=s&&!n(t,a,this.perMinCounter),o(this.platform,this.platformOptions,null,s,i,a,u)},r.prototype.setPlatformOptions=function(t,e){this.platform=t,this.platformOptions=e},t.exports=r},function(t,e,r){"use strict";function n(t,e,r,n){this.rateLimiter=t,this.api=e,this.logger=r,this.options=n,this.predicates=[],this.pendingItems=[],this.pendingRequests=[],this.retryQueue=[],this.retryHandle=null,this.waitCallback=null,this.waitIntervalID=null}var o=r(6);n.prototype.configure=function(t){this.api&&this.api.configure(t);var e=this.options;return this.options=o.merge(e,t),this},n.prototype.addPredicate=function(t){return o.isFunction(t)&&this.predicates.push(t),this},n.prototype.addPendingItem=function(t){this.pendingItems.push(t)},n.prototype.removePendingItem=function(t){var e=this.pendingItems.indexOf(t);e!==-1&&this.pendingItems.splice(e,1)},n.prototype.addItem=function(t,e,r,n){e&&o.isFunction(e)||(e=function(){});var i=this._applyPredicates(t);if(i.stop)return this.removePendingItem(n),void e(i.err);this._maybeLog(t,r),this.removePendingItem(n),this.pendingRequests.push(t);try{this._makeApiRequest(t,function(r,n){this._dequeuePendingRequest(t),e(r,n)}.bind(this))}catch(r){this._dequeuePendingRequest(t),e(r)}},n.prototype.wait=function(t){o.isFunction(t)&&(this.waitCallback=t,this._maybeCallWait()||(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitIntervalID=setInterval(function(){this._maybeCallWait()}.bind(this),500)))},n.prototype._applyPredicates=function(t){for(var e=null,r=0,n=this.predicates.length;r<n;r++)if(e=this.predicates[r](t,this.options),!e||void 0!==e.err)return{stop:!0,err:e.err};return{stop:!1,err:null}},n.prototype._makeApiRequest=function(t,e){var r=this.rateLimiter.shouldSend(t);r.shouldSend?this.api.postItem(t,function(r,n){r?this._maybeRetry(r,t,e):e(r,n)}.bind(this)):r.error?e(r.error):this.api.postItem(r.payload,e)};var i=["ECONNRESET","ENOTFOUND","ESOCKETTIMEDOUT","ETIMEDOUT","ECONNREFUSED","EHOSTUNREACH","EPIPE","EAI_AGAIN"];n.prototype._maybeRetry=function(t,e,r){var n=!1;if(this.options.retryInterval)for(var o=0,a=i.length;o<a;o++)if(t.code===i[o]){n=!0;break}n?this._retryApiRequest(e,r):r(t)},n.prototype._retryApiRequest=function(t,e){this.retryQueue.push({item:t,callback:e}),this.retryHandle||(this.retryHandle=setInterval(function(){for(;this.retryQueue.length;){var t=this.retryQueue.shift();this._makeApiRequest(t.item,t.callback)}}.bind(this),this.options.retryInterval))},n.prototype._dequeuePendingRequest=function(t){var e=this.pendingRequests.indexOf(t);e!==-1&&(this.pendingRequests.splice(e,1),this._maybeCallWait())},n.prototype._maybeLog=function(t,e){if(this.logger&&this.options.verbose){var r=e;if(r=r||o.get(t,"body.trace.exception.message"),r=r||o.get(t,"body.trace_chain.0.exception.message"))return void this.logger.error(r);r=o.get(t,"body.message.body"),r&&this.logger.log(r)}},n.prototype._maybeCallWait=function(){return!(!o.isFunction(this.waitCallback)||0!==this.pendingItems.length||0!==this.pendingRequests.length)&&(this.waitIntervalID&&(this.waitIntervalID=clearInterval(this.waitIntervalID)),this.waitCallback(),!0)},t.exports=n},function(t,e,r){"use strict";function n(){if(!A&&(A=!0,c(JSON)&&(s(JSON.stringify)&&(R.stringify=JSON.stringify),s(JSON.parse)&&(R.parse=JSON.parse)),!a(R.stringify)||!a(R.parse))){var t=r(8);t(R)}}function o(t,e){return e===i(t)}function i(t){var e=typeof t;return"object"!==e?e:t?t instanceof Error?"error":{}.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase():"null"}function a(t){return o(t,"function")}function s(t){var e=/[\\^$.*+?()[\]{}|]/g,r=Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(e,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?"),n=RegExp("^"+r+"$");return u(t)&&n.test(t)}function u(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function c(t){return!o(t,"undefined")}function l(t){var e=i(t);return"object"===e||"array"===e}function p(t){return o(t,"error")}function f(t,e,r){var n,i,a,s=o(t,"object"),u=o(t,"array"),c=[];if(s&&r.indexOf(t)!==-1)return t;if(r.push(t),s)for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&c.push(n);else if(u)for(a=0;a<t.length;++a)c.push(a);var l=s?{}:[];for(a=0;a<c.length;++a)n=c[a],i=t[n],l[n]=e(n,i,r);return 0!=c.length?l:t}function h(){return"********"}function d(){var t=N(),e="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var r=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?r:7&r|8).toString(16)});return e}function m(t){var e=g(t);return e?(""===e.anchor&&(e.source=e.source.replace("#","")),t=e.source.replace("?"+e.query,"")):"(unknown)"}function g(t){if(o(t,"string")){for(var e=D,r=e.parser[e.strictMode?"strict":"loose"].exec(t),n={},i=e.key.length;i--;)n[e.key[i]]=r[i]||"";return n[e.q.name]={},n[e.key[12]].replace(e.q.parser,function(t,r,o){r&&(n[e.q.name][r]=o)}),n}}function v(t,e,r){r=r||{},r.access_token=t;var n,o=[];for(n in r)Object.prototype.hasOwnProperty.call(r,n)&&o.push([n,r[n]].join("="));var i="?"+o.sort().join("&");e=e||{},e.path=e.path||"";var a,s=e.path.indexOf("?"),u=e.path.indexOf("#");s!==-1&&(u===-1||u>s)?(a=e.path,e.path=a.substring(0,s)+i+"&"+a.substring(s+1)):u!==-1?(a=e.path,e.path=a.substring(0,u)+i+a.substring(u)):e.path=e.path+i}function y(t,e){if(e=e||t.protocol,!e&&t.port&&(80===t.port?e="http:":443===t.port&&(e="https:")),e=e||"https:",!t.hostname)return null;var r=e+"//"+t.hostname;return t.port&&(r=r+":"+t.port),t.path&&(r+=t.path),r}function b(t,e){var r,n;try{r=R.stringify(t)}catch(o){if(e&&a(e))try{r=e(t)}catch(t){n=t}else n=o}return{error:n,value:r}}function w(t){var e,r;try{e=R.parse(t)}catch(t){r=t}return{error:r,value:e}}function _(t,e,r,n,o,i,a,s){var u={url:e||"",line:r,column:n};u.func=s.guessFunctionName(u.url,u.line),u.context=s.gatherContext(u.url,u.line);var c=document&&document.location&&document.location.href,l=window&&window.navigator&&window.navigator.userAgent;return{mode:i,message:o?String(o):t||a,url:c,stack:[u],useragent:l}}function x(t,e){return function(r,n){try{e(r,n)}catch(e){t.error(e)}}}function k(t,e,r,n,o){for(var a,s,u,c,l,p,f=[],h=0,m=t.length;h<m;++h){p=t[h];var g=i(p);switch(g){case"undefined":break;case"string":a?f.push(p):a=p;break;case"function":c=x(e,p);break;case"date":f.push(p);break;case"error":case"domexception":s?f.push(p):s=p;break;case"object":case"array":if(p instanceof Error||"undefined"!=typeof DOMException&&p instanceof DOMException){s?f.push(p):s=p;break}if(n&&"object"===g&&!l){for(var v=0,y=n.length;v<y;++v)if(void 0!==p[n[v]]){l=p;break}if(l)break}u?f.push(p):u=p;break;default:if(p instanceof Error||"undefined"!=typeof DOMException&&p instanceof DOMException){s?f.push(p):s=p;break}f.push(p)}}f.length>0&&(u=j(u),u.extraArgs=f);var b={message:a,err:s,custom:u,timestamp:N(),callback:c,uuid:d()};return u&&void 0!==u.level&&(b.level=u.level,delete u.level),n&&l&&(b.request=l),o&&(b.lambdaContext=o),b._originalArgs=t,b}function E(t,e){if(t){var r=e.split("."),n=t;try{for(var o=0,i=r.length;o<i;++o)n=n[r[o]]}catch(t){n=void 0}return n}}function I(t,e,r){if(t){var n=e.split("."),o=n.length;if(!(o<1)){if(1===o)return void(t[n[0]]=r);try{for(var i=t[n[0]]||{},a=i,s=1;s<o-1;s++)i[n[s]]=i[n[s]]||{},i=i[n[s]];i[n[o-1]]=r,t[n[0]]=a}catch(t){return}}}}function T(t,e){function r(t,e,r,n,o,i){return e+h(i)}function n(t){var e;if(o(t,"string"))for(e=0;e<u.length;++e)t=t.replace(u[e],r);return t}function i(t,e){var r;for(r=0;r<s.length;++r)if(s[r].test(t)){e=h(e);break}return e}function a(t,e,r){var s=i(t,e);return s===e?o(e,"object")||o(e,"array")?f(e,a,r):n(s):s}e=e||[];var s=S(e),u=O(e);return f(t,a,[])}function S(t){for(var e,r=[],n=0;n<t.length;++n)e="^\\[?(%5[bB])?"+t[n]+"\\[?(%5[bB])?\\]?(%5[dD])?$",r.push(new RegExp(e,"i"));return r}function O(t){for(var e,r=[],n=0;n<t.length;++n)e="\\[?(%5[bB])?"+t[n]+"\\[?(%5[bB])?\\]?(%5[dD])?",r.push(new RegExp("("+e+"=)([^&\\n]+)","igm"));return r}function L(t){var e,r,n,o=[];for(e=0,r=t.length;e<r;e++){switch(n=t[e],i(n)){case"object":n=b(n),n=n.error||n.value,n.length>500&&(n=n.substr(0,497)+"...");break;case"null":n="null";break;case"undefined":n="undefined";break;case"symbol":n=n.toString()}o.push(n)}return o.join(" ")}function N(){return Date.now?+Date.now():+new Date}function C(t,e){if(t&&t.user_ip&&e!==!0){var r=t.user_ip;if(e)try{var n;if(r.indexOf(".")!==-1)n=r.split("."),n.pop(),n.push("0"),r=n.join(".");else if(r.indexOf(":")!==-1){if(n=r.split(":"),n.length>2){var o=n.slice(0,3),i=o[2].indexOf("/");i!==-1&&(o[2]=o[2].substring(0,i));var a="0000:0000:0000:0000:0000";r=o.concat(a).join(":")}}else r=null}catch(t){r=null}else r=null;t.user_ip=r}}var j=r(7),R={},A=!1;n();var q={debug:0,info:1,warning:2,error:3,critical:4},D={strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}};t.exports={isType:o,typeName:i,isFunction:a,isNativeFunction:s,isIterable:l,isError:p,merge:j,traverse:f,redact:h,uuid4:d,LEVELS:q,sanitizeUrl:m,addParamsAndAccessTokenToPath:v,formatUrl:y,stringify:b,jsonParse:w,makeUnhandledStackInfo:_,createItem:k,get:E,set:I,scrub:T,formatArgsAsString:L,now:N,filterIp:C}},function(t,e){"use strict";function r(){var t,e,n,o,a,s={},u=null,c=arguments.length;for(t=0;t<c;t++)if(u=arguments[t],null!=u)for(a in u)e=s[a],n=u[a],s!==n&&(n&&i(n)?(o=e&&i(e)?e:{},s[a]=r(o,n)):"undefined"!=typeof n&&(s[a]=n));return s}var n=Object.prototype.hasOwnProperty,o=Object.prototype.toString,i=function(t){if(!t||"[object Object]"!==o.call(t))return!1;var e=n.call(t,"constructor"),r=t.constructor&&t.constructor.prototype&&n.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!e&&!r)return!1;var i;for(i in t);return"undefined"==typeof i||n.call(t,i)};t.exports=r},function(t,e){var r=function(t){function e(t){return t<10?"0"+t:t}function r(){return this.valueOf()}function n(t){return i.lastIndex=0,i.test(t)?'"'+t.replace(i,function(t){var e=u[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function o(t,e){var r,i,u,l,p,f=a,h=e[t];switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(t)),"function"==typeof c&&(h=c.call(e,t,h)),typeof h){case"string":return n(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":return String(h);case"object":if(!h)return"null";if(a+=s,p=[],"[object Array]"===Object.prototype.toString.apply(h)){for(l=h.length,r=0;r<l;r+=1)p[r]=o(r,h)||"null";return u=0===p.length?"[]":a?"[\n"+a+p.join(",\n"+a)+"\n"+f+"]":"["+p.join(",")+"]",a=f,u}if(c&&"object"==typeof c)for(l=c.length,r=0;r<l;r+=1)"string"==typeof c[r]&&(i=c[r],u=o(i,h),u&&p.push(n(i)+(a?": ":":")+u));else for(i in h)Object.prototype.hasOwnProperty.call(h,i)&&(u=o(i,h),u&&p.push(n(i)+(a?": ":":")+u));return u=0===p.length?"{}":a?"{\n"+a+p.join(",\n"+a)+"\n"+f+"}":"{"+p.join(",")+"}",a=f,u}}var i=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=r,Number.prototype.toJSON=r,String.prototype.toJSON=r);var a,s,u,c;"function"!=typeof t.stringify&&(u={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},t.stringify=function(t,e,r){var n;if(a="",s="","number"==typeof r)for(n=0;n<r;n+=1)s+=" ";else"string"==typeof r&&(s=r);if(c=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return o("",{"":t})}),"function"!=typeof t.parse&&(t.parse=function(){function t(t){return t.replace(/\\(?:u(.{4})|([^u]))/g,function(t,e,r){return e?String.fromCharCode(parseInt(e,16)):a[r]})}var e,r,n,o,i,a={"\\":"\\",'"':'"',"/":"/",t:"\t",n:"\n",r:"\r",f:"\f",b:"\b"},s={go:function(){e="ok"},firstokey:function(){o=i,e="colon"},okey:function(){o=i,e="colon"},ovalue:function(){e="ocomma"},firstavalue:function(){e="acomma"},avalue:function(){e="acomma"}},u={go:function(){e="ok"},ovalue:function(){e="ocomma"},firstavalue:function(){e="acomma"},avalue:function(){e="acomma"}},c={"{":{go:function(){r.push({state:"ok"}),n={},e="firstokey"},ovalue:function(){r.push({container:n,state:"ocomma",key:o}),n={},e="firstokey"},firstavalue:function(){r.push({container:n,state:"acomma"}),n={},e="firstokey"},avalue:function(){r.push({container:n,state:"acomma"}),n={},e="firstokey"}},"}":{firstokey:function(){var t=r.pop();i=n,n=t.container,o=t.key,e=t.state},ocomma:function(){var t=r.pop();n[o]=i,i=n,n=t.container,o=t.key,e=t.state}},"[":{go:function(){r.push({state:"ok"}),n=[],e="firstavalue"},ovalue:function(){r.push({container:n,state:"ocomma",key:o}),n=[],e="firstavalue"},firstavalue:function(){r.push({container:n,state:"acomma"}),n=[],e="firstavalue"},avalue:function(){r.push({container:n,state:"acomma"}),n=[],e="firstavalue"}},"]":{firstavalue:function(){var t=r.pop();i=n,n=t.container,o=t.key,e=t.state},acomma:function(){var t=r.pop();n.push(i),i=n,n=t.container,o=t.key,e=t.state}},":":{colon:function(){if(Object.hasOwnProperty.call(n,o))throw new SyntaxError("Duplicate key '"+o+'"');e="ovalue"}},",":{ocomma:function(){n[o]=i,e="okey"},acomma:function(){n.push(i),e="avalue"}},true:{go:function(){i=!0,e="ok"},ovalue:function(){i=!0,e="ocomma"},firstavalue:function(){i=!0,e="acomma"},avalue:function(){i=!0,e="acomma"}},false:{go:function(){i=!1,e="ok"},ovalue:function(){i=!1,e="ocomma"},firstavalue:function(){i=!1,e="acomma"},avalue:function(){i=!1,e="acomma"}},null:{go:function(){i=null,e="ok"},ovalue:function(){i=null,e="ocomma"},firstavalue:function(){i=null,e="acomma"},avalue:function(){i=null,e="acomma"}}};return function(n,o){var a,l=/^[\u0020\t\n\r]*(?:([,:\[\]{}]|true|false|null)|(-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)|"((?:[^\r\n\t\\\"]|\\(?:["\\\/trnfb]|u[0-9a-fA-F]{4}))*)")/;e="go",r=[];try{for(;;){if(a=l.exec(n),!a)break;a[1]?c[a[1]][e]():a[2]?(i=+a[2],u[e]()):(i=t(a[3]),s[e]()),n=n.slice(a[0].length)}}catch(t){e=t}if("ok"!==e||/[^\u0020\t\n\r]/.test(n))throw e instanceof SyntaxError?e:new SyntaxError("JSON");return"function"==typeof o?function t(e,r){var n,a,s=e[r];if(s&&"object"==typeof s)for(n in i)Object.prototype.hasOwnProperty.call(s,n)&&(a=t(s,n),void 0!==a?s[n]=a:delete s[n]);return o.call(e,r,s)}({"":i},""):i}}())};t.exports=r},function(t,e,r){"use strict";function n(t,e){this.queue=t,this.options=e,this.transforms=[]}var o=r(6);n.prototype.configure=function(t){this.queue&&this.queue.configure(t);var e=this.options;return this.options=o.merge(e,t),this},n.prototype.addTransform=function(t){return o.isFunction(t)&&this.transforms.push(t),this},n.prototype.log=function(t,e){if(e&&o.isFunction(e)||(e=function(){}),!this.options.enabled)return e(new Error("Rollbar is not enabled"));this.queue.addPendingItem(t);var r=t.err;this._applyTransforms(t,function(n,o){return n?(this.queue.removePendingItem(t),e(n,null)):void this.queue.addItem(o,e,r,t)}.bind(this))},n.prototype._applyTransforms=function(t,e){var r=-1,n=this.transforms.length,o=this.transforms,i=this.options,a=function(t,s){return t?void e(t,null):(r++,r===n?void e(null,s):void o[r](s,i,a))};a(null,t)},t.exports=n},function(t,e,r){"use strict";function n(t){this.queue=[],this.options=i.merge(t);var e=this.options.maxTelemetryEvents||a;this.maxQueueSize=Math.max(0,Math.min(e,a))}function o(t,e){if(e)return e;var r={error:"error",manual:"info"};return r[t]||"info"}var i=r(6),a=100;n.prototype.configure=function(t){var e=this.options;this.options=i.merge(e,t);var r=this.options.maxTelemetryEvents||a,n=Math.max(0,Math.min(r,a)),o=0;this.maxQueueSize>n&&(o=this.maxQueueSize-n),this.maxQueueSize=n,this.queue.splice(0,o)},n.prototype.copyEvents=function(){return Array.prototype.slice.call(this.queue,0)},n.prototype.capture=function(t,e,r,n,a){var s={level:o(t,r),type:t,timestamp_ms:a||i.now(),body:e,source:"client"};n&&(s.uuid=n);try{if(i.isFunction(this.options.filterTelemetry)&&this.options.filterTelemetry(s))return!1}catch(t){this.options.filterTelemetry=null}return this.push(s),s},n.prototype.captureEvent=function(t,e,r){return this.capture("manual",t,e,r)},n.prototype.captureError=function(t,e,r,n){var o={message:t.message||String(t)};return t.stack&&(o.stack=t.stack),this.capture("error",o,e,r,n)},n.prototype.captureLog=function(t,e,r,n){return this.capture("log",{message:t},e,r,n)},n.prototype.captureNetwork=function(t,e,r,n){e=e||"xhr",t.subtype=t.subtype||e,n&&(t.request=n);var o=this.levelFromStatus(t.status_code);return this.capture("network",t,o,r)},n.prototype.levelFromStatus=function(t){return t>=200&&t<400?"info":0===t||t>=400?"error":"info"},n.prototype.captureDom=function(t,e,r,n,o){var i={subtype:t,element:e};return void 0!==r&&(i.value=r),void 0!==n&&(i.checked=n),this.capture("dom",i,"info",o)},n.prototype.captureNavigation=function(t,e,r){return this.capture("navigation",{from:t,to:e},"info",r)},n.prototype.captureDomContentLoaded=function(t){return this.capture("navigation",{subtype:"DOMContentLoaded"},"info",void 0,t&&t.getTime())},n.prototype.captureLoad=function(t){return this.capture("navigation",{subtype:"load"},"info",void 0,t&&t.getTime())},n.prototype.captureConnectivityChange=function(t,e){return this.captureNetwork({change:t},"connectivity",e)},n.prototype._captureRollbarItem=function(t){if(this.options.includeItemsInTelemetry)return t.err?this.captureError(t.err,t.level,t.uuid,t.timestamp):t.message?this.captureLog(t.message,t.level,t.uuid,t.timestamp):t.custom?this.capture("log",t.custom,t.level,t.uuid,t.timestamp):void 0},n.prototype.push=function(t){this.queue.push(t),this.queue.length>this.maxQueueSize&&this.queue.shift()},t.exports=n},function(t,e,r){"use strict";function n(t,e,r,n){this.options=t,this.transport=e,this.url=r,this.jsonBackup=n,this.accessToken=t.accessToken,this.transportOptions=o(t,r)}function o(t,e){return a.getTransportFromOptions(t,s,e)}var i=r(6),a=r(12),s={hostname:"api.rollbar.com",path:"/api/1/item/",search:null,version:"1",protocol:"https:",port:443};n.prototype.postItem=function(t,e){var r=a.transportOptions(this.transportOptions,"POST"),n=a.buildPayload(this.accessToken,t,this.jsonBackup);this.transport.post(this.accessToken,r,n,e)},n.prototype.configure=function(t){var e=this.oldOptions;return this.options=i.merge(e,t),this.transportOptions=o(this.options,this.url),void 0!==this.options.accessToken&&(this.accessToken=this.options.accessToken),this},t.exports=n},function(t,e,r){"use strict";function n(t,e,r){if(!s.isType(e.context,"string")){var n=s.stringify(e.context,r);n.error?e.context="Error: could not serialize 'context'":e.context=n.value||"",e.context.length>255&&(e.context=e.context.substr(0,255))}return{access_token:t,data:e}}function o(t,e,r){var n=e.hostname,o=e.protocol,i=e.port,a=e.path,s=e.search,u=t.proxy;if(t.endpoint){var c=r.parse(t.endpoint);n=c.hostname,o=c.protocol,i=c.port,a=c.pathname,s=c.search}return{hostname:n,protocol:o,port:i,path:a,search:s,proxy:u}}function i(t,e){var r=t.protocol||"https:",n=t.port||("http:"===r?80:"https:"===r?443:void 0),o=t.hostname,i=t.path;return t.search&&(i+=t.search),t.proxy&&(i=r+"//"+o+i,o=t.proxy.host||t.proxy.hostname,n=t.proxy.port,r=t.proxy.protocol||r),{protocol:r,hostname:o,path:i,port:n,method:e}}function a(t,e){var r=/\/$/.test(t),n=/^\//.test(e);return r&&n?e=e.substring(1):r||n||(e="/"+e),t+e}var s=r(6);t.exports={buildPayload:n,getTransportFromOptions:o,transportOptions:i,appendPathToPath:a}},function(t,e,r){"use strict";function n(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.error(s.formatArgsAsString(t)):console.error.apply(console,t)}function o(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.info(s.formatArgsAsString(t)):console.info.apply(console,t)}function i(){var t=Array.prototype.slice.call(arguments,0);t.unshift("Rollbar:"),a.ieVersion()<=8?console.log(s.formatArgsAsString(t)):console.log.apply(console,t)}r(14);var a=r(15),s=r(6);t.exports={error:n,info:o,log:i}},function(t,e){!function(t){
-"use strict";t.console||(t.console={});for(var e,r,n=t.console,o=function(){},i=["memory"],a="assert,clear,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profiles,profileEnd,show,table,time,timeEnd,timeline,timelineEnd,timeStamp,trace,warn".split(",");e=i.pop();)n[e]||(n[e]={});for(;r=a.pop();)n[r]||(n[r]=o)}("undefined"==typeof window?this:window)},function(t,e){"use strict";function r(){var t;if(!document)return t;for(var e=3,r=document.createElement("div"),n=r.getElementsByTagName("i");r.innerHTML="<!--[if gt IE "+ ++e+"]><i></i><![endif]-->",n[0];);return e>4?e:t}var n={ieVersion:r};t.exports=n},function(t,e){"use strict";function r(t,e,r){if(t){var o;"function"==typeof e._rollbarOldOnError?o=e._rollbarOldOnError:t.onerror&&!t.onerror.belongsToShim&&(o=t.onerror,e._rollbarOldOnError=o);var i=function(){var r=Array.prototype.slice.call(arguments,0);n(t,e,o,r)};i.belongsToShim=r,t.onerror=i}}function n(t,e,r,n){t._rollbarWrappedError&&(n[4]||(n[4]=t._rollbarWrappedError),n[5]||(n[5]=t._rollbarWrappedError._rollbarContext),t._rollbarWrappedError=null),e.handleUncaughtException.apply(e,n),r&&r.apply(t,n)}function o(t,e,r){if(t){"function"==typeof t._rollbarURH&&t._rollbarURH.belongsToShim&&t.removeEventListener("unhandledrejection",t._rollbarURH);var n=function(t){var r,n,o;try{r=t.reason}catch(t){r=void 0}try{n=t.promise}catch(t){n="[unhandledrejection] error getting `promise` from event"}try{o=t.detail,!r&&o&&(r=o.reason,n=o.promise)}catch(t){o="[unhandledrejection] error getting `detail` from event"}r||(r="[unhandledrejection] error getting `reason` from event"),e&&e.handleUnhandledRejection&&e.handleUnhandledRejection(r,n)};n.belongsToShim=r,t._rollbarURH=n,t.addEventListener("unhandledrejection",n)}}function i(t,e,r){if(t){var n,o,i="EventTarget,Window,Node,ApplicationCache,AudioTrackList,ChannelMergerNode,CryptoOperation,EventSource,FileReader,HTMLUnknownElement,IDBDatabase,IDBRequest,IDBTransaction,KeyOperation,MediaController,MessagePort,ModalWindow,Notification,SVGElementInstance,Screen,TextTrack,TextTrackCue,TextTrackList,WebSocket,WebSocketWorker,Worker,XMLHttpRequest,XMLHttpRequestEventTarget,XMLHttpRequestUpload".split(",");for(n=0;n<i.length;++n)o=i[n],t[o]&&t[o].prototype&&a(e,t[o].prototype,r)}}function a(t,e,r){if(e.hasOwnProperty&&e.hasOwnProperty("addEventListener")){for(var n=e.addEventListener;n._rollbarOldAdd&&n.belongsToShim;)n=n._rollbarOldAdd;var o=function(e,r,o){n.call(this,e,t.wrap(r),o)};o._rollbarOldAdd=n,o.belongsToShim=r,e.addEventListener=o;for(var i=e.removeEventListener;i._rollbarOldRemove&&i.belongsToShim;)i=i._rollbarOldRemove;var a=function(t,e,r){i.call(this,t,e&&e._rollbar_wrapped||e,r)};a._rollbarOldRemove=i,a.belongsToShim=r,e.removeEventListener=a}}t.exports={captureUncaughtExceptions:r,captureUnhandledRejections:o,wrapGlobals:i}},function(t,e,r){"use strict";function n(t,e,r,n,o){n&&l.isFunction(n)||(n=function(){}),l.addParamsAndAccessTokenToPath(t,e,r);var a="GET",s=l.formatUrl(e);i(t,s,a,null,n,o)}function o(t,e,r,n,o){if(n&&l.isFunction(n)||(n=function(){}),!r)return n(new Error("Cannot send empty request"));var a=p.truncate(r);if(a.error)return n(a.error);var s=a.value,u="POST",c=l.formatUrl(e);i(t,c,u,s,n,o)}function i(t,e,r,n,o,i){var p;if(p=i?i():a(),!p)return o(new Error("No way to send a request"));try{try{var h=function(){try{if(h&&4===p.readyState){h=void 0;var t=l.jsonParse(p.responseText);if(s(p))return void o(t.error,t.value);if(u(p)){if(403===p.status){var e=t.value&&t.value.message;f.error(e)}o(new Error(String(p.status)))}else{var r="XHR response had no status code (likely connection failure)";o(c(r))}}}catch(t){var n;n=t&&t.stack?t:new Error(t),o(n)}};p.open(r,e,!0),p.setRequestHeader&&(p.setRequestHeader("Content-Type","application/json"),p.setRequestHeader("X-Rollbar-Access-Token",t)),p.onreadystatechange=h,p.send(n)}catch(t){if("undefined"!=typeof XDomainRequest){if(!window||!window.location)return o(new Error("No window available during request, unknown environment"));"http:"===window.location.href.substring(0,5)&&"https"===e.substring(0,5)&&(e="http"+e.substring(5));var d=new XDomainRequest;d.onprogress=function(){},d.ontimeout=function(){var t="Request timed out",e="ETIMEDOUT";o(c(t,e))},d.onerror=function(){o(new Error("Error during request"))},d.onload=function(){var t=l.jsonParse(d.responseText);o(t.error,t.value)},d.open(r,e,!0),d.send(n)}else o(new Error("Cannot find a method to transport a request"))}}catch(t){o(t)}}function a(){var t,e,r=[function(){return new XMLHttpRequest},function(){return new ActiveXObject("Msxml2.XMLHTTP")},function(){return new ActiveXObject("Msxml3.XMLHTTP")},function(){return new ActiveXObject("Microsoft.XMLHTTP")}],n=r.length;for(e=0;e<n;e++)try{t=r[e]();break}catch(t){}return t}function s(t){return t&&t.status&&200===t.status}function u(t){return t&&l.isType(t.status,"number")&&t.status>=400&&t.status<600}function c(t,e){var r=new Error(t);return r.code=e||"ENOTFOUND",r}var l=r(6),p=r(18),f=r(13);t.exports={get:n,post:o}},function(t,e,r){"use strict";function n(t,e){return[t,f.stringify(t,e)]}function o(t,e){var r=t.length;return r>2*e?t.slice(0,e).concat(t.slice(r-e)):t}function i(t,e,r){r="undefined"==typeof r?30:r;var n,i=t.data.body;if(i.trace_chain)for(var a=i.trace_chain,s=0;s<a.length;s++)n=a[s].frames,n=o(n,r),a[s].frames=n;else i.trace&&(n=i.trace.frames,n=o(n,r),i.trace.frames=n);return[t,f.stringify(t,e)]}function a(t,e){return e&&e.length>t?e.slice(0,t-3).concat("..."):e}function s(t,e,r){function n(e,r,o){switch(f.typeName(r)){case"string":return a(t,r);case"object":case"array":return f.traverse(r,n,o);default:return r}}return e=f.traverse(e,n,[]),[e,f.stringify(e,r)]}function u(t){return t.exception&&(delete t.exception.description,t.exception.message=a(255,t.exception.message)),t.frames=o(t.frames,1),t}function c(t,e){var r=t.data.body;if(r.trace_chain)for(var n=r.trace_chain,o=0;o<n.length;o++)n[o]=u(n[o]);else r.trace&&(r.trace=u(r.trace));return[t,f.stringify(t,e)]}function l(t,e){return t.length>e}function p(t,e,r){r="undefined"==typeof r?524288:r;for(var o,a,u,p=[n,i,s.bind(null,1024),s.bind(null,512),s.bind(null,256),c];o=p.shift();)if(a=o(t,e),t=a[0],u=a[1],u.error||!l(u.value,r))return u;return u}var f=r(6);t.exports={truncate:p,raw:n,truncateFrames:i,truncateStrings:s,maybeTruncateValue:a}},function(t,e){"use strict";function r(t){var e,r,n={protocol:null,auth:null,host:null,path:null,hash:null,href:t,hostname:null,port:null,pathname:null,search:null,query:null};if(e=t.indexOf("//"),e!==-1?(n.protocol=t.substring(0,e),r=e+2):r=0,e=t.indexOf("@",r),e!==-1&&(n.auth=t.substring(r,e),r=e+1),e=t.indexOf("/",r),e===-1){if(e=t.indexOf("?",r),e===-1)return e=t.indexOf("#",r),e===-1?n.host=t.substring(r):(n.host=t.substring(r,e),n.hash=t.substring(e)),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),n;n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e}else n.host=t.substring(r,e),n.hostname=n.host.split(":")[0],n.port=n.host.split(":")[1],n.port&&(n.port=parseInt(n.port,10)),r=e;if(e=t.indexOf("#",r),e===-1?n.path=t.substring(r):(n.path=t.substring(r,e),n.hash=t.substring(e)),n.path){var o=n.path.split("?");n.pathname=o[0],n.query=o[1],n.search=n.query?"?"+n.query:null}return n}t.exports={parse:r}},function(t,e,r){"use strict";function n(t,e,r){if(t.data=t.data||{},t.err)try{t.stackInfo=t.err._savedStackTrace||d.parse(t.err)}catch(e){m.error("Error while parsing the error object.",e);try{t.message=t.err.message||t.err.description||t.message||String(t.err)}catch(e){t.message=String(t.err)||String(e)}delete t.err}r(null,t)}function o(t,e,r){t.message||t.stackInfo||t.custom||r(new Error("No message, stack info, or custom data"),null),r(null,t)}function i(t,e,r){var n=e.payload&&e.payload.environment||e.environment;t.data=h.merge(t.data,{environment:n,level:t.level,endpoint:e.endpoint,platform:"browser",framework:"browser-js",language:"javascript",server:{},uuid:t.uuid,notifier:{name:"rollbar-browser-js",version:e.version}}),r(null,t)}function a(t){return function(e,r,n){if(!t||!t.location)return n(null,e);var o="$remote_ip";r.captureIp?r.captureIp!==!0&&(o+="_anonymize"):o=null,h.set(e,"data.request",{url:t.location.href,query_string:t.location.search,user_ip:o}),n(null,e)}}function s(t){return function(e,r,n){if(!t)return n(null,e);var o=t.navigator||{},i=t.screen||{};h.set(e,"data.client",{runtime_ms:e.timestamp-t._rollbarStartTime,timestamp:Math.round(e.timestamp/1e3),javascript:{browser:o.userAgent,language:o.language,cookie_enabled:o.cookieEnabled,screen:{width:i.width,height:i.height}}}),n(null,e)}}function u(t){return function(e,r,n){if(!t||!t.navigator)return n(null,e);for(var o,i=[],a=t.navigator.plugins||[],s=0,u=a.length;s<u;++s)o=a[s],i.push({name:o.name,description:o.description});h.set(e,"data.client.javascript.plugins",i),n(null,e)}}function c(t,e,r){t.stackInfo?p(t,e,r):l(t,e,r)}function l(t,e,r){var n=t.message,o=t.custom;if(!n)if(o){var i=e.scrubFields,a=h.stringify(h.scrub(o,i));n=a.error||a.value||""}else n="";var s={body:n};o&&(s.extra=h.merge(o)),h.set(t,"data.body",{message:s}),r(null,t)}function p(t,e,r){var n=t.data.description,o=t.stackInfo,i=t.custom,a=d.guessErrorClass(o.message),s=o.name||a[0],u=a[1],c={exception:{class:s,message:u}};n&&(c.exception.description=n);var p=o.stack;if(p&&0===p.length&&t._unhandledStackInfo&&t._unhandledStackInfo.stack&&(p=t._unhandledStackInfo.stack),p){0===p.length&&(c.exception.stack=o.rawStack,c.exception.raw=String(o.rawException));var f,m,g,v,y,b,w,_;for(c.frames=[],w=0;w<p.length;++w)f=p[w],m={filename:f.url?h.sanitizeUrl(f.url):"(unknown)",lineno:f.line||null,method:f.func&&"?"!==f.func?f.func:"[anonymous]",colno:f.column},m.method&&m.method.endsWith&&m.method.endsWith("_rollbar_wrapped")||(g=v=y=null,b=f.context?f.context.length:0,b&&(_=Math.floor(b/2),v=f.context.slice(0,_),g=f.context[_],y=f.context.slice(_)),g&&(m.code=g),(v||y)&&(m.context={},v&&v.length&&(m.context.pre=v),y&&y.length&&(m.context.post=y)),f.args&&(m.args=f.args),c.frames.push(m));c.frames.reverse(),i&&(c.extra=h.merge(i)),h.set(t,"data.body",{trace:c}),r(null,t)}else t.message=s+": "+u,l(t,e,r)}function f(t,e,r){var n=e.scrubFields;t.data=h.scrub(t.data,n),r(null,t)}var h=r(6),d=r(21),m=r(13);t.exports={handleItemWithError:n,ensureItemHasSomethingToSay:o,addBaseInfo:i,addRequestInfo:a,addClientInfo:s,addPluginInfo:u,addBody:c,scrubPayload:f}},function(t,e,r){"use strict";function n(){return l}function o(){return null}function i(t){var e={};return e._stackFrame=t,e.url=t.fileName,e.line=t.lineNumber,e.func=t.functionName,e.column=t.columnNumber,e.args=t.args,e.context=o(e.url,e.line),e}function a(t){function e(){var e,r=[];if(t.stack)e=t;else try{throw t}catch(t){e=t}try{r=c.parse(e)}catch(t){r=[]}for(var n=[],o=0;o<r.length;o++)n.push(new i(r[o]));return n}return{stack:e(),message:t.message,name:t.name,rawStack:t.stack,rawException:t}}function s(t){return new a(t)}function u(t){if(!t||!t.match)return["Unknown error. There was no error message to display.",""];var e=t.match(p),r="(unknown)";return e&&(r=e[e.length-1],t=t.replace((e[e.length-2]||"")+r+":",""),t=t.replace(/(^[\s]+|[\s]+$)/g,"")),[r,t]}var c=r(22),l="?",p=new RegExp("^(([a-zA-Z0-9-_$ ]*): *)?(Uncaught )?([a-zA-Z0-9-_$ ]*): ");t.exports={guessFunctionName:n,guessErrorClass:u,gatherContext:o,parse:s,Stack:a,Frame:i}},function(t,e,r){var n,o,i;!function(a,s){"use strict";o=[r(23)],n=s,i="function"==typeof n?n.apply(e,o):n,!(void 0!==i&&(t.exports=i))}(this,function(t){"use strict";function e(t,e,r){if("function"==typeof Array.prototype.map)return t.map(e,r);for(var n=new Array(t.length),o=0;o<t.length;o++)n[o]=e.call(r,t[o]);return n}function r(t,e,r){if("function"==typeof Array.prototype.filter)return t.filter(e,r);for(var n=[],o=0;o<t.length;o++)e.call(r,t[o])&&n.push(t[o]);return n}var n=/(^|@)\S+\:\d+/,o=/^\s*at .*(\S+\:\d+|\(native\))/m,i=/^(eval@)?(\[native code\])?$/;return{parse:function(t){if("undefined"!=typeof t.stacktrace||"undefined"!=typeof t["opera#sourceloc"])return this.parseOpera(t);if(t.stack&&t.stack.match(o))return this.parseV8OrIE(t);if(t.stack)return this.parseFFOrSafari(t);throw new Error("Cannot parse given Error object")},extractLocation:function(t){if(t.indexOf(":")===-1)return[t];var e=t.replace(/[\(\)\s]/g,"").split(":"),r=e.pop(),n=e[e.length-1];if(!isNaN(parseFloat(n))&&isFinite(n)){var o=e.pop();return[e.join(":"),o,r]}return[e.join(":"),r,void 0]},parseV8OrIE:function(n){var i=r(n.stack.split("\n"),function(t){return!!t.match(o)},this);return e(i,function(e){e.indexOf("(eval ")>-1&&(e=e.replace(/eval code/g,"eval").replace(/(\(eval at [^\()]*)|(\)\,.*$)/g,""));var r=e.replace(/^\s+/,"").replace(/\(eval code/g,"(").split(/\s+/).slice(1),n=this.extractLocation(r.pop()),o=r.join(" ")||void 0,i="eval"===n[0]?void 0:n[0];return new t(o,void 0,i,n[1],n[2],e)},this)},parseFFOrSafari:function(n){var o=r(n.stack.split("\n"),function(t){return!t.match(i)},this);return e(o,function(e){if(e.indexOf(" > eval")>-1&&(e=e.replace(/ line (\d+)(?: > eval line \d+)* > eval\:\d+\:\d+/g,":$1")),e.indexOf("@")===-1&&e.indexOf(":")===-1)return new t(e);var r=e.split("@"),n=this.extractLocation(r.pop()),o=r.shift()||void 0;return new t(o,void 0,n[0],n[1],n[2],e)},this)},parseOpera:function(t){return!t.stacktrace||t.message.indexOf("\n")>-1&&t.message.split("\n").length>t.stacktrace.split("\n").length?this.parseOpera9(t):t.stack?this.parseOpera11(t):this.parseOpera10(t)},parseOpera9:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)/i,n=e.message.split("\n"),o=[],i=2,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new t(void 0,void 0,s[2],s[1],void 0,n[i]))}return o},parseOpera10:function(e){for(var r=/Line (\d+).*script (?:in )?(\S+)(?:: In function (\S+))?$/i,n=e.stacktrace.split("\n"),o=[],i=0,a=n.length;i<a;i+=2){var s=r.exec(n[i]);s&&o.push(new t(s[3]||void 0,void 0,s[2],s[1],void 0,n[i]))}return o},parseOpera11:function(o){var i=r(o.stack.split("\n"),function(t){return!!t.match(n)&&!t.match(/^Error created at/)},this);return e(i,function(e){var r,n=e.split("@"),o=this.extractLocation(n.pop()),i=n.shift()||"",a=i.replace(/<anonymous function(: (\w+))?>/,"$2").replace(/\([^\)]*\)/g,"")||void 0;i.match(/\(([^\)]*)\)/)&&(r=i.replace(/^[^\(]+\(([^\)]*)\)$/,"$1"));var s=void 0===r||"[arguments not available]"===r?void 0:r.split(",");return new t(a,s,o[0],o[1],o[2],e)},this)}}})},function(t,e,r){var n,o,i;!function(r,a){"use strict";o=[],n=a,i="function"==typeof n?n.apply(e,o):n,!(void 0!==i&&(t.exports=i))}(this,function(){"use strict";function t(t){return!isNaN(parseFloat(t))&&isFinite(t)}function e(t,e,r,n,o,i){void 0!==t&&this.setFunctionName(t),void 0!==e&&this.setArgs(e),void 0!==r&&this.setFileName(r),void 0!==n&&this.setLineNumber(n),void 0!==o&&this.setColumnNumber(o),void 0!==i&&this.setSource(i)}return e.prototype={getFunctionName:function(){return this.functionName},setFunctionName:function(t){this.functionName=String(t)},getArgs:function(){return this.args},setArgs:function(t){if("[object Array]"!==Object.prototype.toString.call(t))throw new TypeError("Args must be an Array");this.args=t},getFileName:function(){return this.fileName},setFileName:function(t){this.fileName=String(t)},getLineNumber:function(){return this.lineNumber},setLineNumber:function(e){if(!t(e))throw new TypeError("Line Number must be a Number");this.lineNumber=Number(e)},getColumnNumber:function(){return this.columnNumber},setColumnNumber:function(e){if(!t(e))throw new TypeError("Column Number must be a Number");this.columnNumber=Number(e)},getSource:function(){return this.source},setSource:function(t){this.source=String(t)},toString:function(){var e=this.getFunctionName()||"{anonymous}",r="("+(this.getArgs()||[]).join(",")+")",n=this.getFileName()?"@"+this.getFileName():"",o=t(this.getLineNumber())?":"+this.getLineNumber():"",i=t(this.getColumnNumber())?":"+this.getColumnNumber():"";return e+r+n+o+i}},e})},function(t,e,r){"use strict";function n(t,e,r){var n=e.payload||{};n.body&&delete n.body;var o=u.merge(t.data,n);t._isUncaught&&(o._isUncaught=!0),t._originalArgs&&(o._originalArgs=t._originalArgs),r(null,o)}function o(t,e,r){t.telemetryEvents&&u.set(t,"data.body.telemetry",t.telemetryEvents),r(null,t)}function i(t,e,r){if(!t.message)return void r(null,t);var n="data.body.trace_chain.0",o=u.get(t,n);if(o||(n="data.body.trace",o=u.get(t,n)),o){if(!o.exception||!o.exception.description)return u.set(t,n+".exception.description",t.message),void r(null,t);var i=u.get(t,n+".extra")||{},a=u.merge(i,{message:t.message});u.set(t,n+".extra",a)}r(null,t)}function a(t){return function(e,r,n){var o=u.merge(e);try{u.isFunction(r.transform)&&r.transform(o.data)}catch(o){return r.transform=null,t.error("Error while calling custom transform() function. Removing custom transform().",o),void n(null,e)}n(null,o)}}function s(t,e,r){if(!e.sendConfig)return r(null,t);var n="_rollbarConfig",o=u.get(t,"data.custom")||{};o[n]=e,t.data.custom=o,r(null,t)}var u=r(6);t.exports={itemToPayload:n,addTelemetryData:o,addMessageWithError:i,userTransform:a,addConfigToPayload:s}},function(t,e,r){"use strict";function n(t,e){return!o.get(e,"plugins.jquery.ignoreAjaxErrors")||!o.get(t,"body.message.extra.isAjax")}var o=r(6);t.exports={checkIgnore:n}},function(t,e,r){"use strict";function n(t,e){var r=t.level,n=c.LEVELS[r]||0,o=e.reportLevel,i=c.LEVELS[o]||0;return!(n<i)}function o(t){return function(e,r){var n=!!e._isUncaught;delete e._isUncaught;var o=e._originalArgs;delete e._originalArgs;try{c.isFunction(r.onSendCallback)&&r.onSendCallback(n,o,e)}catch(e){r.onSendCallback=null,t.error("Error while calling onSendCallback, removing",e)}try{if(c.isFunction(r.checkIgnore)&&r.checkIgnore(n,o,e))return!1}catch(e){r.checkIgnore=null,t.error("Error while calling custom checkIgnore(), removing",e)}return!0}}function i(t){return function(e,r){return!s(e,r,"blacklist",t)}}function a(t){return function(e,r){return s(e,r,"whitelist",t)}}function s(t,e,r,n){var o=!1;"blacklist"===r&&(o=!0);var i,a,s,u,l,p,f,h,d,m;try{if(i=o?e.hostBlackList:e.hostWhiteList,f=i&&i.length,a=c.get(t,"body.trace"),!i||0===f)return!o;if(!a||!a.frames||0===a.frames.length)return!o;for(l=a.frames.length,d=0;d<l;d++){if(s=a.frames[d],u=s.filename,!c.isType(u,"string"))return!o;for(m=0;m<f;m++)if(p=i[m],h=new RegExp(p),h.test(u))return!0}}catch(t){o?e.hostBlackList=null:e.hostWhiteList=null;var g=o?"hostBlackList":"hostWhiteList";return n.error("Error while reading your configuration's "+g+" option. Removing custom "+g+".",t),!o}return!1}function u(t){return function(e,r){var n,o,i,a,s,u,l,p,f;try{if(s=!1,i=r.ignoredMessages,!i||0===i.length)return!0;if(l=e.body,p=c.get(l,"trace.exception.message"),f=c.get(l,"message.body"),n=p||f,!n)return!0;for(a=i.length,o=0;o<a&&(u=new RegExp(i[o],"gi"),!(s=u.test(n)));o++);}catch(e){r.ignoredMessages=null,t.error("Error while reading your configuration's ignoredMessages option. Removing custom ignoredMessages.")}return!s}}var c=r(6);t.exports={checkLevel:n,userCheckIgnore:o,urlIsNotBlacklisted:i,urlIsWhitelisted:a,messageIsIgnored:u}},function(t,e,r){"use strict";function n(t,e,r,n,o){var i=t[e];t[e]=r(i),n&&n[o].push([t,e,i])}function o(t,e){for(var r;t[e].length;)r=t[e].shift(),r[0][r[1]]=r[2]}function i(t){if(!t||!t.attributes)return null;for(var e=t.attributes,r=0;r<e.length;++r)if("name"===e[r].key)return e[r].value;return null}function a(t){for(var e=[],r=0;r<t.length;++r)e.push(new RegExp(t[r],"i"));return function(t){var r=i(t);if(!r)return!1;for(var n=0;n<e.length;++n)if(e[n].test(r))return!0;return!1}}function s(t,e,r,n,o){var i=t.autoInstrument;t.enabled===!1||i===!1?this.autoInstrument={}:(u.isType(i,"object")||(i=p),this.autoInstrument=u.merge(p,i)),this.scrubTelemetryInputs=!!t.scrubTelemetryInputs,this.telemetryScrubber=t.telemetryScrubber,this.defaultValueScrubber=a(t.scrubFields),this.telemeter=e,this.rollbar=r,this._window=n||{},this._document=o||{},this.replacements={network:[],log:[],navigation:[],connectivity:[]},this.eventRemovers={dom:[],connectivity:[]},this._location=this._window.location,this._lastHref=this._location&&this._location.href}var u=r(6),c=r(19),l=r(28),p={network:!0,networkResponseHeaders:!1,networkResponseBody:!1,networkRequestBody:!1,log:!0,dom:!0,navigation:!0,connectivity:!0};s.prototype.configure=function(t){var e=t.autoInstrument,r=u.merge(this.autoInstrument);t.enabled===!1||e===!1?this.autoInstrument={}:(u.isType(e,"object")||(e=p),this.autoInstrument=u.merge(p,e)),this.instrument(r),void 0!==t.scrubTelemetryInputs&&(this.scrubTelemetryInputs=!!t.scrubTelemetryInputs),void 0!==t.telemetryScrubber&&(this.telemetryScrubber=t.telemetryScrubber)},s.prototype.instrument=function(t){!this.autoInstrument.network||t&&t.network?!this.autoInstrument.network&&t&&t.network&&this.deinstrumentNetwork():this.instrumentNetwork(),!this.autoInstrument.log||t&&t.log?!this.autoInstrument.log&&t&&t.log&&this.deinstrumentConsole():this.instrumentConsole(),!this.autoInstrument.dom||t&&t.dom?!this.autoInstrument.dom&&t&&t.dom&&this.deinstrumentDom():this.instrumentDom(),!this.autoInstrument.navigation||t&&t.navigation?!this.autoInstrument.navigation&&t&&t.navigation&&this.deinstrumentNavigation():this.instrumentNavigation(),!this.autoInstrument.connectivity||t&&t.connectivity?!this.autoInstrument.connectivity&&t&&t.connectivity&&this.deinstrumentConnectivity():this.instrumentConnectivity()},s.prototype.deinstrumentNetwork=function(){o(this.replacements,"network")},s.prototype.instrumentNetwork=function(){function t(t,r){t in r&&u.isFunction(r[t])&&n(r,t,function(t){return e.rollbar.wrap(t)})}var e=this;if("XMLHttpRequest"in this._window){var r=this._window.XMLHttpRequest.prototype;n(r,"open",function(t){return function(e,r){return u.isType(r,"string")&&(this.__rollbar_xhr={method:e,url:r,status_code:null,start_time_ms:u.now(),end_time_ms:null}),t.apply(this,arguments)}},this.replacements,"network"),n(r,"send",function(r){return function(o){function i(){if(a.__rollbar_xhr&&(1===a.readyState||4===a.readyState)){if(null===a.__rollbar_xhr.status_code){a.__rollbar_xhr.status_code=0;var t=null;e.autoInstrument.networkRequestBody&&(t=o),a.__rollbar_event=e.telemeter.captureNetwork(a.__rollbar_xhr,"xhr",void 0,t)}if(1===a.readyState)a.__rollbar_xhr.start_time_ms=u.now();else{a.__rollbar_xhr.end_time_ms=u.now();var r=null;if(e.autoInstrument.networkResponseHeaders){var n=e.autoInstrument.networkResponseHeaders;r={};try{var i,s;if(n===!0){var c=a.getAllResponseHeaders();if(c){var l,p,f=c.trim().split(/[\r\n]+/);for(s=0;s<f.length;s++)l=f[s].split(": "),i=l.shift(),p=l.join(": "),r[i]=p}}else for(s=0;s<n.length;s++)i=n[s],r[i]=a.getResponseHeader(i)}catch(t){}}var h=null;if(e.autoInstrument.networkResponseBody)try{h=a.responseText}catch(t){}var d=null;(h||r)&&(d={},h&&(d.body=h),r&&(d.headers=r)),d&&(a.__rollbar_xhr.response=d)}try{var m=a.status;m=1223===m?204:m,a.__rollbar_xhr.status_code=m,a.__rollbar_event.level=e.telemeter.levelFromStatus(m)}catch(t){}}}var a=this;return t("onload",a),t("onerror",a),t("onprogress",a),"onreadystatechange"in a&&u.isFunction(a.onreadystatechange)?n(a,"onreadystatechange",function(t){return e.rollbar.wrap(t,void 0,i)}):a.onreadystatechange=i,r.apply(this,arguments)}},this.replacements,"network")}"fetch"in this._window&&n(this._window,"fetch",function(t){return function(r,n){for(var o=new Array(arguments.length),i=0,a=o.length;i<a;i++)o[i]=arguments[i];var s,c=o[0],l="GET";u.isType(c,"string")?s=c:c&&(s=c.url,c.method&&(l=c.method)),o[1]&&o[1].method&&(l=o[1].method);var p={method:l,url:s,status_code:null,start_time_ms:u.now(),end_time_ms:null},f=null;return e.autoInstrument.networkRequestBody&&(o[1]&&o[1].body?f=o[1].body:o[0]&&!u.isType(o[0],"string")&&o[0].body&&(f=o[0].body)),e.telemeter.captureNetwork(p,"fetch",void 0,f),t.apply(this,o).then(function(t){p.end_time_ms=u.now(),p.status_code=t.status;var r=null;if(e.autoInstrument.networkResponseHeaders){var n=e.autoInstrument.networkResponseHeaders;r={};try{if(n===!0);else for(var o=0;o<n.length;o++){var i=n[o];r[i]=t.headers.get(i)}}catch(t){}}var a=null;return r&&(a={headers:r}),a&&(p.response=a),t})}},this.replacements,"network")},s.prototype.deinstrumentConsole=function(){if("console"in this._window&&this._window.console.log)for(var t;this.replacements.log.length;)t=this.replacements.log.shift(),this._window.console[t[0]]=t[1]},s.prototype.instrumentConsole=function(){function t(t){var n=r[t],o=r,i="warn"===t?"warning":t;r[t]=function(){var t=Array.prototype.slice.call(arguments),r=u.formatArgsAsString(t);e.telemeter.captureLog(r,i),n&&Function.prototype.apply.call(n,o,t)},e.replacements.log.push([t,n])}if("console"in this._window&&this._window.console.log)for(var e=this,r=this._window.console,n=["debug","info","warn","error","log"],o=0,i=n.length;o<i;o++)t(n[o])},s.prototype.deinstrumentDom=function(){("addEventListener"in this._window||"attachEvent"in this._window)&&this.removeListeners("dom")},s.prototype.instrumentDom=function(){if("addEventListener"in this._window||"attachEvent"in this._window){var t=this.handleClick.bind(this),e=this.handleBlur.bind(this);this.addListener("dom",this._window,"click","onclick",t,!0),this.addListener("dom",this._window,"blur","onfocusout",e,!0)}},s.prototype.handleClick=function(t){try{var e=l.getElementFromEvent(t,this._document),r=e&&e.tagName,n=l.isDescribedElement(e,"a")||l.isDescribedElement(e,"button");r&&(n||l.isDescribedElement(e,"input",["button","submit"]))?this.captureDomEvent("click",e):l.isDescribedElement(e,"input",["checkbox","radio"])&&this.captureDomEvent("input",e,e.value,e.checked)}catch(t){}},s.prototype.handleBlur=function(t){try{var e=l.getElementFromEvent(t,this._document);e&&e.tagName&&(l.isDescribedElement(e,"textarea")?this.captureDomEvent("input",e,e.value):l.isDescribedElement(e,"select")&&e.options&&e.options.length?this.handleSelectInputChanged(e):l.isDescribedElement(e,"input")&&!l.isDescribedElement(e,"input",["button","submit","hidden","checkbox","radio"])&&this.captureDomEvent("input",e,e.value))}catch(t){}},s.prototype.handleSelectInputChanged=function(t){if(t.multiple)for(var e=0;e<t.options.length;e++)t.options[e].selected&&this.captureDomEvent("input",t,t.options[e].value);else t.selectedIndex>=0&&t.options[t.selectedIndex]&&this.captureDomEvent("input",t,t.options[t.selectedIndex].value)},s.prototype.captureDomEvent=function(t,e,r,n){if(void 0!==r)if(this.scrubTelemetryInputs||"password"===l.getElementType(e))r="[scrubbed]";else{var o=l.describeElement(e);this.telemetryScrubber?this.telemetryScrubber(o)&&(r="[scrubbed]"):this.defaultValueScrubber(o)&&(r="[scrubbed]")}var i=l.elementArrayToString(l.treeToArray(e));this.telemeter.captureDom(t,i,r,n)},s.prototype.deinstrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,r=!e&&this._window.history&&this._window.history.pushState;r&&o(this.replacements,"navigation")},s.prototype.instrumentNavigation=function(){var t=this._window.chrome,e=t&&t.app&&t.app.runtime,r=!e&&this._window.history&&this._window.history.pushState;if(r){var o=this;n(this._window,"onpopstate",function(t){return function(){var e=o._location.href;o.handleUrlChange(o._lastHref,e),t&&t.apply(this,arguments)}},this.replacements,"navigation"),n(this._window.history,"pushState",function(t){return function(){var e=arguments.length>2?arguments[2]:void 0;return e&&o.handleUrlChange(o._lastHref,e+""),t.apply(this,arguments)}},this.replacements,"navigation")}},s.prototype.handleUrlChange=function(t,e){var r=c.parse(this._location.href),n=c.parse(e),o=c.parse(t);this._lastHref=e,r.protocol===n.protocol&&r.host===n.host&&(e=n.path+(n.hash||"")),r.protocol===o.protocol&&r.host===o.host&&(t=o.path+(o.hash||"")),this.telemeter.captureNavigation(t,e)},s.prototype.deinstrumentConnectivity=function(){("addEventListener"in this._window||"body"in this._document)&&(this._window.addEventListener?this.removeListeners("connectivity"):o(this.replacements,"connectivity"))},s.prototype.instrumentConnectivity=function(){if("addEventListener"in this._window||"body"in this._document)if(this._window.addEventListener)this.addListener("connectivity",this._window,"online",void 0,function(){this.telemeter.captureConnectivityChange("online")}.bind(this),!0),this.addListener("connectivity",this._window,"offline",void 0,function(){this.telemeter.captureConnectivityChange("offline")}.bind(this),!0);else{var t=this;n(this._document.body,"ononline",function(e){return function(){t.telemeter.captureConnectivityChange("online"),e&&e.apply(this,arguments)}},this.replacements,"connectivity"),n(this._document.body,"onoffline",function(e){return function(){t.telemeter.captureConnectivityChange("offline"),e&&e.apply(this,arguments)}},this.replacements,"connectivity")}},s.prototype.addListener=function(t,e,r,n,o,i){e.addEventListener?(e.addEventListener(r,o,i),this.eventRemovers[t].push(function(){e.removeEventListener(r,o,i)})):n&&(e.attachEvent(n,o),this.eventRemovers[t].push(function(){e.detachEvent(n,o)}))},s.prototype.removeListeners=function(t){for(var e;this.eventRemovers[t].length;)(e=this.eventRemovers[t].shift())()},t.exports=s},function(t,e){"use strict";function r(t){return(t.getAttribute("type")||"").toLowerCase()}function n(t,e,n){if(t.tagName.toLowerCase()!==e.toLowerCase())return!1;if(!n)return!0;t=r(t);for(var o=0;o<n.length;o++)if(n[o]===t)return!0;return!1}function o(t,e){return t.target?t.target:e&&e.elementFromPoint?e.elementFromPoint(t.clientX,t.clientY):void 0}function i(t){for(var e,r=5,n=[],o=0;t&&o<r&&(e=u(t),"html"!==e.tagName);o++)n.unshift(e),t=t.parentNode;return n}function a(t){for(var e,r,n=80,o=" > ",i=o.length,a=[],u=0,c=t.length-1;c>=0;c--){if(e=s(t[c]),r=u+a.length*i+e.length,c<t.length-1&&r>=n+3){a.unshift("...");break}a.unshift(e),u+=e.length}return a.join(o)}function s(t){if(!t||!t.tagName)return"";var e=[t.tagName];t.id&&e.push("#"+t.id),t.classes&&e.push("."+t.classes.join("."));for(var r=0;r<t.attributes.length;r++)e.push("["+t.attributes[r].key+'="'+t.attributes[r].value+'"]');return e.join("")}function u(t){if(!t||!t.tagName)return null;var e,r,n,o,i={};i.tagName=t.tagName.toLowerCase(),t.id&&(i.id=t.id),e=t.className,e&&"string"==typeof e&&(i.classes=e.split(/\s+/));var a=["type","name","title","alt"];for(i.attributes=[],o=0;o<a.length;o++)r=a[o],n=t.getAttribute(r),n&&i.attributes.push({key:r,value:n});return i}t.exports={describeElement:u,descriptionToString:s,elementArrayToString:a,treeToArray:i,getElementFromEvent:o,isDescribedElement:n,getElementType:r}}])}); \ No newline at end of file
diff --git a/packages/website/public/pdfs/0x_white_paper.pdf b/packages/website/public/pdfs/0x_white_paper.pdf
deleted file mode 100644
index 340e8a73a..000000000
--- a/packages/website/public/pdfs/0x_white_paper.pdf
+++ /dev/null
Binary files differ
diff --git a/packages/website/translations/chinese.json b/packages/website/translations/chinese.json
deleted file mode 100644
index 1af89ebfe..000000000
--- a/packages/website/translations/chinese.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "TOP_HEADER": "去中心化交易的驱动者",
- "TOP_TAGLINE": "0x 是一个无需许可的开源协议,用于促进以太坊区块链中 ERC20 代币的交易。",
- "BUILD_CALL_TO_ACTION": "基于 0x 构建",
- "COMMUNITY_CALL_TO_ACTION": "加入社区",
- "PROJECTS_HEADER": "基于 0X 协议构建的项目",
- "FULL_LIST_PROMPT": "查看",
- "FULL_LIST_LINK": "完整列表",
- "TOKENIZED_SECTION_HEADER": "世界正走向代币化时代",
- "TOKENIZED_SECTION_DESCRIPTION": "以太坊区块链是一种开源的金融服务系统,全网无边界,统一使用加密代币充当各类资产。在未来,大多数数字资产和商品都将实现代币化。",
- "CURRENCY": "货币",
- "TRADITIONAL_ASSETS": "传统资产",
- "DIGITAL_GOODS": "数字商品",
- "OFFCHAIN_ORDER_RELAY": "链下订单中继",
- "ONCHAIN_SETTLEMENT": "链上最终结算",
- "OFFCHAIN_ONCHAIN_DESCRIPTION": "在 0x 协议中,所有订单都通过链下传输,大幅削减了损耗成本,能够有效避免区块链膨胀。任何人都可以构建中继方,由中继方广播订单,每促成一笔交易,就可以收取一笔交易费。",
- "RELAYERS_HEADER": "基于 0X 协议构建的中继方",
- "BENEFITS_HEADER": "0x 的好處",
- "BENEFIT_ONE_TITLE": "去信任化的交易机制",
- "BENEFIT_ONE_DESCRIPTION": "基于以太坊的分布式网络构建,去除中心体系单点故障,保证无间断运营,每笔交易都自动操作进行结算,完全解除交易对手风险。",
- "BENEFIT_TWO_TITLE": "共享流动性",
- "BENEFIT_TWO_DESCRIPTION": "通过共享标准 API,让中继方轻松聚集流动池,随着越来越多的中继方纷纷上线,将形成充裕的流动性,创造网络效应。",
- "BENEFIT_THREE_TITLE": "开源优势",
- "BENEFIT_THREE_DESCRIPTION": "0x 是一种开源协议,全网无边界,可供免费使用。用户可以直接联系已知的交易对象进行免费交易,还可以支付一定数额的 ZRX 代币,以访问中继方的流动池。",
- "BUILDING_BLOCK_SECTION_HEADER": "去中心化应用的构建块",
- "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x 协议是需要交易功能的去中心化应用的可插构建块。如今许多开发人员都在使用 0x 协议构建 Web 应用程序和智能合约,赶快加入这一行列吧!",
- "DEV_TOOLS_PROMPT": "了解具体的构建方法,请参见",
- "SMART_CONTRACT": "智能合约 的文档",
- "DOCS": "",
- "AND": "和",
- "DECENTRALIZED_GOVERNANCE": "去中心化的治理",
- "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "去中心化组织使用代币代表所有权,指引其治理逻辑。去中心化组织利用 0x 协议,可以无缝安全地进行启动资金所有权的交易。",
- "PREDICTION_MARKETS": "预测市场",
- "PREDICTION_MARKETS_DESCRIPTION": "去中心化预测市场平台会根据现实世界中发生的事件,按照其中包含的金融风险生成代币集合。使用 0x 协议,允许这些代币即刻交易。",
- "STABLE_TOKENS": "稳定代币",
- "STABLE_TOKENS_DESCRIPTION": "StableCoins 等新型经济结构的成功建设有赖于高效的流动性市场的支持。0x 协议能有效促进底层经济机制,利于代币保持稳定。",
- "DECENTRALIZED_LOANS": "去中心化的借贷模式",
- "DECENTRALIZED_LOANS_DESCRIPTION": "高效借贷需要流动性市场的支持,为投资者提供方便购买、转卖借贷商品的平台。使用 0x 协议能够为借款方搭建一个自组织的生态系统,高效地针对所有未偿贷款确定市场价格。",
- "FUND_MANAGEMENT": "基金管理",
- "FUND_MANAGEMENT_DESCRIPTION": "去中心化基金管理通过划分需事先商定的资产类别,有效限制基金经理的投资行为。向基金管理智能合约中嵌入 0x 协议,可确保其遵守安全约束。",
- "FINAL_CALL_TO_ACTION": "开始构建去中心化的未来",
- "DOCUMENTATION": "文档",
- "COMMUNITY": "社区",
- "ORGANIZATION": "组织介绍",
- "ABOUT": "关于我们",
- "CAREERS": "人才招聘",
- "CONTACT": "联系方式",
- "SOL_COMPILER": "Solidity Compiler",
- "JSON_SCHEMAS": "JSON Schemas",
- "SOL_COV": "Solidity Coverage",
- "ETHEREUM_TYPES": "Ethereum Types",
- "SUBPROVIDERS": "Subproviders",
- "CONTRACT_WRAPPERS": "Contract Wrappers",
- "ORDER_WATCHER": "OrderWatcher",
- "0x.js": "0x.js",
- "BLOG": "博客",
- "FORUM": "论坛",
- "CONNECT": "0x 连接",
- "PROTOCOL_SPECIFICATION": "protocol specification",
- "WHITEPAPER": "白皮书",
- "WIKI": "维基",
- "WEB3_WRAPPER": "Web3Wrapper",
- "ORDER_UTILS": "Order Utils",
- "FAQ": "FAQ",
- "SMART_CONTRACTS": "0x 智能合约",
- "STANDARD_RELAYER_API": "中继方标准API",
- "PORTAL_DAPP": "去中心化应用门户",
- "WEBSITE": "网站",
- "DEVELOPERS": "开发人员",
- "HOME": "首页",
- "DISCORD": "discord chat",
- "BUILD_A_RELAYER": "build a relayer",
- "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
- "DEVELOP_ON_ETHEREUM": "develop on Ethereum",
- "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications on top of Ethereum",
- "ORDER_BASICS": "Make & take orders",
- "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
- "USE_NETWORKED_LIQUIDITY": "use networked liquidity",
- "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Access the shared liquidity pool using the Standard Relayer API",
- "VIEW_ALL_DOCUMENTATION": "view all documentation",
- "SANDBOX": "0x.js sandbox",
- "GITHUB": "github",
- "LIVE_CHAT": "live chat",
- "LIBRARIES_AND_TOOLS": "Libraries & Tools",
- "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum",
- "MORE": "more",
- "LAUNCH_KIT": "0x launch kit",
- "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.",
- "GET_STARTED": "get started",
- "GET_IN_TOUCH": "get in touch",
- "EXPLORE_THE_DOCS": "explore the docs",
- "LOCAL_MARKET": "Easily build a 0x relayer for your local market",
- "SEEMLESSLY_CREATE": "Seamlessly create an in-game marketplace for digital items and collectables",
- "QUICKLY_LAUNCH": "Quickly launch a market for your community token",
- "ENABLE_TRADING": "Enable trading for any ERC-20 or ERC-721 asset",
- "FORK_AND_EXTEND": "Fork and extend to support new modes of exchange",
- "TAP_INTO_AND_SHARE": "Tap into and share liquidity with other relayers",
- "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace",
- "LEARN_MORE": "learn more",
- "START_BUILDING_ON_0X": "Start building on 0x",
- "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x."
-}
diff --git a/packages/website/translations/english.json b/packages/website/translations/english.json
deleted file mode 100644
index 000cbefdf..000000000
--- a/packages/website/translations/english.json
+++ /dev/null
@@ -1,112 +0,0 @@
-{
- "TOP_HEADER": "powering decentralized exchange",
- "TOP_TAGLINE": "0x is an open, permissionless protocol allowing for ERC20 tokens to be traded on the Ethereum blockchain.",
- "BUILD_CALL_TO_ACTION": "build on 0x",
- "COMMUNITY_CALL_TO_ACTION": "join the community",
- "PROJECTS_HEADER": "projects building on 0x",
- "FULL_LIST_PROMPT": "view the",
- "FULL_LIST_LINK": "full list",
- "TOKENIZED_SECTION_HEADER": "the world's value is becoming tokenized",
- "TOKENIZED_SECTION_DESCRIPTION": "0x is the critical infrastructure layer in the emerging financial stack built on a foundation of Ethereum token standards. Developers needing exchange functionality for ERC 20 tokens, ERC 721 tokens, or any new asset type can easily integrate the 0x protocol into their application.",
- "CURRENCY": "currency",
- "TRADITIONAL_ASSETS": "traditional assets",
- "DIGITAL_GOODS": "digital goods",
- "OFFCHAIN_ORDER_RELAY": "off-chain order relay",
- "ONCHAIN_SETTLEMENT": "on-chain settlement",
- "OFFCHAIN_ONCHAIN_DESCRIPTION": "in 0x protocol, orders are transported off-chain, massively reducing gas costs and eliminating blockchain bloat. Relayers help broadcast orders and collect a fee each time they facilitate a trade. Anyone can build a relayer.",
- "RELAYERS_HEADER": "relayers building on 0x",
- "BENEFITS_HEADER": "benefits of 0x",
- "USE_CASES_HEADER": "use cases of 0x",
- "BENEFIT_ONE_TITLE": "any asset",
- "BENEFIT_ONE_DESCRIPTION": "the 0x protocol facilitates the exchange of a growing number of Ethereum-based tokens including currencies, game items, and many more digital assets.",
- "BENEFIT_TWO_TITLE": "networked liquidity",
- "BENEFIT_TWO_DESCRIPTION": "by sharing a standard API, relayers can easily aggregate liquidity pools, creating network effects around liquidity that compound as more relayers come online.",
- "BENEFIT_THREE_TITLE": "exchange everywhere",
- "BENEFIT_THREE_DESCRIPTION": "0x allows trade functionality to fade into the background, enabling developers to focus on building while 0x handles the exchange.",
- "BUILDING_BLOCK_SECTION_HEADER": "a building block for dApps",
- "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x protocol is a pluggable building block for dApps that require exchange functionality. Join the many developers that are already using 0x in their web applications and smart contracts.",
- "DEV_TOOLS_PROMPT": "learn how in our",
- "SMART_CONTRACT": "smart contract",
- "DOCS": "docs",
- "AND": "and",
- "DECENTRALIZED_GOVERNANCE": "decentralized governance",
- "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "Decentralized organizations use tokens to represent ownership and guide their governance logic. 0x allows decentralized organizations to seamlessly and safely trade ownership for startup capital.",
- "PREDICTION_MARKETS": "prediction markets",
- "PREDICTION_MARKETS_DESCRIPTION": "decentralized prediction market platforms generate sets of tokens that represent a financial stake in the outcomes of real-world events. 0x allows these tokens to be instantly tradable.",
- "STABLE_TOKENS": "stable tokens",
- "STABLE_TOKENS_DESCRIPTION": "novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.",
- "DECENTRALIZED_LOANS": "decentralized loans",
- "DECENTRALIZED_LOANS_DESCRIPTION": "efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.",
- "FUND_MANAGEMENT": "fund management",
- "FUND_MANAGEMENT_DESCRIPTION": "Decentralized fund management limits fund managers to investing in pre-agreed upon asset classes. Embedding 0x into fund management smart contracts enables them to enforce these security constraints.",
- "FINAL_CALL_TO_ACTION": "get started on building the decentralized future",
- "DOCUMENTATION": "documentation",
- "COMMUNITY": "community",
- "ORGANIZATION": "organization",
- "ABOUT": "about",
- "CAREERS": "careers",
- "CONTACT": "contact",
- "SOL_COMPILER": "Solidity Compiler",
- "JSON_SCHEMAS": "JSON Schemas",
- "SOL_COV": "Solidity Coverage",
- "ETHEREUM_TYPES": "Ethereum Types",
- "SUBPROVIDERS": "Subproviders",
- "CONTRACT_WRAPPERS": "Contract Wrappers",
- "ORDER_WATCHER": "OrderWatcher",
- "0X_JS": "0x.js",
- "BLOG": "blog",
- "FORUM": "forum",
- "CONNECT": "0x Connect",
- "PROTOCOL_SPECIFICATION": "protocol specification",
- "WHITEPAPER": "whitepaper",
- "WIKI": "wiki",
- "WEB3_WRAPPER": "Web3Wrapper",
- "ORDER_UTILS": "Order Utils",
- "ASSET_BUYER": "AssetBuyer",
- "FAQ": "FAQ",
- "SMART_CONTRACTS": "0x smart contracts",
- "STANDARD_RELAYER_API": "standard relayer API",
- "PORTAL_DAPP": "portal dApp",
- "WEBSITE": "website",
- "DEVELOPERS": "developers",
- "HOME": "home",
- "DISCORD": "discord chat",
- "TRADE_CALL_TO_ACTION": "trade on 0x",
- "BUILD_A_RELAYER": "build a relayer",
- "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
- "DEVELOP_ON_ETHEREUM": "develop on Ethereum",
- "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications on top of Ethereum",
- "ORDER_BASICS": "Make & take orders",
- "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
- "USE_NETWORKED_LIQUIDITY": "use networked liquidity",
- "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
- "INTEGRATE_0X_INSTANT": "add seamless purchasing of crypto assets to your website or app",
- "INTEGRATE_0X_INSTANT_DESCRIPTION": "learn how to use 0x Instant or AssetBuyer to give your users the power of purchasing crypto assets using 0x",
- "VIEW_ALL_DOCUMENTATION": "view all documentation",
- "SANDBOX": "0x.js sandbox",
- "GITHUB": "github",
- "LIVE_CHAT": "live chat",
- "LIBRARIES_AND_TOOLS": "Libraries & Tools",
- "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum",
- "MORE": "more",
- "LAUNCH_KIT": "0x launch kit",
- "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.",
- "GET_STARTED": "get started",
- "GET_IN_TOUCH": "get in touch",
- "EXPLORE_THE_DOCS": "explore the docs",
- "LOCAL_MARKET": "Easily build a 0x relayer for your local market",
- "SEEMLESSLY_CREATE": "Seamlessly create an in-game marketplace for digital items and collectables",
- "QUICKLY_LAUNCH": "Quickly launch a market for your community token",
- "ENABLE_TRADING": "Enable trading for any ERC-20 or ERC-721 asset",
- "FORK_AND_EXTEND": "Fork and extend to support new modes of exchange",
- "TAP_INTO_AND_SHARE": "Tap into and share liquidity with other relayers",
- "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace",
- "LEARN_MORE": "learn more",
- "OUR_MISSION_AND_VALUES": "our mission & values",
- "GAMING_AND_COLLECTABLES": "gaming & collectables",
- "GAMING_AND_COLLECTABLES_DESCRIPTION": "artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality to give access and the ability to build marketplaces for NFT trading.",
- "ORDER_BOOKS": "order books",
- "ORDER_BOOKS_DESCRIPTION": "there are thousands of decentralized apps that have native utility tokens. 0x provides market makers and professional exchanges an ability to host order books to facilitate the exchange of these assets.",
- "START_BUILDING_ON_0X": "Start building on 0x",
- "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x."
-}
diff --git a/packages/website/translations/korean.json b/packages/website/translations/korean.json
deleted file mode 100644
index 82f88a0c3..000000000
--- a/packages/website/translations/korean.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "TOP_HEADER": "탈중앙화된 거래소를 가능하게 하는 원동력",
- "TOP_TAGLINE": "0x는 이더리움 블록체인에서 ERC20 토큰을 거래할 수 있게 해 주는 무허가형 개방 프로토콜입니다.",
- "BUILD_CALL_TO_ACTION": "0x 기반",
- "COMMUNITY_CALL_TO_ACTION": "커뮤니티 참여",
- "PROJECTS_HEADER": "0x 기반 프로젝트",
- "FULL_LIST_PROMPT": "보기",
- "FULL_LIST_LINK": "전체 목록",
- "TOKENIZED_SECTION_HEADER": "전 세계의 가치가 토큰으로 변환되고 있음",
- "TOKENIZED_SECTION_DESCRIPTION": "이더리움 블록체인은 국경이 없는 개방형 결제 시스템으로, 다양한 자산을 암호화 토큰으로 나타내 줍니다. 앞으로는 디지털 자산과 상품 대부분이 토큰으로 바뀔 것입니다.",
- "CURRENCY": "통화",
- "TRADITIONAL_ASSETS": "전통적 자산",
- "DIGITAL_GOODS": "디지털 상품",
- "OFFCHAIN_ORDER_RELAY": "오프체인 주문 릴레이",
- "ONCHAIN_SETTLEMENT": "온체인 정산",
- "OFFCHAIN_ONCHAIN_DESCRIPTION": "0x 프로토콜에서 주문은 오프체인으로 전달되므로, 가스 비용이 대폭 줄고 블록체인이 불필요하게 커지지 않습니다. Relayer는 주문을 브로드캐스팅할 수 있게 해 주고, 주문에서 거래가 진행될 때마다 수수료를 받을 수 있습니다. 누구든지 Relayer를 생성할 수 있습니다.",
- "RELAYERS_HEADER": "0x 기반 Relayer",
- "BENEFITS_HEADER": "모두 보기",
- "BENEFIT_ONE_TITLE": "신뢰할 수 없는 거래소",
- "BENEFIT_ONE_DESCRIPTION": "중앙화된 오류 지점과 중단 시간이 없는 이더리움의 분산 네트워크를 바탕으로 구축되므로, 각 거래가 개별 단위로 정산되며 거래 상대방으로 인한 위험도 없습니다.",
- "BENEFIT_TWO_TITLE": "공유 유동 자금",
- "BENEFIT_TWO_DESCRIPTION": "표준 API를 공유하므로 Relayer는 유동 자금 풀을 쉽게 취합할 수 있습니다. 따라서 더 많은 Relayer가 온라인 상태가 되면 유동 자금을 바탕으로 한 복합적인 네트워크 효과를 만들 수 있습니다.",
- "BENEFIT_THREE_TITLE": "오픈 소스",
- "BENEFIT_THREE_DESCRIPTION": "0x는 무허가형 오프 소스이며, 무료로 사용할 수 있습니다. 이미 알고 있는 상대방과 직접 무료로 거래하거나, Relayer에 약간의 ZRX 토큰을 지불하여 해당 유동 자금 풀에 액세스할 수 있습니다.",
- "BUILDING_BLOCK_SECTION_HEADER": "dApp을 위한 기본 구성 요소",
- "BUILDING_BLOCK_SECTION_DESCRIPTION": "0x 프로토콜은 거래소 기능이 필요한 dApp을 위한 연결 가능한 기본 구성 요소입니다. 웹 애플리케이션과 스마트 계약에서 이미 0x를 사용하고 있는 여러 개발자 대열에 동참해 보세요.",
- "DEV_TOOLS_PROMPT": "수행하는 방법 알아보기",
- "SMART_CONTRACT": "스마트 계약 문서에 ",
- "DOCS": "",
- "AND": "및",
- "DECENTRALIZED_GOVERNANCE": "탈중앙화된 거버넌스",
- "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "탈중앙화된 조직은 토큰을 사용하여 소유권을 나타내며 거버넌스 로직의 방향을 정합니다. 0x를 사용하면 탈중앙화된 조직이 안전하고 원활하게 스타트업 자금의 소유권을 주고받을 수 있습니다.",
- "PREDICTION_MARKETS": "예측 시장",
- "PREDICTION_MARKETS_DESCRIPTION": "탈중앙화된 예측 시장 플랫폼은 실제 이벤트 결과에서의 금전적인 지분을 나타내는 토큰 세트를 생성합니다. 0x를 사용하면 이러한 토큰을 즉시 거래할 수 있습니다.",
- "STABLE_TOKENS": "안정적인 토큰",
- "STABLE_TOKENS_DESCRIPTION": "안정적인 코인과 같은 새롭게 등장한 경제 개념은 효율성이 높은 유동 시장에 적용해야 성공할 수 있습니다. 0x는 이러한 토큰이 안정적인 상태를 유지할 수 있게 하는 기반 경제 메커니즘을 가능하게 합니다.",
- "DECENTRALIZED_LOANS": "탈중앙화된 대출",
- "DECENTRALIZED_LOANS_DESCRIPTION": "대출이 효율적으로 이루어지려면 투자자가 대출 상품을 사고 다시 파는 유동 시장이 있어야 합니다. 0x를 통해 전체 미상환 대출이 자체 구성되고 이러한 대출의 시장 가격을 효율적으로 결정할 수 있는 대출 기관 생태계가 가능해집니다.",
- "FUND_MANAGEMENT": "자금 관리",
- "FUND_MANAGEMENT_DESCRIPTION": "탈중앙화된 자금 관리로 자금 운용 관리자가 사전 합의된 자산 등급에 투자하는 것이 제한됩니다. 자금 관리 스마트 계약에 0x를 포함시키면 자금 운용 담당자가 보안 관련 제한 사항을 강화할 수 있습니다.",
- "FINAL_CALL_TO_ACTION": "탈중앙화된 미래 구축하기",
- "DOCUMENTATION": "문서",
- "COMMUNITY": "커뮤니티",
- "ORGANIZATION": "조직",
- "ABOUT": "기업 정보",
- "CAREERS": "채용",
- "CONTACT": "문의",
- "SOL_COMPILER": "Solidity Compiler",
- "JSON_SCHEMAS": "JSON Schemas",
- "SOL_COV": "Solidity Coverage",
- "ETHEREUM_TYPES": "Ethereum Types",
- "SUBPROVIDERS": "Subproviders",
- "CONTRACT_WRAPPERS": "Contract Wrappers",
- "ORDER_WATCHER": "OrderWatcher",
- "0X_JS": "0x.js",
- "BLOG": "블로그",
- "FORUM": "포럼",
- "CONNECT": "0x Connect",
- "PROTOCOL_SPECIFICATION": "protocol specification",
- "WHITEPAPER": "백서",
- "WIKI": "위키",
- "WEB3_WRAPPER": "Web3Wrapper",
- "ORDER_UTILS": "Order Utils",
- "FAQ": "FAQ",
- "SMART_CONTRACTS": "0x 스마트 계약",
- "STANDARD_RELAYER_API": "Standard Relayer API",
- "PORTAL_DAPP": "포털 dApp",
- "WEBSITE": "Website",
- "HOME": "홈",
- "DISCORD": "discord chat",
- "DEVELOPERS": "개발자",
- "BUILD_A_RELAYER": "build a relayer",
- "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
- "DEVELOP_ON_ETHEREUM": "develop on Ethereum",
- "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications on top of Ethereum",
- "ORDER_BASICS": "Make & take orders",
- "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
- "USE_NETWORKED_LIQUIDITY": "use networked liquidity",
- "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
- "VIEW_ALL_DOCUMENTATION": "view all documentation",
- "SANDBOX": "0x.js sandbox",
- "GITHUB": "github",
- "LIVE_CHAT": "live chat",
- "LIBRARIES_AND_TOOLS": "Libraries & Tools",
- "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum",
- "MORE": "more",
- "LAUNCH_KIT": "0x launch kit",
- "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.",
- "GET_STARTED": "get started",
- "GET_IN_TOUCH": "get in touch",
- "EXPLORE_THE_DOCS": "explore the docs",
- "LOCAL_MARKET": "Easily build a 0x relayer for your local market",
- "SEEMLESSLY_CREATE": "Seamlessly create an in-game marketplace for digital items and collectables",
- "QUICKLY_LAUNCH": "Quickly launch a market for your community token",
- "ENABLE_TRADING": "Enable trading for any ERC-20 or ERC-721 asset",
- "FORK_AND_EXTEND": "Fork and extend to support new modes of exchange",
- "TAP_INTO_AND_SHARE": "Tap into and share liquidity with other relayers",
- "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace",
- "LEARN_MORE": "learn more",
- "START_BUILDING_ON_0X": "Start building on 0x",
- "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x."
-}
diff --git a/packages/website/translations/russian.json b/packages/website/translations/russian.json
deleted file mode 100644
index acf78b507..000000000
--- a/packages/website/translations/russian.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "TOP_HEADER": "Стимулирование децентрализованного обмена",
- "TOP_TAGLINE": "0x — это протокол с открытым кодом, позволяющий торговать токенами ERC20, на блокчейне Ethereum.",
- "BUILD_CALL_TO_ACTION": "Разрабатывайте на 0x",
- "COMMUNITY_CALL_TO_ACTION": "Сообщество",
- "PROJECTS_HEADER": "Проекты разработанные на 0х",
- "FULL_LIST_PROMPT": "Просмотреть",
- "FULL_LIST_LINK": "полный список",
- "TOKENIZED_SECTION_HEADER": "Сегодняшний мир движется к токенизации ценности",
- "TOKENIZED_SECTION_DESCRIPTION": "Блокчейн Ethereum — это открытая, безграничная финансовая система, большое количество активов которой представлено в виде криптографических токенов. В будущем большая часть цифровых активов и товаров будет токенизирована.",
- "CURRENCY": "Валюта",
- "TRADITIONAL_ASSETS": "Традиционные активы",
- "DIGITAL_GOODS": "Цифровые товары",
- "OFFCHAIN_ORDER_RELAY": "Офчейн-ордер",
- "ONCHAIN_SETTLEMENT": "Ончейн-транзакция",
- "OFFCHAIN_ONCHAIN_DESCRIPTION": "При использовании протокола 0x ордера проводятся вне блокчейна, что сокращает расходы на газ (топливо) и предотвращает раздувание блокчейна. Релейеры помогают провести ордера и берут комиссию каждый раз, когда способствуют торгам. Любой может создать релейера.",
- "RELAYERS_HEADER": "РЕЛЕЙЕРЫ, РАЗРАБОТАННЫЕ НА 0X",
- "BENEFITS_HEADER": "Просмотреть все",
- "BENEFIT_ONE_TITLE": "Обмен, не требующий доверия",
- "BENEFIT_ONE_DESCRIPTION": "Каждая сделка, основанная на распределенной сети Ethereum без единой точки отказа и с нулевым временем простоя, является атомарной операцией и проводится без риска для контрагента.",
- "BENEFIT_TWO_TITLE": "Общая ликвидность",
- "BENEFIT_TWO_DESCRIPTION": "При обмене стандартным API релейеры могут легко объединять пулы ликвидности, создавая сетевые эффекты вокруг ликвидности, которые усложняются с появлением новых релейеров в сети.",
- "BENEFIT_THREE_TITLE": "Открытый исходный код",
- "BENEFIT_THREE_DESCRIPTION": "0x — это бесплатный и доступный протокол с открытым кодом. Торгуйте напрямую с известными контрагентами бесплатно или заплатите релейеру несколько ZRX-токенов, чтобы получить доступ к его пулу ликвидности.",
- "BUILDING_BLOCK_SECTION_HEADER": "Строительный блок для dApp",
- "BUILDING_BLOCK_SECTION_DESCRIPTION": "Протокол 0x — это подключаемый строительный блок для dApp, нуждающихся в функционале обмена. Присоединяйтесь к разработчикам, которые уже используют 0x в своих веб-приложениях и смарт-контрактах.",
- "DEV_TOOLS_PROMPT": "Узнайте как это сделать в документации к",
- "SMART_CONTRACT": "смарт-контрактам",
- "DOCS": "",
- "AND": "и",
- "DECENTRALIZED_GOVERNANCE": "Децентрализированное управление",
- "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "Децентрализованные организации используют токены для представления собственности и внедрения своей логики управления. Протокол 0x позволяет децентрализованным организациям беспрепятственно и безопасно торговать собственностью для стартового капитала.",
- "PREDICTION_MARKETS": "Рынки предсказаний",
- "PREDICTION_MARKETS_DESCRIPTION": "Платформы для децентрализованных рынков предсказаний генерируют множество токенов, которые представляют собой финансовую долю в результате реальных событий. Протокол 0x позволяет мгновенно торговать эти токены.",
- "STABLE_TOKENS": "Стабильные токены",
- "STABLE_TOKENS_DESCRIPTION": "Новые экономические конструкции, например стабильные токены, требуют наличия успешных и эффективных ликвидных рынков. Протокол 0x призван облегчить основные экономические механизмы, которые позволят этим токенам оставаться стабильными.",
- "DECENTRALIZED_LOANS": "Децентрализированные займы",
- "DECENTRALIZED_LOANS_DESCRIPTION": "Эффективное кредитование требует наличия ликвидных рынков, где инвесторы могут купить и перепродать займы. Протокол 0x позволяет экосистеме кредиторов самоорганизовываться и эффективно определять рыночные цены для всех невыплаченных займов.",
- "FUND_MANAGEMENT": "Управление средствами",
- "FUND_MANAGEMENT_DESCRIPTION": "Децентрализованное управление средствами ограничивает управляющих средствами путем определения предварительно согласованных классов активов для инвестиций. Встраивание протокола 0x в смарт-контракты для управления средствами позволяет им обеспечить исполнение этих ограничений безопасности.",
- "FINAL_CALL_TO_ACTION": "Начните создавать децентрализованное будущее",
- "DOCUMENTATION": "Документация",
- "COMMUNITY": "Сообщество",
- "ORGANIZATION": "Организация",
- "ABOUT": "Kоманда",
- "CAREERS": "Карьера",
- "CONTACT": "Связаться с нами",
- "SOL_COMPILER": "Solidity Compiler",
- "JSON_SCHEMAS": "JSON Schemas",
- "SOL_COV": "Solidity Coverage",
- "ETHEREUM_TYPES": "Ethereum Types",
- "SUBPROVIDERS": "Subproviders",
- "CONTRACT_WRAPPERS": "Contract Wrappers",
- "ORDER_WATCHER": "OrderWatcher",
- "0X_JS": "0x.js",
- "BLOG": "Блог",
- "FORUM": "Форум",
- "CONNECT": "0x Connect",
- "PROTOCOL_SPECIFICATION": "protocol specification",
- "WHITEPAPER": "Whitepaper",
- "WIKI": "Вики",
- "WEB3_WRAPPER": "Web3Wrapper",
- "ORDER_UTILS": "Order Utils",
- "FAQ": "Документация",
- "SMART_CONTRACTS": "0x Смарт-контракты ",
- "STANDARD_RELAYER_API": "standard relayer API",
- "PORTAL_DAPP": "DApp-портал",
- "WEBSITE": "Веб-сайт",
- "DEVELOPERS": "Для разработчиков",
- "HOME": "Домашняя страница",
- "DISCORD": "discord chat",
- "BUILD_A_RELAYER": "build a relayer",
- "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
- "DEVELOP_ON_ETHEREUM": "develop on Ethereum",
- "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications on top of Ethereum",
- "ORDER_BASICS": "Make & take orders",
- "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
- "USE_NETWORKED_LIQUIDITY": "use networked liquidity",
- "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
- "VIEW_ALL_DOCUMENTATION": "view all documentation",
- "SANDBOX": "0x.js sandbox",
- "GITHUB": "github",
- "LIVE_CHAT": "live chat",
- "LIBRARIES_AND_TOOLS": "Libraries & Tools",
- "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum",
- "MORE": "more",
- "LAUNCH_KIT": "0x launch kit",
- "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.",
- "GET_STARTED": "get started",
- "GET_IN_TOUCH": "get in touch",
- "EXPLORE_THE_DOCS": "explore the docs",
- "LOCAL_MARKET": "Easily build a 0x relayer for your local market",
- "SEEMLESSLY_CREATE": "Seamlessly create an in-game marketplace for digital items and collectables",
- "QUICKLY_LAUNCH": "Quickly launch a market for your community token",
- "ENABLE_TRADING": "Enable trading for any ERC-20 or ERC-721 asset",
- "FORK_AND_EXTEND": "Fork and extend to support new modes of exchange",
- "TAP_INTO_AND_SHARE": "Tap into and share liquidity with other relayers",
- "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace",
- "LEARN_MORE": "learn more",
- "START_BUILDING_ON_0X": "Start building on 0x",
- "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x."
-}
diff --git a/packages/website/translations/spanish.json b/packages/website/translations/spanish.json
deleted file mode 100644
index 152b3ef22..000000000
--- a/packages/website/translations/spanish.json
+++ /dev/null
@@ -1,102 +0,0 @@
-{
- "TOP_HEADER": "potenciar el intercambio descentralizado",
- "TOP_TAGLINE": "0x es un protocolo abierto y sin restricciones que permite el intercambio de tokens ERC20 en la cadena de bloques Ethereum.",
- "BUILD_CALL_TO_ACTION": "crear en 0x",
- "COMMUNITY_CALL_TO_ACTION": "unirse a la comunidad",
- "PROJECTS_HEADER": "proyectos creados en 0x",
- "FULL_LIST_PROMPT": "ver la",
- "FULL_LIST_LINK": "lista completa",
- "TOKENIZED_SECTION_HEADER": "el valor del mundo se está tokenizando",
- "TOKENIZED_SECTION_DESCRIPTION": "la cadena de bloques Ethereum es un sistema financiero abierto y sin fronteras que representa una amplia variedad de activos como tokens criptográficos. En el futuro, la mayoría de los activos y bienes digitales estarán tokenizados.",
- "CURRENCY": "moneda",
- "TRADITIONAL_ASSETS": "activos tradicionales",
- "DIGITAL_GOODS": "bienes digitales",
- "OFFCHAIN_ORDER_RELAY": "orden retransmisión fuera de cadena",
- "ONCHAIN_SETTLEMENT": "liquidación en cadena",
- "OFFCHAIN_ONCHAIN_DESCRIPTION": "en el protocolo 0x, las órdenes se transportan fuera de la cadena, lo que reduce enormemente los costos de combustible y elimina el sobredimensionamiento de la cadena de bloques. Los transmisores ayudan a emitir órdenes y a cobrar un cargo cada vez que facilitan un intercambio. Cualquier persona puede crear un transmisor.",
- "RELAYERS_HEADER": "transmisores creados en 0x",
- "BENEFITS_HEADER": "beneficios de 0x",
- "BENEFIT_ONE_TITLE": "intercambio confiable",
- "BENEFIT_ONE_DESCRIPTION": "creado en la red distribuida de Ethereum sin ningún punto de error centralizado y sin tiempo de inactividad; cada intercambio se concreta atómicamente y sin riesgos para la contraparte.",
- "BENEFIT_TWO_TITLE": "liquidez compartida",
- "BENEFIT_TWO_DESCRIPTION": "al compartir un API estándar, los transmisores pueden acumular fácilmente fondos de liquidez, lo que crea efectos de red en torno a la liquidez que se forma a medida que más transmisores se conectan.",
- "BENEFIT_THREE_TITLE": "código abierto",
- "BENEFIT_THREE_DESCRIPTION": "0x es código abierto, su uso es gratuito. Negocie directamente con una contraparte conocida sin costo o páguele a un transmisor con algunos para acceder a su fondo de liquidez.",
- "BUILDING_BLOCK_SECTION_HEADER": "un bloque de creación para dApps",
- "BUILDING_BLOCK_SECTION_DESCRIPTION": "el protocolo 0x es un bloque de creación acoplable para dApps que requiere una funcionalidad de intercambio. Únase a los numerosos desarrolladores que ya utilizan 0x en sus aplicaciones web y contratos inteligentes.",
- "DEV_TOOLS_PROMPT": "aprenda cómo hacerlo en nuestros documentos de",
- "SMART_CONTRACT": "contratos inteligentes",
- "DOCS": "",
- "AND": "y",
- "DECENTRALIZED_GOVERNANCE": "gobierno descentralizado",
- "DECENTRALIZED_GOVERNANCE_DESCRIPTION": "las organizaciones descentralizadas utilizan tokens para representar la titularidad y guiar su lógica de gobierno. 0x les permite a las organizaciones descentralizadas intercambiar titularidad por capital inicial sin problemas y de forma segura.",
- "PREDICTION_MARKETS": "mercados de predicción",
- "PREDICTION_MARKETS_DESCRIPTION": "las plataformas del mercado de predicción descentralizado generan conjuntos de tokens que representan un interés financiero en los resultados de los sucesos del mundo real. 0x permite que estos tokens se negocien de manera instantánea.",
- "STABLE_TOKENS": "tokens estables",
- "STABLE_TOKENS_DESCRIPTION": "las construcciones económicas novedosas, como las monedas estables, requieren mercados eficientes y con liquidez para tener éxito. 0x facilitará los mecanismos económicos subyacentes que permiten que estos tokens continúen siendo estables.",
- "DECENTRALIZED_LOANS": "préstamos descentralizados",
- "DECENTRALIZED_LOANS_DESCRIPTION": "los préstamos eficientes requieren mercados con liquidez donde los inversores pueden comprar y revender préstamos. 0x facilita un ecosistema de prestamistas que se organizan ellos mismos y determinan, de forma eficaz, los precios del mercado para todos los préstamos pendientes.",
- "FUND_MANAGEMENT": "administración de fondos",
- "FUND_MANAGEMENT_DESCRIPTION": "la administración descentralizada de fondos limita a los administradores de fondos a invertir en clases de activos preacordadas. Integrar 0x a los contratos inteligentes de la administración de fondos les permite imponer esas restricciones de seguridad.",
- "FINAL_CALL_TO_ACTION": "comience a crear el futuro descentralizado",
- "DOCUMENTATION": "documentación",
- "COMMUNITY": "comunidad",
- "ORGANIZATION": "organización",
- "ABOUT": "equipo",
- "CAREERS": "empleo",
- "CONTACT": "contacto",
- "SOL_COMPILER": "Solidity Compiler",
- "JSON_SCHEMAS": "JSON Schemas",
- "SOL_COV": "Solidity Coverage",
- "ETHEREUM_TYPES": "Ethereum Types",
- "SUBPROVIDERS": "Subproviders",
- "CONTRACT_WRAPPERS": "Contract Wrappers",
- "ORDER_WATCHER": "OrderWatcher",
- "0X_JS": "0x.js",
- "BLOG": "blog",
- "FORUM": "foro",
- "CONNECT": "0x Connect",
- "PROTOCOL_SPECIFICATION": "protocol specification",
- "WHITEPAPER": "documento técnico",
- "WIKI": "wiki",
- "WEB3_WRAPPER": "Web3Wrapper",
- "ORDER_UTILS": "Order Utils",
- "FAQ": "preguntas frecuentes",
- "SMART_CONTRACTS": "0x contratos inteligentes",
- "STANDARD_RELAYER_API": "API de transmisión estándar",
- "PORTAL_DAPP": "portal dApp",
- "WEBSITE": "website",
- "DEVELOPERS": "desarrolladores",
- "HOME": "inicio",
- "DISCORD": "discord chat",
- "BUILD_A_RELAYER": "build a relayer",
- "BUILD_A_RELAYER_DESCRIPTION": "Learn how to build your own 0x relayer from scratch",
- "DEVELOP_ON_ETHEREUM": "develop on Ethereum",
- "DEVELOP_ON_ETHEREUM_DESCRIPTION": "Learn more about building applications on top of Ethereum",
- "ORDER_BASICS": "Make & take orders",
- "ORDER_BASICS_DESCRIPTION": "Tutorial on how to create, validate and fill an order using 0x",
- "USE_NETWORKED_LIQUIDITY": "use networked liquidity",
- "USE_NETWORKED_LIQUIDITY_DESCRIPTION": "Learn how to tap into networked liquidity using the Standard Relayer API",
- "VIEW_ALL_DOCUMENTATION": "view all documentation",
- "SANDBOX": "0x.js sandbox",
- "GITHUB": "github",
- "LIVE_CHAT": "live chat",
- "LIBRARIES_AND_TOOLS": "Libraries & Tools",
- "LIBRARIES_AND_TOOLS_DESCRIPTION": "A list of available tools maintained by the 0x core developers and wider community for building on top of 0x Protocol and Ethereum",
- "MORE": "more",
- "LAUNCH_KIT": "0x launch kit",
- "LAUNCH_KIT_PITCH": "launch a relayer in under a minute.",
- "GET_STARTED": "get started",
- "GET_IN_TOUCH": "get in touch",
- "EXPLORE_THE_DOCS": "explore the docs",
- "LOCAL_MARKET": "Easily build a 0x relayer for your local market",
- "SEEMLESSLY_CREATE": "Seamlessly create an in-game marketplace for digital items and collectables",
- "QUICKLY_LAUNCH": "Quickly launch a market for your community token",
- "ENABLE_TRADING": "Enable trading for any ERC-20 or ERC-721 asset",
- "FORK_AND_EXTEND": "Fork and extend to support new modes of exchange",
- "TAP_INTO_AND_SHARE": "Tap into and share liquidity with other relayers",
- "PERFECT_FOR_DEVELOPERS": "Perfect for developers who need a simple drop-in marketplace",
- "LEARN_MORE": "learn more",
- "START_BUILDING_ON_0X": "Start building on 0x",
- "START_BUILDING_ON_0X_DESCRIPTION": "Follow one of our \"Getting started\" guides to learn more about building ontop of 0x."
-}
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
deleted file mode 100644
index ea5a59340..000000000
--- a/packages/website/ts/blockchain.ts
+++ /dev/null
@@ -1,953 +0,0 @@
-import {
- BlockRange,
- ContractWrappers,
- DecodedLogEvent,
- ExchangeCancelEventArgs,
- ExchangeEventArgs,
- ExchangeEvents,
- ExchangeFillEventArgs,
- IndexedFilterValues,
-} from '@0x/contract-wrappers';
-import { assetDataUtils, orderHashUtils, signatureUtils } from '@0x/order-utils';
-import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import {
- ledgerEthereumBrowserClientFactoryAsync,
- LedgerSubprovider,
- MetamaskSubprovider,
- RedundantSubprovider,
- RPCSubprovider,
- SignerSubprovider,
- Web3ProviderEngine,
-} from '@0x/subproviders';
-import { SignedOrder, Token as ZeroExToken } from '@0x/types';
-import { BigNumber, intervalUtils, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import { BlockParam, LogWithDecodedArgs, Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
-import * as _ from 'lodash';
-import * as moment from 'moment';
-import * as React from 'react';
-import contract from 'truffle-contract';
-import { BlockchainWatcher } from 'ts/blockchain_watcher';
-import { AssetSendCompleted } from 'ts/components/flash_messages/asset_send_completed';
-import { TransactionSubmitted } from 'ts/components/flash_messages/transaction_submitted';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import {
- BlockchainCallErrs,
- BlockchainErrs,
- ContractInstance,
- Fill,
- InjectedProvider,
- InjectedProviderObservable,
- InjectedProviderUpdate,
- Providers,
- ProviderType,
- Side,
- SideToAssetToken,
- Token,
- TokenByAddress,
-} from 'ts/types';
-import { backendClient } from 'ts/utils/backend_client';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { fakeTokenRegistry } from 'ts/utils/fake_token_registry';
-import { tokenAddressOverrides } from 'ts/utils/token_address_overrides';
-import { utils } from 'ts/utils/utils';
-import FilterSubprovider from 'web3-provider-engine/subproviders/filters';
-
-import MintableArtifacts from '../contracts/Mintable.json';
-
-const BLOCK_NUMBER_BACK_TRACK = 50;
-const GWEI_IN_WEI = 1000000000;
-
-const providerToName: { [provider: string]: string } = {
- [Providers.Metamask]: constants.PROVIDER_NAME_METAMASK,
- [Providers.Parity]: constants.PROVIDER_NAME_PARITY_SIGNER,
- [Providers.Mist]: constants.PROVIDER_NAME_MIST,
- [Providers.CoinbaseWallet]: constants.PROVIDER_NAME_COINBASE_WALLET,
- [Providers.Cipher]: constants.PROVIDER_NAME_CIPHER,
-};
-
-export class Blockchain {
- public networkId: number;
- public nodeVersion: string;
- private _contractWrappers: ContractWrappers;
- private readonly _dispatcher: Dispatcher;
- private _web3Wrapper?: Web3Wrapper;
- private _blockchainWatcher?: BlockchainWatcher;
- private _injectedProviderObservable?: InjectedProviderObservable;
- private readonly _injectedProviderUpdateHandler: (update: InjectedProviderUpdate) => Promise<void>;
- private _userAddressIfExists: string;
- private _ledgerSubprovider: LedgerSubprovider;
- private _defaultGasPrice: BigNumber;
- private _watchGasPriceIntervalId: NodeJS.Timer;
- private _injectedProviderIfExists?: InjectedProvider;
- private static _getNameGivenProvider(provider: Provider): string {
- const providerType = utils.getProviderType(provider);
- const providerNameIfExists = providerToName[providerType];
- if (_.isUndefined(providerNameIfExists)) {
- return constants.PROVIDER_NAME_GENERIC;
- }
- return providerNameIfExists;
- }
- private static async _getProviderAsync(
- injectedProviderIfExists?: InjectedProvider,
- networkIdIfExists?: number,
- shouldUserLedgerProvider: boolean = false,
- ): Promise<[Provider, LedgerSubprovider | undefined]> {
- const doesInjectedProviderExist = !_.isUndefined(injectedProviderIfExists);
- const isNetworkIdAvailable = !_.isUndefined(networkIdIfExists);
- const publicNodeUrlsIfExistsForNetworkId = configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkIdIfExists];
- const isPublicNodeAvailableForNetworkId = !_.isUndefined(publicNodeUrlsIfExistsForNetworkId);
-
- if (shouldUserLedgerProvider && isNetworkIdAvailable) {
- const isU2FSupported = await utils.isU2FSupportedAsync();
- if (!isU2FSupported) {
- throw new Error('Cannot update providerType to LEDGER without U2F support');
- }
- const provider = new Web3ProviderEngine();
- const ledgerWalletConfigs = {
- networkId: networkIdIfExists,
- ledgerEthereumClientFactoryAsync: ledgerEthereumBrowserClientFactoryAsync,
- };
- const ledgerSubprovider = new LedgerSubprovider(ledgerWalletConfigs);
- provider.addProvider(ledgerSubprovider);
- provider.addProvider(new FilterSubprovider());
- const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkIdIfExists], publicNodeUrl => {
- return new RPCSubprovider(publicNodeUrl);
- });
- provider.addProvider(new RedundantSubprovider(rpcSubproviders));
- provider.start();
- return [provider, ledgerSubprovider];
- } else if (doesInjectedProviderExist && isPublicNodeAvailableForNetworkId) {
- // We catch all requests involving a users account and send it to the injectedWeb3
- // instance. All other requests go to the public hosted node.
- const provider = new Web3ProviderEngine();
- const providerName = this._getNameGivenProvider(injectedProviderIfExists);
- // Wrap Metamask in a compatability wrapper MetamaskSubprovider (to handle inconsistencies)
- const signerSubprovider =
- providerName === constants.PROVIDER_NAME_METAMASK
- ? new MetamaskSubprovider(injectedProviderIfExists)
- : new SignerSubprovider(injectedProviderIfExists);
- provider.addProvider(signerSubprovider);
- provider.addProvider(new FilterSubprovider());
- const rpcSubproviders = _.map(publicNodeUrlsIfExistsForNetworkId, publicNodeUrl => {
- return new RPCSubprovider(publicNodeUrl);
- });
- provider.addProvider(new RedundantSubprovider(rpcSubproviders));
- provider.start();
- return [provider, undefined];
- } else if (doesInjectedProviderExist) {
- // Since no public node for this network, all requests go to injectedWeb3 instance
- return [injectedProviderIfExists, undefined];
- } else {
- // If no injectedWeb3 instance, all requests fallback to our public hosted mainnet/testnet node
- // We do this so that users can still browse the 0x Portal DApp even if they do not have web3
- // injected into their browser.
- const provider = new Web3ProviderEngine();
- provider.addProvider(new FilterSubprovider());
- const networkId = constants.NETWORK_ID_MAINNET;
- const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkId], publicNodeUrl => {
- return new RPCSubprovider(publicNodeUrl);
- });
- provider.addProvider(new RedundantSubprovider(rpcSubproviders));
- provider.start();
- return [provider, undefined];
- }
- }
- constructor(dispatcher: Dispatcher) {
- this._dispatcher = dispatcher;
- const defaultGasPrice = GWEI_IN_WEI * 40;
- this._defaultGasPrice = new BigNumber(defaultGasPrice);
- // We need a unique reference to this function so we can use it to unsubcribe.
- this._injectedProviderUpdateHandler = this._handleInjectedProviderUpdateAsync.bind(this);
- // tslint:disable-next-line:no-floating-promises
- this._onPageLoadInitFireAndForgetAsync();
- }
- public async networkIdUpdatedFireAndForgetAsync(newNetworkId: number): Promise<void> {
- const isConnected = !_.isUndefined(newNetworkId);
- if (!isConnected) {
- this.networkId = newNetworkId;
- this._dispatcher.encounteredBlockchainError(BlockchainErrs.DisconnectedFromEthereumNode);
- this._dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- } else if (this.networkId !== newNetworkId) {
- this.networkId = newNetworkId;
- this._dispatcher.encounteredBlockchainError(BlockchainErrs.NoError);
- await this.fetchTokenInformationAsync();
- await this._rehydrateStoreWithContractEventsAsync();
- }
- }
- public async userAddressUpdatedFireAndForgetAsync(newUserAddress: string): Promise<void> {
- if (this._userAddressIfExists !== newUserAddress) {
- this._userAddressIfExists = newUserAddress;
- await this.fetchTokenInformationAsync();
- await this._rehydrateStoreWithContractEventsAsync();
- }
- }
- public async nodeVersionUpdatedFireAndForgetAsync(nodeVersion: string): Promise<void> {
- if (this.nodeVersion !== nodeVersion) {
- this.nodeVersion = nodeVersion;
- }
- }
- public async isAddressInTokenRegistryAsync(tokenAddress: string): Promise<boolean> {
- const tokens = fakeTokenRegistry[this.networkId];
- const tokenIfExists = _.find(tokens, { address: tokenAddress });
-
- // HACK: Override token addresses on testnets
- const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId];
- let isTokenAddressInOverrides = false;
- if (!_.isUndefined(tokenSymbolToAddressOverrides)) {
- isTokenAddressInOverrides = _.values(tokenSymbolToAddressOverrides).includes(tokenAddress);
- }
- return !_.isUndefined(tokenIfExists) || isTokenAddressInOverrides;
- }
- public getLedgerDerivationPathIfExists(): string {
- if (_.isUndefined(this._ledgerSubprovider)) {
- return undefined;
- }
- const path = this._ledgerSubprovider.getPath();
- return path;
- }
- public updateLedgerDerivationPathIfExists(path: string): void {
- if (_.isUndefined(this._ledgerSubprovider)) {
- return; // noop
- }
- this._ledgerSubprovider.setPath(path);
- }
- public async updateProviderToLedgerAsync(networkId: number): Promise<void> {
- const shouldPollUserAddress = false;
- const shouldUserLedgerProvider = true;
- await this._resetOrInitializeAsync(networkId, shouldPollUserAddress, shouldUserLedgerProvider);
- }
- public async updateProviderToInjectedAsync(): Promise<void> {
- const shouldPollUserAddress = true;
- const shouldUserLedgerProvider = false;
- this._dispatcher.updateBlockchainIsLoaded(false);
- // We don't want to be out of sync with the network the injected provider declares.
- const networkId = await this._getInjectedProviderNetworkIdIfExistsAsync();
- await this._resetOrInitializeAsync(networkId, shouldPollUserAddress, shouldUserLedgerProvider);
- }
- public async setProxyAllowanceAsync(token: Token, amountInBaseUnits: BigNumber): Promise<void> {
- utils.assert(this.isValidAddress(token.address), BlockchainCallErrs.TokenAddressIsInvalid);
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
- utils.assert(!_.isUndefined(this._contractWrappers), 'Contract Wrappers must be instantiated.');
-
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.erc20Token.setProxyAllowanceAsync(
- token.address,
- this._userAddressIfExists,
- amountInBaseUnits,
- {
- gasPrice: this._defaultGasPrice,
- },
- );
- await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- }
- public async sendAsync(toAddress: string, amountInBaseUnits: BigNumber): Promise<void> {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
- const transaction = {
- from: this._userAddressIfExists,
- to: toAddress,
- value: amountInBaseUnits,
- gasPrice: this._defaultGasPrice,
- };
- this._showFlashMessageIfLedger();
- const txHash = await this._web3Wrapper.sendTransactionAsync(transaction);
- await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
- txHash,
- this.networkId,
- EtherscanLinkSuffixes.Tx,
- );
- this._dispatcher.showFlashMessage(
- React.createElement(AssetSendCompleted, {
- etherScanLinkIfExists,
- toAddress,
- amountInBaseUnits,
- decimals: constants.DECIMAL_PLACES_ETH,
- symbol: constants.ETHER_SYMBOL,
- }),
- );
- }
- public async transferAsync(token: Token, toAddress: string, amountInBaseUnits: BigNumber): Promise<void> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.erc20Token.transferAsync(
- token.address,
- this._userAddressIfExists,
- toAddress,
- amountInBaseUnits,
- {
- gasPrice: this._defaultGasPrice,
- },
- );
- await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
- txHash,
- this.networkId,
- EtherscanLinkSuffixes.Tx,
- );
- this._dispatcher.showFlashMessage(
- React.createElement(AssetSendCompleted, {
- etherScanLinkIfExists,
- toAddress,
- amountInBaseUnits,
- decimals: token.decimals,
- symbol: token.symbol,
- }),
- );
- }
- public async fillOrderAsync(signedOrder: SignedOrder, fillTakerTokenAmount: BigNumber): Promise<BigNumber> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.exchange.fillOrderAsync(
- signedOrder,
- fillTakerTokenAmount,
- this._userAddressIfExists,
- {
- gasPrice: this._defaultGasPrice,
- },
- );
- const receipt = await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- const logs: Array<LogWithDecodedArgs<ExchangeEventArgs>> = receipt.logs as any;
- const logFill = _.find(logs, { event: ExchangeEvents.Fill });
- const args = (logFill.args as any) as ExchangeFillEventArgs;
- const takerAssetFilledAmount = args.takerAssetFilledAmount;
- return takerAssetFilledAmount;
- }
- public async cancelOrderAsync(signedOrder: SignedOrder): Promise<string> {
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.exchange.cancelOrderAsync(signedOrder, {
- gasPrice: this._defaultGasPrice,
- });
- const receipt = await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- const logs: Array<LogWithDecodedArgs<ExchangeEventArgs>> = receipt.logs as any;
- const logCancel = _.find(logs, { event: ExchangeEvents.Cancel });
- const args = (logCancel.args as any) as ExchangeCancelEventArgs;
- const cancelledOrderHash = args.orderHash;
- return cancelledOrderHash;
- }
- public async getUnavailableTakerAmountAsync(orderHash: string): Promise<BigNumber> {
- utils.assert(orderHashUtils.isValidOrderHash(orderHash), 'Must be valid orderHash');
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- const unavailableTakerAmount = await this._contractWrappers.exchange.getFilledTakerAssetAmountAsync(orderHash);
- return unavailableTakerAmount;
- }
- public getExchangeContractAddressIfExists(): string | undefined {
- return this._contractWrappers.exchange.address;
- }
- public async validateFillOrderThrowIfInvalidAsync(
- signedOrder: SignedOrder,
- fillTakerTokenAmount: BigNumber,
- takerAddress: string,
- ): Promise<void> {
- await this._contractWrappers.exchange.validateFillOrderThrowIfInvalidAsync(
- signedOrder,
- fillTakerTokenAmount,
- takerAddress,
- );
- }
- public isValidAddress(address: string): boolean {
- const lowercaseAddress = address.toLowerCase();
- return Web3Wrapper.isAddress(lowercaseAddress);
- }
- public async isValidSignatureAsync(data: string, signature: string, signerAddress: string): Promise<boolean> {
- const result = await signatureUtils.isValidSignatureAsync(
- this._contractWrappers.getProvider(),
- data,
- signature,
- signerAddress,
- );
- return result;
- }
- public async pollTokenBalanceAsync(token: Token): Promise<BigNumber> {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- const [currBalance] = await this.getTokenBalanceAndAllowanceAsync(this._userAddressIfExists, token.address);
-
- const newTokenBalancePromise = new Promise((resolve: (balance: BigNumber) => void, reject) => {
- const tokenPollInterval = intervalUtils.setAsyncExcludingInterval(
- async () => {
- const [balance] = await this.getTokenBalanceAndAllowanceAsync(
- this._userAddressIfExists,
- token.address,
- );
- if (!balance.eq(currBalance)) {
- intervalUtils.clearAsyncExcludingInterval(tokenPollInterval);
- resolve(balance);
- }
- },
- 5000,
- (err: Error) => {
- logUtils.log(`Polling tokenBalance failed: ${err}`);
- intervalUtils.clearAsyncExcludingInterval(tokenPollInterval);
- reject(err);
- },
- );
- });
-
- return newTokenBalancePromise;
- }
- public async signOrderHashAsync(orderHash: string): Promise<string> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- const makerAddress = this._userAddressIfExists;
- // If makerAddress is undefined, this means they have a web3 instance injected into their browser
- // but no account addresses associated with it.
- if (_.isUndefined(makerAddress)) {
- throw new Error('Tried to send a sign request but user has no associated addresses');
- }
- this._showFlashMessageIfLedger();
- const provider = this._contractWrappers.getProvider();
- const ecSignatureString = await signatureUtils.ecSignHashAsync(provider, orderHash, makerAddress);
- this._dispatcher.updateSignature(ecSignatureString);
- return ecSignatureString;
- }
- public async mintTestTokensAsync(token: Token): Promise<void> {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- const mintableContract = await this._instantiateContractIfExistsAsync(MintableArtifacts, token.address);
- this._showFlashMessageIfLedger();
- await mintableContract.mint(constants.MINT_AMOUNT, {
- from: this._userAddressIfExists,
- gasPrice: this._defaultGasPrice,
- });
- }
- public async getBalanceInWeiAsync(owner: string): Promise<BigNumber> {
- const balanceInWei = await this._web3Wrapper.getBalanceInWeiAsync(owner);
- return balanceInWei;
- }
- public async convertEthToWrappedEthTokensAsync(etherTokenAddress: string, amount: BigNumber): Promise<void> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.etherToken.depositAsync(
- etherTokenAddress,
- amount,
- this._userAddressIfExists,
- {
- gasPrice: this._defaultGasPrice,
- },
- );
- await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- }
- public async convertWrappedEthTokensToEthAsync(etherTokenAddress: string, amount: BigNumber): Promise<void> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- this._showFlashMessageIfLedger();
- const txHash = await this._contractWrappers.etherToken.withdrawAsync(
- etherTokenAddress,
- amount,
- this._userAddressIfExists,
- {
- gasPrice: this._defaultGasPrice,
- },
- );
- await this._showEtherScanLinkAndAwaitTransactionMinedAsync(txHash);
- }
- public async doesContractExistAtAddressAsync(address: string): Promise<boolean> {
- const doesContractExist = await this._web3Wrapper.doesContractExistAtAddressAsync(address);
- return doesContractExist;
- }
- public async getCurrentUserTokenBalanceAndAllowanceAsync(tokenAddress: string): Promise<BigNumber[]> {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- const tokenBalanceAndAllowance = await this.getTokenBalanceAndAllowanceAsync(
- this._userAddressIfExists,
- tokenAddress,
- );
- return tokenBalanceAndAllowance;
- }
- public async getTokenBalanceAndAllowanceAsync(
- ownerAddressIfExists: string,
- tokenAddress: string,
- ): Promise<[BigNumber, BigNumber]> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
-
- if (_.isUndefined(ownerAddressIfExists)) {
- const zero = new BigNumber(0);
- return [zero, zero];
- }
- let balance = new BigNumber(0);
- let allowance = new BigNumber(0);
- if (this._doesUserAddressExist()) {
- [balance, allowance] = await Promise.all([
- this._contractWrappers.erc20Token.getBalanceAsync(tokenAddress, ownerAddressIfExists),
- this._contractWrappers.erc20Token.getProxyAllowanceAsync(tokenAddress, ownerAddressIfExists),
- ]);
- }
- return [balance, allowance];
- }
- public async getUserAccountsAsync(): Promise<string[]> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- const provider = this._contractWrappers.getProvider();
- const web3Wrapper = new Web3Wrapper(provider);
- const userAccountsIfExists = await web3Wrapper.getAvailableAddressesAsync();
- return userAccountsIfExists;
- }
- // HACK: When a user is using a Ledger, we simply dispatch the selected userAddress, which
- // by-passes the web3Wrapper logic for updating the prevUserAddress. We therefore need to
- // manually update it. This should only be called by the LedgerConfigDialog.
- public updateWeb3WrapperPrevUserAddress(newUserAddress: string): void {
- this._blockchainWatcher.updatePrevUserAddress(newUserAddress);
- }
- public destroy(): void {
- this._blockchainWatcher.destroy();
- if (this._injectedProviderObservable) {
- this._injectedProviderObservable.unsubscribe(this._injectedProviderUpdateHandler);
- }
- this._stopWatchingExchangeLogFillEvents();
- this._stopWatchingGasPrice();
- }
- public async fetchTokenInformationAsync(): Promise<void> {
- utils.assert(
- !_.isUndefined(this.networkId),
- 'Cannot call fetchTokenInformationAsync if disconnected from Ethereum node',
- );
-
- this._dispatcher.updateBlockchainIsLoaded(false);
-
- const tokenRegistryTokensByAddress = await this._getTokenRegistryTokensByAddressAsync();
-
- const trackedTokensByAddress = _.isUndefined(this._userAddressIfExists)
- ? {}
- : trackedTokenStorage.getTrackedTokensByAddress(this._userAddressIfExists, this.networkId);
- const tokenRegistryTokens = _.values(tokenRegistryTokensByAddress);
- const tokenRegistryTokenSymbols = _.map(tokenRegistryTokens, t => t.symbol);
- const defaultTrackedTokensInRegistry = _.intersection(
- tokenRegistryTokenSymbols,
- configs.DEFAULT_TRACKED_TOKEN_SYMBOLS,
- );
- const currentTimestamp = moment().unix();
- if (defaultTrackedTokensInRegistry.length !== configs.DEFAULT_TRACKED_TOKEN_SYMBOLS.length) {
- this._dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- this._dispatcher.encounteredBlockchainError(BlockchainErrs.DefaultTokensNotInTokenRegistry);
- const err = new Error(
- `Default tracked tokens (${JSON.stringify(
- configs.DEFAULT_TRACKED_TOKEN_SYMBOLS,
- )}) not found in tokenRegistry: ${JSON.stringify(tokenRegistryTokens)}`,
- );
- errorReporter.report(err);
- return;
- }
- if (_.isEmpty(trackedTokensByAddress)) {
- _.each(configs.DEFAULT_TRACKED_TOKEN_SYMBOLS, symbol => {
- const token = _.find(tokenRegistryTokens, t => t.symbol === symbol);
- token.trackedTimestamp = currentTimestamp;
- trackedTokensByAddress[token.address] = token;
- });
- if (!_.isUndefined(this._userAddressIfExists)) {
- _.each(trackedTokensByAddress, (token: Token) => {
- trackedTokenStorage.addTrackedTokenToUser(this._userAddressIfExists, this.networkId, token);
- });
- }
- } else {
- // Properly set all tokenRegistry tokens `trackedTimestamp` if they are in the existing trackedTokens array
- _.each(trackedTokensByAddress, (trackedToken: Token, address: string) => {
- if (!_.isUndefined(tokenRegistryTokensByAddress[address])) {
- tokenRegistryTokensByAddress[address].trackedTimestamp = trackedToken.trackedTimestamp;
- }
- });
- }
- const allTokensByAddress = {
- ...tokenRegistryTokensByAddress,
- ...trackedTokensByAddress,
- };
- const allTokens = _.values(allTokensByAddress);
- const mostPopularTradingPairTokens: Token[] = [
- _.find(allTokens, { symbol: configs.DEFAULT_TRACKED_TOKEN_SYMBOLS[0] }),
- _.find(allTokens, { symbol: configs.DEFAULT_TRACKED_TOKEN_SYMBOLS[1] }),
- ];
- const sideToAssetToken: SideToAssetToken = {
- [Side.Deposit]: {
- address: mostPopularTradingPairTokens[0].address,
- },
- [Side.Receive]: {
- address: mostPopularTradingPairTokens[1].address,
- },
- };
- this._dispatcher.batchDispatch(allTokensByAddress, this.networkId, this._userAddressIfExists, sideToAssetToken);
-
- this._dispatcher.updateBlockchainIsLoaded(true);
- }
- private async _getInjectedProviderIfExistsAsync(): Promise<InjectedProvider | undefined> {
- if (!_.isUndefined(this._injectedProviderIfExists)) {
- return this._injectedProviderIfExists;
- }
- let injectedProviderIfExists = (window as any).ethereum;
- if (!_.isUndefined(injectedProviderIfExists)) {
- if (!_.isUndefined(injectedProviderIfExists.enable)) {
- try {
- await injectedProviderIfExists.enable();
- } catch (err) {
- errorReporter.report(err);
- }
- }
- } else {
- const injectedWeb3IfExists = (window as any).web3;
- if (!_.isUndefined(injectedWeb3IfExists) && !_.isUndefined(injectedWeb3IfExists.currentProvider)) {
- injectedProviderIfExists = injectedWeb3IfExists.currentProvider;
- } else {
- return undefined;
- }
- }
- this._injectedProviderIfExists = injectedProviderIfExists;
- return injectedProviderIfExists;
- }
- private async _getInjectedProviderNetworkIdIfExistsAsync(): Promise<number | undefined> {
- // If the user has an injectedWeb3 instance that is disconnected from a backing
- // Ethereum node, this call will throw. We need to handle this case gracefully
- const injectedProviderIfExists = await this._getInjectedProviderIfExistsAsync();
- let networkIdIfExists: number;
- if (!_.isUndefined(injectedProviderIfExists)) {
- try {
- const injectedWeb3Wrapper = new Web3Wrapper(injectedProviderIfExists);
- networkIdIfExists = await injectedWeb3Wrapper.getNetworkIdAsync();
- } catch (err) {
- // Ignore error and proceed with networkId undefined
- }
- }
- return networkIdIfExists;
- }
- private async _showEtherScanLinkAndAwaitTransactionMinedAsync(
- txHash: string,
- ): Promise<TransactionReceiptWithDecodedLogs> {
- const etherScanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
- txHash,
- this.networkId,
- EtherscanLinkSuffixes.Tx,
- );
- this._dispatcher.showFlashMessage(
- React.createElement(TransactionSubmitted, {
- etherScanLinkIfExists,
- }),
- );
- const provider = this._contractWrappers.getProvider();
- const web3Wrapper = new Web3Wrapper(provider);
- const exchangeAbi = this._contractWrappers.exchange.abi;
- web3Wrapper.abiDecoder.addABI(exchangeAbi);
- const receipt = await web3Wrapper.awaitTransactionSuccessAsync(txHash);
- return receipt;
- }
- private _doesUserAddressExist(): boolean {
- return !_.isUndefined(this._userAddressIfExists);
- }
- private async _handleInjectedProviderUpdateAsync(update: InjectedProviderUpdate): Promise<void> {
- if (update.networkVersion === 'loading' || !_.isUndefined(this._ledgerSubprovider)) {
- return;
- }
- const updatedNetworkId = _.parseInt(update.networkVersion);
- if (this.networkId === updatedNetworkId) {
- return;
- }
- const shouldPollUserAddress = true;
- const shouldUserLedgerProvider = false;
- await this._resetOrInitializeAsync(updatedNetworkId, shouldPollUserAddress, shouldUserLedgerProvider);
- }
- private async _rehydrateStoreWithContractEventsAsync(): Promise<void> {
- // Ensure we are only ever listening to one set of events
- this._stopWatchingExchangeLogFillEvents();
-
- if (!this._doesUserAddressExist()) {
- return; // short-circuit
- }
-
- if (!_.isUndefined(this._contractWrappers)) {
- // Since we do not have an index on the `taker` address and want to show
- // transactions where an account is either the `maker` or `taker`, we loop
- // through all fill events, and filter/cache them client-side.
- const filterIndexObj = {};
- await this._startListeningForExchangeLogFillEventsAsync(filterIndexObj);
- }
- }
- private async _startListeningForExchangeLogFillEventsAsync(indexFilterValues: IndexedFilterValues): Promise<void> {
- utils.assert(!_.isUndefined(this._contractWrappers), 'ContractWrappers must be instantiated.');
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- // Fetch historical logs
- await this._fetchHistoricalExchangeLogFillEventsAsync(indexFilterValues);
-
- // Start a subscription for new logs
- this._contractWrappers.exchange.subscribe(
- ExchangeEvents.Fill,
- indexFilterValues,
- async (err: Error, decodedLogEvent: DecodedLogEvent<ExchangeFillEventArgs>) => {
- if (err) {
- // Note: it's not entirely clear from the documentation which
- // errors will be thrown by `watch`. For now, let's log the error
- // to rollbar and stop watching when one occurs
- errorReporter.report(err); // fire and forget
- return;
- } else {
- const decodedLog = decodedLogEvent.log;
- if (!this._doesLogEventInvolveUser(decodedLog)) {
- return; // We aren't interested in the fill event
- }
- this._updateLatestFillsBlockIfNeeded(decodedLog.blockNumber);
- const fill = await this._convertDecodedLogToFillAsync(decodedLog);
- if (decodedLogEvent.isRemoved) {
- tradeHistoryStorage.removeFillFromUser(this._userAddressIfExists, this.networkId, fill);
- } else {
- tradeHistoryStorage.addFillToUser(this._userAddressIfExists, this.networkId, fill);
- }
- }
- },
- );
- }
- private async _fetchHistoricalExchangeLogFillEventsAsync(indexFilterValues: IndexedFilterValues): Promise<void> {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- const fromBlock = tradeHistoryStorage.getFillsLatestBlock(this._userAddressIfExists, this.networkId);
- const blockRange: BlockRange = {
- fromBlock,
- toBlock: 'latest' as BlockParam,
- };
- const decodedLogs = await this._contractWrappers.exchange.getLogsAsync<ExchangeFillEventArgs>(
- ExchangeEvents.Fill,
- blockRange,
- indexFilterValues,
- );
- for (const decodedLog of decodedLogs) {
- if (!this._doesLogEventInvolveUser(decodedLog)) {
- continue; // We aren't interested in the fill event
- }
- this._updateLatestFillsBlockIfNeeded(decodedLog.blockNumber);
- const fill = await this._convertDecodedLogToFillAsync(decodedLog);
- tradeHistoryStorage.addFillToUser(this._userAddressIfExists, this.networkId, fill);
- }
- }
- private async _convertDecodedLogToFillAsync(decodedLog: LogWithDecodedArgs<ExchangeFillEventArgs>): Promise<Fill> {
- const args = decodedLog.args;
- const blockTimestamp = await this._web3Wrapper.getBlockTimestampAsync(decodedLog.blockHash);
- const makerToken = assetDataUtils.decodeERC20AssetData(args.makerAssetData).tokenAddress;
- const takerToken = assetDataUtils.decodeERC20AssetData(args.takerAssetData).tokenAddress;
- const fill = {
- filledTakerTokenAmount: args.takerAssetFilledAmount,
- filledMakerTokenAmount: args.makerAssetFilledAmount,
- logIndex: decodedLog.logIndex,
- maker: args.makerAddress,
- orderHash: args.orderHash,
- taker: args.takerAddress,
- makerToken,
- takerToken,
- paidMakerFee: args.makerFeePaid,
- paidTakerFee: args.takerFeePaid,
- transactionHash: decodedLog.transactionHash,
- blockTimestamp,
- };
- return fill;
- }
- private _doesLogEventInvolveUser(decodedLog: LogWithDecodedArgs<ExchangeFillEventArgs>): boolean {
- const args = decodedLog.args;
- const isUserMakerOrTaker = args.maker === this._userAddressIfExists || args.taker === this._userAddressIfExists;
- return isUserMakerOrTaker;
- }
- private _updateLatestFillsBlockIfNeeded(blockNumber: number): void {
- utils.assert(this._doesUserAddressExist(), BlockchainCallErrs.UserHasNoAssociatedAddresses);
-
- const isBlockPending = _.isNull(blockNumber);
- if (!isBlockPending) {
- // Hack: I've observed the behavior where a client won't register certain fill events
- // and lowering the cache blockNumber fixes the issue. As a quick fix for now, simply
- // set the cached blockNumber 50 below the one returned. This way, upon refreshing, a user
- // would still attempt to re-fetch events from the previous 50 blocks, but won't need to
- // re-fetch all events in all blocks.
- // TODO: Debug if this is a race condition, and apply a more precise fix
- const blockNumberToSet =
- blockNumber - BLOCK_NUMBER_BACK_TRACK < 0 ? 0 : blockNumber - BLOCK_NUMBER_BACK_TRACK;
- tradeHistoryStorage.setFillsLatestBlock(this._userAddressIfExists, this.networkId, blockNumberToSet);
- }
- }
- private _stopWatchingExchangeLogFillEvents(): void {
- this._contractWrappers.exchange.unsubscribeAll();
- }
- private async _getTokenRegistryTokensByAddressAsync(): Promise<TokenByAddress> {
- let tokenRegistryTokens;
- if (this.networkId === constants.NETWORK_ID_MAINNET) {
- tokenRegistryTokens = await backendClient.getTokenInfosAsync();
- } else {
- tokenRegistryTokens = fakeTokenRegistry[this.networkId];
- const tokenSymbolToAddressOverrides = tokenAddressOverrides[this.networkId];
- if (!_.isUndefined(tokenAddressOverrides)) {
- // HACK: Override token addresses on testnets
- tokenRegistryTokens = _.map(tokenRegistryTokens, (token: ZeroExToken) => {
- const overrideIfExists = tokenSymbolToAddressOverrides[token.symbol];
- if (!_.isUndefined(overrideIfExists)) {
- return {
- ...token,
- address: overrideIfExists,
- };
- }
- return token;
- });
- }
- }
- const tokenByAddress: TokenByAddress = {};
- _.each(tokenRegistryTokens, (t: ZeroExToken) => {
- // HACK: For now we have a hard-coded list of iconUrls for the dummyTokens
- // TODO: Refactor this out and pull the iconUrl directly from the TokenRegistry
- const iconUrl = utils.getTokenIconUrl(t.symbol);
- const token: Token = {
- iconUrl,
- address: t.address,
- name: t.name,
- symbol: t.symbol,
- decimals: t.decimals,
- trackedTimestamp: undefined,
- isRegistered: true,
- };
- tokenByAddress[token.address] = token;
- });
- return tokenByAddress;
- }
- private async _onPageLoadInitFireAndForgetAsync(): Promise<void> {
- await utils.onPageLoadPromise; // wait for page to load
- const networkIdIfExists = await this._getInjectedProviderNetworkIdIfExistsAsync();
- this.networkId = !_.isUndefined(networkIdIfExists) ? networkIdIfExists : constants.NETWORK_ID_MAINNET;
- const injectedProviderIfExists = await this._getInjectedProviderIfExistsAsync();
- if (!_.isUndefined(injectedProviderIfExists)) {
- const injectedProviderObservable = injectedProviderIfExists.publicConfigStore;
- if (!_.isUndefined(injectedProviderObservable) && _.isUndefined(this._injectedProviderObservable)) {
- this._injectedProviderObservable = injectedProviderObservable;
- this._injectedProviderObservable.subscribe(this._injectedProviderUpdateHandler);
- }
- }
- this._updateProviderName(injectedProviderIfExists);
- const shouldPollUserAddress = true;
- const shouldUseLedgerProvider = false;
- this._startWatchingGasPrice();
- await this._resetOrInitializeAsync(this.networkId, shouldPollUserAddress, shouldUseLedgerProvider);
- }
- private _startWatchingGasPrice(): void {
- if (!_.isUndefined(this._watchGasPriceIntervalId)) {
- return; // we are already watching
- }
- const oneMinuteInMs = 60000;
- // tslint:disable-next-line:no-floating-promises
- this._updateDefaultGasPriceAsync();
- this._watchGasPriceIntervalId = intervalUtils.setAsyncExcludingInterval(
- this._updateDefaultGasPriceAsync.bind(this),
- oneMinuteInMs,
- (err: Error) => {
- logUtils.log(`Watching gas price failed: ${err.stack}`);
- this._stopWatchingGasPrice();
- },
- );
- }
- private _stopWatchingGasPrice(): void {
- if (!_.isUndefined(this._watchGasPriceIntervalId)) {
- intervalUtils.clearAsyncExcludingInterval(this._watchGasPriceIntervalId);
- }
- }
- private async _resetOrInitializeAsync(
- networkId: number,
- shouldPollUserAddress: boolean = false,
- shouldUserLedgerProvider: boolean = false,
- ): Promise<void> {
- if (!shouldUserLedgerProvider) {
- this._dispatcher.updateBlockchainIsLoaded(false);
- }
- this._dispatcher.updateUserWeiBalance(undefined);
- this.networkId = networkId;
- const injectedProviderIfExists = await this._getInjectedProviderIfExistsAsync();
- const [provider, ledgerSubproviderIfExists] = await Blockchain._getProviderAsync(
- injectedProviderIfExists,
- networkId,
- shouldUserLedgerProvider,
- );
- this._web3Wrapper = new Web3Wrapper(provider);
- this.networkId = await this._web3Wrapper.getNetworkIdAsync();
- if (!_.isUndefined(this._contractWrappers)) {
- this._contractWrappers.unsubscribeAll();
- }
- const contractWrappersConfig = {
- networkId,
- };
- this._contractWrappers = new ContractWrappers(provider, contractWrappersConfig);
- if (!_.isUndefined(this._blockchainWatcher)) {
- this._blockchainWatcher.destroy();
- }
- this._blockchainWatcher = new BlockchainWatcher(this._dispatcher, this._web3Wrapper, shouldPollUserAddress);
- if (shouldUserLedgerProvider && !_.isUndefined(ledgerSubproviderIfExists)) {
- delete this._userAddressIfExists;
- this._ledgerSubprovider = ledgerSubproviderIfExists;
- this._dispatcher.updateUserAddress(undefined);
- this._dispatcher.updateProviderType(ProviderType.Ledger);
- } else {
- delete this._ledgerSubprovider;
- const userAddresses = await this._web3Wrapper.getAvailableAddressesAsync();
- this._userAddressIfExists = userAddresses[0];
- this._dispatcher.updateUserAddress(this._userAddressIfExists);
- if (!_.isUndefined(injectedProviderIfExists)) {
- this._dispatcher.updateProviderType(ProviderType.Injected);
- }
- await this.fetchTokenInformationAsync();
- }
- await this._blockchainWatcher.startEmittingUserBalanceStateAsync();
- this._dispatcher.updateNetworkId(networkId);
- await this._rehydrateStoreWithContractEventsAsync();
- }
- private _updateProviderName(injectedProviderIfExists?: InjectedProvider): void {
- const doesInjectedProviderExist = !_.isUndefined(injectedProviderIfExists);
- const providerName = doesInjectedProviderExist
- ? Blockchain._getNameGivenProvider(injectedProviderIfExists)
- : constants.PROVIDER_NAME_PUBLIC;
- this._dispatcher.updateInjectedProviderName(providerName);
- }
- private async _instantiateContractIfExistsAsync(artifact: any, address?: string): Promise<ContractInstance> {
- const c = await contract(artifact);
- const providerObj = this._web3Wrapper.getProvider();
- c.setProvider(providerObj);
-
- const artifactNetworkConfigs = artifact.networks[this.networkId];
- let contractAddress;
- if (!_.isUndefined(address)) {
- contractAddress = address;
- } else if (!_.isUndefined(artifactNetworkConfigs)) {
- contractAddress = artifactNetworkConfigs.address;
- }
-
- if (!_.isUndefined(contractAddress)) {
- const doesContractExist = await this.doesContractExistAtAddressAsync(contractAddress);
- if (!doesContractExist) {
- logUtils.log(`Contract does not exist: ${artifact.contract_name} at ${contractAddress}`);
- throw new Error(BlockchainCallErrs.ContractDoesNotExist);
- }
- }
-
- try {
- const contractInstance = _.isUndefined(address) ? await c.deployed() : await c.at(address);
- return contractInstance;
- } catch (err) {
- const errMsg = `${err}`;
- logUtils.log(`Notice: Error encountered: ${err} ${err.stack}`);
- if (_.includes(errMsg, 'not been deployed to detected network')) {
- throw new Error(BlockchainCallErrs.ContractDoesNotExist);
- } else {
- errorReporter.report(err);
- throw new Error(BlockchainCallErrs.UnhandledError);
- }
- }
- }
- private _showFlashMessageIfLedger(): void {
- if (!_.isUndefined(this._ledgerSubprovider)) {
- this._dispatcher.showFlashMessage('Confirm the transaction on your Ledger Nano S');
- }
- }
- private async _updateDefaultGasPriceAsync(): Promise<void> {
- try {
- const gasInfo = await backendClient.getGasInfoAsync();
- const gasPriceInGwei = new BigNumber(gasInfo.fast / 10);
- const gasPriceInWei = gasPriceInGwei.multipliedBy(1000000000);
- this._defaultGasPrice = gasPriceInWei;
- } catch (err) {
- return;
- }
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/blockchain_watcher.ts b/packages/website/ts/blockchain_watcher.ts
deleted file mode 100644
index 835932dcd..000000000
--- a/packages/website/ts/blockchain_watcher.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { BigNumber, intervalUtils, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import { Dispatcher } from 'ts/redux/dispatcher';
-
-export class BlockchainWatcher {
- private readonly _dispatcher: Dispatcher;
- private readonly _web3Wrapper: Web3Wrapper;
- private readonly _shouldPollUserAddress: boolean;
- private _watchBalanceIntervalId: NodeJS.Timer;
- private _prevUserEtherBalanceInWei?: BigNumber;
- private _prevUserAddressIfExists: string;
- private _prevNodeVersionIfExists: string;
- constructor(dispatcher: Dispatcher, web3Wrapper: Web3Wrapper, shouldPollUserAddress: boolean) {
- this._dispatcher = dispatcher;
- this._shouldPollUserAddress = shouldPollUserAddress;
- this._web3Wrapper = web3Wrapper;
- }
- public destroy(): void {
- this._stopEmittingUserBalanceState();
- // HACK: stop() is only available on providerEngine instances
- const provider = this._web3Wrapper.getProvider();
- if (!_.isUndefined((provider as any).stop)) {
- (provider as any).stop();
- }
- }
- // This should only be called from the LedgerConfigDialog
- public updatePrevUserAddress(userAddress: string): void {
- this._prevUserAddressIfExists = userAddress;
- }
- public async startEmittingUserBalanceStateAsync(): Promise<void> {
- if (!_.isUndefined(this._watchBalanceIntervalId)) {
- return; // we are already emitting the state
- }
- this._prevUserEtherBalanceInWei = undefined;
- await this._updateBalanceAsync();
- this._watchBalanceIntervalId = intervalUtils.setAsyncExcludingInterval(
- this._updateBalanceAsync.bind(this),
- 5000,
- (err: Error) => {
- logUtils.log(`Watching network and balances failed: ${err.stack}`);
- this._stopEmittingUserBalanceState();
- },
- );
- }
- private async _updateBalanceAsync(): Promise<void> {
- const currentNodeVersion = await this._web3Wrapper.getNodeVersionAsync();
- if (this._prevNodeVersionIfExists !== currentNodeVersion) {
- this._prevNodeVersionIfExists = currentNodeVersion;
- this._dispatcher.updateNodeVersion(currentNodeVersion);
- }
-
- if (this._shouldPollUserAddress) {
- const addresses = await this._web3Wrapper.getAvailableAddressesAsync();
- const userAddressIfExists = addresses[0];
- // Update makerAddress on network change
- if (this._prevUserAddressIfExists !== userAddressIfExists) {
- this._prevUserAddressIfExists = userAddressIfExists;
- this._dispatcher.updateUserAddress(userAddressIfExists);
- }
-
- // Check for user ether balance changes
- if (!_.isUndefined(userAddressIfExists)) {
- await this._updateUserWeiBalanceAsync(userAddressIfExists);
- }
- } else {
- // This logic is primarily for the Ledger, since we don't regularly poll for the address
- // we simply update the balance for the last fetched address.
- if (!_.isUndefined(this._prevUserAddressIfExists)) {
- await this._updateUserWeiBalanceAsync(this._prevUserAddressIfExists);
- }
- }
- }
- private async _updateUserWeiBalanceAsync(userAddress: string): Promise<void> {
- const balanceInWei = await this._web3Wrapper.getBalanceInWeiAsync(userAddress);
- if (_.isUndefined(this._prevUserEtherBalanceInWei) || !balanceInWei.eq(this._prevUserEtherBalanceInWei)) {
- this._prevUserEtherBalanceInWei = balanceInWei;
- this._dispatcher.updateUserWeiBalance(balanceInWei);
- }
- }
- private _stopEmittingUserBalanceState(): void {
- if (!_.isUndefined(this._watchBalanceIntervalId)) {
- intervalUtils.clearAsyncExcludingInterval(this._watchBalanceIntervalId);
- }
- }
-}
diff --git a/packages/website/ts/components/aboutPageLayout.tsx b/packages/website/ts/components/aboutPageLayout.tsx
deleted file mode 100644
index 51c1a661e..000000000
--- a/packages/website/ts/components/aboutPageLayout.tsx
+++ /dev/null
@@ -1,70 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { Button } from 'ts/components/button';
-import { ChapterLink } from 'ts/components/chapter_link';
-import { Column, Section } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { Heading, Paragraph } from 'ts/components/text';
-
-import { addFadeInAnimation } from 'ts/constants/animations';
-import { WebsitePaths } from 'ts/types';
-
-interface Props {
- title: string;
- description: React.ReactNode | string;
- linkLabel?: string;
- href?: string;
- to?: string;
- children?: React.ReactNode;
-}
-
-export const AboutPageLayout = (props: Props) => (
- <SiteWrap theme="light">
- <Section isFlex={true} maxWidth="1170px" wrapWidth="100%">
- <Column>
- <ChapterLink to={WebsitePaths.AboutMission}>Mission</ChapterLink>
- <ChapterLink to={WebsitePaths.AboutTeam}>Team</ChapterLink>
- <ChapterLink to={WebsitePaths.AboutPress}>Press</ChapterLink>
- <ChapterLink to={WebsitePaths.AboutJobs}>Jobs</ChapterLink>
- </Column>
-
- <Column width="70%" maxWidth="800px">
- <Column width="100%" maxWidth="680px">
- <AnimatedHeading size="medium">{props.title}</AnimatedHeading>
-
- <AnimatedParagraph size="medium" marginBottom="60px" isMuted={0.65}>
- {props.description}
- </AnimatedParagraph>
-
- {props.linkLabel && (props.href || props.to) && (
- <AnimatedLink
- to={props.to}
- href={props.href}
- target={!_.isUndefined(props.href) ? '_blank' : undefined}
- isWithArrow={true}
- isAccentColor={true}
- >
- {props.linkLabel}
- </AnimatedLink>
- )}
- </Column>
- </Column>
- </Section>
-
- {props.children}
- </SiteWrap>
-);
-
-const AnimatedHeading = styled(Heading)`
- ${addFadeInAnimation('0.5s')};
-`;
-
-const AnimatedParagraph = styled(Paragraph)`
- ${addFadeInAnimation('0.5s', '0.15s')};
-`;
-
-const AnimatedLink = styled(Button)`
- ${addFadeInAnimation('0.6s', '0.3s')};
-`;
diff --git a/packages/website/ts/components/animatedChatIcon.tsx b/packages/website/ts/components/animatedChatIcon.tsx
deleted file mode 100644
index 770536259..000000000
--- a/packages/website/ts/components/animatedChatIcon.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-import * as React from 'react';
-import styled, { keyframes } from 'styled-components';
-
-export const AnimatedChatIcon = () => (
- <svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
- <mask id="mask30" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="150" height="150">
- <circle cx="75" cy="75" r="73" fill="#00AE99" stroke="#00AE99" stroke-width="3" />
- </mask>
-
- <g mask="url(#mask30)">
- <circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3" />
-
- <Rays>
- <path vector-effect="non-scaling-stroke" d="M76 37H137.5" stroke="#00AE99" stroke-width="3" />
- <path
- vector-effect="non-scaling-stroke"
- d="M37 73.5L37 12M113 137.5L113 75"
- stroke="#00AE99"
- stroke-width="3"
- />
- <path vector-effect="non-scaling-stroke" d="M13 113H71.5" stroke="#00AE99" stroke-width="3" />
- <path
- vector-effect="non-scaling-stroke"
- d="M49.087 47.5264L92.574 4.03932"
- stroke="#00AE99"
- stroke-width="3"
- />
- <path
- vector-effect="non-scaling-stroke"
- d="M47.3192 100.913L3.8321 57.4259M146.314 92.4277L102.12 48.2335"
- stroke="#00AE99"
- stroke-width="3"
- />
- <path
- vector-effect="non-scaling-stroke"
- d="M58.2793 145.814L101.766 102.327"
- stroke="#00AE99"
- stroke-width="3"
- />
- </Rays>
-
- <Bubble>
- <path
- vector-effect="non-scaling-stroke"
- d="M113 75C113 85.3064 108.897 94.6546 102.235 101.5C98.4048 105.436 71 132.5 71 132.5V112.792C51.8933 110.793 37 94.6359 37 75C37 54.0132 54.0132 37 75 37C95.9868 37 113 54.0132 113 75Z"
- stroke="#00AE99"
- strokeWidth="3"
- />
- </Bubble>
-
- <Dot delay={0} vector-effect="non-scaling-stroke" cx="75" cy="75" r="4" stroke="#00AE99" strokeWidth="3" />
- <Dot
- delay={4.4}
- vector-effect="non-scaling-stroke"
- cx="91"
- cy="75"
- r="4"
- stroke="#00AE99"
- strokeWidth="3"
- />
- <Dot
- delay={-4.6}
- vector-effect="non-scaling-stroke"
- cx="59"
- cy="75"
- r="4"
- stroke="#00AE99"
- strokeWidth="3"
- />
- </g>
- </svg>
-);
-
-const scale = keyframes`
- 0% { transform: scale(1.2) }
- 15% { transform: scale(1) }
- 85% { transform: scale(1) }
- 100% { transform: scale(1.2) }
-`;
-
-const fadeInOut = keyframes`
- 0%, 30%, 50%, 100% {
- transform: initial;
- }
-
- 40% {
- transform: translateY(-5px);
- }
-`;
-
-const Bubble = styled.g`
- animation: ${scale} 4s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);
- transform-origin: 50% 50%;
-`;
-
-const Rays = styled.g`
- animation: ${scale} 4s infinite cubic-bezier(0.175, 0.885, 0.32, 1.275);
- transform-origin: 50% 50%;
-`;
-
-const Dot = styled.circle<{ delay: number }>`
- animation: ${fadeInOut} 4s ${props => `${props.delay}s`} infinite;
-`;
diff --git a/packages/website/ts/components/animatedCompassIcon.tsx b/packages/website/ts/components/animatedCompassIcon.tsx
deleted file mode 100644
index 5388f95ca..000000000
--- a/packages/website/ts/components/animatedCompassIcon.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import * as React from 'react';
-import styled, { keyframes } from 'styled-components';
-
-export const AnimatedCompassIcon = () => (
- <svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
- <g>
- <circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3" />
- <circle cx="75" cy="75" r="58" stroke="#00AE99" stroke-width="3" />
- <Needle
- d="M62.9792 62.9792L36.6447 113.355L87.0208 87.0208M62.9792 62.9792L113.355 36.6447L87.0208 87.0208M62.9792 62.9792L87.0208 87.0208"
- stroke="#00AE99"
- strokeWidth="3"
- />
-
- <Dial>
- <path d="M75 2V17M75 133V148" stroke="#00AE99" stroke-width="3" />
- <path d="M2 75L17 75M133 75L148 75" stroke="#00AE99" stroke-width="3" />
- <path d="M11.7801 38.5L24.7705 46M125.229 104L138.22 111.5" stroke="#00AE99" stroke-width="3" />
- <path d="M38.5001 11.7801L46.0001 24.7705M104 125.229L111.5 138.22" stroke="#00AE99" stroke-width="3" />
- <path d="M111.5 11.7801L104 24.7705M46 125.229L38.5 138.22" stroke="#00AE99" stroke-width="3" />
- <path d="M138.22 38.5L125.229 46M24.7705 104L11.7801 111.5" stroke="#00AE99" stroke-width="3" />
- </Dial>
- </g>
- </svg>
-);
-
-const point = keyframes`
- 0% { transform: rotate(0deg) }
- 20% { transform: rotate(10deg) }
- 30% { transform: rotate(30deg) }
- 60% { transform: rotate(-20deg) }
- 80% { transform: rotate(-20deg) }
- 100% { transform: rotate(0deg) }
-`;
-
-const rotate = keyframes`
- 0% { transform: rotate(0deg) }
- 20% { transform: rotate(-10deg) }
- 30% { transform: rotate(-30deg) }
- 60% { transform: rotate(20deg) }
- 80% { transform: rotate(20deg) }
- 100% { transform: rotate(0deg) }
-`;
-
-const Needle = styled.path`
- animation: ${point} 5s infinite;
- transform-origin: 50% 50%;
-`;
-
-const Dial = styled.g`
- animation: ${rotate} 5s infinite;
- transform-origin: 50% 50%;
-`;
diff --git a/packages/website/ts/components/banner.tsx b/packages/website/ts/components/banner.tsx
deleted file mode 100644
index ce3fd499a..000000000
--- a/packages/website/ts/components/banner.tsx
+++ /dev/null
@@ -1,144 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Button } from 'ts/components/button';
-import { ThemeInterface } from 'ts/components/siteWrap';
-import { Paragraph } from 'ts/components/text';
-
-import { Column, Section } from 'ts/components/newLayout';
-
-interface Props {
- heading?: string;
- subline?: string;
- mainCta?: CTAButton;
- secondaryCta?: CTAButton;
- theme?: ThemeInterface;
-}
-
-interface CTAButton {
- text: string;
- href?: string;
- onClick?: () => void;
- shouldOpenInNewTab?: boolean;
-}
-
-interface BorderProps {
- isBottom?: boolean;
-}
-
-export const Banner: React.StatelessComponent<Props> = (props: Props) => {
- const { heading, subline, mainCta, secondaryCta } = props;
- return (
- <CustomSection bgColor={colors.brandDark} isFlex={true} flexBreakpoint="900px" paddingMobile="120px 0">
- <Border />
- <Border isBottom={true} />
-
- <Column>
- <CustomHeading>{heading}</CustomHeading>
-
- {subline && (
- <Paragraph color={colors.white} isMuted={0.5} isNoMargin={true}>
- {subline}
- </Paragraph>
- )}
- </Column>
- <Column>
- <ButtonWrap>
- {mainCta && (
- <Button
- color={colors.white}
- isTransparent={false}
- href={mainCta.href}
- target={mainCta.shouldOpenInNewTab ? '_blank' : ''}
- >
- {mainCta.text}
- </Button>
- )}
-
- {secondaryCta && (
- <Button
- color={colors.white}
- href={secondaryCta.href}
- onClick={secondaryCta.onClick}
- isTransparent={true}
- >
- {secondaryCta.text}
- </Button>
- )}
- </ButtonWrap>
- </Column>
- </CustomSection>
- );
-};
-
-const CustomSection = styled(Section)`
- color: ${colors.white};
- margin-top: 30px;
-
- @media (max-width: 900px) {
- text-align: center;
-
- p {
- margin-bottom: 30px;
- }
-
- div:last-child {
- margin-bottom: 0;
- }
- }
-`;
-
-const CustomHeading = styled.h2`
- font-size: 34px;
- font-weight: 400;
- margin-bottom: 10px @media (max-width: 768px) {
- font-size: 30px;
- }
-`;
-
-const ButtonWrap = styled.div`
- display: inline-block;
-
- @media (min-width: 768px) {
- * + * {
- margin-left: 15px;
- }
- }
-
- @media (max-width: 768px) {
- a,
- button {
- display: block;
- width: 220px;
- }
-
- * + * {
- margin-top: 15px;
- }
- }
-`;
-
-// Note let's refactor this
-// is it absolutely necessary to have a stateless component
-// to pass props down into the styled icon?
-const Border = styled.div<BorderProps>`
- position: absolute;
- background-image: ${props =>
- props.isBottom ? 'url(/images/banner/bottomofcta.png);' : 'url(/images/banner/topofcta.png);'};
- background-position: ${props => (props.isBottom ? 'left top' : 'left bottom')};
- left: 0;
- width: calc(100% + 214px);
- height: 40px;
- top: ${props => !props.isBottom && 0};
- bottom: ${props => props.isBottom && 0};
- transform: translate(-112px);
-
- @media (max-width: 768px) {
- width: calc(100% + 82px);
- height: 40px;
- transform: translate(-41px);
- background-size: auto 80px;
- }
-`;
diff --git a/packages/website/ts/components/blockIconLink.tsx b/packages/website/ts/components/blockIconLink.tsx
deleted file mode 100644
index ff7712595..000000000
--- a/packages/website/ts/components/blockIconLink.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { History, Location } from 'history';
-import * as React from 'react';
-import { match, withRouter } from 'react-router-dom';
-import styled from 'styled-components';
-
-import { Button } from 'ts/components/button';
-import { Icon } from 'ts/components/icon';
-
-interface BaseComponentProps {
- icon?: string;
- iconComponent?: React.ReactNode;
- title: string;
- linkLabel: string;
- linkUrl?: string;
- linkAction?: () => void;
- history: History;
- location: Location;
- match: match<any>;
-}
-
-class BaseComponent extends React.PureComponent<BaseComponentProps> {
- public onClick = (): void => {
- const { linkAction, linkUrl } = this.props;
-
- if (linkAction) {
- linkAction();
- } else {
- this.props.history.push(linkUrl);
- }
- };
-
- public render(): React.ReactNode {
- const { icon, iconComponent, linkUrl, linkAction, title, linkLabel } = this.props;
-
- return (
- <Wrap onClick={this.onClick}>
- <div>
- <Icon name={icon} component={iconComponent} size="large" margin={[0, 0, 'default', 0]} />
-
- <Title>{title}</Title>
-
- <Button isWithArrow={true} isTransparent={true} href={linkUrl} onClick={linkAction}>
- {linkLabel}
- </Button>
- </div>
- </Wrap>
- );
- }
-}
-
-export const BlockIconLink = withRouter<BaseComponentProps>(BaseComponent);
-
-const Wrap = styled.div`
- width: calc(50% - 15px);
- height: 400px;
- padding: 40px;
- display: flex;
- justify-content: center;
- align-items: center;
- text-align: center;
- transition: background-color 0.25s;
- background-color: ${props => props.theme.lightBgColor};
- cursor: pointer;
-
- a,
- button {
- pointer-events: none;
- }
-
- @media (max-width: 900px) {
- width: 100%;
- margin-top: 30px;
- }
-
- &:hover {
- background-color: #002d28;
- }
-`;
-
-const Title = styled.h2`
- font-size: 20px;
- margin-bottom: 30px;
- color: ${props => props.theme.linkColor};
-`;
diff --git a/packages/website/ts/components/button.tsx b/packages/website/ts/components/button.tsx
deleted file mode 100644
index 31a74e599..000000000
--- a/packages/website/ts/components/button.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import * as React from 'react';
-import { Link as ReactRouterLink } from 'react-router-dom';
-import styled from 'styled-components';
-
-import { ThemeInterface } from 'ts/components/siteWrap';
-
-import { colors } from 'ts/style/colors';
-
-interface ButtonInterface {
- bgColor?: string;
- borderColor?: string;
- color?: string;
- children?: React.ReactNode | string;
- isTransparent?: boolean;
- isNoBorder?: boolean;
- isNoPadding?: boolean;
- isWithArrow?: boolean;
- isAccentColor?: boolean;
- hasIcon?: boolean | string;
- isInline?: boolean;
- href?: string;
- type?: string;
- target?: string;
- to?: string;
- onClick?: () => any;
- theme?: ThemeInterface;
- shouldUseAnchorTag?: boolean;
-}
-
-export const Button: React.StatelessComponent<ButtonInterface> = (props: ButtonInterface) => {
- const { children, href, isWithArrow, to, shouldUseAnchorTag, target } = props;
- let linkElem;
-
- if (href || shouldUseAnchorTag) {
- linkElem = 'a';
- }
- if (to) {
- linkElem = ReactRouterLink;
- }
-
- const Component = linkElem ? ButtonBase.withComponent<any>(linkElem) : ButtonBase;
- const targetProp = href && target ? { target } : {};
-
- return (
- <Component {...props} {...targetProp}>
- {children}
-
- {isWithArrow && (
- <svg width="16" height="15" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path d="M4.484.246l.024 1.411 8.146.053L.817 13.547l.996.996L13.65 2.706l.052 8.146 1.412.024L15.045.315 4.484.246z" />
- </svg>
- )}
- </Component>
- );
-};
-
-Button.defaultProps = {
- borderColor: 'rgba(255, 255, 255, .4)',
-};
-
-const ButtonBase = styled.button<ButtonInterface>`
- appearance: none;
- border: 1px solid transparent;
- display: inline-block;
- background-color: ${props => props.bgColor || colors.brandLight};
- background-color: ${props => (props.isTransparent || props.isWithArrow) && 'transparent'};
- border-color: ${props => props.isTransparent && !props.isWithArrow && props.borderColor};
- color: ${props => (props.isAccentColor ? props.theme.linkColor : props.color || props.theme.textColor)};
- padding: ${props => !props.isNoPadding && !props.isWithArrow && '18px 30px'};
- white-space: ${props => props.isWithArrow && 'nowrap'};
- text-align: center;
- font-size: ${props => (props.isWithArrow ? '20px' : '18px')};
- text-decoration: none;
- cursor: pointer;
- outline: none;
- transition: background-color 0.35s, border-color 0.35s;
-
- // @todo Refactor to use theme props
- ${props =>
- props.bgColor === 'dark' &&
- `
- background-color: ${colors.brandDark};
- color: ${colors.white};
- `}
-
- svg {
- margin-left: 9px;
- transition: transform 0.5s;
- transform: translate3d(-2px, 2px, 0);
- }
-
- path {
- fill: ${props => (props.isAccentColor ? props.theme.linkColor : props.color || props.theme.textColor)};
- }
-
- &:hover {
- background-color: ${props => !props.isTransparent && !props.isWithArrow && '#04BEA8'};
- border-color: ${props => props.isTransparent && !props.isNoBorder && !props.isWithArrow && '#00AE99'};
-
- svg {
- transform: translate3d(2px, -2px, 0);
- }
- }
-`;
diff --git a/packages/website/ts/components/chapter_link.tsx b/packages/website/ts/components/chapter_link.tsx
deleted file mode 100644
index fd974cec1..000000000
--- a/packages/website/ts/components/chapter_link.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { NavLink as ReactRouterLink } from 'react-router-dom';
-import styled from 'styled-components';
-
-export const ChapterLink = styled(ReactRouterLink).attrs({
- activeStyle: { opacity: 1 },
-})`
- font-size: 1.222222222rem;
- display: block;
- opacity: 0.5;
- margin-bottom: 1.666666667rem;
-
- &:hover {
- opacity: 1;
- }
-`;
diff --git a/packages/website/ts/components/definition.tsx b/packages/website/ts/components/definition.tsx
deleted file mode 100644
index bd7a40425..000000000
--- a/packages/website/ts/components/definition.tsx
+++ /dev/null
@@ -1,139 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { Button } from 'ts/components/button';
-import { Icon } from 'ts/components/icon';
-import { Heading, Paragraph } from 'ts/components/text';
-
-export interface Action {
- label: string;
- url?: string;
- onClick?: () => void;
- shouldUseAnchorTag?: boolean;
-}
-
-interface Props {
- isInline?: boolean;
- isInlineIcon?: boolean;
- isCentered?: boolean;
- isWithMargin?: boolean;
- icon: string;
- iconSize?: 'medium' | 'large' | number;
- fontSize?: 'default' | 'medium' | number;
- title: string;
- titleSize?: 'small' | 'default' | number;
- description: React.ReactNode | string;
- actions?: Action[];
-}
-
-export const Definition = (props: Props) => (
- <Wrap {...props}>
- <Icon name={props.icon} size={props.iconSize || 'medium'} margin={[0, 0, 'default', 0]} />
-
- <TextWrap {...props}>
- <Heading
- asElement="h2"
- fontWeight="400"
- marginBottom={props.titleSize === 'small' ? '7px' : '15px'}
- size={props.titleSize || 'default'}
- >
- {props.title}
- </Heading>
-
- {typeof props.description === 'string' ? (
- <Paragraph isMuted={true} size={props.fontSize || 'default'}>
- {props.description}
- </Paragraph>
- ) : (
- <>{props.description}</>
- )}
-
- {props.actions && (
- <LinkWrap>
- {props.actions.map((item, index) => (
- <Button
- key={`dlink-${index}`}
- href={item.url}
- onClick={item.onClick}
- isWithArrow={true}
- isAccentColor={true}
- shouldUseAnchorTag={item.shouldUseAnchorTag}
- target="_blank"
- >
- {item.label}
- </Button>
- ))}
- </LinkWrap>
- )}
- </TextWrap>
- </Wrap>
-);
-
-const Wrap = styled.div<Props>`
- max-width: ${props => props.isInline && '354px'};
-
- & + & {
- margin-top: ${props => props.isInlineIcon && '120px'};
- margin-top: ${props => props.isWithMargin && '60px'};
- }
-
- @media (min-width: 768px) {
- width: ${props => (props.isInline ? 'calc(33.3333% - 30px)' : '100%')};
- display: ${props => props.isInlineIcon && 'flex'};
- justify-content: ${props => props.isInlineIcon && 'space-between'};
- align-items: ${props => props.isInlineIcon && 'center'};
- text-align: ${props => (props.isInlineIcon || !props.isCentered) && 'left'};
- }
-
- @media (max-width: 768px) {
- margin: 0 auto;
-
- & + & {
- margin-top: ${props => props.isInline && '60px'};
- }
- }
-`;
-
-const TextWrap = styled.div<Props>`
- width: 100%;
- max-width: 560px;
-
- ul {
- padding-top: 10px;
- padding-left: 1rem;
- }
-
- li {
- color: ${props => props.theme.paragraphColor};
- font-size: ${props => `var(--${props.fontSize || 'default'}Paragraph)`};
- font-weight: 300;
- list-style: disc;
- opacity: 0.75;
- line-height: 1.444444444;
- margin-bottom: 1rem;
- }
-
- @media (min-width: 768px) {
- margin-left: ${props => props.isInlineIcon && '60px'};
- }
-`;
-
-const LinkWrap = styled.div`
- margin-top: 60px;
-
- @media (min-width: 768px) {
- display: inline-flex;
-
- a + a {
- margin-left: 60px;
- }
- }
-
- @media (max-width: 768px) {
- max-width: 250px;
-
- a + a {
- margin-top: 15px;
- }
- }
-`;
diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
deleted file mode 100644
index 1c47903db..000000000
--- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
+++ /dev/null
@@ -1,166 +0,0 @@
-import { colors, Networks } from '@0x/react-shared';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { BlockchainErrs } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-interface BlockchainErrDialogProps {
- blockchain: Blockchain;
- blockchainErr: BlockchainErrs;
- isOpen: boolean;
- userAddress: string;
- toggleDialogFn: (isOpen: boolean) => void;
- networkId: number;
-}
-
-export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProps, undefined> {
- public render(): React.ReactNode {
- const dialogActions = [
- <FlatButton
- key="blockchainErrOk"
- label="Ok"
- primary={true}
- onClick={this.props.toggleDialogFn.bind(this.props.toggleDialogFn, false)}
- />,
- ];
-
- const hasWalletAddress = this.props.userAddress !== '';
- return (
- <Dialog
- title={this._getTitle(hasWalletAddress)}
- titleStyle={{ fontWeight: 100 }}
- actions={dialogActions}
- open={this.props.isOpen}
- contentStyle={{ width: 400 }}
- onRequestClose={this.props.toggleDialogFn.bind(this.props.toggleDialogFn, false)}
- autoScrollBodyContent={true}
- >
- <div className="pt2" style={{ color: colors.grey700 }}>
- {this._renderExplanation(hasWalletAddress)}
- </div>
- </Dialog>
- );
- }
- private _getTitle(hasWalletAddress: boolean): string {
- if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
- return '0x smart contracts not found';
- } else if (!hasWalletAddress) {
- return 'Enable wallet communication';
- } else if (this.props.blockchainErr === BlockchainErrs.DisconnectedFromEthereumNode) {
- return 'Disconnected from Ethereum network';
- } else if (this.props.blockchainErr === BlockchainErrs.DefaultTokensNotInTokenRegistry) {
- return 'Default TokenRegistry tokens missing';
- } else {
- return 'Unexpected error';
- }
- }
- private _renderExplanation(hasWalletAddress: boolean): React.ReactNode {
- if (this.props.blockchainErr === BlockchainErrs.AContractNotDeployedOnNetwork) {
- return this._renderContractsNotDeployedExplanation();
- } else if (!hasWalletAddress) {
- return this._renderNoWalletFoundExplanation();
- } else if (this.props.blockchainErr === BlockchainErrs.DisconnectedFromEthereumNode) {
- return this._renderDisconnectedFromNode();
- } else if (this.props.blockchainErr === BlockchainErrs.DefaultTokensNotInTokenRegistry) {
- return this._renderDefaultTokenNotInTokenRegistry();
- } else {
- return this._renderUnexpectedErrorExplanation();
- }
- }
- private _renderDisconnectedFromNode(): React.ReactNode {
- return (
- <div>
- You were disconnected from the backing Ethereum node. If using{' '}
- <a href={constants.URL_METAMASK_CHROME_STORE} target="_blank">
- Metamask
- </a>{' '}
- or{' '}
- <a href={constants.URL_MIST_DOWNLOAD} target="_blank">
- Mist
- </a>{' '}
- try refreshing the page. If using a locally hosted Ethereum node, make sure it's still running.
- </div>
- );
- }
- private _renderDefaultTokenNotInTokenRegistry(): React.ReactNode {
- return (
- <div>
- The TokenRegistry deployed on your network does not contain the needed default tokens for 0x Portal to
- operate. Please try one of the supported networks (Mainnet, Kovan, Ropsten, Rinkeby). If on a local
- Testnet, make sure the TokenRegistry contract is deployed and loaded with some default tokens (i.e WETH
- & ZRX).
- </div>
- );
- }
- private _renderUnexpectedErrorExplanation(): React.ReactNode {
- return <div>We encountered an unexpected error. Please try refreshing the page.</div>;
- }
- private _renderNoWalletFoundExplanation(): React.ReactNode {
- return (
- <div>
- <div>
- We were unable to access an Ethereum wallet you control. In order to interact with the 0x portal
- dApp, we need a way to interact with one of your Ethereum wallets. There are two easy ways you can
- enable us to do that:
- </div>
- <h4>1. Metamask chrome extension</h4>
- <div>
- You can install the{' '}
- <a href={constants.URL_METAMASK_CHROME_STORE} target="_blank">
- Metamask
- </a>{' '}
- Chrome extension Ethereum wallet. Once installed and set up, refresh this page.
- <div className="pt1">
- <span className="bold">Note:</span> If you already have Metamask installed, make sure it is
- unlocked.
- </div>
- </div>
- <h4>Parity Signer</h4>
- <div>
- The{' '}
- <a href={constants.URL_PARITY_CHROME_STORE} target="_blank">
- Parity Signer Chrome extension
- </a>{' '}
- lets you connect to a locally running Parity node. Make sure you have started your local Parity node
- with `parity ui` or `parity --chain kovan ui` in order to connect to mainnet or Kovan respectively.
- </div>
- <div className="pt2">
- <span className="bold">Note:</span> If you have done one of the above steps and are still seeing
- this message, we might still be unable to retrieve an Ethereum address by calling
- `web3.eth.accounts`. Make sure you have created at least one Ethereum address.
- </div>
- </div>
- );
- }
- private _renderContractsNotDeployedExplanation(): React.ReactNode {
- return (
- <div>
- <div>
- The 0x smart contracts are not deployed on the Ethereum network you are currently connected to
- (network Id: {this.props.networkId}). In order to use the 0x portal dApp, please connect to the{' '}
- {Networks.Kovan} testnet (network Id: {constants.NETWORK_ID_KOVAN}) or ${constants.MAINNET_NAME}{' '}
- (network Id: ${constants.NETWORK_ID_MAINNET}).
- </div>
- <h4>Metamask</h4>
- <div>
- If you are using{' '}
- <a href={constants.URL_METAMASK_CHROME_STORE} target="_blank">
- Metamask
- </a>
- , you can switch networks in the top left corner of the extension popover.
- </div>
- <h4>Parity Signer</h4>
- <div>
- If using the{' '}
- <a href={constants.URL_PARITY_CHROME_STORE} target="_blank">
- Parity Signer Chrome extension
- </a>
- , make sure to start your local Parity node with `parity ui` or `parity --chain Kovan ui` in order
- to connect to mainnet \ or Kovan respectively.
- </div>
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx b/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
deleted file mode 100644
index 5ca272b1a..000000000
--- a/packages/website/ts/components/dialogs/eth_weth_conversion_dialog.tsx
+++ /dev/null
@@ -1,194 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
-import { EthAmountInput } from 'ts/containers/inputs/eth_amount_input';
-import { Side, Token } from 'ts/types';
-
-interface EthWethConversionDialogProps {
- blockchain: Blockchain;
- userAddress: string;
- networkId: number;
- direction: Side;
- onComplete: (direction: Side, value: BigNumber) => void;
- onCancelled: () => void;
- isOpen: boolean;
- token: Token;
- etherBalanceInWei?: BigNumber;
- lastForceTokenStateRefetch: number;
-}
-
-interface EthWethConversionDialogState {
- value?: BigNumber;
- shouldShowIncompleteErrs: boolean;
- hasErrors: boolean;
- isEthTokenBalanceLoaded: boolean;
- ethTokenBalance: BigNumber;
-}
-
-export class EthWethConversionDialog extends React.Component<
- EthWethConversionDialogProps,
- EthWethConversionDialogState
-> {
- private _isUnmounted: boolean;
- constructor(props: EthWethConversionDialogProps) {
- super(props);
- this._isUnmounted = false;
- this.state = {
- shouldShowIncompleteErrs: false,
- hasErrors: false,
- isEthTokenBalanceLoaded: false,
- ethTokenBalance: new BigNumber(0),
- };
- }
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._fetchEthTokenBalanceAsync();
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const convertDialogActions = [
- <FlatButton key="cancel" label="Cancel" onClick={this._onCancel.bind(this)} />,
- <FlatButton key="convert" label="Convert" primary={true} onClick={this._onConvertClick.bind(this)} />,
- ];
- const title = this.props.direction === Side.Deposit ? 'Wrap ETH' : 'Unwrap WETH';
- return !_.isUndefined(this.props.etherBalanceInWei) ? (
- <Dialog
- title={title}
- titleStyle={{ fontWeight: 100 }}
- actions={convertDialogActions}
- contentStyle={{ width: 448 }}
- open={this.props.isOpen}
- >
- {this._renderConversionDialogBody()}
- </Dialog>
- ) : null;
- }
- private _renderConversionDialogBody(): React.ReactNode {
- const explanation =
- this.props.direction === Side.Deposit
- ? 'Convert your Ether into a tokenized, tradable form.'
- : "Convert your Wrapped Ether back into it's native form.";
- const isWrappedVersion = this.props.direction === Side.Receive;
- return (
- <div>
- <div className="pb2">{explanation}</div>
- <div className="mx-auto" style={{ maxWidth: 312 }}>
- <div className="flex">
- {this._renderCurrency(isWrappedVersion)}
- <div style={{ paddingTop: 68 }}>
- <i style={{ fontSize: 28, color: colors.darkBlue }} className="zmdi zmdi-arrow-right" />
- </div>
- {this._renderCurrency(!isWrappedVersion)}
- </div>
- <div className="pt2 mx-auto" style={{ width: 245 }}>
- {this.props.direction === Side.Receive ? (
- <TokenAmountInput
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- token={this.props.token}
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- shouldCheckBalance={true}
- shouldCheckAllowance={false}
- onChange={this._onValueChange.bind(this)}
- amount={this.state.value}
- />
- ) : (
- <EthAmountInput
- amount={this.state.value}
- onChange={this._onValueChange.bind(this)}
- shouldCheckBalance={true}
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- />
- )}
- <div className="pt1" style={{ fontSize: 12 }}>
- <div className="left">1 ETH = 1 WETH</div>
- {this.props.direction === Side.Receive && this.state.isEthTokenBalanceLoaded && (
- <div
- className="right"
- onClick={this._onMaxClick.bind(this)}
- style={{
- color: colors.darkBlue,
- textDecoration: 'underline',
- cursor: 'pointer',
- }}
- >
- Max
- </div>
- )}
- </div>
- </div>
- </div>
- </div>
- );
- }
- private _renderCurrency(isWrappedVersion: boolean): React.ReactNode {
- const name = isWrappedVersion ? 'Wrapped Ether' : 'Ether';
- const iconUrl = isWrappedVersion ? '/images/token_icons/ether_erc20.png' : '/images/ether.png';
- const symbol = isWrappedVersion ? 'WETH' : 'ETH';
- return (
- <div className="mx-auto pt2">
- <div className="center" style={{ color: colors.darkBlue }}>
- {name}
- </div>
- <div className="center py2">
- <img src={iconUrl} style={{ width: 60 }} />
- </div>
- <div className="center" style={{ fontSize: 12 }}>
- ({symbol})
- </div>
- </div>
- );
- }
- private _onMaxClick(): void {
- this.setState({
- value: this.state.ethTokenBalance,
- });
- }
- private _onValueChange(isValid: boolean, amount?: BigNumber): void {
- this.setState({
- value: amount,
- hasErrors: !isValid,
- });
- }
- private _onConvertClick(): void {
- if (this.state.hasErrors) {
- this.setState({
- shouldShowIncompleteErrs: true,
- });
- } else {
- const value = this.state.value;
- this.setState({
- value: undefined,
- });
- this.props.onComplete(this.props.direction, value);
- }
- }
- private _onCancel(): void {
- this.setState({
- value: undefined,
- });
- this.props.onCancelled();
- }
- private async _fetchEthTokenBalanceAsync(): Promise<void> {
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [balance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- this.props.token.address,
- );
- if (!this._isUnmounted) {
- this.setState({
- isEthTokenBalanceLoaded: true,
- ethTokenBalance: balance,
- });
- }
- }
-}
diff --git a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx b/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
deleted file mode 100644
index 527353aa0..000000000
--- a/packages/website/ts/components/dialogs/ledger_config_dialog.tsx
+++ /dev/null
@@ -1,307 +0,0 @@
-import { colors, constants as sharedConstants } from '@0x/react-shared';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
-import TextField from 'material-ui/TextField';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import { Blockchain } from 'ts/blockchain';
-import { NetworkDropDown } from 'ts/components/dropdowns/network_drop_down';
-import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { ProviderType } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-const VALID_ETHEREUM_DERIVATION_PATH_PREFIX = `44'/60'`;
-
-enum LedgerSteps {
- Connect,
- SelectAddress,
-}
-
-interface LedgerConfigDialogProps {
- isOpen: boolean;
- toggleDialogFn: (isOpen: boolean) => void;
- dispatcher: Dispatcher;
- blockchain: Blockchain;
- networkId?: number;
- providerType: ProviderType;
-}
-
-interface LedgerConfigDialogState {
- connectionErrMsg: string;
- stepIndex: LedgerSteps;
- userAddresses: string[];
- addressBalances: BigNumber[];
- derivationPath: string;
- derivationErrMsg: string;
- preferredNetworkId: number;
-}
-
-export class LedgerConfigDialog extends React.Component<LedgerConfigDialogProps, LedgerConfigDialogState> {
- public static defaultProps = {
- networkId: 1,
- };
- constructor(props: LedgerConfigDialogProps) {
- super(props);
- const derivationPathIfExists = props.blockchain.getLedgerDerivationPathIfExists();
- this.state = {
- connectionErrMsg: '',
- stepIndex: LedgerSteps.Connect,
- userAddresses: [],
- addressBalances: [],
- derivationPath: _.isUndefined(derivationPathIfExists)
- ? configs.DEFAULT_DERIVATION_PATH
- : derivationPathIfExists,
- derivationErrMsg: '',
- preferredNetworkId: props.networkId,
- };
- }
- public render(): React.ReactNode {
- const dialogActions = [
- <FlatButton key="ledgerConnectCancel" label="Cancel" onClick={this._onClose.bind(this)} />,
- ];
- const dialogTitle =
- this.state.stepIndex === LedgerSteps.Connect ? 'Connect to your Ledger' : 'Select desired address';
- return (
- <Dialog
- title={dialogTitle}
- titleStyle={{ fontWeight: 100 }}
- actions={dialogActions}
- open={this.props.isOpen}
- onRequestClose={this._onClose.bind(this)}
- autoScrollBodyContent={true}
- bodyStyle={{ paddingBottom: 0 }}
- >
- <div style={{ color: colors.grey700, paddingTop: 1 }}>
- {this.state.stepIndex === LedgerSteps.Connect && this._renderConnectStep()}
- {this.state.stepIndex === LedgerSteps.SelectAddress && this._renderSelectAddressStep()}
- </div>
- </Dialog>
- );
- }
- private _renderConnectStep(): React.ReactNode {
- const networkIds = _.values(sharedConstants.NETWORK_ID_BY_NAME);
- return (
- <div>
- <div className="h4 pt3">Follow these instructions before proceeding:</div>
- <ol className="mb0">
- <li className="pb1">Connect your Ledger Nano S & Open the Ethereum application</li>
- <li className="pb1">Verify that "Browser Support" AND "Contract Data" are enabled in Settings</li>
- <li className="pb1">
- If no Browser Support is found in settings, verify that you have{' '}
- <a href="https://www.ledgerwallet.com/apps/manager" target="_blank">
- Firmware >1.2
- </a>
- </li>
- <li>Choose your desired network:</li>
- </ol>
- <div className="pb2">
- <NetworkDropDown
- updateSelectedNetwork={this._onSelectedNetworkUpdated.bind(this)}
- selectedNetworkId={this.state.preferredNetworkId}
- avialableNetworkIds={networkIds}
- />
- </div>
- <div className="center pb3">
- <LifeCycleRaisedButton
- isPrimary={true}
- labelReady="Connect to Ledger"
- labelLoading="Connecting..."
- labelComplete="Connected!"
- onClickAsyncFn={this._onConnectLedgerClickAsync.bind(this, true)}
- />
- {!_.isEmpty(this.state.connectionErrMsg) && (
- <div className="pt2 left-align" style={{ color: colors.red200 }}>
- {this.state.connectionErrMsg}
- </div>
- )}
- </div>
- </div>
- );
- }
- private _renderSelectAddressStep(): React.ReactNode {
- return (
- <div>
- <div>
- <Table bodyStyle={{ height: 300 }} onRowSelection={this._onAddressSelected.bind(this)}>
- <TableHeader displaySelectAll={false}>
- <TableRow>
- <TableHeaderColumn colSpan={2}>Address</TableHeaderColumn>
- <TableHeaderColumn>Balance</TableHeaderColumn>
- </TableRow>
- </TableHeader>
- <TableBody>{this._renderAddressTableRows()}</TableBody>
- </Table>
- </div>
- <div className="flex pt2" style={{ height: 100 }}>
- <div className="overflow-hidden" style={{ width: 180 }}>
- <TextField
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey }}
- floatingLabelText="Update path derivation (advanced)"
- value={this.state.derivationPath}
- errorText={this.state.derivationErrMsg}
- onChange={this._onDerivationPathChanged.bind(this)}
- />
- </div>
- <div className="pl2" style={{ paddingTop: 28 }}>
- <LifeCycleRaisedButton
- labelReady="Update"
- labelLoading="Updating..."
- labelComplete="Updated!"
- onClickAsyncFn={this._onFetchAddressesForDerivationPathAsync.bind(this)}
- />
- </div>
- </div>
- </div>
- );
- }
- private _renderAddressTableRows(): React.ReactNode {
- const rows = _.map(this.state.userAddresses, (userAddress: string, i: number) => {
- const balanceInWei = this.state.addressBalances[i];
- const addressTooltipId = `address-${userAddress}`;
- const balanceTooltipId = `balance-${userAddress}`;
- const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
- // We specifically prefix kovan ETH.
- // TODO: We should probably add prefixes for all networks
- const isKovanNetwork = networkName === 'Kovan';
- const balanceInEth = Web3Wrapper.toUnitAmount(balanceInWei, constants.DECIMAL_PLACES_ETH);
- const balanceString = `${balanceInEth.toString()} ${isKovanNetwork ? 'Kovan ' : ''}ETH`;
- return (
- <TableRow key={userAddress} style={{ height: 40 }}>
- <TableRowColumn colSpan={2}>
- <div data-tip={true} data-for={addressTooltipId}>
- {userAddress}
- </div>
- <ReactTooltip id={addressTooltipId}>{userAddress}</ReactTooltip>
- </TableRowColumn>
- <TableRowColumn>
- <div data-tip={true} data-for={balanceTooltipId}>
- {balanceString}
- </div>
- <ReactTooltip id={balanceTooltipId}>{balanceString}</ReactTooltip>
- </TableRowColumn>
- </TableRow>
- );
- });
- return rows;
- }
- private _onClose(): void {
- this.setState({
- connectionErrMsg: '',
- stepIndex: LedgerSteps.Connect,
- });
- const isOpen = false;
- this.props.toggleDialogFn(isOpen);
- }
- private _onAddressSelected(selectedRowIndexes: number[]): void {
- const selectedRowIndex = selectedRowIndexes[0];
- const selectedAddress = this.state.userAddresses[selectedRowIndex];
- const selectAddressBalance = this.state.addressBalances[selectedRowIndex];
- this.props.dispatcher.updateUserAddress(selectedAddress);
- this.props.blockchain.updateWeb3WrapperPrevUserAddress(selectedAddress);
- // tslint:disable-next-line:no-floating-promises
- this.props.blockchain.fetchTokenInformationAsync();
- this.props.dispatcher.updateUserWeiBalance(selectAddressBalance);
- this.setState({
- stepIndex: LedgerSteps.Connect,
- });
- const isOpen = false;
- this.props.toggleDialogFn(isOpen);
- }
- private async _onFetchAddressesForDerivationPathAsync(): Promise<boolean> {
- const currentlySetPath = this.props.blockchain.getLedgerDerivationPathIfExists();
- let didSucceed;
- if (currentlySetPath === this.state.derivationPath) {
- didSucceed = true;
- return didSucceed;
- }
- this.props.blockchain.updateLedgerDerivationPathIfExists(this.state.derivationPath);
- didSucceed = await this._fetchAddressesAndBalancesAsync();
- if (!didSucceed) {
- this.setState({
- derivationErrMsg: 'Failed to connect to Ledger.',
- });
- }
- return didSucceed;
- }
- private async _fetchAddressesAndBalancesAsync(): Promise<boolean> {
- let userAddresses: string[];
- const addressBalances: BigNumber[] = [];
- try {
- userAddresses = await this._getUserAddressesAsync();
- for (const address of userAddresses) {
- const balanceInWei = await this.props.blockchain.getBalanceInWeiAsync(address);
- addressBalances.push(balanceInWei);
- }
- } catch (err) {
- logUtils.log(`Ledger error: ${JSON.stringify(err)}`);
- this.setState({
- connectionErrMsg: 'Failed to connect. Follow the instructions and try again.',
- });
- return false;
- }
- this.setState({
- userAddresses,
- addressBalances,
- });
- return true;
- }
- private _onDerivationPathChanged(_event: any, derivationPath: string): void {
- let derivationErrMsg = '';
- if (!_.startsWith(derivationPath, VALID_ETHEREUM_DERIVATION_PATH_PREFIX)) {
- derivationErrMsg = 'Must be valid Ethereum path.';
- }
-
- this.setState({
- derivationPath,
- derivationErrMsg,
- });
- }
- private async _onConnectLedgerClickAsync(): Promise<boolean> {
- const isU2FSupported = await utils.isU2FSupportedAsync();
- if (!isU2FSupported) {
- logUtils.log(`U2F not supported in this browser`);
- this.setState({
- connectionErrMsg: 'U2F not supported by this browser. Try using Chrome.',
- });
- return false;
- }
-
- if (
- this.props.providerType !== ProviderType.Ledger ||
- (this.props.providerType === ProviderType.Ledger && this.props.networkId !== this.state.preferredNetworkId)
- ) {
- await this.props.blockchain.updateProviderToLedgerAsync(this.state.preferredNetworkId);
- }
-
- const didSucceed = await this._fetchAddressesAndBalancesAsync();
- if (didSucceed) {
- this.setState({
- stepIndex: LedgerSteps.SelectAddress,
- connectionErrMsg: '',
- });
- }
- return didSucceed;
- }
- private async _getUserAddressesAsync(): Promise<string[]> {
- let userAddresses: string[];
- userAddresses = await this.props.blockchain.getUserAccountsAsync();
-
- if (_.isEmpty(userAddresses)) {
- throw new Error('No addresses retrieved.');
- }
- return userAddresses;
- }
- private _onSelectedNetworkUpdated(_event: any, _index: number, networkId: number): void {
- this.setState({
- preferredNetworkId: networkId,
- });
- }
-}
diff --git a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx b/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx
deleted file mode 100644
index 326df2a8c..000000000
--- a/packages/website/ts/components/dialogs/portal_disclaimer_dialog.tsx
+++ /dev/null
@@ -1,36 +0,0 @@
-import { colors } from '@0x/react-shared';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-
-interface PortalDisclaimerDialogProps {
- isOpen: boolean;
- onToggleDialog: () => void;
-}
-
-export const PortalDisclaimerDialog = (props: PortalDisclaimerDialogProps) => {
- return (
- <Dialog
- title="0x Portal Disclaimer"
- titleStyle={{ fontWeight: 100 }}
- actions={[<FlatButton key="portalAgree" label="I Agree" onClick={props.onToggleDialog} />]}
- open={props.isOpen}
- onRequestClose={props.onToggleDialog}
- autoScrollBodyContent={true}
- modal={true}
- >
- <div className="pt2" style={{ color: colors.grey700 }}>
- <div>
- 0x Portal is a free software-based tool intended to help users to buy and sell ERC20-compatible
- blockchain tokens through the 0x protocol on a purely peer-to-peer basis. 0x portal is not a
- regulated marketplace, exchange or intermediary of any kind, and therefore, you should only use 0x
- portal to exchange tokens that are not securities, commodity interests, or any other form of
- regulated instrument. 0x has not attempted to screen or otherwise limit the tokens that you may
- enter in 0x Portal. By clicking “I Agree” below, you understand that you are solely responsible for
- using 0x Portal and buying and selling tokens using 0x Portal in compliance with all applicable laws
- and regulations.
- </div>
- </div>
- </Dialog>
- );
-};
diff --git a/packages/website/ts/components/dialogs/send_dialog.tsx b/packages/website/ts/components/dialogs/send_dialog.tsx
deleted file mode 100644
index 5f6927cef..000000000
--- a/packages/website/ts/components/dialogs/send_dialog.tsx
+++ /dev/null
@@ -1,137 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { AddressInput } from 'ts/components/inputs/address_input';
-import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
-import { EthAmountInput } from 'ts/containers/inputs/eth_amount_input';
-import { Token } from 'ts/types';
-
-interface SendDialogProps {
- blockchain: Blockchain;
- userAddress: string;
- networkId: number;
- onComplete: (recipient: string, value: BigNumber) => void;
- onCancelled: () => void;
- isOpen: boolean;
- asset: Token | 'ETH';
- lastForceTokenStateRefetch: number;
-}
-
-interface SendDialogState {
- value?: BigNumber;
- recipient: string;
- shouldShowIncompleteErrs: boolean;
- isAmountValid: boolean;
-}
-
-export class SendDialog extends React.Component<SendDialogProps, SendDialogState> {
- constructor(props: SendDialogProps) {
- super(props);
- this.state = {
- recipient: '',
- shouldShowIncompleteErrs: false,
- isAmountValid: false,
- };
- }
- public render(): React.ReactNode {
- const transferDialogActions = [
- <FlatButton key="cancelTransfer" label="Cancel" onClick={this._onCancel.bind(this)} />,
- <FlatButton
- key="sendTransfer"
- disabled={this._hasErrors()}
- label="Send"
- primary={true}
- onClick={this._onSendClick.bind(this)}
- />,
- ];
- return (
- <Dialog
- title="I want to send"
- titleStyle={{ fontWeight: 100 }}
- actions={transferDialogActions}
- open={this.props.isOpen}
- >
- {this._renderSendDialogBody()}
- </Dialog>
- );
- }
- private _renderSendDialogBody(): React.ReactNode {
- const input =
- this.props.asset === 'ETH' ? (
- <EthAmountInput
- label="Amount to send"
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- shouldCheckBalance={true}
- shouldShowErrs={true}
- onChange={this._onValueChange.bind(this)}
- amount={this.state.value}
- />
- ) : (
- <TokenAmountInput
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- label="Amount to send"
- token={this.props.asset}
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- shouldCheckBalance={true}
- shouldCheckAllowance={false}
- onChange={this._onValueChange.bind(this)}
- amount={this.state.value}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- />
- );
- return (
- <div className="mx-auto" style={{ maxWidth: 300 }}>
- <div style={{ height: 80 }}>
- <AddressInput
- initialAddress={this.state.recipient}
- updateAddress={this._onRecipientChange.bind(this)}
- isRequired={true}
- label="Recipient address'"
- hintText="Address"
- />
- </div>
- {input}
- </div>
- );
- }
- private _onRecipientChange(recipient?: string): void {
- this.setState({
- shouldShowIncompleteErrs: false,
- recipient,
- });
- }
- private _onValueChange(isValid: boolean, amount?: BigNumber): void {
- this.setState({
- isAmountValid: isValid,
- value: amount,
- });
- }
- private _onSendClick(): void {
- if (this._hasErrors()) {
- this.setState({
- shouldShowIncompleteErrs: true,
- });
- } else {
- const value = this.state.value;
- this.setState({
- recipient: undefined,
- value: undefined,
- });
- this.props.onComplete(this.state.recipient, value);
- }
- }
- private _onCancel(): void {
- this.setState({
- value: undefined,
- });
- this.props.onCancelled();
- }
- private _hasErrors(): boolean {
- return _.isUndefined(this.state.recipient) || _.isUndefined(this.state.value) || !this.state.isAmountValid;
- }
-}
diff --git a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx b/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
deleted file mode 100644
index c8d5af6b6..000000000
--- a/packages/website/ts/components/dialogs/track_token_confirmation_dialog.tsx
+++ /dev/null
@@ -1,93 +0,0 @@
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as moment from 'moment';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { TrackTokenConfirmation } from 'ts/components/track_token_confirmation';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Token, TokenByAddress } from 'ts/types';
-
-interface TrackTokenConfirmationDialogProps {
- tokens: Token[];
- tokenByAddress: TokenByAddress;
- isOpen: boolean;
- onToggleDialog: (didConfirmTokenTracking: boolean) => void;
- dispatcher: Dispatcher;
- networkId: number;
- blockchain: Blockchain;
- userAddress: string;
-}
-
-interface TrackTokenConfirmationDialogState {
- isAddingTokenToTracked: boolean;
-}
-
-export class TrackTokenConfirmationDialog extends React.Component<
- TrackTokenConfirmationDialogProps,
- TrackTokenConfirmationDialogState
-> {
- constructor(props: TrackTokenConfirmationDialogProps) {
- super(props);
- this.state = {
- isAddingTokenToTracked: false,
- };
- }
- public render(): React.ReactNode {
- const tokens = this.props.tokens;
- return (
- <Dialog
- title="Tracking confirmation"
- titleStyle={{ fontWeight: 100 }}
- actions={[
- <FlatButton
- key="trackNo"
- label="No"
- onClick={this._onTrackConfirmationRespondedAsync.bind(this, false)}
- />,
- <FlatButton
- key="trackYes"
- label="Yes"
- onClick={this._onTrackConfirmationRespondedAsync.bind(this, true)}
- />,
- ]}
- open={this.props.isOpen}
- onRequestClose={this.props.onToggleDialog.bind(this, false)}
- autoScrollBodyContent={true}
- >
- <div className="pt2">
- <TrackTokenConfirmation
- tokens={tokens}
- networkId={this.props.networkId}
- tokenByAddress={this.props.tokenByAddress}
- isAddingTokenToTracked={this.state.isAddingTokenToTracked}
- />
- </div>
- </Dialog>
- );
- }
- private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean): Promise<void> {
- if (!didUserAcceptTracking) {
- this.props.onToggleDialog(didUserAcceptTracking);
- return;
- }
- this.setState({
- isAddingTokenToTracked: true,
- });
- const currentTimestamp = moment().unix();
- for (const token of this.props.tokens) {
- const newTokenEntry = {
- ...token,
- trackedTimestamp: currentTimestamp,
- };
-
- trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
- this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
- }
-
- this.setState({
- isAddingTokenToTracked: false,
- });
- this.props.onToggleDialog(didUserAcceptTracking);
- }
-}
diff --git a/packages/website/ts/components/documentation/docs_logo.tsx b/packages/website/ts/components/documentation/docs_logo.tsx
deleted file mode 100644
index ac331db79..000000000
--- a/packages/website/ts/components/documentation/docs_logo.tsx
+++ /dev/null
@@ -1,37 +0,0 @@
-import { Link } from '@0x/react-shared';
-import * as React from 'react';
-import { styled } from 'ts/style/theme';
-import { WebsitePaths } from 'ts/types';
-
-import { Container } from '../ui/container';
-
-export interface DocsLogoProps {
- containerStyle?: React.CSSProperties;
-}
-
-const Image = styled.img`
- &:hover {
- opacity: 0.7;
- }
-`;
-
-export const DocsLogo: React.StatelessComponent<DocsLogoProps> = props => {
- return (
- <Container className="flex">
- <Container>
- <Link to={WebsitePaths.Home}>
- <Image src="/images/developers/logo/0x.svg" height={34} />
- </Link>
- </Container>
- <Container paddingTop="6px" paddingLeft="7px">
- <Link to={WebsitePaths.Docs}>
- <Image src="/images/developers/logo/docs.svg" height={20} />
- </Link>
- </Container>
- </Container>
- );
-};
-
-DocsLogo.defaultProps = {
- containerStyle: {},
-};
diff --git a/packages/website/ts/components/documentation/docs_top_bar.tsx b/packages/website/ts/components/documentation/docs_top_bar.tsx
deleted file mode 100644
index c4291b78f..000000000
--- a/packages/website/ts/components/documentation/docs_top_bar.tsx
+++ /dev/null
@@ -1,108 +0,0 @@
-import { ALink, colors, Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import Drawer from 'material-ui/Drawer';
-import * as React from 'react';
-import { DocsLogo } from 'ts/components/documentation/docs_logo';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { Deco, Key, ScreenWidths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-export interface DocsTopBarProps {
- location: Location;
- screenWidth: ScreenWidths;
- translate: Translate;
- sidebar?: React.ReactNode;
-}
-
-interface DocsTopBarState {
- isDrawerOpen: boolean;
-}
-
-export class DocsTopBar extends React.Component<DocsTopBarProps, DocsTopBarState> {
- constructor(props: DocsTopBarProps) {
- super(props);
- this.state = {
- isDrawerOpen: false,
- };
- }
- public componentWillReceiveProps(nextProps: DocsTopBarProps): void {
- if (nextProps.location.pathname !== this.props.location.pathname) {
- this.setState({
- isDrawerOpen: false,
- });
- }
- }
- public render(): React.ReactNode {
- return (
- <Container height={80}>
- <Container
- className="flex items-center lg-pt3 md-pt3 sm-pt1 lg-justify-end md-justify-end sm-justify-start"
- width="100%"
- >
- <Container className="sm-hide xs-hide">
- <Container className="flex items-center justify-between right" width="250px">
- {this._renderMenuItems(constants.DEVELOPER_TOPBAR_LINKS)}
- </Container>
- </Container>
- <Container className="lg-hide md-hide">
- <Container paddingTop="6px">
- <DocsLogo />
- </Container>
- </Container>
- <Container className="md-hide lg-hide absolute" right="18px" top="12px">
- <i
- className="zmdi zmdi-menu"
- style={{
- color: colors.grey700,
- fontSize: 30,
- cursor: 'pointer',
- }}
- onClick={this._onMenuButtonClick.bind(this)}
- />
- </Container>
- </Container>
- <Container width={'100%'} height={'1px'} backgroundColor={colors.grey300} marginTop={'16px'} />
- {this.props.screenWidth === ScreenWidths.Sm && this._renderDrawer()}
- </Container>
- );
- }
- private _renderMenuItems(menuItemLinks: ALink[]): React.ReactNode {
- const menuItems = _.map(menuItemLinks, menuItemInfo => {
- return (
- <Link
- key={`menu-item-${menuItemInfo.title}`}
- to={menuItemInfo.to}
- shouldOpenInNewTab={menuItemInfo.shouldOpenInNewTab}
- >
- <Container className="flex items-center" paddingLeft="4px">
- <Text fontSize="16px" fontColor={colors.lightLinkBlue} fontWeight="bold">
- {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)}
- </Text>
- </Container>
- </Link>
- );
- });
- return menuItems;
- }
- private _renderDrawer(): React.ReactNode {
- return (
- <Drawer
- open={this.state.isDrawerOpen}
- docked={false}
- openSecondary={true}
- onRequestChange={this._onMenuButtonClick.bind(this)}
- >
- <Container className="clearfix pl1 pt2" onClick={this._onMenuButtonClick.bind(this)}>
- {this.props.sidebar}
- </Container>
- </Drawer>
- );
- }
- private _onMenuButtonClick(): void {
- this.setState({
- isDrawerOpen: !this.state.isDrawerOpen,
- });
- }
-}
diff --git a/packages/website/ts/components/documentation/overview_content.tsx b/packages/website/ts/components/documentation/overview_content.tsx
deleted file mode 100644
index caabaf874..000000000
--- a/packages/website/ts/components/documentation/overview_content.tsx
+++ /dev/null
@@ -1,134 +0,0 @@
-import { colors, Link, MarkdownLinkBlock, utils as sharedUtils } from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as ReactMarkdown from 'react-markdown';
-import { Element as ScrollElement } from 'react-scroll';
-import { TutorialButton } from 'ts/components/documentation/tutorial_button';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { Deco, Key, Package, TutorialInfo } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-export interface OverviewContentProps {
- translate: Translate;
- tutorials: TutorialInfo[];
- categoryToPackages: ObjectMap<Package[]>;
-}
-
-export interface OverviewContentState {}
-
-export class OverviewContent extends React.Component<OverviewContentProps, OverviewContentState> {
- public render(): React.ReactNode {
- return (
- <Container>
- {this._renderSectionTitle(this.props.translate.get(Key.StartBuildOn0x, Deco.Cap))}
- <Container paddingTop="12px">
- {this._renderSectionDescription(this.props.translate.get(Key.StartBuildOn0xDescription, Deco.Cap))}
- <Container marginTop="36px">
- {_.map(this.props.tutorials, tutorialInfo => (
- <ScrollElement
- name={sharedUtils.getIdFromName(
- this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap),
- )}
- key={`tutorial-${tutorialInfo.link.title}`}
- >
- <TutorialButton translate={this.props.translate} tutorialInfo={tutorialInfo} />
- </ScrollElement>
- ))}
- </Container>
- </Container>
- <Container marginTop="32px" paddingBottom="100px">
- {this._renderSectionTitle(this.props.translate.get(Key.LibrariesAndTools, Deco.CapWords))}
- <Container paddingTop="12px">
- {this._renderSectionDescription(
- this.props.translate.get(Key.LibrariesAndToolsDescription, Deco.Cap),
- )}
- <Container marginTop="36px">
- {_.map(this.props.categoryToPackages, (pkgs, category) =>
- this._renderPackageCategory(category, pkgs),
- )}
- </Container>
- </Container>
- </Container>
- </Container>
- );
- }
- private _renderPackageCategory(category: string, pkgs: Package[]): React.ReactNode {
- return (
- <Container key={`category-${category}`}>
- <Text fontSize="18px">{category}</Text>
- <Container>{_.map(pkgs, pkg => this._renderPackage(pkg))}</Container>
- </Container>
- );
- }
- private _renderPackage(pkg: Package): React.ReactNode {
- const id = sharedUtils.getIdFromName(pkg.link.title);
- return (
- <ScrollElement name={id} key={`package-${pkg.link.title}`}>
- <Container className="pb2">
- <Container width="100%" height="1px" backgroundColor={colors.grey300} marginTop="11px" />
- <Container className="clearfix mt2 pt1">
- <Container className="md-col lg-col md-col-4 lg-col-4">
- <Link
- to={pkg.link.to}
- fontColor={colors.lightLinkBlue}
- shouldOpenInNewTab={!!pkg.link.shouldOpenInNewTab}
- >
- <Text Tag="div" fontColor={colors.lightLinkBlue} fontWeight="bold">
- {pkg.link.title}
- </Text>
- </Link>
- </Container>
- <Container className="md-col lg-col md-col-6 lg-col-6 sm-py2">
- <Text fontColor={colors.grey700}>
- <ReactMarkdown
- source={pkg.description}
- renderers={{
- link: MarkdownLinkBlock,
- paragraph: 'span',
- }}
- />
- </Text>
- </Container>
- <Container className="md-col lg-col md-col-2 lg-col-2 sm-pb2 relative">
- <Container position="absolute" right="0px">
- <Link
- to={pkg.link.to}
- fontColor={colors.lightLinkBlue}
- shouldOpenInNewTab={!!pkg.link.shouldOpenInNewTab}
- >
- <Container className="flex">
- <Container>{this.props.translate.get(Key.More, Deco.Cap)}</Container>
- <Container paddingTop="1px" paddingLeft="6px">
- <i
- className="zmdi zmdi-chevron-right bold"
- style={{ fontSize: 18, color: colors.lightLinkBlue }}
- />
- </Container>
- </Container>
- </Link>
- </Container>
- </Container>
- </Container>
- </Container>
- </ScrollElement>
- );
- }
- private _renderSectionTitle(text: string): React.ReactNode {
- return (
- <Container paddingTop="30px">
- <Text fontColor={colors.projectsGrey} fontSize="30px" fontWeight="bold">
- {text}
- </Text>
- </Container>
- );
- }
- private _renderSectionDescription(text: string): React.ReactNode {
- return (
- <Text fontColor={colors.linkSectionGrey} fontSize="16px" fontFamily="Roboto Mono">
- {text}
- </Text>
- );
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/documentation/sidebar_header.tsx b/packages/website/ts/components/documentation/sidebar_header.tsx
deleted file mode 100644
index d158ab926..000000000
--- a/packages/website/ts/components/documentation/sidebar_header.tsx
+++ /dev/null
@@ -1,60 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { VersionDropDown } from 'ts/components/documentation/version_drop_down';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { ScreenWidths } from 'ts/types';
-
-export interface SidebarHeaderProps {
- screenWidth: ScreenWidths;
- title: string;
- docsVersion?: string;
- availableDocVersions?: string[];
- onVersionSelected?: () => void;
-}
-
-export const SidebarHeader: React.StatelessComponent<SidebarHeaderProps> = ({
- screenWidth,
- title,
- docsVersion,
- availableDocVersions,
- onVersionSelected,
-}) => {
- return (
- <Container>
- <Container className="flex justify-bottom">
- <Container className="col col-8 pl1">
- <Text
- fontColor={colors.lightLinkBlue}
- fontSize={screenWidth === ScreenWidths.Sm ? '20px' : '22px'}
- fontWeight="bold"
- lineHeight="26px"
- >
- {title}
- </Text>
- </Container>
- {!_.isUndefined(docsVersion) &&
- !_.isUndefined(availableDocVersions) &&
- !_.isUndefined(onVersionSelected) && (
- <div className="col col-4 pl1" style={{ alignSelf: 'flex-end', paddingBottom: 4 }}>
- <Container className="right">
- <VersionDropDown
- selectedVersion={docsVersion}
- versions={availableDocVersions}
- onVersionSelected={onVersionSelected}
- />
- </Container>
- </div>
- )}
- </Container>
- <Container
- width={'100%'}
- height={'1px'}
- backgroundColor={colors.grey300}
- marginTop="20px"
- marginBottom="27px"
- />
- </Container>
- );
-};
diff --git a/packages/website/ts/components/documentation/tutorial_button.tsx b/packages/website/ts/components/documentation/tutorial_button.tsx
deleted file mode 100644
index b747ef598..000000000
--- a/packages/website/ts/components/documentation/tutorial_button.tsx
+++ /dev/null
@@ -1,59 +0,0 @@
-import { colors, Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { Deco, Key, TutorialInfo } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-import { styled } from 'ts/style/theme';
-
-export interface TutorialButtonProps {
- className?: string;
- translate: Translate;
- tutorialInfo: TutorialInfo;
-}
-
-const PlainTutorialButton: React.StatelessComponent<TutorialButtonProps> = ({ translate, tutorialInfo, className }) => (
- <Container className={className}>
- <Link to={tutorialInfo.link.to} shouldOpenInNewTab={tutorialInfo.link.shouldOpenInNewTab}>
- <div className="flex relative">
- <div className="col col-1 flex items-center sm-pr3">
- <img src={tutorialInfo.iconUrl} height={40} />
- </div>
- <div className="lg-pl2 md-pl2 sm-pl3 col col-10">
- <Text Tag="div" fontSize="18" fontColor={colors.lightLinkBlue} fontWeight="bold">
- {translate.get(tutorialInfo.link.title as Key, Deco.Cap)}
- </Text>
- <Text Tag="div" fontColor={colors.grey750} fontSize="16">
- {translate.get(tutorialInfo.description as Key, Deco.Cap)}
- </Text>
- </div>
- <div className="col col-1 flex items-center justify-end">
- <div className="right">
- <i
- className="zmdi zmdi-chevron-right bold"
- style={{ fontSize: 26, color: colors.lightLinkBlue }}
- />
- </div>
- </div>
- </div>
- </Link>
- </Container>
-);
-
-export const TutorialButton = styled(PlainTutorialButton)`
- border-radius: 4px;
- border: 1px solid ${colors.grey325};
- background-color: ${colors.white};
- &:hover {
- border: 1px solid ${colors.lightLinkBlue};
- background-color: ${colors.lightestBlue};
- }
- padding: 20px;
- margin-bottom: 15px;
-`;
-
-TutorialButton.defaultProps = {};
-
-TutorialButton.displayName = 'TutorialButton';
diff --git a/packages/website/ts/components/documentation/version_drop_down.tsx b/packages/website/ts/components/documentation/version_drop_down.tsx
deleted file mode 100644
index 5e77530fd..000000000
--- a/packages/website/ts/components/documentation/version_drop_down.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Button } from 'ts/components/ui/button';
-import { Container } from 'ts/components/ui/container';
-import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down';
-import { Text } from 'ts/components/ui/text';
-import { styled } from 'ts/style/theme';
-
-interface ActiveNodeProps {
- className?: string;
- selectedVersion: string;
-}
-
-const PlainActiveNode: React.StatelessComponent<ActiveNodeProps> = ({ className, selectedVersion }) => (
- <Container className={className}>
- <Container className="flex justify-center">
- <Text fontColor={colors.grey700} fontSize="12px">
- v {selectedVersion}
- </Text>
- <Container paddingLeft="6px">
- <i className="zmdi zmdi-chevron-down" style={{ fontSize: 17, color: 'rgba(153, 153, 153, 0.8)' }} />
- </Container>
- </Container>
- </Container>
-);
-
-const ActiveNode = styled(PlainActiveNode)`
- cursor: pointer;
- border: 1px solid ${colors.beigeWhite};
- border-radius: 4px;
- padding: 4px 6px 4px 8px;
-`;
-
-interface VersionDropDownProps {
- selectedVersion: string;
- versions: string[];
- onVersionSelected: (semver: string) => void;
-}
-
-interface VersionDropDownState {}
-
-export class VersionDropDown extends React.Component<VersionDropDownProps, VersionDropDownState> {
- public render(): React.ReactNode {
- const activeNode = <ActiveNode selectedVersion={this.props.selectedVersion} />;
- return (
- <DropDown
- activateEvent={DropdownMouseEvent.Click}
- activeNode={activeNode}
- popoverContent={this._renderDropdownMenu()}
- anchorOrigin={{ horizontal: 'middle', vertical: 'bottom' }}
- targetOrigin={{ horizontal: 'middle', vertical: 'top' }}
- popoverStyle={{ borderRadius: 4 }}
- />
- );
- }
- private _renderDropdownMenu(): React.ReactNode {
- const items = _.map(this.props.versions, version => {
- const isSelected = version === this.props.selectedVersion;
- return (
- <Container key={`dropdown-items-${version}`}>
- <Button
- borderRadius="0px"
- padding="0.8em 0em"
- width="100%"
- isDisabled={isSelected}
- onClick={this._onClick.bind(this, version)}
- >
- v {version}
- </Button>
- </Container>
- );
- });
- const dropdownMenu = <Container width="88px">{items}</Container>;
- return dropdownMenu;
- }
- private _onClick(selectedVersion: string): void {
- this.props.onVersionSelected(selectedVersion);
- }
-}
diff --git a/packages/website/ts/components/dropdowns/developers_drop_down.tsx b/packages/website/ts/components/dropdowns/developers_drop_down.tsx
deleted file mode 100644
index 079132f2b..000000000
--- a/packages/website/ts/components/dropdowns/developers_drop_down.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import { ALink, colors, Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { DropDown } from 'ts/components/ui/drop_down';
-import { Text } from 'ts/components/ui/text';
-import { Deco, Key, WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-const gettingStartedKeyToLinkInfo1: ALink[] = [
- {
- title: Key.BuildARelayer,
- to: `${WebsitePaths.Wiki}#Build-A-Relayer`,
- },
- {
- title: Key.OrderBasics,
- to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`,
- },
-];
-const gettingStartedKeyToLinkInfo2: ALink[] = [
- {
- title: Key.DevelopOnEthereum,
- to: `${WebsitePaths.Wiki}#Ethereum-Development`,
- },
- {
- title: Key.UseNetworkedLiquidity,
- to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
- },
-];
-const popularDocsToLinkInfos: ALink[] = [
- {
- title: Key.ZeroExJs,
- to: WebsitePaths.ZeroExJs,
- },
- {
- title: Key.Connect,
- to: WebsitePaths.Connect,
- },
- {
- title: Key.SmartContract,
- to: WebsitePaths.SmartContracts,
- },
-];
-const usefulLinksToLinkInfo: ALink[] = [
- {
- title: Key.Wiki,
- to: WebsitePaths.Wiki,
- },
- {
- title: Key.Github,
- to: constants.URL_GITHUB_ORG,
- shouldOpenInNewTab: true,
- },
- {
- title: Key.ProtocolSpecification,
- to: constants.URL_PROTOCOL_SPECIFICATION,
- shouldOpenInNewTab: true,
- },
-];
-
-interface DevelopersDropDownProps {
- location: Location;
- translate: Translate;
- menuItemStyles: React.CSSProperties;
- menuIconStyle: React.CSSProperties;
-}
-
-interface DevelopersDropDownState {}
-
-export class DevelopersDropDown extends React.Component<DevelopersDropDownProps, DevelopersDropDownState> {
- public render(): React.ReactNode {
- const activeNode = (
- <Container className="flex relative" paddingRight="10">
- <Text fontColor={this.props.menuIconStyle.color}>
- {this.props.translate.get(Key.Developers, Deco.Cap)}
- </Text>
- </Container>
- );
- return (
- <DropDown
- activeNode={activeNode}
- popoverContent={this._renderDropdownMenu()}
- anchorOrigin={{ horizontal: 'left', vertical: 'bottom' }}
- targetOrigin={{ horizontal: 'left', vertical: 'top' }}
- style={this.props.menuItemStyles}
- popoverStyle={{ borderRadius: 4, width: 397, height: 373, marginTop: 0 }}
- />
- );
- }
- private _renderDropdownMenu(): React.ReactNode {
- const sectionPadding = '26px';
- const dropdownMenu = (
- <Container>
- <Container className="flex" padding={sectionPadding}>
- <Container paddingRight="45px">
- {this._renderLinkSection(gettingStartedKeyToLinkInfo1, 'Getting started')}
- </Container>
- <Container>{this._renderLinkSection(gettingStartedKeyToLinkInfo2)}</Container>
- </Container>
- <Container width="100%" height="1px" backgroundColor={colors.grey300} />
- <Container className="flex" padding={sectionPadding}>
- <Container paddingRight="62px">
- <Container>{this._renderLinkSection(popularDocsToLinkInfos, 'Popular docs')}</Container>
- </Container>
- <Container>
- <Container>{this._renderLinkSection(usefulLinksToLinkInfo, 'Useful links')}</Container>
- </Container>
- </Container>
- <Link to={WebsitePaths.Docs} fontColor={colors.lightBlueA700}>
- <Container
- padding="0.9rem"
- backgroundColor={colors.lightBgGrey}
- borderBottomLeftRadius={4}
- borderBottomRightRadius={4}
- >
- <Text fontColor={colors.lightBlueA700} fontWeight="bold" fontSize="14px" textAlign="center">
- {this.props.translate.get(Key.ViewAllDocumentation, Deco.Upper)}
- </Text>
- </Container>
- </Link>
- </Container>
- );
- return dropdownMenu;
- }
- private _renderLinkSection(links: ALink[], title: string = ''): React.ReactNode {
- const numLinks = links.length;
- let i = 0;
- const renderLinks = _.map(links, (link: ALink) => {
- const isWikiLink = _.startsWith(link.to, WebsitePaths.Wiki) && _.includes(link.to, '#');
- const isOnWiki = this.props.location.pathname === WebsitePaths.Wiki;
- let to = link.to;
- if (isWikiLink && isOnWiki) {
- to = `${link.to.split('#')[1]}`;
- }
- i++;
- const isLast = i === numLinks;
- const linkText = this.props.translate.get(link.title as Key, Deco.Cap);
- return (
- <Container className={`pr1 pt1 ${!isLast && 'pb1'}`} key={`dev-dropdown-link-${link.title}`}>
- <Link to={to} shouldOpenInNewTab={!!link.shouldOpenInNewTab}>
- <Text fontFamily="Roboto, Roboto Mono" fontColor={colors.lightBlueA700}>
- {linkText}
- </Text>
- </Link>
- </Container>
- );
- });
- return (
- <Container>
- <Container height="33px">
- {!_.isEmpty(title) && (
- <Text letterSpacing={1} fontColor={colors.linkSectionGrey} fontSize="14px" fontWeight={600}>
- {title.toUpperCase()}
- </Text>
- )}
- </Container>
- {renderLinks}
- </Container>
- );
- }
-}
diff --git a/packages/website/ts/components/dropdowns/dropdown_developers.tsx b/packages/website/ts/components/dropdowns/dropdown_developers.tsx
deleted file mode 100644
index 590d2ead9..000000000
--- a/packages/website/ts/components/dropdowns/dropdown_developers.tsx
+++ /dev/null
@@ -1,184 +0,0 @@
-import { Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled, { withTheme } from 'styled-components';
-
-import { Button } from 'ts/components/button';
-import { Column, FlexWrap, WrapGrid } from 'ts/components/newLayout';
-import { ThemeValuesInterface } from 'ts/components/siteWrap';
-import { Heading } from 'ts/components/text';
-import { WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-interface Props {
- theme: ThemeValuesInterface;
-}
-
-interface LinkConfig {
- label: string;
- url: string;
- shouldOpenInNewTab?: boolean;
-}
-
-const introData: LinkConfig[] = [
- {
- label: 'Build a relayer',
- url: `${WebsitePaths.Wiki}#Build-A-Relayer`,
- },
- {
- label: 'Develop on Ethereum',
- url: `${WebsitePaths.Wiki}#Ethereum-Development`,
- },
- {
- label: 'Make & take orders',
- url: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`,
- },
- {
- label: 'Use networked liquidity',
- url: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
- },
- {
- label: 'Market making',
- url: `${WebsitePaths.MarketMaker}`,
- },
-];
-
-const docsData: LinkConfig[] = [
- {
- label: '0x.js',
- url: WebsitePaths.ZeroExJs,
- },
- {
- label: '0x Connect',
- url: WebsitePaths.Connect,
- },
- {
- label: 'Smart Contract',
- url: WebsitePaths.SmartContracts,
- },
-];
-
-const linksData: LinkConfig[] = [
- {
- label: 'Wiki',
- url: WebsitePaths.Wiki,
- },
- {
- label: 'Github',
- url: constants.URL_GITHUB_ORG,
- shouldOpenInNewTab: true,
- },
- {
- label: 'Protocol specification',
- url: constants.URL_PROTOCOL_SPECIFICATION,
- shouldOpenInNewTab: true,
- },
-];
-
-export const DropdownDevelopers: React.FunctionComponent<Props> = withTheme((props: Props) => (
- <>
- <DropdownWrap>
- <div>
- <Heading asElement="h4" size={14} color="inherit" marginBottom="15px" isMuted={0.35}>
- Getting Started
- </Heading>
-
- <StyledGrid isCentered={false} isWrapped={true}>
- {_.map(introData, (item, index) => (
- <li>
- <Link key={`introLink-${index}`} to={item.url}>
- {item.label}
- </Link>
- </li>
- ))}
- </StyledGrid>
- </div>
-
- <StyledWrap>
- <Column width="calc(100% - 15px)">
- <Heading asElement="h4" size={14} color="inherit" marginBottom="15px" isMuted={0.35}>
- Popular Docs
- </Heading>
-
- <ul>
- {_.map(docsData, (item, index) => (
- <li key={`docsLink-${index}`}>
- <Link to={item.url} shouldOpenInNewTab={item.shouldOpenInNewTab}>
- {item.label}
- </Link>
- </li>
- ))}
- </ul>
- </Column>
-
- <Column width="calc(100% - 15px)">
- <Heading asElement="h4" size={14} color="inherit" marginBottom="15px" isMuted={0.35}>
- Useful Links
- </Heading>
-
- <ul>
- {_.map(linksData, (item, index) => (
- <li key={`usefulLink-${index}`}>
- <Link to={item.url} shouldOpenInNewTab={item.shouldOpenInNewTab}>
- {item.label}
- </Link>
- </li>
- ))}
- </ul>
- </Column>
- </StyledWrap>
-
- <StyledLink
- to={WebsitePaths.Docs}
- bgColor={props.theme.dropdownButtonBg}
- isAccentColor={true}
- isNoBorder={true}
- >
- View All Documentation
- </StyledLink>
- </DropdownWrap>
- </>
-));
-
-const DropdownWrap = styled.div`
- padding: 15px 30px 75px 30px;
-
- a {
- color: inherit;
- }
-
- li {
- margin: 8px 0;
- }
-`;
-
-const StyledGrid = styled(WrapGrid.withComponent('ul'))`
- li {
- width: 50%;
- flex-shrink: 0;
- }
-`;
-
-const StyledWrap = styled(FlexWrap)`
- padding-top: 20px;
- margin-top: 30px;
- position: relative;
-
- &:before {
- content: '';
- width: 100%;
- height: 1px;
- background-color: ${props => props.theme.dropdownColor};
- opacity: 0.15;
- position: absolute;
- top: 0;
- left: 0;
- }
-`;
-
-const StyledLink = styled(Button)`
- width: 100%;
- position: absolute;
- bottom: 0;
- left: 0;
-`;
diff --git a/packages/website/ts/components/dropdowns/dropdown_products.tsx b/packages/website/ts/components/dropdowns/dropdown_products.tsx
deleted file mode 100644
index 93fd1a4fe..000000000
--- a/packages/website/ts/components/dropdowns/dropdown_products.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Link } from 'react-router-dom';
-import styled from 'styled-components';
-import { Heading, Paragraph } from 'ts/components/text';
-import { WebsitePaths } from 'ts/types';
-
-const navData = [
- {
- title: '0x Instant',
- description: 'Simple crypto purchasing',
- url: WebsitePaths.Instant,
- },
- {
- title: '0x Launch Kit',
- description: 'Build on the 0x protocol',
- url: WebsitePaths.LaunchKit,
- },
-];
-
-export const DropdownProducts: React.FunctionComponent<{}> = () => (
- <List>
- {_.map(navData, (item, index) => (
- <li key={`productLink-${index}`}>
- <Link to={item.url}>
- <Heading asElement="h3" color="inherit" isNoMargin={true} size="small">
- {item.title}
- </Heading>
-
- {item.description && (
- <Paragraph color="inherit" isNoMargin={true} size="small" isMuted={0.5}>
- {item.description}
- </Paragraph>
- )}
- </Link>
- </li>
- ))}
- </List>
-);
-
-const List = styled.ul`
- a {
- padding: 15px 30px;
- display: block;
- color: inherit;
- }
-`;
diff --git a/packages/website/ts/components/dropdowns/network_drop_down.tsx b/packages/website/ts/components/dropdowns/network_drop_down.tsx
deleted file mode 100644
index df2d72edc..000000000
--- a/packages/website/ts/components/dropdowns/network_drop_down.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { constants as sharedConstants } from '@0x/react-shared';
-import * as _ from 'lodash';
-import DropDownMenu from 'material-ui/DropDownMenu';
-import MenuItem from 'material-ui/MenuItem';
-import * as React from 'react';
-
-interface NetworkDropDownProps {
- updateSelectedNetwork: (e: any, index: number, value: number) => void;
- selectedNetworkId: number;
- avialableNetworkIds: number[];
-}
-
-interface NetworkDropDownState {}
-
-export class NetworkDropDown extends React.Component<NetworkDropDownProps, NetworkDropDownState> {
- public render(): React.ReactNode {
- return (
- <div className="mx-auto" style={{ width: 120 }}>
- <DropDownMenu value={this.props.selectedNetworkId} onChange={this.props.updateSelectedNetwork}>
- {this._renderDropDownItems()}
- </DropDownMenu>
- </div>
- );
- }
- private _renderDropDownItems(): React.ReactNode {
- const items = _.map(this.props.avialableNetworkIds, networkId => {
- const networkName = sharedConstants.NETWORK_NAME_BY_ID[networkId];
- const primaryText = (
- <div className="flex">
- <div className="pr1" style={{ width: 14, paddingTop: 2 }}>
- <img src={`/images/network_icons/${networkName.toLowerCase()}.png`} style={{ width: 14 }} />
- </div>
- <div>{networkName}</div>
- </div>
- );
- return <MenuItem key={networkId} value={networkId} primaryText={primaryText} />;
- });
- return items;
- }
-}
diff --git a/packages/website/ts/components/eth_weth_conversion_button.tsx b/packages/website/ts/components/eth_weth_conversion_button.tsx
deleted file mode 100644
index 536ba924b..000000000
--- a/packages/website/ts/components/eth_weth_conversion_button.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import RaisedButton from 'material-ui/RaisedButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { EthWethConversionDialog } from 'ts/components/dialogs/eth_weth_conversion_dialog';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { BlockchainCallErrs, Side, Token } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-interface EthWethConversionButtonProps {
- userAddress: string;
- networkId: number;
- direction: Side;
- ethToken: Token;
- dispatcher: Dispatcher;
- blockchain: Blockchain;
- userEtherBalanceInWei: BigNumber;
- isOutdatedWrappedEther: boolean;
- onConversionSuccessful?: () => void;
- isDisabled?: boolean;
- lastForceTokenStateRefetch: number;
- refetchEthTokenStateAsync: () => Promise<void>;
-}
-
-interface EthWethConversionButtonState {
- isEthConversionDialogVisible: boolean;
- isEthConversionHappening: boolean;
-}
-
-export class EthWethConversionButton extends React.Component<
- EthWethConversionButtonProps,
- EthWethConversionButtonState
-> {
- public static defaultProps: Partial<EthWethConversionButtonProps> = {
- isDisabled: false,
- onConversionSuccessful: _.noop.bind(_),
- };
- public constructor(props: EthWethConversionButtonProps) {
- super(props);
- this.state = {
- isEthConversionDialogVisible: false,
- isEthConversionHappening: false,
- };
- }
- public render(): React.ReactNode {
- const labelStyle = this.state.isEthConversionHappening ? { fontSize: 10 } : {};
- let callToActionLabel;
- let inProgressLabel;
- if (this.props.direction === Side.Deposit) {
- callToActionLabel = 'Wrap';
- inProgressLabel = 'Wrapping...';
- } else {
- callToActionLabel = 'Unwrap';
- inProgressLabel = 'Unwrapping...';
- }
- return (
- <div>
- <RaisedButton
- style={{ width: '100%' }}
- labelStyle={labelStyle}
- disabled={this.props.isDisabled || this.state.isEthConversionHappening}
- label={this.state.isEthConversionHappening ? inProgressLabel : callToActionLabel}
- onClick={this._toggleConversionDialog.bind(this)}
- />
- <EthWethConversionDialog
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- direction={this.props.direction}
- isOpen={this.state.isEthConversionDialogVisible}
- onComplete={this._onConversionAmountSelectedAsync.bind(this)}
- onCancelled={this._toggleConversionDialog.bind(this)}
- etherBalanceInWei={this.props.userEtherBalanceInWei}
- token={this.props.ethToken}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- />
- </div>
- );
- }
- private _toggleConversionDialog(): void {
- this.setState({
- isEthConversionDialogVisible: !this.state.isEthConversionDialogVisible,
- });
- }
- private async _onConversionAmountSelectedAsync(direction: Side, value: BigNumber): Promise<void> {
- this.setState({
- isEthConversionHappening: true,
- });
- this._toggleConversionDialog();
- const token = this.props.ethToken;
- try {
- if (direction === Side.Deposit) {
- await this.props.blockchain.convertEthToWrappedEthTokensAsync(token.address, value);
- const ethAmount = Web3Wrapper.toUnitAmount(value, constants.DECIMAL_PLACES_ETH);
- this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount.toString()} ETH to WETH`);
- } else {
- await this.props.blockchain.convertWrappedEthTokensToEthAsync(token.address, value);
- const tokenAmount = Web3Wrapper.toUnitAmount(value, token.decimals);
- this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount.toString()} WETH to ETH`);
- }
- if (!this.props.isOutdatedWrappedEther) {
- await this.props.refetchEthTokenStateAsync();
- }
- this.props.onConversionSuccessful();
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- } else if (!utils.didUserDenyWeb3Request(errMsg)) {
- logUtils.log(`Unexpected error encountered: ${err}`);
- logUtils.log(err.stack);
- const errorMsg =
- direction === Side.Deposit
- ? 'Failed to wrap your ETH. Please try again.'
- : 'Failed to unwrap your WETH. Please try again.';
- this.props.dispatcher.showFlashMessage(errorMsg);
- errorReporter.report(err);
- }
- }
- this.setState({
- isEthConversionHappening: false,
- });
- }
-}
diff --git a/packages/website/ts/components/eth_wrappers.tsx b/packages/website/ts/components/eth_wrappers.tsx
deleted file mode 100644
index dc597b18f..000000000
--- a/packages/website/ts/components/eth_wrappers.tsx
+++ /dev/null
@@ -1,448 +0,0 @@
-import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import Divider from 'material-ui/Divider';
-import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
-import * as moment from 'moment';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import { Blockchain } from 'ts/blockchain';
-import { EthWethConversionButton } from 'ts/components/eth_weth_conversion_button';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import {
- OutdatedWrappedEtherByNetworkId,
- Side,
- Token,
- TokenByAddress,
- TokenState,
- TokenStateByAddress,
-} from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-const DATE_FORMAT = 'D/M/YY';
-const ICON_DIMENSION = 40;
-const ETHER_ICON_PATH = '/images/ether.png';
-const OUTDATED_WETH_ICON_PATH = '/images/wrapped_eth_gray.png';
-
-interface EthWrappersProps {
- networkId: number;
- blockchain: Blockchain;
- dispatcher: Dispatcher;
- tokenByAddress: TokenByAddress;
- userAddress: string;
- userEtherBalanceInWei?: BigNumber;
- lastForceTokenStateRefetch: number;
- isFullWidth?: boolean;
-}
-
-interface EthWrappersState {
- ethTokenState: TokenState;
- outdatedWETHStateByAddress: TokenStateByAddress;
-}
-
-export class EthWrappers extends React.Component<EthWrappersProps, EthWrappersState> {
- public static defaultProps: Partial<EthWrappersProps> = {
- isFullWidth: false,
- };
- private _isUnmounted: boolean;
- constructor(props: EthWrappersProps) {
- super(props);
- this._isUnmounted = false;
- const outdatedWETHAddresses = this._getOutdatedWETHAddresses();
- const outdatedWETHStateByAddress: TokenStateByAddress = {};
- _.each(outdatedWETHAddresses, outdatedWETHAddress => {
- outdatedWETHStateByAddress[outdatedWETHAddress] = {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- };
- });
- this.state = {
- outdatedWETHStateByAddress,
- ethTokenState: {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- },
- };
- }
- public componentWillReceiveProps(nextProps: EthWrappersProps): void {
- if (
- nextProps.userAddress !== this.props.userAddress ||
- nextProps.networkId !== this.props.networkId ||
- nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch
- ) {
- // tslint:disable-next-line:no-floating-promises
- this._fetchWETHStateAsync();
- }
- }
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- // tslint:disable-next-line:no-floating-promises
- this._fetchWETHStateAsync();
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const etherToken = this._getEthToken();
- const wethBalance = Web3Wrapper.toUnitAmount(this.state.ethTokenState.balance, constants.DECIMAL_PLACES_ETH);
- const isBidirectional = true;
- const etherscanUrl = sharedUtils.getEtherScanLinkIfExists(
- etherToken.address,
- this.props.networkId,
- EtherscanLinkSuffixes.Address,
- );
- const tokenLabel = this._renderToken(
- 'Wrapped Ether',
- etherToken.address,
- utils.getTokenIconUrl(etherToken.symbol),
- );
- const userEtherBalanceInEth = !_.isUndefined(this.props.userEtherBalanceInWei)
- ? Web3Wrapper.toUnitAmount(this.props.userEtherBalanceInWei, constants.DECIMAL_PLACES_ETH)
- : undefined;
- const rootClassName = this.props.isFullWidth ? 'clearfix' : 'clearfix lg-px4 md-px4 sm-px2';
- return (
- <div className={rootClassName} style={{ minHeight: 600 }}>
- <div className="relative">
- <h3>ETH Wrapper</h3>
- <div className="absolute" style={{ top: 0, right: 0 }}>
- <a target="_blank" href={constants.URL_WETH_IO} style={{ color: colors.grey }}>
- <div className="flex">
- <div>About Wrapped ETH</div>
- <div className="pl1">
- <i className="zmdi zmdi-open-in-new" />
- </div>
- </div>
- </a>
- </div>
- </div>
- <Divider />
- <div>
- <div className="py2">Wrap ETH into an ERC20-compliant Ether token. 1 ETH = 1 WETH.</div>
- <div>
- <Table selectable={false} style={{ backgroundColor: 'transparent' }}>
- <TableHeader displaySelectAll={false} adjustForCheckbox={false}>
- <TableRow>
- <TableHeaderColumn>ETH Token</TableHeaderColumn>
- <TableHeaderColumn>Balance</TableHeaderColumn>
- <TableHeaderColumn className="center">
- {this._renderActionColumnTitle(isBidirectional)}
- </TableHeaderColumn>
- </TableRow>
- </TableHeader>
- <TableBody displayRowCheckbox={false}>
- <TableRow key="ETH">
- <TableRowColumn className="py1">
- <div className="flex">
- <img
- style={{
- width: ICON_DIMENSION,
- height: ICON_DIMENSION,
- }}
- src={ETHER_ICON_PATH}
- />
- <div className="ml2 sm-hide xs-hide" style={{ marginTop: 12 }}>
- ETH
- </div>
- </div>
- </TableRowColumn>
- <TableRowColumn>
- {!_.isUndefined(userEtherBalanceInEth) ? (
- `${userEtherBalanceInEth.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} ETH`
- ) : (
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- )}
- </TableRowColumn>
- <TableRowColumn>
- <EthWethConversionButton
- refetchEthTokenStateAsync={this._refetchEthTokenStateAsync.bind(this)}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- isOutdatedWrappedEther={false}
- direction={Side.Deposit}
- ethToken={etherToken}
- dispatcher={this.props.dispatcher}
- blockchain={this.props.blockchain}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- isDisabled={_.isUndefined(userEtherBalanceInEth)}
- />
- </TableRowColumn>
- </TableRow>
- <TableRow key="WETH">
- <TableRowColumn className="py1">
- {this._renderTokenLink(tokenLabel, etherscanUrl)}
- </TableRowColumn>
- <TableRowColumn>
- {this.state.ethTokenState.isLoaded ? (
- `${wethBalance.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} WETH`
- ) : (
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- )}
- </TableRowColumn>
- <TableRowColumn>
- <EthWethConversionButton
- refetchEthTokenStateAsync={this._refetchEthTokenStateAsync.bind(this)}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- isOutdatedWrappedEther={false}
- direction={Side.Receive}
- isDisabled={!this.state.ethTokenState.isLoaded}
- ethToken={etherToken}
- dispatcher={this.props.dispatcher}
- blockchain={this.props.blockchain}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- />
- </TableRowColumn>
- </TableRow>
- </TableBody>
- </Table>
- </div>
- </div>
- <div>
- <h4>Outdated WETH</h4>
- <Divider />
- <div className="pt2" style={{ lineHeight: 1.5 }}>
- The{' '}
- <a href={constants.URL_CANONICAL_WETH_POST} target="_blank">
- canonical WETH
- </a>{' '}
- contract is updated when necessary. Unwrap outdated WETH in order to
 retrieve your ETH and move
- it to the updated WETH token.
- </div>
- <div>
- <Table selectable={false} style={{ backgroundColor: 'transparent' }}>
- <TableHeader displaySelectAll={false} adjustForCheckbox={false}>
- <TableRow>
- <TableHeaderColumn>WETH Version</TableHeaderColumn>
- <TableHeaderColumn>Balance</TableHeaderColumn>
- <TableHeaderColumn className="center">
- {this._renderActionColumnTitle(!isBidirectional)}
- </TableHeaderColumn>
- </TableRow>
- </TableHeader>
- <TableBody displayRowCheckbox={false}>{this._renderOutdatedWeths(etherToken)}</TableBody>
- </Table>
- </div>
- </div>
- </div>
- );
- }
- private _renderActionColumnTitle(isBidirectional: boolean): React.ReactNode {
- let iconClass = 'zmdi-long-arrow-right';
- let leftSymbol = 'WETH';
- let rightSymbol = 'ETH';
- if (isBidirectional) {
- iconClass = 'zmdi-swap';
- leftSymbol = 'ETH';
- rightSymbol = 'WETH';
- }
- return (
- <div className="flex mx-auto" style={{ width: 85 }}>
- <div style={{ paddingTop: 3 }}>{leftSymbol}</div>
- <div className="px1">
- <i style={{ fontSize: 18 }} className={`zmdi ${iconClass}`} />
- </div>
- <div style={{ paddingTop: 3 }}>{rightSymbol}</div>
- </div>
- );
- }
- private _renderOutdatedWeths(etherToken: Token): React.ReactNode {
- const rows = _.map(
- configs.OUTDATED_WRAPPED_ETHERS,
- (outdatedWETHByNetworkId: OutdatedWrappedEtherByNetworkId) => {
- const outdatedWETHIfExists = outdatedWETHByNetworkId[this.props.networkId];
- if (_.isUndefined(outdatedWETHIfExists)) {
- return null; // noop
- }
- const timestampMsRange = outdatedWETHIfExists.timestampMsRange;
- let dateRange: string;
- if (!_.isUndefined(timestampMsRange)) {
- const startMoment = moment(timestampMsRange.startTimestampMs);
- const endMoment = moment(timestampMsRange.endTimestampMs);
- dateRange = `${startMoment.format(DATE_FORMAT)}-${endMoment.format(DATE_FORMAT)}`;
- } else {
- dateRange = '-';
- }
- const outdatedEtherToken = {
- ...etherToken,
- address: outdatedWETHIfExists.address,
- };
- const outdatedEtherTokenState = this.state.outdatedWETHStateByAddress[outdatedWETHIfExists.address];
- const isStateLoaded = outdatedEtherTokenState.isLoaded;
- const balanceInEthIfExists = isStateLoaded
- ? Web3Wrapper.toUnitAmount(outdatedEtherTokenState.balance, constants.DECIMAL_PLACES_ETH).toFixed(
- configs.AMOUNT_DISPLAY_PRECSION,
- )
- : undefined;
- const onConversionSuccessful = this._onOutdatedConversionSuccessfulAsync.bind(
- this,
- outdatedWETHIfExists.address,
- );
- const etherscanUrl = sharedUtils.getEtherScanLinkIfExists(
- outdatedWETHIfExists.address,
- this.props.networkId,
- EtherscanLinkSuffixes.Address,
- );
- const tokenLabel = this._renderToken(dateRange, outdatedEtherToken.address, OUTDATED_WETH_ICON_PATH);
- return (
- <TableRow key={`weth-${outdatedWETHIfExists.address}`}>
- <TableRowColumn className="py1">
- {this._renderTokenLink(tokenLabel, etherscanUrl)}
- </TableRowColumn>
- <TableRowColumn>
- {isStateLoaded ? (
- `${balanceInEthIfExists} WETH`
- ) : (
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- )}
- </TableRowColumn>
- <TableRowColumn>
- <EthWethConversionButton
- refetchEthTokenStateAsync={this._refetchEthTokenStateAsync.bind(this)}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- isDisabled={!isStateLoaded}
- isOutdatedWrappedEther={true}
- direction={Side.Receive}
- ethToken={outdatedEtherToken}
- dispatcher={this.props.dispatcher}
- blockchain={this.props.blockchain}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- onConversionSuccessful={onConversionSuccessful}
- />
- </TableRowColumn>
- </TableRow>
- );
- },
- );
- return rows;
- }
- private _renderTokenLink(tokenLabel: React.ReactNode, etherscanUrl: string): React.ReactNode {
- return (
- <span>
- {_.isUndefined(etherscanUrl) ? (
- tokenLabel
- ) : (
- <a href={etherscanUrl} target="_blank" style={{ textDecoration: 'none' }}>
- {tokenLabel}
- </a>
- )}
- </span>
- );
- }
- private _renderToken(name: string, address: string, imgPath: string): React.ReactNode {
- const tooltipId = `tooltip-${address}`;
- return (
- <div className="flex">
- <img style={{ width: ICON_DIMENSION, height: ICON_DIMENSION }} src={imgPath} />
- <div className="ml2 sm-hide xs-hide" style={{ marginTop: 12 }}>
- <span data-tip={true} data-for={tooltipId}>
- {name}
- </span>
- <ReactTooltip id={tooltipId}>{address}</ReactTooltip>
- </div>
- </div>
- );
- }
- private async _onOutdatedConversionSuccessfulAsync(outdatedWETHAddress: string): Promise<void> {
- const currentOutdatedWETHState = this.state.outdatedWETHStateByAddress[outdatedWETHAddress];
- this.setState({
- outdatedWETHStateByAddress: {
- ...this.state.outdatedWETHStateByAddress,
- [outdatedWETHAddress]: {
- balance: currentOutdatedWETHState.balance,
- allowance: currentOutdatedWETHState.allowance,
- isLoaded: false,
- },
- },
- });
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- outdatedWETHAddress,
- );
- this.setState({
- outdatedWETHStateByAddress: {
- ...this.state.outdatedWETHStateByAddress,
- [outdatedWETHAddress]: {
- balance,
- allowance,
- isLoaded: true,
- },
- },
- });
- }
- private async _fetchWETHStateAsync(): Promise<void> {
- const tokens = _.values(this.props.tokenByAddress);
- const wethToken = _.find(tokens, token => token.symbol === 'WETH');
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [wethBalance, wethAllowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- wethToken.address,
- );
-
- const outdatedWETHAddresses = this._getOutdatedWETHAddresses();
- const outdatedWETHStateByAddress: TokenStateByAddress = {};
- for (const address of outdatedWETHAddresses) {
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- address,
- );
- outdatedWETHStateByAddress[address] = {
- balance,
- allowance,
- isLoaded: true,
- };
- }
- if (!this._isUnmounted) {
- this.setState({
- outdatedWETHStateByAddress,
- ethTokenState: {
- balance: wethBalance,
- allowance: wethAllowance,
- isLoaded: true,
- },
- });
- }
- }
- private _getOutdatedWETHAddresses(): string[] {
- const outdatedWETHAddresses = _.compact(
- _.map(configs.OUTDATED_WRAPPED_ETHERS, outdatedWrappedEtherByNetwork => {
- const outdatedWrappedEtherIfExists = outdatedWrappedEtherByNetwork[this.props.networkId];
- if (_.isUndefined(outdatedWrappedEtherIfExists)) {
- return undefined;
- }
- const address = outdatedWrappedEtherIfExists.address;
- return address;
- }),
- );
- return outdatedWETHAddresses;
- }
- private _getEthToken(): Token {
- const tokens = _.values(this.props.tokenByAddress);
- const etherToken = _.find(tokens, { symbol: 'WETH' });
- return etherToken;
- }
- private async _refetchEthTokenStateAsync(): Promise<void> {
- const etherToken = this._getEthToken();
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- etherToken.address,
- );
- this.setState({
- ethTokenState: {
- balance,
- allowance,
- isLoaded: true,
- },
- });
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/fill_order.tsx b/packages/website/ts/components/fill_order.tsx
deleted file mode 100644
index 95a3671c4..000000000
--- a/packages/website/ts/components/fill_order.tsx
+++ /dev/null
@@ -1,661 +0,0 @@
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { colors, Link } from '@0x/react-shared';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as accounting from 'accounting';
-import * as _ from 'lodash';
-import { Card, CardHeader, CardText } from 'material-ui/Card';
-import Divider from 'material-ui/Divider';
-import RaisedButton from 'material-ui/RaisedButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { TrackTokenConfirmationDialog } from 'ts/components/dialogs/track_token_confirmation_dialog';
-import { FillOrderJSON } from 'ts/components/fill_order_json';
-import { FillWarningDialog } from 'ts/components/fill_warning_dialog';
-import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
-import { Alert } from 'ts/components/ui/alert';
-import { EthereumAddress } from 'ts/components/ui/ethereum_address';
-import { Identicon } from 'ts/components/ui/identicon';
-import { VisualOrder } from 'ts/components/visual_order';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { portalOrderSchema } from 'ts/schemas/portal_order_schema';
-import { validator } from 'ts/schemas/validator';
-import { AlertTypes, BlockchainErrs, PortalOrder, Token, TokenByAddress, WebsitePaths } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { orderParser } from 'ts/utils/order_parser';
-import { utils } from 'ts/utils/utils';
-
-interface FillOrderProps {
- blockchain: Blockchain;
- blockchainErr: BlockchainErrs;
- orderFillAmount: BigNumber;
- isOrderInUrl: boolean;
- networkId: number;
- userAddress: string;
- tokenByAddress: TokenByAddress;
- initialOrder: PortalOrder;
- dispatcher: Dispatcher;
- lastForceTokenStateRefetch: number;
- isFullWidth?: boolean;
- shouldHideHeader?: boolean;
-}
-
-interface FillOrderState {
- didOrderValidationRun: boolean;
- areAllInvolvedTokensTracked: boolean;
- globalErrMsg: string;
- orderJSON: string;
- orderJSONErrMsg: string;
- parsedOrder: PortalOrder;
- didFillOrderSucceed: boolean;
- didCancelOrderSucceed: boolean;
- unavailableTakerAmount: BigNumber;
- isMakerTokenAddressInRegistry: boolean;
- isTakerTokenAddressInRegistry: boolean;
- isFillWarningDialogOpen: boolean;
- isFilling: boolean;
- isCancelling: boolean;
- isConfirmingTokenTracking: boolean;
- tokensToTrack: Token[];
-}
-
-export class FillOrder extends React.Component<FillOrderProps, FillOrderState> {
- public static defaultProps: Partial<FillOrderProps> = {
- isFullWidth: false,
- shouldHideHeader: false,
- };
- private _isUnmounted: boolean;
- constructor(props: FillOrderProps) {
- super(props);
- this._isUnmounted = false;
- this.state = {
- globalErrMsg: '',
- didOrderValidationRun: false,
- areAllInvolvedTokensTracked: false,
- didFillOrderSucceed: false,
- didCancelOrderSucceed: false,
- orderJSON: _.isUndefined(this.props.initialOrder) ? '' : JSON.stringify(this.props.initialOrder),
- orderJSONErrMsg: '',
- parsedOrder: this.props.initialOrder,
- unavailableTakerAmount: new BigNumber(0),
- isMakerTokenAddressInRegistry: false,
- isTakerTokenAddressInRegistry: false,
- isFillWarningDialogOpen: false,
- isFilling: false,
- isCancelling: false,
- isConfirmingTokenTracking: false,
- tokensToTrack: [],
- };
- }
- public componentWillMount(): void {
- if (!_.isEmpty(this.state.orderJSON)) {
- // tslint:disable-next-line:no-floating-promises
- this._validateFillOrderFireAndForgetAsync(this.state.orderJSON);
- }
- }
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const rootClassName = this.props.isFullWidth ? 'clearfix' : 'lg-px4 md-px4 sm-px2';
- return (
- <div className={rootClassName} style={{ minHeight: 600 }}>
- {!this.props.shouldHideHeader && (
- <div>
- <h3>Fill an order</h3>
- <Divider />
- </div>
- )}
- <div>
- {!this.props.isOrderInUrl && (
- <div>
- <div className="pt2 pb2">Paste an order JSON snippet below to begin</div>
- <div className="pb2">Order JSON</div>
- <FillOrderJSON
- blockchain={this.props.blockchain}
- tokenByAddress={this.props.tokenByAddress}
- orderJSON={this.state.orderJSON}
- onFillOrderJSONChanged={this._onFillOrderJSONChanged.bind(this)}
- />
- {this._renderOrderJsonNotices()}
- </div>
- )}
- <div>
- {!_.isUndefined(this.state.parsedOrder) &&
- this.state.didOrderValidationRun &&
- this.state.areAllInvolvedTokensTracked &&
- this._renderVisualOrder()}
- </div>
- {this.props.isOrderInUrl && (
- <div className="pt2">
- <Card
- style={{
- boxShadow: 'none',
- backgroundColor: 'none',
- border: '1px solid #eceaea',
- }}
- >
- <CardHeader title="Order JSON" actAsExpander={true} showExpandableButton={true} />
- <CardText expandable={true}>
- <FillOrderJSON
- blockchain={this.props.blockchain}
- tokenByAddress={this.props.tokenByAddress}
- orderJSON={this.state.orderJSON}
- onFillOrderJSONChanged={this._onFillOrderJSONChanged.bind(this)}
- />
- </CardText>
- </Card>
- {this._renderOrderJsonNotices()}
- </div>
- )}
- </div>
- <FillWarningDialog
- isOpen={this.state.isFillWarningDialogOpen}
- onToggleDialog={this._onFillWarningClosed.bind(this)}
- />
- <TrackTokenConfirmationDialog
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- tokenByAddress={this.props.tokenByAddress}
- dispatcher={this.props.dispatcher}
- tokens={this.state.tokensToTrack}
- isOpen={this.state.isConfirmingTokenTracking}
- onToggleDialog={this._onToggleTrackConfirmDialog.bind(this)}
- />
- </div>
- );
- }
- private _renderOrderJsonNotices(): React.ReactNode {
- return (
- <div>
- {!_.isUndefined(this.props.initialOrder) && !this.state.didOrderValidationRun && (
- <div className="pt2">
- <span className="pr1">
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- </span>
- <span>Validating order...</span>
- </div>
- )}
- {!_.isEmpty(this.state.orderJSONErrMsg) && (
- <Alert type={AlertTypes.Error} message={this.state.orderJSONErrMsg} />
- )}
- </div>
- );
- }
- private _renderVisualOrder(): React.ReactNode {
- const takerTokenAddress = assetDataUtils.decodeERC20AssetData(this.state.parsedOrder.signedOrder.takerAssetData)
- .tokenAddress;
- const takerToken = this.props.tokenByAddress[takerTokenAddress];
- const orderTakerAmount = this.state.parsedOrder.signedOrder.takerAssetAmount;
- const orderMakerAmount = this.state.parsedOrder.signedOrder.makerAssetAmount;
- const takerAssetToken = {
- amount: orderTakerAmount.minus(this.state.unavailableTakerAmount),
- symbol: takerToken.symbol,
- };
- const fillToken = this.props.tokenByAddress[takerTokenAddress];
- const makerTokenAddress = assetDataUtils.decodeERC20AssetData(this.state.parsedOrder.signedOrder.makerAssetData)
- .tokenAddress;
- const makerToken = this.props.tokenByAddress[makerTokenAddress];
- const makerAssetToken = {
- amount: orderMakerAmount
- .times(takerAssetToken.amount)
- .div(orderTakerAmount)
- .integerValue(BigNumber.ROUND_FLOOR),
- symbol: makerToken.symbol,
- };
- const fillAssetToken = {
- amount: this.props.orderFillAmount,
- symbol: takerToken.symbol,
- };
- const parsedOrderExpiration = this.state.parsedOrder.signedOrder.expirationTimeSeconds;
-
- let orderReceiveAmount = 0;
- if (!_.isUndefined(this.props.orderFillAmount)) {
- const orderReceiveAmountBigNumber = orderMakerAmount
- .times(this.props.orderFillAmount)
- .dividedBy(orderTakerAmount)
- .integerValue(BigNumber.ROUND_FLOOR);
- orderReceiveAmount = this._formatCurrencyAmount(orderReceiveAmountBigNumber, makerToken.decimals);
- }
- const isUserMaker =
- !_.isUndefined(this.state.parsedOrder) &&
- this.state.parsedOrder.signedOrder.makerAddress === this.props.userAddress;
- const expiryDate = utils.convertToReadableDateTimeFromUnixTimestamp(parsedOrderExpiration);
- return (
- <div className="pt3 pb1">
- <div className="clearfix pb2" style={{ width: '100%' }}>
- <div className="inline left">Order details</div>
- <div className="inline right" style={{ minWidth: 208 }}>
- <div className="col col-4 pl2" style={{ color: colors.grey }}>
- Maker:
- </div>
- <div className="col col-2 pr1">
- <Identicon address={this.state.parsedOrder.signedOrder.makerAddress} diameter={23} />
- </div>
- <div className="col col-6">
- <EthereumAddress
- address={this.state.parsedOrder.signedOrder.makerAddress}
- networkId={this.props.networkId}
- />
- </div>
- </div>
- </div>
- <div className="lg-px4 md-px4 sm-px0">
- <div className="lg-px4 md-px4 sm-px1 pt1">
- <VisualOrder
- makerAssetToken={makerAssetToken}
- takerAssetToken={takerAssetToken}
- tokenByAddress={this.props.tokenByAddress}
- makerToken={makerToken}
- takerToken={takerToken}
- networkId={this.props.networkId}
- isMakerTokenAddressInRegistry={this.state.isMakerTokenAddressInRegistry}
- isTakerTokenAddressInRegistry={this.state.isTakerTokenAddressInRegistry}
- />
- <div className="center pt3 pb2">Expires: {expiryDate} UTC</div>
- </div>
- </div>
- {!isUserMaker && (
- <div className="clearfix mx-auto relative" style={{ width: 235, height: 108 }}>
- <TokenAmountInput
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- label="Fill amount"
- onChange={this._onFillAmountChange.bind(this)}
- shouldShowIncompleteErrs={false}
- token={fillToken}
- amount={fillAssetToken.amount}
- shouldCheckBalance={true}
- shouldCheckAllowance={true}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- />
- <div
- className="absolute sm-hide xs-hide"
- style={{
- color: colors.grey400,
- right: -247,
- top: 39,
- width: 242,
- }}
- >
- = {accounting.formatNumber(orderReceiveAmount, 6)} {makerToken.symbol}
- </div>
- </div>
- )}
- <div>
- {isUserMaker ? (
- <div>
- <RaisedButton
- style={{ width: '100%' }}
- disabled={this.state.isCancelling}
- label={this.state.isCancelling ? 'Cancelling order...' : 'Cancel order'}
- onClick={this._onCancelOrderClickFireAndForgetAsync.bind(this)}
- />
- {this.state.didCancelOrderSucceed && (
- <Alert type={AlertTypes.Success} message={this._renderCancelSuccessMsg()} />
- )}
- </div>
- ) : (
- <div>
- <RaisedButton
- style={{ width: '100%' }}
- disabled={this.state.isFilling}
- label={this.state.isFilling ? 'Filling order...' : 'Fill order'}
- onClick={this._onFillOrderClick.bind(this)}
- />
- {!_.isEmpty(this.state.globalErrMsg) && (
- <Alert type={AlertTypes.Error} message={this.state.globalErrMsg} />
- )}
- {this.state.didFillOrderSucceed && (
- <Alert type={AlertTypes.Success} message={this._renderFillSuccessMsg()} />
- )}
- </div>
- )}
- </div>
- </div>
- );
- }
- private _renderFillSuccessMsg(): React.ReactNode {
- return (
- <div>
- Order successfully filled. See the trade details in your{' '}
- <Link to={`${WebsitePaths.Portal}/trades`} fontColor={colors.white}>
- trade history
- </Link>
- </div>
- );
- }
- private _renderCancelSuccessMsg(): React.ReactNode {
- return <div>Order successfully cancelled.</div>;
- }
- private _onFillOrderClick(): void {
- if (!this.state.isMakerTokenAddressInRegistry || !this.state.isTakerTokenAddressInRegistry) {
- this.setState({
- isFillWarningDialogOpen: true,
- });
- } else {
- // tslint:disable-next-line:no-floating-promises
- this._onFillOrderClickFireAndForgetAsync();
- }
- }
- private _onFillWarningClosed(didUserCancel: boolean): void {
- this.setState({
- isFillWarningDialogOpen: false,
- });
- if (!didUserCancel) {
- // tslint:disable-next-line:no-floating-promises
- this._onFillOrderClickFireAndForgetAsync();
- }
- }
- private _onFillAmountChange(_isValid: boolean, amount?: BigNumber): void {
- this.props.dispatcher.updateOrderFillAmount(amount);
- }
- private _onFillOrderJSONChanged(event: any): void {
- const orderJSON = event.target.value;
- this.setState({
- didOrderValidationRun: _.isEmpty(orderJSON) && _.isEmpty(this.state.orderJSONErrMsg),
- didFillOrderSucceed: false,
- });
- // tslint:disable-next-line:no-floating-promises
- this._validateFillOrderFireAndForgetAsync(orderJSON);
- }
- private async _checkForUntrackedTokensAndAskToAddAsync(): Promise<void> {
- if (!_.isEmpty(this.state.orderJSONErrMsg)) {
- return;
- }
- const makerTokenAddress = assetDataUtils.decodeERC20AssetData(this.state.parsedOrder.signedOrder.makerAssetData)
- .tokenAddress;
- const takerTokenAddress = assetDataUtils.decodeERC20AssetData(this.state.parsedOrder.signedOrder.takerAssetData)
- .tokenAddress;
- const makerTokenIfExists = this.props.tokenByAddress[makerTokenAddress];
- const takerTokenIfExists = this.props.tokenByAddress[takerTokenAddress];
- const tokensToTrack: Token[] = [];
- const isUnseenMakerToken = _.isUndefined(makerTokenIfExists);
- const isMakerTokenTracked = !_.isUndefined(makerTokenIfExists) && utils.isTokenTracked(makerTokenIfExists);
- if (isUnseenMakerToken) {
- tokensToTrack.push({
- ...this.state.parsedOrder.metadata.makerToken,
- address: makerTokenAddress,
- iconUrl: undefined,
- trackedTimestamp: undefined,
- isRegistered: false,
- });
- } else if (!isMakerTokenTracked) {
- tokensToTrack.push(makerTokenIfExists);
- }
- const isUnseenTakerToken = _.isUndefined(takerTokenIfExists);
- const isTakerTokenTracked = !_.isUndefined(takerTokenIfExists) && utils.isTokenTracked(takerTokenIfExists);
- if (isUnseenTakerToken) {
- tokensToTrack.push({
- ...this.state.parsedOrder.metadata.takerToken,
- address: takerTokenAddress,
- iconUrl: undefined,
- trackedTimestamp: undefined,
- isRegistered: false,
- });
- } else if (!isTakerTokenTracked) {
- tokensToTrack.push(takerTokenIfExists);
- }
- if (!_.isEmpty(tokensToTrack)) {
- this.setState({
- isConfirmingTokenTracking: true,
- tokensToTrack,
- });
- } else {
- this.setState({
- areAllInvolvedTokensTracked: true,
- });
- }
- }
- private async _validateFillOrderFireAndForgetAsync(orderJSON: string): Promise<void> {
- let orderJSONErrMsg = '';
- let parsedOrder: PortalOrder;
- let orderHash: string;
- try {
- const order = orderParser.parseJsonString(orderJSON);
- const validationResult = validator.validate(order, portalOrderSchema);
- if (validationResult.errors.length > 0) {
- orderJSONErrMsg = 'Submitted order JSON is not a valid order';
- logUtils.log(`Unexpected order JSON validation error: ${validationResult.errors.join(', ')}`);
- return;
- }
- parsedOrder = order;
- const signedOrder = parsedOrder.signedOrder;
- orderHash = orderHashUtils.getOrderHashHex(signedOrder);
- const exchangeContractAddr = this.props.blockchain.getExchangeContractAddressIfExists();
- const signature = signedOrder.signature;
- const isSignatureValid = await this.props.blockchain.isValidSignatureAsync(
- orderHash,
- signature,
- signedOrder.makerAddress,
- );
- if (exchangeContractAddr !== signedOrder.exchangeAddress) {
- orderJSONErrMsg = 'This order was made on another network or using a deprecated Exchange contract';
- parsedOrder = undefined;
- } else if (!isSignatureValid) {
- orderJSONErrMsg = 'Order signature is invalid';
- parsedOrder = undefined;
- } else {
- // Update user supplied order cache so that if they navigate away from fill view
- // e.g to set a token allowance, when they come back, the fill order persists
- this.props.dispatcher.updateUserSuppliedOrderCache(parsedOrder);
- }
- } catch (err) {
- logUtils.log(`Validate order err: ${err}`);
- if (!_.isEmpty(orderJSON)) {
- orderJSONErrMsg = 'Submitted order JSON is not valid JSON';
- }
- if (!this._isUnmounted) {
- this.setState({
- didOrderValidationRun: true,
- orderJSON,
- orderJSONErrMsg,
- parsedOrder,
- });
- }
- return;
- }
-
- let unavailableTakerAmount = new BigNumber(0);
- if (!_.isEmpty(orderJSONErrMsg)) {
- // Clear cache entry if user updates orderJSON to invalid entry
- this.props.dispatcher.updateUserSuppliedOrderCache(undefined);
- } else {
- unavailableTakerAmount = await this.props.blockchain.getUnavailableTakerAmountAsync(orderHash);
- const makerTokenAddress = assetDataUtils.decodeERC20AssetData(parsedOrder.signedOrder.makerAssetData)
- .tokenAddress;
- const takerTokenAddress = assetDataUtils.decodeERC20AssetData(parsedOrder.signedOrder.takerAssetData)
- .tokenAddress;
- const isMakerTokenAddressInRegistry = await this.props.blockchain.isAddressInTokenRegistryAsync(
- makerTokenAddress,
- );
- const isTakerTokenAddressInRegistry = await this.props.blockchain.isAddressInTokenRegistryAsync(
- takerTokenAddress,
- );
- this.setState({
- isMakerTokenAddressInRegistry,
- isTakerTokenAddressInRegistry,
- });
- }
-
- this.setState({
- didOrderValidationRun: true,
- orderJSON,
- orderJSONErrMsg,
- parsedOrder,
- unavailableTakerAmount,
- });
-
- await this._checkForUntrackedTokensAndAskToAddAsync();
- }
- private _trackOrderEvent(eventName: string): void {
- const parsedOrder = this.state.parsedOrder;
- analytics.trackOrderEvent(eventName, parsedOrder);
- }
- private async _onFillOrderClickFireAndForgetAsync(): Promise<void> {
- if (this.props.blockchainErr !== BlockchainErrs.NoError || _.isEmpty(this.props.userAddress)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return;
- }
-
- this.setState({
- isFilling: true,
- didFillOrderSucceed: false,
- });
-
- const parsedOrder = this.state.parsedOrder;
- const takerFillAmount = this.props.orderFillAmount;
-
- if (_.isUndefined(this.props.userAddress)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- this.setState({
- isFilling: false,
- });
- return;
- }
- let globalErrMsg = '';
-
- if (_.isUndefined(takerFillAmount)) {
- globalErrMsg = 'You must specify a fill amount';
- }
-
- const signedOrder = parsedOrder.signedOrder;
- if (_.isEmpty(globalErrMsg)) {
- try {
- await this.props.blockchain.validateFillOrderThrowIfInvalidAsync(
- signedOrder,
- takerFillAmount,
- this.props.userAddress,
- );
- } catch (err) {
- globalErrMsg = utils.zeroExErrToHumanReadableErrMsg(err.message, parsedOrder.signedOrder.takerAddress);
- }
- }
- if (!_.isEmpty(globalErrMsg)) {
- this.setState({
- isFilling: false,
- globalErrMsg,
- });
- return;
- }
- try {
- const orderFilledAmount: BigNumber = await this.props.blockchain.fillOrderAsync(
- signedOrder,
- this.props.orderFillAmount,
- );
- this._trackOrderEvent('Fill Order Success');
- // After fill completes, let's force fetch the token balances
- this.props.dispatcher.forceTokenStateRefetch();
- this.setState({
- isFilling: false,
- didFillOrderSucceed: true,
- globalErrMsg: '',
- unavailableTakerAmount: this.state.unavailableTakerAmount.plus(orderFilledAmount),
- });
- return;
- } catch (err) {
- this.setState({
- isFilling: false,
- });
- this._trackOrderEvent('Fill Order Failure');
- const errMsg = `${err}`;
- if (utils.didUserDenyWeb3Request(errMsg)) {
- return;
- }
- globalErrMsg = 'Failed to fill order, please refresh and try again';
- logUtils.log(`${err}`);
- this.setState({
- globalErrMsg,
- });
- errorReporter.report(err);
- return;
- }
- }
- private async _onCancelOrderClickFireAndForgetAsync(): Promise<void> {
- if (this.props.blockchainErr !== BlockchainErrs.NoError || _.isEmpty(this.props.userAddress)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return;
- }
-
- this.setState({
- isCancelling: true,
- didCancelOrderSucceed: false,
- });
-
- const parsedOrder = this.state.parsedOrder;
- const takerAddress = this.props.userAddress;
-
- if (_.isUndefined(takerAddress)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- this.setState({
- isFilling: false,
- });
- return;
- }
- let globalErrMsg = '';
- const signedOrder = parsedOrder.signedOrder;
- const takerTokenAmount = signedOrder.takerAssetAmount;
- if (!_.isEmpty(globalErrMsg)) {
- this.setState({
- isCancelling: false,
- globalErrMsg,
- });
- return;
- }
- try {
- await this.props.blockchain.cancelOrderAsync(signedOrder);
- this.setState({
- isCancelling: false,
- didCancelOrderSucceed: true,
- globalErrMsg: '',
- unavailableTakerAmount: takerTokenAmount,
- });
- this._trackOrderEvent('Cancel Order Success');
- return;
- } catch (err) {
- this.setState({
- isCancelling: false,
- });
- const errMsg = `${err}`;
- if (utils.didUserDenyWeb3Request(errMsg)) {
- return;
- }
- this._trackOrderEvent('Cancel Order Failure');
- globalErrMsg = 'Failed to cancel order, please refresh and try again';
- logUtils.log(`${err}`);
- this.setState({
- globalErrMsg,
- });
- errorReporter.report(err);
- return;
- }
- }
- private _formatCurrencyAmount(amount: BigNumber, decimals: number): number {
- const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- const roundedUnitAmount = Math.round(unitAmount.toNumber() * 100000) / 100000;
- return roundedUnitAmount;
- }
- private _onToggleTrackConfirmDialog(didConfirmTokenTracking: boolean): void {
- if (!didConfirmTokenTracking) {
- this.setState({
- orderJSON: '',
- orderJSONErrMsg: '',
- parsedOrder: undefined,
- });
- } else {
- this.setState({
- areAllInvolvedTokensTracked: true,
- });
- }
- this.setState({
- isConfirmingTokenTracking: !this.state.isConfirmingTokenTracking,
- tokensToTrack: [],
- });
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/fill_order_json.tsx b/packages/website/ts/components/fill_order_json.tsx
deleted file mode 100644
index 41413eac2..000000000
--- a/packages/website/ts/components/fill_order_json.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { generatePseudoRandomSalt } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import Paper from 'material-ui/Paper';
-import TextField from 'material-ui/TextField';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { Side, TokenByAddress } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-interface FillOrderJSONProps {
- blockchain: Blockchain;
- tokenByAddress: TokenByAddress;
- orderJSON: string;
- onFillOrderJSONChanged: (event: any) => void;
-}
-
-interface FillOrderJSONState {}
-
-export class FillOrderJSON extends React.Component<FillOrderJSONProps, FillOrderJSONState> {
- public render(): React.ReactNode {
- const tokenAddresses = _.keys(this.props.tokenByAddress);
- const exchangeContract = this.props.blockchain.getExchangeContractAddressIfExists();
- const hintSideToAssetToken = {
- [Side.Deposit]: {
- amount: new BigNumber(35),
- address: tokenAddresses[0],
- },
- [Side.Receive]: {
- amount: new BigNumber(89),
- address: tokenAddresses[1],
- },
- };
- const hintOrderExpiryTimestamp = utils.initialOrderExpiryUnixTimestampSec();
- const hintECSignature = '0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33';
- const hintSalt = generatePseudoRandomSalt();
- const feeRecipient = constants.NULL_ADDRESS;
- const hintOrder = utils.generateOrder(
- exchangeContract,
- hintSideToAssetToken,
- hintOrderExpiryTimestamp,
- '',
- '',
- constants.MAKER_FEE,
- constants.TAKER_FEE,
- feeRecipient,
- hintECSignature,
- this.props.tokenByAddress,
- hintSalt,
- );
- const hintOrderJSON = `${JSON.stringify(hintOrder, null, '\t').substring(0, 500)}...`;
- return (
- <div>
- <Paper className="p1 overflow-hidden" style={{ height: 164 }}>
- <TextField
- id="orderJSON"
- hintStyle={{ bottom: 0, top: 0 }}
- fullWidth={true}
- value={this.props.orderJSON}
- onChange={this.props.onFillOrderJSONChanged.bind(this)}
- hintText={hintOrderJSON}
- multiLine={true}
- rows={6}
- rowsMax={6}
- underlineStyle={{ display: 'none' }}
- textareaStyle={{ marginTop: 0 }}
- />
- </Paper>
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/fill_warning_dialog.tsx b/packages/website/ts/components/fill_warning_dialog.tsx
deleted file mode 100644
index 5be09e6c2..000000000
--- a/packages/website/ts/components/fill_warning_dialog.tsx
+++ /dev/null
@@ -1,46 +0,0 @@
-import { colors } from '@0x/react-shared';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-
-interface FillWarningDialogProps {
- isOpen: boolean;
- onToggleDialog: (didUserCancel: boolean) => void;
-}
-
-export const FillWarningDialog = (props: FillWarningDialogProps) => {
- const didCancel = true;
- return (
- <Dialog
- title="Warning"
- titleStyle={{ fontWeight: 100, color: colors.red500 }}
- actions={[
- <FlatButton
- key="fillWarningCancel"
- label="Cancel"
- onClick={() => props.onToggleDialog(didCancel)} // tslint:disable-line:jsx-no-lambda
- />,
- <FlatButton
- key="fillWarningContinue"
- label="Fill Order"
- onClick={() => props.onToggleDialog(!didCancel)} // tslint:disable-line:jsx-no-lambda
- />,
- ]}
- open={props.isOpen}
- onRequestClose={() => props.onToggleDialog(didCancel)} // tslint:disable-line:jsx-no-lambda
- autoScrollBodyContent={true}
- modal={true}
- >
- <div className="pt2" style={{ color: colors.grey700 }}>
- <div>
- At least one of the tokens in this order was not found in the token registry smart contract and may
- be counterfeit. It is your responsibility to verify the token addresses on Etherscan (
- <a href="https://0x.org/wiki#Verifying-Custom-Tokens" target="_blank">
- See this how-to guide
- </a>
- ) before filling an order. <b>This action may result in the loss of funds</b>.
- </div>
- </div>
- </Dialog>
- );
-};
diff --git a/packages/website/ts/components/flash_messages/asset_send_completed.tsx b/packages/website/ts/components/flash_messages/asset_send_completed.tsx
deleted file mode 100644
index b895126dc..000000000
--- a/packages/website/ts/components/flash_messages/asset_send_completed.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { utils } from 'ts/utils/utils';
-
-interface AssetSendCompletedProps {
- etherScanLinkIfExists?: string;
- toAddress: string;
- amountInBaseUnits: BigNumber;
- decimals: number;
- symbol: string;
-}
-
-interface AssetSendCompletedState {}
-
-export class AssetSendCompleted extends React.Component<AssetSendCompletedProps, AssetSendCompletedState> {
- public render(): React.ReactNode {
- const etherScanLink = !_.isUndefined(this.props.etherScanLinkIfExists) && (
- <a style={{ color: colors.white }} href={`${this.props.etherScanLinkIfExists}`} target="_blank">
- Verify on Etherscan
- </a>
- );
- const amountInUnits = Web3Wrapper.toUnitAmount(this.props.amountInBaseUnits, this.props.decimals);
- const truncatedAddress = utils.getAddressBeginAndEnd(this.props.toAddress);
- return (
- <div>
- {`Sent ${amountInUnits} ${this.props.symbol} to ${truncatedAddress}: `}
- {etherScanLink}
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/flash_messages/transaction_submitted.tsx b/packages/website/ts/components/flash_messages/transaction_submitted.tsx
deleted file mode 100644
index b1d909baa..000000000
--- a/packages/website/ts/components/flash_messages/transaction_submitted.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-interface TransactionSubmittedProps {
- etherScanLinkIfExists?: string;
-}
-
-interface TransactionSubmittedState {}
-
-export class TransactionSubmitted extends React.Component<TransactionSubmittedProps, TransactionSubmittedState> {
- public render(): React.ReactNode {
- if (_.isUndefined(this.props.etherScanLinkIfExists)) {
- return <div>Transaction submitted to the network</div>;
- } else {
- return (
- <div>
- Transaction submitted to the network:{' '}
- <a style={{ color: colors.white }} href={`${this.props.etherScanLinkIfExists}`} target="_blank">
- Verify on Etherscan
- </a>
- </div>
- );
- }
- }
-}
diff --git a/packages/website/ts/components/footer.tsx b/packages/website/ts/components/footer.tsx
deleted file mode 100644
index 3765a32ca..000000000
--- a/packages/website/ts/components/footer.tsx
+++ /dev/null
@@ -1,168 +0,0 @@
-import { Link as SmartLink } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import MediaQuery from 'react-responsive';
-import styled from 'styled-components';
-
-import { Logo } from 'ts/components/logo';
-import { Column, FlexWrap, WrapGrid } from 'ts/components/newLayout';
-import { NewsletterForm } from 'ts/components/newsletter_form';
-import { WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-interface LinkInterface {
- text: string;
- url: string;
- shouldOpenInNewTab?: boolean;
-}
-
-interface LinkRows {
- heading: string;
- isOnMobile?: boolean;
- links: LinkInterface[];
-}
-
-interface LinkListProps {
- links: LinkInterface[];
-}
-
-const linkRows: LinkRows[] = [
- {
- heading: 'Products',
- isOnMobile: true,
- links: [
- { url: WebsitePaths.Instant, text: '0x Instant' },
- { url: WebsitePaths.LaunchKit, text: '0x Launch Kit' },
- ],
- },
- {
- heading: 'Developers',
- links: [
- { url: WebsitePaths.Docs, text: 'Documentation' },
- { url: constants.URL_GITHUB_ORG, text: 'GitHub', shouldOpenInNewTab: true },
- { url: constants.URL_PROTOCOL_SPECIFICATION, text: 'Protocol Spec', shouldOpenInNewTab: true },
- ],
- },
- {
- heading: 'About',
- isOnMobile: true,
- links: [
- { url: WebsitePaths.AboutMission, text: 'Mission' },
- { url: WebsitePaths.AboutTeam, text: 'Team' },
- { url: WebsitePaths.AboutJobs, text: 'Jobs' },
- { url: WebsitePaths.AboutPress, text: 'Press' },
- { url: WebsitePaths.Ecosystem, text: 'Grant Program' },
- ],
- },
- {
- heading: 'Community',
- isOnMobile: true,
- links: [
- { url: constants.URL_TWITTER, text: 'Twitter', shouldOpenInNewTab: true },
- { url: constants.URL_ZEROEX_CHAT, text: 'Discord Chat', shouldOpenInNewTab: true },
- { url: constants.URL_FACEBOOK, text: 'Facebook', shouldOpenInNewTab: true },
- { url: constants.URL_REDDIT, text: 'Reddit', shouldOpenInNewTab: true },
- ],
- },
-];
-
-export const Footer: React.StatelessComponent = () => (
- <FooterWrap>
- <FlexWrap>
- <FooterColumn width="35%">
- <Logo />
- <NewsletterForm />
- </FooterColumn>
-
- <FooterColumn width="55%">
- <WrapGrid isCentered={false} isWrapped={true}>
- {_.map(linkRows, (row: LinkRows, index) => (
- <MediaQuery minWidth={row.isOnMobile ? 0 : 768} key={`fc-${index}`}>
- <FooterSectionWrap>
- <RowHeading>{row.heading}</RowHeading>
-
- <LinkList links={row.links} />
- </FooterSectionWrap>
- </MediaQuery>
- ))}
- </WrapGrid>
- </FooterColumn>
- </FlexWrap>
- </FooterWrap>
-);
-
-const LinkList = (props: LinkListProps) => (
- <List>
- {_.map(props.links, (link, index) => (
- <li key={`fl-${index}`}>
- <Link to={link.url} shouldOpenInNewTab={link.shouldOpenInNewTab}>
- {link.text}
- </Link>
- </li>
- ))}
- </List>
-);
-
-const FooterWrap = styled.footer`
- padding: 40px 30px 30px 30px;
- margin-top: 30px;
- background-color: ${props => props.theme.footerBg};
- color: ${props => props.theme.footerColor};
-
- path {
- fill: ${props => props.theme.footerColor};
- }
-
- @media (min-width: 768px) {
- height: 350px;
- }
-`;
-
-const FooterColumn = styled(Column)`
- @media (min-width: 768px) {
- width: ${props => props.width};
- }
-
- @media (max-width: 768px) {
- text-align: left;
- }
-`;
-
-const FooterSectionWrap = styled(FooterColumn)`
- @media (max-width: 768px) {
- width: 50%;
-
- & + & {
- margin-top: 0;
- margin-bottom: 30px;
- }
- }
-`;
-
-const RowHeading = styled.h3`
- color: inherit;
- font-weight: 700;
- font-size: 16px;
- margin-bottom: 1.25em;
- opacity: 0.75;
-`;
-
-const List = styled.ul`
- li + li {
- margin-top: 8px;
- }
-`;
-
-const Link = styled(SmartLink)`
- color: inherit;
- opacity: 0.5;
- display: block;
- font-size: 16px;
- line-height: 20px;
- transition: opacity 0.25s;
- text-decoration: none;
-
- &:hover {
- opacity: 0.8;
- }
-`;
diff --git a/packages/website/ts/components/generate_order/asset_picker.tsx b/packages/website/ts/components/generate_order/asset_picker.tsx
deleted file mode 100644
index d3f11f962..000000000
--- a/packages/website/ts/components/generate_order/asset_picker.tsx
+++ /dev/null
@@ -1,284 +0,0 @@
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import FlatButton from 'material-ui/FlatButton';
-import * as moment from 'moment';
-import * as React from 'react';
-import firstBy from 'thenby';
-
-import { Blockchain } from 'ts/blockchain';
-import { NewTokenForm } from 'ts/components/generate_order/new_token_form';
-import { TrackTokenConfirmation } from 'ts/components/track_token_confirmation';
-import { TokenIcon } from 'ts/components/ui/token_icon';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { DialogConfigs, Token, TokenByAddress, TokenVisibility } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-const TOKEN_ICON_DIMENSION = 100;
-const TILE_DIMENSION = 146;
-enum AssetViews {
- AssetPicker = 'ASSET_PICKER',
- NewTokenForm = 'NEW_TOKEN_FORM',
- ConfirmTrackToken = 'CONFIRM_TRACK_TOKEN',
-}
-
-interface AssetPickerProps {
- userAddress: string;
- blockchain: Blockchain;
- dispatcher: Dispatcher;
- networkId: number;
- isOpen: boolean;
- currentTokenAddress: string;
- onTokenChosen: (tokenAddress: string) => void;
- tokenByAddress: TokenByAddress;
- tokenVisibility?: TokenVisibility;
-}
-
-interface AssetPickerState {
- assetView: AssetViews;
- hoveredAddress: string | undefined;
- chosenTrackTokenAddress: string;
- isAddingTokenToTracked: boolean;
-}
-
-export class AssetPicker extends React.Component<AssetPickerProps, AssetPickerState> {
- public static defaultProps: Partial<AssetPickerProps> = {
- tokenVisibility: TokenVisibility.All,
- };
- private readonly _dialogConfigsByAssetView: { [assetView: string]: DialogConfigs };
- constructor(props: AssetPickerProps) {
- super(props);
- this.state = {
- assetView: AssetViews.AssetPicker,
- hoveredAddress: undefined,
- chosenTrackTokenAddress: undefined,
- isAddingTokenToTracked: false,
- };
- this._dialogConfigsByAssetView = {
- [AssetViews.AssetPicker]: {
- title: 'Select token',
- isModal: false,
- actions: [],
- },
- [AssetViews.NewTokenForm]: {
- title: 'Add an ERC20 token',
- isModal: false,
- actions: [],
- },
- [AssetViews.ConfirmTrackToken]: {
- title: 'Tracking confirmation',
- isModal: true,
- actions: [
- <FlatButton
- key="noTracking"
- label="No"
- onClick={this._onTrackConfirmationRespondedAsync.bind(this, false)}
- />,
- <FlatButton
- key="yesTrack"
- label="Yes"
- onClick={this._onTrackConfirmationRespondedAsync.bind(this, true)}
- />,
- ],
- },
- };
- }
- public render(): React.ReactNode {
- const dialogConfigs: DialogConfigs = this._dialogConfigsByAssetView[this.state.assetView];
- return (
- <Dialog
- title={dialogConfigs.title}
- modal={dialogConfigs.isModal}
- open={this.props.isOpen}
- actions={dialogConfigs.actions}
- autoScrollBodyContent={true}
- onRequestClose={this._onCloseDialog.bind(this)}
- >
- {this.state.assetView === AssetViews.AssetPicker && this._renderAssetPicker()}
- {this.state.assetView === AssetViews.NewTokenForm && (
- <NewTokenForm
- blockchain={this.props.blockchain}
- onNewTokenSubmitted={this._onNewTokenSubmitted.bind(this)}
- tokenByAddress={this.props.tokenByAddress}
- />
- )}
- {this.state.assetView === AssetViews.ConfirmTrackToken && this._renderConfirmTrackToken()}
- </Dialog>
- );
- }
- private _renderConfirmTrackToken(): React.ReactNode {
- const token = this.props.tokenByAddress[this.state.chosenTrackTokenAddress];
- return (
- <TrackTokenConfirmation
- tokens={[token]}
- tokenByAddress={this.props.tokenByAddress}
- networkId={this.props.networkId}
- isAddingTokenToTracked={this.state.isAddingTokenToTracked}
- />
- );
- }
- private _renderAssetPicker(): React.ReactNode {
- return (
- <div
- className="flex flex-wrap"
- style={{
- maxWidth: 1000,
- maxHeight: 600,
- marginBottom: 10,
- }}
- >
- {this._renderGridTiles()}
- </div>
- );
- }
- private _renderGridTiles(): React.ReactNode {
- let isHovered;
- let tileStyles;
- const allTokens = _.values(this.props.tokenByAddress);
- // filter tokens based on visibility specified in props, do not show ZRX or ETHER as tracked or untracked
- const filteredTokens =
- this.props.tokenVisibility === TokenVisibility.All
- ? allTokens
- : _.filter(allTokens, token => {
- return (
- token.symbol !== constants.ZRX_TOKEN_SYMBOL &&
- token.symbol !== constants.ETHER_TOKEN_SYMBOL &&
- ((this.props.tokenVisibility === TokenVisibility.Tracked && utils.isTokenTracked(token)) ||
- (this.props.tokenVisibility === TokenVisibility.Untracked &&
- !utils.isTokenTracked(token)))
- );
- });
- // if we are showing tracked tokens, sort by date added, otherwise sort by symbol
- const sortKey = this.props.tokenVisibility === TokenVisibility.Tracked ? 'trackedTimestamp' : 'symbol';
- const sortedTokens = filteredTokens.sort(firstBy(sortKey));
- if (_.isEmpty(sortedTokens)) {
- return <div className="mx-auto p4 h2">No tokens to remove.</div>;
- }
- const gridTiles = _.map(sortedTokens, token => {
- const address = token.address;
- isHovered = this.state.hoveredAddress === address;
- tileStyles = {
- cursor: 'pointer',
- opacity: isHovered ? 0.6 : 1,
- };
- return (
- <div
- key={address}
- style={{
- width: TILE_DIMENSION,
- height: TILE_DIMENSION,
- ...tileStyles,
- }}
- className="p2 flex sm-col-6 md-col-3 lg-col-3 flex-column items-center mx-auto"
- onClick={this._onChooseToken.bind(this, address)}
- onMouseEnter={this._onToggleHover.bind(this, address, true)}
- onMouseLeave={this._onToggleHover.bind(this, address, false)}
- >
- <div className="p1">
- <TokenIcon token={token} diameter={TOKEN_ICON_DIMENSION} />
- </div>
- <div className="center">{token.symbol}</div>
- </div>
- );
- });
- const otherTokenKey = 'otherToken';
- isHovered = this.state.hoveredAddress === otherTokenKey;
- tileStyles = {
- cursor: 'pointer',
- opacity: isHovered ? 0.6 : 1,
- };
- if (this.props.tokenVisibility !== TokenVisibility.Tracked) {
- gridTiles.push(
- <div
- key={otherTokenKey}
- style={{
- width: TILE_DIMENSION,
- height: TILE_DIMENSION,
- ...tileStyles,
- }}
- className="p2 flex sm-col-6 md-col-3 lg-col-3 flex-column items-center mx-auto"
- onClick={this._onCustomAssetChosen.bind(this)}
- onMouseEnter={this._onToggleHover.bind(this, otherTokenKey, true)}
- onMouseLeave={this._onToggleHover.bind(this, otherTokenKey, false)}
- >
- <div className="p1 center">
- <i
- style={{ fontSize: 105, paddingLeft: 1, paddingRight: 1 }}
- className="zmdi zmdi-plus-circle"
- />
- </div>
- <div className="center">Other ERC20 Token</div>
- </div>,
- );
- }
- return gridTiles;
- }
- private _onToggleHover(address: string, isHovered: boolean): void {
- const hoveredAddress = isHovered ? address : undefined;
- this.setState({
- hoveredAddress,
- });
- }
- private _onCloseDialog(): void {
- this.setState({
- assetView: AssetViews.AssetPicker,
- });
- this.props.onTokenChosen(this.props.currentTokenAddress);
- }
- private _onChooseToken(tokenAddress: string): void {
- const token = this.props.tokenByAddress[tokenAddress];
- if (utils.isTokenTracked(token)) {
- this.props.onTokenChosen(tokenAddress);
- } else {
- this.setState({
- assetView: AssetViews.ConfirmTrackToken,
- chosenTrackTokenAddress: tokenAddress,
- });
- }
- }
- private _onCustomAssetChosen(): void {
- this.setState({
- assetView: AssetViews.NewTokenForm,
- });
- }
- private _onNewTokenSubmitted(newToken: Token): void {
- trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newToken);
- this.props.dispatcher.addTokenToTokenByAddress(newToken);
- this.setState({
- assetView: AssetViews.AssetPicker,
- });
- this.props.onTokenChosen(newToken.address);
- }
- private async _onTrackConfirmationRespondedAsync(didUserAcceptTracking: boolean): Promise<void> {
- const resetState: AssetPickerState = {
- ...this.state,
- isAddingTokenToTracked: false,
- assetView: AssetViews.AssetPicker,
- chosenTrackTokenAddress: undefined,
- };
- if (!didUserAcceptTracking) {
- this.setState(resetState);
- this._onCloseDialog();
- return;
- }
- this.setState({
- isAddingTokenToTracked: true,
- });
- const tokenAddress = this.state.chosenTrackTokenAddress;
- const token = this.props.tokenByAddress[tokenAddress];
- if (_.isUndefined(tokenAddress)) {
- this.setState(resetState);
- return;
- }
- const newTokenEntry = {
- ...token,
- trackedTimestamp: moment().unix(),
- };
- trackedTokenStorage.addTrackedTokenToUser(this.props.userAddress, this.props.networkId, newTokenEntry);
-
- this.props.dispatcher.updateTokenByAddress([newTokenEntry]);
- this.setState(resetState);
- this.props.onTokenChosen(tokenAddress);
- }
-}
diff --git a/packages/website/ts/components/generate_order/generate_order_form.tsx b/packages/website/ts/components/generate_order/generate_order_form.tsx
deleted file mode 100644
index 0f70aa18f..000000000
--- a/packages/website/ts/components/generate_order/generate_order_form.tsx
+++ /dev/null
@@ -1,385 +0,0 @@
-import { assetDataUtils, generatePseudoRandomSalt, orderHashUtils } from '@0x/order-utils';
-import { colors } from '@0x/react-shared';
-import { Order as ZeroExOrder } from '@0x/types';
-import { BigNumber, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import Divider from 'material-ui/Divider';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { ExpirationInput } from 'ts/components/inputs/expiration_input';
-import { HashInput } from 'ts/components/inputs/hash_input';
-import { IdenticonAddressInput } from 'ts/components/inputs/identicon_address_input';
-import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
-import { TokenInput } from 'ts/components/inputs/token_input';
-import { OrderJSON } from 'ts/components/order_json';
-import { Alert } from 'ts/components/ui/alert';
-import { HelpTooltip } from 'ts/components/ui/help_tooltip';
-import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
-import { SwapIcon } from 'ts/components/ui/swap_icon';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { portalOrderSchema } from 'ts/schemas/portal_order_schema';
-import { validator } from 'ts/schemas/validator';
-import {
- AlertTypes,
- BlockchainErrs,
- HashData,
- PortalOrder,
- Side,
- SideToAssetToken,
- Token,
- TokenByAddress,
-} from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-enum SigningState {
- Unsigned,
- Signing,
- Signed,
-}
-
-interface GenerateOrderFormProps {
- blockchain: Blockchain;
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- dispatcher: Dispatcher;
- hashData: HashData;
- orderExpiryTimestamp: BigNumber;
- networkId: number;
- userAddress: string;
- orderSignature: string;
- orderTakerAddress: string;
- orderSalt: BigNumber;
- sideToAssetToken: SideToAssetToken;
- tokenByAddress: TokenByAddress;
- lastForceTokenStateRefetch: number;
- isFullWidth?: boolean;
- shouldHideHeader?: boolean;
-}
-
-interface GenerateOrderFormState {
- globalErrMsg: string;
- shouldShowIncompleteErrs: boolean;
- signingState: SigningState;
-}
-
-export class GenerateOrderForm extends React.Component<GenerateOrderFormProps, GenerateOrderFormState> {
- public static defaultProps: Partial<GenerateOrderFormProps> = {
- isFullWidth: false,
- shouldHideHeader: false,
- };
- constructor(props: GenerateOrderFormProps) {
- super(props);
- this.state = {
- globalErrMsg: '',
- shouldShowIncompleteErrs: false,
- signingState: SigningState.Unsigned,
- };
- }
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- }
- public render(): React.ReactNode {
- const dispatcher = this.props.dispatcher;
- const depositTokenAddress = this.props.sideToAssetToken[Side.Deposit].address;
- const depositToken = this.props.tokenByAddress[depositTokenAddress];
- const receiveTokenAddress = this.props.sideToAssetToken[Side.Receive].address;
- const receiveToken = this.props.tokenByAddress[receiveTokenAddress];
- const takerExplanation =
- 'If a taker is specified, only they are<br> \
- allowed to fill this order. If no taker is<br> \
- specified, anyone is able to fill it.';
- const exchangeContractIfExists = this.props.blockchain.getExchangeContractAddressIfExists();
- const initialTakerAddress =
- this.props.orderTakerAddress === constants.NULL_ADDRESS ? '' : this.props.orderTakerAddress;
- const rootClassName = this.props.isFullWidth ? 'clearfix mb2' : 'clearfix mb2 lg-px4 md-px4 sm-px2';
- return (
- <div className={rootClassName}>
- {!this.props.shouldHideHeader && (
- <div>
- <h3>Generate an order</h3>
- <Divider />
- </div>
- )}
- <div className="mx-auto" style={{ maxWidth: 580 }}>
- <div className="pt3">
- <div className="mx-auto clearfix">
- <div className="lg-col md-col lg-col-5 md-col-5 sm-col sm-col-5 sm-pb2">
- <TokenInput
- userAddress={this.props.userAddress}
- blockchain={this.props.blockchain}
- blockchainErr={this.props.blockchainErr}
- dispatcher={this.props.dispatcher}
- label="Selling"
- side={Side.Deposit}
- networkId={this.props.networkId}
- assetToken={this.props.sideToAssetToken[Side.Deposit]}
- updateChosenAssetToken={dispatcher.updateChosenAssetToken.bind(dispatcher)}
- tokenByAddress={this.props.tokenByAddress}
- />
- <TokenAmountInput
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- label="Sell amount"
- token={depositToken}
- amount={this.props.sideToAssetToken[Side.Deposit].amount}
- onChange={this._onTokenAmountChange.bind(this, depositToken, Side.Deposit)}
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- shouldCheckBalance={true}
- shouldCheckAllowance={true}
- />
- </div>
- <div className="lg-col md-col lg-col-2 md-col-2 sm-col sm-col-2 xs-hide">
- <div className="p1">
- <SwapIcon swapTokensFn={dispatcher.swapAssetTokenSymbols.bind(dispatcher)} />
- </div>
- </div>
- <div className="lg-col md-col lg-col-5 md-col-5 sm-col sm-col-5 sm-pb2">
- <TokenInput
- userAddress={this.props.userAddress}
- blockchain={this.props.blockchain}
- blockchainErr={this.props.blockchainErr}
- dispatcher={this.props.dispatcher}
- label="Buying"
- side={Side.Receive}
- networkId={this.props.networkId}
- assetToken={this.props.sideToAssetToken[Side.Receive]}
- updateChosenAssetToken={dispatcher.updateChosenAssetToken.bind(dispatcher)}
- tokenByAddress={this.props.tokenByAddress}
- />
- <TokenAmountInput
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- label="Receive amount"
- token={receiveToken}
- amount={this.props.sideToAssetToken[Side.Receive].amount}
- onChange={this._onTokenAmountChange.bind(this, receiveToken, Side.Receive)}
- shouldShowIncompleteErrs={this.state.shouldShowIncompleteErrs}
- shouldCheckBalance={false}
- shouldCheckAllowance={false}
- />
- </div>
- </div>
- </div>
- <div className="pt1 sm-pb2 lg-px4 md-px4">
- <div className="lg-px3 md-px3">
- <div style={{ fontSize: 12, color: colors.grey }}>Expiration</div>
- <ExpirationInput
- orderExpiryTimestamp={this.props.orderExpiryTimestamp}
- updateOrderExpiry={dispatcher.updateOrderExpiry.bind(dispatcher)}
- />
- </div>
- </div>
- <div className="pt1 flex mx-auto">
- <IdenticonAddressInput
- label="Taker"
- initialAddress={initialTakerAddress}
- updateOrderAddress={this._updateOrderAddress.bind(this)}
- />
- <div className="pt3">
- <div className="pl1">
- <HelpTooltip explanation={takerExplanation} />
- </div>
- </div>
- </div>
- <div>
- <HashInput
- blockchain={this.props.blockchain}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- hashData={this.props.hashData}
- label="Order Hash"
- />
- </div>
- <div className="pt2">
- <div className="center">
- <LifeCycleRaisedButton
- labelReady="Sign hash"
- labelLoading="Signing..."
- labelComplete="Hash signed!"
- onClickAsyncFn={this._onSignClickedAsync.bind(this)}
- />
- </div>
- {this.state.globalErrMsg !== '' && (
- <Alert type={AlertTypes.Error} message={this.state.globalErrMsg} />
- )}
- </div>
- </div>
- <Dialog
- title="Order JSON"
- titleStyle={{ fontWeight: 100 }}
- modal={false}
- open={this.state.signingState === SigningState.Signed}
- onRequestClose={this._onCloseOrderJSONDialog.bind(this)}
- >
- <OrderJSON
- exchangeContractIfExists={exchangeContractIfExists}
- orderExpiryTimestamp={this.props.orderExpiryTimestamp}
- orderSignature={this.props.orderSignature}
- orderTakerAddress={this.props.orderTakerAddress}
- orderMakerAddress={this.props.userAddress}
- orderSalt={this.props.orderSalt}
- orderMakerFee={this.props.hashData.makerFee}
- orderTakerFee={this.props.hashData.takerFee}
- orderFeeRecipient={this.props.hashData.feeRecipientAddress}
- sideToAssetToken={this.props.sideToAssetToken}
- tokenByAddress={this.props.tokenByAddress}
- />
- </Dialog>
- </div>
- );
- }
- private _onTokenAmountChange(token: Token, side: Side, _isValid: boolean, amount?: BigNumber): void {
- this.props.dispatcher.updateChosenAssetToken(side, {
- address: token.address,
- amount,
- });
- }
- private _onCloseOrderJSONDialog(): void {
- // Upon closing the order JSON dialog, we update the orderSalt stored in the Redux store
- // with a new value so that if a user signs the identical order again, the newly signed
- // orderHash will not collide with the previously generated orderHash.
- this.props.dispatcher.updateOrderSalt(generatePseudoRandomSalt());
- this.setState({
- signingState: SigningState.Unsigned,
- });
- }
- private async _onSignClickedAsync(): Promise<boolean> {
- if (this.props.blockchainErr !== BlockchainErrs.NoError) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return false;
- }
-
- // Check if all required inputs were supplied
- const debitToken = this.props.sideToAssetToken[Side.Deposit];
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [debitBalance, debitAllowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- debitToken.address,
- );
- const receiveToken = this.props.sideToAssetToken[Side.Receive];
- const receiveAmount = receiveToken.amount;
- if (
- !_.isUndefined(debitToken.amount) &&
- !_.isUndefined(receiveAmount) &&
- debitToken.amount.gt(0) &&
- receiveAmount.gt(0) &&
- this.props.userAddress !== '' &&
- debitBalance.gte(debitToken.amount) &&
- debitAllowance.gte(debitToken.amount)
- ) {
- const signedOrder = await this._signTransactionAsync();
- const doesSignedOrderExist = !_.isUndefined(signedOrder);
- if (doesSignedOrderExist) {
- analytics.trackOrderEvent('Sign Order Success', signedOrder);
- this.setState({
- globalErrMsg: '',
- shouldShowIncompleteErrs: false,
- });
- }
- return doesSignedOrderExist;
- } else {
- let globalErrMsg = 'You must fix the above errors in order to generate a valid order';
- if (this.props.userAddress === '') {
- globalErrMsg = 'You must enable wallet communication';
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- }
- analytics.track('Sign Order Failure', {
- makerTokenAmount: debitToken.amount.toString(),
- makerToken: this.props.tokenByAddress[debitToken.address].symbol,
- takerTokenAmount: receiveToken.amount.toString(),
- takerToken: this.props.tokenByAddress[receiveToken.address].symbol,
- });
- this.setState({
- globalErrMsg,
- shouldShowIncompleteErrs: true,
- });
- return false;
- }
- }
- private async _signTransactionAsync(): Promise<PortalOrder | undefined> {
- this.setState({
- signingState: SigningState.Signing,
- });
- const exchangeAddress = this.props.blockchain.getExchangeContractAddressIfExists();
- if (_.isUndefined(exchangeAddress)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- this.setState({
- signingState: SigningState.Unsigned,
- });
- return undefined;
- }
- const hashData = this.props.hashData;
-
- const makerAssetData = assetDataUtils.encodeERC20AssetData(hashData.depositTokenContractAddr);
- const takerAssetData = assetDataUtils.encodeERC20AssetData(hashData.receiveTokenContractAddr);
- const zeroExOrder: ZeroExOrder = {
- senderAddress: constants.NULL_ADDRESS,
- exchangeAddress,
- expirationTimeSeconds: hashData.orderExpiryTimestamp,
- feeRecipientAddress: hashData.feeRecipientAddress,
- makerAddress: hashData.orderMakerAddress,
- makerFee: hashData.makerFee,
- makerAssetData,
- makerAssetAmount: hashData.depositAmount,
- salt: hashData.orderSalt,
- takerAddress: hashData.orderTakerAddress,
- takerFee: hashData.takerFee,
- takerAssetData,
- takerAssetAmount: hashData.receiveAmount,
- };
- const orderHash = orderHashUtils.getOrderHashHex(zeroExOrder);
-
- let globalErrMsg = '';
- let order;
- try {
- const signature = await this.props.blockchain.signOrderHashAsync(orderHash);
- order = utils.generateOrder(
- exchangeAddress,
- this.props.sideToAssetToken,
- hashData.orderExpiryTimestamp,
- this.props.orderTakerAddress,
- this.props.userAddress,
- hashData.makerFee,
- hashData.takerFee,
- hashData.feeRecipientAddress,
- signature,
- this.props.tokenByAddress,
- hashData.orderSalt,
- );
- const validationResult = validator.validate(order, portalOrderSchema);
- if (validationResult.errors.length > 0) {
- globalErrMsg = 'Order signing failed. Please refresh and try again';
- logUtils.log(`Unexpected error occured: Order validation failed:
- ${validationResult.errors}`);
- }
- } catch (err) {
- const errMsg = `${err}`;
- if (utils.didUserDenyWeb3Request(errMsg)) {
- globalErrMsg = 'User denied sign request';
- } else {
- globalErrMsg = 'An unexpected error occured. Please try refreshing the page';
- logUtils.log(`Unexpected error occured: ${err}`);
- logUtils.log(err.stack);
- errorReporter.report(err);
- }
- }
- this.setState({
- signingState: globalErrMsg === '' ? SigningState.Signed : SigningState.Unsigned,
- globalErrMsg,
- });
- return order;
- }
- private _updateOrderAddress(address?: string): void {
- if (!_.isUndefined(address)) {
- const normalizedAddress = _.isEmpty(address) ? constants.NULL_ADDRESS : address;
- this.props.dispatcher.updateOrderTakerAddress(normalizedAddress);
- }
- }
-}
diff --git a/packages/website/ts/components/generate_order/new_token_form.tsx b/packages/website/ts/components/generate_order/new_token_form.tsx
deleted file mode 100644
index ce684d177..000000000
--- a/packages/website/ts/components/generate_order/new_token_form.tsx
+++ /dev/null
@@ -1,229 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import TextField from 'material-ui/TextField';
-import * as moment from 'moment';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { AddressInput } from 'ts/components/inputs/address_input';
-import { Alert } from 'ts/components/ui/alert';
-import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
-import { RequiredLabel } from 'ts/components/ui/required_label';
-import { AlertTypes, Token, TokenByAddress } from 'ts/types';
-
-interface NewTokenFormProps {
- blockchain: Blockchain;
- tokenByAddress: TokenByAddress;
- onNewTokenSubmitted: (token: Token) => void;
-}
-
-interface NewTokenFormState {
- globalErrMsg: string;
- name: string;
- nameErrText: string;
- symbol: string;
- symbolErrText: string;
- address: string;
- shouldShowAddressIncompleteErr: boolean;
- decimals: string;
- decimalsErrText: string;
-}
-
-export class NewTokenForm extends React.Component<NewTokenFormProps, NewTokenFormState> {
- constructor(props: NewTokenFormProps) {
- super(props);
- this.state = {
- address: '',
- globalErrMsg: '',
- name: '',
- nameErrText: '',
- shouldShowAddressIncompleteErr: false,
- symbol: '',
- symbolErrText: '',
- decimals: '18',
- decimalsErrText: '',
- };
- }
- public render(): React.ReactNode {
- return (
- <div className="mx-auto pb2" style={{ width: 256 }}>
- <div>
- <TextField
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey }}
- floatingLabelText={<RequiredLabel label="Name" />}
- value={this.state.name}
- errorText={this.state.nameErrText}
- onChange={this._onTokenNameChanged.bind(this)}
- />
- </div>
- <div>
- <TextField
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey }}
- floatingLabelText={<RequiredLabel label="Symbol" />}
- value={this.state.symbol}
- errorText={this.state.symbolErrText}
- onChange={this._onTokenSymbolChanged.bind(this)}
- />
- </div>
- <div>
- <AddressInput
- isRequired={true}
- label="Contract address"
- initialAddress=""
- shouldShowIncompleteErrs={this.state.shouldShowAddressIncompleteErr}
- updateAddress={this._onTokenAddressChanged.bind(this)}
- />
- </div>
- <div>
- <TextField
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey }}
- floatingLabelText={<RequiredLabel label="Decimals" />}
- value={this.state.decimals}
- errorText={this.state.decimalsErrText}
- onChange={this._onTokenDecimalsChanged.bind(this)}
- />
- </div>
- <div className="pt2 mx-auto" style={{ width: 120 }}>
- <LifeCycleRaisedButton
- labelReady="Add"
- labelLoading="Adding..."
- labelComplete="Added!"
- onClickAsyncFn={this._onAddNewTokenClickAsync.bind(this)}
- />
- </div>
- {this.state.globalErrMsg !== '' && <Alert type={AlertTypes.Error} message={this.state.globalErrMsg} />}
- </div>
- );
- }
- private async _onAddNewTokenClickAsync(): Promise<void> {
- // Trigger validation of name and symbol
- this._onTokenNameChanged(undefined, this.state.name);
- this._onTokenSymbolChanged(undefined, this.state.symbol);
- this._onTokenDecimalsChanged(undefined, this.state.decimals);
-
- const isAddressIncomplete = this.state.address === '';
- let doesContractExist = false;
- if (!isAddressIncomplete) {
- doesContractExist = await this.props.blockchain.doesContractExistAtAddressAsync(this.state.address);
- }
-
- let hasBalanceAllowanceErr = false;
- if (doesContractExist) {
- try {
- await this.props.blockchain.getCurrentUserTokenBalanceAndAllowanceAsync(this.state.address);
- } catch (err) {
- hasBalanceAllowanceErr = true;
- }
- }
-
- let globalErrMsg = '';
- if (
- this.state.nameErrText !== '' ||
- this.state.symbolErrText !== '' ||
- this.state.decimalsErrText !== '' ||
- isAddressIncomplete
- ) {
- globalErrMsg = 'Please fix the above issues';
- } else if (!doesContractExist) {
- globalErrMsg = 'No contract found at supplied address';
- } else if (hasBalanceAllowanceErr) {
- globalErrMsg = 'Unsuccessful call to `balanceOf` and/or `allowance` on supplied contract address';
- } else if (!isAddressIncomplete && !_.isUndefined(this.props.tokenByAddress[this.state.address])) {
- globalErrMsg = 'A token already exists with this address';
- }
-
- if (globalErrMsg !== '') {
- this.setState({
- globalErrMsg,
- shouldShowAddressIncompleteErr: isAddressIncomplete,
- });
- return;
- }
-
- const newToken: Token = {
- address: this.state.address,
- decimals: _.parseInt(this.state.decimals),
- iconUrl: undefined,
- name: this.state.name,
- symbol: this.state.symbol.toUpperCase(),
- trackedTimestamp: moment().unix(),
- isRegistered: false,
- };
- this.props.onNewTokenSubmitted(newToken);
- }
- private _onTokenNameChanged(_event: any, name: string): void {
- let nameErrText = '';
- const maxLength = 30;
- const tokens = _.values(this.props.tokenByAddress);
- const tokenWithNameIfExists = _.find(tokens, { name });
- const doesTokenWithNameExists = !_.isUndefined(tokenWithNameIfExists);
- if (name === '') {
- nameErrText = 'Name is required';
- } else if (!this._isValidName(name)) {
- nameErrText = 'Name should only contain letters, digits and spaces';
- } else if (name.length > maxLength) {
- nameErrText = `Max length is ${maxLength}`;
- } else if (doesTokenWithNameExists) {
- nameErrText = 'Token with this name already exists';
- }
-
- this.setState({
- name,
- nameErrText,
- });
- }
- private _onTokenSymbolChanged(_event: any, symbol: string): void {
- let symbolErrText = '';
- const maxLength = 5;
- const tokens = _.values(this.props.tokenByAddress);
- const doesTokenWithSymbolExists = !_.isUndefined(_.find(tokens, { symbol }));
- if (symbol === '') {
- symbolErrText = 'Symbol is required';
- } else if (!this._isAlphanumeric(symbol)) {
- symbolErrText = 'Can only include alphanumeric characters';
- } else if (symbol.length > maxLength) {
- symbolErrText = `Max length is ${maxLength}`;
- } else if (doesTokenWithSymbolExists) {
- symbolErrText = 'Token with symbol already exists';
- }
-
- this.setState({
- symbol,
- symbolErrText,
- });
- }
- private _onTokenDecimalsChanged(_event: any, decimals: string): void {
- let decimalsErrText = '';
- const maxLength = 2;
- if (decimals === '') {
- decimalsErrText = 'Decimals is required';
- } else if (!this._isInteger(decimals)) {
- decimalsErrText = 'Must be an integer';
- } else if (decimals.length > maxLength) {
- decimalsErrText = `Max length is ${maxLength}`;
- }
-
- this.setState({
- decimals,
- decimalsErrText,
- });
- }
- private _onTokenAddressChanged(address?: string): void {
- if (!_.isUndefined(address)) {
- this.setState({
- address,
- });
- }
- }
- private _isValidName(input: string): boolean {
- return /^[a-z0-9 ]+$/i.test(input);
- }
- private _isInteger(input: string): boolean {
- return /^[0-9]+$/i.test(input);
- }
- private _isAlphanumeric(input: string): boolean {
- return /^[a-zA-Z0-9]+$/i.test(input);
- }
-}
diff --git a/packages/website/ts/components/hamburger.tsx b/packages/website/ts/components/hamburger.tsx
deleted file mode 100644
index 34d4ccc46..000000000
--- a/packages/website/ts/components/hamburger.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-interface Props {
- isOpen: boolean;
- onClick?: () => void;
-}
-
-export const Hamburger: React.FunctionComponent<Props> = (props: Props) => {
- return (
- <StyledHamburger isOpen={props.isOpen} onClick={props.onClick}>
- <span />
- <span />
- <span />
- </StyledHamburger>
- );
-};
-
-const StyledHamburger = styled.button<Props>`
- background: none;
- border: 0;
- width: 22px;
- height: 16px;
- position: relative;
- z-index: 25;
- padding: 0;
- outline: none;
- user-select: none;
-
- @media (min-width: 800px) {
- display: none;
- }
-
- span {
- display: block;
- background-color: ${props => props.theme.textColor};
- width: 100%;
- height: 2px;
- margin-bottom: 5px;
- transform-origin: 4px 0px;
- transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1),
- background-color 0.5s cubic-bezier(0.77, 0.2, 0.05, 1), opacity 0.55s ease;
-
- &:first-child {
- //transform-origin: 0% 0%;
- }
-
- &:last-child {
- //transform-origin: 0% 100%;
- }
-
- ${props =>
- props.isOpen &&
- `
- opacity: 1;
- transform: rotate(45deg) translate(0, 1px);
-
- &:nth-child(2) {
- opacity: 0;
- transform: rotate(0deg) scale(0.2, 0.2);
- }
-
- &:last-child {
- transform: rotate(-45deg) translate(1px, -4px);
- }
- `}
- }
-`;
diff --git a/packages/website/ts/components/header.tsx b/packages/website/ts/components/header.tsx
deleted file mode 100644
index 088f41048..000000000
--- a/packages/website/ts/components/header.tsx
+++ /dev/null
@@ -1,249 +0,0 @@
-import { Link } from '@0x/react-shared';
-import _ from 'lodash';
-import * as React from 'react';
-import MediaQuery from 'react-responsive';
-import styled, { css, withTheme } from 'styled-components';
-
-import Headroom from 'react-headroom';
-
-import { Button } from 'ts/components/button';
-import { DropdownDevelopers } from 'ts/components/dropdowns/dropdown_developers';
-import { DropdownProducts } from 'ts/components/dropdowns/dropdown_products';
-import { Hamburger } from 'ts/components/hamburger';
-import { Logo } from 'ts/components/logo';
-import { MobileNav } from 'ts/components/mobileNav';
-import { FlexWrap } from 'ts/components/newLayout';
-import { ThemeValuesInterface } from 'ts/components/siteWrap';
-import { WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-interface HeaderProps {
- location?: Location;
- isNavToggled?: boolean;
- toggleMobileNav?: () => void;
- theme: ThemeValuesInterface;
-}
-
-interface NavItemProps {
- url?: string;
- id?: string;
- text?: string;
- dropdownWidth?: number;
- dropdownComponent?: React.FunctionComponent<any>;
- shouldOpenInNewTab?: boolean;
-}
-
-interface DropdownWrapInterface {
- width?: number;
-}
-
-const navItems: NavItemProps[] = [
- {
- id: 'why',
- url: WebsitePaths.Why,
- text: 'Why 0x',
- },
- {
- id: 'products',
- text: 'Products',
- dropdownComponent: DropdownProducts,
- dropdownWidth: 280,
- },
- {
- id: 'developers',
- text: 'Developers',
- dropdownComponent: DropdownDevelopers,
- dropdownWidth: 480,
- },
- {
- id: 'about',
- url: WebsitePaths.AboutMission,
- text: 'About',
- },
- {
- id: 'blog',
- url: constants.URL_BLOG,
- shouldOpenInNewTab: true,
- text: 'Blog',
- },
-];
-
-class HeaderBase extends React.Component<HeaderProps> {
- public onUnpin = () => {
- if (this.props.isNavToggled) {
- this.props.toggleMobileNav();
- }
- };
-
- public render(): React.ReactNode {
- const { isNavToggled, toggleMobileNav, theme } = this.props;
-
- return (
- <Headroom onUnpin={this.onUnpin} downTolerance={4} upTolerance={10}>
- <StyledHeader isNavToggled={isNavToggled}>
- <HeaderWrap>
- <Link to={WebsitePaths.Home}>
- <Logo />
- </Link>
-
- <NavLinks>
- {_.map(navItems, (link, index) => (
- <NavItem key={`navlink-${index}`} link={link} />
- ))}
- </NavLinks>
-
- <MediaQuery minWidth={990}>
- <TradeButton bgColor={theme.headerButtonBg} color="#ffffff" href="/portal">
- Trade on 0x
- </TradeButton>
- </MediaQuery>
-
- <Hamburger isOpen={isNavToggled} onClick={toggleMobileNav} />
- <MobileNav isToggled={isNavToggled} toggleMobileNav={toggleMobileNav} />
- </HeaderWrap>
- </StyledHeader>
- </Headroom>
- );
- }
-}
-
-export const Header = withTheme(HeaderBase);
-
-const NavItem = (props: { link: NavItemProps; key: string }) => {
- const { link } = props;
- const Subnav = link.dropdownComponent;
- const linkElement = _.isUndefined(link.url) ? (
- <StyledAnchor href="#">{link.text}</StyledAnchor>
- ) : (
- <StyledNavLink to={link.url} shouldOpenInNewTab={link.shouldOpenInNewTab}>
- {link.text}
- </StyledNavLink>
- );
- return (
- <LinkWrap>
- {linkElement}
-
- {link.dropdownComponent && (
- <DropdownWrap width={link.dropdownWidth}>
- <Subnav />
- </DropdownWrap>
- )}
- </LinkWrap>
- );
-};
-
-const StyledHeader = styled.header<HeaderProps>`
- padding: 30px;
- background-color: ${props => props.theme.bgColor};
-`;
-
-const LinkWrap = styled.li`
- position: relative;
-
- a {
- display: block;
- }
-
- @media (min-width: 800px) {
- &:hover > div {
- display: block;
- visibility: visible;
- opacity: 1;
- transform: translate3d(0, 0, 0);
- transition: opacity 0.35s, transform 0.35s, visibility 0s;
- }
- }
-`;
-
-const linkStyles = css`
- color: ${props => props.theme.textColor};
- opacity: 0.5;
- transition: opacity 0.35s;
- padding: 15px 0;
- margin: 0 30px;
-
- &:hover {
- opacity: 1;
- }
-`;
-
-const StyledNavLink = styled(Link).attrs({
- activeStyle: { opacity: 1 },
-})`
- ${linkStyles};
-`;
-
-const StyledAnchor = styled.a`
- ${linkStyles};
- cursor: default;
-`;
-
-const HeaderWrap = styled(FlexWrap)`
- justify-content: space-between;
- align-items: center;
-
- @media (max-width: 800px) {
- padding-top: 0;
- display: flex;
- padding-bottom: 0;
- }
-`;
-
-const NavLinks = styled.ul`
- display: flex;
- align-items: center;
- justify-content: space-between;
-
- @media (max-width: 800px) {
- display: none;
- }
-`;
-
-const DropdownWrap = styled.div<DropdownWrapInterface>`
- width: ${props => props.width || 280}px;
- padding: 15px 0;
- border: 1px solid transparent;
- border-color: ${props => props.theme.dropdownBorderColor};
- background-color: ${props => props.theme.dropdownBg};
- color: ${props => props.theme.dropdownColor};
- position: absolute;
- top: 100%;
- left: calc(50% - ${props => (props.width || 280) / 2}px);
- visibility: hidden;
- opacity: 0;
- transform: translate3d(0, -10px, 0);
- transition: opacity 0.35s, transform 0.35s, visibility 0s 0.35s;
- z-index: 20;
-
- &:after,
- &:before {
- bottom: 100%;
- left: 50%;
- border: solid transparent;
- content: ' ';
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none;
- }
- &:after {
- border-color: rgba(255, 255, 255, 0);
- border-bottom-color: ${props => props.theme.dropdownBg};
- border-width: 10px;
- margin-left: -10px;
- }
- &:before {
- border-color: rgba(255, 0, 0, 0);
- border-bottom-color: ${props => props.theme.dropdownBorderColor};
- border-width: 11px;
- margin-left: -11px;
- }
-
- @media (max-width: 768px) {
- display: none;
- }
-`;
-
-const TradeButton = styled(Button)`
- padding: 14px 22px !important;
-`;
diff --git a/packages/website/ts/components/hero.tsx b/packages/website/ts/components/hero.tsx
deleted file mode 100644
index c326e0292..000000000
--- a/packages/website/ts/components/hero.tsx
+++ /dev/null
@@ -1,143 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { addFadeInAnimation } from 'ts/constants/animations';
-
-interface Props {
- title: string;
- maxWidth?: string;
- maxWidthHeading?: string;
- isLargeTitle?: boolean;
- isFullWidth?: boolean;
- isCenteredMobile?: boolean;
- description: string;
- figure?: React.ReactNode;
- actions?: React.ReactNode;
-}
-
-const Section = styled.section`
- padding: 120px 0;
-
- @media (max-width: 768px) {
- padding: 60px 0;
- }
-`;
-
-interface WrapProps {
- isCentered?: boolean;
- isFullWidth?: boolean;
- isCenteredMobile?: boolean;
-}
-const Wrap = styled.div<WrapProps>`
- width: calc(100% - 60px);
- margin: 0 auto;
-
- @media (min-width: 768px) {
- max-width: ${props => (!props.isFullWidth ? '895px' : '1136px')};
- flex-direction: row-reverse;
- display: flex;
- align-items: center;
- text-align: ${props => props.isCentered && 'center'};
- justify-content: ${props => (props.isCentered ? 'center' : 'space-between')};
- }
-
- @media (max-width: 768px) {
- text-align: ${props => (props.isCenteredMobile ? `center` : 'left')};
- }
-`;
-
-interface TitleProps {
- isLarge?: any;
- maxWidth?: string;
-}
-const Title = styled.h1<TitleProps>`
- font-size: ${props => (props.isLarge ? '80px' : '50px')};
- font-weight: 300;
- line-height: 1.1;
- margin-left: auto;
- margin-right: auto;
- margin-bottom: 30px;
- max-width: ${props => props.maxWidth};
- ${addFadeInAnimation('0.5s')}
-
- @media (max-width: 1024px) {
- font-size: 60px;
- }
-
- @media (max-width: 768px) {
- font-size: 46px;
- }
-`;
-
-const Description = styled.p`
- font-size: 22px;
- line-height: 31px;
- font-weight: 300;
- padding: 0;
- margin-bottom: 50px;
- color: ${props => props.theme.introTextColor};
- ${addFadeInAnimation('0.5s', '0.15s')} @media (max-width: 1024px) {
- margin-bottom: 30px;
- }
-`;
-
-const Content = styled.div<{ width: string }>`
- width: 100%;
-
- @media (min-width: 768px) {
- max-width: ${props => props.width};
- }
-`;
-
-const ButtonWrap = styled.div`
- display: inline-flex;
- align-items: center;
-
- * + * {
- margin-left: 12px;
- }
-
- > *:nth-child(1) {
- ${addFadeInAnimation('0.6s', '0.3s')};
- }
- > *:nth-child(2) {
- ${addFadeInAnimation('0.6s', '0.4s')};
- }
-
- @media (max-width: 500px) {
- flex-direction: column;
- justify-content: center;
-
- * {
- padding-left: 20px;
- padding-right: 20px;
- }
-
- * + * {
- margin-left: 0;
- margin-top: 12px;
- }
- }
-`;
-
-export const Hero: React.StatelessComponent<Props> = (props: Props) => (
- <Section>
- <Wrap isCentered={!props.figure} isFullWidth={props.isFullWidth} isCenteredMobile={props.isCenteredMobile}>
- {props.figure && <Content width="400px">{props.figure}</Content>}
-
- <Content width={props.maxWidth ? props.maxWidth : props.figure ? '546px' : '678px'}>
- <Title isLarge={props.isLargeTitle} maxWidth={props.maxWidthHeading}>
- {props.title}
- </Title>
-
- <Description>{props.description}</Description>
-
- {props.actions && <ButtonWrap>{props.actions}</ButtonWrap>}
- </Content>
- </Wrap>
- </Section>
-);
-
-Hero.defaultProps = {
- isCenteredMobile: true,
-};
diff --git a/packages/website/ts/components/heroAnimation.tsx b/packages/website/ts/components/heroAnimation.tsx
deleted file mode 100644
index 42956fb6a..000000000
--- a/packages/website/ts/components/heroAnimation.tsx
+++ /dev/null
@@ -1,123 +0,0 @@
-import * as React from 'react';
-import styled, { keyframes } from 'styled-components';
-
-export const HeroAnimation = () => (
- <Image width="404" height="404" viewBox="0 0 404 404" fill="none" xmlns="http://www.w3.org/2000/svg">
- <mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="404" height="404">
- <circle cx="202" cy="202" r="200" fill="#00AE99" stroke="#00AE99" stroke-width="3" />
- </mask>
- <g mask="url(#mask0)">
- <circle cx="202" cy="202" r="200" stroke="#00AE99" strokeWidth="3" />
- <TopCircle
- vector-effect="non-scaling-stroke"
- cx="201.667"
- cy="68.6667"
- r="66.6667"
- stroke="#00AE99"
- strokeWidth="3"
- />
- <LeftCircle
- vector-effect="non-scaling-stroke"
- cx="68.6667"
- cy="202.667"
- r="66.6667"
- stroke="#00AE99"
- strokeWidth="3"
- />
- <Logo
- vector-effect="non-scaling-stroke"
- d="M168.17 260.29L167.271 259.089L165.46 260.444L167.413 261.585L168.17 260.29ZM197.32 269.2L197.219 270.696L197.226 270.697L197.32 269.2ZM237.414 258.856L238.22 260.12L238.225 260.117L237.414 258.856ZM252.653 245.439L253.801 246.405L254.55 245.515L253.874 244.568L252.653 245.439ZM241.096 229.872L242.285 228.958L242.281 228.952L242.276 228.946L241.096 229.872ZM237.72 225.571L238.901 224.645L237.582 222.965L236.449 224.775L237.72 225.571ZM219.719 241.445L218.672 242.519L219.418 243.246L220.36 242.801L219.719 241.445ZM208.264 230.282L209.311 229.207L208.392 228.312L207.365 229.081L208.264 230.282ZM143.827 169.549L145.02 168.64L143.647 166.838L142.524 168.806L143.827 169.549ZM135.133 198.43L133.637 198.329L133.636 198.337L135.133 198.43ZM145.464 238.577L144.201 239.388L145.464 238.577ZM158.862 253.837L157.895 254.984L158.786 255.736L159.735 255.057L158.862 253.837ZM174.409 242.264L175.324 243.453L175.33 243.448L175.336 243.443L174.409 242.264ZM178.705 238.885L179.632 240.064L181.287 238.761L179.516 237.623L178.705 238.885ZM162.851 220.757L161.78 219.707L161.049 220.452L161.495 221.397L162.851 220.757ZM174.102 209.286L175.173 210.337L176.082 209.41L175.295 208.377L174.102 209.286ZM235.163 145.072L236.036 146.292L237.92 144.945L235.92 143.777L235.163 145.072ZM206.014 136.162L205.91 137.658L205.913 137.658L206.014 136.162ZM165.817 146.506L166.629 147.767L166.632 147.765L165.817 146.506ZM150.578 159.922L149.43 158.956L148.681 159.846L149.357 160.793L150.578 159.922ZM162.135 175.489L160.946 176.403L160.951 176.409L160.955 176.415L162.135 175.489ZM165.511 179.791L164.331 180.717L165.634 182.378L166.773 180.6L165.511 179.791ZM183.614 163.916L184.655 162.836L183.913 162.122L182.98 162.557L183.614 163.916ZM194.354 174.26L193.313 175.341L194.212 176.206L195.226 175.48L194.354 174.26ZM259.608 235.505L258.411 236.409L259.789 238.233L260.914 236.243L259.608 235.505ZM268.2 206.931L269.696 207.033L269.697 207.024L268.2 206.931ZM257.87 166.784L259.135 165.979L259.132 165.974L257.87 166.784ZM244.471 151.524L245.439 150.378L244.547 149.625L243.598 150.304L244.471 151.524ZM228.924 163.097L228.009 161.909L228.003 161.913L227.997 161.918L228.924 163.097ZM224.629 166.477L223.701 165.298L222.034 166.609L223.826 167.744L224.629 166.477ZM240.584 184.604L239.228 185.244L239.235 185.259L239.242 185.274L240.584 184.604ZM240.687 184.809L241.767 185.849L242.502 185.086L242.029 184.139L240.687 184.809ZM229.845 196.075L228.764 195.035L227.877 195.957L228.648 196.979L229.845 196.075ZM167.413 261.585C176.201 266.718 186.346 269.964 197.219 270.696L197.421 267.703C187.019 267.002 177.321 263.898 168.926 258.994L167.413 261.585ZM197.226 270.697C212.283 271.639 226.405 267.659 238.22 260.12L236.607 257.591C225.307 264.8 211.813 268.604 197.413 267.703L197.226 270.697ZM238.225 260.117C244.08 256.348 249.307 251.742 253.801 246.405L251.506 244.473C247.204 249.583 242.203 253.989 236.602 257.594L238.225 260.117ZM253.874 244.568C250.283 239.533 246.385 234.295 242.285 228.958L239.906 230.786C243.989 236.1 247.864 241.309 251.432 246.31L253.874 244.568ZM242.276 228.946C241.713 228.229 241.151 227.512 240.588 226.795C240.026 226.078 239.463 225.362 238.901 224.645L236.54 226.497C237.103 227.213 237.665 227.93 238.228 228.647C238.791 229.364 239.353 230.081 239.916 230.798L242.276 228.946ZM236.449 224.775C232.311 231.384 226.193 236.725 219.078 240.089L220.36 242.801C227.974 239.201 234.538 233.481 238.992 226.367L236.449 224.775ZM220.766 240.371L209.311 229.207L207.217 231.356L218.672 242.519L220.766 240.371ZM207.365 229.081L167.271 259.089L169.069 261.49L209.163 231.483L207.365 229.081ZM142.524 168.806C137.505 177.601 134.368 187.549 133.637 198.329L136.63 198.532C137.33 188.214 140.33 178.703 145.13 170.293L142.524 168.806ZM133.636 198.337C132.696 213.409 136.668 227.654 144.201 239.388L146.726 237.767C139.531 226.56 135.73 212.947 136.63 198.524L133.636 198.337ZM144.201 239.388C147.965 245.25 152.565 250.484 157.895 254.984L159.83 252.691C154.727 248.383 150.327 243.376 146.726 237.767L144.201 239.388ZM159.735 255.057C164.764 251.461 169.994 247.558 175.324 243.453L173.494 241.076C168.187 245.164 162.985 249.045 157.99 252.617L159.735 255.057ZM175.336 243.443C176.768 242.317 178.2 241.19 179.632 240.064L177.777 237.706C176.345 238.832 174.913 239.959 173.481 241.086L175.336 243.443ZM179.516 237.623C172.904 233.374 167.568 227.241 164.208 220.117L161.495 221.397C165.09 229.021 170.8 235.588 177.894 240.147L179.516 237.623ZM163.922 221.807L175.173 210.337L173.031 208.236L161.78 219.707L163.922 221.807ZM175.295 208.377L145.02 168.64L142.634 170.458L172.909 210.196L175.295 208.377ZM235.92 143.777C227.132 138.643 216.987 135.398 206.114 134.665L205.913 137.658C216.315 138.359 226.012 141.463 234.407 146.367L235.92 143.777ZM206.118 134.665C191.055 133.618 176.824 137.599 165.003 145.246L166.632 147.765C177.926 140.459 191.515 136.657 205.91 137.658L206.118 134.665ZM165.006 145.244C159.151 149.013 153.924 153.619 149.43 158.956L151.725 160.888C156.027 155.779 161.028 151.372 166.629 147.767L165.006 145.244ZM149.357 160.793C152.948 165.828 156.846 171.066 160.946 176.403L163.325 174.575C159.242 169.261 155.367 164.052 151.799 159.051L149.357 160.793ZM160.955 176.415C161.518 177.132 162.08 177.849 162.643 178.566C163.205 179.283 163.768 180 164.331 180.717L166.691 178.865C166.128 178.148 165.566 177.431 165.003 176.714C164.441 175.997 163.878 175.28 163.315 174.563L160.955 176.415ZM166.773 180.6C171.021 173.973 177.044 168.635 184.248 165.276L182.98 162.557C175.251 166.161 168.796 171.885 164.248 178.981L166.773 180.6ZM182.574 164.997L193.313 175.341L195.394 173.18L184.655 162.836L182.574 164.997ZM195.226 175.48L236.036 146.292L234.291 143.852L193.481 173.04L195.226 175.48ZM260.914 236.243C265.827 227.556 268.964 217.713 269.696 207.033L266.703 206.828C266.003 217.042 263.004 226.453 258.303 234.767L260.914 236.243ZM269.697 207.024C270.638 191.949 266.663 177.81 259.135 165.979L256.604 167.589C263.804 178.904 267.603 192.417 266.703 206.837L269.697 207.024ZM259.132 165.974C255.368 160.111 250.769 154.878 245.439 150.378L243.503 152.67C248.606 156.978 253.007 161.986 256.607 167.594L259.132 165.974ZM243.598 150.304C238.57 153.901 233.339 157.803 228.009 161.909L229.84 164.285C235.147 160.197 240.349 156.316 245.344 152.744L243.598 150.304ZM227.997 161.918C227.281 162.481 226.565 163.045 225.849 163.608C225.133 164.171 224.417 164.734 223.701 165.298L225.556 167.656C226.272 167.092 226.988 166.529 227.704 165.966C228.42 165.402 229.136 164.839 229.852 164.276L227.997 161.918ZM223.826 167.744C230.535 171.992 235.869 178.121 239.228 185.244L241.941 183.964C238.345 176.339 232.632 169.769 225.431 165.209L223.826 167.744ZM239.242 185.274L239.345 185.479L242.029 184.139L241.926 183.934L239.242 185.274ZM239.606 183.769L228.764 195.035L230.926 197.115L241.767 185.849L239.606 183.769ZM228.648 196.979L258.411 236.409L260.806 234.601L231.042 195.171L228.648 196.979Z"
- fill="#00AE99"
- />
- <Rectangle
- vector-effect="non-scaling-stroke"
- d="M269 135V268.333H442V135H269Z"
- stroke="#00AE99"
- strokeWidth="3"
- />
- <Square
- vector-effect="non-scaling-stroke"
- d="M339.64 269.64L270 339.281L343.913 413.194L413.554 343.554L339.64 269.64Z"
- stroke="#00AE99"
- strokeWidth="3"
- />
- <Oblong
- vector-effect="non-scaling-stroke"
- d="M202.5 269C202.5 269 269 269 269 335.5C269 402 202.5 402 202.5 402H-6.5C-6.5 402 -77 402 -77 335.5C-77 269 -6.5 269 -6.5 269H202.5Z"
- stroke="#00AE99"
- strokeWidth="3"
- />
- </g>
- </Image>
-);
-
-const moveUp = keyframes`
- 0% { transform: translate3d(0, 0, 0) }
- 45% { transform: translate3d(0, 0, 0) }
- 55% { transform: translate3d(0, -7%, 0) }
- 85% { transform: translate3d(0, -7%, 0) }
- 100% { transform: translate3d(0, 0, 0) }
-`;
-
-const moveLeft = keyframes`
- 0% { transform: translate3d(0, 0, 0) }
- 45% { transform: translate3d(0, 0, 0) }
- 55% { transform: translate3d(-7%, 0, 0) }
- 85% { transform: translate3d(-7%, 0, 0) }
- 100% { transform: translate3d(0, 0, 0) }
-`;
-
-const moveDiag = keyframes`
- 0% { transform: translate3d(0, 0, 0) }
- 45% { transform: translate3d(0, 0, 0) }
- 55% { transform: translate3d(5%, 5%, 0) }
- 85% { transform: translate3d(5%, 5%, 0) }
- 100% { transform: translate3d(0, 0, 0) }
-`;
-
-const moveRight = keyframes`
- 0% { transform: translate3d(0, 0, 0) }
- 45% { transform: translate3d(0, 0, 0) }
- 55% { transform: translate3d(7%, 0, 0) }
- 85% { transform: translate3d(7%, 0, 0) }
- 100% { transform: translate3d(0, 0, 0) }
-`;
-
-const spin = keyframes`
- 0% { transform: rotate(0deg) }
- 65% { transform: rotate(0deg) }
- 85% { transform: rotate(90deg) }
- 100% { transform: rotate(90deg) }
-`;
-
-const moveIn = keyframes`
- 0% { opacity: 0; transform: scale(1.7) rotate(-30deg) }
- 100% { opacity: 1; transform: scale(1) rotate(0deg) }
-`;
-
-const Image = styled.svg`
- opacity: 0;
- transform: scale(1.5) rotate(-30deg);
- animation: ${moveIn} 2s forwards;
-`;
-
-const TopCircle = styled.circle`
- animation: ${moveUp} 4s -2.85s infinite;
-`;
-const LeftCircle = styled.circle`
- animation: ${moveLeft} 4s -2.85s infinite;
-`;
-const Oblong = styled.path`
- animation: ${moveLeft} 4s -2.85s infinite;
-`;
-const Square = styled.path`
- animation: ${moveDiag} 4s -2.85s infinite;
-`;
-const Rectangle = styled.path`
- animation: ${moveRight} 4s -2.85s infinite;
-`;
-
-const Logo = styled.path`
- animation: ${spin} 4s -2.8s infinite;
- transform-origin: 202px 202.7px;
-`;
diff --git a/packages/website/ts/components/heroImage.tsx b/packages/website/ts/components/heroImage.tsx
deleted file mode 100644
index af7c055ac..000000000
--- a/packages/website/ts/components/heroImage.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-interface Props {
- image: React.ReactNode;
-}
-
-export const LandingAnimation = (props: Props) => <Wrap>{props.image}</Wrap>;
-
-const Wrap = styled.figure`
- display: inline-block;
-
- svg {
- width: 100%;
- height: auto;
- }
-
- @media (min-width: 768px) {
- width: 100%;
- max-width: 400px;
- }
-
- @media (max-width: 768px) {
- width: 180px;
- margin-bottom: 40px;
- }
-`;
diff --git a/packages/website/ts/components/icon.tsx b/packages/website/ts/components/icon.tsx
deleted file mode 100644
index 60e4d04ee..000000000
--- a/packages/website/ts/components/icon.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import * as React from 'react';
-import Loadable from 'react-loadable';
-import styled from 'styled-components';
-
-import { Paragraph } from 'ts/components/text';
-import { getCSSPadding, PaddingInterface } from 'ts/constants/utilities';
-
-interface IconProps extends PaddingInterface {
- name?: string;
- component?: React.ReactNode;
- size?: 'small' | 'medium' | 'large' | 'hero' | number;
-}
-
-export const Icon: React.FunctionComponent<IconProps> = (props: IconProps) => {
- if (props.name && !props.component) {
- const IconSVG = Loadable({
- loader: async () => import(/* webpackChunkName: "icon" */ `ts/icons/illustrations/${props.name}.svg`),
- loading: () => <Paragraph>Loading</Paragraph>,
- });
-
- return (
- <StyledIcon {...props}>
- <IconSVG />
- </StyledIcon>
- );
- }
-
- if (props.component) {
- return <StyledIcon {...props}>{props.component}</StyledIcon>;
- }
-
- return null;
-};
-
-export const InlineIconWrap = styled.div<PaddingInterface>`
- margin: ${props => getCSSPadding(props.margin)};
- display: flex;
- align-items: center;
- justify-content: center;
-
- > figure {
- margin: 0 5px;
- }
-`;
-
-const _getSize = (size: string | number = 'small'): string => {
- if (typeof size === 'string') {
- return `var(--${size}Icon)`;
- }
-
- return `${size}px`;
-};
-
-const StyledIcon = styled.figure<IconProps>`
- width: ${props => _getSize(props.size)};
- height: ${props => _getSize(props.size)};
- margin: ${props => getCSSPadding(props.margin)};
- display: inline-block;
- flex-shrink: 0;
-
- svg {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-`;
diff --git a/packages/website/ts/components/image.tsx b/packages/website/ts/components/image.tsx
deleted file mode 100644
index 0137cfc97..000000000
--- a/packages/website/ts/components/image.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-interface Props {
- alt?: string;
- src?: any;
- srcset?: any;
- isCentered?: boolean;
-}
-
-const ImageClass: React.FunctionComponent<Props> = (props: Props) => {
- return <img {...props} />;
-};
-
-export const Image = styled(ImageClass)<Props>`
- margin: ${props => props.isCentered && `0 auto`};
-`;
diff --git a/packages/website/ts/components/inputs/address_input.tsx b/packages/website/ts/components/inputs/address_input.tsx
deleted file mode 100644
index 1a71f8081..000000000
--- a/packages/website/ts/components/inputs/address_input.tsx
+++ /dev/null
@@ -1,71 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { addressUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import TextField from 'material-ui/TextField';
-import * as React from 'react';
-import { RequiredLabel } from 'ts/components/ui/required_label';
-
-interface AddressInputProps {
- disabled?: boolean;
- initialAddress: string;
- isRequired?: boolean;
- hintText?: string;
- shouldHideLabel?: boolean;
- label?: string;
- shouldShowIncompleteErrs?: boolean;
- updateAddress: (address?: string) => void;
-}
-
-interface AddressInputState {
- address: string;
- errMsg: string;
-}
-
-export class AddressInput extends React.Component<AddressInputProps, AddressInputState> {
- constructor(props: AddressInputProps) {
- super(props);
- this.state = {
- address: this.props.initialAddress,
- errMsg: '',
- };
- }
- public componentWillReceiveProps(nextProps: AddressInputProps): void {
- if (nextProps.shouldShowIncompleteErrs && this.props.isRequired && this.state.address === '') {
- this.setState({
- errMsg: 'Address is required',
- });
- }
- }
- public render(): React.ReactNode {
- const label = this.props.isRequired ? <RequiredLabel label={this.props.label} /> : this.props.label;
- const labelDisplay = this.props.shouldHideLabel ? 'hidden' : 'block';
- const hintText = this.props.hintText ? this.props.hintText : '';
- return (
- <div className="overflow-hidden">
- <TextField
- id={`address-field-${this.props.label}`}
- disabled={_.isUndefined(this.props.disabled) ? false : this.props.disabled}
- fullWidth={true}
- hintText={hintText}
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey, display: labelDisplay }}
- floatingLabelText={label}
- errorText={this.state.errMsg}
- value={this.state.address}
- onChange={this._onOrderTakerAddressUpdated.bind(this)}
- />
- </div>
- );
- }
- private _onOrderTakerAddressUpdated(e: any): void {
- const address = e.target.value.toLowerCase();
- const isValidAddress = addressUtils.isAddress(address) || address === '';
- const errMsg = isValidAddress ? '' : 'Invalid ethereum address';
- this.setState({
- address,
- errMsg,
- });
- const addressIfValid = isValidAddress ? address : undefined;
- this.props.updateAddress(addressIfValid);
- }
-}
diff --git a/packages/website/ts/components/inputs/allowance_state_toggle.tsx b/packages/website/ts/components/inputs/allowance_state_toggle.tsx
deleted file mode 100644
index 3a78d32f3..000000000
--- a/packages/website/ts/components/inputs/allowance_state_toggle.tsx
+++ /dev/null
@@ -1,160 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { BigNumber, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import { Blockchain } from 'ts/blockchain';
-import { AllowanceState, AllowanceStateView } from 'ts/components/ui/allowance_state_view';
-import { Container } from 'ts/components/ui/container';
-import { PointerDirection } from 'ts/components/ui/pointer';
-import { Text } from 'ts/components/ui/text';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { BalanceErrs, Token, TokenState } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-export interface AllowanceStateToggleProps {
- networkId: number;
- blockchain: Blockchain;
- dispatcher: Dispatcher;
- token: Token;
- tokenState: TokenState;
- userAddress: string;
- onErrorOccurred?: (errType: BalanceErrs) => void;
- refetchTokenStateAsync: () => Promise<void>;
- tooltipDirection?: PointerDirection;
-}
-
-export interface AllowanceStateToggleState {
- allowanceState: AllowanceState;
- prevTokenState: TokenState;
- loadingMessage?: string;
-}
-
-const DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS = new BigNumber(2).pow(256).minus(1);
-
-export class AllowanceStateToggle extends React.Component<AllowanceStateToggleProps, AllowanceStateToggleState> {
- public static defaultProps = {
- onErrorOccurred: _.noop.bind(_),
- tooltipDirection: PointerDirection.Right,
- };
- private static _getAllowanceState(tokenState: TokenState): AllowanceState {
- if (!tokenState.isLoaded) {
- return AllowanceState.Loading;
- }
- if (tokenState.allowance.gt(0)) {
- return AllowanceState.Unlocked;
- }
- return AllowanceState.Locked;
- }
- constructor(props: AllowanceStateToggleProps) {
- super(props);
- const tokenState = props.tokenState;
- this.state = {
- allowanceState: AllowanceStateToggle._getAllowanceState(tokenState),
- prevTokenState: tokenState,
- };
- }
-
- public render(): React.ReactNode {
- const tooltipId = `tooltip-id-${this.props.token.symbol}`;
- return (
- <Container cursor="pointer">
- <ReactTooltip id={tooltipId} effect="solid" offset={{ top: 3 }}>
- {this._getTooltipContent()}
- </ReactTooltip>
- <div
- data-tip={true}
- data-for={tooltipId}
- data-place={this.props.tooltipDirection}
- onClick={this._onToggleAllowanceAsync.bind(this)}
- >
- <AllowanceStateView allowanceState={this.state.allowanceState} />
- </div>
- </Container>
- );
- }
- public componentWillReceiveProps(nextProps: AllowanceStateToggleProps): void {
- const nextTokenState = nextProps.tokenState;
- const prevTokenState = this.state.prevTokenState;
- if (
- !nextTokenState.allowance.eq(prevTokenState.allowance) ||
- nextTokenState.isLoaded !== prevTokenState.isLoaded
- ) {
- const tokenState = nextProps.tokenState;
- this.setState({
- prevTokenState: tokenState,
- allowanceState: AllowanceStateToggle._getAllowanceState(nextTokenState),
- });
- }
- }
- private _getTooltipContent(): React.ReactNode {
- const symbol = this.props.token.symbol;
- switch (this.state.allowanceState) {
- case AllowanceState.Loading:
- return (
- <Text noWrap={true} fontColor={colors.white}>
- {this.state.loadingMessage || 'Loading...'}
- </Text>
- );
- case AllowanceState.Locked:
- return (
- <Text noWrap={true} fontColor={colors.white}>
- Click to enable <b>{symbol}</b> for trading
- </Text>
- );
- case AllowanceState.Unlocked:
- return (
- <Text noWrap={true} fontColor={colors.white}>
- <b>{symbol}</b> is available for trading
- </Text>
- );
- default:
- return null;
- }
- }
- private async _onToggleAllowanceAsync(): Promise<void> {
- // Close all tooltips
- ReactTooltip.hide();
- if (this.props.userAddress === '') {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return;
- }
-
- let newAllowanceAmountInBaseUnits = new BigNumber(0);
- if (!this._isAllowanceSet()) {
- newAllowanceAmountInBaseUnits = DEFAULT_ALLOWANCE_AMOUNT_IN_BASE_UNITS;
- }
- const isUnlockingToken = newAllowanceAmountInBaseUnits.gt(0);
- this.setState({
- allowanceState: AllowanceState.Loading,
- loadingMessage: `${isUnlockingToken ? 'Unlocking' : 'Locking'} ${this.props.token.symbol}`,
- });
- const logData = {
- tokenSymbol: this.props.token.symbol,
- newAllowance: newAllowanceAmountInBaseUnits.toNumber(),
- };
- try {
- await this.props.blockchain.setProxyAllowanceAsync(this.props.token, newAllowanceAmountInBaseUnits);
- analytics.track('Set Allowances Success', logData);
- await this.props.refetchTokenStateAsync();
- } catch (err) {
- analytics.track('Set Allowance Failure', logData);
- this.setState({
- allowanceState: AllowanceStateToggle._getAllowanceState(this.state.prevTokenState),
- });
- const errMsg = `${err}`;
- if (utils.didUserDenyWeb3Request(errMsg)) {
- return;
- }
- logUtils.log(`Unexpected error encountered: ${err}`);
- logUtils.log(err.stack);
- this.props.onErrorOccurred(BalanceErrs.AllowanceSettingFailed);
- errorReporter.report(err);
- }
- }
- private _isAllowanceSet(): boolean {
- return !this.props.tokenState.allowance.eq(0);
- }
-}
diff --git a/packages/website/ts/components/inputs/balance_bounded_input.tsx b/packages/website/ts/components/inputs/balance_bounded_input.tsx
deleted file mode 100644
index 83f263842..000000000
--- a/packages/website/ts/components/inputs/balance_bounded_input.tsx
+++ /dev/null
@@ -1,139 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import TextField from 'material-ui/TextField';
-import * as React from 'react';
-import { RequiredLabel } from 'ts/components/ui/required_label';
-import { ValidatedBigNumberCallback } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-interface BalanceBoundedInputProps {
- label?: string;
- balance: BigNumber;
- amount?: BigNumber;
- hintText?: string;
- onChange: ValidatedBigNumberCallback;
- onErrorMsgChange?: (errorMsg: React.ReactNode) => void;
- shouldShowIncompleteErrs?: boolean;
- shouldCheckBalance: boolean;
- validate?: (amount: BigNumber) => React.ReactNode;
- isDisabled?: boolean;
- shouldShowErrs?: boolean;
- shouldShowUnderline?: boolean;
- inputStyle?: React.CSSProperties;
- inputHintStyle?: React.CSSProperties;
-}
-
-interface BalanceBoundedInputState {
- errMsg: React.ReactNode;
- amountString: string;
-}
-
-export class BalanceBoundedInput extends React.Component<BalanceBoundedInputProps, BalanceBoundedInputState> {
- public static defaultProps: Partial<BalanceBoundedInputProps> = {
- shouldShowIncompleteErrs: false,
- isDisabled: false,
- shouldShowErrs: true,
- hintText: 'amount',
- onErrorMsgChange: _.noop.bind(_),
- shouldShowUnderline: true,
- };
- constructor(props: BalanceBoundedInputProps) {
- super(props);
- const amountString = this.props.amount ? this.props.amount.toString() : '';
- this.state = {
- errMsg: this._validate(amountString, props.balance),
- amountString,
- };
- }
- public componentWillReceiveProps(nextProps: BalanceBoundedInputProps): void {
- if (nextProps === this.props) {
- return;
- }
- const isCurrentAmountNumeric = utils.isNumeric(this.state.amountString);
- if (!_.isUndefined(nextProps.amount)) {
- let shouldResetState = false;
- if (!isCurrentAmountNumeric) {
- shouldResetState = true;
- } else {
- const currentAmount = new BigNumber(this.state.amountString);
- if (!currentAmount.eq(nextProps.amount) || !nextProps.balance.eq(this.props.balance)) {
- shouldResetState = true;
- }
- }
- if (shouldResetState) {
- const amountString = nextProps.amount.toString();
- this._setAmountState(amountString, nextProps.balance);
- }
- } else if (isCurrentAmountNumeric) {
- const amountString = '';
- this._setAmountState(amountString, nextProps.balance);
- }
- }
- public render(): React.ReactNode {
- let errorText;
- if (this.props.shouldShowErrs) {
- errorText =
- this.props.shouldShowIncompleteErrs && this.state.amountString === ''
- ? 'This field is required'
- : this.state.errMsg;
- }
- let label: React.ReactNode | string = '';
- if (!_.isUndefined(this.props.label)) {
- label = <RequiredLabel label={this.props.label} />;
- }
- return (
- <TextField
- fullWidth={true}
- floatingLabelText={label}
- floatingLabelFixed={true}
- floatingLabelStyle={{ color: colors.grey, width: 206 }}
- errorText={errorText}
- value={this.state.amountString}
- hintText={<span style={{ textTransform: 'capitalize' }}>{this.props.hintText}</span>}
- onChange={this._onValueChange.bind(this)}
- underlineStyle={{ width: 'calc(100% + 50px)' }}
- inputStyle={this.props.inputStyle}
- hintStyle={this.props.inputHintStyle}
- underlineShow={this.props.shouldShowUnderline}
- disabled={this.props.isDisabled}
- />
- );
- }
- private _onValueChange(_event: any, amountString: string): void {
- this._setAmountState(amountString, this.props.balance, () => {
- const isValid = _.isUndefined(this._validate(amountString, this.props.balance));
- const isPositiveNumber = utils.isNumeric(amountString) && !_.includes(amountString, '-');
- if (isPositiveNumber) {
- this.props.onChange(isValid, new BigNumber(amountString));
- } else {
- this.props.onChange(isValid);
- }
- });
- }
- private _validate(amountString: string, balance: BigNumber): React.ReactNode {
- if (!utils.isNumeric(amountString)) {
- return amountString !== '' ? 'Must be a number' : '';
- }
- const amount = new BigNumber(amountString);
- if (amount.eq(0)) {
- return 'Cannot be zero';
- }
- if (this.props.shouldCheckBalance && amount.gt(balance)) {
- return <span>Insufficient balance.</span>;
- }
- const errMsg = _.isUndefined(this.props.validate) ? undefined : this.props.validate(amount);
- return errMsg;
- }
- private _setAmountState(amount: string, balance: BigNumber, callback: () => void = _.noop.bind(_)): void {
- const errorMsg = this._validate(amount, balance);
- this.props.onErrorMsgChange(errorMsg);
- this.setState(
- {
- amountString: amount,
- errMsg: errorMsg,
- },
- callback,
- );
- }
-}
diff --git a/packages/website/ts/components/inputs/eth_amount_input.tsx b/packages/website/ts/components/inputs/eth_amount_input.tsx
deleted file mode 100644
index 6799e54bf..000000000
--- a/packages/website/ts/components/inputs/eth_amount_input.tsx
+++ /dev/null
@@ -1,65 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
-import { ValidatedBigNumberCallback } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-interface EthAmountInputProps {
- label?: string;
- balance: BigNumber;
- amount?: BigNumber;
- hintText?: string;
- onChange: ValidatedBigNumberCallback;
- onErrorMsgChange?: (errorMsg: React.ReactNode) => void;
- shouldShowIncompleteErrs: boolean;
- shouldCheckBalance: boolean;
- shouldShowErrs?: boolean;
- shouldShowUnderline?: boolean;
- style?: React.CSSProperties;
- labelStyle?: React.CSSProperties;
- inputHintStyle?: React.CSSProperties;
-}
-
-interface EthAmountInputState {}
-
-export class EthAmountInput extends React.Component<EthAmountInputProps, EthAmountInputState> {
- public static defaultProps: Partial<EthAmountInputProps> = {
- shouldShowErrs: true,
- shouldShowUnderline: true,
- };
- public render(): React.ReactNode {
- const amount = this.props.amount
- ? Web3Wrapper.toUnitAmount(this.props.amount, constants.DECIMAL_PLACES_ETH)
- : undefined;
- return (
- <div className="flex" style={this.props.style}>
- <BalanceBoundedInput
- label={this.props.label}
- balance={this.props.balance}
- amount={amount}
- onChange={this._onChange.bind(this)}
- onErrorMsgChange={this.props.onErrorMsgChange}
- shouldCheckBalance={this.props.shouldCheckBalance}
- shouldShowIncompleteErrs={this.props.shouldShowIncompleteErrs}
- hintText={this.props.hintText}
- shouldShowErrs={this.props.shouldShowErrs}
- shouldShowUnderline={this.props.shouldShowUnderline}
- inputStyle={this.props.style}
- inputHintStyle={this.props.inputHintStyle}
- />
- <div style={this._getLabelStyle()}>ETH</div>
- </div>
- );
- }
- private _onChange(isValid: boolean, amount?: BigNumber): void {
- const baseUnitAmountIfExists = _.isUndefined(amount)
- ? undefined
- : Web3Wrapper.toBaseUnitAmount(amount, constants.DECIMAL_PLACES_ETH);
- this.props.onChange(isValid, baseUnitAmountIfExists);
- }
- private _getLabelStyle(): React.CSSProperties {
- return this.props.labelStyle || { paddingTop: _.isUndefined(this.props.label) ? 15 : 40 };
- }
-}
diff --git a/packages/website/ts/components/inputs/expiration_input.tsx b/packages/website/ts/components/inputs/expiration_input.tsx
deleted file mode 100644
index 3e43c1c07..000000000
--- a/packages/website/ts/components/inputs/expiration_input.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import DatePicker from 'material-ui/DatePicker';
-import TimePicker from 'material-ui/TimePicker';
-import * as moment from 'moment';
-import * as React from 'react';
-import { utils } from 'ts/utils/utils';
-
-interface ExpirationInputProps {
- orderExpiryTimestamp: BigNumber;
- updateOrderExpiry: (unixTimestampSec: BigNumber) => void;
-}
-
-interface ExpirationInputState {
- dateMoment: moment.Moment;
- timeMoment: moment.Moment;
-}
-
-export class ExpirationInput extends React.Component<ExpirationInputProps, ExpirationInputState> {
- private readonly _earliestPickableMoment: moment.Moment;
- constructor(props: ExpirationInputProps) {
- super(props);
- // Set the earliest pickable date to today at 00:00, so users can only pick the current or later dates
- this._earliestPickableMoment = moment().startOf('day');
- const expirationMoment = utils.convertToMomentFromUnixTimestamp(props.orderExpiryTimestamp);
- const initialOrderExpiryTimestamp = utils.initialOrderExpiryUnixTimestampSec();
- const didUserSetExpiry = !initialOrderExpiryTimestamp.eq(props.orderExpiryTimestamp);
- this.state = {
- dateMoment: didUserSetExpiry ? expirationMoment : undefined,
- timeMoment: didUserSetExpiry ? expirationMoment : undefined,
- };
- }
- public render(): React.ReactNode {
- const date = this.state.dateMoment ? this.state.dateMoment.toDate() : undefined;
- const time = this.state.timeMoment ? this.state.timeMoment.toDate() : undefined;
- return (
- <div className="clearfix">
- <div className="col col-6 overflow-hidden pr3 flex relative">
- <DatePicker
- className="overflow-hidden"
- hintText="Date"
- mode="landscape"
- autoOk={true}
- value={date}
- onChange={this._onDateChanged.bind(this)}
- shouldDisableDate={this._shouldDisableDate.bind(this)}
- />
- <div className="absolute" style={{ fontSize: 20, right: 40, top: 13, pointerEvents: 'none' }}>
- <i className="zmdi zmdi-calendar" />
- </div>
- </div>
- <div className="col col-5 overflow-hidden flex relative">
- <TimePicker
- className="overflow-hidden"
- hintText="Time"
- autoOk={true}
- value={time}
- onChange={this._onTimeChanged.bind(this)}
- />
- <div className="absolute" style={{ fontSize: 20, right: 9, top: 13, pointerEvents: 'none' }}>
- <i className="zmdi zmdi-time" />
- </div>
- </div>
- <div onClick={this._clearDates.bind(this)} className="col col-1 pt2" style={{ textAlign: 'right' }}>
- <i style={{ fontSize: 16, cursor: 'pointer' }} className="zmdi zmdi-close" />
- </div>
- </div>
- );
- }
- private _shouldDisableDate(date: Date): boolean {
- return moment(date)
- .startOf('day')
- .isBefore(this._earliestPickableMoment);
- }
- private _clearDates(): void {
- this.setState({
- dateMoment: undefined,
- timeMoment: undefined,
- });
- const defaultDateTime = utils.initialOrderExpiryUnixTimestampSec();
- this.props.updateOrderExpiry(defaultDateTime);
- }
- private _onDateChanged(_event: any, date: Date): void {
- const dateMoment = moment(date);
- this.setState({
- dateMoment,
- });
- const timestamp = utils.convertToUnixTimestampSeconds(dateMoment, this.state.timeMoment);
- this.props.updateOrderExpiry(timestamp);
- }
- private _onTimeChanged(_event: any, time: Date): void {
- const timeMoment = moment(time);
- this.setState({
- timeMoment,
- });
- const dateMoment = _.isUndefined(this.state.dateMoment) ? moment() : this.state.dateMoment;
- const timestamp = utils.convertToUnixTimestampSeconds(dateMoment, timeMoment);
- this.props.updateOrderExpiry(timestamp);
- }
-}
diff --git a/packages/website/ts/components/inputs/hash_input.tsx b/packages/website/ts/components/inputs/hash_input.tsx
deleted file mode 100644
index 7688ffe21..000000000
--- a/packages/website/ts/components/inputs/hash_input.tsx
+++ /dev/null
@@ -1,68 +0,0 @@
-import { assetDataUtils, orderHashUtils } from '@0x/order-utils';
-import { Styles } from '@0x/react-shared';
-import { Order } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-
-import { Blockchain } from 'ts/blockchain';
-import { FakeTextField } from 'ts/components/ui/fake_text_field';
-import { HashData } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-const styles: Styles = {
- textField: {
- overflow: 'hidden',
- paddingTop: 8,
- textOverflow: 'ellipsis',
- whiteSpace: 'nowrap',
- },
-};
-
-interface HashInputProps {
- blockchain: Blockchain;
- blockchainIsLoaded: boolean;
- hashData: HashData;
- label: string;
-}
-
-interface HashInputState {}
-
-export class HashInput extends React.Component<HashInputProps, HashInputState> {
- public render(): React.ReactNode {
- const msgHashHex = this.props.blockchainIsLoaded ? this._generateMessageHashHex() : '';
- return (
- <div>
- <FakeTextField label={this.props.label}>
- <div style={styles.textField} data-tip={true} data-for="hashTooltip">
- {msgHashHex}
- </div>
- </FakeTextField>
- <ReactTooltip id="hashTooltip">{msgHashHex}</ReactTooltip>
- </div>
- );
- }
- private _generateMessageHashHex(): string {
- const exchangeAddress = this.props.blockchain.getExchangeContractAddressIfExists();
- const hashData = this.props.hashData;
- const makerAssetData = assetDataUtils.encodeERC20AssetData(hashData.depositTokenContractAddr);
- const takerAssetData = assetDataUtils.encodeERC20AssetData(hashData.receiveTokenContractAddr);
- const order: Order = {
- senderAddress: constants.NULL_ADDRESS,
- exchangeAddress,
- expirationTimeSeconds: hashData.orderExpiryTimestamp,
- feeRecipientAddress: hashData.feeRecipientAddress,
- makerAddress: _.isEmpty(hashData.orderMakerAddress) ? constants.NULL_ADDRESS : hashData.orderMakerAddress,
- makerFee: hashData.makerFee,
- makerAssetData,
- makerAssetAmount: hashData.depositAmount,
- salt: hashData.orderSalt,
- takerAddress: hashData.orderTakerAddress,
- takerFee: hashData.takerFee,
- takerAssetData,
- takerAssetAmount: hashData.receiveAmount,
- };
- const orderHash = orderHashUtils.getOrderHashHex(order);
- return orderHash;
- }
-}
diff --git a/packages/website/ts/components/inputs/identicon_address_input.tsx b/packages/website/ts/components/inputs/identicon_address_input.tsx
deleted file mode 100644
index 6ba7584a7..000000000
--- a/packages/website/ts/components/inputs/identicon_address_input.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-import * as React from 'react';
-import { AddressInput } from 'ts/components/inputs/address_input';
-import { Identicon } from 'ts/components/ui/identicon';
-import { InputLabel } from 'ts/components/ui/input_label';
-import { RequiredLabel } from 'ts/components/ui/required_label';
-
-interface IdenticonAddressInputProps {
- initialAddress: string;
- isRequired?: boolean;
- label: string;
- updateOrderAddress: (address?: string) => void;
-}
-
-interface IdenticonAddressInputState {
- address: string;
-}
-
-export class IdenticonAddressInput extends React.Component<IdenticonAddressInputProps, IdenticonAddressInputState> {
- constructor(props: IdenticonAddressInputProps) {
- super(props);
- this.state = {
- address: props.initialAddress,
- };
- }
- public render(): React.ReactNode {
- const label = this.props.isRequired ? <RequiredLabel label={this.props.label} /> : this.props.label;
- return (
- <div className="relative" style={{ width: '100%' }}>
- <InputLabel text={label} />
- <div className="flex">
- <div className="col col-1 pb1 pr1" style={{ paddingTop: 13 }}>
- <Identicon address={this.state.address} diameter={26} />
- </div>
- <div className="col col-11 pb1 pl1" style={{ height: 65 }}>
- <AddressInput
- hintText="e.g 0x75bE4F78AA3699B3A348c84bDB2a96c3Db..."
- shouldHideLabel={true}
- initialAddress={this.props.initialAddress}
- updateAddress={this._updateAddress.bind(this)}
- />
- </div>
- </div>
- </div>
- );
- }
- private _updateAddress(address?: string): void {
- this.setState({
- address,
- });
- this.props.updateOrderAddress(address);
- }
-}
diff --git a/packages/website/ts/components/inputs/token_amount_input.tsx b/packages/website/ts/components/inputs/token_amount_input.tsx
deleted file mode 100644
index fded3a9dd..000000000
--- a/packages/website/ts/components/inputs/token_amount_input.tsx
+++ /dev/null
@@ -1,152 +0,0 @@
-import { colors, Link } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { BalanceBoundedInput } from 'ts/components/inputs/balance_bounded_input';
-import { Token, ValidatedBigNumberCallback, WebsitePaths } from 'ts/types';
-
-interface TokenAmountInputProps {
- userAddress: string;
- networkId: number;
- blockchain: Blockchain;
- token: Token;
- label?: string;
- amount?: BigNumber;
- hintText?: string;
- shouldShowIncompleteErrs: boolean;
- shouldCheckBalance: boolean;
- shouldCheckAllowance: boolean;
- onChange: ValidatedBigNumberCallback;
- onErrorMsgChange?: (errorMsg: React.ReactNode) => void;
- lastForceTokenStateRefetch: number;
- shouldShowErrs?: boolean;
- shouldShowUnderline?: boolean;
- style?: React.CSSProperties;
- labelStyle?: React.CSSProperties;
- inputHintStyle?: React.CSSProperties;
-}
-
-interface TokenAmountInputState {
- balance: BigNumber;
- allowance: BigNumber;
- isBalanceAndAllowanceLoaded: boolean;
-}
-
-const HEIGHT_WITH_LABEL = 84;
-const HEIGHT_WITHOUT_LABEL = 62;
-
-export class TokenAmountInput extends React.Component<TokenAmountInputProps, TokenAmountInputState> {
- public static defaultProps: Partial<TokenAmountInputProps> = {
- shouldShowErrs: true,
- shouldShowUnderline: true,
- };
- private _isUnmounted: boolean;
- constructor(props: TokenAmountInputProps) {
- super(props);
- this._isUnmounted = false;
- const defaultAmount = new BigNumber(0);
- this.state = {
- balance: defaultAmount,
- allowance: defaultAmount,
- isBalanceAndAllowanceLoaded: false,
- };
- }
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalanceAndAllowanceAsync(this.props.token.address, this.props.userAddress);
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public componentWillReceiveProps(nextProps: TokenAmountInputProps): void {
- if (
- nextProps.userAddress !== this.props.userAddress ||
- nextProps.networkId !== this.props.networkId ||
- nextProps.token.address !== this.props.token.address ||
- nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch
- ) {
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalanceAndAllowanceAsync(nextProps.token.address, nextProps.userAddress);
- }
- }
- public render(): React.ReactNode {
- const amount = this.props.amount
- ? Web3Wrapper.toUnitAmount(this.props.amount, this.props.token.decimals)
- : undefined;
- return (
- <div className="flex overflow-hidden" style={this._getStyle()}>
- <BalanceBoundedInput
- label={this.props.label}
- amount={amount}
- balance={Web3Wrapper.toUnitAmount(this.state.balance, this.props.token.decimals)}
- onChange={this._onChange.bind(this)}
- onErrorMsgChange={this.props.onErrorMsgChange}
- validate={this._validate.bind(this)}
- shouldCheckBalance={this.props.shouldCheckBalance}
- shouldShowIncompleteErrs={this.props.shouldShowIncompleteErrs}
- isDisabled={!this.state.isBalanceAndAllowanceLoaded}
- hintText={this.props.hintText}
- shouldShowErrs={this.props.shouldShowErrs}
- shouldShowUnderline={this.props.shouldShowUnderline}
- inputStyle={this.props.style}
- inputHintStyle={this.props.inputHintStyle}
- />
- <div style={this._getLabelStyle()}>{this.props.token.symbol}</div>
- </div>
- );
- }
- private _onChange(isValid: boolean, amount?: BigNumber): void {
- let baseUnitAmount;
- if (!_.isUndefined(amount)) {
- baseUnitAmount = Web3Wrapper.toBaseUnitAmount(amount, this.props.token.decimals);
- }
- this.props.onChange(isValid, baseUnitAmount);
- }
- private _validate(amount: BigNumber): React.ReactNode {
- if (this.props.shouldCheckAllowance && amount.gt(this.state.allowance)) {
- return (
- <span>
- Insufficient allowance.{' '}
- <Link
- to={`${WebsitePaths.Portal}/account`}
- textDecoration="underline"
- fontColor={colors.darkestGrey}
- >
- Set allowance
- </Link>
- </span>
- );
- } else {
- return undefined;
- }
- }
- private async _fetchBalanceAndAllowanceAsync(tokenAddress: string, userAddress: string): Promise<void> {
- this.setState({
- isBalanceAndAllowanceLoaded: false,
- });
- const userAddressIfExists = _.isEmpty(userAddress) ? undefined : userAddress;
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- tokenAddress,
- );
- if (!this._isUnmounted) {
- this.setState({
- balance,
- allowance,
- isBalanceAndAllowanceLoaded: true,
- });
- }
- }
- private _getStyle(): React.CSSProperties {
- const hasLabel = !_.isUndefined(this.props.label);
- return !_.isUndefined(this.props.style)
- ? this.props.style
- : { height: hasLabel ? HEIGHT_WITH_LABEL : HEIGHT_WITHOUT_LABEL };
- }
- private _getLabelStyle(): React.CSSProperties {
- const hasLabel = !_.isUndefined(this.props.label);
- return this.props.labelStyle || { paddingTop: hasLabel ? 39 : 14 };
- }
-}
diff --git a/packages/website/ts/components/inputs/token_input.tsx b/packages/website/ts/components/inputs/token_input.tsx
deleted file mode 100644
index c3c2d8b37..000000000
--- a/packages/website/ts/components/inputs/token_input.tsx
+++ /dev/null
@@ -1,103 +0,0 @@
-import { colors } from '@0x/react-shared';
-import Paper from 'material-ui/Paper';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { AssetPicker } from 'ts/components/generate_order/asset_picker';
-import { InputLabel } from 'ts/components/ui/input_label';
-import { TokenIcon } from 'ts/components/ui/token_icon';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { AssetToken, BlockchainErrs, Side, Token, TokenByAddress } from 'ts/types';
-
-const TOKEN_ICON_DIMENSION = 80;
-
-interface TokenInputProps {
- blockchain: Blockchain;
- blockchainErr: BlockchainErrs;
- dispatcher: Dispatcher;
- label: string;
- side: Side;
- networkId: number;
- assetToken: AssetToken;
- updateChosenAssetToken: (side: Side, token: AssetToken) => void;
- tokenByAddress: TokenByAddress;
- userAddress: string;
-}
-
-interface TokenInputState {
- isHoveringIcon: boolean;
- isPickerOpen: boolean;
- trackCandidateTokenIfExists?: Token;
-}
-
-export class TokenInput extends React.Component<TokenInputProps, TokenInputState> {
- constructor(props: TokenInputProps) {
- super(props);
- this.state = {
- isHoveringIcon: false,
- isPickerOpen: false,
- };
- }
- public render(): React.ReactNode {
- const token = this.props.tokenByAddress[this.props.assetToken.address];
- const iconStyles = {
- cursor: 'pointer',
- opacity: this.state.isHoveringIcon ? 0.5 : 1,
- };
- return (
- <div className="relative">
- <div className="pb1">
- <InputLabel text={this.props.label} />
- </div>
- <Paper
- zDepth={1}
- style={{ cursor: 'pointer' }}
- onMouseEnter={this._onToggleHover.bind(this, true)}
- onMouseLeave={this._onToggleHover.bind(this, false)}
- onClick={this._onAssetClicked.bind(this)}
- >
- <div className="mx-auto pt2" style={{ width: TOKEN_ICON_DIMENSION, ...iconStyles }}>
- <TokenIcon token={token} diameter={TOKEN_ICON_DIMENSION} />
- </div>
- <div className="py1 center" style={{ color: colors.grey }}>
- {token.name}
- </div>
- </Paper>
- <AssetPicker
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- dispatcher={this.props.dispatcher}
- isOpen={this.state.isPickerOpen}
- currentTokenAddress={this.props.assetToken.address}
- onTokenChosen={this._onTokenChosen.bind(this)}
- tokenByAddress={this.props.tokenByAddress}
- />
- </div>
- );
- }
- private _onTokenChosen(tokenAddress: string): void {
- const assetToken: AssetToken = {
- address: tokenAddress,
- amount: this.props.assetToken.amount,
- };
- this.props.updateChosenAssetToken(this.props.side, assetToken);
- this.setState({
- isPickerOpen: false,
- });
- }
- private _onToggleHover(isHoveringIcon: boolean): void {
- this.setState({
- isHoveringIcon,
- });
- }
- private _onAssetClicked(): void {
- if (this.props.blockchainErr !== BlockchainErrs.NoError) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return;
- }
-
- this.setState({
- isPickerOpen: true,
- });
- }
-}
diff --git a/packages/website/ts/components/link.tsx b/packages/website/ts/components/link.tsx
deleted file mode 100644
index a66985acc..000000000
--- a/packages/website/ts/components/link.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import { Link as SmartLink } from '@0x/react-shared';
-import * as React from 'react';
-import styled from 'styled-components';
-
-interface LinkInterface {
- color?: string;
- children?: React.ReactNode | string;
- isNoArrow?: boolean;
- hasIcon?: boolean | string;
- isBlock?: boolean;
- isCentered?: boolean;
- href?: string;
- theme?: {
- textColor: string;
- };
- shouldOpenInNewTab?: boolean;
- target?: string;
-}
-
-export const Link = (props: LinkInterface) => {
- const { children, isNoArrow, href } = props;
-
- return (
- <StyledLink to={href} {...props}>
- {children}
- {!isNoArrow && (
- <svg width="25" height="25" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path
- d="M8.484 5.246l.023 1.411 8.147.053L4.817 18.547l.996.996L17.65 7.706l.052 8.146 1.411.024-.068-10.561-10.561-.069z"
- fill="currentColor"
- />
- </svg>
- )}
- </StyledLink>
- );
-};
-
-// Added this, & + & doesnt really work since we switch with element types...
-export const LinkWrap = styled.div`
- a + a,
- a + button,
- button + a {
- margin-left: 20px;
- }
-`;
-
-const StyledLink = styled(SmartLink)<LinkInterface>`
- display: ${props => !props.isBlock && 'inline-flex'};
- color: ${props => props.color || props.theme.linkColor};
- text-align: center;
- font-size: 18px;
- text-decoration: none;
- align-items: center;
-
- @media (max-width: 768px) {
- }
-
- svg {
- margin-left: 3px;
- }
-`;
diff --git a/packages/website/ts/components/logo.tsx b/packages/website/ts/components/logo.tsx
deleted file mode 100644
index f89be0711..000000000
--- a/packages/website/ts/components/logo.tsx
+++ /dev/null
@@ -1,38 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { ThemeInterface } from 'ts/components/siteWrap';
-import LogoIcon from 'ts/icons/logo-with-type.svg';
-
-interface LogoInterface {
- theme?: ThemeInterface;
-}
-
-// Note let's refactor this
-// is it absolutely necessary to have a stateless component
-// to pass props down into the styled icon?
-const StyledLogo = styled.div`
- text-align: left;
- position: relative;
- z-index: 25;
-
- @media (max-width: 800px) {
- svg {
- width: 60px;
- }
- }
-`;
-
-const Icon = styled(LogoIcon)<LogoInterface>`
- flex-shrink: 0;
-
- path {
- fill: ${props => props.theme.textColor};
- }
-`;
-
-export const Logo: React.StatelessComponent<LogoInterface> = (props: LogoInterface) => (
- <StyledLogo>
- <Icon {...props} />
- </StyledLogo>
-);
diff --git a/packages/website/ts/components/meta_tags.tsx b/packages/website/ts/components/meta_tags.tsx
deleted file mode 100644
index f6c43d23f..000000000
--- a/packages/website/ts/components/meta_tags.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as React from 'react';
-import { Helmet } from 'react-helmet';
-
-export interface MetaTagsProps {
- title: string;
- description: string;
- imgSrc?: string;
-}
-
-export const MetaTags: React.StatelessComponent<MetaTagsProps> = ({ title, description, imgSrc }) => (
- <Helmet>
- <title>{title}</title>
- <meta name="description" content={description} />
- <meta property="og:title" content={title} />
- <meta property="og:description" content={description} />
- <meta property="og:type" content="website" />
- <meta property="og:image" content={imgSrc} />
- <meta name="twitter:site" content="@0xproject" />
- <meta name="twitter:image" content={imgSrc} />
- </Helmet>
-);
-
-MetaTags.defaultProps = {
- imgSrc: '/images/og_image.png',
-};
diff --git a/packages/website/ts/components/mobileNav.tsx b/packages/website/ts/components/mobileNav.tsx
deleted file mode 100644
index d43bbe50e..000000000
--- a/packages/website/ts/components/mobileNav.tsx
+++ /dev/null
@@ -1,112 +0,0 @@
-import * as React from 'react';
-import MediaQuery from 'react-responsive';
-import styled from 'styled-components';
-
-import { Link } from 'react-router-dom';
-
-import { WrapGrid, WrapProps } from 'ts/components/newLayout';
-import { WebsitePaths } from 'ts/types';
-
-interface Props {
- isToggled: boolean;
- toggleMobileNav: () => void;
-}
-
-export class MobileNav extends React.PureComponent<Props> {
- public render(): React.ReactNode {
- const { isToggled, toggleMobileNav } = this.props;
-
- return (
- <MediaQuery maxWidth={800}>
- <Wrap isToggled={isToggled}>
- <Section>
- <h4>Products</h4>
-
- <ul>
- <li>
- <Link to={WebsitePaths.Instant}>0x Instant</Link>
- </li>
- <li>
- <Link to={WebsitePaths.LaunchKit}>0x Launch Kit</Link>
- </li>
- </ul>
- </Section>
-
- <Section isDark={true}>
- <Grid as="ul" isFullWidth={true} isWrapped={true}>
- <li>
- <Link to={WebsitePaths.Why}>Why 0x</Link>
- </li>
- <li>
- <Link to={WebsitePaths.AboutMission}>About</Link>
- </li>
- <li>
- <a href="https://blog.0xproject.com/latest" target="_blank">
- Blog
- </a>
- </li>
- </Grid>
- </Section>
-
- {isToggled && <Overlay onClick={toggleMobileNav} />}
- </Wrap>
- </MediaQuery>
- );
- }
-}
-
-const Wrap = styled.nav<{ isToggled: boolean }>`
- width: 100%;
- height: 357px;
- background-color: ${props => props.theme.mobileNavBgUpper};
- color: ${props => props.theme.mobileNavColor};
- transition: ${props => (props.isToggled ? 'visibility 0s, transform 0.5s' : 'visibility 0s 0.5s, transform 0.5s')};
- transform: translate3d(0, ${props => (props.isToggled ? 0 : '-100%')}, 0);
- visibility: ${props => !props.isToggled && 'hidden'};
- position: fixed;
- display: flex;
- flex-direction: column;
- justify-content: flex-end;
- z-index: 20;
- top: 0;
- left: 0;
- font-size: 20px;
-
- a {
- padding: 15px 0;
- display: block;
- color: inherit;
- }
-
- h4 {
- font-size: 14px;
- opacity: 0.5;
- }
-`;
-
-const Overlay = styled.div`
- position: absolute;
- width: 100vw;
- height: 100vh;
- top: 100%;
- background: transparent;
- cursor: pointer;
-`;
-
-interface SectionProps {
- isDark?: boolean;
-}
-const Section = styled.div<SectionProps>`
- width: 100%;
- padding: 15px 30px;
- background-color: ${props => (props.isDark ? props.theme.mobileNavBgLower : 'transparent')};
-`;
-
-const Grid = styled(WrapGrid)<WrapProps>`
- justify-content: flex-start;
-
- li {
- width: 50%;
- flex-shrink: 0;
- }
-`;
diff --git a/packages/website/ts/components/modals/input.tsx b/packages/website/ts/components/modals/input.tsx
deleted file mode 100644
index c72e53aa0..000000000
--- a/packages/website/ts/components/modals/input.tsx
+++ /dev/null
@@ -1,92 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-export enum InputWidth {
- Half,
- Full,
-}
-
-interface InputProps {
- name: string;
- width?: InputWidth;
- label: string;
- type?: string;
- errors?: ErrorProps;
- isErrors?: boolean;
- required?: boolean;
-}
-
-interface ErrorProps {
- [key: string]: string;
-}
-
-export const Input = React.forwardRef((props: InputProps, ref?: React.Ref<HTMLInputElement>) => {
- const { name, label, type, errors } = props;
- const id = `input-${name}`;
- const componentType = type === 'textarea' ? 'textarea' : 'input';
- const isErrors = errors.hasOwnProperty(name) && errors[name] !== null;
- const errorMessage = isErrors ? errors[name] : null;
-
- return (
- <InputWrapper {...props}>
- <Label htmlFor={id}>{label}</Label>
- <StyledInput as={componentType} ref={ref} id={id} isErrors={isErrors} {...props} />
- {isErrors && <Error>{errorMessage}</Error>}
- </InputWrapper>
- );
-});
-
-Input.defaultProps = {
- width: InputWidth.Full,
- errors: {},
-};
-
-const StyledInput = styled.input`
- appearance: none;
- background-color: #fff;
- border: 1px solid #d5d5d5;
- color: #000;
- font-size: 1.294117647rem;
- padding: 16px 15px 14px;
- outline: none;
- width: 100%;
- min-height: ${props => props.type === 'textarea' && `120px`};
-
- background-color: ${(props: InputProps) => props.isErrors && `#FDEDED`};
- border-color: ${(props: InputProps) => props.isErrors && `#FD0000`};
-
- &::placeholder {
- color: #c3c3c3;
- }
-`;
-
-const InputWrapper = styled.div<InputProps>`
- position: relative;
- flex-grow: ${props => props.width === InputWidth.Full && 1};
- width: ${props => props.width === InputWidth.Half && `calc(50% - 15px)`};
-
- @media (max-width: 768px) {
- width: 100%;
- margin-bottom: 30px;
- }
-`;
-
-const Label = styled.label`
- color: #000;
- font-size: 1.111111111rem;
- line-height: 1.4em;
- margin-bottom: 10px;
- display: inline-block;
-`;
-
-const Error = styled.span`
- color: #fd0000;
- font-size: 0.833333333rem;
- line-height: 1em;
- display: inline-block;
- position: absolute;
- bottom: 0;
- left: 0;
- width: 100%;
- transform: translateY(24px);
-`;
diff --git a/packages/website/ts/components/modals/modal_contact.tsx b/packages/website/ts/components/modals/modal_contact.tsx
deleted file mode 100644
index 62c1062a3..000000000
--- a/packages/website/ts/components/modals/modal_contact.tsx
+++ /dev/null
@@ -1,390 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { DialogContent, DialogOverlay } from '@reach/dialog';
-import '@reach/dialog/styles.css';
-
-import { Button } from 'ts/components/button';
-import { Icon } from 'ts/components/icon';
-import { Input, InputWidth } from 'ts/components/modals/input';
-import { Heading, Paragraph } from 'ts/components/text';
-import { GlobalStyle } from 'ts/constants/globalStyle';
-import { utils } from 'ts/utils/utils';
-
-export enum ModalContactType {
- General = 'GENERAL',
- MarketMaker = 'MARKET_MAKER',
-}
-
-interface Props {
- theme?: GlobalStyle;
- isOpen?: boolean;
- onDismiss?: () => void;
- modalContactType: ModalContactType;
-}
-
-interface FormProps {
- isSuccessful?: boolean;
- isSubmitting?: boolean;
-}
-
-interface ErrorResponseProps {
- param: string;
- location: string;
- msg: string;
-}
-
-interface ErrorResponse {
- errors: ErrorResponseProps[];
-}
-
-interface ErrorProps {
- [key: string]: string;
-}
-
-export class ModalContact extends React.Component<Props> {
- public static defaultProps = {
- modalContactType: ModalContactType.General,
- };
- public state = {
- isSubmitting: false,
- isSuccessful: false,
- errors: {},
- };
- // shared fields
- public nameRef: React.RefObject<HTMLInputElement> = React.createRef();
- public emailRef: React.RefObject<HTMLInputElement> = React.createRef();
- public companyProjectRef: React.RefObject<HTMLInputElement> = React.createRef();
- public commentsRef: React.RefObject<HTMLInputElement> = React.createRef();
- // general lead fields
- public linkRef: React.RefObject<HTMLInputElement> = React.createRef();
- // market maker lead fields
- public countryRef: React.RefObject<HTMLInputElement> = React.createRef();
- public fundSizeRef: React.RefObject<HTMLInputElement> = React.createRef();
- public constructor(props: Props) {
- super(props);
- }
- public render(): React.ReactNode {
- const { isOpen, onDismiss } = this.props;
- const { isSuccessful, errors } = this.state;
- return (
- <>
- <DialogOverlay
- style={{ background: 'rgba(0, 0, 0, 0.75)', zIndex: 30 }}
- isOpen={isOpen}
- onDismiss={onDismiss}
- >
- <StyledDialogContent>
- <Form onSubmit={this._onSubmitAsync.bind(this)} isSuccessful={isSuccessful}>
- <Heading color={colors.textDarkPrimary} size={34} asElement="h2">
- Contact the 0x Core Team
- </Heading>
- {this._renderFormContent(errors)}
- <ButtonRow>
- <Button
- color="#5C5C5C"
- isNoBorder={true}
- isTransparent={true}
- type="button"
- onClick={this.props.onDismiss}
- >
- Back
- </Button>
- <Button>Submit</Button>
- </ButtonRow>
- </Form>
- <Confirmation isSuccessful={isSuccessful}>
- <Icon name="rocketship" size="large" margin={[0, 0, 'default', 0]} />
- <Heading color={colors.textDarkPrimary} size={34} asElement="h2">
- Thanks for contacting us.
- </Heading>
- <Paragraph isMuted={true} color={colors.textDarkPrimary}>
- We'll get back to you soon. If you need quick support in the meantime, reach out to the
- 0x team on Discord.
- </Paragraph>
- <Button onClick={this.props.onDismiss}>Done</Button>
- </Confirmation>
- </StyledDialogContent>
- </DialogOverlay>
- </>
- );
- }
- public _renderFormContent(errors: ErrorProps): React.ReactNode {
- switch (this.props.modalContactType) {
- case ModalContactType.MarketMaker:
- return this._renderMarketMakerFormContent(errors);
- case ModalContactType.General:
- default:
- return this._renderGeneralFormContent(errors);
- }
- }
- private _renderMarketMakerFormContent(errors: ErrorProps): React.ReactNode {
- return (
- <>
- <Paragraph isMuted={true} color={colors.textDarkPrimary}>
- If you’re considering market making on 0x, we’re happy to answer your questions. Fill out the form
- so we can connect you with the right person to help you get started.
- </Paragraph>
- <InputRow>
- <Input
- name="name"
- label="Your name"
- type="text"
- width={InputWidth.Half}
- ref={this.nameRef}
- required={true}
- errors={errors}
- />
- <Input
- name="email"
- label="Your email"
- type="email"
- ref={this.emailRef}
- required={true}
- errors={errors}
- width={InputWidth.Half}
- />
- </InputRow>
- <InputRow>
- <Input
- name="country"
- label="Country of Location"
- type="text"
- ref={this.countryRef}
- required={true}
- errors={errors}
- />
- </InputRow>
- <InputRow>
- <Input
- name="fundSize"
- label="Fund Size"
- type="text"
- ref={this.fundSizeRef}
- required={true}
- errors={errors}
- />
- </InputRow>
- <InputRow>
- <Input
- name="companyOrProject"
- label="Name of your project / company"
- type="text"
- ref={this.companyProjectRef}
- required={false}
- errors={errors}
- />
- </InputRow>
- <InputRow>
- <Input
- name="comments"
- label="What is prompting you to reach out?"
- type="textarea"
- ref={this.commentsRef}
- required={false}
- errors={errors}
- />
- </InputRow>
- </>
- );
- }
- private _renderGeneralFormContent(errors: ErrorProps): React.ReactNode {
- return (
- <>
- <Paragraph isMuted={true} color={colors.textDarkPrimary}>
- If you're considering building on 0x, we're happy to answer your questions. Fill out the form so we
- can connect you with the right person to help you get started.
- </Paragraph>
- <InputRow>
- <Input
- name="name"
- label="Your name"
- type="text"
- width={InputWidth.Half}
- ref={this.nameRef}
- required={true}
- errors={errors}
- />
- <Input
- name="email"
- label="Your email"
- type="email"
- ref={this.emailRef}
- required={true}
- errors={errors}
- width={InputWidth.Half}
- />
- </InputRow>
- <InputRow>
- <Input
- name="companyOrProject"
- label="Name of your project / company"
- type="text"
- ref={this.companyProjectRef}
- required={true}
- errors={errors}
- />
- </InputRow>
- <InputRow>
- <Input
- name="link"
- label="Do you have any documentation or a website?"
- type="text"
- ref={this.linkRef}
- errors={errors}
- />
- </InputRow>
- <InputRow>
- <Input
- name="comments"
- label="Anything else?"
- type="textarea"
- ref={this.commentsRef}
- errors={errors}
- />
- </InputRow>
- </>
- );
- }
- private async _onSubmitAsync(e: Event): Promise<void> {
- e.preventDefault();
-
- let jsonBody;
- if (this.props.modalContactType === ModalContactType.MarketMaker) {
- jsonBody = {
- name: this.nameRef.current.value,
- email: this.emailRef.current.value,
- country: this.countryRef.current.value,
- fundSize: this.fundSizeRef.current.value,
- projectOrCompany: this.companyProjectRef.current.value,
- comments: this.commentsRef.current.value,
- };
- } else {
- jsonBody = {
- name: this.nameRef.current.value,
- email: this.emailRef.current.value,
- projectOrCompany: this.companyProjectRef.current.value,
- link: this.linkRef.current.value,
- comments: this.commentsRef.current.value,
- };
- }
-
- this.setState({ ...this.state, errors: [], isSubmitting: true });
-
- const endpoint =
- this.props.modalContactType === ModalContactType.MarketMaker ? '/market_maker_leads' : '/leads';
-
- try {
- // Disabling no-unbound method b/c no reason for _.isEmpty to be bound
- // tslint:disable:no-unbound-method
- const response = await fetch(`${utils.getBackendBaseUrl()}${endpoint}`, {
- method: 'post',
- mode: 'cors',
- credentials: 'same-origin',
- headers: {
- 'content-type': 'application/json; charset=utf-8',
- },
- body: JSON.stringify(_.omitBy(jsonBody, _.isEmpty)),
- });
-
- if (!response.ok) {
- const errorResponse: ErrorResponse = await response.json();
- const errors = this._parseErrors(errorResponse.errors);
- this.setState({ ...this.state, isSubmitting: false, errors });
-
- throw new Error('Request failed');
- }
-
- this.setState({ ...this.state, isSuccessful: true });
- } catch (e) {
- // Empty block
- }
- }
- private _parseErrors(errors: ErrorResponseProps[]): ErrorProps {
- const initialValue: {} = {};
- return _.reduce(
- errors,
- (hash: ErrorProps, error: ErrorResponseProps) => {
- const { param, msg } = error;
- const key = param;
- hash[key] = msg;
-
- return hash;
- },
- initialValue,
- );
- }
-}
-
-// Handle errors: {"errors":[{"location":"body","param":"name","msg":"Invalid value"},{"location":"body","param":"email","msg":"Invalid value"}]}
-
-const InputRow = styled.div`
- width: 100%;
- flex: 0 0 auto;
-
- @media (min-width: 768px) {
- display: flex;
- justify-content: space-between;
- margin-bottom: 30px;
- }
-`;
-
-const ButtonRow = styled(InputRow)`
- @media (max-width: 768px) {
- display: flex;
- flex-direction: column;
-
- button:nth-child(1) {
- order: 2;
- }
-
- button:nth-child(2) {
- order: 1;
- margin-bottom: 10px;
- }
- }
-`;
-
-const StyledDialogContent = styled(DialogContent)`
- position: relative;
- max-width: 800px;
- background-color: #f6f6f6 !important;
- padding: 60px 60px !important;
-
- @media (max-width: 768px) {
- width: calc(100vw - 40px) !important;
- margin: 40px auto !important;
- padding: 30px 30px !important;
- }
-`;
-
-const Form = styled.form<FormProps>`
- position: relative;
- transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
-
- opacity: ${props => props.isSuccessful && `0`};
- visibility: ${props => props.isSuccessful && `hidden`};
-`;
-
-const Confirmation = styled.div<FormProps>`
- position: absolute;
- top: 50%;
- text-align: center;
- width: 100%;
- left: 0;
- transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
- transition-delay: 0.4s;
- padding: 60px 60px;
- transform: translateY(-50%);
- opacity: ${props => (props.isSuccessful ? `1` : `0`)};
- visibility: ${props => (props.isSuccessful ? 'visible' : `hidden`)};
-
- p {
- max-width: 492px;
- margin-left: auto;
- margin-right: auto;
- }
-`;
diff --git a/packages/website/ts/components/nested_sidebar_menu.tsx b/packages/website/ts/components/nested_sidebar_menu.tsx
deleted file mode 100644
index 56df880f3..000000000
--- a/packages/website/ts/components/nested_sidebar_menu.tsx
+++ /dev/null
@@ -1,101 +0,0 @@
-import { ALink, colors, Link, utils as sharedUtils } from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Button } from 'ts/components/ui/button';
-import { Text } from 'ts/components/ui/text';
-import { ScreenWidths } from 'ts/types';
-
-export interface NestedSidebarMenuProps {
- sectionNameToLinks: ObjectMap<ALink[]>;
- sidebarHeader?: React.ReactNode;
- shouldReformatMenuItemNames?: boolean;
- screenWidth: ScreenWidths;
-}
-
-export const NestedSidebarMenu = (props: NestedSidebarMenuProps) => {
- const navigation = _.map(props.sectionNameToLinks, (links: ALink[], sectionName: string) => {
- const finalSectionName = sharedUtils.convertCamelCaseToSpaces(sectionName);
- const menuItems = _.map(links, (link, i) => {
- const menuItemTitle = props.shouldReformatMenuItemNames
- ? _.capitalize(sharedUtils.convertDashesToSpaces(link.title))
- : link.title;
- const finalLink = {
- ...link,
- title: menuItemTitle,
- };
- return <MenuItem key={`menu-item-${menuItemTitle}`} link={finalLink} screenWidth={props.screenWidth} />;
- });
- // tslint:disable-next-line:no-unused-variable
- return (
- <div key={`section-${sectionName}`} className="py1" style={{ color: colors.greyTheme }}>
- <Text fontSize="14px" letterSpacing="0.5" className="py1 pl1">
- {finalSectionName.toUpperCase()}
- </Text>
- {menuItems}
- </div>
- );
- });
- return (
- <div>
- {props.sidebarHeader}
- <div>{navigation}</div>
- </div>
- );
-};
-
-export interface MenuItemProps {
- link: ALink;
- screenWidth: ScreenWidths;
-}
-
-export interface MenuItemState {
- isActive: boolean;
-}
-
-export class MenuItem extends React.Component<MenuItemProps, MenuItemState> {
- constructor(props: MenuItemProps) {
- super(props);
- const isActive = window.location.hash.slice(1) === props.link.to;
- this.state = {
- isActive,
- };
- }
- public render(): React.ReactNode {
- const isActive = this.state.isActive;
- return (
- <Link
- to={this.props.link.to}
- shouldOpenInNewTab={this.props.link.shouldOpenInNewTab}
- onActivityChanged={this._onActivityChanged.bind(this)}
- >
- <Button
- borderRadius="4px"
- padding="0.4em 0.375em"
- width="100%"
- backgroundColor={
- isActive
- ? colors.lightLinkBlue
- : this.props.screenWidth === ScreenWidths.Sm
- ? 'white'
- : colors.grey100
- }
- fontSize="14px"
- textAlign="left"
- >
- <Text
- fontWeight={isActive ? 'bold' : 'normal'}
- fontColor={isActive ? colors.white : colors.grey800}
- >
- {this.props.link.title}
- </Text>
- </Button>
- </Link>
- );
- }
- private _onActivityChanged(isActive: boolean): void {
- this.setState({
- isActive,
- });
- }
-}
diff --git a/packages/website/ts/components/newLayout.tsx b/packages/website/ts/components/newLayout.tsx
deleted file mode 100644
index 07691a02a..000000000
--- a/packages/website/ts/components/newLayout.tsx
+++ /dev/null
@@ -1,134 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-export interface WrapProps {
- bgColor?: string;
- id?: string;
- offsetTop?: string;
- maxWidth?: string;
- wrapWidth?: string;
- isFullWidth?: boolean;
- isTextCentered?: boolean;
- isCentered?: boolean;
- isWrapped?: boolean;
-}
-
-export interface WrapGridProps {
- isWrapped?: boolean;
- isCentered?: boolean;
-}
-
-export interface WrapStickyProps {
- offsetTop?: string;
-}
-
-export interface SectionProps extends WrapProps {
- isPadded?: boolean;
- isFullWidth?: boolean;
- isFlex?: boolean;
- padding?: string;
- paddingMobile?: string;
- flexBreakpoint?: string;
- maxWidth?: string;
- bgColor?: 'dark' | 'light' | string;
- children: any;
-}
-
-export interface FlexProps {
- padding?: string;
- isFlex?: boolean;
- flexBreakpoint?: string;
-}
-
-export interface ColumnProps {
- padding?: string;
- width?: string;
- maxWidth?: string;
-}
-
-export const Section: React.FunctionComponent<SectionProps> = (props: SectionProps) => {
- return (
- <SectionBase {...props}>
- <Wrap {...props}>{props.children}</Wrap>
- </SectionBase>
- );
-};
-
-export const Column = styled.div<ColumnProps>`
- width: ${props => props.width};
- max-width: ${props => props.maxWidth};
- padding: ${props => props.padding};
-
- @media (max-width: 768px) {
- width: 100%;
-
- & + & {
- margin-top: 60px;
- }
- }
-`;
-
-export const FlexWrap = styled.div<FlexProps>`
- max-width: 1500px;
- margin: 0 auto;
- padding: ${props => props.padding};
-
- @media (min-width: ${props => props.flexBreakpoint || '768px'}) {
- display: ${props => props.isFlex && 'flex'};
- justify-content: ${props => props.isFlex && 'space-between'};
- }
-`;
-
-export const WrapSticky = styled.div<WrapProps>`
- position: sticky;
- top: ${props => props.offsetTop || '60px'};
-`;
-
-const SectionBase = styled.section<SectionProps>`
- width: ${props => !props.isFullWidth && 'calc(100% - 60px)'};
- max-width: 1500px;
- margin: 0 auto;
- padding: ${props => props.isPadded && '120px 0'};
- background-color: ${props => props.theme[`${props.bgColor}BgColor`] || props.bgColor};
- position: relative;
- overflow: ${props => !props.isFullWidth && 'hidden'};
-
- @media (max-width: 768px) {
- padding: ${props => props.isPadded && (props.paddingMobile || '40px 0')};
- }
-`;
-
-const Wrap = styled(FlexWrap)<WrapProps>`
- width: ${props => props.wrapWidth || 'calc(100% - 60px)'};
- width: ${props => props.bgColor && 'calc(100% - 60px)'};
- max-width: ${props => !props.isFullWidth && (props.maxWidth || '895px')};
- text-align: ${props => props.isTextCentered && 'center'};
- margin: 0 auto;
-`;
-
-export const WrapGrid = styled(Wrap)<WrapProps>`
- display: flex;
- flex-wrap: ${props => props.isWrapped && `wrap`};
- justify-content: ${props => (props.isCentered ? `center` : 'space-between')};
-
- @media (max-width: 768px) {
- width: 100%;
- }
-`;
-
-Section.defaultProps = {
- isPadded: true,
-};
-
-FlexWrap.defaultProps = {
- isFlex: true,
-};
-
-WrapGrid.defaultProps = {
- isCentered: true,
- isFullWidth: true,
-};
-
-Wrap.defaultProps = {
- isFlex: false,
-};
diff --git a/packages/website/ts/components/newsletter_form.tsx b/packages/website/ts/components/newsletter_form.tsx
deleted file mode 100644
index e5fd95646..000000000
--- a/packages/website/ts/components/newsletter_form.tsx
+++ /dev/null
@@ -1,191 +0,0 @@
-import * as React from 'react';
-import styled, { withTheme } from 'styled-components';
-
-import { ThemeValuesInterface } from 'ts/components/siteWrap';
-import { colors } from 'ts/style/colors';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-interface FormProps {
- theme: ThemeValuesInterface;
-}
-
-interface InputProps {
- isSubmitted: boolean;
- name: string;
- type: string;
- label: string;
- textColor: string;
- required?: boolean;
-}
-
-interface ArrowProps {
- isSubmitted: boolean;
-}
-
-const Input = React.forwardRef((props: InputProps, ref: React.Ref<HTMLInputElement>) => {
- const { name, label, type } = props;
- const id = `input-${name}`;
-
- return (
- <InnerInputWrapper {...props}>
- <label className="visuallyHidden" htmlFor={id}>
- {label}
- </label>
- <StyledInput ref={ref} id={id} placeholder={label} type={type || 'text'} {...props} />
- </InnerInputWrapper>
- );
-});
-
-class Form extends React.Component<FormProps> {
- public emailInput = React.createRef<HTMLInputElement>();
- public state = {
- isSubmitted: false,
- };
- public render(): React.ReactNode {
- const { isSubmitted } = this.state;
- const { theme } = this.props;
-
- return (
- <StyledForm onSubmit={this._onSubmitAsync.bind(this)}>
- <InputWrapper>
- <Input
- isSubmitted={isSubmitted}
- name="email"
- type="email"
- label="Email Address"
- ref={this.emailInput}
- required={true}
- textColor={theme.textColor}
- />
-
- <SubmitButton>
- <Arrow
- isSubmitted={isSubmitted}
- width="22"
- height="17"
- fill="none"
- xmlns="http://www.w3.org/2000/svg"
- >
- <path
- d="M13.066 0l-1.068 1.147 6.232 6.557H0v1.592h18.23l-6.232 6.557L13.066 17l8.08-8.5-8.08-8.5z"
- fill="#CBCBCB"
- />
- </Arrow>
- </SubmitButton>
- <SuccessText isSubmitted={isSubmitted}>🎉 Thank you for signing up!</SuccessText>
- </InputWrapper>
- <Text>Subscribe to our newsletter for updates in the 0x ecosystem</Text>
- </StyledForm>
- );
- }
-
- private async _onSubmitAsync(e: React.FormEvent<HTMLFormElement>): Promise<void> {
- e.preventDefault();
-
- const email = this.emailInput.current.value;
- const referrer = 'https://0x.org/';
-
- this.setState({ isSubmitted: true });
-
- if (email === 'triggererror@0xproject.org') {
- throw new Error('Manually triggered error');
- }
-
- try {
- await fetch(`${utils.getBackendBaseUrl()}/newsletter_subscriber/substack`, {
- method: 'post',
- mode: 'cors',
- headers: {
- 'content-type': 'application/json; charset=utf-8',
- },
- body: JSON.stringify({ email, referrer }),
- });
- } catch (e) {
- errorReporter.report(e);
- }
- }
-}
-
-export const NewsletterForm = withTheme(Form);
-
-const StyledForm = styled.form`
- appearance: none;
- border: 0;
- color: ${colors.white};
- padding: 13px 0 14px;
- margin-top: 27px;
-`;
-
-const StyledInput = styled.input<InputProps>`
- appearance: none;
- background-color: transparent;
- border: 0;
- border-bottom: 1px solid #393939;
- color: ${props => props.textColor || '#fff'};
- font-size: 1.294117647rem;
- padding: 15px 0;
- outline: none;
- width: 100%;
-
- &::placeholder {
- color: #b1b1b1; // #9D9D9D on light theme
- }
-`;
-
-const InputWrapper = styled.div`
- position: relative;
-`;
-
-const InnerInputWrapper = styled.div<ArrowProps>`
- opacity: ${props => props.isSubmitted && 0};
- visibility: ${props => props.isSubmitted && 'hidden'};
- transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
- transition-delay: 0.3s;
-`;
-
-const SubmitButton = styled.button`
- width: 44px;
- height: 44px;
- background-color: transparent;
- border: 0;
- position: absolute;
- right: 0;
- top: calc(50% - 22px);
- overflow: hidden;
- outline: 0;
-
- &:focus-within {
- //background-color: #eee;
- }
-`;
-
-const Text = styled.p`
- color: #656565;
- font-size: 0.833333333rem;
- font-weight: 300;
- line-height: 1.2em;
- margin-top: 15px;
-`;
-
-const SuccessText = styled.p<ArrowProps>`
- color: #b1b1b1;
- font-size: 1rem;
- font-weight: 300;
- line-height: 1.2em;
- padding-top: 25px;
- position: absolute;
- left: 0;
- top: 0;
- text-align: left;
- right: 50px;
- opacity: ${props => (props.isSubmitted ? 1 : 0)};
- visibility: ${props => (props.isSubmitted ? 'visible' : 'hidden')};
- transition: opacity 0.25s ease-in-out, visibility 0.25s ease-in-out;
- transition-delay: 0.55s;
-`;
-
-const Arrow = styled.svg<ArrowProps>`
- transform: ${props => props.isSubmitted && `translateX(44px)`};
- transition: transform 0.25s ease-in-out;
-`;
diff --git a/packages/website/ts/components/old_footer.tsx b/packages/website/ts/components/old_footer.tsx
deleted file mode 100644
index 6366bf4ea..000000000
--- a/packages/website/ts/components/old_footer.tsx
+++ /dev/null
@@ -1,228 +0,0 @@
-import { ALink, colors, Link } from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import DropDownMenu from 'material-ui/DropDownMenu';
-import MenuItem from 'material-ui/MenuItem';
-import * as React from 'react';
-
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Deco, Key, Language, WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-const ICON_DIMENSION = 16;
-
-const languageToMenuTitle = {
- [Language.English]: 'English',
- [Language.Russian]: 'Русский',
- [Language.Spanish]: 'Español',
- [Language.Korean]: '한국어',
- [Language.Chinese]: '中文',
-};
-
-export interface FooterProps {
- translate: Translate;
- dispatcher: Dispatcher;
- backgroundColor?: string;
-}
-
-interface FooterState {
- selectedLanguage: Language;
-}
-
-export class Footer extends React.Component<FooterProps, FooterState> {
- public static defaultProps = {
- backgroundColor: colors.darkerGrey,
- };
- constructor(props: FooterProps) {
- super(props);
- this.state = {
- selectedLanguage: props.translate.getLanguage(),
- };
- }
- public render(): React.ReactNode {
- const sectionNameToLinks: ObjectMap<ALink[]> = {
- [Key.Documentation]: [
- {
- title: 'Developer Home',
- to: WebsitePaths.Docs,
- },
- {
- title: '0x.js',
- to: WebsitePaths.ZeroExJs,
- },
- {
- title: this.props.translate.get(Key.SmartContracts, Deco.Cap),
- to: WebsitePaths.SmartContracts,
- },
- {
- title: this.props.translate.get(Key.Connect, Deco.Cap),
- to: WebsitePaths.Connect,
- },
- {
- title: this.props.translate.get(Key.Whitepaper, Deco.Cap),
- to: WebsitePaths.Whitepaper,
- shouldOpenInNewTab: true,
- },
- {
- title: this.props.translate.get(Key.Wiki, Deco.Cap),
- to: WebsitePaths.Wiki,
- },
- ],
- [Key.Community]: [
- {
- title: this.props.translate.get(Key.Discord, Deco.Cap),
- to: constants.URL_ZEROEX_CHAT,
- shouldOpenInNewTab: true,
- },
- {
- title: this.props.translate.get(Key.Blog, Deco.Cap),
- to: constants.URL_BLOG,
- shouldOpenInNewTab: true,
- },
- {
- title: 'Twitter',
- to: constants.URL_TWITTER,
- shouldOpenInNewTab: true,
- },
- {
- title: 'Reddit',
- to: constants.URL_REDDIT,
- shouldOpenInNewTab: true,
- },
- {
- title: this.props.translate.get(Key.Forum, Deco.Cap),
- to: constants.URL_DISCOURSE_FORUM,
- shouldOpenInNewTab: true,
- },
- ],
- [Key.Organization]: [
- {
- title: this.props.translate.get(Key.About, Deco.Cap),
- to: WebsitePaths.About,
- },
- {
- title: this.props.translate.get(Key.Careers, Deco.Cap),
- to: WebsitePaths.Careers,
- },
- {
- title: this.props.translate.get(Key.Contact, Deco.Cap),
- to: 'mailto:team@0x.org',
- shouldOpenInNewTab: true,
- },
- ],
- };
- const languageMenuItems = _.map(languageToMenuTitle, (menuTitle: string, language: Language) => {
- return <MenuItem key={menuTitle} value={language} primaryText={menuTitle} />;
- });
- return (
- <div className="relative pb4 pt2" style={{ backgroundColor: this.props.backgroundColor }}>
- <div className="mx-auto max-width-4 md-px2 lg-px0 py4 clearfix" style={{ color: colors.white }}>
- <div className="col lg-col-4 md-col-4 col-12 left">
- <div className="sm-mx-auto" style={{ width: 148 }}>
- <div>
- <img src="/images/protocol_logo_white.png" height="30" />
- </div>
- <div
- style={{
- fontSize: 11,
- color: colors.grey,
- paddingLeft: 37,
- paddingTop: 2,
- }}
- >
- © ZeroEx, Intl.
- </div>
- <div className="pt4 center">
- <DropDownMenu
- labelStyle={{ color: colors.white }}
- value={this.state.selectedLanguage}
- onChange={this._updateLanguage.bind(this)}
- >
- {languageMenuItems}
- </DropDownMenu>
- </div>
- </div>
- </div>
- <div className="col lg-col-8 md-col-8 col-12 lg-pl4 md-pl4">
- <div className="col lg-col-4 md-col-4 col-12">
- <div className="lg-right md-right sm-center">
- {this._renderHeader(Key.Documentation)}
- {_.map(sectionNameToLinks[Key.Documentation], this._renderMenuItem.bind(this))}
- </div>
- </div>
- <div className="col lg-col-4 md-col-4 col-12 lg-pr2 md-pr2">
- <div className="lg-right md-right sm-center">
- {this._renderHeader(Key.Community)}
- {_.map(sectionNameToLinks[Key.Community], this._renderMenuItem.bind(this))}
- </div>
- </div>
- <div className="col lg-col-4 md-col-4 col-12">
- <div className="lg-right md-right sm-center">
- {this._renderHeader(Key.Organization)}
- {_.map(sectionNameToLinks[Key.Organization], this._renderMenuItem.bind(this))}
- </div>
- </div>
- </div>
- </div>
- </div>
- );
- }
- private _renderIcon(fileName: string): React.ReactNode {
- return (
- <div style={{ height: ICON_DIMENSION, width: ICON_DIMENSION }}>
- <img src={`/images/social/${fileName}`} style={{ width: ICON_DIMENSION }} />
- </div>
- );
- }
- private _renderMenuItem(link: ALink): React.ReactNode {
- const titleToIcon: { [title: string]: string } = {
- [this.props.translate.get(Key.Discord, Deco.Cap)]: 'discord.png',
- [this.props.translate.get(Key.Blog, Deco.Cap)]: 'medium.png',
- Twitter: 'twitter.png',
- Reddit: 'reddit.png',
- [this.props.translate.get(Key.Forum, Deco.Cap)]: 'discourse.png',
- };
- const iconIfExists = titleToIcon[link.title];
- return (
- <div key={link.title} className="sm-center" style={{ fontSize: 13, paddingTop: 25 }}>
- <Link
- to={link.to}
- shouldOpenInNewTab={link.shouldOpenInNewTab}
- fontColor={colors.white}
- className="text-decoration-none"
- >
- <div>
- {!_.isUndefined(iconIfExists) ? (
- <div className="inline-block">
- <div className="pr1 table-cell">{this._renderIcon(iconIfExists)}</div>
- <div className="table-cell">{link.title}</div>
- </div>
- ) : (
- link.title
- )}
- </div>
- </Link>
- </div>
- );
- }
- private _renderHeader(key: Key): React.ReactNode {
- const headerStyle = {
- color: colors.grey400,
- letterSpacing: 2,
- fontFamily: 'Roboto Mono',
- fontSize: 13,
- };
- return (
- <div className="lg-pb2 md-pb2 sm-pt4" style={headerStyle}>
- {this.props.translate.get(key, Deco.Upper)}
- </div>
- );
- }
- private _updateLanguage(_event: any, _index: number, value: Language): void {
- this.setState({
- selectedLanguage: value,
- });
- this.props.dispatcher.updateSelectedLanguage(value);
- }
-}
diff --git a/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx b/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx
deleted file mode 100644
index 1d21e5a85..000000000
--- a/packages/website/ts/components/onboarding/add_eth_onboarding_step.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as React from 'react';
-import { Balance } from 'ts/components/ui/balance';
-import { Container } from 'ts/components/ui/container';
-import { Image } from 'ts/components/ui/image';
-import { Text } from 'ts/components/ui/text';
-import { constants } from 'ts/utils/constants';
-
-export interface AddEthOnboardingStepProps {
- userEthBalanceInWei: BigNumber;
-}
-
-export const AddEthOnboardingStep: React.StatelessComponent<AddEthOnboardingStepProps> = props =>
- props.userEthBalanceInWei.gt(0) ? (
- <div className="flex items-center flex-column">
- <Text>
- Great! Looks like you already have{' '}
- <Balance
- amount={props.userEthBalanceInWei}
- decimals={constants.DECIMAL_PLACES_ETH}
- symbol={constants.ETHER_SYMBOL}
- />{' '}
- in your wallet.
- </Text>
- <Container marginTop="15px" marginBottom="15px">
- <Image src="/images/ether_alt.svg" height="50px" width="50px" />
- </Container>
- </div>
- ) : (
- <div className="flex items-center flex-column">
- <Text> Before you begin you will need to send some ETH to your wallet.</Text>
- <Container marginTop="15px" marginBottom="15px">
- <Image src="/images/ether_alt.svg" height="50px" width="50px" />
- </Container>
- <Text className="xs-hide">
- Click on the <Image src="/images/metamask_icon.png" height="20px" width="20px" /> MetaMask extension in
- your browser and click either <b>BUY</b> or <b>DEPOSIT</b>.
- </Text>
- </div>
- );
diff --git a/packages/website/ts/components/onboarding/congrats_onboarding_step.tsx b/packages/website/ts/components/onboarding/congrats_onboarding_step.tsx
deleted file mode 100644
index 8100fd2c0..000000000
--- a/packages/website/ts/components/onboarding/congrats_onboarding_step.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-
-export interface CongratsOnboardingStepProps {}
-
-export const CongratsOnboardingStep: React.StatelessComponent<CongratsOnboardingStepProps> = () => (
- <div className="flex items-center flex-column">
- <Text>Your wallet is now set up for trading. Use it on any relayer in the 0x ecosystem.</Text>
- <Container marginTop="25px" marginBottom="15px" className="flex justify-center">
- <img src="/images/zrx_ecosystem.svg" height="150px" />
- </Container>
- <Text>No need to log in. Each relayer automatically detects and connects to your wallet.</Text>
- </div>
-);
diff --git a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx b/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx
deleted file mode 100644
index 173ba9a97..000000000
--- a/packages/website/ts/components/onboarding/install_wallet_onboarding_step.tsx
+++ /dev/null
@@ -1,42 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Image } from 'ts/components/ui/image';
-import { Text } from 'ts/components/ui/text';
-import { utils } from 'ts/utils/utils';
-
-export interface InstallWalletOnboardingStepProps {}
-
-export const InstallWalletOnboardingStep: React.StatelessComponent<InstallWalletOnboardingStepProps> = () => {
- const [downloadLink, isOnMobile] = utils.getBestWalletDownloadLinkAndIsMobile();
- const followupText = isOnMobile
- ? `Please revisit this site in your mobile dApp browser to continue!`
- : `Please refresh the page once you've done this to continue!`;
- const downloadText = isOnMobile ? 'Get Coinbase Wallet' : 'Get the MetaMask extension';
- return (
- <div className="flex items-center flex-column">
- <Text>First, you need to connect to a wallet. This will be used across all 0x relayers and dApps.</Text>
- <Container className="flex items-center" marginTop="15px" marginBottom="15px">
- <Image
- height="50px"
- width="50px"
- borderRadius="22%"
- src={isOnMobile ? '/images/coinbase_wallet_logo.png' : '/images/metamask_icon.png'}
- />
- <Container marginLeft="10px">
- <a href={downloadLink} target="_blank">
- <Text
- fontWeight={700}
- fontSize="18px"
- fontColor={colors.mediumBlue}
- textDecorationLine="underline"
- >
- {downloadText}
- </Text>
- </a>
- </Container>
- </Container>
- <Text>{followupText}</Text>
- </div>
- );
-};
diff --git a/packages/website/ts/components/onboarding/intro_onboarding_step.tsx b/packages/website/ts/components/onboarding/intro_onboarding_step.tsx
deleted file mode 100644
index f9ced7315..000000000
--- a/packages/website/ts/components/onboarding/intro_onboarding_step.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Image } from 'ts/components/ui/image';
-import { Text } from 'ts/components/ui/text';
-
-export interface IntroOnboardingStepProps {}
-
-export const IntroOnboardingStep: React.StatelessComponent<IntroOnboardingStepProps> = () => (
- <div className="flex items-center flex-column">
- <Text>
- In order to start trading on any 0x relayer in the 0x ecosystem, you need to complete three simple steps.
- </Text>
- <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-around">
- <div className="flex flex-column items-center">
- <Image src="/images/ether.png" height="50px" width="50px" />
- <Text> Add ETH </Text>
- </div>
- <div className="flex flex-column items-center">
- <Image src="/images/eth_token.svg" height="50px" width="50x" />
- <Text> Wrap ETH </Text>
- </div>
- <div className="flex flex-column items-center">
- <Container marginBottom="9px">
- <Image src="/images/lock_icon.svg" height="35px" width="35x" />
- </Container>
- <Text> Unlock tokens </Text>
- </div>
- </Container>
- </div>
-);
diff --git a/packages/website/ts/components/onboarding/onboarding_card.tsx b/packages/website/ts/components/onboarding/onboarding_card.tsx
deleted file mode 100644
index 384bf7154..000000000
--- a/packages/website/ts/components/onboarding/onboarding_card.tsx
+++ /dev/null
@@ -1,115 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-
-import * as _ from 'lodash';
-import { Button } from 'ts/components/ui/button';
-import { Container } from 'ts/components/ui/container';
-import { IconButton } from 'ts/components/ui/icon_button';
-import { Island } from 'ts/components/ui/island';
-import { Text, Title } from 'ts/components/ui/text';
-
-export type ContinueButtonDisplay = 'enabled' | 'disabled';
-
-export interface OnboardingCardProps {
- title?: string;
- shouldCenterTitle?: boolean;
- content: React.ReactNode;
- isLastStep: boolean;
- onClose: () => void;
- onClickNext: () => void;
- onClickBack: () => void;
- onContinueButtonClick?: () => void;
- continueButtonDisplay?: ContinueButtonDisplay;
- shouldHideBackButton?: boolean;
- shouldHideNextButton?: boolean;
- continueButtonText?: string;
- borderRadius?: string;
- // Used for super-custom content.
- shouldRemoveExtraSpacing?: boolean;
-}
-
-export const OnboardingCard: React.StatelessComponent<OnboardingCardProps> = ({
- title,
- shouldCenterTitle,
- content,
- continueButtonDisplay,
- continueButtonText,
- onContinueButtonClick,
- onClickNext,
- onClickBack,
- onClose,
- shouldHideBackButton,
- shouldHideNextButton,
- borderRadius,
- shouldRemoveExtraSpacing,
-}) => {
- const padding = shouldRemoveExtraSpacing
- ? {}
- : {
- paddingRight: '30px',
- paddingLeft: '30px',
- paddingTop: '15px',
- paddingBottom: '15px',
- };
- const closeIconPositioning = shouldRemoveExtraSpacing
- ? { right: '15px', bottom: '3px' }
- : { bottom: '20px', left: '15px' };
- return (
- <Island borderRadius={borderRadius}>
- <Container {...padding}>
- <div className="flex flex-column">
- <Container className="flex justify-between">
- <Container width="100%">
- <Title center={shouldCenterTitle}>{title}</Title>
- </Container>
- <Container position="relative" {...closeIconPositioning}>
- <IconButton color={colors.grey} iconName="zmdi-close" onClick={onClose}>
- Close
- </IconButton>
- </Container>
- </Container>
- <Container marginBottom={shouldRemoveExtraSpacing ? undefined : '15px'}>
- <Text>{content}</Text>
- </Container>
- {continueButtonDisplay && (
- <Button
- isDisabled={continueButtonDisplay === 'disabled'}
- onClick={!_.isUndefined(onContinueButtonClick) ? onContinueButtonClick : onClickNext}
- fontColor={colors.white}
- fontSize="15px"
- backgroundColor={colors.mediumBlue}
- >
- {continueButtonText}
- </Button>
- )}
- {!(shouldHideBackButton && shouldHideNextButton) && (
- <Container className="clearfix" marginTop="15px">
- <div className="left">
- {!shouldHideBackButton && (
- <Text fontColor={colors.grey} onClick={onClickBack}>
- Back
- </Text>
- )}
- </div>
- <div className="right">
- {!shouldHideNextButton && (
- <Text fontColor={colors.grey} onClick={onClickNext}>
- Skip
- </Text>
- )}
- </div>
- </Container>
- )}
- </div>
- </Container>
- </Island>
- );
-};
-
-OnboardingCard.defaultProps = {
- continueButtonText: 'Continue',
- shouldCenterTitle: false,
- shouldRemoveExtraSpacing: false,
-};
-
-OnboardingCard.displayName = 'OnboardingCard';
diff --git a/packages/website/ts/components/onboarding/onboarding_flow.tsx b/packages/website/ts/components/onboarding/onboarding_flow.tsx
deleted file mode 100644
index ec1b5bc42..000000000
--- a/packages/website/ts/components/onboarding/onboarding_flow.tsx
+++ /dev/null
@@ -1,182 +0,0 @@
-import * as React from 'react';
-import { Placement, Popper, PopperChildrenProps } from 'react-popper';
-
-import { OnboardingCard } from 'ts/components/onboarding/onboarding_card';
-import {
- ContinueButtonDisplay,
- OnboardingTooltip,
- TooltipPointerDisplay,
-} from 'ts/components/onboarding/onboarding_tooltip';
-import { Container } from 'ts/components/ui/container';
-import { EaseUpFromBottomAnimation } from 'ts/components/ui/ease_up_from_bottom_animation';
-import { Overlay } from 'ts/components/ui/overlay';
-import { zIndex } from 'ts/style/z_index';
-
-export interface FixedPositionSettings {
- type: 'fixed';
- top?: string;
- bottom?: string;
- left?: string;
- right?: string;
- tooltipPointerDisplay?: TooltipPointerDisplay;
-}
-
-export interface TargetPositionSettings {
- type: 'target';
- target: string;
- placement: Placement;
-}
-
-export interface Step {
- // Provide either a CSS selector, or fixed position settings. Only applies to desktop.
- position: TargetPositionSettings | FixedPositionSettings;
- title?: string;
- shouldCenterTitle?: boolean;
- content: React.ReactNode;
- shouldHideBackButton?: boolean;
- shouldHideNextButton?: boolean;
- continueButtonDisplay?: ContinueButtonDisplay;
- continueButtonText?: string;
- onContinueButtonClick?: () => void;
- // Only used for very custom steps.
- shouldRemoveExtraSpacing?: boolean;
-}
-
-export interface OnboardingFlowProps {
- steps: Step[];
- stepIndex: number;
- isRunning: boolean;
- onClose: () => void;
- updateOnboardingStep: (stepIndex: number) => void;
- disableOverlay?: boolean;
- isMobile: boolean;
- disableCloseOnClickOutside?: boolean;
-}
-
-export class OnboardingFlow extends React.Component<OnboardingFlowProps> {
- public static defaultProps = {
- disableOverlay: false,
- isMobile: false,
- disableCloseOnClickOutside: false,
- };
- public render(): React.ReactNode {
- if (!this.props.isRunning) {
- return null;
- }
- let onboardingElement = null;
- const currentStep = this._getCurrentStep();
- if (this.props.isMobile) {
- onboardingElement = <EaseUpFromBottomAnimation>{this._renderOnboardingCard()}</EaseUpFromBottomAnimation>;
- } else if (currentStep.position.type === 'target') {
- const { placement, target } = currentStep.position;
- onboardingElement = (
- <Popper referenceElement={document.querySelector(target)} placement={placement} positionFixed={true}>
- {this._renderPopperChildren.bind(this)}
- </Popper>
- );
- } else if (currentStep.position.type === 'fixed') {
- const { top, right, bottom, left, tooltipPointerDisplay } = currentStep.position;
- onboardingElement = (
- <Container
- position="fixed"
- zIndex={zIndex.aboveOverlay}
- top={top}
- right={right}
- bottom={bottom}
- left={left}
- >
- {this._renderToolTip(tooltipPointerDisplay)}
- </Container>
- );
- }
- if (this.props.disableOverlay) {
- return onboardingElement;
- }
- return (
- <div>
- <Overlay onClick={this.props.disableCloseOnClickOutside ? undefined : this.props.onClose} />
- {onboardingElement}
- </div>
- );
- }
- private _renderPopperChildren(props: PopperChildrenProps): React.ReactNode {
- const customStyles = { zIndex: zIndex.aboveOverlay };
- // On re-render, we want to re-center the popper.
- props.scheduleUpdate();
- return (
- <div ref={props.ref} style={{ ...props.style, ...customStyles }} data-placement={props.placement}>
- {this._renderToolTip()}
- </div>
- );
- }
- private _renderToolTip(tooltipPointerDisplay?: TooltipPointerDisplay): React.ReactNode {
- const { steps, stepIndex } = this.props;
- const step = steps[stepIndex];
- const isLastStep = steps.length - 1 === stepIndex;
- return (
- <Container marginLeft="30px" width="400px">
- <OnboardingTooltip
- title={step.title}
- shouldCenterTitle={step.shouldCenterTitle}
- content={step.content}
- isLastStep={isLastStep}
- shouldHideBackButton={step.shouldHideBackButton}
- shouldHideNextButton={step.shouldHideNextButton}
- onClose={this.props.onClose}
- onClickNext={this._goToNextStep.bind(this)}
- onClickBack={this._goToPrevStep.bind(this)}
- continueButtonDisplay={step.continueButtonDisplay}
- continueButtonText={step.continueButtonText}
- onContinueButtonClick={step.onContinueButtonClick}
- pointerDisplay={tooltipPointerDisplay}
- shouldRemoveExtraSpacing={step.shouldRemoveExtraSpacing}
- />
- </Container>
- );
- }
-
- private _renderOnboardingCard(): React.ReactNode {
- const { steps, stepIndex } = this.props;
- const step = steps[stepIndex];
- const isLastStep = steps.length - 1 === stepIndex;
- return (
- <Container position="relative" zIndex={1}>
- <OnboardingCard
- title={step.title}
- shouldCenterTitle={step.shouldCenterTitle}
- content={step.content}
- isLastStep={isLastStep}
- shouldHideBackButton={step.shouldHideBackButton}
- shouldHideNextButton={step.shouldHideNextButton}
- onClose={this.props.onClose}
- onClickNext={this._goToNextStep.bind(this)}
- onClickBack={this._goToPrevStep.bind(this)}
- continueButtonDisplay={step.continueButtonDisplay}
- continueButtonText={step.continueButtonText}
- onContinueButtonClick={step.onContinueButtonClick}
- borderRadius="10px 10px 0px 0px"
- shouldRemoveExtraSpacing={step.shouldRemoveExtraSpacing}
- />
- </Container>
- );
- }
- private _getCurrentStep(): Step {
- return this.props.steps[this.props.stepIndex];
- }
- private _goToNextStep(): void {
- const nextStep = this.props.stepIndex + 1;
- if (nextStep < this.props.steps.length) {
- this.props.updateOnboardingStep(nextStep);
- } else {
- this.props.onClose();
- }
- }
- private _goToPrevStep(): void {
- const nextStep = this.props.stepIndex - 1;
- if (nextStep >= 0) {
- this.props.updateOnboardingStep(nextStep);
- } else {
- this.props.onClose();
- }
- }
-}
diff --git a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx b/packages/website/ts/components/onboarding/onboarding_tooltip.tsx
deleted file mode 100644
index ff5f0bab6..000000000
--- a/packages/website/ts/components/onboarding/onboarding_tooltip.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from 'react';
-
-import { OnboardingCard, OnboardingCardProps } from 'ts/components/onboarding/onboarding_card';
-import { Pointer, PointerDirection } from 'ts/components/ui/pointer';
-
-export type ContinueButtonDisplay = 'enabled' | 'disabled';
-export type TooltipPointerDisplay = PointerDirection | 'none';
-
-export interface OnboardingTooltipProps extends OnboardingCardProps {
- className?: string;
- pointerDisplay?: TooltipPointerDisplay;
-}
-
-export const OnboardingTooltip: React.StatelessComponent<OnboardingTooltipProps> = props => {
- const { pointerDisplay, className, ...cardProps } = props;
- const card = <OnboardingCard {...cardProps} />;
- if (pointerDisplay === 'none') {
- return card;
- }
- return (
- <Pointer className={className} direction={pointerDisplay}>
- <OnboardingCard {...cardProps} />
- </Pointer>
- );
-};
-OnboardingTooltip.defaultProps = {
- pointerDisplay: PointerDirection.Left,
-};
-
-OnboardingTooltip.displayName = 'OnboardingTooltip';
diff --git a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx b/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
deleted file mode 100644
index 6adcec0b1..000000000
--- a/packages/website/ts/components/onboarding/portal_onboarding_flow.tsx
+++ /dev/null
@@ -1,281 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { RouteComponentProps, withRouter } from 'react-router';
-
-import { BigNumber } from '@0x/utils';
-import { Blockchain } from 'ts/blockchain';
-import { AddEthOnboardingStep } from 'ts/components/onboarding/add_eth_onboarding_step';
-import { CongratsOnboardingStep } from 'ts/components/onboarding/congrats_onboarding_step';
-import { InstallWalletOnboardingStep } from 'ts/components/onboarding/install_wallet_onboarding_step';
-import { IntroOnboardingStep } from 'ts/components/onboarding/intro_onboarding_step';
-import {
- FixedPositionSettings,
- OnboardingFlow,
- Step,
- TargetPositionSettings,
-} from 'ts/components/onboarding/onboarding_flow';
-import { SetAllowancesOnboardingStep } from 'ts/components/onboarding/set_allowances_onboarding_step';
-import { UnlockWalletOnboardingStep } from 'ts/components/onboarding/unlock_wallet_onboarding_step';
-import {
- WrapEthOnboardingStep1,
- WrapEthOnboardingStep2,
- WrapEthOnboardingStep3,
-} from 'ts/components/onboarding/wrap_eth_onboarding_step';
-import { AllowanceStateToggle } from 'ts/containers/inputs/allowance_state_toggle';
-import { BrowserType, ProviderType, ScreenWidths, Token, TokenByAddress, TokenStateByAddress } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { utils } from 'ts/utils/utils';
-
-export interface PortalOnboardingFlowProps extends RouteComponentProps<any> {
- networkId: number;
- blockchain: Blockchain;
- stepIndex: number;
- isRunning: boolean;
- userAddress: string;
- hasBeenClosed: boolean;
- providerType: ProviderType;
- injectedProviderName: string;
- blockchainIsLoaded: boolean;
- userEtherBalanceInWei?: BigNumber;
- tokenByAddress: TokenByAddress;
- trackedTokenStateByAddress: TokenStateByAddress;
- updateIsRunning: (isRunning: boolean) => void;
- updateOnboardingStep: (stepIndex: number) => void;
- refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
- screenWidth: ScreenWidths;
-}
-
-class PlainPortalOnboardingFlow extends React.Component<PortalOnboardingFlowProps> {
- private _unlisten: () => void;
- public componentDidMount(): void {
- this._adjustStepIfShould();
- // If there is a route change, just close onboarding.
- this._unlisten = this.props.history.listen(() => this.props.updateIsRunning(false));
- }
- public componentWillUnmount(): void {
- this._unlisten();
- }
- public componentDidUpdate(prevProps: PortalOnboardingFlowProps): void {
- // Any one of steps 0-3 could be the starting step, and we only want to reset the scroll on the starting step.
- if (this.props.isRunning && utils.isMobileWidth(this.props.screenWidth) && this.props.stepIndex < 3) {
- // On mobile, make sure the wallet is completely visible.
- document.querySelector('.wallet').scrollIntoView();
- }
- this._adjustStepIfShould();
- if (!prevProps.blockchainIsLoaded && this.props.blockchainIsLoaded) {
- this._autoStartOnboardingIfShould();
- }
- }
- public render(): React.ReactNode {
- const browserType = utils.getBrowserType();
- return (
- <OnboardingFlow
- steps={this._getSteps()}
- stepIndex={this.props.stepIndex}
- isRunning={this.props.isRunning}
- onClose={this._closeOnboarding.bind(this)}
- updateOnboardingStep={this._updateOnboardingStep.bind(this)}
- disableOverlay={this.props.screenWidth === ScreenWidths.Sm}
- isMobile={this.props.screenWidth === ScreenWidths.Sm}
- // This is necessary to ensure onboarding stays open once the user unlocks metamask and clicks away
- disableCloseOnClickOutside={browserType === BrowserType.Firefox || browserType === BrowserType.Opera}
- />
- );
- }
- private _getSteps(): Step[] {
- const nextToWalletPosition: TargetPositionSettings = {
- type: 'target',
- target: '.wallet',
- placement: 'right',
- };
- const underMetamaskExtension: FixedPositionSettings = {
- type: 'fixed',
- top: '10px',
- right: '10px',
- tooltipPointerDisplay: 'none',
- };
- const steps: Step[] = [
- {
- position: nextToWalletPosition,
- title: '0x Ecosystem Setup',
- content: <InstallWalletOnboardingStep />,
- shouldHideBackButton: true,
- shouldHideNextButton: true,
- },
- {
- position: underMetamaskExtension,
- title: 'Please Unlock Metamask...',
- content: <UnlockWalletOnboardingStep />,
- shouldHideBackButton: true,
- shouldHideNextButton: true,
- shouldCenterTitle: true,
- shouldRemoveExtraSpacing: true,
- },
- {
- position: nextToWalletPosition,
- title: '0x Ecosystem Account Setup',
- content: <IntroOnboardingStep />,
- shouldHideBackButton: true,
- continueButtonDisplay: 'enabled',
- },
- {
- position: nextToWalletPosition,
- title: 'Step 1: Add ETH',
- content: (
- <AddEthOnboardingStep userEthBalanceInWei={this.props.userEtherBalanceInWei || new BigNumber(0)} />
- ),
- continueButtonDisplay: this._userHasVisibleEth() ? 'enabled' : 'disabled',
- },
- {
- position: nextToWalletPosition,
- title: 'Step 2: Wrap ETH',
- content: <WrapEthOnboardingStep1 />,
- continueButtonDisplay: 'enabled',
- },
- {
- position: nextToWalletPosition,
- title: 'Step 2: Wrap ETH',
- content: <WrapEthOnboardingStep2 />,
- continueButtonDisplay: this._userHasVisibleWeth() ? 'enabled' : 'disabled',
- },
- {
- position: nextToWalletPosition,
- title: 'Step 2: Wrap ETH',
- content: <WrapEthOnboardingStep3 wethAmount={this._getWethBalance()} />,
- continueButtonDisplay: this._userHasVisibleWeth() ? 'enabled' : 'disabled',
- },
- {
- position: nextToWalletPosition,
- title: 'Step 3: Unlock Tokens',
- content: (
- <SetAllowancesOnboardingStep
- zrxAllowanceToggle={this._renderZrxAllowanceStateToggle()}
- ethAllowanceToggle={this._renderEthAllowanceStateToggle()}
- doesUserHaveAllowancesForWethAndZrx={this._doesUserHaveAllowancesForWethAndZrx()}
- />
- ),
- continueButtonDisplay: this._doesUserHaveAllowancesForWethAndZrx() ? 'enabled' : 'disabled',
- },
- {
- position: nextToWalletPosition,
- title: '🎉 The Ecosystem Awaits',
- content: <CongratsOnboardingStep />,
- continueButtonDisplay: 'enabled',
- shouldHideNextButton: true,
- continueButtonText: 'Enter the 0x Ecosystem',
- onContinueButtonClick: this._handleFinalStepContinueClick.bind(this),
- },
- ];
- return steps;
- }
- private _isAddressAvailable(): boolean {
- return !_.isEmpty(this.props.userAddress);
- }
- private _userHasVisibleEth(): boolean {
- return this.props.userEtherBalanceInWei > new BigNumber(0);
- }
- private _getWethBalance(): BigNumber {
- const ethToken = utils.getEthToken(this.props.tokenByAddress);
- if (!ethToken) {
- return new BigNumber(0);
- }
- const ethTokenState = this.props.trackedTokenStateByAddress[ethToken.address];
- return ethTokenState.balance;
- }
- private _userHasVisibleWeth(): boolean {
- return this._getWethBalance() > new BigNumber(0);
- }
- private _doesUserHaveAllowancesForWethAndZrx(): boolean {
- const ethToken = utils.getEthToken(this.props.tokenByAddress);
- const zrxToken = utils.getZrxToken(this.props.tokenByAddress);
- if (ethToken && zrxToken) {
- const ethTokenState = this.props.trackedTokenStateByAddress[ethToken.address];
- const zrxTokenState = this.props.trackedTokenStateByAddress[zrxToken.address];
- if (ethTokenState && zrxTokenState) {
- return ethTokenState.allowance.gt(0) && zrxTokenState.allowance.gt(0);
- }
- }
- return false;
- }
- private _adjustStepIfShould(): void {
- const stepIndex = this.props.stepIndex;
- if (this._isAddressAvailable()) {
- if (stepIndex < 2) {
- this.props.updateOnboardingStep(2);
- }
- return;
- }
- const isExternallyInjected = utils.isExternallyInjected(
- this.props.providerType,
- this.props.injectedProviderName,
- );
- if (isExternallyInjected) {
- if (stepIndex !== 1) {
- this.props.updateOnboardingStep(1);
- }
- return;
- }
- if (stepIndex !== 0) {
- this.props.updateOnboardingStep(0);
- }
- }
- private _autoStartOnboardingIfShould(): void {
- if (
- (this.props.stepIndex === 0 && !this.props.isRunning && this.props.blockchainIsLoaded) ||
- (!this.props.isRunning && !this.props.hasBeenClosed && this.props.blockchainIsLoaded)
- ) {
- analytics.track('Onboarding Started', {
- reason: 'automatic',
- stepIndex: this.props.stepIndex,
- });
- this.props.updateIsRunning(true);
- }
- }
- private _updateOnboardingStep(stepIndex: number): void {
- this.props.updateOnboardingStep(stepIndex);
- analytics.track('Update Onboarding Step', {
- stepIndex,
- });
- }
- private _closeOnboarding(): void {
- this.props.updateIsRunning(false);
- analytics.track('Onboarding Closed', {
- stepIndex: this.props.stepIndex,
- });
- }
- private _renderZrxAllowanceStateToggle(): React.ReactNode {
- const zrxToken = utils.getZrxToken(this.props.tokenByAddress);
- return this._renderAllowanceStateToggle(zrxToken);
- }
- private _renderEthAllowanceStateToggle(): React.ReactNode {
- const ethToken = utils.getEthToken(this.props.tokenByAddress);
- return this._renderAllowanceStateToggle(ethToken);
- }
- private _renderAllowanceStateToggle(token: Token): React.ReactNode {
- if (!token) {
- return null;
- }
- const tokenStateIfExists = this.props.trackedTokenStateByAddress[token.address];
- if (_.isUndefined(tokenStateIfExists)) {
- return null;
- }
- return (
- <AllowanceStateToggle
- token={token}
- tokenState={tokenStateIfExists}
- blockchain={this.props.blockchain}
- // tslint:disable-next-line:jsx-no-lambda
- refetchTokenStateAsync={async () => this.props.refetchTokenStateAsync(token.address)}
- />
- );
- }
- private _handleFinalStepContinueClick(): void {
- if (utils.isMobileWidth(this.props.screenWidth)) {
- window.scrollTo(0, 0);
- this.props.history.push('/portal');
- }
- this._closeOnboarding();
- }
-}
-
-export const PortalOnboardingFlow = withRouter(PlainPortalOnboardingFlow);
diff --git a/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx b/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx
deleted file mode 100644
index 5ddfe38d7..000000000
--- a/packages/website/ts/components/onboarding/set_allowances_onboarding_step.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-
-export interface SetAllowancesOnboardingStepProps {
- zrxAllowanceToggle: React.ReactNode;
- ethAllowanceToggle: React.ReactNode;
- doesUserHaveAllowancesForWethAndZrx: boolean;
-}
-
-export const SetAllowancesOnboardingStep: React.StatelessComponent<SetAllowancesOnboardingStepProps> = ({
- ethAllowanceToggle,
- zrxAllowanceToggle,
- doesUserHaveAllowancesForWethAndZrx,
-}) => (
- <div className="flex items-center flex-column">
- <Text>Unlock your tokens for trading. You only need to do this once for each token.</Text>
- <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-around">
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> Enable WETH </Text>
- <Container marginTop="10px">{ethAllowanceToggle}</Container>
- </div>
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> Enable ZRX </Text>
- <Container marginTop="10px">{zrxAllowanceToggle}</Container>
- </div>
- </Container>
- {doesUserHaveAllowancesForWethAndZrx && <Text>Perfect! Both your ZRX and WETH tokens are unlocked.</Text>}
- </div>
-);
diff --git a/packages/website/ts/components/onboarding/unlock_wallet_onboarding_step.tsx b/packages/website/ts/components/onboarding/unlock_wallet_onboarding_step.tsx
deleted file mode 100644
index 358141520..000000000
--- a/packages/website/ts/components/onboarding/unlock_wallet_onboarding_step.tsx
+++ /dev/null
@@ -1,8 +0,0 @@
-import * as React from 'react';
-import { Image } from 'ts/components/ui/image';
-
-export interface UnlockWalletOnboardingStepProps {}
-
-export const UnlockWalletOnboardingStep: React.StatelessComponent<UnlockWalletOnboardingStepProps> = () => (
- <Image src="/images/unlock-mm.png" />
-);
diff --git a/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx b/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx
deleted file mode 100644
index 37eef867b..000000000
--- a/packages/website/ts/components/onboarding/wrap_eth_onboarding_step.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import * as React from 'react';
-import { Balance } from 'ts/components/ui/balance';
-import { Container } from 'ts/components/ui/container';
-import { IconButton } from 'ts/components/ui/icon_button';
-import { Text } from 'ts/components/ui/text';
-import { constants } from 'ts/utils/constants';
-
-export interface WrapEthOnboardingStep1Props {}
-
-export const WrapEthOnboardingStep1: React.StatelessComponent<WrapEthOnboardingStep1Props> = () => (
- <div className="flex items-center flex-column">
- <Text>
- You need to convert some of your ETH into tradeable <b>Wrapped ETH (WETH)</b>.
- </Text>
- <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> 1 ETH </Text>
- <img src="/images/eth_dollar.svg" height="75px" width="75x" />
- </div>
- <Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
- <Text fontSize="36px">=</Text>
- </Container>
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> 1 WETH </Text>
- <img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
- </div>
- </Container>
- <Text>
- Think of it like the coin version of a paper note. It has the same value, but some machines only take coins.
- </Text>
- </div>
-);
-
-export interface WrapEthOnboardingStep2Props {}
-
-export const WrapEthOnboardingStep2: React.StatelessComponent<WrapEthOnboardingStep2Props> = () => (
- <div className="flex items-center flex-column">
- <Text>Wrapping your ETH is a reversable transaction, so don't worry about losing your ETH.</Text>
- <Text>
- Click
- <Container display="inline-block" marginLeft="10px" marginRight="10px">
- <IconButton
- iconName="zmdi-long-arrow-down"
- color={colors.mediumBlue}
- labelText="wrap"
- display="inline-flex"
- />
- </Container>
- to wrap your ETH.
- </Text>
- </div>
-);
-
-export interface WrapEthOnboardingStep3Props {
- wethAmount: BigNumber;
-}
-
-export const WrapEthOnboardingStep3: React.StatelessComponent<WrapEthOnboardingStep3Props> = ({ wethAmount }) => (
- <div className="flex items-center flex-column">
- <Text>
- You have{' '}
- <Balance
- amount={wethAmount}
- decimals={constants.DECIMAL_PLACES_ETH}
- symbol={constants.ETHER_TOKEN_SYMBOL}
- />{' '}
- in your wallet.
- {wethAmount.gt(0) && ' Great!'}
- </Text>
- <Container width="100%" marginTop="25px" marginBottom="15px" className="flex justify-center">
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> 1 ETH </Text>
- <img src="/images/eth_dollar.svg" height="75px" width="75x" />
- </div>
- <Container marginRight="25px" marginLeft="25px" position="relative" top="20px">
- <Text fontSize="25px">
- <i className="zmdi zmdi-long-arrow-right" />
- </Text>
- </Container>
- <div className="flex flex-column items-center">
- <Text fontWeight={700}> 1 WETH </Text>
- <img src="/images/eth_token_erc20.svg" height="75px" width="75px" />
- </div>
- </Container>
- </div>
-);
diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx
deleted file mode 100644
index f33681835..000000000
--- a/packages/website/ts/components/order_json.tsx
+++ /dev/null
@@ -1,179 +0,0 @@
-import { BigNumber, fetchAsync, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import Paper from 'material-ui/Paper';
-import TextField from 'material-ui/TextField';
-import * as React from 'react';
-import { CopyIcon } from 'ts/components/ui/copy_icon';
-import { SideToAssetToken, TokenByAddress, WebsitePaths } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-interface OrderJSONProps {
- exchangeContractIfExists: string;
- orderExpiryTimestamp: BigNumber;
- orderSignature: string;
- orderTakerAddress: string;
- orderMakerAddress: string;
- orderSalt: BigNumber;
- orderMakerFee: BigNumber;
- orderTakerFee: BigNumber;
- orderFeeRecipient: string;
- sideToAssetToken: SideToAssetToken;
- tokenByAddress: TokenByAddress;
-}
-
-interface OrderJSONState {
- shareLink: string;
-}
-
-export class OrderJSON extends React.Component<OrderJSONProps, OrderJSONState> {
- constructor(props: OrderJSONProps) {
- super(props);
- this.state = {
- shareLink: '',
- };
- // tslint:disable-next-line:no-floating-promises
- this._setShareLinkAsync();
- }
- public render(): React.ReactNode {
- const order = utils.generateOrder(
- this.props.exchangeContractIfExists,
- this.props.sideToAssetToken,
- this.props.orderExpiryTimestamp,
- this.props.orderTakerAddress,
- this.props.orderMakerAddress,
- this.props.orderMakerFee,
- this.props.orderTakerFee,
- this.props.orderFeeRecipient,
- this.props.orderSignature,
- this.props.tokenByAddress,
- this.props.orderSalt,
- );
- const orderJSON = JSON.stringify(order);
- return (
- <div>
- <div className="pb2">
- You have successfully generated and cryptographically signed an order! The following JSON contains
- the order parameters and cryptographic signature that your counterparty will need to execute a trade
- with you.
- </div>
- <div className="pb2 flex">
- <div className="inline-block pl1" style={{ top: 1 }}>
- <CopyIcon data={orderJSON} callToAction="Copy" />
- </div>
- </div>
- <Paper className="center overflow-hidden">
- <TextField
- id="orderJSON"
- style={{ width: 710 }}
- value={JSON.stringify(order, null, '\t')}
- multiLine={true}
- rows={2}
- rowsMax={8}
- underlineStyle={{ display: 'none' }}
- />
- </Paper>
- <div className="pt3 pb2 center">
- <div>Share your signed order!</div>
- <div>
- <div className="mx-auto overflow-hidden" style={{ width: 152 }}>
- <TextField id={`${this.state.shareLink}-bitly`} value={this.state.shareLink} />
- </div>
- </div>
- <div className="mx-auto pt1 flex" style={{ width: 91 }}>
- <div>
- <i
- style={{ cursor: 'pointer', fontSize: 29 }}
- onClick={this._shareViaFacebook.bind(this)}
- className="zmdi zmdi-facebook-box"
- />
- </div>
- <div className="pl1" style={{ position: 'relative', width: 28 }}>
- <i
- style={{
- cursor: 'pointer',
- fontSize: 32,
- position: 'absolute',
- top: -2,
- left: 8,
- }}
- onClick={this._shareViaEmailAsync.bind(this)}
- className="zmdi zmdi-email"
- />
- </div>
- <div className="pl1">
- <i
- style={{ cursor: 'pointer', fontSize: 29 }}
- onClick={this._shareViaTwitterAsync.bind(this)}
- className="zmdi zmdi-twitter-box"
- />
- </div>
- </div>
- </div>
- </div>
- );
- }
- private _shareViaTwitterAsync(): void {
- const tweetText = encodeURIComponent(`Fill my order using the 0x protocol: ${this.state.shareLink}`);
- window.open(`https://twitter.com/intent/tweet?text=${tweetText}`, 'Share your order', 'width=500,height=400');
- }
- private _shareViaFacebook(): void {
- (window as any).FB.ui(
- {
- display: 'popup',
- href: this.state.shareLink,
- method: 'share',
- },
- _.noop.bind(_),
- );
- }
- private _shareViaEmailAsync(): void {
- const encodedSubject = encodeURIComponent("Let's trade using the 0x protocol");
- const encodedBody = encodeURIComponent(`I generated an order with the 0x protocol.
-You can see and fill it here: ${this.state.shareLink}`);
- const mailToLink = `mailto:mail@example.org?subject=${encodedSubject}&body=${encodedBody}`;
- window.open(mailToLink, '_blank');
- }
- private async _setShareLinkAsync(): Promise<void> {
- const shareLink = await this._generateShareLinkAsync();
- this.setState({
- shareLink,
- });
- }
- private async _generateShareLinkAsync(): Promise<string> {
- const longUrl = encodeURIComponent(this._getOrderUrl());
- const bitlyRequestUrl = `${constants.URL_BITLY_API}/v3/shorten?access_token=${
- configs.BITLY_ACCESS_TOKEN
- }&longUrl=${longUrl}`;
- const response = await fetchAsync(bitlyRequestUrl);
- const responseBody = await response.text();
- const bodyObj = JSON.parse(responseBody);
- if (response.status !== 200 || bodyObj.status_code !== 200) {
- // TODO: Show error message in UI
- logUtils.log(`Unexpected status code: ${response.status} -> ${responseBody}`);
- errorReporter.report(new Error(`Bitly returned non-200: ${JSON.stringify(response)}`));
- return '';
- }
- return bodyObj.data.url;
- }
- private _getOrderUrl(): string {
- const order = utils.generateOrder(
- this.props.exchangeContractIfExists,
- this.props.sideToAssetToken,
- this.props.orderExpiryTimestamp,
- this.props.orderTakerAddress,
- this.props.orderMakerAddress,
- this.props.orderMakerFee,
- this.props.orderTakerFee,
- this.props.orderFeeRecipient,
- this.props.orderSignature,
- this.props.tokenByAddress,
- this.props.orderSalt,
- );
- const orderJSONString = JSON.stringify(order);
- const orderUrl = `${configs.BASE_URL}${WebsitePaths.Portal}/fill?order=${orderJSONString}`;
- return orderUrl;
- }
-}
diff --git a/packages/website/ts/components/portal/back_button.tsx b/packages/website/ts/components/portal/back_button.tsx
deleted file mode 100644
index bea69bb95..000000000
--- a/packages/website/ts/components/portal/back_button.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import { Link, Styles } from '@0x/react-shared';
-import * as React from 'react';
-import { Island } from 'ts/components/ui/island';
-import { colors } from 'ts/style/colors';
-
-export interface BackButtonProps {
- to: string;
- labelText: string;
-}
-
-const BACK_BUTTON_HEIGHT = 28;
-
-const styles: Styles = {
- backButton: {
- height: BACK_BUTTON_HEIGHT,
- paddingTop: 10,
- borderRadius: BACK_BUTTON_HEIGHT,
- },
- backButtonIcon: {
- color: colors.mediumBlue,
- fontSize: 20,
- },
-};
-
-export const BackButton = (props: BackButtonProps) => {
- return (
- <div style={{ height: 65, paddingTop: 25 }}>
- <Link to={props.to}>
- <Island className="flex right" style={styles.backButton}>
- <div style={{ marginLeft: 12 }}>
- <i style={styles.backButtonIcon} className={`zmdi zmdi-arrow-left`} />
- </div>
- <div style={{ marginLeft: 12, marginRight: 12 }}>
- <div style={{ fontSize: 16, color: colors.lightGrey }}>{props.labelText}</div>
- </div>
- </Island>
- </Link>
- </div>
- );
-};
diff --git a/packages/website/ts/components/portal/drawer_menu.tsx b/packages/website/ts/components/portal/drawer_menu.tsx
deleted file mode 100644
index 7280a6102..000000000
--- a/packages/website/ts/components/portal/drawer_menu.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Blockchain } from 'ts/blockchain';
-import { defaultMenuItemEntries, Menu } from 'ts/components/portal/menu';
-import { Identicon } from 'ts/components/ui/identicon';
-import { Text } from 'ts/components/ui/text';
-import { colors } from 'ts/style/colors';
-import { ProviderType, WebsitePaths } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-const IDENTICON_DIAMETER = 45;
-const BORDER_RADIUS = '50%';
-
-const styles: Styles = {
- root: {
- backgroundColor: colors.drawerMenuBackground,
- width: '100%',
- height: '100%',
- },
- identicon: {
- borderWidth: 3,
- borderStyle: 'solid',
- borderColor: colors.white,
- borderRadius: BORDER_RADIUS,
- MozBorderRadius: BORDER_RADIUS,
- WebkitBorderRadius: BORDER_RADIUS,
- },
-};
-
-export interface DrawerMenuProps {
- selectedPath?: string;
- userAddress?: string;
- injectedProviderName: string;
- providerType: ProviderType;
- blockchain?: Blockchain;
- blockchainIsLoaded: boolean;
-}
-export const DrawerMenu = (props: DrawerMenuProps) => {
- const relayerItemEntry = {
- to: WebsitePaths.Portal,
- labelText: 'Relayer ecosystem',
- iconName: 'zmdi-portable-wifi',
- };
- const menuItemEntries = _.concat(relayerItemEntry, defaultMenuItemEntries);
- const accountState = utils.getAccountState(
- props.blockchainIsLoaded && !_.isUndefined(props.blockchain),
- props.providerType,
- props.injectedProviderName,
- props.userAddress,
- );
- const displayMessage = utils.getReadableAccountState(accountState, props.userAddress);
- return (
- <div style={styles.root}>
- <Header userAddress={props.userAddress} displayMessage={displayMessage} />
- <Menu selectedPath={props.selectedPath} menuItemEntries={menuItemEntries} />
- </div>
- );
-};
-
-interface HeaderProps {
- userAddress?: string;
- displayMessage: string;
-}
-const Header = (props: HeaderProps) => {
- return (
- <div className="flex flex-center py4">
- <div className="flex flex-column mx-auto items-center">
- <Identicon address={props.userAddress} diameter={IDENTICON_DIAMETER} style={styles.identicon} />
- <Text className="pt2" fontColor={colors.white}>
- {props.displayMessage}
- </Text>
- </div>
- </div>
- );
-};
diff --git a/packages/website/ts/components/portal/loading.tsx b/packages/website/ts/components/portal/loading.tsx
deleted file mode 100644
index d804dd1b8..000000000
--- a/packages/website/ts/components/portal/loading.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import CircularProgress from 'material-ui/CircularProgress';
-import * as React from 'react';
-
-const CIRCULAR_PROGRESS_SIZE = 40;
-const CIRCULAR_PROGRESS_THICKNESS = 5;
-
-export interface LoadingProps {
- isLoading: boolean;
- content: React.ReactNode;
-}
-export const Loading = (props: LoadingProps) => {
- if (props.isLoading) {
- return (
- <div className="center">
- <CircularProgress size={CIRCULAR_PROGRESS_SIZE} thickness={CIRCULAR_PROGRESS_THICKNESS} />
- </div>
- );
- } else {
- return <div>{props.content}</div>;
- }
-};
diff --git a/packages/website/ts/components/portal/menu.tsx b/packages/website/ts/components/portal/menu.tsx
deleted file mode 100644
index d59101686..000000000
--- a/packages/website/ts/components/portal/menu.tsx
+++ /dev/null
@@ -1,120 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { CustomMenuItem } from 'ts/components/ui/custom_menu_item';
-import { colors } from 'ts/style/colors';
-import { WebsitePaths } from 'ts/types';
-
-export interface MenuTheme {
- paddingLeft: number;
- textColor: string;
- iconColor: string;
- selectedIconColor: string;
- selectedBackgroundColor: string;
-}
-
-export interface MenuItemEntry {
- to: string;
- labelText: string;
- iconName: string;
-}
-
-export interface MenuProps {
- selectedPath?: string;
- theme?: MenuTheme;
- menuItemEntries?: MenuItemEntry[];
-}
-
-export const defaultMenuItemEntries: MenuItemEntry[] = [
- {
- to: `${WebsitePaths.Portal}/account`,
- labelText: 'Account overview',
- iconName: 'zmdi-balance-wallet',
- },
- {
- to: `${WebsitePaths.Portal}/trades`,
- labelText: 'Trade history',
- iconName: 'zmdi-format-list-bulleted',
- },
- {
- to: `${WebsitePaths.Portal}/weth`,
- labelText: 'Wrapped ETH',
- iconName: 'zmdi-circle-o',
- },
- {
- to: `${WebsitePaths.Portal}/generate`,
- labelText: 'Generate order',
- iconName: 'zmdi-arrow-right-top',
- },
- {
- to: `${WebsitePaths.Portal}/fill`,
- labelText: 'Fill order',
- iconName: 'zmdi-arrow-left-bottom',
- },
-];
-
-const DEFAULT_MENU_THEME: MenuTheme = {
- paddingLeft: 30,
- textColor: colors.white,
- iconColor: colors.white,
- selectedIconColor: colors.white,
- selectedBackgroundColor: colors.menuItemDefaultSelectedBackground,
-};
-
-export const Menu: React.StatelessComponent<MenuProps> = (props: MenuProps) => {
- return (
- <div>
- {_.map(props.menuItemEntries, entry => {
- const isSelected = entry.to === props.selectedPath;
- return (
- <CustomMenuItem key={entry.to} to={entry.to}>
- <MenuItemLabel
- title={entry.labelText}
- iconName={entry.iconName}
- selected={isSelected}
- theme={props.theme}
- />
- </CustomMenuItem>
- );
- })}
- </div>
- );
-};
-Menu.defaultProps = {
- theme: DEFAULT_MENU_THEME,
- menuItemEntries: defaultMenuItemEntries,
-};
-
-interface MenuItemLabelProps {
- title: string;
- iconName: string;
- selected: boolean;
- theme: MenuTheme;
-}
-const MenuItemLabel: React.StatelessComponent<MenuItemLabelProps> = (props: MenuItemLabelProps) => {
- const styles: Styles = {
- root: {
- backgroundColor: props.selected ? props.theme.selectedBackgroundColor : undefined,
- paddingLeft: props.theme.paddingLeft,
- },
- icon: {
- color: props.selected ? props.theme.selectedIconColor : props.theme.iconColor,
- fontSize: 20,
- },
- text: {
- color: props.theme.textColor,
- fontWeight: props.selected ? 'bold' : 'normal',
- fontSize: 16,
- },
- };
- return (
- <div className="flex py2" style={styles.root}>
- <div className="pr1">
- <i style={styles.icon} className={`zmdi ${props.iconName}`} />
- </div>
- <div className="pl1" style={styles.text}>
- {props.title}
- </div>
- </div>
- );
-};
diff --git a/packages/website/ts/components/portal/portal.tsx b/packages/website/ts/components/portal/portal.tsx
deleted file mode 100644
index 59cf2db71..000000000
--- a/packages/website/ts/components/portal/portal.tsx
+++ /dev/null
@@ -1,749 +0,0 @@
-import { colors, Link } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as DocumentTitle from 'react-document-title';
-import { Route, RouteComponentProps, Switch } from 'react-router-dom';
-
-import { Blockchain } from 'ts/blockchain';
-import { BlockchainErrDialog } from 'ts/components/dialogs/blockchain_err_dialog';
-import { LedgerConfigDialog } from 'ts/components/dialogs/ledger_config_dialog';
-import { PortalDisclaimerDialog } from 'ts/components/dialogs/portal_disclaimer_dialog';
-import { EthWrappers } from 'ts/components/eth_wrappers';
-import { FillOrder } from 'ts/components/fill_order';
-import { AssetPicker } from 'ts/components/generate_order/asset_picker';
-import { MetaTags } from 'ts/components/meta_tags';
-import { BackButton } from 'ts/components/portal/back_button';
-import { Loading } from 'ts/components/portal/loading';
-import { Menu, MenuTheme } from 'ts/components/portal/menu';
-import { Section } from 'ts/components/portal/section';
-import { TextHeader } from 'ts/components/portal/text_header';
-import { RelayerIndex, RelayerIndexCellStyle } from 'ts/components/relayer_index/relayer_index';
-import { TokenBalances } from 'ts/components/token_balances';
-import { TopBar, TopBarDisplayType } from 'ts/components/top_bar/top_bar';
-import { TradeHistory } from 'ts/components/trade_history/trade_history';
-import { Container } from 'ts/components/ui/container';
-import { FlashMessage } from 'ts/components/ui/flash_message';
-import { Image } from 'ts/components/ui/image';
-import { PointerDirection } from 'ts/components/ui/pointer';
-import { Text } from 'ts/components/ui/text';
-import { Wallet } from 'ts/components/wallet/wallet';
-import { GenerateOrderForm } from 'ts/containers/generate_order_form';
-import { PortalOnboardingFlow } from 'ts/containers/portal_onboarding_flow';
-import { localStorage } from 'ts/local_storage/local_storage';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { FullscreenMessage } from 'ts/pages/fullscreen_message';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { zIndex } from 'ts/style/z_index';
-import {
- BlockchainErrs,
- HashData,
- ItemByAddress,
- PortalOrder,
- ProviderType,
- ScreenWidths,
- Token,
- TokenByAddress,
- TokenStateByAddress,
- TokenVisibility,
- WebsitePaths,
-} from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { backendClient } from 'ts/utils/backend_client';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { orderParser } from 'ts/utils/order_parser';
-import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
-
-export interface PortalProps {
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- dispatcher: Dispatcher;
- hashData: HashData;
- injectedProviderName: string;
- networkId: number;
- nodeVersion: string;
- orderFillAmount: BigNumber;
- providerType: ProviderType;
- screenWidth: ScreenWidths;
- tokenByAddress: TokenByAddress;
- userEtherBalanceInWei?: BigNumber;
- userAddress: string;
- shouldBlockchainErrDialogBeOpen: boolean;
- userSuppliedOrderCache: PortalOrder;
- location: Location;
- flashMessage?: string | React.ReactNode;
- lastForceTokenStateRefetch: number;
- translate: Translate;
- isPortalOnboardingShowing: boolean;
- portalOnboardingStep: number;
-}
-
-interface PortalState {
- prevNetworkId: number;
- prevNodeVersion: string;
- prevUserAddress: string;
- prevPathname: string;
- isDisclaimerDialogOpen: boolean;
- isLedgerDialogOpen: boolean;
- tokenManagementState: TokenManagementState;
- trackedTokenStateByAddress: TokenStateByAddress;
-}
-
-interface AccountManagementItem {
- pathName: string;
- headerText?: string;
- render: () => React.ReactNode;
-}
-
-enum TokenManagementState {
- Add = 'Add',
- Remove = 'Remove',
- None = 'None',
-}
-
-const THROTTLE_TIMEOUT = 100;
-const TOP_BAR_HEIGHT = TopBar.heightForDisplayType(TopBarDisplayType.Expanded);
-const LEFT_COLUMN_WIDTH = 346;
-const MENU_PADDING_LEFT = 185;
-const LARGE_LAYOUT_MAX_WIDTH = 1200;
-const SIDE_PADDING = 20;
-const DOCUMENT_TITLE = '0x Portal';
-const DOCUMENT_DESCRIPTION = 'Learn about and trade on 0x Relayers';
-
-export class Portal extends React.Component<PortalProps, PortalState> {
- private _blockchain: Blockchain;
- private readonly _sharedOrderIfExists: PortalOrder;
- private readonly _throttledScreenWidthUpdate: () => void;
- constructor(props: PortalProps) {
- super(props);
- this._sharedOrderIfExists = orderParser.parseQueryString(window.location.search);
- this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT);
- const didAcceptPortalDisclaimer = localStorage.getItemIfExists(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER);
- const hasAcceptedDisclaimer =
- !_.isUndefined(didAcceptPortalDisclaimer) && !_.isEmpty(didAcceptPortalDisclaimer);
- const initialTrackedTokenStateByAddress = this._getInitialTrackedTokenStateByAddress(
- this._getCurrentTrackedTokens(),
- );
- this.state = {
- prevNetworkId: this.props.networkId,
- prevNodeVersion: this.props.nodeVersion,
- prevUserAddress: this.props.userAddress,
- prevPathname: this.props.location.pathname,
- isDisclaimerDialogOpen: !hasAcceptedDisclaimer,
- tokenManagementState: TokenManagementState.None,
- isLedgerDialogOpen: false,
- trackedTokenStateByAddress: initialTrackedTokenStateByAddress,
- };
- }
- public componentDidMount(): void {
- window.addEventListener('resize', this._throttledScreenWidthUpdate);
- window.scrollTo(0, 0);
- }
- public componentWillMount(): void {
- this._blockchain = new Blockchain(this.props.dispatcher);
- }
- public componentWillUnmount(): void {
- this._blockchain.destroy();
- window.removeEventListener('resize', this._throttledScreenWidthUpdate);
- // We re-set the entire redux state when the portal is unmounted so that when it is re-rendered
- // the initialization process always occurs from the same base state. This helps avoid
- // initialization inconsistencies (i.e While the portal was unrendered, the user might have
- // become disconnected from their backing Ethereum node, changed user accounts, etc...)
- this.props.dispatcher.resetState();
- }
- public componentDidUpdate(prevProps: PortalProps): void {
- if (!prevProps.blockchainIsLoaded && this.props.blockchainIsLoaded) {
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(this._getCurrentTrackedTokensAddresses());
- }
- }
- public componentWillReceiveProps(nextProps: PortalProps): void {
- if (nextProps.networkId !== this.state.prevNetworkId) {
- // tslint:disable-next-line:no-floating-promises
- this._blockchain.networkIdUpdatedFireAndForgetAsync(nextProps.networkId);
- this.setState({
- prevNetworkId: nextProps.networkId,
- });
- }
- if (nextProps.userAddress !== this.state.prevUserAddress) {
- const newUserAddress = _.isEmpty(nextProps.userAddress) ? undefined : nextProps.userAddress;
- // tslint:disable-next-line:no-floating-promises
- this._blockchain.userAddressUpdatedFireAndForgetAsync(newUserAddress);
- this.setState({
- prevUserAddress: nextProps.userAddress,
- });
- }
- if (nextProps.nodeVersion !== this.state.prevNodeVersion) {
- // tslint:disable-next-line:no-floating-promises
- this._blockchain.nodeVersionUpdatedFireAndForgetAsync(nextProps.nodeVersion);
- }
- if (nextProps.location.pathname !== this.state.prevPathname) {
- this.setState({
- prevPathname: nextProps.location.pathname,
- });
- }
-
- // If the address changed, but the network did not, we can just refetch the currently tracked tokens.
- if (
- (nextProps.userAddress !== this.props.userAddress && nextProps.networkId === this.props.networkId) ||
- nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch
- ) {
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(this._getCurrentTrackedTokensAddresses());
- }
-
- const nextTrackedTokens = utils.getTrackedTokens(nextProps.tokenByAddress);
- const trackedTokens = this._getCurrentTrackedTokens();
-
- if (!_.isEqual(nextTrackedTokens, trackedTokens)) {
- const newTokens = _.difference(nextTrackedTokens, trackedTokens);
- const newTokenAddresses = _.map(newTokens, token => token.address);
- // Add placeholder entry for this token to the state, since fetching the
- // balance/allowance is asynchronous
- const trackedTokenStateByAddress = { ...this.state.trackedTokenStateByAddress };
- for (const tokenAddress of newTokenAddresses) {
- trackedTokenStateByAddress[tokenAddress] = {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- };
- }
- this.setState(
- {
- trackedTokenStateByAddress,
- },
- () => {
- // Fetch the actual balance/allowance.
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(newTokenAddresses);
- },
- );
- }
- }
- public render(): React.ReactNode {
- const updateShouldBlockchainErrDialogBeOpen = this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen.bind(
- this.props.dispatcher,
- );
- const isAssetPickerDialogOpen = this.state.tokenManagementState !== TokenManagementState.None;
- const tokenVisibility =
- this.state.tokenManagementState === TokenManagementState.Add
- ? TokenVisibility.Untracked
- : TokenVisibility.Tracked;
- return (
- <Container>
- <MetaTags title={DOCUMENT_TITLE} description={DOCUMENT_DESCRIPTION} />
- <DocumentTitle title={DOCUMENT_TITLE} />
- <TopBar
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- injectedProviderName={this.props.injectedProviderName}
- onToggleLedgerDialog={this._onToggleLedgerDialog.bind(this)}
- dispatcher={this.props.dispatcher}
- providerType={this.props.providerType}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- location={this.props.location}
- blockchain={this._blockchain}
- translate={this.props.translate}
- displayType={TopBarDisplayType.Expanded}
- style={{
- backgroundColor: colors.lightestGrey,
- position: 'fixed',
- zIndex: zIndex.topBar,
- }}
- maxWidth={LARGE_LAYOUT_MAX_WIDTH}
- />
- <Container marginTop={TOP_BAR_HEIGHT} minHeight="100vh" backgroundColor={colors.lightestGrey}>
- <Switch>
- <Route path={`${WebsitePaths.Portal}/:route`} render={this._renderOtherRoutes.bind(this)} />
- <Route
- exact={true}
- path={`${WebsitePaths.Portal}/`}
- render={this._renderMainRoute.bind(this)}
- />
- </Switch>
- <BlockchainErrDialog
- blockchain={this._blockchain}
- blockchainErr={this.props.blockchainErr}
- isOpen={this.props.shouldBlockchainErrDialogBeOpen}
- userAddress={this.props.userAddress}
- toggleDialogFn={updateShouldBlockchainErrDialogBeOpen}
- networkId={this.props.networkId}
- />
- <FlashMessage dispatcher={this.props.dispatcher} flashMessage={this.props.flashMessage} />
-
- <LedgerConfigDialog
- providerType={this.props.providerType}
- networkId={this.props.networkId}
- blockchain={this._blockchain}
- dispatcher={this.props.dispatcher}
- toggleDialogFn={this._onToggleLedgerDialog.bind(this)}
- isOpen={this.state.isLedgerDialogOpen}
- />
-
- <AssetPicker
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this._blockchain}
- dispatcher={this.props.dispatcher}
- isOpen={isAssetPickerDialogOpen}
- currentTokenAddress={''}
- onTokenChosen={this._onTokenChosen.bind(this)}
- tokenByAddress={this.props.tokenByAddress}
- tokenVisibility={tokenVisibility}
- />
- </Container>
- </Container>
- );
- }
- private _renderMainRoute(): React.ReactNode {
- if (this._isSmallScreen()) {
- return <SmallLayout content={this._renderRelayerIndexSection()} />;
- } else {
- return <LargeLayout left={this._renderWalletSection()} right={this._renderRelayerIndexSection()} />;
- }
- }
- private _renderOtherRoutes(routeComponentProps: RouteComponentProps<any>): React.ReactNode {
- if (this._isSmallScreen()) {
- return <SmallLayout content={this._renderAccountManagement()} />;
- } else {
- return <LargeLayout left={this._renderMenu(routeComponentProps)} right={this._renderAccountManagement()} />;
- }
- }
- private _renderMenu(routeComponentProps: RouteComponentProps<any>): React.ReactNode {
- const menuTheme: MenuTheme = {
- paddingLeft: MENU_PADDING_LEFT,
- textColor: colors.darkerGrey,
- iconColor: colors.darkerGrey,
- selectedIconColor: colors.yellow800,
- selectedBackgroundColor: 'transparent',
- };
- return (
- <Section
- header={<BackButton to={WebsitePaths.Portal} labelText="back to Relayers" />}
- body={<Menu selectedPath={routeComponentProps.location.pathname} theme={menuTheme} />}
- />
- );
- }
- private _renderWallet(): React.ReactNode {
- const isMobile = utils.isMobileWidth(this.props.screenWidth);
- // We need room to scroll down for mobile onboarding
- const marginBottom = isMobile ? '250px' : '15px';
- return (
- <div>
- <Container className="flex flex-column items-center">
- {isMobile && (
- <Container marginTop="20px" marginBottom="20px">
- {this._renderStartOnboarding()}
- </Container>
- )}
- <Container marginBottom={marginBottom} width="100%">
- <Wallet
- style={
- !isMobile && this.props.isPortalOnboardingShowing
- ? { zIndex: zIndex.aboveOverlay, position: 'relative' }
- : undefined
- }
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this._blockchain}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- blockchainErr={this.props.blockchainErr}
- dispatcher={this.props.dispatcher}
- tokenByAddress={this.props.tokenByAddress}
- trackedTokens={this._getCurrentTrackedTokens()}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- injectedProviderName={this.props.injectedProviderName}
- providerType={this.props.providerType}
- screenWidth={this.props.screenWidth}
- location={this.props.location}
- trackedTokenStateByAddress={this.state.trackedTokenStateByAddress}
- onToggleLedgerDialog={this._onToggleLedgerDialog.bind(this)}
- onAddToken={this._onAddToken.bind(this)}
- onRemoveToken={this._onRemoveToken.bind(this)}
- refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this)}
- toggleTooltipDirection={
- this.props.isPortalOnboardingShowing ? PointerDirection.Left : PointerDirection.Right
- }
- />
- </Container>
- {!isMobile && <Container marginTop="8px">{this._renderStartOnboarding()}</Container>}
- </Container>
- <PortalOnboardingFlow
- blockchain={this._blockchain}
- trackedTokenStateByAddress={this.state.trackedTokenStateByAddress}
- refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this)}
- />
- </div>
- );
- }
- private _renderStartOnboarding(): React.ReactNode {
- const isMobile = utils.isMobileWidth(this.props.screenWidth);
- const shouldStartOnboarding = !isMobile || this.props.location.pathname === `${WebsitePaths.Portal}/account`;
- const startOnboarding = (
- <Container className="flex items-center center">
- <Text fontColor={colors.mediumBlue} fontSize="16px" onClick={this._startOnboarding.bind(this)}>
- Set up your account to start trading
- </Text>
- <Container marginLeft="8px" paddingTop="3px">
- <Image src="/images/setup_account_icon.svg" height="20px" width="20x" />
- </Container>
- </Container>
- );
- return !shouldStartOnboarding ? (
- <Link to={`${WebsitePaths.Portal}/account`}>{startOnboarding}</Link>
- ) : (
- startOnboarding
- );
- }
- private _startOnboarding(): void {
- analytics.track('Onboarding Started', {
- reason: 'manual',
- stepIndex: this.props.portalOnboardingStep,
- });
- this.props.dispatcher.updatePortalOnboardingShowing(true);
- }
- private _renderWalletSection(): React.ReactNode {
- return <Section header={<TextHeader labelText="Your Account" />} body={this._renderWallet()} />;
- }
- private _renderAccountManagement(): React.ReactNode {
- const accountManagementItems: AccountManagementItem[] = [
- {
- pathName: `${WebsitePaths.Portal}/weth`,
- headerText: 'Wrapped ETH',
- render: this._renderEthWrapper.bind(this),
- },
- {
- pathName: `${WebsitePaths.Portal}/account`,
- headerText: this._isSmallScreen() ? undefined : 'Your Account',
- render: this._isSmallScreen() ? this._renderWallet.bind(this) : this._renderTokenBalances.bind(this),
- },
- {
- pathName: `${WebsitePaths.Portal}/trades`,
- headerText: 'Trade History',
- render: this._renderTradeHistory.bind(this),
- },
- {
- pathName: `${WebsitePaths.Portal}/generate`,
- headerText: 'Generate Order',
- render: this._renderGenerateOrderForm.bind(this),
- },
- {
- pathName: `${WebsitePaths.Portal}/fill`,
- headerText: 'Fill Order',
- render: this._renderFillOrder.bind(this),
- },
- ];
- return (
- <div>
- <Switch>
- {_.map(accountManagementItems, item => {
- return (
- <Route
- key={item.pathName}
- path={item.pathName}
- render={this._renderAccountManagementItem.bind(this, item)}
- />
- );
- })}
- }
- <Route render={this._renderNotFoundMessage.bind(this)} />
- </Switch>
- <PortalDisclaimerDialog
- isOpen={this.state.isDisclaimerDialogOpen}
- onToggleDialog={this._onPortalDisclaimerAccepted.bind(this)}
- />
- </div>
- );
- }
- private _renderAccountManagementItem(item: AccountManagementItem): React.ReactNode {
- return (
- <Section
- header={!_.isUndefined(item.headerText) && <TextHeader labelText={item.headerText} />}
- body={<Loading isLoading={!this.props.blockchainIsLoaded} content={item.render()} />}
- />
- );
- }
- private _renderEthWrapper(): React.ReactNode {
- return (
- <EthWrappers
- networkId={this.props.networkId}
- blockchain={this._blockchain}
- dispatcher={this.props.dispatcher}
- tokenByAddress={this.props.tokenByAddress}
- userAddress={this.props.userAddress}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- isFullWidth={true}
- />
- );
- }
- private _renderTradeHistory(): React.ReactNode {
- return (
- <TradeHistory
- tokenByAddress={this.props.tokenByAddress}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- isFullWidth={true}
- shouldHideHeader={true}
- isScrollable={false}
- />
- );
- }
- private _renderGenerateOrderForm(): React.ReactNode {
- return (
- <GenerateOrderForm
- blockchain={this._blockchain}
- hashData={this.props.hashData}
- dispatcher={this.props.dispatcher}
- isFullWidth={true}
- shouldHideHeader={true}
- />
- );
- }
- private _renderFillOrder(): React.ReactNode {
- const initialFillOrder = !_.isUndefined(this.props.userSuppliedOrderCache)
- ? this.props.userSuppliedOrderCache
- : this._sharedOrderIfExists;
- return (
- <FillOrder
- blockchain={this._blockchain}
- blockchainErr={this.props.blockchainErr}
- initialOrder={initialFillOrder}
- isOrderInUrl={!_.isUndefined(this._sharedOrderIfExists)}
- orderFillAmount={this.props.orderFillAmount}
- networkId={this.props.networkId}
- userAddress={this.props.userAddress}
- tokenByAddress={this.props.tokenByAddress}
- dispatcher={this.props.dispatcher}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- isFullWidth={true}
- shouldHideHeader={true}
- />
- );
- }
- private _renderTokenBalances(): React.ReactNode {
- return (
- <TokenBalances
- blockchain={this._blockchain}
- blockchainErr={this.props.blockchainErr}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- dispatcher={this.props.dispatcher}
- screenWidth={this.props.screenWidth}
- tokenByAddress={this.props.tokenByAddress}
- trackedTokens={this._getCurrentTrackedTokens()}
- userAddress={this.props.userAddress}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- networkId={this.props.networkId}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- isFullWidth={true}
- />
- );
- }
- private _renderRelayerIndexSection(): React.ReactNode {
- const isMobile = utils.isMobileWidth(this.props.screenWidth);
- // TODO(bmillman): revert RelayerIndex cellStyle to Expanded once data pipeline is tracking v2 volume
- return (
- <Section
- header={!isMobile && <TextHeader labelText="0x Relayers" />}
- body={
- <Container className="flex flex-column">
- {isMobile && (
- <Container marginTop="20px" marginBottom="20px">
- {this._renderStartOnboarding()}
- </Container>
- )}
- <RelayerIndex
- networkId={this.props.networkId}
- screenWidth={this.props.screenWidth}
- cellStyle={RelayerIndexCellStyle.Minimized}
- />
- </Container>
- }
- />
- );
- }
- private _renderNotFoundMessage(): React.ReactNode {
- return (
- <FullscreenMessage
- headerText="404 Not Found"
- bodyText="Hm... looks like we couldn't find what you are looking for."
- />
- );
- }
- private _onTokenChosen(tokenAddress: string): void {
- if (_.isEmpty(tokenAddress)) {
- this.setState({
- tokenManagementState: TokenManagementState.None,
- });
- return;
- }
- const token = this.props.tokenByAddress[tokenAddress];
- const isDefaultTrackedToken = _.includes(configs.DEFAULT_TRACKED_TOKEN_SYMBOLS, token.symbol);
- if (this.state.tokenManagementState === TokenManagementState.Remove && !isDefaultTrackedToken) {
- if (token.isRegistered) {
- // Remove the token from tracked tokens
- const newToken: Token = {
- ...token,
- trackedTimestamp: undefined,
- };
- this.props.dispatcher.updateTokenByAddress([newToken]);
- } else {
- this.props.dispatcher.removeTokenToTokenByAddress(token);
- }
- trackedTokenStorage.removeTrackedToken(this.props.userAddress, this.props.networkId, tokenAddress);
- } else if (isDefaultTrackedToken) {
- this.props.dispatcher.showFlashMessage(`Cannot remove ${token.name} because it's a default token`);
- }
- this.setState({
- tokenManagementState: TokenManagementState.None,
- });
- }
- private _onToggleLedgerDialog(): void {
- this.setState({
- isLedgerDialogOpen: !this.state.isLedgerDialogOpen,
- });
- }
- private _onAddToken(): void {
- this.setState({
- tokenManagementState: TokenManagementState.Add,
- });
- }
- private _onRemoveToken(): void {
- this.setState({
- tokenManagementState: TokenManagementState.Remove,
- });
- }
- private _onPortalDisclaimerAccepted(): void {
- localStorage.setItem(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER, 'set');
- this.setState({
- isDisclaimerDialogOpen: false,
- });
- }
- private _updateScreenWidth(): void {
- const newScreenWidth = utils.getScreenWidth();
- this.props.dispatcher.updateScreenWidth(newScreenWidth);
- }
- private _isSmallScreen(): boolean {
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- return isSmallScreen;
- }
- private _getCurrentTrackedTokens(): Token[] {
- return utils.getTrackedTokens(this.props.tokenByAddress);
- }
- private _getCurrentTrackedTokensAddresses(): string[] {
- return _.map(this._getCurrentTrackedTokens(), token => token.address);
- }
- private _getInitialTrackedTokenStateByAddress(trackedTokens: Token[]): TokenStateByAddress {
- const trackedTokenStateByAddress: TokenStateByAddress = {};
- _.each(trackedTokens, token => {
- trackedTokenStateByAddress[token.address] = {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- };
- });
- return trackedTokenStateByAddress;
- }
-
- private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]): Promise<void> {
- if (_.isEmpty(tokenAddresses)) {
- return;
- }
- const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress;
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const balancesAndAllowances = await Promise.all(
- tokenAddresses.map(async tokenAddress => {
- return this._blockchain.getTokenBalanceAndAllowanceAsync(userAddressIfExists, tokenAddress);
- }),
- );
- const priceByAddress = await this._getPriceByAddressAsync(tokenAddresses);
- for (let i = 0; i < tokenAddresses.length; i++) {
- // Order is preserved in Promise.all
- const [balance, allowance] = balancesAndAllowances[i];
- const tokenAddress = tokenAddresses[i];
- trackedTokenStateByAddress[tokenAddress] = {
- balance,
- allowance,
- isLoaded: true,
- price: priceByAddress[tokenAddress],
- };
- }
- this.setState({
- trackedTokenStateByAddress,
- });
- }
-
- private async _getPriceByAddressAsync(tokenAddresses: string[]): Promise<ItemByAddress<BigNumber>> {
- if (_.isEmpty(tokenAddresses)) {
- return {};
- }
- // for each input token address, search for the corresponding symbol in this.props.tokenByAddress, if it exists
- // create a mapping from existing symbols -> address
- const tokenAddressBySymbol: { [symbol: string]: string } = {};
- _.each(tokenAddresses, address => {
- const tokenIfExists = _.get(this.props.tokenByAddress, address);
- if (!_.isUndefined(tokenIfExists)) {
- const symbol = tokenIfExists.symbol;
- tokenAddressBySymbol[symbol] = address;
- }
- });
- const tokenSymbols = _.keys(tokenAddressBySymbol);
- try {
- const priceBySymbol = await backendClient.getPriceInfoAsync(tokenSymbols);
- const priceByAddress = _.mapKeys(priceBySymbol, (_value, symbol) => _.get(tokenAddressBySymbol, symbol));
- const result = _.mapValues(priceByAddress, price => {
- const priceBigNumber = new BigNumber(price);
- return priceBigNumber;
- });
- return result;
- } catch (err) {
- return {};
- }
- }
-
- private async _refetchTokenStateAsync(tokenAddress: string): Promise<void> {
- await this._fetchBalancesAndAllowancesAsync([tokenAddress]);
- }
-}
-
-interface LargeLayoutProps {
- left: React.ReactNode;
- right: React.ReactNode;
-}
-const LargeLayout = (props: LargeLayoutProps) => {
- return (
- <Container
- className="mx-auto flex flex-center"
- maxWidth={LARGE_LAYOUT_MAX_WIDTH}
- paddingLeft={SIDE_PADDING}
- paddingRight={SIDE_PADDING}
- >
- <div className="flex-last">
- <Container width={LEFT_COLUMN_WIDTH} position="fixed" zIndex={zIndex.aboveTopBar}>
- {props.left}
- </Container>
- </div>
- <Container className="flex-auto" marginLeft={LEFT_COLUMN_WIDTH}>
- <Container className="flex-auto" marginLeft={SIDE_PADDING}>
- {props.right}
- </Container>
- </Container>
- </Container>
- );
-};
-
-interface SmallLayoutProps {
- content: React.ReactNode;
-}
-const SmallLayout = (props: SmallLayoutProps) => {
- return (
- <div className="flex flex-center">
- <Container className="flex-auto" paddingLeft={SIDE_PADDING} paddingRight={SIDE_PADDING}>
- {props.content}
- </Container>
- </div>
- );
-}; // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/portal/section.tsx b/packages/website/ts/components/portal/section.tsx
deleted file mode 100644
index b6c9fd098..000000000
--- a/packages/website/ts/components/portal/section.tsx
+++ /dev/null
@@ -1,14 +0,0 @@
-import * as React from 'react';
-
-export interface SectionProps {
- header: React.ReactNode;
- body: React.ReactNode;
-}
-export const Section = (props: SectionProps) => {
- return (
- <div className="flex flex-column">
- {props.header}
- {props.body}
- </div>
- );
-};
diff --git a/packages/website/ts/components/portal/text_header.tsx b/packages/website/ts/components/portal/text_header.tsx
deleted file mode 100644
index b6045b832..000000000
--- a/packages/website/ts/components/portal/text_header.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-
-import { Text } from 'ts/components/ui/text';
-
-export interface TextHeaderProps {
- labelText: string;
-}
-
-export const TextHeader = (props: TextHeaderProps) => {
- return (
- <Text className="pt3 pb2" fontWeight="bold" fontSize="16px" fontColor={colors.darkestGrey}>
- {props.labelText}
- </Text>
- );
-};
diff --git a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx b/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
deleted file mode 100644
index 7f1b4ebb4..000000000
--- a/packages/website/ts/components/relayer_index/relayer_grid_tile.tsx
+++ /dev/null
@@ -1,148 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import { GridTile as PlainGridTile } from 'material-ui/GridList';
-import * as React from 'react';
-import { analytics } from 'ts/utils/analytics';
-
-import { TopTokens } from 'ts/components/relayer_index/relayer_top_tokens';
-import { Container } from 'ts/components/ui/container';
-import { Image } from 'ts/components/ui/image';
-import { Island } from 'ts/components/ui/island';
-import { colors } from 'ts/style/colors';
-import { media } from 'ts/style/media';
-import { styled } from 'ts/style/theme';
-import { WebsiteBackendRelayerInfo } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-export enum RelayerGridTileStyle {
- Expanded = 0,
- Minimized,
-}
-
-export interface RelayerGridTileProps {
- relayerInfo: WebsiteBackendRelayerInfo;
- networkId: number;
- style: RelayerGridTileStyle;
-}
-
-const styles: Styles = {
- root: {
- boxSizing: 'border-box',
- // All material UI components have position: relative
- // which creates a new stacking context and makes z-index stuff impossible. So reset.
- position: 'static',
- },
- innerDiv: {
- height: '100%',
- boxSizing: 'border-box',
- },
- expandedHeader: {
- height: '50%',
- width: '100%',
- },
- minimizedHeader: {
- height: '100%',
- width: '100%',
- },
- body: {
- height: '50%',
- width: '100%',
- boxSizing: 'border-box',
- padding: 12,
- },
- weeklyTradeVolumeLabel: {
- fontSize: 14,
- color: colors.mediumBlue,
- },
- subLabel: {
- fontSize: 12,
- color: colors.lightGrey,
- },
- relayerNameLabel: {
- fontSize: 16,
- fontWeight: 'bold',
- color: colors.black,
- },
-};
-
-const FALLBACK_IMG_SRC = '/images/relayer_fallback.png';
-const FALLBACK_PRIMARY_COLOR = colors.grey300;
-const NO_CONTENT_MESSAGE = '--';
-const RELAYER_ICON_HEIGHT = '110px';
-
-export const RelayerGridTile: React.StatelessComponent<RelayerGridTileProps> = (props: RelayerGridTileProps) => {
- const link = props.relayerInfo.appUrl || props.relayerInfo.url;
- const topTokens = props.relayerInfo.topTokens;
- const weeklyTxnVolume = props.relayerInfo.weeklyTxnVolume;
- const onClick = () => {
- analytics.track('Relayer Click', {
- name: props.relayerInfo.name,
- });
- utils.openUrl(link);
- };
- const headerImageUrl = props.relayerInfo.logoImgUrl;
- const headerBackgroundColor =
- !_.isUndefined(headerImageUrl) && !_.isUndefined(props.relayerInfo.primaryColor)
- ? props.relayerInfo.primaryColor
- : FALLBACK_PRIMARY_COLOR;
- const isExpanded = props.style === RelayerGridTileStyle.Expanded;
- const headerStyle = isExpanded ? styles.expandedHeader : styles.minimizedHeader;
- return (
- <Island style={styles.root} Component={GridTile}>
- <div style={styles.innerDiv} onClick={onClick}>
- <div className="flex items-center" style={{ ...headerStyle, backgroundColor: headerBackgroundColor }}>
- <Image
- className="mx-auto"
- src={props.relayerInfo.logoImgUrl}
- fallbackSrc={FALLBACK_IMG_SRC}
- height={RELAYER_ICON_HEIGHT}
- />
- </div>
- {isExpanded && (
- <div style={styles.body}>
- <div className="pb1" style={styles.relayerNameLabel}>
- {props.relayerInfo.name}
- </div>
- <Section titleText="Weekly Trade Volume">
- {!_.isUndefined(weeklyTxnVolume) && (
- <div style={styles.weeklyTradeVolumeLabel}>{props.relayerInfo.weeklyTxnVolume}</div>
- )}
- </Section>
- <Container marginTop="10px">
- <Section titleText="Top Tokens">
- {!_.isEmpty(topTokens) && <TopTokens tokens={topTokens} networkId={props.networkId} />}
- </Section>
- </Container>
- </div>
- )}
- </div>
- </Island>
- );
-};
-
-const GridTile = styled(PlainGridTile)`
- cursor: pointer;
- &:hover {
- transition: transform 0.2s ease;
- transform: translate(0px, -3px);
- }
- ${media.small`
- transform: none !important;
- transition: none !important;
- `};
-`;
-
-interface SectionProps {
- titleText: string;
- children?: React.ReactNode;
-}
-const Section = (props: SectionProps) => {
- return (
- <div>
- <div style={styles.subLabel}>{props.titleText}</div>
- <Container marginTop="6px">{props.children || <NoContent />}</Container>
- </div>
- );
-};
-
-const NoContent = () => <div style={styles.subLabel}>{NO_CONTENT_MESSAGE}</div>;
diff --git a/packages/website/ts/components/relayer_index/relayer_index.tsx b/packages/website/ts/components/relayer_index/relayer_index.tsx
deleted file mode 100644
index e88c20d7e..000000000
--- a/packages/website/ts/components/relayer_index/relayer_index.tsx
+++ /dev/null
@@ -1,126 +0,0 @@
-import * as _ from 'lodash';
-import CircularProgress from 'material-ui/CircularProgress';
-import { GridList } from 'material-ui/GridList';
-import * as React from 'react';
-
-import { RelayerGridTile, RelayerGridTileStyle } from 'ts/components/relayer_index/relayer_grid_tile';
-import { Retry } from 'ts/components/ui/retry';
-import { ScreenWidths, WebsiteBackendRelayerInfo } from 'ts/types';
-import { backendClient } from 'ts/utils/backend_client';
-
-export enum RelayerIndexCellStyle {
- Expanded = 0,
- Minimized,
-}
-
-export interface RelayerIndexProps {
- networkId: number;
- screenWidth: ScreenWidths;
- cellStyle: RelayerIndexCellStyle;
-}
-
-interface RelayerIndexState {
- relayerInfos?: WebsiteBackendRelayerInfo[];
- error?: Error;
-}
-
-const CELL_HEIGHT_EXPANDED = 290;
-const CELL_HEIGHT_MINIMIZED = 225;
-const NUMBER_OF_COLUMNS_LARGE = 3;
-const NUMBER_OF_COLUMNS_MEDIUM = 2;
-const NUMBER_OF_COLUMNS_SMALL = 2;
-const GRID_PADDING = 20;
-
-export class RelayerIndex extends React.Component<RelayerIndexProps, RelayerIndexState> {
- private _isUnmounted: boolean;
- constructor(props: RelayerIndexProps) {
- super(props);
- this._isUnmounted = false;
- this.state = {
- relayerInfos: undefined,
- error: undefined,
- };
- }
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._fetchRelayerInfosAsync();
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const isReadyToRender = _.isUndefined(this.state.error) && !_.isUndefined(this.state.relayerInfos);
- if (!isReadyToRender) {
- return (
- // TODO: consolidate this loading component with the one in portal and OpenPositions
- // TODO: possibly refactor into a generic loading container with spinner and retry UI
- <div className="center">
- {_.isUndefined(this.state.error) ? (
- <CircularProgress size={40} thickness={5} />
- ) : (
- <Retry onRetry={this._fetchRelayerInfosAsync.bind(this)} />
- )}
- </div>
- );
- } else {
- const numberOfRelayers = this.state.relayerInfos.length;
- const numberOfColumns = Math.min(
- numberOfRelayers,
- this._numberOfColumnsForScreenWidth(this.props.screenWidth),
- );
- const isExpanded = this.props.cellStyle === RelayerIndexCellStyle.Expanded;
- const cellHeight = isExpanded ? CELL_HEIGHT_EXPANDED : CELL_HEIGHT_MINIMIZED;
- const gridTileStyle = isExpanded ? RelayerGridTileStyle.Expanded : RelayerGridTileStyle.Minimized;
- return (
- <GridList
- cellHeight={cellHeight}
- cols={numberOfColumns}
- padding={GRID_PADDING}
- style={{ marginTop: -10, marginBottom: 0 }}
- >
- {this.state.relayerInfos.map((relayerInfo: WebsiteBackendRelayerInfo, index) => (
- <RelayerGridTile
- key={index}
- relayerInfo={relayerInfo}
- networkId={this.props.networkId}
- style={gridTileStyle}
- />
- ))}
- </GridList>
- );
- }
- }
- private async _fetchRelayerInfosAsync(): Promise<void> {
- try {
- if (!this._isUnmounted) {
- this.setState({
- relayerInfos: undefined,
- error: undefined,
- });
- }
- const relayerInfos = await backendClient.getRelayerInfosAsync();
- if (!this._isUnmounted) {
- this.setState({
- relayerInfos,
- });
- }
- } catch (error) {
- if (!this._isUnmounted) {
- this.setState({
- error,
- });
- }
- }
- }
- private _numberOfColumnsForScreenWidth(screenWidth: ScreenWidths): number {
- switch (screenWidth) {
- case ScreenWidths.Md:
- return NUMBER_OF_COLUMNS_MEDIUM;
- case ScreenWidths.Sm:
- return NUMBER_OF_COLUMNS_SMALL;
- case ScreenWidths.Lg:
- default:
- return NUMBER_OF_COLUMNS_LARGE;
- }
- }
-}
diff --git a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx b/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
deleted file mode 100644
index 558d99855..000000000
--- a/packages/website/ts/components/relayer_index/relayer_top_tokens.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { WebsiteBackendTokenInfo } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { utils } from 'ts/utils/utils';
-
-export interface TopTokensProps {
- tokens: WebsiteBackendTokenInfo[];
- networkId: number;
-}
-
-export const TopTokens: React.StatelessComponent<TopTokensProps> = (props: TopTokensProps) => {
- return (
- <div className="flex">
- {_.map(props.tokens, (tokenInfo: WebsiteBackendTokenInfo) => {
- return (
- <Container key={tokenInfo.address} marginRight="16px">
- <TokenLink tokenInfo={tokenInfo} networkId={props.networkId} />
- </Container>
- );
- })}
- </div>
- );
-};
-
-interface TokenLinkProps {
- tokenInfo: WebsiteBackendTokenInfo;
- networkId: number;
-}
-interface TokenLinkState {}
-
-class TokenLink extends React.Component<TokenLinkProps, TokenLinkState> {
- constructor(props: TokenLinkProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public render(): React.ReactNode {
- const onClick = (event: React.MouseEvent<HTMLElement>) => {
- event.stopPropagation();
- analytics.track('Token Click', {
- tokenSymbol: this.props.tokenInfo.symbol,
- });
- const tokenLink = this._tokenLinkFromToken(this.props.tokenInfo, this.props.networkId);
- utils.openUrl(tokenLink);
- };
- return (
- <Text fontSize="14px" fontColor={colors.mediumBlue} onClick={onClick}>
- {this.props.tokenInfo.symbol}
- </Text>
- );
- }
- private _tokenLinkFromToken(tokenInfo: WebsiteBackendTokenInfo, networkId: number): string {
- return sharedUtils.getEtherScanLinkIfExists(tokenInfo.address, networkId, EtherscanLinkSuffixes.Address);
- }
-}
diff --git a/packages/website/ts/components/sections/landing/about.tsx b/packages/website/ts/components/sections/landing/about.tsx
deleted file mode 100644
index 9c369d83a..000000000
--- a/packages/website/ts/components/sections/landing/about.tsx
+++ /dev/null
@@ -1,81 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { Button } from 'ts/components/button';
-import { Icon, InlineIconWrap } from 'ts/components/icon';
-import { Column, FlexWrap, Section } from 'ts/components/newLayout';
-import { Paragraph } from 'ts/components/text';
-import { WebsitePaths } from 'ts/types';
-
-interface FigureProps {
- value: string;
- description: string;
-}
-
-export const SectionLandingAbout = () => (
- <Section bgColor="dark" isTextCentered={true}>
- <InlineIconWrap>
- <Icon name="descriptionCoin" size="small" />
- <Icon name="descriptionCopy" size="small" />
- <Icon name="descriptionFlask" size="small" />
- <Icon name="descriptionBolt" size="small" />
- </InlineIconWrap>
-
- <Paragraph size="large" isCentered={true} isMuted={1} padding={['large', 0, 'default', 0]}>
- Anyone in the world can use 0x to service a wide variety of markets ranging from gaming items to financial
- instruments to assets that could have never existed before.
- </Paragraph>
-
- <DeveloperLink href={`${WebsitePaths.Why}#cases`} isWithArrow={true} isAccentColor={true}>
- Discover how developers use 0x
- </DeveloperLink>
-
- <hr
- style={{
- width: '100%',
- maxWidth: '340px',
- borderColor: '#3C4746',
- margin: '60px auto',
- }}
- />
-
- <FlexWrap as="dl">
- <Figure value="353K" description="Total Transactions" />
-
- <Figure value="$447M" description="Total Volume" />
-
- <Figure value="30+" description="Total Projects" />
- </FlexWrap>
- </Section>
-);
-
-const Figure = (props: FigureProps) => (
- <Column padding="0 30px">
- <FigureValue>{props.value}</FigureValue>
- <FigureDescription>{props.description}</FigureDescription>
- </Column>
-);
-
-const DeveloperLink = styled(Button)`
- @media (max-width: 500px) {
- && {
- white-space: pre-wrap;
- line-height: 1.3;
- }
- }
-`;
-
-const FigureValue = styled.dt`
- font-size: 50px;
- font-weight: 300;
- margin-bottom: 15px;
-
- @media (max-width: 768px) {
- font-size: 40px;
- }
-`;
-
-const FigureDescription = styled.dd`
- font-size: 18px;
- color: #999999;
-`;
diff --git a/packages/website/ts/components/sections/landing/clients.tsx b/packages/website/ts/components/sections/landing/clients.tsx
deleted file mode 100644
index 4d83a1d2f..000000000
--- a/packages/website/ts/components/sections/landing/clients.tsx
+++ /dev/null
@@ -1,110 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-import { Heading } from 'ts/components/text';
-
-import { Section, WrapGrid } from 'ts/components/newLayout';
-
-interface ProjectLogo {
- name: string;
- imageUrl?: string;
- persistOnMobile?: boolean;
-}
-
-interface StyledProjectInterface {
- isOnMobile?: boolean;
-}
-
-const projects: ProjectLogo[] = [
- {
- name: 'Radar Relay',
- imageUrl: 'images/clients/radar-relay.svg',
- persistOnMobile: true,
- },
- {
- name: 'Paradex',
- imageUrl: 'images/clients/paradex.svg',
- persistOnMobile: true,
- },
- {
- name: 'Star Bit Ex',
- imageUrl: 'images/clients/starbitex.svg',
- },
- {
- name: 'LedgerDex',
- imageUrl: 'images/clients/ledgerdex.svg',
- },
- {
- name: 'OpenRelay',
- imageUrl: 'images/clients/openrelay.svg',
- persistOnMobile: true,
- },
- {
- name: 'Bamboo Relay',
- imageUrl: 'images/clients/bamboo.svg',
- persistOnMobile: true,
- },
- {
- name: 'dEX',
- imageUrl: 'images/clients/ercdex.svg',
- persistOnMobile: true,
- },
- {
- name: 'emoon',
- imageUrl: 'images/clients/emoon.svg',
- persistOnMobile: true,
- },
- {
- name: 'Gods Unchained',
- imageUrl: 'images/clients/godsUnchained.svg',
- },
- {
- name: 'Instex',
- imageUrl: 'images/clients/instex.svg',
- },
- {
- name: 'Lake Trade',
- imageUrl: 'images/clients/laketrade.svg',
- },
- {
- name: 'Veil',
- imageUrl: 'images/clients/veil.svg',
- },
-];
-
-export const SectionLandingClients = () => (
- <Section isTextCentered={true}>
- <Heading size="small">Join the growing number of projects developing on 0x</Heading>
-
- <WrapGrid isWrapped={true}>
- {_.map(projects, (item: ProjectLogo, index) => (
- <StyledProject key={`client-${index}`} isOnMobile={item.persistOnMobile}>
- <img src={item.imageUrl} alt={item.name} />
- </StyledProject>
- ))}
- </WrapGrid>
- </Section>
-);
-
-const StyledProject = styled.div<StyledProjectInterface>`
- flex-shrink: 0;
-
- img {
- object-fit: contain;
- width: 100%;
- height: 100%;
- }
-
- @media (min-width: 768px) {
- width: auto;
- height: 50px;
- margin: 30px;
- }
-
- @media (max-width: 768px) {
- width: auto;
- height: 42px;
- margin: 15px;
- display: ${props => !props.isOnMobile && 'none'};
- }
-`;
diff --git a/packages/website/ts/components/sections/landing/cta.tsx b/packages/website/ts/components/sections/landing/cta.tsx
deleted file mode 100644
index ec5a58a58..000000000
--- a/packages/website/ts/components/sections/landing/cta.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from 'react';
-
-import { BlockIconLink } from 'ts/components/blockIconLink';
-import { Section } from 'ts/components/newLayout';
-
-import { AnimatedChatIcon } from 'ts/components/animatedChatIcon';
-import { AnimatedCompassIcon } from 'ts/components/animatedCompassIcon';
-import { WebsitePaths } from 'ts/types';
-
-interface Props {
- onContactClick?: () => void;
-}
-
-export const SectionLandingCta = (props: Props) => (
- <Section isPadded={false} isFlex={true} maxWidth="auto" wrapWidth="100%" flexBreakpoint="900px">
- <BlockIconLink
- iconComponent={<AnimatedCompassIcon />}
- title="Ready to build on 0x?"
- linkLabel="Get Started"
- linkUrl={WebsitePaths.Docs}
- />
- <BlockIconLink
- iconComponent={<AnimatedChatIcon />}
- title="Want help from the 0x team?"
- linkLabel="Get in Touch"
- linkAction={props.onContactClick}
- />
- </Section>
-);
diff --git a/packages/website/ts/components/sections/landing/hero.tsx b/packages/website/ts/components/sections/landing/hero.tsx
deleted file mode 100644
index 489757286..000000000
--- a/packages/website/ts/components/sections/landing/hero.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-
-import { Button } from 'ts/components/button';
-import { Hero } from 'ts/components/hero';
-import { LandingAnimation } from 'ts/components/heroImage';
-
-import { HeroAnimation } from 'ts/components/heroAnimation';
-import { WebsitePaths } from 'ts/types';
-
-export const SectionLandingHero = () => (
- <Hero
- title="Powering Decentralized Exchange"
- isLargeTitle={true}
- isFullWidth={true}
- description="0x is an open protocol that enables the peer-to-peer exchange of assets on the Ethereum blockchain."
- figure={<LandingAnimation image={<HeroAnimation />} />}
- actions={<HeroActions />}
- />
-);
-
-const HeroActions = () => (
- <>
- <Button href="https://0x.org/docs" isInline={true}>
- Get Started
- </Button>
-
- <Button to={WebsitePaths.Why} isTransparent={true} isInline={true}>
- Learn More
- </Button>
- </>
-);
diff --git a/packages/website/ts/components/send_button.tsx b/packages/website/ts/components/send_button.tsx
deleted file mode 100644
index 27438e5d5..000000000
--- a/packages/website/ts/components/send_button.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { BigNumber, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import RaisedButton from 'material-ui/RaisedButton';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { SendDialog } from 'ts/components/dialogs/send_dialog';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { BlockchainCallErrs, Token } from 'ts/types';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-interface SendButtonProps {
- userAddress: string;
- networkId: number;
- asset: Token | 'ETH';
- dispatcher: Dispatcher;
- blockchain: Blockchain;
- onError: () => void;
- lastForceTokenStateRefetch: number;
- refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
-}
-
-interface SendButtonState {
- isSendDialogVisible: boolean;
- isSending: boolean;
-}
-
-export class SendButton extends React.Component<SendButtonProps, SendButtonState> {
- public constructor(props: SendButtonProps) {
- super(props);
- this.state = {
- isSendDialogVisible: false,
- isSending: false,
- };
- }
- public render(): React.ReactNode {
- const labelStyle = this.state.isSending ? { fontSize: 10 } : {};
- return (
- <div>
- <RaisedButton
- style={{ width: '100%' }}
- labelStyle={labelStyle}
- disabled={this.state.isSending}
- label={this.state.isSending ? 'Sending...' : 'Send'}
- onClick={this._toggleSendDialog.bind(this)}
- />
- <SendDialog
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- isOpen={this.state.isSendDialogVisible}
- onComplete={this._onSendAmountSelectedAsync.bind(this)}
- onCancelled={this._toggleSendDialog.bind(this)}
- asset={this.props.asset}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- />
- </div>
- );
- }
- private _toggleSendDialog(): void {
- this.setState({
- isSendDialogVisible: !this.state.isSendDialogVisible,
- });
- }
- private async _onSendAmountSelectedAsync(recipient: string, value: BigNumber): Promise<void> {
- this.setState({
- isSending: true,
- });
- this._toggleSendDialog();
- try {
- if (this.props.asset === 'ETH') {
- await this.props.blockchain.sendAsync(recipient, value);
- } else {
- const token = this.props.asset;
- await this.props.blockchain.transferAsync(token, recipient, value);
- await this.props.refetchTokenStateAsync(token.address);
- }
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return;
- } else if (!utils.didUserDenyWeb3Request(errMsg)) {
- logUtils.log(`Unexpected error encountered: ${err}`);
- logUtils.log(err.stack);
- this.props.onError();
- errorReporter.report(err);
- }
- }
- this.setState({
- isSending: false,
- });
- }
-}
diff --git a/packages/website/ts/components/siteWrap.tsx b/packages/website/ts/components/siteWrap.tsx
deleted file mode 100644
index 1f0902105..000000000
--- a/packages/website/ts/components/siteWrap.tsx
+++ /dev/null
@@ -1,146 +0,0 @@
-import * as React from 'react';
-import styled, { ThemeProvider } from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Footer } from 'ts/components/footer';
-import { Header } from 'ts/components/header';
-import { GlobalStyles } from 'ts/constants/globalStyle';
-
-interface Props {
- theme?: 'dark' | 'light' | 'gray';
- children: any;
-}
-
-interface State {
- isMobileNavOpen: boolean;
-}
-
-interface MainProps {
- isNavToggled: boolean;
-}
-
-export interface ThemeValuesInterface {
- bgColor: string;
- darkBgColor?: string;
- lightBgColor: string;
- introTextColor: string;
- textColor: string;
- paragraphColor: string;
- linkColor: string;
- mobileNavBgUpper: string;
- mobileNavBgLower: string;
- mobileNavColor: string;
- dropdownBg: string;
- dropdownButtonBg: string;
- dropdownBorderColor?: string;
- dropdownColor: string;
- headerButtonBg: string;
- footerBg: string;
- footerColor: string;
-}
-
-export interface ThemeInterface {
- [key: string]: ThemeValuesInterface;
-}
-
-const GLOBAL_THEMES: ThemeInterface = {
- dark: {
- bgColor: '#000000',
- darkBgColor: '#111A19',
- lightBgColor: '#003831',
- introTextColor: 'rgba(255, 255, 255, 0.75)',
- textColor: '#FFFFFF',
- paragraphColor: '#FFFFFF',
- linkColor: colors.brandLight,
- mobileNavBgUpper: '#003831',
- mobileNavBgLower: '#022924',
- mobileNavColor: '#FFFFFF',
- dropdownBg: '#111A19',
- dropdownButtonBg: '#003831',
- dropdownColor: '#FFFFFF',
- headerButtonBg: '#00AE99',
- footerBg: '#181818',
- footerColor: '#FFFFFF',
- },
- light: {
- bgColor: '#FFFFFF',
- lightBgColor: '#F3F6F4',
- darkBgColor: '#003831',
- introTextColor: 'rgba(92, 92, 92, 0.87)',
- textColor: '#000000',
- paragraphColor: '#474747',
- linkColor: colors.brandDark,
- mobileNavBgUpper: '#FFFFFF',
- mobileNavBgLower: '#F3F6F4',
- mobileNavColor: '#000000',
- dropdownBg: '#FBFBFB',
- dropdownButtonBg: '#F3F6F4',
- dropdownColor: '#003831',
- dropdownBorderColor: '#E4E4E4',
- headerButtonBg: '#003831',
- footerBg: '#F2F2F2',
- footerColor: '#000000',
- },
- gray: {
- bgColor: '#e0e0e0',
- lightBgColor: '#003831',
- introTextColor: 'rgba(92, 92, 92, 0.87)',
- textColor: '#000000',
- paragraphColor: '#777777',
- linkColor: colors.brandDark,
- mobileNavBgUpper: '#FFFFFF',
- mobileNavBgLower: '#F3F6F4',
- mobileNavColor: '#000000',
- dropdownBg: '#FFFFFF',
- dropdownButtonBg: '#F3F6F4',
- dropdownColor: '#003831',
- headerButtonBg: '#003831',
- footerBg: '#181818',
- footerColor: '#FFFFFF',
- },
-};
-
-export class SiteWrap extends React.Component<Props, State> {
- public state = {
- isMobileNavOpen: false,
- };
-
- public componentDidMount(): void {
- document.documentElement.style.overflowY = 'auto';
- window.scrollTo(0, 0);
- }
-
- public toggleMobileNav = () => {
- this.setState({
- isMobileNavOpen: !this.state.isMobileNavOpen,
- });
- };
-
- public render(): React.ReactNode {
- const { children, theme = 'dark' } = this.props;
- const { isMobileNavOpen } = this.state;
- const currentTheme = GLOBAL_THEMES[theme];
-
- return (
- <>
- <ThemeProvider theme={currentTheme}>
- <>
- <GlobalStyles />
-
- <Header isNavToggled={isMobileNavOpen} toggleMobileNav={this.toggleMobileNav} />
-
- <Main isNavToggled={isMobileNavOpen}>{children}</Main>
-
- <Footer />
- </>
- </ThemeProvider>
- </>
- );
- }
-}
-
-const Main = styled.main<MainProps>`
- transition: transform 0.5s, opacity 0.5s;
- opacity: ${props => props.isNavToggled && '0.5'};
-`;
diff --git a/packages/website/ts/components/slider/slider.tsx b/packages/website/ts/components/slider/slider.tsx
deleted file mode 100644
index f0a29f894..000000000
--- a/packages/website/ts/components/slider/slider.tsx
+++ /dev/null
@@ -1,177 +0,0 @@
-import * as React from 'react';
-import Flickity from 'react-flickity-component';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Icon } from 'ts/components/icon';
-import { Heading, Paragraph } from 'ts/components/text';
-
-interface SliderProps {}
-
-interface SlideProps {
- icon: string;
- heading: string;
- text: string;
- href?: string;
-}
-
-const flickityOptions = {
- initialIndex: 0,
- cellAlign: 'left',
- arrowShape:
- 'M0 50.766L42.467 93.58l5.791-5.839-32.346-32.61H100V46.84H15.48L50.2 11.838 44.409 6 5.794 44.93l-.003-.003z',
- prevNextButtons: true,
-};
-
-export const Slide: React.StatelessComponent<SlideProps> = (props: SlideProps) => {
- const { heading, text, icon } = props;
-
- return (
- <StyledSlide>
- <SlideHead>
- <Icon name={icon} size="large" />
- </SlideHead>
- <SlideContent>
- <Heading asElement="h4" size="small" marginBottom="15px">
- {heading}
- </Heading>
- <Paragraph isMuted={true}>{text}</Paragraph>
- </SlideContent>
- </StyledSlide>
- );
-};
-
-export const Slider: React.StatelessComponent<SliderProps> = props => {
- return (
- <StyledSlider>
- <Flickity
- className={'carousel'} // default ''
- elementType={'div'} // default 'div'
- options={flickityOptions} // takes flickity options {}
- disableImagesLoaded={false} // default false
- >
- {props.children}
- </Flickity>
- </StyledSlider>
- );
-};
-
-const StyledSlider = styled.div`
- //overflow: hidden;
- width: 100%;
- height: 520px;
-
- @media (max-width: 500px) {
- height: 450px;
- }
-
- .carousel {
- display: block;
- user-select: none;
- touch-action: pan-y;
- -webkit-tap-highlight-color: transparent;
- outline: none;
-
- @media (max-width: 500px) {
- overflow: hidden;
- margin-left: -20px;
- width: calc(100vw - 20px);
- }
- }
-
- .flickity-viewport {
- outline: none;
- }
-
- .flickity-button {
- cursor: pointer;
- position: absolute;
- width: 74px;
- height: 74px;
- background-color: #000;
- display: flex;
- outline: 0;
- top: calc(50% - 37px);
- border: 0;
- padding: 0;
- transition: background-color 0.4s ease-in-out, visibility 0.4s ease-in-out, opacity 0.4s ease-in-out;
-
- &:disabled {
- opacity: 0;
- visibility: hidden;
- }
-
- &:hover {
- background-color: hsla(0, 0%, 10%, 1);
- }
-
- &.previous {
- left: 0;
- }
-
- &.next {
- right: 0;
- }
-
- svg {
- margin: auto;
- width: 28px;
- height: auto;
- }
-
- path {
- fill: #fff;
- }
- }
-`;
-
-const StyledSlide = styled.div`
- background-color: ${colors.backgroundDark};
- width: 560px;
- height: 520px;
- flex: 0 0 auto;
- opacity: 0.3;
- transition: opacity 0.4s ease-in-out;
-
- & + & {
- margin-left: 30px;
- }
-
- @media (max-width: 1200px) {
- width: 100%;
- }
-
- @media (max-width: 500px) {
- width: calc(100vw - 10px - 30px);
- height: 450px;
-
- & + & {
- margin-left: 10px;
- }
- }
-
- &.is-selected {
- opacity: 1;
- }
-`;
-
-const SlideHead = styled.div`
- background-color: ${colors.brandDark};
- height: 300px;
- display: flex;
- justify-content: center;
- align-items: center;
-
- @media (max-width: 500px) {
- height: 240px;
- }
-`;
-
-const SlideContent = styled.div`
- padding: 30px;
-
- @media (max-width: 500px) {
- padding: 20px;
- }
-`;
diff --git a/packages/website/ts/components/text.tsx b/packages/website/ts/components/text.tsx
deleted file mode 100644
index a47e61ef3..000000000
--- a/packages/website/ts/components/text.tsx
+++ /dev/null
@@ -1,77 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-import { getCSSPadding, PaddingInterface } from 'ts/constants/utilities';
-
-interface BaseTextInterface extends PaddingInterface {
- size?: 'default' | 'medium' | 'large' | 'small' | number;
- isCentered?: boolean;
- textAlign?: string;
-}
-
-interface HeadingProps extends BaseTextInterface {
- asElement?: 'h1' | 'h2' | 'h3' | 'h4';
- maxWidth?: string;
- fontWeight?: string;
- isCentered?: boolean;
- isFlex?: boolean;
- isNoMargin?: boolean;
- isMuted?: boolean | number;
- marginBottom?: string;
- color?: string;
-}
-
-interface ParagraphProps extends BaseTextInterface {
- isNoMargin?: boolean;
- marginBottom?: string; // maybe we should remove isNoMargin
- isMuted?: boolean | number;
- fontWeight?: string | number;
-}
-
-const StyledHeading = styled.h1<HeadingProps>`
- max-width: ${props => props.maxWidth};
- color: ${props => props.color || props.theme.textColor};
- display: ${props => props.isFlex && `inline-flex`};
- align-items: center;
- justify-content: ${props => props.isFlex && `space-between`};
- font-size: ${props =>
- typeof props.size === 'string' ? `var(--${props.size || 'default'}Heading)` : `${props.size}px`};
- line-height: ${props => `var(--${props.size || 'default'}HeadingHeight)`};
- text-align: ${props => props.isCentered && 'center'};
- padding: ${props => props.padding && getCSSPadding(props.padding)};
- margin-left: ${props => props.isCentered && 'auto'};
- margin-right: ${props => props.isCentered && 'auto'};
- margin-bottom: ${props => !props.isNoMargin && (props.marginBottom || '30px')};
- opacity: ${props => (typeof props.isMuted === 'boolean' ? 0.75 : props.isMuted)};
- font-weight: ${props => (props.fontWeight ? props.fontWeight : ['h4'].includes(props.asElement) ? 400 : 300)};
- width: ${props => props.isFlex && `100%`};
-`;
-
-export const Heading: React.StatelessComponent<HeadingProps> = props => {
- const { asElement = 'h1', children } = props;
- const Component = StyledHeading.withComponent(asElement);
-
- return <Component {...props}>{children}</Component>;
-};
-
-Heading.defaultProps = {
- size: 'default',
-};
-
-// No need to declare it twice as Styled then rewrap as a stateless comp
-// Note: this would be useful to be implemented the same way was "Heading"
-// and be more generic. e.g. <Text /> with a props asElement so we can use it
-// for literally anything =
-export const Paragraph = styled.p<ParagraphProps>`
- font-size: ${props => `var(--${props.size || 'default'}Paragraph)`};
- font-weight: ${props => props.fontWeight || 300};
- margin-bottom: ${props => !props.isNoMargin && (props.marginBottom || '30px')};
- padding: ${props => props.padding && getCSSPadding(props.padding)};
- color: ${props => props.color || props.theme.paragraphColor};
- opacity: ${props => (typeof props.isMuted === 'boolean' ? 0.75 : props.isMuted)};
- text-align: ${props => (props.textAlign ? props.textAlign : props.isCentered && 'center')};
- line-height: 1.4;
-`;
-
-Paragraph.defaultProps = {
- isMuted: true,
-};
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx
deleted file mode 100644
index e8f2a6461..000000000
--- a/packages/website/ts/components/token_balances.tsx
+++ /dev/null
@@ -1,658 +0,0 @@
-import {
- constants as sharedConstants,
- EtherscanLinkSuffixes,
- Networks,
- Styles,
- utils as sharedUtils,
-} from '@0x/react-shared';
-import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import Dialog from 'material-ui/Dialog';
-import Divider from 'material-ui/Divider';
-import FlatButton from 'material-ui/FlatButton';
-import FloatingActionButton from 'material-ui/FloatingActionButton';
-import ContentAdd from 'material-ui/svg-icons/content/add';
-import ContentRemove from 'material-ui/svg-icons/content/remove';
-import { Table, TableBody, TableHeader, TableHeaderColumn, TableRow, TableRowColumn } from 'material-ui/Table';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import firstBy from 'thenby';
-import { Blockchain } from 'ts/blockchain';
-import { AssetPicker } from 'ts/components/generate_order/asset_picker';
-import { SendButton } from 'ts/components/send_button';
-import { HelpTooltip } from 'ts/components/ui/help_tooltip';
-import { LifeCycleRaisedButton } from 'ts/components/ui/lifecycle_raised_button';
-import { TokenIcon } from 'ts/components/ui/token_icon';
-import { AllowanceStateToggle } from 'ts/containers/inputs/allowance_state_toggle';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import {
- BalanceErrs,
- BlockchainCallErrs,
- BlockchainErrs,
- ScreenWidths,
- Token,
- TokenByAddress,
- TokenStateByAddress,
- TokenVisibility,
-} from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-const ETHER_ICON_PATH = '/images/ether.png';
-const ETHER_TOKEN_SYMBOL = 'WETH';
-const ZRX_TOKEN_SYMBOL = 'ZRX';
-
-const ICON_DIMENSION = 40;
-const ARTIFICIAL_FAUCET_REQUEST_DELAY = 1000;
-const TOKEN_TABLE_ROW_HEIGHT = 60;
-const MAX_TOKEN_TABLE_HEIGHT = 420;
-const TOKEN_COL_SPAN_LG = 2;
-const TOKEN_COL_SPAN_SM = 1;
-
-const styles: Styles = {
- bgColor: {
- backgroundColor: 'transparent',
- },
-};
-
-interface TokenBalancesProps {
- blockchain: Blockchain;
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- dispatcher: Dispatcher;
- screenWidth: ScreenWidths;
- tokenByAddress: TokenByAddress;
- trackedTokens: Token[];
- userAddress: string;
- userEtherBalanceInWei: BigNumber;
- networkId: number;
- lastForceTokenStateRefetch: number;
- isFullWidth?: boolean;
-}
-
-interface TokenBalancesState {
- errorType: BalanceErrs;
- trackedTokenStateByAddress: TokenStateByAddress;
- isBalanceSpinnerVisible: boolean;
- isZRXSpinnerVisible: boolean;
- isTokenPickerOpen: boolean;
- isAddingToken: boolean;
-}
-
-export class TokenBalances extends React.Component<TokenBalancesProps, TokenBalancesState> {
- public static defaultProps: Partial<TokenBalancesProps> = {
- userEtherBalanceInWei: new BigNumber(0),
- isFullWidth: false,
- };
- private _isUnmounted: boolean;
- public constructor(props: TokenBalancesProps) {
- super(props);
- this._isUnmounted = false;
- const initialTrackedTokenStateByAddress = this._getInitialTrackedTokenStateByAddress(props.trackedTokens);
- this.state = {
- errorType: undefined,
- isBalanceSpinnerVisible: false,
- isZRXSpinnerVisible: false,
- isTokenPickerOpen: false,
- isAddingToken: false,
- trackedTokenStateByAddress: initialTrackedTokenStateByAddress,
- };
- }
- public componentWillMount(): void {
- const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public componentWillReceiveProps(nextProps: TokenBalancesProps): void {
- if (nextProps.userEtherBalanceInWei !== this.props.userEtherBalanceInWei) {
- if (this.state.isBalanceSpinnerVisible) {
- const receivedAmountInWei = nextProps.userEtherBalanceInWei.minus(this.props.userEtherBalanceInWei);
- const receivedAmountInEth = Web3Wrapper.toUnitAmount(receivedAmountInWei, constants.DECIMAL_PLACES_ETH);
- const networkName = sharedConstants.NETWORK_NAME_BY_ID[this.props.networkId];
- this.props.dispatcher.showFlashMessage(
- `Received ${receivedAmountInEth.toString(10)} ${networkName} Ether`,
- );
- }
- this.setState({
- isBalanceSpinnerVisible: false,
- });
- }
-
- if (
- nextProps.userAddress !== this.props.userAddress ||
- nextProps.networkId !== this.props.networkId ||
- nextProps.lastForceTokenStateRefetch !== this.props.lastForceTokenStateRefetch
- ) {
- const trackedTokenAddresses = _.keys(this.state.trackedTokenStateByAddress);
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(trackedTokenAddresses);
- }
-
- if (!_.isEqual(nextProps.trackedTokens, this.props.trackedTokens)) {
- const newTokens = _.difference(nextProps.trackedTokens, this.props.trackedTokens);
- const newTokenAddresses = _.map(newTokens, token => token.address);
- // Add placeholder entry for this token to the state, since fetching the
- // balance/allowance is asynchronous
- const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress;
- for (const tokenAddress of newTokenAddresses) {
- trackedTokenStateByAddress[tokenAddress] = {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- };
- }
- this.setState({
- trackedTokenStateByAddress,
- });
- // Fetch the actual balance/allowance.
- // tslint:disable-next-line:no-floating-promises
- this._fetchBalancesAndAllowancesAsync(newTokenAddresses);
- }
- }
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- }
- public render(): React.ReactNode {
- const errorDialogActions = [
- <FlatButton
- key="errorOkBtn"
- label="Ok"
- primary={true}
- onClick={this._onErrorDialogToggle.bind(this, false)}
- />,
- ];
- const isTestNetwork = utils.isTestNetwork(this.props.networkId);
- const stubColumnStyle = {
- display: isTestNetwork ? 'none' : 'table-cell',
- };
- const allTokenRowHeight = _.size(this.props.tokenByAddress) * TOKEN_TABLE_ROW_HEIGHT;
- const tokenTableHeight =
- allTokenRowHeight < MAX_TOKEN_TABLE_HEIGHT ? allTokenRowHeight : MAX_TOKEN_TABLE_HEIGHT;
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- const tokenColSpan = isSmallScreen ? TOKEN_COL_SPAN_SM : TOKEN_COL_SPAN_LG;
- const allowanceExplanation =
- '0x smart contracts require access to your<br> \
- token balances in order to execute trades.<br> \
- Toggling sets an allowance for the<br> \
- smart contract so you can start trading that token.';
- const userEtherBalanceInEth = Web3Wrapper.toUnitAmount(
- this.props.userEtherBalanceInWei,
- constants.DECIMAL_PLACES_ETH,
- );
- const rootClassName = this.props.isFullWidth ? 'pb2' : 'lg-px4 md-px4 sm-px1 pb2';
- return (
- <div className={rootClassName}>
- <h3>{isTestNetwork ? 'Test ether' : 'Ether'}</h3>
- <Divider />
- <div className="pt2 pb2">
- {isTestNetwork
- ? 'In order to try out the 0x Portal Dapp, request some test ether to pay for \
- gas costs. It might take a bit of time for the test ether to show up.'
- : 'Ether must be converted to Ether Tokens in order to be tradable via 0x. \
- You can convert between Ether and Ether Tokens from the "Wrap ETH" tab.'}
- </div>
- <Table selectable={false} style={styles.bgColor}>
- <TableHeader displaySelectAll={false} adjustForCheckbox={false}>
- <TableRow>
- <TableHeaderColumn>Currency</TableHeaderColumn>
- <TableHeaderColumn>Balance</TableHeaderColumn>
- <TableRowColumn className="sm-hide xs-hide" style={stubColumnStyle} />
- {isTestNetwork && <TableHeaderColumn style={{ paddingLeft: 3 }}>Action</TableHeaderColumn>}
- <TableHeaderColumn>Send</TableHeaderColumn>
- </TableRow>
- </TableHeader>
- <TableBody displayRowCheckbox={false}>
- <TableRow key="ETH">
- <TableRowColumn className="py1">
- <img style={{ width: ICON_DIMENSION, height: ICON_DIMENSION }} src={ETHER_ICON_PATH} />
- </TableRowColumn>
- <TableRowColumn>
- {userEtherBalanceInEth.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} ETH
- {this.state.isBalanceSpinnerVisible && (
- <span className="pl1">
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- </span>
- )}
- </TableRowColumn>
- <TableRowColumn className="sm-hide xs-hide" style={stubColumnStyle} />
- {isTestNetwork && (
- <TableRowColumn style={{ paddingLeft: 3 }}>
- <LifeCycleRaisedButton
- labelReady="Request"
- labelLoading="Sending..."
- labelComplete="Sent!"
- onClickAsyncFn={this._faucetRequestAsync.bind(this, true)}
- />
- </TableRowColumn>
- )}
- <TableRowColumn>
- <SendButton
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- dispatcher={this.props.dispatcher}
- asset="ETH"
- onError={this._onSendFailed.bind(this)}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- // This is not necessary for ETH.
- // tslint:disable:jsx-no-lambda
- refetchTokenStateAsync={() => undefined}
- />
- </TableRowColumn>
- </TableRow>
- </TableBody>
- </Table>
- <div className="clearfix" style={{ paddingBottom: 1 }}>
- <div className="col col-10">
- <h3 className="pt2">{isTestNetwork ? 'Test tokens' : 'Tokens'}</h3>
- </div>
- <div className="col col-1 pt3 align-right">
- <FloatingActionButton mini={true} zDepth={0} onClick={this._onAddTokenClicked.bind(this)}>
- <ContentAdd />
- </FloatingActionButton>
- </div>
- <div className="col col-1 pt3 align-right">
- <FloatingActionButton mini={true} zDepth={0} onClick={this._onRemoveTokenClicked.bind(this)}>
- <ContentRemove />
- </FloatingActionButton>
- </div>
- </div>
- <Divider />
- <div className="pt2 pb2">
- {isTestNetwork
- ? "Mint some test tokens you'd like to use to generate or fill an order using 0x."
- : "Set trading permissions for a token you'd like to start trading."}
- </div>
- <Table selectable={false} bodyStyle={{ height: tokenTableHeight }} style={styles.bgColor}>
- <TableHeader displaySelectAll={false} adjustForCheckbox={false}>
- <TableRow>
- <TableHeaderColumn colSpan={tokenColSpan}>Token</TableHeaderColumn>
- <TableHeaderColumn style={{ paddingLeft: 3 }}>Balance</TableHeaderColumn>
- <TableHeaderColumn>
- <div className="inline-block">Allowance</div>
- <HelpTooltip style={{ paddingLeft: 4 }} explanation={allowanceExplanation} />
- </TableHeaderColumn>
- {isTestNetwork && <TableHeaderColumn>Action</TableHeaderColumn>}
- {this.props.screenWidth !== ScreenWidths.Sm && <TableHeaderColumn>Send</TableHeaderColumn>}
- </TableRow>
- </TableHeader>
- <TableBody displayRowCheckbox={false}>{this._renderTokenTableRows()}</TableBody>
- </Table>
- <Dialog
- title="Oh oh"
- titleStyle={{ fontWeight: 100 }}
- actions={errorDialogActions}
- open={!_.isUndefined(this.state.errorType)}
- onRequestClose={this._onErrorDialogToggle.bind(this, false)}
- >
- {this._renderErrorDialogBody()}
- </Dialog>
- <AssetPicker
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- dispatcher={this.props.dispatcher}
- isOpen={this.state.isTokenPickerOpen}
- currentTokenAddress={''}
- onTokenChosen={this._onAssetTokenPicked.bind(this)}
- tokenByAddress={this.props.tokenByAddress}
- tokenVisibility={this.state.isAddingToken ? TokenVisibility.Untracked : TokenVisibility.Tracked}
- />
- </div>
- );
- }
- private _renderTokenTableRows(): React.ReactNode {
- if (!this.props.blockchainIsLoaded || this.props.blockchainErr !== BlockchainErrs.NoError) {
- return '';
- }
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- const tokenColSpan = isSmallScreen ? TOKEN_COL_SPAN_SM : TOKEN_COL_SPAN_LG;
- const actionPaddingX = isSmallScreen ? 2 : 24;
- const trackedTokens = this.props.trackedTokens;
- const trackedTokensStartingWithEtherToken = trackedTokens.sort(
- firstBy((t: Token) => t.symbol !== ETHER_TOKEN_SYMBOL)
- .thenBy((t: Token) => t.symbol !== ZRX_TOKEN_SYMBOL)
- .thenBy('trackedTimestamp'),
- );
- const tableRows = _.map(
- trackedTokensStartingWithEtherToken,
- this._renderTokenRow.bind(this, tokenColSpan, actionPaddingX),
- );
- return tableRows;
- }
- private _renderTokenRow(tokenColSpan: number, actionPaddingX: number, token: Token): React.ReactNode {
- const tokenState = this.state.trackedTokenStateByAddress[token.address];
- const tokenLink = sharedUtils.getEtherScanLinkIfExists(
- token.address,
- this.props.networkId,
- EtherscanLinkSuffixes.Address,
- );
- const isMintable =
- (_.includes(configs.SYMBOLS_OF_MINTABLE_KOVAN_TOKENS, token.symbol) &&
- this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Kovan]) ||
- (_.includes(configs.SYMBOLS_OF_MINTABLE_ROPSTEN_TOKENS, token.symbol) &&
- this.props.networkId === sharedConstants.NETWORK_ID_BY_NAME[Networks.Ropsten]);
- return (
- <TableRow key={token.address} style={{ height: TOKEN_TABLE_ROW_HEIGHT }}>
- <TableRowColumn colSpan={tokenColSpan}>
- {_.isUndefined(tokenLink) ? (
- this._renderTokenName(token)
- ) : (
- <a href={tokenLink} target="_blank" style={{ textDecoration: 'none' }}>
- {this._renderTokenName(token)}
- </a>
- )}
- </TableRowColumn>
- <TableRowColumn style={{ paddingRight: 3, paddingLeft: 3 }}>
- {tokenState.isLoaded ? (
- <span>
- {this._renderAmount(tokenState.balance, token.decimals)} {token.symbol}
- {this.state.isZRXSpinnerVisible && token.symbol === ZRX_TOKEN_SYMBOL && (
- <span className="pl1">
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- </span>
- )}
- </span>
- ) : (
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- )}
- </TableRowColumn>
- <TableRowColumn>
- <div className="flex justify-center">
- <AllowanceStateToggle
- blockchain={this.props.blockchain}
- token={token}
- tokenState={tokenState}
- onErrorOccurred={this._onErrorOccurred.bind(this)}
- refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this, token.address)}
- />
- </div>
- </TableRowColumn>
- {utils.isTestNetwork(this.props.networkId) && (
- <TableRowColumn style={{ paddingLeft: actionPaddingX, paddingRight: actionPaddingX }}>
- {isMintable && (
- <LifeCycleRaisedButton
- labelReady="Mint"
- labelLoading={<span style={{ fontSize: 12 }}>Minting...</span>}
- labelComplete="Minted!"
- onClickAsyncFn={this._onMintTestTokensAsync.bind(this, token)}
- />
- )}
- </TableRowColumn>
- )}
- {this.props.screenWidth !== ScreenWidths.Sm && (
- <TableRowColumn
- style={{
- paddingLeft: actionPaddingX,
- paddingRight: actionPaddingX,
- }}
- >
- <SendButton
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- dispatcher={this.props.dispatcher}
- asset={token}
- onError={this._onSendFailed.bind(this)}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- refetchTokenStateAsync={this._refetchTokenStateAsync.bind(this, token.address)}
- />
- </TableRowColumn>
- )}
- </TableRow>
- );
- }
- private _onAssetTokenPicked(tokenAddress: string): void {
- if (_.isEmpty(tokenAddress)) {
- this.setState({
- isTokenPickerOpen: false,
- });
- return;
- }
- const token = this.props.tokenByAddress[tokenAddress];
- const isDefaultTrackedToken = _.includes(configs.DEFAULT_TRACKED_TOKEN_SYMBOLS, token.symbol);
- if (!this.state.isAddingToken && !isDefaultTrackedToken) {
- if (token.isRegistered) {
- // Remove the token from tracked tokens
- const newToken: Token = {
- ...token,
- trackedTimestamp: undefined,
- };
- this.props.dispatcher.updateTokenByAddress([newToken]);
- } else {
- this.props.dispatcher.removeTokenToTokenByAddress(token);
- }
- trackedTokenStorage.removeTrackedToken(this.props.userAddress, this.props.networkId, tokenAddress);
- } else if (isDefaultTrackedToken) {
- this.props.dispatcher.showFlashMessage(`Cannot remove ${token.name} because it's a default token`);
- }
- this.setState({
- isTokenPickerOpen: false,
- });
- }
- private _onSendFailed(): void {
- this.setState({
- errorType: BalanceErrs.SendFailed,
- });
- }
- private _renderAmount(amount: BigNumber, decimals: number): React.ReactNode {
- const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- return unitAmount.toNumber().toFixed(configs.AMOUNT_DISPLAY_PRECSION);
- }
- private _renderTokenName(token: Token): React.ReactNode {
- const tooltipId = `tooltip-${token.address}`;
- return (
- <div className="flex">
- <TokenIcon token={token} diameter={ICON_DIMENSION} />
- <div data-tip={true} data-for={tooltipId} className="mt2 ml2 sm-hide xs-hide">
- {token.name}
- </div>
- <ReactTooltip id={tooltipId}>{token.address}</ReactTooltip>
- </div>
- );
- }
- private _renderErrorDialogBody(): React.ReactNode {
- switch (this.state.errorType) {
- case BalanceErrs.IncorrectNetworkForFaucet:
- return (
- <div>
- Our faucet can only send test Ether to addresses on testnets. Please make sure you are connected
- to a testnet and try requesting again.
- </div>
- );
-
- case BalanceErrs.FaucetRequestFailed:
- return (
- <div>
- An unexpected error occurred while trying to request test Ether from our faucet. Please refresh
- the page and try again.
- </div>
- );
-
- case BalanceErrs.FaucetQueueIsFull:
- return <div>Our test Ether faucet queue is full. Please try requesting test Ether again later.</div>;
-
- case BalanceErrs.MintingFailed:
- return <div>Minting your test tokens failed unexpectedly. Please refresh the page and try again.</div>;
-
- case BalanceErrs.AllowanceSettingFailed:
- return (
- <div>
- An unexpected error occurred while trying to set your test token allowance. Please refresh the
- page and try again.
- </div>
- );
-
- case undefined:
- return null; // No error to show
-
- default:
- throw errorUtils.spawnSwitchErr('errorType', this.state.errorType);
- }
- }
- private _onErrorOccurred(errorType: BalanceErrs): void {
- this.setState({
- errorType,
- });
- }
- private async _onMintTestTokensAsync(token: Token): Promise<boolean> {
- try {
- await this.props.blockchain.mintTestTokensAsync(token);
- await this._refetchTokenStateAsync(token.address);
- const amount = Web3Wrapper.toUnitAmount(constants.MINT_AMOUNT, token.decimals);
- this.props.dispatcher.showFlashMessage(`Successfully minted ${amount.toString(10)} ${token.symbol}`);
- return true;
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return false;
- }
- if (utils.didUserDenyWeb3Request(errMsg)) {
- return false;
- }
- logUtils.log(`Unexpected error encountered: ${err}`);
- logUtils.log(err.stack);
- this.setState({
- errorType: BalanceErrs.MintingFailed,
- });
- errorReporter.report(err);
- return false;
- }
- }
- private async _faucetRequestAsync(isEtherRequest: boolean): Promise<boolean> {
- if (this.props.userAddress === '') {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- return false;
- }
-
- // If on another network other then the testnet our faucet serves test ether
- // from, we must show user an error message
- if (!utils.isTestNetwork(this.props.blockchain.networkId)) {
- this.setState({
- errorType: BalanceErrs.IncorrectNetworkForFaucet,
- });
- return false;
- }
-
- await utils.sleepAsync(ARTIFICIAL_FAUCET_REQUEST_DELAY);
-
- const segment = isEtherRequest ? 'ether' : 'zrx';
- const response = await fetchAsync(
- `${constants.URL_TESTNET_FAUCET}/${segment}/${this.props.userAddress}?networkId=${this.props.networkId}`,
- );
- const responseBody = await response.text();
- if (response.status !== constants.SUCCESS_STATUS) {
- logUtils.log(`Unexpected status code: ${response.status} -> ${responseBody}`);
- const errorType =
- response.status === constants.UNAVAILABLE_STATUS
- ? BalanceErrs.FaucetQueueIsFull
- : BalanceErrs.FaucetRequestFailed;
- this.setState({
- errorType,
- });
- errorReporter.report(new Error(`Faucet returned non-200: ${JSON.stringify(response)}`));
- return false;
- }
-
- if (isEtherRequest) {
- this.setState({
- isBalanceSpinnerVisible: true,
- });
- } else {
- this.setState({
- isZRXSpinnerVisible: true,
- });
- // tslint:disable-next-line:no-floating-promises
- this._startPollingZrxBalanceAsync();
- }
- return true;
- }
- private _onErrorDialogToggle(_isOpen: boolean): void {
- this.setState({
- errorType: undefined,
- });
- }
- private _onAddTokenClicked(): void {
- this.setState({
- isTokenPickerOpen: true,
- isAddingToken: true,
- });
- }
- private _onRemoveTokenClicked(): void {
- this.setState({
- isTokenPickerOpen: true,
- isAddingToken: false,
- });
- }
- private async _startPollingZrxBalanceAsync(): Promise<void> {
- const tokens = _.values(this.props.tokenByAddress);
- const zrxToken = _.find(tokens, t => t.symbol === ZRX_TOKEN_SYMBOL);
-
- // tslint:disable-next-line:no-floating-promises
- const balance = await this.props.blockchain.pollTokenBalanceAsync(zrxToken);
- const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress;
- trackedTokenStateByAddress[zrxToken.address] = {
- ...trackedTokenStateByAddress[zrxToken.address],
- balance,
- };
- this.setState({
- isZRXSpinnerVisible: false,
- });
- }
- private async _fetchBalancesAndAllowancesAsync(tokenAddresses: string[]): Promise<void> {
- const trackedTokenStateByAddress = this.state.trackedTokenStateByAddress;
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- for (const tokenAddress of tokenAddresses) {
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- tokenAddress,
- );
- trackedTokenStateByAddress[tokenAddress] = {
- balance,
- allowance,
- isLoaded: true,
- };
- }
- if (!this._isUnmounted) {
- this.setState({
- trackedTokenStateByAddress,
- });
- }
- }
- private _getInitialTrackedTokenStateByAddress(trackedTokens: Token[]): TokenStateByAddress {
- const trackedTokenStateByAddress: TokenStateByAddress = {};
- _.each(trackedTokens, token => {
- trackedTokenStateByAddress[token.address] = {
- balance: new BigNumber(0),
- allowance: new BigNumber(0),
- isLoaded: false,
- };
- });
- return trackedTokenStateByAddress;
- }
- private async _refetchTokenStateAsync(tokenAddress: string): Promise<void> {
- const userAddressIfExists = _.isEmpty(this.props.userAddress) ? undefined : this.props.userAddress;
- const [balance, allowance] = await this.props.blockchain.getTokenBalanceAndAllowanceAsync(
- userAddressIfExists,
- tokenAddress,
- );
- this.setState({
- trackedTokenStateByAddress: {
- ...this.state.trackedTokenStateByAddress,
- [tokenAddress]: {
- balance,
- allowance,
- isLoaded: true,
- },
- },
- });
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/top_bar/provider_display.tsx b/packages/website/ts/components/top_bar/provider_display.tsx
deleted file mode 100644
index c88c29b8e..000000000
--- a/packages/website/ts/components/top_bar/provider_display.tsx
+++ /dev/null
@@ -1,154 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import CircularProgress from 'material-ui/CircularProgress';
-import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
-import * as React from 'react';
-
-import { Blockchain } from 'ts/blockchain';
-import { AccountConnection } from 'ts/components/ui/account_connection';
-import { Container } from 'ts/components/ui/container';
-import { DropDown } from 'ts/components/ui/drop_down';
-import { Identicon } from 'ts/components/ui/identicon';
-import { Image } from 'ts/components/ui/image';
-import { Island } from 'ts/components/ui/island';
-import {
- CopyAddressSimpleMenuItem,
- DifferentWalletSimpleMenuItem,
- GoToAccountManagementSimpleMenuItem,
- SimpleMenu,
-} from 'ts/components/ui/simple_menu';
-import { Text } from 'ts/components/ui/text';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { colors } from 'ts/style/colors';
-import { AccountState, ProviderType } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-const ROOT_HEIGHT = 24;
-
-export interface ProviderDisplayProps {
- dispatcher: Dispatcher;
- userAddress: string;
- networkId: number;
- injectedProviderName: string;
- providerType: ProviderType;
- onToggleLedgerDialog: () => void;
- blockchain?: Blockchain;
- blockchainIsLoaded: boolean;
-}
-
-interface ProviderDisplayState {}
-
-const styles: Styles = {
- root: {
- height: ROOT_HEIGHT,
- borderRadius: ROOT_HEIGHT,
- },
-};
-
-export class ProviderDisplay extends React.Component<ProviderDisplayProps, ProviderDisplayState> {
- public render(): React.ReactNode {
- const activeNode = (
- <Island className="flex items-center py1 px2" style={styles.root}>
- {this._renderIcon()}
- <Container marginLeft="12px" marginRight="12px">
- {this._renderDisplayMessage()}
- </Container>
- {this._renderInjectedProvider()}
- </Island>
- );
- return (
- <div style={{ width: 'fit-content', height: 48, float: 'right' }}>
- <DropDown
- activeNode={activeNode}
- popoverContent={this._renderPopoverContent()}
- anchorOrigin={{ horizontal: 'middle', vertical: 'bottom' }}
- targetOrigin={{ horizontal: 'middle', vertical: 'top' }}
- zDepth={1}
- />
- </div>
- );
- }
- private _renderPopoverContent(): React.ReactNode {
- const accountState = this._getAccountState();
- switch (accountState) {
- case AccountState.Ready:
- return (
- <SimpleMenu>
- <CopyAddressSimpleMenuItem userAddress={this.props.userAddress} />
- <DifferentWalletSimpleMenuItem onClick={this.props.onToggleLedgerDialog} />
- <GoToAccountManagementSimpleMenuItem />
- </SimpleMenu>
- );
- case AccountState.Disconnected:
- case AccountState.Locked:
- case AccountState.Loading:
- default:
- return null;
- }
- }
- private _renderIcon(): React.ReactNode {
- const accountState = this._getAccountState();
- switch (accountState) {
- case AccountState.Ready:
- return <Identicon address={this.props.userAddress} diameter={ROOT_HEIGHT} />;
- case AccountState.Loading:
- return <CircularProgress size={ROOT_HEIGHT} thickness={2} />;
- case AccountState.Locked:
- return <Image src="/images/lock_icon.svg" height="20px" width="20px" />;
- case AccountState.Disconnected:
- return <ActionAccountBalanceWallet color={colors.mediumBlue} />;
- default:
- return null;
- }
- }
- private _renderDisplayMessage(): React.ReactNode {
- const accountState = this._getAccountState();
- const displayMessage = utils.getReadableAccountState(accountState, this.props.userAddress);
- const fontColor = this._getDisplayMessageFontColor();
- return (
- <Text fontSize="16px" fontColor={fontColor} fontWeight={500}>
- {displayMessage}
- </Text>
- );
- }
- private _getDisplayMessageFontColor(): string {
- const accountState = this._getAccountState();
- switch (accountState) {
- case AccountState.Loading:
- return colors.darkGrey;
- case AccountState.Ready:
- case AccountState.Locked:
- case AccountState.Disconnected:
- default:
- return colors.black;
- }
- }
- private _renderInjectedProvider(): React.ReactNode {
- const accountState = this._getAccountState();
- switch (accountState) {
- case AccountState.Ready:
- case AccountState.Locked:
- return (
- <AccountConnection
- accountState={accountState}
- injectedProviderName={this.props.injectedProviderName}
- />
- );
- case AccountState.Disconnected:
- case AccountState.Loading:
- default:
- return null;
- }
- }
- private _isBlockchainReady(): boolean {
- return this.props.blockchainIsLoaded && !_.isUndefined(this.props.blockchain);
- }
- private _getAccountState(): AccountState {
- return utils.getAccountState(
- this._isBlockchainReady(),
- this.props.providerType,
- this.props.injectedProviderName,
- this.props.userAddress,
- );
- }
-}
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx
deleted file mode 100644
index d5967cd1d..000000000
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ /dev/null
@@ -1,279 +0,0 @@
-import { DocsInfo } from '@0x/react-docs';
-import { ALink, colors, Link, Styles } from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import Drawer from 'material-ui/Drawer';
-import MenuItem from 'material-ui/MenuItem';
-import * as React from 'react';
-import { Blockchain } from 'ts/blockchain';
-import { DevelopersDropDown } from 'ts/components/dropdowns/developers_drop_down';
-import { DrawerMenu } from 'ts/components/portal/drawer_menu';
-import { ProviderDisplay } from 'ts/components/top_bar/provider_display';
-import { TopBarMenuItem } from 'ts/components/top_bar/top_bar_menu_item';
-import { Container } from 'ts/components/ui/container';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Deco, Key, ProviderType, WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-export enum TopBarDisplayType {
- Default,
- Expanded,
-}
-
-export interface TopBarProps {
- userAddress?: string;
- networkId?: number;
- injectedProviderName?: string;
- providerType?: ProviderType;
- onToggleLedgerDialog?: () => void;
- blockchain?: Blockchain;
- dispatcher?: Dispatcher;
- blockchainIsLoaded: boolean;
- location: Location;
- translate: Translate;
- docsVersion?: string;
- availableDocVersions?: string[];
- sectionNameToLinks?: ObjectMap<ALink[]>;
- displayType?: TopBarDisplayType;
- docsInfo?: DocsInfo;
- style?: React.CSSProperties;
- isNightVersion?: boolean;
- onVersionSelected?: (semver: string) => void;
- sidebarHeader?: React.ReactNode;
- maxWidth?: number;
- paddingLeft?: number;
- paddingRight?: number;
-}
-
-interface TopBarState {
- isDrawerOpen: boolean;
-}
-
-const styles: Styles = {
- topBar: {
- backgroundColor: colors.white,
- width: '100%',
- position: 'relative',
- top: 0,
- paddingBottom: 1,
- zIndex: 1,
- },
- bottomBar: {
- boxShadow: 'rgba(0, 0, 0, 0.187647) 0px 1px 3px',
- },
- menuItem: {
- fontSize: 14,
- color: colors.darkestGrey,
- paddingTop: 6,
- paddingBottom: 6,
- cursor: 'pointer',
- fontWeight: 400,
- },
-};
-
-const DEFAULT_HEIGHT = 68;
-const EXPANDED_HEIGHT = 75;
-
-export class TopBar extends React.Component<TopBarProps, TopBarState> {
- public static defaultProps: Partial<TopBarProps> = {
- displayType: TopBarDisplayType.Default,
- style: {},
- isNightVersion: false,
- paddingLeft: 20,
- paddingRight: 20,
- };
- public static heightForDisplayType(displayType: TopBarDisplayType): number {
- const result = displayType === TopBarDisplayType.Expanded ? EXPANDED_HEIGHT : DEFAULT_HEIGHT;
- return result + 1;
- }
- constructor(props: TopBarProps) {
- super(props);
- this.state = {
- isDrawerOpen: false,
- };
- }
- public componentWillReceiveProps(nextProps: TopBarProps): void {
- if (nextProps.location.pathname !== this.props.location.pathname) {
- this.setState({
- isDrawerOpen: false,
- });
- }
- }
- public render(): React.ReactNode {
- const isNightVersion = this.props.isNightVersion;
- const isExpandedDisplayType = this.props.displayType === TopBarDisplayType.Expanded;
- const parentClassNames = !isExpandedDisplayType
- ? 'flex mx-auto items-center max-width-4'
- : 'flex mx-auto items-center';
- const height = isExpandedDisplayType ? EXPANDED_HEIGHT : DEFAULT_HEIGHT;
- const bottomBorderStyle = this._shouldDisplayBottomBar() ? styles.bottomBar : {};
- const fullWidthClasses = isExpandedDisplayType ? 'pr4' : '';
- const logoUrl = isNightVersion ? '/images/protocol_logo_white.png' : '/images/protocol_logo_black.png';
- const menuClasses = `col col-${
- isExpandedDisplayType ? '4' : '6'
- } ${fullWidthClasses} lg-pr0 md-pr2 sm-hide xs-hide`;
- const menuIconStyle = {
- fontSize: 25,
- color: isNightVersion ? 'white' : 'black',
- cursor: 'pointer',
- };
- return (
- <div
- style={{ ...styles.topBar, ...bottomBorderStyle, ...this.props.style, ...{ height } }}
- className="pb1 flex items-center"
- >
- <Container
- className={parentClassNames}
- width="100%"
- maxWidth={this.props.maxWidth}
- paddingLeft={this.props.paddingLeft}
- paddingRight={this.props.paddingRight}
- >
- <Link to={WebsitePaths.Home}>
- <img src={logoUrl} height="30" />
- </Link>
- <div className="flex-auto" />
- {!this._isViewingPortal() && (
- <div className={menuClasses}>
- <div className="flex items-center justify-between">
- <DevelopersDropDown
- location={this.props.location}
- menuItemStyles={{ ...styles.menuItem, paddingBottom: 12, paddingTop: 12 }}
- translate={this.props.translate}
- menuIconStyle={menuIconStyle}
- />
- <TopBarMenuItem
- title={this.props.translate.get(Key.Blog, Deco.Cap)}
- path={constants.URL_BLOG}
- style={styles.menuItem}
- isNightVersion={isNightVersion}
- shouldOpenInNewTab={true}
- />
- <TopBarMenuItem
- title={this.props.translate.get(Key.About, Deco.Cap)}
- path={WebsitePaths.About}
- style={styles.menuItem}
- isNightVersion={isNightVersion}
- />
- <TopBarMenuItem
- title={this.props.translate.get(Key.Careers, Deco.Cap)}
- path={WebsitePaths.Careers}
- style={styles.menuItem}
- isNightVersion={isNightVersion}
- />
- <TopBarMenuItem
- title={this.props.translate.get(Key.TradeCallToAction, Deco.Cap)}
- path={WebsitePaths.Portal}
- isPrimary={true}
- style={styles.menuItem}
- className={`${isExpandedDisplayType && 'md-hide'}`}
- isNightVersion={isNightVersion}
- />
- </div>
- </div>
- )}
- {this._isViewingPortal() && (
- <div className="sm-hide xs-hide">
- <ProviderDisplay
- dispatcher={this.props.dispatcher}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- injectedProviderName={this.props.injectedProviderName}
- providerType={this.props.providerType}
- onToggleLedgerDialog={this.props.onToggleLedgerDialog}
- blockchain={this.props.blockchain}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- />
- </div>
- )}
- <div className={'md-hide lg-hide'}>
- <div style={menuIconStyle}>
- <i className="zmdi zmdi-menu" onClick={this._onMenuButtonClick.bind(this)} />
- </div>
- </div>
- </Container>
- {this._isViewingPortal() ? this._renderPortalDrawer() : this._renderDrawer()}
- </div>
- );
- }
- private _renderPortalDrawer(): React.ReactNode {
- return (
- <Drawer
- open={this.state.isDrawerOpen}
- docked={false}
- openSecondary={true}
- onRequestChange={this._onMenuButtonClick.bind(this)}
- >
- <DrawerMenu
- selectedPath={this.props.location.pathname}
- userAddress={this.props.userAddress}
- injectedProviderName={this.props.injectedProviderName}
- providerType={this.props.providerType}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- blockchain={this.props.blockchain}
- />
- </Drawer>
- );
- }
- private _renderDrawer(): React.ReactNode {
- return (
- <Drawer
- open={this.state.isDrawerOpen}
- docked={false}
- openSecondary={true}
- onRequestChange={this._onMenuButtonClick.bind(this)}
- >
- <div className="clearfix">
- <div className="pl1 py1 mt3" style={{ backgroundColor: colors.lightGrey }}>
- {this.props.translate.get(Key.Website, Deco.Cap)}
- </div>
- <Link to={WebsitePaths.Home}>
- <MenuItem className="py2">{this.props.translate.get(Key.Home, Deco.Cap)}</MenuItem>
- </Link>
- <Link to={WebsitePaths.Docs}>
- <MenuItem className="py2">{this.props.translate.get(Key.Docs, Deco.Cap)}</MenuItem>
- </Link>
- {!this._isViewingPortal() && (
- <Link to={WebsitePaths.Portal}>
- <MenuItem className="py2">
- {this.props.translate.get(Key.PortalDApp, Deco.CapWords)}
- </MenuItem>
- </Link>
- )}
- <Link to={WebsitePaths.Whitepaper} shouldOpenInNewTab={true}>
- <MenuItem className="py2">{this.props.translate.get(Key.Whitepaper, Deco.Cap)}</MenuItem>
- </Link>
- <Link to={WebsitePaths.About}>
- <MenuItem className="py2">{this.props.translate.get(Key.About, Deco.Cap)}</MenuItem>
- </Link>
- <Link to={WebsitePaths.Careers}>
- <MenuItem className="py2">{this.props.translate.get(Key.Careers, Deco.Cap)}</MenuItem>
- </Link>
- <Link to={constants.URL_BLOG} shouldOpenInNewTab={true}>
- <MenuItem className="py2">{this.props.translate.get(Key.Blog, Deco.Cap)}</MenuItem>
- </Link>
- <Link to={WebsitePaths.FAQ}>
- <MenuItem className="py2" onClick={this._onMenuButtonClick.bind(this)}>
- {this.props.translate.get(Key.Faq, Deco.Cap)}
- </MenuItem>
- </Link>
- </div>
- </Drawer>
- );
- }
- private _onMenuButtonClick(): void {
- this.setState({
- isDrawerOpen: !this.state.isDrawerOpen,
- });
- }
- private _isViewingPortal(): boolean {
- return _.includes(this.props.location.pathname, WebsitePaths.Portal);
- }
- private _isViewingFAQ(): boolean {
- return _.includes(this.props.location.pathname, WebsitePaths.FAQ);
- }
- private _shouldDisplayBottomBar(): boolean {
- return this._isViewingFAQ() || this._isViewingPortal();
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx b/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
deleted file mode 100644
index 9f15cffbb..000000000
--- a/packages/website/ts/components/top_bar/top_bar_menu_item.tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { colors, Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { CallToAction } from 'ts/components/ui/button';
-
-const DEFAULT_STYLE = {
- color: colors.darkestGrey,
-};
-
-interface TopBarMenuItemProps {
- title: string;
- path?: string;
- isPrimary?: boolean;
- shouldOpenInNewTab?: boolean;
- style?: React.CSSProperties;
- className?: string;
- isNightVersion?: boolean;
-}
-
-interface TopBarMenuItemState {}
-
-export class TopBarMenuItem extends React.Component<TopBarMenuItemProps, TopBarMenuItemState> {
- public static defaultProps: Partial<TopBarMenuItemProps> = {
- isPrimary: false,
- style: DEFAULT_STYLE,
- className: '',
- shouldOpenInNewTab: false,
- isNightVersion: false,
- };
- public render(): React.ReactNode {
- const menuItemColor = this.props.isNightVersion ? 'white' : this.props.style.color;
- const linkColor = _.isUndefined(menuItemColor) ? colors.darkestGrey : menuItemColor;
- const itemContent = this.props.isPrimary ? (
- <CallToAction padding="0.8em 1.5em">{this.props.title}</CallToAction>
- ) : (
- this.props.title
- );
- return (
- <div className={`center ${this.props.className}`} style={{ ...this.props.style, color: menuItemColor }}>
- <Link to={this.props.path} shouldOpenInNewTab={this.props.shouldOpenInNewTab} fontColor={linkColor}>
- {itemContent}
- </Link>
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/track_token_confirmation.tsx b/packages/website/ts/components/track_token_confirmation.tsx
deleted file mode 100644
index e701686b0..000000000
--- a/packages/website/ts/components/track_token_confirmation.tsx
+++ /dev/null
@@ -1,61 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Party } from 'ts/components/ui/party';
-import { Token, TokenByAddress } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-interface TrackTokenConfirmationProps {
- tokens: Token[];
- tokenByAddress: TokenByAddress;
- networkId: number;
- isAddingTokenToTracked: boolean;
-}
-
-interface TrackTokenConfirmationState {}
-
-export class TrackTokenConfirmation extends React.Component<TrackTokenConfirmationProps, TrackTokenConfirmationState> {
- public render(): React.ReactNode {
- const isMultipleTokens = this.props.tokens.length > 1;
- const allTokens = _.values(this.props.tokenByAddress);
- return (
- <div style={{ color: colors.grey700 }}>
- {this.props.isAddingTokenToTracked ? (
- <div className="py4 my4 center">
- <span className="pr1">
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- </span>
- <span>Adding token{isMultipleTokens && 's'}...</span>
- </div>
- ) : (
- <div>
- <div>You do not currently track the following token{isMultipleTokens && 's'}:</div>
- <div className="py2 clearfix mx-auto center" style={{ width: 355 }}>
- {_.map(this.props.tokens, (token: Token) => (
- <div
- key={`token-profile-${token.name}`}
- className={`col col-${isMultipleTokens ? '6' : '12'} px2`}
- >
- <Party
- label={token.name}
- address={token.address}
- networkId={this.props.networkId}
- alternativeImage={token.iconUrl}
- isInTokenRegistry={token.isRegistered}
- hasUniqueNameAndSymbol={utils.hasUniqueNameAndSymbol(allTokens, token)}
- />
- </div>
- ))}
- </div>
- <div>
- Tracking a token adds it to the balances section of 0x Portal and allows you to
- generate/fill orders involving the token
- {isMultipleTokens && 's'}. Would you like to start tracking{' '}
- {isMultipleTokens ? 'these' : 'this'} token?
- </div>
- </div>
- )}
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/trade_history/trade_history.tsx b/packages/website/ts/components/trade_history/trade_history.tsx
deleted file mode 100644
index 84c0f70a8..000000000
--- a/packages/website/ts/components/trade_history/trade_history.tsx
+++ /dev/null
@@ -1,132 +0,0 @@
-import * as _ from 'lodash';
-import Divider from 'material-ui/Divider';
-import Paper from 'material-ui/Paper';
-import * as React from 'react';
-import { TradeHistoryItem } from 'ts/components/trade_history/trade_history_item';
-import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage';
-import { Fill, TokenByAddress } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-const FILL_POLLING_INTERVAL = 1000;
-
-interface TradeHistoryProps {
- tokenByAddress: TokenByAddress;
- userAddress: string;
- networkId: number;
- isFullWidth?: boolean;
- shouldHideHeader?: boolean;
- isScrollable?: boolean;
-}
-
-interface TradeHistoryState {
- sortedFills: Fill[];
-}
-
-export class TradeHistory extends React.Component<TradeHistoryProps, TradeHistoryState> {
- public static defaultProps: Partial<TradeHistoryProps> = {
- isFullWidth: false,
- shouldHideHeader: false,
- isScrollable: true,
- };
- private _fillPollingIntervalId: number;
- public constructor(props: TradeHistoryProps) {
- super(props);
- const sortedFills = this._getSortedFills();
- this.state = {
- sortedFills,
- };
- }
- public componentWillMount(): void {
- this._startPollingForFills();
- }
- public componentWillUnmount(): void {
- this._stopPollingForFills();
- }
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- }
- public render(): React.ReactNode {
- const rootClassName = !this.props.isFullWidth ? 'lg-px4 md-px4 sm-px2' : undefined;
- return (
- <div className={rootClassName}>
- {!this.props.shouldHideHeader && (
- <div>
- <h3>Trade history</h3>
- <Divider />
- </div>
- )}
- {this.props.isScrollable ? (
- <div className="pt2" style={{ height: 608, overflow: 'scroll' }}>
- {this._renderTrades()}
- </div>
- ) : (
- this._renderTrades()
- )}
- </div>
- );
- }
- private _renderTrades(): React.ReactNode {
- const numNonCustomFills = this._numFillsWithoutCustomERC20Tokens();
- if (numNonCustomFills === 0) {
- return this._renderEmptyNotice();
- }
-
- return _.map(this.state.sortedFills, (fill, index) => {
- return (
- <TradeHistoryItem
- key={`${fill.orderHash}-${fill.filledTakerTokenAmount}-${index}`}
- fill={fill}
- tokenByAddress={this.props.tokenByAddress}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- />
- );
- });
- }
- private _renderEmptyNotice(): React.ReactNode {
- return (
- <Paper className="mt1 p2 mx-auto center" style={{ width: '80%' }}>
- No filled orders yet.
- </Paper>
- );
- }
- private _numFillsWithoutCustomERC20Tokens(): number {
- let numNonCustomFills = 0;
- const tokens = _.values(this.props.tokenByAddress);
- _.each(this.state.sortedFills, fill => {
- const takerToken = _.find(tokens, token => {
- return token.address === fill.takerToken;
- });
- const makerToken = _.find(tokens, token => {
- return token.address === fill.makerToken;
- });
- // For now we don't show history items for orders using custom ERC20
- // tokens the client does not know how to display.
- // TODO: Try to retrieve the name/symbol of an unknown token in order to display it
- // Be sure to remove similar logic in trade_history_item.tsx
- if (!_.isUndefined(takerToken) && !_.isUndefined(makerToken)) {
- numNonCustomFills += 1;
- }
- });
- return numNonCustomFills;
- }
- private _startPollingForFills(): void {
- this._fillPollingIntervalId = window.setInterval(() => {
- const sortedFills = this._getSortedFills();
- if (!utils.deepEqual(sortedFills, this.state.sortedFills)) {
- this.setState({
- sortedFills,
- });
- }
- }, FILL_POLLING_INTERVAL);
- }
- private _stopPollingForFills(): void {
- clearInterval(this._fillPollingIntervalId);
- }
- private _getSortedFills(): Fill[] {
- const fillsByHash = tradeHistoryStorage.getUserFillsByHash(this.props.userAddress, this.props.networkId);
- const fills = _.values(fillsByHash);
- const sortedFills = _.sortBy(fills, [(fill: Fill) => fill.blockTimestamp * -1]);
- return sortedFills;
- }
-}
diff --git a/packages/website/ts/components/trade_history/trade_history_item.tsx b/packages/website/ts/components/trade_history/trade_history_item.tsx
deleted file mode 100644
index 667027dce..000000000
--- a/packages/website/ts/components/trade_history/trade_history_item.tsx
+++ /dev/null
@@ -1,176 +0,0 @@
-import { colors, EtherscanLinkSuffixes } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import Paper from 'material-ui/Paper';
-import * as moment from 'moment';
-import * as React from 'react';
-import * as ReactTooltip from 'react-tooltip';
-import { EtherScanIcon } from 'ts/components/ui/etherscan_icon';
-import { Party } from 'ts/components/ui/party';
-import { Fill, Token, TokenByAddress } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-
-const IDENTICON_DIAMETER = 40;
-
-interface TradeHistoryItemProps {
- fill: Fill;
- tokenByAddress: TokenByAddress;
- userAddress: string;
- networkId: number;
-}
-
-interface TradeHistoryItemState {}
-
-export class TradeHistoryItem extends React.Component<TradeHistoryItemProps, TradeHistoryItemState> {
- public render(): React.ReactNode {
- const fill = this.props.fill;
- const tokens = _.values(this.props.tokenByAddress);
- const takerToken = _.find(tokens, token => {
- return token.address === fill.takerToken;
- });
- const makerToken = _.find(tokens, token => {
- return token.address === fill.makerToken;
- });
- // For now we don't show history items for orders using custom ERC20
- // tokens the client does not know how to display.
- // TODO: Try to retrieve the name/symbol of an unknown token in order to display it
- // Be sure to remove similar logic in trade_history.tsx
- if (_.isUndefined(takerToken) || _.isUndefined(makerToken)) {
- return null;
- }
-
- const amountColStyle: React.CSSProperties = {
- fontWeight: 100,
- display: 'inline-block',
- };
- const amountColClassNames =
- 'col col-12 lg-col-4 md-col-4 lg-py2 md-py2 sm-py1 lg-pr2 md-pr2 \
- lg-right-align md-right-align sm-center';
-
- return (
- <Paper className="py1" style={{ margin: '3px 3px 15px 3px' }}>
- <div className="clearfix">
- <div className="col col-12 lg-col-1 md-col-1 pt2 lg-pl3 md-pl3">{this._renderDate()}</div>
- <div
- className="col col-12 lg-col-6 md-col-6 lg-pl3 md-pl3"
- style={{ fontSize: 12, fontWeight: 100 }}
- >
- <div className="flex sm-mx-auto xs-mx-auto" style={{ paddingTop: 4, width: 224 }}>
- <Party
- label="Maker"
- address={fill.maker}
- identiconDiameter={IDENTICON_DIAMETER}
- networkId={this.props.networkId}
- />
- <i style={{ fontSize: 30 }} className="zmdi zmdi-swap py3" />
- <Party
- label="Taker"
- address={fill.taker}
- identiconDiameter={IDENTICON_DIAMETER}
- networkId={this.props.networkId}
- />
- </div>
- </div>
- <div className={amountColClassNames} style={amountColStyle}>
- {this._renderAmounts(makerToken, takerToken)}
- </div>
- <div className="col col-12 lg-col-1 md-col-1 lg-pr3 md-pr3 lg-py3 md-py3 sm-pb1 sm-center">
- <div className="pt1 lg-right md-right sm-mx-auto" style={{ width: 13 }}>
- <EtherScanIcon
- addressOrTxHash={fill.transactionHash}
- networkId={this.props.networkId}
- etherscanLinkSuffixes={EtherscanLinkSuffixes.Tx}
- />
- </div>
- </div>
- </div>
- </Paper>
- );
- }
- private _renderAmounts(makerToken: Token, takerToken: Token): React.ReactNode {
- const fill = this.props.fill;
- const filledTakerTokenAmountInUnits = Web3Wrapper.toUnitAmount(
- fill.filledTakerTokenAmount,
- takerToken.decimals,
- );
- const filledMakerTokenAmountInUnits = Web3Wrapper.toUnitAmount(
- fill.filledMakerTokenAmount,
- takerToken.decimals,
- );
- let exchangeRate = filledTakerTokenAmountInUnits.div(filledMakerTokenAmountInUnits);
- const fillMakerTokenAmount = Web3Wrapper.toBaseUnitAmount(filledMakerTokenAmountInUnits, makerToken.decimals);
-
- let receiveAmount;
- let receiveToken;
- let givenAmount;
- let givenToken;
- if (this.props.userAddress === fill.maker && this.props.userAddress === fill.taker) {
- receiveAmount = new BigNumber(0);
- givenAmount = new BigNumber(0);
- receiveToken = makerToken;
- givenToken = takerToken;
- } else if (this.props.userAddress === fill.maker) {
- receiveAmount = fill.filledTakerTokenAmount;
- givenAmount = fillMakerTokenAmount;
- receiveToken = takerToken;
- givenToken = makerToken;
- exchangeRate = new BigNumber(1).div(exchangeRate);
- } else if (this.props.userAddress === fill.taker) {
- receiveAmount = fillMakerTokenAmount;
- givenAmount = fill.filledTakerTokenAmount;
- receiveToken = makerToken;
- givenToken = takerToken;
- } else {
- // This condition should never be hit
- throw new Error("Found Fill that wasn't performed by this user");
- }
-
- return (
- <div>
- <div style={{ color: colors.green400, fontSize: 16 }}>
- <span>+ </span>
- {this._renderAmount(receiveAmount, receiveToken.symbol, receiveToken.decimals)}
- </div>
- <div className="pb1 inline-block" style={{ color: colors.red200, fontSize: 16 }}>
- <span>- </span>
- {this._renderAmount(givenAmount, givenToken.symbol, givenToken.decimals)}
- </div>
- <div style={{ color: colors.grey400, fontSize: 14 }}>
- {exchangeRate.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {givenToken.symbol}/{receiveToken.symbol}
- </div>
- </div>
- );
- }
- private _renderDate(): React.ReactNode {
- const blockMoment = moment.unix(this.props.fill.blockTimestamp);
- if (!blockMoment.isValid()) {
- return null;
- }
-
- const dayOfMonth = blockMoment.format('D');
- const monthAbreviation = blockMoment.format('MMM');
- const formattedBlockDate = blockMoment.format('H:mmA - MMMM D, YYYY');
- const dateTooltipId = `${this.props.fill.transactionHash}-date`;
-
- return (
- <div data-tip={true} data-for={dateTooltipId}>
- <div className="center pt1" style={{ fontSize: 13 }}>
- {monthAbreviation}
- </div>
- <div className="center" style={{ fontSize: 24, fontWeight: 100 }}>
- {dayOfMonth}
- </div>
- <ReactTooltip id={dateTooltipId}>{formattedBlockDate}</ReactTooltip>
- </div>
- );
- }
- private _renderAmount(amount: BigNumber, symbol: string, decimals: number): React.ReactNode {
- const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- return (
- <span>
- {unitAmount.toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {symbol}
- </span>
- );
- }
-}
diff --git a/packages/website/ts/components/ui/account_connection.tsx b/packages/website/ts/components/ui/account_connection.tsx
deleted file mode 100644
index 6d0b90922..000000000
--- a/packages/website/ts/components/ui/account_connection.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as React from 'react';
-
-import { Circle } from 'ts/components/ui/circle';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { colors } from 'ts/style/colors';
-import { AccountState } from 'ts/types';
-
-export interface AccountConnectionProps {
- accountState: AccountState;
- injectedProviderName: string;
-}
-
-export const AccountConnection: React.StatelessComponent<AccountConnectionProps> = ({
- accountState,
- injectedProviderName,
-}) => {
- return (
- <Container className="flex items-center">
- <Circle diameter={6} fillColor={getInjectedProviderColor(accountState)} />
- <Container marginLeft="6px">
- <Text fontSize="12px" lineHeight="14px" fontColor={colors.darkGrey}>
- {injectedProviderName}
- </Text>
- </Container>
- </Container>
- );
-};
-
-const getInjectedProviderColor = (accountState: AccountState) => {
- switch (accountState) {
- case AccountState.Ready:
- return colors.limeGreen;
- case AccountState.Locked:
- case AccountState.Loading:
- case AccountState.Disconnected:
- default:
- return colors.red;
- }
-};
diff --git a/packages/website/ts/components/ui/alert.tsx b/packages/website/ts/components/ui/alert.tsx
deleted file mode 100644
index c7a5b9030..000000000
--- a/packages/website/ts/components/ui/alert.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import { AlertTypes } from 'ts/types';
-
-interface AlertProps {
- type: AlertTypes;
- message: string | React.ReactNode;
-}
-
-export const Alert = (props: AlertProps) => {
- const isAlert = props.type === AlertTypes.Error;
- const errMsgStyles = {
- background: isAlert ? colors.red200 : colors.lightestGreen,
- color: colors.white,
- marginTop: 10,
- padding: 4,
- paddingLeft: 8,
- };
-
- return (
- <div className="rounded center" style={errMsgStyles}>
- {props.message}
- </div>
- );
-};
diff --git a/packages/website/ts/components/ui/allowance_state_view.tsx b/packages/website/ts/components/ui/allowance_state_view.tsx
deleted file mode 100644
index fc754421a..000000000
--- a/packages/website/ts/components/ui/allowance_state_view.tsx
+++ /dev/null
@@ -1,51 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Spinner } from 'ts/components/ui/spinner';
-
-export enum AllowanceState {
- Locked,
- Unlocked,
- Loading,
-}
-
-export interface AllowanceStateViewProps {
- allowanceState: AllowanceState;
-}
-
-export const AllowanceStateView: React.StatelessComponent<AllowanceStateViewProps> = ({ allowanceState }) => {
- switch (allowanceState) {
- case AllowanceState.Locked:
- return renderLock();
- case AllowanceState.Unlocked:
- return renderCheck();
- case AllowanceState.Loading:
- return (
- <Container position="relative" top="3px" left="5px">
- <Spinner size={18} strokeSize={2} />
- </Container>
- );
- default:
- return null;
- }
-};
-
-const renderCheck = (color: string = colors.lightGreen) => (
- <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
- <circle cx="8.5" cy="8.5" r="8.5" fill={color} />
- <path
- d="M2.5 4.5L1.79289 5.20711L2.5 5.91421L3.20711 5.20711L2.5 4.5ZM-0.707107 2.70711L1.79289 5.20711L3.20711 3.79289L0.707107 1.29289L-0.707107 2.70711ZM3.20711 5.20711L7.70711 0.707107L6.29289 -0.707107L1.79289 3.79289L3.20711 5.20711Z"
- transform="translate(5 6.5)"
- fill="white"
- />
- </svg>
-);
-
-const renderLock = () => (
- <svg width="12" height="15" viewBox="0 0 12 15" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path
- d="M6 0C3.51604 0 1.48688 2.0495 1.48688 4.55837V5.86581C0.664723 5.86581 -3.33647e-08 6.53719 -3.33647e-08 7.36759V13.3217C-3.33647e-08 14.1521 0.664723 14.8235 1.48688 14.8235H10.5131C11.3353 14.8235 12 14.1521 12 13.3217V7.36759C12 6.53719 11.3353 5.86581 10.5131 5.86581V4.55837C10.5131 2.0495 8.48396 0 6 0ZM8.93878 5.86581H3.06122V4.55837C3.06122 2.9329 4.37318 1.59013 6 1.59013C7.62682 1.59013 8.93878 2.9329 8.93878 4.55837V5.86581Z"
- fill="black"
- />
- </svg>
-);
diff --git a/packages/website/ts/components/ui/balance.tsx b/packages/website/ts/components/ui/balance.tsx
deleted file mode 100644
index a1a8ff89b..000000000
--- a/packages/website/ts/components/ui/balance.tsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as React from 'react';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { utils } from 'ts/utils/utils';
-
-export interface BalanceProps {
- amount: BigNumber;
- decimals: number;
- symbol: string;
-}
-
-export const Balance: React.StatelessComponent<BalanceProps> = ({ amount, decimals, symbol }) => {
- const formattedAmout = utils.getFormattedAmount(amount, decimals);
- return (
- <span>
- <Text Tag="span" fontSize="16px" fontWeight="700" lineHeight="1em">
- {formattedAmout}
- </Text>
- <Container marginLeft="0.3em" Tag="span">
- <Text Tag="span" fontSize="12px" fontWeight="700" lineHeight="1em">
- {symbol}
- </Text>
- </Container>
- </span>
- );
-};
diff --git a/packages/website/ts/components/ui/button.tsx b/packages/website/ts/components/ui/button.tsx
deleted file mode 100644
index 92f927843..000000000
--- a/packages/website/ts/components/ui/button.tsx
+++ /dev/null
@@ -1,105 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { darken, saturate } from 'polished';
-import * as React from 'react';
-import { styled } from 'ts/style/theme';
-
-export interface ButtonProps {
- className?: string;
- fontSize?: string;
- fontColor?: string;
- fontFamily?: string;
- backgroundColor?: string;
- borderColor?: string;
- borderRadius?: string;
- width?: string;
- padding?: string;
- type?: string;
- isDisabled?: boolean;
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
- textAlign?: string;
-}
-
-const PlainButton: React.StatelessComponent<ButtonProps> = ({ children, isDisabled, onClick, type, className }) => (
- <button type={type} className={className} onClick={isDisabled ? undefined : onClick} disabled={isDisabled}>
- {children}
- </button>
-);
-
-export const Button = styled(PlainButton)`
- cursor: ${props => (props.isDisabled ? 'default' : 'pointer')};
- font-size: ${props => props.fontSize};
- color: ${props => props.fontColor};
- transition: background-color, opacity 0.5s ease;
- padding: ${props => props.padding};
- border-radius: ${props => props.borderRadius};
- font-weight: 500;
- outline: none;
- font-family: ${props => props.fontFamily};
- width: ${props => props.width};
- text-align: ${props => props.textAlign};
- background-color: ${props => props.backgroundColor};
- border: ${props => (props.borderColor ? `1px solid ${props.borderColor}` : 'none')};
- &:hover {
- background-color: ${props => (!props.isDisabled ? darken(0.1, props.backgroundColor) : '')} !important;
- }
- &:active {
- background-color: ${props => (!props.isDisabled ? darken(0.2, props.backgroundColor) : '')};
- }
- &:disabled {
- opacity: 0.5;
- }
- &:focus {
- background-color: ${props => saturate(0.2, props.backgroundColor)};
- }
-`;
-
-Button.defaultProps = {
- fontSize: '12px',
- borderRadius: '6px',
- backgroundColor: colors.white,
- width: 'auto',
- fontFamily: 'Roboto',
- isDisabled: false,
- padding: '0.8em 2.2em',
- textAlign: 'center',
-};
-
-Button.displayName = 'Button';
-
-type CallToActionType = 'light' | 'dark';
-
-export interface CallToActionProps {
- type?: CallToActionType;
- fontSize?: string;
- width?: string;
- padding?: string;
-}
-
-export const CallToAction: React.StatelessComponent<CallToActionProps> = ({
- children,
- type,
- fontSize,
- padding,
- width,
-}) => {
- const isLight = type === 'light';
- const backgroundColor = isLight ? colors.white : colors.mediumBlue;
- const fontColor = isLight ? colors.heroGrey : colors.white;
- return (
- <Button
- fontSize={fontSize}
- padding={padding}
- backgroundColor={backgroundColor}
- fontColor={fontColor}
- width={width}
- >
- {children}
- </Button>
- );
-};
-
-CallToAction.defaultProps = {
- type: 'dark',
- fontSize: '14px',
- padding: '0.9em 1.6em',
-};
diff --git a/packages/website/ts/components/ui/check_mark.tsx b/packages/website/ts/components/ui/check_mark.tsx
deleted file mode 100644
index 86e427c8b..000000000
--- a/packages/website/ts/components/ui/check_mark.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-
-import { colors } from '@0x/react-shared';
-
-export interface CheckMarkProps {
- color?: string;
- isChecked?: boolean;
-}
-
-export const CheckMark: React.StatelessComponent<CheckMarkProps> = ({ color, isChecked }) => (
- <svg width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg">
- <circle
- cx="8.5"
- cy="8.5"
- r="8.5"
- fill={isChecked ? color : 'white'}
- stroke={isChecked ? undefined : '#CCCCCC'}
- />
- <path
- d="M2.5 4.5L1.79289 5.20711L2.5 5.91421L3.20711 5.20711L2.5 4.5ZM-0.707107 2.70711L1.79289 5.20711L3.20711 3.79289L0.707107 1.29289L-0.707107 2.70711ZM3.20711 5.20711L7.70711 0.707107L6.29289 -0.707107L1.79289 3.79289L3.20711 5.20711Z"
- transform="translate(5 6.5)"
- fill="white"
- />
- </svg>
-);
-
-CheckMark.displayName = 'Check';
-
-CheckMark.defaultProps = {
- color: colors.mediumBlue,
-};
diff --git a/packages/website/ts/components/ui/circle.tsx b/packages/website/ts/components/ui/circle.tsx
deleted file mode 100644
index 75103d066..000000000
--- a/packages/website/ts/components/ui/circle.tsx
+++ /dev/null
@@ -1,16 +0,0 @@
-import * as React from 'react';
-
-export interface CircleProps {
- className?: string;
- diameter: number;
- fillColor: string;
-}
-
-export const Circle: React.StatelessComponent<CircleProps> = ({ className, diameter, fillColor }) => {
- const radius = diameter / 2;
- return (
- <svg className={className} height={diameter} width={diameter}>
- <circle cx={radius} cy={radius} r={radius} fill={fillColor} />
- </svg>
- );
-};
diff --git a/packages/website/ts/components/ui/container.tsx b/packages/website/ts/components/ui/container.tsx
deleted file mode 100644
index 778f59f27..000000000
--- a/packages/website/ts/components/ui/container.tsx
+++ /dev/null
@@ -1,100 +0,0 @@
-import { TextAlignProperty } from 'csstype';
-import { darken } from 'polished';
-import * as React from 'react';
-
-import { styled } from 'ts/style/theme';
-
-type StringOrNum = string | number;
-
-export type ContainerTag = 'div' | 'span';
-
-export interface ContainerProps {
- margin?: string;
- marginTop?: StringOrNum;
- marginBottom?: StringOrNum;
- marginRight?: StringOrNum;
- marginLeft?: StringOrNum;
- padding?: StringOrNum;
- paddingTop?: StringOrNum;
- paddingBottom?: StringOrNum;
- paddingRight?: StringOrNum;
- paddingLeft?: StringOrNum;
- backgroundColor?: string;
- background?: string;
- border?: string;
- borderTop?: string;
- borderRadius?: StringOrNum;
- borderBottomLeftRadius?: StringOrNum;
- borderBottomRightRadius?: StringOrNum;
- borderBottom?: StringOrNum;
- borderColor?: string;
- children?: React.ReactNode;
- maxWidth?: StringOrNum;
- maxHeight?: StringOrNum;
- width?: StringOrNum;
- height?: StringOrNum;
- minWidth?: StringOrNum;
- minHeight?: StringOrNum;
- textAlign?: TextAlignProperty;
- isHidden?: boolean;
- className?: string;
- position?: 'absolute' | 'fixed' | 'relative' | 'unset';
- display?: 'inline-block' | 'block' | 'inline-flex' | 'inline';
- top?: string;
- left?: string;
- right?: string;
- bottom?: string;
- zIndex?: number;
- float?: 'right' | 'left';
- Tag?: ContainerTag;
- cursor?: string;
- id?: string;
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
- overflowX?: 'scroll' | 'hidden' | 'auto' | 'visible';
- overflowY?: 'scroll' | 'hidden' | 'auto' | 'visible';
- shouldDarkenOnHover?: boolean;
- hasBoxShadow?: boolean;
- shouldAddBoxShadowOnHover?: boolean;
-}
-
-export const PlainContainer: React.StatelessComponent<ContainerProps> = props => {
- const {
- children,
- className,
- Tag,
- isHidden,
- id,
- onClick,
- shouldDarkenOnHover,
- shouldAddBoxShadowOnHover,
- hasBoxShadow,
- // tslint:disable-next-line:trailing-comma
- ...style
- } = props;
- const visibility = isHidden ? 'hidden' : undefined;
- return (
- <Tag id={id} style={{ ...style, visibility }} className={className} onClick={onClick}>
- {children}
- </Tag>
- );
-};
-
-const BOX_SHADOW = '0px 3px 10px rgba(0, 0, 0, 0.3)';
-
-export const Container = styled(PlainContainer)`
- box-sizing: border-box;
- ${props => (props.hasBoxShadow ? `box-shadow: ${BOX_SHADOW}` : '')};
- &:hover {
- ${props =>
- props.shouldDarkenOnHover
- ? `background-color: ${props.backgroundColor ? darken(0.05, props.backgroundColor) : 'none'} !important`
- : ''};
- ${props => (props.shouldAddBoxShadowOnHover ? `box-shadow: ${BOX_SHADOW}` : '')};
- }
-`;
-
-Container.defaultProps = {
- Tag: 'div',
-};
-
-Container.displayName = 'Container';
diff --git a/packages/website/ts/components/ui/copy_icon.tsx b/packages/website/ts/components/ui/copy_icon.tsx
deleted file mode 100644
index 403cd4607..000000000
--- a/packages/website/ts/components/ui/copy_icon.tsx
+++ /dev/null
@@ -1,78 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import * as CopyToClipboard from 'react-copy-to-clipboard';
-import * as ReactDOM from 'react-dom';
-import ReactTooltip from 'react-tooltip';
-
-interface CopyIconProps {
- data: string;
- callToAction?: string;
-}
-
-interface CopyIconState {
- isHovering: boolean;
-}
-
-export class CopyIcon extends React.Component<CopyIconProps, CopyIconState> {
- private _copyTooltipTimeoutId: number;
- private _copyable: HTMLInputElement;
- constructor(props: CopyIconProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public componentDidUpdate(): void {
- // Remove tooltip if hover away
- if (!this.state.isHovering && this._copyTooltipTimeoutId) {
- clearInterval(this._copyTooltipTimeoutId);
- this._hideTooltip();
- }
- }
- public render(): React.ReactNode {
- return (
- <div className="inline-block">
- <CopyToClipboard text={this.props.data} onCopy={this._onCopy.bind(this)}>
- <div
- className="inline flex"
- style={{ cursor: 'pointer', color: colors.amber600 }}
- ref={this._setRefToProperty.bind(this)}
- data-tip={true}
- data-for="copy"
- data-event="click"
- data-iscapture={true} // This let's the click event continue to propogate
- onMouseOver={this._setHoverState.bind(this, true)}
- onMouseOut={this._setHoverState.bind(this, false)}
- >
- <div>
- <i style={{ fontSize: 15 }} className="zmdi zmdi-copy" />
- </div>
- {this.props.callToAction && <div className="pl1">{this.props.callToAction}</div>}
- </div>
- </CopyToClipboard>
- <ReactTooltip id="copy">Copied!</ReactTooltip>
- </div>
- );
- }
- private _setRefToProperty(el: HTMLInputElement): void {
- this._copyable = el;
- }
- private _setHoverState(isHovering: boolean): void {
- this.setState({
- isHovering,
- });
- }
- private _onCopy(): void {
- if (this._copyTooltipTimeoutId) {
- clearInterval(this._copyTooltipTimeoutId);
- }
-
- const tooltipLifespanMs = 1000;
- this._copyTooltipTimeoutId = window.setTimeout(() => {
- this._hideTooltip();
- }, tooltipLifespanMs);
- }
- private _hideTooltip(): void {
- ReactTooltip.hide(ReactDOM.findDOMNode(this._copyable));
- }
-}
diff --git a/packages/website/ts/components/ui/custom_menu_item.tsx b/packages/website/ts/components/ui/custom_menu_item.tsx
deleted file mode 100644
index 87ce32126..000000000
--- a/packages/website/ts/components/ui/custom_menu_item.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import { Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-interface CustomMenuItemProps {
- to: string;
- onClick?: () => void;
- className?: string;
-}
-
-interface CustomMenuItemState {
- isHovering: boolean;
-}
-
-export class CustomMenuItem extends React.Component<CustomMenuItemProps, CustomMenuItemState> {
- public static defaultProps: Partial<CustomMenuItemProps> = {
- onClick: _.noop.bind(_),
- className: '',
- };
- public constructor(props: CustomMenuItemProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public render(): React.ReactNode {
- const menuItemStyles = {
- cursor: 'pointer',
- opacity: this.state.isHovering ? 0.5 : 1,
- };
- return (
- <Link to={this.props.to}>
- <div
- onClick={this.props.onClick.bind(this)}
- className={`mx-auto ${this.props.className}`}
- style={menuItemStyles}
- onMouseEnter={this._onToggleHover.bind(this, true)}
- onMouseLeave={this._onToggleHover.bind(this, false)}
- >
- {this.props.children}
- </div>
- </Link>
- );
- }
- private _onToggleHover(isHovering: boolean): void {
- this.setState({
- isHovering,
- });
- }
-}
diff --git a/packages/website/ts/components/ui/drop_down.tsx b/packages/website/ts/components/ui/drop_down.tsx
deleted file mode 100644
index 4138b3fe5..000000000
--- a/packages/website/ts/components/ui/drop_down.tsx
+++ /dev/null
@@ -1,139 +0,0 @@
-import * as _ from 'lodash';
-import Popover from 'material-ui/Popover';
-import * as React from 'react';
-import { MaterialUIPosition } from 'ts/types';
-
-const CHECK_CLOSE_POPOVER_INTERVAL_MS = 300;
-const DEFAULT_STYLE = {
- fontSize: 14,
-};
-
-export enum DropdownMouseEvent {
- Hover = 'hover',
- Click = 'click',
-}
-
-export interface DropDownProps {
- activeNode: React.ReactNode;
- popoverContent: React.ReactNode;
- anchorOrigin: MaterialUIPosition;
- targetOrigin: MaterialUIPosition;
- style?: React.CSSProperties;
- zDepth?: number;
- activateEvent?: DropdownMouseEvent;
- closeEvent?: DropdownMouseEvent;
- popoverStyle?: React.CSSProperties;
-}
-
-interface DropDownState {
- isDropDownOpen: boolean;
- anchorEl?: HTMLInputElement;
-}
-
-export class DropDown extends React.Component<DropDownProps, DropDownState> {
- public static defaultProps: Partial<DropDownProps> = {
- style: DEFAULT_STYLE,
- zDepth: 1,
- activateEvent: DropdownMouseEvent.Hover,
- closeEvent: DropdownMouseEvent.Hover,
- popoverStyle: {},
- };
- private _isHovering: boolean;
- private _popoverCloseCheckIntervalId: number;
- constructor(props: DropDownProps) {
- super(props);
- this.state = {
- isDropDownOpen: false,
- };
- }
- public componentDidMount(): void {
- this._popoverCloseCheckIntervalId = window.setInterval(() => {
- this._checkIfShouldClosePopover();
- }, CHECK_CLOSE_POPOVER_INTERVAL_MS);
- }
- public componentWillUnmount(): void {
- window.clearInterval(this._popoverCloseCheckIntervalId);
- }
- public componentWillReceiveProps(_nextProps: DropDownProps): void {
- // HACK: If the popoverContent is updated to a different dimension and the users
- // mouse is no longer above it, the dropdown can enter an inconsistent state where
- // it believes the user is still hovering over it. In order to remedy this, we
- // call hoverOff whenever the dropdown receives updated props. This is a hack
- // because it will effectively close the dropdown on any prop update, barring
- // dropdowns from having dynamic content.
- this._onHoverOff();
- }
- public render(): React.ReactNode {
- return (
- <div
- style={{ ...this.props.style, width: 'fit-content', height: '100%' }}
- onMouseEnter={this._onHover.bind(this)}
- onMouseLeave={this._onHoverOff.bind(this)}
- >
- <div onClick={this._onActiveNodeClick.bind(this)}>{this.props.activeNode}</div>
- <Popover
- open={this.state.isDropDownOpen}
- anchorEl={this.state.anchorEl}
- anchorOrigin={this.props.anchorOrigin}
- targetOrigin={this.props.targetOrigin}
- onRequestClose={
- this.props.closeEvent === DropdownMouseEvent.Click
- ? this._closePopover.bind(this)
- : _.noop.bind(_)
- }
- useLayerForClickAway={this.props.closeEvent === DropdownMouseEvent.Click}
- animated={false}
- zDepth={this.props.zDepth}
- style={this.props.popoverStyle}
- >
- <div
- onMouseEnter={this._onHover.bind(this)}
- onMouseLeave={this._onHoverOff.bind(this)}
- onClick={this._closePopover.bind(this)}
- >
- {this.props.popoverContent}
- </div>
- </Popover>
- </div>
- );
- }
- private _onActiveNodeClick(event: React.FormEvent<HTMLInputElement>): void {
- if (this.props.activateEvent === DropdownMouseEvent.Click) {
- this.setState({
- isDropDownOpen: !this.state.isDropDownOpen,
- anchorEl: event.currentTarget,
- });
- }
- }
- private _onHover(event: React.FormEvent<HTMLInputElement>): void {
- this._isHovering = true;
- if (this.props.activateEvent === DropdownMouseEvent.Hover) {
- this._checkIfShouldOpenPopover(event);
- }
- }
- private _onHoverOff(): void {
- this._isHovering = false;
- }
- private _checkIfShouldOpenPopover(event: React.FormEvent<HTMLInputElement>): void {
- if (this.state.isDropDownOpen) {
- return; // noop
- }
- this.setState({
- isDropDownOpen: true,
- anchorEl: event.currentTarget,
- });
- }
- private _checkIfShouldClosePopover(): void {
- if (!this.state.isDropDownOpen) {
- return; // noop
- }
- if (this.props.closeEvent === DropdownMouseEvent.Hover && !this._isHovering) {
- this._closePopover();
- }
- }
- private _closePopover(): void {
- this.setState({
- isDropDownOpen: false,
- });
- }
-}
diff --git a/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx b/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx
deleted file mode 100644
index ba141c01e..000000000
--- a/packages/website/ts/components/ui/ease_up_from_bottom_animation.tsx
+++ /dev/null
@@ -1,31 +0,0 @@
-import { css, keyframes, styled } from 'ts/style/theme';
-
-const appearFromBottomFrames = keyframes`
- from {
- position: fixed;
- bottom: -500px;
- left: 0px;
- right: 0px;
- }
-
- to {
- position: fixed;
- bottom: 0px;
- left: 0px;
- right: 0px;
- }
-`;
-
-const stylesForAnimation = css`
- position: fixed;
-`;
-const animations = css`
- animation: ${appearFromBottomFrames} 1s ease 0s 1 forwards;
-`;
-
-export const EaseUpFromBottomAnimation = styled.div`
- ${props => animations};
- ${props => stylesForAnimation};
-`;
-
-EaseUpFromBottomAnimation.displayName = 'EaseUpFromBottomAnimation';
diff --git a/packages/website/ts/components/ui/ethereum_address.tsx b/packages/website/ts/components/ui/ethereum_address.tsx
deleted file mode 100644
index 12f8636eb..000000000
--- a/packages/website/ts/components/ui/ethereum_address.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { EtherscanLinkSuffixes } from '@0x/react-shared';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import { EtherScanIcon } from 'ts/components/ui/etherscan_icon';
-import { utils } from 'ts/utils/utils';
-
-interface EthereumAddressProps {
- address: string;
- networkId: number;
-}
-
-export const EthereumAddress = (props: EthereumAddressProps) => {
- const tooltipId = `${props.address}-ethereum-address`;
- const truncatedAddress = utils.getAddressBeginAndEnd(props.address);
- return (
- <div>
- <div className="inline" style={{ fontSize: 13 }} data-tip={true} data-for={tooltipId}>
- {truncatedAddress}
- </div>
- <div className="pl1 inline">
- <EtherScanIcon
- addressOrTxHash={props.address}
- networkId={props.networkId}
- etherscanLinkSuffixes={EtherscanLinkSuffixes.Address}
- />
- </div>
- <ReactTooltip id={tooltipId}>{props.address}</ReactTooltip>
- </div>
- );
-};
diff --git a/packages/website/ts/components/ui/etherscan_icon.tsx b/packages/website/ts/components/ui/etherscan_icon.tsx
deleted file mode 100644
index a7fba8a33..000000000
--- a/packages/website/ts/components/ui/etherscan_icon.tsx
+++ /dev/null
@@ -1,39 +0,0 @@
-import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-
-interface EtherScanIconProps {
- addressOrTxHash: string;
- etherscanLinkSuffixes: EtherscanLinkSuffixes;
- networkId: number;
-}
-
-export const EtherScanIcon = (props: EtherScanIconProps) => {
- const etherscanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
- props.addressOrTxHash,
- props.networkId,
- props.etherscanLinkSuffixes,
- );
- const transactionTooltipId = `${props.addressOrTxHash}-etherscan-icon-tooltip`;
- return (
- <div className="inline">
- {!_.isUndefined(etherscanLinkIfExists) ? (
- <a href={etherscanLinkIfExists} target="_blank">
- {renderIcon()}
- </a>
- ) : (
- <div className="inline" data-tip={true} data-for={transactionTooltipId}>
- {renderIcon()}
- <ReactTooltip id={transactionTooltipId}>
- Your network (id: {props.networkId}) is not supported by Etherscan
- </ReactTooltip>
- </div>
- )}
- </div>
- );
-};
-
-function renderIcon(): React.ReactNode {
- return <i style={{ color: colors.amber600 }} className="zmdi zmdi-open-in-new" />;
-}
diff --git a/packages/website/ts/components/ui/fake_text_field.tsx b/packages/website/ts/components/ui/fake_text_field.tsx
deleted file mode 100644
index 7c3a482a4..000000000
--- a/packages/website/ts/components/ui/fake_text_field.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as React from 'react';
-import { InputLabel } from 'ts/components/ui/input_label';
-
-const styles: Styles = {
- hr: {
- borderBottom: '1px solid rgb(224, 224, 224)',
- borderLeft: 'none rgb(224, 224, 224)',
- borderRight: 'none rgb(224, 224, 224)',
- borderTop: 'none rgb(224, 224, 224)',
- bottom: 6,
- boxSizing: 'content-box',
- margin: 0,
- position: 'absolute',
- width: '100%',
- },
-};
-
-interface FakeTextFieldProps {
- label?: React.ReactNode | string;
- children?: any;
-}
-
-export const FakeTextField = (props: FakeTextFieldProps) => {
- return (
- <div className="relative">
- {props.label !== '' && <InputLabel text={props.label} />}
- <div className="pb2" style={{ height: 23 }}>
- {props.children}
- </div>
- <hr style={styles.hr} />
- </div>
- );
-};
diff --git a/packages/website/ts/components/ui/flash_message.tsx b/packages/website/ts/components/ui/flash_message.tsx
deleted file mode 100644
index 2b866676d..000000000
--- a/packages/website/ts/components/ui/flash_message.tsx
+++ /dev/null
@@ -1,40 +0,0 @@
-import * as _ from 'lodash';
-import Snackbar from 'material-ui/Snackbar';
-import * as React from 'react';
-import { Dispatcher } from 'ts/redux/dispatcher';
-
-const SHOW_DURATION_MS = 4000;
-
-interface FlashMessageProps {
- dispatcher: Dispatcher;
- flashMessage?: string | React.ReactNode;
- showDurationMs?: number;
- bodyStyle?: React.CSSProperties;
-}
-
-interface FlashMessageState {}
-
-export class FlashMessage extends React.Component<FlashMessageProps, FlashMessageState> {
- public static defaultProps: Partial<FlashMessageProps> = {
- showDurationMs: SHOW_DURATION_MS,
- bodyStyle: {},
- };
- public render(): React.ReactNode {
- if (!_.isUndefined(this.props.flashMessage)) {
- return (
- <Snackbar
- open={true}
- message={this.props.flashMessage}
- autoHideDuration={this.props.showDurationMs}
- onRequestClose={this._onClose.bind(this)}
- bodyStyle={this.props.bodyStyle}
- />
- );
- } else {
- return null;
- }
- }
- private _onClose(): void {
- this.props.dispatcher.hideFlashMessage();
- }
-}
diff --git a/packages/website/ts/components/ui/help_tooltip.tsx b/packages/website/ts/components/ui/help_tooltip.tsx
deleted file mode 100644
index 831d888f5..000000000
--- a/packages/website/ts/components/ui/help_tooltip.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-
-interface HelpTooltipProps {
- style?: React.CSSProperties;
- explanation: React.ReactNode;
-}
-
-export const HelpTooltip = (props: HelpTooltipProps) => {
- return (
- <div
- style={{ ...props.style }}
- className="inline-block"
- data-tip={props.explanation}
- data-for="helpTooltip"
- data-multiline={true}
- >
- <i style={{ fontSize: 16 }} className="zmdi zmdi-help" />
- <ReactTooltip id="helpTooltip" />
- </div>
- );
-};
diff --git a/packages/website/ts/components/ui/icon_button.tsx b/packages/website/ts/components/ui/icon_button.tsx
deleted file mode 100644
index 9f469ec69..000000000
--- a/packages/website/ts/components/ui/icon_button.tsx
+++ /dev/null
@@ -1,64 +0,0 @@
-import { colors, Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-export interface IconButtonProps {
- iconName: string;
- labelText?: string;
- onClick?: () => void;
- color?: string;
- display?: string;
-}
-interface IconButtonState {
- isHovering: boolean;
-}
-export class IconButton extends React.Component<IconButtonProps, IconButtonState> {
- public static defaultProps: Partial<IconButtonProps> = {
- labelText: '',
- color: colors.mediumBlue,
- };
- public constructor(props: IconButtonProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public render(): React.ReactNode {
- const styles: Styles = {
- root: {
- cursor: this.props.onClick ? 'pointer' : 'undefined',
- opacity: this.state.isHovering && this.props.onClick ? 0.5 : 1,
- display: this.props.display,
- },
- icon: {
- color: this.props.color,
- fontSize: 20,
- },
- label: {
- color: this.props.color,
- fontSize: 10,
- },
- };
- return (
- <div
- className="flex items-center py2"
- onClick={this.props.onClick}
- onMouseEnter={this._onToggleHover.bind(this, true)}
- onMouseLeave={this._onToggleHover.bind(this, false)}
- style={styles.root}
- >
- <i style={styles.icon} className={`zmdi ${this.props.iconName}`} />
- {!_.isEmpty(this.props.labelText) && (
- <div className="pl1" style={styles.label}>
- {this.props.labelText}
- </div>
- )}
- </div>
- );
- }
- private _onToggleHover(isHovering: boolean): void {
- this.setState({
- isHovering,
- });
- }
-}
diff --git a/packages/website/ts/components/ui/identicon.tsx b/packages/website/ts/components/ui/identicon.tsx
deleted file mode 100644
index 9eca04a5d..000000000
--- a/packages/website/ts/components/ui/identicon.tsx
+++ /dev/null
@@ -1,48 +0,0 @@
-import blockies from 'blockies';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Circle } from 'ts/components/ui/circle';
-import { Image } from 'ts/components/ui/image';
-import { colors } from 'ts/style/colors';
-
-interface IdenticonProps {
- address: string;
- diameter: number;
- style?: React.CSSProperties;
-}
-
-interface IdenticonState {}
-
-export class Identicon extends React.Component<IdenticonProps, IdenticonState> {
- public static defaultProps: Partial<IdenticonProps> = {
- style: {},
- };
- public render(): React.ReactNode {
- const address = this.props.address;
- const diameter = this.props.diameter;
- return (
- <div
- className="circle relative transitionFix"
- style={{
- width: diameter,
- height: diameter,
- overflow: 'hidden',
- ...this.props.style,
- }}
- >
- {!_.isEmpty(address) ? (
- <Image
- src={blockies({
- seed: address.toLowerCase(),
- }).toDataURL()}
- height={diameter}
- width={diameter}
- />
- ) : (
- <Circle diameter={diameter} fillColor={colors.grey200} />
- )}
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/ui/image.tsx b/packages/website/ts/components/ui/image.tsx
deleted file mode 100644
index d698ddaa0..000000000
--- a/packages/website/ts/components/ui/image.tsx
+++ /dev/null
@@ -1,49 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-export interface ImageProps {
- className?: string;
- src?: string;
- fallbackSrc?: string;
- borderRadius?: string;
- width?: string | number;
- height?: string | number;
- maxWidth?: string | number;
- maxHeight?: string | number;
- additionalStyle?: React.CSSProperties;
-}
-interface ImageState {
- imageLoadFailed: boolean;
-}
-export class Image extends React.Component<ImageProps, ImageState> {
- constructor(props: ImageProps) {
- super(props);
- this.state = {
- imageLoadFailed: false,
- };
- }
- public render(): React.ReactNode {
- const src =
- this.state.imageLoadFailed || _.isUndefined(this.props.src) ? this.props.fallbackSrc : this.props.src;
- return (
- <img
- className={this.props.className}
- onError={this._onError.bind(this)}
- src={src}
- style={{
- ...this.props.additionalStyle,
- borderRadius: this.props.borderRadius,
- maxWidth: this.props.maxWidth,
- maxHeight: this.props.maxHeight,
- }}
- height={this.props.height}
- width={this.props.width}
- />
- );
- }
- private _onError(): void {
- this.setState({
- imageLoadFailed: true,
- });
- }
-}
diff --git a/packages/website/ts/components/ui/input_label.tsx b/packages/website/ts/components/ui/input_label.tsx
deleted file mode 100644
index e7afb5a17..000000000
--- a/packages/website/ts/components/ui/input_label.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { colors, Styles } from '@0x/react-shared';
-import * as React from 'react';
-
-export interface InputLabelProps {
- text: string | Element | React.ReactNode;
-}
-
-const styles: Styles = {
- label: {
- color: colors.grey,
- fontSize: 12,
- pointerEvents: 'none',
- textAlign: 'left',
- transform: 'scale(0.75) translate(0px, -28px)',
- transformOrigin: 'left top 0px',
- transition: 'all 450ms cubic-bezier(0.23, 1, 0.32, 1) 0ms',
- userSelect: 'none',
- width: 240,
- zIndex: 1,
- } as React.CSSProperties,
-};
-
-export const InputLabel = (props: InputLabelProps) => {
- return <label style={styles.label}>{props.text}</label>;
-};
diff --git a/packages/website/ts/components/ui/island.tsx b/packages/website/ts/components/ui/island.tsx
deleted file mode 100644
index c8abfb7e0..000000000
--- a/packages/website/ts/components/ui/island.tsx
+++ /dev/null
@@ -1,29 +0,0 @@
-import * as React from 'react';
-import { colors } from 'ts/style/colors';
-import { styled } from 'ts/style/theme';
-
-export interface IslandProps {
- style?: React.CSSProperties;
- className?: string;
- Component?: string | React.ComponentClass<any> | React.StatelessComponent<any>;
- borderRadius?: string;
-}
-
-const PlainIsland: React.StatelessComponent<IslandProps> = ({ Component, style, className, children }) => (
- <Component style={style} className={className} children={children} />
-);
-
-export const Island = styled(PlainIsland)`
- background-color: ${colors.white};
- border-radius: ${props => props.borderRadius};
- box-shadow: 0px 4px 6px ${colors.walletBoxShadow};
- overflow: hidden;
-`;
-
-Island.defaultProps = {
- Component: 'div',
- borderRadius: '10px',
- style: {},
-};
-
-Island.displayName = 'Island';
diff --git a/packages/website/ts/components/ui/lifecycle_raised_button.tsx b/packages/website/ts/components/ui/lifecycle_raised_button.tsx
deleted file mode 100644
index f004dd47f..000000000
--- a/packages/website/ts/components/ui/lifecycle_raised_button.tsx
+++ /dev/null
@@ -1,102 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { errorUtils } from '@0x/utils';
-import RaisedButton from 'material-ui/RaisedButton';
-import * as React from 'react';
-
-const COMPLETE_STATE_SHOW_LENGTH_MS = 2000;
-
-enum ButtonState {
- Ready,
- Loading,
- Complete,
-}
-
-interface LifeCycleRaisedButtonProps {
- isHidden?: boolean;
- isDisabled?: boolean;
- isPrimary?: boolean;
- labelReady: React.ReactNode | string;
- labelLoading: React.ReactNode | string;
- labelComplete: React.ReactNode | string;
- onClickAsyncFn: () => Promise<boolean>;
- backgroundColor?: string;
- labelColor?: string;
-}
-
-interface LifeCycleRaisedButtonState {
- buttonState: ButtonState;
-}
-
-export class LifeCycleRaisedButton extends React.Component<LifeCycleRaisedButtonProps, LifeCycleRaisedButtonState> {
- public static defaultProps: Partial<LifeCycleRaisedButtonProps> = {
- isDisabled: false,
- backgroundColor: colors.white,
- labelColor: colors.darkGrey,
- };
- private _buttonTimeoutId: number;
- private _didUnmount: boolean;
- constructor(props: LifeCycleRaisedButtonProps) {
- super(props);
- this.state = {
- buttonState: ButtonState.Ready,
- };
- }
- public componentWillUnmount(): void {
- clearTimeout(this._buttonTimeoutId);
- this._didUnmount = true;
- }
- public render(): React.ReactNode {
- if (this.props.isHidden) {
- return <span />;
- }
-
- let label;
- switch (this.state.buttonState) {
- case ButtonState.Ready:
- label = this.props.labelReady;
- break;
- case ButtonState.Loading:
- label = this.props.labelLoading;
- break;
- case ButtonState.Complete:
- label = this.props.labelComplete;
- break;
- default:
- throw errorUtils.spawnSwitchErr('ButtonState', this.state.buttonState);
- }
- return (
- <RaisedButton
- primary={this.props.isPrimary}
- label={label}
- style={{ width: '100%' }}
- backgroundColor={this.props.backgroundColor}
- labelColor={this.props.labelColor}
- onClick={this.onClickAsync.bind(this)}
- disabled={this.props.isDisabled || this.state.buttonState !== ButtonState.Ready}
- />
- );
- }
- public async onClickAsync(): Promise<void> {
- this.setState({
- buttonState: ButtonState.Loading,
- });
- const didSucceed = await this.props.onClickAsyncFn();
- if (this._didUnmount) {
- return; // noop since unmount called before async callback returned.
- }
- if (didSucceed) {
- this.setState({
- buttonState: ButtonState.Complete,
- });
- this._buttonTimeoutId = window.setTimeout(() => {
- this.setState({
- buttonState: ButtonState.Ready,
- });
- }, COMPLETE_STATE_SHOW_LENGTH_MS);
- } else {
- this.setState({
- buttonState: ButtonState.Ready,
- });
- }
- }
-}
diff --git a/packages/website/ts/components/ui/multi_select.tsx b/packages/website/ts/components/ui/multi_select.tsx
deleted file mode 100644
index 2cf44cae1..000000000
--- a/packages/website/ts/components/ui/multi_select.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Container } from './container';
-
-export interface MultiSelectItemConfig {
- value: string;
- renderItemContent: (isSelected: boolean) => React.ReactNode;
- onClick?: () => void;
-}
-
-export interface MultiSelectProps {
- selectedValues?: string[];
- items: MultiSelectItemConfig[];
- backgroundColor?: string;
- height?: string;
-}
-
-export class MultiSelect extends React.Component<MultiSelectProps> {
- public static defaultProps = {
- backgroundColor: colors.white,
- };
- public render(): React.ReactNode {
- const { items, backgroundColor, selectedValues, height } = this.props;
- return (
- <Container
- backgroundColor={backgroundColor}
- borderRadius="4px"
- width="100%"
- height={height}
- overflowY="scroll"
- >
- {_.map(items, item => (
- <MultiSelectItem
- key={item.value}
- renderItemContent={item.renderItemContent}
- backgroundColor={backgroundColor}
- onClick={item.onClick}
- isSelected={_.isUndefined(selectedValues) || _.includes(selectedValues, item.value)}
- />
- ))}
- </Container>
- );
- }
-}
-
-export interface MultiSelectItemProps {
- renderItemContent: (isSelected: boolean) => React.ReactNode;
- isSelected?: boolean;
- onClick?: () => void;
- backgroundColor?: string;
-}
-
-export const MultiSelectItem: React.StatelessComponent<MultiSelectItemProps> = ({
- renderItemContent,
- isSelected,
- onClick,
- backgroundColor,
-}) => (
- <Container cursor="pointer" shouldDarkenOnHover={true} onClick={onClick} backgroundColor={backgroundColor}>
- <Container borderBottom={`1px solid ${colors.lightestGrey}`} margin="0px 15px" padding="10px 0px">
- {renderItemContent(isSelected)}
- </Container>
- </Container>
-);
diff --git a/packages/website/ts/components/ui/overlay.tsx b/packages/website/ts/components/ui/overlay.tsx
deleted file mode 100644
index fc7507475..000000000
--- a/packages/website/ts/components/ui/overlay.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { zIndex } from 'ts/style/z_index';
-
-export interface OverlayProps {
- style?: React.CSSProperties;
- onClick?: () => void;
-}
-
-const style: React.CSSProperties = {
- position: 'fixed',
- top: 0,
- right: 0,
- bottom: 0,
- left: 0,
- zIndex: zIndex.overlay,
- backgroundColor: 'rgba(0, 0, 0, 0.6)',
-};
-
-export const Overlay: React.StatelessComponent<OverlayProps> = props => (
- <div style={{ ...style, ...props.style }} onClick={props.onClick}>
- {props.children}
- </div>
-);
-
-Overlay.defaultProps = {
- style: {},
- onClick: _.noop.bind(_),
-};
-
-Overlay.displayName = 'Overlay';
diff --git a/packages/website/ts/components/ui/party.tsx b/packages/website/ts/components/ui/party.tsx
deleted file mode 100644
index a14b94d8a..000000000
--- a/packages/website/ts/components/ui/party.tsx
+++ /dev/null
@@ -1,141 +0,0 @@
-import { colors, EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import ReactTooltip from 'react-tooltip';
-import { EthereumAddress } from 'ts/components/ui/ethereum_address';
-import { Identicon } from 'ts/components/ui/identicon';
-
-const IMAGE_DIMENSION = 100;
-const IDENTICON_DIAMETER = 95;
-
-interface PartyProps {
- label: string;
- address: string;
- networkId: number;
- alternativeImage?: string;
- identiconDiameter?: number;
- identiconStyle?: React.CSSProperties;
- isInTokenRegistry?: boolean;
- hasUniqueNameAndSymbol?: boolean;
-}
-
-interface PartyState {}
-
-export class Party extends React.Component<PartyProps, PartyState> {
- public static defaultProps: Partial<PartyProps> = {
- identiconStyle: {},
- identiconDiameter: IDENTICON_DIAMETER,
- };
- public render(): React.ReactNode {
- const label = this.props.label;
- const address = this.props.address;
- const identiconDiameter = this.props.identiconDiameter;
- const emptyIdenticonStyles = {
- width: identiconDiameter,
- height: identiconDiameter,
- backgroundColor: 'lightgray',
- marginTop: 13,
- marginBottom: 10,
- };
- const tokenImageStyle = {
- width: IMAGE_DIMENSION,
- height: IMAGE_DIMENSION,
- };
- const etherscanLinkIfExists = sharedUtils.getEtherScanLinkIfExists(
- this.props.address,
- this.props.networkId,
- EtherscanLinkSuffixes.Address,
- );
- const isRegistered = this.props.isInTokenRegistry;
- const registeredTooltipId = `${this.props.address}-${isRegistered}-registeredTooltip`;
- const uniqueNameAndSymbolTooltipId = `${this.props.address}-${isRegistered}-uniqueTooltip`;
- return (
- <div style={{ overflow: 'hidden' }}>
- <div className="pb1 center">{label}</div>
- {_.isEmpty(address) ? (
- <div className="circle mx-auto" style={emptyIdenticonStyles} />
- ) : (
- <a href={etherscanLinkIfExists} target="_blank">
- {isRegistered && !_.isUndefined(this.props.alternativeImage) ? (
- <img style={tokenImageStyle} src={this.props.alternativeImage} />
- ) : (
- <div className="mx-auto" style={{ height: identiconDiameter, width: identiconDiameter }}>
- <Identicon
- address={this.props.address}
- diameter={identiconDiameter}
- style={this.props.identiconStyle}
- />
- </div>
- )}
- </a>
- )}
- <div className="mx-auto center pt1">
- <div style={{ height: 25 }}>
- <EthereumAddress address={address} networkId={this.props.networkId} />
- </div>
- {!_.isUndefined(this.props.isInTokenRegistry) && (
- <div>
- <div
- data-tip={true}
- data-for={registeredTooltipId}
- className="mx-auto"
- style={{ fontSize: 13, width: 127 }}
- >
- <span
- style={{
- color: isRegistered ? colors.brightGreen : colors.red500,
- }}
- >
- <i
- className={`zmdi ${isRegistered ? 'zmdi-check-circle' : 'zmdi-alert-triangle'}`}
- />
- </span>{' '}
- <span>{isRegistered ? 'Registered' : 'Unregistered'} token</span>
- <ReactTooltip id={registeredTooltipId}>
- {isRegistered ? (
- <div>
- This token address was found in the token registry
- <br />
- smart contract and is therefore believed to be a<br />
- legitimate token.
- </div>
- ) : (
- <div>
- This token is not included in the token registry
- <br />
- smart contract. We cannot guarantee the legitimacy
- <br />
- of this token. Make sure to verify its address on Etherscan.
- </div>
- )}
- </ReactTooltip>
- </div>
- </div>
- )}
- {!_.isUndefined(this.props.hasUniqueNameAndSymbol) && !this.props.hasUniqueNameAndSymbol && (
- <div>
- <div
- data-tip={true}
- data-for={uniqueNameAndSymbolTooltipId}
- className="mx-auto"
- style={{ fontSize: 13, width: 127 }}
- >
- <span style={{ color: colors.red500 }}>
- <i className="zmdi zmdi-alert-octagon" />
- </span>{' '}
- <span>Suspicious token</span>
- <ReactTooltip id={uniqueNameAndSymbolTooltipId}>
- This token shares it's name, symbol or both with
- <br />
- a token in the 0x Token Registry but it has a different
- <br />
- smart contract address. This is most likely a scam token!
- </ReactTooltip>
- </div>
- </div>
- )}
- </div>
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/ui/pointer.tsx b/packages/website/ts/components/ui/pointer.tsx
deleted file mode 100644
index c97b1e700..000000000
--- a/packages/website/ts/components/ui/pointer.tsx
+++ /dev/null
@@ -1,72 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import { styled } from 'ts/style/theme';
-
-export enum PointerDirection {
- Top = 'top',
- Right = 'right',
- Bottom = 'bottom',
- Left = 'left',
-}
-
-export interface PointerProps {
- className?: string;
- color?: string;
- size?: number;
- direction: PointerDirection;
-}
-
-const PlainPointer: React.StatelessComponent<PointerProps> = props => <div {...props} />;
-
-const positionToCss = (props: PointerProps) => {
- const position = {
- top: `bottom: 100%; left: 50%;`,
- right: `left: 100%; top: 50%;`,
- bottom: `top: 100%; left: 50%;`,
- left: `right: 100%; top: 50%;`,
- }[props.direction];
-
- const borderColorSide = {
- top: 'border-bottom-color',
- right: 'border-left-color',
- bottom: 'border-top-color',
- left: 'border-right-color',
- }[props.direction];
- const border = `${borderColorSide}: ${props.color};`;
- const marginSide = {
- top: 'margin-left',
- right: 'margin-top',
- bottom: 'margin-left',
- left: 'margin-top',
- }[props.direction];
- const margin = `${marginSide}: -${props.size}px`;
- return {
- position,
- border,
- margin,
- };
-};
-
-export const Pointer = styled(PlainPointer)`
- position: relative;
- &:after {
- border: solid transparent;
- content: " ";
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none;
- border-color: rgba(136, 183, 213, 0);
- border-width: ${props => `${props.size}px`};
- ${props => positionToCss(props).position}
- ${props => positionToCss(props).border}
- ${props => positionToCss(props).margin}
- }
-`;
-
-Pointer.defaultProps = {
- color: colors.white,
- size: 16,
-};
-
-Pointer.displayName = 'Pointer';
diff --git a/packages/website/ts/components/ui/required_label.tsx b/packages/website/ts/components/ui/required_label.tsx
deleted file mode 100644
index 5080462fa..000000000
--- a/packages/website/ts/components/ui/required_label.tsx
+++ /dev/null
@@ -1,15 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-
-export interface RequiredLabelProps {
- label: string | React.ReactNode;
-}
-
-export const RequiredLabel = (props: RequiredLabelProps) => {
- return (
- <span>
- {props.label}
- <span style={{ color: colors.red600 }}>*</span>
- </span>
- );
-};
diff --git a/packages/website/ts/components/ui/retry.tsx b/packages/website/ts/components/ui/retry.tsx
deleted file mode 100644
index 543b7df4b..000000000
--- a/packages/website/ts/components/ui/retry.tsx
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as React from 'react';
-
-import { Button } from 'ts/components/ui/button';
-import { colors } from 'ts/style/colors';
-
-const BUTTON_TEXT = 'reload';
-
-export interface RetryProps {
- onRetry: () => void;
-}
-export const Retry = (props: RetryProps) => (
- <div className="clearfix center" style={{ color: colors.black }}>
- <div className="mx-auto inline-block align-middle" style={{ lineHeight: '44px', textAlign: 'center' }}>
- <div className="h2" style={{ fontFamily: 'Roboto Mono' }}>
- Something went wrong.
- </div>
- <div className="py3">
- <Button
- type="button"
- backgroundColor={colors.black}
- width="290px"
- fontColor={colors.white}
- fontSize="18px"
- fontFamily="Roboto Mono"
- onClick={props.onRetry}
- >
- {BUTTON_TEXT}
- </Button>
- </div>
- </div>
- </div>
-);
diff --git a/packages/website/ts/components/ui/simple_menu.tsx b/packages/website/ts/components/ui/simple_menu.tsx
deleted file mode 100644
index 45ee752e3..000000000
--- a/packages/website/ts/components/ui/simple_menu.tsx
+++ /dev/null
@@ -1,88 +0,0 @@
-import { Link } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as CopyToClipboard from 'react-copy-to-clipboard';
-
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { colors } from 'ts/style/colors';
-import { WebsitePaths } from 'ts/types';
-
-export interface SimpleMenuProps {
- minWidth?: number | string;
-}
-
-export const SimpleMenu: React.StatelessComponent<SimpleMenuProps> = ({ children, minWidth }) => {
- return (
- <Container
- marginLeft="16px"
- marginRight="16px"
- marginBottom="16px"
- minWidth={minWidth}
- className="flex flex-column"
- >
- {children}
- </Container>
- );
-};
-
-SimpleMenu.defaultProps = {
- minWidth: '220px',
-};
-
-export interface SimpleMenuItemProps {
- displayText: string;
- onClick?: () => void;
-}
-export const SimpleMenuItem: React.StatelessComponent<SimpleMenuItemProps> = ({ displayText, onClick }) => {
- // Falling back to _.noop for onclick retains the hovering effect
- return (
- <Container marginTop="16px" className="flex flex-column">
- <Text
- fontSize="14px"
- fontColor={colors.darkGrey}
- onClick={onClick || _.noop.bind(_)}
- hoverColor={colors.mediumBlue}
- >
- {displayText}
- </Text>
- </Container>
- );
-};
-
-export interface CopyAddressSimpleMenuItemProps {
- userAddress: string;
- onClick?: () => void;
-}
-export const CopyAddressSimpleMenuItem: React.StatelessComponent<CopyAddressSimpleMenuItemProps> = ({
- userAddress,
- onClick,
-}) => {
- return (
- <CopyToClipboard text={userAddress}>
- <SimpleMenuItem displayText="Copy Address to Clipboard" onClick={onClick} />
- </CopyToClipboard>
- );
-};
-
-export interface GoToAccountManagementSimpleMenuItemProps {
- onClick?: () => void;
-}
-export const GoToAccountManagementSimpleMenuItem: React.StatelessComponent<
- GoToAccountManagementSimpleMenuItemProps
-> = ({ onClick }) => {
- return (
- <Link to={`${WebsitePaths.Portal}/account`}>
- <SimpleMenuItem displayText="Manage Account..." onClick={onClick} />
- </Link>
- );
-};
-
-export interface DifferentWalletSimpleMenuItemProps {
- onClick?: () => void;
-}
-export const DifferentWalletSimpleMenuItem: React.StatelessComponent<DifferentWalletSimpleMenuItemProps> = ({
- onClick,
-}) => {
- return <SimpleMenuItem displayText="Use Ledger Wallet..." onClick={onClick} />;
-};
diff --git a/packages/website/ts/components/ui/spinner.tsx b/packages/website/ts/components/ui/spinner.tsx
deleted file mode 100644
index dc73e74e3..000000000
--- a/packages/website/ts/components/ui/spinner.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-import { styled } from 'ts/style/theme';
-
-import { dash, rotate } from 'ts/style/keyframes';
-
-interface SpinnerSvgProps {
- color: string;
- size: number;
- viewBox?: string;
-}
-
-const SpinnerSvg: React.StatelessComponent<SpinnerSvgProps> = props => <svg {...props} />;
-
-const StyledSpinner = styled(SpinnerSvg)`
- animation: ${rotate} 3s linear infinite;
- margin: ${props => `-${props.size / 2}px 0 0 -${props.size / 2}px`};
- margin-top: ${props => `-${props.size / 2}px`};
- margin-left: ${props => `-${props.size / 2}px`};
- margin-bottom: 0px;
- margin-right: 0px;
- size: ${props => `${props.size}px`};
- height: ${props => `${props.size}px`};
-
- & .path {
- stroke: ${props => props.color};
- stroke-linecap: round;
- animation: ${dash} 2.5s ease-in-out infinite;
- }
-`;
-
-export interface SpinnerProps {
- size?: number;
- strokeSize?: number;
- color?: string;
-}
-
-export const Spinner: React.StatelessComponent<SpinnerProps> = ({ size, strokeSize, color }) => {
- const c = size / 2;
- const r = c - strokeSize;
- return (
- <StyledSpinner color={color} size={size} viewBox={`0 0 ${size} ${size}`}>
- <circle className="path" cx={c} cy={c} r={r} fill="none" strokeWidth={strokeSize} />
- </StyledSpinner>
- );
-};
-
-Spinner.defaultProps = {
- size: 50,
- color: colors.mediumBlue,
- strokeSize: 4,
-};
-
-Spinner.displayName = 'Spinner';
diff --git a/packages/website/ts/components/ui/swap_icon.tsx b/packages/website/ts/components/ui/swap_icon.tsx
deleted file mode 100644
index 406da8fe1..000000000
--- a/packages/website/ts/components/ui/swap_icon.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { colors } from '@0x/react-shared';
-import * as React from 'react';
-
-interface SwapIconProps {
- swapTokensFn: () => void;
-}
-
-interface SwapIconState {
- isHovering: boolean;
-}
-
-export class SwapIcon extends React.Component<SwapIconProps, SwapIconState> {
- public constructor(props: SwapIconProps) {
- super(props);
- this.state = {
- isHovering: false,
- };
- }
- public render(): React.ReactNode {
- const swapStyles = {
- color: this.state.isHovering ? colors.amber600 : colors.amber800,
- fontSize: 50,
- };
- return (
- <div
- className="mx-auto pt4"
- style={{ cursor: 'pointer', height: 50, width: 37.5 }}
- onClick={this.props.swapTokensFn}
- onMouseEnter={this._onToggleHover.bind(this, true)}
- onMouseLeave={this._onToggleHover.bind(this, false)}
- >
- <i style={swapStyles} className="zmdi zmdi-swap" />
- </div>
- );
- }
- private _onToggleHover(isHovering: boolean): void {
- this.setState({
- isHovering,
- });
- }
-}
diff --git a/packages/website/ts/components/ui/text.tsx b/packages/website/ts/components/ui/text.tsx
deleted file mode 100644
index 046442ee5..000000000
--- a/packages/website/ts/components/ui/text.tsx
+++ /dev/null
@@ -1,79 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { darken } from 'polished';
-import * as React from 'react';
-import { styled } from 'ts/style/theme';
-
-export type TextTag = 'p' | 'div' | 'span' | 'label' | 'h1' | 'h2' | 'h3' | 'h4' | 'i' | 'span';
-
-export interface TextProps {
- className?: string;
- children?: any;
- Tag?: TextTag;
- fontSize?: string;
- fontFamily?: string;
- fontStyle?: string;
- fontColor?: string;
- lineHeight?: string;
- minHeight?: string;
- center?: boolean;
- fontWeight?: number | string;
- textDecorationLine?: string;
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
- hoverColor?: string;
- letterSpacing?: string | number;
- noWrap?: boolean;
- textAlign?: string;
- display?: string;
-}
-
-const PlainText: React.StatelessComponent<TextProps> = ({ children, className, onClick, Tag }) => (
- <Tag className={className} onClick={onClick}>
- {children}
- </Tag>
-);
-
-export const Text = styled(PlainText)`
- font-family: ${props => props.fontFamily};
- font-style: ${props => props.fontStyle};
- font-weight: ${props => props.fontWeight};
- font-size: ${props => props.fontSize};
- text-align: ${props => props.textAlign};
- letter-spacing: ${props => props.letterSpacing};
- text-decoration-line: ${props => props.textDecorationLine};
- ${props => (props.lineHeight ? `line-height: ${props.lineHeight}` : '')};
- ${props => (props.center ? 'text-align: center' : '')};
- color: ${props => props.fontColor};
- ${props => (props.minHeight ? `min-height: ${props.minHeight}` : '')};
- ${props => (props.onClick ? 'cursor: pointer' : '')};
- transition: color 0.5s ease;
- ${props => (props.noWrap ? 'white-space: nowrap' : '')};
- ${props => (props.display ? `display: ${props.display}` : '')};
- &:hover {
- ${props => (props.onClick ? `color: ${props.hoverColor || darken(0.3, props.fontColor)}` : '')};
- }
-`;
-
-Text.defaultProps = {
- fontFamily: 'Roboto',
- fontStyle: 'normal',
- fontWeight: 400,
- fontColor: colors.black,
- fontSize: '15px',
- lineHeight: '1.5em',
- textDecorationLine: 'none',
- Tag: 'div',
- noWrap: false,
-};
-
-Text.displayName = 'Text';
-
-export const Title: React.StatelessComponent<TextProps> = props => <Text {...props} />;
-
-Title.defaultProps = {
- Tag: 'h2',
- fontSize: '20px',
- fontWeight: 600,
- fontColor: colors.black,
-};
-
-Title.displayName = 'Title';
diff --git a/packages/website/ts/components/ui/token_icon.tsx b/packages/website/ts/components/ui/token_icon.tsx
deleted file mode 100644
index 0875cc56b..000000000
--- a/packages/website/ts/components/ui/token_icon.tsx
+++ /dev/null
@@ -1,34 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Identicon } from 'ts/components/ui/identicon';
-import { Token } from 'ts/types';
-
-interface TokenIconProps {
- token: Token;
- diameter: number;
- link?: string;
-}
-
-interface TokenIconState {}
-
-export class TokenIcon extends React.Component<TokenIconProps, TokenIconState> {
- public render(): React.ReactNode {
- const token = this.props.token;
- const diameter = this.props.diameter;
- const icon =
- token.isRegistered && !_.isUndefined(token.iconUrl) ? (
- <img style={{ width: diameter, height: diameter }} src={token.iconUrl} />
- ) : (
- <Identicon address={token.address} diameter={diameter} />
- );
- if (_.isEmpty(this.props.link)) {
- return icon;
- } else {
- return (
- <a href={this.props.link} target="_blank" style={{ textDecoration: 'none' }}>
- {icon}
- </a>
- );
- }
- }
-}
diff --git a/packages/website/ts/components/visual_order.tsx b/packages/website/ts/components/visual_order.tsx
deleted file mode 100644
index d723757d2..000000000
--- a/packages/website/ts/components/visual_order.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { Party } from 'ts/components/ui/party';
-import { AssetToken, Token, TokenByAddress } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { utils } from 'ts/utils/utils';
-
-interface VisualOrderProps {
- makerAssetToken: AssetToken;
- takerAssetToken: AssetToken;
- makerToken: Token;
- takerToken: Token;
- networkId: number;
- tokenByAddress: TokenByAddress;
- isMakerTokenAddressInRegistry: boolean;
- isTakerTokenAddressInRegistry: boolean;
-}
-
-interface VisualOrderState {}
-
-export class VisualOrder extends React.Component<VisualOrderProps, VisualOrderState> {
- public render(): React.ReactNode {
- const allTokens = _.values(this.props.tokenByAddress);
- const makerImage = this.props.makerToken.iconUrl;
- const takerImage = this.props.takerToken.iconUrl;
- return (
- <div>
- <div className="clearfix">
- <div className="col col-5 center">
- <Party
- label="Send"
- address={this.props.takerToken.address}
- alternativeImage={takerImage}
- networkId={this.props.networkId}
- isInTokenRegistry={this.props.isTakerTokenAddressInRegistry}
- hasUniqueNameAndSymbol={utils.hasUniqueNameAndSymbol(allTokens, this.props.takerToken)}
- />
- </div>
- <div className="col col-2 center pt1">
- <div className="pb1">
- {this._renderAmount(this.props.takerAssetToken, this.props.takerToken)}
- </div>
- <div className="lg-p2 md-p2 sm-p1">
- <img src="/images/trade_arrows.png" style={{ width: 47 }} />
- </div>
- <div className="pt1">
- {this._renderAmount(this.props.makerAssetToken, this.props.makerToken)}
- </div>
- </div>
- <div className="col col-5 center">
- <Party
- label="Receive"
- address={this.props.makerToken.address}
- alternativeImage={makerImage}
- networkId={this.props.networkId}
- isInTokenRegistry={this.props.isMakerTokenAddressInRegistry}
- hasUniqueNameAndSymbol={utils.hasUniqueNameAndSymbol(allTokens, this.props.makerToken)}
- />
- </div>
- </div>
- </div>
- );
- }
- private _renderAmount(assetToken: AssetToken, token: Token): React.ReactNode {
- const unitAmount = Web3Wrapper.toUnitAmount(assetToken.amount, token.decimals);
- return (
- <div style={{ fontSize: 13 }}>
- {unitAmount.toNumber().toFixed(configs.AMOUNT_DISPLAY_PRECSION)} {token.symbol}
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/wallet/body_overlay.tsx b/packages/website/ts/components/wallet/body_overlay.tsx
deleted file mode 100644
index 3795f0eaa..000000000
--- a/packages/website/ts/components/wallet/body_overlay.tsx
+++ /dev/null
@@ -1,136 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-import { Blockchain } from 'ts/blockchain';
-import { Container } from 'ts/components/ui/container';
-import { Image } from 'ts/components/ui/image';
-import { Island } from 'ts/components/ui/island';
-import { Text } from 'ts/components/ui/text';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { colors } from 'ts/style/colors';
-import { styled } from 'ts/style/theme';
-import { AccountState, ProviderType } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-const METAMASK_IMG_SRC = '/images/metamask_icon.png';
-const COINBASE_WALLET_IMG_SRC = '/images/coinbase_wallet_logo.png';
-
-export interface BodyOverlayProps {
- dispatcher: Dispatcher;
- userAddress: string;
- injectedProviderName: string;
- providerType: ProviderType;
- onToggleLedgerDialog: () => void;
- blockchain?: Blockchain;
- blockchainIsLoaded: boolean;
-}
-
-interface BodyOverlayState {}
-
-export class BodyOverlay extends React.Component<BodyOverlayProps, BodyOverlayState> {
- public render(): React.ReactNode {
- const accountState = this._getAccountState();
- switch (accountState) {
- case AccountState.Locked:
- return <LockedOverlay onUseDifferentWalletClicked={this.props.onToggleLedgerDialog} />;
- case AccountState.Disconnected:
- return <DisconnectedOverlay onUseDifferentWalletClicked={this.props.onToggleLedgerDialog} />;
- case AccountState.Ready:
- case AccountState.Loading:
- default:
- return null;
- }
- }
- private _isBlockchainReady(): boolean {
- return this.props.blockchainIsLoaded && !_.isUndefined(this.props.blockchain);
- }
- private _getAccountState(): AccountState {
- return utils.getAccountState(
- this._isBlockchainReady(),
- this.props.providerType,
- this.props.injectedProviderName,
- this.props.userAddress,
- );
- }
-}
-
-interface LockedOverlayProps {
- className?: string;
- onUseDifferentWalletClicked?: () => void;
-}
-const PlainLockedOverlay: React.StatelessComponent<LockedOverlayProps> = ({
- className,
- onUseDifferentWalletClicked,
-}) => (
- <div className={className}>
- <Container
- className="flex flex-column items-center"
- marginBottom="24px"
- marginTop="24px"
- marginLeft="48px"
- marginRight="48px"
- >
- <Image src={METAMASK_IMG_SRC} height="70px" />
- <Container marginTop="12px">
- <Text fontColor={colors.metaMaskOrange} fontSize="16px" fontWeight="bold">
- Please Unlock MetaMask
- </Text>
- </Container>
- <UseDifferentWallet fontColor={colors.darkGrey} onClick={onUseDifferentWalletClicked} />
- </Container>
- </div>
-);
-const LockedOverlay = styled(PlainLockedOverlay)`
- background: ${colors.metaMaskTransparentOrange};
- border: 1px solid ${colors.metaMaskOrange};
- border-radius: 10px;
-`;
-
-interface DisconnectedOverlayProps {
- onUseDifferentWalletClicked?: () => void;
-}
-const DisconnectedOverlay = (props: DisconnectedOverlayProps) => {
- return (
- <div className="flex flex-column items-center">
- <GetWalletCallToAction />
- {!utils.isMobileOperatingSystem() && (
- <UseDifferentWallet fontColor={colors.mediumBlue} onClick={props.onUseDifferentWalletClicked} />
- )}
- </div>
- );
-};
-
-interface UseDifferentWallet {
- fontColor: string;
- onClick?: () => void;
-}
-const UseDifferentWallet = (props: UseDifferentWallet) => {
- return (
- <Container marginTop="12px">
- <Text fontColor={props.fontColor} fontSize="16px" textDecorationLine="underline" onClick={props.onClick}>
- Use a different wallet
- </Text>
- </Container>
- );
-};
-
-const GetWalletCallToAction = () => {
- const [downloadLink, isOnMobile] = utils.getBestWalletDownloadLinkAndIsMobile();
- const imageUrl = isOnMobile ? COINBASE_WALLET_IMG_SRC : METAMASK_IMG_SRC;
- const text = isOnMobile ? 'Get Coinbase Wallet' : 'Get MetaMask Wallet';
- return (
- <a href={downloadLink} target="_blank" style={{ textDecoration: 'none' }}>
- <Island
- className="flex items-center py1 px2"
- style={{ height: 28, borderRadius: 28, backgroundColor: colors.mediumBlue }}
- >
- <Image src={imageUrl} width="28px" borderRadius="22%" />
- <Container marginLeft="8px" marginRight="12px">
- <Text fontColor={colors.white} fontSize="16px" fontWeight={500}>
- {text}
- </Text>
- </Container>
- </Island>
- </a>
- );
-};
diff --git a/packages/website/ts/components/wallet/null_token_row.tsx b/packages/website/ts/components/wallet/null_token_row.tsx
deleted file mode 100644
index a1ec9871a..000000000
--- a/packages/website/ts/components/wallet/null_token_row.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import * as React from 'react';
-
-import { Circle } from 'ts/components/ui/circle';
-import { Container } from 'ts/components/ui/container';
-import { Text } from 'ts/components/ui/text';
-import { PlaceHolder } from 'ts/components/wallet/placeholder';
-import { StandardIconRow } from 'ts/components/wallet/standard_icon_row';
-import { colors } from 'ts/style/colors';
-
-export interface NullTokenRowProps {
- iconDimension: number;
- fillColor: string;
-}
-
-export const NullTokenRow: React.StatelessComponent<NullTokenRowProps> = ({ iconDimension, fillColor }) => {
- const icon = <Circle diameter={iconDimension} fillColor={fillColor} />;
- const main = (
- <div className="flex flex-column">
- <PlaceHolder hideChildren={true} fillColor={fillColor}>
- <Text fontSize="16px" fontWeight="bold" lineHeight="1em">
- 0.00 XXX
- </Text>
- </PlaceHolder>
- <Container marginTop="3px">
- <PlaceHolder hideChildren={true} fillColor={fillColor}>
- <Text fontSize="14px" fontColor={colors.darkGrey} lineHeight="1em">
- $0.00
- </Text>
- </PlaceHolder>
- </Container>
- </div>
- );
- const accessory = (
- <Container marginRight="12px">
- <PlaceHolder hideChildren={true} fillColor={fillColor}>
- <Container width="20px" height="14px" />
- </PlaceHolder>
- </Container>
- );
- return <StandardIconRow icon={icon} main={main} accessory={accessory} />;
-};
diff --git a/packages/website/ts/components/wallet/placeholder.tsx b/packages/website/ts/components/wallet/placeholder.tsx
deleted file mode 100644
index bf40d2ea8..000000000
--- a/packages/website/ts/components/wallet/placeholder.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as React from 'react';
-
-import { styled } from 'ts/style/theme';
-
-export interface PlaceHolderProps {
- className?: string;
- hideChildren: React.ReactNode;
- fillColor: string;
-}
-
-const PlainPlaceHolder: React.StatelessComponent<PlaceHolderProps> = ({ className, hideChildren, children }) => {
- const childrenVisibility = hideChildren ? 'hidden' : 'visible';
- const childrenStyle: React.CSSProperties = { visibility: childrenVisibility };
- return (
- <div className={className}>
- <div style={childrenStyle}>{children}</div>
- </div>
- );
-};
-
-export const PlaceHolder = styled(PlainPlaceHolder)`
- background-color: ${props => (props.hideChildren ? props.fillColor : 'transparent')};
- display: inline-block;
- border-radius: 2px;
-`;
diff --git a/packages/website/ts/components/wallet/standard_icon_row.tsx b/packages/website/ts/components/wallet/standard_icon_row.tsx
deleted file mode 100644
index 1a2ec021b..000000000
--- a/packages/website/ts/components/wallet/standard_icon_row.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as React from 'react';
-
-import { colors } from 'ts/style/colors';
-import { styled } from 'ts/style/theme';
-
-export interface StandardIconRowProps {
- className?: string;
- icon: React.ReactNode;
- main: React.ReactNode;
- accessory?: React.ReactNode;
- minHeight?: string;
- borderBottomColor?: string;
- borderBottomStyle?: string;
- borderWidth?: string;
- backgroundColor?: string;
-}
-const PlainStandardIconRow: React.StatelessComponent<StandardIconRowProps> = ({ className, icon, main, accessory }) => {
- return (
- <div className={`flex items-center ${className}`}>
- <div className="flex items-center px2">{icon}</div>
- <div className="flex-none pr2">{main}</div>
- <div className="flex-auto" />
- <div>{accessory}</div>
- </div>
- );
-};
-
-export const StandardIconRow = styled(PlainStandardIconRow)`
- min-height: ${props => props.minHeight};
- border-bottom-color: ${props => props.borderBottomColor};
- border-bottom-style: ${props => props.borderBottomStyle};
- border-width: ${props => props.borderWidth};
- background-color: ${props => props.backgroundColor};
-`;
-
-StandardIconRow.defaultProps = {
- minHeight: '85px',
- borderBottomColor: colors.walletBorder,
- borderBottomStyle: 'solid',
- borderWidth: '1px',
- backgroundColor: colors.walletDefaultItemBackground,
-};
-
-StandardIconRow.displayName = 'StandardIconRow';
diff --git a/packages/website/ts/components/wallet/wallet.tsx b/packages/website/ts/components/wallet/wallet.tsx
deleted file mode 100644
index d9da0b9d5..000000000
--- a/packages/website/ts/components/wallet/wallet.tsx
+++ /dev/null
@@ -1,527 +0,0 @@
-import { EtherscanLinkSuffixes, utils as sharedUtils } from '@0x/react-shared';
-import { BigNumber, errorUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import ActionAccountBalanceWallet from 'material-ui/svg-icons/action/account-balance-wallet';
-import * as React from 'react';
-import firstBy from 'thenby';
-
-import { Blockchain } from 'ts/blockchain';
-import { AccountConnection } from 'ts/components/ui/account_connection';
-import { Balance } from 'ts/components/ui/balance';
-import { Container } from 'ts/components/ui/container';
-import { DropDown, DropdownMouseEvent } from 'ts/components/ui/drop_down';
-import { IconButton } from 'ts/components/ui/icon_button';
-import { Identicon } from 'ts/components/ui/identicon';
-import { Island } from 'ts/components/ui/island';
-import { PointerDirection } from 'ts/components/ui/pointer';
-import {
- CopyAddressSimpleMenuItem,
- DifferentWalletSimpleMenuItem,
- GoToAccountManagementSimpleMenuItem,
- SimpleMenu,
- SimpleMenuItem,
-} from 'ts/components/ui/simple_menu';
-import { Text } from 'ts/components/ui/text';
-import { TokenIcon } from 'ts/components/ui/token_icon';
-import { BodyOverlay } from 'ts/components/wallet/body_overlay';
-import { NullTokenRow } from 'ts/components/wallet/null_token_row';
-import { PlaceHolder } from 'ts/components/wallet/placeholder';
-import { StandardIconRow } from 'ts/components/wallet/standard_icon_row';
-import { WrapEtherItem } from 'ts/components/wallet/wrap_ether_item';
-import { AllowanceStateToggle } from 'ts/containers/inputs/allowance_state_toggle';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { colors } from 'ts/style/colors';
-import {
- AccountState,
- BlockchainErrs,
- ProviderType,
- ScreenWidths,
- Side,
- Token,
- TokenByAddress,
- TokenState,
- TokenStateByAddress,
-} from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-export interface WalletProps {
- userAddress: string;
- networkId: number;
- blockchain: Blockchain;
- blockchainIsLoaded: boolean;
- blockchainErr: BlockchainErrs;
- dispatcher: Dispatcher;
- tokenByAddress: TokenByAddress;
- trackedTokens: Token[];
- userEtherBalanceInWei?: BigNumber;
- lastForceTokenStateRefetch: number;
- injectedProviderName: string;
- providerType: ProviderType;
- screenWidth: ScreenWidths;
- location: Location;
- trackedTokenStateByAddress: TokenStateByAddress;
- onToggleLedgerDialog: () => void;
- onAddToken: () => void;
- onRemoveToken: () => void;
- refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
- style: React.CSSProperties;
- toggleTooltipDirection?: PointerDirection;
-}
-
-interface WalletState {
- wrappedEtherDirection?: Side;
- isHoveringSidebar: boolean;
-}
-
-interface AllowanceStateToggleConfig {
- token: Token;
- tokenState: TokenState;
-}
-
-interface AccessoryItemConfig {
- wrappedEtherDirection?: Side;
- allowanceStateToggleConfig?: AllowanceStateToggleConfig;
-}
-
-const ETHER_ICON_PATH = '/images/ether.png';
-const ICON_DIMENSION = 28;
-const BODY_ITEM_KEY = 'BODY';
-const HEADER_ITEM_KEY = 'HEADER';
-const ETHER_ITEM_KEY = 'ETHER';
-const WRAP_ROW_ALLOWANCE_TOGGLE_WIDTH = 67;
-const ALLOWANCE_TOGGLE_WIDTH = 56;
-const PLACEHOLDER_COLOR = colors.grey300;
-const LOADING_ROWS_COUNT = 6;
-
-export class Wallet extends React.Component<WalletProps, WalletState> {
- public static defaultProps = {
- style: {},
- };
- constructor(props: WalletProps) {
- super(props);
- this.state = {
- wrappedEtherDirection: undefined,
- isHoveringSidebar: false,
- };
- }
- public componentDidUpdate(prevProps: WalletProps): void {
- const currentTrackedTokens = this.props.trackedTokens;
- const differentTrackedTokens = _.difference(currentTrackedTokens, prevProps.trackedTokens);
- const firstDifferentTrackedToken = _.head(differentTrackedTokens);
- // check if there is only one different token, and if that token is a member of the current tracked tokens
- // this means that the token was added, not removed
- if (
- !_.isUndefined(firstDifferentTrackedToken) &&
- _.size(differentTrackedTokens) === 1 &&
- _.includes(currentTrackedTokens, firstDifferentTrackedToken)
- ) {
- document.getElementById(firstDifferentTrackedToken.address).scrollIntoView();
- }
- }
- public render(): React.ReactNode {
- return (
- <Island className="flex flex-column wallet" style={this.props.style}>
- {this._isBlockchainReady() ? this._renderLoadedRows() : this._renderLoadingRows()}
- </Island>
- );
- }
- private _renderLoadingRows(): React.ReactNode {
- return _.concat(this._renderLoadingHeaderRows(), this._renderLoadingBodyRows());
- }
- private _renderLoadingHeaderRows(): React.ReactElement<{}> {
- return this._renderPlainHeaderRow('Loading...');
- }
- private _renderLoadingBodyRows(): React.ReactElement<{}> {
- const bodyStyle = this._getBodyStyle();
- const loadingRowsRange = _.range(LOADING_ROWS_COUNT);
- return (
- <div key={BODY_ITEM_KEY} className="flex flex-column" style={bodyStyle}>
- {_.map(loadingRowsRange, index => {
- return <NullTokenRow key={index} iconDimension={ICON_DIMENSION} fillColor={PLACEHOLDER_COLOR} />;
- })}
- <Container
- className="flex items-center"
- position="absolute"
- width="100%"
- height="100%"
- maxHeight={bodyStyle.maxHeight}
- >
- <div className="mx-auto">
- <BodyOverlay
- dispatcher={this.props.dispatcher}
- userAddress={this.props.userAddress}
- injectedProviderName={this.props.injectedProviderName}
- providerType={this.props.providerType}
- onToggleLedgerDialog={this.props.onToggleLedgerDialog}
- blockchain={this.props.blockchain}
- blockchainIsLoaded={this.props.blockchainIsLoaded}
- />
- </div>
- </Container>
- </div>
- );
- }
- private _renderLoadedRows(): React.ReactNode {
- const isAddressAvailable = !_.isEmpty(this.props.userAddress);
- return isAddressAvailable
- ? _.concat(this._renderConnectedHeaderRows(), this._renderBody())
- : _.concat(this._renderDisconnectedHeaderRows(), this._renderLoadingBodyRows());
- }
- private _renderDisconnectedHeaderRows(): React.ReactElement<{}> {
- const isExternallyInjectedProvider = utils.isExternallyInjected(
- this.props.providerType,
- this.props.injectedProviderName,
- );
- const text = isExternallyInjectedProvider ? 'Please unlock MetaMask...' : 'Please connect a wallet...';
- return this._renderPlainHeaderRow(text);
- }
- private _renderPlainHeaderRow(text: string): React.ReactElement<{}> {
- return (
- <StandardIconRow
- key={HEADER_ITEM_KEY}
- icon={<ActionAccountBalanceWallet color={colors.grey} />}
- main={
- <Text fontSize="16px" fontColor={colors.grey}>
- {text}
- </Text>
- // https://github.com/palantir/tslint-react/issues/140
- // tslint:disable-next-line:jsx-curly-spacing
- }
- minHeight="60px"
- backgroundColor={colors.white}
- />
- );
- }
- private _renderConnectedHeaderRows(): React.ReactElement<{}> {
- const isMobile = this.props.screenWidth === ScreenWidths.Sm;
- const userAddress = this.props.userAddress;
- const accountState = this._getAccountState();
- const main = (
- <div className="flex flex-column">
- <Text fontSize="16px" lineHeight="19px" fontWeight={500}>
- {utils.getAddressBeginAndEnd(userAddress)}
- </Text>
- <AccountConnection accountState={accountState} injectedProviderName={this.props.injectedProviderName} />
- </div>
- );
- const onClick = _.noop.bind(_);
- const accessory = (
- <DropDown
- activeNode={
- // this container gives the menu button more of a hover target for the drop down
- // it prevents accidentally closing the menu by moving off of the button
- <Container paddingLeft="100px" paddingRight="15px">
- <Text
- className="zmdi zmdi-more-horiz"
- Tag="i"
- fontSize="32px"
- fontFamily="Material-Design-Iconic-Font"
- fontColor={colors.darkGrey}
- onClick={onClick}
- hoverColor={colors.mediumBlue}
- />
- </Container>
- }
- popoverContent={
- <SimpleMenu minWidth="150px">
- <CopyAddressSimpleMenuItem userAddress={this.props.userAddress} />
- {!isMobile && <DifferentWalletSimpleMenuItem onClick={this.props.onToggleLedgerDialog} />}
- <SimpleMenuItem displayText="Add Tokens..." onClick={this.props.onAddToken} />
- <SimpleMenuItem displayText="Remove Tokens..." onClick={this.props.onRemoveToken} />
- {!isMobile && <GoToAccountManagementSimpleMenuItem />}
- </SimpleMenu>
- }
- anchorOrigin={{ horizontal: 'right', vertical: 'bottom' }}
- targetOrigin={{ horizontal: 'right', vertical: 'top' }}
- zDepth={1}
- activateEvent={DropdownMouseEvent.Click}
- closeEvent={DropdownMouseEvent.Click}
- />
- );
- return (
- <StandardIconRow
- key={HEADER_ITEM_KEY}
- icon={<Identicon address={userAddress} diameter={ICON_DIMENSION} />}
- main={main}
- accessory={accessory}
- minHeight="60px"
- backgroundColor={colors.white}
- />
- );
- }
- private _renderBody(): React.ReactElement<{}> {
- const bodyStyle = this._getBodyStyle();
- return (
- <div
- style={bodyStyle}
- key={BODY_ITEM_KEY}
- onMouseEnter={this._onSidebarHover.bind(this)}
- onMouseLeave={this._onSidebarHoverOff.bind(this)}
- >
- {this._renderEthRows()}
- {this._renderTokenRows()}
- </div>
- );
- }
- private _getBodyStyle(): React.CSSProperties {
- return {
- overflow: 'auto',
- WebkitOverflowScrolling: 'touch',
- position: 'relative',
- overflowY: this.state.isHoveringSidebar ? 'scroll' : 'hidden',
- marginRight: this.state.isHoveringSidebar ? 0 : 4,
- minHeight: '250px',
- maxHeight: !utils.isMobileWidth(this.props.screenWidth) ? 'calc(90vh - 300px)' : undefined,
- };
- }
- private _onSidebarHover(_event: React.FormEvent<HTMLInputElement>): void {
- this.setState({
- isHoveringSidebar: true,
- });
- }
- private _onSidebarHoverOff(): void {
- this.setState({
- isHoveringSidebar: false,
- });
- }
- private _renderEthRows(): React.ReactNode {
- const icon = <img style={{ width: ICON_DIMENSION, height: ICON_DIMENSION }} src={ETHER_ICON_PATH} />;
- const primaryText = this._renderAmount(
- this.props.userEtherBalanceInWei || new BigNumber(0),
- constants.DECIMAL_PLACES_ETH,
- constants.ETHER_SYMBOL,
- _.isUndefined(this.props.userEtherBalanceInWei),
- );
- const etherToken = this._getEthToken();
- const etherTokenState = this.props.trackedTokenStateByAddress[etherToken.address];
- const etherPrice = etherTokenState.price;
- const secondaryText = this._renderValue(
- this.props.userEtherBalanceInWei || new BigNumber(0),
- constants.DECIMAL_PLACES_ETH,
- etherPrice,
- _.isUndefined(this.props.userEtherBalanceInWei) || !etherTokenState.isLoaded,
- );
- const accessoryItemConfig = {
- wrappedEtherDirection: Side.Deposit,
- };
- const key = ETHER_ITEM_KEY;
- return this._renderBalanceRow(key, icon, primaryText, secondaryText, accessoryItemConfig);
- }
- private _renderTokenRows(): React.ReactNode {
- const trackedTokens = this.props.trackedTokens;
- const trackedTokensStartingWithEtherToken = trackedTokens.sort(
- firstBy((t: Token) => t.symbol !== constants.ETHER_TOKEN_SYMBOL)
- .thenBy((t: Token) => t.symbol !== constants.ZRX_TOKEN_SYMBOL)
- .thenBy('trackedTimestamp'),
- );
- return _.map(trackedTokensStartingWithEtherToken, this._renderTokenRow.bind(this));
- }
- private _renderTokenRow(token: Token): React.ReactNode {
- const tokenState = this.props.trackedTokenStateByAddress[token.address];
- if (_.isUndefined(tokenState)) {
- return null;
- }
- const tokenLink = sharedUtils.getEtherScanLinkIfExists(
- token.address,
- this.props.networkId,
- EtherscanLinkSuffixes.Address,
- );
- const icon = <TokenIcon token={token} diameter={ICON_DIMENSION} link={tokenLink} />;
- const isWeth = token.symbol === constants.ETHER_TOKEN_SYMBOL;
- const wrappedEtherDirection = isWeth ? Side.Receive : undefined;
- const primaryText = this._renderAmount(tokenState.balance, token.decimals, token.symbol, !tokenState.isLoaded);
- const secondaryText = this._renderValue(
- tokenState.balance,
- token.decimals,
- tokenState.price,
- !tokenState.isLoaded,
- );
- const accessoryItemConfig: AccessoryItemConfig = {
- wrappedEtherDirection,
- allowanceStateToggleConfig: {
- token,
- tokenState,
- },
- };
- const key = token.address;
- return this._renderBalanceRow(key, icon, primaryText, secondaryText, accessoryItemConfig);
- }
- private _renderBalanceRow(
- key: string,
- icon: React.ReactNode,
- primaryText: React.ReactNode,
- secondaryText: React.ReactNode,
- accessoryItemConfig: AccessoryItemConfig,
- className?: string,
- ): React.ReactNode {
- const shouldShowWrapEtherItem =
- !_.isUndefined(this.state.wrappedEtherDirection) &&
- this.state.wrappedEtherDirection === accessoryItemConfig.wrappedEtherDirection &&
- !_.isUndefined(this.props.userEtherBalanceInWei);
- const etherToken = this._getEthToken();
- const wrapEtherItem = shouldShowWrapEtherItem ? (
- <WrapEtherItem
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- blockchain={this.props.blockchain}
- dispatcher={this.props.dispatcher}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- direction={accessoryItemConfig.wrappedEtherDirection}
- etherToken={etherToken}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- onConversionSuccessful={this._closeWrappedEtherActionRow.bind(this)}
- // tslint:disable:jsx-no-lambda
- refetchEthTokenStateAsync={async () => this.props.refetchTokenStateAsync(etherToken.address)}
- />
- ) : null;
- return (
- <div id={key} key={key} className={`flex flex-column ${className || ''}`}>
- {this.state.wrappedEtherDirection === Side.Receive && wrapEtherItem}
- <StandardIconRow
- icon={icon}
- main={
- <div className="flex flex-column">
- {primaryText}
- <Container marginTop="3px">{secondaryText}</Container>
- </div>
- }
- accessory={this._renderAccessoryItems(accessoryItemConfig)}
- />
- {this.state.wrappedEtherDirection === Side.Deposit && wrapEtherItem}
- </div>
- );
- }
- private _renderAccessoryItems(config: AccessoryItemConfig): React.ReactElement<{}> {
- const shouldShowWrappedEtherAction = !_.isUndefined(config.wrappedEtherDirection);
- const shouldShowToggle = !_.isUndefined(config.allowanceStateToggleConfig);
- // if we don't have a toggle, we still want some space to the right of the "wrap" button so that it aligns with
- // the "unwrap" button in the row below
- const isWrapEtherRow = shouldShowWrappedEtherAction && config.wrappedEtherDirection === Side.Deposit;
- const width = isWrapEtherRow ? WRAP_ROW_ALLOWANCE_TOGGLE_WIDTH : ALLOWANCE_TOGGLE_WIDTH;
- const toggle = (
- <Container className="flex justify-center" width={width}>
- {shouldShowToggle && this._renderAllowanceToggle(config.allowanceStateToggleConfig)}
- </Container>
- );
- return (
- <div className="flex items-center">
- <div className="flex-auto">
- {shouldShowWrappedEtherAction && this._renderWrappedEtherButton(config.wrappedEtherDirection)}
- </div>
- <div className="flex-last pl2">{toggle}</div>
- </div>
- );
- }
- private _renderAllowanceToggle(config: AllowanceStateToggleConfig): React.ReactNode {
- // TODO: Error handling
- return (
- <AllowanceStateToggle
- blockchain={this.props.blockchain}
- token={config.token}
- tokenState={config.tokenState}
- tooltipDirection={this.props.toggleTooltipDirection}
- refetchTokenStateAsync={async () => this.props.refetchTokenStateAsync(config.token.address)}
- />
- );
- }
- private _renderAmount(
- amount: BigNumber,
- decimals: number,
- symbol: string,
- isLoading: boolean = false,
- ): React.ReactNode {
- if (isLoading) {
- return (
- <PlaceHolder hideChildren={isLoading} fillColor={PLACEHOLDER_COLOR}>
- <Text fontSize="16px" fontWeight="bold" lineHeight="1em">
- 0.00 XXX
- </Text>
- </PlaceHolder>
- );
- } else {
- return <Balance amount={amount} decimals={decimals} symbol={symbol} />;
- }
- }
- private _renderValue(
- amount: BigNumber,
- decimals: number,
- price?: BigNumber,
- isLoading: boolean = false,
- ): React.ReactNode {
- const result = !isLoading
- ? _.isUndefined(price)
- ? '--'
- : utils.getUsdValueFormattedAmount(amount, decimals, price)
- : '$0.00';
- return (
- <PlaceHolder hideChildren={isLoading} fillColor={PLACEHOLDER_COLOR}>
- <Text fontSize="14px" fontColor={colors.darkGrey} lineHeight="1em">
- {result}
- </Text>
- </PlaceHolder>
- );
- }
- private _renderWrappedEtherButton(wrappedEtherDirection: Side): React.ReactNode {
- const isWrappedEtherDirectionOpen = this.state.wrappedEtherDirection === wrappedEtherDirection;
- let buttonLabel;
- let buttonIconName;
- if (isWrappedEtherDirectionOpen) {
- buttonLabel = 'cancel';
- buttonIconName = 'zmdi-close';
- } else {
- switch (wrappedEtherDirection) {
- case Side.Deposit:
- buttonLabel = 'wrap';
- buttonIconName = 'zmdi-long-arrow-down';
- break;
- case Side.Receive:
- buttonLabel = 'unwrap';
- buttonIconName = 'zmdi-long-arrow-up';
- break;
- default:
- throw errorUtils.spawnSwitchErr('wrappedEtherDirection', wrappedEtherDirection);
- }
- }
- const onClick = isWrappedEtherDirectionOpen
- ? this._closeWrappedEtherActionRow.bind(this, wrappedEtherDirection)
- : this._openWrappedEtherActionRow.bind(this, wrappedEtherDirection);
- return (
- <IconButton iconName={buttonIconName} labelText={buttonLabel} onClick={onClick} color={colors.mediumBlue} />
- );
- }
- private _openWrappedEtherActionRow(wrappedEtherDirection: Side): void {
- const action =
- wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Opened' : 'Wallet - Unwrap WETH Opened';
- analytics.track(action);
- this.setState({
- wrappedEtherDirection,
- });
- }
- private _closeWrappedEtherActionRow(wrappedEtherDirection: Side): void {
- const action =
- wrappedEtherDirection === Side.Deposit ? 'Wallet - Wrap ETH Closed' : 'Wallet - Unwrap WETH Closed';
- analytics.track(action);
- this.setState({
- wrappedEtherDirection: undefined,
- });
- }
- private _getEthToken(): Token {
- return utils.getEthToken(this.props.tokenByAddress);
- }
- private _isBlockchainReady(): boolean {
- return this.props.blockchainIsLoaded && !_.isUndefined(this.props.blockchain);
- }
- private _getAccountState(): AccountState {
- return utils.getAccountState(
- this._isBlockchainReady(),
- this.props.providerType,
- this.props.injectedProviderName,
- this.props.userAddress,
- );
- }
-}
-
-// tslint:disable:max-file-line-count
diff --git a/packages/website/ts/components/wallet/wrap_ether_item.tsx b/packages/website/ts/components/wallet/wrap_ether_item.tsx
deleted file mode 100644
index 7de3afbf8..000000000
--- a/packages/website/ts/components/wallet/wrap_ether_item.tsx
+++ /dev/null
@@ -1,230 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import { BigNumber, logUtils } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as _ from 'lodash';
-import FlatButton from 'material-ui/FlatButton';
-import * as React from 'react';
-
-import { Blockchain } from 'ts/blockchain';
-import { TokenAmountInput } from 'ts/components/inputs/token_amount_input';
-import { Container } from 'ts/components/ui/container';
-import { EthAmountInput } from 'ts/containers/inputs/eth_amount_input';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { colors } from 'ts/style/colors';
-import { BlockchainCallErrs, Side, Token } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-import { constants } from 'ts/utils/constants';
-import { errorReporter } from 'ts/utils/error_reporter';
-import { utils } from 'ts/utils/utils';
-
-export interface WrapEtherItemProps {
- userAddress: string;
- networkId: number;
- blockchain: Blockchain;
- dispatcher: Dispatcher;
- userEtherBalanceInWei: BigNumber;
- direction: Side;
- etherToken: Token;
- lastForceTokenStateRefetch: number;
- onConversionSuccessful?: () => void;
- refetchEthTokenStateAsync: () => Promise<void>;
-}
-
-interface WrapEtherItemState {
- currentInputAmount?: BigNumber;
- isEthConversionHappening: boolean;
- errorMsg: React.ReactNode;
-}
-
-const styles: Styles = {
- topLabel: {
- color: colors.black,
- fontSize: 11,
- },
- inputContainer: {
- backgroundColor: colors.white,
- borderBottomRightRadius: 3,
- borderBottomLeftRadius: 3,
- borderTopRightRadius: 3,
- borderTopLeftRadius: 3,
- padding: 4,
- },
- amountInput: {
- height: 34,
- },
- amountInputLabel: {
- paddingTop: 10,
- paddingRight: 10,
- paddingLeft: 5,
- color: colors.grey,
- fontSize: 14,
- },
- amountInputHint: {
- bottom: 18,
- },
- wrapEtherConfirmationButtonLabel: {
- fontSize: 12,
- color: colors.white,
- },
- errorMsg: {
- fontSize: 12,
- marginTop: 4,
- color: colors.red,
- minHeight: 20,
- },
- conversionSpinner: {
- paddingTop: 26,
- },
-};
-
-export class WrapEtherItem extends React.Component<WrapEtherItemProps, WrapEtherItemState> {
- constructor(props: WrapEtherItemProps) {
- super(props);
- this.state = {
- currentInputAmount: undefined,
- isEthConversionHappening: false,
- errorMsg: null,
- };
- }
- public render(): React.ReactNode {
- const isWrappingEth = this.props.direction === Side.Deposit;
- const topLabelText = isWrappingEth ? 'Convert ETH into WETH 1:1' : 'Convert WETH into ETH 1:1';
- return (
- <Container className="flex" backgroundColor={colors.walletFocusedItemBackground} paddingTop="25px">
- <div>{this._renderIsEthConversionHappeningSpinner()} </div>
- <div className="flex flex-column">
- <div style={styles.topLabel}>{topLabelText}</div>
- <div className="flex items-center">
- <div style={styles.inputContainer}>
- {isWrappingEth ? (
- <EthAmountInput
- amount={this.state.currentInputAmount}
- hintText="0.00"
- onChange={this._onValueChange.bind(this)}
- shouldCheckBalance={true}
- shouldShowIncompleteErrs={false}
- shouldShowErrs={false}
- shouldShowUnderline={false}
- style={styles.amountInput}
- labelStyle={styles.amountInputLabel}
- inputHintStyle={styles.amountInputHint}
- onErrorMsgChange={this._onErrorMsgChange.bind(this)}
- />
- ) : (
- <TokenAmountInput
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- blockchain={this.props.blockchain}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- token={this.props.etherToken}
- shouldShowIncompleteErrs={false}
- shouldCheckBalance={true}
- shouldCheckAllowance={false}
- onChange={this._onValueChange.bind(this)}
- amount={this.state.currentInputAmount}
- hintText="0.00"
- shouldShowErrs={false}
- shouldShowUnderline={false}
- style={styles.amountInput}
- labelStyle={styles.amountInputLabel}
- inputHintStyle={styles.amountInputHint}
- onErrorMsgChange={this._onErrorMsgChange.bind(this)}
- />
- )}
- </div>
- <div>{this._renderWrapEtherConfirmationButton()}</div>
- </div>
-
- {this._renderErrorMsg()}
- </div>
- </Container>
- );
- }
- private _onValueChange(_isValid: boolean, amount?: BigNumber): void {
- this.setState({
- currentInputAmount: amount,
- });
- }
- private _onErrorMsgChange(errorMsg: React.ReactNode): void {
- this.setState({
- errorMsg,
- });
- }
- private _renderIsEthConversionHappeningSpinner(): React.ReactElement<{}> {
- const visibility = this.state.isEthConversionHappening ? 'visible' : 'hidden';
- const style: React.CSSProperties = { ...styles.conversionSpinner, visibility };
- return (
- <div className="pl3 pr2" style={style}>
- <i className="zmdi zmdi-spinner zmdi-hc-spin" />
- </div>
- );
- }
- private _renderWrapEtherConfirmationButton(): React.ReactElement<{}> {
- const isWrappingEth = this.props.direction === Side.Deposit;
- const labelText = isWrappingEth ? 'wrap' : 'unwrap';
- return (
- <div className="pl1 pr3">
- <FlatButton
- backgroundColor={colors.wrapEtherConfirmationButton}
- label={labelText}
- style={{ zIndex: 0 }}
- labelStyle={styles.wrapEtherConfirmationButtonLabel}
- onClick={this._wrapEtherConfirmationActionAsync.bind(this)}
- disabled={this.state.isEthConversionHappening}
- />
- </div>
- );
- }
- private _renderErrorMsg(): React.ReactNode {
- return <div style={styles.errorMsg}>{this.state.errorMsg}</div>;
- }
- private async _wrapEtherConfirmationActionAsync(): Promise<void> {
- this.setState({
- isEthConversionHappening: true,
- });
- const etherToken = this.props.etherToken;
- const amountToConvert = this.state.currentInputAmount;
- const ethAmount = Web3Wrapper.toUnitAmount(amountToConvert, constants.DECIMAL_PLACES_ETH).toString();
- const tokenAmount = Web3Wrapper.toUnitAmount(amountToConvert, etherToken.decimals).toString();
- try {
- if (this.props.direction === Side.Deposit) {
- await this.props.blockchain.convertEthToWrappedEthTokensAsync(etherToken.address, amountToConvert);
- this.props.dispatcher.showFlashMessage(`Successfully wrapped ${ethAmount} ETH to WETH`);
- analytics.track('Wrap ETH Success', {
- amount: ethAmount,
- });
- } else {
- await this.props.blockchain.convertWrappedEthTokensToEthAsync(etherToken.address, amountToConvert);
- this.props.dispatcher.showFlashMessage(`Successfully unwrapped ${tokenAmount} WETH to ETH`);
- analytics.track('Unwrap WETH Success', {
- amount: tokenAmount,
- });
- }
- await this.props.refetchEthTokenStateAsync();
- this.props.onConversionSuccessful();
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, BlockchainCallErrs.UserHasNoAssociatedAddresses)) {
- this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen(true);
- } else if (!utils.didUserDenyWeb3Request(errMsg)) {
- logUtils.log(`Unexpected error encountered: ${err}`);
- logUtils.log(err.stack);
- if (this.props.direction === Side.Deposit) {
- this.props.dispatcher.showFlashMessage('Failed to wrap your ETH. Please try again.');
- analytics.track('Wrap ETH Failure', {
- amount: ethAmount,
- });
- } else {
- this.props.dispatcher.showFlashMessage('Failed to unwrap your WETH. Please try again.');
- analytics.track('Unwrap WETH Failed', {
- amount: tokenAmount,
- });
- }
- errorReporter.report(err);
- }
- }
- this.setState({
- isEthConversionHappening: false,
- });
- }
-}
diff --git a/packages/website/ts/constants/.gitkeep b/packages/website/ts/constants/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/packages/website/ts/constants/.gitkeep
+++ /dev/null
diff --git a/packages/website/ts/constants/animations.tsx b/packages/website/ts/constants/animations.tsx
deleted file mode 100644
index 6a58c4b40..000000000
--- a/packages/website/ts/constants/animations.tsx
+++ /dev/null
@@ -1,18 +0,0 @@
-import { css, keyframes } from 'styled-components';
-
-export const fadeIn = keyframes`
- 0% {
- transform: translateY(10px);
- opacity: 0;
- }
- 100% {
- transform: translateY(0);
- opacity: 1;
- }
-`;
-
-export const addFadeInAnimation = (duration: string = '0.5s', delay: string = '0s') => css`
- opacity: 0;
- transform: translateY(10px);
- animation: ${fadeIn} ${duration} ${delay} forwards;
-`;
diff --git a/packages/website/ts/constants/cssReset.js b/packages/website/ts/constants/cssReset.js
deleted file mode 100644
index 4c5105b50..000000000
--- a/packages/website/ts/constants/cssReset.js
+++ /dev/null
@@ -1,50 +0,0 @@
-export const cssReset = `
- *,
- *:before,
- *:after {
- box-sizing: border-box;
- }
- html, body, div, span, applet, object, iframe,
- h1, h2, h3, h4, h5, h6, p, blockquote, pre,
- a, abbr, acronym, address, big, cite, code,
- del, dfn, em, img, ins, kbd, q, s, samp,
- small, strike, strong, sub, sup, tt, var,
- b, u, i, center,
- dl, dt, dd, ol, ul, li,
- fieldset, form, label, legend,
- table, caption, tbody, tfoot, thead, tr, th, td,
- article, aside, canvas, details, embed,
- figure, figcaption, footer, header, hgroup,
- menu, nav, output, ruby, section, summary,
- time, mark, audio, video {
- margin: 0;
- padding: 0;
- border: 0;
- font-size: 100%;
- font: inherit;
- vertical-align: baseline;
- }
- /* HTML5 display-role reset for older browsers */
- article, aside, details, figcaption, figure,
- footer, header, hgroup, menu, nav, section {
- display: block;
- }
- body {
- line-height: 1;
- }
- ol, ul {
- list-style: none;
- }
- blockquote, q {
- quotes: none;
- }
- blockquote:before, blockquote:after,
- q:before, q:after {
- content: '';
- content: none;
- }
- table {
- border-collapse: collapse;
- border-spacing: 0;
- }
-`;
diff --git a/packages/website/ts/constants/globalStyle.tsx b/packages/website/ts/constants/globalStyle.tsx
deleted file mode 100644
index ef7ec9426..000000000
--- a/packages/website/ts/constants/globalStyle.tsx
+++ /dev/null
@@ -1,107 +0,0 @@
-import { createGlobalStyle, withTheme } from 'styled-components';
-import { cssReset } from 'ts/constants/cssReset';
-
-export interface GlobalStyle {
- theme: {
- bgColor: string;
- textColor: string;
- linkColor: string;
- dropdownButtonBg: string;
- };
-}
-
-const GlobalStyles = withTheme(
- createGlobalStyle<GlobalStyle>`
- ${cssReset};
-
- html {
- font-size: 18px;
- background-color: ${props => props.theme.bgColor};
- overflow-x: hidden;
- }
-
- @media (min-width: 768px) {
- :root {
- --smallHeading: 20px;
- --defaultHeading: 28px;
- --mediumHeading: 50px;
- --largeHeading: 80px;
- --smallHeadingHeight: 1.4em;
- --defaultHeadingHeight: 1.357142857em;
- --mediumHeadingHeight: 1.16em;
- --largeHeadingHeight: 1em;
- --smallParagraph: 14px;
- --defaultParagraph: 18px;
- --mediumParagraph: 22px;
- --largeParagraph: 28px;
- --smallIcon: 75px;
- --mediumIcon: 85px;
- --largeIcon: 145px;
- --heroIcon: 282px;
- }
- }
-
- @media (max-width: 1170px) {
- :root {
- --largeHeading: 60px;
- }
- }
-
- @media (max-width: 768px) {
- :root {
- --smallHeading: 18px;
- --defaultHeading: 18px;
- --mediumHeading: 40px;
- --largeHeading: 46px;
- --smallHeadingHeight: 1.4em; // TO DO
- --defaultHeadingHeight: 1.357142857em; // TO DO
- --mediumHeadingHeight: 1.16em; // TO DO
- --largeHeadingHeight: 1.108695652em; // TO DO
- --smallParagraph: 14px; // TO DO
- --defaultParagraph: 16px; // TO DO
- --mediumParagraph: 20px; // TO DO
- --largeParagraph: 20px; // TO DO
- --smallIcon: 55px;
- --mediumIcon: 85px;
- --largeIcon: 115px;
- }
- }
-
- body {
- font-family: 'Formular', sans-serif !important;
- -webkit-font-smoothing: antialiased;
- color: ${props => props.theme.textColor};
- font-feature-settings: "zero";
- scroll-behavior: smooth;
- }
-
- .visuallyHidden {
- position: absolute !important;
- clip: rect(1px 1px 1px 1px); /* IE6, IE7 */
- clip: rect(1px, 1px, 1px, 1px);
- padding:0 !important;
- border:0 !important;
- height: 1px !important;
- width: 1px !important;
- overflow: hidden;
- }
-
- img, svg {
- max-width: 100%;
- object-fit: contain;
- }
-
- a, button {
- text-decoration: none;
- font-family: inherit;
- outline: none;
- }
-
- svg + p,
- img + p {
- padding-top: 30px;
- }
-`,
-);
-
-export { GlobalStyles };
diff --git a/packages/website/ts/constants/utilities.tsx b/packages/website/ts/constants/utilities.tsx
deleted file mode 100644
index ee5c5b4ce..000000000
--- a/packages/website/ts/constants/utilities.tsx
+++ /dev/null
@@ -1,22 +0,0 @@
-export interface PaddingInterface {
- padding?: number | Array<'large' | 'default' | 'small' | number>;
- margin?: number | Array<'large' | 'default' | 'small' | number>;
-}
-
-interface PaddingSizes {
- [key: string]: string;
-}
-
-export const PADDING_SIZES: PaddingSizes = {
- default: '30px',
- large: '60px',
- small: '15px',
-};
-
-export const getCSSPadding = (value: number | Array<string | number> = 0): string => {
- if (Array.isArray(value)) {
- return value.map(val => PADDING_SIZES[val] || `${val}px`).join(' ');
- } else {
- return `${value}px`;
- }
-};
diff --git a/packages/website/ts/containers/asset_buyer_documentation.ts b/packages/website/ts/containers/asset_buyer_documentation.ts
deleted file mode 100644
index a75c6d861..000000000
--- a/packages/website/ts/containers/asset_buyer_documentation.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown = require('md/docs/asset_buyer/introduction');
-const InstallationMarkdown = require('md/docs/asset_buyer/installation');
-const UsageMarkdown = require('md/docs/asset_buyer/usage');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.AssetBuyer,
- packageName: '@0x/asset-buyer',
- type: SupportedDocJson.TypeDoc,
- displayName: 'AssetBuyer',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/asset-buyer',
- markdownMenu: {
- introduction: [markdownSections.introduction],
- install: [markdownSections.installation],
- usage: [markdownSections.usage],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown,
- [markdownSections.installation]: InstallationMarkdown,
- [markdownSections.usage]: UsageMarkdown,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/connect_documentation.ts b/packages/website/ts/containers/connect_documentation.ts
deleted file mode 100644
index 1cfc0702e..000000000
--- a/packages/website/ts/containers/connect_documentation.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/connect/1/introduction');
-const IntroMarkdown2 = require('md/docs/connect/2/introduction');
-const InstallationMarkdown1 = require('md/docs/connect/1/installation');
-const InstallationMarkdown3 = require('md/docs/connect/3/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.Connect,
- packageName: '@0x/connect',
- type: SupportedDocJson.TypeDoc,
- displayName: '0x Connect',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/connect',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- '2.0.0-rc.1': {
- [markdownSections.introduction]: IntroMarkdown2,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- '3.0.2': {
- [markdownSections.introduction]: IntroMarkdown2,
- [markdownSections.installation]: InstallationMarkdown3,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/contract_wrappers_documentation.ts b/packages/website/ts/containers/contract_wrappers_documentation.ts
deleted file mode 100644
index bbabce7a7..000000000
--- a/packages/website/ts/containers/contract_wrappers_documentation.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/contract_wrappers/1/introduction');
-const InstallMarkdownV1 = require('md/docs/contract_wrappers/1/installation');
-const InstallMarkdownV2 = require('md/docs/contract_wrappers/2/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.ContractWrappers,
- packageName: '@0x/contract-wrappers',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Contract Wrappers',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/contract-wrappers',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallMarkdownV1,
- },
- '3.0.0': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallMarkdownV2,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/docs_home.ts b/packages/website/ts/containers/docs_home.ts
deleted file mode 100644
index 2a6dac0e2..000000000
--- a/packages/website/ts/containers/docs_home.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { DocsHome as DocsHomeComponent, DocsHomeProps } from 'ts/pages/documentation/docs_home';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { ScreenWidths } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-interface ConnectedState {
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: DocsHomeProps): ConnectedState => ({
- translate: state.translate,
- screenWidth: state.screenWidth,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const DocsHome: React.ComponentClass<DocsHomeProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocsHomeComponent);
diff --git a/packages/website/ts/containers/ethereum_types_documentation.ts b/packages/website/ts/containers/ethereum_types_documentation.ts
deleted file mode 100644
index e6e4d4067..000000000
--- a/packages/website/ts/containers/ethereum_types_documentation.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import { constants as docConstants, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown = require('md/docs/ethereum_types/introduction');
-const InstallationMarkdown = require('md/docs/ethereum_types/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- types: docConstants.TYPES_SECTION_NAME,
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.EthereumTypes,
- packageName: 'ethereum-types',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Ethereum Types',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/ethereum-types',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown,
- [markdownSections.installation]: InstallationMarkdown,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/faq.ts b/packages/website/ts/containers/faq.ts
deleted file mode 100644
index da5b71bdd..000000000
--- a/packages/website/ts/containers/faq.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { FAQ as FAQComponent, FAQProps } from 'ts/pages/faq/faq';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { Translate } from 'ts/utils/translate';
-
-interface ConnectedState {
- translate: Translate;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: FAQProps): ConnectedState => ({
- translate: state.translate,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const FAQ: React.ComponentClass<FAQProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(FAQComponent);
diff --git a/packages/website/ts/containers/generate_order_form.ts b/packages/website/ts/containers/generate_order_form.ts
deleted file mode 100644
index 98b2831ce..000000000
--- a/packages/website/ts/containers/generate_order_form.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Blockchain } from 'ts/blockchain';
-import { GenerateOrderForm as GenerateOrderFormComponent } from 'ts/components/generate_order/generate_order_form';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { BlockchainErrs, HashData, SideToAssetToken, TokenByAddress } from 'ts/types';
-
-interface GenerateOrderFormProps {
- blockchain: Blockchain;
- hashData: HashData;
- dispatcher: Dispatcher;
- isFullWidth?: boolean;
- shouldHideHeader?: boolean;
-}
-
-interface ConnectedState {
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- orderExpiryTimestamp: BigNumber;
- orderSignature: string;
- userAddress: string;
- orderTakerAddress: string;
- orderSalt: BigNumber;
- networkId: number;
- sideToAssetToken: SideToAssetToken;
- tokenByAddress: TokenByAddress;
- lastForceTokenStateRefetch: number;
-}
-
-const mapStateToProps = (state: State, _ownProps: GenerateOrderFormProps): ConnectedState => ({
- blockchainErr: state.blockchainErr,
- blockchainIsLoaded: state.blockchainIsLoaded,
- orderExpiryTimestamp: state.orderExpiryTimestamp,
- orderSignature: state.orderSignature,
- orderTakerAddress: state.orderTakerAddress,
- orderSalt: state.orderSalt,
- networkId: state.networkId,
- sideToAssetToken: state.sideToAssetToken,
- tokenByAddress: state.tokenByAddress,
- userAddress: state.userAddress,
- lastForceTokenStateRefetch: state.lastForceTokenStateRefetch,
-});
-
-export const GenerateOrderForm: React.ComponentClass<GenerateOrderFormProps> = connect(mapStateToProps)(
- GenerateOrderFormComponent,
-);
diff --git a/packages/website/ts/containers/inputs/allowance_state_toggle.ts b/packages/website/ts/containers/inputs/allowance_state_toggle.ts
deleted file mode 100644
index 70712685e..000000000
--- a/packages/website/ts/containers/inputs/allowance_state_toggle.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { Blockchain } from 'ts/blockchain';
-import { PointerDirection } from 'ts/components/ui/pointer';
-import { State } from 'ts/redux/reducer';
-import { BalanceErrs, Token, TokenState } from 'ts/types';
-
-import { AllowanceStateToggle as AllowanceStateToggleComponent } from 'ts/components/inputs/allowance_state_toggle';
-import { Dispatcher } from 'ts/redux/dispatcher';
-
-interface AllowanceStateToggleProps {
- blockchain: Blockchain;
- onErrorOccurred?: (errType: BalanceErrs) => void;
- token: Token;
- tokenState: TokenState;
- refetchTokenStateAsync: () => Promise<void>;
- tooltipDirection?: PointerDirection;
-}
-
-interface ConnectedState {
- networkId: number;
- userAddress: string;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: AllowanceStateToggleProps): ConnectedState => ({
- networkId: state.networkId,
- userAddress: state.userAddress,
-});
-
-const mapDispatchTopProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const AllowanceStateToggle: React.ComponentClass<AllowanceStateToggleProps> = connect(
- mapStateToProps,
- mapDispatchTopProps,
-)(AllowanceStateToggleComponent);
diff --git a/packages/website/ts/containers/inputs/eth_amount_input.ts b/packages/website/ts/containers/inputs/eth_amount_input.ts
deleted file mode 100644
index 45d3ddebd..000000000
--- a/packages/website/ts/containers/inputs/eth_amount_input.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { State } from 'ts/redux/reducer';
-import { ValidatedBigNumberCallback } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-import { EthAmountInput as EthAmountInputComponent } from 'ts/components/inputs/eth_amount_input';
-
-interface EthAmountInputProps {
- label?: string;
- amount?: BigNumber;
- hintText?: string;
- onChange: ValidatedBigNumberCallback;
- onErrorMsgChange?: (errorMsg: React.ReactNode) => void;
- shouldShowIncompleteErrs: boolean;
- shouldCheckBalance: boolean;
- shouldShowErrs?: boolean;
- shouldShowUnderline?: boolean;
- style?: React.CSSProperties;
- labelStyle?: React.CSSProperties;
- inputHintStyle?: React.CSSProperties;
-}
-
-interface ConnectedState {
- balance: BigNumber;
-}
-
-const mapStateToProps = (state: State, _ownProps: EthAmountInputProps): ConnectedState => ({
- balance: Web3Wrapper.toUnitAmount(state.userEtherBalanceInWei, constants.DECIMAL_PLACES_ETH),
-});
-
-export const EthAmountInput: React.ComponentClass<EthAmountInputProps> = connect(mapStateToProps)(
- EthAmountInputComponent,
-);
diff --git a/packages/website/ts/containers/json_schemas_documentation.ts b/packages/website/ts/containers/json_schemas_documentation.ts
deleted file mode 100644
index 1090265e7..000000000
--- a/packages/website/ts/containers/json_schemas_documentation.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/json_schemas/1/introduction');
-const IntroMarkdown3 = require('md/docs/json_schemas/3/introduction');
-const InstallationMarkdown1 = require('md/docs/json_schemas/1/installation');
-const InstallationMarkdown3 = require('md/docs/json_schemas/3/installation');
-const usageMarkdown1 = require('md/docs/json_schemas/1/usage');
-const usageMarkdown3 = require('md/docs/json_schemas/3/usage');
-const SchemasMarkdown1 = require('md/docs/json_schemas/1/schemas');
-const SchemasMarkdown2 = require('md/docs/json_schemas/2/schemas');
-const SchemasMarkdown3 = require('md/docs/json_schemas/3/schemas');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
- schemas: 'schemas',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.JSONSchemas,
- packageName: '@0x/json-schemas',
- type: SupportedDocJson.TypeDoc,
- displayName: 'JSON Schemas',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/json-schemas',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage],
- schemas: [markdownSections.schemas],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- [markdownSections.schemas]: SchemasMarkdown1,
- [markdownSections.usage]: usageMarkdown1,
- },
- '1.0.0': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- [markdownSections.schemas]: SchemasMarkdown2,
- [markdownSections.usage]: usageMarkdown1,
- },
- '2.0.0': {
- [markdownSections.introduction]: IntroMarkdown3,
- [markdownSections.installation]: InstallationMarkdown3,
- [markdownSections.schemas]: SchemasMarkdown2,
- [markdownSections.usage]: usageMarkdown3,
- },
- '2.0.1': {
- [markdownSections.introduction]: IntroMarkdown3,
- [markdownSections.installation]: InstallationMarkdown3,
- [markdownSections.schemas]: SchemasMarkdown3,
- [markdownSections.usage]: usageMarkdown3,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/migrations_documentation.ts b/packages/website/ts/containers/migrations_documentation.ts
deleted file mode 100644
index bae84dfea..000000000
--- a/packages/website/ts/containers/migrations_documentation.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-import { DocsInfo, DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { DocPackages, ScreenWidths } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/migrations/1/introduction');
-const InstallationMarkdown1 = require('md/docs/migrations/1/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.Migrations,
- packageName: '@0x/migrations',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Migrations',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/migrations',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '2.0.4': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- },
- markdownSections,
-};
-const docsInfo = new DocsInfo(docsInfoConfig);
-
-interface ConnectedState {
- docsVersion: string;
- availableDocVersions: string[];
- docsInfo: DocsInfo;
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
- docsVersion: state.docsVersion,
- availableDocVersions: state.availableDocVersions,
- translate: state.translate,
- docsInfo,
- screenWidth: state.screenWidth,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/not_found.ts b/packages/website/ts/containers/not_found.ts
deleted file mode 100644
index 825c021ec..000000000
--- a/packages/website/ts/containers/not_found.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { NotFound as NotFoundComponent, NotFoundProps } from 'ts/pages/not_found';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { Translate } from 'ts/utils/translate';
-
-interface ConnectedState {
- translate: Translate;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: NotFoundProps): ConnectedState => ({
- translate: state.translate,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const NotFound: React.ComponentClass<NotFoundProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(NotFoundComponent);
diff --git a/packages/website/ts/containers/order_utils_documentation.ts b/packages/website/ts/containers/order_utils_documentation.ts
deleted file mode 100644
index 8d83357ca..000000000
--- a/packages/website/ts/containers/order_utils_documentation.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/order_utils/1/introduction');
-const InstallationMarkdown1 = require('md/docs/order_utils/1/installation');
-const IntroMarkdown2 = require('md/docs/order_utils/2/introduction');
-const InstallationMarkdown2 = require('md/docs/order_utils/2/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.OrderUtils,
- packageName: '@0x/order-utils',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Order utils',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/order-utils',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- '2.0.0': {
- [markdownSections.introduction]: IntroMarkdown2,
- [markdownSections.installation]: InstallationMarkdown2,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/order_watcher_documentation.ts b/packages/website/ts/containers/order_watcher_documentation.ts
deleted file mode 100644
index 149ffdd2a..000000000
--- a/packages/website/ts/containers/order_watcher_documentation.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/order_watcher/1/introduction');
-const InstallationMarkdown1 = require('md/docs/order_watcher/1/installation');
-const IntroMarkdown2 = require('md/docs/order_watcher/2/introduction');
-const InstallationMarkdown2 = require('md/docs/order_watcher/2/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.OrderWatcher,
- packageName: '@0x/order-watcher',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Order Watcher',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/order-watcher',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- '2.2.0': {
- [markdownSections.introduction]: IntroMarkdown2,
- [markdownSections.installation]: InstallationMarkdown2,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/portal.ts b/packages/website/ts/containers/portal.ts
deleted file mode 100644
index db41a3ec3..000000000
--- a/packages/website/ts/containers/portal.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { Portal as PortalComponent, PortalProps as PortalComponentProps } from 'ts/components/portal/portal';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { BlockchainErrs, HashData, PortalOrder, ProviderType, ScreenWidths, Side, TokenByAddress } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-interface ConnectedState {
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- hashData: HashData;
- injectedProviderName: string;
- networkId: number;
- nodeVersion: string;
- orderFillAmount: BigNumber;
- providerType: ProviderType;
- tokenByAddress: TokenByAddress;
- lastForceTokenStateRefetch: number;
- userEtherBalanceInWei?: BigNumber;
- screenWidth: ScreenWidths;
- shouldBlockchainErrDialogBeOpen: boolean;
- userAddress: string;
- userSuppliedOrderCache: PortalOrder;
- flashMessage?: string | React.ReactNode;
- translate: Translate;
- isPortalOnboardingShowing: boolean;
- portalOnboardingStep: number;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: PortalComponentProps): ConnectedState => {
- const receiveAssetToken = state.sideToAssetToken[Side.Receive];
- const depositAssetToken = state.sideToAssetToken[Side.Deposit];
- const receiveAddress = !_.isUndefined(receiveAssetToken.address)
- ? receiveAssetToken.address
- : constants.NULL_ADDRESS;
- const depositAddress = !_.isUndefined(depositAssetToken.address)
- ? depositAssetToken.address
- : constants.NULL_ADDRESS;
- const receiveAmount = !_.isUndefined(receiveAssetToken.amount) ? receiveAssetToken.amount : new BigNumber(0);
- const depositAmount = !_.isUndefined(depositAssetToken.amount) ? depositAssetToken.amount : new BigNumber(0);
- const hashData = {
- depositAmount,
- depositTokenContractAddr: depositAddress,
- feeRecipientAddress: constants.NULL_ADDRESS,
- makerFee: constants.MAKER_FEE,
- orderExpiryTimestamp: state.orderExpiryTimestamp,
- orderMakerAddress: state.userAddress,
- orderTakerAddress: state.orderTakerAddress !== '' ? state.orderTakerAddress : constants.NULL_ADDRESS,
- receiveAmount,
- receiveTokenContractAddr: receiveAddress,
- takerFee: constants.TAKER_FEE,
- orderSalt: state.orderSalt,
- };
- return {
- blockchainErr: state.blockchainErr,
- blockchainIsLoaded: state.blockchainIsLoaded,
- hashData,
- injectedProviderName: state.injectedProviderName,
- networkId: state.networkId,
- nodeVersion: state.nodeVersion,
- orderFillAmount: state.orderFillAmount,
- providerType: state.providerType,
- screenWidth: state.screenWidth,
- shouldBlockchainErrDialogBeOpen: state.shouldBlockchainErrDialogBeOpen,
- tokenByAddress: state.tokenByAddress,
- lastForceTokenStateRefetch: state.lastForceTokenStateRefetch,
- userAddress: state.userAddress,
- userEtherBalanceInWei: state.userEtherBalanceInWei,
- userSuppliedOrderCache: state.userSuppliedOrderCache,
- flashMessage: state.flashMessage,
- translate: state.translate,
- isPortalOnboardingShowing: state.isPortalOnboardingShowing,
- portalOnboardingStep: state.portalOnboardingStep,
- };
-};
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const Portal: React.ComponentClass<PortalComponentProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(PortalComponent);
diff --git a/packages/website/ts/containers/portal_onboarding_flow.ts b/packages/website/ts/containers/portal_onboarding_flow.ts
deleted file mode 100644
index 66473733c..000000000
--- a/packages/website/ts/containers/portal_onboarding_flow.ts
+++ /dev/null
@@ -1,68 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { Blockchain } from 'ts/blockchain';
-import { ActionTypes, ProviderType, ScreenWidths, TokenByAddress, TokenStateByAddress } from 'ts/types';
-
-import { PortalOnboardingFlow as PortalOnboardingFlowComponent } from 'ts/components/onboarding/portal_onboarding_flow';
-import { State } from 'ts/redux/reducer';
-
-interface PortalOnboardingFlowProps {
- trackedTokenStateByAddress: TokenStateByAddress;
- blockchain: Blockchain;
- refetchTokenStateAsync: (tokenAddress: string) => Promise<void>;
-}
-
-interface ConnectedState {
- networkId: number;
- stepIndex: number;
- isRunning: boolean;
- userAddress: string;
- hasBeenClosed: boolean;
- providerType: ProviderType;
- injectedProviderName: string;
- blockchainIsLoaded: boolean;
- userEtherBalanceInWei?: BigNumber;
- tokenByAddress: TokenByAddress;
- screenWidth: ScreenWidths;
-}
-
-interface ConnectedDispatch {
- updateIsRunning: (isRunning: boolean) => void;
- updateOnboardingStep: (stepIndex: number) => void;
-}
-
-const mapStateToProps = (state: State, _ownProps: PortalOnboardingFlowProps): ConnectedState => ({
- networkId: state.networkId,
- stepIndex: state.portalOnboardingStep,
- isRunning: state.isPortalOnboardingShowing,
- userAddress: state.userAddress,
- providerType: state.providerType,
- injectedProviderName: state.injectedProviderName,
- blockchainIsLoaded: state.blockchainIsLoaded,
- userEtherBalanceInWei: state.userEtherBalanceInWei,
- tokenByAddress: state.tokenByAddress,
- hasBeenClosed: state.hasPortalOnboardingBeenClosed,
- screenWidth: state.screenWidth,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- updateIsRunning: (isRunning: boolean): void => {
- dispatch({
- type: ActionTypes.UpdatePortalOnboardingShowing,
- data: isRunning,
- });
- },
- updateOnboardingStep: (stepIndex: number): void => {
- dispatch({
- type: ActionTypes.UpdatePortalOnboardingStep,
- data: stepIndex,
- });
- },
-});
-
-export const PortalOnboardingFlow: React.ComponentClass<PortalOnboardingFlowProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(PortalOnboardingFlowComponent);
diff --git a/packages/website/ts/containers/smart_contracts_documentation.ts b/packages/website/ts/containers/smart_contracts_documentation.ts
deleted file mode 100644
index d94e285a7..000000000
--- a/packages/website/ts/containers/smart_contracts_documentation.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import { Networks } from '@0x/react-shared';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages, SmartContractDocSections as Sections } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/smart_contracts/1/introduction');
-const IntroMarkdown2 = require('md/docs/smart_contracts/2/introduction');
-/* tslint:enable:no-var-requires */
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.SmartContracts,
- packageName: 'contracts',
- type: SupportedDocJson.SolDoc,
- displayName: '0x Smart Contracts',
- packageUrl: 'https://github.com/0xProject/contracts',
- markdownMenu: {
- introduction: [Sections.Introduction],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [Sections.Introduction]: IntroMarkdown1,
- },
- '2.0.0': {
- [Sections.Introduction]: IntroMarkdown2,
- },
- },
- markdownSections: {
- Introduction: Sections.Introduction,
- },
- contractsByVersionByNetworkId: {
- '1.0.0': {
- [Networks.Mainnet]: {
- Exchange_v1: '0x12459c951127e0c374ff9105dda097662a027093',
- TokenTransferProxy_v1: '0x8da0d80f5007ef1e431dd2127178d224e32c2ef4',
- TokenRegistry: '0x926a74c5c36adf004c87399e65f75628b0f98d2c',
- },
- [Networks.Ropsten]: {
- Exchange_v1: '0x479cc461fecd078f766ecc58533d6f69580cf3ac',
- TokenTransferProxy_v1: '0x4e9aad8184de8833365fea970cd9149372fdf1e6',
- TokenRegistry: '0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed',
- },
- [Networks.Kovan]: {
- Exchange_v1: '0x90fe2af704b34e0224bf2299c838e04d4dcf1364',
- TokenTransferProxy_v1: '0x087Eed4Bc1ee3DE49BeFbd66C662B434B15d49d4',
- TokenRegistry: '0xf18e504561f4347bea557f3d4558f559dddbae7f',
- },
- [Networks.Rinkeby]: {
- Exchange_v1: '0x1d16ef40fac01cec8adac2ac49427b9384192c05',
- TokenTransferProxy_v1: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d',
- TokenRegistry: '0x4e9aad8184de8833365fea970cd9149372fdf1e6',
- },
- },
- '2.0.0': {
- [Networks.Mainnet]: {
- AssetProxyOwner: '0x17992e4ffb22730138e4b62aaa6367fa9d3699a6',
- ERC20Proxy: '0x2240dab907db71e64d3e0dba4800c83b5c502d4e',
- ERC721Proxy: '0x208e41fb445f1bb1b6780d58356e81405f3e6127',
- Exchange: '0x4f833a24e1f95d70f028921e27040ca56e09ab0b',
- Forwarder: '0x7afc2d5107af94c462a194d2c21b5bdd238709d6',
- OrderValidator: '0x9463e518dea6810309563c81d5266c1b1d149138',
- WETH9: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- ZRXToken: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- },
- [Networks.Ropsten]: {
- AssetProxyOwner: '0xf5fa5b5fed2727a0e44ac67f6772e97977aa358b',
- ERC20Proxy: '0xb1408f4c245a23c31b98d2c626777d4c0d766caa',
- ERC721Proxy: '0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4',
- Exchange: '0x4530c0483a1633c7a1c97d2c53721caff2caaaaf',
- Forwarder: '0x3983e204b12b3c02fb0638caf2cd406a62e0ead3',
- OrderValidator: '0x90431a90516ab49af23a0530e04e8c7836e7122f',
- WETH9: '0xc778417e063141139fce010982780140aa0cd5ab',
- ZRXToken: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
- },
- [Networks.Kovan]: {
- AssetProxyOwner: '0x2c824d2882baa668e0d5202b1e7f2922278703f8',
- ERC20Proxy: '0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e',
- ERC721Proxy: '0x2a9127c745688a165106c11cd4d647d2220af821',
- Exchange: '0x35dd2932454449b14cee11a94d3674a936d5d7b2',
- Forwarder: '0xd85e2fa7e7e252b27b01bf0d65c946959d2f45b8',
- OrderValidator: '0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d',
- WETH9: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
- ZRXToken: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
- },
- },
- },
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/sol_compiler_documentation.ts b/packages/website/ts/containers/sol_compiler_documentation.ts
deleted file mode 100644
index 31117372b..000000000
--- a/packages/website/ts/containers/sol_compiler_documentation.ts
+++ /dev/null
@@ -1,51 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/sol-compiler/1/introduction');
-const InstallationMarkdown1 = require('md/docs/sol-compiler/1/installation');
-const InstallationMarkdown2 = require('md/docs/sol-compiler/2/installation');
-const UsageMarkdown1 = require('md/docs/sol-compiler/1/usage');
-const UsageMarkdown2 = require('md/docs/sol-compiler/2/usage');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.SolCompiler,
- packageName: '@0x/sol-compiler',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Solidity Compiler',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-compiler',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- [markdownSections.usage]: UsageMarkdown1,
- },
- '1.1.8': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown2,
- [markdownSections.usage]: UsageMarkdown2,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/sol_coverage_documentation.ts b/packages/website/ts/containers/sol_coverage_documentation.ts
deleted file mode 100644
index a9073b720..000000000
--- a/packages/website/ts/containers/sol_coverage_documentation.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown = require('md/docs/sol_coverage/introduction');
-const InstallationMarkdown = require('md/docs/sol_coverage/installation');
-const UsageMarkdown = require('md/docs/sol_coverage/usage');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.SolCoverage,
- packageName: '@0x/sol-coverage',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Sol-coverage',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-coverage',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage],
- },
- sectionNameToMarkdownByVersion: {
- '1.0.0': {
- [markdownSections.introduction]: IntroMarkdown,
- [markdownSections.installation]: InstallationMarkdown,
- [markdownSections.usage]: UsageMarkdown,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/sol_profiler_documentation.ts b/packages/website/ts/containers/sol_profiler_documentation.ts
deleted file mode 100644
index 2f3936cae..000000000
--- a/packages/website/ts/containers/sol_profiler_documentation.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown = require('md/docs/sol_profiler/introduction');
-const InstallationMarkdown = require('md/docs/sol_profiler/installation');
-const UsageMarkdown = require('md/docs/sol_profiler/usage');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.SolProfiler,
- packageName: '@0x/sol-profiler',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Sol-profiler',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-profiler',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage],
- },
- sectionNameToMarkdownByVersion: {
- '1.0.0': {
- [markdownSections.introduction]: IntroMarkdown,
- [markdownSections.installation]: InstallationMarkdown,
- [markdownSections.usage]: UsageMarkdown,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/sol_trace_documentation.ts b/packages/website/ts/containers/sol_trace_documentation.ts
deleted file mode 100644
index 9c2552438..000000000
--- a/packages/website/ts/containers/sol_trace_documentation.ts
+++ /dev/null
@@ -1,44 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown = require('md/docs/sol_trace/introduction');
-const InstallationMarkdown = require('md/docs/sol_trace/installation');
-const UsageMarkdown = require('md/docs/sol_trace/usage');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- usage: 'usage',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.SolTrace,
- packageName: '@0x/sol-trace',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Sol-trace',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/sol-trace',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation, markdownSections.usage],
- },
- sectionNameToMarkdownByVersion: {
- '1.0.0': {
- [markdownSections.introduction]: IntroMarkdown,
- [markdownSections.installation]: InstallationMarkdown,
- [markdownSections.usage]: UsageMarkdown,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/subproviders_documentation.ts b/packages/website/ts/containers/subproviders_documentation.ts
deleted file mode 100644
index 2ac0360ab..000000000
--- a/packages/website/ts/containers/subproviders_documentation.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/subproviders/1/introduction');
-const InstallationMarkdown1 = require('md/docs/subproviders/1/installation');
-const InstallationMarkdown2 = require('md/docs/subproviders/2/installation');
-const LedgerNodeHidMarkdown1 = require('md/docs/subproviders/1/ledger_node_hid');
-/* tslint:enable:no-var-requires */
-
-const docSections = {
- introduction: 'introduction',
- installation: 'installation',
- ledgerNodeHid: 'ledger-node-hid-issue',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.Subproviders,
- packageName: '@0x/subproviders',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Subproviders',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/subproviders',
- markdownMenu: {
- 'getting-started': [docSections.introduction, docSections.installation, docSections.ledgerNodeHid],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [docSections.introduction]: IntroMarkdown1,
- [docSections.installation]: InstallationMarkdown1,
- [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown1,
- },
- '2.1.0': {
- [docSections.introduction]: IntroMarkdown1,
- [docSections.installation]: InstallationMarkdown2,
- [docSections.ledgerNodeHid]: LedgerNodeHidMarkdown1,
- },
- },
- markdownSections: docSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/web3_wrapper_documentation.ts b/packages/website/ts/containers/web3_wrapper_documentation.ts
deleted file mode 100644
index 73fea90ed..000000000
--- a/packages/website/ts/containers/web3_wrapper_documentation.ts
+++ /dev/null
@@ -1,46 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdown1 = require('md/docs/web3_wrapper/1/introduction');
-const InstallationMarkdown1 = require('md/docs/web3_wrapper/1/installation');
-const InstallationMarkdown2 = require('md/docs/web3_wrapper/2/installation');
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.Web3Wrapper,
- packageName: '@0x/web3-wrapper',
- type: SupportedDocJson.TypeDoc,
- displayName: 'Web3Wrapper',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/web3-wrapper',
- markdownMenu: {
- 'getting-started': [markdownSections.introduction, markdownSections.installation],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- },
- '3.1.0': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown2,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/containers/wiki.ts b/packages/website/ts/containers/wiki.ts
deleted file mode 100644
index f4f2f6ec6..000000000
--- a/packages/website/ts/containers/wiki.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import { Wiki as WikiComponent, WikiProps } from 'ts/pages/wiki/wiki';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { ScreenWidths } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-interface ConnectedState {
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: WikiProps): ConnectedState => ({
- translate: state.translate,
- screenWidth: state.screenWidth,
-});
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const Wiki: React.ComponentClass<WikiProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(WikiComponent);
diff --git a/packages/website/ts/containers/zero_ex_js_documentation.ts b/packages/website/ts/containers/zero_ex_js_documentation.ts
deleted file mode 100644
index 0e4765656..000000000
--- a/packages/website/ts/containers/zero_ex_js_documentation.ts
+++ /dev/null
@@ -1,78 +0,0 @@
-import { DocsInfoConfig, SupportedDocJson } from '@0x/react-docs';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { DocPage as DocPageComponent, DocPageProps } from 'ts/pages/documentation/doc_page';
-import { DocPackages } from 'ts/types';
-
-import { getMapStateToProps, mapDispatchToProps } from '../utils/documentation_container';
-
-/* tslint:disable:no-var-requires */
-const IntroMarkdownV0 = require('md/docs/0xjs/0.0.1/introduction');
-const InstallationMarkdownV0 = require('md/docs/0xjs/0.0.1/installation');
-const AsyncMarkdownV0 = require('md/docs/0xjs/0.0.1/async');
-const ErrorsMarkdownV0 = require('md/docs/0xjs/0.0.1/errors');
-const versioningMarkdownV0 = require('md/docs/0xjs/0.0.1/versioning');
-
-const IntroMarkdown1 = require('md/docs/0xjs/1.0.1/introduction');
-const InstallationMarkdown1 = require('md/docs/0xjs/1.0.1/installation');
-const AsyncMarkdownV1 = require('md/docs/0xjs/1.0.1/async');
-const ErrorsMarkdownV1 = ErrorsMarkdownV0;
-const versioningMarkdownV1 = require('md/docs/0xjs/1.0.1/versioning');
-
-/* tslint:enable:no-var-requires */
-
-const markdownSections = {
- introduction: 'introduction',
- installation: 'installation',
- testrpc: 'testrpc',
- async: 'async',
- errors: 'errors',
- versioning: 'versioning',
-};
-
-const docsInfoConfig: DocsInfoConfig = {
- id: DocPackages.ZeroExJs,
- packageName: '0x.js',
- type: SupportedDocJson.TypeDoc,
- displayName: '0x.js',
- packageUrl: 'https://github.com/0xProject/0x-monorepo/packages/0x.js',
- markdownMenu: {
- 'getting-started': [
- markdownSections.introduction,
- markdownSections.installation,
- markdownSections.async,
- markdownSections.errors,
- markdownSections.versioning,
- ],
- },
- sectionNameToMarkdownByVersion: {
- '0.0.1': {
- [markdownSections.introduction]: IntroMarkdownV0,
- [markdownSections.installation]: InstallationMarkdownV0,
- [markdownSections.versioning]: versioningMarkdownV0,
- [markdownSections.async]: AsyncMarkdownV0,
- [markdownSections.errors]: ErrorsMarkdownV0,
- },
- '1.0.1': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- [markdownSections.versioning]: versioningMarkdownV1,
- [markdownSections.async]: AsyncMarkdownV1,
- [markdownSections.errors]: ErrorsMarkdownV1,
- },
- '2.0.0': {
- [markdownSections.introduction]: IntroMarkdown1,
- [markdownSections.installation]: InstallationMarkdown1,
- [markdownSections.versioning]: versioningMarkdownV1,
- [markdownSections.async]: AsyncMarkdownV1,
- [markdownSections.errors]: ErrorsMarkdownV1,
- },
- },
- markdownSections,
-};
-const mapStateToProps = getMapStateToProps(docsInfoConfig);
-
-export const Documentation: React.ComponentClass<DocPageProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(DocPageComponent);
diff --git a/packages/website/ts/globals.d.ts b/packages/website/ts/globals.d.ts
deleted file mode 100644
index 05f3c7f88..000000000
--- a/packages/website/ts/globals.d.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-declare module '@reach/dialog';
-declare module 'truffle-contract';
-declare module 'whatwg-fetch';
-declare module 'thenby';
-declare module 'react-document-title';
-declare module 'react-ga';
-declare module 'reach__dialog';
-declare module 'react-flickity-component';
-declare module 'react-anchor-link-smooth-scroll';
-declare module 'react-responsive';
-declare module 'react-scrollable-anchor';
-declare module 'react-headroom';
-
-declare module '*.json' {
- const json: any;
- /* tslint:disable */
- export default json;
- /* tslint:enable */
-}
-
-declare module '*.svg' {
- import { PureComponent, SVGProps } from 'react';
- export default class extends PureComponent<SVGProps<SVGSVGElement>> {}
-}
-
-declare module 'web3-provider-engine/subproviders/filters';
-
-// This will be defined by default in TS 2.4
-// Source: https://github.com/Microsoft/TypeScript/issues/12364
-interface System {
- import<T>(module: string): Promise<T>;
-}
-declare var System: System;
diff --git a/packages/website/ts/icons/illustrations/0x.svg b/packages/website/ts/icons/illustrations/0x.svg
deleted file mode 100755
index b0810f751..000000000
--- a/packages/website/ts/icons/illustrations/0x.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="404" height="404" viewBox="0 0 404 404" fill="none" xmlns="http://www.w3.org/2000/svg">
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="404" height="404">
-<circle cx="202" cy="202" r="200" fill="#00AE99" stroke="#00AE99" stroke-width="3"/>
-</mask>
-<g mask="url(#mask0)">
-<circle cx="202" cy="202" r="200" stroke="#00AE99" stroke-width="3"/>
-<circle cx="201.667" cy="68.6667" r="66.6667" stroke="#00AE99" stroke-width="3"/>
-<circle cx="68.6667" cy="202.667" r="66.6667" stroke="#00AE99" stroke-width="3"/>
-<path d="M168.17 260.29L167.271 259.089L165.46 260.444L167.413 261.585L168.17 260.29ZM197.32 269.2L197.219 270.696L197.226 270.697L197.32 269.2ZM237.414 258.856L238.22 260.12L238.225 260.117L237.414 258.856ZM252.653 245.439L253.801 246.405L254.55 245.515L253.874 244.568L252.653 245.439ZM241.096 229.872L242.285 228.958L242.281 228.952L242.276 228.946L241.096 229.872ZM237.72 225.571L238.901 224.645L237.582 222.965L236.449 224.775L237.72 225.571ZM219.719 241.445L218.672 242.519L219.418 243.246L220.36 242.801L219.719 241.445ZM208.264 230.282L209.311 229.207L208.392 228.312L207.365 229.081L208.264 230.282ZM143.827 169.549L145.02 168.64L143.647 166.838L142.524 168.806L143.827 169.549ZM135.133 198.43L133.637 198.329L133.636 198.337L135.133 198.43ZM145.464 238.577L144.201 239.388L145.464 238.577ZM158.862 253.837L157.895 254.984L158.786 255.736L159.735 255.057L158.862 253.837ZM174.409 242.264L175.324 243.453L175.33 243.448L175.336 243.443L174.409 242.264ZM178.705 238.885L179.632 240.064L181.287 238.761L179.516 237.623L178.705 238.885ZM162.851 220.757L161.78 219.707L161.049 220.452L161.495 221.397L162.851 220.757ZM174.102 209.286L175.173 210.337L176.082 209.41L175.295 208.377L174.102 209.286ZM235.163 145.072L236.036 146.292L237.92 144.945L235.92 143.777L235.163 145.072ZM206.014 136.162L205.91 137.658L205.913 137.658L206.014 136.162ZM165.817 146.506L166.629 147.767L166.632 147.765L165.817 146.506ZM150.578 159.922L149.43 158.956L148.681 159.846L149.357 160.793L150.578 159.922ZM162.135 175.489L160.946 176.403L160.951 176.409L160.955 176.415L162.135 175.489ZM165.511 179.791L164.331 180.717L165.634 182.378L166.773 180.6L165.511 179.791ZM183.614 163.916L184.655 162.836L183.913 162.122L182.98 162.557L183.614 163.916ZM194.354 174.26L193.313 175.341L194.212 176.206L195.226 175.48L194.354 174.26ZM259.608 235.505L258.411 236.409L259.789 238.233L260.914 236.243L259.608 235.505ZM268.2 206.931L269.696 207.033L269.697 207.024L268.2 206.931ZM257.87 166.784L259.135 165.979L259.132 165.974L257.87 166.784ZM244.471 151.524L245.439 150.378L244.547 149.625L243.598 150.304L244.471 151.524ZM228.924 163.097L228.009 161.909L228.003 161.913L227.997 161.918L228.924 163.097ZM224.629 166.477L223.701 165.298L222.034 166.609L223.826 167.744L224.629 166.477ZM240.584 184.604L239.228 185.244L239.235 185.259L239.242 185.274L240.584 184.604ZM240.687 184.809L241.767 185.849L242.502 185.086L242.029 184.139L240.687 184.809ZM229.845 196.075L228.764 195.035L227.877 195.957L228.648 196.979L229.845 196.075ZM167.413 261.585C176.201 266.718 186.346 269.964 197.219 270.696L197.421 267.703C187.019 267.002 177.321 263.898 168.926 258.994L167.413 261.585ZM197.226 270.697C212.283 271.639 226.405 267.659 238.22 260.12L236.607 257.591C225.307 264.8 211.813 268.604 197.413 267.703L197.226 270.697ZM238.225 260.117C244.08 256.348 249.307 251.742 253.801 246.405L251.506 244.473C247.204 249.583 242.203 253.989 236.602 257.594L238.225 260.117ZM253.874 244.568C250.283 239.533 246.385 234.295 242.285 228.958L239.906 230.786C243.989 236.1 247.864 241.309 251.432 246.31L253.874 244.568ZM242.276 228.946C241.713 228.229 241.151 227.512 240.588 226.795C240.026 226.078 239.463 225.362 238.901 224.645L236.54 226.497C237.103 227.213 237.665 227.93 238.228 228.647C238.791 229.364 239.353 230.081 239.916 230.798L242.276 228.946ZM236.449 224.775C232.311 231.384 226.193 236.725 219.078 240.089L220.36 242.801C227.974 239.201 234.538 233.481 238.992 226.367L236.449 224.775ZM220.766 240.371L209.311 229.207L207.217 231.356L218.672 242.519L220.766 240.371ZM207.365 229.081L167.271 259.089L169.069 261.49L209.163 231.483L207.365 229.081ZM142.524 168.806C137.505 177.601 134.368 187.549 133.637 198.329L136.63 198.532C137.33 188.214 140.33 178.703 145.13 170.293L142.524 168.806ZM133.636 198.337C132.696 213.409 136.668 227.654 144.201 239.388L146.726 237.767C139.531 226.56 135.73 212.947 136.63 198.524L133.636 198.337ZM144.201 239.388C147.965 245.25 152.565 250.484 157.895 254.984L159.83 252.691C154.727 248.383 150.327 243.376 146.726 237.767L144.201 239.388ZM159.735 255.057C164.764 251.461 169.994 247.558 175.324 243.453L173.494 241.076C168.187 245.164 162.985 249.045 157.99 252.617L159.735 255.057ZM175.336 243.443C176.768 242.317 178.2 241.19 179.632 240.064L177.777 237.706C176.345 238.832 174.913 239.959 173.481 241.086L175.336 243.443ZM179.516 237.623C172.904 233.374 167.568 227.241 164.208 220.117L161.495 221.397C165.09 229.021 170.8 235.588 177.894 240.147L179.516 237.623ZM163.922 221.807L175.173 210.337L173.031 208.236L161.78 219.707L163.922 221.807ZM175.295 208.377L145.02 168.64L142.634 170.458L172.909 210.196L175.295 208.377ZM235.92 143.777C227.132 138.643 216.987 135.398 206.114 134.665L205.913 137.658C216.315 138.359 226.012 141.463 234.407 146.367L235.92 143.777ZM206.118 134.665C191.055 133.618 176.824 137.599 165.003 145.246L166.632 147.765C177.926 140.459 191.515 136.657 205.91 137.658L206.118 134.665ZM165.006 145.244C159.151 149.013 153.924 153.619 149.43 158.956L151.725 160.888C156.027 155.779 161.028 151.372 166.629 147.767L165.006 145.244ZM149.357 160.793C152.948 165.828 156.846 171.066 160.946 176.403L163.325 174.575C159.242 169.261 155.367 164.052 151.799 159.051L149.357 160.793ZM160.955 176.415C161.518 177.132 162.08 177.849 162.643 178.566C163.205 179.283 163.768 180 164.331 180.717L166.691 178.865C166.128 178.148 165.566 177.431 165.003 176.714C164.441 175.997 163.878 175.28 163.315 174.563L160.955 176.415ZM166.773 180.6C171.021 173.973 177.044 168.635 184.248 165.276L182.98 162.557C175.251 166.161 168.796 171.885 164.248 178.981L166.773 180.6ZM182.574 164.997L193.313 175.341L195.394 173.18L184.655 162.836L182.574 164.997ZM195.226 175.48L236.036 146.292L234.291 143.852L193.481 173.04L195.226 175.48ZM260.914 236.243C265.827 227.556 268.964 217.713 269.696 207.033L266.703 206.828C266.003 217.042 263.004 226.453 258.303 234.767L260.914 236.243ZM269.697 207.024C270.638 191.949 266.663 177.81 259.135 165.979L256.604 167.589C263.804 178.904 267.603 192.417 266.703 206.837L269.697 207.024ZM259.132 165.974C255.368 160.111 250.769 154.878 245.439 150.378L243.503 152.67C248.606 156.978 253.007 161.986 256.607 167.594L259.132 165.974ZM243.598 150.304C238.57 153.901 233.339 157.803 228.009 161.909L229.84 164.285C235.147 160.197 240.349 156.316 245.344 152.744L243.598 150.304ZM227.997 161.918C227.281 162.481 226.565 163.045 225.849 163.608C225.133 164.171 224.417 164.734 223.701 165.298L225.556 167.656C226.272 167.092 226.988 166.529 227.704 165.966C228.42 165.402 229.136 164.839 229.852 164.276L227.997 161.918ZM223.826 167.744C230.535 171.992 235.869 178.121 239.228 185.244L241.941 183.964C238.345 176.339 232.632 169.769 225.431 165.209L223.826 167.744ZM239.242 185.274L239.345 185.479L242.029 184.139L241.926 183.934L239.242 185.274ZM239.606 183.769L228.764 195.035L230.926 197.115L241.767 185.849L239.606 183.769ZM228.648 196.979L258.411 236.409L260.806 234.601L231.042 195.171L228.648 196.979Z" fill="#00AE99"/>
-<path d="M269 135V268.333H442V135H269Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M339.64 269.64L270 339.281L343.913 413.194L413.554 343.554L339.64 269.64Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M202.5 269C202.5 269 269 269 269 335.5C269 402 202.5 402 202.5 402H-6.5C-6.5 402 -77 402 -77 335.5C-77 269 -6.5 269 -6.5 269H202.5Z" stroke="#00AE99" stroke-width="3"/>
-</g>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/buildBusiness.svg b/packages/website/ts/icons/illustrations/buildBusiness.svg
deleted file mode 100755
index 48e5b3b1c..000000000
--- a/packages/website/ts/icons/illustrations/buildBusiness.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7579 21.2421 88 45 88C68.7579 88 88 68.7579 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M78.8765 52.5843V69.7753H12.1349V52.5843M78.8765 52.5843V21.236H12.1349V52.5843M78.8765 52.5843H51.5731H39.4383H12.1349" stroke="#00AE99" stroke-width="3"/>
-<path d="M56.6293 11.1236H34.3821V21.236H56.6293V11.1236Z" stroke="#00AE99" stroke-width="3"/>
-<rect width="22.2472" height="6.06742" transform="matrix(1 0 0 -1 34.3821 58.6517)" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/checkmark.svg b/packages/website/ts/icons/illustrations/checkmark.svg
deleted file mode 100644
index e17a7ab8b..000000000
--- a/packages/website/ts/icons/illustrations/checkmark.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="124" height="124" viewBox="0 0 124 124" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M61.878.5h.002c.327 0 .64.01.924.02l.01.001a23.966 23.966 0 0 0 .87.02C96.885 1.405 123.5 28.597 123.5 62c0 33.979-27.521 61.5-61.5 61.5S.5 95.979.5 62C.5 28.063 27.979.541 61.878.5zm.002 3C29.64 3.54 3.5 29.717 3.5 62c0 32.322 26.178 58.5 58.5 58.5s58.5-26.178 58.5-58.5c0-31.768-25.308-57.628-56.875-58.46-.32 0-.625-.01-.904-.02h-.01c-.294-.011-.56-.02-.83-.02z" fill="#00AE99"/><path fill-rule="evenodd" clip-rule="evenodd" d="M47.502 98.561l55.419-55.419L88.779 29 47.495 70.284 34.142 56.932 20 71.074l16.573 16.573.008-.007L47.502 98.56zM36.573 83.405l.008-.008 10.921 10.921L98.68 43.142l-9.9-9.9-41.284 41.285-13.353-13.352-9.9 9.9 12.331 12.33z" fill="#00AE99"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/code-repo.svg b/packages/website/ts/icons/illustrations/code-repo.svg
deleted file mode 100644
index 43e412198..000000000
--- a/packages/website/ts/icons/illustrations/code-repo.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="82" height="82" viewBox="0 0 82 82" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M40.9185 1.43051e-06L40.9197 0C41.1377 7.15256e-07 41.3462 0.00719154 41.5359 0.0137337L41.5428 0.0139726C41.7392 0.0207458 41.9163 0.0267566 42.097 0.0267566C42.1057 0.0267566 42.1143 0.0268694 42.123 0.027095C64.2563 0.603056 82 18.7315 82 41C82 63.6526 63.6526 82 41 82C18.3474 82 0 63.6526 0 41C0 18.3752 18.3193 0.0274277 40.9185 1.43051e-06ZM40.9203 2C19.4262 2.02641 2 19.4778 2 41C2 62.548 19.452 80 41 80C62.548 80 80 62.548 80 41C80 19.8212 63.1283 2.58105 42.0835 2.02675C41.8704 2.02646 41.6666 2.01943 41.4808 2.01302L41.4739 2.01278C41.2777 2.00602 41.1008 2.00001 40.9203 2Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M10.7026 14.378C10.7026 13.8257 11.1504 13.378 11.7026 13.378H33.7762C34.3284 13.378 34.7762 13.8257 34.7762 14.378V36.4516C34.7762 37.0039 34.3284 37.4516 33.7762 37.4516H11.7026C11.1504 37.4516 10.7026 37.0039 10.7026 36.4516V14.378ZM12.7026 15.378V35.4516H32.7762V15.378H12.7026Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M38.6621 20.6785L33.0687 15.0851L34.4829 13.6709L40.3692 19.5572C40.5567 19.7447 40.6621 19.9991 40.6621 20.2643V42.3379C40.6621 42.8902 40.2143 43.3379 39.6621 43.3379H17.5885C17.3233 43.3379 17.0689 43.2325 16.8814 43.045L10.9951 37.1587L12.4093 35.7445L18.0027 41.3379H38.6621V20.6785Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M38.6621 42.338C38.6621 41.7857 39.1098 41.338 39.6621 41.338H61.7357C62.288 41.338 62.7357 41.7857 62.7357 42.338V64.4116C62.7357 64.9638 62.288 65.4116 61.7357 65.4116H39.6621C39.1098 65.4116 38.6621 64.9638 38.6621 64.4116V42.338ZM40.6621 43.338V63.4116H60.7357V43.338H40.6621Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M66.622 48.6385L61.0286 43.0451L62.4429 41.6309L68.3291 47.5172C68.5167 47.7047 68.622 47.9591 68.622 48.2243V70.2979C68.622 70.8501 68.1743 71.2979 67.622 71.2979H45.5485C45.2833 71.2979 45.0289 71.1925 44.8414 71.005L38.9551 65.1187L40.3693 63.7045L45.9627 69.2979H66.622V48.6385Z" fill="#00AE99"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/coin.svg b/packages/website/ts/icons/illustrations/coin.svg
deleted file mode 100644
index a1fb123a4..000000000
--- a/packages/website/ts/icons/illustrations/coin.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="88" height="88" viewBox="0 0 88 88" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M44 87c23.748 0 43-19.252 43-43S67.748 1 44 1 1 20.252 1 44s19.252 43 43 43z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M43.999 78.4c18.998 0 34.4-15.401 34.4-34.4 0-18.998-15.401-34.4-34.4-34.4S9.599 25.002 9.599 44C9.599 63 25 78.4 43.999 78.4z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M35.1 57.76v1h20.529v-7.395h-6.098V26.738H42.36l-.254.173-6.568 4.456-.438.298v8.906l1.561-1.06 5.006-3.397v15.251H35.1v6.395z" stroke="#00AE99" stroke-width="2"/><path d="M9.597 43.766c7.115-1.173 12.588-7.271 12.588-14.777 0-3.362-1.095-6.41-2.971-8.913-5.864 6.177-9.538 14.542-9.617 23.69zM9.597 44.234c.079 9.226 3.753 17.513 9.617 23.69a14.719 14.719 0 0 0 2.97-8.913c0-7.506-5.472-13.682-12.587-14.777zM78.399 43.766c-7.115-1.173-12.587-7.271-12.587-14.777 0-3.362 1.094-6.41 2.97-8.913 5.864 6.177 9.539 14.542 9.617 23.69zM78.399 44.235c-.079 9.225-3.753 17.512-9.617 23.689a14.718 14.718 0 0 1-2.97-8.913c0-7.506 5.472-13.682 12.587-14.776z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/></svg>
diff --git a/packages/website/ts/icons/illustrations/consistently-ship.svg b/packages/website/ts/icons/illustrations/consistently-ship.svg
deleted file mode 100644
index 733655a3f..000000000
--- a/packages/website/ts/icons/illustrations/consistently-ship.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="104" height="104" viewBox="0 0 104 104" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M37.5485 62.3767L10.6742 80.0615M16.1162 86.694L39.2493 63.9073" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M43.1605 67.4788L29.2115 96.3881M21.8987 91.9664L41.2898 65.7782" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M64.6767 66.0071L63.4346 66.1475L63.4346 66.1475L64.6767 66.0071ZM65.0025 50.4035L66.2054 50.7435L65.0025 50.4035ZM71.1301 36.7515L70.153 35.9719L70.1082 36.0281L70.0701 36.0891L71.1301 36.7515ZM61.2375 73.5299L60.4186 74.4743L61.3787 75.3068L62.1953 74.3331L61.2375 73.5299ZM47.4561 66.4802L48.3306 67.3734L48.3678 67.337L48.4018 67.2977L47.4561 66.4802ZM45.1781 66.5118L45.9955 65.5661L45.9955 65.5661L45.1781 66.5118ZM44.504 67.2916L45.2499 68.2947L45.36 68.2128L45.4497 68.109L44.504 67.2916ZM43.2195 67.2024L44.037 66.2568L44.037 66.2568L43.2195 67.2024ZM51.486 57.3064L50.6457 58.2318L50.657 58.2421L50.6685 58.2521L51.486 57.3064ZM62.7637 71.4218L63.819 72.0917L63.819 72.0917L62.7637 71.4218ZM76.5283 23.4963L77.6859 23.0248L77.5727 22.7469L77.3457 22.5507L76.5283 23.4963ZM35.9701 41.1929L36.0109 42.4422L36.0109 42.4422L35.9701 41.1929ZM51.3624 38.6129L50.8519 37.4718L51.3624 38.6129ZM63.9842 30.5744L64.793 31.5275L64.8478 31.481L64.8969 31.4285L63.9842 30.5744ZM29.0241 45.6843L28.0908 44.8528L27.2455 45.8017L28.2082 46.6313L29.0241 45.6843ZM37.9936 58.3007L37.0479 57.4833L37.0139 57.5226L36.9833 57.5647L37.9936 58.3007ZM38.2919 60.5593L39.1094 59.6137L39.1094 59.6137L38.2919 60.5593ZM37.6179 61.3391L36.6722 60.5217L36.5825 60.6255L36.5174 60.7463L37.6179 61.3391ZM37.8919 62.5972L38.7094 61.6516L38.7094 61.6515L37.8919 62.5972ZM46.4878 52.9859L45.6704 53.9316L45.6819 53.9416L45.6937 53.9513L46.4878 52.9859ZM30.8892 43.8692L30.0736 42.9219L30.0736 42.9219L30.8892 43.8692ZM76.3188 23.3153L77.1362 22.3696L76.9092 22.1734L76.6179 22.1016L76.3188 23.3153ZM70.1348 36.0655L51.3508 57.796L53.2421 59.4309L72.0261 37.7004L70.1348 36.0655ZM65.9188 65.8667C65.5634 62.7233 64.3047 57.4681 66.2054 50.7435L63.7996 50.0635C61.7311 57.3817 63.1075 63.2547 63.4346 66.1475L65.9188 65.8667ZM66.2054 50.7435C67.7494 45.2809 70.8444 39.5677 72.1902 37.4138L70.0701 36.0891C68.6538 38.3557 65.431 44.2919 63.7996 50.0635L66.2054 50.7435ZM72.1073 37.531C72.8165 36.642 73.9266 35.0937 74.9321 33.5888C75.9127 32.1211 76.8909 30.5525 77.2543 29.671L74.943 28.7181C74.6915 29.3283 73.864 30.6874 72.8534 32.1999C71.8677 33.6752 70.801 35.1596 70.153 35.9719L72.1073 37.531ZM62.0564 72.5855L50.6963 62.7347L49.0585 64.6235L60.4186 74.4743L62.0564 72.5855ZM48.9317 62.8617L46.5104 65.6628L48.4018 67.2977L50.823 64.4966L48.9317 62.8617ZM46.5816 65.5871C46.6163 65.5531 46.6022 65.5735 46.5354 65.6101C46.4766 65.6423 46.4098 65.6684 46.3459 65.6814C46.2855 65.6937 46.2383 65.6924 46.1986 65.6831C46.1638 65.6751 46.0953 65.6523 45.9955 65.5661L44.3607 67.4575C45.1854 68.1704 46.1014 68.2823 46.8439 68.1313C47.5166 67.9946 48.0515 67.6467 48.3306 67.3734L46.5816 65.5871ZM44.2324 65.6944L43.5584 66.4741L45.4497 68.109L46.1238 67.3293L44.2324 65.6944ZM43.7582 66.2885C43.804 66.2544 43.8326 66.2427 43.8431 66.2387C43.857 66.2334 43.8754 66.2284 43.9003 66.2268C43.9278 66.2251 43.9618 66.228 43.9962 66.2392C44.0323 66.251 44.0456 66.2643 44.037 66.2568L42.4021 68.1481C43.5138 69.1091 44.7467 68.6688 45.2499 68.2947L43.7582 66.2885ZM50.6685 58.2521C51.1247 58.6464 51.5236 59.8632 50.612 60.9178L52.5033 62.5527C54.3763 60.3859 53.7352 57.5984 52.3034 56.3607L50.6685 58.2521ZM50.612 60.9178L48.9317 62.8617L50.823 64.4966L52.5033 62.5527L50.612 60.9178ZM62.1953 74.3331C62.6486 73.7926 63.2417 73.0013 63.819 72.0917L61.7083 70.7519C61.1892 71.5698 60.6611 72.2719 60.2798 72.7266L62.1953 74.3331ZM63.819 72.0917C64.381 71.2063 64.9483 70.1773 65.3541 69.1342C65.7512 68.1137 66.0422 66.9586 65.9188 65.8667L63.4346 66.1475C63.4916 66.6522 63.3613 67.3615 63.0243 68.2277C62.6961 69.0712 62.2166 69.9513 61.7083 70.7519L63.819 72.0917ZM50.6948 62.7335L45.811 58.5118L44.1761 60.4032L49.0599 64.6248L50.6948 62.7335ZM48.0426 55.9286C49.1315 56.8715 50.1183 57.753 50.6457 58.2318L52.3263 56.381C51.7849 55.8894 50.7834 54.9948 49.679 54.0386L48.0426 55.9286ZM40.7648 64.3497L44.3607 67.4575L45.9955 65.5661L42.3996 62.4582L40.7648 64.3497ZM39.6096 65.7343L42.4021 68.1481L44.037 66.2568L41.2445 63.8429L39.6096 65.7343ZM77.2543 29.671C77.6017 28.8283 77.9174 27.7261 78.0507 26.5812C78.1821 25.4521 78.1499 24.1638 77.6859 23.0248L75.3706 23.9679C75.6133 24.5637 75.6738 25.3787 75.5675 26.2921C75.463 27.1897 75.2106 28.0692 74.943 28.7181L77.2543 29.671ZM62.9156 29.8252L44.1315 51.5557L46.0229 53.1906L64.8069 31.4601L62.9156 29.8252ZM36.0109 42.4422C38.9206 42.3473 44.9309 42.8595 51.8728 39.7539L50.8519 37.4718C44.4731 40.3255 39.0911 39.8404 35.9294 39.9436L36.0109 42.4422ZM51.8728 39.7539C57.3477 37.3047 62.7552 33.2568 64.793 31.5275L63.1754 29.6213C61.2389 31.2646 56.0337 35.1537 50.8519 37.4718L51.8728 39.7539ZM64.8969 31.4285C65.6069 30.6698 66.9213 29.3996 68.2385 28.2108C69.5889 26.992 70.814 25.9765 71.3813 25.6394L70.1041 23.4903C69.2845 23.9774 67.8738 25.1723 66.5635 26.3549C65.2199 27.5676 63.8485 28.89 63.0715 29.7203L64.8969 31.4285ZM28.2082 46.6313L39.5989 56.4466L41.2308 54.5527L29.8401 44.7374L28.2082 46.6313ZM39.4692 54.6822L37.0479 57.4833L38.9392 59.1182L41.3605 56.3171L39.4692 54.6822ZM36.9833 57.5647C36.7532 57.8804 36.4864 58.46 36.4484 59.1453C36.4065 59.9019 36.6497 60.7921 37.4745 61.505L39.1094 59.6137C39.0096 59.5275 38.9772 59.4629 38.9642 59.4297C38.9494 59.3918 38.9412 59.3452 38.9446 59.2836C38.9482 59.2185 38.9644 59.1487 38.9878 59.0859C39.0143 59.0144 39.0324 58.9976 39.0039 59.0368L36.9833 57.5647ZM37.3462 59.7419L36.6722 60.5217L38.5635 62.1566L39.2376 61.3768L37.3462 59.7419ZM36.5174 60.7463C36.22 61.2983 35.9627 62.5819 37.0745 63.5429L38.7094 61.6515C38.7007 61.6441 38.7158 61.6554 38.7326 61.6893C38.7487 61.7218 38.7565 61.755 38.7588 61.7825C38.7609 61.8074 38.7585 61.8263 38.7553 61.8408C38.7529 61.8517 38.7454 61.8817 38.7183 61.9319L36.5174 60.7463ZM47.3052 52.0403C45.8734 50.8026 43.0225 50.5715 41.1495 52.7383L43.0408 54.3732C43.9524 53.3186 45.2142 53.5373 45.6704 53.9316L47.3052 52.0403ZM41.1495 52.7383L39.4692 54.6822L41.3605 56.3171L43.0408 54.3732L41.1495 52.7383ZM29.9575 46.5158C30.3523 46.0726 30.9705 45.4485 31.7047 44.8165L30.0736 42.9219C29.2572 43.6247 28.56 44.3261 28.0908 44.8528L29.9575 46.5158ZM31.7047 44.8165C32.4234 44.1978 33.2248 43.596 34.012 43.1492C34.8203 42.6904 35.5033 42.4588 36.0109 42.4422L35.9294 39.9436C34.8311 39.9794 33.7302 40.4345 32.7779 40.975C31.8045 41.5275 30.8684 42.2377 30.0736 42.9219L31.7047 44.8165ZM39.5974 56.4453L44.4813 60.667L46.1161 58.7756L41.2323 54.554L39.5974 56.4453ZM49.9826 54.3011C48.8767 53.3467 47.8466 52.4851 47.2819 52.0206L45.6937 53.9513C46.2438 54.4038 47.2588 55.2527 48.3493 56.1937L49.9826 54.3011ZM42.7049 62.7221L39.1094 59.6137L37.4744 61.5049L41.0699 64.6133L42.7049 62.7221ZM41.5018 64.0654L38.7094 61.6516L37.0745 63.5429L39.8669 65.9567L41.5018 64.0654ZM71.3813 25.6394C71.9847 25.2807 72.8184 24.9037 73.6914 24.6705C74.5799 24.4331 75.395 24.375 76.0197 24.529L76.6179 22.1016C75.4237 21.8073 74.1443 21.9618 73.0462 22.2552C71.9326 22.5527 70.8876 23.0246 70.1041 23.4903L71.3813 25.6394ZM77.3457 22.5507L77.1362 22.3696L75.5013 24.2609L75.7108 24.442L77.3457 22.5507Z" fill="#00AE99"/>
-<path d="M52 102C79.6142 102 102 79.6142 102 52C102 24.3858 79.6142 2 52 2C24.3858 2 2 24.3858 2 52C2 79.6142 24.3858 102 52 102Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/customize.svg b/packages/website/ts/icons/illustrations/customize.svg
deleted file mode 100644
index 1f018ee7a..000000000
--- a/packages/website/ts/icons/illustrations/customize.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="152" height="152" viewBox="0 0 152 152" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M76 151c41.421 0 75-33.579 75-75S117.421 1 76 1 1 34.579 1 76s33.579 75 75 75z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M120.5 122.906H31.503c-12.943 0-23.478-10.485-23.478-23.478 0-12.993 10.485-23.478 23.478-23.478H120.5" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M120.499 122.906c12.967 0 23.478-10.511 23.478-23.478 0-12.967-10.511-23.478-23.478-23.478-12.967 0-23.478 10.511-23.478 23.478 0 12.967 10.511 23.478 23.478 23.478z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M120.5 122.906H31.503c-12.943 0-23.478-10.485-23.478-23.478 0-12.993 10.485-23.478 23.478-23.478H120.5" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M120.499 122.906c12.967 0 23.478-10.511 23.478-23.478 0-12.967-10.511-23.478-23.478-23.478-12.967 0-23.478 10.511-23.478 23.478 0 12.967 10.511 23.478 23.478 23.478z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M31.5 29.093h88.996c12.943 0 23.478 10.485 23.478 23.478 0 12.993-10.485 23.478-23.478 23.478H31.499" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M31.503 76.052c12.967 0 23.478-10.512 23.478-23.478 0-12.967-10.511-23.479-23.478-23.479-12.966 0-23.478 10.512-23.478 23.479 0 12.966 10.512 23.478 23.478 23.478z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/decentralisedLoans.svg b/packages/website/ts/icons/illustrations/decentralisedLoans.svg
deleted file mode 100755
index 72d0de7fc..000000000
--- a/packages/website/ts/icons/illustrations/decentralisedLoans.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="151" height="150" viewBox="0 0 151 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="76" cy="75" r="73" stroke="#00AE99" stroke-width="3"/>
-<rect x="3" y="75" width="45.9619" height="45.9619" transform="rotate(-45 3 75)" stroke="#00AE99" stroke-width="3"/>
-<rect x="85" y="75" width="45" height="45" transform="rotate(-45 85 75)" stroke="#00AE99" stroke-width="3"/>
-<path d="M89 79L76 92M100 115L85 100L71.5 113.5L63 105L76 92M100 115L113 102M100 115L106 121C97.6605 129.494 89.3395 138.006 81 146.5L38.5 104M76 92L63 79" stroke="#00AE99" stroke-width="3"/>
-<path d="M63.5 71.5L76.5 58.5M52.5 35.5L67.5 50.5L81 37L89.5 45.5L76.5 58.5M52.5 35.5L39.5 48.5M52.5 35.5L46.5 29.5C54.8395 21.0061 63.1605 12.4939 71.5 4L114 46.5M76.5 58.5L89.5 71.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M93 134.5L87 128.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M99 128L93.5 122.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M87 140L81.5 134.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M60.5 16.5L66.5 22.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M54.5 23L60 28.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M66.5 11L72 16.5" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/description.svg b/packages/website/ts/icons/illustrations/description.svg
deleted file mode 100755
index 1887b182e..000000000
--- a/packages/website/ts/icons/illustrations/description.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<svg width="353" height="80" viewBox="0 0 353 80" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M130.818 77C151.253 77 167.818 60.4345 167.818 40C167.818 19.5655 151.253 3 130.818 3C110.384 3 93.8181 19.5655 93.8181 40C93.8181 60.4345 110.384 77 130.818 77Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M140.505 11.9474V21.0965H149.654" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M149.655 21.0964V49.351H124.562V11.9473H140.506L149.655 21.0964Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M121.131 68.0529V58.9038H111.982" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M111.982 58.9039V30.6494H137.075V68.053H121.131L111.982 58.9039Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40 77C60.4345 77 77 60.4345 77 40C77 19.5655 60.4345 3 40 3C19.5655 3 3.00001 19.5655 3.00001 40C3.00001 60.4345 19.5655 77 40 77Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40.0037 76.9359C60.4007 76.9359 76.9357 60.4009 76.9357 40.0038C76.9357 19.6068 60.4007 3.07178 40.0037 3.07178C19.6066 3.07178 3.07159 19.6068 3.07159 40.0038C3.07159 60.4009 19.6066 76.9359 40.0037 76.9359Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M30.0225 54.7728V56.2728H31.5225H51.4155H52.9155V54.7728V48.9811V47.4811H51.4155H46.3684V22.5411V21.0411H44.8684H38.5732H38.1123L37.7309 21.2999L30.6803 26.0843L30.0225 26.5306V27.3255V34.2922V37.1228L32.3648 35.5335L37.0732 32.3385V47.4811H31.5225H30.0225V48.9811V54.7728Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M3.06793 39.7483C10.7062 38.4893 16.5817 31.9422 16.5817 23.8843C16.5817 20.275 15.4066 17.0015 13.3921 14.3156C7.09688 20.9465 3.15187 29.9277 3.06793 39.7483Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M3.06793 40.2518C3.15187 50.1563 7.09688 59.0535 13.3921 65.6845C15.4066 62.9986 16.5817 59.725 16.5817 56.1158C16.5817 48.0579 10.7062 41.4269 3.06793 40.2518Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M76.9322 39.7483C69.294 38.4893 63.4184 31.9422 63.4184 23.8843C63.4184 20.275 64.5936 17.0015 66.608 14.3156C72.9033 20.9465 76.8483 29.9277 76.9322 39.7483Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M76.9321 40.2518C76.8482 50.1563 72.9031 59.0536 66.6079 65.6846C64.5934 62.9986 63.4183 59.7251 63.4183 56.1158C63.4183 48.0579 69.2939 41.4269 76.9321 40.2518Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M221.987 77C242.421 77 258.987 60.4345 258.987 40C258.987 19.5655 242.421 3 221.987 3C201.552 3 184.987 19.5655 184.987 40C184.987 60.4345 201.552 77 221.987 77Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M221.987 77C242.421 77 258.987 60.4345 258.987 40C258.987 19.5655 242.421 3 221.987 3C201.552 3 184.987 19.5655 184.987 40C184.987 60.4345 201.552 77 221.987 77Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M225.754 38.1178V16.3887H228.848V10.2668H215.125V16.3887H218.219V38.1178C211.156 39.7996 205.908 46.1905 205.908 53.725C205.908 62.605 213.106 69.8032 221.986 69.8032C230.866 69.8032 238.065 62.605 238.065 53.725C238.065 46.1232 232.817 39.7996 225.754 38.1178Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M228.848 10.1979H215.124V16.3197H228.848V10.1979Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M208.6 44.7092H235.307" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M312.805 77C333.239 77 349.805 60.4345 349.805 40C349.805 19.5655 333.239 3 312.805 3C292.37 3 275.805 19.5655 275.805 40C275.805 60.4345 292.37 77 312.805 77Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M312.607 15.2613L290.287 45.3102H312.607L312.668 64.4778L334.926 34.3678H312.607V15.2613Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/descriptionBolt.svg b/packages/website/ts/icons/illustrations/descriptionBolt.svg
deleted file mode 100755
index 45e51240f..000000000
--- a/packages/website/ts/icons/illustrations/descriptionBolt.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="78" height="78" viewBox="0 0 78 78" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M38.8049 76C59.2395 76 75.8049 59.4345 75.8049 39C75.8049 18.5655 59.2395 2 38.8049 2C18.3704 2 1.80493 18.5655 1.80493 39C1.80493 59.4345 18.3704 76 38.8049 76Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M38.6065 14.2613L16.2874 44.3102H38.6065L38.6679 63.4778L60.9257 33.3678H38.6065V14.2613Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/descriptionCoin.svg b/packages/website/ts/icons/illustrations/descriptionCoin.svg
deleted file mode 100755
index d1015b98d..000000000
--- a/packages/website/ts/icons/illustrations/descriptionCoin.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="78" height="78" viewBox="0 0 78 78" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M39 76C59.4345 76 76 59.4345 76 39C76 18.5655 59.4345 2 39 2C18.5655 2 2.00001 18.5655 2.00001 39C2.00001 59.4345 18.5655 76 39 76Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M39.0037 75.9359C59.4007 75.9359 75.9357 59.4009 75.9357 39.0038C75.9357 18.6068 59.4007 2.07178 39.0037 2.07178C18.6066 2.07178 2.07159 18.6068 2.07159 39.0038C2.07159 59.4009 18.6066 75.9359 39.0037 75.9359Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M29.0225 53.7728V55.2728H30.5225H50.4155H51.9155V53.7728V47.9811V46.4811H50.4155H45.3684V21.5411V20.0411H43.8684H37.5732H37.1123L36.7309 20.2999L29.6803 25.0843L29.0225 25.5306V26.3255V33.2922V36.1228L31.3648 34.5335L36.0732 31.3385V46.4811H30.5225H29.0225V47.9811V53.7728Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M2.06793 38.7483C9.70615 37.4893 15.5817 30.9422 15.5817 22.8843C15.5817 19.275 14.4066 16.0015 12.3921 13.3156C6.09688 19.9465 2.15187 28.9277 2.06793 38.7483Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M2.06793 39.2518C2.15187 49.1563 6.09688 58.0535 12.3921 64.6845C14.4066 61.9986 15.5817 58.725 15.5817 55.1158C15.5817 47.0579 9.70615 40.4269 2.06793 39.2518Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M75.9322 38.7483C68.294 37.4893 62.4184 30.9422 62.4184 22.8843C62.4184 19.275 63.5936 16.0015 65.608 13.3156C71.9033 19.9465 75.8483 28.9277 75.9322 38.7483Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M75.9321 39.2518C75.8482 49.1563 71.9031 58.0536 65.6079 64.6846C63.5934 61.9986 62.4183 58.7251 62.4183 55.1158C62.4183 47.0579 68.2939 40.4269 75.9321 39.2518Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/descriptionCopy.svg b/packages/website/ts/icons/illustrations/descriptionCopy.svg
deleted file mode 100755
index 6c9b5f0fc..000000000
--- a/packages/website/ts/icons/illustrations/descriptionCopy.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="78" height="78" viewBox="0 0 78 78" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M38.8181 3.5C19.212 3.5 3.31812 19.3939 3.31812 39C3.31812 58.6061 19.212 74.5 38.8181 74.5C58.4242 74.5 74.3181 58.6061 74.3181 39C74.3181 19.3939 58.4242 3.5 38.8181 3.5ZM0.318115 39C0.318115 17.737 17.5552 0.5 38.8181 0.5C60.0811 0.5 77.3181 17.737 77.3181 39C77.3181 60.263 60.0811 77.5 38.8181 77.5C17.5552 77.5 0.318115 60.263 0.318115 39Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M47.0054 10.9473H50.0054V18.5964H57.6545V21.5964H47.0054V10.9473Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M31.0619 9.44727H49.1268L59.1546 19.475V49.8509H31.0619V9.44727ZM34.0619 12.4473V46.8509H56.1546V20.7177L47.8842 12.4473H34.0619Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M19.9818 56.4038H30.6309V67.0529H27.6309V59.4038H19.9818V56.4038Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M18.4818 28.1494H46.5745V68.553H28.5096L18.4818 58.5253V28.1494ZM21.4818 31.1494V57.2826L29.7522 65.553H43.5745V31.1494H21.4818Z" fill="#00AE99"/>
-</svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/descriptionFlask.svg b/packages/website/ts/icons/illustrations/descriptionFlask.svg
deleted file mode 100755
index 703b069d5..000000000
--- a/packages/website/ts/icons/illustrations/descriptionFlask.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="78" height="78" viewBox="0 0 78 78" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M38.9868 76C59.4213 76 75.9868 59.4345 75.9868 39C75.9868 18.5655 59.4213 2 38.9868 2C18.5523 2 1.9868 18.5655 1.9868 39C1.9868 59.4345 18.5523 76 38.9868 76Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M38.9868 76C59.4213 76 75.9868 59.4345 75.9868 39C75.9868 18.5655 59.4213 2 38.9868 2C18.5523 2 1.9868 18.5655 1.9868 39C1.9868 59.4345 18.5523 76 38.9868 76Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M42.7537 37.1178V15.3887H45.8483V9.26685H32.1246V15.3887H35.2192V37.1178C28.1555 38.7996 22.9083 45.1905 22.9083 52.725C22.9083 61.605 30.1064 68.8032 38.9864 68.8032C47.8664 68.8032 55.0646 61.605 55.0646 52.725C55.0646 45.1232 49.8174 38.7996 42.7537 37.1178Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.848 9.19794H32.1243V15.3197H45.848V9.19794Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M25.5996 43.7092H52.3069" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/eficientDesign.svg b/packages/website/ts/icons/illustrations/eficientDesign.svg
deleted file mode 100755
index 6b8f852c3..000000000
--- a/packages/website/ts/icons/illustrations/eficientDesign.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M45 88C68.7482 88 88 68.7482 88 45C88 21.2518 68.7482 2 45 2C21.2518 2 2 21.2518 2 45C2 68.7482 21.2518 88 45 88Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M70.2962 31.8956L57.4584 19.3542L44.833 32.1067L57.6708 44.6481L70.2962 31.8956Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M74.8267 14.5717L57.4829 19.3431L70.311 31.8859L74.8267 14.5717Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M32.184 19.5506L19.5587 32.3031L32.3965 44.8445L45.0218 32.092L32.184 19.5506Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M14.7418 15.0572L19.5451 32.2857L32.1719 19.5429L14.7418 15.0572Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M19.698 57.5441L32.5358 70.0856L45.1612 57.3331L32.3234 44.7916L19.698 57.5441Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M15.1732 74.8574L32.517 70.086L19.6889 57.5432L15.1732 74.8574Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M57.8244 69.8803L70.4497 57.1278L57.6119 44.5863L44.9865 57.3389L57.8244 69.8803Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M75.2582 74.3715L70.4548 57.1429L57.8281 69.8858L75.2582 74.3715Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/eth-based-tokens.svg b/packages/website/ts/icons/illustrations/eth-based-tokens.svg
deleted file mode 100644
index b0370d234..000000000
--- a/packages/website/ts/icons/illustrations/eth-based-tokens.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="84" height="84" viewBox="0 0 84 84" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path fill-rule="evenodd" clip-rule="evenodd" d="M42.1187 1.19995L42.1199 1.19995C42.3379 1.19995 42.5464 1.20714 42.7361 1.21368L42.743 1.21392C42.9394 1.2207 43.1165 1.22671 43.2972 1.22671C43.3058 1.22671 43.3145 1.22682 43.3232 1.22705C65.4565 1.80301 83.2002 19.9314 83.2002 42.1999C83.2002 64.8526 64.8528 83.1999 42.2002 83.1999C19.5476 83.1999 1.2002 64.8526 1.2002 42.1999C1.2002 19.5752 19.5195 1.22738 42.1187 1.19995ZM42.1205 3.19995C20.6264 3.22636 3.2002 20.6778 3.2002 42.1999C3.2002 63.748 20.6521 81.1999 42.2002 81.1999C63.7482 81.1999 81.2002 63.748 81.2002 42.1999C81.2002 21.0212 64.3285 3.781 43.2837 3.2267C43.0706 3.22641 42.8668 3.21938 42.681 3.21297L42.6741 3.21274C42.4779 3.20597 42.301 3.19997 42.1205 3.19995Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M68.0979 42.2001C68.0979 42.5434 67.9218 42.8627 67.6314 43.0459L42.7337 58.7489C42.4077 58.9544 41.9927 58.9544 41.6667 58.7489L16.769 43.0459C16.4786 42.8628 16.3025 42.5434 16.3025 42.2001C16.3025 41.8567 16.4786 41.5374 16.769 41.3543L41.6667 25.6513C41.9927 25.4457 42.4077 25.4457 42.7337 25.6513L67.6314 41.3543C67.9218 41.5374 68.0979 41.8567 68.0979 42.2001ZM42.2002 27.6794L19.177 42.2001L42.2002 56.7208L65.2234 42.2001L42.2002 27.6794Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M66.1803 49.8738C66.5224 50.2245 66.5601 50.7714 66.2693 51.1656L43.005 82.7131C42.8165 82.9687 42.5178 83.1196 42.2002 83.1196C41.8826 83.1196 41.5838 82.9687 41.3953 82.7131L18.1311 51.1656C17.8403 50.7714 17.878 50.2245 18.2201 49.8739C18.5621 49.5232 19.1079 49.4719 19.5092 49.7528L42.2002 65.6307L64.8912 49.7528C65.2925 49.4719 65.8383 49.5232 66.1803 49.8738ZM61.0375 54.8904L42.7735 67.6705C42.4292 67.9114 41.9711 67.9114 41.6268 67.6705L23.3628 54.8904L42.2002 80.4347L61.0375 54.8904Z" fill="#00AE99"/>
-<path fill-rule="evenodd" clip-rule="evenodd" d="M42.2002 1.28039C42.5439 1.28039 42.8635 1.45687 43.0465 1.74773L68.1713 41.6673L66.4786 42.7326L42.2002 4.15775L17.9218 42.7327L16.2291 41.6673L41.3539 1.74773C41.5369 1.45687 41.8565 1.28039 42.2002 1.28039Z" fill="#00AE99"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/extensibleArchitecture.svg b/packages/website/ts/icons/illustrations/extensibleArchitecture.svg
deleted file mode 100755
index 7674b3289..000000000
--- a/packages/website/ts/icons/illustrations/extensibleArchitecture.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M45.0089 45.022L80.128 45.022L80.128 68.6648L68.5 68.6648" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M44.9968 45.0043L69.8295 69.837L53.1116 86.5548L44.9968 78.4399" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45 44.9999V80.119H21.3572V69" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M44.9932 44.9767L20.1605 69.8094L3.44264 53.0916L11.5575 44.9767" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.0066 44.9802L9.88753 44.9802L9.88753 21.3373L21 21.3373" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.0057 44.9928L20.173 20.1601L36.8908 3.44228L45.0057 11.5571" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.0133 44.9977L45.0133 9.87867L68.6561 9.87867L68.6561 21" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45.0249 45.006H62H78.4605L86.5754 36.8911L69.8575 20.1733L45.0249 45.006Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M45 88C68.7482 88 88 68.7482 88 45C88 21.2518 68.7482 2 45 2C21.2518 2 2 21.2518 2 45C2 68.7482 21.2518 88 45 88Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/flexibleIntegration.svg b/packages/website/ts/icons/illustrations/flexibleIntegration.svg
deleted file mode 100755
index dee44d4c0..000000000
--- a/packages/website/ts/icons/illustrations/flexibleIntegration.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M75 148C115.317 148 148 115.317 148 75C148 34.6832 115.317 2 75 2C34.6832 2 2 34.6832 2 75C2 115.317 34.6832 148 75 148Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<rect x="45" y="4" width="30" height="71" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="45" y="4" width="30" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="116" y="45" width="30" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="75" y="116" width="30" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="4" y="75" width="30" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="75" y="75" width="30" height="71" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="75" y="45" width="71" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<rect x="4" y="75" width="71" height="30" rx="15" stroke="#00AE99" stroke-width="3"/>
-<path d="M43.5 19V60H46.5V19H43.5ZM30 73.5C22.5442 73.5 16.5 67.4558 16.5 60H13.5C13.5 69.1127 20.8873 76.5 30 76.5V73.5ZM43.5 60C43.5 67.4558 37.4558 73.5 30 73.5V76.5C39.1127 76.5 46.5 69.1127 46.5 60H43.5ZM106.5 131V90H103.5V131H106.5ZM120 76.5C127.456 76.5 133.5 82.5442 133.5 90H136.5C136.5 80.8873 129.113 73.5 120 73.5V76.5ZM120 73.5C110.887 73.5 103.5 80.8873 103.5 90H106.5C106.5 82.5442 112.544 76.5 120 76.5V73.5ZM131 43.5H90V46.5H131V43.5ZM90 43.5C82.5442 43.5 76.5 37.4558 76.5 30H73.5C73.5 39.1127 80.8873 46.5 90 46.5V43.5ZM90 13.5C80.8873 13.5 73.5 20.8873 73.5 30H76.5C76.5 22.5442 82.5442 16.5 90 16.5V13.5ZM19 106.5H60V103.5H19V106.5ZM73.5 120C73.5 127.456 67.4558 133.5 60 133.5V136.5C69.1127 136.5 76.5 129.113 76.5 120H73.5ZM60 106.5C67.4558 106.5 73.5 112.544 73.5 120H76.5C76.5 110.887 69.1127 103.5 60 103.5V106.5ZM139.099 40.8017C136.843 42.4964 134.041 43.5 131 43.5V46.5C134.713 46.5 138.143 45.2719 140.901 43.2004L139.099 40.8017ZM90 16.5H116.5V13.5H90V16.5ZM16.5 60V33H13.5V60H16.5ZM40.8008 10.8995C42.496 13.1559 43.5 15.9585 43.5 19H46.5C46.5 15.2865 45.2714 11.8556 43.1992 9.09752L40.8008 10.8995ZM19 103.5C15.2865 103.5 11.8556 104.729 9.09752 106.801L10.8995 109.199C13.1559 107.504 15.9585 106.5 19 106.5V103.5ZM60 133.5H33V136.5H60V133.5ZM109.199 139.1C107.504 136.844 106.5 134.041 106.5 131H103.5C103.5 134.714 104.729 138.144 106.801 140.902L109.199 139.1ZM133.5 90V116.5H136.5V90H133.5Z" fill="#00AE99"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/flexibleIntegration0xInstant.svg b/packages/website/ts/icons/illustrations/flexibleIntegration0xInstant.svg
deleted file mode 100755
index bb5116b8b..000000000
--- a/packages/website/ts/icons/illustrations/flexibleIntegration0xInstant.svg
+++ /dev/null
@@ -1,17 +0,0 @@
-<svg width="250" height="250" viewBox="0 0 250 250" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M125 247C192.379 247 247 192.379 247 125C247 57.6213 192.379 3 125 3C57.6213 3 3 57.6213 3 125C3 192.379 57.6213 247 125 247Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M125 2V49.5839C125 63.4281 113.777 74.651 99.9329 74.651V74.651C86.0887 74.651 74.8658 63.4281 74.8658 49.5839V13" stroke="#00AE99" stroke-width="3"/>
-<rect x="25" y="75" width="50.1342" height="50.1342" rx="25.0671" stroke="#00AE99" stroke-width="3"/>
-<rect x="125" y="25" width="50.1342" height="50.1342" rx="25.0671" stroke="#00AE99" stroke-width="3"/>
-<rect x="108" y="88" width="34" height="34" rx="17" stroke="#00AE99" stroke-width="3"/>
-<rect x="175" y="125" width="50.1342" height="50.1342" rx="25.0671" stroke="#00AE99" stroke-width="3"/>
-<rect x="75" y="175" width="50.1342" height="50.1342" rx="25.0671" stroke="#00AE99" stroke-width="3"/>
-<path d="M125 248V200.067C125 186.223 136.223 175 150.067 175V175C163.911 175 175.134 186.223 175.134 200.067V236.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M246.5 125H200.067C186.223 125 175 113.777 175 99.9328V99.9328C175 86.0886 186.223 74.8657 200.067 74.8657H235.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M200 73.5001H150V76.5001H200V73.5001ZM150 73.5001C137.021 73.5001 126.5 62.9788 126.5 50.0001H123.5C123.5 64.6356 135.364 76.5001 150 76.5001V73.5001ZM150 23.5001C135.364 23.5001 123.5 35.3645 123.5 50.0001H126.5C126.5 37.0214 137.021 26.5001 150 26.5001V23.5001ZM223.12 54.2318C221.128 65.1907 211.533 73.5001 200 73.5001V76.5001C213.009 76.5001 223.825 67.1282 226.072 54.7682L223.12 54.2318ZM150 26.5001H195V23.5001H150V26.5001Z" fill="#00AE99"/>
-<path d="M3 125H49.5839C63.4281 125 74.651 136.223 74.651 150.067V150.067C74.651 163.911 63.4281 175.134 49.5839 175.134H14" stroke="#00AE99" stroke-width="3"/>
-<path d="M73.5 50V100H76.5V50H73.5ZM50 123.5C37.0213 123.5 26.5 112.979 26.5 100H23.5C23.5 114.636 35.3645 126.5 50 126.5V123.5ZM73.5 100C73.5 112.979 62.9787 123.5 50 123.5V126.5C64.6355 126.5 76.5 114.636 76.5 100H73.5ZM223.5 150V194H226.5V150H223.5ZM176.5 200V150H173.5V200H176.5ZM200 126.5C212.979 126.5 223.5 137.021 223.5 150H226.5C226.5 135.364 214.636 123.5 200 123.5V126.5ZM200 123.5C185.364 123.5 173.5 135.364 173.5 150H176.5C176.5 137.021 187.021 126.5 200 126.5V123.5ZM50 176.5H100V173.5H50V176.5ZM123.5 200C123.5 212.979 112.979 223.5 100 223.5V226.5C114.636 226.5 126.5 214.636 126.5 200H123.5ZM100 176.5C112.979 176.5 123.5 187.021 123.5 200H126.5C126.5 185.364 114.636 173.5 100 173.5V176.5ZM54.7016 26.9701C65.4275 29.1474 73.5 38.6326 73.5 50H76.5C76.5 37.1778 67.3949 26.4855 55.2984 24.0301L54.7016 26.9701ZM26.5 100V55H23.5V100H26.5ZM100 223.5H55V226.5H100V223.5ZM50 173.5C37.1778 173.5 26.4855 182.605 24.0301 194.702L26.9701 195.298C29.1474 184.572 38.6326 176.5 50 176.5V173.5ZM195.768 223.12C184.809 221.128 176.5 211.533 176.5 200H173.5C173.5 213.009 182.872 223.825 195.232 226.072L195.768 223.12Z" fill="#00AE99"/>
-<rect x="75" y="75" width="100" height="100" stroke="#00AE99" stroke-width="3"/>
-<rect x="86" y="144" width="78" height="19" stroke="#00AE99" stroke-width="3"/>
-<path d="M88 134H162" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/flexibleOrders.svg b/packages/website/ts/icons/illustrations/flexibleOrders.svg
deleted file mode 100755
index f4545ae38..000000000
--- a/packages/website/ts/icons/illustrations/flexibleOrders.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="91" height="90" viewBox="0 0 91 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7579 21.2421 88 45 88C68.7579 88 88 68.7579 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M67.7548 20.2253V59.6647C67.7548 65.8083 62.7745 70.7886 56.6309 70.7886V70.7886C50.4873 70.7886 45.507 65.8083 45.507 59.6647V31.3492C45.507 25.2057 40.5266 20.2253 34.383 20.2253V20.2253C28.2395 20.2253 23.2591 25.2057 23.2591 31.3492V70.7886M67.7548 20.2253L60.676 27.3042M67.7548 20.2253L74.8337 27.3042M23.2591 70.7886L15.6746 63.2041M23.2591 70.7886L30.8436 63.2041" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/gamingAndCollectibles.svg b/packages/website/ts/icons/illustrations/gamingAndCollectibles.svg
deleted file mode 100755
index c66af5088..000000000
--- a/packages/website/ts/icons/illustrations/gamingAndCollectibles.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="116" cy="34" r="32" stroke="#00AE99" stroke-width="3"/>
-<circle cx="116" cy="34" r="14" stroke="#00AE99" stroke-width="3"/>
-<path d="M116 5L121.216 17.9481L133.046 10.5385L129.655 24.0794L143.581 25.0385L132.878 34L143.581 42.9615L129.655 43.9206L133.046 57.4615L121.216 50.0519L116 63L110.784 50.0519L98.9542 57.4615L102.345 43.9206L88.4194 42.9615L99.122 34L88.4194 25.0385L102.345 24.0794L98.9542 10.5385L110.784 17.9481L116 5Z" stroke="#00AE99" stroke-width="3"/>
-<circle cx="34" cy="34" r="32" stroke="#00AE99" stroke-width="3"/>
-<path d="M66 34H45M2 34H23" stroke="#00AE99" stroke-width="3"/>
-<circle cx="34" cy="34" r="11" stroke="#00AE99" stroke-width="3"/>
-<circle cx="34" cy="34" r="4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="116" cy="116" r="32" stroke="#00AE99" stroke-width="3"/>
-<circle cx="116" cy="116" r="6" stroke="#00AE99" stroke-width="3"/>
-<path d="M103 114C103 110.686 100.314 108 97 108C93.6863 108 91 110.686 91 114" stroke="#00AE99" stroke-width="3"/>
-<path d="M141 114C141 110.686 138.314 108 135 108C131.686 108 129 110.686 129 114" stroke="#00AE99" stroke-width="3"/>
-<path d="M116 122V125C116 128.866 112.866 132 109 132V132C105.134 132 102 128.866 102 125V124" stroke="#00AE99" stroke-width="3"/>
-<path d="M123 133V134C123 137.866 119.866 141 116 141V141C112.134 141 109 137.866 109 134V133" stroke="#00AE99" stroke-width="3"/>
-<path d="M116 122V125C116 128.866 119.134 132 123 132V132C126.866 132 130 128.866 130 125V124" stroke="#00AE99" stroke-width="3"/>
-<circle cx="34" cy="116" r="32" stroke="#00AE99" stroke-width="3"/>
-<path d="M33.5556 142L7 113.1M33.5556 142L61 113.1M33.5556 142L22 113.1M33.5556 142L46.4444 113.1M7 113.1L16.8889 98H33.5556M7 113.1H22M61 113.1L51.1111 98H33.5556M61 113.1H46.4444M22 113.1H46.4444M22 113.1L33.5556 98M46.4444 113.1L33.5556 98" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/generateRevenueForYourBusiness-large.svg b/packages/website/ts/icons/illustrations/generateRevenueForYourBusiness-large.svg
deleted file mode 100755
index 681b8c41e..000000000
--- a/packages/website/ts/icons/illustrations/generateRevenueForYourBusiness-large.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-<svg width="250" height="250" viewBox="0 0 250 250" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M177.423 216C176.501 218.606 176 221.411 176 224.333C176 227.953 176.769 231.394 178.154 234.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M177.423 199.333C176.501 201.94 176 204.745 176 207.667C176 216.712 180.804 224.636 188 229.025" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 182.667C225.499 185.273 226 188.078 226 191C226 191.504 225.985 192.004 225.956 192.5M177.423 182.667C176.501 185.273 176 188.078 176 191C176 204.807 187.193 216 201 216C202.712 216 204.384 215.828 206 215.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 166C225.499 168.606 226 171.411 226 174.333C226 188.14 214.807 199.333 201 199.333C187.193 199.333 176 188.14 176 174.333C176 171.411 176.501 168.606 177.423 166" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 149.333C225.499 151.94 226 154.745 226 157.667C226 171.474 214.807 182.667 201 182.667C187.193 182.667 176 171.474 176 157.667C176 154.745 176.501 151.94 177.423 149.333" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 132.667C225.499 135.273 226 138.078 226 141C226 154.807 214.807 166 201 166C187.193 166 176 154.807 176 141C176 138.078 176.501 135.273 177.423 132.667" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 116C225.499 118.606 226 121.411 226 124.333C226 138.14 214.807 149.333 201 149.333C187.193 149.333 176 138.14 176 124.333C176 121.411 176.501 118.606 177.423 116" stroke="#00AE99" stroke-width="3"/>
-<path d="M224.577 99.3333C225.499 101.94 226 104.745 226 107.667C226 121.474 214.807 132.667 201 132.667C187.193 132.667 176 121.474 176 107.667C176 104.745 176.501 101.94 177.423 99.3333" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="201" cy="91" rx="25" ry="25" stroke="#00AE99" stroke-width="3"/>
-<path d="M193.5 101V102.5H195H207H208.5V101V97.2266V95.7266H207H204.551V80V78.5H203.051H199.253H198.762L198.366 78.7901L194.113 81.9073L193.5 82.3568V83.1172V87.6563V90.6153L195.887 88.8661L197.753 87.4982V95.7266H195H193.5V97.2266V101Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 216.667C149.499 219.273 150 222.078 150 225C150 233.805 145.449 241.546 138.57 246M101.423 216.667C100.501 219.273 100 222.078 100 225C100 233.805 104.551 241.546 111.43 246" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 234.667C149.499 237.273 150 240.078 150 243C150 243.335 149.993 243.668 149.98 244M101.423 234.667C100.501 237.273 100 240.078 100 243C100 243.335 100.007 243.668 100.02 244" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 200C149.499 202.606 150 205.411 150 208.333C150 222.14 138.807 233.333 125 233.333C111.193 233.333 100 222.14 100 208.333C100 205.411 100.501 202.606 101.423 200" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 183.333C149.499 185.94 150 188.745 150 191.667C150 205.474 138.807 216.667 125 216.667C111.193 216.667 100 205.474 100 191.667C100 188.745 100.501 185.94 101.423 183.333" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 166.667C149.499 169.273 150 172.078 150 175C150 188.807 138.807 200 125 200C111.193 200 100 188.807 100 175C100 172.078 100.501 169.273 101.423 166.667" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 150C149.499 152.606 150 155.411 150 158.333C150 172.14 138.807 183.333 125 183.333C111.193 183.333 100 172.14 100 158.333C100 155.411 100.501 152.606 101.423 150" stroke="#00AE99" stroke-width="3"/>
-<path d="M148.577 133.333C149.499 135.94 150 138.745 150 141.667C150 155.474 138.807 166.667 125 166.667C111.193 166.667 100 155.474 100 141.667C100 138.745 100.501 135.94 101.423 133.333" stroke="#00AE99" stroke-width="3"/>
-<circle cx="125" cy="125" r="25" stroke="#00AE99" stroke-width="3"/>
-<path d="M117.5 135V136.5H119H131H132.5V135V131.227V129.727H131H128.551V114V112.5H127.051H123.253H122.762L122.366 112.79L118.113 115.907L117.5 116.357V117.117V121.656V124.615L119.887 122.866L121.753 121.498V129.727H119H117.5V131.227V135Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M71.5775 216.333C72.4987 218.94 73 221.745 73 224.667C73 227.966 72.3608 231.116 71.1996 234" stroke="#00AE99" stroke-width="3"/>
-<path d="M71.5774 199.667C72.4987 202.273 73 205.078 73 208C73 216.834 68.4176 224.599 61.5 229.045" stroke="#00AE99" stroke-width="3"/>
-<path d="M23 191.333C23 188.411 23.5013 185.606 24.4225 183M71.5774 183C72.4987 185.606 73 188.411 73 191.333C73 205.14 61.8071 216.333 48 216.333C46.8122 216.333 45.6437 216.25 44.5 216.09" stroke="#00AE99" stroke-width="3"/>
-<path d="M71.5774 166.333C72.4987 168.94 73 171.745 73 174.667C73 188.474 61.8071 199.667 48 199.667C34.1929 199.667 23 188.474 23 174.667C23 171.745 23.5013 168.94 24.4225 166.333" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="48" cy="158" rx="25" ry="25" stroke="#00AE99" stroke-width="3"/>
-<path d="M40.5 168V169.5H42H54H55.5V168V164.227V162.727H54H51.5506V147V145.5H50.0506H46.2532H45.7623L45.3665 145.79L41.1133 148.907L40.5 149.357V150.117V154.656V157.615L42.8867 155.866L44.7532 154.498V162.727H42H40.5V164.227V168Z" stroke="#00AE99" stroke-width="3"/>
-<circle cx="125" cy="125" r="121.667" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/getInTouch.svg b/packages/website/ts/icons/illustrations/getInTouch.svg
deleted file mode 100755
index f44365351..000000000
--- a/packages/website/ts/icons/illustrations/getInTouch.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3"/>
-<path d="M113 75C113 85.3064 108.897 94.6546 102.235 101.5C98.4048 105.436 71 132.5 71 132.5V112.792C51.8933 110.793 37 94.6359 37 75C37 54.0132 54.0132 37 75 37C95.9868 37 113 54.0132 113 75Z" stroke="#00AE99" stroke-width="3"/>
-<circle cx="75" cy="75" r="4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="91" cy="75" r="4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="59" cy="75" r="4" stroke="#00AE99" stroke-width="3"/>
-<path d="M76 37H137.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M37 73.5L37 12M113 137.5L113 75" stroke="#00AE99" stroke-width="3"/>
-<path d="M13 113H71.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M49.087 47.5264L92.574 4.03932" stroke="#00AE99" stroke-width="3"/>
-<path d="M47.3192 100.913L3.8321 57.4259M146.314 92.4277L102.12 48.2335" stroke="#00AE99" stroke-width="3"/>
-<path d="M58.2793 145.814L101.766 102.327" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/getStarted.svg b/packages/website/ts/icons/illustrations/getStarted.svg
deleted file mode 100644
index 627e1810b..000000000
--- a/packages/website/ts/icons/illustrations/getStarted.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g>
-<circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3"/>
-<circle cx="75" cy="75" r="58" stroke="#00AE99" stroke-width="3"/>
-<path d="M62.9792 62.9792L36.6447 113.355L87.0208 87.0208M62.9792 62.9792L113.355 36.6447L87.0208 87.0208M62.9792 62.9792L87.0208 87.0208" stroke="#00AE99" stroke-width="3"/>
-<path d="M75 2V17M75 133V148" stroke="#00AE99" stroke-width="3"/>
-<path d="M2 75L17 75M133 75L148 75" stroke="#00AE99" stroke-width="3"/>
-<path d="M11.7801 38.5L24.7705 46M125.229 104L138.22 111.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M38.5001 11.7801L46.0001 24.7705M104 125.229L111.5 138.22" stroke="#00AE99" stroke-width="3"/>
-<path d="M111.5 11.7801L104 24.7705M46 125.229L38.5 138.22" stroke="#00AE99" stroke-width="3"/>
-<path d="M138.22 38.5L125.229 46M24.7705 104L11.7801 111.5" stroke="#00AE99" stroke-width="3"/>
-</g>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/launchKit.svg b/packages/website/ts/icons/illustrations/launchKit.svg
deleted file mode 100644
index fa11584af..000000000
--- a/packages/website/ts/icons/illustrations/launchKit.svg
+++ /dev/null
@@ -1,18 +0,0 @@
-<svg width="404" height="404" viewBox="0 0 404 404" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="202" cy="202" r="200" stroke="#00AE99" stroke-width="3"/>
-<rect x="61" y="251" width="39" height="92" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="100" y="251" width="39" height="92" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="139" y="251" width="39" height="92" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="61" y="251" width="39" height="39" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="100" y="251" width="39" height="39" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="139" y="304" width="39" height="39" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="178" y="304" width="39" height="39" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<rect x="178" y="251" width="39" height="92" rx="19.5" stroke="#00AE99" stroke-width="3"/>
-<circle cx="100" cy="212" r="39" stroke="#00AE99" stroke-width="3"/>
-<circle cx="178" cy="212" r="39" stroke="#00AE99" stroke-width="3"/>
-<rect x="61" y="79" width="156" height="94" stroke="#00AE99" stroke-width="3"/>
-<rect width="39" height="18" transform="matrix(1 0 0 -1 84 79)" stroke="#00AE99" stroke-width="3"/>
-<rect width="39" height="18" transform="matrix(1 0 0 -1 155 79)" stroke="#00AE99" stroke-width="3"/>
-<path d="M217 94V61H250M217 94L250 61M217 94H250V61M217 94V241.125M250 61H333M333 61H343V251H217V241.125M333 61V241.125H217" stroke="#00AE99" stroke-width="3"/>
-<path d="M275.825 252L218 343H341L275.825 252Z" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/launchKit_versionB.svg b/packages/website/ts/icons/illustrations/launchKit_versionB.svg
deleted file mode 100755
index 45f9ecc75..000000000
--- a/packages/website/ts/icons/illustrations/launchKit_versionB.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="404" height="404" viewBox="0 0 404 404" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="202" cy="202" r="200" stroke="#00AE99" stroke-width="3"/>
-<path d="M111.093 201.667L201.622 292.195M111.093 201.667L24.7433 115.316L115.098 24.6137L188.958 98.4738M111.093 201.667L24.7432 288.017L114.053 379.764L201.622 292.195M111.093 201.667L167.107 145.653M292.151 201.667L201.622 292.195M292.151 201.667L379.546 289.062L289.191 379.764L201.622 292.195M292.151 201.667L380.59 113.227L290.236 22.5243L214.983 97.7774M292.151 201.667L236.137 145.653M201.622 292.195L201.622 400.137M201.622 400.137L254.81 346.95M201.622 400.137L148.435 346.95" stroke="#00AE99" stroke-width="3"/>
-<path d="M202 85L262 145H142L202 85Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M202 146L262 205H142L202 146Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M245 249L202 206L159 249" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/legalResources.svg b/packages/website/ts/icons/illustrations/legalResources.svg
deleted file mode 100755
index a8ba7fceb..000000000
--- a/packages/website/ts/icons/illustrations/legalResources.svg
+++ /dev/null
@@ -1,4 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2.00001 45C2.00001 68.7578 21.2421 88 45 88C68.7579 88 88 68.7578 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2.00001 21.2709 2.00001 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M45 76V11M45 76H15H75H45ZM45 11H24M45 11H66M24 11L4 47M24 11L44 47M66 11L46 47M66 11L86 47M4 47H44M4 47C4 47 4 65 24 65C44 65 44 47 44 47M46 47H86M46 47C46 47 46 65 66 65C85.25 65 86 47 86 47" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/logo-mark.svg b/packages/website/ts/icons/illustrations/logo-mark.svg
deleted file mode 100644
index 4e9c9d2cb..000000000
--- a/packages/website/ts/icons/illustrations/logo-mark.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="30" height="30" viewBox="0 0 30 30" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M6.30134 18.9605L8.63004 16.5511L5.73498 12.6444L2.04888 7.4287C0.746637 9.65112 0 12.2381 0 15C0 19.5753 2.04888 23.6718 5.28027 26.4229L9.95919 23.1161C8.36771 22.1247 7.08565 20.6812 6.30134 18.9605Z" fill="white"/>
-<path d="M11.0395 6.30134L13.4489 8.63004L17.3556 5.73498L22.5713 2.04888C20.3489 0.746637 17.7619 0 15 0C10.4247 0 6.32825 2.04888 3.57713 5.28027L6.88386 9.95919C7.87534 8.36771 9.31883 7.08565 11.0395 6.30134Z" fill="white"/>
-<path d="M21.37 13.4489L24.265 17.3556L27.9511 22.5713C29.2534 20.3489 30 17.7619 30 15C30 10.4247 27.9511 6.32825 24.7197 3.57713L20.0408 6.88386C21.6323 7.87534 22.9144 9.31883 23.6987 11.0395L21.37 13.4489Z" fill="white"/>
-<path d="M26.4229 24.7197L23.1161 20.0408C22.1247 21.6323 20.6812 22.9144 18.9605 23.6987L16.5511 21.37L12.6444 24.265L7.4287 27.9511C9.65112 29.2534 12.2381 30 15 30C19.5753 30 23.6718 27.9511 26.4229 24.7197Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/logo-outlined.svg b/packages/website/ts/icons/illustrations/logo-outlined.svg
deleted file mode 100644
index a09d2355f..000000000
--- a/packages/website/ts/icons/illustrations/logo-outlined.svg
+++ /dev/null
@@ -1,14 +0,0 @@
-<svg width="400" height="406" viewBox="0 0 400 406" fill="none" xmlns="http://www.w3.org/2000/svg">
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="400" height="406">
-<ellipse cx="200" cy="202.967" rx="200" ry="202.744" fill="#C4C4C4"/>
-</mask>
-<g mask="url(#mask0)">
-<path d="M162.629 260.116L161.587 258.71L159.447 260.297L161.753 261.631L162.629 260.116ZM193.062 269.329L192.945 271.075L192.953 271.076L193.062 269.329ZM234.92 258.634L235.854 260.113L235.86 260.109L234.92 258.634ZM250.83 244.761L252.163 245.895L253.051 244.85L252.25 243.738L250.83 244.761ZM238.764 228.665L240.146 227.592L240.141 227.585L240.135 227.578L238.764 228.665ZM235.24 224.217L236.612 223.13L235.079 221.196L233.761 223.282L235.24 224.217ZM216.446 240.631L215.231 241.89L216.098 242.727L217.189 242.216L216.446 240.631ZM204.487 229.088L205.702 227.829L204.636 226.8L203.445 227.682L204.487 229.088ZM137.215 166.291L138.602 165.224L137.006 163.149L135.699 165.418L137.215 166.291ZM128.139 196.154L126.393 196.035L126.392 196.044L128.139 196.154ZM138.924 237.666L137.455 238.618H137.455L138.924 237.666ZM152.912 253.445L151.79 254.787L152.824 255.652L153.924 254.873L152.912 253.445ZM169.143 241.478L170.204 242.87L170.211 242.864L170.218 242.859L169.143 241.478ZM173.628 237.984L174.703 239.364L176.66 237.839L174.567 236.507L173.628 237.984ZM157.077 219.24L155.833 218.008L154.968 218.882L155.497 219.992L157.077 219.24ZM168.822 207.379L170.066 208.611L171.142 207.524L170.209 206.312L168.822 207.379ZM232.57 140.982L233.582 142.41L235.808 140.833L233.447 139.467L232.57 140.982ZM202.138 131.769L202.018 133.515L202.021 133.515L202.138 131.769ZM160.173 142.464L161.114 143.94L161.117 143.938L160.173 142.464ZM144.263 156.337L142.93 155.203L142.042 156.248L142.843 157.36L144.263 156.337ZM156.329 172.433L154.946 173.506L154.952 173.513L154.957 173.52L156.329 172.433ZM159.853 176.881L158.481 177.968L159.996 179.88L161.322 177.832L159.853 176.881ZM178.753 160.467L179.961 159.201L179.1 158.379L178.019 158.878L178.753 160.467ZM189.965 171.163L188.757 172.429L189.8 173.424L190.976 172.591L189.965 171.163ZM258.091 234.489L256.699 235.55L258.301 237.651L259.611 235.357L258.091 234.489ZM267.06 204.944L268.806 205.065L268.807 205.054L267.06 204.944ZM256.276 163.432L257.748 162.486L257.744 162.48L256.276 163.432ZM242.287 147.653L243.41 146.311L242.376 145.446L241.276 146.225L242.287 147.653ZM226.057 159.62L224.995 158.228L224.988 158.234L224.981 158.239L226.057 159.62ZM221.572 163.114L220.496 161.734L218.526 163.27L220.642 164.597L221.572 163.114ZM238.23 181.858L236.65 182.61L236.658 182.628L236.667 182.646L238.23 181.858ZM238.336 182.07L239.592 183.289L240.46 182.395L239.899 181.282L238.336 182.07ZM227.018 193.719L225.763 192.499L224.712 193.58L225.626 194.779L227.018 193.719ZM161.753 261.631C170.951 266.952 181.568 270.316 192.945 271.075L193.178 267.583C182.345 266.86 172.246 263.658 163.505 258.601L161.753 261.631ZM192.953 271.076C208.709 272.053 223.488 267.928 235.854 260.113L233.985 257.154C222.219 264.589 208.167 268.512 193.17 267.583L192.953 271.076ZM235.86 260.109C241.988 256.203 247.459 251.428 252.163 245.895L249.497 243.628C245.018 248.896 239.811 253.44 233.979 257.158L235.86 260.109ZM252.25 243.738C248.498 238.53 244.428 233.112 240.146 227.592L237.381 229.737C241.642 235.231 245.687 240.615 249.41 245.784L252.25 243.738ZM240.135 227.578C239.548 226.837 238.961 226.095 238.373 225.354C237.786 224.613 237.199 223.872 236.612 223.13L233.868 225.304C234.455 226.045 235.043 226.786 235.63 227.528C236.217 228.269 236.805 229.01 237.392 229.751L240.135 227.578ZM233.761 223.282C229.462 230.082 223.103 235.581 215.704 239.046L217.189 242.216C225.166 238.48 232.048 232.542 236.719 225.152L233.761 223.282ZM217.662 239.372L205.702 227.829L203.272 230.347L215.231 241.89L217.662 239.372ZM203.445 227.682L161.587 258.71L163.671 261.522L205.529 230.494L203.445 227.682ZM135.699 165.418C130.444 174.538 127.159 184.855 126.393 196.035L129.885 196.274C130.614 185.639 133.736 175.836 138.732 167.165L135.699 165.418ZM126.392 196.044C125.407 211.676 129.568 226.449 137.455 238.618L140.392 236.714C132.904 225.162 128.949 211.131 129.886 196.264L126.392 196.044ZM137.455 238.618C141.395 244.696 146.211 250.122 151.79 254.787L154.035 252.102C148.722 247.66 144.14 242.496 140.392 236.714L137.455 238.618ZM153.924 254.873C159.176 251.152 164.638 247.116 170.204 242.87L168.081 240.087C162.542 244.313 157.113 248.324 151.901 252.017L153.924 254.873ZM170.218 242.859C171.713 241.694 173.208 240.529 174.703 239.364L172.552 236.603C171.057 237.768 169.562 238.933 168.067 240.098L170.218 242.859ZM174.567 236.507C167.693 232.132 162.147 225.819 158.657 218.488L155.497 219.992C159.267 227.91 165.253 234.728 172.688 239.46L174.567 236.507ZM158.32 220.471L170.066 208.611L167.579 206.148L155.833 218.008L158.32 220.471ZM170.209 206.312L138.602 165.224L135.828 167.358L167.435 208.446L170.209 206.312ZM233.447 139.467C224.248 134.146 213.631 130.782 202.254 130.023L202.021 133.515C212.855 134.238 222.953 137.44 231.694 142.497L233.447 139.467ZM202.258 130.023C186.496 128.937 171.602 133.064 159.229 140.991L161.117 143.938C172.876 136.404 187.027 132.482 202.018 133.515L202.258 130.023ZM159.232 140.989C153.105 144.895 147.634 149.67 142.93 155.203L145.596 157.47C150.075 152.202 155.282 147.658 161.114 143.94L159.232 140.989ZM142.843 157.36C146.594 162.568 150.665 167.986 154.946 173.506L157.712 171.361C153.451 165.867 149.406 160.483 145.683 155.314L142.843 157.36ZM154.957 173.52C155.545 174.261 156.132 175.003 156.719 175.744C157.307 176.485 157.894 177.226 158.481 177.968L161.225 175.794C160.637 175.053 160.05 174.312 159.463 173.57C158.875 172.829 158.288 172.088 157.701 171.347L154.957 173.52ZM161.322 177.832C165.736 171.011 171.997 165.515 179.487 162.056L178.019 158.878C169.919 162.619 163.152 168.561 158.384 175.93L161.322 177.832ZM177.545 161.733L188.757 172.429L191.173 169.896L179.961 159.201L177.545 161.733ZM190.976 172.591L233.582 142.41L231.559 139.554L188.953 169.735L190.976 172.591ZM259.611 235.357C264.754 226.349 268.04 216.141 268.806 205.065L265.315 204.823C264.586 215.35 261.465 225.05 256.571 233.621L259.611 235.357ZM268.807 205.054C269.792 189.418 265.63 174.754 257.748 162.486L254.803 164.378C262.298 176.043 266.251 189.971 265.314 204.834L268.807 205.054ZM257.744 162.48C253.804 156.402 248.989 150.976 243.41 146.311L241.165 148.996C246.478 153.438 251.059 158.602 254.807 164.384L257.744 162.48ZM241.276 146.225C236.024 149.946 230.561 153.982 224.995 158.228L227.118 161.011C232.657 156.785 238.086 152.774 243.299 149.081L241.276 146.225ZM224.981 158.239C224.234 158.822 223.486 159.404 222.739 159.987C221.991 160.569 221.244 161.151 220.496 161.734L222.648 164.495C223.395 163.912 224.143 163.33 224.89 162.747C225.637 162.165 226.385 161.583 227.132 161L224.981 158.239ZM220.642 164.597C227.616 168.971 233.159 175.281 236.65 182.61L239.81 181.106C236.039 173.186 230.05 166.365 222.502 161.632L220.642 164.597ZM236.667 182.646L236.774 182.858L239.899 181.282L239.792 181.07L236.667 182.646ZM237.081 180.85L225.763 192.499L228.273 194.938L239.592 183.289L237.081 180.85ZM225.626 194.779L256.699 235.55L259.483 233.428L228.41 192.658L225.626 194.779Z" fill="#00AE99"/>
-<ellipse cx="60.0003" cy="200.535" rx="68" ry="68.9328" stroke="#00AE99" stroke-width="3.5"/>
-<ellipse cx="201.6" cy="61.8583" rx="68.8" ry="69.7438" stroke="#00AE99" stroke-width="3.5"/>
-<rect x="267.2" y="133.224" width="137.6" height="137.866" stroke="#00AE99" stroke-width="3.5"/>
-<rect width="99.6242" height="99.6242" transform="matrix(0.702274 -0.711907 0.702274 0.711907 271.273 342.124)" stroke="#00AE99" stroke-width="3.5"/>
-<path d="M267.2 340.833C267.2 301.418 235.248 269.467 195.834 269.467H-11.2003V412.198H195.834C235.248 412.198 267.2 380.247 267.2 340.833V340.833Z" stroke="#00AE99" stroke-width="3.5"/>
-</g>
-<path d="M398.25 202.967C398.25 313.996 309.468 403.961 200 403.961C90.532 403.961 1.75 313.996 1.75 202.967C1.75 91.939 90.532 1.97368 200 1.97368C309.468 1.97368 398.25 91.939 398.25 202.967Z" stroke="#00AE99" stroke-width="3.5"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/long-term-impact.svg b/packages/website/ts/icons/illustrations/long-term-impact.svg
deleted file mode 100644
index dbd051598..000000000
--- a/packages/website/ts/icons/illustrations/long-term-impact.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="104" height="104" viewBox="0 0 104 104" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M52 102C79.6142 102 102 79.6142 102 52C102 24.3858 79.6142 2 52 2C24.3858 2 2 24.3858 2 52C2 79.6142 24.3858 102 52 102Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M51.8639 91.7959C73.9553 91.7959 91.8639 73.8873 91.8639 51.7959C91.8639 29.7045 73.9553 11.7959 51.8639 11.7959C29.7726 11.7959 11.864 29.7045 11.864 51.7959C11.864 73.8873 29.7726 91.7959 51.8639 91.7959Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M51.8636 91.7959C65.0741 91.7959 75.7833 73.8873 75.7833 51.7959C75.7833 29.7045 65.0741 11.7959 51.8636 11.7959C38.6531 11.7959 27.9438 29.7045 27.9438 51.7959C27.9438 73.8873 38.6531 91.7959 51.8636 91.7959Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M51.864 11.7959V91.7959" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M91.8639 51.796H11.864" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M86.6201 71.7827H17.1084" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M86.6201 31.7823H17.1084" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-</svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/low-cost.svg b/packages/website/ts/icons/illustrations/low-cost.svg
deleted file mode 100644
index 530cbdd79..000000000
--- a/packages/website/ts/icons/illustrations/low-cost.svg
+++ /dev/null
@@ -1,30 +0,0 @@
-<svg width="82" height="82" viewBox="0 0 82 82" fill="none" xmlns="http://www.w3.org/2000/svg">
-<mask id="mask0" mask-type="alpha" maskUnits="userSpaceOnUse" x="0" y="0" width="82" height="82">
-<path d="M41 79.9333C62.5023 79.9333 79.9333 62.5023 79.9333 41C79.9333 19.4977 62.5023 2.06665 41 2.06665C19.4977 2.06665 2.06665 19.4977 2.06665 41C2.06665 62.5023 19.4977 79.9333 41 79.9333Z" fill="#00AE99" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</mask>
-<g mask="url(#mask0)">
-<ellipse cx="41" cy="76" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="41" cy="71" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="41" cy="66" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="41" cy="61" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="41" cy="56" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="41" cy="50" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="41" cy="44" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="18" cy="89" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="18" cy="84" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="18" cy="79" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="18" cy="74" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="18" cy="69" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="18" cy="63" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="18" cy="57" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="70" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="64" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="59" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="54" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="49" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="64" cy="44" rx="8" ry="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="64" cy="38" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="64" cy="32" r="8" fill="#F3F6F4" stroke="#00AE99" stroke-width="3"/>
-<circle cx="41" cy="41" r="38.9333" stroke="#00AE99" stroke-width="3"/>
-</g>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/marketingDesignHelp.svg b/packages/website/ts/icons/illustrations/marketingDesignHelp.svg
deleted file mode 100755
index 1e65bd54f..000000000
--- a/packages/website/ts/icons/illustrations/marketingDesignHelp.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M45 88C68.7482 88 88 68.7482 88 45C88 21.2518 68.7482 2 45 2C21.2518 2 2 21.2518 2 45C2 68.7482 21.2518 88 45 88Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M70.2962 31.8956L57.4583 19.3541L44.833 32.1066L57.6708 44.6481L70.2962 31.8956Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M74.8267 14.5717L57.4829 19.3431L70.311 31.8859L74.8267 14.5717Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M32.184 19.5506L19.5587 32.3031L32.3965 44.8446L45.0218 32.092L32.184 19.5506Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M14.7418 15.0572L19.5451 32.2858L32.1719 19.5429L14.7418 15.0572Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M19.698 57.5441L32.5358 70.0856L45.1612 57.3331L32.3234 44.7916L19.698 57.5441Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M15.1732 74.8574L32.517 70.086L19.6889 57.5432L15.1732 74.8574Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M57.8243 69.8803L70.4497 57.1277L57.6119 44.5863L44.9865 57.3388L57.8243 69.8803Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-<path d="M75.2581 74.3715L70.4548 57.1429L57.828 69.8857L75.2581 74.3715Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="bevel"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/milestoneGrants.svg b/packages/website/ts/icons/illustrations/milestoneGrants.svg
deleted file mode 100755
index 2c581864f..000000000
--- a/packages/website/ts/icons/illustrations/milestoneGrants.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7578 21.2421 88 45 88C68.7579 88 88 68.7578 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M86.5 55.5L45 14L3.5 55.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M45 14C41.1667 18.8333 35.8 30.8 45 40C56.5 51.5 52 59.5 45 67C38.5223 73.9404 40.1798 83.4498 44.0292 88" stroke="#00AE99" stroke-width="3"/>
-<path d="M78 73L45 40L12 73" stroke="#00AE99" stroke-width="3"/>
-<path d="M62.5 84.5L45 67L27.5 84.5" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/networkedLiquidity-small.svg b/packages/website/ts/icons/illustrations/networkedLiquidity-small.svg
deleted file mode 100755
index 4b65a5353..000000000
--- a/packages/website/ts/icons/illustrations/networkedLiquidity-small.svg
+++ /dev/null
@@ -1,20 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M39 8.48029C33.2192 9.42014 27.8875 11.702 23.335 14.9961M50.9349 8.48029C56.7423 9.41185 62.0964 11.6963 66.6651 15M75 23.3344C78.2924 27.8864 80.574 33.2182 81.5163 39M81.5163 51.0017C80.574 56.7845 78.2925 62.1161 75 66.6678M66.6651 75.002C62.0964 78.306 56.7423 80.5917 50.9349 81.5271M39 81.5165C33.2177 80.5746 27.8865 78.2936 23.335 75.002M15 66.6678C11.7076 62.1161 9.42602 56.7845 8.48376 51.0017M8.48376 39.0004C9.42608 33.2186 11.7078 27.8868 14.9996 23.3344" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M42.163 47.837C40.6123 46.2863 40.6123 43.7489 42.163 42.163C43.7137 40.6123 46.2511 40.6123 47.837 42.163C49.3877 43.7137 49.3877 46.2511 47.837 47.837C46.2511 49.3877 43.7137 49.3877 42.163 47.837Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M42.163 30.837C40.6123 29.2863 40.6123 26.7489 42.163 25.163C43.7137 23.6123 46.2511 23.6123 47.837 25.163C49.3877 26.7137 49.3877 29.2511 47.837 30.837C46.2511 32.3877 43.7137 32.3877 42.163 30.837Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M42.163 64.837C40.6123 63.2863 40.6123 60.7489 42.163 59.163C43.7137 57.6123 46.2511 57.6123 47.837 59.163C49.3877 60.7137 49.3877 63.2511 47.837 64.837C46.2511 66.3877 43.7137 66.3877 42.163 64.837Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40.7445 12.2555C38.4185 9.92952 38.4185 6.12335 40.7445 3.74449C43.0705 1.4185 46.8766 1.4185 49.2555 3.74449C51.5815 6.07048 51.5815 9.87665 49.2555 12.2555C46.8766 14.5815 43.0705 14.5815 40.7445 12.2555Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40.7445 86.2555C38.4185 83.9295 38.4185 80.1233 40.7445 77.7445C43.0705 75.4185 46.8766 75.4185 49.2555 77.7445C51.5815 80.0705 51.5815 83.8767 49.2555 86.2555C46.8766 88.5815 43.0705 88.5815 40.7445 86.2555Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M30.837 47.837C29.2863 49.3877 26.7489 49.3877 25.163 47.837C23.6123 46.2863 23.6123 43.7489 25.163 42.163C26.7137 40.6123 29.2511 40.6123 30.837 42.163C32.3877 43.7489 32.3877 46.2863 30.837 47.837Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M64.837 47.837C63.2863 49.3877 60.7489 49.3877 59.163 47.837C57.6123 46.2863 57.6123 43.7489 59.163 42.163C60.7137 40.6123 63.2511 40.6123 64.837 42.163C66.3877 43.7489 66.3877 46.2863 64.837 47.837Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M12.2555 49.2555C9.92952 51.5815 6.12335 51.5815 3.74449 49.2555C1.4185 46.9295 1.4185 43.1234 3.74449 40.7445C6.07048 38.4185 9.87665 38.4185 12.2555 40.7445C14.5815 43.1233 14.5815 46.9295 12.2555 49.2555Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M86.2555 49.2555C83.9295 51.5815 80.1233 51.5815 77.7445 49.2555C75.4185 46.9295 75.4185 43.1234 77.7445 40.7445C80.0705 38.4185 83.8767 38.4185 86.2555 40.7445C88.5815 43.1233 88.5815 46.9295 86.2555 49.2555Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M32.9792 36.9913C30.7863 36.9913 28.992 35.1971 28.9671 32.9792C28.9671 30.7862 30.7614 28.992 32.9792 28.9671C35.1722 28.9671 36.9665 30.7613 36.9914 32.9792C36.9665 35.1971 35.1722 36.9913 32.9792 36.9913Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M57.0209 61.0329C54.8279 61.0329 53.0337 59.2387 53.0087 57.0208C53.0087 54.8278 54.803 53.0336 57.0209 53.0087C59.2138 53.0087 61.0081 54.8029 61.033 57.0208C61.0081 59.2387 59.2138 61.0329 57.0209 61.0329Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M18.8371 24.8552C15.5476 24.8552 12.8563 22.1639 12.8189 18.837C12.8189 15.5476 15.5103 12.8562 18.8371 12.8188C22.1265 12.8188 24.8179 15.5102 24.8553 18.837C24.8179 22.1639 22.1265 24.8552 18.8371 24.8552Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.163 77.1812C67.8736 77.1812 65.1822 74.4898 65.1448 71.163C65.1448 67.8735 67.8362 65.1822 71.163 65.1448C74.4525 65.1448 77.1438 67.8361 77.1812 71.163C77.1438 74.4898 74.4525 77.1812 71.163 77.1812Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M36.9913 57.0209C36.9913 59.2138 35.197 61.0081 32.9791 61.033C30.7862 61.033 28.9919 59.2388 28.967 57.0209C28.967 54.8279 30.7612 53.0337 32.9791 53.0088C35.197 53.0337 36.9913 54.8279 36.9913 57.0209Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M61.0329 32.9793C61.0329 35.1722 59.2386 36.9665 57.0208 36.9914C54.8278 36.9914 53.0335 35.1971 53.0086 32.9793C53.0086 30.7863 54.8029 28.992 57.0208 28.9671C59.2386 28.992 61.0329 30.7863 61.0329 32.9793Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M24.8552 71.163C24.8552 74.4525 22.1639 77.1438 18.837 77.1812C15.5476 77.1812 12.8562 74.4899 12.8188 71.163C12.8188 67.8736 15.5102 65.1822 18.837 65.1448C22.1639 65.1822 24.8552 67.8736 24.8552 71.163Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M77.1812 18.8371C77.1812 22.1266 74.4898 24.8179 71.163 24.8553C67.8735 24.8553 65.1822 22.1639 65.1448 18.8371C65.1448 15.5477 67.8361 12.8563 71.163 12.8189C74.4898 12.8563 77.1812 15.5477 77.1812 18.8371Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/networkedLiquidity.svg b/packages/website/ts/icons/illustrations/networkedLiquidity.svg
deleted file mode 100755
index c50ba7e7c..000000000
--- a/packages/website/ts/icons/illustrations/networkedLiquidity.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-<svg width="151" height="150" viewBox="0 0 151 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M138.211 65C136.62 55.0255 132.688 45.8318 126.996 38M138.211 85C136.62 94.9746 132.688 104.168 126.996 112M112.994 126C105.164 131.69 95.972 135.62 86 137.211M66 137.211C56.0279 135.62 46.8364 131.69 39.0059 126M25.0043 112C19.3121 104.168 15.3801 94.9746 13.7892 85M13.7892 65C15.3801 55.0255 19.3121 45.8318 25.0043 38M39.0059 24C46.8364 18.3101 56.0279 14.3797 66 12.7893M86 12.7893C95.9721 14.3797 105.164 18.3101 112.994 24" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M75.9998 21.882C81.4901 21.882 85.9408 17.4313 85.9408 11.941C85.9408 6.45074 81.4901 2 75.9998 2C70.5096 2 66.0588 6.45074 66.0588 11.941C66.0588 17.4313 70.5096 21.882 75.9998 21.882Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M75.9998 148C81.4901 148 85.9408 143.549 85.9408 138.059C85.9408 132.569 81.4901 128.118 75.9998 128.118C70.5096 128.118 66.0588 132.569 66.0588 138.059C66.0588 143.549 70.5096 148 75.9998 148Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M129.118 75.0001C129.118 80.4903 133.569 84.9411 139.059 84.9411C144.549 84.9411 149 80.4903 149 75.0001C149 69.5098 144.549 65.0591 139.059 65.0591C133.569 65.0591 129.118 69.5098 129.118 75.0001Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M2.99982 75.0001C2.99982 80.4903 7.45056 84.9411 12.9408 84.9411C18.4311 84.9411 22.8818 80.4903 22.8818 75.0001C22.8818 69.5098 18.4311 65.0591 12.9408 65.0591C7.45056 65.0591 2.99982 69.5098 2.99982 75.0001Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M113.56 37.4399C117.442 41.3221 123.737 41.3221 127.619 37.4399C131.501 33.5577 131.501 27.2634 127.619 23.3812C123.737 19.499 117.442 19.499 113.56 23.3812C109.678 27.2634 109.678 33.5577 113.56 37.4399Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M24.381 126.619C28.2632 130.501 34.5575 130.501 38.4397 126.619C42.322 122.737 42.322 116.442 38.4398 112.56C34.5576 108.678 28.2632 108.678 24.381 112.56C20.4988 116.442 20.4988 122.737 24.381 126.619Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M38.4397 37.4399C42.3219 33.5577 42.3219 27.2634 38.4397 23.3812C34.5575 19.499 28.2632 19.499 24.381 23.3812C20.4988 27.2634 20.4988 33.5577 24.381 37.4399C28.2632 41.3221 34.5575 41.3221 38.4397 37.4399Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M127.619 126.619C131.501 122.737 131.501 116.442 127.619 112.56C123.736 108.678 117.442 108.678 113.56 112.56C109.678 116.442 109.678 122.737 113.56 126.619C117.442 130.501 123.737 130.501 127.619 126.619Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.8365 79.1636C69.5464 76.8735 69.5464 73.1261 71.8365 70.784C74.1265 68.4939 77.8739 68.4939 80.216 70.784C82.5061 73.074 82.5061 76.8214 80.216 79.1636C77.8739 81.4537 74.1265 81.4537 71.8365 79.1636Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M51.7456 79.1636C49.4556 76.8735 49.4556 73.1261 51.7456 70.784C54.0357 68.4939 57.7831 68.4939 60.1252 70.784C62.4153 73.074 62.4153 76.8214 60.1252 79.1636C57.7831 81.4537 54.0878 81.4537 51.7456 79.1636Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M31.7071 79.1636C29.417 76.8735 29.417 73.1261 31.7071 70.784C33.9971 68.4939 37.7445 68.4939 40.0867 70.784C42.3767 73.074 42.3767 76.8214 40.0867 79.1636C37.7445 81.4537 33.9971 81.4537 31.7071 79.1636Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M91.8748 79.1636C89.5847 76.8736 89.5847 73.1262 91.8748 70.784C94.1649 68.4939 97.9123 68.4939 100.254 70.784C102.544 73.0741 102.544 76.8215 100.254 79.1636C97.9123 81.4537 94.1649 81.4537 91.8748 79.1636Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M111.912 79.1636C109.622 76.8736 109.622 73.1262 111.912 70.784C114.202 68.4939 117.95 68.4939 120.292 70.784C122.582 73.0741 122.582 76.8215 120.292 79.1636C117.95 81.4537 114.202 81.4537 111.912 79.1636Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M55.9113 60.7908C55.9113 57.5118 58.5657 54.9094 61.7926 54.9094C65.0716 54.9094 67.6739 57.5638 67.6739 60.7908C67.6739 64.0697 65.0195 66.6721 61.7926 66.6721C58.5657 66.7241 55.9113 64.0697 55.9113 60.7908Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M41.7526 46.6344C41.7526 43.3554 44.407 40.7531 47.6339 40.7531C50.9129 40.7531 53.5152 43.4075 53.5152 46.6344C53.5152 49.9134 50.8608 52.5157 47.6339 52.5157C44.3549 52.5157 41.7526 49.9134 41.7526 46.6344Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M84.2758 89.1566C84.2758 85.8776 86.9302 83.2753 90.1571 83.2753C93.4361 83.2753 96.0384 85.9297 96.0384 89.1566C96.0384 92.4356 93.384 95.0379 90.1571 95.0379C86.8781 95.09 84.2758 92.4356 84.2758 89.1566Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M98.4327 103.365C98.4327 100.086 101.087 97.4841 104.314 97.4841C107.593 97.4841 110.195 100.139 110.195 103.365C110.195 106.644 107.541 109.247 104.314 109.247C101.087 109.247 98.4327 106.592 98.4327 103.365Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M90.1579 54.9094C93.4369 54.9094 96.0392 57.5638 96.0392 60.7907C96.0392 64.0697 93.3848 66.672 90.1579 66.672C86.8789 66.672 84.2766 64.0176 84.2766 60.7907C84.2766 57.5638 86.8789 54.9094 90.1579 54.9094Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M104.366 40.7531C107.645 40.7531 110.248 43.4075 110.248 46.6344C110.248 49.9134 107.593 52.5157 104.366 52.5157C101.087 52.5157 98.4851 49.8613 98.4851 46.6344C98.4331 43.3554 101.087 40.7531 104.366 40.7531Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M61.7933 83.2753C65.0722 83.2753 67.6746 85.9297 67.6746 89.1566C67.6746 92.4356 65.0202 95.0379 61.7933 95.0379C58.5143 95.0379 55.9119 92.3835 55.9119 89.1566C55.9119 85.8776 58.5663 83.2753 61.7933 83.2753Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M47.6344 97.4323C50.9134 97.4323 53.5158 100.087 53.5158 103.314C53.5158 106.593 50.8614 109.195 47.6344 109.195C44.3555 109.195 41.7531 106.541 41.7531 103.314C41.7531 100.087 44.3555 97.4323 47.6344 97.4323Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.836 50.7461C74.1261 48.456 77.8735 48.456 80.2156 50.7461C82.5057 53.0362 82.5057 56.7836 80.2156 59.1257C77.9255 61.4158 74.1781 61.4158 71.836 59.1257C69.4939 56.7836 69.4939 53.0882 71.836 50.7461Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.836 30.7078C74.1261 28.4177 77.8735 28.4177 80.2156 30.7078C82.5057 32.9979 82.5057 36.7453 80.2156 39.0874C77.9255 41.3775 74.1781 41.3775 71.836 39.0874C69.4939 36.7453 69.4939 32.9979 71.836 30.7078Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.836 90.8745C74.1261 88.5844 77.8735 88.5844 80.2156 90.8745C82.5057 93.1646 82.5057 96.912 80.2156 99.2541C77.9255 101.544 74.1781 101.544 71.836 99.2541C69.4939 96.912 69.4939 93.1646 71.836 90.8745Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M71.836 110.913C74.1261 108.622 77.8735 108.622 80.2156 110.913C82.5057 113.203 82.5057 116.95 80.2156 119.292C77.9255 121.582 74.1781 121.582 71.836 119.292C69.4939 116.95 69.4939 113.203 71.836 110.913Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/orderBooks.svg b/packages/website/ts/icons/illustrations/orderBooks.svg
deleted file mode 100755
index 44e001ff0..000000000
--- a/packages/website/ts/icons/illustrations/orderBooks.svg
+++ /dev/null
@@ -1,8 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3"/>
-<path d="M75 64V75M75 75H69V128H75M75 75H81V128H75M75 128V139" stroke="#00AE99" stroke-width="3"/>
-<path d="M98 16V27M98 27H92V75H98M98 27H104V75H98M98 75V86" stroke="#00AE99" stroke-width="3"/>
-<path d="M52 16V27M52 27H46V75H52M52 27H58V75H52M52 75V86" stroke="#00AE99" stroke-width="3"/>
-<path d="M29 64V75M29 75H23V100H29M29 75H35V100H29M29 100V111" stroke="#00AE99" stroke-width="3"/>
-<path d="M121 64V75M121 75H115V100H121M121 75H127V100H121M121 100V111" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/predictionMarkets.svg b/packages/website/ts/icons/illustrations/predictionMarkets.svg
deleted file mode 100755
index 820b79416..000000000
--- a/packages/website/ts/icons/illustrations/predictionMarkets.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M126.5 126.737C139.78 113.518 148 95.2188 148 75C148 34.6832 115.317 2 75 2C34.6832 2 2 34.6832 2 75C2 94.9638 10.0138 113.056 23 126.235" stroke="#00AE99" stroke-width="3"/>
-<path d="M127 4V22M127 40V22M127 22H109H145" stroke="#00AE99" stroke-width="3"/>
-<path d="M104 37V45M104 53V45M104 45H96H112" stroke="#00AE99" stroke-width="3"/>
-<rect x="19" y="137" width="112" height="11" stroke="#00AE99" stroke-width="3"/>
-<rect x="23" y="126" width="104" height="11" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/protocol.svg b/packages/website/ts/icons/illustrations/protocol.svg
deleted file mode 100644
index 5c9c1531a..000000000
--- a/packages/website/ts/icons/illustrations/protocol.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="144" height="144" viewBox="0 0 144 144" fill="none" xmlns="http://www.w3.org/2000/svg"><g style="mix-blend-mode:screen" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"><path d="M72 132.722c33.536 0 60.722-27.186 60.722-60.722S105.536 11.278 72 11.278 11.278 38.464 11.278 72 38.464 132.722 72 132.722z"/><path d="M72 20.557A9.278 9.278 0 1 0 72 2a9.278 9.278 0 0 0 0 18.557zM114.942 38.336a9.278 9.278 0 1 0-9.278-9.278 9.278 9.278 0 0 0 9.278 9.278zM132.722 81.278A9.278 9.278 0 0 0 142 72a9.278 9.278 0 0 0-9.278-9.278 9.278 9.278 0 1 0 0 18.556zM114.942 124.221a9.279 9.279 0 1 0 0-18.557 9.279 9.279 0 0 0 0 18.557zM72 142a9.278 9.278 0 0 0 9.278-9.278 9.278 9.278 0 1 0-18.556 0A9.278 9.278 0 0 0 72 142zM29.058 124.221a9.278 9.278 0 0 0 9.278-9.279 9.278 9.278 0 0 0-9.278-9.278 9.278 9.278 0 0 0-9.279 9.278 9.278 9.278 0 0 0 9.279 9.279zM11.278 81.278a9.278 9.278 0 1 0 0-18.556 9.278 9.278 0 0 0 0 18.556zM29.058 38.336a9.278 9.278 0 1 0 0-18.557 9.278 9.278 0 0 0 0 18.557zM68.114 75.886c-2.138-2.137-2.138-5.635 0-7.82 2.137-2.138 5.635-2.138 7.82 0 2.138 2.137 2.138 5.634 0 7.82-2.185 2.138-5.683 2.138-7.82 0zM49.363 75.886c-2.137-2.137-2.137-5.635 0-7.82 2.137-2.138 5.635-2.138 7.821 0 2.137 2.137 2.137 5.634 0 7.82a5.571 5.571 0 0 1-7.821 0zM30.66 75.886c-2.137-2.137-2.137-5.635 0-7.82 2.138-2.138 5.636-2.138 7.822 0 2.137 2.137 2.137 5.634 0 7.82-2.186 2.138-5.684 2.138-7.821 0zM86.816 75.886c-2.137-2.137-2.137-5.635 0-7.82 2.138-2.138 5.635-2.138 7.821 0 2.138 2.137 2.138 5.634 0 7.82-2.186 2.138-5.683 2.138-7.82 0zM105.518 75.886c-2.137-2.137-2.137-5.635 0-7.82 2.138-2.138 5.635-2.138 7.821 0 2.138 2.137 2.138 5.634 0 7.82-2.186 2.138-5.683 2.138-7.821 0zM53.25 58.738c0-3.06 2.477-5.489 5.489-5.489 3.06 0 5.489 2.477 5.489 5.49 0 3.06-2.478 5.489-5.49 5.489-3.011.048-5.489-2.43-5.489-5.49zM40.036 45.525c0-3.06 2.478-5.489 5.49-5.489 3.06 0 5.489 2.477 5.489 5.49 0 3.06-2.478 5.489-5.49 5.489a5.453 5.453 0 0 1-5.489-5.49zM79.724 85.213c0-3.06 2.477-5.49 5.49-5.49 3.06 0 5.488 2.478 5.488 5.49 0 3.06-2.477 5.49-5.489 5.49-3.06.048-5.49-2.43-5.49-5.49zM92.937 98.475c0-3.06 2.477-5.49 5.49-5.49a5.483 5.483 0 0 1 5.488 5.49c0 3.06-2.477 5.489-5.489 5.489s-5.49-2.478-5.49-5.49zM85.213 53.25c3.06 0 5.49 2.477 5.49 5.488 0 3.06-2.478 5.49-5.49 5.49a5.483 5.483 0 0 1-5.49-5.49 5.483 5.483 0 0 1 5.49-5.489zM98.475 40.036c3.06 0 5.489 2.477 5.489 5.49 0 3.06-2.477 5.489-5.49 5.489a5.484 5.484 0 0 1-5.489-5.49c-.048-3.06 2.43-5.489 5.49-5.489zM58.739 79.724c3.06 0 5.489 2.477 5.489 5.489 0 3.06-2.478 5.49-5.49 5.49a5.483 5.483 0 0 1-5.489-5.49c0-3.06 2.478-5.49 5.49-5.49zM45.525 92.937c3.06 0 5.49 2.477 5.49 5.49a5.483 5.483 0 0 1-5.49 5.488 5.483 5.483 0 0 1-5.489-5.489 5.484 5.484 0 0 1 5.49-5.49zM68.114 49.363c2.137-2.138 5.635-2.138 7.82 0 2.138 2.137 2.138 5.635 0 7.82-2.137 2.138-5.634 2.138-7.82 0a5.483 5.483 0 0 1 0-7.82zM68.114 30.66c2.137-2.137 5.635-2.137 7.82 0 2.138 2.138 2.138 5.636 0 7.822-2.137 2.137-5.634 2.137-7.82 0-2.186-2.186-2.186-5.684 0-7.821zM68.114 86.816c2.137-2.137 5.635-2.137 7.82 0 2.138 2.138 2.138 5.635 0 7.821-2.137 2.137-5.634 2.137-7.82 0-2.186-2.186-2.186-5.683 0-7.82zM68.114 105.518c2.137-2.137 5.635-2.137 7.82 0 2.138 2.138 2.138 5.635 0 7.821-2.137 2.138-5.634 2.138-7.82 0-2.186-2.186-2.186-5.683 0-7.821z"/></g></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/ready-to-build.svg b/packages/website/ts/icons/illustrations/ready-to-build.svg
deleted file mode 100644
index a26a4e236..000000000
--- a/packages/website/ts/icons/illustrations/ready-to-build.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="152" height="152" viewBox="0 0 152 152" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M76 151c41.421 0 75-33.579 75-75S117.421 1 76 1 1 34.579 1 76s33.579 75 75 75z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M76 1.502l-30.852 44.8H76L76.05 76l30.803-44.9H76.001V1.502zM76 75.997l-30.853 44.799H76l.05 29.699 30.803-44.899H76V75.997z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10" stroke-linejoin="round"/><path d="M1.502 75.998l44.8 30.852V75.998L76 75.948 31.1 45.144v30.853H1.503zM76 76l45.101 31.522V76L151 75.95l-45.202-31.47V76H76z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10" stroke-linejoin="round"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/recruitingSupport.svg b/packages/website/ts/icons/illustrations/recruitingSupport.svg
deleted file mode 100755
index d630b23d7..000000000
--- a/packages/website/ts/icons/illustrations/recruitingSupport.svg
+++ /dev/null
@@ -1,7 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7578 21.2421 88 45 88C68.7579 88 88 68.7578 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M30 45C30 53.2876 36.7124 60 45 60C53.2876 60 60 53.2876 60 45C60 36.8528 53.5084 30.2207 45.4114 30.01C45.2609 30.01 45.1204 30 44.9699 30C36.7023 30.01 30 36.7224 30 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M21 45C21 58.2602 31.7398 69 45 69C58.2602 69 69 58.2602 69 45C69 31.9645 58.6134 21.3532 45.6582 21.0161C45.4174 21.0161 45.1926 21 44.9518 21C31.7237 21.0161 21 31.7559 21 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M56.5 56L76 75.5" stroke="#00AE99" stroke-width="3"/>
-<path d="M45 70.5C54.0057 70.5 62.1515 74.8777 67.8311 81.94L70.1689 80.06C63.9926 72.3798 55.0243 67.5 45 67.5V70.5ZM45 67.5C34.9757 67.5 26.0074 72.3798 19.8311 80.06L22.1689 81.94C27.8485 74.8777 35.9943 70.5 45 70.5V67.5Z" fill="#00AE99"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/right-thing.svg b/packages/website/ts/icons/illustrations/right-thing.svg
deleted file mode 100644
index eba2bbc36..000000000
--- a/packages/website/ts/icons/illustrations/right-thing.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="104" height="104" viewBox="0 0 104 104" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M52 102C79.6142 102 102 79.6142 102 52C102 24.3858 79.6142 2 52 2C24.3858 2 2 24.3858 2 52C2 79.6142 24.3858 102 52 102Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M92.0611 24.6135C81.9235 14.476 65.4872 14.476 55.3496 24.6135L51.6804 28.286L48.008 24.6135C37.8704 14.476 21.4341 14.476 11.2965 24.6135C1.15897 34.7511 1.15897 51.1874 11.2965 61.325L14.969 64.9974L51.6804 101.706L88.3918 64.9942L92.0643 61.3218C102.199 51.1874 102.199 34.7511 92.0611 24.6135Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M81.2925 45.1702C73.8581 37.7358 61.8044 37.7358 54.3731 45.1702L51.6796 47.8637L48.9861 45.1702C41.5517 37.7358 29.4979 37.7358 22.0635 45.1702C14.6291 52.6046 14.6291 64.6583 22.0635 72.0928L24.757 74.7863L51.6764 101.709L78.599 74.7863L81.2925 72.0928C88.7269 64.6583 88.7269 52.6046 81.2925 45.1702Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M70.5248 65.73C65.7935 60.9987 58.1223 60.9987 53.3942 65.73L51.6796 67.4446L49.9649 65.73C45.2336 60.9987 37.5625 60.9987 32.8344 65.73C28.1031 70.4613 28.1031 78.1324 32.8344 82.8605L34.5491 84.5752L51.6796 101.706L68.8101 84.5752L70.5248 82.8605C75.256 78.1292 75.256 70.4613 70.5248 65.73Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/robustSmartContracts.svg b/packages/website/ts/icons/illustrations/robustSmartContracts.svg
deleted file mode 100755
index 060f2d00c..000000000
--- a/packages/website/ts/icons/illustrations/robustSmartContracts.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M45 88C68.7482 88 88 68.7482 88 45C88 21.2518 68.7482 2 45 2C21.2518 2 2 21.2518 2 45C2 68.7482 21.2518 88 45 88Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M70 29V79H20V11H52M70 29L52 11M70 29V11H52" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M30 45H60M30 55H60M30 65H60" stroke="#00AE99" stroke-width="3"/>
-<path d="M52 11V29H70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/rocketship.svg b/packages/website/ts/icons/illustrations/rocketship.svg
deleted file mode 100644
index e9b4b83ab..000000000
--- a/packages/website/ts/icons/illustrations/rocketship.svg
+++ /dev/null
@@ -1,9 +0,0 @@
-<svg width="124" height="124" viewBox="0 0 124 124" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M44.6582 74.4521L12.4089 95.6738M18.9394 103.633L46.699 76.2888" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M51.3926 80.5745L34.6538 115.266M25.8784 109.96L49.1477 78.5338" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M77.212 78.8086L75.9699 78.949L75.9699 78.949L77.212 78.8086ZM77.603 60.0842L76.4001 59.7443L77.603 60.0842ZM84.9562 43.7018L83.979 42.9223L83.9342 42.9785L83.8961 43.0394L84.9562 43.7018ZM73.085 87.8359L72.2661 88.7803L73.2262 89.6128L74.0428 88.6391L73.085 87.8359ZM56.5473 79.3763L57.4218 80.2694L57.459 80.2331L57.493 80.1937L56.5473 79.3763ZM53.8137 79.4142L54.6312 78.4685L54.6311 78.4685L53.8137 79.4142ZM53.0049 80.3499L53.7507 81.3531L53.8608 81.2712L53.9505 81.1674L53.0049 80.3499ZM51.4635 80.243L52.2809 79.2973L52.2809 79.2973L51.4635 80.243ZM61.3832 68.3677L60.5429 69.2931L60.5542 69.3034L60.5658 69.3134L61.3832 68.3677ZM74.9165 85.3062L75.9718 85.9761L75.9718 85.9761L74.9165 85.3062ZM91.434 27.7957L92.5916 27.3241L92.4784 27.0462L92.2514 26.85L91.434 27.7957ZM42.7642 49.0315L42.8049 50.2809L42.8049 50.2809L42.7642 49.0315ZM61.2349 45.9355L61.7453 47.0765L61.2349 45.9355ZM76.3811 36.2894L77.1898 37.2424L77.2446 37.1959L77.2937 37.1435L76.3811 36.2894ZM34.429 54.4212L33.4956 53.5898L32.6503 54.5386L33.613 55.3682L34.429 54.4212ZM45.1923 69.5609L44.2467 68.7435L44.2127 68.7828L44.182 68.8248L45.1923 69.5609ZM45.5503 72.2712L46.3678 71.3256L46.3678 71.3256L45.5503 72.2712ZM44.7415 73.207L43.7958 72.3895L43.7061 72.4933L43.641 72.6141L44.7415 73.207ZM45.0703 74.7167L45.8878 73.771L45.8878 73.771L45.0703 74.7167ZM55.3854 63.1831L54.5679 64.1288L54.5795 64.1388L54.5913 64.1485L55.3854 63.1831ZM36.667 52.2431L35.8515 51.2958L35.8515 51.2958L36.667 52.2431ZM91.1826 27.5784L92 26.6327L91.773 26.4365L91.4817 26.3647L91.1826 27.5784ZM83.9509 43.0422L61.4101 69.1188L63.3014 70.7536L85.8422 44.6771L83.9509 43.0422ZM78.4541 78.6681C78.0305 74.9211 76.5083 68.5531 78.8059 60.4242L76.4001 59.7443C73.9348 68.4667 75.5746 75.4525 75.9699 78.949L78.4541 78.6681ZM78.8059 60.4242C80.6674 53.8382 84.3943 46.96 86.0163 44.3642L83.8961 43.0394C82.2037 45.748 78.349 52.8492 76.4001 59.7443L78.8059 60.4242ZM85.9334 44.4813C86.7782 43.4222 88.106 41.5706 89.3107 39.7677C90.4904 38.002 91.6492 36.1406 92.0741 35.11L89.7628 34.1571C89.4497 34.9164 88.4417 36.5683 87.232 38.3788C86.0471 40.1522 84.7628 41.9398 83.979 42.9223L85.9334 44.4813ZM73.904 86.8915L60.2718 75.0706L58.634 76.9594L72.2661 88.7803L73.904 86.8915ZM58.5072 75.1976L55.6017 78.5589L57.493 80.1937L60.3985 76.8324L58.5072 75.1976ZM55.6728 78.4831C55.6952 78.4612 55.6589 78.4988 55.5624 78.5515C55.474 78.5998 55.3704 78.6413 55.265 78.6627C55.163 78.6835 55.0696 78.6837 54.9818 78.6633C54.8989 78.6441 54.7803 78.5974 54.6312 78.4685L52.9963 80.3599C53.9198 81.1581 54.9373 81.2805 55.7629 81.1126C56.5187 80.959 57.1181 80.5669 57.4218 80.2694L55.6728 78.4831ZM52.8681 78.5968L52.0592 79.5325L53.9505 81.1674L54.7594 80.2317L52.8681 78.5968ZM52.2591 79.3468C52.279 79.332 52.2917 79.3249 52.2958 79.3226C52.3006 79.32 52.302 79.3197 52.3006 79.3202C52.2965 79.3217 52.2938 79.3219 52.2957 79.3217C52.2974 79.3216 52.3007 79.3216 52.3054 79.3221C52.3102 79.3227 52.3147 79.3237 52.3182 79.3249C52.3218 79.326 52.3213 79.3263 52.3164 79.3236C52.3115 79.3208 52.2994 79.3133 52.2809 79.2973L50.646 81.1886C51.8617 82.2394 53.2052 81.7587 53.7507 81.3531L52.2591 79.3468ZM60.5658 69.3134C61.2107 69.8709 61.7136 71.4882 60.5236 72.8649L62.4149 74.4998C64.5664 72.0109 63.8212 68.8229 62.2006 67.422L60.5658 69.3134ZM60.5236 72.8649L58.5072 75.1976L60.3985 76.8324L62.4149 74.4998L60.5236 72.8649ZM74.0428 88.6391C74.5796 87.999 75.2848 87.0584 75.9718 85.9761L73.8611 84.6363C73.2323 85.627 72.5921 86.4784 72.1273 87.0326L74.0428 88.6391ZM75.9718 85.9761C76.6408 84.9221 77.3127 83.7022 77.792 82.4704C78.2624 81.2613 78.5956 79.9197 78.4541 78.6681L75.9699 78.949C76.045 79.6133 75.8726 80.509 75.4621 81.5639C75.0605 82.5961 74.4763 83.6671 73.8611 84.6363L75.9718 85.9761ZM75.7339 84.3606L62.2867 72.7367L60.6518 74.628L74.099 86.2519L75.7339 84.3606ZM60.2703 75.0693L54.4097 70.0034L52.7748 71.8947L58.6354 76.9607L60.2703 75.0693ZM57.4148 66.5254C58.723 67.6581 59.9087 68.7173 60.5429 69.2931L62.2235 67.4423C61.5753 66.8537 60.3749 65.7815 59.0512 64.6354L57.4148 66.5254ZM48.6813 76.6305L52.9964 80.3599L54.6311 78.4685L50.316 74.739L48.6813 76.6305ZM47.2951 78.2921L50.646 81.1886L52.2809 79.2973L48.9299 76.4007L47.2951 78.2921ZM92.0741 35.11C92.483 34.1181 92.8555 32.8177 93.0125 31.4685C93.1677 30.1352 93.1262 28.6366 92.5916 27.3241L90.2763 28.2672C90.5897 29.0365 90.6594 30.0618 90.5293 31.1795C90.4011 32.2814 90.0918 33.359 89.7628 34.1571L92.0741 35.11ZM75.2878 35.5538L52.747 61.6303L54.6383 63.2652L77.1792 37.1886L75.2878 35.5538ZM42.8049 50.2809C46.3218 50.1661 53.4713 50.778 61.7453 47.0765L60.7244 44.7945C53.0135 48.244 46.4923 47.6592 42.7234 47.7822L42.8049 50.2809ZM61.7453 47.0765C68.2859 44.1505 74.7546 39.309 77.1898 37.2424L75.5723 35.3363C73.2384 37.3168 66.9718 41.9996 60.7244 44.7945L61.7453 47.0765ZM77.2937 37.1435C78.1525 36.2258 79.7355 34.6963 81.3187 33.2674C82.9352 31.8084 84.4239 30.572 85.1299 30.1523L83.8526 28.0033C82.8943 28.5728 81.2201 29.9887 79.6437 31.4115C78.034 32.8643 76.3941 34.446 75.4684 35.4352L77.2937 37.1435ZM33.613 55.3682L47.2819 67.1466L48.9138 65.2527L35.2449 53.4743L33.613 55.3682ZM47.1522 65.3822L44.2467 68.7435L46.138 70.3784L49.0435 67.0171L47.1522 65.3822ZM44.182 68.8248C43.9317 69.1684 43.6304 69.8183 43.5877 70.5883C43.5411 71.4295 43.8094 72.4187 44.7329 73.2169L46.3678 71.3256C46.2187 71.1967 46.1553 71.0861 46.1243 71.0068C46.0914 70.9229 46.0781 70.8305 46.0839 70.7266C46.0899 70.6192 46.1159 70.5106 46.1509 70.4161C46.1892 70.3131 46.221 70.2717 46.2026 70.297L44.182 68.8248ZM44.6047 71.4538L43.7958 72.3895L45.6871 74.0244L46.496 73.0887L44.6047 71.4538ZM43.641 72.6141C43.3186 73.2126 43.0373 74.6115 44.2529 75.6624L45.8878 73.771C45.8693 73.755 45.8601 73.7441 45.8566 73.7397C45.8532 73.7353 45.8534 73.7348 45.8551 73.7381C45.8567 73.7414 45.8584 73.7457 45.8597 73.7504C45.8609 73.7549 45.8613 73.7583 45.8614 73.7599C45.8616 73.7618 45.8613 73.7592 45.8623 73.7549C45.8626 73.7534 45.8624 73.7548 45.8606 73.76C45.8589 73.7644 45.8537 73.7779 45.8419 73.7998L43.641 72.6141ZM56.2028 62.2375C54.5822 60.8366 51.32 60.5606 49.1686 63.0495L51.0599 64.6844C52.25 63.3077 53.9229 63.5713 54.5679 64.1288L56.2028 62.2375ZM49.1686 63.0495L47.1522 65.3822L49.0435 67.0171L51.0599 64.6844L49.1686 63.0495ZM35.3623 55.2527C35.8435 54.7125 36.5933 53.9559 37.4825 53.1904L35.8515 51.2958C34.88 52.1321 34.0513 52.966 33.4956 53.5898L35.3623 55.2527ZM37.4825 53.1904C38.3526 52.4414 39.3278 51.7084 40.291 51.1617C41.2754 50.6029 42.1367 50.3027 42.8049 50.2809L42.7234 47.7822C41.4645 47.8233 40.1853 48.347 39.057 48.9875C37.9074 49.6399 36.7976 50.4813 35.8515 51.2958L37.4825 53.1904ZM35.8496 53.1887L49.2968 64.8126L50.9317 62.9213L37.4845 51.2974L35.8496 53.1887ZM47.2804 67.1453L53.141 72.2113L54.7759 70.3199L48.9153 65.254L47.2804 67.1453ZM59.4158 64.9506C58.0903 63.8066 56.8557 62.774 56.1795 62.2178L54.5913 64.1485C55.2529 64.6927 56.4724 65.7127 57.7825 66.8433L59.4158 64.9506ZM50.6824 75.0557L46.3678 71.3256L44.7328 73.2168L49.0474 76.9469L50.6824 75.0557ZM49.2387 76.6676L45.8878 73.771L44.2529 75.6624L47.6038 78.559L49.2387 76.6676ZM85.1299 30.1523C85.872 29.7113 86.8935 29.2494 87.9652 28.9631C89.0523 28.6726 90.0769 28.5933 90.8835 28.792L91.4817 26.3647C90.1056 26.0255 88.6168 26.2013 87.3199 26.5478C86.0077 26.8984 84.7749 27.4551 83.8526 28.0033L85.1299 30.1523ZM92.2514 26.85L92 26.6327L90.3651 28.524L90.6165 28.7413L92.2514 26.85Z" fill="#00AE99"/>
-<path d="M66.0818 13.4286V16.2857M66.0818 19.1428V16.2857M66.0818 16.2857H63.2246H68.9389" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M108.122 62V64.8571M108.122 67.7143V64.8571M108.122 64.8571H105.265H110.979" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M37.9182 25.6735V28.5307M37.9182 31.3878V28.5307M37.9182 28.5307H35.061H40.7753" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M62 122C95.1371 122 122 95.1371 122 62C122 28.8629 95.1371 2 62 2C28.8629 2 2 28.8629 2 62C2 95.1371 28.8629 122 62 122Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/secureTrading.svg b/packages/website/ts/icons/illustrations/secureTrading.svg
deleted file mode 100755
index 21912961d..000000000
--- a/packages/website/ts/icons/illustrations/secureTrading.svg
+++ /dev/null
@@ -1,15 +0,0 @@
-<svg width="91" height="90" viewBox="0 0 91 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7579 21.2421 88 45 88C68.7579 88 88 68.7579 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M15 15H75V75H62.8125H26.25H15V15Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M68.2435 21.7253H21.7253V68.2436H30.4475H58.7945H68.2435V21.7253Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M14.6464 44.9844H21.7253" stroke="#00AE99" stroke-width="3"/>
-<path d="M14.6464 34.8718H21.7253" stroke="#00AE99" stroke-width="3"/>
-<path d="M14.6464 55.0971H21.7253" stroke="#00AE99" stroke-width="3"/>
-<circle cx="44.9844" cy="44.9844" r="14.1577" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M44.9844 30.8267V38.9168" stroke="#00AE99" stroke-width="3"/>
-<path d="M32.1647 38.9766L39.4902 42.4097" stroke="#00AE99" stroke-width="3"/>
-<path d="M35.2801 55.2932L40.8255 49.4026" stroke="#00AE99" stroke-width="3"/>
-<path d="M54.7349 55.2497L49.1632 49.3839" stroke="#00AE99" stroke-width="3"/>
-<path d="M57.8132 38.996L50.4825 42.4181" stroke="#00AE99" stroke-width="3"/>
-<ellipse cx="44.9844" cy="44.9844" rx="5.05633" ry="5.05633" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-discord.svg b/packages/website/ts/icons/illustrations/social-discord.svg
deleted file mode 100644
index 144f6e061..000000000
--- a/packages/website/ts/icons/illustrations/social-discord.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="40" height="44" viewBox="0 0 40 44" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M34.8156 0C37.3489 0 39.3921 2.04861 39.5129 4.45939V43.2425L34.6895 39.1471L32.0409 36.7363L29.1509 34.2175L30.3581 38.1904H5.06478C2.5387 38.1904 0.488281 36.2715 0.488281 33.7292V4.46839C0.488281 2.05762 2.5423 0.00540532 5.07379 0.00540532H34.803L34.8156 0ZM23.7924 10.2395H23.7383L23.3744 10.5998C27.1095 11.6809 28.9166 13.3691 28.9166 13.3691C26.5095 12.1656 24.3401 11.5638 22.1708 11.3205C20.6033 11.0773 19.0357 11.2052 17.7114 11.3205H17.3511C16.5042 11.3205 14.7025 11.6809 12.2881 12.6448C11.4467 13.0106 10.9638 13.2502 10.9638 13.2502C10.9638 13.2502 12.7692 11.4449 16.7475 10.4809L16.5042 10.2377C16.5042 10.2377 13.4917 10.1224 10.2395 12.5259C10.2395 12.5259 6.98727 18.1907 6.98727 25.1744C6.98727 25.1744 8.78905 28.3094 13.7313 28.4284C13.7313 28.4284 14.452 27.468 15.1817 26.623C12.407 25.7798 11.3259 24.0933 11.3259 24.0933C11.3259 24.0933 11.5674 24.2122 11.9295 24.4536H12.0376C12.0917 24.4536 12.1169 24.4807 12.1457 24.5077V24.5185C12.1746 24.5473 12.1998 24.5726 12.2539 24.5726C12.8484 24.8176 13.443 25.059 13.9295 25.2933C14.7691 25.6572 15.8484 26.0194 17.1727 26.259C18.8483 26.5023 20.769 26.6194 22.9564 26.259C24.0374 26.0158 25.1185 25.778 26.1996 25.2951C26.9023 24.9347 27.7671 24.5744 28.7166 23.9672C28.7166 23.9672 27.6356 25.6536 24.7437 26.4969C25.3383 27.3365 26.1761 28.2986 26.1761 28.2986C31.1202 28.1905 33.0409 25.0554 33.149 25.1888C33.149 18.2159 29.8788 12.5403 29.8788 12.5403C26.9329 10.353 24.1762 10.2701 23.6897 10.2701L23.7906 10.2341L23.7924 10.2395ZM24.0951 18.1907C25.3617 18.1907 26.3834 19.2718 26.3834 20.5961C26.3834 21.9294 25.3563 23.0104 24.0951 23.0104C22.8339 23.0104 21.8068 21.9294 21.8068 20.6069C21.8105 19.2736 22.8393 18.1961 24.0951 18.1961V18.1907ZM15.9096 18.1907C17.1709 18.1907 18.1907 19.2718 18.1907 20.5961C18.1907 21.9294 17.1637 23.0104 15.9024 23.0104C14.6412 23.0104 13.6142 21.9294 13.6142 20.6069C13.6142 19.2736 14.6412 18.1961 15.9024 18.1961L15.9096 18.1907Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-fb.svg b/packages/website/ts/icons/illustrations/social-fb.svg
deleted file mode 100644
index e50cf107a..000000000
--- a/packages/website/ts/icons/illustrations/social-fb.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="38" height="38" viewBox="0 0 38 38" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M35.9037 0H2.09633C0.938917 0 0 0.938917 0 2.09633V35.9037C0 37.0627 0.938917 38 2.09633 38H20.2952V23.2845H15.3409V17.5513H20.2952V13.3158C20.2952 8.40908 23.294 5.73958 27.6719 5.73958C29.7698 5.73958 31.5733 5.89317 32.0989 5.96283V11.0928H29.0573C26.6823 11.0928 26.22 12.2344 26.22 13.8969V17.556H31.8947L31.1584 23.3035H26.22V38H35.9021C37.0627 38 38 37.0627 38 35.9037V2.09633C38 0.938917 37.0627 0 35.9037 0Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-github.svg b/packages/website/ts/icons/illustrations/social-github.svg
deleted file mode 100644
index ef0025582..000000000
--- a/packages/website/ts/icons/illustrations/social-github.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="38" height="38" viewBox="0 0 38 38" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M19 0.17334C8.5025 0.17334 0 8.68059 0 19.1733C0 27.5698 5.4435 34.69 12.9913 37.1996C13.9412 37.3785 14.2896 36.7911 14.2896 36.286C14.2896 35.8348 14.2738 34.6393 14.2658 33.056C8.98067 34.2023 7.866 30.5068 7.866 30.5068C7.0015 28.3139 5.75225 27.7281 5.75225 27.7281C4.03117 26.5501 5.88525 26.5738 5.88525 26.5738C7.79317 26.7068 8.79542 28.5308 8.79542 28.5308C10.4896 31.4363 13.243 30.5971 14.3292 30.111C14.5002 28.8823 14.9894 28.0448 15.5325 27.5698C11.3129 27.0948 6.878 25.4608 6.878 18.1806C6.878 16.1064 7.61425 14.4123 8.83342 13.0823C8.61967 12.6025 7.97842 10.6708 8.99967 8.05359C8.99967 8.05359 10.5909 7.54376 14.2247 10.0011C15.7447 9.57834 17.3597 9.36934 18.9747 9.35984C20.5897 9.36934 22.2047 9.57834 23.7247 10.0011C27.3347 7.54376 28.9259 8.05359 28.9259 8.05359C29.9472 10.6708 29.3059 12.6025 29.1159 13.0823C30.3272 14.4123 31.0634 16.1064 31.0634 18.1806C31.0634 25.4798 26.6222 27.0868 22.3947 27.5539C23.0597 28.1239 23.6772 29.2893 23.6772 31.0689C23.6772 33.6118 23.6534 35.6543 23.6534 36.2718C23.6534 36.7705 23.9859 37.3643 24.9597 37.1743C32.5613 34.6821 38 27.5571 38 19.1733C38 8.68059 29.4928 0.17334 19 0.17334Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-newsletter.svg b/packages/website/ts/icons/illustrations/social-newsletter.svg
deleted file mode 100644
index 572cb8ed9..000000000
--- a/packages/website/ts/icons/illustrations/social-newsletter.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="38" height="30" viewBox="0 0 38 30" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M38 3.125V26.875C38 28.2208 36.9708 29.25 35.625 29.25H33.25V7.69608L19 17.9292L4.75 7.69608V29.25H2.375C1.02758 29.25 0 28.2208 0 26.875V3.125C0 2.45208 0.2565 1.85833 0.682417 1.434C1.10833 1.00333 1.70367 0.75 2.375 0.75H3.16667L19 12.2292L34.8333 0.75H35.625C36.2979 0.75 36.8917 1.0065 37.3176 1.434C37.7451 1.85833 38 2.45208 38 3.125Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-reddit.svg b/packages/website/ts/icons/illustrations/social-reddit.svg
deleted file mode 100644
index b93510b36..000000000
--- a/packages/website/ts/icons/illustrations/social-reddit.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="50" height="41" viewBox="0 0 50 41" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M4.49975 24.6813C4.37725 25.2447 4.31396 25.8246 4.31396 26.4105C4.31396 33.4398 13.3012 39.1687 24.3505 39.1687C35.3957 39.1687 44.383 33.4439 44.383 26.4105C44.383 25.8511 44.3238 25.2958 44.2156 24.7588L44.1849 24.6935C44.1421 24.5812 44.1257 24.4689 44.1257 24.3566C43.5092 21.9577 41.8452 19.7813 39.4382 18.0215C39.3463 17.9888 39.2585 17.9418 39.1809 17.8785C39.1278 17.8377 39.089 17.7928 39.0441 17.7479C35.3855 15.2285 30.1508 13.6483 24.3526 13.6483C18.6054 13.6483 13.4217 15.1979 9.76307 17.6723C9.73449 17.7091 9.70386 17.7397 9.66303 17.7724C9.58341 17.8398 9.49154 17.8949 9.39762 17.9255C6.93542 19.6854 5.22861 21.8801 4.59162 24.3015C4.59162 24.4199 4.56304 24.5343 4.51608 24.6506L4.49975 24.6813ZM24.4526 35.7898C20.7899 35.7898 18.2113 34.9956 16.5658 33.3459C16.2126 32.9907 16.2126 32.4129 16.5658 32.0556C16.9251 31.7188 17.5049 31.7188 17.8622 32.0556C19.1484 33.3398 21.3024 33.9809 24.4526 33.9809C27.6008 33.9809 29.7425 33.3684 31.0246 32.0842C31.3615 31.7494 31.9433 31.7494 32.3088 32.0842C32.6457 32.4517 32.6457 33.0336 32.3088 33.4011C30.6571 35.0507 28.0928 35.8469 24.424 35.8469L24.4526 35.7898ZM17.0905 20.3285C15.2244 20.3285 13.6667 21.8903 13.6667 23.7523C13.6667 25.6102 15.2244 27.121 17.0905 27.121C18.9565 27.121 20.4612 25.6102 20.4612 23.7523C20.4612 21.8903 18.9524 20.3285 17.0905 20.3285ZM31.8576 20.3285C29.9915 20.3285 28.4317 21.8903 28.4317 23.7523C28.4317 25.6102 29.9915 27.121 31.8576 27.121C33.7236 27.121 35.2283 25.6102 35.2283 23.7523C35.2283 21.8903 33.7196 20.3285 31.8576 20.3285ZM41.1429 17.0721C43.2601 18.7728 44.8178 20.7899 45.612 23.001C46.5308 22.315 47.08 21.237 47.08 20.0427C47.08 17.997 45.416 16.3351 43.3683 16.3351C42.5537 16.3351 41.7799 16.5984 41.1429 17.0762V17.0721ZM5.53486 16.3392C3.4871 16.3392 1.82522 18.0051 1.82522 20.0508C1.82522 21.1594 2.31317 22.1905 3.14003 22.8867C3.95872 20.6837 5.53282 18.6952 7.65815 17.0149C7.04158 16.5862 6.30455 16.3432 5.5369 16.3432V16.3392H5.53486ZM24.3526 41C12.2947 41 2.48875 34.4566 2.48875 26.4187C2.48875 25.8572 2.5357 25.308 2.62758 24.767C1.00856 23.7605 0 21.9863 0 20.0427C0 16.9884 2.50508 14.5037 5.56344 14.5037C6.9395 14.5037 8.22368 15.006 9.23225 15.8961C13.0215 13.4645 18.1276 11.9333 23.7523 11.8292L27.4517 0.55124L28.2766 0.745195C28.2766 0.745195 28.3092 0.745194 28.3092 0.749278L36.931 2.77662C37.6334 1.1474 39.2544 0 41.147 0C43.6562 0 45.7019 2.0498 45.7019 4.561C45.7019 7.07629 43.6541 9.122 41.147 9.122C38.6399 9.122 36.5942 7.0722 36.5942 4.56917L28.7318 2.7072L25.7368 11.8476C31.1471 12.0619 36.0409 13.5911 39.7097 15.9737C40.7183 15.0264 42.0453 14.5058 43.452 14.5058C46.5104 14.5058 49.0011 16.9823 49.0011 20.0406C49.0011 22.0557 47.8987 23.8911 46.1878 24.8691C46.247 25.3897 46.3082 25.8777 46.3082 26.3983C46.2776 34.4382 36.4962 40.9816 24.422 40.9816L24.3526 41ZM41.051 1.82726C39.5402 1.82726 38.3153 3.05019 38.3153 4.55896C38.3153 6.06568 39.5402 7.29474 41.051 7.29474C42.5455 7.29474 43.7664 6.06976 43.7664 4.57121C43.7664 3.07469 42.5455 1.85176 41.0163 1.85176L41.051 1.82726Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/social-twitter.svg b/packages/website/ts/icons/illustrations/social-twitter.svg
deleted file mode 100644
index bc8e2f7d7..000000000
--- a/packages/website/ts/icons/illustrations/social-twitter.svg
+++ /dev/null
@@ -1,3 +0,0 @@
-<svg width="45" height="36" viewBox="0 0 45 36" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M44.8202 4.28708C43.1869 5.00497 41.4429 5.49403 39.6067 5.71733C41.478 4.58974 42.9175 2.81253 43.5985 0.692059C41.8434 1.71631 39.8983 2.46189 37.8276 2.87712C36.1741 1.10729 33.8174 0 31.2005 0C26.1863 0 22.1206 4.06562 22.1206 9.07428C22.1206 9.79402 22.2037 10.4861 22.355 11.1486C14.807 10.7924 8.11705 7.16789 3.63989 1.68862C2.85186 3.02107 2.41079 4.56944 2.41079 6.25622C2.41079 9.41201 4.01637 12.1858 6.44872 13.8153C4.95941 13.7674 3.55869 13.3577 2.33697 12.6785V12.7911C2.33697 17.1926 5.46139 20.8633 9.61928 21.6993C8.85709 21.9041 8.05246 22.0149 7.22752 22.0149C6.64804 22.0149 6.09255 21.9595 5.53705 21.8562C6.70156 25.4604 10.0493 28.0884 14.0337 28.1622C10.9333 30.5964 7.00422 32.047 2.77251 32.047C2.05276 32.047 1.33487 32.0045 0.613281 31.9233C4.65306 34.4959 9.41258 36 14.5597 36C31.2687 36 40.3947 22.1662 40.3947 10.189C40.3947 9.80325 40.3947 9.41385 40.367 9.0263C42.1405 7.75475 43.6889 6.14733 44.9069 4.32399L44.8202 4.28708Z" fill="white"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/stableTokens.svg b/packages/website/ts/icons/illustrations/stableTokens.svg
deleted file mode 100755
index 9e854b0e6..000000000
--- a/packages/website/ts/icons/illustrations/stableTokens.svg
+++ /dev/null
@@ -1,10 +0,0 @@
-<svg width="150" height="150" viewBox="0 0 150 150" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="75" cy="75" r="73" stroke="#00AE99" stroke-width="3"/>
-<path d="M32 96H119M32 96V85H119V96M32 96H36V106.5H48M103 142V106.5M48 142V106.5M119 96H115V106.5H103M103 106.5H92.25M48 106.5H58.75M75.5 106.5V148M75.5 106.5H58.75M75.5 106.5H92.25M58.75 106.5V146M92.25 106.5V146" stroke="#00AE99" stroke-width="3"/>
-<path d="M75.3265 76.5343C93.1472 76.5343 107.594 62.0878 107.594 44.2672C107.594 26.4465 93.1472 12 75.3265 12C57.5058 12 43.0593 26.4465 43.0593 44.2672C43.0593 62.0878 57.5058 76.5343 75.3265 76.5343Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M66.4197 57.1739V58.6739H67.9197H85.2999H86.7999V57.1739V52.1138V50.6138H85.2999H81.0799V29.0134V27.5134H79.5799H74.0798H73.6189L73.2375 27.7722L67.0774 31.9523L66.4197 32.3986V33.1935V39.2803V42.1109L68.7619 40.5215L72.5798 37.9308V50.6138H67.9197H66.4197V52.1138V57.1739Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M43.0593 44.0473C49.7328 42.9472 54.8662 37.2271 54.8662 30.187C54.8662 27.0337 53.8395 24.1736 52.0795 21.8269C46.5794 27.6203 43.1327 35.4671 43.0593 44.0473Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M43.0593 44.4871C43.1327 53.1405 46.5794 60.914 52.0795 66.7074C53.8395 64.3607 54.8662 61.5007 54.8662 58.3473C54.8662 51.3072 49.7328 45.5137 43.0593 44.4871Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M107.594 44.0473C100.92 42.9472 95.7869 37.2271 95.7869 30.187C95.7869 27.0337 96.8135 24.1736 98.5736 21.8269C104.074 27.6203 107.52 35.4671 107.594 44.0473Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M107.594 44.4871C107.52 53.1405 104.074 60.914 98.5736 66.7074C96.8135 64.3607 95.7869 61.5007 95.7869 58.3473C95.7869 51.3072 100.92 45.5137 107.594 44.4871Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/standardForExchange.svg b/packages/website/ts/icons/illustrations/standardForExchange.svg
deleted file mode 100755
index f8075ed6d..000000000
--- a/packages/website/ts/icons/illustrations/standardForExchange.svg
+++ /dev/null
@@ -1,12 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0)">
-<path d="M2 45C2 68.7579 21.2421 88 45 88C68.7579 88 88 68.7579 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M30 21L2 45L30 69V56.5H59.5V69L88 45L59.5 21V34H30V21Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M45 1V89" stroke="#00AE99" stroke-width="3"/>
-</g>
-<defs>
-<clipPath id="clip0">
-<rect width="90" height="90" fill="white"/>
-</clipPath>
-</defs>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/support.svg b/packages/website/ts/icons/illustrations/support.svg
deleted file mode 100644
index 368e7cc02..000000000
--- a/packages/website/ts/icons/illustrations/support.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="152" height="152" viewBox="0 0 152 152" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M76 151c41.421 0 75-33.579 75-75S117.421 1 76 1 1 34.579 1 76s33.579 75 75 75z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M114.869 14.138H38.226v124.818h76.643V14.138z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M101.73 26.189H51.365v100.73h50.365V26.189z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/><path d="M76.547 76.554c13.908 0 25.183-11.275 25.183-25.183 0-13.907-11.275-25.182-25.183-25.182-13.907 0-25.182 11.275-25.182 25.182 0 13.908 11.275 25.183 25.182 25.183zM76.547 126.919c13.908 0 25.183-11.274 25.183-25.182S90.455 76.554 76.547 76.554c-13.907 0-25.182 11.275-25.182 25.183s11.275 25.182 25.182 25.182z" stroke="#00AE99" stroke-width="2" stroke-miterlimit="10"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/supportForAllEthereumStandards-large.svg b/packages/website/ts/icons/illustrations/supportForAllEthereumStandards-large.svg
deleted file mode 100755
index 1f840204a..000000000
--- a/packages/website/ts/icons/illustrations/supportForAllEthereumStandards-large.svg
+++ /dev/null
@@ -1,28 +0,0 @@
-<svg width="250" height="250" viewBox="0 0 250 250" fill="none" xmlns="http://www.w3.org/2000/svg">
-<g clip-path="url(#clip0)">
-<path d="M192.122 112.755C221.878 112.755 246 88.6333 246 58.8776C246 29.1218 221.878 5 192.122 5C162.367 5 138.245 29.1218 138.245 58.8776C138.245 88.6333 162.367 112.755 192.122 112.755Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M206.229 18.0288V31.3513H219.551" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M219.551 31.3511V72.494H183.012V18.0287H206.229L219.551 31.3511Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M178.016 99.7268V86.4043H164.694" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M164.694 86.4045V45.2616H201.233V99.7269H178.016L164.694 86.4045Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M59.8776 114.323C89.6333 114.323 113.755 90.2008 113.755 60.445C113.755 30.6893 89.6333 6.56747 59.8776 6.56747C30.1218 6.56747 6 30.6893 6 60.445C6 90.2008 30.1218 114.323 59.8776 114.323Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M59.8775 114.224C89.5786 114.224 113.656 90.1464 113.656 60.4453C113.656 30.7442 89.5786 6.66666 59.8775 6.66666C30.1764 6.66666 6.09888 30.7442 6.09888 60.4453C6.09888 90.1464 30.1764 114.224 59.8775 114.224Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M46.0329 81.9563V83.4563H47.5329H76.5H78V81.9563V73.5229V72.0229H76.5H68.4665V35.0223V33.5223H66.9665H57.7997H57.3388L56.9574 33.7811L46.6906 40.7478L46.0329 41.1942V41.9891V52.1337V54.9643L48.3751 53.3749L56.2997 47.9975V72.0229H47.5329H46.0329V73.5229V81.9563Z" stroke="#00AE99" stroke-width="3"/>
-<path d="M6.09889 60.0786C17.2213 58.2452 25.777 48.7118 25.777 36.9782C25.777 31.7226 24.0658 26.9559 21.1325 23.0447C11.9656 32.7004 6.22112 45.7784 6.09889 60.0786Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M6.09889 60.8116C6.22112 75.2341 11.9656 88.1898 21.1325 97.8456C24.0658 93.9344 25.777 89.1676 25.777 83.912C25.777 72.1785 17.2213 62.5228 6.09889 60.8116Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M113.656 60.0786C102.534 58.2452 93.9781 48.7118 93.9781 36.9782C93.9781 31.7226 95.6892 26.9559 98.6226 23.0447C107.789 32.7004 113.534 45.7784 113.656 60.0786Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M113.656 60.8117C113.534 75.2342 107.789 88.1899 98.6226 97.8456C95.6892 93.9345 93.9781 89.1677 93.9781 83.9121C93.9781 72.1786 102.534 62.5229 113.656 60.8117Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M59.8776 246.567C89.6333 246.567 113.755 222.446 113.755 192.69C113.755 162.934 89.6333 138.812 59.8776 138.812C30.1218 138.812 6 162.934 6 192.69C6 222.446 30.1218 246.567 59.8776 246.567Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M59.8776 246.567C89.6333 246.567 113.755 222.446 113.755 192.69C113.755 162.934 89.6333 138.812 59.8776 138.812C30.1218 138.812 6 162.934 6 192.69C6 222.446 30.1218 246.567 59.8776 246.567Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M65.3633 189.944V158.303H69.8695V149.389H49.8858V158.303H54.3919V189.944C44.1062 192.393 36.4654 201.699 36.4654 212.67C36.4654 225.601 46.947 236.083 59.8776 236.083C72.8082 236.083 83.2899 225.601 83.2899 212.67C83.2899 201.601 75.6491 192.393 65.3633 189.944Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M69.8694 149.294H49.8857V158.208H69.8694V149.294Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40.3837 199.547H79.2735" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M192.122 246.567C221.878 246.567 246 222.446 246 192.69C246 162.934 221.878 138.812 192.122 138.812C162.367 138.812 138.245 162.934 138.245 192.69C138.245 222.446 162.367 246.567 192.122 246.567Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M191.833 156.667L159.333 200.422H191.833L191.923 228.333L224.333 184.489H191.833V156.667Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</g>
-<defs>
-<clipPath id="clip0">
-<rect width="250" height="250" fill="white"/>
-</clipPath>
-</defs>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/supportForAllEthereumStandards.svg b/packages/website/ts/icons/illustrations/supportForAllEthereumStandards.svg
deleted file mode 100755
index 32a4d8602..000000000
--- a/packages/website/ts/icons/illustrations/supportForAllEthereumStandards.svg
+++ /dev/null
@@ -1,21 +0,0 @@
-<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M152.898 90.2041C176.703 90.2041 196 70.9066 196 47.102C196 23.2974 176.703 4 152.898 4C129.093 4 109.796 23.2974 109.796 47.102C109.796 70.9066 129.093 90.2041 152.898 90.2041Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M164.183 14.423V25.081H174.841" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M174.841 25.0809V57.9952H145.61V14.4229H164.183L174.841 25.0809Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M141.613 79.7814V69.1234H130.955" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M130.955 69.1236V36.2093H160.186V79.7815H141.613L130.955 69.1236Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M47.102 91.4581C70.9066 91.4581 90.2041 72.1606 90.2041 48.356C90.2041 24.5514 70.9066 5.25398 47.102 5.25398C23.2974 5.25398 4 24.5514 4 48.356C4 72.1606 23.2974 91.4581 47.102 91.4581Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M47.102 91.3791C70.8629 91.3791 90.1249 72.1171 90.1249 48.3562C90.1249 24.5953 70.8629 5.33333 47.102 5.33333C23.3411 5.33333 4.0791 24.5953 4.0791 48.3562C4.0791 72.1171 23.3411 91.3791 47.102 91.3791Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M35.9761 65.5651V66.8151H37.2261H60.3998H61.6498V65.5651V58.8183V57.5683H60.3998H54.023V28.0178V26.7678H52.773H45.4395H45.0555L44.7377 26.9835L36.5242 32.5569L35.9761 32.9289V33.5913V41.7069V44.0658L37.928 42.7413L44.1895 38.4924V57.5683H37.2261H35.9761V58.8183V65.5651Z" stroke="#00AE99" stroke-width="2.5"/>
-<path d="M4.0791 48.0629C12.977 46.5962 19.8216 38.9694 19.8216 29.5826C19.8216 25.3781 18.4527 21.5647 16.106 18.4357C8.77251 26.1603 4.17688 36.6227 4.0791 48.0629Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M4.0791 48.6493C4.17688 60.1873 8.77251 70.5519 16.106 78.2765C18.4527 75.1475 19.8216 71.3341 19.8216 67.1296C19.8216 57.7428 12.977 50.0182 4.0791 48.6493Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M90.1248 48.0629C81.2269 46.5962 74.3823 38.9694 74.3823 29.5826C74.3823 25.3781 75.7512 21.5647 78.0979 18.4357C85.4314 26.1603 90.027 36.6227 90.1248 48.0629Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M90.1248 48.6494C90.027 60.1874 85.4314 70.552 78.0979 78.2765C75.7512 75.1476 74.3823 71.3342 74.3823 67.1297C74.3823 57.7429 81.2269 50.0183 90.1248 48.6494Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M47.102 197.254C70.9066 197.254 90.2041 177.957 90.2041 154.152C90.2041 130.347 70.9066 111.05 47.102 111.05C23.2974 111.05 4 130.347 4 154.152C4 177.957 23.2974 197.254 47.102 197.254Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M47.102 197.254C70.9066 197.254 90.2041 177.957 90.2041 154.152C90.2041 130.347 70.9066 111.05 47.102 111.05C23.2974 111.05 4 130.347 4 154.152C4 177.957 23.2974 197.254 47.102 197.254Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M51.4904 151.955V126.642H55.0953V119.511H39.1084V126.642H42.7133V151.955C34.4847 153.914 28.3721 161.359 28.3721 170.136C28.3721 180.481 36.7574 188.866 47.1019 188.866C57.4464 188.866 65.8317 180.481 65.8317 170.136C65.8317 161.281 59.719 153.914 51.4904 151.955Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M55.0953 119.435H39.1084V126.566H55.0953V119.435Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M31.5068 159.638H62.6187" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M152.898 197.254C176.703 197.254 196 177.957 196 154.152C196 130.347 176.703 111.05 152.898 111.05C129.093 111.05 109.796 130.347 109.796 154.152C109.796 177.957 129.093 197.254 152.898 197.254Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-<path d="M152.667 125.333L126.667 160.338H152.667L152.738 182.667L178.667 147.591H152.667V125.333Z" stroke="#00AE99" stroke-width="2.5" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/techSupport.svg b/packages/website/ts/icons/illustrations/techSupport.svg
deleted file mode 100755
index e52084f67..000000000
--- a/packages/website/ts/icons/illustrations/techSupport.svg
+++ /dev/null
@@ -1,13 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<circle cx="45" cy="45" r="43" stroke="#00AE99" stroke-width="3"/>
-<circle cx="45" cy="45" r="26.5068" stroke="#00AE99" stroke-width="3"/>
-<circle cx="45" cy="45" r="10.0137" stroke="#00AE99" stroke-width="3"/>
-<path d="M88 45C88 49.5545 84.3079 53.2466 79.7534 53.2466C75.199 53.2466 71.5068 49.5545 71.5068 45" stroke="#00AE99" stroke-width="3"/>
-<path d="M18.4932 45C18.4932 40.4455 14.801 36.7534 10.2466 36.7534C5.69212 36.7534 2 40.4455 2 45" stroke="#00AE99" stroke-width="3"/>
-<path d="M37.9193 37.9193C34.6988 41.1397 29.4773 41.1397 26.2568 37.9193C23.0363 34.6988 23.0363 29.4773 26.2568 26.2568" stroke="#00AE99" stroke-width="3"/>
-<path d="M63.7432 63.743C66.9637 60.5225 66.9637 55.3011 63.7432 52.0806C60.5227 48.8601 55.3013 48.8601 52.0808 52.0806" stroke="#00AE99" stroke-width="3"/>
-<path d="M45 18.4932C49.5545 18.4932 53.2466 14.801 53.2466 10.2466C53.2466 5.69212 49.5545 2 45 2" stroke="#00AE99" stroke-width="3"/>
-<path d="M45 88C40.4455 88 36.7534 84.3079 36.7534 79.7534C36.7534 75.199 40.4455 71.5068 45 71.5068" stroke="#00AE99" stroke-width="3"/>
-<path d="M26.2568 63.7433C29.4773 66.9638 34.6988 66.9638 37.9193 63.7433C41.1397 60.5228 41.1397 55.3014 37.9193 52.0809" stroke="#00AE99" stroke-width="3"/>
-<path d="M52.0808 37.9193C48.8603 34.6988 48.8603 29.4774 52.0808 26.2569C55.3013 23.0364 60.5227 23.0364 63.7432 26.2569" stroke="#00AE99" stroke-width="3"/>
-</svg>
diff --git a/packages/website/ts/icons/illustrations/tokens.svg b/packages/website/ts/icons/illustrations/tokens.svg
deleted file mode 100644
index 966615265..000000000
--- a/packages/website/ts/icons/illustrations/tokens.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="249" height="251" viewBox="0 0 152 152" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M192 112c30.376 0 55-24.624 55-55S222.376 2 192 2s-55 24.624-55 55 24.624 55 55 55z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M206.4 15.3v13.6H220" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M220 28.9v42h-37.3V15.3h23.7L220 28.9zM177.6 98.7V85.1H164" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M164 85.1v-42h37.3v55.6h-23.7L164 85.1zM57 113.6c30.376 0 55-24.624 55-55s-24.624-55-55-55-55 24.624-55 55 24.624 55 55 55z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M57 102.6c24.3 0 44-19.7 44-44s-19.7-44-44-44-44 19.7-44 44 19.7 44 44 44z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M45.4 76.2v1.5h26.7v-9.9h-7.8V36.3h-9.461l-.381.259-8.4 5.7-.658.446V54.63l2.342-1.589 6.058-4.11V67.8h-8.4V76.2z" stroke="#00AE99" stroke-width="3"/><path d="M13 58.3c9.1-1.5 16.1-9.3 16.1-18.9 0-4.3-1.4-8.2-3.8-11.4-7.5 7.9-12.2 18.6-12.3 30.3zM13 58.9c.1 11.8 4.8 22.4 12.3 30.3 2.4-3.2 3.8-7.1 3.8-11.4 0-9.6-7-17.5-16.1-18.9zM101 58.3c-9.1-1.5-16.1-9.3-16.1-18.9 0-4.3 1.4-8.2 3.8-11.4 7.5 7.9 12.2 18.6 12.3 30.3zM101 58.9c-.1 11.8-4.8 22.4-12.3 30.3-2.4-3.2-3.8-7.1-3.8-11.4 0-9.6 7-17.5 16.1-18.9zM57 248.6c30.376 0 55-24.624 55-55s-24.624-55-55-55-55 24.624-55 55 24.624 55 55 55z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M57 248.6c30.376 0 55-24.624 55-55s-24.624-55-55-55-55 24.624-55 55 24.624 55 55 55z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M62.6 190.8v-32.3h4.6v-9.1H46.8v9.1h4.6v32.3c-10.5 2.5-18.3 12-18.3 23.2 0 13.2 10.7 23.9 23.9 23.9s23.9-10.7 23.9-23.9c0-11.3-7.8-20.7-18.3-23.2z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M67.2 149.3H46.8v9.1h20.4v-9.1zM37.1 200.6h39.7M192 248.6c30.376 0 55-24.624 55-55s-24.624-55-55-55-55 24.624-55 55 24.624 55 55 55z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/><path d="M192 149.6l-36.4 52.9H192l.1 35.1 36.3-53H192v-35z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/icons/illustrations/vcIntroductions.svg b/packages/website/ts/icons/illustrations/vcIntroductions.svg
deleted file mode 100755
index 024cadab3..000000000
--- a/packages/website/ts/icons/illustrations/vcIntroductions.svg
+++ /dev/null
@@ -1,11 +0,0 @@
-<svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg">
-<path d="M2 45C2 68.7578 21.2421 88 45 88C68.7579 88 88 68.7578 88 45C88 21.6448 69.3906 2.63278 46.1793 2.02876C45.7478 2.02876 45.3452 2 44.9137 2C21.2134 2.02876 2 21.2709 2 45Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10" stroke-linejoin="round"/>
-<path d="M45 4L9 28H81L45 4Z" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M40 28L40 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M26 28L26 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M63 28L63 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M17 28L17 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M50 28L50 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M73 28L73 70" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-<path d="M12 72.5V71H78V72.5M71.5 79H18.5" stroke="#00AE99" stroke-width="3" stroke-miterlimit="10"/>
-</svg>
diff --git a/packages/website/ts/icons/logo-with-type.svg b/packages/website/ts/icons/logo-with-type.svg
deleted file mode 100644
index 25abf149e..000000000
--- a/packages/website/ts/icons/logo-with-type.svg
+++ /dev/null
@@ -1 +0,0 @@
-<svg width="81" height="40" viewBox="0 0 81 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8.402 25.28l3.105-3.212-3.86-5.209-4.915-6.954A19.904 19.904 0 0 0 0 20c0 6.1 2.732 11.562 7.04 15.23l6.239-4.408a12.796 12.796 0 0 1-4.877-5.541zM14.72 8.402l3.212 3.105 5.209-3.86 6.954-4.915A19.904 19.904 0 0 0 20 0C13.9 0 8.438 2.732 4.77 7.04l4.408 6.239a12.795 12.795 0 0 1 5.541-4.877zM28.493 17.932l3.86 5.209 4.915 6.954A19.904 19.904 0 0 0 40 20c0-6.1-2.732-11.562-7.04-15.23L26.72 9.178a12.796 12.796 0 0 1 4.877 5.541l-3.105 3.213zM35.23 32.96l-4.408-6.239a12.795 12.795 0 0 1-5.541 4.877l-3.213-3.105-5.209 3.86-6.954 4.915A19.904 19.904 0 0 0 20 40c6.1 0 11.562-2.732 15.23-7.04z" fill="#fff"/><path fill-rule="evenodd" clip-rule="evenodd" d="M51.726 19.689c0-6.471 2.704-9.689 6.912-9.689 4.19 0 6.947 3.27 6.947 9.689 0 6.418-2.758 9.671-6.947 9.671-4.19 0-6.912-3.253-6.912-9.671zm6.894-7.59c-3.04 0-4.543 2.815-4.543 7.607 0 2.256.336 4.005.972 5.282l5.975-12.085c-.69-.542-1.485-.804-2.404-.804zm-2.351 14.428c.672.507 1.45.77 2.369.77 3.04 0 4.578-2.834 4.578-7.59 0-2.204-.318-3.936-.972-5.247l-5.975 12.067zm24.377-10.93l-3.853 6.47L81 29.027h-2.581l-3.377-5.63h-.954l-3.447 5.63h-2.51l4.224-6.872-3.8-6.559h2.44l3.11 5.334h.973l3.182-5.334h2.386z" fill="#fff"/></svg> \ No newline at end of file
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
deleted file mode 100644
index 7bb018d17..000000000
--- a/packages/website/ts/index.tsx
+++ /dev/null
@@ -1,222 +0,0 @@
-import { MuiThemeProvider } from 'material-ui/styles';
-import * as React from 'react';
-import { render } from 'react-dom';
-import { Provider } from 'react-redux';
-import { BrowserRouter as Router, Redirect, Route, Switch } from 'react-router-dom';
-import { MetaTags } from 'ts/components/meta_tags';
-import { DocsHome } from 'ts/containers/docs_home';
-import { FAQ } from 'ts/containers/faq';
-import { NotFound } from 'ts/containers/not_found';
-import { Wiki } from 'ts/containers/wiki';
-import { createLazyComponent } from 'ts/lazy_component';
-import { trackedTokenStorage } from 'ts/local_storage/tracked_token_storage';
-import { tradeHistoryStorage } from 'ts/local_storage/trade_history_storage';
-import { store } from 'ts/redux/store';
-import { WebsiteLegacyPaths, WebsitePaths } from 'ts/types';
-import { muiTheme } from 'ts/utils/mui_theme';
-
-// Next (new website) routes. We should rename them later
-import { NextAboutJobs } from 'ts/pages/about/jobs';
-import { NextAboutMission } from 'ts/pages/about/mission';
-import { NextAboutPress } from 'ts/pages/about/press';
-import { NextAboutTeam } from 'ts/pages/about/team';
-import { NextEcosystem } from 'ts/pages/ecosystem';
-import { Next0xInstant } from 'ts/pages/instant';
-import { NextLanding } from 'ts/pages/landing';
-import { NextLaunchKit } from 'ts/pages/launch_kit';
-import { NextMarketMaker } from 'ts/pages/market_maker';
-import { NextWhy } from 'ts/pages/why';
-
-// Check if we've introduced an update that requires us to clear the tradeHistory local storage entries
-tradeHistoryStorage.clearIfRequired();
-trackedTokenStorage.clearIfRequired();
-
-import 'less/all.less';
-
-// We pass modulePromise returning lambda instead of module promise,
-// cause we only want to import the module when the user navigates to the page.
-// At the same time webpack statically parses for import() to determine bundle chunk split points
-// so each lazy import needs it's own `import()` declaration.
-
-const LazyPortal = createLazyComponent('Portal', async () =>
- import(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
-);
-const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'),
-);
-const LazyContractWrappersDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "contractWrapperDocs" */ 'ts/containers/contract_wrappers_documentation'),
-);
-const LazyMigrationsDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "migrationsDocs" */ 'ts/containers/migrations_documentation'),
-);
-const LazyOrderWatcherDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "orderWatcherDocs" */ 'ts/containers/order_watcher_documentation'),
-);
-const LazySmartContractsDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "smartContractDocs" */ 'ts/containers/smart_contracts_documentation'),
-);
-const LazyConnectDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "connectDocs" */ 'ts/containers/connect_documentation'),
-);
-const LazyWeb3WrapperDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "web3WrapperDocs" */ 'ts/containers/web3_wrapper_documentation'),
-);
-const LazySolCompilerDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "solCompilerDocs" */ 'ts/containers/sol_compiler_documentation'),
-);
-const LazyJSONSchemasDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "jsonSchemasDocs" */ 'ts/containers/json_schemas_documentation'),
-);
-const LazySolCoverageDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "solCoverageDocs" */ 'ts/containers/sol_coverage_documentation'),
-);
-const LazySolTraceDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "solTraceDocs" */ 'ts/containers/sol_trace_documentation'),
-);
-const LazySolProfilerDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "solProfilerDocs" */ 'ts/containers/sol_profiler_documentation'),
-);
-const LazySubprovidersDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "subproviderDocs" */ 'ts/containers/subproviders_documentation'),
-);
-const LazyOrderUtilsDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "orderUtilsDocs" */ 'ts/containers/order_utils_documentation'),
-);
-const LazyEthereumTypesDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "ethereumTypesDocs" */ 'ts/containers/ethereum_types_documentation'),
-);
-const LazyAssetBuyerDocumentation = createLazyComponent('Documentation', async () =>
- import(/* webpackChunkName: "assetBuyerDocs" */ 'ts/containers/asset_buyer_documentation'),
-);
-
-const DOCUMENT_TITLE = '0x: The Protocol for Trading Tokens';
-const DOCUMENT_DESCRIPTION = 'An Open Protocol For Decentralized Exchange On The Ethereum Blockchain';
-
-render(
- <div>
- <MetaTags title={DOCUMENT_TITLE} description={DOCUMENT_DESCRIPTION} />
- <Router>
- <div>
- <MuiThemeProvider muiTheme={muiTheme}>
- <Provider store={store}>
- <div>
- <Switch>
- {/* Next (new site) routes */}
- <Route exact={true} path="/" component={NextLanding as any} />
- <Route exact={true} path={WebsitePaths.Why} component={NextWhy as any} />
- <Route
- exact={true}
- path={WebsitePaths.MarketMaker}
- component={NextMarketMaker as any}
- />
- <Route exact={true} path={WebsitePaths.Instant} component={Next0xInstant as any} />
- <Route exact={true} path={WebsitePaths.LaunchKit} component={NextLaunchKit as any} />
- <Route exact={true} path={WebsitePaths.Ecosystem} component={NextEcosystem as any} />
- <Route
- exact={true}
- path={WebsitePaths.AboutMission}
- component={NextAboutMission as any}
- />
- <Route exact={true} path={WebsitePaths.AboutTeam} component={NextAboutTeam as any} />
- <Route exact={true} path={WebsitePaths.AboutPress} component={NextAboutPress as any} />
- <Route exact={true} path={WebsitePaths.AboutJobs} component={NextAboutJobs as any} />
- {/*
- Note(ez): We remove/replace all old routes with next routes
- once we're ready to put a ring on it. for now let's keep em there for reference
- */}
- <Redirect from="/otc" to={`${WebsitePaths.Portal}`} />
- <Route path={WebsitePaths.Portal} component={LazyPortal} />
- <Route path={WebsitePaths.FAQ} component={FAQ as any} />
- <Route path={WebsitePaths.Wiki} component={Wiki as any} />
-
- <Route
- path={`${WebsitePaths.ZeroExJs}/:version?`}
- component={LazyZeroExJSDocumentation}
- />
- <Route
- path={`${WebsitePaths.ContractWrappers}/:version?`}
- component={LazyContractWrappersDocumentation}
- />
- <Route
- path={`${WebsitePaths.Migrations}/:version?`}
- component={LazyMigrationsDocumentation}
- />
- <Route
- path={`${WebsitePaths.OrderWatcher}/:version?`}
- component={LazyOrderWatcherDocumentation}
- />
- <Route
- path={`${WebsitePaths.Connect}/:version?`}
- component={LazyConnectDocumentation}
- />
- <Route
- path={`${WebsitePaths.SolCompiler}/:version?`}
- component={LazySolCompilerDocumentation}
- />
- <Route
- path={`${WebsitePaths.SolCoverage}/:version?`}
- component={LazySolCoverageDocumentation}
- />
- <Route
- path={`${WebsitePaths.SolTrace}/:version?`}
- component={LazySolTraceDocumentation}
- />
- <Route
- path={`${WebsitePaths.SolProfiler}/:version?`}
- component={LazySolProfilerDocumentation}
- />
- <Route
- path={`${WebsitePaths.JSONSchemas}/:version?`}
- component={LazyJSONSchemasDocumentation}
- />
- <Route
- path={`${WebsitePaths.Subproviders}/:version?`}
- component={LazySubprovidersDocumentation}
- />
- <Route
- path={`${WebsitePaths.OrderUtils}/:version?`}
- component={LazyOrderUtilsDocumentation}
- />
- <Route
- path={`${WebsitePaths.Web3Wrapper}/:version?`}
- component={LazyWeb3WrapperDocumentation}
- />
- <Route
- path={`${WebsitePaths.SmartContracts}/:version?`}
- component={LazySmartContractsDocumentation}
- />
- <Route
- path={`${WebsitePaths.EthereumTypes}/:version?`}
- component={LazyEthereumTypesDocumentation}
- />
- <Route
- path={`${WebsitePaths.AssetBuyer}/:version?`}
- component={LazyAssetBuyerDocumentation}
- />
- <Route path={WebsitePaths.Docs} component={DocsHome as any} />
- {/* Legacy endpoints */}
- <Route
- path={`${WebsiteLegacyPaths.ZeroExJs}/:version?`}
- component={LazyZeroExJSDocumentation}
- />
- <Route
- path={`${WebsiteLegacyPaths.Web3Wrapper}/:version?`}
- component={LazyWeb3WrapperDocumentation}
- />
- <Route
- path={`${WebsiteLegacyPaths.Deployer}/:version?`}
- component={LazySolCompilerDocumentation}
- />
- <Redirect from={WebsiteLegacyPaths.Jobs} to={WebsitePaths.AboutJobs} />
- <Redirect from={WebsitePaths.Careers} to={WebsitePaths.AboutJobs} />
- <Route component={NotFound as any} />
- </Switch>
- </div>
- </Provider>
- </MuiThemeProvider>
- </div>
- </Router>
- </div>,
- document.getElementById('app'),
-);
diff --git a/packages/website/ts/lazy_component.tsx b/packages/website/ts/lazy_component.tsx
deleted file mode 100644
index 9d3b9944a..000000000
--- a/packages/website/ts/lazy_component.tsx
+++ /dev/null
@@ -1,66 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-
-interface LazyComponentProps {
- reactComponentPromise: Promise<React.ComponentClass<any>>;
- reactComponentProps: any;
-}
-
-interface LazyComponentState {
- component?: React.ComponentClass<any>;
-}
-
-/**
- * This component is used for rendering components that are lazily loaded from other chunks.
- * Source: https://reacttraining.com/react-router/web/guides/code-splitting
- */
-export class LazyComponent extends React.Component<LazyComponentProps, LazyComponentState> {
- constructor(props: LazyComponentProps) {
- super(props);
- this.state = {
- component: undefined,
- };
- }
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._loadComponentFireAndForgetAsync(this.props);
- }
- public componentWillReceiveProps(nextProps: LazyComponentProps): void {
- if (nextProps.reactComponentPromise !== this.props.reactComponentPromise) {
- // tslint:disable-next-line:no-floating-promises
- this._loadComponentFireAndForgetAsync(nextProps);
- }
- }
- public render(): React.ReactNode {
- return _.isUndefined(this.state.component)
- ? null
- : React.createElement(this.state.component, this.props.reactComponentProps);
- }
- private async _loadComponentFireAndForgetAsync(props: LazyComponentProps): Promise<void> {
- const component = await props.reactComponentPromise;
- this.setState({
- component,
- });
- }
-}
-
-/**
- * [createLazyComponent description]
- * @param componentName name of exported component
- * @param lazyImport lambda returning module promise
- * we pass a lambda because we only want to require a module if it's used
- * @example `const LazyPortal = createLazyComponent('Portal', () => import<any>('ts/containers/portal'));``
- */
-export const createLazyComponent = (componentName: string, lazyImport: () => Promise<any>) => {
- return (props: any) => {
- const reactComponentPromise = (async (): Promise<React.ComponentClass<any>> => {
- const mod = await lazyImport();
- const component = mod[componentName];
- if (_.isUndefined(component)) {
- throw new Error(`Did not find exported component: ${componentName}`);
- }
- return component;
- })();
- return <LazyComponent reactComponentPromise={reactComponentPromise} reactComponentProps={props} />;
- };
-};
diff --git a/packages/website/ts/local_storage/local_storage.ts b/packages/website/ts/local_storage/local_storage.ts
deleted file mode 100644
index 13d9ca401..000000000
--- a/packages/website/ts/local_storage/local_storage.ts
+++ /dev/null
@@ -1,45 +0,0 @@
-import * as _ from 'lodash';
-
-export const localStorage = {
- doesExist(): boolean {
- return !!window.localStorage;
- },
- getItemIfExists(key: string): string {
- if (!localStorage.doesExist) {
- return undefined;
- }
- const item = window.localStorage.getItem(key);
- if (_.isNull(item) || item === 'undefined') {
- return '';
- }
- return item;
- },
- setItem(key: string, value: string): void {
- if (!localStorage.doesExist || _.isUndefined(value)) {
- return;
- }
- window.localStorage.setItem(key, value);
- },
- removeItem(key: string): void {
- if (!localStorage.doesExist) {
- return;
- }
- window.localStorage.removeItem(key);
- },
- getObject(key: string): object | undefined {
- const item = localStorage.getItemIfExists(key);
- if (item) {
- return JSON.parse(item);
- }
- return undefined;
- },
- setObject(key: string, value: object): void {
- localStorage.setItem(key, JSON.stringify(value));
- },
- getAllKeys(): string[] {
- if (!localStorage.doesExist) {
- return [];
- }
- return _.keys(window.localStorage);
- },
-};
diff --git a/packages/website/ts/local_storage/state_storage.ts b/packages/website/ts/local_storage/state_storage.ts
deleted file mode 100644
index 517784b5b..000000000
--- a/packages/website/ts/local_storage/state_storage.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { localStorage } from 'ts/local_storage/local_storage';
-import { INITIAL_STATE, State } from 'ts/redux/reducer';
-
-const STORAGE_NAME = 'persistedState';
-
-export const stateStorage = {
- saveState(partialState: Partial<State>): void {
- localStorage.setObject(STORAGE_NAME, partialState);
- },
- getPersistedState(): Partial<State> {
- return localStorage.getObject(STORAGE_NAME);
- },
- getPersistedDefaultState(): State {
- return { ...INITIAL_STATE, ...stateStorage.getPersistedState() };
- },
-};
diff --git a/packages/website/ts/local_storage/tracked_token_storage.ts b/packages/website/ts/local_storage/tracked_token_storage.ts
deleted file mode 100644
index b1b579aef..000000000
--- a/packages/website/ts/local_storage/tracked_token_storage.ts
+++ /dev/null
@@ -1,71 +0,0 @@
-import * as _ from 'lodash';
-import { localStorage } from 'ts/local_storage/local_storage';
-import { Token, TokenByAddress, TrackedTokensByUserAddress } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-
-const TRACKED_TOKENS_KEY = 'trackedTokens';
-const TRACKED_TOKENS_CLEAR_KEY = 'lastClearTrackedTokensDate';
-
-export const trackedTokenStorage = {
- // Clear trackedTokens localStorage if we've updated the config variable in an update
- // that introduced a backward incompatible change requiring the tracked tokens to be re-set
- clearIfRequired(): void {
- const lastClearFillDate = localStorage.getItemIfExists(TRACKED_TOKENS_CLEAR_KEY);
- if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE) {
- localStorage.removeItem(TRACKED_TOKENS_KEY);
- }
- localStorage.setItem(TRACKED_TOKENS_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE);
- },
- addTrackedTokenToUser(userAddress: string, networkId: number, token: Token): void {
- const trackedTokensByUserAddress = trackedTokenStorage.getTrackedTokensByUserAddress();
- let trackedTokensByNetworkId = trackedTokensByUserAddress[userAddress];
- if (_.isUndefined(trackedTokensByNetworkId)) {
- trackedTokensByNetworkId = {};
- }
- const trackedTokens = !_.isUndefined(trackedTokensByNetworkId[networkId])
- ? trackedTokensByNetworkId[networkId]
- : [];
- trackedTokens.push(token);
- trackedTokensByNetworkId[networkId] = trackedTokens;
- trackedTokensByUserAddress[userAddress] = trackedTokensByNetworkId;
- const trackedTokensByUserAddressJSONString = JSON.stringify(trackedTokensByUserAddress);
- localStorage.setItem(TRACKED_TOKENS_KEY, trackedTokensByUserAddressJSONString);
- },
- getTrackedTokensByUserAddress(): TrackedTokensByUserAddress {
- const trackedTokensJSONString = localStorage.getItemIfExists(TRACKED_TOKENS_KEY);
- if (_.isEmpty(trackedTokensJSONString)) {
- return {};
- }
- const trackedTokensByUserAddress = JSON.parse(trackedTokensJSONString);
- return trackedTokensByUserAddress;
- },
- getTrackedTokensByAddress(userAddress: string, networkId: number): TokenByAddress {
- const trackedTokensByAddress: TokenByAddress = {};
- const trackedTokensJSONString = localStorage.getItemIfExists(TRACKED_TOKENS_KEY);
- if (_.isEmpty(trackedTokensJSONString)) {
- return trackedTokensByAddress;
- }
- const trackedTokensByUserAddress = JSON.parse(trackedTokensJSONString);
- const trackedTokensByNetworkId = trackedTokensByUserAddress[userAddress];
- if (_.isUndefined(trackedTokensByNetworkId)) {
- return trackedTokensByAddress;
- }
- const trackedTokens = trackedTokensByNetworkId[networkId];
- _.each(trackedTokens, (trackedToken: Token) => {
- trackedTokensByAddress[trackedToken.address] = trackedToken;
- });
- return trackedTokensByAddress;
- },
- removeTrackedToken(userAddress: string, networkId: number, tokenAddress: string): void {
- const trackedTokensByUserAddress = trackedTokenStorage.getTrackedTokensByUserAddress();
- const trackedTokensByNetworkId = trackedTokensByUserAddress[userAddress];
- const trackedTokens = trackedTokensByNetworkId[networkId];
- const remainingTrackedTokens = _.filter(trackedTokens, (token: Token) => {
- return token.address !== tokenAddress;
- });
- trackedTokensByNetworkId[networkId] = remainingTrackedTokens;
- trackedTokensByUserAddress[userAddress] = trackedTokensByNetworkId;
- const trackedTokensByUserAddressJSONString = JSON.stringify(trackedTokensByUserAddress);
- localStorage.setItem(TRACKED_TOKENS_KEY, trackedTokensByUserAddressJSONString);
- },
-};
diff --git a/packages/website/ts/local_storage/trade_history_storage.tsx b/packages/website/ts/local_storage/trade_history_storage.tsx
deleted file mode 100644
index ef6a0a1aa..000000000
--- a/packages/website/ts/local_storage/trade_history_storage.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import ethUtil from 'ethereumjs-util';
-import * as _ from 'lodash';
-import { localStorage } from 'ts/local_storage/local_storage';
-import { Fill } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-
-const FILLS_KEY = 'fills';
-const FILLS_LATEST_BLOCK = 'fillsLatestBlock';
-const FILL_CLEAR_KEY = 'lastClearFillDate';
-
-export const tradeHistoryStorage = {
- // Clear all fill related localStorage if we've updated the config variable in an update
- // that introduced a backward incompatible change requiring the user to re-fetch the fills from
- // the blockchain
- clearIfRequired(): void {
- const lastClearFillDate = localStorage.getItemIfExists(FILL_CLEAR_KEY);
- if (lastClearFillDate !== configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE) {
- const localStorageKeys = localStorage.getAllKeys();
- _.each(localStorageKeys, key => {
- if (_.startsWith(key, `${FILLS_KEY}-`) || _.startsWith(key, `${FILLS_LATEST_BLOCK}-`)) {
- localStorage.removeItem(key);
- }
- });
- }
- localStorage.setItem(FILL_CLEAR_KEY, configs.LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE);
- },
- addFillToUser(userAddress: string, networkId: number, fill: Fill): void {
- const fillsByHash = tradeHistoryStorage.getUserFillsByHash(userAddress, networkId);
- const fillHash = tradeHistoryStorage._getFillHash(fill);
- const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
- if (doesFillExist) {
- return; // noop
- }
- fillsByHash[fillHash] = fill;
- const userFillsJSONString = JSON.stringify(fillsByHash);
- const userFillsKey = tradeHistoryStorage._getUserFillsKey(userAddress, networkId);
- localStorage.setItem(userFillsKey, userFillsJSONString);
- },
- removeFillFromUser(userAddress: string, networkId: number, fill: Fill): void {
- const fillsByHash = tradeHistoryStorage.getUserFillsByHash(userAddress, networkId);
- const fillHash = tradeHistoryStorage._getFillHash(fill);
- const doesFillExist = !_.isUndefined(fillsByHash[fillHash]);
- if (!doesFillExist) {
- return; // noop
- }
- delete fillsByHash[fillHash];
- const userFillsJSONString = JSON.stringify(fillsByHash);
- const userFillsKey = tradeHistoryStorage._getUserFillsKey(userAddress, networkId);
- localStorage.setItem(userFillsKey, userFillsJSONString);
- },
- getUserFillsByHash(userAddress: string, networkId: number): { [fillHash: string]: Fill } {
- const userFillsKey = tradeHistoryStorage._getUserFillsKey(userAddress, networkId);
- const userFillsJSONString = localStorage.getItemIfExists(userFillsKey);
- if (_.isEmpty(userFillsJSONString)) {
- return {};
- }
- const userFillsByHash = JSON.parse(userFillsJSONString);
- _.each(userFillsByHash, fill => {
- fill.paidMakerFee = new BigNumber(fill.paidMakerFee);
- fill.paidTakerFee = new BigNumber(fill.paidTakerFee);
- fill.filledTakerTokenAmount = new BigNumber(fill.filledTakerTokenAmount);
- fill.filledMakerTokenAmount = new BigNumber(fill.filledMakerTokenAmount);
- });
- return userFillsByHash;
- },
- getFillsLatestBlock(userAddress: string, networkId: number): number {
- const userFillsLatestBlockKey = tradeHistoryStorage._getFillsLatestBlockKey(userAddress, networkId);
- const blockNumberStr = localStorage.getItemIfExists(userFillsLatestBlockKey);
- if (_.isEmpty(blockNumberStr)) {
- return constants.GENESIS_ORDER_BLOCK_BY_NETWORK_ID[networkId];
- }
- const blockNumber = _.parseInt(blockNumberStr);
- return blockNumber;
- },
- setFillsLatestBlock(userAddress: string, networkId: number, blockNumber: number): void {
- const userFillsLatestBlockKey = tradeHistoryStorage._getFillsLatestBlockKey(userAddress, networkId);
- localStorage.setItem(userFillsLatestBlockKey, `${blockNumber}`);
- },
- _getUserFillsKey(userAddress: string, networkId: number): string {
- const userFillsKey = `${FILLS_KEY}-${userAddress}-${networkId}`;
- return userFillsKey;
- },
- _getFillsLatestBlockKey(userAddress: string, networkId: number): string {
- const userFillsLatestBlockKey = `${FILLS_LATEST_BLOCK}-${userAddress}-${networkId}`;
- return userFillsLatestBlockKey;
- },
- _getFillHash(fill: Fill): string {
- const fillJSON = JSON.stringify(fill);
- const fillHash = ethUtil.sha256(fillJSON);
- return fillHash.toString('hex');
- },
-};
diff --git a/packages/website/ts/pages/about/jobs.tsx b/packages/website/ts/pages/about/jobs.tsx
deleted file mode 100644
index 85c25a75f..000000000
--- a/packages/website/ts/pages/about/jobs.tsx
+++ /dev/null
@@ -1,238 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled from 'styled-components';
-
-import { AboutPageLayout } from 'ts/components/aboutPageLayout';
-import { Link } from 'ts/components/link';
-import { Column, FlexWrap, Section } from 'ts/components/newLayout';
-import { Heading, Paragraph } from 'ts/components/text';
-import { Container } from 'ts/components/ui/container';
-import { colors } from 'ts/style/colors';
-import { WebsiteBackendJobInfo } from 'ts/types';
-import { backendClient } from 'ts/utils/backend_client';
-import { constants } from 'ts/utils/constants';
-
-const OPEN_POSITIONS_HASH = 'positions';
-
-interface PositionProps {
- title: string;
- location: string;
- href: string;
-}
-
-interface PositionItemProps {
- position: PositionProps;
-}
-
-const Position: React.FunctionComponent<PositionItemProps> = (props: PositionItemProps) => {
- const { position } = props;
- return (
- <PositionWrap>
- <StyledColumn width="50%">
- <Container position="relative" top="-3px" paddingRight="12px">
- <Heading asElement="h3" size="small" fontWeight="400" marginBottom="0">
- <a href={position.href} target="_blank">
- {position.title}
- </a>
- </Heading>
- </Container>
- </StyledColumn>
-
- <StyledColumn width="30%" padding="0 40px 0 0">
- <Paragraph isMuted={true} marginBottom="0">
- {position.location}
- </Paragraph>
- </StyledColumn>
-
- <StyledColumn width="20%">
- <Paragraph marginBottom="0" textAlign="right" color={colors.brandDark} fontWeight={400}>
- <Link href={position.href} target="_blank">
- Apply
- </Link>
- </Paragraph>
- </StyledColumn>
- </PositionWrap>
- );
-};
-
-export interface NextAboutJobsProps {}
-interface NextAboutJobsState {
- jobInfos: WebsiteBackendJobInfo[];
-}
-
-export class NextAboutJobs extends React.Component<NextAboutJobsProps, NextAboutJobsState> {
- private _isUnmounted: boolean;
- private static _convertJobInfoToPositionProps(jobInfo: WebsiteBackendJobInfo): PositionProps {
- return {
- title: jobInfo.title,
- location: jobInfo.office,
- href: jobInfo.url,
- };
- }
- constructor(props: NextAboutJobsProps) {
- super(props);
- this.state = {
- jobInfos: [],
- };
- }
-
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._fetchJobInfosAsync();
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const positions = this.state.jobInfos.map(jobInfo => NextAboutJobs._convertJobInfoToPositionProps(jobInfo));
- return (
- <AboutPageLayout
- title="Join Us in Our Mission"
- description={
- <>
- <Paragraph size="medium">
- To create a tokenized world where all value can flow freely.
- </Paragraph>
- <Paragraph size="medium">
- We are growing an ecosystem of businesses and projects by solving difficult challenges to
- make our technology intuitive, flexible, and accessible to all. Join us in building
- infrastructure upon which the exchange of all assets will take place.
- </Paragraph>
- </>
- }
- linkLabel="Our mission and values"
- href={constants.URL_MISSION_AND_VALUES_BLOG_POST}
- >
- <DocumentTitle title="Jobs at 0x" />
- <Section bgColor="#F3F6F4" isFlex={true} maxWidth="1170px" wrapWidth="100%">
- <Column maxWidth="442px">
- <Heading size="medium" marginBottom="30px">
- Powered by a Diverse, Global Community
- </Heading>
-
- <Paragraph>
- We're a highly technical team with varied backgrounds in engineering, science, business,
- finance, and research. While the Core Team is headquartered in San Francisco, there are 30+
- teams building on 0x and hundreds of thousands of participants behind our efforts worldwide.
- We're passionate about open-source software and decentralized technology's potential to act
- as an equalizing force in the world.
- </Paragraph>
- </Column>
-
- <Column maxWidth="600px">
- <ImageWrap>
- <img src="/images/jobs/map@2x.png" height="365" alt="Map of community" />
- </ImageWrap>
- </Column>
- </Section>
-
- <Section isFlex={true} maxWidth="1170px" wrapWidth="100%">
- <Column>
- <Heading size="medium">Benefits</Heading>
- </Column>
-
- <Column maxWidth="826px">
- <BenefitsList>
- <li>Comprehensive Insurance</li>
- <li>Unlimited Vacation</li>
- <li>Meals and snacks provided daily</li>
- <li>Flexible hours and liberal work-from-home-policy</li>
- <li>Supportive of remote working</li>
- <li>Transportation, phone, and wellness expense</li>
- <li>Relocation assistance</li>
- <li>Optional team excursions</li>
- <li>Competitive salary</li>
- <li>Cryptocurrency based compensation</li>
- </BenefitsList>
- </Column>
- </Section>
-
- <Section id={OPEN_POSITIONS_HASH} isFlex={true} maxWidth="1170px" wrapWidth="100%">
- <Column>
- <Heading size="medium">
- Current
- <br />
- Openings
- </Heading>
- </Column>
-
- <Column maxWidth="826px">
- {_.map(positions, (position, index) => (
- <Position key={`position-${index}`} position={position} />
- ))}
- </Column>
- </Section>
- </AboutPageLayout>
- );
- }
- private async _fetchJobInfosAsync(): Promise<void> {
- try {
- if (!this._isUnmounted) {
- this.setState({
- jobInfos: [],
- });
- }
- const jobInfos = await backendClient.getJobInfosAsync();
- if (!this._isUnmounted) {
- this.setState({
- jobInfos,
- });
- }
- } catch (error) {
- if (!this._isUnmounted) {
- this.setState({
- jobInfos: [],
- });
- }
- }
- }
-}
-
-const BenefitsList = styled.ul`
- color: #000;
- font-weight: 300;
- line-height: 1.444444444;
- list-style: disc;
- columns: auto 2;
- column-gap: 80px;
-
- li {
- margin-bottom: 1em;
- }
-`;
-
-const ImageWrap = styled.figure`
- @media (min-width: 768px) {
- height: 600px;
- padding-left: 60px;
- display: flex;
- align-items: flex-end;
- }
-`;
-
-const StyledColumn = styled(Column)`
- flex-shrink: 0;
-
- @media (max-width: 768px) {
- & + & {
- margin-top: 15px;
- }
- }
-`;
-
-const PositionWrap = styled(FlexWrap)`
- margin-bottom: 40px;
- padding-bottom: 30px;
- position: relative;
-
- &:after {
- content: '';
- width: 100%;
- position: absolute;
- bottom: 0;
- left: 0;
- height: 1px;
- background-color: #e3e3e3;
- }
-`;
diff --git a/packages/website/ts/pages/about/mission.tsx b/packages/website/ts/pages/about/mission.tsx
deleted file mode 100644
index ab8949fae..000000000
--- a/packages/website/ts/pages/about/mission.tsx
+++ /dev/null
@@ -1,97 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled from 'styled-components';
-
-import { AboutPageLayout } from 'ts/components/aboutPageLayout';
-import { Definition } from 'ts/components/definition';
-import { Image } from 'ts/components/image';
-import { Column, Section } from 'ts/components/newLayout';
-import { Heading } from 'ts/components/text';
-import { constants } from 'ts/utils/constants';
-
-const values = [
- {
- title: 'Do The Right Thing',
- description:
- 'We acknowledge the broad subjectivity behind doing “the right thing,” and are committed to rigorously exploring its nuance in our decision making. We believe this responsibility drives our decision making above all else, and pledge to act in the best interest of our peers, community, and society as a whole.',
- icon: 'right-thing',
- },
- {
- title: 'Consistently Ship',
- description:
- 'Achieving our mission requires dedication and diligence. We aspire to be an organization that consistently ships. We set high-impact goals that are rooted in data and pride ourselves in consistently outputting outstanding results across the organization.',
- icon: 'consistently-ship',
- },
- {
- title: 'Focus on Long-term Impact',
- description:
- 'We anticipate that over time, awareness of the fundamentally disruptive nature of frictionless global exchange will cause some to see this technology as a threat. There will be setbacks, some will claim that this technology is too disruptive, and we will face adversity. Persistence and a healthy long-term focus will see us through these battles.',
- icon: 'long-term-impact',
- },
-];
-
-export const NextAboutMission = () => (
- <AboutPageLayout
- title="Creating a tokenized world where all value can flow freely."
- description="0x is important infrastructure for the emerging crypto economy and enables markets to be created that couldn't have existed before. As more assets become tokenized, public blockchains provide the opportunity to establish a new financial stack that is more efficient, transparent, and equitable than any system in the past."
- linkLabel="Our mission and values"
- href={constants.URL_MISSION_AND_VALUES_BLOG_POST}
- >
- <DocumentTitle title="Our Mission - 0x" />
- <Section isFullWidth={true} isPadded={false}>
- <FullWidthImage>
- <Image src="/images/about/about-office.png" alt="0x Offices" isCentered={true} />
- </FullWidthImage>
- </Section>
-
- <Section isFlex={true} maxWidth="1170px" wrapWidth="100%">
- <Column>
- <Heading size="medium" maxWidth="226px">
- Core Values
- </Heading>
- </Column>
-
- <Column width="70%" maxWidth="826px">
- <Column width="100%" maxWidth="800px">
- {_.map(values, (item, index) => (
- <StyledDefinition
- icon={item.icon}
- title={item.title}
- description={item.description}
- isInlineIcon={true}
- iconSize="large"
- />
- ))}
- </Column>
- </Column>
- </Section>
- </AboutPageLayout>
-);
-
-const StyledDefinition = styled(Definition)`
- & + & {
- margin-top: 30px;
- padding-top: 30px;
- border-top: 1px solid #eaeaea;
- }
-`;
-
-const FullWidthImage = styled.figure`
- width: 100vw;
- margin-left: calc(50% - 50vw);
-
- img {
- width: 100%;
- height: 100%;
- object-fit: cover;
- }
-
- @media (min-width: 768px) {
- height: 500px;
- }
-
- @media (max-width: 768px) {
- height: 400px;
- }
-`;
diff --git a/packages/website/ts/pages/about/press.tsx b/packages/website/ts/pages/about/press.tsx
deleted file mode 100644
index 03003d656..000000000
--- a/packages/website/ts/pages/about/press.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled from 'styled-components';
-
-import { AboutPageLayout } from 'ts/components/aboutPageLayout';
-import { Button } from 'ts/components/button';
-import { Column, FlexWrap } from 'ts/components/newLayout';
-import { Paragraph } from 'ts/components/text';
-
-interface HighlightProps {
- logo: string;
- title?: string;
- text: string;
- href: string;
-}
-
-interface HighlightItemProps {
- highlight: HighlightProps;
-}
-
-const highlights: HighlightProps[] = [
- {
- logo: '/images/press/logo-forbes.png',
- title: 'Forbes',
- text:
- '0x Instant is aiming to aid businesses and developers such as news sites, crypto wallets, dApps or price trackers to monetize or add a new revenue stream to their existing pipeline.',
- href:
- 'https://www.forbes.com/sites/rebeccacampbell1/2018/12/06/0x-launches-instant-delivers-an-easy-and-flexible-way-to-buy-crypto-tokens/#bfb73a843561',
- },
- {
- logo: '/images/press/logo-venturebeat.png',
- title: 'VentureBeat',
- text: '0x leads the way for ‘tokenization’ of the world, and collectible game items are next',
- href:
- 'https://venturebeat.com/2018/09/24/0x-leads-the-way-for-tokenization-of-the-world-and-collectible-game-items-are-next/',
- },
- {
- logo: '/images/press/logo-fortune.png',
- title: 'Fortune',
- text:
- 'In the future, many traditional investments like real estate and corporate shares will come in the form of digital tokens that are bought and transferred on a blockchain.',
- href: 'http://fortune.com/2018/09/06/0x-harbor-blockchain/',
- },
- {
- logo: '/images/press/logo-techcrunch.png',
- title: 'TechCrunch',
- text:
- '0x allows any developer to quickly build their own decentralized cryptocurrency exchange and decide their own fees.',
- href: 'https://techcrunch.com/2018/07/16/0x/',
- },
-];
-
-export const NextAboutPress = () => (
- <AboutPageLayout
- title="Press Highlights"
- description={
- <>
- <Paragraph size="medium" marginBottom="60px">
- Want to write about 0x? <a href="mailto:team@0xproject.com">Get in touch.</a>
- </Paragraph>
-
- {_.map(highlights, (highlight, index) => (
- <Highlight key={`highlight-${index}`} highlight={highlight} />
- ))}
- </>
- }
- >
- <DocumentTitle title="Press Highlights - 0x" />
- </AboutPageLayout>
-);
-
-export const Highlight: React.FunctionComponent<HighlightItemProps> = (props: HighlightItemProps) => {
- const { highlight } = props;
- return (
- <HighlightWrap>
- <Column>
- <img src={highlight.logo} alt={highlight.title} />
- </Column>
-
- <Column width="60%" maxWidth="560px">
- <Paragraph isMuted={false}>{highlight.text}</Paragraph>
- <Button href={highlight.href} isWithArrow={true} isNoBorder={true} target="_blank">
- Read Article
- </Button>
- </Column>
- </HighlightWrap>
- );
-};
-
-const HighlightWrap = styled(FlexWrap)`
- border-top: 1px solid #eaeaea;
- padding: 30px 0;
-`;
diff --git a/packages/website/ts/pages/about/team.tsx b/packages/website/ts/pages/about/team.tsx
deleted file mode 100644
index 466ba9f43..000000000
--- a/packages/website/ts/pages/about/team.tsx
+++ /dev/null
@@ -1,291 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { AboutPageLayout } from 'ts/components/aboutPageLayout';
-import { Column, Section } from 'ts/components/newLayout';
-import { Heading, Paragraph } from 'ts/components/text';
-import { WebsitePaths } from 'ts/types';
-
-interface TeamMember {
- name: string;
- title: string;
- imageUrl?: string;
-}
-
-const team: TeamMember[] = [
- {
- imageUrl: '/images/team/willw.jpg',
- name: 'Will Warren',
- title: 'co-founder & CEO',
- },
- {
- imageUrl: '/images/team/amirb.jpg',
- name: 'Amir Bandeali',
- title: 'Co-founder & CTO',
- },
- {
- imageUrl: '/images/team/fabiob.jpg',
- name: 'Fabio Berger',
- title: 'engineering manager',
- },
- {
- imageUrl: '/images/team/alexv.jpg',
- name: 'Alex Xu',
- title: 'Director of operations',
- },
- {
- imageUrl: '/images/team/leonidL.jpg',
- name: 'Leonid Logvinov',
- title: 'engineer',
- },
- {
- imageUrl: '/images/team/benb.jpg',
- name: 'Ben Burns',
- title: 'designer',
- },
- {
- imageUrl: '/images/team/brandonm.jpg',
- name: 'Brandon Millman',
- title: 'senior engineer',
- },
- {
- imageUrl: '/images/team/toms.jpg',
- name: 'Tom Schmidt',
- title: 'product lead',
- },
- {
- imageUrl: '/images/team/jacobe.jpg',
- name: 'Jacob Evans',
- title: 'ecosystem engineer',
- },
- {
- imageUrl: '/images/team/blake.jpg',
- name: 'Blake Henderson',
- title: 'ecosystem programs lead',
- },
- {
- imageUrl: '/images/team/zack.jpg',
- name: 'Zack Skelly',
- title: 'lead recruiter',
- },
- {
- imageUrl: '/images/team/greg.jpg',
- name: 'Greg Hysen',
- title: 'blockchain engineer',
- },
- {
- imageUrl: '/images/team/remcoB.jpg',
- name: 'Remco Bloemen',
- title: 'technical fellow',
- },
- {
- imageUrl: '/images/team/francesco.jpg',
- name: 'Francesco Agosti',
- title: 'engineer',
- },
- {
- imageUrl: '/images/team/melo.jpg',
- name: 'Mel Oberto',
- title: 'people operations associate',
- },
- {
- imageUrl: '/images/team/alexb.jpg',
- name: 'Alex Browne',
- title: 'engineer in residence',
- },
- {
- imageUrl: '/images/team/peterz.jpg',
- name: 'Peter Zeitz',
- title: 'research fellow',
- },
- {
- imageUrl: '/images/team/chrisk.jpg',
- name: 'Chris Kalani',
- title: 'director of design',
- },
- {
- imageUrl: '/images/team/clayr.jpg',
- name: 'Clay Robbins',
- title: 'ecosystem development lead',
- },
- {
- imageUrl: '/images/team/mattt.jpg',
- name: 'Matt Taylor',
- title: 'marketing lead',
- },
- {
- imageUrl: '/images/team/eugenea.jpg',
- name: 'Eugene Aumson',
- title: 'engineer',
- },
- {
- imageUrl: '/images/team/weijew.jpg',
- name: 'Weijie Wu',
- title: 'research fellow',
- },
- {
- imageUrl: '/images/team/rahuls.jpg',
- name: 'Rahul Singireddy',
- title: 'relayer success manager',
- },
- {
- imageUrl: '/images/team/jasons.jpg',
- name: 'Jason Somensatto',
- title: 'strategic legal counsel',
- },
- {
- imageUrl: '/images/team/steveK.jpg',
- name: 'Steve Klebanoff',
- title: 'senior engineer',
- },
- {
- imageUrl: '/images/team/xianny.jpg',
- name: 'Xianny Ng',
- title: 'engineer',
- },
- {
- imageUrl: '/images/team/oshirob.png',
- name: 'Brent Oshiro',
- title: 'community engagement lead',
- },
-];
-
-const advisors: TeamMember[] = [
- {
- imageUrl: '/images/team/advisors/frede.jpg',
- name: 'Fred Ehrsam',
- title: 'Advisor',
- },
- {
- imageUrl: '/images/team/advisors/olafc.jpg',
- name: 'Olaf Carlson-Wee',
- title: 'Advisor',
- },
- {
- imageUrl: '/images/team/advisors/joeyk.jpg',
- name: 'Joey Krug',
- title: 'Advisor',
- },
- {
- imageUrl: '/images/team/advisors/lindax.jpg',
- name: 'Linda Xie',
- title: 'Advisor',
- },
- {
- imageUrl: '/images/team/advisors/davids.jpg',
- name: 'David Sacks',
- title: 'Advisor',
- },
-];
-
-export const NextAboutTeam = () => (
- <AboutPageLayout
- title="We are a global, growing team"
- description="We are a distributed team with backgrounds in engineering, academic research, business, and design. The 0x Core Team is passionate about accelerating the adoption decentralized technology and believe in its potential to be an equalizing force in the world. Join us and do the most impactful work of your life."
- linkLabel="Join the team"
- to={WebsitePaths.AboutJobs}
- >
- <DocumentTitle title="Our Team - 0x" />
- <Section maxWidth="1170px" wrapWidth="100%" isFlex={true} flexBreakpoint="900px">
- <Column>
- <Heading size="medium">0x Team</Heading>
- </Column>
-
- <Column width="70%" maxWidth="800px">
- <StyledGrid>
- {_.map(team, (info: TeamMember, index: number) => (
- <Member key={`team-${index}`} name={info.name} title={info.title} imageUrl={info.imageUrl} />
- ))}
- </StyledGrid>
- </Column>
- </Section>
-
- <Section bgColor="#F3F6F4" maxWidth="1170px" wrapWidth="100%" flexBreakpoint="900px" isFlex={true}>
- <Column>
- <Heading size="medium">Advisors</Heading>
- </Column>
-
- <Column width="70%" maxWidth="800px">
- <StyledGrid>
- {_.map(advisors, (info: TeamMember, index: number) => (
- <Member key={`advisor-${index}`} name={info.name} title={info.title} imageUrl={info.imageUrl} />
- ))}
- </StyledGrid>
- </Column>
- </Section>
- </AboutPageLayout>
-);
-
-const StyledGrid = styled.div`
- &:after {
- content: '';
- clear: both;
- }
-`;
-
-const Member = ({ name, title, imageUrl }: TeamMember) => (
- <StyledMember>
- <img src={imageUrl} alt={name} />
- <Name>{name}</Name>
- <MemberTitle isMuted={0.5} size={14} style={{ textTransform: 'capitalize' }}>
- {title}
- </MemberTitle>
- </StyledMember>
-);
-
-const StyledMember = styled.div`
- margin-bottom: 10px;
- float: left;
- width: calc(50% - 15px);
- margin-right: 15px;
-
- @media (max-width: 600px) {
- &:nth-child(2n + 1) {
- clear: left;
- }
- }
-
- img,
- svg {
- width: 100%;
- height: auto;
- object-fit: contain;
- margin-bottom: 10px;
- }
-
- @media (min-width: 600px) {
- width: calc(33.3333% - 30px);
- margin-right: 20px;
-
- &:nth-child(3n + 1) {
- clear: left;
- }
- }
-
- @media (min-width: 900px) {
- width: calc(25% - 30px);
-
- &:nth-child(3n + 1) {
- clear: none;
- }
-
- &:nth-child(4n + 1) {
- clear: left;
- }
- }
-`;
-
-const Name = styled.h3`
- color: ${colors.textDarkPrimary};
- font-size: 14px;
- line-height: 1;
- margin: 0;
-`;
-
-const MemberTitle = styled(Paragraph)`
- font-size: 14px;
-`;
diff --git a/packages/website/ts/pages/community.tsx b/packages/website/ts/pages/community.tsx
deleted file mode 100644
index 7c02fed82..000000000
--- a/packages/website/ts/pages/community.tsx
+++ /dev/null
@@ -1,289 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Banner } from 'ts/components/banner';
-import { Button } from 'ts/components/button';
-import { Icon } from 'ts/components/icon';
-import { ModalContact } from 'ts/components/modals/modal_contact';
-import { Column, Section, WrapGrid } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { Heading, Paragraph } from 'ts/components/text';
-
-interface EventProps {
- title: string;
- date: string;
- signupUrl: string;
- imageUrl: string;
-}
-
-interface CommunityLinkProps {
- bgColor: string;
- title?: string;
- icon?: string;
- url: string;
-}
-
-const events: EventProps[] = [
- {
- title: '0x London Meetup',
- date: 'October 20th 2018',
- imageUrl: '/images/events/london.jpg',
- signupUrl: '#',
- },
- {
- title: '0x Berlin Meetup',
- date: 'October 20th 2018',
- imageUrl: '/images/events/berlin.jpg',
- signupUrl: '#',
- },
- {
- title: '0x San Francisco Meetup',
- date: 'October 20th 2018',
- imageUrl: '/images/events/sf.jpg',
- signupUrl: '#',
- },
-];
-const communityLinks: CommunityLinkProps[] = [
- {
- bgColor: '#1DA1F2',
- title: 'Twitter',
- icon: 'social-twitter',
- url: 'https://twitter.com/0xProject',
- },
- {
- bgColor: '#FF4500',
- title: 'Reddit',
- icon: 'social-reddit',
- url: 'https://twitter.com/0xProject',
- },
- {
- bgColor: '#7289DA',
- title: 'Twitter',
- icon: 'social-discord',
- url: 'https://twitter.com/0xProject',
- },
- {
- bgColor: '#3B5998',
- title: 'Facebook',
- icon: 'social-fb',
- url: 'https://twitter.com/0xProject',
- },
- {
- bgColor: '#181717',
- title: 'GitHub',
- icon: 'social-github',
- url: 'https://twitter.com/0xProject',
- },
- {
- bgColor: '#003831',
- title: 'Newsletter',
- icon: 'social-newsletter',
- url: 'https://twitter.com/0xProject',
- },
-];
-
-export class NextCommunity extends React.Component {
- public state = {
- isContactModalOpen: false,
- };
- public render(): React.ReactNode {
- return (
- <SiteWrap theme="light">
- <Section isTextCentered={true}>
- <Column>
- <Heading size="medium" isCentered={true}>
- Community
- </Heading>
- <Paragraph size="medium" isCentered={true} isMuted={true} marginBottom="0">
- The 0x community is a global, passionate group of crypto developers and enthusiasts. The
- official channels below provide a great forum for connecting and engaging with the
- community.
- </Paragraph>
- <LinkWrap>
- <Button to="#" isWithArrow={true} isAccentColor={true}>
- Join the 0x community
- </Button>
- </LinkWrap>
- </Column>
- </Section>
-
- <Section isFullWidth={true}>
- <WrapGrid
- isTextCentered={true}
- isWrapped={true}
- isFullWidth={false}
- isCentered={false}
- maxWidth="1151px"
- >
- {_.map(communityLinks, (link: CommunityLinkProps, index: number) => (
- <CommunityLink
- key={`cl-${index}`}
- icon={link.icon}
- title={link.title}
- bgColor={link.bgColor}
- url={link.url}
- />
- ))}
- </WrapGrid>
- </Section>
-
- <EventsWrapper
- bgColor={colors.backgroundLight}
- isFullWidth={true}
- isCentered={true}
- isTextCentered={true}
- >
- <Column maxWidth="720px">
- <Heading size="medium" asElement="h2" isCentered={true} maxWidth="507px" marginBottom="30px">
- Upcoming Events
- </Heading>
- <Paragraph size="medium" isCentered={true} isMuted={true}>
- 0x meetups happen all over the world on a monthly basis and are hosted by devoted members of
- the community. Want to host a meetup in your city? Reach out for help finding a venue,
- connecting with local 0x mentors, and promoting your events.
- </Paragraph>
- <LinkWrap>
- <Button to="#" isWithArrow={true} isAccentColor={true}>
- Get in Touch
- </Button>
- <Button to="#" isWithArrow={true} isAccentColor={true}>
- Join Newsletter
- </Button>
- </LinkWrap>
- </Column>
- <WrapGrid
- isTextCentered={true}
- isWrapped={true}
- isFullWidth={false}
- isCentered={false}
- maxWidth="1149px"
- >
- {_.map(events, (ev: EventProps, index: number) => (
- <Event
- key={`event-${index}`}
- title={ev.title}
- date={ev.date}
- signupUrl={ev.signupUrl}
- imageUrl={ev.imageUrl}
- />
- ))}
- </WrapGrid>
- </EventsWrapper>
-
- <Banner
- heading="Ready to get started?"
- subline="Dive into our docs, or contact us if needed"
- mainCta={{ text: 'Get Started', href: '/docs' }}
- secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }}
- />
- <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
- </SiteWrap>
- );
- }
-
- public _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- public _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-}
-
-const Event: React.FunctionComponent<EventProps> = (event: EventProps) => (
- <StyledEvent>
- <EventIcon name="logo-mark" size={30} margin={0} />
- <EventImage src={event.imageUrl} alt="" />
- <EventContent>
- <Heading color={colors.white} size="small" marginBottom="0">
- {event.title}
- </Heading>
- <Paragraph color={colors.white} isMuted={0.65}>
- {event.date}
- </Paragraph>
- <Button color={colors.white} href={event.signupUrl} isWithArrow={true}>
- Sign Up
- </Button>
- </EventContent>
- </StyledEvent>
-);
-
-const CommunityLink: React.FunctionComponent<CommunityLinkProps> = (props: CommunityLinkProps) => (
- <StyledCommunityLink bgColor={props.bgColor} href={props.url}>
- <CommunityIcon name={props.icon} size={44} margin={0} />
- <CommunityTitle color={colors.white} isMuted={false} marginBottom="0">
- {props.title}
- </CommunityTitle>
- </StyledCommunityLink>
-);
-
-// Events
-const EventsWrapper = styled(Section)`
- display: flex;
- align-items: center;
- flex-direction: column;
-`;
-
-// Event
-const StyledEvent = styled.div`
- background-color: ${colors.brandDark};
- width: calc((100% / 3) - 30px);
- text-align: left;
- height: 424px;
- margin-top: 130px;
- position: relative;
-`;
-
-const EventIcon = styled(Icon)`
- position: absolute;
- top: 30px;
- left: 30px;
-`;
-
-const EventImage = styled.img`
- width: 100%;
- height: 260px;
- object-fit: cover;
-`;
-
-const EventContent = styled.div`
- padding: 30px 30px;
-`;
-
-interface StyledCommunityLinkProps {
- bgColor: string;
-}
-const StyledCommunityLink = styled.a`
- background-color: ${(props: StyledCommunityLinkProps) => props.bgColor};
- color: ${colors.white};
- width: 175px;
- height: 175px;
- text-align: center;
- position: relative;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
-`;
-
-const CommunityTitle = styled(Paragraph)`
- font-size: 20px;
- font-weight: 400;
-`;
-
-const CommunityIcon = styled(Icon)`
- margin-bottom: 20px;
-`;
-
-// Misc
-const LinkWrap = styled.div`
- display: inline-flex;
- margin-top: 60px;
-
- a + a {
- margin-left: 60px;
- }
-`;
diff --git a/packages/website/ts/pages/documentation/developers_page.tsx b/packages/website/ts/pages/documentation/developers_page.tsx
deleted file mode 100644
index 0b725c514..000000000
--- a/packages/website/ts/pages/documentation/developers_page.tsx
+++ /dev/null
@@ -1,201 +0,0 @@
-import { colors, constants as sharedConstants, utils as sharedUtils } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import { Helmet } from 'react-helmet';
-import { DocsLogo } from 'ts/components/documentation/docs_logo';
-import { DocsTopBar } from 'ts/components/documentation/docs_top_bar';
-import { Container } from 'ts/components/ui/container';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { media } from 'ts/style/media';
-import { styled } from 'ts/style/theme';
-import { BrowserType, OperatingSystemType, ScreenWidths } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
-
-const THROTTLE_TIMEOUT = 100;
-const TOP_BAR_HEIGHT = 80;
-const browserType = utils.getBrowserType();
-let SCROLLBAR_WIDTH;
-switch (browserType) {
- case BrowserType.Firefox:
- // HACK: Firefox doesn't allow styling of their scrollbar's.
- // Source: https://stackoverflow.com/questions/6165472/custom-css-scrollbar-for-firefox
- const os = utils.getOperatingSystem();
- SCROLLBAR_WIDTH = os === OperatingSystemType.Windows ? 17 : 15;
- break;
-
- case BrowserType.Edge:
- // Edge's scrollbar is placed outside of the div content and doesn't
- // need to be accounted for
- SCROLLBAR_WIDTH = 0;
- break;
-
- default:
- SCROLLBAR_WIDTH = 4;
-}
-const SIDEBAR_PADDING = 22;
-
-export interface DevelopersPageProps {
- location: Location;
- translate: Translate;
- screenWidth: ScreenWidths;
- dispatcher: Dispatcher;
- mainContent: React.ReactNode;
- sidebar: React.ReactNode;
-}
-
-export interface DevelopersPageState {
- isSidebarScrolling: boolean;
-}
-
-const isUserOnMobile = sharedUtils.isUserOnMobile();
-
-const scrollableContainerStyles = `
- position: absolute;
- top: ${TOP_BAR_HEIGHT}px;
- left: 0px;
- bottom: 0px;
- right: 0px;
- overflow-x: hidden;
- overflow-y: scroll;
- -webkit-overflow-scrolling: touch;
- /* Required for hide/show onHover of scrollbar on Microsoft Edge */
- -ms-overflow-style: -ms-autohiding-scrollbar;
-`;
-
-interface SidebarContainerProps {
- className?: string;
-}
-
-const SidebarContainer = styled.div<SidebarContainerProps>`
- ${scrollableContainerStyles}
- padding-top: 27px;
- padding-left: ${SIDEBAR_PADDING}px;
- padding-right: ${SIDEBAR_PADDING}px;
- overflow: hidden;
- &:hover {
- overflow: auto;
- padding-right: ${SIDEBAR_PADDING - SCROLLBAR_WIDTH}px;
- }
-`;
-
-interface MainContentContainerProps {
- className?: string;
-}
-
-const MainContentContainer = styled.div<MainContentContainerProps>`
- ${scrollableContainerStyles}
- padding-top: 0px;
- padding-left: 50px;
- padding-right: 50px;
- overflow: ${isUserOnMobile ? 'auto' : 'hidden'};
- &:hover {
- padding-right: ${50 - SCROLLBAR_WIDTH}px;
- overflow: auto;
- }
- ${media.small`
- padding-left: 20px;
- padding-right: 20px;
- &:hover {
- padding-right: ${20 - SCROLLBAR_WIDTH}px;
- overflow: auto;
- }
- `}
-`;
-
-export class DevelopersPage extends React.Component<DevelopersPageProps, DevelopersPageState> {
- private readonly _throttledScreenWidthUpdate: () => void;
- private readonly _throttledSidebarScrolling: () => void;
- private _sidebarScrollClearingInterval: number;
- constructor(props: DevelopersPageProps) {
- super(props);
- this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT);
- this._throttledSidebarScrolling = _.throttle(this._onSidebarScroll.bind(this), THROTTLE_TIMEOUT);
- this.state = {
- isSidebarScrolling: false,
- };
- }
- public componentDidMount(): void {
- window.addEventListener('resize', this._throttledScreenWidthUpdate);
- window.scrollTo(0, 0);
- this._sidebarScrollClearingInterval = window.setInterval(() => {
- this.setState({
- isSidebarScrolling: false,
- });
- }, 1000);
- }
- public componentWillUnmount(): void {
- window.removeEventListener('resize', this._throttledScreenWidthUpdate);
- window.clearInterval(this._sidebarScrollClearingInterval);
- }
- public render(): React.ReactNode {
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- const mainContentPadding = isSmallScreen ? 20 : 50;
- return (
- <Container
- className="flex items-center overflow-hidden"
- width="100%"
- background={`linear-gradient(to right, ${colors.grey100} 0%, ${colors.grey100} 50%, ${
- colors.white
- } 50%, ${colors.white} 100%)`}
- >
- <DocumentTitle title="0x Docs" />
- <Helmet>
- <link rel="stylesheet" href="/css/github-gist.css" />
- </Helmet>
- <Container className="flex mx-auto" height="100vh">
- <Container
- className="sm-hide xs-hide relative"
- width={270}
- paddingLeft={22}
- paddingRight={22}
- paddingTop={0}
- backgroundColor={colors.grey100}
- >
- <Container
- borderBottom={this.state.isSidebarScrolling ? `1px solid ${colors.grey300}` : 'none'}
- paddingBottom="2px"
- >
- <Container paddingTop="30px" paddingLeft="10px" paddingBottom="8px">
- <DocsLogo />
- </Container>
- </Container>
- <SidebarContainer onWheel={this._throttledSidebarScrolling}>
- <Container paddingBottom="100px">
- {this.props.screenWidth !== ScreenWidths.Sm && this.props.sidebar}
- </Container>
- </SidebarContainer>
- </Container>
- <Container
- className="relative"
- width={isSmallScreen ? '100vw' : 786}
- paddingBottom="100px"
- backgroundColor={colors.white}
- >
- <Container paddingLeft={mainContentPadding} paddingRight={mainContentPadding}>
- <DocsTopBar
- location={this.props.location}
- screenWidth={this.props.screenWidth}
- translate={this.props.translate}
- sidebar={this.props.sidebar}
- />
- </Container>
- <MainContentContainer id={sharedConstants.SCROLL_CONTAINER_ID}>
- {this.props.mainContent}
- </MainContentContainer>
- </Container>
- </Container>
- </Container>
- );
- }
- private _onSidebarScroll(_event: React.FormEvent<HTMLInputElement>): void {
- this.setState({
- isSidebarScrolling: true,
- });
- }
- private _updateScreenWidth(): void {
- const newScreenWidth = utils.getScreenWidth();
- this.props.dispatcher.updateScreenWidth(newScreenWidth);
- }
-} // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/pages/documentation/doc_page.tsx b/packages/website/ts/pages/documentation/doc_page.tsx
deleted file mode 100644
index 14bad7329..000000000
--- a/packages/website/ts/pages/documentation/doc_page.tsx
+++ /dev/null
@@ -1,216 +0,0 @@
-import {
- DocAgnosticFormat,
- DocReference,
- DocsInfo,
- GeneratedDocJson,
- SupportedDocJson,
- TypeDocUtils,
-} from '@0x/react-docs';
-import findVersions from 'find-versions';
-import * as _ from 'lodash';
-import CircularProgress from 'material-ui/CircularProgress';
-import * as React from 'react';
-import semverSort from 'semver-sort';
-import { SidebarHeader } from 'ts/components/documentation/sidebar_header';
-import { NestedSidebarMenu } from 'ts/components/nested_sidebar_menu';
-import { Container } from 'ts/components/ui/container';
-import { DevelopersPage } from 'ts/pages/documentation/developers_page';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { DocPackages, ScreenWidths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { docUtils } from 'ts/utils/doc_utils';
-import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
-
-const isDevelopmentOrStaging = utils.isDevelopment() || utils.isStaging();
-const ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH = '0.32.4';
-
-const docIdToSubpackageName: { [id: string]: string } = {
- [DocPackages.ZeroExJs]: '0x.js',
- [DocPackages.Connect]: 'connect',
- [DocPackages.SmartContracts]: 'contracts',
- [DocPackages.Web3Wrapper]: 'web3-wrapper',
- [DocPackages.ContractWrappers]: 'contract-wrappers',
- [DocPackages.SolCompiler]: 'sol-compiler',
- [DocPackages.JSONSchemas]: 'json-schemas',
- [DocPackages.SolCoverage]: 'sol-coverage',
- [DocPackages.SolProfiler]: 'sol-profiler',
- [DocPackages.SolTrace]: 'sol-trace',
- [DocPackages.Subproviders]: 'subproviders',
- [DocPackages.OrderUtils]: 'order-utils',
- [DocPackages.OrderWatcher]: 'order-watcher',
- [DocPackages.EthereumTypes]: 'ethereum-types',
- [DocPackages.AssetBuyer]: 'asset-buyer',
- [DocPackages.Migrations]: 'migrations',
-};
-
-export interface DocPageProps {
- location: Location;
- dispatcher: Dispatcher;
- docsVersion: string;
- availableDocVersions: string[];
- docsInfo: DocsInfo;
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-interface DocPageState {
- docAgnosticFormat?: DocAgnosticFormat;
-}
-
-export class DocPage extends React.Component<DocPageProps, DocPageState> {
- private _isUnmounted: boolean;
- constructor(props: DocPageProps) {
- super(props);
- this._isUnmounted = false;
- this.state = {
- docAgnosticFormat: undefined,
- };
- }
- public componentWillMount(): void {
- const pathName = this.props.location.pathname;
- const lastSegment = pathName.substr(pathName.lastIndexOf('/') + 1);
- const versions = findVersions(lastSegment);
- const preferredVersionIfExists = versions.length > 0 ? versions[0] : undefined;
- // tslint:disable-next-line:no-floating-promises
- this._fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists);
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- }
- public render(): React.ReactNode {
- const sourceUrl = this._getSourceUrl();
- const sectionNameToLinks = _.isUndefined(this.state.docAgnosticFormat)
- ? {}
- : this.props.docsInfo.getSectionNameToLinks(this.state.docAgnosticFormat);
- const mainContent = _.isUndefined(this.state.docAgnosticFormat) ? (
- <div className="flex justify-center">{this._renderLoading()}</div>
- ) : (
- <DocReference
- selectedVersion={this.props.docsVersion}
- availableVersions={this.props.availableDocVersions}
- docsInfo={this.props.docsInfo}
- docAgnosticFormat={this.state.docAgnosticFormat}
- sourceUrl={sourceUrl}
- />
- );
- const sidebar = _.isUndefined(this.state.docAgnosticFormat) ? (
- <div />
- ) : (
- <NestedSidebarMenu
- sidebarHeader={this._renderSidebarHeader()}
- sectionNameToLinks={sectionNameToLinks}
- screenWidth={this.props.screenWidth}
- />
- );
- return (
- <DevelopersPage
- sidebar={sidebar}
- mainContent={mainContent}
- location={this.props.location}
- screenWidth={this.props.screenWidth}
- translate={this.props.translate}
- dispatcher={this.props.dispatcher}
- />
- );
- }
- private _renderSidebarHeader(): React.ReactNode {
- return (
- <SidebarHeader
- screenWidth={this.props.screenWidth}
- title={this.props.docsInfo.displayName}
- docsVersion={this.props.docsVersion}
- availableDocVersions={this.props.availableDocVersions}
- onVersionSelected={this._onVersionSelected.bind(this)}
- />
- );
- }
- private _renderLoading(): React.ReactNode {
- return (
- <Container className="pt4">
- <Container className="center pb2">
- <CircularProgress size={40} thickness={5} />
- </Container>
- <Container className="center pt2" paddingBottom="11px">
- Loading documentation...
- </Container>
- </Container>
- );
- }
- private async _fetchJSONDocsFireAndForgetAsync(preferredVersionIfExists?: string): Promise<void> {
- const folderName = docIdToSubpackageName[this.props.docsInfo.id];
- const docBucketRoot = isDevelopmentOrStaging
- ? constants.S3_STAGING_DOC_BUCKET_ROOT
- : constants.S3_DOC_BUCKET_ROOT;
- const versionToFilePath = await docUtils.getVersionToFilePathAsync(docBucketRoot, folderName);
- const versions = _.keys(versionToFilePath);
- this.props.dispatcher.updateAvailableDocVersions(versions);
- const sortedVersions = semverSort.desc(versions);
- const latestVersion = sortedVersions[0];
-
- let versionToFetch = latestVersion;
- if (!_.isUndefined(preferredVersionIfExists)) {
- const preferredVersionFileNameIfExists = versionToFilePath[preferredVersionIfExists];
- if (!_.isUndefined(preferredVersionFileNameIfExists)) {
- versionToFetch = preferredVersionIfExists;
- }
- }
- this.props.dispatcher.updateCurrentDocsVersion(versionToFetch);
-
- const versionFilePathToFetch = versionToFilePath[versionToFetch];
- const versionDocObj = await docUtils.getJSONDocFileAsync(versionFilePathToFetch, docBucketRoot);
- let docAgnosticFormat;
- if (this.props.docsInfo.type === SupportedDocJson.TypeDoc) {
- docAgnosticFormat = new TypeDocUtils(
- versionDocObj as GeneratedDocJson,
- this.props.docsInfo,
- ).convertToDocAgnosticFormat();
- } else if (this.props.docsInfo.type === SupportedDocJson.SolDoc) {
- // documenting solidity.
- docAgnosticFormat = versionDocObj as DocAgnosticFormat;
- // HACK: need to modify docsInfo like convertToDocAgnosticFormat() would do
- this.props.docsInfo.markdownMenu.Contracts = [];
- _.each(docAgnosticFormat, (_docObj, sectionName) => {
- this.props.docsInfo.sections[sectionName] = sectionName;
- this.props.docsInfo.markdownMenu.Contracts.push(sectionName);
- });
- }
-
- if (!this._isUnmounted) {
- this.setState({
- docAgnosticFormat,
- });
- }
- }
- private _getSourceUrl(): string {
- const url = this.props.docsInfo.packageUrl;
- let pkg = docIdToSubpackageName[this.props.docsInfo.id];
- let tagPrefix = pkg;
- const packagesWithNamespace = ['connect'];
- if (_.includes(packagesWithNamespace, pkg)) {
- tagPrefix = `@0x/${pkg}`;
- }
- // HACK: The following three lines exist for backward compatibility reasons
- // Before exporting types from other packages as part of the 0x.js interface,
- // all TypeDoc generated paths omitted the topLevel `0x.js` segment. Now it
- // adds it, and for that reason, we need to make sure we don't add it twice in
- // the source links we generate.
- const semvers = semverSort.desc([this.props.docsVersion, ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH]);
- const isVersionAfterTopLevelPathChange = semvers[0] !== ZERO_EX_JS_VERSION_MISSING_TOPLEVEL_PATH;
- pkg = this.props.docsInfo.id === DocPackages.ZeroExJs && isVersionAfterTopLevelPathChange ? '' : `/${pkg}`;
-
- const sourceUrl = `${url}/blob/${tagPrefix}%40${this.props.docsVersion}/packages${pkg}`;
- return sourceUrl;
- }
- private _onVersionSelected(semver: string): void {
- let path = window.location.pathname;
- const lastChar = path[path.length - 1];
- if (_.isFinite(_.parseInt(lastChar))) {
- const pathSections = path.split('/');
- pathSections.pop();
- path = pathSections.join('/');
- }
- const baseUrl = utils.getCurrentBaseUrl();
- window.location.href = `${baseUrl}${path}/${semver}${window.location.hash}`;
- }
-}
diff --git a/packages/website/ts/pages/documentation/docs_home.tsx b/packages/website/ts/pages/documentation/docs_home.tsx
deleted file mode 100644
index d11cf02fb..000000000
--- a/packages/website/ts/pages/documentation/docs_home.tsx
+++ /dev/null
@@ -1,469 +0,0 @@
-import { ALink, colors, Link } from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { OverviewContent } from 'ts/components/documentation/overview_content';
-import { NestedSidebarMenu } from 'ts/components/nested_sidebar_menu';
-import { Button } from 'ts/components/ui/button';
-import { DevelopersPage } from 'ts/pages/documentation/developers_page';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Categories, Deco, Key, Package, ScreenWidths, TutorialInfo, WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-const TUTORIALS: TutorialInfo[] = [
- {
- iconUrl: '/images/developers/tutorials/develop_on_ethereum.svg',
- description: Key.DevelopOnEthereumDescription,
- link: {
- title: Key.DevelopOnEthereum,
- to: `${WebsitePaths.Wiki}#Ethereum-Development`,
- },
- },
- {
- iconUrl: '/images/developers/tutorials/build_a_relayer.svg',
- description: Key.BuildARelayerDescription,
- link: {
- title: Key.BuildARelayer,
- to: `${WebsitePaths.Wiki}#Build-A-Relayer`,
- },
- },
- {
- iconUrl: '/images/developers/tutorials/0x_order_basics.svg',
- description: Key.OrderBasicsDescription,
- link: {
- title: Key.OrderBasics,
- to: `${WebsitePaths.Wiki}#Create,-Validate,-Fill-Order`,
- },
- },
- {
- iconUrl: '/images/developers/tutorials/use_shared_liquidity.svg',
- description: Key.UseNetworkedLiquidityDescription,
- link: {
- title: Key.UseNetworkedLiquidity,
- to: `${WebsitePaths.Wiki}#Find,-Submit,-Fill-Order-From-Relayer`,
- },
- },
- {
- iconUrl: '/images/developers/tutorials/integrate_0x_instant.svg',
- description: Key.Integrate0xInstantDescription,
- link: {
- title: Key.Integrate0xInstant,
- to: `${WebsitePaths.Wiki}#Get-Started-With-Instant`,
- },
- },
-];
-
-const CATEGORY_TO_PACKAGES: ObjectMap<Package[]> = {
- [Categories.ZeroExProtocol]: [
- {
- description:
- 'A library for interacting with the 0x protocol. It is a high level package which combines a number of smaller specific-purpose packages such as [order-utils](https://0x.org/docs/order-utils) and [contract-wrappers](https://0x.org/docs/contract-wrappers).',
- link: {
- title: '0x.js',
- to: WebsitePaths.ZeroExJs,
- },
- },
- {
- description:
- 'A Typescript starter project that will walk you through the basics of how to interact with 0x Protocol and trade of an SRA relayer',
- link: {
- title: '0x starter project',
- to: 'https://github.com/0xProject/0x-starter-project',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'Launch a 0x relayer in under a minute with Launch Kit. `0x-launch-kit` is an open-source, free-to-use 0x relayer template that you can use as a starting point for your own project.',
- link: {
- title: '0x launch kit',
- to: 'https://github.com/0xProject/0x-launch-kit',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'Reference documentation for the 0x smart contracts. Helpful for dApp developer wanting to integrate 0x at the smart contract level.',
- link: {
- title: '0x smart contracts',
- to: WebsitePaths.SmartContracts,
- },
- },
- {
- description:
- "A Python library for interacting with 0x orders. Generate an orderHash, sign an order, validate it's signature and more.",
- link: {
- title: '0x-order-utils.py',
- to: 'http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: 'A Python Standard Relayer API client',
- link: {
- title: '0x-sra-client.py',
- to: 'https://pypi.org/project/0x-sra-client/',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'An http & websocket client for interacting with relayers that have implemented the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)',
- link: {
- title: '@0x/connect',
- to: WebsitePaths.Connect,
- },
- },
- {
- description:
- 'Typescript/Javascript wrappers of the 0x protocol Ethereum smart contracts. Use this library to call methods on the 0x smart contracts, subscribe to contract events and to fetch information stored in contracts.',
- link: {
- title: '@0x/contract-wrappers',
- to: WebsitePaths.ContractWrappers,
- },
- },
- {
- description:
- "A package to deploy the 0x protocol's system of smart contracts to the testnet of your choice",
- link: {
- title: '@0x/migrations',
- to: WebsitePaths.Migrations,
- },
- },
- {
- description:
- 'A collection of 0x-related JSON-schemas (incl. SRA request/response schemas, 0x order message format schema, etc...)',
- link: {
- title: '@0x/json-schemas',
- to: WebsitePaths.JSONSchemas,
- },
- },
- {
- description:
- 'A set of utils for working with 0x orders. It includes utilities for creating, signing, validating 0x orders, encoding/decoding assetData and much more.',
- link: {
- title: '@0x/order-utils',
- to: WebsitePaths.OrderUtils,
- },
- },
- {
- description:
- "A daemon that watches a set of 0x orders and emits events when an order's fillability has changed. Can be used by a relayer to prune their orderbook or by a trader to keep their view of the market up-to-date.",
- link: {
- title: '@0x/order-watcher',
- to: WebsitePaths.OrderWatcher,
- },
- },
- {
- description:
- 'A tiny utility library for getting known deployed contract addresses for a particular network.',
- link: {
- title: '@0x/contract-addresses',
- to: 'https://www.npmjs.com/package/@0x/contract-addresses',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: 'Smart contract compilation artifacts for the latest version of the 0x protocol.',
- link: {
- title: '@0x/contract-artifacts',
- to: 'https://www.npmjs.com/package/@0x/contract-artifacts',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'Contains the Standard Relayer API OpenAPI Spec. The package distributes both a javascript object version and a json version.',
- link: {
- title: '@0x/sra-spec',
- to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- '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.',
- link: {
- title: '@0x/asset-buyer',
- to: WebsitePaths.AssetBuyer,
- },
- },
- ],
- [Categories.Ethereum]: [
- {
- description:
- "This package allows you to generate TypeScript contract wrappers from ABI files. It's heavily inspired by Geth abigen 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.",
- link: {
- title: 'abi-gen',
- to: 'https://github.com/0xProject/0x-monorepo/tree/development/packages/abi-gen',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'A collection of Typescript types that are useful when working on an Ethereum-based project (e.g RawLog, Transaction, TxData, SolidityTypes, etc...).',
- link: {
- title: 'ethereum-types',
- to: WebsitePaths.EthereumTypes,
- },
- },
- {
- description:
- 'A wrapper around [solc-js](https://github.com/ethereum/solc-js) that adds smart re-compilation, ability to compile an entire project, Solidity version specific compilation, standard input description support and much more.',
- link: {
- title: '@0x/sol-compiler',
- to: WebsitePaths.SolCompiler,
- },
- },
- {
- description:
- 'A Solidity code coverage tool. Sol-coverage uses transaction traces to figure out which lines of your code has been covered by your tests.',
- link: {
- title: '@0x/sol-coverage',
- to: WebsitePaths.SolCoverage,
- },
- },
- {
- description:
- 'A Solidity profiler. Sol-profiler uses transaction traces to figure out line-by-line gas consumption.',
- link: {
- title: '@0x/sol-profiler',
- to: WebsitePaths.SolProfiler,
- },
- },
- {
- description:
- 'A Solidity revert trace tool. Sol-trace prints human-readable revert trace whenever the revert happens.',
- link: {
- title: '@0x/sol-trace',
- to: WebsitePaths.SolTrace,
- },
- },
- {
- description:
- 'A collection of subproviders to use with [web3-provider-engine](https://www.npmjs.com/package/web3-provider-engine) (e.g subproviders for interfacing with Ledger hardware wallet, Mnemonic wallet, private key wallet, etc...)',
- link: {
- title: '@0x/subproviders',
- to: WebsitePaths.Subproviders,
- },
- },
- {
- description:
- 'A raw Ethereum JSON RPC client to simplify interfacing with Ethereum nodes. Also includes some convenience functions for awaiting transactions to be mined, converting between token units, etc...',
- link: {
- title: '@0x/web3-wrapper',
- to: WebsitePaths.Web3Wrapper,
- },
- },
- ],
- [Categories.CommunityMaintained]: [
- {
- description:
- 'Node.js worker originally built for 0x Tracker which extracts 0x fill events from the Ethereum blockchain and persists them to MongoDB. Support for both V1 and V2 of the 0x protocol is included with events tagged against the protocol version they belong to.',
- link: {
- title: '0x Event Extractor',
- to: 'https://github.com/0xTracker/0x-event-extractor',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'Node.js worker built for 0x Tracker which performs various ETL tasks related to the 0x protocol trading data and other information used on 0x Tracker.',
- link: {
- title: '0x Tracker Worker',
- to: 'https://github.com/0xTracker/0x-tracker-worker',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- "ERCdEX's Javascript SDK for trading on their relayer, as well as other Aquaduct partner relayers",
- link: {
- title: 'Aquaduct',
- to: 'https://www.npmjs.com/package/aqueduct',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'SDKs for automation using Aqueduct & ERC dEX. Aqueduct Server is a lightweight, portable and secure server that runs locally on any workstation. The server exposes a small number of foundational endpoints that enable working with the decentralized Aqueduct liquidity pool from any context or programming language.',
- link: {
- title: 'Aquaduct Server SDK',
- to: 'https://github.com/ERCdEX/aqueduct-server-sdk',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: 'A node.js SDK for trading on the DDEX relayer',
- link: {
- to: 'https://www.npmjs.com/package/ddex-api',
- title: 'DDEX Node.js SDK',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: "The ERCdEX Trade Widget let's any website provide token liquidity to it's users",
- link: {
- to: 'https://github.com/ERCdEX/widget',
- title: 'ERCdEX Widget',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: "ERCdEX's Java SDK for trading on their relayer, as well as other Aquaduct partner relayers",
- link: {
- to: 'https://github.com/ERCdEX/java',
- title: 'ERCdEX Java SDK',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: "ERCdEX's Python SDK for trading on their relayer, as well as other Aquaduct partner relayers",
- link: {
- to: 'https://github.com/ERCdEX/python',
- title: 'ERCdEX Python SDK',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'A set of command-line tools for creating command-line scripts for interacting with the Ethereum blockchain in general, and 0x in particular',
- link: {
- title: 'Massive',
- to: 'https://github.com/NoteGio/massive',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: 'An open-source API-only Relayer written in Go',
- link: {
- to: 'https://github.com/NoteGio/openrelay',
- title: 'OpenRelay',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'A JavaScript Library for Interacting with OpenRelay.xyz and other 0x Standard Relayer API Implementations',
- link: {
- title: 'OpenRelay.js',
- to: 'https://github.com/NoteGio/openrelay.js',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'The Radar Relay SDK is a software development kit that simplifies the interactions with Radar Relay’s APIs',
- link: {
- title: 'Radar SDK',
- to: 'https://github.com/RadarRelay/sdk',
- shouldOpenInNewTab: true,
- },
- },
- {
- description:
- 'The Ocean provides a simple REST API, WebSockets API, and JavaScript library to help you integrate decentralized trading into your existing trading strategy.',
- link: {
- title: 'The Ocean Javascript SDK',
- to: 'https://github.com/TheOceanTrade/theoceanx-javascript',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: "Tokenlon SDK provides APIs for developers to trade of imToken's relayer",
- link: {
- to: 'https://www.npmjs.com/package/tokenlon-sdk',
- title: 'Tokenlon Javascript SDK',
- shouldOpenInNewTab: true,
- },
- },
- {
- description: 'A small library that implements the 0x order assetData encoding/decoding in Java',
- link: {
- to: 'https://github.com/wildnothing/asset-data-decoder',
- title: 'AssetData decoder library in Java',
- shouldOpenInNewTab: true,
- },
- },
- ],
-};
-
-export interface DocsHomeProps {
- location: Location;
- translate: Translate;
- screenWidth: ScreenWidths;
- tutorials: TutorialInfo[];
- categoryToPackages: ObjectMap<Package[]>;
- dispatcher: Dispatcher;
-}
-
-export interface DocsHomeState {}
-
-export class DocsHome extends React.Component<DocsHomeProps, DocsHomeState> {
- public render(): React.ReactNode {
- const sectionNameToLinks: ObjectMap<ALink[]> = {
- 'Starter guides': _.map(TUTORIALS, tutorialInfo => {
- return {
- ...tutorialInfo.link,
- title: this.props.translate.get(tutorialInfo.link.title as Key, Deco.Cap),
- };
- }),
- [Categories.ZeroExProtocol]: _.map(CATEGORY_TO_PACKAGES[Categories.ZeroExProtocol], pkg => pkg.link),
- [Categories.Ethereum]: _.map(CATEGORY_TO_PACKAGES[Categories.Ethereum], pkg => pkg.link),
- [Categories.CommunityMaintained]: _.map(
- CATEGORY_TO_PACKAGES[Categories.CommunityMaintained],
- pkg => pkg.link,
- ),
- };
- const mainContent = (
- <OverviewContent
- translate={this.props.translate}
- tutorials={TUTORIALS}
- categoryToPackages={CATEGORY_TO_PACKAGES}
- />
- );
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- const sidebar = (
- <NestedSidebarMenu
- sidebarHeader={isSmallScreen ? this._renderSidebarHeader() : undefined}
- sectionNameToLinks={sectionNameToLinks}
- shouldReformatMenuItemNames={false}
- screenWidth={this.props.screenWidth}
- />
- );
- return (
- <DevelopersPage
- mainContent={mainContent}
- sidebar={sidebar}
- location={this.props.location}
- screenWidth={this.props.screenWidth}
- translate={this.props.translate}
- dispatcher={this.props.dispatcher}
- />
- );
- }
- private _renderSidebarHeader(): React.ReactNode {
- const menuItems = _.map(constants.DEVELOPER_TOPBAR_LINKS, menuItemInfo => {
- return (
- <Link
- key={`menu-item-${menuItemInfo.title}`}
- to={menuItemInfo.to}
- shouldOpenInNewTab={menuItemInfo.shouldOpenInNewTab}
- >
- <Button
- borderRadius="4px"
- padding="0.4em 0.375em"
- width="100%"
- fontColor={colors.grey800}
- fontSize="14px"
- textAlign="left"
- >
- {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)}
- </Button>
- </Link>
- );
- });
- return menuItems;
- }
-}
diff --git a/packages/website/ts/pages/ecosystem.tsx b/packages/website/ts/pages/ecosystem.tsx
deleted file mode 100644
index 8e367b21f..000000000
--- a/packages/website/ts/pages/ecosystem.tsx
+++ /dev/null
@@ -1,128 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Button } from 'ts/components/button';
-import { Icon } from 'ts/components/icon';
-import { Column, Section, WrapGrid } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { Heading, Paragraph } from 'ts/components/text';
-import { constants } from 'ts/utils/constants';
-
-interface BenefitProps {
- title: string;
- icon: string;
- description: string;
-}
-
-const benefits: BenefitProps[] = [
- {
- icon: 'milestoneGrants',
- title: 'Milestone Grants',
- description:
- 'Receive non-dilutive capital ranging from $10,000 to $100,000, with grant sizes awarded based on the quality of your team, vision, execution, and community involvement.',
- },
- {
- icon: 'vcIntroductions',
- title: 'VC Introductions',
- description: 'Connect with leading venture capital firms that could participate in your next funding round.',
- },
- {
- icon: 'techSupport',
- title: 'Technical Support',
- description: 'Receive ongoing technical assistance from knowledgeable and responsive 0x developers.',
- },
- {
- icon: 'recruitingSupport',
- title: 'Recruiting Assistance',
- description: 'Grow your team by accessing an exclusive pool of top engineering and business operations talent.',
- },
- {
- icon: 'eficientDesign',
- title: 'Marketing and Design Help',
- description:
- 'Get strategic advice on product positioning, customer acquisition, and UI/UX design that can impact the growth of your business.',
- },
- {
- icon: 'legalResources',
- title: 'Legal Resources',
- description: 'Access important legal resources that will help you navigate the regulatory landscape.',
- },
-];
-
-export const NextEcosystem = () => (
- <SiteWrap theme="light">
- <DocumentTitle title="Ecosystem Acceleration Program: Jumpstart your Business on 0x" />
- <Section isTextCentered={true}>
- <Column>
- <Heading size="medium" isCentered={true}>
- Jumpstart your Business on 0x
- </Heading>
- <Paragraph size="medium" isCentered={true} isMuted={true} marginBottom="0">
- The Ecosystem Acceleration Program gives teams access to a variety of services including funding,
- dedicated technical support, and recruiting assistance. We created the Ecosystem Acceleration
- Program to bolster the expansion of both infrastructure projects and relayers building on 0x.
- </Paragraph>
- <LinkWrap>
- <Button
- href={constants.URL_ECOSYSTEM_APPLY}
- isWithArrow={true}
- isAccentColor={true}
- shouldUseAnchorTag={true}
- >
- Apply now
- </Button>
- <Button
- href={constants.URL_ECOSYSTEM_BLOG_POST}
- isWithArrow={true}
- isAccentColor={true}
- shouldUseAnchorTag={true}
- target="_blank"
- >
- Learn More
- </Button>
- </LinkWrap>
- </Column>
- </Section>
-
- <Section bgColor={colors.backgroundLight} isFullWidth={true}>
- <Column>
- <Heading
- size={34}
- fontWeight="400"
- asElement="h2"
- isCentered={true}
- maxWidth="507px"
- marginBottom="70px"
- >
- Join a vibrant ecosystem of projects in the 0x Network.
- </Heading>
- </Column>
- <WrapGrid isTextCentered={true} isWrapped={true} isFullWidth={true}>
- {_.map(benefits, (benefit: BenefitProps, index) => (
- <Column key={`benefit-${index}`} width="33%" padding="0 45px 30px">
- <Icon name={benefit.icon} size="medium" margin={[0, 0, 'small', 0]} />
- <Heading color={colors.textDarkPrimary} size="small" marginBottom="10px" isCentered={true}>
- {benefit.title}
- </Heading>
- <Paragraph isMuted={true} isCentered={true}>
- {benefit.description}
- </Paragraph>
- </Column>
- ))}
- </WrapGrid>
- </Section>
- </SiteWrap>
-);
-
-const LinkWrap = styled.div`
- display: inline-flex;
- margin-top: 60px;
-
- a + a {
- margin-left: 60px;
- }
-`;
diff --git a/packages/website/ts/pages/faq/faq.tsx b/packages/website/ts/pages/faq/faq.tsx
deleted file mode 100644
index 548db1d1d..000000000
--- a/packages/website/ts/pages/faq/faq.tsx
+++ /dev/null
@@ -1,453 +0,0 @@
-import { colors, Styles } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import * as DocumentTitle from 'react-document-title';
-import { Footer } from 'ts/components/old_footer';
-import { TopBar } from 'ts/components/top_bar/top_bar';
-import { Question } from 'ts/pages/faq/question';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { FAQQuestion, FAQSection, WebsitePaths } from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-
-export interface FAQProps {
- source: string;
- location: Location;
- translate: Translate;
- dispatcher: Dispatcher;
-}
-
-interface FAQState {}
-
-const styles: Styles = {
- thin: {
- fontWeight: 100,
- },
-};
-
-const sections: FAQSection[] = [
- {
- name: '0x Protocol',
- questions: [
- {
- prompt: 'What is 0x?',
- answer: (
- <div>
- At its core, 0x is an open and non-rent seeking protocol that facilitates trustless, low
- friction exchange of Ethereum-based assets. Developers can use 0x as a platform to build
- exchange applications on top of (
- <a href={`${configs.BASE_URL}${WebsitePaths.ZeroExJs}#introduction`} target="blank">
- 0x.js
- </a>{' '}
- is a Javascript library for interacting with the 0x protocol). For end users, 0x will be the
- infrastructure of a wide variety of user-facing applications i.e.{' '}
- <a href={`${configs.BASE_URL}${WebsitePaths.Portal}`} target="blank">
- 0x Portal
- </a>
- , a decentralized application that facilitates trustless trading of Ethereum-based tokens
- between known counterparties.
- </div>
- ),
- },
- {
- prompt: 'What problem does 0x solve?',
- answer: (
- <div>
- In the two years since the Ethereum blockchain’s genesis block, numerous decentralized
- applications (dApps) have created Ethereum smart contracts for peer-to-peer exchange. Rapid
- iteration and a lack of best practices have left the blockchain scattered with proprietary and
- application-specific implementations. As a result, end users are exposed to numerous smart
- contracts of varying quality and security, with unique configuration processes and learning
- curves, all of which implement the same functionality. This approach imposes unnecessary costs
- on the network by fragmenting end users according to the particular dApp each user happens to be
- using, eliminating valuable network effects around liquidity. 0x is the solution to this problem
- by acting as modular, unopinionated building blocks that may be assembled and reconfigured.
- </div>
- ),
- },
- {
- prompt: 'How is 0x different from a centralized exchange like Poloniex or ShapeShift?',
- answer: (
- <div>
- <ul>
- <li>0x is a protocol for exchange, not a user-facing exchange application.</li>
- <li>
- 0x is decentralized and trustless; there is no central party which can be hacked, run
- away with customer funds or be subjected to government regulations. Hacks of Mt. Gox,
- Shapeshift and Bitfinex have demonstrated that these types of systemic risks are
- palpable.
- </li>
- <li>
- Rather than a proprietary system that exists to extract rent for its owners, 0x is
- public infrastructure that is funded by a globally distributed community of
- stakeholders. While the protocol is free to use, it enables for-profit user-facing
- exchange applications to be built on top of the protocol.
- </li>
- </ul>
- </div>
- ),
- },
- {
- prompt: 'If 0x protocol is free to use, where do transaction fees come in?',
- answer: (
- <div>
- 0x protocol uses off-chain order books to massively reduce friction costs for market makers and
- ensure that the blockchain is only used for trade settlement. Hosting and maintaining an
- off-chain order book is a service; to incent “Relayers” to provide this service they must be
- able to charge transaction fees on trading activity. Relayers are free to set their transaction
- fees to any value they desire. We expect Relayers to be highly competitive and transaction fees
- to approach an efficient economic equilibrium over time.
- </div>
- ),
- },
- {
- prompt: 'What are the differences between 0x protocol and state channels?',
- answer: (
- <div>
- <div>
- Participants in a state channel pass cryptographically signed messages back and forth,
- accumulating intermediate state changes without publishing them to the canonical chain until
- the channel is closed. State channels are ideal for “bar tab” applications where numerous
- intermediate state changes may be accumulated off-chain before being settled by a final
- on-chain transaction (i.e. day trading, poker, turn-based games).
- </div>
- <ul>
- <li>
- While state channels drastically reduce the number of on-chain transactions for specific
- use cases, numerous on-chain transactions and a security deposit are required to open
- and safely close a state channel making them less efficient than 0x for executing
- one-time trades.
- </li>
- <li>
- State channels are isolated from the Ethereum blockchain meaning that they cannot
- interact with smart contracts. 0x is designed to be integrated directly into smart
- contracts so trades can be executed programmatically in a single line of Solidity code.
- </li>
- </ul>
- </div>
- ),
- },
- {
- prompt: 'What types of digital assets are supported by 0x?',
- answer: (
- <div>
- 0x supports all Ethereum-based assets that adhere to the ERC20 token standard. There are many
- ERC20 tokens, worth a combined $2.2B, and more tokens are created each month. We believe that,
- by 2020, thousands of assets will be tokenized and moved onto the Ethereum blockchain including
- traditional securities such as equities, bonds and derivatives, fiat currencies and scarce
- digital goods such as video game items. In the future, cross-blockchain solutions such as{' '}
- <a href="https://cosmos.network/" target="_blank">
- Cosmos
- </a>{' '}
- and{' '}
- <a href="http://polkadot.io/" target="_blank">
- Polkadot
- </a>{' '}
- will allow cryptocurrencies to freely move between blockchains and, naturally, currencies such
- as Bitcoin will end up being represented as ERC20 tokens on the Ethereum blockchain.
- </div>
- ),
- },
- {
- prompt: '0x is open source: what prevents someone from forking the protocol?',
- answer: (
- <div>
- Ethereum and Bitcoin are both open source protocols. Each protocol has been forked, but the
- resulting clone networks have seen little adoption (as measured by transaction count or market
- cap). This is because users have little to no incentive to switch over to a clone network if the
- original has initial network effects and a talented developer team behind it. An exception is in
- the case that a protocol includes a controversial feature such as a method of rent extraction or
- a monetary policy that favors one group of users over another (Zcash developer subsidy - for
- better or worse - resulted in Zclassic). Perceived inequality can provide a strong enough
- incentive that users will fork the original protocol’s codebase and spin up a new network that
- eliminates the controversial feature. In the case of 0x, there is no rent extraction and no
- users are given special permissions. 0x protocol is upgradable. Cutting-edge technical
- capabilities can be integrated into 0x via decentralized governance (see section below),
- eliminating incentives to fork off of the original protocol and sacrifice the network effects
- surrounding liquidity that result from the shared protocol and settlement layer.
- </div>
- ),
- },
- ],
- },
- {
- name: '0x Token (ZRX)',
- questions: [
- {
- prompt: 'Explain how the 0x protocol token (zrx) works.',
- answer: (
- <div>
- <div>
- 0x protocol token (ZRX) is utilized in two ways: 1) to solve the{' '}
- <a href="https://en.wikipedia.org/wiki/Coordination_game" target="_blank">
- coordination problem
- </a>{' '}
- and drive network effects around liquidity, creating a feedback loop where early adopters of
- the protocol benefit from wider adoption and 2) to be used for decentralized governance over
- 0x protocol's update mechanism. In more detail:
- </div>
- <ul>
- <li>
- ZRX tokens are used by Makers and Takers (market participants that generate and consume
- orders, respectively) to pay transaction fees to Relayers (entities that host and
- maintain public order books).
- </li>
- <li>
- ZRX tokens are used for decentralized governance over 0x protocol’s update mechanism
- which allows its underlying smart contracts to be replaced and improved over time. An
- update mechanism is needed because 0x is built upon Ethereum’s rapidly evolving
- technology stack, decentralized governance is needed because 0x protocol’s smart
- contracts will have access to user funds and numerous dApps will need to plug into 0x
- smart contracts. Decentralized governance ensures that this update process is secure and
- minimizes disruption to the network.
- </li>
- </ul>
- </div>
- ),
- },
- {
- prompt: 'Why must transaction fees be denominated in 0x token (ZRX) rather than ETH?',
- answer: (
- <div>
- 0x protocol’s decentralized update mechanism is analogous to proof-of-stake. To maximize the
- alignment of stakeholder and end user incentives, the staked asset must provide utility within
- the protocol.
- </div>
- ),
- },
- {
- prompt: 'How will decentralized governance work?',
- answer: (
- <div>
- Decentralized governance is an ongoing focus of research; it will involve token voting with ZRX.
- Ultimately the solution will maximize security while also maximizing the protocol’s ability to
- absorb new innovations. Until the governance structure is formalized and encoded within 0x DAO,
- a multi-sig will be used as a placeholder.
- </div>
- ),
- },
- ],
- },
- {
- name: 'ZRX Token Launch and Fund Use',
- questions: [
- {
- prompt: 'What is the total supply of ZRX tokens?',
- answer: <div>1,000,000,000 ZRX. Fixed supply.</div>,
- },
- {
- prompt: 'When was the token launch? Was there a pre-sale?',
- answer: <div>The token launch was on August 15th, 2017. There was no pre-sale.</div>,
- },
- {
- prompt: 'What will the token launch proceeds be used for?',
- answer: (
- <div>
- 100% of the proceeds raised in the token launch will be used to fund the development of free and
- open source software, tools and infrastructure that support the protocol and surrounding
- ecosystem. Check out our{' '}
- <a
- href="https://docs.google.com/document/d/1_RVa-_bkU92fWRsC8eNy4vYjcTt-WC8GtqyyjbTd-oY"
- target="_blank"
- >
- development roadmap
- </a>
- .
- </div>
- ),
- },
- {
- prompt: 'What will be the initial distribution of ZRX tokens?',
- answer: (
- <div>
- <div className="center" style={{ width: '100%' }}>
- <img style={{ width: 350 }} src="/images/zrx_pie_chart.png" />
- </div>
- <div className="py1">
- <div className="bold pb1">Token Launch (50%)</div>
- <div>
- ZRX is inherently a governance token that plays a critical role in the process of
- upgrading 0x protocol. We are fully committed to formulating a functional and
- theoretically sound governance model and we plan to dedicate significant resources to
- R&D.
- </div>
- </div>
- <div className="py1">
- <div className="bold pb1">Retained by 0x (15%)</div>
- <div>
- The 0x core development team will be able to sustain itself for approximately five years
- using funds raised through the token launch. If 0x protocol proves to be as foundational
- a technology as we believe it to be, the retained ZRX tokens will allow the 0x core
- development team to sustain operations beyond the first 5 years.
- </div>
- </div>
- <div className="py1">
- <div className="bold pb1">Developer Fund (15%)</div>
- <div>
- The Developer Fund will be used to make targeted capital injections into high potential
- projects and teams that are attempting to grow the 0x ecosystem, strategic partnerships,
- hackathon prizes and community development activities.
- </div>
- </div>
- <div className="py1">
- <div className="bold pb1">Founding Team (10%)</div>
- <div>
- The founding team’s allocation of ZRX will vest over a traditional 4 year vesting
- schedule with a one year cliff. We believe this should be standard practice for any team
- that is committed to making their project a long term success.
- </div>
- </div>
- <div className="py1">
- <div className="bold pb1">Early Backers & Advisors (10%)</div>
- <div>
- Our backers and advisors have provided capital, resources and guidance that have allowed
- us to fill out our team, setup a robust legal entity and build a fully functional
- product before launching a token. As a result, we have a proven track record and can
- offer a token that holds genuine utility.
- </div>
- </div>
- </div>
- ),
- },
- {
- prompt: 'Can I mine ZRX tokens?',
- answer: (
- <div>
- No, the total supply of ZRX tokens is fixed and there is no continuous issuance model. Users
- that facilitate trading over 0x protocol by operating a Relayer earn transaction fees
- denominated in ZRX; as more trading activity is generated, more transaction fees are earned.
- </div>
- ),
- },
- {
- prompt: 'Will there be a lockup period for ZRX tokens sold in the token launch?',
- answer: <div>No, ZRX tokens sold in the token launch will immediately be liquid.</div>,
- },
- {
- prompt: 'Will there be a lockup period for tokens allocated to the founding team?',
- answer: (
- <div>
- Yes. ZRX tokens allocated to founders, advisors and staff members will be released over a 4 year
- vesting schedule with a 25% cliff upon completion of the initial token launch and 25% released
- each subsequent year in monthly installments. Staff members hired after the token launch will
- have a 4 year vesting schedule with a one year cliff.
- </div>
- ),
- },
- {
- prompt: 'Which cryptocurrencies will be accepted in the token launch?',
- answer: <div>ETH.</div>,
- },
- {
- prompt: 'When will 0x be live?',
- answer: (
- <div>
- An alpha version of 0x has been live on our private test network since January 2017. Version 1.0
- of 0x protocol will be deployed to the canonical Ethereum blockchain after a round of security
- audits and prior to the public token launch. 0x will be using the 0x protocol during our token
- launch.
- </div>
- ),
- },
- {
- prompt: 'Where can I find a development roadmap?',
- answer: (
- <div>
- Check it out{' '}
- <a
- href="https://drive.google.com/open?id=14IP1N8mt3YdsAoqYTyruMnZswpklUs3THyS1VXx71fo"
- target="_blank"
- >
- here
- </a>
- .
- </div>
- ),
- },
- ],
- },
- {
- name: 'Team',
- questions: [
- {
- prompt: 'Where is 0x based?',
- answer: <div>0x was founded in SF and is driven by a diverse group of contributors.</div>,
- },
- {
- prompt: 'How can I get involved?',
- answer: (
- <div>
- Join our{' '}
- <a href={constants.URL_ZEROEX_CHAT} target="_blank">
- Discord
- </a>
- ! As an open source project, 0x will rely on a worldwide community of passionate developers to
- contribute proposals, ideas and code.
- </div>
- ),
- },
- {
- prompt: 'Why the name 0x?',
- answer: (
- <div>
- 0x is the prefix for hexadecimal numeric constants including Ethereum addresses. In a more
- abstract context, as the first open protocol for exchange 0x represents the beginning of the end
- for the exchange industry’s rent seeking oligopoly: zero exchange.
- </div>
- ),
- },
- {
- prompt: 'How do you pronounce 0x?',
- answer: <div>We pronounce 0x as “zero-ex,” but you are free to pronounce it however you please.</div>,
- },
- ],
- },
-];
-
-export class FAQ extends React.Component<FAQProps, FAQState> {
- public componentDidMount(): void {
- window.scrollTo(0, 0);
- }
- public render(): React.ReactNode {
- return (
- <div>
- <DocumentTitle title="0x FAQ" />
- <TopBar blockchainIsLoaded={false} location={this.props.location} translate={this.props.translate} />
- <div id="faq" className="mx-auto max-width-4 pt4" style={{ color: colors.grey800 }}>
- <h1 className="center" style={{ ...styles.thin }}>
- 0x FAQ
- </h1>
- <div className="sm-px2 md-px2 lg-px0 pb4">{this._renderSections()}</div>
- </div>
- <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
- </div>
- );
- }
- private _renderSections(): React.ReactNode {
- const renderedSections = _.map(sections, (section: FAQSection, i: number) => {
- const isFirstSection = i === 0;
- return (
- <div key={section.name}>
- <h3>{section.name}</h3>
- {this._renderQuestions(section.questions, isFirstSection)}
- </div>
- );
- });
- return renderedSections;
- }
- private _renderQuestions(questions: FAQQuestion[], isFirstSection: boolean): React.ReactNode {
- const renderedQuestions = _.map(questions, (question: FAQQuestion, i: number) => {
- const isFirstQuestion = i === 0;
- return (
- <Question
- key={question.prompt}
- prompt={question.prompt}
- answer={question.answer}
- shouldDisplayExpanded={isFirstSection && isFirstQuestion}
- />
- );
- });
- return renderedQuestions;
- }
-}
diff --git a/packages/website/ts/pages/faq/question.tsx b/packages/website/ts/pages/faq/question.tsx
deleted file mode 100644
index 413ffb6ce..000000000
--- a/packages/website/ts/pages/faq/question.tsx
+++ /dev/null
@@ -1,50 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { Card, CardHeader, CardText } from 'material-ui/Card';
-import * as React from 'react';
-
-export interface QuestionProps {
- prompt: string;
- answer: React.ReactNode;
- shouldDisplayExpanded: boolean;
-}
-
-interface QuestionState {
- isExpanded: boolean;
-}
-
-export class Question extends React.Component<QuestionProps, QuestionState> {
- constructor(props: QuestionProps) {
- super(props);
- this.state = {
- isExpanded: props.shouldDisplayExpanded,
- };
- }
- public render(): React.ReactNode {
- return (
- <div className="py1">
- <Card
- initiallyExpanded={this.props.shouldDisplayExpanded}
- onExpandChange={this._onExchangeChange.bind(this)}
- >
- <CardHeader
- title={this.props.prompt}
- style={{
- borderBottom: this.state.isExpanded ? '1px solid rgba(0, 0, 0, 0.19)' : 'none',
- }}
- titleStyle={{ color: colors.darkerGrey }}
- actAsExpander={true}
- showExpandableButton={true}
- />
- <CardText expandable={true}>
- <div style={{ lineHeight: 1.4 }}>{this.props.answer}</div>
- </CardText>
- </Card>
- </div>
- );
- }
- private _onExchangeChange(): void {
- this.setState({
- isExpanded: !this.state.isExpanded,
- });
- }
-}
diff --git a/packages/website/ts/pages/fullscreen_message.tsx b/packages/website/ts/pages/fullscreen_message.tsx
deleted file mode 100644
index 675f27a01..000000000
--- a/packages/website/ts/pages/fullscreen_message.tsx
+++ /dev/null
@@ -1,30 +0,0 @@
-import { Styles } from '@0x/react-shared';
-import * as React from 'react';
-
-export interface FullscreenMessageProps {
- headerText: string;
- bodyText: string;
-}
-
-const styles: Styles = {
- thin: {
- fontWeight: 100,
- },
-};
-
-export const FullscreenMessage = (props: FullscreenMessageProps) => {
- return (
- <div className="mx-auto max-width-4 py4">
- <div className="center py4">
- <div className="py4">
- <div className="py4">
- <h1 style={styles.thin}>{props.headerText}</h1>
- <div className="py1">
- <div className="py3">{props.bodyText}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- );
-};
diff --git a/packages/website/ts/pages/instant.tsx b/packages/website/ts/pages/instant.tsx
deleted file mode 100644
index 586665d5b..000000000
--- a/packages/website/ts/pages/instant.tsx
+++ /dev/null
@@ -1,255 +0,0 @@
-import { utils as sharedUtils } from '@0x/react-shared';
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import styled, { keyframes } from 'styled-components';
-
-import { Banner } from 'ts/components/banner';
-import { Button } from 'ts/components/button';
-import { Definition } from 'ts/components/definition';
-import { Hero } from 'ts/components/hero';
-import { Section, SectionProps } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { Heading, Paragraph } from 'ts/components/text';
-import { Configurator } from 'ts/pages/instant/configurator';
-import { colors } from 'ts/style/colors';
-import { WebsitePaths } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-import { ModalContact } from '../components/modals/modal_contact';
-
-const CONFIGURATOR_MIN_WIDTH_PX = 1050;
-
-export const getStartedClick = () => {
- if (window.innerWidth < CONFIGURATOR_MIN_WIDTH_PX) {
- utils.openUrl(`${WebsitePaths.Wiki}#Get-Started-With-Instant`);
- } else {
- sharedUtils.setUrlHash('configurator');
- sharedUtils.scrollToHash('configurator', '');
- }
-};
-
-const featuresData = [
- {
- title: 'Support ERC-20 and ERC-721 tokens',
- icon: 'supportForAllEthereumStandards-large',
- description:
- 'Seamlessly integrate token purchasing into your product experience by offering digital assets ranging from in-game items to stablecoins.',
- links: [
- {
- label: 'Get Started',
- onClick: getStartedClick,
- shouldUseAnchorTag: true,
- },
- {
- label: 'Explore the Docs',
- url: `${WebsitePaths.Wiki}#Get-Started-With-Instant`,
- },
- ],
- },
- {
- title: 'Generate revenue for your business',
- icon: 'generateRevenueForYourBusiness-large',
- description:
- 'With just a few lines of code, you can earn up to 5% in affiliate fees on every transaction from your crypto wallet or dApp.',
- links: [
- {
- label: 'Learn about affiliate fees',
- url: `${WebsitePaths.Wiki}#Learn-About-Affiliate-Fees`,
- },
- ],
- },
- {
- title: 'Easy and flexible integration',
- icon: 'flexibleIntegration0xInstant',
- description:
- 'Use our out-of-the-box design or customize the user interface by integrating via the AssetBuyer engine.. You can also tap into 0x networked liquidity or choose your own liquidity pool.',
- links: [
- {
- label: 'Explore AssetBuyer',
- url: `${WebsitePaths.Docs}/asset-buyer`,
- },
- ],
- },
-];
-
-interface Props {
- theme: {
- bgColor: string;
- textColor: string;
- linkColor: string;
- };
-}
-
-export class Next0xInstant extends React.Component<Props> {
- public state = {
- isContactModalOpen: false,
- };
- public render(): React.ReactNode {
- return (
- <SiteWrap>
- <DocumentTitle title="0x Instant: Quick and secure crypto purchasing" />
- <Hero
- title="Introducing 0x Instant"
- description="A free and flexible way to offer simple crypto purchasing in any app or website"
- actions={<Button onClick={getStartedClick}>Get Started</Button>}
- />
-
- <Section isFullWidth={true} isPadded={false} padding="30px 0">
- <MarqueeWrap>
- <div>
- {[...Array(18)].map((item, index) => (
- <Card key={`card-${index}`} index={index}>
- <img src={`/images/0x-instant/widget-${(index % 6) + 1}.png`} />
- </Card>
- ))}
- </div>
- </MarqueeWrap>
- </Section>
-
- <Section>
- {_.map(featuresData, (item, index) => (
- <Definition
- key={`definition-${index}`}
- icon={item.icon}
- title={item.title}
- description={item.description}
- isInlineIcon={true}
- iconSize={240}
- actions={item.links}
- />
- ))}
- </Section>
-
- <ConfiguratorSection
- id="configurator"
- maxWidth="1386px"
- padding="0 58px 70px"
- bgColor={colors.backgroundDark}
- >
- <Heading>0x Instant Configurator</Heading>
- <Configurator />
- </ConfiguratorSection>
-
- <Banner
- heading="Need more flexibility?"
- subline="Dive into our docs, or contact us if needed"
- mainCta={{ text: 'Explore the Docs', href: `${WebsitePaths.Wiki}#Get-Started-With-Instant` }}
- secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }}
- />
- <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
-
- <Section maxWidth="1170px" isPadded={false} padding="60px 0">
- <Paragraph size="small" isMuted={0.5}>
- Disclaimer: The laws and regulations applicable to the use and exchange of digital assets and
- blockchain-native tokens, including through any software developed using the licensed work
- created by ZeroEx Intl. (the “Work”), vary by jurisdiction. As set forth in the Apache License,
- Version 2.0 applicable to the Work, developers are “solely responsible for determining the
- appropriateness of using or redistributing the Work,” which includes responsibility for ensuring
- compliance with any such applicable laws and regulations.
- </Paragraph>
- <Paragraph size="small" isMuted={0.5}>
- See the Apache License, Version 2.0 for the specific language governing all applicable
- permissions and limitations.
- </Paragraph>
- </Section>
- </SiteWrap>
- );
- }
-
- public _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- public _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-}
-
-// scroll animation calc is simply (imageWidth * totalRepetitions) / 2
-// img width is 370px
-const scroll = keyframes`
- 0% { transform: translate3d(-2220px, 0, 0) }
- 100% { transform: translate3d(-4440px, 0, 0) }
-`;
-
-const scrollMobile = keyframes`
- 0% { transform: translate3d(0, 0, 0) }
- 100% { transform: translate3d(-1800px, 0, 0) }
-`;
-
-const fadeUp = keyframes`
- 0% {
- opacity: 0;
- transform: translateY(50px);
- }
- 100% {
- opacity: 1;
- transform: translateY(0px);
- }
-`;
-
-const ConfiguratorSection = styled(Section)<SectionProps>`
- @media (max-width: ${CONFIGURATOR_MIN_WIDTH_PX}px) {
- display: none;
- }
-`;
-
-// width = 370 * 12
-// mobile width = 300
-const MarqueeWrap = styled.div`
- width: 100vw;
- height: 514px;
- padding-bottom: 60px;
-
- @media (max-width: 768px) {
- width: calc(100% + 60px);
- margin-left: -30px;
- overflow: hidden;
- }
-
- > div {
- height: auto;
- display: flex;
- will-change: transform;
- transform: translate3d(-2220px, 0, 0);
- }
-
- @media (min-width: 768px) {
- > div {
- width: 6660px;
- animation: ${scroll} 70s linear infinite;
- }
- }
-
- @media (max-width: 768px) {
- > div {
- width: 5400px;
- animation: ${scrollMobile} 70s linear infinite;
- }
- }
-`;
-
-const Card = styled.div<{ index: number }>`
- opacity: 0;
- flex-shrink: 0;
- transform: translateY(10px);
- will-change: opacity, transform;
- animation: ${fadeUp} 0.75s ${props => `${props.index * 0.05}s`} forwards;
-
- img {
- height: auto;
- }
-
- @media (min-width: 768px) {
- img {
- width: 370px;
- }
- }
-
- @media (max-width: 768px) {
- img {
- width: 300px;
- }
- }
-`;
diff --git a/packages/website/ts/pages/instant/code_demo.tsx b/packages/website/ts/pages/instant/code_demo.tsx
deleted file mode 100644
index c59f148b8..000000000
--- a/packages/website/ts/pages/instant/code_demo.tsx
+++ /dev/null
@@ -1,183 +0,0 @@
-import * as React from 'react';
-import * as CopyToClipboard from 'react-copy-to-clipboard';
-import SyntaxHighlighter from 'react-syntax-highlighter';
-
-import { Button } from 'ts/components/button';
-import { Container } from 'ts/components/ui/container';
-import { styled } from 'ts/style/theme';
-import { zIndex } from 'ts/style/z_index';
-
-const CustomPre = styled.pre`
- margin: 0px;
- line-height: 24px;
- overflow: scroll;
- width: 100%;
- height: 100%;
- max-height: 800px;
- border-radius: 4px;
- code {
- background-color: inherit !important;
- border-radius: 0px;
- font-family: 'Roboto Mono', sans-serif;
- border: none;
- }
- code:first-of-type {
- background-color: #060d0d !important;
- color: #999;
- min-height: 100%;
- text-align: center;
- margin-right: 15px;
- line-height: 25px;
- padding: 10px 7px !important;
- }
- code:last-of-type {
- position: relative;
- top: 10px;
- top: 0;
- padding-top: 11px;
- display: inline-block;
- line-height: 25px;
- }
-`;
-
-const customStyle = {
- 'hljs-comment': {
- color: '#7e7887',
- },
- 'hljs-quote': {
- color: '#7e7887',
- },
- 'hljs-variable': {
- color: '#be4678',
- },
- 'hljs-template-variable': {
- color: '#be4678',
- },
- 'hljs-attribute': {
- color: '#be4678',
- },
- 'hljs-regexp': {
- color: '#be4678',
- },
- 'hljs-link': {
- color: '#be4678',
- },
- 'hljs-tag': {
- color: '#61f5ff',
- },
- 'hljs-name': {
- color: '#61f5ff',
- },
- 'hljs-selector-id': {
- color: '#be4678',
- },
- 'hljs-selector-class': {
- color: '#be4678',
- },
- 'hljs-number': {
- color: '#c994ff',
- },
- 'hljs-meta': {
- color: '#61f5ff',
- },
- 'hljs-built_in': {
- color: '#aa573c',
- },
- 'hljs-builtin-name': {
- color: '#aa573c',
- },
- 'hljs-literal': {
- color: '#aa573c',
- },
- 'hljs-type': {
- color: '#aa573c',
- },
- 'hljs-params': {
- color: '#aa573c',
- },
- 'hljs-string': {
- color: '#bcff88',
- },
- 'hljs-symbol': {
- color: '#2a9292',
- },
- 'hljs-bullet': {
- color: '#2a9292',
- },
- 'hljs-title': {
- color: '#576ddb',
- },
- 'hljs-section': {
- color: '#576ddb',
- },
- 'hljs-keyword': {
- color: '#955ae7',
- },
- 'hljs-selector-tag': {
- color: '#955ae7',
- },
- 'hljs-deletion': {
- color: '#19171c',
- display: 'inline-block',
- width: '100%',
- backgroundColor: '#be4678',
- },
- 'hljs-addition': {
- color: '#19171c',
- display: 'inline-block',
- width: '100%',
- backgroundColor: '#2a9292',
- },
- hljs: {
- display: 'block',
- overflowX: 'hidden',
- background: '#1B2625',
- color: 'white',
- fontSize: '12px',
- },
- 'hljs-emphasis': {
- fontStyle: 'italic',
- },
- 'hljs-strong': {
- fontWeight: 'bold',
- },
-};
-
-export interface CodeDemoProps {
- children: string;
-}
-
-export interface CodeDemoState {
- didCopyCode: boolean;
-}
-
-export class CodeDemo extends React.Component<CodeDemoProps, CodeDemoState> {
- public state: CodeDemoState = {
- didCopyCode: false,
- };
- public render(): React.ReactNode {
- const copyButtonText = this.state.didCopyCode ? 'Copied!' : 'Copy';
- return (
- <Container position="relative" height="100%">
- <Container position="absolute" top="10px" right="10px" zIndex={zIndex.overlay - 1}>
- <CopyToClipboard text={this.props.children} onCopy={this._handleCopyClick}>
- <StyledButton>{copyButtonText}</StyledButton>
- </CopyToClipboard>
- </Container>
- <SyntaxHighlighter language="html" style={customStyle} showLineNumbers={true} PreTag={CustomPre}>
- {this.props.children}
- </SyntaxHighlighter>
- </Container>
- );
- }
- private readonly _handleCopyClick = () => {
- this.setState({ didCopyCode: true });
- };
-}
-
-const StyledButton = styled(Button)`
- border-radius: 4px;
- font-size: 15px;
- font-weight: 400;
- padding: 9px 21px 7px;
-`;
diff --git a/packages/website/ts/pages/instant/config_generator.tsx b/packages/website/ts/pages/instant/config_generator.tsx
deleted file mode 100644
index 29fce85db..000000000
--- a/packages/website/ts/pages/instant/config_generator.tsx
+++ /dev/null
@@ -1,329 +0,0 @@
-import { StandardRelayerAPIOrderProvider } from '@0x/asset-buyer';
-import { getContractAddressesForNetworkOrThrow } from '@0x/contract-addresses';
-import { assetDataUtils } from '@0x/order-utils';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { CheckMark } from 'ts/components/ui/check_mark';
-import { Container } from 'ts/components/ui/container';
-import { MultiSelect } from 'ts/components/ui/multi_select';
-import { Spinner } from 'ts/components/ui/spinner';
-import { Text } from 'ts/components/ui/text';
-import { ConfigGeneratorAddressInput } from 'ts/pages/instant/config_generator_address_input';
-import { FeePercentageSlider } from 'ts/pages/instant/fee_percentage_slider';
-import { colors } from 'ts/style/colors';
-import { WebsitePaths } from 'ts/types';
-import { constants } from 'ts/utils/constants';
-
-// New components
-import { Heading } from 'ts/components/text';
-import { Select, SelectItemConfig } from 'ts/pages/instant/select';
-
-import { assetMetaDataMap } from '../../../../instant/src/data/asset_meta_data_map';
-import { ERC20AssetMetaData, ZeroExInstantBaseConfig } from '../../../../instant/src/types';
-
-export interface ConfigGeneratorProps {
- value: ZeroExInstantBaseConfig;
- onConfigChange: (config: ZeroExInstantBaseConfig) => void;
-}
-
-export interface ConfigGeneratorState {
- isLoadingAvailableTokens: boolean;
- // Address to token info
- availableTokens?: ObjectMap<ERC20AssetMetaData>;
-}
-
-const SRA_ENDPOINTS = ['https://api.radarrelay.com/0x/v2/', 'https://sra.bamboorelay.com/0x/v2/'];
-
-export class ConfigGenerator extends React.Component<ConfigGeneratorProps, ConfigGeneratorState> {
- public state: ConfigGeneratorState = {
- isLoadingAvailableTokens: true,
- };
- public componentDidMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._setAvailableAssetsFromOrderProvider();
- }
- public componentDidUpdate(prevProps: ConfigGeneratorProps): void {
- if (prevProps.value.orderSource !== this.props.value.orderSource) {
- // tslint:disable-next-line:no-floating-promises
- this._setAvailableAssetsFromOrderProvider();
- const newConfig: ZeroExInstantBaseConfig = {
- ...this.props.value,
- availableAssetDatas: undefined,
- };
- this.props.onConfigChange(newConfig);
- }
- }
- public render(): React.ReactNode {
- const { value } = this.props;
- if (!_.isString(value.orderSource)) {
- throw new Error('ConfigGenerator component only supports string values as an orderSource.');
- }
- return (
- <Container minWidth="350px">
- <ConfigGeneratorSection title="Liquidity Source">
- <Select
- shouldIncludeEmpty={false}
- id=""
- value={value.orderSource}
- items={this._generateItems()}
- onChange={this._handleSRASelection.bind(this)}
- />
- </ConfigGeneratorSection>
- <ConfigGeneratorSection {...this._getTokenSelectorProps()}>
- {this._renderTokenMultiSelectOrSpinner()}
- </ConfigGeneratorSection>
- <ConfigGeneratorSection title="Transaction fee ETH address" marginBottom="10px" isOptional={true}>
- <ConfigGeneratorAddressInput
- value={value.affiliateInfo ? value.affiliateInfo.feeRecipient : ''}
- onChange={this._handleAffiliateAddressChange}
- />
- </ConfigGeneratorSection>
- <ConfigGeneratorSection
- title="Fee percentage"
- actionText="Learn more"
- onActionTextClick={this._handleAffiliatePercentageLearnMoreClick}
- >
- <FeePercentageSlider
- value={value.affiliateInfo.feePercentage}
- onChange={this._handleAffiliatePercentageChange}
- isDisabled={
- _.isUndefined(value.affiliateInfo) ||
- _.isUndefined(value.affiliateInfo.feeRecipient) ||
- _.isEmpty(value.affiliateInfo.feeRecipient)
- }
- />
- </ConfigGeneratorSection>
- </Container>
- );
- }
- private readonly _getTokenSelectorProps = (): ConfigGeneratorSectionProps => {
- if (_.isEmpty(this.state.availableTokens)) {
- return {
- title: 'What tokens can users buy?',
- };
- }
- if (_.isUndefined(this.props.value.availableAssetDatas)) {
- return {
- title: 'What tokens can users buy?',
- actionText: 'Unselect All',
- onActionTextClick: this._handleUnselectAllClick,
- };
- }
- return {
- title: 'What tokens can users buy?',
- actionText: 'Select All',
- onActionTextClick: this._handleSelectAllClick,
- };
- };
- private readonly _generateItems = (): SelectItemConfig[] => {
- return _.map(SRA_ENDPOINTS, endpoint => ({
- label: endpoint,
- value: endpoint,
- onClick: this._handleSRASelection.bind(this, endpoint),
- }));
- };
- private readonly _handleAffiliatePercentageLearnMoreClick = (): void => {
- window.open(`${WebsitePaths.Wiki}#Learn-About-Affiliate-Fees`, '_blank');
- };
- private readonly _handleSRASelection = (event: React.ChangeEvent<HTMLSelectElement>) => {
- const sraEndpoint = event.target.value;
- const newConfig: ZeroExInstantBaseConfig = {
- ...this.props.value,
- orderSource: sraEndpoint,
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _handleAffiliateAddressChange = (address: string, isValid: boolean) => {
- const oldConfig: ZeroExInstantBaseConfig = this.props.value;
- const newConfig: ZeroExInstantBaseConfig = {
- ...oldConfig,
- affiliateInfo: {
- feeRecipient: address,
- feePercentage: oldConfig.affiliateInfo.feePercentage,
- },
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _handleAffiliatePercentageChange = (value: number) => {
- const oldConfig: ZeroExInstantBaseConfig = this.props.value;
- const newConfig: ZeroExInstantBaseConfig = {
- ...oldConfig,
- affiliateInfo: {
- feeRecipient: oldConfig.affiliateInfo.feeRecipient,
- feePercentage: value,
- },
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _handleSelectAllClick = () => {
- const newConfig: ZeroExInstantBaseConfig = {
- ...this.props.value,
- availableAssetDatas: undefined,
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _handleUnselectAllClick = () => {
- const newConfig: ZeroExInstantBaseConfig = {
- ...this.props.value,
- availableAssetDatas: [],
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _handleTokenClick = (assetData: string) => {
- const { value } = this.props;
- let newAvailableAssetDatas: string[] = [];
- const allKnownAssetDatas = _.keys(this.state.availableTokens);
- const availableAssetDatas = value.availableAssetDatas;
- if (_.isUndefined(availableAssetDatas)) {
- // It being undefined means it's all tokens.
- newAvailableAssetDatas = _.pull(allKnownAssetDatas, assetData);
- } else if (!_.includes(availableAssetDatas, assetData)) {
- // Add it
- newAvailableAssetDatas = [...availableAssetDatas, assetData];
- if (newAvailableAssetDatas.length === allKnownAssetDatas.length) {
- // If all tokens are manually selected, just show none.
- newAvailableAssetDatas = undefined;
- }
- } else {
- // Remove it
- newAvailableAssetDatas = _.pull(availableAssetDatas, assetData);
- }
- const newConfig: ZeroExInstantBaseConfig = {
- ...this.props.value,
- availableAssetDatas: newAvailableAssetDatas,
- };
- this.props.onConfigChange(newConfig);
- };
- private readonly _setAvailableAssetsFromOrderProvider = async (): Promise<void> => {
- const { value } = this.props;
- if (!_.isUndefined(value.orderSource) && _.isString(value.orderSource)) {
- this.setState({ isLoadingAvailableTokens: true });
- const networkId = constants.NETWORK_ID_MAINNET;
- const sraOrderProvider = new StandardRelayerAPIOrderProvider(value.orderSource, networkId);
- const etherTokenAddress = getContractAddressesForNetworkOrThrow(networkId).etherToken;
- const etherTokenAssetData = assetDataUtils.encodeERC20AssetData(etherTokenAddress);
- const assetDatas = await sraOrderProvider.getAvailableMakerAssetDatasAsync(etherTokenAssetData);
- const availableTokens = _.reduce(
- assetDatas,
- (acc, assetData) => {
- const metaDataIfExists = assetMetaDataMap[assetData] as ERC20AssetMetaData;
- if (metaDataIfExists) {
- acc[assetData] = metaDataIfExists;
- }
- return acc;
- },
- {} as ObjectMap<ERC20AssetMetaData>,
- );
- this.setState({ availableTokens, isLoadingAvailableTokens: false });
- }
- };
- private readonly _renderTokenMultiSelectOrSpinner = (): React.ReactNode => {
- const { value } = this.props;
- const { availableTokens, isLoadingAvailableTokens } = this.state;
- const multiSelectHeight = '200px';
- if (isLoadingAvailableTokens) {
- return (
- <Container
- className="flex flex-column items-center justify-center"
- height={multiSelectHeight}
- backgroundColor={colors.white}
- borderRadius="4px"
- width="100%"
- >
- <Container position="relative" left="12px" marginBottom="20px">
- <Spinner />
- </Container>
- <Text fontSize="16px">Loading...</Text>
- </Container>
- );
- }
- const availableAssetDatas = _.keys(availableTokens);
- if (availableAssetDatas.length === 0) {
- return (
- <Container
- className="flex flex-column items-center justify-center"
- height={multiSelectHeight}
- backgroundColor={colors.white}
- borderRadius="4px"
- width="100%"
- >
- <Text fontSize="16px">No tokens available. Try another endpoint?</Text>
- </Container>
- );
- }
- const items = _.map(_.keys(availableTokens), assetData => {
- const metaData = availableTokens[assetData];
- return {
- value: assetData,
- renderItemContent: (isSelected: boolean) => (
- <Container className="flex items-center">
- <Container marginRight="10px">
- <CheckMark isChecked={isSelected} color={colors.brandLight} />
- </Container>
- <CheckboxText isSelected={isSelected}>
- {metaData.symbol.toUpperCase()} — {metaData.name}
- </CheckboxText>
- </Container>
- ),
- onClick: this._handleTokenClick.bind(this, assetData),
- };
- });
- return <MultiSelect items={items} selectedValues={value.availableAssetDatas} height={multiSelectHeight} />;
- };
-}
-
-export interface ConfigGeneratorSectionProps {
- title: string;
- actionText?: string;
- onActionTextClick?: () => void;
- isOptional?: boolean;
- marginBottom?: string;
-}
-
-export const ConfigGeneratorSection: React.StatelessComponent<ConfigGeneratorSectionProps> = ({
- title,
- actionText,
- onActionTextClick,
- isOptional,
- marginBottom,
- children,
-}) => (
- <Container marginBottom={marginBottom}>
- <Container marginBottom="10px" className="flex justify-between items-center">
- <Heading size="small" marginBottom="0" isFlex={true}>
- <span>{title}</span>
- {isOptional && <OptionalText> Optional</OptionalText>}
- </Heading>
- {actionText && <OptionalAction onClick={onActionTextClick}>{actionText}</OptionalAction>}
- </Container>
- {children}
- </Container>
-);
-
-ConfigGeneratorSection.defaultProps = {
- marginBottom: '30px',
-};
-
-const OptionalText = styled.span`
- display: inline;
- font-size: 14px;
- color: #999999;
- flex-shrink: 0;
-`;
-
-interface CheckboxTextProps {
- isSelected?: boolean;
-}
-
-const CheckboxText = styled.span<CheckboxTextProps>`
- font-size: 14px;
- line-height: 18px;
- color: ${props => (props.isSelected ? colors.brandDark : '#666666')};
-`;
-
-const OptionalAction = styled(OptionalText)`
- cursor: pointer;
-`;
diff --git a/packages/website/ts/pages/instant/config_generator_address_input.tsx b/packages/website/ts/pages/instant/config_generator_address_input.tsx
deleted file mode 100644
index 890e39da6..000000000
--- a/packages/website/ts/pages/instant/config_generator_address_input.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-import { addressUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { colors } from 'ts/style/colors';
-
-import { Container } from 'ts/components/ui/container';
-
-import { Paragraph } from 'ts/components/text';
-
-export interface ConfigGeneratorAddressInputProps {
- value?: string;
- onChange?: (address: string, isValid: boolean) => void;
-}
-
-export interface ConfigGeneratorAddressInputState {
- errMsg: string;
-}
-
-export interface InputProps {
- className?: string;
- value?: string;
- width?: string;
- fontSize?: string;
- fontColor?: string;
- padding?: string;
- placeholderColor?: string;
- placeholder?: string;
- backgroundColor?: string;
- onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
-}
-
-export class ConfigGeneratorAddressInput extends React.Component<
- ConfigGeneratorAddressInputProps,
- ConfigGeneratorAddressInputState
-> {
- public state = {
- errMsg: '',
- };
- public render(): React.ReactNode {
- const { errMsg } = this.state;
- const hasError = !_.isEmpty(errMsg);
- return (
- <Container height="80px">
- <Input value={this.props.value} onChange={this._handleChange} placeholder="0xe99...aa8da4" />
- <Container marginTop="5px" isHidden={!hasError} height="25px">
- <Paragraph size="small" isNoMargin={true}>
- {errMsg}
- </Paragraph>
- </Container>
- </Container>
- );
- }
-
- private readonly _handleChange = (event: React.ChangeEvent<HTMLInputElement>): void => {
- const address = event.target.value;
- const isValidAddress = addressUtils.isAddress(address.toLowerCase()) || address === '';
- const errMsg = isValidAddress ? '' : 'Please enter a valid Ethereum address';
- this.setState({
- errMsg,
- });
- this.props.onChange(address, isValidAddress);
- };
-}
-
-const PlainInput: React.StatelessComponent<InputProps> = ({ value, className, placeholder, onChange }) => (
- <input className={className} value={value} onChange={onChange} placeholder={placeholder} />
-);
-
-export const Input = styled(PlainInput)`
- background-color: ${colors.white};
- color: ${colors.textDarkSecondary};
- font-size: 1rem;
- width: 100%;
- padding: 16px 20px 18px;
- border-radius: 4px;
- border: 1px solid transparent;
- outline: none;
- &::placeholder {
- color: #333333;
- opacity: 0.5;
- }
-`;
diff --git a/packages/website/ts/pages/instant/configurator.tsx b/packages/website/ts/pages/instant/configurator.tsx
deleted file mode 100644
index a63e1752e..000000000
--- a/packages/website/ts/pages/instant/configurator.tsx
+++ /dev/null
@@ -1,104 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import styled from 'styled-components';
-
-import { CodeDemo } from 'ts/pages/instant/code_demo';
-import { ConfigGenerator } from 'ts/pages/instant/config_generator';
-
-import { Link } from 'ts/components/link';
-import { Column, FlexWrap } from 'ts/components/newLayout';
-import { Heading } from 'ts/components/text';
-import { WebsitePaths } from 'ts/types';
-
-import { ZeroExInstantBaseConfig } from '../../../../instant/src/types';
-
-export interface ConfiguratorState {
- instantConfig: ZeroExInstantBaseConfig;
-}
-
-export class Configurator extends React.Component {
- public state: ConfiguratorState = {
- instantConfig: {
- orderSource: 'https://api.radarrelay.com/0x/v2/',
- availableAssetDatas: undefined,
- affiliateInfo: {
- feeRecipient: '',
- feePercentage: 0,
- },
- },
- };
- public render(): React.ReactNode {
- const codeToDisplay = this._generateCodeDemoCode();
- return (
- <FlexWrap isFlex={true}>
- <Column width="442px" padding="0 70px 0 0">
- <ConfigGenerator value={this.state.instantConfig} onConfigChange={this._handleConfigChange} />
- </Column>
- <Column width="100%">
- <HeadingWrapper>
- <Heading size="small" marginBottom="15px">
- Code Snippet
- </Heading>
- <Link href={`${WebsitePaths.Wiki}#Get-Started-With-Instant`} isBlock={true} target="_blank">
- Explore the Docs
- </Link>
- </HeadingWrapper>
- <CodeDemo key={codeToDisplay}>{codeToDisplay}</CodeDemo>
- </Column>
- </FlexWrap>
- );
- }
- private readonly _handleConfigChange = (config: ZeroExInstantBaseConfig) => {
- this.setState({
- instantConfig: config,
- });
- };
- private readonly _generateCodeDemoCode = (): string => {
- const { instantConfig } = this.state;
- return `<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8" />
- <script src="https://instant.0x.org/instant.js"></script>
- </head>
- <body>
- <script>
- zeroExInstant.render({
- orderSource: '${instantConfig.orderSource}',${
- !_.isUndefined(instantConfig.affiliateInfo) && instantConfig.affiliateInfo.feeRecipient
- ? `\n affiliateInfo: {
- feeRecipient: '${instantConfig.affiliateInfo.feeRecipient.toLowerCase()}',
- feePercentage: ${instantConfig.affiliateInfo.feePercentage}
- },`
- : ''
- }${
- !_.isUndefined(instantConfig.availableAssetDatas)
- ? `\n availableAssetDatas: ${this._renderAvailableAssetDatasString(
- instantConfig.availableAssetDatas,
- )}`
- : ''
- }
- }, 'body');
- </script>
- </body>
- </html>`;
- };
- private readonly _renderAvailableAssetDatasString = (availableAssetDatas: string[]): string => {
- const stringAvailableAssetDatas = availableAssetDatas.map(assetData => `'${assetData}'`);
- if (availableAssetDatas.length < 2) {
- return `[${stringAvailableAssetDatas.join(', ')}]`;
- }
- return `[\n ${stringAvailableAssetDatas.join(
- ', \n ',
- )}\n ]`;
- };
-}
-
-const HeadingWrapper = styled.div`
- display: flex;
- justify-content: space-between;
-
- a {
- transform: translateY(-8px);
- }
-`;
diff --git a/packages/website/ts/pages/instant/fee_percentage_slider.tsx b/packages/website/ts/pages/instant/fee_percentage_slider.tsx
deleted file mode 100644
index c4d9f908f..000000000
--- a/packages/website/ts/pages/instant/fee_percentage_slider.tsx
+++ /dev/null
@@ -1,80 +0,0 @@
-import Slider from 'rc-slider';
-import * as React from 'react';
-import styled from 'styled-components';
-import 'ts/pages/instant/rc-slider.css';
-
-import { colors } from 'ts/style/colors';
-
-const SliderWithTooltip = (Slider as any).createSliderWithTooltip(Slider);
-// tslint:disable-next-line:no-unused-expression
-
-export interface FeePercentageSliderProps {
- value: number;
- isDisabled?: boolean;
- onChange: (value: number) => void;
-}
-
-export class FeePercentageSlider extends React.Component<FeePercentageSliderProps> {
- public render(): React.ReactNode {
- return (
- <StyledSlider
- min={0}
- max={0.05}
- step={0.0025}
- value={this.props.value}
- disabled={this.props.isDisabled}
- onChange={this.props.onChange}
- tipFormatter={this._feePercentageSliderFormatter}
- tipProps={{ placement: 'bottom', overlayStyle: { backgroundColor: '#fff', borderRadius: '4px' } }}
- trackStyle={{
- backgroundColor: colors.brandLight,
- }}
- railStyle={{
- backgroundColor: 'rgba(255, 255, 255, 0.2)',
- }}
- handleStyle={{
- border: 'none',
- boxShadow: 'none',
- }}
- activeDotStyle={{
- boxShadow: 'none',
- border: 'none',
- }}
- />
- );
- }
- private readonly _feePercentageSliderFormatter = (value: number): React.ReactNode => {
- return <Text>{`${(value * 100).toFixed(2)}%`}</Text>;
- };
-}
-
-const StyledSlider = styled(SliderWithTooltip)`
- .rc-slider-tooltip__inner {
- box-shadow: none !important;
- background-color: ${colors.white} !important;
- border-radius: 4px !important;
- padding: 3px 12px !important;
- height: auto !important;
- position: relative;
- top: 7px;
- &:after {
- border: solid transparent;
- content: ' ';
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none;
- border-width: 6px;
- bottom: 100%;
- left: 100%;
- border-bottom-color: ${colors.white};
- margin-left: -60%;
- }
- }
-`;
-
-const Text = styled.span`
- color: #000000;
- font-size: 12px;
- line-height: 18px;
-`;
diff --git a/packages/website/ts/pages/instant/rc-slider.css b/packages/website/ts/pages/instant/rc-slider.css
deleted file mode 100644
index 63038324e..000000000
--- a/packages/website/ts/pages/instant/rc-slider.css
+++ /dev/null
@@ -1,295 +0,0 @@
-.rc-slider {
- position: relative;
- height: 14px;
- padding: 5px 0;
- width: 100%;
- border-radius: 6px;
- -ms-touch-action: none;
- touch-action: none;
- box-sizing: border-box;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-.rc-slider * {
- box-sizing: border-box;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-.rc-slider-rail {
- position: absolute;
- width: 100%;
- background-color: #e9e9e9;
- height: 4px;
- border-radius: 6px;
-}
-
-.rc-slider-track {
- position: absolute;
- left: 0;
- height: 4px;
- border-radius: 6px;
- background-color: #abe2fb;
-}
-
-.rc-slider-handle {
- position: absolute;
- margin-left: -7px;
- margin-top: -5px;
- width: 14px;
- height: 14px;
- cursor: pointer;
- cursor: -webkit-grab;
- cursor: grab;
- border-radius: 50%;
- border: solid 2px #96dbfa;
- background-color: #fff;
- -ms-touch-action: pan-x;
- touch-action: pan-x;
-}
-
-.rc-slider-handle:focus {
- border-color: #57c5f7;
- box-shadow: 0 0 0 5px #96dbfa;
- outline: none;
-}
-
-.rc-slider-handle-click-focused:focus {
- border-color: #96dbfa;
- box-shadow: unset;
-}
-
-.rc-slider-handle:hover {
- border-color: #57c5f7;
-}
-
-.rc-slider-handle:active {
- border-color: #57c5f7;
- box-shadow: 0 0 5px #57c5f7;
- cursor: -webkit-grabbing;
- cursor: grabbing;
-}
-
-.rc-slider-mark {
- position: absolute;
- top: 18px;
- left: 0;
- width: 100%;
- font-size: 12px;
-}
-
-.rc-slider-mark-text {
- position: absolute;
- display: inline-block;
- vertical-align: middle;
- text-align: center;
- cursor: pointer;
- color: #999;
-}
-
-.rc-slider-mark-text-active {
- color: #666;
-}
-
-.rc-slider-step {
- position: absolute;
- width: 100%;
- height: 4px;
- background: transparent;
-}
-
-.rc-slider-dot {
- position: absolute;
- bottom: -2px;
- margin-left: -4px;
- width: 8px;
- height: 8px;
- border: 2px solid #e9e9e9;
- background-color: #fff;
- cursor: pointer;
- border-radius: 50%;
- vertical-align: middle;
-}
-
-.rc-slider-dot-active {
- border-color: #96dbfa;
-}
-
-.rc-slider-disabled {
- opacity: 0.2;
-}
-
-.rc-slider-disabled .rc-slider-track {
- background-color: #ccc;
-}
-
-.rc-slider-disabled .rc-slider-handle,
-.rc-slider-disabled .rc-slider-dot {
- border-color: #ccc;
- box-shadow: none;
- background-color: #fff;
- cursor: not-allowed;
-}
-
-.rc-slider-disabled .rc-slider-mark-text,
-.rc-slider-disabled .rc-slider-dot {
- cursor: not-allowed !important;
-}
-
-.rc-slider-vertical {
- width: 14px;
- height: 100%;
- padding: 0 5px;
-}
-
-.rc-slider-vertical .rc-slider-rail {
- height: 100%;
- width: 4px;
-}
-
-.rc-slider-vertical .rc-slider-track {
- left: 5px;
- bottom: 0;
- width: 4px;
-}
-
-.rc-slider-vertical .rc-slider-handle {
- margin-left: -5px;
- margin-bottom: -7px;
- -ms-touch-action: pan-y;
- touch-action: pan-y;
-}
-
-.rc-slider-vertical .rc-slider-mark {
- top: 0;
- left: 18px;
- height: 100%;
-}
-
-.rc-slider-vertical .rc-slider-step {
- height: 100%;
- width: 4px;
-}
-
-.rc-slider-vertical .rc-slider-dot {
- left: 2px;
- margin-bottom: -4px;
-}
-
-.rc-slider-vertical .rc-slider-dot:first-child {
- margin-bottom: -4px;
-}
-
-.rc-slider-vertical .rc-slider-dot:last-child {
- margin-bottom: -4px;
-}
-
-.rc-slider-tooltip-zoom-down-enter,
-.rc-slider-tooltip-zoom-down-appear {
- animation-duration: .3s;
- animation-fill-mode: both;
- display: block !important;
- animation-play-state: paused;
-}
-
-.rc-slider-tooltip-zoom-down-leave {
- animation-duration: .3s;
- animation-fill-mode: both;
- display: block !important;
- animation-play-state: paused;
-}
-
-.rc-slider-tooltip-zoom-down-enter.rc-slider-tooltip-zoom-down-enter-active,
-.rc-slider-tooltip-zoom-down-appear.rc-slider-tooltip-zoom-down-appear-active {
- animation-name: rcSliderTooltipZoomDownIn;
- animation-play-state: running;
-}
-
-.rc-slider-tooltip-zoom-down-leave.rc-slider-tooltip-zoom-down-leave-active {
- animation-name: rcSliderTooltipZoomDownOut;
- animation-play-state: running;
-}
-
-.rc-slider-tooltip-zoom-down-enter,
-.rc-slider-tooltip-zoom-down-appear {
- transform: scale(0, 0);
- animation-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
-}
-
-.rc-slider-tooltip-zoom-down-leave {
- animation-timing-function: cubic-bezier(0.755, 0.05, 0.855, 0.06);
-}
-
-@keyframes rcSliderTooltipZoomDownIn {
- 0% {
- opacity: 0;
- transform-origin: 50% 100%;
- transform: scale(0, 0);
- }
-
- 100% {
- transform-origin: 50% 100%;
- transform: scale(1, 1);
- }
-}
-
-@keyframes rcSliderTooltipZoomDownOut {
- 0% {
- transform-origin: 50% 100%;
- transform: scale(1, 1);
- }
-
- 100% {
- opacity: 0;
- transform-origin: 50% 100%;
- transform: scale(0, 0);
- }
-}
-
-.rc-slider-tooltip {
- position: absolute;
- left: -9999px;
- top: -9999px;
- visibility: visible;
- box-sizing: border-box;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-.rc-slider-tooltip * {
- box-sizing: border-box;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
-}
-
-.rc-slider-tooltip-hidden {
- display: none;
-}
-
-.rc-slider-tooltip-placement-top {
- padding: 4px 0 8px 0;
-}
-
-.rc-slider-tooltip-inner {
- padding: 4px 6px 4px;
- min-width: 24px;
- height: 24px;
- font-size: 12px;
- line-height: 1;
- color: #000;
- text-align: center;
- text-decoration: none;
-}
-
-.rc-slider-tooltip-arrow {
- position: absolute;
- width: 0;
- height: 0;
- border-color: transparent;
- border-style: solid;
-}
-
-.rc-slider-tooltip-placement-top .rc-slider-tooltip-arrow {
- bottom: 4px;
- left: 50%;
- margin-left: -4px;
- border-width: 4px 4px 0;
- border-top-color: #6c6c6c;
-}
diff --git a/packages/website/ts/pages/instant/select.tsx b/packages/website/ts/pages/instant/select.tsx
deleted file mode 100644
index d4146cfb0..000000000
--- a/packages/website/ts/pages/instant/select.tsx
+++ /dev/null
@@ -1,74 +0,0 @@
-import * as React from 'react';
-import styled from 'styled-components';
-
-export interface SelectItemConfig {
- label: string;
- value?: string;
- onClick?: () => void;
-}
-
-interface SelectProps {
- value?: string;
- id: string;
- items: SelectItemConfig[];
- emptyText?: string;
- onChange?: (ev: React.ChangeEvent<HTMLSelectElement>) => void;
- shouldIncludeEmpty: boolean;
-}
-
-export const Select: React.FunctionComponent<SelectProps> = ({
- value,
- id,
- items,
- shouldIncludeEmpty,
- emptyText,
- onChange,
-}) => {
- return (
- <Container>
- <StyledSelect id={id} onChange={onChange}>
- {shouldIncludeEmpty && <option value="">{emptyText}</option>}
- {items.map((item, index) => (
- <option
- key={`${id}-item-${index}`}
- value={item.value}
- selected={item.value === value}
- onClick={item.onClick}
- >
- {item.label}
- </option>
- ))}
- </StyledSelect>
- <Caret width="12" height="7" fill="none" xmlns="http://www.w3.org/2000/svg">
- <path d="M11 1L6 6 1 1" stroke="#666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" />
- </Caret>
- </Container>
- );
-};
-
-Select.defaultProps = {
- emptyText: 'Select...',
- shouldIncludeEmpty: true,
-};
-
-const Container = styled.div`
- background-color: #fff;
- border-radius: 4px;
- display: flex;
- width: 100%;
- position: relative;
-`;
-
-const StyledSelect = styled.select`
- appearance: none;
- border: 0;
- font-size: 1rem;
- width: 100%;
- padding: 20px 20px 20px 20px;
-`;
-
-const Caret = styled.svg`
- position: absolute;
- right: 20px;
- top: calc(50% - 4px);
-`;
diff --git a/packages/website/ts/pages/landing.tsx b/packages/website/ts/pages/landing.tsx
deleted file mode 100644
index b47d34dce..000000000
--- a/packages/website/ts/pages/landing.tsx
+++ /dev/null
@@ -1,44 +0,0 @@
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-
-import { SectionLandingAbout } from 'ts/components/sections/landing/about';
-import { SectionLandingClients } from 'ts/components/sections/landing/clients';
-import { SectionLandingCta } from 'ts/components/sections/landing/cta';
-import { SectionLandingHero } from 'ts/components/sections/landing/hero';
-import { SiteWrap } from 'ts/components/siteWrap';
-
-import { ModalContact } from 'ts/components/modals/modal_contact';
-
-interface Props {
- theme: {
- bgColor: string;
- textColor: string;
- linkColor: string;
- };
-}
-
-export class NextLanding extends React.Component<Props> {
- public state = {
- isContactModalOpen: false,
- };
- public render(): React.ReactNode {
- return (
- <SiteWrap theme="dark">
- <DocumentTitle title="0x: The protocol for trading tokens on Ethereum" />
- <SectionLandingHero />
- <SectionLandingAbout />
- <SectionLandingClients />
- <SectionLandingCta onContactClick={this._onOpenContactModal} />
- <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
- </SiteWrap>
- );
- }
-
- public _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- public _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-}
diff --git a/packages/website/ts/pages/launch_kit.tsx b/packages/website/ts/pages/launch_kit.tsx
deleted file mode 100644
index dd4de4d99..000000000
--- a/packages/website/ts/pages/launch_kit.tsx
+++ /dev/null
@@ -1,125 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-
-import { Hero } from 'ts/components/hero';
-
-import { Banner } from 'ts/components/banner';
-import { Button } from 'ts/components/button';
-import { Definition } from 'ts/components/definition';
-import { Icon } from 'ts/components/icon';
-import { SiteWrap } from 'ts/components/siteWrap';
-
-import { Section } from 'ts/components/newLayout';
-import { constants } from 'ts/utils/constants';
-
-import { ModalContact } from '../components/modals/modal_contact';
-
-const offersData = [
- {
- icon: 'supportForAllEthereumStandards',
- title: 'Perfect for developers who need a simple drop-in marketplace',
- description: (
- <ul>
- <li>Quickly launch a market for your project’s token</li>
- <li>Seamlessly create an in-game marketplace for digital items and collectables</li>
- <li>Easily build a 0x relayer for your local market</li>
- </ul>
- ),
- },
-];
-
-export class NextLaunchKit extends React.Component {
- public state = {
- isContactModalOpen: false,
- };
- public render(): React.ReactNode {
- return (
- <SiteWrap theme="dark">
- <DocumentTitle title="0x Launch Kit: Launch a relayer in under a minute" />
- <Hero
- isLargeTitle={false}
- isFullWidth={false}
- title="0x Launch Kit"
- description="Launch a relayer in under a minute"
- figure={<Icon name="launchKit" size="hero" margin={['small', 0, 'small', 0]} />}
- actions={<HeroActions />}
- />
-
- <Section bgColor="dark" isFlex={true} maxWidth="1170px">
- <Definition
- title="Networked Liquidity Pool"
- titleSize="small"
- description="Tap into and share liquidity with other relayers"
- icon="networkedLiquidity"
- iconSize="medium"
- isInline={true}
- />
-
- <Definition
- title="Extensible Code Repo"
- titleSize="small"
- description="Fork and extend to support modes of exchange"
- icon="code-repo"
- iconSize="medium"
- isInline={true}
- />
-
- <Definition
- title="Exchange Ethereum based Tokens"
- titleSize="small"
- description="Enable trading for any ERC-20 or ERC-721 asset"
- icon="eth-based-tokens"
- iconSize="medium"
- isInline={true}
- />
- </Section>
-
- <Section>
- {_.map(offersData, (item, index) => (
- <Definition
- key={`offers-${index}`}
- icon={item.icon}
- title={item.title}
- description={item.description}
- isInlineIcon={true}
- iconSize={240}
- />
- ))}
- </Section>
-
- <Banner
- heading="Need more flexibility?"
- subline="Dive into our docs, or contact us if needed"
- mainCta={{
- text: 'Get Started',
- href: `${constants.URL_LAUNCH_KIT}/#table-of-contents`,
- shouldOpenInNewTab: true,
- }}
- secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }}
- />
- <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
- </SiteWrap>
- );
- }
-
- public _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- public _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-}
-
-const HeroActions = () => (
- <React.Fragment>
- <Button href={constants.URL_LAUNCH_KIT} isInline={true} target="_blank">
- Get Started
- </Button>
-
- <Button href={constants.URL_LAUNCH_KIT_BLOG_POST} isTransparent={true} isInline={true} target="_blank">
- Learn More!
- </Button>
- </React.Fragment>
-);
diff --git a/packages/website/ts/pages/market_maker.tsx b/packages/website/ts/pages/market_maker.tsx
deleted file mode 100644
index 854870358..000000000
--- a/packages/website/ts/pages/market_maker.tsx
+++ /dev/null
@@ -1,162 +0,0 @@
-import * as _ from 'lodash';
-import { opacify } from 'polished';
-import * as React from 'react';
-
-import { Banner } from 'ts/components/banner';
-import { Button } from 'ts/components/button';
-import { Action, Definition } from 'ts/components/definition';
-import { Hero } from 'ts/components/hero';
-import { ModalContact, ModalContactType } from 'ts/components/modals/modal_contact';
-import { Section } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { colors } from 'ts/style/colors';
-import { WebsitePaths } from 'ts/types';
-
-interface OfferData {
- icon: string;
- title: string;
- description: string;
- links?: Action[];
-}
-export interface NextMarketMakerProps {}
-
-export class NextMarketMaker extends React.Component<NextMarketMakerProps> {
- public state = {
- isContactModalOpen: false,
- };
-
- private readonly _offersData: OfferData[];
-
- constructor(props: NextMarketMakerProps) {
- super(props);
- this._offersData = [
- {
- icon: 'supportForAllEthereumStandards',
- title: 'Comprehensive Tutorials',
- description:
- 'Stay on the bleeding edge of crypto by learning how to market make on decentralized exchanges. The network of 0x relayers provides market makers a first-mover advantage to capture larger spreads, find arbitrage opportunities, and trade on new types of exchanges like prediction markets and non-fungible token marketplaces.',
- links: [
- {
- label: 'Explore the Docs',
- url: `${WebsitePaths.Wiki}#Market-Making-on-0x`,
- },
- ],
- },
- {
- icon: 'generateRevenueForYourBusiness-large',
- title: 'Market Making Compensation',
- description: 'Accepted applicants can receive up to $15,000 for completing onboarding',
- },
- {
- icon: 'getInTouch',
- title: 'Dedicated Support',
- description:
- 'The 0x team will provide 1:1 onboarding assistance and promptly answer all your questions. They will walk you through the tutorials so that you know how to read 0x order types, spin up an Ethereum node, and execute trades on the blockchain.',
- links: [
- {
- label: 'Contact Us',
- onClick: this._onOpenContactModal,
- shouldUseAnchorTag: true,
- },
- ],
- },
- ];
- }
-
- public render(): React.ReactNode {
- return (
- <SiteWrap theme="light">
- <Hero
- maxWidth="865px"
- maxWidthHeading="715px"
- isLargeTitle={false}
- isFullWidth={false}
- isCenteredMobile={false}
- title="Bring liquidity to the markets of the future"
- description="Market makers (MMs) are important stakeholders in the 0x ecosystem. The Market Making Program provides a set of resources that help onboard MMs to bring liquidity to the 0x network. The Program includes tutorials, monetary incentives, and 1:1 support from the 0x team."
- actions={this._renderHeroActions()}
- />
-
- <Section bgColor="light" isFlex={true} maxWidth="1170px">
- <Definition
- title="Secure Trading"
- titleSize="small"
- description="Take full custody of your assets to eliminate counterparty risk"
- icon="secureTrading"
- iconSize="medium"
- isInline={true}
- />
-
- <Definition
- title="Networked Liquidity Pool"
- titleSize="small"
- description="Use one pool of capital across multiple relayers to trade against a large group of takers"
- icon="networkedLiquidity"
- iconSize="medium"
- isInline={true}
- />
-
- <Definition
- title="Low Cost"
- titleSize="small"
- description="Pay no gas fees to make 0x orders"
- icon="low-cost"
- iconSize="medium"
- isInline={true}
- />
- </Section>
-
- <Section>
- {_.map(this._offersData, (item, index) => (
- <Definition
- key={`offers-${index}`}
- icon={item.icon}
- title={item.title}
- description={item.description}
- isInlineIcon={true}
- iconSize={240}
- fontSize="medium"
- actions={item.links}
- />
- ))}
- </Section>
-
- <Banner
- heading="Start trading today."
- subline="Check out our Market Making tutorials to get started"
- mainCta={{ text: 'Tutorials', href: `${WebsitePaths.Wiki}#Market-Making-on-0x` }}
- secondaryCta={{ text: 'Apply Now', onClick: this._onOpenContactModal }}
- />
- <ModalContact
- isOpen={this.state.isContactModalOpen}
- onDismiss={this._onDismissContactModal}
- modalContactType={ModalContactType.MarketMaker}
- />
- </SiteWrap>
- );
- }
-
- private readonly _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- private readonly _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-
- private readonly _renderHeroActions = () => (
- <>
- <Button href={`${WebsitePaths.Wiki}#Market-Making-on-0x`} bgColor="dark" isInline={true}>
- Get Started
- </Button>
- <Button
- onClick={this._onOpenContactModal}
- borderColor={opacify(0.4)(colors.brandDark)}
- isTransparent={true}
- isInline={true}
- >
- Apply Now
- </Button>
- </>
- );
-}
diff --git a/packages/website/ts/pages/not_found.tsx b/packages/website/ts/pages/not_found.tsx
deleted file mode 100644
index 6abd8fc80..000000000
--- a/packages/website/ts/pages/not_found.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import * as React from 'react';
-import { Footer } from 'ts/components/old_footer';
-import { TopBar } from 'ts/components/top_bar/top_bar';
-import { FullscreenMessage } from 'ts/pages/fullscreen_message';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Translate } from 'ts/utils/translate';
-
-export interface NotFoundProps {
- location: Location;
- translate: Translate;
- dispatcher: Dispatcher;
-}
-
-export const NotFound = (props: NotFoundProps) => {
- return (
- <div>
- <TopBar blockchainIsLoaded={false} location={props.location} translate={props.translate} />
- <FullscreenMessage
- headerText={'404 Not Found'}
- bodyText={"Hm... looks like we couldn't find what you are looking for."}
- />
- <Footer translate={props.translate} dispatcher={props.dispatcher} />
- </div>
- );
-};
diff --git a/packages/website/ts/pages/why.tsx b/packages/website/ts/pages/why.tsx
deleted file mode 100644
index a0ed5f95a..000000000
--- a/packages/website/ts/pages/why.tsx
+++ /dev/null
@@ -1,302 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import DocumentTitle from 'react-document-title';
-import ScrollableAnchor, { configureAnchors } from 'react-scrollable-anchor';
-import styled from 'styled-components';
-
-import { Banner } from 'ts/components/banner';
-import { Button } from 'ts/components/button';
-import { Definition } from 'ts/components/definition';
-import { Hero } from 'ts/components/hero';
-import { Column, Section, WrapSticky } from 'ts/components/newLayout';
-import { SiteWrap } from 'ts/components/siteWrap';
-import { Slide, Slider } from 'ts/components/slider/slider';
-import { Heading } from 'ts/components/text';
-
-import { ModalContact } from '../components/modals/modal_contact';
-
-const offersData = [
- {
- icon: 'robustSmartContracts',
- title: 'Robust Smart Contracts',
- description: `0x Protocol's smart contracts have been put through two rounds of rigorous security audits.`,
- },
- {
- icon: 'extensibleArchitecture',
- title: 'Extensible Architecture',
- description: `0x's modular pipeline enables you to plug in your own smart contracts through an extensible API.`,
- },
- {
- icon: 'eficientDesign',
- title: 'Efficient Design',
- description: `0x’s off-chain order relay with on-chain settlement is a gas efficient approach to p2p exchange, reducing blockchain bloat.`,
- },
-];
-
-const functionalityData = [
- {
- icon: 'secureTrading',
- title: 'Secure Non-custodial Trading',
- description: 'Enable tokens to be traded wallet-to-wallet with no deposits or withdrawals.',
- },
- {
- icon: 'flexibleOrders',
- title: 'Flexible Order Types',
- description: 'Choose to sell assets at a specific “buy it now” price or allow potential buyers to submit bids.',
- },
- {
- icon: 'buildBusiness',
- title: 'Build a Business',
- description:
- 'Monetize your product by taking fees on each transaction and join a growing number of relayers in the 0x ecosystem.',
- },
-];
-
-const useCaseSlides = [
- {
- icon: 'gamingAndCollectibles',
- title: 'Games & Collectibles',
- description:
- 'Artists and game makers are tokenizing digital art and in-game items known as non-fungible tokens (NFTs). 0x enables these creators to add exchange functionality by providing the ability to build marketplaces for NFT trading.',
- },
- {
- icon: 'predictionMarkets',
- title: 'Prediction Markets',
- description:
- 'Decentralized prediction markets and cryptodervivative platforms generate sets of tokens that represent a financial stake in the outcomes of events. 0x allows these tokens to be instantly tradable in liquid markets.',
- },
- {
- icon: 'orderBooks',
- title: 'Order Books',
- description:
- 'There are thousands of decentralized apps and protocols that have native utility tokens. 0x provides professional exchanges with the ability to host order books and facilitates the exchange of these assets.',
- },
- {
- icon: 'decentralisedLoans',
- title: 'Decentralized Loans',
- description:
- 'Efficient lending requires liquid markets where investors can buy and re-sell loans. 0x enables an ecosystem of lenders to self-organize and efficiently determine market prices for all outstanding loans.',
- },
- {
- icon: 'stableTokens',
- title: 'Stable Tokens',
- description:
- 'Novel economic constructs such as stable coins require efficient, liquid markets to succeed. 0x will facilitate the underlying economic mechanisms that allow these tokens to remain stable.',
- },
-];
-
-configureAnchors({ offset: -60 });
-
-export class NextWhy extends React.Component {
- public state = {
- isContactModalOpen: false,
- };
- public render(): React.ReactNode {
- const buildAction = (
- <Button href="/docs" isWithArrow={true} isAccentColor={true}>
- Build on 0x
- </Button>
- );
- return (
- <SiteWrap theme="dark">
- <DocumentTitle title="Features & Benefits - 0x" />
- <Hero
- title="The exchange layer for the crypto economy"
- description="The world's assets are becoming tokenized on public blockchains. 0x Protocol is free, open-source infrastracture that developers and businesses utilize to build products that enable the purchasing and trading of crypto tokens."
- actions={buildAction}
- />
-
- <Section bgColor="dark" isFlex={true} maxWidth="1170px">
- <Definition
- title="Support for all Ethereum Standards"
- titleSize="small"
- description="0x Protocol facitilites the decentralized exchange of a growing number of Ethereum-based tokens, including all ERC-20 and ERC-721 assets."
- icon="supportForAllEthereumStandards"
- iconSize="large"
- isInline={true}
- />
-
- <Definition
- title="Networked Liquidity"
- titleSize="small"
- description="0x is lowering the barrier to entry by building a layer of networked liquidity that allows businesses to tap into a shared pool of digital assets."
- icon="networkedLiquidity"
- iconSize="large"
- isInline={true}
- />
-
- <Definition
- title="Flexible Integration"
- titleSize="small"
- description="0x is a modular system that enables businesses and projects, known as relayers, to easily add exchange functionality to any product experience."
- icon="flexibleIntegration"
- iconSize="large"
- isInline={true}
- />
- </Section>
-
- <Section maxWidth="1170px" isFlex={true} isFullWidth={true}>
- <Column>
- <NavStickyWrap offsetTop="130px">
- <ChapterLink href="#benefits">Benefits</ChapterLink>
- <ChapterLink href="#cases">Use Cases</ChapterLink>
- <ChapterLink href="#functionality">Features</ChapterLink>
- </NavStickyWrap>
- </Column>
-
- <Column width="55%" maxWidth="826px">
- <Column width="100%" maxWidth="560px" padding="0 30px 0 0">
- <ScrollableAnchor id="benefits">
- <SectionWrap>
- <SectionTitle size="medium" marginBottom="60px" isNoBorder={true}>
- What 0x offers
- </SectionTitle>
-
- {_.map(offersData, (item, index) => (
- <Definition
- key={`offers-${index}`}
- icon={item.icon}
- title={item.title}
- titleSize="small"
- description={item.description}
- isWithMargin={true}
- />
- ))}
- </SectionWrap>
- </ScrollableAnchor>
-
- <ScrollableAnchor id="cases">
- <SectionWrap isNotRelative={true}>
- <SectionTitle size="medium" marginBottom="60px">
- Use Cases
- </SectionTitle>
- <Slider>
- {_.map(useCaseSlides, (item, index) => (
- <Slide
- key={`useCaseSlide-${index}`}
- heading={item.title}
- text={item.description}
- icon={item.icon}
- />
- ))}
- </Slider>
- </SectionWrap>
- </ScrollableAnchor>
-
- <ScrollableAnchor id="functionality">
- <SectionWrap>
- <SectionTitle size="medium" marginBottom="60px">
- Exchange Functionality
- </SectionTitle>
-
- {_.map(functionalityData, (item, index) => (
- <Definition
- key={`functionality-${index}`}
- icon={item.icon}
- title={item.title}
- titleSize="small"
- description={item.description}
- isWithMargin={true}
- />
- ))}
- </SectionWrap>
- </ScrollableAnchor>
- </Column>
- </Column>
- </Section>
-
- <Banner
- heading="Ready to get started?"
- subline="Dive into our docs, or contact us if needed"
- mainCta={{ text: 'Get Started', href: '/docs' }}
- secondaryCta={{ text: 'Get in Touch', onClick: this._onOpenContactModal.bind(this) }}
- />
- <ModalContact isOpen={this.state.isContactModalOpen} onDismiss={this._onDismissContactModal} />
- </SiteWrap>
- );
- }
-
- public _onOpenContactModal = (): void => {
- this.setState({ isContactModalOpen: true });
- };
-
- public _onDismissContactModal = (): void => {
- this.setState({ isContactModalOpen: false });
- };
-}
-
-interface SectionProps {
- isNotRelative?: boolean;
-}
-
-const SectionWrap = styled.div<SectionProps>`
- position: ${props => !props.isNotRelative && 'relative'};
-
- & + & {
- padding-top: 60px;
- margin-top: 60px;
- }
-
- @media (min-width: 768px) {
- & + &:before {
- width: 100vw;
- }
- }
-
- @media (max-width: 768px) {
- text-align: left;
-
- & + &:before {
- width: 100%;
- }
- }
-`;
-
-interface SectionTitleProps {
- isNoBorder?: boolean;
-}
-const SectionTitle = styled(Heading)<SectionTitleProps>`
- position: relative;
-
- ${props =>
- !props.isNoBorder &&
- `
- &:before {
- content: '';
- width: 100vw;
- position: absolute;
- top: -53px;
- left: 0;
- height: 1px;
- background-color: #3d3d3d;
- }
- `}
-
- @media (max-width: 768px) {
- &:before {
- width: calc(100vw - 60px);
- }
- }
-`;
-
-const NavStickyWrap = styled(WrapSticky)`
- padding-left: 60px;
- z-index: 15;
-
- @media (max-width: 768px) {
- display: none;
- }
-`;
-
-const ChapterLink = styled.a`
- color: ${props => props.theme.textColor};
- font-size: 22px;
- margin-bottom: 25px;
- display: block;
- opacity: 0.8;
-
- &:hover,
- &:active {
- opacity: 1;
- }
-`;
diff --git a/packages/website/ts/pages/wiki/wiki.tsx b/packages/website/ts/pages/wiki/wiki.tsx
deleted file mode 100644
index c3c1600a5..000000000
--- a/packages/website/ts/pages/wiki/wiki.tsx
+++ /dev/null
@@ -1,198 +0,0 @@
-import {
- ALink,
- colors,
- constants as sharedConstants,
- HeaderSizes,
- Link,
- MarkdownSection,
- utils as sharedUtils,
-} from '@0x/react-shared';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import CircularProgress from 'material-ui/CircularProgress';
-import * as React from 'react';
-import { SidebarHeader } from 'ts/components/documentation/sidebar_header';
-import { NestedSidebarMenu } from 'ts/components/nested_sidebar_menu';
-import { Button } from 'ts/components/ui/button';
-import { Container } from 'ts/components/ui/container';
-import { DevelopersPage } from 'ts/pages/documentation/developers_page';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { Article, ArticlesBySection, Deco, Key, ScreenWidths } from 'ts/types';
-import { backendClient } from 'ts/utils/backend_client';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
-
-const WIKI_NOT_READY_BACKOUT_TIMEOUT_MS = 5000;
-
-export interface WikiProps {
- source: string;
- location: Location;
- dispatcher: Dispatcher;
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-interface WikiState {
- articlesBySection: ArticlesBySection;
- isHoveringSidebar: boolean;
-}
-
-export class Wiki extends React.Component<WikiProps, WikiState> {
- private _wikiBackoffTimeoutId: number;
- private _isUnmounted: boolean;
- constructor(props: WikiProps) {
- super(props);
- this._isUnmounted = false;
- this.state = {
- articlesBySection: undefined,
- isHoveringSidebar: false,
- };
- }
- public componentWillMount(): void {
- // tslint:disable-next-line:no-floating-promises
- this._fetchArticlesBySectionAsync();
- }
- public componentWillUnmount(): void {
- this._isUnmounted = true;
- clearTimeout(this._wikiBackoffTimeoutId);
- }
- public render(): React.ReactNode {
- const sectionNameToLinks = _.isUndefined(this.state.articlesBySection)
- ? {}
- : this._getSectionNameToLinks(this.state.articlesBySection);
-
- const mainContent = _.isUndefined(this.state.articlesBySection) ? (
- <div className="flex justify-center">{this._renderLoading()}</div>
- ) : (
- <div id="wiki" style={{ paddingRight: 2 }}>
- {this._renderWikiArticles()}
- </div>
- );
- const isSmallScreen = this.props.screenWidth === ScreenWidths.Sm;
- const sidebar = _.isUndefined(this.state.articlesBySection) ? (
- <div />
- ) : (
- <NestedSidebarMenu
- sidebarHeader={isSmallScreen ? this._renderSidebarHeader() : undefined}
- sectionNameToLinks={sectionNameToLinks}
- screenWidth={this.props.screenWidth}
- />
- );
- return (
- <DevelopersPage
- sidebar={sidebar}
- mainContent={mainContent}
- location={this.props.location}
- screenWidth={this.props.screenWidth}
- translate={this.props.translate}
- dispatcher={this.props.dispatcher}
- />
- );
- }
- private _renderSidebarHeader(): React.ReactNode {
- const menuItems = _.map(constants.DEVELOPER_TOPBAR_LINKS, menuItemInfo => {
- return (
- <Link
- key={`menu-item-${menuItemInfo.title}`}
- to={menuItemInfo.to}
- shouldOpenInNewTab={menuItemInfo.shouldOpenInNewTab}
- >
- <Button
- borderRadius="4px"
- padding="0.4em 0.375em"
- width="100%"
- fontColor={colors.grey800}
- fontSize="14px"
- textAlign="left"
- >
- {this.props.translate.get(menuItemInfo.title as Key, Deco.Cap)}
- </Button>
- </Link>
- );
- });
- const wikiTitle = this.props.translate.get(Key.Wiki, Deco.Cap);
- return (
- <Container>
- <SidebarHeader screenWidth={this.props.screenWidth} title={wikiTitle} />
- {menuItems}
- </Container>
- );
- }
- private _renderLoading(): React.ReactNode {
- return (
- <Container className="pt4">
- <Container className="center pb2">
- <CircularProgress size={40} thickness={5} />
- </Container>
- <Container className="center pt2" paddingBottom="11px">
- Loading wiki...
- </Container>
- </Container>
- );
- }
- private _renderWikiArticles(): React.ReactNode {
- const sectionNames = _.keys(this.state.articlesBySection);
- const sections = _.map(sectionNames, sectionName => this._renderSection(sectionName));
- return sections;
- }
- private _renderSection(sectionName: string): React.ReactNode {
- const articles = this.state.articlesBySection[sectionName];
- const renderedArticles = _.map(articles, (article: Article) => {
- const githubLink = `${constants.URL_GITHUB_WIKI}/edit/master/${sectionName}/${article.fileName}`;
- return (
- <div key={`markdown-section-${article.title}`}>
- <MarkdownSection
- sectionName={article.title}
- markdownContent={article.content}
- headerSize={HeaderSizes.H2}
- githubLink={githubLink}
- />
- </div>
- );
- });
- return <div key={`section-${sectionName}`}>{renderedArticles}</div>;
- }
- private async _fetchArticlesBySectionAsync(): Promise<void> {
- try {
- const articlesBySection = await backendClient.getWikiArticlesBySectionAsync();
- if (!this._isUnmounted) {
- this.setState(
- {
- articlesBySection,
- },
- async () => {
- await utils.onPageLoadPromise;
- const hash = this.props.location.hash.slice(1);
- sharedUtils.scrollToHash(hash, sharedConstants.SCROLL_CONTAINER_ID);
- },
- );
- }
- } catch (err) {
- const errMsg = `${err}`;
- if (_.includes(errMsg, `${constants.HTTP_NO_CONTENT_STATUS_CODE}`)) {
- // We need to backoff and try fetching again later
- this._wikiBackoffTimeoutId = window.setTimeout(() => {
- // tslint:disable-next-line:no-floating-promises
- this._fetchArticlesBySectionAsync();
- }, WIKI_NOT_READY_BACKOUT_TIMEOUT_MS);
- return;
- }
- }
- }
- private _getSectionNameToLinks(articlesBySection: ArticlesBySection): ObjectMap<ALink[]> {
- const sectionNames = _.keys(articlesBySection);
- const sectionNameToLinks: ObjectMap<ALink[]> = {};
- for (const sectionName of sectionNames) {
- const articles = articlesBySection[sectionName];
- const articleLinks = _.map(articles, article => {
- return {
- to: sharedUtils.getIdFromName(article.title),
- title: article.title,
- };
- });
- sectionNameToLinks[sectionName] = articleLinks;
- }
- return sectionNameToLinks;
- }
-}
diff --git a/packages/website/ts/redux/analyticsMiddleware.ts b/packages/website/ts/redux/analyticsMiddleware.ts
deleted file mode 100644
index 51d39a5d7..000000000
--- a/packages/website/ts/redux/analyticsMiddleware.ts
+++ /dev/null
@@ -1,36 +0,0 @@
-import { Middleware } from 'redux';
-import { State } from 'ts/redux/reducer';
-import { ActionTypes } from 'ts/types';
-import { analytics } from 'ts/utils/analytics';
-
-export const analyticsMiddleware: Middleware = store => next => action => {
- const nextAction = next(action);
- const nextState = (store.getState() as any) as State;
- switch (action.type) {
- case ActionTypes.UpdateInjectedProviderName:
- analytics.addEventProperties({
- injectedProviderName: nextState.injectedProviderName,
- });
- break;
- case ActionTypes.UpdateNetworkId:
- analytics.addEventProperties({
- networkId: nextState.networkId,
- });
- break;
- case ActionTypes.UpdateUserAddress:
- analytics.addUserProperties({
- ethAddress: nextState.userAddress,
- });
- break;
- case ActionTypes.UpdateUserEtherBalance:
- if (nextState.userEtherBalanceInWei) {
- analytics.addUserProperties({
- ethBalance: nextState.userEtherBalanceInWei.toString(),
- });
- }
- break;
- default:
- break;
- }
- return nextAction;
-};
diff --git a/packages/website/ts/redux/dispatcher.ts b/packages/website/ts/redux/dispatcher.ts
deleted file mode 100644
index e85afd3b1..000000000
--- a/packages/website/ts/redux/dispatcher.ts
+++ /dev/null
@@ -1,227 +0,0 @@
-import { BigNumber } from '@0x/utils';
-import { Dispatch } from 'redux';
-import { State } from 'ts/redux/reducer';
-import {
- ActionTypes,
- AssetToken,
- BlockchainErrs,
- Language,
- PortalOrder,
- ProviderType,
- ScreenWidths,
- Side,
- SideToAssetToken,
- Token,
- TokenByAddress,
-} from 'ts/types';
-
-export class Dispatcher {
- private readonly _dispatch: Dispatch<State>;
- constructor(dispatch: Dispatch<State>) {
- this._dispatch = dispatch;
- }
- // Portal
- public resetState(): void {
- this._dispatch({
- type: ActionTypes.ResetState,
- });
- }
- public updateNodeVersion(nodeVersion: string): void {
- this._dispatch({
- data: nodeVersion,
- type: ActionTypes.UpdateNodeVersion,
- });
- }
- public updateScreenWidth(screenWidth: ScreenWidths): void {
- this._dispatch({
- data: screenWidth,
- type: ActionTypes.UpdateScreenWidth,
- });
- }
- public swapAssetTokenSymbols(): void {
- this._dispatch({
- type: ActionTypes.SwapAssetTokens,
- });
- }
- public updateOrderSalt(salt: BigNumber): void {
- this._dispatch({
- data: salt,
- type: ActionTypes.UpdateOrderSalt,
- });
- }
- public updateUserSuppliedOrderCache(order: PortalOrder): void {
- this._dispatch({
- data: order,
- type: ActionTypes.UpdateUserSuppliedOrderCache,
- });
- }
- public updateShouldBlockchainErrDialogBeOpen(shouldBeOpen: boolean): void {
- this._dispatch({
- data: shouldBeOpen,
- type: ActionTypes.UpdateShouldBlockchainErrDialogBeOpen,
- });
- }
- public updateChosenAssetToken(side: Side, token: AssetToken): void {
- this._dispatch({
- data: {
- side,
- token,
- },
- type: ActionTypes.UpdateChosenAssetToken,
- });
- }
- public updateChosenAssetTokenAddress(side: Side, address: string): void {
- this._dispatch({
- data: {
- address,
- side,
- },
- type: ActionTypes.UpdateChosenAssetTokenAddress,
- });
- }
- public updateOrderTakerAddress(address: string): void {
- this._dispatch({
- data: address,
- type: ActionTypes.UpdateOrderTakerAddress,
- });
- }
- public updateUserAddress(address?: string): void {
- this._dispatch({
- data: address,
- type: ActionTypes.UpdateUserAddress,
- });
- }
- public updateOrderExpiry(unixTimestampSec: BigNumber): void {
- this._dispatch({
- data: unixTimestampSec,
- type: ActionTypes.UpdateOrderExpiry,
- });
- }
- public encounteredBlockchainError(err: BlockchainErrs): void {
- this._dispatch({
- data: err,
- type: ActionTypes.BlockchainErrEncountered,
- });
- }
- public updateBlockchainIsLoaded(isLoaded: boolean): void {
- this._dispatch({
- data: isLoaded,
- type: ActionTypes.UpdateBlockchainIsLoaded,
- });
- }
- public addTokenToTokenByAddress(token: Token): void {
- this._dispatch({
- data: token,
- type: ActionTypes.AddTokenToTokenByAddress,
- });
- }
- public removeTokenToTokenByAddress(token: Token): void {
- this._dispatch({
- data: token,
- type: ActionTypes.RemoveTokenFromTokenByAddress,
- });
- }
- public batchDispatch(
- tokenByAddress: TokenByAddress,
- networkId: number,
- userAddressIfExists: string | undefined,
- sideToAssetToken: SideToAssetToken,
- ): void {
- this._dispatch({
- data: {
- tokenByAddress,
- networkId,
- userAddressIfExists,
- sideToAssetToken,
- },
- type: ActionTypes.BatchDispatch,
- });
- }
- public updateTokenByAddress(tokens: Token[]): void {
- this._dispatch({
- data: tokens,
- type: ActionTypes.UpdateTokenByAddress,
- });
- }
- public forceTokenStateRefetch(): void {
- this._dispatch({
- type: ActionTypes.ForceTokenStateRefetch,
- });
- }
- public updateSignature(signature: string): void {
- this._dispatch({
- data: signature,
- type: ActionTypes.UpdateOrderSignature,
- });
- }
- public updateUserWeiBalance(balance?: BigNumber): void {
- this._dispatch({
- data: balance,
- type: ActionTypes.UpdateUserEtherBalance,
- });
- }
- public updateNetworkId(networkId: number): void {
- this._dispatch({
- data: networkId,
- type: ActionTypes.UpdateNetworkId,
- });
- }
- public updateOrderFillAmount(amount: BigNumber): void {
- this._dispatch({
- data: amount,
- type: ActionTypes.UpdateOrderFillAmount,
- });
- }
-
- public updatePortalOnboardingShowing(isShowing: boolean): void {
- this._dispatch({
- data: isShowing,
- type: ActionTypes.UpdatePortalOnboardingShowing,
- });
- }
-
- // Docs
- public updateCurrentDocsVersion(version: string): void {
- this._dispatch({
- data: version,
- type: ActionTypes.UpdateLibraryVersion,
- });
- }
- public updateAvailableDocVersions(versions: string[]): void {
- this._dispatch({
- data: versions,
- type: ActionTypes.UpdateAvailableLibraryVersions,
- });
- }
-
- // Shared
- public showFlashMessage(msg: string | React.ReactNode): void {
- this._dispatch({
- data: msg,
- type: ActionTypes.ShowFlashMessage,
- });
- }
- public hideFlashMessage(): void {
- this._dispatch({
- type: ActionTypes.HideFlashMessage,
- });
- }
- public updateProviderType(providerType: ProviderType): void {
- this._dispatch({
- type: ActionTypes.UpdateProviderType,
- data: providerType,
- });
- }
- public updateInjectedProviderName(injectedProviderName: string): void {
- this._dispatch({
- type: ActionTypes.UpdateInjectedProviderName,
- data: injectedProviderName,
- });
- }
- public updateSelectedLanguage(language: Language): void {
- this._dispatch({
- type: ActionTypes.UpdateSelectedLanguage,
- data: language,
- });
- }
-}
diff --git a/packages/website/ts/redux/reducer.ts b/packages/website/ts/redux/reducer.ts
deleted file mode 100644
index 51c77ba47..000000000
--- a/packages/website/ts/redux/reducer.ts
+++ /dev/null
@@ -1,361 +0,0 @@
-import { generatePseudoRandomSalt } from '@0x/order-utils';
-import { BigNumber } from '@0x/utils';
-import * as _ from 'lodash';
-import * as moment from 'moment';
-import {
- Action,
- ActionTypes,
- BlockchainErrs,
- PortalOrder,
- ProviderType,
- ScreenWidths,
- Side,
- SideToAssetToken,
- TokenByAddress,
-} from 'ts/types';
-import { constants } from 'ts/utils/constants';
-import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
-
-// Instead of defaulting the docs version to an empty string, we pre-populate it with
-// a valid version value. This does not need to be updated however, since onLoad, it
-// is always replaced with a value retrieved from our S3 bucket.
-const DEFAULT_DOCS_VERSION = '0.0.0';
-
-export interface State {
- // Portal
- blockchainErr: BlockchainErrs;
- blockchainIsLoaded: boolean;
- networkId: number;
- orderExpiryTimestamp: BigNumber;
- orderFillAmount: BigNumber;
- orderTakerAddress: string;
- orderSignature: string;
- orderSalt: BigNumber;
- nodeVersion: string;
- screenWidth: ScreenWidths;
- shouldBlockchainErrDialogBeOpen: boolean;
- sideToAssetToken: SideToAssetToken;
- tokenByAddress: TokenByAddress;
- lastForceTokenStateRefetch: number;
- userAddress: string;
- userEtherBalanceInWei?: BigNumber;
- portalOnboardingStep: number;
- isPortalOnboardingShowing: boolean;
- hasPortalOnboardingBeenClosed: boolean;
- // Note: cache of supplied orderJSON in fill order step. Do not use for anything else.
- userSuppliedOrderCache: PortalOrder;
-
- // Docs
- docsVersion: string;
- availableDocVersions: string[];
-
- // Shared
- flashMessage: string | React.ReactNode;
- providerType: ProviderType;
- injectedProviderName: string;
- translate: Translate;
-}
-
-export const INITIAL_STATE: State = {
- // Portal
- blockchainErr: BlockchainErrs.NoError,
- blockchainIsLoaded: false,
- networkId: undefined,
- orderExpiryTimestamp: utils.initialOrderExpiryUnixTimestampSec(),
- orderFillAmount: undefined,
- orderSignature: '',
- orderTakerAddress: constants.NULL_ADDRESS,
- orderSalt: generatePseudoRandomSalt(),
- nodeVersion: undefined,
- screenWidth: utils.getScreenWidth(),
- shouldBlockchainErrDialogBeOpen: false,
- sideToAssetToken: {
- [Side.Deposit]: {},
- [Side.Receive]: {},
- },
- tokenByAddress: {},
- lastForceTokenStateRefetch: moment().unix(),
- userAddress: '',
- userEtherBalanceInWei: undefined,
- userSuppliedOrderCache: undefined,
- portalOnboardingStep: 0,
- isPortalOnboardingShowing: false,
- hasPortalOnboardingBeenClosed: false,
- // Docs
- docsVersion: DEFAULT_DOCS_VERSION,
- availableDocVersions: [DEFAULT_DOCS_VERSION],
- // Shared
- flashMessage: undefined,
- providerType: ProviderType.Injected,
- injectedProviderName: '',
- translate: new Translate(),
-};
-
-export function reducer(state: State = INITIAL_STATE, action: Action): State {
- switch (action.type) {
- // Portal
- case ActionTypes.ResetState:
- return {
- ...INITIAL_STATE,
- translate: state.translate,
- };
-
- case ActionTypes.UpdateOrderSalt: {
- return {
- ...state,
- orderSalt: action.data,
- };
- }
-
- case ActionTypes.UpdateSelectedLanguage: {
- return {
- ...state,
- translate: new Translate(action.data),
- };
- }
-
- case ActionTypes.UpdateNodeVersion: {
- return {
- ...state,
- nodeVersion: action.data,
- };
- }
-
- case ActionTypes.UpdateOrderFillAmount: {
- return {
- ...state,
- orderFillAmount: action.data,
- };
- }
-
- case ActionTypes.UpdateShouldBlockchainErrDialogBeOpen: {
- return {
- ...state,
- shouldBlockchainErrDialogBeOpen: action.data,
- };
- }
-
- case ActionTypes.UpdateUserEtherBalance: {
- return {
- ...state,
- userEtherBalanceInWei: action.data,
- };
- }
-
- case ActionTypes.UpdateUserSuppliedOrderCache: {
- return {
- ...state,
- userSuppliedOrderCache: action.data,
- };
- }
-
- case ActionTypes.AddTokenToTokenByAddress: {
- const newTokenByAddress = { ...state.tokenByAddress };
- newTokenByAddress[action.data.address] = action.data;
- return {
- ...state,
- tokenByAddress: newTokenByAddress,
- };
- }
-
- case ActionTypes.RemoveTokenFromTokenByAddress: {
- const newTokenByAddress = { ...state.tokenByAddress };
- delete newTokenByAddress[action.data.address];
- return {
- ...state,
- tokenByAddress: newTokenByAddress,
- };
- }
-
- case ActionTypes.UpdateTokenByAddress: {
- const tokenByAddress = { ...state.tokenByAddress };
- const tokens = action.data;
- _.each(tokens, token => {
- const updatedToken = {
- ...tokenByAddress[token.address],
- ...token,
- };
- tokenByAddress[token.address] = updatedToken;
- });
- return {
- ...state,
- tokenByAddress,
- };
- }
-
- case ActionTypes.BatchDispatch: {
- const userAddress = _.isUndefined(action.data.userAddressIfExists) ? '' : action.data.userAddressIfExists;
- return {
- ...state,
- networkId: action.data.networkId,
- userAddress,
- sideToAssetToken: action.data.sideToAssetToken,
- tokenByAddress: action.data.tokenByAddress,
- };
- }
-
- case ActionTypes.ForceTokenStateRefetch:
- return {
- ...state,
- lastForceTokenStateRefetch: moment().unix(),
- };
-
- case ActionTypes.UpdateOrderSignature: {
- return {
- ...state,
- orderSignature: action.data,
- };
- }
-
- case ActionTypes.UpdateScreenWidth: {
- return {
- ...state,
- screenWidth: action.data,
- };
- }
-
- case ActionTypes.UpdateBlockchainIsLoaded: {
- return {
- ...state,
- blockchainIsLoaded: action.data,
- };
- }
-
- case ActionTypes.BlockchainErrEncountered: {
- return {
- ...state,
- blockchainErr: action.data,
- };
- }
-
- case ActionTypes.UpdateNetworkId: {
- return {
- ...state,
- networkId: action.data,
- };
- }
-
- case ActionTypes.UpdateChosenAssetToken: {
- const newSideToAssetToken = {
- ...state.sideToAssetToken,
- [action.data.side]: action.data.token,
- };
- return {
- ...state,
- sideToAssetToken: newSideToAssetToken,
- };
- }
-
- case ActionTypes.UpdateChosenAssetTokenAddress: {
- const newAssetToken = { ...state.sideToAssetToken[action.data.side] };
- newAssetToken.address = action.data.address;
- const newSideToAssetToken = {
- ...state.sideToAssetToken,
- [action.data.side]: newAssetToken,
- };
- return {
- ...state,
- sideToAssetToken: newSideToAssetToken,
- };
- }
-
- case ActionTypes.SwapAssetTokens: {
- const newSideToAssetToken = {
- [Side.Deposit]: state.sideToAssetToken[Side.Receive],
- [Side.Receive]: state.sideToAssetToken[Side.Deposit],
- };
- return {
- ...state,
- sideToAssetToken: newSideToAssetToken,
- };
- }
-
- case ActionTypes.UpdateOrderExpiry: {
- return {
- ...state,
- orderExpiryTimestamp: action.data,
- };
- }
-
- case ActionTypes.UpdateOrderTakerAddress: {
- return {
- ...state,
- orderTakerAddress: action.data,
- };
- }
-
- case ActionTypes.UpdateUserAddress: {
- const userAddress = _.isUndefined(action.data) ? '' : action.data;
- return {
- ...state,
- userAddress,
- };
- }
-
- case ActionTypes.UpdatePortalOnboardingStep: {
- const portalOnboardingStep = action.data;
- return {
- ...state,
- portalOnboardingStep,
- };
- }
-
- case ActionTypes.UpdatePortalOnboardingShowing: {
- const isPortalOnboardingShowing = action.data;
- return {
- ...state,
- isPortalOnboardingShowing,
- hasPortalOnboardingBeenClosed: !isPortalOnboardingShowing ? true : state.hasPortalOnboardingBeenClosed,
- // always start onboarding from the beginning
- portalOnboardingStep: 0,
- };
- }
-
- // Docs
- case ActionTypes.UpdateLibraryVersion: {
- return {
- ...state,
- docsVersion: action.data,
- };
- }
- case ActionTypes.UpdateAvailableLibraryVersions: {
- return {
- ...state,
- availableDocVersions: action.data,
- };
- }
-
- // Shared
- case ActionTypes.ShowFlashMessage: {
- return {
- ...state,
- flashMessage: action.data,
- };
- }
-
- case ActionTypes.HideFlashMessage: {
- return {
- ...state,
- flashMessage: undefined,
- };
- }
-
- case ActionTypes.UpdateProviderType: {
- return {
- ...state,
- providerType: action.data,
- };
- }
-
- case ActionTypes.UpdateInjectedProviderName: {
- return {
- ...state,
- injectedProviderName: action.data,
- };
- }
-
- default:
- return state;
- }
-}
diff --git a/packages/website/ts/redux/store.ts b/packages/website/ts/redux/store.ts
deleted file mode 100644
index 006241371..000000000
--- a/packages/website/ts/redux/store.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import * as _ from 'lodash';
-import { applyMiddleware, createStore, Store as ReduxStore } from 'redux';
-import { composeWithDevTools } from 'redux-devtools-extension/developmentOnly';
-import { stateStorage } from 'ts/local_storage/state_storage';
-import { analyticsMiddleware } from 'ts/redux/analyticsMiddleware';
-import { reducer, State } from 'ts/redux/reducer';
-
-const ONE_SECOND = 1000;
-
-export const store: ReduxStore<State> = createStore(
- reducer,
- stateStorage.getPersistedDefaultState(),
- composeWithDevTools(applyMiddleware(analyticsMiddleware)),
-);
-store.subscribe(
- _.throttle(() => {
- const state = store.getState();
- // Persisted state
- stateStorage.saveState({
- hasPortalOnboardingBeenClosed: state.hasPortalOnboardingBeenClosed,
- isPortalOnboardingShowing: state.isPortalOnboardingShowing,
- });
- }, ONE_SECOND),
-);
diff --git a/packages/website/ts/schemas/metadata_schema.ts b/packages/website/ts/schemas/metadata_schema.ts
deleted file mode 100644
index cd4045d10..000000000
--- a/packages/website/ts/schemas/metadata_schema.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export const orderMetadataSchema = {
- id: '/OrderMetadata',
- properties: {
- makerToken: { $ref: '/PortalTokenMetadata' },
- takerToken: { $ref: '/PortalTokenMetadata' },
- },
- required: ['makerToken', 'takerToken'],
- type: 'object',
-};
diff --git a/packages/website/ts/schemas/portal_order_schema.ts b/packages/website/ts/schemas/portal_order_schema.ts
deleted file mode 100644
index 15e61f5e4..000000000
--- a/packages/website/ts/schemas/portal_order_schema.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-export const portalOrderSchema = {
- id: '/PortalOrder',
- properties: {
- signedOrder: { $ref: '/signedOrderSchema' },
- metadata: { $ref: '/OrderMetadata' },
- },
- required: ['signedOrder', 'metadata'],
- type: 'object',
-};
diff --git a/packages/website/ts/schemas/portal_token_metadata.ts b/packages/website/ts/schemas/portal_token_metadata.ts
deleted file mode 100644
index 0455c2ac1..000000000
--- a/packages/website/ts/schemas/portal_token_metadata.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const portalTokenMetadataSchema = {
- id: '/PortalTokenMetadata',
- properties: {
- name: { type: 'string' },
- symbol: { type: 'string' },
- decimals: { type: 'number' },
- },
- required: ['name', 'symbol', 'decimals'],
- type: 'object',
-};
diff --git a/packages/website/ts/schemas/validator.ts b/packages/website/ts/schemas/validator.ts
deleted file mode 100644
index 128d943e1..000000000
--- a/packages/website/ts/schemas/validator.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { SchemaValidator } from '@0x/json-schemas';
-import { orderMetadataSchema } from 'ts/schemas/metadata_schema';
-import { portalOrderSchema } from 'ts/schemas/portal_order_schema';
-import { portalTokenMetadataSchema } from 'ts/schemas/portal_token_metadata';
-
-const validator = new SchemaValidator();
-validator.addSchema(portalTokenMetadataSchema);
-validator.addSchema(orderMetadataSchema);
-validator.addSchema(portalOrderSchema);
-
-export { validator };
diff --git a/packages/website/ts/style/colors.ts b/packages/website/ts/style/colors.ts
deleted file mode 100644
index 356d72f7e..000000000
--- a/packages/website/ts/style/colors.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { colors as sharedColors } from '@0x/react-shared';
-
-const appColors = {
- walletBoxShadow: 'rgba(0, 0, 0, 0.05)',
- walletBorder: '#ededee',
- walletDefaultItemBackground: '#fbfbfc',
- walletFocusedItemBackground: '#f0f1f4',
- allowanceToggleShadow: 'rgba(0, 0, 0, 0)',
- wrapEtherConfirmationButton: sharedColors.mediumBlue,
- drawerMenuBackground: '#4a4a4a',
- menuItemDefaultSelectedBackground: '#424242',
- jobsPageBackground: sharedColors.grey50,
- jobsPageOpenPositionRow: sharedColors.grey100,
- metaMaskOrange: '#f68c24',
- metaMaskTransparentOrange: 'rgba(255, 248, 242, 0.8)',
- brandLight: '#00AE99',
- brandDark: '#003831',
- backgroundDark: '#111A19',
- backgroundBlack: '#000000',
- backgroundLight: '#F3F6F4',
- textDarkPrimary: '#000000',
- textDarkSecondary: '#5C5C5C',
- white: '#fff',
- instantPrimaryBackground: '#222222',
- instantSecondaryBackground: '#333333',
- instantTertiaryBackground: '#444444',
-};
-
-export const colors = {
- ...sharedColors,
- ...appColors,
-};
diff --git a/packages/website/ts/style/keyframes.ts b/packages/website/ts/style/keyframes.ts
deleted file mode 100644
index 28ea50247..000000000
--- a/packages/website/ts/style/keyframes.ts
+++ /dev/null
@@ -1,22 +0,0 @@
-import { keyframes } from 'ts/style/theme';
-
-export const rotate = keyframes`
- 100% {
- transform: rotate(360deg);
- }
-`;
-
-export const dash = keyframes`
- 0% {
- stroke-dasharray: 1, 150;
- stroke-dashoffset: 0;
- }
- 50% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -35;
- }
- 100% {
- stroke-dasharray: 90, 150;
- stroke-dashoffset: -124;
- }
-`;
diff --git a/packages/website/ts/style/media.ts b/packages/website/ts/style/media.ts
deleted file mode 100644
index 870d9a277..000000000
--- a/packages/website/ts/style/media.ts
+++ /dev/null
@@ -1,14 +0,0 @@
-import { css } from 'ts/style/theme';
-import { ScreenWidths } from 'ts/types';
-
-const generateMediaWrapper = (screenWidth: ScreenWidths) => (...args: any[]) => css`
- @media (max-width: ${screenWidth}em) {
- ${css.apply(css, args)};
- }
-`;
-
-export const media = {
- small: generateMediaWrapper(ScreenWidths.Sm),
- medium: generateMediaWrapper(ScreenWidths.Md),
- large: generateMediaWrapper(ScreenWidths.Lg),
-};
diff --git a/packages/website/ts/style/theme.ts b/packages/website/ts/style/theme.ts
deleted file mode 100644
index 94bd0169a..000000000
--- a/packages/website/ts/style/theme.ts
+++ /dev/null
@@ -1,17 +0,0 @@
-import * as styledComponents from 'styled-components';
-
-// tslint:disable:no-unnecessary-type-assertion
-const {
- default: styled,
- css,
- createGlobalStyle,
- keyframes,
- ThemeProvider,
-} = styledComponents as styledComponents.ThemedStyledComponentsModule<IThemeInterface>;
-// tslint:enable:no-unnecessary-type-assertion
-
-export interface IThemeInterface {}
-
-export const theme = {};
-
-export { styled, css, createGlobalStyle, keyframes, ThemeProvider };
diff --git a/packages/website/ts/style/z_index.ts b/packages/website/ts/style/z_index.ts
deleted file mode 100644
index a3998f59b..000000000
--- a/packages/website/ts/style/z_index.ts
+++ /dev/null
@@ -1,6 +0,0 @@
-export const zIndex = {
- topBar: 1100,
- aboveTopBar: 1101,
- overlay: 1105,
- aboveOverlay: 1106,
-};
diff --git a/packages/website/ts/types.ts b/packages/website/ts/types.ts
deleted file mode 100644
index 9492da5a5..000000000
--- a/packages/website/ts/types.ts
+++ /dev/null
@@ -1,667 +0,0 @@
-import { ALink } from '@0x/react-shared';
-import { ObjectMap, SignedOrder } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Provider } from 'ethereum-types';
-import * as React from 'react';
-
-export enum Side {
- Receive = 'RECEIVE',
- Deposit = 'DEPOSIT',
-}
-
-export interface Token {
- iconUrl?: string;
- name: string;
- address: string;
- symbol: string;
- decimals: number;
- isRegistered: boolean;
- trackedTimestamp?: number;
-}
-
-export interface TokenByAddress {
- [address: string]: Token;
-}
-
-export interface Styleable {
- style: React.CSSProperties;
- children: React.ReactNode;
-}
-
-export interface AssetToken {
- address?: string;
- amount?: BigNumber;
-}
-
-export interface SideToAssetToken {
- [side: string]: AssetToken;
-}
-
-export interface HashData {
- depositAmount: BigNumber;
- depositTokenContractAddr: string;
- feeRecipientAddress: string;
- makerFee: BigNumber;
- orderExpiryTimestamp: BigNumber;
- orderMakerAddress: string;
- orderTakerAddress: string;
- receiveAmount: BigNumber;
- receiveTokenContractAddr: string;
- takerFee: BigNumber;
- orderSalt: BigNumber;
-}
-
-export interface OrderToken {
- name: string;
- symbol: string;
- decimals: number;
-}
-
-export interface OrderMetadata {
- makerToken: OrderToken;
- takerToken: OrderToken;
-}
-
-export interface PortalOrder {
- signedOrder: SignedOrder;
- metadata: OrderMetadata;
-}
-
-export interface Fill {
- logIndex: number;
- maker: string;
- taker: string;
- makerToken: string;
- takerToken: string;
- filledMakerTokenAmount: BigNumber;
- filledTakerTokenAmount: BigNumber;
- paidMakerFee: BigNumber;
- paidTakerFee: BigNumber;
- orderHash: string;
- transactionHash: string;
- blockTimestamp: number;
-}
-
-export enum BalanceErrs {
- IncorrectNetworkForFaucet,
- FaucetRequestFailed,
- FaucetQueueIsFull,
- MintingFailed,
- SendFailed,
- AllowanceSettingFailed,
-}
-
-export enum ActionTypes {
- // Portal
- BatchDispatch = 'BATCH_DISPATCH',
- UpdateScreenWidth = 'UPDATE_SCREEN_WIDTH',
- UpdateNodeVersion = 'UPDATE_NODE_VERSION',
- ResetState = 'RESET_STATE',
- AddTokenToTokenByAddress = 'ADD_TOKEN_TO_TOKEN_BY_ADDRESS',
- BlockchainErrEncountered = 'BLOCKCHAIN_ERR_ENCOUNTERED',
- UpdateBlockchainIsLoaded = 'UPDATE_BLOCKCHAIN_IS_LOADED',
- UpdateNetworkId = 'UPDATE_NETWORK_ID',
- UpdateChosenAssetToken = 'UPDATE_CHOSEN_ASSET_TOKEN',
- UpdateChosenAssetTokenAddress = 'UPDATE_CHOSEN_ASSET_TOKEN_ADDRESS',
- UpdateOrderTakerAddress = 'UPDATE_ORDER_TAKER_ADDRESS',
- UpdateOrderSalt = 'UPDATE_ORDER_SALT',
- UpdateOrderSignature = 'UPDATE_ORDER_SIGNATURE',
- UpdateTokenByAddress = 'UPDATE_TOKEN_BY_ADDRESS',
- RemoveTokenFromTokenByAddress = 'REMOVE_TOKEN_FROM_TOKEN_BY_ADDRESS',
- ForceTokenStateRefetch = 'FORCE_TOKEN_STATE_REFETCH',
- UpdateOrderExpiry = 'UPDATE_ORDER_EXPIRY',
- SwapAssetTokens = 'SWAP_ASSET_TOKENS',
- UpdateUserAddress = 'UPDATE_USER_ADDRESS',
- UpdateUserEtherBalance = 'UPDATE_USER_ETHER_BALANCE',
- UpdateUserSuppliedOrderCache = 'UPDATE_USER_SUPPLIED_ORDER_CACHE',
- UpdateOrderFillAmount = 'UPDATE_ORDER_FILL_AMOUNT',
- UpdateShouldBlockchainErrDialogBeOpen = 'UPDATE_SHOULD_BLOCKCHAIN_ERR_DIALOG_BE_OPEN',
- UpdatePortalOnboardingStep = 'UPDATE_ONBOARDING_STEP',
- UpdatePortalOnboardingShowing = 'UPDATE_PORTAL_ONBOARDING_SHOWING',
-
- // Docs
- UpdateLibraryVersion = 'UPDATE_LIBRARY_VERSION',
- UpdateAvailableLibraryVersions = 'UPDATE_AVAILABLE_LIBRARY_VERSIONS',
-
- // Shared
- ShowFlashMessage = 'SHOW_FLASH_MESSAGE',
- HideFlashMessage = 'HIDE_FLASH_MESSAGE',
- UpdateProviderType = 'UPDATE_PROVIDER_TYPE',
- UpdateInjectedProviderName = 'UPDATE_INJECTED_PROVIDER_NAME',
- UpdateSelectedLanguage = 'UPDATE_SELECTED_LANGUAGE',
-}
-
-export interface Action {
- type: ActionTypes;
- data?: any;
-}
-
-export interface TrackedTokensByNetworkId {
- [networkId: number]: Token[];
-}
-
-export interface TrackedTokensByUserAddress {
- [userAddress: string]: TrackedTokensByNetworkId;
-}
-
-export interface ProfileInfo {
- name: string;
- title?: string;
- description: string;
- image: string;
- linkedIn?: string;
- github?: string;
- angellist?: string;
- medium?: string;
- twitter?: string;
-}
-
-export interface Partner {
- name: string;
- logo: string;
- url: string;
-}
-
-export interface Statistic {
- title: string;
- figure: string;
-}
-
-export interface StatisticByKey {
- [key: string]: Statistic;
-}
-
-export interface ERC20MarketInfo {
- etherMarketCapUsd: number;
- numLiquidERC20Tokens: number;
- marketCapERC20TokensUsd: number;
-}
-
-export enum ExchangeContractErrs {
- OrderFillExpired = 'ORDER_FILL_EXPIRED',
- OrderAlreadyCancelledOrFilled = 'ORDER_ALREADY_CANCELLED_OR_FILLED',
- OrderRemainingFillAmountZero = 'ORDER_REMAINING_FILL_AMOUNT_ZERO',
- OrderFillRoundingError = 'ORDER_FILL_ROUNDING_ERROR',
- FillBalanceAllowanceError = 'FILL_BALANCE_ALLOWANCE_ERROR',
- InsufficientTakerBalance = 'INSUFFICIENT_TAKER_BALANCE',
- InsufficientTakerAllowance = 'INSUFFICIENT_TAKER_ALLOWANCE',
- InsufficientMakerBalance = 'INSUFFICIENT_MAKER_BALANCE',
- InsufficientMakerAllowance = 'INSUFFICIENT_MAKER_ALLOWANCE',
- TransactionSenderIsNotFillOrderTaker = 'TRANSACTION_SENDER_IS_NOT_FILL_ORDER_TAKER',
- InsufficientRemainingFillAmount = 'INSUFFICIENT_REMAINING_FILL_AMOUNT',
-}
-
-export interface ContractResponse {
- logs: ContractEvent[];
-}
-
-export interface ContractEvent {
- event: string;
- args: any;
-}
-
-export type ValidatedBigNumberCallback = (isValid: boolean, amount?: BigNumber) => void;
-// Associated values are in `em` units
-export enum ScreenWidths {
- Sm = 40,
- Md = 52,
- Lg = 64,
-}
-
-export enum AlertTypes {
- Error,
- Success,
-}
-
-export enum BlockchainErrs {
- AContractNotDeployedOnNetwork = 'A_CONTRACT_NOT_DEPLOYED_ON_NETWORK',
- DisconnectedFromEthereumNode = 'DISCONNECTED_FROM_ETHEREUM_NODE',
- DefaultTokensNotInTokenRegistry = 'DEFAULT_TOKENS_NOT_IN_TOKEN_REGISTRY',
- NoError = 'NO_ERROR',
-}
-
-export enum BlockchainCallErrs {
- ContractDoesNotExist = 'CONTRACT_DOES_NOT_EXIST',
- UserHasNoAssociatedAddresses = 'USER_HAS_NO_ASSOCIATED_ADDRESSES',
- UnhandledError = 'UNHANDLED_ERROR',
- TokenAddressIsInvalid = 'TOKEN_ADDRESS_IS_INVALID',
-}
-
-export enum Environments {
- Development = 'DEVELOPMENT',
- Dogfood = 'DOGFOOD',
- Staging = 'STAGING',
- Production = 'PRODUCTION',
- Unknown = 'UNKNOWN',
-}
-
-export type ContractInstance = any; // TODO: add type definition for Contract
-
-export interface FAQQuestion {
- prompt: string;
- answer: React.ReactNode;
-}
-export interface FAQSection {
- name: string;
- questions: FAQQuestion[];
-}
-
-export interface S3FileObject {
- Key: {
- _text: string;
- };
-}
-
-export enum ProviderType {
- Injected = 'INJECTED',
- Ledger = 'LEDGER',
-}
-
-export interface Fact {
- title: string;
- explanation: string;
- image: string;
-}
-
-interface LedgerGetAddressResult {
- address: string;
-}
-interface LedgerSignResult {
- v: string;
- r: string;
- s: string;
-}
-interface LedgerCommunication {
- close_async: () => Promise<void>;
-}
-export interface LedgerEthConnection {
- getAddress_async: (
- derivationPath: string,
- askForDeviceConfirmation: boolean,
- shouldGetChainCode: boolean,
- ) => Promise<LedgerGetAddressResult>;
- signPersonalMessage_async: (derivationPath: string, messageHex: string) => Promise<LedgerSignResult>;
- signTransaction_async: (derivationPath: string, txHex: string) => Promise<LedgerSignResult>;
- comm: LedgerCommunication;
-}
-export interface SignPersonalMessageParams {
- data: string;
-}
-
-export interface PublicNodeUrlsByNetworkId {
- [networkId: number]: string[];
-}
-
-export interface JSONRPCPayload {
- params: any[];
- method: string;
-}
-
-export interface BlogPost {
- image: string;
- date: string;
- title: string;
- description: string;
- url: string;
-}
-
-export interface Article {
- section: string;
- title: string;
- content: string;
- fileName: string;
-}
-
-export interface ArticlesBySection {
- [section: string]: Article[];
-}
-
-export interface DialogConfigs {
- title: string;
- isModal: boolean;
- actions: any[];
-}
-
-export enum TokenVisibility {
- All = 'ALL',
- Untracked = 'UNTRACKED',
- Tracked = 'TRACKED',
-}
-
-export interface VersionToFilePath {
- [version: string]: string;
-}
-
-export enum Docs {
- ZeroExJs,
- SmartContracts,
-}
-
-export enum WebsiteLegacyPaths {
- ZeroExJs = '/docs/0xjs',
- Web3Wrapper = '/docs/web3_wrapper',
- Deployer = '/docs/deployer',
- Jobs = '/jobs',
-}
-
-export enum WebsitePaths {
- Portal = '/portal',
- Wiki = '/wiki',
- Docs = '/docs',
- ZeroExJs = '/docs/0x.js',
- Home = '/',
- FAQ = '/faq', // tslint:disable-line:enum-naming
- About = '/about',
- AboutMission = '/about/mission',
- AboutTeam = '/about/team',
- AboutPress = '/about/press',
- AboutJobs = '/about/jobs',
- Community = '/community',
- LaunchKit = '/launch-kit',
- Instant = '/instant',
- Ecosystem = '/eap',
- MarketMaker = '/market-maker',
- Why = '/why',
- Whitepaper = '/pdfs/0x_white_paper.pdf',
- SmartContracts = '/docs/contracts',
- Connect = '/docs/connect',
- Web3Wrapper = '/docs/web3-wrapper',
- ContractWrappers = '/docs/contract-wrappers',
- OrderWatcher = '/docs/order-watcher',
- SolCompiler = '/docs/sol-compiler',
- JSONSchemas = '/docs/json-schemas',
- SolCoverage = '/docs/sol-coverage',
- SolProfiler = '/docs/sol-profiler',
- SolTrace = '/docs/sol-trace',
- Subproviders = '/docs/subproviders',
- OrderUtils = '/docs/order-utils',
- EthereumTypes = '/docs/ethereum-types',
- AssetBuyer = '/docs/asset-buyer',
- Migrations = '/docs/migrations',
- Careers = '/careers',
-}
-
-export enum DocPackages {
- Connect = 'CONNECT',
- ZeroExJs = 'ZERO_EX_JS',
- SmartContracts = 'SMART_CONTRACTS',
- Web3Wrapper = 'WEB3_WRAPPER',
- SolCompiler = 'SOL_COMPILER',
- JSONSchemas = 'JSON_SCHEMAS',
- SolCoverage = 'SOL_COVERAGE',
- SolTrace = 'SOL_TRACE',
- SolProfiler = 'SOL_PROFILER',
- Subproviders = 'SUBPROVIDERS',
- OrderUtils = 'ORDER_UTILS',
- EthereumTypes = 'ETHEREUM_TYPES',
- ContractWrappers = 'CONTRACT_WRAPPERS',
- OrderWatcher = 'ORDER_WATCHER',
- AssetBuyer = 'ASSET_BUYER',
- Migrations = 'MIGRATIONS',
-}
-
-export enum Key {
- TopHeader = 'TOP_HEADER',
- TopTagline = 'TOP_TAGLINE',
- BuildCallToAction = 'BUILD_CALL_TO_ACTION',
- CommunityCallToAction = 'COMMUNITY_CALL_TO_ACTION',
- ProjectsHeader = 'PROJECTS_HEADER',
- FullListPrompt = 'FULL_LIST_PROMPT',
- FullListLink = 'FULL_LIST_LINK',
- TokenizedSectionHeader = 'TOKENIZED_SECTION_HEADER',
- TokenizedSectionDescription = 'TOKENIZED_SECTION_DESCRIPTION',
- Currency = 'CURRENCY',
- TraditionalAssets = 'TRADITIONAL_ASSETS',
- DigitalGoods = 'DIGITAL_GOODS',
- OffChainOrderRelay = 'OFFCHAIN_ORDER_RELAY',
- OnChainSettlement = 'ONCHAIN_SETTLEMENT',
- OffChainOnChainDescription = 'OFFCHAIN_ONCHAIN_DESCRIPTION',
- RelayersHeader = 'RELAYERS_HEADER',
- BenefitsHeader = 'BENEFITS_HEADER',
- UseCasesHeader = 'USE_CASES_HEADER',
- BenefitOneTitle = 'BENEFIT_ONE_TITLE',
- BenefitOneDescription = 'BENEFIT_ONE_DESCRIPTION',
- BenefitTwoTitle = 'BENEFIT_TWO_TITLE',
- BenefitTwoDescription = 'BENEFIT_TWO_DESCRIPTION',
- BenefitThreeTitle = 'BENEFIT_THREE_TITLE',
- BenefitThreeDescription = 'BENEFIT_THREE_DESCRIPTION',
- BuildingBlockSectionHeader = 'BUILDING_BLOCK_SECTION_HEADER',
- BuildingBlockSectionDescription = 'BUILDING_BLOCK_SECTION_DESCRIPTION',
- DevToolsPrompt = 'DEV_TOOLS_PROMPT',
- SmartContract = 'SMART_CONTRACT',
- Docs = 'DOCS',
- DecentralizedGovernance = 'DECENTRALIZED_GOVERNANCE',
- DecentralizedGovernanceDescription = 'DECENTRALIZED_GOVERNANCE_DESCRIPTION',
- PredictionMarkets = 'PREDICTION_MARKETS',
- PredictionMarketsDescription = 'PREDICTION_MARKETS_DESCRIPTION',
- StableTokens = 'STABLE_TOKENS',
- StableTokensDescription = 'STABLE_TOKENS_DESCRIPTION',
- DecentralizedLoans = 'DECENTRALIZED_LOANS',
- DecentralizedLoansDescription = 'DECENTRALIZED_LOANS_DESCRIPTION',
- FundManagement = 'FUND_MANAGEMENT',
- FundManagementDescription = 'FUND_MANAGEMENT_DESCRIPTION',
- GamingAndCollectables = 'GAMING_AND_COLLECTABLES',
- GamingAndCollectablesDescription = 'GAMING_AND_COLLECTABLES_DESCRIPTION',
- OrderBooks = 'ORDER_BOOKS',
- OrderBooksDescription = 'ORDER_BOOKS_DESCRIPTION',
- FinalCallToAction = 'FINAL_CALL_TO_ACTION',
- Documentation = 'DOCUMENTATION',
- Community = 'COMMUNITY',
- Organization = 'ORGANIZATION',
- About = 'ABOUT',
- Careers = 'CAREERS',
- Contact = 'CONTACT',
- SolCompiler = 'SOL_COMPILER',
- JsonSchemas = 'JSON_SCHEMAS',
- SolCov = 'SOL_COV',
- EthereumTypes = 'ETHEREUM_TYPES',
- Subproviders = 'SUBPROVIDERS',
- ZeroExJs = '0X_JS',
- ContractWrappers = 'CONTRACT_WRAPPERS',
- OrderWatcher = 'ORDER_WATCHER',
- AssetBuyer = 'ASSET_BUYER',
- Blog = 'BLOG',
- Forum = 'FORUM',
- Connect = 'CONNECT',
- Whitepaper = 'WHITEPAPER',
- Wiki = 'WIKI',
- Web3Wrapper = 'WEB3_WRAPPER',
- OrderUtils = 'ORDER_UTILS',
- And = 'AND',
- Faq = 'FAQ',
- SmartContracts = 'SMART_CONTRACTS',
- StandardRelayerApi = 'STANDARD_RELAYER_API',
- PortalDApp = 'PORTAL_DAPP',
- Website = 'WEBSITE',
- Developers = 'DEVELOPERS',
- Home = 'HOME',
- Discord = 'DISCORD',
- TradeCallToAction = 'TRADE_CALL_TO_ACTION',
- OurMissionAndValues = 'OUR_MISSION_AND_VALUES',
- BuildARelayer = 'BUILD_A_RELAYER',
- BuildARelayerDescription = 'BUILD_A_RELAYER_DESCRIPTION',
- DevelopOnEthereum = 'DEVELOP_ON_ETHEREUM',
- DevelopOnEthereumDescription = 'DEVELOP_ON_ETHEREUM_DESCRIPTION',
- OrderBasics = 'ORDER_BASICS',
- OrderBasicsDescription = 'ORDER_BASICS_DESCRIPTION',
- UseNetworkedLiquidity = 'USE_NETWORKED_LIQUIDITY',
- UseNetworkedLiquidityDescription = 'USE_NETWORKED_LIQUIDITY_DESCRIPTION',
- Integrate0xInstant = 'INTEGRATE_0X_INSTANT',
- Integrate0xInstantDescription = 'INTEGRATE_0X_INSTANT_DESCRIPTION',
- ViewAllDocumentation = 'VIEW_ALL_DOCUMENTATION',
- Sandbox = 'SANDBOX',
- Github = 'GITHUB',
- LiveChat = 'LIVE_CHAT',
- LibrariesAndTools = 'LIBRARIES_AND_TOOLS',
- LibrariesAndToolsDescription = 'LIBRARIES_AND_TOOLS_DESCRIPTION',
- More = 'MORE',
- StartBuildOn0x = 'START_BUILDING_ON_0X',
- StartBuildOn0xDescription = 'START_BUILDING_ON_0X_DESCRIPTION',
- LaunchKit = 'LAUNCH_KIT',
- LaunchKitPitch = 'LAUNCH_KIT_PITCH',
- ExploreTheDocs = 'EXPLORE_THE_DOCS',
- EnableTrading = 'ENABLE_TRADING',
- ForkAndExtend = 'FORK_AND_EXTEND',
- LocalMarket = 'LOCAL_MARKET',
- SeemlesslyCreate = 'SEEMLESSLY_CREATE',
- QuicklyLaunch = 'QUICKLY_LAUNCH',
- TapIntoAndShare = 'TAP_INTO_AND_SHARE',
- PerfectForDevelopers = 'PERFECT_FOR_DEVELOPERS',
- GetInTouch = 'GET_IN_TOUCH',
- LearnMore = 'LEARN_MORE',
- GetStarted = 'GET_STARTED',
- ProtocolSpecification = 'PROTOCOL_SPECIFICATION',
-}
-
-export enum SmartContractDocSections {
- Introduction = 'Introduction',
- Exchange = 'Exchange',
- TokenTransferProxy = 'TokenTransferProxy',
- TokenRegistry = 'TokenRegistry',
- ZRXToken = 'ZRXToken',
-}
-
-export enum Language {
- English = 'EN',
- Spanish = 'ES',
- Chinese = 'ZH',
- Korean = 'KO',
- Russian = 'RU',
-}
-
-export enum Deco {
- Cap,
- CapWords,
- Upper,
-}
-
-export interface MaterialUIPosition {
- vertical: 'bottom' | 'top' | 'center';
- horizontal: 'left' | 'middle' | 'right';
-}
-
-export enum Providers {
- Parity = 'PARITY',
- Metamask = 'METAMASK',
- Mist = 'MIST',
- CoinbaseWallet = 'COINBASE_WALLET',
- Cipher = 'CIPHER',
-}
-
-export interface InjectedProviderUpdate {
- selectedAddress: string;
- networkVersion: string;
-}
-
-export interface InjectedProviderObservable {
- subscribe(updateHandler: (update: InjectedProviderUpdate) => void): void;
- unsubscribe(updateHandler: (update: InjectedProviderUpdate) => void): void;
-}
-
-export interface TimestampMsRange {
- startTimestampMs: number;
- endTimestampMs: number;
-}
-
-export interface OutdatedWrappedEtherByNetworkId {
- [networkId: number]: {
- address: string;
- timestampMsRange: TimestampMsRange;
- };
-}
-
-export type ItemByAddress<T> = ObjectMap<T>;
-
-export type TokenStateByAddress = ItemByAddress<TokenState>;
-
-export interface TokenState {
- balance: BigNumber;
- allowance: BigNumber;
- isLoaded: boolean;
- price?: BigNumber;
-}
-
-export interface WebsiteBackendRelayerInfo {
- name: string;
- weeklyTxnVolume?: string;
- url: string;
- appUrl?: string;
- headerImgUrl?: string;
- logoImgUrl?: string;
- primaryColor?: string;
- topTokens: WebsiteBackendTokenInfo[];
-}
-
-export interface WebsiteBackendPriceInfo {
- [symbol: string]: string;
-}
-
-export interface WebsiteBackendTokenInfo {
- address: string;
- decimals: number;
- name: string;
- symbol: string;
-}
-
-export interface WebsiteBackendGasInfo {
- safeSlow: number;
- average: number;
- fast: number;
- fastest: number;
-}
-
-export interface WebsiteBackendJobInfo {
- id: number;
- title: string;
- department: string;
- office: string;
- url: string;
-}
-
-export enum BrowserType {
- Chrome = 'Chrome',
- Firefox = 'Firefox',
- Opera = 'Opera',
- Safari = 'Safari',
- Edge = 'Edge',
- Other = 'Other',
-}
-
-export enum OperatingSystemType {
- Android = 'Android',
- iOS = 'iOS', // tslint:disable-line:enum-naming
- Mac = 'Mac',
- Windows = 'Windows',
- WindowsPhone = 'WindowsPhone',
- Linux = 'Linux',
- Other = 'Other',
-}
-
-export enum AccountState {
- Disconnected = 'Disconnected',
- Ready = 'Ready',
- Loading = 'Loading',
- Locked = 'Locked',
-}
-
-export interface InjectedProvider extends Provider {
- publicConfigStore?: InjectedProviderObservable;
-}
-
-export interface TutorialInfo {
- iconUrl: string;
- description: string;
- link: ALink;
-}
-
-export enum Categories {
- ZeroExProtocol = '0x Protocol',
- Ethereum = 'Ethereum',
- CommunityMaintained = 'Community Maintained',
-}
-
-export interface Package {
- description: string;
- link: ALink;
-}
-// tslint:disable:max-file-line-count
diff --git a/packages/website/ts/utils/analytics.ts b/packages/website/ts/utils/analytics.ts
deleted file mode 100644
index e990b4fc7..000000000
--- a/packages/website/ts/utils/analytics.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { assetDataUtils } from '@0x/order-utils';
-import { ObjectMap } from '@0x/types';
-import * as _ from 'lodash';
-import { PortalOrder } from 'ts/types';
-import { utils } from 'ts/utils/utils';
-
-export interface HeapAnalytics {
- loaded: boolean;
- identify(id: string, idType: string): void;
- track(eventName: string, eventProperties?: ObjectMap<string | number>): void;
- resetIdentity(): void;
- addUserProperties(properties: ObjectMap<string | number>): void;
- addEventProperties(properties: ObjectMap<string | number>): void;
- removeEventProperty(property: string): void;
- clearEventProperties(): void;
-}
-export class Analytics {
- private _heap: HeapAnalytics;
- public static init(): Analytics {
- return new Analytics(Analytics.getHeap());
- }
- public static getHeap(): HeapAnalytics {
- const heap = (window as any).heap;
- if (!_.isUndefined(heap)) {
- return heap;
- } else {
- throw new Error('Could not find the Heap SDK on the page.');
- }
- }
- constructor(heap: HeapAnalytics) {
- this._heap = heap;
- }
- // tslint:disable:no-floating-promises
- // HeapAnalytics Wrappers
- public identify(id: string, idType: string): void {
- this._heapLoadedGuardAsync(() => this._heap.identify(id, idType));
- }
- public track(eventName: string, eventProperties?: ObjectMap<string | number>): void {
- this._heapLoadedGuardAsync(() => this._heap.track(eventName, eventProperties));
- }
- public resetIdentity(): void {
- this._heapLoadedGuardAsync(() => this._heap.resetIdentity());
- }
- public addUserProperties(properties: ObjectMap<string | number>): void {
- this._heapLoadedGuardAsync(() => this._heap.addUserProperties(properties));
- }
- public addEventProperties(properties: ObjectMap<string | number>): void {
- this._heapLoadedGuardAsync(() => this._heap.addEventProperties(properties));
- }
- public removeEventProperty(property: string): void {
- this._heapLoadedGuardAsync(() => this._heap.removeEventProperty(property));
- }
- public clearEventProperties(): void {
- this._heapLoadedGuardAsync(() => this._heap.clearEventProperties());
- }
- // tslint:enable:no-floating-promises
- // Custom methods
- public trackOrderEvent(eventName: string, order: PortalOrder): void {
- const takerTokenAmount = order.signedOrder.takerAssetAmount.toString();
- const makerTokenAmount = order.signedOrder.makerAssetAmount.toString();
- const takerToken = assetDataUtils.decodeERC20AssetData(order.signedOrder.takerAssetData).tokenAddress;
- const makerToken = assetDataUtils.decodeERC20AssetData(order.signedOrder.makerAssetData).tokenAddress;
- const orderLoggingData = {
- takerTokenAmount,
- makerTokenAmount,
- takerToken,
- makerToken,
- };
- this.track(eventName, orderLoggingData);
- }
- /**
- * Heap is not available as a UMD module, and additionally has the strange property of replacing itself with
- * a different object once it's loaded.
- * Instead of having an await call before every analytics use, we opt to have the awaiting logic in here by
- * guarding every API call with the guard below.
- */
- private async _heapLoadedGuardAsync(callback: () => void): Promise<void> {
- if (this._heap.loaded) {
- callback();
- return undefined;
- }
- await utils.onPageLoadPromise;
- // HACK: Reset heap to loaded heap
- this._heap = (window as any).heap;
- callback();
- }
-}
-
-export const analytics = Analytics.init();
diff --git a/packages/website/ts/utils/backend_client.ts b/packages/website/ts/utils/backend_client.ts
deleted file mode 100644
index 5164211df..000000000
--- a/packages/website/ts/utils/backend_client.ts
+++ /dev/null
@@ -1,61 +0,0 @@
-import * as _ from 'lodash';
-
-import {
- ArticlesBySection,
- WebsiteBackendGasInfo,
- WebsiteBackendJobInfo,
- WebsiteBackendPriceInfo,
- WebsiteBackendRelayerInfo,
- WebsiteBackendTokenInfo,
-} from 'ts/types';
-import { fetchUtils } from 'ts/utils/fetch_utils';
-import { utils } from 'ts/utils/utils';
-
-const ETH_GAS_STATION_ENDPOINT = '/eth_gas_station';
-const JOBS_ENDPOINT = '/jobs';
-const PRICES_ENDPOINT = '/prices';
-const RELAYERS_ENDPOINT = '/relayers';
-const TOKENS_ENDPOINT = '/tokens';
-const WIKI_ENDPOINT = '/wiki';
-const SUBSCRIBE_SUBSTACK_NEWSLETTER_ENDPOINT = '/newsletter_subscriber/substack';
-
-export const backendClient = {
- async getGasInfoAsync(): Promise<WebsiteBackendGasInfo> {
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), ETH_GAS_STATION_ENDPOINT);
- return result;
- },
- async getJobInfosAsync(): Promise<WebsiteBackendJobInfo[]> {
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), JOBS_ENDPOINT);
- return result;
- },
- async getPriceInfoAsync(tokenSymbols: string[]): Promise<WebsiteBackendPriceInfo> {
- if (_.isEmpty(tokenSymbols)) {
- return {};
- }
- const joinedTokenSymbols = tokenSymbols.join(',');
- const queryParams = {
- tokens: joinedTokenSymbols,
- };
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), PRICES_ENDPOINT, queryParams);
- return result;
- },
- async getRelayerInfosAsync(): Promise<WebsiteBackendRelayerInfo[]> {
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), RELAYERS_ENDPOINT);
- return result;
- },
- async getTokenInfosAsync(): Promise<WebsiteBackendTokenInfo[]> {
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), TOKENS_ENDPOINT);
- return result;
- },
- async getWikiArticlesBySectionAsync(): Promise<ArticlesBySection> {
- const result = await fetchUtils.requestAsync(utils.getBackendBaseUrl(), WIKI_ENDPOINT);
- return result;
- },
- async subscribeToNewsletterAsync(email: string): Promise<Response> {
- const result = await fetchUtils.postAsync(utils.getBackendBaseUrl(), SUBSCRIBE_SUBSTACK_NEWSLETTER_ENDPOINT, {
- email,
- referrer: window.location.href,
- });
- return result;
- },
-};
diff --git a/packages/website/ts/utils/configs.ts b/packages/website/ts/utils/configs.ts
deleted file mode 100644
index 7cc854ca0..000000000
--- a/packages/website/ts/utils/configs.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-import { OutdatedWrappedEtherByNetworkId, PublicNodeUrlsByNetworkId } from 'ts/types';
-
-const BASE_URL = window.location.origin;
-const INFURA_API_KEY = 'T5WSC8cautR4KXyYgsRs';
-
-export const configs = {
- AMOUNT_DISPLAY_PRECSION: 5,
- BACKEND_BASE_PROD_URL: 'https://website-api.0x.org',
- BACKEND_BASE_STAGING_URL: 'https://staging-website-api.0x.org',
- BASE_URL,
- BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
- DEFAULT_DERIVATION_PATH: `44'/60'/0'`,
- // WARNING: ZRX & WETH MUST always be default trackedTokens
- DEFAULT_TRACKED_TOKEN_SYMBOLS: ['WETH', 'ZRX'],
- DOMAIN_STAGING: 'staging-0xproject.s3-website-us-east-1.amazonaws.com',
- DOMAIN_DOGFOOD: 'dogfood.0x.org',
- DOMAINS_DEVELOPMENT: ['0xproject.localhost:3572', 'localhost:3572', '127.0.0.1'],
- DOMAIN_PRODUCTION: '0x.org',
- GOOGLE_ANALYTICS_ID: 'UA-98720122-1',
- LAST_LOCAL_STORAGE_FILL_CLEARANCE_DATE: '2017-11-22',
- LAST_LOCAL_STORAGE_TRACKED_TOKEN_CLEARANCE_DATE: '2018-9-7',
- OUTDATED_WRAPPED_ETHERS: [
- {
- 42: {
- address: '0x05d090b51c40b020eab3bfcb6a2dff130df22e9c',
- timestampMsRange: {
- startTimestampMs: 1502455607000,
- endTimestampMs: 1513790926000,
- },
- },
- 1: {
- address: '0x2956356cd2a2bf3202f771f50d3d14a367b48070',
- timestampMsRange: {
- startTimestampMs: 1502455607000,
- endTimestampMs: 1513790926000,
- },
- },
- },
- ] as OutdatedWrappedEtherByNetworkId[],
- // The order matters. We first try first node and only then fall back to others.
- PUBLIC_NODE_URLS_BY_NETWORK_ID: {
- [1]: [`https://mainnet.infura.io/${INFURA_API_KEY}`, 'https://mainnet.0x.org'],
- [42]: [`https://kovan.infura.io/${INFURA_API_KEY}`, 'https://kovan.0x.org'],
- [3]: [`https://ropsten.infura.io/${INFURA_API_KEY}`],
- [4]: [`https://rinkeby.infura.io/${INFURA_API_KEY}`],
- } as PublicNodeUrlsByNetworkId,
- SYMBOLS_OF_MINTABLE_KOVAN_TOKENS: ['ZRX', 'MKR', 'MLN', 'GNT', 'DGD', 'REP'],
- SYMBOLS_OF_MINTABLE_ROPSTEN_TOKENS: ['ZRX', 'MKR', 'MLN', 'GNT', 'DGD', 'REP'],
-};
diff --git a/packages/website/ts/utils/constants.ts b/packages/website/ts/utils/constants.ts
deleted file mode 100644
index ada8de549..000000000
--- a/packages/website/ts/utils/constants.ts
+++ /dev/null
@@ -1,130 +0,0 @@
-import { ALink } from '@0x/react-shared';
-import { BigNumber } from '@0x/utils';
-import { Key, WebsitePaths } from 'ts/types';
-
-const URL_FORUM = 'https://forum.0x.org';
-const URL_ZEROEX_CHAT = 'https://discord.gg/d3FTX3M';
-
-export const constants = {
- DECIMAL_PLACES_ETH: 18,
- DECIMAL_PLACES_ZRX: 18,
- ETHER_TOKEN_SYMBOL: 'WETH',
- ZRX_TOKEN_SYMBOL: 'ZRX',
- ETHER_SYMBOL: 'ETH',
- TOKEN_AMOUNT_DISPLAY_PRECISION: 4,
- GENESIS_ORDER_BLOCK_BY_NETWORK_ID: {
- 1: 4145578,
- 42: 3117574,
- 50: 0,
- 3: 1719261,
- 4: 1570919,
- } as { [networkId: number]: number },
- HOME_SCROLL_DURATION_MS: 500,
- HTTP_NO_CONTENT_STATUS_CODE: 204,
- LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER: 'didAcceptPortalDisclaimer',
- LOCAL_STORAGE_KEY_DISMISS_WETH_NOTICE: 'hasDismissedWethNotice',
- MAKER_FEE: new BigNumber(0),
- MAINNET_NAME: 'Main network',
- MINT_AMOUNT: new BigNumber('100000000000000000000'),
- NETWORK_ID_MAINNET: 1,
- NETWORK_ID_KOVAN: 42,
- NETWORK_ID_TESTRPC: 50,
- NETWORK_ID_ROPSTEN: 3,
- NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
- PROVIDER_NAME_LEDGER: 'Ledger',
- PROVIDER_NAME_METAMASK: 'MetaMask',
- PROVIDER_NAME_PARITY_SIGNER: 'Parity Signer',
- PROVIDER_NAME_MIST: 'Mist',
- PROVIDER_NAME_CIPHER: 'Cipher Browser',
- PROVIDER_NAME_COINBASE_WALLET: 'Coinbase Wallet',
- PROVIDER_NAME_GENERIC: 'Injected Web3',
- PROVIDER_NAME_PUBLIC: '0x Public',
- ROLLBAR_ACCESS_TOKEN: '32c39bfa4bb6440faedc1612a9c13d28',
- S3_DOC_BUCKET_ROOT: 'https://s3.amazonaws.com/doc-jsons',
- S3_STAGING_DOC_BUCKET_ROOT: 'https://s3.amazonaws.com/staging-doc-jsons',
- SUCCESS_STATUS: 200,
- UNAVAILABLE_STATUS: 503,
- TAKER_FEE: new BigNumber(0),
- TESTNET_NAME: 'Kovan',
- NUMERAL_USD_FORMAT: '$0,0.00',
- EMAIL_JOBS: 'jobs@0x.org',
- PROJECT_URL_ETHFINEX: 'https://www.ethfinex.com/',
- PROJECT_URL_AMADEUS: 'http://amadeusrelay.org',
- PROJECT_URL_DDEX: 'https://ddex.io',
- PROJECT_URL_DECENT_EX: 'https://decent.exchange',
- PROJECT_URL_DEXTROID: 'https://www.dextroid.io',
- PROJECT_URL_ERC_DEX: 'https://ercdex.com',
- PROJECT_URL_OPEN_RELAY: 'https://openrelay.xyz',
- PROJECT_URL_RADAR_RELAY: 'https://radarrelay.com',
- PROJECT_URL_PARADEX: 'https://paradex.io',
- PROJECT_URL_DYDX: 'https://dydx.exchange',
- PROJECT_URL_MELONPORT: 'https://melonport.com',
- PROJECT_URL_DISTRICT_0X: 'https://district0x.io',
- PROJECT_URL_DHARMA: 'https://dharma.io',
- PROJECT_URL_LENDROID: 'https://lendroid.com',
- PROJECT_URL_MAKER: 'https://makerdao.com',
- PROJECT_URL_ARAGON: 'https://aragon.one',
- PROJECT_URL_BLOCKNET: 'https://blocknet.co',
- PROJECT_URL_0CEAN: 'https://theocean.trade',
- PROJECT_URL_IMTOKEN: 'https://tokenlon.token.im/',
- PROJECT_URL_AUGUR: 'https://augur.net',
- PROJECT_URL_AUCTUS: 'https://auctus.org',
- PROJECT_URL_OPEN_ANX: 'https://www.openanx.org',
- PROJECT_URL_IDT: 'https://kinalpha.com',
- URL_ANGELLIST: 'https://angel.co/0xproject/jobs',
- URL_APACHE_LICENSE: 'http://www.apache.org/licenses/LICENSE-2.0',
- URL_BITLY_API: 'https://api-ssl.bitly.com',
- URL_BLOG: 'https://blog.0xproject.com/latest',
- URL_DISCOURSE_FORUM: 'https://forum.0x.org',
- URL_ECOSYSTEM_APPLY: 'https://0x.smapply.io/',
- URL_ECOSYSTEM_BLOG_POST: 'https://blog.0xproject.com/announcing-the-0x-ecosystem-acceleration-program-89d1cb89d565',
- URL_FIREFOX_U2F_ADDON: 'https://addons.mozilla.org/en-US/firefox/addon/u2f-support-add-on/',
- URL_TESTNET_FAUCET: 'https://faucet.0x.org',
- URL_GITHUB_ORG: 'https://github.com/0xProject',
- URL_GITHUB_WIKI: 'https://github.com/0xProject/wiki',
- URL_FORUM,
- URL_PROTOCOL_SPECIFICATION:
- 'https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md',
- URL_METAMASK_CHROME_STORE: 'https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpgknn',
- URL_METAMASK_FIREFOX_STORE: 'https://addons.mozilla.org/en-US/firefox/addon/ether-metamask/',
- URL_COINBASE_WALLET_IOS_APP_STORE: 'https://itunes.apple.com/us/app/coinbase-wallet/id1278383455?mt=8',
- URL_COINBASE_WALLET_ANDROID_APP_STORE: 'https://play.google.com/store/apps/details?id=org.toshi&hl=en',
- URL_METAMASK_HOMEPAGE: 'https://metamask.io/',
- URL_METAMASK_OPERA_STORE: 'https://addons.opera.com/en/extensions/details/metamask/',
- URL_MIST_DOWNLOAD: 'https://github.com/ethereum/mist/releases',
- URL_PARITY_CHROME_STORE:
- 'https://chrome.google.com/webstore/detail/parity-ethereum-integrati/himekenlppkgeaoeddcliojfddemadig',
- URL_REDDIT: 'https://reddit.com/r/0xproject',
- URL_SANDBOX: 'https://codesandbox.io/s/1qmjyp7p5j',
- URL_STANDARD_RELAYER_API_GITHUB: 'https://github.com/0xProject/standard-relayer-api/blob/master/README.md',
- URL_TWITTER: 'https://twitter.com/0xproject',
- URL_FACEBOOK: 'https://www.facebook.com/0xProject/',
- URL_WETH_IO: 'https://weth.io/',
- URL_CANONICAL_WETH_POST: 'https://blog.0xproject.com/canonical-weth-a9aa7d0279dd',
- URL_ZEROEX_CHAT,
- URL_LAUNCH_KIT: 'https://github.com/0xProject/0x-launch-kit',
- URL_LAUNCH_KIT_BLOG_POST: 'https://blog.0xproject.com/introducing-the-0x-launch-kit-4acdc3453585',
- URL_WEB3_DOCS: 'https://github.com/ethereum/wiki/wiki/JavaScript-API',
- URL_WEB3_DECODED_LOG_ENTRY_EVENT:
- 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L123',
- URL_WEB3_LOG_ENTRY_EVENT: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L127',
- URL_WEB3_PROVIDER_DOCS: 'https://github.com/0xProject/web3-typescript-typings/blob/f5bcb96/index.d.ts#L150',
- URL_BIGNUMBERJS_GITHUB: 'http://mikemcl.github.io/bignumber.js',
- URL_MISSION_AND_VALUES_BLOG_POST: 'https://blog.0xproject.com/the-0x-mission-and-values-181a58706f9f',
- DEVELOPER_TOPBAR_LINKS: [
- {
- title: Key.Wiki,
- to: WebsitePaths.Wiki,
- },
- {
- title: Key.Forum,
- to: URL_FORUM,
- shouldOpenInNewTab: true,
- },
- {
- title: Key.LiveChat,
- to: URL_ZEROEX_CHAT,
- shouldOpenInNewTab: true,
- },
- ] as ALink[],
-};
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts
deleted file mode 100644
index 6be164e6e..000000000
--- a/packages/website/ts/utils/doc_utils.ts
+++ /dev/null
@@ -1,85 +0,0 @@
-import { DocAgnosticFormat, GeneratedDocJson } from '@0x/react-docs';
-import { fetchAsync, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import { S3FileObject, VersionToFilePath } from 'ts/types';
-import convert from 'xml-js';
-
-export const docUtils = {
- async getVersionToFilePathAsync(s3DocJsonRoot: string, folderName: string): Promise<VersionToFilePath> {
- const versionFilePaths = await docUtils.getVersionFileNamesAsync(s3DocJsonRoot, folderName);
- const versionToFilePath: VersionToFilePath = {};
- _.each(versionFilePaths, filePath => {
- const version = filePath.split('/v')[1].replace('.json', '');
- versionToFilePath[version] = filePath;
- });
- return versionToFilePath;
- },
- async getVersionFileNamesAsync(s3DocJsonRoot: string, folderName: string): Promise<string[]> {
- const response = await fetchAsync(s3DocJsonRoot);
- if (response.status !== 200) {
- // TODO: Show the user an error message when the docs fail to load
- const errMsg = await response.text();
- logUtils.log(`Failed to load JSON file list: ${response.status} ${errMsg}`);
- throw new Error(errMsg);
- }
- const responseXML = await response.text();
- const responseJSONString = convert.xml2json(responseXML, {
- compact: true,
- });
- const responseObj = JSON.parse(responseJSONString);
- const fileObjs: S3FileObject[] = _.isArray(responseObj.ListBucketResult.Contents)
- ? (responseObj.ListBucketResult.Contents as S3FileObject[])
- : [responseObj.ListBucketResult.Contents];
-
- /*
- * S3 simply pre-fixes files in "folders" with the folder name. Thus, since we
- * store docJSONs for multiple packages in a single S3 bucket, we must filter out
- * the versionFileNames for a given folder here (ignoring folder entries)
- *
- * Example S3 response:
- * <ListBucketResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
- * <Name>staging-doc-jsons</Name>
- * <Prefix/>
- * <Marker/>
- * <MaxKeys>1000</MaxKeys>
- * <IsTruncated>false</IsTruncated>
- * <Contents>
- * <Key>0xjs/</Key>
- * <LastModified>2018-03-16T13:17:46.000Z</LastModified>
- * <ETag>"d41d8cd98f00b204e9800998ecf8427e"</ETag>
- * <Size>0</Size>
- * <StorageClass>STANDARD</StorageClass>
- * </Contents>
- * <Contents>
- * <Key>0xjs/v0.1.0.json</Key>
- * <LastModified>2018-03-16T13:18:23.000Z</LastModified>
- * <ETag>"b4f7f74913aab4a5ad1e6a58fcb3b274"</ETag>
- * <Size>1039050</Size>
- * <StorageClass>STANDARD</StorageClass>
- * </Contents>
- */
- const relevantObjs = _.filter(fileObjs, fileObj => {
- const key = fileObj.Key._text;
- const isInFolderOfInterest = _.includes(key, folderName);
- const isFileEntry = !_.endsWith(key, '/');
- return isInFolderOfInterest && isFileEntry;
- });
-
- const versionFilePaths = _.map(relevantObjs, fileObj => {
- return fileObj.Key._text;
- });
- return versionFilePaths;
- },
- async getJSONDocFileAsync(filePath: string, s3DocJsonRoot: string): Promise<GeneratedDocJson | DocAgnosticFormat> {
- const endpoint = `${s3DocJsonRoot}/${filePath}`;
- const response = await fetchAsync(endpoint);
- if (response.status !== 200) {
- // TODO: Show the user an error message when the docs fail to load
- const errMsg = await response.text();
- logUtils.log(`Failed to load Doc JSON: ${response.status} ${errMsg}`);
- throw new Error(errMsg);
- }
- const jsonDocObj = await response.json();
- return jsonDocObj;
- },
-};
diff --git a/packages/website/ts/utils/documentation_container.ts b/packages/website/ts/utils/documentation_container.ts
deleted file mode 100644
index 54e8a2c1a..000000000
--- a/packages/website/ts/utils/documentation_container.ts
+++ /dev/null
@@ -1,35 +0,0 @@
-import { DocsInfo, DocsInfoConfig } from '@0x/react-docs';
-import { Dispatch } from 'redux';
-import { DocPageProps } from 'ts/pages/documentation/doc_page';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { ScreenWidths } from 'ts/types';
-import { Translate } from 'ts/utils/translate';
-
-export interface ConnectedState {
- docsVersion: string;
- availableDocVersions: string[];
- docsInfo: DocsInfo;
- translate: Translate;
- screenWidth: ScreenWidths;
-}
-
-export interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-export const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const getMapStateToProps = (docsInfoConfig: DocsInfoConfig) => {
- const docsInfo = new DocsInfo(docsInfoConfig);
- const mapStateToProps = (state: State, _ownProps: DocPageProps): ConnectedState => ({
- docsVersion: state.docsVersion,
- availableDocVersions: state.availableDocVersions,
- translate: state.translate,
- docsInfo,
- screenWidth: state.screenWidth,
- });
- return mapStateToProps;
-};
diff --git a/packages/website/ts/utils/error_reporter.ts b/packages/website/ts/utils/error_reporter.ts
deleted file mode 100644
index 8e24060ac..000000000
--- a/packages/website/ts/utils/error_reporter.ts
+++ /dev/null
@@ -1,54 +0,0 @@
-import { logUtils } from '@0x/utils';
-import Rollbar from 'rollbar';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import { utils } from 'ts/utils/utils';
-
-// Suggested way to include Rollbar with Webpack
-// https://github.com/rollbar/rollbar.js/tree/master/examples/webpack
-const rollbarConfig = {
- accessToken: constants.ROLLBAR_ACCESS_TOKEN,
- captureUncaught: true,
- captureUnhandledRejections: true,
- itemsPerMinute: 10,
- maxItems: 500,
- payload: {
- environment: utils.getEnvironment(),
- client: {
- javascript: {
- source_map_enabled: true,
- // This is only defined in production environments.
- code_version: process.env.GIT_SHA,
- guess_uncaught_frames: true,
- },
- },
- },
- uncaughtErrorLevel: 'error',
- hostWhiteList: [configs.DOMAIN_PRODUCTION, configs.DOMAIN_STAGING],
- ignoredMessages: [
- // Errors from the third-party scripts
- 'Script error',
- // Network errors or ad-blockers
- 'TypeError: Failed to fetch',
- 'Exchange has not been deployed to detected network (network/artifact mismatch)',
- // Source: https://groups.google.com/a/chromium.org/forum/#!topic/chromium-discuss/7VU0_VvC7mE
- "undefined is not an object (evaluating '__gCrWeb.autofill.extractForms')",
- // Source: http://stackoverflow.com/questions/43399818/securityerror-from-facebook-and-cross-domain-messaging
- 'SecurityError (DOM Exception 18)',
- ],
-};
-
-const rollbar = new Rollbar(rollbarConfig);
-
-export const errorReporter = {
- report(err: Error): void {
- if (utils.isDevelopment()) {
- return; // Let's not log development errors to rollbar
- }
- rollbar.error(err, (rollbarErr: Error) => {
- if (rollbarErr) {
- logUtils.log(`Error reporting to rollbar, ignoring: ${rollbarErr}`);
- }
- });
- },
-};
diff --git a/packages/website/ts/utils/fake_token_registry.ts b/packages/website/ts/utils/fake_token_registry.ts
deleted file mode 100644
index 607dd2553..000000000
--- a/packages/website/ts/utils/fake_token_registry.ts
+++ /dev/null
@@ -1,879 +0,0 @@
-export interface FakeTokenRegistryEntry {
- address: string;
- name: string;
- symbol: string;
- decimals: number;
-}
-
-export const fakeTokenRegistry: { [networkId: string]: FakeTokenRegistryEntry[] } = {
- '1': [
- {
- address: '0xe41d2489571d322189246dafa5ebde1f4699f498',
- name: '0x Protocol Token',
- symbol: 'ZRX',
- decimals: 18,
- },
- {
- address: '0x4156d3342d5c385a87d264f90653733592000581',
- name: 'Salt',
- symbol: 'SALT',
- decimals: 8,
- },
- {
- address: '0x05f4a42e251f2d52b8ed15e9fedaacfcef1fad27',
- name: 'Zilliqa',
- symbol: 'ZIL',
- decimals: 12,
- },
- {
- address: '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a',
- name: 'Digix DAO Token',
- symbol: 'DGD',
- decimals: 9,
- },
- {
- address: '0xfa05a73ffe78ef8f1a739473e462c54bae6567d9',
- name: 'Lunyr',
- symbol: 'LUN',
- decimals: 18,
- },
- {
- address: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',
- name: 'Wrapped Ether',
- symbol: 'WETH',
- decimals: 18,
- },
- {
- address: '0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1',
- name: 'Melon Token',
- symbol: 'MLN',
- decimals: 18,
- },
- {
- address: '0x9a642d6b3368ddc662ca244badf32cda716005bc',
- name: 'Qtum',
- symbol: 'QTUM',
- decimals: 18,
- },
- {
- address: '0xd26114cd6ee289accf82350c8d8487fedb8a0c07',
- name: 'OmiseGO',
- symbol: 'OMG',
- decimals: 18,
- },
- {
- address: '0xb97048628db6b661d4c2aa833e95dbe1a905b280',
- name: 'TenXPay',
- symbol: 'PAY',
- decimals: 18,
- },
- {
- address: '0x86fa049857e0209aa7d9e616f7eb3b3b78ecfdb0',
- name: 'Eos',
- symbol: 'EOS',
- decimals: 18,
- },
- {
- address: '0x888666ca69e0f178ded6d75b5726cee99a87d698',
- name: 'Iconomi',
- symbol: 'ICN',
- decimals: 18,
- },
- {
- address: '0x744d70fdbe2ba4cf95131626614a1763df805b9e',
- name: 'StatusNetwork',
- symbol: 'SNT',
- decimals: 18,
- },
- {
- address: '0x6810e776880c02933d47db1b9fc05908e5386b96',
- name: 'Gnosis',
- symbol: 'GNO',
- decimals: 18,
- },
- {
- address: '0x0d8775f648430679a709e98d2b0cb6250d2887ef',
- name: 'Basic Attention Token',
- symbol: 'BAT',
- decimals: 18,
- },
- {
- address: '0xb64ef51c888972c908cfacf59b47c1afbc0ab8ac',
- name: 'Storj',
- symbol: 'STORJ',
- decimals: 8,
- },
- {
- address: '0x1f573d6fb3f13d689ff844b4ce37794d79a7ff1c',
- name: 'Bancor',
- symbol: 'BNT',
- decimals: 18,
- },
- {
- address: '0x960b236a07cf122663c4303350609a66a7b288c0',
- name: 'Aragon',
- symbol: 'ANT',
- decimals: 18,
- },
- {
- address: '0x0abdace70d3790235af448c88547603b945604ea',
- name: 'district0x',
- symbol: 'DNT',
- decimals: 18,
- },
- {
- address: '0xaec2e87e0a235266d9c5adc9deb4b2e29b54d009',
- name: 'SingularDTV',
- symbol: 'SNGLS',
- decimals: 0,
- },
- {
- address: '0x419d0d8bdd9af5e606ae2232ed285aff190e711b',
- name: 'FunFair',
- symbol: 'FUN',
- decimals: 8,
- },
- {
- address: '0xaf30d2a7e90d7dc361c8c4585e9bb7d2f6f15bc7',
- name: 'FirstBlood',
- symbol: '1ST',
- decimals: 18,
- },
- {
- address: '0x08711d3b02c8758f2fb3ab4e80228418a7f8e39c',
- name: 'Edgeless',
- symbol: 'EDG',
- decimals: 0,
- },
- {
- address: '0x9992ec3cf6a55b00978cddf2b27bc6882d88d1ec',
- name: 'Polymath',
- symbol: 'POLY',
- decimals: 18,
- },
- {
- address: '0x607f4c5bb672230e8672085532f7e901544a7375',
- name: 'iExec',
- symbol: 'RLC',
- decimals: 9,
- },
- {
- address: '0x667088b212ce3d06a1b553a7221e1fd19000d9af',
- name: 'Wings',
- symbol: 'WINGS',
- decimals: 18,
- },
- {
- address: '0x41e5560054824ea6b0732e656e3ad64e20e94e45',
- name: 'Civic',
- symbol: 'CVC',
- decimals: 8,
- },
- {
- address: '0xb63b606ac810a52cca15e44bb630fd42d8d1d83d',
- name: 'Monaco',
- symbol: 'MCO',
- decimals: 8,
- },
- {
- address: '0xf433089366899d83a9f26a773d59ec7ecf30355e',
- name: 'Metal',
- symbol: 'MTL',
- decimals: 8,
- },
- {
- address: '0x12fef5e57bf45873cd9b62e9dbd7bfb99e32d73e',
- name: 'Cofoundit',
- symbol: 'CFI',
- decimals: 18,
- },
- {
- address: '0xaaaf91d9b90df800df4f55c205fd6989c977e73a',
- name: 'Monolith TKN',
- symbol: 'TKN',
- decimals: 8,
- },
- {
- address: '0xe7775a6e9bcf904eb39da2b68c5efb4f9360e08c',
- name: 'Token-as-a-Service',
- symbol: 'TAAS',
- decimals: 6,
- },
- {
- address: '0x2e071d2966aa7d8decb1005885ba1977d6038a65',
- name: 'DICE',
- symbol: 'ROL',
- decimals: 16,
- },
- {
- address: '0xcb94be6f13a1182e4a4b6140cb7bf2025d28e41b',
- name: 'Trustcoin',
- symbol: 'TRST',
- decimals: 6,
- },
- {
- address: '0x1776e1f26f98b1a5df9cd347953a26dd3cb46671',
- name: 'Numeraire',
- symbol: 'NMR',
- decimals: 18,
- },
- {
- address: '0x7c5a0ce9267ed19b22f8cae653f198e3e8daf098',
- name: 'Santiment Network Token',
- symbol: 'SAN',
- decimals: 18,
- },
- {
- address: '0xdd974d5c2e2928dea5f71b9825b8b646686bd200',
- name: 'Kyber Network Crystal',
- symbol: 'KNC',
- decimals: 18,
- },
- {
- address: '0xb7cb1c96db6b22b0d3d9536e0108d062bd488f74',
- name: 'Walton',
- symbol: 'WTC',
- decimals: 18,
- },
- {
- address: '0xd0d6d6c5fe4a677d343cc433536bb717bae167dd',
- name: 'adToken',
- symbol: 'ADT',
- decimals: 9,
- },
- {
- address: '0x42d6622dece394b54999fbd73d108123806f6a18',
- name: 'SpankChain',
- symbol: 'SPANK',
- decimals: 18,
- },
- {
- address: '0x701c244b988a513c945973defa05de933b23fe1d',
- name: 'openANX',
- symbol: 'OAX',
- decimals: 18,
- },
- {
- address: '0x514910771af9ca656af840dff83e8264ecf986ca',
- name: 'ChainLink',
- symbol: 'LINK',
- decimals: 18,
- },
- {
- address: '0x8f8221afbb33998d8584a2b05749ba73c37a938a',
- name: 'Request Network',
- symbol: 'REQ',
- decimals: 18,
- },
- {
- address: '0x27054b13b1b798b345b591a4d22e6562d47ea75a',
- name: 'AirSwap',
- symbol: 'AST',
- decimals: 4,
- },
- {
- address: '0xf0ee6b27b759c9893ce4f094b49ad28fd15a23e4',
- name: 'Enigma',
- symbol: 'ENG',
- decimals: 8,
- },
- {
- address: '0x818fc6c2ec5986bc6e2cbf00939d90556ab12ce5',
- name: 'Kin',
- symbol: 'KIN',
- decimals: 18,
- },
- {
- address: '0x27dce1ec4d3f72c3e457cc50354f1f975ddef488',
- name: 'AirToken',
- symbol: 'AIR',
- decimals: 8,
- },
- {
- address: '0x12480e24eb5bec1a9d4369cab6a80cad3c0a377a',
- name: 'Substratum',
- symbol: 'SUB',
- decimals: 2,
- },
- {
- address: '0x0e8d6b471e332f140e7d9dbb99e5e3822f728da6',
- name: 'ABYSS',
- symbol: 'ABYSS',
- decimals: 18,
- },
- {
- address: '0x4ceda7906a5ed2179785cd3a40a69ee8bc99c466',
- name: 'AION',
- symbol: 'AION',
- decimals: 8,
- },
- {
- address: '0xd8912c10681d8b21fd3742244f44658dba12264e',
- name: 'Pluton',
- symbol: 'PLU',
- decimals: 18,
- },
- {
- address: '0x1a7a8bd9106f2b8d977e08582dc7d24c723ab0db',
- name: 'AppCoins',
- symbol: 'APPC',
- decimals: 18,
- },
- {
- address: '0xba5f11b16b155792cf3b2e6880e8706859a8aeb6',
- name: 'Aeron',
- symbol: 'ARN',
- decimals: 8,
- },
- {
- address: '0xfec0cf7fe078a500abf15f1284958f22049c2c7e',
- name: 'Maecenas ART Token',
- symbol: 'ART',
- decimals: 18,
- },
- {
- address: '0x0f5d2fb29fb7d3cfee444a200298f468908cc942',
- name: 'Decentraland',
- symbol: 'MANA',
- decimals: 18,
- },
- {
- address: '0x1c4481750daa5ff521a2a7490d9981ed46465dbd',
- name: 'BlockMason Credit Protocol Token',
- symbol: 'BCPT',
- decimals: 18,
- },
- {
- address: '0x55296f69f40ea6d20e478533c15a6b08b654e758',
- name: 'XY Oracle',
- symbol: 'XYO',
- decimals: 18,
- },
- {
- address: '0xd7732e3783b0047aa251928960063f863ad022d8',
- name: 'BrahmaOS',
- symbol: 'BRM',
- decimals: 18,
- },
- {
- address: '0x7d4b8cce0591c9044a22ee543533b72e976e36c3',
- name: 'Change Coin',
- symbol: 'CAG',
- decimals: 18,
- },
- {
- address: '0x1d462414fe14cf489c7a21cac78509f4bf8cd7c0',
- name: 'CanYaCoin',
- symbol: 'CAN',
- decimals: 6,
- },
- {
- address: '0x1234567461d3f8db7496581774bd869c83d51c93',
- name: 'BitClave',
- symbol: 'CAT',
- decimals: 18,
- },
- {
- address: '0x89d24a6b4ccb1b6faa2625fe562bdd9a23260359',
- name: 'Dai Stablecoin v1.0',
- symbol: 'DAI',
- decimals: 18,
- },
- {
- address: '0x0cf0ee63788a0849fe5297f3407f701e122cc023',
- name: 'Streamr DATAcoin',
- symbol: 'DATA',
- decimals: 18,
- },
- {
- address: '0x151202c9c18e495656f372281f493eb7698961d5',
- name: 'DEBITUM',
- symbol: 'DEB',
- decimals: 18,
- },
- {
- address: '0xba2184520a1cc49a6159c57e61e1844e085615b6',
- name: 'HelloGold Token',
- symbol: 'HGT',
- decimals: 8,
- },
- {
- address: '0x13f11c9905a08ca76e3e853be63d4f0944326c72',
- name: 'Divi Exchange Token',
- symbol: 'DIVX',
- decimals: 18,
- },
- {
- address: '0x5b26c5d0772e5bbac8b3182ae9a13f9bb2d03765',
- name: 'EDU Token',
- symbol: 'EDU',
- decimals: 8,
- },
- {
- address: '0xd49ff13661451313ca1553fd6954bd1d9b6e02b9',
- name: 'ElectrifyAsia',
- symbol: 'ELEC',
- decimals: 18,
- },
- {
- address: '0x95daaab98046846bf4b2853e23cba236fa394a31',
- name: 'EtheremonToken',
- symbol: 'EMONT',
- decimals: 8,
- },
- {
- address: '0x5bc7e5f0ab8b2e10d2d0a3f21739fce62459aef3',
- name: 'Hut34 Entropy Token',
- symbol: 'ENTR',
- decimals: 18,
- },
- {
- address: '0x923108a439c4e8c2315c4f6521e5ce95b44e9b4c',
- name: 'Devery.io',
- symbol: 'EVE',
- decimals: 18,
- },
- {
- address: '0xf8e386eda857484f5a12e4b5daa9984e06e73705',
- name: 'Indorse Token',
- symbol: 'IND',
- decimals: 18,
- },
- {
- address: '0x4f4f0db4de903b88f2b1a2847971e231d54f8fd3',
- name: 'Geens Platform Token',
- symbol: 'GEE',
- decimals: 8,
- },
- {
- address: '0x543ff227f64aa17ea132bf9886cab5db55dcaddf',
- name: 'DAOstack',
- symbol: 'GEN',
- decimals: 18,
- },
- {
- address: '0x8a854288a5976036a725879164ca3e91d30c6a1b',
- name: 'Guaranteed Entrance Token',
- symbol: 'GET',
- decimals: 18,
- },
- {
- address: '0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2',
- name: 'Maker',
- symbol: 'MKR',
- decimals: 18,
- },
- {
- address: '0x9af839687f6c94542ac5ece2e317daae355493a1',
- name: 'Hydro Protocol Token',
- symbol: 'HOT',
- decimals: 18,
- },
- {
- address: '0x0d262e5dc4a06a0f1c90ce79c7a60c09dfc884e4',
- name: 'JET8 Token',
- symbol: 'J8T',
- decimals: 8,
- },
- {
- address: '0x8727c112c712c4a03371ac87a74dd6ab104af768',
- name: 'Jetcoin Institute Token',
- symbol: 'JET',
- decimals: 18,
- },
- {
- address: '0xa4e8c3ec456107ea67d3075bf9e3df3a75823db0',
- name: 'Loom Network Token',
- symbol: 'LOOM',
- decimals: 18,
- },
- {
- address: '0x957c30ab0426e0c93cd8241e2c60392d08c6ac8e',
- name: 'Modum Token',
- symbol: 'MOD',
- decimals: 0,
- },
- {
- address: '0x2ef27bf41236bd859a95209e17a43fbd26851f92',
- name: 'MORPH',
- symbol: 'MORPH',
- decimals: 4,
- },
- {
- address: '0x263c618480dbe35c300d8d5ecda19bbb986acaed',
- name: 'MOT',
- symbol: 'MOT',
- decimals: 18,
- },
- {
- address: '0xffe02ee4c69edf1b340fcad64fbd6b37a7b9e265',
- name: 'NANJCOIN',
- symbol: 'NANJ',
- decimals: 8,
- },
- {
- address: '0xc15a399c4ea7815fe36857c9e290ee452a5d6b21',
- name: 'BoatPilot Token',
- symbol: 'NAVI',
- decimals: 18,
- },
- {
- address: '0x9e46a38f5daabe8683e10793b06749eef7d733d1',
- name: 'PolySwarm Nectar',
- symbol: 'NCT',
- decimals: 18,
- },
- {
- address: '0xa54ddc7b3cce7fc8b1e3fa0256d0db80d2c10970',
- name: 'NEVERDIE Coin',
- symbol: 'NDC',
- decimals: 18,
- },
- {
- address: '0xb62132e35a6c13ee1ee0f84dc5d40bad8d815206',
- name: 'Nexo',
- symbol: 'NEXO',
- decimals: 18,
- },
- {
- address: '0x0235fe624e044a05eed7a43e16e3083bc8a4287a',
- name: 'Original Crypto Coin',
- symbol: 'OCC',
- decimals: 18,
- },
- {
- address: '0xb5dbc6d3cf380079df3b27135664b6bcf45d1869',
- name: 'Omix',
- symbol: 'OMX',
- decimals: 8,
- },
- {
- address: '0xfedae5642668f8636a11987ff386bfd215f942ee',
- name: 'PolicyPal Network Token',
- symbol: 'PAL',
- decimals: 18,
- },
- {
- address: '0x2604fa406be957e542beb89e6754fcde6815e83f',
- name: 'Playkey Token',
- symbol: 'PKT',
- decimals: 18,
- },
- {
- address: '0xe477292f1b3268687a29376116b0ed27a9c76170',
- name: 'Herocoin',
- symbol: 'PLAY',
- decimals: 18,
- },
- {
- address: '0x1985365e9f78359a9b6ad760e32412f4a445e862',
- name: 'Augur',
- symbol: 'REP',
- decimals: 18,
- },
- {
- address: '0x408e41876cccdc0f92210600ef50372656052a38',
- name: 'Republic Protocol',
- symbol: 'REN',
- decimals: 18,
- },
- {
- address: '0xd0929d411954c47438dc1d871dd6081f5c5e149c',
- name: 'Refereum',
- symbol: 'RFR',
- decimals: 4,
- },
- {
- address: '0x3d1ba9be9f66b8ee101911bc36d3fb562eac2244',
- name: 'Rivetz',
- symbol: 'RVT',
- decimals: 18,
- },
- {
- address: '0x6888a16ea9792c15a4dcf2f6c623d055c8ede792',
- name: 'Spectiv Signal Token',
- symbol: 'SIG',
- decimals: 18,
- },
- {
- address: '0x20f7a3ddf244dc9299975b4da1c39f8d5d75f05a',
- name: 'Sapien Network Token',
- symbol: 'SPN',
- decimals: 6,
- },
- {
- address: '0xbbff862d906e348e9946bfb2132ecb157da3d4b4',
- name: 'Sharder',
- symbol: 'SS',
- decimals: 18,
- },
- {
- address: '0x12b306fa98f4cbb8d4457fdff3a0a0a56f07ccdf',
- name: 'Spectre.ai D-Token',
- symbol: 'SXDT',
- decimals: 18,
- },
- {
- address: '0xff3519eeeea3e76f1f699ccce5e23ee0bdda41ac',
- name: 'Blockchain Capital',
- symbol: 'BCAP',
- decimals: 0,
- },
- {
- address: '0xced1a8529125d1bd06b54a7b01210df357d00885',
- name: 'Too Real Badge',
- symbol: 'TRL',
- decimals: 0,
- },
- {
- address: '0xc86d054809623432210c107af2e3f619dcfbf652',
- name: 'SENTINEL PROTOCOL',
- symbol: 'UPP',
- decimals: 18,
- },
- {
- address: '0x27f610bf36eca0939093343ac28b1534a721dbb4',
- name: 'Wand Token',
- symbol: 'WAND',
- decimals: 18,
- },
- {
- address: '0x056017c55ae7ae32d12aef7c679df83a85ca75ff',
- name: 'WyvernToken',
- symbol: 'WYV',
- decimals: 18,
- },
- {
- address: '0x5ca9a71b1d01849c0a95490cc00559717fcf0d1d',
- name: 'Aeternity',
- symbol: 'AE',
- decimals: 18,
- },
- {
- address: '0xbc86727e770de68b1060c91f6bb6945c73e10388',
- name: 'Ink Protocol',
- symbol: 'XNK',
- decimals: 18,
- },
- {
- address: '0x0f513ffb4926ff82d7f60a05069047aca295c413',
- name: 'CrowdstartCoin',
- symbol: 'XSC',
- decimals: 18,
- },
- {
- address: '0xb9e7f8568e08d5659f5d29c4997173d84cdf2607',
- name: 'Swarm City Token',
- symbol: 'SWT',
- decimals: 18,
- },
- {
- address: '0x6531f133e6deebe7f2dce5a0441aa7ef330b4e53',
- name: 'Chronobank TIME',
- symbol: 'TIME',
- decimals: 8,
- },
- {
- address: '0xf230b790e05390fc8295f4d3f60332c93bed42e2',
- name: 'Tronix',
- symbol: 'TRX',
- decimals: 6,
- },
- {
- address: '0x5c543e7ae0a1104f78406c340e9c64fd9fce5170',
- name: 'vSlice',
- symbol: 'VSL',
- decimals: 0,
- },
- {
- address: '0x4df812f6064def1e5e029f1ca858777cc98d2d81',
- name: 'Xaurum',
- symbol: 'XAUR',
- decimals: 8,
- },
- ],
- '42': [
- {
- address: '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570',
- name: '0x Protocol Token',
- symbol: 'ZRX',
- decimals: 18,
- },
- {
- address: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
- name: 'Melon Token',
- symbol: 'MLN',
- decimals: 18,
- },
- {
- address: '0x1dad4783cf3fe3085c1426157ab175a6119a04ba',
- name: 'Maker DAO',
- symbol: 'MKR',
- decimals: 18,
- },
- {
- address: '0xeee3870657e4716670f185df08652dd848fe8f7e',
- name: 'Digix DAO Token',
- symbol: 'DGD',
- decimals: 18,
- },
- {
- address: '0xb18845c260f680d5b9d84649638813e342e4f8c9',
- name: 'Augur Reputation Token',
- symbol: 'REP',
- decimals: 18,
- },
- {
- address: '0xef7fff64389b814a946f3e92105513705ca6b990',
- name: 'Golem Network Token',
- symbol: 'GNT',
- decimals: 18,
- },
- {
- address: '0xd0a1e359811322d97991e03f863a0c30c2cf029c',
- name: 'Wrapped Ether',
- symbol: 'WETH',
- decimals: 18,
- },
- ],
- '3': [
- {
- address: '0xdf18648f5b4357d6cc1e27f7699af4f77ff44558',
- name: 'token0',
- symbol: 'TKN0',
- decimals: 0,
- },
- {
- address: '0xd7cdcde4302a60c4d74a11eee21fbf455f476021',
- name: 'token1',
- symbol: 'TKN1',
- decimals: 1,
- },
- {
- address: '0xf080f68c2113d40ff6a8528863f431908680900a',
- name: 'token2',
- symbol: 'TKN2',
- decimals: 2,
- },
- {
- address: '0xe982b5c62434c98e27d15fed40447dda6b75c4eb',
- name: 'token3',
- symbol: 'TKN3',
- decimals: 3,
- },
- {
- address: '0x2427d136751c1ca70480d3b2091261d639090a50',
- name: 'token4',
- symbol: 'TKN4',
- decimals: 4,
- },
- {
- address: '0x7d3eca8ec55bb32bd0056edb9485b07a53d3fbfd',
- name: 'token5',
- symbol: 'TKN5',
- decimals: 5,
- },
- {
- address: '0xff3c22e0a9014e9b4b1cf7a54bf39ab3107f6123',
- name: 'token6',
- symbol: 'TKN6',
- decimals: 6,
- },
- {
- address: '0xdec283d9e188397c841ab59d9d9160fd47bc56f8',
- name: 'token7',
- symbol: 'TKN7',
- decimals: 7,
- },
- {
- address: '0xedf5fd2f60d8fefbfa8011f2769b39657c54c3fd',
- name: 'token8',
- symbol: 'TKN8',
- decimals: 8,
- },
- {
- address: '0xcd59fe7fa1a1a0ff536966a599b631d9cd5f2914',
- name: 'token9',
- symbol: 'TKN9',
- decimals: 9,
- },
- {
- address: '0xaece1ee1813d56a5897f19ad50164565203b459f',
- name: 'token10',
- symbol: 'TKN10',
- decimals: 10,
- },
- {
- address: '0xaab3f0619e529b1f1823be291daa7fcd38a15927',
- name: 'token11',
- symbol: 'TKN11',
- decimals: 11,
- },
- {
- address: '0x2c46ad0b19cb1c1f3e51ae90d80654a227b08d30',
- name: 'token12',
- symbol: 'TKN12',
- decimals: 12,
- },
- {
- address: '0x68977f3286a503f2b3930506f1b3a17dafbd9524',
- name: 'token13',
- symbol: 'TKN13',
- decimals: 13,
- },
- {
- address: '0xe5c400b9ee56b823c6193a662041389624609db6',
- name: 'token14',
- symbol: 'TKN14',
- decimals: 14,
- },
- {
- address: '0xf16ea9b23ddbeb6b16d253edf6b595da4009bb8b',
- name: 'token16',
- symbol: 'TKN16',
- decimals: 16,
- },
- {
- address: '0x739a83860971e900c4bbbb92be6cfb9d459ef94a',
- name: 'token15',
- symbol: 'TKN15',
- decimals: 15,
- },
- {
- address: '0x5eba21470cf683fe91b594afe7106039e38f3312',
- name: 'token17',
- symbol: 'TKN17',
- decimals: 17,
- },
- {
- address: '0xc0ddd5df448907bb3f50350f3fe7a1da3fb2a2ee',
- name: 'token18',
- symbol: 'TKN18',
- decimals: 18,
- },
- {
- address: '0x30fa25e53f8031014166fbd5e4bbeac0cd25df74',
- name: 'token19',
- symbol: 'TKN19',
- decimals: 19,
- },
- {
- address: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d',
- name: '0x Protocol Token',
- symbol: 'ZRX',
- decimals: 18,
- },
- {
- address: '0xc778417e063141139fce010982780140aa0cd5ab',
- name: 'Ether Token',
- symbol: 'WETH',
- decimals: 18,
- },
- {
- address: '0x14823db576c11e4a54ca9e01ca0b28b18d3d1187',
- name: 'b0x Protocol Token',
- symbol: 'B0X',
- decimals: 18,
- },
- ],
-}; // tslint:disable:max-file-line-count
diff --git a/packages/website/ts/utils/fetch_utils.ts b/packages/website/ts/utils/fetch_utils.ts
deleted file mode 100644
index 9afc5904d..000000000
--- a/packages/website/ts/utils/fetch_utils.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { fetchAsync, logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-import * as queryString from 'query-string';
-
-import { errorReporter } from 'ts/utils/error_reporter';
-
-const logErrorIfPresent = (response: Response, requestedURL: string) => {
- if (response.status !== 200) {
- const errorText = `Error requesting url: ${requestedURL}, ${response.status}: ${response.statusText}`;
- logUtils.log(errorText);
- const error = Error(errorText);
- errorReporter.report(error);
- throw error;
- }
-};
-
-export const fetchUtils = {
- async requestAsync(baseUrl: string, path: string, queryParams?: object): Promise<any> {
- const query = queryStringFromQueryParams(queryParams);
- const url = `${baseUrl}${path}${query}`;
- const response = await fetchAsync(url);
- logErrorIfPresent(response, url);
- const result = await response.json();
- return result;
- },
- async postAsync(baseUrl: string, path: string, body: object): Promise<Response> {
- const url = `${baseUrl}${path}`;
- const response = await fetchAsync(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- },
- body: JSON.stringify(body),
- });
- logErrorIfPresent(response, url);
- return response;
- },
-};
-
-function queryStringFromQueryParams(queryParams?: object): string {
- // if params are undefined or empty, return an empty string
- if (_.isUndefined(queryParams) || _.isEmpty(queryParams)) {
- return '';
- }
- // stringify the formatted object
- const stringifiedParams = queryString.stringify(queryParams);
- return `?${stringifiedParams}`;
-}
diff --git a/packages/website/ts/utils/mui_theme.ts b/packages/website/ts/utils/mui_theme.ts
deleted file mode 100644
index 3f32254de..000000000
--- a/packages/website/ts/utils/mui_theme.ts
+++ /dev/null
@@ -1,32 +0,0 @@
-import { colors } from '@0x/react-shared';
-import { getMuiTheme } from 'material-ui/styles';
-
-export const muiTheme = getMuiTheme({
- appBar: {
- height: 45,
- color: colors.white,
- textColor: colors.black,
- },
- palette: {
- accent1Color: colors.lightBlueA700,
- pickerHeaderColor: colors.mediumBlue,
- primary1Color: colors.mediumBlue,
- primary2Color: colors.mediumBlue,
- textColor: colors.grey700,
- },
- datePicker: {
- color: colors.grey700,
- textColor: colors.white,
- calendarTextColor: colors.grey,
- selectColor: colors.darkestGrey,
- selectTextColor: colors.white,
- },
- timePicker: {
- color: colors.grey700,
- textColor: colors.white,
- accentColor: colors.white,
- headerColor: colors.darkestGrey,
- selectColor: colors.darkestGrey,
- selectTextColor: colors.darkestGrey,
- },
-});
diff --git a/packages/website/ts/utils/order_parser.ts b/packages/website/ts/utils/order_parser.ts
deleted file mode 100644
index 8938fbc53..000000000
--- a/packages/website/ts/utils/order_parser.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-import { orderParsingUtils } from '@0x/order-utils';
-import { logUtils } from '@0x/utils';
-import * as _ from 'lodash';
-
-import { portalOrderSchema } from 'ts/schemas/portal_order_schema';
-import { validator } from 'ts/schemas/validator';
-import { PortalOrder } from 'ts/types';
-
-export const orderParser = {
- parseQueryString(queryString: string): PortalOrder | undefined {
- if (queryString.length === 0) {
- return undefined;
- }
- const queryParams = queryString.substring(1).split('&');
- const orderQueryParam = _.find(queryParams, queryParam => {
- const queryPair = queryParam.split('=');
- return queryPair[0] === 'order';
- });
- if (_.isUndefined(orderQueryParam)) {
- return undefined;
- }
- const orderPair = orderQueryParam.split('=');
- if (orderPair.length !== 2) {
- return undefined;
- }
- const order = JSON.parse(decodeURIComponent(orderPair[1]));
- const validationResult = validator.validate(order, portalOrderSchema);
- if (validationResult.errors.length > 0) {
- logUtils.log(`Invalid shared order: ${validationResult.errors}`);
- return undefined;
- }
- const signedOrder = _.get(order, 'signedOrder');
- const convertedSignedOrder = orderParsingUtils.convertOrderStringFieldsToBigNumber(signedOrder);
- const result = {
- ...order,
- signedOrder: convertedSignedOrder,
- };
- return result;
- },
- parseJsonString(orderJson: string): PortalOrder {
- const order = JSON.parse(orderJson);
- const signedOrder = _.get(order, 'signedOrder');
- const convertedSignedOrder = orderParsingUtils.convertOrderStringFieldsToBigNumber(signedOrder);
- const result = {
- ...order,
- signedOrder: convertedSignedOrder,
- };
- return result;
- },
-};
diff --git a/packages/website/ts/utils/token_address_overrides.ts b/packages/website/ts/utils/token_address_overrides.ts
deleted file mode 100644
index 5e7275964..000000000
--- a/packages/website/ts/utils/token_address_overrides.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { ObjectMap } from '@0x/types';
-import { constants } from 'ts/utils/constants';
-
-// Map of networkId -> tokenSymbol -> tokenAddress
-export type TokenOverrides = ObjectMap<ObjectMap<string>>;
-
-export const tokenAddressOverrides: TokenOverrides = {
- [constants.NETWORK_ID_KOVAN]: {
- ZRX: '0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa',
- REP: '0x8cb3971b8eb709c14616bd556ff6683019e90d9c',
- DGD: '0xa4f468c9c692eb6b4b8b06270dae7a2cfeedcde9',
- GNT: '0x31fb614e223706f15d0d3c5f4b08bdf0d5c78623',
- MKR: '0x7b6b10caa9e8e9552ba72638ea5b47c25afea1f3',
- MLN: '0x17e394d1df6ce29d042195ea38411a98ff3ead94',
- },
- [constants.NETWORK_ID_ROPSTEN]: {
- ZRX: '0xff67881f8d12f372d91baae9752eb3631ff0ed00',
- REP: '0xb0b443fe0e8a04c4c85e8fda9c5c1ccc057d6653',
- DGD: '0xc4895a5aafa2708d6bc1294e20ec839aad156b1d',
- GNT: '0x7f8acc55a359ca4517c30510566ac35b800f7cac',
- MKR: '0x06732516acd125b6e83c127752ed5f027e1b276e',
- MLN: '0x823ebe83d39115536274a8617e00a1ff3544fd63',
- },
-};
diff --git a/packages/website/ts/utils/translate.ts b/packages/website/ts/utils/translate.ts
deleted file mode 100644
index af5c766a9..000000000
--- a/packages/website/ts/utils/translate.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import * as _ from 'lodash';
-import { Deco, Key, Language } from 'ts/types';
-
-import chinese from '../../translations/chinese.json';
-import english from '../../translations/english.json';
-import korean from '../../translations/korean.json';
-import russian from '../../translations/russian.json';
-import spanish from '../../translations/spanish.json';
-
-const languageToTranslations = {
- [Language.English]: english,
- [Language.Spanish]: spanish,
- [Language.Chinese]: chinese,
- [Language.Korean]: korean,
- [Language.Russian]: russian,
-};
-
-const languagesWithoutCaps = [Language.Chinese, Language.Korean];
-
-interface Translation {
- [key: string]: string;
-}
-
-export class Translate {
- private _selectedLanguage: Language;
- private _translation: Translation;
- constructor(desiredLanguage?: Language) {
- if (!_.isUndefined(desiredLanguage)) {
- this.setLanguage(desiredLanguage);
- return;
- }
- const browserLanguage = (window.navigator as any).userLanguage || window.navigator.language || 'en-US';
- let language = Language.English;
- if (_.includes(browserLanguage, 'es-')) {
- language = Language.Spanish;
- } else if (_.includes(browserLanguage, 'zh-')) {
- language = Language.Chinese;
- } else if (_.includes(browserLanguage, 'ko-')) {
- language = Language.Korean;
- } else if (_.includes(browserLanguage, 'ru-')) {
- language = Language.Russian;
- }
- this.setLanguage(language);
- }
- public getLanguage(): Language {
- return this._selectedLanguage;
- }
- public setLanguage(language: Language): void {
- const isLanguageSupported = !_.isUndefined(languageToTranslations[language]);
- if (!isLanguageSupported) {
- throw new Error(`${language} not supported`);
- }
- this._selectedLanguage = language;
- this._translation = languageToTranslations[language];
- }
- public get(key: Key, decoration?: Deco): string {
- let text = this._translation[key];
- // if a translation does not exist for a certain language, fallback to english
- // if it still doesn't exist in english, throw an error
- if (_.isUndefined(text)) {
- const englishTranslation: Translation = languageToTranslations[Language.English];
- const englishText = englishTranslation[key];
- if (!_.isUndefined(englishText)) {
- text = englishText;
- } else {
- throw new Error(
- `Translation key not available in ${this._selectedLanguage} or ${Language.English}: ${key}`,
- );
- }
- }
- if (!_.isUndefined(decoration) && !_.includes(languagesWithoutCaps, this._selectedLanguage)) {
- switch (decoration) {
- case Deco.Cap:
- text = this._capitalize(text);
- break;
-
- case Deco.Upper:
- text = text.toUpperCase();
- break;
-
- case Deco.CapWords:
- const words = text.split(' ');
- const capitalizedWords = _.map(words, (w: string, i: number) => {
- if (w.length === 1) {
- return w;
- }
- return this._capitalize(w);
- });
- text = capitalizedWords.join(' ');
- break;
-
- default:
- throw new Error(`Unrecognized decoration: ${decoration}`);
- }
- }
- return text;
- }
- private _capitalize(text: string): string {
- return `${text.charAt(0).toUpperCase()}${text.slice(1)}`;
- }
-}
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
deleted file mode 100644
index e84f9d0cc..000000000
--- a/packages/website/ts/utils/utils.ts
+++ /dev/null
@@ -1,483 +0,0 @@
-import { ContractWrappersError } from '@0x/contract-wrappers';
-import { assetDataUtils, OrderError } from '@0x/order-utils';
-import { constants as sharedConstants, Networks } from '@0x/react-shared';
-import { ExchangeContractErrs } from '@0x/types';
-import { BigNumber } from '@0x/utils';
-import { Web3Wrapper } from '@0x/web3-wrapper';
-import * as bowser from 'bowser';
-import deepEqual from 'deep-equal';
-import * as _ from 'lodash';
-import * as moment from 'moment';
-import * as numeral from 'numeral';
-
-import { Provider } from 'ethereum-types';
-import {
- AccountState,
- BlockchainCallErrs,
- BrowserType,
- Environments,
- OperatingSystemType,
- PortalOrder,
- Providers,
- ProviderType,
- ScreenWidths,
- Side,
- SideToAssetToken,
- Token,
- TokenByAddress,
- TokenState,
-} from 'ts/types';
-import { configs } from 'ts/utils/configs';
-import { constants } from 'ts/utils/constants';
-import * as u2f from 'ts/vendor/u2f_api';
-
-export const utils = {
- assert(condition: boolean, message: string): void {
- if (!condition) {
- throw new Error(message);
- }
- },
- isNumeric(n: string): boolean {
- return !isNaN(parseFloat(n)) && isFinite(Number(n));
- },
- // This default unix timestamp is used for orders where the user does not specify an expiry date.
- // It is a fixed constant so that both the redux store's INITIAL_STATE and components can check for
- // whether a user has set an expiry date or not. It is set unrealistically high so as not to collide
- // with actual values a user would select.
- initialOrderExpiryUnixTimestampSec(): BigNumber {
- const m = moment('2050-01-01');
- return new BigNumber(m.unix());
- },
- convertToUnixTimestampSeconds(date: moment.Moment, time?: moment.Moment): BigNumber {
- const finalMoment = date;
- if (!_.isUndefined(time)) {
- finalMoment.hours(time.hours());
- finalMoment.minutes(time.minutes());
- }
- return new BigNumber(finalMoment.unix());
- },
- convertToMomentFromUnixTimestamp(unixTimestampSec: BigNumber): moment.Moment {
- return moment.unix(unixTimestampSec.toNumber());
- },
- convertToReadableDateTimeFromUnixTimestamp(unixTimestampSec: BigNumber): string {
- const m = utils.convertToMomentFromUnixTimestamp(unixTimestampSec);
- const formattedDate: string = m.format('h:MMa MMMM D YYYY');
- return formattedDate;
- },
- generateOrder(
- exchangeAddress: string,
- sideToAssetToken: SideToAssetToken,
- expirationTimeSeconds: BigNumber,
- orderTakerAddress: string,
- orderMakerAddress: string,
- makerFee: BigNumber,
- takerFee: BigNumber,
- feeRecipientAddress: string,
- signature: string,
- tokenByAddress: TokenByAddress,
- orderSalt: BigNumber,
- ): PortalOrder {
- const makerToken = tokenByAddress[sideToAssetToken[Side.Deposit].address];
- const takerToken = tokenByAddress[sideToAssetToken[Side.Receive].address];
- const order = {
- signedOrder: {
- senderAddress: constants.NULL_ADDRESS,
- makerAddress: orderMakerAddress,
- takerAddress: orderTakerAddress,
- makerFee,
- takerFee,
- makerAssetAmount: sideToAssetToken[Side.Deposit].amount,
- takerAssetAmount: sideToAssetToken[Side.Receive].amount,
- makerAssetData: assetDataUtils.encodeERC20AssetData(makerToken.address),
- takerAssetData: assetDataUtils.encodeERC20AssetData(takerToken.address),
- expirationTimeSeconds,
- feeRecipientAddress,
- salt: orderSalt,
- signature,
- exchangeAddress,
- },
- metadata: {
- makerToken: {
- name: makerToken.name,
- symbol: makerToken.symbol,
- decimals: makerToken.decimals,
- },
- takerToken: {
- name: takerToken.name,
- symbol: takerToken.symbol,
- decimals: takerToken.decimals,
- },
- },
- };
- return order;
- },
- async sleepAsync(ms: number): Promise<NodeJS.Timer> {
- return new Promise<NodeJS.Timer>(resolve => setTimeout(resolve, ms));
- },
- deepEqual(actual: any, expected: any, opts?: { strict: boolean }): boolean {
- return deepEqual(actual, expected, opts);
- },
- getColSize(items: number): number {
- const bassCssGridSize = 12; // Source: http://basscss.com/#basscss-grid
- const colSize = bassCssGridSize / items;
- if (!_.isInteger(colSize)) {
- throw new Error(`Number of cols must be divisible by ${bassCssGridSize}`);
- }
- return colSize;
- },
- getScreenWidth(): ScreenWidths {
- const documentEl = document.documentElement;
- const body = document.getElementsByTagName('body')[0];
- const widthInPx = window.innerWidth || documentEl.clientWidth || body.clientWidth;
- const bodyStyles: any = window.getComputedStyle(document.querySelector('body'));
- const widthInEm = widthInPx / parseFloat(bodyStyles['font-size']);
-
- // This logic mirrors the CSS media queries in BassCSS for the `lg-`, `md-` and `sm-` CSS
- // class prefixes. Do not edit these.
- if (widthInEm > ScreenWidths.Lg) {
- return ScreenWidths.Lg;
- } else if (widthInEm > ScreenWidths.Md) {
- return ScreenWidths.Md;
- } else {
- return ScreenWidths.Sm;
- }
- },
- async isU2FSupportedAsync(): Promise<boolean> {
- const w = window as any;
- return new Promise((resolve: (isSupported: boolean) => void) => {
- if (w.u2f && !w.u2f.getApiVersion) {
- // u2f object was found (Firefox with extension)
- resolve(true);
- } else {
- // u2f object was not found. Using Google polyfill
- // HACK: u2f.getApiVersion will simply not return a version if the
- // U2F call fails for any reason. Because of this, we set a hard 3sec
- // timeout to the request on our end.
- const getApiVersionTimeoutMs = 3000;
- const intervalId = setTimeout(() => {
- resolve(false);
- }, getApiVersionTimeoutMs);
- u2f.getApiVersion((_version: number) => {
- clearTimeout(intervalId);
- resolve(true);
- });
- }
- });
- },
- // This checks the error message returned from an injected Web3 instance on the page
- // after a user was prompted to sign a message or send a transaction and decided to
- // reject the request.
- didUserDenyWeb3Request(errMsg: string): boolean {
- const metamaskDenialErrMsg = 'User denied';
- const paritySignerDenialErrMsg = 'Request has been rejected';
- const ledgerDenialErrMsg = 'Invalid status 6985';
- const isUserDeniedErrMsg =
- _.includes(errMsg, metamaskDenialErrMsg) ||
- _.includes(errMsg, paritySignerDenialErrMsg) ||
- _.includes(errMsg, ledgerDenialErrMsg);
- return isUserDeniedErrMsg;
- },
- getAddressBeginAndEnd(address: string): string {
- const truncatedAddress = `${address.substring(0, 6)}...${address.substr(-4)}`; // 0x3d5a...b287
- return truncatedAddress;
- },
- getReadableAccountState(accountState: AccountState, userAddress: string): string {
- switch (accountState) {
- case AccountState.Loading:
- return 'Loading...';
- case AccountState.Ready:
- return utils.getAddressBeginAndEnd(userAddress);
- case AccountState.Locked:
- return 'Please Unlock';
- case AccountState.Disconnected:
- return 'Connect a Wallet';
- default:
- return '';
- }
- },
- getAccountState(
- isBlockchainReady: boolean,
- providerType: ProviderType,
- injectedProviderName: string,
- userAddress?: string,
- ): AccountState {
- const isAddressAvailable = !_.isUndefined(userAddress) && !_.isEmpty(userAddress);
- const isExternallyInjectedProvider = utils.isExternallyInjected(providerType, injectedProviderName);
- if (!isBlockchainReady) {
- return AccountState.Loading;
- } else if (isAddressAvailable) {
- return AccountState.Ready;
- // tslint:disable-next-line: prefer-conditional-expression
- } else if (isExternallyInjectedProvider) {
- return AccountState.Locked;
- } else {
- return AccountState.Disconnected;
- }
- },
- hasUniqueNameAndSymbol(tokens: Token[], token: Token): boolean {
- if (token.isRegistered) {
- return true; // Since it's registered, it is the canonical token
- }
- const registeredTokens = _.filter(tokens, t => t.isRegistered);
- const tokenWithSameNameIfExists = _.find(registeredTokens, {
- name: token.name,
- });
- const isUniqueName = _.isUndefined(tokenWithSameNameIfExists);
- const tokenWithSameSymbolIfExists = _.find(registeredTokens, {
- name: token.symbol,
- });
- const isUniqueSymbol = _.isUndefined(tokenWithSameSymbolIfExists);
- return isUniqueName && isUniqueSymbol;
- },
- zeroExErrToHumanReadableErrMsg(error: ContractWrappersError | ExchangeContractErrs, takerAddress: string): string {
- const ContractWrappersErrorToHumanReadableError: { [error: string]: string } = {
- [BlockchainCallErrs.UserHasNoAssociatedAddresses]: 'User has no addresses available',
- [OrderError.InvalidSignature]: 'Order signature is not valid',
- [ContractWrappersError.ContractNotDeployedOnNetwork]: 'Contract is not deployed on the detected network',
- [ContractWrappersError.InvalidJump]: 'Invalid jump occured while executing the transaction',
- [ContractWrappersError.OutOfGas]: 'Transaction ran out of gas',
- };
- const exchangeContractErrorToHumanReadableError: {
- [error: string]: string;
- } = {
- [ExchangeContractErrs.OrderFillExpired]: 'This order has expired',
- [ExchangeContractErrs.OrderCancelExpired]: 'This order has expired',
- [ExchangeContractErrs.OrderCancelled]: 'This order has been cancelled',
- [ExchangeContractErrs.OrderFillAmountZero]: "Order fill amount can't be 0",
- [ExchangeContractErrs.OrderRemainingFillAmountZero]: 'This order has already been completely filled',
- [ExchangeContractErrs.OrderFillRoundingError]:
- 'Rounding error will occur when filling this order. Please try filling a different amount.',
- [ExchangeContractErrs.InsufficientTakerBalance]:
- 'Taker no longer has a sufficient balance to complete this order',
- [ExchangeContractErrs.InsufficientTakerAllowance]:
- 'Taker no longer has a sufficient allowance to complete this order',
- [ExchangeContractErrs.InsufficientMakerBalance]:
- 'Maker no longer has a sufficient balance to complete this order',
- [ExchangeContractErrs.InsufficientMakerAllowance]:
- 'Maker no longer has a sufficient allowance to complete this order',
- [ExchangeContractErrs.InsufficientTakerFeeBalance]: 'Taker no longer has a sufficient balance to pay fees',
- [ExchangeContractErrs.InsufficientTakerFeeAllowance]:
- 'Taker no longer has a sufficient allowance to pay fees',
- [ExchangeContractErrs.InsufficientMakerFeeBalance]: 'Maker no longer has a sufficient balance to pay fees',
- [ExchangeContractErrs.InsufficientMakerFeeAllowance]:
- 'Maker no longer has a sufficient allowance to pay fees',
- [ExchangeContractErrs.TransactionSenderIsNotFillOrderTaker]: `This order can only be filled by ${takerAddress}`,
- [ExchangeContractErrs.InsufficientRemainingFillAmount]: 'Insufficient remaining fill amount',
- };
- const humanReadableErrorMsg =
- exchangeContractErrorToHumanReadableError[error] || ContractWrappersErrorToHumanReadableError[error];
- return humanReadableErrorMsg;
- },
- isParityNode(nodeVersion: string): boolean {
- return _.includes(nodeVersion, 'Parity');
- },
- isTestRpc(nodeVersion: string): boolean {
- return _.includes(nodeVersion, 'TestRPC');
- },
- isTestNetwork(networkId: number): boolean {
- const isTestNetwork = _.includes(
- [
- sharedConstants.NETWORK_ID_BY_NAME[Networks.Kovan],
- sharedConstants.NETWORK_ID_BY_NAME[Networks.Rinkeby],
- sharedConstants.NETWORK_ID_BY_NAME[Networks.Ropsten],
- ],
- networkId,
- );
- return isTestNetwork;
- },
- getCurrentBaseUrl(): string {
- const port = window.location.port;
- const hasPort = !_.isUndefined(port);
- const baseUrl = `https://${window.location.hostname}${hasPort ? `:${port}` : ''}`;
- return baseUrl;
- },
- onPageLoadPromise: new Promise<void>((resolve, _reject) => {
- if (document.readyState === 'complete') {
- resolve();
- return;
- }
- window.onload = () => resolve();
- }),
- getProviderType(provider: Provider): Providers | string {
- const constructorName = provider.constructor.name;
- let parsedProviderName = constructorName;
- // https://ethereum.stackexchange.com/questions/24266/elegant-way-to-detect-current-provider-int-web3-js
- switch (constructorName) {
- case 'EthereumProvider':
- parsedProviderName = Providers.Mist;
- break;
-
- default:
- parsedProviderName = constructorName;
- break;
- }
- if ((provider as any).isParity) {
- parsedProviderName = Providers.Parity;
- } else if ((provider as any).isMetaMask) {
- parsedProviderName = Providers.Metamask;
- } else if (!_.isUndefined(_.get(window, 'SOFA'))) {
- parsedProviderName = Providers.CoinbaseWallet;
- } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) {
- parsedProviderName = Providers.Cipher;
- }
- return parsedProviderName;
- },
- getBackendBaseUrl(): string {
- return utils.isDogfood() ? configs.BACKEND_BASE_STAGING_URL : configs.BACKEND_BASE_PROD_URL;
- },
- isDevelopment(): boolean {
- return _.includes(configs.DOMAINS_DEVELOPMENT, window.location.host);
- },
- isStaging(): boolean {
- return _.includes(window.location.href, configs.DOMAIN_STAGING);
- },
- isExternallyInjected(providerType: ProviderType, injectedProviderName: string): boolean {
- return providerType === ProviderType.Injected && injectedProviderName !== constants.PROVIDER_NAME_PUBLIC;
- },
- isDogfood(): boolean {
- return _.includes(window.location.href, configs.DOMAIN_DOGFOOD);
- },
- isProduction(): boolean {
- return _.includes(window.location.href, configs.DOMAIN_PRODUCTION);
- },
- getEnvironment(): Environments {
- if (utils.isDogfood()) {
- return Environments.Dogfood;
- }
- if (utils.isDevelopment()) {
- return Environments.Development;
- }
- if (utils.isStaging()) {
- return Environments.Staging;
- }
- if (utils.isProduction()) {
- return Environments.Production;
- }
- return Environments.Unknown;
- },
- getEthToken(tokenByAddress: TokenByAddress): Token {
- return utils.getTokenBySymbol(constants.ETHER_TOKEN_SYMBOL, tokenByAddress);
- },
- getZrxToken(tokenByAddress: TokenByAddress): Token {
- return utils.getTokenBySymbol(constants.ZRX_TOKEN_SYMBOL, tokenByAddress);
- },
- getTokenBySymbol(symbol: string, tokenByAddress: TokenByAddress): Token {
- const tokens = _.values(tokenByAddress);
- const token = _.find(tokens, { symbol });
- return token;
- },
- getTrackedTokens(tokenByAddress: TokenByAddress): Token[] {
- const allTokens = _.values(tokenByAddress);
- const trackedTokens = _.filter(allTokens, t => utils.isTokenTracked(t));
- return trackedTokens;
- },
- getFormattedAmountFromToken(token: Token, tokenState: TokenState): string {
- return utils.getFormattedAmount(tokenState.balance, token.decimals);
- },
- format(value: BigNumber, format: string): string {
- const formattedAmount = numeral(value).format(format);
- if (_.isNaN(formattedAmount)) {
- // https://github.com/adamwdraper/Numeral-js/issues/596
- return numeral(new BigNumber(0)).format(format);
- }
- return formattedAmount;
- },
- getFormattedAmount(amount: BigNumber, decimals: number): string {
- const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- // if the unit amount is less than 1, show the natural number of decimal places with a max of 4
- // if the unit amount is greater than or equal to 1, show only 2 decimal places
- const lessThanOnePrecision = Math.min(constants.TOKEN_AMOUNT_DISPLAY_PRECISION, unitAmount.decimalPlaces());
- const greaterThanOnePrecision = 2;
- const precision = unitAmount.lt(1) ? lessThanOnePrecision : greaterThanOnePrecision;
- const format = `0,0.${_.repeat('0', precision)}`;
- return utils.format(unitAmount, format);
- },
- getUsdValueFormattedAmount(amount: BigNumber, decimals: number, price: BigNumber): string {
- const unitAmount = Web3Wrapper.toUnitAmount(amount, decimals);
- const value = unitAmount.multipliedBy(price);
- return utils.format(value, constants.NUMERAL_USD_FORMAT);
- },
- openUrl(url: string): void {
- window.open(url, '_blank');
- },
- isMobileWidth(screenWidth: ScreenWidths): boolean {
- return screenWidth === ScreenWidths.Sm;
- },
- isMobileOperatingSystem(): boolean {
- return bowser.mobile;
- },
- getBrowserType(): BrowserType {
- if (bowser.chrome) {
- return BrowserType.Chrome;
- } else if (bowser.firefox) {
- return BrowserType.Firefox;
- } else if (bowser.opera) {
- return BrowserType.Opera;
- } else if (bowser.msedge) {
- return BrowserType.Edge;
- } else if (bowser.safari) {
- return BrowserType.Safari;
- } else {
- return BrowserType.Other;
- }
- },
- getOperatingSystem(): OperatingSystemType {
- if (bowser.android) {
- return OperatingSystemType.Android;
- } else if (bowser.ios) {
- return OperatingSystemType.iOS;
- } else if (bowser.mac) {
- return OperatingSystemType.Mac;
- } else if (bowser.windows) {
- return OperatingSystemType.Windows;
- } else if (bowser.windowsphone) {
- return OperatingSystemType.WindowsPhone;
- } else if (bowser.linux) {
- return OperatingSystemType.Linux;
- } else {
- return OperatingSystemType.Other;
- }
- },
- isTokenTracked(token: Token): boolean {
- return !_.isUndefined(token.trackedTimestamp);
- },
- // Returns a [downloadLink, isOnMobile] tuple.
- getBestWalletDownloadLinkAndIsMobile(): [string, boolean] {
- const browserType = utils.getBrowserType();
- const isOnMobile = utils.isMobileOperatingSystem();
- const operatingSystem = utils.getOperatingSystem();
- let downloadLink;
- if (isOnMobile) {
- switch (operatingSystem) {
- case OperatingSystemType.Android:
- downloadLink = constants.URL_COINBASE_WALLET_ANDROID_APP_STORE;
- break;
- case OperatingSystemType.iOS:
- downloadLink = constants.URL_COINBASE_WALLET_IOS_APP_STORE;
- break;
- default:
- // Coinbase wallet is only supported on these mobile OSes - just default to iOS
- downloadLink = constants.URL_COINBASE_WALLET_IOS_APP_STORE;
- }
- } else {
- switch (browserType) {
- case BrowserType.Chrome:
- downloadLink = constants.URL_METAMASK_CHROME_STORE;
- break;
- case BrowserType.Firefox:
- downloadLink = constants.URL_METAMASK_FIREFOX_STORE;
- break;
- case BrowserType.Opera:
- downloadLink = constants.URL_METAMASK_OPERA_STORE;
- break;
- default:
- downloadLink = constants.URL_METAMASK_HOMEPAGE;
- }
- }
- return [downloadLink, isOnMobile];
- },
- getTokenIconUrl(symbol: string): string {
- const result = `/images/token_icons/${symbol}.png`;
- return result;
- },
-};
diff --git a/packages/website/ts/vendor/u2f_api.js b/packages/website/ts/vendor/u2f_api.js
deleted file mode 100644
index 3b538d817..000000000
--- a/packages/website/ts/vendor/u2f_api.js
+++ /dev/null
@@ -1,760 +0,0 @@
-//Copyright 2014-2015 Google Inc. All rights reserved.
-
-//Use of this source code is governed by a BSD-style
-//license that can be found in the LICENSE file or at
-//https://developers.google.com/open-source/licenses/bsd
-
-/**
- * @fileoverview The U2F api.
- */
-'use strict';
-
-
-/**
- * Namespace for the U2F api.
- * @type {Object}
- */
-var u2f = u2f || {};
-
-/**
- * Require integration
- */
-if (typeof module != "undefined") {
- module.exports = u2f;
-}
-
-/**
- * FIDO U2F Javascript API Version
- * @number
- */
-var js_api_version;
-
-/**
- * The U2F extension id
- * @const {string}
- */
-// The Chrome packaged app extension ID.
-// Uncomment this if you want to deploy a server instance that uses
-// the package Chrome app and does not require installing the U2F Chrome extension.
- u2f.EXTENSION_ID = 'kmendfapggjehodndflmmgagdbamhnfd';
-// The U2F Chrome extension ID.
-// Uncomment this if you want to deploy a server instance that uses
-// the U2F Chrome extension to authenticate.
-// u2f.EXTENSION_ID = 'pfboblefjcgdjicmnffhdgionmgcdmne';
-
-
-/**
- * Message types for messsages to/from the extension
- * @const
- * @enum {string}
- */
-u2f.MessageTypes = {
- 'U2F_REGISTER_REQUEST': 'u2f_register_request',
- 'U2F_REGISTER_RESPONSE': 'u2f_register_response',
- 'U2F_SIGN_REQUEST': 'u2f_sign_request',
- 'U2F_SIGN_RESPONSE': 'u2f_sign_response',
- 'U2F_GET_API_VERSION_REQUEST': 'u2f_get_api_version_request',
- 'U2F_GET_API_VERSION_RESPONSE': 'u2f_get_api_version_response'
-};
-
-
-/**
- * Response status codes
- * @const
- * @enum {number}
- */
-u2f.ErrorCodes = {
- 'OK': 0,
- 'OTHER_ERROR': 1,
- 'BAD_REQUEST': 2,
- 'CONFIGURATION_UNSUPPORTED': 3,
- 'DEVICE_INELIGIBLE': 4,
- 'TIMEOUT': 5
-};
-
-
-/**
- * A message for registration requests
- * @typedef {{
- * type: u2f.MessageTypes,
- * appId: ?string,
- * timeoutSeconds: ?number,
- * requestId: ?number
- * }}
- */
-u2f.U2fRequest;
-
-
-/**
- * A message for registration responses
- * @typedef {{
- * type: u2f.MessageTypes,
- * responseData: (u2f.Error | u2f.RegisterResponse | u2f.SignResponse),
- * requestId: ?number
- * }}
- */
-u2f.U2fResponse;
-
-
-/**
- * An error object for responses
- * @typedef {{
- * errorCode: u2f.ErrorCodes,
- * errorMessage: ?string
- * }}
- */
-u2f.Error;
-
-/**
- * Data object for a single sign request.
- * @typedef {enum {BLUETOOTH_RADIO, BLUETOOTH_LOW_ENERGY, USB, NFC}}
- */
-u2f.Transport;
-
-
-/**
- * Data object for a single sign request.
- * @typedef {Array<u2f.Transport>}
- */
-u2f.Transports;
-
-/**
- * Data object for a single sign request.
- * @typedef {{
- * version: string,
- * challenge: string,
- * keyHandle: string,
- * appId: string
- * }}
- */
-u2f.SignRequest;
-
-
-/**
- * Data object for a sign response.
- * @typedef {{
- * keyHandle: string,
- * signatureData: string,
- * clientData: string
- * }}
- */
-u2f.SignResponse;
-
-
-/**
- * Data object for a registration request.
- * @typedef {{
- * version: string,
- * challenge: string
- * }}
- */
-u2f.RegisterRequest;
-
-
-/**
- * Data object for a registration response.
- * @typedef {{
- * version: string,
- * keyHandle: string,
- * transports: Transports,
- * appId: string
- * }}
- */
-u2f.RegisterResponse;
-
-
-/**
- * Data object for a registered key.
- * @typedef {{
- * version: string,
- * keyHandle: string,
- * transports: ?Transports,
- * appId: ?string
- * }}
- */
-u2f.RegisteredKey;
-
-
-/**
- * Data object for a get API register response.
- * @typedef {{
- * js_api_version: number
- * }}
- */
-u2f.GetJsApiVersionResponse;
-
-
-//Low level MessagePort API support
-
-/**
- * Sets up a MessagePort to the U2F extension using the
- * available mechanisms.
- * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
- */
-u2f.getMessagePort = function(callback) {
- if (typeof chrome != 'undefined' && chrome.runtime) {
- // The actual message here does not matter, but we need to get a reply
- // for the callback to run. Thus, send an empty signature request
- // in order to get a failure response.
- var msg = {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- signRequests: []
- };
- chrome.runtime.sendMessage(u2f.EXTENSION_ID, msg, function() {
- if (!chrome.runtime.lastError) {
- // We are on a whitelisted origin and can talk directly
- // with the extension.
- u2f.getChromeRuntimePort_(callback);
- } else {
- // chrome.runtime was available, but we couldn't message
- // the extension directly, use iframe
- u2f.getIframePort_(callback);
- }
- });
- } else if (u2f.isAndroidChrome_()) {
- u2f.getAuthenticatorPort_(callback);
- } else if (u2f.isIosChrome_()) {
- u2f.getIosPort_(callback);
- } else {
- // chrome.runtime was not available at all, which is normal
- // when this origin doesn't have access to any extensions.
- u2f.getIframePort_(callback);
- }
-};
-
-/**
- * Detect chrome running on android based on the browser's useragent.
- * @private
- */
-u2f.isAndroidChrome_ = function() {
- var userAgent = navigator.userAgent;
- return userAgent.indexOf('Chrome') != -1 &&
- userAgent.indexOf('Android') != -1;
-};
-
-/**
- * Detect chrome running on iOS based on the browser's platform.
- * @private
- */
-u2f.isIosChrome_ = function() {
- return ["iPhone", "iPad", "iPod"].indexOf(navigator.platform) > -1;
-};
-
-/**
- * Connects directly to the extension via chrome.runtime.connect.
- * @param {function(u2f.WrappedChromeRuntimePort_)} callback
- * @private
- */
-u2f.getChromeRuntimePort_ = function(callback) {
- var port = chrome.runtime.connect(u2f.EXTENSION_ID,
- {'includeTlsChannelId': true});
- setTimeout(function() {
- callback(new u2f.WrappedChromeRuntimePort_(port));
- }, 0);
-};
-
-/**
- * Return a 'port' abstraction to the Authenticator app.
- * @param {function(u2f.WrappedAuthenticatorPort_)} callback
- * @private
- */
-u2f.getAuthenticatorPort_ = function(callback) {
- setTimeout(function() {
- callback(new u2f.WrappedAuthenticatorPort_());
- }, 0);
-};
-
-/**
- * Return a 'port' abstraction to the iOS client app.
- * @param {function(u2f.WrappedIosPort_)} callback
- * @private
- */
-u2f.getIosPort_ = function(callback) {
- setTimeout(function() {
- callback(new u2f.WrappedIosPort_());
- }, 0);
-};
-
-/**
- * A wrapper for chrome.runtime.Port that is compatible with MessagePort.
- * @param {Port} port
- * @constructor
- * @private
- */
-u2f.WrappedChromeRuntimePort_ = function(port) {
- this.port_ = port;
-};
-
-/**
- * Format and return a sign request compliant with the JS API version supported by the extension.
- * @param {Array<u2f.SignRequest>} signRequests
- * @param {number} timeoutSeconds
- * @param {number} reqId
- * @return {Object}
- */
-u2f.formatSignRequest_ =
- function(appId, challenge, registeredKeys, timeoutSeconds, reqId) {
- if (js_api_version === undefined || js_api_version < 1.1) {
- // Adapt request to the 1.0 JS API
- var signRequests = [];
- for (var i = 0; i < registeredKeys.length; i++) {
- signRequests[i] = {
- version: registeredKeys[i].version,
- challenge: challenge,
- keyHandle: registeredKeys[i].keyHandle,
- appId: appId
- };
- }
- return {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- signRequests: signRequests,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- }
- // JS 1.1 API
- return {
- type: u2f.MessageTypes.U2F_SIGN_REQUEST,
- appId: appId,
- challenge: challenge,
- registeredKeys: registeredKeys,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
-};
-
-/**
- * Format and return a register request compliant with the JS API version supported by the extension..
- * @param {Array<u2f.SignRequest>} signRequests
- * @param {Array<u2f.RegisterRequest>} signRequests
- * @param {number} timeoutSeconds
- * @param {number} reqId
- * @return {Object}
- */
-u2f.formatRegisterRequest_ =
- function(appId, registeredKeys, registerRequests, timeoutSeconds, reqId) {
- if (js_api_version === undefined || js_api_version < 1.1) {
- // Adapt request to the 1.0 JS API
- for (var i = 0; i < registerRequests.length; i++) {
- registerRequests[i].appId = appId;
- }
- var signRequests = [];
- for (var i = 0; i < registeredKeys.length; i++) {
- signRequests[i] = {
- version: registeredKeys[i].version,
- challenge: registerRequests[0],
- keyHandle: registeredKeys[i].keyHandle,
- appId: appId
- };
- }
- return {
- type: u2f.MessageTypes.U2F_REGISTER_REQUEST,
- signRequests: signRequests,
- registerRequests: registerRequests,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
- }
- // JS 1.1 API
- return {
- type: u2f.MessageTypes.U2F_REGISTER_REQUEST,
- appId: appId,
- registerRequests: registerRequests,
- registeredKeys: registeredKeys,
- timeoutSeconds: timeoutSeconds,
- requestId: reqId
- };
-};
-
-
-/**
- * Posts a message on the underlying channel.
- * @param {Object} message
- */
-u2f.WrappedChromeRuntimePort_.prototype.postMessage = function(message) {
- this.port_.postMessage(message);
-};
-
-
-/**
- * Emulates the HTML 5 addEventListener interface. Works only for the
- * onmessage event, which is hooked up to the chrome.runtime.Port.onMessage.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedChromeRuntimePort_.prototype.addEventListener =
- function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name == 'message' || name == 'onmessage') {
- this.port_.onMessage.addListener(function(message) {
- // Emulate a minimal MessageEvent object
- handler({'data': message});
- });
- } else {
- console.error('WrappedChromeRuntimePort only supports onMessage');
- }
-};
-
-/**
- * Wrap the Authenticator app with a MessagePort interface.
- * @constructor
- * @private
- */
-u2f.WrappedAuthenticatorPort_ = function() {
- this.requestId_ = -1;
- this.requestObject_ = null;
-}
-
-/**
- * Launch the Authenticator intent.
- * @param {Object} message
- */
-u2f.WrappedAuthenticatorPort_.prototype.postMessage = function(message) {
- var intentUrl =
- u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_ +
- ';S.request=' + encodeURIComponent(JSON.stringify(message)) +
- ';end';
- document.location = intentUrl;
-};
-
-/**
- * Tells what type of port this is.
- * @return {String} port type
- */
-u2f.WrappedAuthenticatorPort_.prototype.getPortType = function() {
- return "WrappedAuthenticatorPort_";
-};
-
-
-/**
- * Emulates the HTML 5 addEventListener interface.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedAuthenticatorPort_.prototype.addEventListener = function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name == 'message') {
- var self = this;
- /* Register a callback to that executes when
- * chrome injects the response. */
- window.addEventListener(
- 'message', self.onRequestUpdate_.bind(self, handler), false);
- } else {
- console.error('WrappedAuthenticatorPort only supports message');
- }
-};
-
-/**
- * Callback invoked when a response is received from the Authenticator.
- * @param function({data: Object}) callback
- * @param {Object} message message Object
- */
-u2f.WrappedAuthenticatorPort_.prototype.onRequestUpdate_ =
- function(callback, message) {
- var messageObject = JSON.parse(message.data);
- var intentUrl = messageObject['intentURL'];
-
- var errorCode = messageObject['errorCode'];
- var responseObject = null;
- if (messageObject.hasOwnProperty('data')) {
- responseObject = /** @type {Object} */ (
- JSON.parse(messageObject['data']));
- }
-
- callback({'data': responseObject});
-};
-
-/**
- * Base URL for intents to Authenticator.
- * @const
- * @private
- */
-/*
-u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_ =
- 'intent:#Intent;action=com.google.android.apps.authenticator.AUTHENTICATE';
-*/
-u2f.WrappedAuthenticatorPort_.INTENT_URL_BASE_ =
- 'intent:#Intent;action=com.ledger.android.u2f.bridge.AUTHENTICATE';
-
-
-/**
- * Wrap the iOS client app with a MessagePort interface.
- * @constructor
- * @private
- */
-u2f.WrappedIosPort_ = function() {};
-
-/**
- * Launch the iOS client app request
- * @param {Object} message
- */
-u2f.WrappedIosPort_.prototype.postMessage = function(message) {
- var str = JSON.stringify(message);
- var url = "u2f://auth?" + encodeURI(str);
- location.replace(url);
-};
-
-/**
- * Tells what type of port this is.
- * @return {String} port type
- */
-u2f.WrappedIosPort_.prototype.getPortType = function() {
- return "WrappedIosPort_";
-};
-
-/**
- * Emulates the HTML 5 addEventListener interface.
- * @param {string} eventName
- * @param {function({data: Object})} handler
- */
-u2f.WrappedIosPort_.prototype.addEventListener = function(eventName, handler) {
- var name = eventName.toLowerCase();
- if (name !== 'message') {
- console.error('WrappedIosPort only supports message');
- }
-};
-
-/**
- * Sets up an embedded trampoline iframe, sourced from the extension.
- * @param {function(MessagePort)} callback
- * @private
- */
-u2f.getIframePort_ = function(callback) {
- // Create the iframe
- var iframeOrigin = 'chrome-extension://' + u2f.EXTENSION_ID;
- var iframe = document.createElement('iframe');
- iframe.src = iframeOrigin + '/u2f-comms.html';
- iframe.setAttribute('style', 'display:none');
- document.body.appendChild(iframe);
-
- var channel = new MessageChannel();
- var ready = function(message) {
- if (message.data == 'ready') {
- channel.port1.removeEventListener('message', ready);
- callback(channel.port1);
- } else {
- console.error('First event on iframe port was not "ready"');
- }
- };
- channel.port1.addEventListener('message', ready);
- channel.port1.start();
-
- iframe.addEventListener('load', function() {
- // Deliver the port to the iframe and initialize
- iframe.contentWindow.postMessage('init', iframeOrigin, [channel.port2]);
- });
-};
-
-
-//High-level JS API
-
-/**
- * Default extension response timeout in seconds.
- * @const
- */
-u2f.EXTENSION_TIMEOUT_SEC = 30;
-
-/**
- * A singleton instance for a MessagePort to the extension.
- * @type {MessagePort|u2f.WrappedChromeRuntimePort_}
- * @private
- */
-u2f.port_ = null;
-
-/**
- * Callbacks waiting for a port
- * @type {Array<function((MessagePort|u2f.WrappedChromeRuntimePort_))>}
- * @private
- */
-u2f.waitingForPort_ = [];
-
-/**
- * A counter for requestIds.
- * @type {number}
- * @private
- */
-u2f.reqCounter_ = 0;
-
-/**
- * A map from requestIds to client callbacks
- * @type {Object.<number,(function((u2f.Error|u2f.RegisterResponse))
- * |function((u2f.Error|u2f.SignResponse)))>}
- * @private
- */
-u2f.callbackMap_ = {};
-
-/**
- * Creates or retrieves the MessagePort singleton to use.
- * @param {function((MessagePort|u2f.WrappedChromeRuntimePort_))} callback
- * @private
- */
-u2f.getPortSingleton_ = function(callback) {
- if (u2f.port_) {
- callback(u2f.port_);
- } else {
- if (u2f.waitingForPort_.length == 0) {
- u2f.getMessagePort(function(port) {
- u2f.port_ = port;
- u2f.port_.addEventListener('message',
- /** @type {function(Event)} */ (u2f.responseHandler_));
-
- // Careful, here be async callbacks. Maybe.
- while (u2f.waitingForPort_.length)
- u2f.waitingForPort_.shift()(u2f.port_);
- });
- }
- u2f.waitingForPort_.push(callback);
- }
-};
-
-/**
- * Handles response messages from the extension.
- * @param {MessageEvent.<u2f.Response>} message
- * @private
- */
-u2f.responseHandler_ = function(message) {
- var response = message.data;
- var reqId = response['requestId'];
- if (!reqId || !u2f.callbackMap_[reqId]) {
- console.error('Unknown or missing requestId in response.');
- return;
- }
- var cb = u2f.callbackMap_[reqId];
- delete u2f.callbackMap_[reqId];
- cb(response['responseData']);
-};
-
-/**
- * Dispatches an array of sign requests to available U2F tokens.
- * If the JS API version supported by the extension is unknown, it first sends a
- * message to the extension to find out the supported API version and then it sends
- * the sign request.
- * @param {string=} appId
- * @param {string=} challenge
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.SignResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sign = function(appId, challenge, registeredKeys, callback, opt_timeoutSeconds) {
- if (js_api_version === undefined) {
- // Send a message to get the extension to JS API version, then send the actual sign request.
- u2f.getApiVersion(
- function (response) {
- js_api_version = response['js_api_version'] === undefined ? 0 : response['js_api_version'];
- //console.log("Extension JS API Version: ", js_api_version);
- u2f.sendSignRequest(appId, challenge, registeredKeys, callback, opt_timeoutSeconds);
- });
- } else {
- // We know the JS API version. Send the actual sign request in the supported API version.
- u2f.sendSignRequest(appId, challenge, registeredKeys, callback, opt_timeoutSeconds);
- }
-};
-
-/**
- * Dispatches an array of sign requests to available U2F tokens.
- * @param {string=} appId
- * @param {string=} challenge
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.SignResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sendSignRequest = function(appId, challenge, registeredKeys, callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var timeoutSeconds = (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC);
- var req = u2f.formatSignRequest_(appId, challenge, registeredKeys, timeoutSeconds, reqId);
- port.postMessage(req);
- });
-};
-
-/**
- * Dispatches register requests to available U2F tokens. An array of sign
- * requests identifies already registered tokens.
- * If the JS API version supported by the extension is unknown, it first sends a
- * message to the extension to find out the supported API version and then it sends
- * the register request.
- * @param {string=} appId
- * @param {Array<u2f.RegisterRequest>} registerRequests
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.RegisterResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.register = function(appId, registerRequests, registeredKeys, callback, opt_timeoutSeconds) {
- if (js_api_version === undefined) {
- // Send a message to get the extension to JS API version, then send the actual register request.
- u2f.getApiVersion(
- function (response) {
- js_api_version = response['js_api_version'] === undefined ? 0: response['js_api_version'];
- //console.log("Extension JS API Version: ", js_api_version);
- u2f.sendRegisterRequest(appId, registerRequests, registeredKeys,
- callback, opt_timeoutSeconds);
- });
- } else {
- // We know the JS API version. Send the actual register request in the supported API version.
- u2f.sendRegisterRequest(appId, registerRequests, registeredKeys,
- callback, opt_timeoutSeconds);
- }
-};
-
-/**
- * Dispatches register requests to available U2F tokens. An array of sign
- * requests identifies already registered tokens.
- * @param {string=} appId
- * @param {Array<u2f.RegisterRequest>} registerRequests
- * @param {Array<u2f.RegisteredKey>} registeredKeys
- * @param {function((u2f.Error|u2f.RegisterResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.sendRegisterRequest = function(appId, registerRequests, registeredKeys, callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var timeoutSeconds = (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC);
- var req = u2f.formatRegisterRequest_(
- appId, registeredKeys, registerRequests, timeoutSeconds, reqId);
- port.postMessage(req);
- });
-};
-
-
-/**
- * Dispatches a message to the extension to find out the supported
- * JS API version.
- * If the user is on a mobile phone and is thus using Google Authenticator instead
- * of the Chrome extension, don't send the request and simply return 0.
- * @param {function((u2f.Error|u2f.GetJsApiVersionResponse))} callback
- * @param {number=} opt_timeoutSeconds
- */
-u2f.getApiVersion = function(callback, opt_timeoutSeconds) {
- u2f.getPortSingleton_(function(port) {
- // If we are using Android Google Authenticator or iOS client app,
- // do not fire an intent to ask which JS API version to use.
- if (port.getPortType) {
- var apiVersion;
- switch (port.getPortType()) {
- case 'WrappedIosPort_':
- case 'WrappedAuthenticatorPort_':
- apiVersion = 1.1;
- break;
-
- default:
- apiVersion = 0;
- break;
- }
- callback({ 'js_api_version': apiVersion });
- return;
- }
- var reqId = ++u2f.reqCounter_;
- u2f.callbackMap_[reqId] = callback;
- var req = {
- type: u2f.MessageTypes.U2F_GET_API_VERSION_REQUEST,
- timeoutSeconds: (typeof opt_timeoutSeconds !== 'undefined' ?
- opt_timeoutSeconds : u2f.EXTENSION_TIMEOUT_SEC),
- requestId: reqId
- };
- port.postMessage(req);
- });
-};
diff --git a/packages/website/tsconfig.json b/packages/website/tsconfig.json
deleted file mode 100644
index 8fbba17bb..000000000
--- a/packages/website/tsconfig.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "extends": "../../tsconfig",
- "compilerOptions": {
- "allowSyntheticDefaultImports": true,
- "outDir": "./transpiled/",
- "jsx": "react",
- "baseUrl": "./",
- "allowJs": true,
- "strictNullChecks": false,
- "noImplicitThis": false,
- // tsconfig.json at the monorepo root contains some options required for
- // project references which do not work for website. We override those
- // options here.
- "declaration": false,
- "declarationMap": false,
- "composite": false,
- "paths": {
- "*": ["node_modules/@types/*", "*"]
- },
- "module": "esnext",
- "moduleResolution": "node"
- },
- "awesomeTypescriptLoaderOptions": {
- "useCache": true,
- "reportFiles": ["./ts/**/*"]
- },
- "include": ["./ts/**/*"]
-}
diff --git a/packages/website/tslint.json b/packages/website/tslint.json
deleted file mode 100644
index 3022b2c84..000000000
--- a/packages/website/tslint.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "extends": ["@0x/tslint-config"],
- "rules": {
- "no-implicit-dependencies": false,
- "no-object-literal-type-assertion": false,
- "completed-docs": false,
- "prefer-function-over-method": false,
- "custom-no-magic-numbers": false,
- "semicolon": [true, "always", "ignore-bound-class-methods"]
- }
-}
diff --git a/packages/website/webpack.config.js b/packages/website/webpack.config.js
deleted file mode 100644
index d9bdd91ad..000000000
--- a/packages/website/webpack.config.js
+++ /dev/null
@@ -1,150 +0,0 @@
-const path = require('path');
-const webpack = require('webpack');
-const TerserPlugin = require('terser-webpack-plugin');
-const RollbarSourceMapPlugin = require('rollbar-sourcemap-webpack-plugin');
-const childProcess = require('child_process');
-const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
-
-const GIT_SHA = childProcess
- .execSync('git rev-parse HEAD')
- .toString()
- .trim();
-
-const config = {
- entry: ['./ts/index.tsx'],
- output: {
- path: path.join(__dirname, '/public'),
- filename: 'bundle.js',
- chunkFilename: 'bundle-[name].js',
- publicPath: '/',
- },
- devtool: 'source-map',
- resolve: {
- modules: [path.join(__dirname, '/ts'), 'node_modules'],
- extensions: ['.ts', '.tsx', '.js', '.jsx', '.json', '.md'],
- alias: {
- ts: path.join(__dirname, '/ts'),
- less: path.join(__dirname, '/less'),
- md: path.join(__dirname, '/md'),
- },
- },
- module: {
- rules: [
- {
- test: /\.js$/,
- loader: 'source-map-loader',
- exclude: [
- // instead of /\/node_modules\//
- path.join(process.cwd(), 'node_modules'),
- path.join(process.cwd(), '../..', 'node_modules'),
- ],
- },
- {
- test: /\.tsx?$/,
- loader: 'awesome-typescript-loader',
- },
- {
- test: /\.md$/,
- use: 'raw-loader',
- },
- {
- test: /\.less$/,
- loader: 'style-loader!css-loader!less-loader',
- exclude: /node_modules/,
- },
- {
- test: /\.css$/,
- loaders: ['style-loader', 'css-loader'],
- },
- {
- test: /\.svg$/,
- use: [
- {
- loader: "react-svg-loader",
- options: {
- svgo: {
- plugins: [
- { removeViewBox: false }
- ],
- }
- }
- }
- ]
- },
- ],
- },
- optimization: {
- minimizer: [
- new TerserPlugin({
- sourceMap: true,
- terserOptions: {
- mangle: {
- reserved: ['BigNumber'],
- },
- },
- }),
- ],
- },
- devServer: {
- host: '0.0.0.0',
- port: 3572,
- historyApiFallback: {
- // Fixes issue where having dots in URL path that aren't part of fileNames causes webpack-dev-server
- // to fail. Doc versions have dots in them, therefore we special case these urls to also load index.html.
- // Source: https://github.com/cvut/fittable/issues/171
- rewrites: [
- {
- from: /^\/docs\/.*$/,
- to: function() {
- return 'index.html';
- },
- },
- ],
- },
- disableHostCheck: true,
- // Fixes assertion error
- // Source: https://github.com/webpack/webpack-dev-server/issues/1491
- https: {
- spdy: {
- protocols: ['http/1.1']
- }
- },
- },
-};
-
-module.exports = (_env, argv) => {
- let plugins = [];
- if (argv.mode === 'development') {
- config.mode = 'development';
- plugins.concat([
- new BundleAnalyzerPlugin(),
- ]);
- } else {
- config.mode = 'production';
- plugins = plugins.concat([
- // Since we do not use moment's locale feature, we exclude them from the bundle.
- // This reduces the bundle size by 0.4MB.
- new webpack.IgnorePlugin(/^\.\/locale$/, /moment$/),
- new webpack.DefinePlugin({
- 'process.env': {
- GIT_SHA: JSON.stringify(GIT_SHA),
- },
- }),
- ]);
- if (process.env.DEPLOY_ROLLBAR_SOURCEMAPS === 'true') {
- plugins = plugins.concat([
- new RollbarSourceMapPlugin({
- accessToken: '32c39bfa4bb6440faedc1612a9c13d28',
- version: GIT_SHA,
- publicPath: 'https://0x.org/',
- }),
- ]);
- }
- }
- console.log('i 「atl」: Mode: ', config.mode);
-
- config.plugins = plugins;
- console.log('i 「atl」: Plugin Count: ', config.plugins.length);
-
- return config;
-};
diff --git a/python-packages/cmd_pkgs_in_dep_order.py b/python-packages/cmd_pkgs_in_dep_order.py
deleted file mode 100755
index ec739adc0..000000000
--- a/python-packages/cmd_pkgs_in_dep_order.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/usr/bin/env python
-
-"""Run a command in every package, in order of increasing dependency."""
-
-import os
-import subprocess
-import sys
-
-
-PACKAGE_DEPENDENCY_LIST = [
- # Order matters! Packages must be handled in dependency order (most
- # independent first) in order for them to resolve properly.
- "contract_addresses",
- "contract_artifacts",
- "json_schemas",
- "sra_client",
- "order_utils",
- "contract_demo"
-]
-
-for package in PACKAGE_DEPENDENCY_LIST:
- print(f"Running command `{sys.argv[1:]}` in package {package}")
- os.chdir(package)
- subprocess.check_call(sys.argv[1:])
- os.chdir("..")
diff --git a/python-packages/contract_addresses/.discharge.json b/python-packages/contract_addresses/.discharge.json
deleted file mode 100644
index d6c90a20f..000000000
--- a/python-packages/contract_addresses/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-contract-addresses-py",
- "build_command": "python setup.py build_sphinx",
- "upload_directory": "build/docs/html",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/python-packages/contract_addresses/README.md b/python-packages/contract_addresses/README.md
deleted file mode 100644
index d5e098deb..000000000
--- a/python-packages/contract_addresses/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-## 0x-contract-addresses
-
-Addresses at which the 0x smart contracts have been deployed.
-
-Read the [documentation](http://0x-contract-addresses-py.s3-website-us-east-1.amazonaws.com/)
-
-## Installing
-
-```bash
-pip install 0x-contract-addresses
-```
-
-## 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 Code and Dependencies
-
-```bash
-pip install -e .[dev]
-```
-
-### Clean
-
-`./setup.py clean --all`
-
-### Lint
-
-`./setup.py lint`
-
-### Build Documentation
-
-`./setup.py build_sphinx`
-
-### More
-
-See `./setup.py --help-commands` for more info.
diff --git a/python-packages/contract_addresses/setup.py b/python-packages/contract_addresses/setup.py
deleted file mode 100755
index 9ddafbeea..000000000
--- a/python-packages/contract_addresses/setup.py
+++ /dev/null
@@ -1,181 +0,0 @@
-#!/usr/bin/env python
-
-"""setuptools module for contract_addresses package."""
-
-import subprocess # nosec
-from shutil import rmtree
-from os import environ, path
-from sys import argv
-
-from distutils.command.clean import clean
-import distutils.command.build_py
-from setuptools import find_packages, setup
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """Custom setuptools command class for running linters."""
-
- description = "Run linters"
-
- def run(self):
- """Run linter shell commands."""
- lint_commands = [
- # formatter:
- "black --line-length 79 --check --diff src setup.py".split(),
- # style guide checker (formerly pep8):
- "pycodestyle --show-source --show-pep8 src setup.py".split(),
- # docstring style checker:
- "pydocstyle src setup.py".split(),
- # static type checker:
- "mypy src setup.py".split(),
- # security issue checker:
- "bandit -r src ./setup.py".split(),
- # run doctests:
- "pytest --doctest-modules".split(),
- # general linter:
- "pylint src setup.py".split(),
- # pylint takes relatively long to run, so it runs last, to enable
- # fast failures.
- ]
-
- # tell mypy where to find interface stubs for 3rd party libs
- environ["MYPYPATH"] = path.join(
- path.dirname(path.realpath(argv[0])), "stubs"
- )
-
- for lint_command in lint_commands:
- print(
- "Running lint command `", " ".join(lint_command).strip(), "`"
- )
- subprocess.check_call(lint_command) # nosec
-
-
-class CleanCommandExtension(clean):
- """Custom command to do custom cleanup."""
-
- def run(self):
- """Run the regular clean, followed by our custom commands."""
- super().run()
- rmtree("dist", ignore_errors=True)
- rmtree(".mypy_cache", ignore_errors=True)
- rmtree(".tox", ignore_errors=True)
- rmtree(".pytest_cache", ignore_errors=True)
- rmtree("src/0x_contract_addresses.egg-info", ignore_errors=True)
-
-
-class TestPublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to test.pypi.org."""
-
- description = (
- "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
- )
-
- def run(self):
- """Run twine to upload to test.pypi.org."""
- subprocess.check_call( # nosec
- (
- "twine upload --repository-url https://test.pypi.org/legacy/"
- + " --verbose dist/*"
- ).split()
- )
-
-
-class PublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
-
- def run(self):
- """Run twine to upload to pypi.org."""
- subprocess.check_call("twine upload dist/*".split()) # nosec
-
-
-class PublishDocsCommand(distutils.command.build_py.build_py):
- """Custom command to publish docs to S3."""
-
- description = (
- "Publish docs to "
- + "http://0x-contract-addresses-py.s3-website-us-east-1.amazonaws.com/"
- )
-
- def run(self):
- """Run npm package `discharge` to build & upload docs."""
- subprocess.check_call("discharge deploy".split()) # nosec
-
-
-with open("README.md", "r") as file_handle:
- README_MD = file_handle.read()
-
-
-setup(
- name="0x-contract-addresses",
- version="2.0.0",
- description="Addresses at which the 0x smart contracts have been deployed",
- long_description=README_MD,
- long_description_content_type="text/markdown",
- url=(
- "https://github.com/0xproject/0x-monorepo/tree/development"
- + "/python-packages/contract_addresses"
- ),
- author="F. Eugene Aumson",
- author_email="feuGeneA@users.noreply.github.com",
- cmdclass={
- "clean": CleanCommandExtension,
- "lint": LintCommand,
- "test_publish": TestPublishCommand,
- "publish": PublishCommand,
- "publish_docs": PublishDocsCommand,
- },
- install_requires=["mypy_extensions"],
- extras_require={
- "dev": [
- "bandit",
- "black",
- "coverage",
- "coveralls",
- "mypy",
- "mypy_extensions",
- "pycodestyle",
- "pydocstyle",
- "pylint",
- "pytest",
- "sphinx",
- "tox",
- "twine",
- ]
- },
- python_requires=">=3.6, <4",
- package_data={"zero_ex.contract_addresses": ["py.typed"]},
- package_dir={"": "src"},
- license="Apache 2.0",
- keywords=(
- "ethereum cryptocurrency 0x decentralized blockchain dex exchange"
- ),
- namespace_packages=["zero_ex"],
- packages=find_packages("src"),
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "Intended Audience :: Financial and Insurance Industry",
- "License :: OSI Approved :: Apache Software License",
- "Natural Language :: English",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Office/Business :: Financial",
- "Topic :: Other/Nonlisted Topic",
- "Topic :: Security :: Cryptography",
- "Topic :: Software Development :: Libraries",
- "Topic :: Utilities",
- ],
- zip_safe=False, # required per mypy
- command_options={
- "build_sphinx": {
- "source_dir": ("setup.py", "src"),
- "build_dir": ("setup.py", "build/docs"),
- }
- },
-)
diff --git a/python-packages/contract_addresses/src/conf.py b/python-packages/contract_addresses/src/conf.py
deleted file mode 100644
index a0f372bc5..000000000
--- a/python-packages/contract_addresses/src/conf.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Configuration file for the Sphinx documentation builder."""
-
-# Reference: http://www.sphinx-doc.org/en/master/config
-
-from typing import List
-import pkg_resources
-
-
-# pylint: disable=invalid-name
-# because these variables are not named in upper case, as globals should be.
-
-project = "0x-contract-addresses"
-# pylint: disable=redefined-builtin
-copyright = "2018, ZeroEx, Intl."
-author = "F. Eugene Aumson"
-version = pkg_resources.get_distribution("0x-contract-addresses").version
-release = "" # The full version, including alpha/beta/rc tags
-
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx.ext.viewcode",
-]
-
-templates_path = ["doc_templates"]
-
-source_suffix = ".rst"
-# eg: source_suffix = [".rst", ".md"]
-
-master_doc = "index" # The master toctree document.
-
-language = None
-
-exclude_patterns: List[str] = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
-
-html_theme = "alabaster"
-
-html_static_path = ["doc_static"]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "contract_addressespydoc"
-
-# -- Extension configuration:
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/": None}
diff --git a/python-packages/contract_addresses/src/doc_static/.gitkeep b/python-packages/contract_addresses/src/doc_static/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_addresses/src/doc_static/.gitkeep
+++ /dev/null
diff --git a/python-packages/contract_addresses/src/index.rst b/python-packages/contract_addresses/src/index.rst
deleted file mode 100644
index 7ac329ce2..000000000
--- a/python-packages/contract_addresses/src/index.rst
+++ /dev/null
@@ -1,25 +0,0 @@
-.. source for the sphinx-generated build/docs/web/index.html
-
-Python zero_ex.contract_addresses
-=================================
-
-.. toctree::
- :maxdepth: 2
- :caption: Contents:
-
-.. autoclass:: zero_ex.contract_addresses.NetworkId
-
- See source for enum members.
-
-.. autoclass:: zero_ex.contract_addresses.ContractAddresses
- :members:
-
-.. autodata:: zero_ex.contract_addresses.NETWORK_TO_ADDRESSES
- :annotation:
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
diff --git a/python-packages/contract_addresses/src/zero_ex/__init__.py b/python-packages/contract_addresses/src/zero_ex/__init__.py
deleted file mode 100644
index e90d833db..000000000
--- a/python-packages/contract_addresses/src/zero_ex/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""0x Python API."""
-__import__("pkg_resources").declare_namespace(__name__)
diff --git a/python-packages/contract_addresses/src/zero_ex/contract_addresses/__init__.py b/python-packages/contract_addresses/src/zero_ex/contract_addresses/__init__.py
deleted file mode 100644
index a4bfc3f4c..000000000
--- a/python-packages/contract_addresses/src/zero_ex/contract_addresses/__init__.py
+++ /dev/null
@@ -1,93 +0,0 @@
-"""Addresses at which the 0x smart contracts have been deployed."""
-
-from enum import Enum
-from typing import Dict, NamedTuple
-
-
-class ContractAddresses(NamedTuple): # noqa
- """An abstract record listing all the contracts that have addresses."""
-
- erc20_proxy: str
- erc721_proxy: str
- zrx_token: str
- ether_token: str
- exchange: str
- asset_proxy_owner: str
- forwarder: str
- order_validator: str
-
-
-class NetworkId(Enum):
- """Network names correlated to their network identification numbers.
-
- >>> NetworkId.MAINNET
- <NetworkId.MAINNET: 1>
- """
-
- MAINNET = 1
- ROPSTEN = 3
- RINKEBY = 4
- KOVAN = 42
- GANACHE = 50
-
-
-NETWORK_TO_ADDRESSES: Dict[NetworkId, ContractAddresses] = {
- NetworkId.MAINNET: ContractAddresses(
- erc20_proxy="0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
- erc721_proxy="0x208e41fb445f1bb1b6780d58356e81405f3e6127",
- zrx_token="0xe41d2489571d322189246dafa5ebde1f4699f498",
- ether_token="0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
- exchange="0x4f833a24e1f95d70f028921e27040ca56e09ab0b",
- asset_proxy_owner="0x17992e4ffb22730138e4b62aaa6367fa9d3699a6",
- forwarder="0x5468a1dc173652ee28d249c271fa9933144746b1",
- order_validator="0x9463e518dea6810309563c81d5266c1b1d149138",
- ),
- NetworkId.ROPSTEN: ContractAddresses(
- erc20_proxy="0xb1408f4c245a23c31b98d2c626777d4c0d766caa",
- erc721_proxy="0xe654aac058bfbf9f83fcaee7793311dd82f6ddb4",
- zrx_token="0xff67881f8d12f372d91baae9752eb3631ff0ed00",
- ether_token="0xc778417e063141139fce010982780140aa0cd5ab",
- exchange="0x4530c0483a1633c7a1c97d2c53721caff2caaaaf",
- asset_proxy_owner="0xf5fa5b5fed2727a0e44ac67f6772e97977aa358b",
- forwarder="0x2240dab907db71e64d3e0dba4800c83b5c502d4e",
- order_validator="0x90431a90516ab49af23a0530e04e8c7836e7122f",
- ),
- NetworkId.RINKEBY: ContractAddresses(
- exchange="0xbce0b5f6eb618c565c3e5f5cd69652bbc279f44e",
- erc20_proxy="0x2f5ae4f6106e89b4147651688a92256885c5f410",
- erc721_proxy="0x7656d773e11ff7383a14dcf09a9c50990481cd10",
- zrx_token="0x8080c7e4b81ecf23aa6f877cfbfd9b0c228c6ffa",
- ether_token="0xc778417e063141139fce010982780140aa0cd5ab",
- asset_proxy_owner="0xe1703da878afcebff5b7624a826902af475b9c03",
- forwarder="0x2d40589abbdee84961f3a7656b9af7adb0ee5ab4",
- order_validator="0x0c5173a51e26b29d6126c686756fb9fbef71f762",
- ),
- NetworkId.KOVAN: ContractAddresses(
- erc20_proxy="0xf1ec01d6236d3cd881a0bf0130ea25fe4234003e",
- erc721_proxy="0x2a9127c745688a165106c11cd4d647d2220af821",
- zrx_token="0x2002d3812f58e35f0ea1ffbf80a75a38c32175fa",
- ether_token="0xd0a1e359811322d97991e03f863a0c30c2cf029c",
- exchange="0x35dd2932454449b14cee11a94d3674a936d5d7b2",
- asset_proxy_owner="0x2c824d2882baa668e0d5202b1e7f2922278703f8",
- forwarder="0x17992e4ffb22730138e4b62aaa6367fa9d3699a6",
- order_validator="0xb389da3d204b412df2f75c6afb3d0a7ce0bc283d",
- ),
- NetworkId.GANACHE: ContractAddresses(
- exchange="0x48bacb9266a570d521063ef5dd96e61686dbe788",
- erc20_proxy="0x1dc4c1cefef38a777b15aa20260a54e584b16c48",
- erc721_proxy="0x1d7022f5b17d2f8b695918fb48fa1089c9f85401",
- zrx_token="0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c",
- ether_token="0x0b1ba0af832d7c05fd64161e0db78e85978e8082",
- asset_proxy_owner="0x34d402f14d58e001d8efbe6585051bf9706aa064",
- forwarder="0xb69e673309512a9d726f87304c6984054f87a93b",
- order_validator="0xe86bb98fcf9bff3512c74589b78fb168200cc546",
- ),
-}
-"""A mapping from instances of NetworkId to instances of ContractAddresses.
-
-Addresses under NetworkId.Ganache are from our Ganache snapshot generated from
-migrations.
-
->>> NETWORK_TO_ADDRESSES[NetworkId.MAINNET].exchange
-0x4f833a24e1f95d70f028921e27040ca56e09ab0b
-"""
diff --git a/python-packages/contract_addresses/src/zero_ex/contract_addresses/py.typed b/python-packages/contract_addresses/src/zero_ex/contract_addresses/py.typed
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_addresses/src/zero_ex/contract_addresses/py.typed
+++ /dev/null
diff --git a/python-packages/contract_addresses/stubs/distutils/__init__.pyi b/python-packages/contract_addresses/stubs/distutils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_addresses/stubs/distutils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_addresses/stubs/distutils/command/__init__.pyi b/python-packages/contract_addresses/stubs/distutils/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_addresses/stubs/distutils/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_addresses/stubs/distutils/command/clean.pyi b/python-packages/contract_addresses/stubs/distutils/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/contract_addresses/stubs/distutils/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/contract_addresses/stubs/setuptools/__init__.pyi b/python-packages/contract_addresses/stubs/setuptools/__init__.pyi
deleted file mode 100644
index 8ea8d32b7..000000000
--- a/python-packages/contract_addresses/stubs/setuptools/__init__.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from distutils.dist import Distribution
-from typing import Any, List
-
-def setup(**attrs: Any) -> Distribution: ...
-
-class Command: ...
-
-def find_packages(where: str) -> List[str]: ...
diff --git a/python-packages/contract_addresses/stubs/setuptools/command/__init__.pyi b/python-packages/contract_addresses/stubs/setuptools/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_addresses/stubs/setuptools/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_addresses/stubs/setuptools/command/test.pyi b/python-packages/contract_addresses/stubs/setuptools/command/test.pyi
deleted file mode 100644
index c5ec770ad..000000000
--- a/python-packages/contract_addresses/stubs/setuptools/command/test.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import Command
-
-class test(Command): ...
diff --git a/python-packages/contract_addresses/tox.ini b/python-packages/contract_addresses/tox.ini
deleted file mode 100644
index aa1037ed7..000000000
--- a/python-packages/contract_addresses/tox.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-# tox (https://tox.readthedocs.io/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py37
-
-[testenv]
-commands =
- pip install -e .[dev]
- python setup.py lint
diff --git a/python-packages/contract_artifacts/.discharge.json b/python-packages/contract_artifacts/.discharge.json
deleted file mode 100644
index d9cb2a37b..000000000
--- a/python-packages/contract_artifacts/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-contract-artifacts-py",
- "build_command": "python setup.py build_sphinx",
- "upload_directory": "build/docs/html",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/python-packages/contract_artifacts/.pylintrc b/python-packages/contract_artifacts/.pylintrc
deleted file mode 100644
index 937bc6313..000000000
--- a/python-packages/contract_artifacts/.pylintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-[MESSAGES CONTROL]
-disable=C0330,line-too-long,fixme,too-few-public-methods,too-many-ancestors
-# C0330 is "bad hanging indent". we use indents per `black`.
diff --git a/python-packages/contract_artifacts/README.md b/python-packages/contract_artifacts/README.md
deleted file mode 100644
index caa6b5df4..000000000
--- a/python-packages/contract_artifacts/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-## 0x-contract-artifacts
-
-0x smart contract compilation artifacts
-
-Read the [documentation](http://0x-contract-artifacts-py.s3-website-us-east-1.amazonaws.com/)
-
-## Installing
-
-```bash
-pip install 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 Code and Dependencies
-
-```bash
-pip install -e .[dev]
-```
-
-### Clean
-
-`./setup.py clean --all`
-
-### Lint
-
-`./setup.py lint`
-
-### Build Documentation
-
-`./setup.py build_sphinx`
-
-### More
-
-See `./setup.py --help-commands` for more info.
diff --git a/python-packages/contract_artifacts/setup.py b/python-packages/contract_artifacts/setup.py
deleted file mode 100755
index 8d93fc3fa..000000000
--- a/python-packages/contract_artifacts/setup.py
+++ /dev/null
@@ -1,188 +0,0 @@
-#!/usr/bin/env python
-
-"""setuptools module for contract_artifacts package."""
-
-import subprocess # nosec
-from shutil import rmtree
-from os import environ, path
-from sys import argv
-
-from distutils.command.clean import clean
-import distutils.command.build_py
-from setuptools import find_packages, setup
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """Custom setuptools command class for running linters."""
-
- description = "Run linters"
-
- def run(self):
- """Run linter shell commands."""
- lint_commands = [
- # formatter:
- "black --line-length 79 --check --diff src setup.py".split(),
- # style guide checker (formerly pep8):
- "pycodestyle --show-source --show-pep8 src setup.py".split(),
- # docstring style checker:
- "pydocstyle src setup.py".split(),
- # static type checker:
- "mypy src setup.py".split(),
- # security issue checker:
- "bandit -r src ./setup.py".split(),
- # HACK: ensure contract artifacts match the authoritative copies:
- # this is a hack. ideally we would symlink to the authoritative
- # copies, but a problem with setuptools is preventing it from
- # following symlinks when gathering package_data. see
- # https://github.com/pypa/setuptools/issues/415.
- (
- "diff src/zero_ex/contract_artifacts/artifacts"
- + " ../../packages/contract-artifacts/artifacts"
- ).split(),
- # general linter:
- "pylint src setup.py".split(),
- # pylint takes relatively long to run, so it runs last, to enable
- # fast failures.
- ]
-
- # tell mypy where to find interface stubs for 3rd party libs
- environ["MYPYPATH"] = path.join(
- path.dirname(path.realpath(argv[0])), "stubs"
- )
-
- for lint_command in lint_commands:
- print(
- "Running lint command `", " ".join(lint_command).strip(), "`"
- )
- subprocess.check_call(lint_command) # nosec
-
-
-class CleanCommandExtension(clean):
- """Custom command to do custom cleanup."""
-
- def run(self):
- """Run the regular clean, followed by our custom commands."""
- super().run()
- rmtree("dist", ignore_errors=True)
- rmtree(".mypy_cache", ignore_errors=True)
- rmtree(".tox", ignore_errors=True)
- rmtree(".pytest_cache", ignore_errors=True)
- rmtree("src/0x_contract_artifacts.egg-info", ignore_errors=True)
-
-
-class TestPublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to test.pypi.org."""
-
- description = (
- "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
- )
-
- def run(self):
- """Run twine to upload to test.pypi.org."""
- subprocess.check_call( # nosec
- (
- "twine upload --repository-url https://test.pypi.org/legacy/"
- + " --verbose dist/*"
- ).split()
- )
-
-
-class PublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
-
- def run(self):
- """Run twine to upload to pypi.org."""
- subprocess.check_call("twine upload dist/*".split()) # nosec
-
-
-class PublishDocsCommand(distutils.command.build_py.build_py):
- """Custom command to publish docs to S3."""
-
- description = (
- "Publish docs to "
- + "http://0x-contract-artifacts-py.s3-website-us-east-1.amazonaws.com/"
- )
-
- def run(self):
- """Run npm package `discharge` to build & upload docs."""
- subprocess.check_call("discharge deploy".split()) # nosec
-
-
-with open("README.md", "r") as file_handle:
- README_MD = file_handle.read()
-
-
-setup(
- name="0x-contract-artifacts",
- version="2.0.0",
- description="0x smart contract compilation artifacts",
- long_description=README_MD,
- long_description_content_type="text/markdown",
- url=(
- "https://github.com/0xproject/0x-monorepo/tree/development"
- + "/python-packages/contract_artifacts"
- ),
- author="F. Eugene Aumson",
- author_email="feuGeneA@users.noreply.github.com",
- cmdclass={
- "clean": CleanCommandExtension,
- "lint": LintCommand,
- "test_publish": TestPublishCommand,
- "publish": PublishCommand,
- "publish_docs": PublishDocsCommand,
- },
- install_requires=["mypy_extensions"],
- extras_require={
- "dev": [
- "bandit",
- "black",
- "coverage",
- "coveralls",
- "mypy",
- "mypy_extensions",
- "pycodestyle",
- "pydocstyle",
- "pylint",
- "pytest",
- "sphinx",
- "tox",
- "twine",
- ]
- },
- python_requires=">=3.6, <4",
- package_data={"zero_ex.contract_artifacts": ["py.typed", "artifacts/*"]},
- package_dir={"": "src"},
- license="Apache 2.0",
- keywords=(
- "ethereum cryptocurrency 0x decentralized blockchain dex exchange"
- ),
- namespace_packages=["zero_ex"],
- packages=find_packages("src"),
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "Intended Audience :: Financial and Insurance Industry",
- "License :: OSI Approved :: Apache Software License",
- "Natural Language :: English",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Office/Business :: Financial",
- "Topic :: Other/Nonlisted Topic",
- "Topic :: Security :: Cryptography",
- "Topic :: Software Development :: Libraries",
- "Topic :: Utilities",
- ],
- zip_safe=False, # required per mypy
- command_options={
- "build_sphinx": {
- "source_dir": ("setup.py", "src"),
- "build_dir": ("setup.py", "build/docs"),
- }
- },
-)
diff --git a/python-packages/contract_artifacts/src/conf.py b/python-packages/contract_artifacts/src/conf.py
deleted file mode 100644
index 2b0a97116..000000000
--- a/python-packages/contract_artifacts/src/conf.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Configuration file for the Sphinx documentation builder."""
-
-# Reference: http://www.sphinx-doc.org/en/master/config
-
-from typing import List
-import pkg_resources
-
-
-# pylint: disable=invalid-name
-# because these variables are not named in upper case, as globals should be.
-
-project = "0x-contract-artifacts"
-# pylint: disable=redefined-builtin
-copyright = "2018, ZeroEx, Intl."
-author = "F. Eugene Aumson"
-version = pkg_resources.get_distribution("0x-contract-artifacts").version
-release = "" # The full version, including alpha/beta/rc tags
-
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx.ext.viewcode",
-]
-
-templates_path = ["doc_templates"]
-
-source_suffix = ".rst"
-# eg: source_suffix = [".rst", ".md"]
-
-master_doc = "index" # The master toctree document.
-
-language = None
-
-exclude_patterns: List[str] = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
-
-html_theme = "alabaster"
-
-html_static_path = ["doc_static"]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "contract_artifactspydoc"
-
-# -- Extension configuration:
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/": None}
diff --git a/python-packages/contract_artifacts/src/doc_static/.gitkeep b/python-packages/contract_artifacts/src/doc_static/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_artifacts/src/doc_static/.gitkeep
+++ /dev/null
diff --git a/python-packages/contract_artifacts/src/index.rst b/python-packages/contract_artifacts/src/index.rst
deleted file mode 100644
index d086ad288..000000000
--- a/python-packages/contract_artifacts/src/index.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-.. source for the sphinx-generated build/docs/web/index.html
-
-Python zero_ex.contract_artifacts
-=================================
-
-.. toctree::
- :maxdepth: 2
- :caption: Contents:
-
-.. automodule:: zero_ex.contract_artifacts
- :members:
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
diff --git a/python-packages/contract_artifacts/src/zero_ex/__init__.py b/python-packages/contract_artifacts/src/zero_ex/__init__.py
deleted file mode 100644
index e90d833db..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""0x Python API."""
-__import__("pkg_resources").declare_namespace(__name__)
diff --git a/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/__init__.py b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/__init__.py
deleted file mode 100644
index 18947ee3b..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/__init__.py
+++ /dev/null
@@ -1,35 +0,0 @@
-"""0x smart contract compilation artifacts."""
-
-import json
-from typing import Dict
-from pkg_resources import resource_string
-
-
-class _ArtifactCache:
- """A cache to facilitate lazy & singular loading of contract artifacts."""
-
- _contract_name_to_abi: Dict[str, Dict] = {} # class data, not instance
-
- @classmethod
- def contract_name_to_abi(cls, contract_name: str) -> Dict:
- """Return the ABI for the given contract name.
-
- First tries to get data from the class level storage
- `_contract_name_to_abi`. If it's not there, loads it from disk, stores
- it in the class data (for the next caller), and then returns it.
- """
- try:
- return cls._contract_name_to_abi[contract_name]
- except KeyError:
- cls._contract_name_to_abi[contract_name] = json.loads(
- resource_string(
- "zero_ex.contract_artifacts",
- f"artifacts/{contract_name}.json",
- )
- )["compilerOutput"]["abi"]
- return cls._contract_name_to_abi[contract_name]
-
-
-def abi_by_name(contract_name: str) -> Dict:
- """Return the ABI for the named contract."""
- return _ArtifactCache.contract_name_to_abi(contract_name)
diff --git a/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/AssetProxyOwner.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/AssetProxyOwner.json
deleted file mode 100644
index e5fad3aef..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC20Token.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC20Token.json
deleted file mode 100644
index 7b8e7c3a8..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC721Token.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DummyERC721Token.json
deleted file mode 100644
index 7472a5a03..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DutchAuction.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/DutchAuction.json
deleted file mode 100644
index 3c1cb8c4c..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Proxy.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Proxy.json
deleted file mode 100644
index 33af866e7..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Token.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC20Token.json
deleted file mode 100644
index d89d08a77..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Proxy.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Proxy.json
deleted file mode 100644
index db01e40f0..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Token.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ERC721Token.json
deleted file mode 100644
index d189090e8..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Exchange.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Exchange.json
deleted file mode 100644
index 6e586b899..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Forwarder.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/Forwarder.json
deleted file mode 100644
index a7bd62f8e..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IValidator.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IValidator.json
deleted file mode 100644
index 8ca99f261..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IWallet.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/IWallet.json
deleted file mode 100644
index 2a8f975cc..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/MultiAssetProxy.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/MultiAssetProxy.json
deleted file mode 100644
index f143cd817..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/OrderValidator.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/OrderValidator.json
deleted file mode 100644
index 90a92e7cb..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/WETH9.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/WETH9.json
deleted file mode 100644
index e6ce25f7d..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ZRXToken.json b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/artifacts/ZRXToken.json
deleted file mode 100644
index 29bb55824..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/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/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/py.typed b/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/py.typed
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_artifacts/src/zero_ex/contract_artifacts/py.typed
+++ /dev/null
diff --git a/python-packages/contract_artifacts/stubs/distutils/__init__.pyi b/python-packages/contract_artifacts/stubs/distutils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_artifacts/stubs/distutils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_artifacts/stubs/distutils/command/__init__.pyi b/python-packages/contract_artifacts/stubs/distutils/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_artifacts/stubs/distutils/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_artifacts/stubs/distutils/command/clean.pyi b/python-packages/contract_artifacts/stubs/distutils/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/contract_artifacts/stubs/distutils/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/contract_artifacts/stubs/setuptools/__init__.pyi b/python-packages/contract_artifacts/stubs/setuptools/__init__.pyi
deleted file mode 100644
index 8ea8d32b7..000000000
--- a/python-packages/contract_artifacts/stubs/setuptools/__init__.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from distutils.dist import Distribution
-from typing import Any, List
-
-def setup(**attrs: Any) -> Distribution: ...
-
-class Command: ...
-
-def find_packages(where: str) -> List[str]: ...
diff --git a/python-packages/contract_artifacts/stubs/setuptools/command/__init__.pyi b/python-packages/contract_artifacts/stubs/setuptools/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_artifacts/stubs/setuptools/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_artifacts/stubs/setuptools/command/test.pyi b/python-packages/contract_artifacts/stubs/setuptools/command/test.pyi
deleted file mode 100644
index c5ec770ad..000000000
--- a/python-packages/contract_artifacts/stubs/setuptools/command/test.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import Command
-
-class test(Command): ...
diff --git a/python-packages/contract_artifacts/tox.ini b/python-packages/contract_artifacts/tox.ini
deleted file mode 100644
index aa1037ed7..000000000
--- a/python-packages/contract_artifacts/tox.ini
+++ /dev/null
@@ -1,12 +0,0 @@
-# tox (https://tox.readthedocs.io/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py37
-
-[testenv]
-commands =
- pip install -e .[dev]
- python setup.py lint
diff --git a/python-packages/contract_demo/.discharge.json b/python-packages/contract_demo/.discharge.json
deleted file mode 100644
index 9d811ae3e..000000000
--- a/python-packages/contract_demo/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-contract-demo-py",
- "build_command": "python setup.py build_sphinx",
- "upload_directory": "build/docs/html",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/python-packages/contract_demo/README.md b/python-packages/contract_demo/README.md
deleted file mode 100644
index 3a0f964e3..000000000
--- a/python-packages/contract_demo/README.md
+++ /dev/null
@@ -1,39 +0,0 @@
-## 0x-contract-demo
-
-A demonstration of calling 0x smart contracts from Python.
-
-Read the [documentation](http://0x-contract-demo-py.s3-website-us-east-1.amazonaws.com/)
-
-## 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 Code and Dependencies
-
-Ensure that you have installed Python >=3.6 and Docker. Then:
-
-```bash
-pip install -e .[dev]
-```
-
-### Test
-
-Tests depend on a running ganache instance with the 0x contracts deployed in it. For convenience, a docker container is provided that has ganache-cli and a snapshot containing the necessary contracts. A shortcut is provided to run that docker container: `./setup.py ganache`. With that running, the tests can be run with `./setup.py test`.
-
-### Clean
-
-`./setup.py clean --all`
-
-### Lint
-
-`./setup.py lint`
-
-### Build Documentation
-
-`./setup.py build_sphinx`
-
-### More
-
-See `./setup.py --help-commands` for more info.
diff --git a/python-packages/contract_demo/setup.py b/python-packages/contract_demo/setup.py
deleted file mode 100755
index a7afbd30c..000000000
--- a/python-packages/contract_demo/setup.py
+++ /dev/null
@@ -1,146 +0,0 @@
-#!/usr/bin/env python
-
-"""setuptools module for 0x-contract-demo package."""
-
-import distutils.command.build_py
-from distutils.command.clean import clean
-import subprocess # nosec
-from shutil import rmtree
-from os import environ, path
-from sys import argv
-
-from setuptools import setup
-from setuptools.command.test import test as TestCommand
-
-
-class TestCommandExtension(TestCommand):
- """Run pytest tests."""
-
- def run_tests(self):
- """Invoke pytest."""
- import pytest
-
- exit(pytest.main())
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """Custom setuptools command class for running linters."""
-
- description = "Run linters"
-
- def run(self):
- """Run linter shell commands."""
- lint_commands = [
- # formatter:
- "black --line-length 79 --check --diff test setup.py".split(),
- # style guide checker (formerly pep8):
- "pycodestyle test setup.py".split(),
- # docstring style checker:
- "pydocstyle test setup.py".split(),
- # static type checker:
- "mypy test setup.py".split(),
- # security issue checker:
- "bandit -r ./setup.py".split(),
- # general linter:
- "pylint test setup.py".split(),
- # pylint takes relatively long to run, so it runs last, to enable
- # fast failures.
- ]
-
- # tell mypy where to find interface stubs for 3rd party libs
- environ["MYPYPATH"] = path.join(
- path.dirname(path.realpath(argv[0])), "stubs"
- )
-
- for lint_command in lint_commands:
- print(
- "Running lint command `", " ".join(lint_command).strip(), "`"
- )
- subprocess.check_call(lint_command) # nosec
-
-
-class CleanCommandExtension(clean):
- """Custom command to do custom cleanup."""
-
- def run(self):
- """Run the regular clean, followed by our custom commands."""
- super().run()
- rmtree(".mypy_cache", ignore_errors=True)
- rmtree(".tox", ignore_errors=True)
- rmtree(".pytest_cache", ignore_errors=True)
-
-
-class GanacheCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Run ganache daemon to support tests."
-
- def run(self):
- """Run ganache."""
- cmd_line = "docker run -d -p 8545:8545 0xorg/ganache-cli:2.2.2".split()
- subprocess.call(cmd_line) # nosec
-
-
-class PublishDocsCommand(distutils.command.build_py.build_py):
- """Custom command to publish docs to S3."""
-
- description = (
- "Publish docs to "
- + "http://0x-contract-addresses-py.s3-website-us-east-1.amazonaws.com/"
- )
-
- def run(self):
- """Run npm package `discharge` to build & upload docs."""
- subprocess.check_call("discharge deploy".split()) # nosec
-
-
-setup(
- name="0x-contract-demo",
- version="1.0.0",
- description="Demonstration of calling 0x contracts",
- url=(
- "https://github.com/0xProject/0x-monorepo/tree/development"
- + "/python-packages/contract_demo"
- ),
- author="F. Eugene Aumson",
- author_email="feuGeneA@users.noreply.github.com",
- cmdclass={
- "clean": CleanCommandExtension,
- "lint": LintCommand,
- "test": TestCommandExtension,
- "ganache": GanacheCommand,
- "publish_docs": PublishDocsCommand,
- },
- install_requires=[
- "0x-contract-addresses",
- "0x-contract-artifacts",
- "0x-order-utils",
- "0x-web3", # TEMPORARY! pending resolution of our web3.py PR#1147
- "mypy_extensions",
- ],
- extras_require={
- "dev": [
- "bandit",
- "black",
- "coverage",
- "coveralls",
- "mypy",
- "mypy_extensions",
- "pycodestyle",
- "pydocstyle",
- "pylint",
- "pytest",
- "sphinx",
- "tox",
- ]
- },
- python_requires=">=3.6, <4",
- license="Apache 2.0",
- zip_safe=False, # required per mypy
- command_options={
- "build_sphinx": {
- "source_dir": ("setup.py", "test"),
- "build_dir": ("setup.py", "build/docs"),
- }
- },
-)
diff --git a/python-packages/contract_demo/stubs/__init__.pyi b/python-packages/contract_demo/stubs/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/command/__init__.pyi b/python-packages/contract_demo/stubs/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/command/clean.pyi b/python-packages/contract_demo/stubs/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/contract_demo/stubs/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/contract_demo/stubs/distutils/__init__.pyi b/python-packages/contract_demo/stubs/distutils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/distutils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/distutils/command/__init__.pyi b/python-packages/contract_demo/stubs/distutils/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/distutils/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/distutils/command/clean.pyi b/python-packages/contract_demo/stubs/distutils/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/contract_demo/stubs/distutils/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/contract_demo/stubs/eth_utils/__init__.pyi b/python-packages/contract_demo/stubs/eth_utils/__init__.pyi
deleted file mode 100644
index 4a83338ca..000000000
--- a/python-packages/contract_demo/stubs/eth_utils/__init__.pyi
+++ /dev/null
@@ -1,4 +0,0 @@
-from typing import Union
-
-def to_checksum_address(value: Union[str, bytes]) -> str:
- ...
diff --git a/python-packages/contract_demo/stubs/pytest/__init__.pyi b/python-packages/contract_demo/stubs/pytest/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/pytest/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/setuptools/__init__.pyi b/python-packages/contract_demo/stubs/setuptools/__init__.pyi
deleted file mode 100644
index 8ea8d32b7..000000000
--- a/python-packages/contract_demo/stubs/setuptools/__init__.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from distutils.dist import Distribution
-from typing import Any, List
-
-def setup(**attrs: Any) -> Distribution: ...
-
-class Command: ...
-
-def find_packages(where: str) -> List[str]: ...
diff --git a/python-packages/contract_demo/stubs/setuptools/command/__init__.pyi b/python-packages/contract_demo/stubs/setuptools/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/setuptools/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/setuptools/command/test.pyi b/python-packages/contract_demo/stubs/setuptools/command/test.pyi
deleted file mode 100644
index c5ec770ad..000000000
--- a/python-packages/contract_demo/stubs/setuptools/command/test.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import Command
-
-class test(Command): ...
diff --git a/python-packages/contract_demo/stubs/web3/__init__.pyi b/python-packages/contract_demo/stubs/web3/__init__.pyi
deleted file mode 100644
index 21482d598..000000000
--- a/python-packages/contract_demo/stubs/web3/__init__.pyi
+++ /dev/null
@@ -1,2 +0,0 @@
-class Web3:
- ...
diff --git a/python-packages/contract_demo/stubs/web3/utils/__init__.pyi b/python-packages/contract_demo/stubs/web3/utils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/stubs/web3/utils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/contract_demo/stubs/web3/utils/datatypes.pyi b/python-packages/contract_demo/stubs/web3/utils/datatypes.pyi
deleted file mode 100644
index 70baff372..000000000
--- a/python-packages/contract_demo/stubs/web3/utils/datatypes.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-class Contract:
- def call(self): ...
- ...
diff --git a/python-packages/contract_demo/test/__init__.py b/python-packages/contract_demo/test/__init__.py
deleted file mode 100644
index 600f143bf..000000000
--- a/python-packages/contract_demo/test/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Demonstrations of calling 0x smart contracts."""
diff --git a/python-packages/contract_demo/test/conf.py b/python-packages/contract_demo/test/conf.py
deleted file mode 100644
index 45ed4b2a5..000000000
--- a/python-packages/contract_demo/test/conf.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Configuration file for the Sphinx documentation builder."""
-
-# Reference: http://www.sphinx-doc.org/en/master/config
-
-from typing import List
-import pkg_resources
-
-
-# pylint: disable=invalid-name
-# because these variables are not named in upper case, as globals should be.
-
-project = "0x-contract-demo"
-# pylint: disable=redefined-builtin
-copyright = "2018, ZeroEx, Intl."
-author = "F. Eugene Aumson"
-version = pkg_resources.get_distribution("0x-contract-demo").version
-release = "" # The full version, including alpha/beta/rc tags
-
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx.ext.viewcode",
-]
-
-templates_path = ["doc_templates"]
-
-source_suffix = ".rst"
-# eg: source_suffix = [".rst", ".md"]
-
-master_doc = "index" # The master toctree document.
-
-language = None
-
-exclude_patterns: List[str] = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
-
-html_theme = "alabaster"
-
-html_static_path = ["doc_static"]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "contract_demopydoc"
-
-# -- Extension configuration:
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/": None}
diff --git a/python-packages/contract_demo/test/doc_static/.gitkeep b/python-packages/contract_demo/test/doc_static/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/contract_demo/test/doc_static/.gitkeep
+++ /dev/null
diff --git a/python-packages/contract_demo/test/index.rst b/python-packages/contract_demo/test/index.rst
deleted file mode 100644
index c546eccfa..000000000
--- a/python-packages/contract_demo/test/index.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-.. source for the sphinx-generated build/docs/web/index.html
-
-Python demo of 0x Smart Contracts
-=================================
-
-.. toctree::
- :maxdepth: 2
- :caption: Contents:
-
-.. automodule:: test.test_exchange
- :members:
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
diff --git a/python-packages/contract_demo/test/test_exchange.py b/python-packages/contract_demo/test/test_exchange.py
deleted file mode 100644
index 07492a403..000000000
--- a/python-packages/contract_demo/test/test_exchange.py
+++ /dev/null
@@ -1,65 +0,0 @@
-"""Test calling methods on the Exchange contract."""
-
-from eth_utils import to_checksum_address
-from web3 import Web3
-from web3.utils import datatypes
-
-from zero_ex.contract_addresses import NETWORK_TO_ADDRESSES, NetworkId
-import zero_ex.contract_artifacts
-from zero_ex.json_schemas import assert_valid
-from zero_ex.order_utils import (
- Order,
- OrderInfo,
- order_to_jsdict,
- generate_order_hash_hex,
-)
-
-
-def test_get_order_info():
- """Demonstrate Exchange.getOrderInfo()."""
- order: Order = {
- "makerAddress": "0x0000000000000000000000000000000000000000",
- "takerAddress": "0x0000000000000000000000000000000000000000",
- "feeRecipientAddress": "0x0000000000000000000000000000000000000000",
- "senderAddress": "0x0000000000000000000000000000000000000000",
- "makerAssetAmount": 1000000000000000000,
- "takerAssetAmount": 1000000000000000000,
- "makerFee": 0,
- "takerFee": 0,
- "expirationTimeSeconds": 12345,
- "salt": 12345,
- "makerAssetData": (b"\x00") * 20,
- "takerAssetData": (b"\x00") * 20,
- }
-
- web3_instance = Web3(Web3.HTTPProvider("http://127.0.0.1:8545"))
-
- # false positive from pylint: disable=no-member
- contract_address = NETWORK_TO_ADDRESSES[
- NetworkId(int(web3_instance.net.version))
- ].exchange
-
- assert_valid(
- order_to_jsdict(order, exchange_address=contract_address),
- "/orderSchema",
- )
-
- # false positive from pylint: disable=no-member
- exchange: datatypes.Contract = web3_instance.eth.contract(
- address=to_checksum_address(contract_address),
- abi=zero_ex.contract_artifacts.abi_by_name("Exchange"),
- )
-
- order_info = OrderInfo(*exchange.call().getOrderInfo(order))
-
- assert isinstance(order_info.order_status, int)
- assert order_info.order_status == 4
-
- assert isinstance(order_info.order_hash, bytes)
- assert order_info.order_hash.hex() == generate_order_hash_hex(
- order,
- exchange_address=NETWORK_TO_ADDRESSES[NetworkId.GANACHE].exchange,
- )
-
- assert isinstance(order_info.order_taker_asset_filled_amount, int)
- assert order_info.order_taker_asset_filled_amount == 0
diff --git a/python-packages/install b/python-packages/install
deleted file mode 100755
index 73d88fec2..000000000
--- a/python-packages/install
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-"""Install all packages in non-editable mode (no -e on pip install)."""
-
-from os import path
-import subprocess
-
-# install all packages
-subprocess.check_call(
- (
- path.join(".", "cmd_pkgs_in_dep_order.py") + " pip install .[dev]"
- ).split()
-)
diff --git a/python-packages/install_editable b/python-packages/install_editable
deleted file mode 100755
index 6ac68b289..000000000
--- a/python-packages/install_editable
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-"""Script to install all packages in editable mode (pip install -e .)."""
-
-from os import path
-import subprocess
-
-# install all packages
-subprocess.check_call(
- (
- path.join(".", "cmd_pkgs_in_dep_order.py") + " pip install -e .[dev]"
- ).split()
-)
diff --git a/python-packages/json_schemas/.discharge.json b/python-packages/json_schemas/.discharge.json
deleted file mode 100644
index 66d95679f..000000000
--- a/python-packages/json_schemas/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-json-schemas-py",
- "build_command": "python setup.py build_sphinx",
- "upload_directory": "build/docs/html",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/python-packages/json_schemas/.pylintrc b/python-packages/json_schemas/.pylintrc
deleted file mode 100644
index 937bc6313..000000000
--- a/python-packages/json_schemas/.pylintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-[MESSAGES CONTROL]
-disable=C0330,line-too-long,fixme,too-few-public-methods,too-many-ancestors
-# C0330 is "bad hanging indent". we use indents per `black`.
diff --git a/python-packages/json_schemas/README.md b/python-packages/json_schemas/README.md
deleted file mode 100644
index 29b18baea..000000000
--- a/python-packages/json_schemas/README.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## 0x-json-schemas
-
-0x JSON schemas for those developing on top of 0x protocol.
-
-Read the [documentation](http://0x-json-schemas-py.s3-website-us-east-1.amazonaws.com/)
-
-## Installing
-
-```bash
-pip install 0x-json-schemas
-```
-
-## 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 Code and Dependencies
-
-```bash
-pip install -e .[dev]
-```
-
-### Test
-
-`./setup.py test`.
-
-### Clean
-
-`./setup.py clean --all`
-
-### Lint
-
-`./setup.py lint`
-
-### Build Documentation
-
-`./setup.py build_sphinx`
-
-### More
-
-See `./setup.py --help-commands` for more info.
diff --git a/python-packages/json_schemas/setup.py b/python-packages/json_schemas/setup.py
deleted file mode 100755
index 389d14591..000000000
--- a/python-packages/json_schemas/setup.py
+++ /dev/null
@@ -1,200 +0,0 @@
-#!/usr/bin/env python
-
-"""setuptools module for json_schemas package."""
-
-import distutils.command.build_py
-from distutils.command.clean import clean
-import subprocess # nosec
-from shutil import rmtree
-from os import environ, path
-from sys import argv
-
-from setuptools import find_packages, setup
-from setuptools.command.test import test as TestCommand
-
-
-class TestCommandExtension(TestCommand):
- """Run pytest tests."""
-
- def run_tests(self):
- """Invoke pytest."""
- import pytest
-
- exit(pytest.main(["--doctest-modules"]))
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """Custom setuptools command class for running linters."""
-
- description = "Run linters"
-
- def run(self):
- """Run linter shell commands."""
- lint_commands = [
- # formatter:
- "black --line-length 79 --check --diff src test setup.py".split(),
- # style guide checker (formerly pep8):
- "pycodestyle src test setup.py".split(),
- # docstring style checker:
- "pydocstyle src test setup.py".split(),
- # static type checker:
- "mypy src test setup.py".split(),
- # security issue checker:
- "bandit -r src ./setup.py".split(),
- # HACK: ensure json schemas don't differ from the authoritative
- # copies: this is a hack. ideally we would symlink to the
- # authoritative copies, but a problem with setuptools is preventing
- # it from following symlinks when gathering package_data. see
- # https://github.com/pypa/setuptools/issues/415.
- (
- "diff src/zero_ex/json_schemas/schemas"
- + " ../../packages/json-schemas/schemas"
- ).split(),
- # general linter:
- "pylint src test setup.py".split(),
- # pylint takes relatively long to run, so it runs last, to enable
- # fast failures.
- ]
-
- # tell mypy where to find interface stubs for 3rd party libs
- environ["MYPYPATH"] = path.join(
- path.dirname(path.realpath(argv[0])), "stubs"
- )
-
- for lint_command in lint_commands:
- print(
- "Running lint command `", " ".join(lint_command).strip(), "`"
- )
- subprocess.check_call(lint_command) # nosec
-
-
-class CleanCommandExtension(clean):
- """Custom command to do custom cleanup."""
-
- def run(self):
- """Run the regular clean, followed by our custom commands."""
- super().run()
- rmtree("dist", ignore_errors=True)
- rmtree(".mypy_cache", ignore_errors=True)
- rmtree(".tox", ignore_errors=True)
- rmtree(".pytest_cache", ignore_errors=True)
- rmtree("src/*.egg-info", ignore_errors=True)
-
-
-class TestPublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to test.pypi.org."""
-
- description = (
- "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
- )
-
- def run(self):
- """Run twine to upload to test.pypi.org."""
- subprocess.check_call( # nosec
- (
- "twine upload --repository-url https://test.pypi.org/legacy/"
- + " --verbose dist/*"
- ).split()
- )
-
-
-class PublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
-
- def run(self):
- """Run twine to upload to pypi.org."""
- subprocess.check_call("twine upload dist/*".split()) # nosec
-
-
-class PublishDocsCommand(distutils.command.build_py.build_py):
- """Custom command to publish docs to S3."""
-
- description = (
- "Publish docs to "
- + "http://0x-json-schemas-py.s3-website-us-east-1.amazonaws.com/"
- )
-
- def run(self):
- """Run npm package `discharge` to build & upload docs."""
- subprocess.check_call("discharge deploy".split()) # nosec
-
-
-with open("README.md", "r") as file_handle:
- README_MD = file_handle.read()
-
-
-setup(
- name="0x-json-schemas",
- version="1.0.0",
- description="JSON schemas for 0x applications",
- long_description=README_MD,
- long_description_content_type="text/markdown",
- url=(
- "https://github.com/0xProject/0x-monorepo/tree/development"
- + "/python-packages/json_schemas"
- ),
- author="F. Eugene Aumson",
- author_email="feuGeneA@users.noreply.github.com",
- cmdclass={
- "clean": CleanCommandExtension,
- "lint": LintCommand,
- "test": TestCommandExtension,
- "test_publish": TestPublishCommand,
- "publish": PublishCommand,
- "publish_docs": PublishDocsCommand,
- },
- install_requires=["jsonschema", "mypy_extensions", "stringcase"],
- extras_require={
- "dev": [
- "bandit",
- "black",
- "coverage",
- "coveralls",
- "mypy",
- "mypy_extensions",
- "pycodestyle",
- "pydocstyle",
- "pylint",
- "pytest",
- "sphinx",
- "tox",
- "twine",
- ]
- },
- python_requires=">=3.6, <4",
- package_data={"zero_ex.json_schemas": ["py.typed", "schemas/*"]},
- package_dir={"": "src"},
- license="Apache 2.0",
- keywords=(
- "ethereum cryptocurrency 0x decentralized blockchain dex exchange"
- ),
- namespace_packages=["zero_ex"],
- packages=find_packages("src"),
- classifiers=[
- "Development Status :: 2 - Pre-Alpha",
- "Intended Audience :: Developers",
- "Intended Audience :: Financial and Insurance Industry",
- "License :: OSI Approved :: Apache Software License",
- "Natural Language :: English",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Office/Business :: Financial",
- "Topic :: Other/Nonlisted Topic",
- "Topic :: Security :: Cryptography",
- "Topic :: Software Development :: Libraries",
- "Topic :: Utilities",
- ],
- zip_safe=False, # required per mypy
- command_options={
- "build_sphinx": {
- "source_dir": ("setup.py", "src"),
- "build_dir": ("setup.py", "build/docs"),
- }
- },
-)
diff --git a/python-packages/json_schemas/src/conf.py b/python-packages/json_schemas/src/conf.py
deleted file mode 100644
index 1ae1493e3..000000000
--- a/python-packages/json_schemas/src/conf.py
+++ /dev/null
@@ -1,54 +0,0 @@
-"""Configuration file for the Sphinx documentation builder."""
-
-# Reference: http://www.sphinx-doc.org/en/master/config
-
-from typing import List
-import pkg_resources
-
-
-# pylint: disable=invalid-name
-# because these variables are not named in upper case, as globals should be.
-
-project = "0x-json-schemas"
-# pylint: disable=redefined-builtin
-copyright = "2018, ZeroEx, Intl."
-author = "F. Eugene Aumson"
-version = pkg_resources.get_distribution("0x-json-schemas").version
-release = "" # The full version, including alpha/beta/rc tags
-
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx.ext.viewcode",
-]
-
-templates_path = ["doc_templates"]
-
-source_suffix = ".rst"
-# eg: source_suffix = [".rst", ".md"]
-
-master_doc = "index" # The master toctree document.
-
-language = None
-
-exclude_patterns: List[str] = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
-
-html_theme = "alabaster"
-
-html_static_path = ["doc_static"]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "json_schemaspydoc"
-
-# -- Extension configuration:
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/": None}
diff --git a/python-packages/json_schemas/src/doc_static/.gitkeep b/python-packages/json_schemas/src/doc_static/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/src/doc_static/.gitkeep
+++ /dev/null
diff --git a/python-packages/json_schemas/src/index.rst b/python-packages/json_schemas/src/index.rst
deleted file mode 100644
index 3de809aa3..000000000
--- a/python-packages/json_schemas/src/index.rst
+++ /dev/null
@@ -1,18 +0,0 @@
-.. source for the sphinx-generated build/docs/web/index.html
-
-Python zero_ex.json_schemas
-===========================
-
-.. toctree::
- :maxdepth: 2
- :caption: Contents:
-
-.. automodule:: zero_ex.json_schemas
- :members:
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
diff --git a/python-packages/json_schemas/src/zero_ex/__init__.py b/python-packages/json_schemas/src/zero_ex/__init__.py
deleted file mode 100644
index e90d833db..000000000
--- a/python-packages/json_schemas/src/zero_ex/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""0x Python API."""
-__import__("pkg_resources").declare_namespace(__name__)
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py b/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py
deleted file mode 100644
index 10c564b99..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/__init__.py
+++ /dev/null
@@ -1,83 +0,0 @@
-"""JSON schemas and associated utilities."""
-
-from os import path
-import json
-from typing import Mapping
-
-from pkg_resources import resource_string
-import jsonschema
-from stringcase import snakecase
-
-
-class _LocalRefResolver(jsonschema.RefResolver):
- """Resolve package-local JSON schema id's."""
-
- def __init__(self):
- """Initialize a new instance."""
- jsonschema.RefResolver.__init__(self, "", "")
-
- @staticmethod
- def resolve_from_url(url: str) -> str:
- """Resolve the given URL.
-
- :param url: a string representing the URL of the JSON schema to fetch.
- :returns: a string representing the deserialized JSON schema
- :raises jsonschema.ValidationError: when the resource associated with
- `url` does not exist.
- """
- ref = url.replace("file://", "")
- return json.loads(
- resource_string(
- "zero_ex.json_schemas",
- f"schemas/{snakecase(ref.lstrip('/'))}.json",
- )
- )
-
-
-# Instantiate the `_LocalRefResolver()` only once so that `assert_valid()` can
-# perform multiple schema validations without reading from disk the schema
-# every time.
-_LOCAL_RESOLVER = _LocalRefResolver()
-
-
-def assert_valid(data: Mapping, schema_id: str) -> None:
- """Validate the given `data` against the specified `schema`.
-
- :param data: Python dictionary to be validated as a JSON object.
- :param schema_id: id property of the JSON schema to validate against. Must
- be one of those listed in `the 0x JSON schema files
- <https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas/schemas>`_.
-
- Raises an exception if validation fails.
-
- >>> assert_valid(
- ... {'v': 27, 'r': '0x'+'f'*64, 's': '0x'+'f'*64},
- ... '/ecSignatureSchema',
- ... )
- """
- # noqa
-
- _, schema = _LOCAL_RESOLVER.resolve(schema_id)
- jsonschema.validate(data, schema, resolver=_LOCAL_RESOLVER)
-
-
-def assert_valid_json(data: str, schema_id: str) -> None:
- """Validate the given `data` against the specified `schema`.
-
- :param data: JSON string to be validated.
- :param schema_id: id property of the JSON schema to validate against. Must
- be one of those listed in `the 0x JSON schema files
- <https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas/schemas>`_.
-
- Raises an exception if validation fails.
-
- >>> assert_valid_json(
- ... r'''{
- ... "v": 27,
- ... "r": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
- ... "s": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"
- ... }''',
- ... '/ecSignatureSchema',
- ... )
- """ # noqa: E501 (line too long)
- assert_valid(json.loads(data), schema_id)
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/py.typed b/python-packages/json_schemas/src/zero_ex/json_schemas/py.typed
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/py.typed
+++ /dev/null
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/address_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/address_schema.json
deleted file mode 100644
index 0dc02d331..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/address_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/addressSchema",
- "type": "string",
- "pattern": "^0x[0-9a-f]{40}$"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/asset_pairs_request_opts_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/asset_pairs_request_opts_schema.json
deleted file mode 100644
index fad0bd371..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/asset_pairs_request_opts_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/AssetPairsRequestOptsSchema",
- "type": "object",
- "properties": {
- "assetDataA": { "$ref": "/hexSchema" },
- "assetDataB": { "$ref": "/hexSchema" }
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_param_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_param_schema.json
deleted file mode 100644
index ed4dd1e87..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_param_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/blockParamSchema",
- "oneOf": [
- {
- "type": "number"
- },
- {
- "enum": ["latest", "earliest", "pending"]
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_range_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_range_schema.json
deleted file mode 100644
index b14294649..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/block_range_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/blockRangeSchema",
- "properties": {
- "fromBlock": { "$ref": "/blockParamSchema" },
- "toBlock": { "$ref": "/blockParamSchema" }
- },
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/call_data_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/call_data_schema.json
deleted file mode 100644
index e5e6e3282..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/call_data_schema.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "id": "/callDataSchema",
- "properties": {
- "from": { "$ref": "/addressSchema" },
- "to": { "$ref": "/addressSchema" },
- "value": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gas": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gasPrice": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "data": {
- "type": "string",
- "pattern": "^0x[0-9a-f]*$"
- },
- "nonce": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": [],
- "type": "object",
- "additionalProperties": false
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_parameter_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_parameter_schema.json
deleted file mode 100644
index 0c08ec240..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_parameter_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/ecSignatureParameterSchema",
- "type": "string",
- "pattern": "^0[xX][0-9A-Fa-f]{64}$"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_schema.json
deleted file mode 100644
index 52ccfe7bb..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/ec_signature_schema.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "id": "/ecSignatureSchema",
- "properties": {
- "v": {
- "type": "number",
- "minimum": 27,
- "maximum": 28
- },
- "r": { "$ref": "/ecSignatureParameterSchema" },
- "s": { "$ref": "/ecSignatureParameterSchema" }
- },
- "required": ["v", "r", "s"],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/eip712_typed_data_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/eip712_typed_data_schema.json
deleted file mode 100644
index 8efd6de44..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/eip712_typed_data_schema.json
+++ /dev/null
@@ -1,28 +0,0 @@
-{
- "id": "/eip712TypedDataSchema",
- "type": "object",
- "properties": {
- "types": {
- "type": "object",
- "properties": {
- "EIP712Domain": { "type": "array" }
- },
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": { "type": "string" },
- "type": { "type": "string" }
- },
- "required": ["name", "type"]
- }
- },
- "required": ["EIP712Domain"]
- },
- "primaryType": { "type": "string" },
- "domain": { "type": "object" },
- "message": { "type": "object" }
- },
- "required": ["types", "primaryType", "domain", "message"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/hex_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/hex_schema.json
deleted file mode 100644
index f37815d5b..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/hex_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/hexSchema",
- "type": "string",
- "pattern": "^0x(([0-9a-f][0-9a-f])+)?$"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/index_filter_values_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/index_filter_values_schema.json
deleted file mode 100644
index bec00d79e..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/index_filter_values_schema.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "id": "/indexFilterValuesSchema",
- "additionalProperties": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/addressSchema" }, { "$ref": "/orderHashSchema" }]
- },
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/js_number_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/js_number_schema.json
deleted file mode 100644
index 7df1c4747..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/js_number_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/jsNumberSchema",
- "type": "number",
- "minimum": 0
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/number_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/number_schema.json
deleted file mode 100644
index a48f3e8cf..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/number_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/numberSchema",
- "type": "string",
- "pattern": "^\\d+(\\.\\d+)?$"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_cancel_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_cancel_schema.json
deleted file mode 100644
index 8d0999941..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_cancel_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderCancellationRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "order": { "$ref": "/orderSchema" },
- "takerTokenCancelAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["order", "takerTokenCancelAmount"],
- "type": "object"
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_config_request_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_config_request_schema.json
deleted file mode 100644
index 19b043e7f..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_config_request_schema.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "id": "/OrderConfigRequestSchema",
- "type": "object",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "exchangeAddress",
- "expirationTimeSeconds"
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_or_kill_requests_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_or_kill_requests_schema.json
deleted file mode 100644
index 73bbf20bb..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_or_kill_requests_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderFillOrKillRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" },
- "fillTakerAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["signedOrder", "fillTakerAmount"],
- "type": "object"
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_requests_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_requests_schema.json
deleted file mode 100644
index d06fb19a2..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_fill_requests_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/orderFillRequestsSchema",
- "type": "array",
- "items": {
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" },
- "takerTokenFillAmount": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["signedOrder", "takerTokenFillAmount"],
- "type": "object"
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_hash_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_hash_schema.json
deleted file mode 100644
index 4a770579f..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_hash_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/orderHashSchema",
- "type": "string",
- "pattern": "^0x[0-9a-fA-F]{64}$"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_schema.json
deleted file mode 100644
index c70b9e2dd..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_schema.json
+++ /dev/null
@@ -1,34 +0,0 @@
-{
- "id": "/orderSchema",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerFee": { "$ref": "/wholeNumberSchema" },
- "takerFee": { "$ref": "/wholeNumberSchema" },
- "senderAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "salt": { "$ref": "/wholeNumberSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerFee",
- "takerFee",
- "senderAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "salt",
- "exchangeAddress",
- "feeRecipientAddress",
- "expirationTimeSeconds"
- ],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_request_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_request_schema.json
deleted file mode 100644
index b0c419f94..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_request_schema.json
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- "id": "/orderWatcherWebSocketRequestSchema",
- "type": "object",
- "definitions": {
- "signedOrderParam": {
- "type": "object",
- "properties": {
- "signedOrder": { "$ref": "/signedOrderSchema" }
- },
- "required": ["signedOrder"]
- },
- "orderHashParam": {
- "type": "object",
- "properties": {
- "orderHash": { "$ref": "/hexSchema" }
- },
- "required": ["orderHash"]
- }
- },
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["ADD_ORDER"] },
- "params": { "$ref": "#/definitions/signedOrderParam" }
- },
- "required": ["id", "jsonrpc", "method", "params"]
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["REMOVE_ORDER"] },
- "params": { "$ref": "#/definitions/orderHashParam" }
- },
- "required": ["id", "jsonrpc", "method", "params"]
- },
- {
- "type": "object",
- "properties": {
- "id": { "type": "number" },
- "jsonrpc": { "type": "string" },
- "method": { "enum": ["GET_STATS"] },
- "params": {}
- },
- "required": ["id", "jsonrpc", "method"]
- }
- ]
-} \ No newline at end of file
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_utf8_message_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
deleted file mode 100644
index 154d6d754..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/order_watcher_web_socket_utf8_message_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/orderWatcherWebSocketUtf8MessageSchema",
- "properties": {
- "utf8Data": { "type": "string" }
- },
- "required": [
- "utf8Data"
- ],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orderbook_request_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orderbook_request_schema.json
deleted file mode 100644
index 5ce6e8ab0..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orderbook_request_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/OrderbookRequestSchema",
- "type": "object",
- "properties": {
- "baseAssetData": { "$ref": "/hexSchema" },
- "quoteAssetData": { "$ref": "/hexSchema" }
- },
- "required": ["baseAssetData", "quoteAssetData"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_request_opts_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_request_opts_schema.json
deleted file mode 100644
index 4c1b9b4e9..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_request_opts_schema.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "id": "/OrdersRequestOptsSchema",
- "type": "object",
- "properties": {
- "makerAssetProxyId": { "$ref": "/hexSchema" },
- "takerAssetProxyId": { "$ref": "/hexSchema" },
- "makerAssetAddress": { "$ref": "/addressSchema" },
- "takerAssetAddress": { "$ref": "/addressSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "senderAddress": { "$ref": "/addressSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "traderAssetData": { "$ref": "/hexSchema" },
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "traderAddress": { "$ref": "/addressSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" }
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_schema.json
deleted file mode 100644
index 1e1c6a875..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/ordersSchema",
- "type": "array",
- "items": { "$ref": "/orderSchema" }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paged_request_opts_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paged_request_opts_schema.json
deleted file mode 100644
index f143c28b0..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paged_request_opts_schema.json
+++ /dev/null
@@ -1,8 +0,0 @@
-{
- "id": "/PagedRequestOptsSchema",
- "type": "object",
- "properties": {
- "page": { "type": "number" },
- "perPage": { "type": "number" }
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paginated_collection_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paginated_collection_schema.json
deleted file mode 100644
index 9dcedf5b4..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/paginated_collection_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/paginatedCollectionSchema",
- "type": "object",
- "properties": {
- "total": { "type": "number" },
- "perPage": { "type": "number" },
- "page": { "type": "number" }
- },
- "required": ["total", "perPage", "page"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_response_schema.json
deleted file mode 100644
index d1150d3db..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_response_schema.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "id": "/relayerApiAssetDataPairsResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": { "$ref": "/relayerApiAssetDataPairsSchema" }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_schema.json
deleted file mode 100644
index 62d4745b8..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_pairs_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/relayerApiAssetDataPairsSchema",
- "type": "array",
- "items": {
- "properties": {
- "assetDataA": { "$ref": "/relayerApiAssetDataTradeInfoSchema" },
- "assetDataB": { "$ref": "/relayerApiAssetDataTradeInfoSchema" }
- },
- "required": ["assetDataA", "assetDataB"],
- "type": "object"
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_trade_info_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_trade_info_schema.json
deleted file mode 100644
index e0f274c5d..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_asset_data_trade_info_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiAssetDataTradeInfoSchema",
- "type": "object",
- "properties": {
- "assetData": { "$ref": "/hexSchema" },
- "minAmount": { "$ref": "/wholeNumberSchema" },
- "maxAmount": { "$ref": "/wholeNumberSchema" },
- "precision": { "type": "number" }
- },
- "required": ["assetData"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_error_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_error_response_schema.json
deleted file mode 100644
index be4659b0b..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_error_response_schema.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "id": "/relayerApiErrorResponseSchema",
- "type": "object",
- "properties": {
- "code": { "type": "integer", "minimum": 100, "maximum": 103 },
- "reason": { "type": "string" },
- "validationErrors": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "field": { "type": "string" },
- "code": { "type": "integer", "minimum": 1000, "maximum": 1006 },
- "reason": { "type": "string" }
- },
- "required": ["field", "code", "reason"]
- }
- }
- },
- "required": ["code", "reason"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_fee_recipients_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_fee_recipients_response_schema.json
deleted file mode 100644
index c73506dbb..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_fee_recipients_response_schema.json
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "id": "/relayerApiFeeRecipientsResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": {
- "type": "array",
- "items": { "$ref": "/addressSchema" }
- }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_payload_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_payload_schema.json
deleted file mode 100644
index f4583fc62..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_payload_schema.json
+++ /dev/null
@@ -1,24 +0,0 @@
-{
- "id": "/relayerApiOrderConfigPayloadSchema",
- "type": "object",
- "properties": {
- "makerAddress": { "$ref": "/addressSchema" },
- "takerAddress": { "$ref": "/addressSchema" },
- "makerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "takerAssetAmount": { "$ref": "/wholeNumberSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "exchangeAddress": { "$ref": "/addressSchema" },
- "expirationTimeSeconds": { "$ref": "/wholeNumberSchema" }
- },
- "required": [
- "makerAddress",
- "takerAddress",
- "makerAssetAmount",
- "takerAssetAmount",
- "makerAssetData",
- "takerAssetData",
- "exchangeAddress",
- "expirationTimeSeconds"
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_response_schema.json
deleted file mode 100644
index 8193861e1..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_config_response_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrderConfigResponseSchema",
- "type": "object",
- "properties": {
- "makerFee": { "$ref": "/wholeNumberSchema" },
- "takerFee": { "$ref": "/wholeNumberSchema" },
- "feeRecipientAddress": { "$ref": "/addressSchema" },
- "senderAddress": { "$ref": "/addressSchema" }
- },
- "required": ["makerFee", "takerFee", "feeRecipientAddress", "senderAddress"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_schema.json
deleted file mode 100644
index e0f6539b9..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_order_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/relayerApiOrderSchema",
- "type": "object",
- "properties": {
- "order": { "$ref": "/orderSchema" },
- "metaData": { "type": "object" }
- },
- "required": ["order", "metaData"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orderbook_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orderbook_response_schema.json
deleted file mode 100644
index b44f2a740..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orderbook_response_schema.json
+++ /dev/null
@@ -1,9 +0,0 @@
-{
- "id": "/relayerApiOrderbookResponseSchema",
- "type": "object",
- "properties": {
- "bids": { "$ref": "/relayerApiOrdersResponseSchema" },
- "asks": { "$ref": "/relayerApiOrdersResponseSchema" }
- },
- "required": ["bids", "asks"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json
deleted file mode 100644
index 274ef1625..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_payload_schema.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelSubscribePayloadSchema",
- "type": "object",
- "properties": {
- "makerAssetProxyId": { "$ref": "/hexSchema" },
- "takerAssetProxyId": { "$ref": "/hexSchema" },
- "networkId": { "type": "number" },
- "makerAssetAddress": { "$ref": "/addressSchema" },
- "takerAssetAddress": { "$ref": "/addressSchema" },
- "makerAssetData": { "$ref": "/hexSchema" },
- "takerAssetData": { "$ref": "/hexSchema" },
- "traderAssetData": { "$ref": "/hexSchema" }
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_schema.json
deleted file mode 100644
index 29561d09f..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_subscribe_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelSubscribeSchema",
- "type": "object",
- "properties": {
- "type": { "enum": ["subscribe"] },
- "channel": { "enum": ["orders"] },
- "requestId": { "type": "string" },
- "payload": { "$ref": "/relayerApiOrdersChannelSubscribePayloadSchema" }
- },
- "required": ["type", "channel", "requestId"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_update_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_update_response_schema.json
deleted file mode 100644
index 239e7c586..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_channel_update_response_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/relayerApiOrdersChannelUpdateSchema",
- "type": "object",
- "properties": {
- "type": { "enum": ["update"] },
- "channel": { "enum": ["orders"] },
- "requestId": { "type": "string" },
- "payload": { "$ref": "/relayerApiOrdersSchema" }
- },
- "required": ["type", "channel", "requestId"]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_response_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_response_schema.json
deleted file mode 100644
index a5023a3fc..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_response_schema.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "id": "/relayerApiOrdersResponseSchema",
- "type": "object",
- "allOf": [
- { "$ref": "/paginatedCollectionSchema" },
- {
- "properties": {
- "records": { "$ref": "/relayerApiOrdersSchema" }
- },
- "required": ["records"]
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_schema.json
deleted file mode 100644
index 84e75cd04..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/relayer_api_orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/relayerApiOrdersSchema",
- "type": "array",
- "items": { "$ref": "/relayerApiOrderSchema" }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/request_opts_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/request_opts_schema.json
deleted file mode 100644
index 2206f5016..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/request_opts_schema.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "id": "/RequestOptsSchema",
- "type": "object",
- "properties": {
- "networkId": { "type": "number" }
- }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_order_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_order_schema.json
deleted file mode 100644
index 137ae4a24..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_order_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/signedOrderSchema",
- "allOf": [
- { "$ref": "/orderSchema" },
- {
- "properties": {
- "signature": { "$ref": "/hexSchema" }
- },
- "required": ["signature"]
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_orders_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_orders_schema.json
deleted file mode 100644
index e7c3a0b6c..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/signed_orders_schema.json
+++ /dev/null
@@ -1,5 +0,0 @@
-{
- "id": "/signedOrdersSchema",
- "type": "array",
- "items": { "$ref": "/signedOrderSchema" }
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/token_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/token_schema.json
deleted file mode 100644
index 31e41c4b8..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/token_schema.json
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "id": "/tokenSchema",
- "properties": {
- "name": { "type": "string" },
- "symbol": { "type": "string" },
- "decimals": { "type": "number" },
- "address": { "$ref": "/addressSchema" }
- },
- "required": ["name", "symbol", "decimals", "address"],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/tx_data_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/tx_data_schema.json
deleted file mode 100644
index 8c3daba4e..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/tx_data_schema.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "id": "/txDataSchema",
- "properties": {
- "from": { "$ref": "/addressSchema" },
- "to": { "$ref": "/addressSchema" },
- "value": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gas": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "gasPrice": {
- "oneOf": [{ "$ref": "/numberSchema" }, { "$ref": "/jsNumberSchema" }]
- },
- "data": {
- "type": "string",
- "pattern": "^0x[0-9a-f]*$"
- },
- "nonce": {
- "type": "number",
- "minimum": 0
- }
- },
- "required": ["from"],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/whole_number_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/whole_number_schema.json
deleted file mode 100644
index aa469954c..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/whole_number_schema.json
+++ /dev/null
@@ -1,12 +0,0 @@
-{
- "id": "/wholeNumberSchema",
- "anyOf": [
- {
- "type": "string",
- "pattern": "^\\d+$"
- },
- {
- "type": "integer"
- }
- ]
-}
diff --git a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/zero_ex_transaction_schema.json b/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/zero_ex_transaction_schema.json
deleted file mode 100644
index 0c714f14d..000000000
--- a/python-packages/json_schemas/src/zero_ex/json_schemas/schemas/zero_ex_transaction_schema.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "id": "/zeroExTransactionSchema",
- "properties": {
- "data": { "$ref": "/hexSchema" },
- "signerAddress": { "$ref": "/addressSchema" },
- "salt": { "$ref": "/wholeNumberSchema" }
- },
- "required": ["data", "salt", "signerAddress"],
- "type": "object"
-}
diff --git a/python-packages/json_schemas/stubs/distutils/__init__.pyi b/python-packages/json_schemas/stubs/distutils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/stubs/distutils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/json_schemas/stubs/distutils/command/__init__.pyi b/python-packages/json_schemas/stubs/distutils/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/stubs/distutils/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/json_schemas/stubs/distutils/command/clean.pyi b/python-packages/json_schemas/stubs/distutils/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/json_schemas/stubs/distutils/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/json_schemas/stubs/jsonschema/__init__.pyi b/python-packages/json_schemas/stubs/jsonschema/__init__.pyi
deleted file mode 100644
index 442e2f65e..000000000
--- a/python-packages/json_schemas/stubs/jsonschema/__init__.pyi
+++ /dev/null
@@ -1,11 +0,0 @@
-from typing import Any, Dict, Tuple
-
-
-class RefResolver:
- def resolve(self, url: str) -> Tuple[str, Dict]:
- ...
-
-
-class ValidationError(Exception): pass
-
-def validate(instance: Any, schema: Dict, cls=None, *args, **kwargs) -> None: pass
diff --git a/python-packages/json_schemas/stubs/jsonschema/exceptions.pyi b/python-packages/json_schemas/stubs/jsonschema/exceptions.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/stubs/jsonschema/exceptions.pyi
+++ /dev/null
diff --git a/python-packages/json_schemas/stubs/pytest/__init__.pyi b/python-packages/json_schemas/stubs/pytest/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/stubs/pytest/__init__.pyi
+++ /dev/null
diff --git a/python-packages/json_schemas/stubs/pytest/raises.pyi b/python-packages/json_schemas/stubs/pytest/raises.pyi
deleted file mode 100644
index 2e3b29f3d..000000000
--- a/python-packages/json_schemas/stubs/pytest/raises.pyi
+++ /dev/null
@@ -1 +0,0 @@
-def raises(exception: Exception) -> ExceptionInfo: ...
diff --git a/python-packages/json_schemas/stubs/setuptools/__init__.pyi b/python-packages/json_schemas/stubs/setuptools/__init__.pyi
deleted file mode 100644
index 8ea8d32b7..000000000
--- a/python-packages/json_schemas/stubs/setuptools/__init__.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from distutils.dist import Distribution
-from typing import Any, List
-
-def setup(**attrs: Any) -> Distribution: ...
-
-class Command: ...
-
-def find_packages(where: str) -> List[str]: ...
diff --git a/python-packages/json_schemas/stubs/setuptools/command/__init__.pyi b/python-packages/json_schemas/stubs/setuptools/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/json_schemas/stubs/setuptools/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/json_schemas/stubs/setuptools/command/test.pyi b/python-packages/json_schemas/stubs/setuptools/command/test.pyi
deleted file mode 100644
index c5ec770ad..000000000
--- a/python-packages/json_schemas/stubs/setuptools/command/test.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import Command
-
-class test(Command): ...
diff --git a/python-packages/json_schemas/stubs/stringcase/__init__.pyi b/python-packages/json_schemas/stubs/stringcase/__init__.pyi
deleted file mode 100644
index 56d784cf5..000000000
--- a/python-packages/json_schemas/stubs/stringcase/__init__.pyi
+++ /dev/null
@@ -1,2 +0,0 @@
-def snakecase(_: str):
- ...
diff --git a/python-packages/json_schemas/test/__init__.py b/python-packages/json_schemas/test/__init__.py
deleted file mode 100644
index ce724e180..000000000
--- a/python-packages/json_schemas/test/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Tests of zero_ex.json_schemas."""
diff --git a/python-packages/json_schemas/test/test_json_schemas.py b/python-packages/json_schemas/test/test_json_schemas.py
deleted file mode 100644
index 1d1efdd12..000000000
--- a/python-packages/json_schemas/test/test_json_schemas.py
+++ /dev/null
@@ -1,42 +0,0 @@
-"""Tests of zero_ex.json_schemas"""
-
-
-from zero_ex.order_utils import make_empty_order, order_to_jsdict
-from zero_ex.json_schemas import _LOCAL_RESOLVER, assert_valid
-
-
-NULL_ADDRESS = "0x0000000000000000000000000000000000000000"
-
-EMPTY_ORDER = {
- "makerAddress": NULL_ADDRESS,
- "takerAddress": NULL_ADDRESS,
- "senderAddress": NULL_ADDRESS,
- "feeRecipientAddress": NULL_ADDRESS,
- "makerAssetData": NULL_ADDRESS,
- "takerAssetData": NULL_ADDRESS,
- "salt": "0",
- "makerFee": "0",
- "takerFee": "0",
- "makerAssetAmount": "0",
- "takerAssetAmount": "0",
- "expirationTimeSeconds": "0",
- "exchangeAddress": NULL_ADDRESS,
-}
-
-
-def test_assert_valid_caches_resources():
- """Test that the JSON ref resolver in `assert_valid()` caches resources
-
- In order to test the cache we much access the private class of
- `json_schemas` and reset the LRU cache on `_LocalRefResolver`.
- For this to happen, we need to disable errror `W0212`
- on _LOCAL_RESOLVER
- """
- _LOCAL_RESOLVER._remote_cache.cache_clear() # pylint: disable=W0212
-
- assert_valid(order_to_jsdict(make_empty_order()), "/orderSchema")
- cache_info = (
- _LOCAL_RESOLVER._remote_cache.cache_info() # pylint: disable=W0212
- )
- assert cache_info.currsize == 4
- assert cache_info.hits > 0
diff --git a/python-packages/json_schemas/tox.ini b/python-packages/json_schemas/tox.ini
deleted file mode 100644
index 1d5de646e..000000000
--- a/python-packages/json_schemas/tox.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-# tox (https://tox.readthedocs.io/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py37
-
-[testenv]
-commands =
- pip install -e .[dev]
- python setup.py test
-
-[testenv:run_tests_against_test_deployment]
-commands =
- # install dependencies from real PyPI
- pip install jsonschema mypy_extensions pytest
- # install package-under-test from test PyPI
- pip install --index-url https://test.pypi.org/legacy/ 0x-json-schemas
- pytest test
-
-[testenv:run_tests_against_deployment]
-commands =
- pip install 0x-json-schemas
- pytest test
diff --git a/python-packages/lint b/python-packages/lint
deleted file mode 100755
index 0974f273c..000000000
--- a/python-packages/lint
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-"""Script to run linters against local copy of all components."""
-
-from os import path
-import subprocess
-
-subprocess.check_call(
- (
- f"{path.join('.', 'cmd_pkgs_in_dep_order.py')}"
- + f" {path.join('.', 'setup.py')} lint"
- ).split()
-)
diff --git a/python-packages/order_utils/.discharge.json b/python-packages/order_utils/.discharge.json
deleted file mode 100644
index 2b14aa023..000000000
--- a/python-packages/order_utils/.discharge.json
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "domain": "0x-order-utils-py",
- "build_command": "python setup.py build_sphinx",
- "upload_directory": "build/docs/html",
- "index_key": "index.html",
- "error_key": "index.html",
- "trailing_slashes": true,
- "cache": 3600,
- "aws_profile": "default",
- "aws_region": "us-east-1",
- "cdn": false,
- "dns_configured": true
-}
diff --git a/python-packages/order_utils/.pylintrc b/python-packages/order_utils/.pylintrc
deleted file mode 100644
index 937bc6313..000000000
--- a/python-packages/order_utils/.pylintrc
+++ /dev/null
@@ -1,3 +0,0 @@
-[MESSAGES CONTROL]
-disable=C0330,line-too-long,fixme,too-few-public-methods,too-many-ancestors
-# C0330 is "bad hanging indent". we use indents per `black`.
diff --git a/python-packages/order_utils/LICENSE b/python-packages/order_utils/LICENSE
deleted file mode 100644
index 9096fefaa..000000000
--- a/python-packages/order_utils/LICENSE
+++ /dev/null
@@ -1,13 +0,0 @@
-Copyright 2017 ZeroEx Inc.
-
-Licensed under the Apache License, Version 2.0 (the "License");
-you may not use this file except in compliance with the License.
-You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License. \ No newline at end of file
diff --git a/python-packages/order_utils/README.md b/python-packages/order_utils/README.md
deleted file mode 100644
index 2181c7a11..000000000
--- a/python-packages/order_utils/README.md
+++ /dev/null
@@ -1,45 +0,0 @@
-## 0x-order-utils
-
-0x order-related utilities for those developing on top of 0x protocol.
-
-Read the [documentation](http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/)
-
-## Installing
-
-```bash
-pip install 0x-order-utils
-```
-
-## 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 Code and Dependencies
-
-Ensure that you have installed Python >=3.6 and Docker. Then:
-
-```bash
-pip install -e .[dev]
-```
-
-### Test
-
-Tests depend on a running ganache instance with the 0x contracts deployed in it. For convenience, a docker container is provided that has ganache-cli and a snapshot containing the necessary contracts. A shortcut is provided to run that docker container: `./setup.py ganache`. With that running, the tests can be run with `./setup.py test`.
-
-### Clean
-
-`./setup.py clean --all`
-
-### Lint
-
-`./setup.py lint`
-
-### Build Documentation
-
-`./setup.py build_sphinx`
-
-### More
-
-See `./setup.py --help-commands` for more info.
diff --git a/python-packages/order_utils/package.json b/python-packages/order_utils/package.json
deleted file mode 100644
index 125ca71e0..000000000
--- a/python-packages/order_utils/package.json
+++ /dev/null
@@ -1,17 +0,0 @@
-{
- "comment": "this file exists as an entry point to building this project, specifically for humans that are familiar with yarn and already have it installed. this file is not used in any automation or CI.",
- "scripts": {
- "install": "pip install -e .[dev]",
- "build": "python setup.py build && yarn build:docs",
- "build:docs": "python setup.py build_sphinx && sphinx-apidoc -o build/docs/api src",
- "test:comment": "test in local environment. to test in all environments, use test:all",
- "test": "python setup.py test",
- "test:all": "tox",
- "test:coverage": "coverage run setup.py test && coveralls",
- "lint": "python setup.py lint",
- "clean": "python setup.py clean"
- },
- "dependencies:comment": "managed in setup.py",
- "devDependencies:comment": "managed in setup.py",
- "license": "Apache-2.0"
-}
diff --git a/python-packages/order_utils/setup.py b/python-packages/order_utils/setup.py
deleted file mode 100755
index 6f9465680..000000000
--- a/python-packages/order_utils/setup.py
+++ /dev/null
@@ -1,230 +0,0 @@
-#!/usr/bin/env python
-
-"""setuptools module for order_utils package."""
-
-import subprocess # nosec
-from shutil import rmtree
-from os import environ, path
-from pathlib import Path
-from sys import argv
-
-from distutils.command.clean import clean
-import distutils.command.build_py
-from setuptools import find_packages, setup
-from setuptools.command.test import test as TestCommand
-
-
-class TestCommandExtension(TestCommand):
- """Run pytest tests."""
-
- def run_tests(self):
- """Invoke pytest."""
- import pytest
-
- exit(pytest.main(["--doctest-modules"]))
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """Custom setuptools command class for running linters."""
-
- description = "Run linters"
-
- def run(self):
- """Run linter shell commands."""
- lint_commands = [
- # formatter:
- "black --line-length 79 --check --diff src test setup.py".split(),
- # style guide checker (formerly pep8):
- "pycodestyle src test setup.py".split(),
- # docstring style checker:
- "pydocstyle src test setup.py".split(),
- # static type checker:
- "mypy src test setup.py".split(),
- # security issue checker:
- "bandit -r src ./setup.py".split(),
- # general linter:
- "pylint src test setup.py".split(),
- # pylint takes relatively long to run, so it runs last, to enable
- # fast failures.
- ]
-
- # tell mypy where to find interface stubs for 3rd party libs
- environ["MYPYPATH"] = path.join(
- path.dirname(path.realpath(argv[0])), "stubs"
- )
-
- # HACK(gene): until eth_abi releases
- # https://github.com/ethereum/eth-abi/pull/107 , we need to simply
- # create an empty file `py.typed` in the eth_abi package directory.
- import eth_abi
-
- eth_abi_dir = path.dirname(path.realpath(eth_abi.__file__))
- Path(path.join(eth_abi_dir, "py.typed")).touch()
-
- # HACK(gene): until eth_utils fixes
- # https://github.com/ethereum/eth-utils/issues/140 , we need to simply
- # create an empty file `py.typed` in the eth_abi package directory.
- import eth_utils
-
- eth_utils_dir = path.dirname(path.realpath(eth_utils.__file__))
- Path(path.join(eth_utils_dir, "py.typed")).touch()
-
- for lint_command in lint_commands:
- print(
- "Running lint command `", " ".join(lint_command).strip(), "`"
- )
- subprocess.check_call(lint_command) # nosec
-
-
-class CleanCommandExtension(clean):
- """Custom command to do custom cleanup."""
-
- def run(self):
- """Run the regular clean, followed by our custom commands."""
- super().run()
- rmtree("dist", ignore_errors=True)
- rmtree(".mypy_cache", ignore_errors=True)
- rmtree(".tox", ignore_errors=True)
- rmtree(".pytest_cache", ignore_errors=True)
- rmtree("src/0x_order_utils.egg-info", ignore_errors=True)
-
-
-class TestPublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to test.pypi.org."""
-
- description = (
- "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
- )
-
- def run(self):
- """Run twine to upload to test.pypi.org."""
- subprocess.check_call( # nosec
- (
- "twine upload --repository-url https://test.pypi.org/legacy/"
- + " --verbose dist/*"
- ).split()
- )
-
-
-class PublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
-
- def run(self):
- """Run twine to upload to pypi.org."""
- subprocess.check_call("twine upload dist/*".split()) # nosec
-
-
-class PublishDocsCommand(distutils.command.build_py.build_py):
- """Custom command to publish docs to S3."""
-
- description = (
- "Publish docs to "
- + "http://0x-order-utils-py.s3-website-us-east-1.amazonaws.com/"
- )
-
- def run(self):
- """Run npm package `discharge` to build & upload docs."""
- subprocess.check_call("discharge deploy".split()) # nosec
-
-
-class GanacheCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Run ganache daemon to support tests."
-
- def run(self):
- """Run ganache."""
- cmd_line = (
- "docker run -d -p 8545:8545 0xorg/ganache-cli:2.2.2"
- ).split()
- subprocess.call(cmd_line) # nosec
-
-
-with open("README.md", "r") as file_handle:
- README_MD = file_handle.read()
-
-
-setup(
- name="0x-order-utils",
- version="1.0.1",
- description="Order utilities for 0x applications",
- long_description=README_MD,
- long_description_content_type="text/markdown",
- url="https://github.com/0xproject/0x-monorepo/python-packages/order_utils",
- author="F. Eugene Aumson",
- author_email="feuGeneA@users.noreply.github.com",
- cmdclass={
- "clean": CleanCommandExtension,
- "lint": LintCommand,
- "test": TestCommandExtension,
- "test_publish": TestPublishCommand,
- "publish": PublishCommand,
- "publish_docs": PublishDocsCommand,
- "ganache": GanacheCommand,
- },
- install_requires=[
- "0x-contract-addresses",
- "0x-contract-artifacts",
- "0x-json-schemas",
- "eth-abi",
- "eth_utils",
- "hypothesis>=3.31.2", # HACK! this is web3's dependency!
- # above works around https://github.com/ethereum/web3.py/issues/1179
- "mypy_extensions",
- "web3",
- ],
- extras_require={
- "dev": [
- "bandit",
- "black",
- "coverage",
- "coveralls",
- "mypy",
- "mypy_extensions",
- "pycodestyle",
- "pydocstyle",
- "pylint",
- "pytest",
- "sphinx",
- "sphinx-autodoc-typehints",
- "tox",
- "twine",
- ]
- },
- python_requires=">=3.6, <4",
- package_data={"zero_ex.order_utils": ["py.typed"]},
- package_dir={"": "src"},
- license="Apache 2.0",
- keywords=(
- "ethereum cryptocurrency 0x decentralized blockchain dex exchange"
- ),
- namespace_packages=["zero_ex"],
- packages=find_packages("src"),
- classifiers=[
- "Development Status :: 2 - Pre-Alpha",
- "Intended Audience :: Developers",
- "Intended Audience :: Financial and Insurance Industry",
- "License :: OSI Approved :: Apache Software License",
- "Natural Language :: English",
- "Operating System :: OS Independent",
- "Programming Language :: Python",
- "Programming Language :: Python :: 3 :: Only",
- "Programming Language :: Python :: 3.6",
- "Programming Language :: Python :: 3.7",
- "Topic :: Internet :: WWW/HTTP",
- "Topic :: Office/Business :: Financial",
- "Topic :: Other/Nonlisted Topic",
- "Topic :: Security :: Cryptography",
- "Topic :: Software Development :: Libraries",
- "Topic :: Utilities",
- ],
- zip_safe=False, # required per mypy
- command_options={
- "build_sphinx": {
- "source_dir": ("setup.py", "src"),
- "build_dir": ("setup.py", "build/docs"),
- }
- },
-)
diff --git a/python-packages/order_utils/src/conf.py b/python-packages/order_utils/src/conf.py
deleted file mode 100644
index d8f56b29e..000000000
--- a/python-packages/order_utils/src/conf.py
+++ /dev/null
@@ -1,55 +0,0 @@
-"""Configuration file for the Sphinx documentation builder."""
-
-# Reference: http://www.sphinx-doc.org/en/master/config
-
-from typing import List
-import pkg_resources
-
-
-# pylint: disable=invalid-name
-# because these variables are not named in upper case, as globals should be.
-
-project = "0x-order-utils"
-# pylint: disable=redefined-builtin
-copyright = "2018, ZeroEx, Intl."
-author = "F. Eugene Aumson"
-version = pkg_resources.get_distribution("0x-order-utils").version
-release = "" # The full version, including alpha/beta/rc tags
-
-extensions = [
- "sphinx.ext.autodoc",
- "sphinx.ext.doctest",
- "sphinx.ext.intersphinx",
- "sphinx.ext.coverage",
- "sphinx.ext.viewcode",
- "sphinx_autodoc_typehints",
-]
-
-templates_path = ["doc_templates"]
-
-source_suffix = ".rst"
-# eg: source_suffix = [".rst", ".md"]
-
-master_doc = "index" # The master toctree document.
-
-language = None
-
-exclude_patterns: List[str] = []
-
-# The name of the Pygments (syntax highlighting) style to use.
-pygments_style = None
-
-html_theme = "alabaster"
-
-html_static_path = ["doc_static"]
-# Add any paths that contain custom static files (such as style sheets) here,
-# relative to this directory. They are copied after the builtin static files,
-# so a file named "default.css" will overwrite the builtin "default.css".
-
-# Output file base name for HTML help builder.
-htmlhelp_basename = "order_utilspydoc"
-
-# -- Extension configuration:
-
-# Example configuration for intersphinx: refer to the Python standard library.
-intersphinx_mapping = {"https://docs.python.org/": None}
diff --git a/python-packages/order_utils/src/doc_static/.gitkeep b/python-packages/order_utils/src/doc_static/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/src/doc_static/.gitkeep
+++ /dev/null
diff --git a/python-packages/order_utils/src/doc_templates/.gitkeep b/python-packages/order_utils/src/doc_templates/.gitkeep
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/src/doc_templates/.gitkeep
+++ /dev/null
diff --git a/python-packages/order_utils/src/index.rst b/python-packages/order_utils/src/index.rst
deleted file mode 100644
index ce618c6ff..000000000
--- a/python-packages/order_utils/src/index.rst
+++ /dev/null
@@ -1,36 +0,0 @@
-.. source for the sphinx-generated build/docs/web/index.html
-
-Python zero_ex.order_utils
-==========================
-
-.. toctree::
- :maxdepth: 2
- :caption: Contents:
-
-.. automodule:: zero_ex.order_utils
- :members:
-
-.. autoclass:: zero_ex.order_utils.Order
-
- See source for class properties. Sphinx is having problems generating docs for ``TypedDict`` declarations; pull requests welcome.
-
-zero_ex.order_utils.asset_data_utils
-------------------------------------
-
-.. automodule:: zero_ex.order_utils.asset_data_utils
- :members:
-
-.. autoclass:: zero_ex.order_utils.asset_data_utils.ERC20AssetData
-
- See source for class properties. Sphinx is having problems generating docs for ``TypedDict`` declarations; pull requests welcome.
-
-.. autoclass:: zero_ex.order_utils.asset_data_utils.ERC721AssetData
-
- See source for class properties. Sphinx is having problems generating docs for ``TypedDict`` declarations; pull requests welcome.
-
-Indices and tables
-==================
-
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
diff --git a/python-packages/order_utils/src/zero_ex/__init__.py b/python-packages/order_utils/src/zero_ex/__init__.py
deleted file mode 100644
index e90d833db..000000000
--- a/python-packages/order_utils/src/zero_ex/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""0x Python API."""
-__import__("pkg_resources").declare_namespace(__name__)
diff --git a/python-packages/order_utils/src/zero_ex/dev_utils/__init__.py b/python-packages/order_utils/src/zero_ex/dev_utils/__init__.py
deleted file mode 100644
index b6a224d2c..000000000
--- a/python-packages/order_utils/src/zero_ex/dev_utils/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Dev utils to be shared across 0x projects and packages."""
diff --git a/python-packages/order_utils/src/zero_ex/dev_utils/abi_utils.py b/python-packages/order_utils/src/zero_ex/dev_utils/abi_utils.py
deleted file mode 100644
index 3fec775b0..000000000
--- a/python-packages/order_utils/src/zero_ex/dev_utils/abi_utils.py
+++ /dev/null
@@ -1,101 +0,0 @@
-"""Ethereum ABI utilities.
-
-Builds on the eth-abi package, adding some convenience methods like those found
-in npmjs.com/package/ethereumjs-abi. Ideally, all of this code should be
-pushed upstream into eth-abi.
-"""
-
-import re
-from typing import Any, List
-
-from mypy_extensions import TypedDict
-
-from web3 import Web3
-from eth_abi import encode_abi
-
-from .type_assertions import assert_is_string, assert_is_list
-
-
-class MethodSignature(TypedDict, total=False):
- """Object interface to an ABI method signature."""
-
- method: str
- args: List[str]
-
-
-def parse_signature(signature: str) -> MethodSignature:
- """Parse a method signature into its constituent parts.
-
- >>> parse_signature("ERC20Token(address)")
- {'method': 'ERC20Token', 'args': ['address']}
- """
- assert_is_string(signature, "signature")
-
- matches = re.match(r"^(\w+)\((.+)\)$", signature)
- if matches is None:
- raise ValueError(f"Invalid method signature {signature}")
- return {"method": matches[1], "args": matches[2].split(",")}
-
-
-def elementary_name(name: str) -> str:
- """Convert from short to canonical names; barely implemented.
-
- Modeled after ethereumjs-abi's ABI.elementaryName(), but only implemented
- to support our particular use case and a few other simple ones.
-
- >>> elementary_name("address")
- 'address'
- >>> elementary_name("uint")
- 'uint256'
- """
- assert_is_string(name, "name")
-
- return {
- "int": "int256",
- "uint": "uint256",
- "fixed": "fixed128x128",
- "ufixed": "ufixed128x128",
- }.get(name, name)
-
-
-def event_id(name: str, types: List[str]) -> str:
- """Return the Keccak-256 hash of the given method.
-
- >>> event_id("ERC20Token", ["address"])
- '0xf47261b06eedbfce68afd46d0f3c27c60b03faad319eaf33103611cf8f6456ad'
- """
- assert_is_string(name, "name")
- assert_is_list(types, "types")
-
- signature = f"{name}({','.join(list(map(elementary_name, types)))})"
- return Web3.sha3(text=signature).hex()
-
-
-def method_id(name: str, types: List[str]) -> str:
- """Return the 4-byte method identifier.
-
- >>> method_id("ERC20Token", ["address"])
- '0xf47261b0'
- """
- assert_is_string(name, "name")
- assert_is_list(types, "types")
-
- return event_id(name, types)[0:10]
-
-
-def simple_encode(method: str, *args: Any) -> bytes:
- r"""Encode a method ABI.
-
- >>> simple_encode("ERC20Token(address)", "0x1dc4c1cefef38a777b15aa20260a54e584b16c48")
- b'\xf4ra\xb0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x1d\xc4\xc1\xce\xfe\xf3\x8aw{\x15\xaa &\nT\xe5\x84\xb1lH'
- """ # noqa: E501 (line too long)
- assert_is_string(method, "method")
-
- signature: MethodSignature = parse_signature(method)
-
- return bytes.fromhex(
- (
- method_id(signature["method"], signature["args"])
- + encode_abi(signature["args"], args).hex()
- )[2:]
- )
diff --git a/python-packages/order_utils/src/zero_ex/dev_utils/type_assertions.py b/python-packages/order_utils/src/zero_ex/dev_utils/type_assertions.py
deleted file mode 100644
index 4681315a8..000000000
--- a/python-packages/order_utils/src/zero_ex/dev_utils/type_assertions.py
+++ /dev/null
@@ -1,87 +0,0 @@
-"""Assertions for runtime type checking of function arguments."""
-
-from typing import Any
-
-from eth_utils import is_address
-from web3.providers.base import BaseProvider
-
-
-def assert_is_string(value: Any, name: str) -> None:
- """If :param value: isn't of type str, raise a TypeError.
-
- >>> try: assert_is_string(123, 'var')
- ... except TypeError as type_error: print(str(type_error))
- ...
- expected variable 'var', with value 123, to have type 'str', not 'int'
- """
- if not isinstance(value, str):
- raise TypeError(
- f"expected variable '{name}', with value {str(value)}, to have"
- + f" type 'str', not '{type(value).__name__}'"
- )
-
-
-def assert_is_list(value: Any, name: str) -> None:
- """If :param value: isn't of type list, raise a TypeError.
-
- >>> try: assert_is_list(123, 'var')
- ... except TypeError as type_error: print(str(type_error))
- ...
- expected variable 'var', with value 123, to have type 'list', not 'int'
- """
- if not isinstance(value, list):
- raise TypeError(
- f"expected variable '{name}', with value {str(value)}, to have"
- + f" type 'list', not '{type(value).__name__}'"
- )
-
-
-def assert_is_int(value: Any, name: str) -> None:
- """If :param value: isn't of type int, raise a TypeError.
-
- >>> try: assert_is_int('asdf', 'var')
- ... except TypeError as type_error: print(str(type_error))
- ...
- expected variable 'var', with value asdf, to have type 'int', not 'str'
- """
- if not isinstance(value, int):
- raise TypeError(
- f"expected variable '{name}', with value {str(value)}, to have"
- + f" type 'int', not '{type(value).__name__}'"
- )
-
-
-def assert_is_hex_string(value: Any, name: str) -> None:
- """Assert that :param value: is a string of hex chars.
-
- If :param value: isn't a str, raise a TypeError. If it is a string but
- contains non-hex characters ("0x" prefix permitted), raise a ValueError.
- """
- assert_is_string(value, name)
- int(value, 16) # raises a ValueError if value isn't a base-16 str
-
-
-def assert_is_address(value: Any, name: str) -> None:
- """Assert that `value` is a valid Ethereum address.
-
- If `value` isn't a hex string, raise a TypeError. If it isn't a valid
- Ethereum address, raise a ValueError.
- """
- assert_is_hex_string(value, name)
- if not is_address(value):
- raise ValueError(
- f"Expected variable '{name}' to be a valid Ethereum"
- + " address, but it's not."
- )
-
-
-def assert_is_provider(value: Any, name: str) -> None:
- """Assert that `value` is a Web3 provider.
-
- If `value` isn't a Web3 provider, raise a TypeError.
- """
- if not isinstance(value, BaseProvider):
- raise TypeError(
- f"Expected variable '{name}' to be an instance of a Web3 provider,"
- + " but it's not."
- )
diff --git a/python-packages/order_utils/src/zero_ex/order_utils/__init__.py b/python-packages/order_utils/src/zero_ex/order_utils/__init__.py
deleted file mode 100644
index 39d411507..000000000
--- a/python-packages/order_utils/src/zero_ex/order_utils/__init__.py
+++ /dev/null
@@ -1,535 +0,0 @@
-"""Order utilities for 0x applications.
-
-Some methods require the caller to pass in a `Web3.BaseProvider`:code: object.
-For local testing one may construct such a provider pointing at an instance of
-`ganache-cli <https://www.npmjs.com/package/ganache-cli>`_ which has the 0x
-contracts deployed on it. For convenience, a docker container is provided for
-just this purpose. To start it:
-`docker run -d -p 8545:8545 0xorg/ganache-cli:2.2.2`:code:.
-"""
-
-from copy import copy
-from enum import auto, Enum
-import json
-from typing import cast, Dict, NamedTuple, Tuple
-from pkg_resources import resource_string
-
-from mypy_extensions import TypedDict
-
-from eth_utils import keccak, remove_0x_prefix, to_bytes, to_checksum_address
-from web3 import Web3
-import web3.exceptions
-from web3.providers.base import BaseProvider
-from web3.utils import datatypes
-
-from zero_ex.contract_addresses import NETWORK_TO_ADDRESSES, NetworkId
-import zero_ex.contract_artifacts
-from zero_ex.dev_utils.type_assertions import (
- assert_is_address,
- assert_is_hex_string,
- assert_is_provider,
-)
-from zero_ex.json_schemas import assert_valid
-
-
-class _Constants:
- """Static data used by order utilities."""
-
- null_address = "0x0000000000000000000000000000000000000000"
-
- eip191_header = b"\x19\x01"
-
- eip712_domain_separator_schema_hash = keccak(
- b"EIP712Domain(string name,string version,address verifyingContract)"
- )
-
- eip712_domain_struct_header = (
- eip712_domain_separator_schema_hash
- + keccak(b"0x Protocol")
- + keccak(b"2")
- )
-
- eip712_order_schema_hash = keccak(
- b"Order("
- + b"address makerAddress,"
- + b"address takerAddress,"
- + b"address feeRecipientAddress,"
- + b"address senderAddress,"
- + b"uint256 makerAssetAmount,"
- + b"uint256 takerAssetAmount,"
- + b"uint256 makerFee,"
- + b"uint256 takerFee,"
- + b"uint256 expirationTimeSeconds,"
- + b"uint256 salt,"
- + b"bytes makerAssetData,"
- + b"bytes takerAssetData"
- + b")"
- )
-
- class SignatureType(Enum):
- """Enumeration of known signature types."""
-
- ILLEGAL = 0
- INVALID = auto()
- EIP712 = auto()
- ETH_SIGN = auto()
- WALLET = auto()
- VALIDATOR = auto()
- PRE_SIGNED = auto()
- N_SIGNATURE_TYPES = auto()
-
-
-class Order(TypedDict): # pylint: disable=too-many-instance-attributes
- """A Web3-compatible representation of the Exchange.Order struct."""
-
- makerAddress: str
- """Address that created the order."""
-
- takerAddress: str
- """Address that is allowed to fill the order.
-
- If set to 0, any address is allowed to fill the order.
- """
-
- feeRecipientAddress: str
- """Address that will recieve fees when order is filled."""
-
- senderAddress: str
- """Address that is allowed to call Exchange contract methods that affect
- this order. If set to 0, any address is allowed to call these methods.
- """
-
- makerAssetAmount: int
- """Amount of makerAsset being offered by maker. Must be greater than 0."""
-
- takerAssetAmount: int
- """Amount of takerAsset being bid on by maker. Must be greater than 0."""
-
- makerFee: int
- """Amount of ZRX paid to feeRecipient by maker when order is filled. If
- set to 0, no transfer of ZRX from maker to feeRecipient will be attempted.
- """
-
- takerFee: int
- """Amount of ZRX paid to feeRecipient by taker when order is filled. If
- set to 0, no transfer of ZRX from taker to feeRecipient will be attempted.
- """
-
- expirationTimeSeconds: int
- """Timestamp in seconds at which order expires."""
-
- salt: int
- """Arbitrary number to facilitate uniqueness of the order's hash."""
-
- makerAssetData: bytes
- """Encoded data that can be decoded by a specified proxy contract when
- transferring makerAsset. The last byte references the id of this proxy.
- """
-
- takerAssetData: bytes
- """Encoded data that can be decoded by a specified proxy contract when
- transferring takerAsset. The last byte references the id of this proxy.
- """
-
-
-def make_empty_order() -> Order:
- """Construct an empty order.
-
- Initializes all strings to "0x0000000000000000000000000000000000000000",
- all numbers to 0, and all bytes to nulls.
- """
- return {
- "makerAddress": _Constants.null_address,
- "takerAddress": _Constants.null_address,
- "senderAddress": _Constants.null_address,
- "feeRecipientAddress": _Constants.null_address,
- "makerAssetData": (b"\x00") * 20,
- "takerAssetData": (b"\x00") * 20,
- "salt": 0,
- "makerFee": 0,
- "takerFee": 0,
- "makerAssetAmount": 0,
- "takerAssetAmount": 0,
- "expirationTimeSeconds": 0,
- }
-
-
-def order_to_jsdict(
- order: Order, exchange_address="0x0000000000000000000000000000000000000000"
-) -> dict:
- """Convert a Web3-compatible order struct to a JSON-schema-compatible dict.
-
- More specifically, do explicit decoding for the `bytes`:code: fields.
-
- >>> import pprint
- >>> pprint.pprint(order_to_jsdict(
- ... {
- ... 'makerAddress': "0x0000000000000000000000000000000000000000",
- ... 'takerAddress': "0x0000000000000000000000000000000000000000",
- ... 'feeRecipientAddress':
- ... "0x0000000000000000000000000000000000000000",
- ... 'senderAddress': "0x0000000000000000000000000000000000000000",
- ... 'makerAssetAmount': 1,
- ... 'takerAssetAmount': 1,
- ... 'makerFee': 0,
- ... 'takerFee': 0,
- ... 'expirationTimeSeconds': 1,
- ... 'salt': 1,
- ... 'makerAssetData': (0).to_bytes(1, byteorder='big') * 20,
- ... 'takerAssetData': (0).to_bytes(1, byteorder='big') * 20,
- ... },
- ... ))
- {'exchangeAddress': '0x0000000000000000000000000000000000000000',
- 'expirationTimeSeconds': 1,
- 'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
- 'makerAddress': '0x0000000000000000000000000000000000000000',
- 'makerAssetAmount': 1,
- 'makerAssetData': '0x0000000000000000000000000000000000000000',
- 'makerFee': 0,
- 'salt': 1,
- 'senderAddress': '0x0000000000000000000000000000000000000000',
- 'takerAddress': '0x0000000000000000000000000000000000000000',
- 'takerAssetAmount': 1,
- 'takerAssetData': '0x0000000000000000000000000000000000000000',
- 'takerFee': 0}
- """
- jsdict = cast(Dict, copy(order))
-
- # encode bytes fields
- jsdict["makerAssetData"] = "0x" + order["makerAssetData"].hex()
- jsdict["takerAssetData"] = "0x" + order["takerAssetData"].hex()
-
- jsdict["exchangeAddress"] = exchange_address
-
- assert_valid(jsdict, "/orderSchema")
-
- return jsdict
-
-
-def jsdict_order_to_struct(jsdict: dict) -> Order:
- r"""Convert a JSON-schema-compatible dict order to a Web3-compatible struct.
-
- More specifically, do explicit encoding of the `bytes`:code: fields.
-
- >>> import pprint
- >>> pprint.pprint(jsdict_order_to_struct(
- ... {
- ... 'makerAddress': "0x0000000000000000000000000000000000000000",
- ... 'takerAddress': "0x0000000000000000000000000000000000000000",
- ... 'feeRecipientAddress': "0x0000000000000000000000000000000000000000",
- ... 'senderAddress': "0x0000000000000000000000000000000000000000",
- ... 'makerAssetAmount': 1000000000000000000,
- ... 'takerAssetAmount': 1000000000000000000,
- ... 'makerFee': 0,
- ... 'takerFee': 0,
- ... 'expirationTimeSeconds': 12345,
- ... 'salt': 12345,
- ... 'makerAssetData': "0x0000000000000000000000000000000000000000",
- ... 'takerAssetData': "0x0000000000000000000000000000000000000000",
- ... 'exchangeAddress': "0x0000000000000000000000000000000000000000",
- ... },
- ... ))
- {'expirationTimeSeconds': 12345,
- 'feeRecipientAddress': '0x0000000000000000000000000000000000000000',
- 'makerAddress': '0x0000000000000000000000000000000000000000',
- 'makerAssetAmount': 1000000000000000000,
- 'makerAssetData': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- b'\x00\x00\x00\x00\x00\x00\x00\x00',
- 'makerFee': 0,
- 'salt': 12345,
- 'senderAddress': '0x0000000000000000000000000000000000000000',
- 'takerAddress': '0x0000000000000000000000000000000000000000',
- 'takerAssetAmount': 1000000000000000000,
- 'takerAssetData': b'\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
- b'\x00\x00\x00\x00\x00\x00\x00\x00',
- 'takerFee': 0}
- """ # noqa: E501 (line too long)
- assert_valid(jsdict, "/orderSchema")
-
- order = cast(Order, copy(jsdict))
-
- order["makerAssetData"] = bytes.fromhex(
- remove_0x_prefix(jsdict["makerAssetData"])
- )
- order["takerAssetData"] = bytes.fromhex(
- remove_0x_prefix(jsdict["takerAssetData"])
- )
-
- del order["exchangeAddress"] # type: ignore
- # silence mypy pending release of
- # https://github.com/python/mypy/issues/3550
-
- return order
-
-
-def generate_order_hash_hex(order: Order, exchange_address: str) -> str:
- """Calculate the hash of the given order as a hexadecimal string.
-
- :param order: The order to be hashed. Must conform to `the 0x order JSON schema <https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/order_schema.json>`_.
- :param exchange_address: The address to which the 0x Exchange smart
- contract has been deployed.
- :returns: A string, of ASCII hex digits, representing the order hash.
-
- >>> generate_order_hash_hex(
- ... {
- ... 'makerAddress': "0x0000000000000000000000000000000000000000",
- ... 'takerAddress': "0x0000000000000000000000000000000000000000",
- ... 'feeRecipientAddress': "0x0000000000000000000000000000000000000000",
- ... 'senderAddress': "0x0000000000000000000000000000000000000000",
- ... 'makerAssetAmount': "1000000000000000000",
- ... 'takerAssetAmount': "1000000000000000000",
- ... 'makerFee': "0",
- ... 'takerFee': "0",
- ... 'expirationTimeSeconds': "12345",
- ... 'salt': "12345",
- ... 'makerAssetData': (0).to_bytes(1, byteorder='big') * 20,
- ... 'takerAssetData': (0).to_bytes(1, byteorder='big') * 20,
- ... },
- ... exchange_address="0x0000000000000000000000000000000000000000",
- ... )
- '55eaa6ec02f3224d30873577e9ddd069a288c16d6fb407210eecbc501fa76692'
- """ # noqa: E501 (line too long)
- assert_is_address(exchange_address, "exchange_address")
- assert_valid(order_to_jsdict(order, exchange_address), "/orderSchema")
-
- def pad_20_bytes_to_32(twenty_bytes: bytes):
- return bytes(12) + twenty_bytes
-
- def int_to_32_big_endian_bytes(i: int):
- return i.to_bytes(32, byteorder="big")
-
- eip712_domain_struct_hash = keccak(
- _Constants.eip712_domain_struct_header
- + pad_20_bytes_to_32(to_bytes(hexstr=exchange_address))
- )
-
- eip712_order_struct_hash = keccak(
- _Constants.eip712_order_schema_hash
- + pad_20_bytes_to_32(to_bytes(hexstr=order["makerAddress"]))
- + pad_20_bytes_to_32(to_bytes(hexstr=order["takerAddress"]))
- + pad_20_bytes_to_32(to_bytes(hexstr=order["feeRecipientAddress"]))
- + pad_20_bytes_to_32(to_bytes(hexstr=order["senderAddress"]))
- + int_to_32_big_endian_bytes(int(order["makerAssetAmount"]))
- + int_to_32_big_endian_bytes(int(order["takerAssetAmount"]))
- + int_to_32_big_endian_bytes(int(order["makerFee"]))
- + int_to_32_big_endian_bytes(int(order["takerFee"]))
- + int_to_32_big_endian_bytes(int(order["expirationTimeSeconds"]))
- + int_to_32_big_endian_bytes(int(order["salt"]))
- + keccak(to_bytes(hexstr=order["makerAssetData"].hex()))
- + keccak(to_bytes(hexstr=order["takerAssetData"].hex()))
- )
-
- return keccak(
- _Constants.eip191_header
- + eip712_domain_struct_hash
- + eip712_order_struct_hash
- ).hex()
-
-
-class OrderInfo(NamedTuple):
- """A Web3-compatible representation of the Exchange.OrderInfo struct."""
-
- order_status: str
- """A `str`:code: describing the order's validity and fillability."""
-
- order_hash: bytes
- """A `bytes`:code: object representing the EIP712 hash of the order."""
-
- order_taker_asset_filled_amount: int
- """An `int`:code: indicating the amount that has already been filled."""
-
-
-def is_valid_signature(
- provider: BaseProvider, data: str, signature: str, signer_address: str
-) -> Tuple[bool, str]:
- """Check the validity of the supplied signature.
-
- Check if the supplied `signature`:code: corresponds to signing `data`:code:
- with the private key corresponding to `signer_address`:code:.
-
- :param provider: A Web3 provider able to access the 0x Exchange contract.
- :param data: The hex encoded data signed by the supplied signature.
- :param signature: The hex encoded signature.
- :param signer_address: The hex encoded address that signed the data to
- produce the supplied signature.
- :returns: Tuple consisting of a boolean and a string. Boolean is true if
- valid, false otherwise. If false, the string describes the reason.
-
- >>> is_valid_signature(
- ... Web3.HTTPProvider("http://127.0.0.1:8545"),
- ... '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0',
- ... '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403',
- ... '0x5409ed021d9299bf6814279a6a1411a7e866a631',
- ... )
- (True, '')
- """ # noqa: E501 (line too long)
- assert_is_provider(provider, "provider")
- assert_is_hex_string(data, "data")
- assert_is_hex_string(signature, "signature")
- assert_is_address(signer_address, "signer_address")
-
- web3_instance = Web3(provider)
- # false positive from pylint: disable=no-member
- contract_address = NETWORK_TO_ADDRESSES[
- NetworkId(int(web3_instance.net.version))
- ].exchange
- # false positive from pylint: disable=no-member
- contract: datatypes.Contract = web3_instance.eth.contract(
- address=to_checksum_address(contract_address),
- abi=zero_ex.contract_artifacts.abi_by_name("Exchange"),
- )
- try:
- return (
- contract.call().isValidSignature(
- data, to_checksum_address(signer_address), signature
- ),
- "",
- )
- except web3.exceptions.BadFunctionCallOutput as exception:
- known_revert_reasons = [
- "LENGTH_GREATER_THAN_0_REQUIRED",
- "SIGNATURE_ILLEGAL",
- "SIGNATURE_UNSUPPORTED",
- "LENGTH_0_REQUIRED",
- "LENGTH_65_REQUIRED",
- ]
- for known_revert_reason in known_revert_reasons:
- if known_revert_reason in str(exception):
- return (False, known_revert_reason)
- return (False, f"Unknown: {exception}")
-
-
-class ECSignature(TypedDict):
- """Object representation of an elliptic curve signature's parameters."""
-
- v: int
- r: str
- s: str
-
-
-def _parse_signature_hex_as_vrs(signature_hex: str) -> ECSignature:
- """Parse signature hex as a concatentation of EC parameters ordered V, R, S.
-
- >>> _parse_signature_hex_as_vrs('0x1b117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b03')
- {'v': 27, 'r': '117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d87287113', 's': '7feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b'}
- """ # noqa: E501 (line too long)
- signature: ECSignature = {
- "v": int(signature_hex[2:4], 16),
- "r": signature_hex[4:68],
- "s": signature_hex[68:132],
- }
- if signature["v"] == 0 or signature["v"] == 1:
- signature["v"] = signature["v"] + 27
- return signature
-
-
-def _parse_signature_hex_as_rsv(signature_hex: str) -> ECSignature:
- """Parse signature hex as a concatentation of EC parameters ordered R, S, V.
-
- >>> _parse_signature_hex_as_rsv('0x117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b00')
- {'r': '117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d87287113', 's': '7feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b', 'v': 27}
- """ # noqa: E501 (line too long)
- signature: ECSignature = {
- "r": signature_hex[2:66],
- "s": signature_hex[66:130],
- "v": int(signature_hex[130:132], 16),
- }
- if signature["v"] == 0 or signature["v"] == 1:
- signature["v"] = signature["v"] + 27
- return signature
-
-
-def _convert_ec_signature_to_vrs_hex(signature: ECSignature) -> str:
- """Convert elliptic curve signature object to hex hash string.
-
- >>> _convert_ec_signature_to_vrs_hex(
- ... {
- ... 'r': '117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d87287113',
- ... 's': '7feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b',
- ... 'v': 27
- ... }
- ... )
- '0x1b117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b'
- """ # noqa: E501 (line too long)
- return (
- "0x"
- + signature["v"].to_bytes(1, byteorder="big").hex()
- + signature["r"]
- + signature["s"]
- )
-
-
-def sign_hash(
- provider: BaseProvider, signer_address: str, hash_hex: str
-) -> str:
- """Sign a message with the given hash, and return the signature.
-
- :param provider: A Web3 provider.
- :param signer_address: The address of the signing account.
- :param hash_hex: A hex string representing the hash, like that returned
- from `generate_order_hash_hex()`:code:.
- :returns: A string, of ASCII hex digits, representing the signature.
-
- >>> provider = Web3.HTTPProvider("http://127.0.0.1:8545")
- >>> sign_hash(
- ... provider,
- ... Web3(provider).personal.listAccounts[0],
- ... '0x34decbedc118904df65f379a175bb39ca18209d6ce41d5ed549d54e6e0a95004',
- ... )
- '0x1b117902c86dfb95fe0d1badd983ee166ad259b27acb220174cbb4460d872871137feabdfe76e05924b484789f79af4ee7fa29ec006cedce1bbf369320d034e10b03'
- """ # noqa: E501 (line too long)
- assert_is_provider(provider, "provider")
- assert_is_address(signer_address, "signer_address")
- assert_is_hex_string(hash_hex, "hash_hex")
-
- web3_instance = Web3(provider)
- # false positive from pylint: disable=no-member
- signature = web3_instance.eth.sign( # type: ignore
- signer_address, hexstr=hash_hex.replace("0x", "")
- ).hex()
-
- valid_v_param_values = [27, 28]
-
- # HACK: There is no consensus on whether the signatureHex string should be
- # formatted as v + r + s OR r + s + v, and different clients (even
- # different versions of the same client) return the signature params in
- # different orders. In order to support all client implementations, we
- # parse the signature in both ways, and evaluate if either one is a valid
- # signature. r + s + v is the most prevalent format from eth_sign, so we
- # attempt this first.
-
- ec_signature = _parse_signature_hex_as_rsv(signature)
- if ec_signature["v"] in valid_v_param_values:
- signature_as_vrst_hex = (
- _convert_ec_signature_to_vrs_hex(ec_signature)
- + _Constants.SignatureType.ETH_SIGN.value.to_bytes(
- 1, byteorder="big"
- ).hex()
- )
-
- (valid, _) = is_valid_signature(
- provider, hash_hex, signature_as_vrst_hex, signer_address
- )
-
- if valid is True:
- return signature_as_vrst_hex
-
- ec_signature = _parse_signature_hex_as_vrs(signature)
- if ec_signature["v"] in valid_v_param_values:
- signature_as_vrst_hex = (
- _convert_ec_signature_to_vrs_hex(ec_signature)
- + _Constants.SignatureType.ETH_SIGN.value.to_bytes(
- 1, byteorder="big"
- ).hex()
- )
- (valid, _) = is_valid_signature(
- provider, hash_hex, signature_as_vrst_hex, signer_address
- )
-
- if valid is True:
- return signature_as_vrst_hex
-
- raise RuntimeError(
- "Signature returned from web3 provider is in an unknown format."
- + " Attempted to parse as RSV and as VRS."
- )
diff --git a/python-packages/order_utils/src/zero_ex/order_utils/asset_data_utils.py b/python-packages/order_utils/src/zero_ex/order_utils/asset_data_utils.py
deleted file mode 100644
index f8e9bc42b..000000000
--- a/python-packages/order_utils/src/zero_ex/order_utils/asset_data_utils.py
+++ /dev/null
@@ -1,141 +0,0 @@
-"""Asset data encoding and decoding utilities."""
-
-from mypy_extensions import TypedDict
-
-import eth_abi
-
-from zero_ex.dev_utils import abi_utils
-from zero_ex.dev_utils.type_assertions import assert_is_string, assert_is_int
-
-
-ERC20_ASSET_DATA_BYTE_LENGTH = 36
-ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH = 53
-SELECTOR_LENGTH = 10
-
-
-class ERC20AssetData(TypedDict):
- """Object interface to ERC20 asset data."""
-
- asset_proxy_id: str
- """asset proxy id"""
-
- token_address: str
-
-
-class ERC721AssetData(TypedDict):
- """Object interface to ERC721 asset data."""
-
- asset_proxy_id: str
- token_address: str
- token_id: int
-
-
-def encode_erc20_asset_data(token_address: str) -> str:
- """Encode an ERC20 token address into an asset data string.
-
- :param token_address: the ERC20 token's contract address.
- :returns: hex encoded asset data string, usable in the makerAssetData or
- takerAssetData fields in a 0x order.
-
- >>> encode_erc20_asset_data('0x1dc4c1cefef38a777b15aa20260a54e584b16c48')
- '0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48'
- """
- assert_is_string(token_address, "token_address")
-
- return (
- "0x"
- + abi_utils.simple_encode("ERC20Token(address)", token_address).hex()
- )
-
-
-def decode_erc20_asset_data(asset_data: str) -> ERC20AssetData:
- """Decode an ERC20 asset data hex string.
-
- :param asset_data: String produced by prior call to encode_erc20_asset_data()
-
- >>> decode_erc20_asset_data("0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48")
- {'asset_proxy_id': '0xf47261b0', 'token_address': '0x1dc4c1cefef38a777b15aa20260a54e584b16c48'}
- """ # noqa: E501 (line too long)
- assert_is_string(asset_data, "asset_data")
-
- if len(asset_data) < ERC20_ASSET_DATA_BYTE_LENGTH:
- raise ValueError(
- "Could not decode ERC20 Proxy Data. Expected length of encoded"
- + f" data to be at least {str(ERC20_ASSET_DATA_BYTE_LENGTH)}."
- + f" Got {str(len(asset_data))}."
- )
-
- asset_proxy_id: str = asset_data[0:SELECTOR_LENGTH]
- if asset_proxy_id != abi_utils.method_id("ERC20Token", ["address"]):
- raise ValueError(
- "Could not decode ERC20 Proxy Data. Expected Asset Proxy Id to be"
- + f" ERC20 ({abi_utils.method_id('ERC20Token', ['address'])})"
- + f" but got {asset_proxy_id}."
- )
-
- # workaround for https://github.com/PyCQA/pylint/issues/1498
- # pylint: disable=unsubscriptable-object
- token_address = eth_abi.decode_abi(
- ["address"], bytes.fromhex(asset_data[SELECTOR_LENGTH:])
- )[0]
-
- return {"asset_proxy_id": asset_proxy_id, "token_address": token_address}
-
-
-def encode_erc721_asset_data(token_address: str, token_id: int) -> str:
- """Encode an ERC721 asset data hex string.
-
- :param token_address: the ERC721 token's contract address.
- :param token_id: the identifier of the asset's instance of the token.
- :returns: hex encoded asset data string, usable in the makerAssetData or
- takerAssetData fields in a 0x order.
-
- >>> encode_erc721_asset_data('0x1dc4c1cefef38a777b15aa20260a54e584b16c48', 1)
- '0x025717920000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c480000000000000000000000000000000000000000000000000000000000000001'
- """ # noqa: E501 (line too long)
- assert_is_string(token_address, "token_address")
- assert_is_int(token_id, "token_id")
-
- return (
- "0x"
- + abi_utils.simple_encode(
- "ERC721Token(address,uint256)", token_address, token_id
- ).hex()
- )
-
-
-def decode_erc721_asset_data(asset_data: str) -> ERC721AssetData:
- """Decode an ERC721 asset data hex string.
-
- >>> decode_erc721_asset_data('0x025717920000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c480000000000000000000000000000000000000000000000000000000000000001')
- {'asset_proxy_id': '0x02571792', 'token_address': '0x1dc4c1cefef38a777b15aa20260a54e584b16c48', 'token_id': 1}
- """ # noqa: E501 (line too long)
- assert_is_string(asset_data, "asset_data")
-
- if len(asset_data) < ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH:
- raise ValueError(
- "Could not decode ERC721 Asset Data. Expected length of encoded"
- + f"data to be at least {ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH}. "
- + f"Got {len(asset_data)}."
- )
-
- asset_proxy_id: str = asset_data[0:SELECTOR_LENGTH]
- if asset_proxy_id != abi_utils.method_id(
- "ERC721Token", ["address", "uint256"]
- ):
- raise ValueError(
- "Could not decode ERC721 Asset Data. Expected Asset Proxy Id to be"
- + f" ERC721 ("
- + f"{abi_utils.method_id('ERC721Token', ['address', 'uint256'])}"
- + f"), but got {asset_proxy_id}"
- )
-
- (token_address, token_id) = eth_abi.decode_abi(
- ["address", "uint256"], bytes.fromhex(asset_data[SELECTOR_LENGTH:])
- )
-
- return {
- "asset_proxy_id": asset_proxy_id,
- "token_address": token_address,
- "token_id": token_id,
- }
diff --git a/python-packages/order_utils/src/zero_ex/order_utils/py.typed b/python-packages/order_utils/src/zero_ex/order_utils/py.typed
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/src/zero_ex/order_utils/py.typed
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/distutils/__init__.pyi b/python-packages/order_utils/stubs/distutils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/distutils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/distutils/command/__init__.pyi b/python-packages/order_utils/stubs/distutils/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/distutils/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/distutils/command/clean.pyi b/python-packages/order_utils/stubs/distutils/command/clean.pyi
deleted file mode 100644
index 46a42ddb1..000000000
--- a/python-packages/order_utils/stubs/distutils/command/clean.pyi
+++ /dev/null
@@ -1,7 +0,0 @@
-from distutils.core import Command
-
-class clean(Command):
- def initialize_options(self: clean) -> None: ...
- def finalize_options(self: clean) -> None: ...
- def run(self: clean) -> None: ...
- ...
diff --git a/python-packages/order_utils/stubs/pytest/__init__.pyi b/python-packages/order_utils/stubs/pytest/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/pytest/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/pytest/raises.pyi b/python-packages/order_utils/stubs/pytest/raises.pyi
deleted file mode 100644
index 2e3b29f3d..000000000
--- a/python-packages/order_utils/stubs/pytest/raises.pyi
+++ /dev/null
@@ -1 +0,0 @@
-def raises(exception: Exception) -> ExceptionInfo: ...
diff --git a/python-packages/order_utils/stubs/setuptools/__init__.pyi b/python-packages/order_utils/stubs/setuptools/__init__.pyi
deleted file mode 100644
index 8ea8d32b7..000000000
--- a/python-packages/order_utils/stubs/setuptools/__init__.pyi
+++ /dev/null
@@ -1,8 +0,0 @@
-from distutils.dist import Distribution
-from typing import Any, List
-
-def setup(**attrs: Any) -> Distribution: ...
-
-class Command: ...
-
-def find_packages(where: str) -> List[str]: ...
diff --git a/python-packages/order_utils/stubs/setuptools/command/__init__.pyi b/python-packages/order_utils/stubs/setuptools/command/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/setuptools/command/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/setuptools/command/test.pyi b/python-packages/order_utils/stubs/setuptools/command/test.pyi
deleted file mode 100644
index c5ec770ad..000000000
--- a/python-packages/order_utils/stubs/setuptools/command/test.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-from setuptools import Command
-
-class test(Command): ...
diff --git a/python-packages/order_utils/stubs/sha3/__init__.pyi b/python-packages/order_utils/stubs/sha3/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/sha3/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/web3/__init__.pyi b/python-packages/order_utils/stubs/web3/__init__.pyi
deleted file mode 100644
index b2af95475..000000000
--- a/python-packages/order_utils/stubs/web3/__init__.pyi
+++ /dev/null
@@ -1,28 +0,0 @@
-from typing import Dict, Optional, Union
-
-from web3.utils import datatypes
-from web3.providers.base import BaseProvider
-
-
-class Web3:
- class HTTPProvider(BaseProvider):
- ...
-
- def __init__(self, provider: BaseProvider) -> None: ...
-
- @staticmethod
- def sha3(
- primitive: Optional[Union[bytes, int, None]] = None,
- text: Optional[str] = None,
- hexstr: Optional[str] = None
- ) -> bytes: ...
-
- class net:
- version: str
- ...
-
- class eth:
- @staticmethod
- def contract(address: str, abi: Dict) -> datatypes.Contract: ...
- ...
- ...
diff --git a/python-packages/order_utils/stubs/web3/__init___BASE_31011.pyi b/python-packages/order_utils/stubs/web3/__init___BASE_31011.pyi
deleted file mode 100644
index fcecc7434..000000000
--- a/python-packages/order_utils/stubs/web3/__init___BASE_31011.pyi
+++ /dev/null
@@ -1,26 +0,0 @@
-from typing import Dict, Optional, Union
-
-from web3.utils import datatypes
-
-
-class Web3:
- class HTTPProvider: ...
-
- def __init__(self, provider: HTTPProvider) -> None: ...
-
- @staticmethod
- def sha3(
- primitive: Optional[Union[bytes, int, None]] = None,
- text: Optional[str] = None,
- hexstr: Optional[str] = None
- ) -> bytes: ...
-
- class net:
- version: str
- ...
-
- class eth:
- @staticmethod
- def contract(address: str, abi: Dict) -> datatypes.Contract: ...
- ...
- ...
diff --git a/python-packages/order_utils/stubs/web3/exceptions.pyi b/python-packages/order_utils/stubs/web3/exceptions.pyi
deleted file mode 100644
index 83abf973d..000000000
--- a/python-packages/order_utils/stubs/web3/exceptions.pyi
+++ /dev/null
@@ -1,2 +0,0 @@
-class BadFunctionCallOutput(Exception):
- ...
diff --git a/python-packages/order_utils/stubs/web3/providers/__init__.pyi b/python-packages/order_utils/stubs/web3/providers/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/web3/providers/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/web3/providers/base.pyi b/python-packages/order_utils/stubs/web3/providers/base.pyi
deleted file mode 100644
index 82ca9e3da..000000000
--- a/python-packages/order_utils/stubs/web3/providers/base.pyi
+++ /dev/null
@@ -1,2 +0,0 @@
-class BaseProvider:
- ...
diff --git a/python-packages/order_utils/stubs/web3/utils/__init__.pyi b/python-packages/order_utils/stubs/web3/utils/__init__.pyi
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/order_utils/stubs/web3/utils/__init__.pyi
+++ /dev/null
diff --git a/python-packages/order_utils/stubs/web3/utils/datatypes.pyi b/python-packages/order_utils/stubs/web3/utils/datatypes.pyi
deleted file mode 100644
index 70baff372..000000000
--- a/python-packages/order_utils/stubs/web3/utils/datatypes.pyi
+++ /dev/null
@@ -1,3 +0,0 @@
-class Contract:
- def call(self): ...
- ...
diff --git a/python-packages/order_utils/test/__init__.py b/python-packages/order_utils/test/__init__.py
deleted file mode 100644
index ec5b114aa..000000000
--- a/python-packages/order_utils/test/__init__.py
+++ /dev/null
@@ -1 +0,0 @@
-"""Tests of zero_x.order_utils."""
diff --git a/python-packages/order_utils/test/test_abi_utils.py b/python-packages/order_utils/test/test_abi_utils.py
deleted file mode 100644
index 49a2a4f20..000000000
--- a/python-packages/order_utils/test/test_abi_utils.py
+++ /dev/null
@@ -1,53 +0,0 @@
-"""Tests of 0x.abi_utils."""
-
-import pytest
-
-from zero_ex.dev_utils.abi_utils import (
- elementary_name,
- event_id,
- method_id,
- parse_signature,
- simple_encode,
-)
-
-
-def test_parse_signature_type_error():
- """Test that passing in wrong types raises TypeError."""
- with pytest.raises(TypeError):
- parse_signature(123)
-
-
-def test_parse_signature_bad_input():
- """Test that passing a non-signature string raises a ValueError."""
- with pytest.raises(ValueError):
- parse_signature("a string that's not even close to a signature")
-
-
-def test_elementary_name_type_error():
- """Test that passing in wrong types raises TypeError."""
- with pytest.raises(TypeError):
- elementary_name(123)
-
-
-def test_event_id_type_error():
- """Test that passing in wrong types raises TypeError."""
- with pytest.raises(TypeError):
- event_id(123, [])
-
- with pytest.raises(TypeError):
- event_id("valid string", 123)
-
-
-def test_method_id_type_error():
- """Test that passing in wrong types raises TypeError."""
- with pytest.raises(TypeError):
- method_id(123, [])
-
- with pytest.raises(TypeError):
- method_id("ERC20Token", 123)
-
-
-def test_simple_encode_type_error():
- """Test that passing in wrong types raises TypeError."""
- with pytest.raises(TypeError):
- simple_encode(123)
diff --git a/python-packages/order_utils/test/test_asset_data_utils.py b/python-packages/order_utils/test/test_asset_data_utils.py
deleted file mode 100644
index 079368714..000000000
--- a/python-packages/order_utils/test/test_asset_data_utils.py
+++ /dev/null
@@ -1,72 +0,0 @@
-"""Tests of 0x.order_utils.asset_data_utils."""
-
-import pytest
-
-from zero_ex.order_utils.asset_data_utils import (
- decode_erc20_asset_data,
- decode_erc721_asset_data,
- encode_erc20_asset_data,
- encode_erc721_asset_data,
- ERC20_ASSET_DATA_BYTE_LENGTH,
- ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH,
-)
-
-
-def test_encode_erc20_asset_data_type_error():
- """Test that passing in a non-string raises a TypeError."""
- with pytest.raises(TypeError):
- encode_erc20_asset_data(123)
-
-
-def test_decode_erc20_asset_data_type_error():
- """Test that passing in a non-string raises a TypeError."""
- with pytest.raises(TypeError):
- decode_erc20_asset_data(123)
-
-
-def test_decode_erc20_asset_data_too_short():
- """Test that passing an insufficiently long string raises a ValueError."""
- with pytest.raises(ValueError):
- decode_erc20_asset_data(" " * (ERC20_ASSET_DATA_BYTE_LENGTH - 1))
-
-
-def test_decode_erc20_asset_data_invalid_proxy_id():
- """Test that passing data with an invalid proxy ID raises a ValueError."""
- with pytest.raises(ValueError):
- decode_erc20_asset_data(
- "0xffffffff" + (" " * ERC20_ASSET_DATA_BYTE_LENGTH)
- )
-
-
-def test_encode_erc721_asset_data_type_error_on_token_address():
- """Test that passing a non-string for token_address raises a TypeError."""
- with pytest.raises(TypeError):
- encode_erc721_asset_data(123, 123)
-
-
-def test_encode_erc721_asset_data_type_error_on_token_id():
- """Test that passing a non-int for token_id raises a TypeError."""
- with pytest.raises(TypeError):
- encode_erc721_asset_data("asdf", "asdf")
-
-
-def test_decode_erc721_asset_data_type_error():
- """Test that passing a non-string for asset_data raises a TypeError."""
- with pytest.raises(TypeError):
- decode_erc721_asset_data(123)
-
-
-def test_decode_erc721_asset_data_with_asset_data_too_short():
- """Test that passing in too short of a string raises a ValueError."""
- with pytest.raises(ValueError):
- decode_erc721_asset_data(
- " " * (ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH - 1)
- )
-
-
-def test_decode_erc721_asset_data_invalid_proxy_id():
- """Test that passing in too short of a string raises a ValueError."""
- with pytest.raises(ValueError):
- decode_erc721_asset_data(
- "0xffffffff" + " " * (ERC721_ASSET_DATA_MINIMUM_BYTE_LENGTH - 1)
- )
diff --git a/python-packages/order_utils/test/test_generate_order_hash_hex.py b/python-packages/order_utils/test/test_generate_order_hash_hex.py
deleted file mode 100644
index 38b503289..000000000
--- a/python-packages/order_utils/test/test_generate_order_hash_hex.py
+++ /dev/null
@@ -1,14 +0,0 @@
-"""Test zero_ex.order_utils.get_order_hash_hex()."""
-
-from zero_ex.order_utils import generate_order_hash_hex, make_empty_order
-
-
-def test_get_order_hash_hex__empty_order():
- """Test the hashing of an uninitialized order."""
- expected_hash_hex = (
- "faa49b35faeb9197e9c3ba7a52075e6dad19739549f153b77dfcf59408a4b422"
- )
- actual_hash_hex = generate_order_hash_hex(
- make_empty_order(), "0x0000000000000000000000000000000000000000"
- )
- assert actual_hash_hex == expected_hash_hex
diff --git a/python-packages/order_utils/test/test_signature_utils.py b/python-packages/order_utils/test/test_signature_utils.py
deleted file mode 100644
index c5acc9d62..000000000
--- a/python-packages/order_utils/test/test_signature_utils.py
+++ /dev/null
@@ -1,128 +0,0 @@
-"""Tests of zero_ex.order_utils.signature_utils."""
-
-import pytest
-from web3 import Web3
-
-from zero_ex.order_utils import is_valid_signature
-
-
-def test_is_valid_signature__provider_wrong_type():
- """Test that giving a non-HTTPProvider raises a TypeError."""
- with pytest.raises(TypeError):
- is_valid_signature(
- 123,
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
-
-
-def test_is_valid_signature__data_not_string():
- """Test that giving non-string `data` raises a TypeError."""
- with pytest.raises(TypeError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- 123,
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
-
-
-def test_is_valid_signature__data_not_hex_string():
- """Test that giving non-hex-string `data` raises a ValueError."""
- with pytest.raises(ValueError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "jjj",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
-
-
-def test_is_valid_signature__signature_not_string():
- """Test that passng a non-string signature raises a TypeError."""
- with pytest.raises(TypeError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- 123,
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
-
-
-def test_is_valid_signature__signature_not_hex_string():
- """Test that passing a non-hex-string signature raises a ValueError."""
- with pytest.raises(ValueError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- "jjj",
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
-
-
-def test_is_valid_signature__signer_address_not_string():
- """Test that giving a non-address `signer_address` raises a ValueError."""
- with pytest.raises(TypeError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- 123,
- )
-
-
-def test_is_valid_signature__signer_address_not_hex_string():
- """Test that giving a non-hex-str `signer_address` raises a ValueError."""
- with pytest.raises(ValueError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- "jjj",
- )
-
-
-def test_is_valid_signature__signer_address_not_valid_address():
- """Test that giving a non-address for `signer_address` raises an error."""
- with pytest.raises(ValueError):
- is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b"
- + "0",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351b"
- + "c3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace"
- + "225403",
- "0xff",
- )
-
-
-def test_is_valid_signature__unsupported_sig_types():
- """Test that passing in a sig w/invalid type raises error.
-
- To induce this error, the last byte of the signature is tweaked from 03 to
- ff."""
- (is_valid, reason) = is_valid_signature(
- Web3.HTTPProvider("http://127.0.0.1:8545"),
- "0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0",
- "0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc334"
- + "0349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254ff",
- "0x5409ed021d9299bf6814279a6a1411a7e866a631",
- )
- assert is_valid is False
- assert reason == "SIGNATURE_UNSUPPORTED"
diff --git a/python-packages/order_utils/tox.ini b/python-packages/order_utils/tox.ini
deleted file mode 100644
index ba7d55b56..000000000
--- a/python-packages/order_utils/tox.ini
+++ /dev/null
@@ -1,25 +0,0 @@
-# tox (https://tox.readthedocs.io/) is a tool for running tests
-# in multiple virtualenvs. This configuration file will run the
-# test suite on all supported python versions. To use it, "pip install tox"
-# and then run "tox" from this directory.
-
-[tox]
-envlist = py37
-
-[testenv]
-commands =
- pip install -e .[dev]
- python setup.py test
-
-[testenv:run_tests_against_test_deployment]
-commands =
- # install dependencies from real PyPI
- pip install eth-abi mypy_extensions web3 pytest
- # install package-under-test from test PyPI
- pip install --index-url https://test.pypi.org/legacy/ 0x-order-utils
- pytest test
-
-[testenv:run_tests_against_deployment]
-commands =
- pip install 0x-order-utils
- pytest test
diff --git a/python-packages/sra_client/README.md b/python-packages/sra_client/README.md
deleted file mode 100644
index a1a427bce..000000000
--- a/python-packages/sra_client/README.md
+++ /dev/null
@@ -1,332 +0,0 @@
-# 0x-sra-client
-
-A Python client for interacting with servers conforming to [the Standard Relayer API specification](https://github.com/0xProject/0x-monorepo/tree/development/packages/sra-spec).
-
-# Schemas
-
-The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x-monorepo/tree/development/packages/json-schemas). Examples of each payload and response can be found in the 0x.js library's [test suite](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/test/schema_test.ts#L1).
-
-```bash
-pip install 0x-json-schemas
-```
-
-You can easily validate your API's payloads and responses using the [0x-json-schemas](https://github.com/0xProject/0x.js/tree/development/python-packages/json_schemas) package:
-
-```python
-from zero_ex.json_schemas import assert_valid
-from zero_ex.order_utils import Order
-
-order: Order = {
- 'makerAddress': "0x0000000000000000000000000000000000000000",
- 'takerAddress': "0x0000000000000000000000000000000000000000",
- 'feeRecipientAddress': "0x0000000000000000000000000000000000000000",
- 'senderAddress': "0x0000000000000000000000000000000000000000",
- 'makerAssetAmount': "1000000000000000000",
- 'takerAssetAmount': "1000000000000000000",
- 'makerFee': "0",
- 'takerFee': "0",
- 'expirationTimeSeconds': "12345",
- 'salt': "12345",
- 'makerAssetData': "0x0000000000000000000000000000000000000000",
- 'takerAssetData': "0x0000000000000000000000000000000000000000",
- 'exchangeAddress': "0x0000000000000000000000000000000000000000",
-}
-
-assert_valid(order, "/orderSchema")
-```
-
-# Pagination
-
-Requests that return potentially large collections should respond to the **?page** and **?perPage** parameters. For example:
-
-```bash
-$ curl https://api.example-relayer.com/v2/asset_pairs?page=3&perPage=20
-```
-
-Page numbering should be 1-indexed, not 0-indexed. If a query provides an unreasonable (ie. too high) `perPage` value, the response can return a validation error as specified in the [errors section](#section/Errors). If the query specifies a `page` that does not exist (ie. there are not enough `records`), the response should just return an empty `records` array.
-
-All endpoints that are paginated should return a `total`, `page`, `perPage` and a `records` value in the top level of the collection. The value of `total` should be the total number of records for a given query, whereas `records` should be an array representing the response to the query for that page. `page` and `perPage`, are the same values that were specified in the request. See the note in [miscellaneous](#section/Misc.) about formatting `snake_case` vs. `lowerCamelCase`.
-
-These requests include the [`/v2/asset_pairs`](#operation/getAssetPairs), [`/v2/orders`](#operation/getOrders), [`/v2/fee_recipients`](#operation/getFeeRecipients) and [`/v2/orderbook`](#operation/getOrderbook) endpoints.
-
-# Network Id
-
-All requests should be able to specify a **?networkId** query param for all supported networks. For example:
-
-```bash
-$ curl https://api.example-relayer.com/v2/asset_pairs?networkId=1
-```
-
-If the query param is not provided, it should default to **1** (mainnet).
-
-Networks and their Ids:
-
-| Network Id | Network Name |
-| ---------- | ------------ |
-| 1 | Mainnet |
-| 42 | Kovan |
-| 3 | Ropsten |
-| 4 | Rinkeby |
-
-If a certain network is not supported, the response should **400** as specified in the [error response](#section/Errors) section. For example:
-
-```json
-{
- \"code\": 100,
- \"reason\": \"Validation failed\",
- \"validationErrors\": [
- {
- \"field\": \"networkId\",
- \"code\": 1006,
- \"reason\": \"Network id 42 is not supported\"
- }
- ]
-}
-```
-
-# Link Header
-
-A [Link Header](https://tools.ietf.org/html/rfc5988) can be included in a response to provide clients with more context about paging
-For example:
-
-```bash
-Link: <https://api.example-relayer.com/v2/asset_pairs?page=3&perPage=20>; rel=\"next\",
-<https://api.github.com/user/repos?page=10&perPage=20>; rel=\"last\"
-```
-
-This `Link` response header contains one or more Hypermedia link relations.
-
-The possible `rel` values are:
-
-| Name | Description |
-| ----- | ------------------------------------------------------------- |
-| next | The link relation for the immediate next page of results. |
-| last | The link relation for the last page of results. |
-| first | The link relation for the first page of results. |
-| prev | The link relation for the immediate previous page of results. |
-
-# Rate Limits
-
-Rate limit guidance for clients can be optionally returned in the response headers:
-
-| Header Name | Description |
-| --------------------- | ---------------------------------------------------------------------------- |
-| X-RateLimit-Limit | The maximum number of requests you're permitted to make per hour. |
-| X-RateLimit-Remaining | The number of requests remaining in the current rate limit window. |
-| X-RateLimit-Reset | The time at which the current rate limit window resets in UTC epoch seconds. |
-
-For example:
-
-```bash
-$ curl -i https://api.example-relayer.com/v2/asset_pairs
-HTTP/1.1 200 OK
-Date: Mon, 20 Oct 2017 12:30:06 GMT
-Status: 200 OK
-X-RateLimit-Limit: 60
-X-RateLimit-Remaining: 56
-X-RateLimit-Reset: 1372700873
-```
-
-When a rate limit is exceeded, a status of **429 Too Many Requests** should be returned.
-
-# Errors
-
-Unless the spec defines otherwise, errors to bad requests should respond with HTTP 4xx or status codes.
-
-## Common error codes
-
-| Code | Reason |
-| ---- | --------------------------------------- |
-| 400 | Bad Request – Invalid request format |
-| 404 | Not found |
-| 429 | Too many requests - Rate limit exceeded |
-| 500 | Internal Server Error |
-| 501 | Not Implemented |
-
-## Error reporting format
-
-For all **400** responses, see the [error response schema](https://github.com/0xProject/0x-monorepo/blob/development/packages/json-schemas/schemas/relayer_api_error_response_schema.ts#L1).
-
-```json
-{
- \"code\": 101,
- \"reason\": \"Validation failed\",
- \"validationErrors\": [
- {
- \"field\": \"maker\",
- \"code\": 1002,
- \"reason\": \"Invalid address\"
- }
- ]
-}
-```
-
-General error codes:
-
-```bash
-100 - Validation Failed
-101 - Malformed JSON
-102 - Order submission disabled
-103 - Throttled
-```
-
-Validation error codes:
-
-```bash
-1000 - Required field
-1001 - Incorrect format
-1002 - Invalid address
-1003 - Address not supported
-1004 - Value out of range
-1005 - Invalid signature or hash
-1006 - Unsupported option
-```
-
-# Asset Data Encoding
-
-As we now support multiple [token transfer proxies](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#assetproxy), the identifier of which proxy to use for the token transfer must be encoded, along with the token information. Each proxy in 0x v2 has a unique identifier. If you're using 0x.js there will be helper methods for this [encoding](https://0xproject.com/docs/0x.js#zeroEx-encodeERC20AssetData) and [decoding](https://0xproject.com/docs/0x.js#zeroEx-decodeAssetProxyId).
-
-The identifier for the Proxy uses a similar scheme to [ABI function selectors](https://github.com/ethereum/wiki/wiki/Ethereum-Contract-ABI#function-selector).
-
-```js
-// ERC20 Proxy ID 0xf47261b0
-bytes4(keccak256('ERC20Token(address)'));
-// ERC721 Proxy ID 0x02571792
-bytes4(keccak256('ERC721Token(address,uint256)'));
-```
-
-Asset data is encoded using [ABI encoding](https://solidity.readthedocs.io/en/develop/abi-spec.html).
-
-For example, encoding the ERC20 token contract (address: 0x1dc4c1cefef38a777b15aa20260a54e584b16c48) using the ERC20 Transfer Proxy (id: 0xf47261b0) would be:
-
-```bash
-0xf47261b00000000000000000000000001dc4c1cefef38a777b15aa20260a54e584b16c48
-```
-
-Encoding the ERC721 token contract (address: `0x371b13d97f4bf77d724e78c16b7dc74099f40e84`), token id (id: `99`, which hex encoded is `0x63`) and the ERC721 Transfer Proxy (id: 0x02571792) would be:
-
-```bash
-0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063
-```
-
-For more information see [the Asset Proxy](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#erc20proxy) section of the v2 spec and the [Ethereum ABI Spec](https://solidity.readthedocs.io/en/develop/abi-spec.html).
-
-# Meta Data in Order Responses
-
-In v2 of the standard relayer API we added the `metaData` field. It is meant to provide a standard place for relayers to put optional, custom or non-standard fields that may of interest to the consumer of the API.
-
-A good example of such a field is `remainingTakerAssetAmount`, which is a convenience field that communicates how much of a 0x order is potentially left to be filled. Unlike the other fields in a 0x order, it is not guaranteed to be correct as it is derived from whatever mechanism the implementer (ie. the relayer) is using. While convenient for prototyping and low stakes situations, we recommend validating the value of the field by checking the state of the blockchain yourself, such as by using [Order Watcher](https://0xproject.com/wiki#0x-OrderWatcher).
-
-# Misc.
-
-- All requests and responses should be of **application/json** content type
-- All token amounts are sent in amounts of the smallest level of precision (base units). (e.g if a token has 18 decimal places, selling 1 token would show up as selling `'1000000000000000000'` units by this API).
-- All addresses are sent as lower-case (non-checksummed) Ethereum addresses with the `0x` prefix.
-- All parameters are to be written in `lowerCamelCase`.
-
-This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
-
-- API version: 2.0.0
-- Package version: 1.0.0
-- Build package: org.openapitools.codegen.languages.PythonClientCodegen
-
-## Requirements.
-
-Python 2.7 and 3.4+
-
-## Installation & Usage
-
-### pip install
-
-If the python package is hosted on Github, you can install directly from Github
-
-```sh
-pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
-```
-
-(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
-
-Then import the package:
-
-```python
-import sra_client
-```
-
-### Setuptools
-
-Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
-
-```sh
-python setup.py install --user
-```
-
-(or `sudo python setup.py install` to install the package for all users)
-
-Then import the package:
-
-```python
-import sra_client
-```
-
-## Getting Started
-
-Please follow the [installation procedure](#installation--usage) and then run the following:
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi(sra_client.ApiClient(configuration))
-asset_data_a = 0xf47261b04c32345ced77393b3530b1eed0f346429d # str | The assetData value for the first asset in the pair. (optional)
-asset_data_b = 0x0257179264389b814a946f3e92105513705ca6b990 # str | The assetData value for the second asset in the pair. (optional)
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-page = 3 # float | The number of the page to request in the collection. (optional) (default to 1)
-per_page = 10 # float | The number of records to return per page. (optional) (default to 100)
-
-try:
- api_response = api_instance.get_asset_pairs(asset_data_a=asset_data_a, asset_data_b=asset_data_b, network_id=network_id, page=page, per_page=per_page)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_asset_pairs: %s\n" % e)
-```
-
-## Documentation for API Endpoints
-
-All URIs are relative to _http://localhost_
-
-| Class | Method | HTTP request | Description |
-| ------------ | --------------------------------------------------------------- | ----------------------------- | ----------- |
-| _DefaultApi_ | [**get_asset_pairs**](docs/DefaultApi.md#get_asset_pairs) | **GET** /v2/asset_pairs |
-| _DefaultApi_ | [**get_fee_recipients**](docs/DefaultApi.md#get_fee_recipients) | **GET** /v2/fee_recipients |
-| _DefaultApi_ | [**get_order**](docs/DefaultApi.md#get_order) | **GET** /v2/order/{orderHash} |
-| _DefaultApi_ | [**get_order_config**](docs/DefaultApi.md#get_order_config) | **POST** /v2/order_config |
-| _DefaultApi_ | [**get_orderbook**](docs/DefaultApi.md#get_orderbook) | **GET** /v2/orderbook |
-| _DefaultApi_ | [**get_orders**](docs/DefaultApi.md#get_orders) | **GET** /v2/orders |
-| _DefaultApi_ | [**post_order**](docs/DefaultApi.md#post_order) | **POST** /v2/order |
-
-## Documentation For Models
-
-- [OrderSchema](docs/OrderSchema.md)
-- [PaginatedCollectionSchema](docs/PaginatedCollectionSchema.md)
-- [RelayerApiAssetDataPairsResponseSchema](docs/RelayerApiAssetDataPairsResponseSchema.md)
-- [RelayerApiAssetDataTradeInfoSchema](docs/RelayerApiAssetDataTradeInfoSchema.md)
-- [RelayerApiErrorResponseSchema](docs/RelayerApiErrorResponseSchema.md)
-- [RelayerApiErrorResponseSchemaValidationErrors](docs/RelayerApiErrorResponseSchemaValidationErrors.md)
-- [RelayerApiFeeRecipientsResponseSchema](docs/RelayerApiFeeRecipientsResponseSchema.md)
-- [RelayerApiOrderConfigPayloadSchema](docs/RelayerApiOrderConfigPayloadSchema.md)
-- [RelayerApiOrderConfigResponseSchema](docs/RelayerApiOrderConfigResponseSchema.md)
-- [RelayerApiOrderSchema](docs/RelayerApiOrderSchema.md)
-- [RelayerApiOrderbookResponseSchema](docs/RelayerApiOrderbookResponseSchema.md)
-- [RelayerApiOrdersChannelSubscribePayloadSchema](docs/RelayerApiOrdersChannelSubscribePayloadSchema.md)
-- [RelayerApiOrdersChannelSubscribeSchema](docs/RelayerApiOrdersChannelSubscribeSchema.md)
-- [RelayerApiOrdersChannelUpdateSchema](docs/RelayerApiOrdersChannelUpdateSchema.md)
-- [RelayerApiOrdersResponseSchema](docs/RelayerApiOrdersResponseSchema.md)
-- [SignedOrderSchema](docs/SignedOrderSchema.md)
-
-## Documentation For Authorization
-
-All endpoints do not require authorization.
diff --git a/python-packages/sra_client/docs/DefaultApi.md b/python-packages/sra_client/docs/DefaultApi.md
deleted file mode 100644
index 9e3f5f2ca..000000000
--- a/python-packages/sra_client/docs/DefaultApi.md
+++ /dev/null
@@ -1,397 +0,0 @@
-# sra_client.DefaultApi
-
-All URIs are relative to _http://localhost_
-
-| Method | HTTP request | Description |
-| ---------------------------------------------------------- | ----------------------------- | ----------- |
-| [**get_asset_pairs**](DefaultApi.md#get_asset_pairs) | **GET** /v2/asset_pairs |
-| [**get_fee_recipients**](DefaultApi.md#get_fee_recipients) | **GET** /v2/fee_recipients |
-| [**get_order**](DefaultApi.md#get_order) | **GET** /v2/order/{orderHash} |
-| [**get_order_config**](DefaultApi.md#get_order_config) | **POST** /v2/order_config |
-| [**get_orderbook**](DefaultApi.md#get_orderbook) | **GET** /v2/orderbook |
-| [**get_orders**](DefaultApi.md#get_orders) | **GET** /v2/orders |
-| [**post_order**](DefaultApi.md#post_order) | **POST** /v2/order |
-
-# **get_asset_pairs**
-
-> RelayerApiAssetDataPairsResponseSchema get_asset_pairs(asset_data_a=asset_data_a, asset_data_b=asset_data_b, network_id=network_id, page=page, per_page=per_page)
-
-Retrieves a list of available asset pairs and the information required to trade them (in any order). Setting only `assetDataA` or `assetDataB` returns pairs filtered by that asset only.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-asset_data_a = 0xf47261b04c32345ced77393b3530b1eed0f346429d # str | The assetData value for the first asset in the pair. (optional)
-asset_data_b = 0x0257179264389b814a946f3e92105513705ca6b990 # str | The assetData value for the second asset in the pair. (optional)
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-page = 3 # float | The number of the page to request in the collection. (optional) (default to 1)
-per_page = 10 # float | The number of records to return per page. (optional) (default to 100)
-
-try:
- api_response = api_instance.get_asset_pairs(asset_data_a=asset_data_a, asset_data_b=asset_data_b, network_id=network_id, page=page, per_page=per_page)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_asset_pairs: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| ---------------- | --------- | ----------------------------------------------------- | -------------------------- |
-| **asset_data_a** | **str** | The assetData value for the first asset in the pair. | [optional] |
-| **asset_data_b** | **str** | The assetData value for the second asset in the pair. | [optional] |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **page** | **float** | The number of the page to request in the collection. | [optional][default to 1] |
-| **per_page** | **float** | The number of records to return per page. | [optional][default to 100] |
-
-### Return type
-
-[**RelayerApiAssetDataPairsResponseSchema**](RelayerApiAssetDataPairsResponseSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **get_fee_recipients**
-
-> RelayerApiFeeRecipientsResponseSchema get_fee_recipients(network_id=network_id, page=page, per_page=per_page)
-
-Retrieves a collection of all fee recipient addresses for a relayer. This endpoint should be [paginated](#section/Pagination).
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-page = 3 # float | The number of the page to request in the collection. (optional) (default to 1)
-per_page = 10 # float | The number of records to return per page. (optional) (default to 100)
-
-try:
- api_response = api_instance.get_fee_recipients(network_id=network_id, page=page, per_page=per_page)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_fee_recipients: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| -------------- | --------- | ---------------------------------------------------- | -------------------------- |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **page** | **float** | The number of the page to request in the collection. | [optional][default to 1] |
-| **per_page** | **float** | The number of records to return per page. | [optional][default to 100] |
-
-### Return type
-
-[**RelayerApiFeeRecipientsResponseSchema**](RelayerApiFeeRecipientsResponseSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **get_order**
-
-> RelayerApiOrderSchema get_order(order_hash, network_id=network_id)
-
-Retrieves the 0x order with meta info that is associated with the hash.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-order_hash = 0xd4b103c42d2512eef3fee775e097f044291615d25f5d71e0ac70dbd49d223591 # str | The hash of the desired 0x order.
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-
-try:
- api_response = api_instance.get_order(order_hash, network_id=network_id)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_order: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| -------------- | --------- | --------------------------------- | ------------------------ |
-| **order_hash** | **str** | The hash of the desired 0x order. |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-
-### Return type
-
-[**RelayerApiOrderSchema**](RelayerApiOrderSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **get_order_config**
-
-> RelayerApiOrderConfigResponseSchema get_order_config(network_id=network_id, relayer_api_order_config_payload_schema=relayer_api_order_config_payload_schema)
-
-Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: `senderAddress`, `feeRecipientAddress`, `makerFee`, `takerFee`.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-relayer_api_order_config_payload_schema = {"makerAddress":"0x9e56625509c2f60af937f23b7b532600390e8c8b","takerAddress":"0xa2b31dacf30a9c50ca473337c01d8a201ae33e32","makerAssetAmount":"10000000000000000","takerAssetAmount":"1","makerAssetData":"0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498","takerAssetData":"0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063","exchangeAddress":"0x12459c951127e0c374ff9105dda097662a027093","expirationTimeSeconds":"1532560590"} # RelayerApiOrderConfigPayloadSchema | The fields of a 0x order the relayer may want to decide what configuration to send back. (optional)
-
-try:
- api_response = api_instance.get_order_config(network_id=network_id, relayer_api_order_config_payload_schema=relayer_api_order_config_payload_schema)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_order_config: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| ------------------------------------------- | ------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------- | ------------------------ |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **relayer_api_order_config_payload_schema** | [**RelayerApiOrderConfigPayloadSchema**](RelayerApiOrderConfigPayloadSchema.md) | The fields of a 0x order the relayer may want to decide what configuration to send back. | [optional] |
-
-### Return type
-
-[**RelayerApiOrderConfigResponseSchema**](RelayerApiOrderConfigResponseSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **get_orderbook**
-
-> RelayerApiOrderbookResponseSchema get_orderbook(base_asset_data, quote_asset_data, network_id=network_id, page=page, per_page=per_page)
-
-Retrieves the orderbook for a given asset pair. This endpoint should be [paginated](#section/Pagination). Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by _taker fee price_ which is defined as the **takerFee** divided by **takerTokenAmount**. After _taker fee price_, orders are to be sorted by expiration in ascending order. The way pagination works for this endpoint is that the **page** and **perPage** query params apply to both `bids` and `asks` collections, and if `page` \* `perPage` > `total` for a certain collection, the `records` for that collection should just be empty.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-base_asset_data = 0xf47261b04c32345ced77393b3530b1eed0f346429d # str | assetData (makerAssetData or takerAssetData) designated as the base currency in the [currency pair calculation](https://en.wikipedia.org/wiki/Currency_pair) of price.
-quote_asset_data = 0xf47261b04c32345ced77393b3530b1eed0f346429d # str | assetData (makerAssetData or takerAssetData) designated as the quote currency in the currency pair calculation of price (required).
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-page = 3 # float | The number of the page to request in the collection. (optional) (default to 1)
-per_page = 10 # float | The number of records to return per page. (optional) (default to 100)
-
-try:
- api_response = api_instance.get_orderbook(base_asset_data, quote_asset_data, network_id=network_id, page=page, per_page=per_page)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_orderbook: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| -------------------- | --------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
-| **base_asset_data** | **str** | assetData (makerAssetData or takerAssetData) designated as the base currency in the [currency pair calculation](https://en.wikipedia.org/wiki/Currency_pair) of price. |
-| **quote_asset_data** | **str** | assetData (makerAssetData or takerAssetData) designated as the quote currency in the currency pair calculation of price (required). |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **page** | **float** | The number of the page to request in the collection. | [optional][default to 1] |
-| **per_page** | **float** | The number of records to return per page. | [optional][default to 100] |
-
-### Return type
-
-[**RelayerApiOrderbookResponseSchema**](RelayerApiOrderbookResponseSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **get_orders**
-
-> RelayerApiOrdersResponseSchema get_orders(maker_asset_proxy_id=maker_asset_proxy_id, taker_asset_proxy_id=taker_asset_proxy_id, maker_asset_address=maker_asset_address, taker_asset_address=taker_asset_address, exchange_address=exchange_address, sender_address=sender_address, maker_asset_data=maker_asset_data, taker_asset_data=taker_asset_data, trader_asset_data=trader_asset_data, maker_address=maker_address, taker_address=taker_address, trader_address=trader_address, fee_recipient_address=fee_recipient_address, network_id=network_id, page=page, per_page=per_page)
-
-Retrieves a list of orders given query parameters. This endpoint should be [paginated](#section/Pagination). For querying an entire orderbook snapshot, the [orderbook endpoint](#operation/getOrderbook) is recommended. If both makerAssetData and takerAssetData are specified, returned orders will be sorted by price determined by (takerTokenAmount/makerTokenAmount) in ascending order. By default, orders returned by this endpoint are unsorted.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-maker_asset_proxy_id = 0xf47261b0 # str | The maker [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721). (optional)
-taker_asset_proxy_id = 0x02571792 # str | The taker asset [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721). (optional)
-maker_asset_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | The contract address for the maker asset. (optional)
-taker_asset_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | The contract address for the taker asset. (optional)
-exchange_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as exchangeAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-sender_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as senderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-maker_asset_data = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as makerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-taker_asset_data = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as takerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-trader_asset_data = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as traderAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-maker_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as makerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-taker_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-trader_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-fee_recipient_address = 0xe41d2489571d322189246dafa5ebde1f4699f498 # str | Same as feeRecipientAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) (optional)
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-page = 3 # float | The number of the page to request in the collection. (optional) (default to 1)
-per_page = 10 # float | The number of records to return per page. (optional) (default to 100)
-
-try:
- api_response = api_instance.get_orders(maker_asset_proxy_id=maker_asset_proxy_id, taker_asset_proxy_id=taker_asset_proxy_id, maker_asset_address=maker_asset_address, taker_asset_address=taker_asset_address, exchange_address=exchange_address, sender_address=sender_address, maker_asset_data=maker_asset_data, taker_asset_data=taker_asset_data, trader_asset_data=trader_asset_data, maker_address=maker_address, taker_address=taker_address, trader_address=trader_address, fee_recipient_address=fee_recipient_address, network_id=network_id, page=page, per_page=per_page)
- pprint(api_response)
-except ApiException as e:
- print("Exception when calling DefaultApi->get_orders: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| ------------------------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
-| **maker_asset_proxy_id** | **str** | The maker [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \&quot;0xf47261b0\&quot; for ERC20, \&quot;0x02571792\&quot; for ERC721). | [optional] |
-| **taker_asset_proxy_id** | **str** | The taker asset [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \&quot;0xf47261b0\&quot; for ERC20, \&quot;0x02571792\&quot; for ERC721). | [optional] |
-| **maker_asset_address** | **str** | The contract address for the maker asset. | [optional] |
-| **taker_asset_address** | **str** | The contract address for the taker asset. | [optional] |
-| **exchange_address** | **str** | Same as exchangeAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **sender_address** | **str** | Same as senderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **maker_asset_data** | **str** | Same as makerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **taker_asset_data** | **str** | Same as takerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **trader_asset_data** | **str** | Same as traderAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **maker_address** | **str** | Same as makerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **taker_address** | **str** | Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **trader_address** | **str** | Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **fee_recipient_address** | **str** | Same as feeRecipientAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format) | [optional] |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **page** | **float** | The number of the page to request in the collection. | [optional][default to 1] |
-| **per_page** | **float** | The number of records to return per page. | [optional][default to 100] |
-
-### Return type
-
-[**RelayerApiOrdersResponseSchema**](RelayerApiOrdersResponseSchema.md)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: Not defined
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
-
-# **post_order**
-
-> post_order(network_id=network_id, signed_order_schema=signed_order_schema)
-
-Submit a signed order to the relayer.
-
-### Example
-
-```python
-from __future__ import print_function
-import time
-import sra_client
-from sra_client.rest import ApiException
-from pprint import pprint
-
-# create an instance of the API class
-api_instance = sra_client.DefaultApi()
-network_id = 42 # float | The id of the Ethereum network (optional) (default to 1)
-signed_order_schema = {"makerAddress":"0x9e56625509c2f60af937f23b7b532600390e8c8b","takerAddress":"0xa2b31dacf30a9c50ca473337c01d8a201ae33e32","feeRecipientAddress":"0xb046140686d052fff581f63f8136cce132e857da","senderAddress":"0xa2b31dacf30a9c50ca473337c01d8a201ae33e32","makerAssetAmount":"10000000000000000","takerAssetAmount":"20000000000000000","makerFee":"100000000000000","takerFee":"200000000000000","expirationTimeSeconds":"1532560590","salt":"1532559225","makerAssetData":"0xf47261b0000000000000000000000000e41d2489571d322189246dafa5ebde1f4699f498","takerAssetData":"0x02571792000000000000000000000000371b13d97f4bf77d724e78c16b7dc74099f40e840000000000000000000000000000000000000000000000000000000000000063","exchangeAddress":"0x12459c951127e0c374ff9105dda097662a027093","signature":"0x012761a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33"} # SignedOrderSchema | A valid signed 0x order based on the schema. (optional)
-
-try:
- api_instance.post_order(network_id=network_id, signed_order_schema=signed_order_schema)
-except ApiException as e:
- print("Exception when calling DefaultApi->post_order: %s\n" % e)
-```
-
-### Parameters
-
-| Name | Type | Description | Notes |
-| ----------------------- | --------------------------------------------- | -------------------------------------------- | ------------------------ |
-| **network_id** | **float** | The id of the Ethereum network | [optional][default to 1] |
-| **signed_order_schema** | [**SignedOrderSchema**](SignedOrderSchema.md) | A valid signed 0x order based on the schema. | [optional] |
-
-### Return type
-
-void (empty response body)
-
-### Authorization
-
-No authorization required
-
-### HTTP request headers
-
-- **Content-Type**: application/json
-- **Accept**: application/json
-
-[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/OrderSchema.md b/python-packages/sra_client/docs/OrderSchema.md
deleted file mode 100644
index 5378c95f4..000000000
--- a/python-packages/sra_client/docs/OrderSchema.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# OrderSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| --------------------------- | ------- | ----------- | ----- |
-| **maker_address** | **str** | |
-| **taker_address** | **str** | |
-| **maker_fee** | **str** | |
-| **taker_fee** | **str** | |
-| **sender_address** | **str** | |
-| **maker_asset_amount** | **str** | |
-| **taker_asset_amount** | **str** | |
-| **maker_asset_data** | **str** | |
-| **taker_asset_data** | **str** | |
-| **salt** | **str** | |
-| **exchange_address** | **str** | |
-| **fee_recipient_address** | **str** | |
-| **expiration_time_seconds** | **str** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/PaginatedCollectionSchema.md b/python-packages/sra_client/docs/PaginatedCollectionSchema.md
deleted file mode 100644
index 969cbf7b5..000000000
--- a/python-packages/sra_client/docs/PaginatedCollectionSchema.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# PaginatedCollectionSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ------------ | --------- | ----------- | ----- |
-| **total** | **float** | |
-| **per_page** | **float** | |
-| **page** | **float** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiAssetDataPairsResponseSchema.md b/python-packages/sra_client/docs/RelayerApiAssetDataPairsResponseSchema.md
deleted file mode 100644
index 0e87e8dc0..000000000
--- a/python-packages/sra_client/docs/RelayerApiAssetDataPairsResponseSchema.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# RelayerApiAssetDataPairsResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ----------- | ---------------- | ----------- | ----- |
-| **records** | **list[object]** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiAssetDataTradeInfoSchema.md b/python-packages/sra_client/docs/RelayerApiAssetDataTradeInfoSchema.md
deleted file mode 100644
index 15de4e4ad..000000000
--- a/python-packages/sra_client/docs/RelayerApiAssetDataTradeInfoSchema.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# RelayerApiAssetDataTradeInfoSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| -------------- | --------- | ----------- | ---------- |
-| **asset_data** | **str** | |
-| **min_amount** | **str** | | [optional] |
-| **max_amount** | **str** | | [optional] |
-| **precision** | **float** | | [optional] |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiErrorResponseSchema.md b/python-packages/sra_client/docs/RelayerApiErrorResponseSchema.md
deleted file mode 100644
index 11e3b32a9..000000000
--- a/python-packages/sra_client/docs/RelayerApiErrorResponseSchema.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# RelayerApiErrorResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| --------------------- | ----------------------------------------------------------------------------------------------------------- | ----------- | ---------- |
-| **code** | **int** | |
-| **reason** | **str** | |
-| **validation_errors** | [**list[RelayerApiErrorResponseSchemaValidationErrors]**](RelayerApiErrorResponseSchemaValidationErrors.md) | | [optional] |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiErrorResponseSchemaValidationErrors.md b/python-packages/sra_client/docs/RelayerApiErrorResponseSchemaValidationErrors.md
deleted file mode 100644
index 2147b3822..000000000
--- a/python-packages/sra_client/docs/RelayerApiErrorResponseSchemaValidationErrors.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# RelayerApiErrorResponseSchemaValidationErrors
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ---------- | ------- | ----------- | ----- |
-| **field** | **str** | |
-| **code** | **int** | |
-| **reason** | **str** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiFeeRecipientsResponseSchema.md b/python-packages/sra_client/docs/RelayerApiFeeRecipientsResponseSchema.md
deleted file mode 100644
index f12582a81..000000000
--- a/python-packages/sra_client/docs/RelayerApiFeeRecipientsResponseSchema.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# RelayerApiFeeRecipientsResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ----------- | ------------- | ----------- | ----- |
-| **records** | **list[str]** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrderConfigPayloadSchema.md b/python-packages/sra_client/docs/RelayerApiOrderConfigPayloadSchema.md
deleted file mode 100644
index ee0800066..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrderConfigPayloadSchema.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# RelayerApiOrderConfigPayloadSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| --------------------------- | ------- | ----------- | ----- |
-| **maker_address** | **str** | |
-| **taker_address** | **str** | |
-| **maker_asset_amount** | **str** | |
-| **taker_asset_amount** | **str** | |
-| **maker_asset_data** | **str** | |
-| **taker_asset_data** | **str** | |
-| **exchange_address** | **str** | |
-| **expiration_time_seconds** | **str** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrderConfigResponseSchema.md b/python-packages/sra_client/docs/RelayerApiOrderConfigResponseSchema.md
deleted file mode 100644
index 2ebafdf47..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrderConfigResponseSchema.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# RelayerApiOrderConfigResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ------------------------- | ------- | ----------- | ----- |
-| **maker_fee** | **str** | |
-| **taker_fee** | **str** | |
-| **fee_recipient_address** | **str** | |
-| **sender_address** | **str** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrderSchema.md b/python-packages/sra_client/docs/RelayerApiOrderSchema.md
deleted file mode 100644
index bbdffe2f4..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrderSchema.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# RelayerApiOrderSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ------------- | --------------------------------- | ----------- | ----- |
-| **order** | [**OrderSchema**](OrderSchema.md) | |
-| **meta_data** | [**object**](.md) | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrderbookResponseSchema.md b/python-packages/sra_client/docs/RelayerApiOrderbookResponseSchema.md
deleted file mode 100644
index 6fb7c88ff..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrderbookResponseSchema.md
+++ /dev/null
@@ -1,10 +0,0 @@
-# RelayerApiOrderbookResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| -------- | ----------------------------------------------------------------------- | ----------- | ----- |
-| **bids** | [**RelayerApiOrdersResponseSchema**](RelayerApiOrdersResponseSchema.md) | |
-| **asks** | [**RelayerApiOrdersResponseSchema**](RelayerApiOrdersResponseSchema.md) | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribePayloadSchema.md b/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribePayloadSchema.md
deleted file mode 100644
index 97c2cbc21..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribePayloadSchema.md
+++ /dev/null
@@ -1,16 +0,0 @@
-# RelayerApiOrdersChannelSubscribePayloadSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ------------------------ | --------- | ----------- | ---------- |
-| **maker_asset_proxy_id** | **str** | | [optional] |
-| **taker_asset_proxy_id** | **str** | | [optional] |
-| **network_id** | **float** | | [optional] |
-| **maker_asset_address** | **str** | | [optional] |
-| **taker_asset_address** | **str** | | [optional] |
-| **maker_asset_data** | **str** | | [optional] |
-| **taker_asset_data** | **str** | | [optional] |
-| **trader_asset_data** | **str** | | [optional] |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribeSchema.md b/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribeSchema.md
deleted file mode 100644
index 5e1c96c24..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrdersChannelSubscribeSchema.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# RelayerApiOrdersChannelSubscribeSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| -------------- | ----------------------------------------------------------------------------------------------------- | ----------- | ---------- |
-| **type** | **str** | |
-| **channel** | **str** | |
-| **request_id** | **str** | |
-| **payload** | [**RelayerApiOrdersChannelSubscribePayloadSchema**](RelayerApiOrdersChannelSubscribePayloadSchema.md) | | [optional] |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrdersChannelUpdateSchema.md b/python-packages/sra_client/docs/RelayerApiOrdersChannelUpdateSchema.md
deleted file mode 100644
index 8d763367a..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrdersChannelUpdateSchema.md
+++ /dev/null
@@ -1,12 +0,0 @@
-# RelayerApiOrdersChannelUpdateSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| -------------- | ----------------------------------------------------------- | ----------- | ---------- |
-| **type** | **str** | |
-| **channel** | **str** | |
-| **request_id** | **str** | |
-| **payload** | [**list[RelayerApiOrderSchema]**](RelayerApiOrderSchema.md) | | [optional] |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/RelayerApiOrdersResponseSchema.md b/python-packages/sra_client/docs/RelayerApiOrdersResponseSchema.md
deleted file mode 100644
index 8989d346b..000000000
--- a/python-packages/sra_client/docs/RelayerApiOrdersResponseSchema.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# RelayerApiOrdersResponseSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ----------- | ----------------------------------------------------------- | ----------- | ----- |
-| **records** | [**list[RelayerApiOrderSchema]**](RelayerApiOrderSchema.md) | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/docs/SignedOrderSchema.md b/python-packages/sra_client/docs/SignedOrderSchema.md
deleted file mode 100644
index 4c753e6cc..000000000
--- a/python-packages/sra_client/docs/SignedOrderSchema.md
+++ /dev/null
@@ -1,9 +0,0 @@
-# SignedOrderSchema
-
-## Properties
-
-| Name | Type | Description | Notes |
-| ------------- | ------- | ----------- | ----- |
-| **signature** | **str** | |
-
-[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/python-packages/sra_client/generate.sh b/python-packages/sra_client/generate.sh
deleted file mode 100755
index 91967dee3..000000000
--- a/python-packages/sra_client/generate.sh
+++ /dev/null
@@ -1,26 +0,0 @@
-# This file provided not so much to be run but rather more for posterity, as a
-# record of how this generated code was produced.
-
-GENERATOR_JAR=http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/3.3.4/openapi-generator-cli-3.3.4.jar
-GENERATOR_JAR_BASENAME=$(basename $GENERATOR_JAR)
-
-if [ -f $GENERATOR_JAR_BASENAME ]; then
- if [ "$(openssl dgst -sha256 $GENERATOR_JAR_BASENAME)" \
- != "SHA256($GENERATOR_JAR_BASENAME)= 24cb04939110cffcdd7062d2f50c6f61159dc3e0ca3b8aecbae6ade53ad3dc8c" \
- ]; then
- rm $GENERATOR_JAR_BASENAME
- fi
-fi
-
-if [ ! -f $GENERATOR_JAR_BASENAME ]; then
- wget $GENERATOR_JAR
-fi
-
-PYTHON_POST_PROCESS_FILE="black --line-length 79" \
- java -jar openapi-generator-cli-3.3.4.jar \
- generate \
- --input-spec http://unpkg.com/@0x/sra-spec@1.0.11/lib/api.json \
- --output . \
- --generator-name python \
- --config openapi-generator-cli-config.json \
- --enable-post-process-file
diff --git a/python-packages/sra_client/openapi-generator-cli-config.json b/python-packages/sra_client/openapi-generator-cli-config.json
deleted file mode 100644
index cc619e465..000000000
--- a/python-packages/sra_client/openapi-generator-cli-config.json
+++ /dev/null
@@ -1,4 +0,0 @@
-{
- "packageName": "sra_client",
- "projectName": "0x-sra-client"
-}
diff --git a/python-packages/sra_client/requirements.txt b/python-packages/sra_client/requirements.txt
deleted file mode 100644
index bafdc0753..000000000
--- a/python-packages/sra_client/requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-certifi >= 14.05.14
-six >= 1.10
-python_dateutil >= 2.5.3
-setuptools >= 21.0.0
-urllib3 >= 1.15.1
diff --git a/python-packages/sra_client/setup.py b/python-packages/sra_client/setup.py
deleted file mode 100755
index 0921149bd..000000000
--- a/python-packages/sra_client/setup.py
+++ /dev/null
@@ -1,77 +0,0 @@
-#!/usr/bin/env python
-# coding: utf-8
-
-
-import subprocess
-import distutils.command.build_py
-
-from setuptools import setup, find_packages # noqa: H301
-
-NAME = "0x-sra-client"
-VERSION = "1.0.0"
-# To install the library, run the following
-#
-# python setup.py install
-#
-# prerequisite: setuptools
-# http://pypi.python.org/pypi/setuptools
-
-with open("README.md", "r") as file_handle:
- README_MD = file_handle.read()
-
-REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil"]
-
-class TestPublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to test.pypi.org."""
-
- description = (
- "Publish dist/* to test.pypi.org. Run sdist & bdist_wheel first."
- )
-
- def run(self):
- """Run twine to upload to test.pypi.org."""
- subprocess.check_call( # nosec
- (
- "twine upload --repository-url https://test.pypi.org/legacy/"
- + " --verbose dist/*"
- ).split()
- )
-
-
-class PublishCommand(distutils.command.build_py.build_py):
- """Custom command to publish to pypi.org."""
-
- description = "Publish dist/* to pypi.org. Run sdist & bdist_wheel first."
-
- def run(self):
- """Run twine to upload to pypi.org."""
- subprocess.check_call("twine upload dist/*".split()) # nosec
-
-
-class LintCommand(distutils.command.build_py.build_py):
- """No-op lint command to support top-level lint script."""
-
- description = "No-op"
-
- def run(self):
- pass
-
-
-setup(
- name=NAME,
- version=VERSION,
- description="Standard Relayer REST API",
- author_email="",
- url="https://github.com/0xproject/0x-monorepo/python-packages/sra_client",
- keywords=["OpenAPI", "OpenAPI-Generator", "Standard Relayer REST API"],
- install_requires=REQUIRES,
- packages=find_packages(),
- include_package_data=True,
- long_description=README_MD,
- long_description_content_type="text/markdown",
- cmdclass={
- "test_publish": TestPublishCommand,
- "publish": PublishCommand,
- "lint": LintCommand,
- },
-)
diff --git a/python-packages/sra_client/sra_client/__init__.py b/python-packages/sra_client/sra_client/__init__.py
deleted file mode 100644
index fc02976a5..000000000
--- a/python-packages/sra_client/sra_client/__init__.py
+++ /dev/null
@@ -1,59 +0,0 @@
-# coding: utf-8
-
-# flake8: noqa
-
-
-from __future__ import absolute_import
-
-__version__ = "1.0.0"
-
-# import apis into sdk package
-from sra_client.api.default_api import DefaultApi
-
-# import ApiClient
-from sra_client.api_client import ApiClient
-from sra_client.configuration import Configuration
-
-# import models into sdk package
-from sra_client.models.order_schema import OrderSchema
-from sra_client.models.paginated_collection_schema import (
- PaginatedCollectionSchema,
-)
-from sra_client.models.relayer_api_asset_data_pairs_response_schema import (
- RelayerApiAssetDataPairsResponseSchema,
-)
-from sra_client.models.relayer_api_asset_data_trade_info_schema import (
- RelayerApiAssetDataTradeInfoSchema,
-)
-from sra_client.models.relayer_api_error_response_schema import (
- RelayerApiErrorResponseSchema,
-)
-from sra_client.models.relayer_api_error_response_schema_validation_errors import (
- RelayerApiErrorResponseSchemaValidationErrors,
-)
-from sra_client.models.relayer_api_fee_recipients_response_schema import (
- RelayerApiFeeRecipientsResponseSchema,
-)
-from sra_client.models.relayer_api_order_config_payload_schema import (
- RelayerApiOrderConfigPayloadSchema,
-)
-from sra_client.models.relayer_api_order_config_response_schema import (
- RelayerApiOrderConfigResponseSchema,
-)
-from sra_client.models.relayer_api_order_schema import RelayerApiOrderSchema
-from sra_client.models.relayer_api_orderbook_response_schema import (
- RelayerApiOrderbookResponseSchema,
-)
-from sra_client.models.relayer_api_orders_channel_subscribe_payload_schema import (
- RelayerApiOrdersChannelSubscribePayloadSchema,
-)
-from sra_client.models.relayer_api_orders_channel_subscribe_schema import (
- RelayerApiOrdersChannelSubscribeSchema,
-)
-from sra_client.models.relayer_api_orders_channel_update_schema import (
- RelayerApiOrdersChannelUpdateSchema,
-)
-from sra_client.models.relayer_api_orders_response_schema import (
- RelayerApiOrdersResponseSchema,
-)
-from sra_client.models.signed_order_schema import SignedOrderSchema
diff --git a/python-packages/sra_client/sra_client/api/__init__.py b/python-packages/sra_client/sra_client/api/__init__.py
deleted file mode 100644
index b7b206bb1..000000000
--- a/python-packages/sra_client/sra_client/api/__init__.py
+++ /dev/null
@@ -1,6 +0,0 @@
-from __future__ import absolute_import
-
-# flake8: noqa
-
-# import apis into api package
-from sra_client.api.default_api import DefaultApi
diff --git a/python-packages/sra_client/sra_client/api/default_api.py b/python-packages/sra_client/sra_client/api/default_api.py
deleted file mode 100644
index 2d65db609..000000000
--- a/python-packages/sra_client/sra_client/api/default_api.py
+++ /dev/null
@@ -1,976 +0,0 @@
-# coding: utf-8
-
-
-from __future__ import absolute_import
-
-import re # noqa: F401
-
-# python 2 and python 3 compatibility library
-import six
-
-from sra_client.api_client import ApiClient
-
-
-class DefaultApi(object):
- """NOTE: This class is auto generated by OpenAPI Generator
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- def __init__(self, api_client=None):
- if api_client is None:
- api_client = ApiClient()
- self.api_client = api_client
-
- def get_asset_pairs(self, **kwargs): # noqa: E501
- """get_asset_pairs # noqa: E501
-
- Retrieves a list of available asset pairs and the information required to trade them (in any order). Setting only `assetDataA` or `assetDataB` returns pairs filtered by that asset only. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_asset_pairs(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str asset_data_a: The assetData value for the first asset in the pair.
- :param str asset_data_b: The assetData value for the second asset in the pair.
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiAssetDataPairsResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_asset_pairs_with_http_info(**kwargs) # noqa: E501
- else:
- (data) = self.get_asset_pairs_with_http_info(
- **kwargs
- ) # noqa: E501
- return data
-
- def get_asset_pairs_with_http_info(self, **kwargs): # noqa: E501
- """get_asset_pairs # noqa: E501
-
- Retrieves a list of available asset pairs and the information required to trade them (in any order). Setting only `assetDataA` or `assetDataB` returns pairs filtered by that asset only. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_asset_pairs_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str asset_data_a: The assetData value for the first asset in the pair.
- :param str asset_data_b: The assetData value for the second asset in the pair.
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiAssetDataPairsResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- "asset_data_a",
- "asset_data_b",
- "network_id",
- "page",
- "per_page",
- ] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_asset_pairs" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "asset_data_a" in local_var_params:
- query_params.append(
- ("assetDataA", local_var_params["asset_data_a"])
- ) # noqa: E501
- if "asset_data_b" in local_var_params:
- query_params.append(
- ("assetDataB", local_var_params["asset_data_b"])
- ) # noqa: E501
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
- if "page" in local_var_params:
- query_params.append(
- ("page", local_var_params["page"])
- ) # noqa: E501
- if "per_page" in local_var_params:
- query_params.append(
- ("perPage", local_var_params["per_page"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/asset_pairs",
- "GET",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiAssetDataPairsResponseSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def get_fee_recipients(self, **kwargs): # noqa: E501
- """get_fee_recipients # noqa: E501
-
- Retrieves a collection of all fee recipient addresses for a relayer. This endpoint should be [paginated](#section/Pagination). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fee_recipients(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiFeeRecipientsResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_fee_recipients_with_http_info(
- **kwargs
- ) # noqa: E501
- else:
- (data) = self.get_fee_recipients_with_http_info(
- **kwargs
- ) # noqa: E501
- return data
-
- def get_fee_recipients_with_http_info(self, **kwargs): # noqa: E501
- """get_fee_recipients # noqa: E501
-
- Retrieves a collection of all fee recipient addresses for a relayer. This endpoint should be [paginated](#section/Pagination). # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_fee_recipients_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiFeeRecipientsResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ["network_id", "page", "per_page"] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_fee_recipients" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
- if "page" in local_var_params:
- query_params.append(
- ("page", local_var_params["page"])
- ) # noqa: E501
- if "per_page" in local_var_params:
- query_params.append(
- ("perPage", local_var_params["per_page"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/fee_recipients",
- "GET",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiFeeRecipientsResponseSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def get_order(self, order_hash, **kwargs): # noqa: E501
- """get_order # noqa: E501
-
- Retrieves the 0x order with meta info that is associated with the hash. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_order(order_hash, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str order_hash: The hash of the desired 0x order. (required)
- :param float network_id: The id of the Ethereum network
- :return: RelayerApiOrderSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_order_with_http_info(
- order_hash, **kwargs
- ) # noqa: E501
- else:
- (data) = self.get_order_with_http_info(
- order_hash, **kwargs
- ) # noqa: E501
- return data
-
- def get_order_with_http_info(self, order_hash, **kwargs): # noqa: E501
- """get_order # noqa: E501
-
- Retrieves the 0x order with meta info that is associated with the hash. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_order_with_http_info(order_hash, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str order_hash: The hash of the desired 0x order. (required)
- :param float network_id: The id of the Ethereum network
- :return: RelayerApiOrderSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ["order_hash", "network_id"] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_order" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
- # verify the required parameter 'order_hash' is set
- if (
- "order_hash" not in local_var_params
- or local_var_params["order_hash"] is None
- ):
- raise ValueError(
- "Missing the required parameter `order_hash` when calling `get_order`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
- if "order_hash" in local_var_params:
- path_params["orderHash"] = local_var_params[
- "order_hash"
- ] # noqa: E501
-
- query_params = []
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/order/{orderHash}",
- "GET",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiOrderSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def get_order_config(self, **kwargs): # noqa: E501
- """get_order_config # noqa: E501
-
- Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: `senderAddress`, `feeRecipientAddress`, `makerFee`, `takerFee`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_order_config(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param RelayerApiOrderConfigPayloadSchema relayer_api_order_config_payload_schema: The fields of a 0x order the relayer may want to decide what configuration to send back.
- :return: RelayerApiOrderConfigResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_order_config_with_http_info(**kwargs) # noqa: E501
- else:
- (data) = self.get_order_config_with_http_info(
- **kwargs
- ) # noqa: E501
- return data
-
- def get_order_config_with_http_info(self, **kwargs): # noqa: E501
- """get_order_config # noqa: E501
-
- Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: `senderAddress`, `feeRecipientAddress`, `makerFee`, `takerFee`. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_order_config_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param RelayerApiOrderConfigPayloadSchema relayer_api_order_config_payload_schema: The fields of a 0x order the relayer may want to decide what configuration to send back.
- :return: RelayerApiOrderConfigResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- "network_id",
- "relayer_api_order_config_payload_schema",
- ] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_order_config" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if "relayer_api_order_config_payload_schema" in local_var_params:
- body_params = local_var_params[
- "relayer_api_order_config_payload_schema"
- ]
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params[
- "Content-Type"
- ] = self.api_client.select_header_content_type( # noqa: E501
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/order_config",
- "POST",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiOrderConfigResponseSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def get_orderbook(
- self, base_asset_data, quote_asset_data, **kwargs
- ): # noqa: E501
- """get_orderbook # noqa: E501
-
- Retrieves the orderbook for a given asset pair. This endpoint should be [paginated](#section/Pagination). Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by _taker fee price_ which is defined as the **takerFee** divided by **takerTokenAmount**. After _taker fee price_, orders are to be sorted by expiration in ascending order. The way pagination works for this endpoint is that the **page** and **perPage** query params apply to both `bids` and `asks` collections, and if `page` * `perPage` > `total` for a certain collection, the `records` for that collection should just be empty. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_orderbook(base_asset_data, quote_asset_data, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str base_asset_data: assetData (makerAssetData or takerAssetData) designated as the base currency in the [currency pair calculation](https://en.wikipedia.org/wiki/Currency_pair) of price. (required)
- :param str quote_asset_data: assetData (makerAssetData or takerAssetData) designated as the quote currency in the currency pair calculation of price (required). (required)
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiOrderbookResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_orderbook_with_http_info(
- base_asset_data, quote_asset_data, **kwargs
- ) # noqa: E501
- else:
- (data) = self.get_orderbook_with_http_info(
- base_asset_data, quote_asset_data, **kwargs
- ) # noqa: E501
- return data
-
- def get_orderbook_with_http_info(
- self, base_asset_data, quote_asset_data, **kwargs
- ): # noqa: E501
- """get_orderbook # noqa: E501
-
- Retrieves the orderbook for a given asset pair. This endpoint should be [paginated](#section/Pagination). Bids will be sorted in descending order by price, and asks will be sorted in ascending order by price. Within the price sorted orders, the orders are further sorted by _taker fee price_ which is defined as the **takerFee** divided by **takerTokenAmount**. After _taker fee price_, orders are to be sorted by expiration in ascending order. The way pagination works for this endpoint is that the **page** and **perPage** query params apply to both `bids` and `asks` collections, and if `page` * `perPage` > `total` for a certain collection, the `records` for that collection should just be empty. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_orderbook_with_http_info(base_asset_data, quote_asset_data, async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str base_asset_data: assetData (makerAssetData or takerAssetData) designated as the base currency in the [currency pair calculation](https://en.wikipedia.org/wiki/Currency_pair) of price. (required)
- :param str quote_asset_data: assetData (makerAssetData or takerAssetData) designated as the quote currency in the currency pair calculation of price (required). (required)
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiOrderbookResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- "base_asset_data",
- "quote_asset_data",
- "network_id",
- "page",
- "per_page",
- ] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_orderbook" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
- # verify the required parameter 'base_asset_data' is set
- if (
- "base_asset_data" not in local_var_params
- or local_var_params["base_asset_data"] is None
- ):
- raise ValueError(
- "Missing the required parameter `base_asset_data` when calling `get_orderbook`"
- ) # noqa: E501
- # verify the required parameter 'quote_asset_data' is set
- if (
- "quote_asset_data" not in local_var_params
- or local_var_params["quote_asset_data"] is None
- ):
- raise ValueError(
- "Missing the required parameter `quote_asset_data` when calling `get_orderbook`"
- ) # noqa: E501
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "base_asset_data" in local_var_params:
- query_params.append(
- ("baseAssetData", local_var_params["base_asset_data"])
- ) # noqa: E501
- if "quote_asset_data" in local_var_params:
- query_params.append(
- ("quoteAssetData", local_var_params["quote_asset_data"])
- ) # noqa: E501
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
- if "page" in local_var_params:
- query_params.append(
- ("page", local_var_params["page"])
- ) # noqa: E501
- if "per_page" in local_var_params:
- query_params.append(
- ("perPage", local_var_params["per_page"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/orderbook",
- "GET",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiOrderbookResponseSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def get_orders(self, **kwargs): # noqa: E501
- """get_orders # noqa: E501
-
- Retrieves a list of orders given query parameters. This endpoint should be [paginated](#section/Pagination). For querying an entire orderbook snapshot, the [orderbook endpoint](#operation/getOrderbook) is recommended. If both makerAssetData and takerAssetData are specified, returned orders will be sorted by price determined by (takerTokenAmount/makerTokenAmount) in ascending order. By default, orders returned by this endpoint are unsorted. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_orders(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str maker_asset_proxy_id: The maker [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721).
- :param str taker_asset_proxy_id: The taker asset [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721).
- :param str maker_asset_address: The contract address for the maker asset.
- :param str taker_asset_address: The contract address for the taker asset.
- :param str exchange_address: Same as exchangeAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str sender_address: Same as senderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str maker_asset_data: Same as makerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str taker_asset_data: Same as takerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str trader_asset_data: Same as traderAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str maker_address: Same as makerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str taker_address: Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str trader_address: Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str fee_recipient_address: Same as feeRecipientAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiOrdersResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.get_orders_with_http_info(**kwargs) # noqa: E501
- else:
- (data) = self.get_orders_with_http_info(**kwargs) # noqa: E501
- return data
-
- def get_orders_with_http_info(self, **kwargs): # noqa: E501
- """get_orders # noqa: E501
-
- Retrieves a list of orders given query parameters. This endpoint should be [paginated](#section/Pagination). For querying an entire orderbook snapshot, the [orderbook endpoint](#operation/getOrderbook) is recommended. If both makerAssetData and takerAssetData are specified, returned orders will be sorted by price determined by (takerTokenAmount/makerTokenAmount) in ascending order. By default, orders returned by this endpoint are unsorted. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.get_orders_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param str maker_asset_proxy_id: The maker [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721).
- :param str taker_asset_proxy_id: The taker asset [asset proxy id](https://0xproject.com/docs/0x.js#types-AssetProxyId) (example: \"0xf47261b0\" for ERC20, \"0x02571792\" for ERC721).
- :param str maker_asset_address: The contract address for the maker asset.
- :param str taker_asset_address: The contract address for the taker asset.
- :param str exchange_address: Same as exchangeAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str sender_address: Same as senderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str maker_asset_data: Same as makerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str taker_asset_data: Same as takerAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str trader_asset_data: Same as traderAssetData in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str maker_address: Same as makerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str taker_address: Same as takerAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str trader_address: Same as traderAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param str fee_recipient_address: Same as feeRecipientAddress in the [0x Protocol v2 Specification](https://github.com/0xProject/0x-protocol-specification/blob/master/v2/v2-specification.md#order-message-format)
- :param float network_id: The id of the Ethereum network
- :param float page: The number of the page to request in the collection.
- :param float per_page: The number of records to return per page.
- :return: RelayerApiOrdersResponseSchema
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = [
- "maker_asset_proxy_id",
- "taker_asset_proxy_id",
- "maker_asset_address",
- "taker_asset_address",
- "exchange_address",
- "sender_address",
- "maker_asset_data",
- "taker_asset_data",
- "trader_asset_data",
- "maker_address",
- "taker_address",
- "trader_address",
- "fee_recipient_address",
- "network_id",
- "page",
- "per_page",
- ] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method get_orders" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "maker_asset_proxy_id" in local_var_params:
- query_params.append(
- ("makerAssetProxyId", local_var_params["maker_asset_proxy_id"])
- ) # noqa: E501
- if "taker_asset_proxy_id" in local_var_params:
- query_params.append(
- ("takerAssetProxyId", local_var_params["taker_asset_proxy_id"])
- ) # noqa: E501
- if "maker_asset_address" in local_var_params:
- query_params.append(
- ("makerAssetAddress", local_var_params["maker_asset_address"])
- ) # noqa: E501
- if "taker_asset_address" in local_var_params:
- query_params.append(
- ("takerAssetAddress", local_var_params["taker_asset_address"])
- ) # noqa: E501
- if "exchange_address" in local_var_params:
- query_params.append(
- ("exchangeAddress", local_var_params["exchange_address"])
- ) # noqa: E501
- if "sender_address" in local_var_params:
- query_params.append(
- ("senderAddress", local_var_params["sender_address"])
- ) # noqa: E501
- if "maker_asset_data" in local_var_params:
- query_params.append(
- ("makerAssetData", local_var_params["maker_asset_data"])
- ) # noqa: E501
- if "taker_asset_data" in local_var_params:
- query_params.append(
- ("takerAssetData", local_var_params["taker_asset_data"])
- ) # noqa: E501
- if "trader_asset_data" in local_var_params:
- query_params.append(
- ("traderAssetData", local_var_params["trader_asset_data"])
- ) # noqa: E501
- if "maker_address" in local_var_params:
- query_params.append(
- ("makerAddress", local_var_params["maker_address"])
- ) # noqa: E501
- if "taker_address" in local_var_params:
- query_params.append(
- ("takerAddress", local_var_params["taker_address"])
- ) # noqa: E501
- if "trader_address" in local_var_params:
- query_params.append(
- ("traderAddress", local_var_params["trader_address"])
- ) # noqa: E501
- if "fee_recipient_address" in local_var_params:
- query_params.append(
- (
- "feeRecipientAddress",
- local_var_params["fee_recipient_address"],
- )
- ) # noqa: E501
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
- if "page" in local_var_params:
- query_params.append(
- ("page", local_var_params["page"])
- ) # noqa: E501
- if "per_page" in local_var_params:
- query_params.append(
- ("perPage", local_var_params["per_page"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/orders",
- "GET",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type="RelayerApiOrdersResponseSchema", # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
-
- def post_order(self, **kwargs): # noqa: E501
- """post_order # noqa: E501
-
- Submit a signed order to the relayer. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.post_order(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param SignedOrderSchema signed_order_schema: A valid signed 0x order based on the schema.
- :return: None
- If the method is called asynchronously,
- returns the request thread.
- """
- kwargs["_return_http_data_only"] = True
- if kwargs.get("async_req"):
- return self.post_order_with_http_info(**kwargs) # noqa: E501
- else:
- (data) = self.post_order_with_http_info(**kwargs) # noqa: E501
- return data
-
- def post_order_with_http_info(self, **kwargs): # noqa: E501
- """post_order # noqa: E501
-
- Submit a signed order to the relayer. # noqa: E501
- This method makes a synchronous HTTP request by default. To make an
- asynchronous HTTP request, please pass async_req=True
- >>> thread = api.post_order_with_http_info(async_req=True)
- >>> result = thread.get()
-
- :param async_req bool
- :param float network_id: The id of the Ethereum network
- :param SignedOrderSchema signed_order_schema: A valid signed 0x order based on the schema.
- :return: None
- If the method is called asynchronously,
- returns the request thread.
- """
-
- local_var_params = locals()
-
- all_params = ["network_id", "signed_order_schema"] # noqa: E501
- all_params.append("async_req")
- all_params.append("_return_http_data_only")
- all_params.append("_preload_content")
- all_params.append("_request_timeout")
-
- for key, val in six.iteritems(local_var_params["kwargs"]):
- if key not in all_params:
- raise TypeError(
- "Got an unexpected keyword argument '%s'"
- " to method post_order" % key
- )
- local_var_params[key] = val
- del local_var_params["kwargs"]
-
- collection_formats = {}
-
- path_params = {}
-
- query_params = []
- if "network_id" in local_var_params:
- query_params.append(
- ("networkId", local_var_params["network_id"])
- ) # noqa: E501
-
- header_params = {}
-
- form_params = []
- local_var_files = {}
-
- body_params = None
- if "signed_order_schema" in local_var_params:
- body_params = local_var_params["signed_order_schema"]
- # HTTP header `Accept`
- header_params["Accept"] = self.api_client.select_header_accept(
- ["application/json"]
- ) # noqa: E501
-
- # HTTP header `Content-Type`
- header_params[
- "Content-Type"
- ] = self.api_client.select_header_content_type( # noqa: E501
- ["application/json"]
- ) # noqa: E501
-
- # Authentication setting
- auth_settings = [] # noqa: E501
-
- return self.api_client.call_api(
- "/v2/order",
- "POST",
- path_params,
- query_params,
- header_params,
- body=body_params,
- post_params=form_params,
- files=local_var_files,
- response_type=None, # noqa: E501
- auth_settings=auth_settings,
- async_req=local_var_params.get("async_req"),
- _return_http_data_only=local_var_params.get(
- "_return_http_data_only"
- ), # noqa: E501
- _preload_content=local_var_params.get("_preload_content", True),
- _request_timeout=local_var_params.get("_request_timeout"),
- collection_formats=collection_formats,
- )
diff --git a/python-packages/sra_client/sra_client/api_client.py b/python-packages/sra_client/sra_client/api_client.py
deleted file mode 100644
index 6139fdb42..000000000
--- a/python-packages/sra_client/sra_client/api_client.py
+++ /dev/null
@@ -1,730 +0,0 @@
-# coding: utf-8
-
-from __future__ import absolute_import
-
-import datetime
-import json
-import mimetypes
-from multiprocessing.pool import ThreadPool
-import os
-import re
-import tempfile
-
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import quote
-
-from sra_client.configuration import Configuration
-import sra_client.models
-from sra_client import rest
-
-
-class ApiClient(object):
- """Generic API client for OpenAPI client library builds.
-
- OpenAPI generic API client. This client handles the client-
- server communication, and is invariant across implementations. Specifics of
- the methods and models for each application are generated from the OpenAPI
- templates.
-
- NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
-
- :param configuration: .Configuration object for this client
- :param header_name: a header to pass when making calls to the API.
- :param header_value: a header value to pass when making calls to
- the API.
- :param cookie: a cookie to include in the header when making calls
- to the API
- :param pool_threads: The number of threads to use for async requests
- to the API. More threads means more concurrent API requests.
- """
-
- PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types
- NATIVE_TYPES_MAPPING = {
- "int": int,
- "long": int if six.PY3 else long, # noqa: F821
- "float": float,
- "str": str,
- "bool": bool,
- "date": datetime.date,
- "datetime": datetime.datetime,
- "object": object,
- }
- _pool = None
-
- def __init__(
- self,
- configuration=None,
- header_name=None,
- header_value=None,
- cookie=None,
- pool_threads=None,
- ):
- if configuration is None:
- configuration = Configuration()
- self.configuration = configuration
- self.pool_threads = pool_threads
-
- self.rest_client = rest.RESTClientObject(configuration)
- self.default_headers = {}
- if header_name is not None:
- self.default_headers[header_name] = header_value
- self.cookie = cookie
- # Set default User-Agent.
- self.user_agent = "OpenAPI-Generator/1.0.0/python"
-
- def __del__(self):
- if self._pool:
- self._pool.close()
- self._pool.join()
- self._pool = None
-
- @property
- def pool(self):
- """Create thread pool on first request
- avoids instantiating unused threadpool for blocking clients.
- """
- if self._pool is None:
- self._pool = ThreadPool(self.pool_threads)
- return self._pool
-
- @property
- def user_agent(self):
- """User agent for this API client"""
- return self.default_headers["User-Agent"]
-
- @user_agent.setter
- def user_agent(self, value):
- self.default_headers["User-Agent"] = value
-
- def set_default_header(self, header_name, header_value):
- self.default_headers[header_name] = header_value
-
- def __call_api(
- self,
- resource_path,
- method,
- path_params=None,
- query_params=None,
- header_params=None,
- body=None,
- post_params=None,
- files=None,
- response_type=None,
- auth_settings=None,
- _return_http_data_only=None,
- collection_formats=None,
- _preload_content=True,
- _request_timeout=None,
- ):
-
- config = self.configuration
-
- # header parameters
- header_params = header_params or {}
- header_params.update(self.default_headers)
- if self.cookie:
- header_params["Cookie"] = self.cookie
- if header_params:
- header_params = self.sanitize_for_serialization(header_params)
- header_params = dict(
- self.parameters_to_tuples(header_params, collection_formats)
- )
-
- # path parameters
- if path_params:
- path_params = self.sanitize_for_serialization(path_params)
- path_params = self.parameters_to_tuples(
- path_params, collection_formats
- )
- for k, v in path_params:
- # specified safe chars, encode everything
- resource_path = resource_path.replace(
- "{%s}" % k,
- quote(str(v), safe=config.safe_chars_for_path_param),
- )
-
- # query parameters
- if query_params:
- query_params = self.sanitize_for_serialization(query_params)
- query_params = self.parameters_to_tuples(
- query_params, collection_formats
- )
-
- # post parameters
- if post_params or files:
- post_params = self.prepare_post_parameters(post_params, files)
- post_params = self.sanitize_for_serialization(post_params)
- post_params = self.parameters_to_tuples(
- post_params, collection_formats
- )
-
- # auth setting
- self.update_params_for_auth(header_params, query_params, auth_settings)
-
- # body
- if body:
- body = self.sanitize_for_serialization(body)
-
- # request url
- url = self.configuration.host + resource_path
-
- # perform request and return response
- response_data = self.request(
- method,
- url,
- query_params=query_params,
- headers=header_params,
- post_params=post_params,
- body=body,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- )
-
- self.last_response = response_data
-
- return_data = response_data
- if _preload_content:
- # deserialize response data
- if response_type:
- return_data = self.deserialize(response_data, response_type)
- else:
- return_data = None
-
- if _return_http_data_only:
- return return_data
- else:
- return (
- return_data,
- response_data.status,
- response_data.getheaders(),
- )
-
- def sanitize_for_serialization(self, obj):
- """Builds a JSON POST object.
-
- If obj is None, return None.
- If obj is str, int, long, float, bool, return directly.
- If obj is datetime.datetime, datetime.date
- convert to string in iso8601 format.
- If obj is list, sanitize each element in the list.
- If obj is dict, return the dict.
- If obj is OpenAPI model, return the properties dict.
-
- :param obj: The data to serialize.
- :return: The serialized form of data.
- """
- if obj is None:
- return None
- elif isinstance(obj, self.PRIMITIVE_TYPES):
- return obj
- elif isinstance(obj, list):
- return [
- self.sanitize_for_serialization(sub_obj) for sub_obj in obj
- ]
- elif isinstance(obj, tuple):
- return tuple(
- self.sanitize_for_serialization(sub_obj) for sub_obj in obj
- )
- elif isinstance(obj, (datetime.datetime, datetime.date)):
- return obj.isoformat()
-
- if isinstance(obj, dict):
- obj_dict = obj
- else:
- # Convert model obj to dict except
- # attributes `openapi_types`, `attribute_map`
- # and attributes which value is not None.
- # Convert attribute name to json key in
- # model definition for request.
- obj_dict = {
- obj.attribute_map[attr]: getattr(obj, attr)
- for attr, _ in six.iteritems(obj.openapi_types)
- if getattr(obj, attr) is not None
- }
-
- return {
- key: self.sanitize_for_serialization(val)
- for key, val in six.iteritems(obj_dict)
- }
-
- def deserialize(self, response, response_type):
- """Deserializes response into an object.
-
- :param response: RESTResponse object to be deserialized.
- :param response_type: class literal for
- deserialized object, or string of class name.
-
- :return: deserialized object.
- """
- # handle file downloading
- # save response body into a tmp file and return the instance
- if response_type == "file":
- return self.__deserialize_file(response)
-
- # fetch data from response object
- try:
- data = json.loads(response.data)
- except ValueError:
- data = response.data
-
- return self.__deserialize(data, response_type)
-
- def __deserialize(self, data, klass):
- """Deserializes dict, list, str into an object.
-
- :param data: dict, list or str.
- :param klass: class literal, or string of class name.
-
- :return: object.
- """
- if data is None:
- return None
-
- if type(klass) == str:
- if klass.startswith("list["):
- sub_kls = re.match(r"list\[(.*)\]", klass).group(1)
- return [
- self.__deserialize(sub_data, sub_kls) for sub_data in data
- ]
-
- if klass.startswith("dict("):
- sub_kls = re.match(r"dict\(([^,]*), (.*)\)", klass).group(2)
- return {
- k: self.__deserialize(v, sub_kls)
- for k, v in six.iteritems(data)
- }
-
- # convert str to class
- if klass in self.NATIVE_TYPES_MAPPING:
- klass = self.NATIVE_TYPES_MAPPING[klass]
- else:
- klass = getattr(sra_client.models, klass)
-
- if klass in self.PRIMITIVE_TYPES:
- return self.__deserialize_primitive(data, klass)
- elif klass == object:
- return self.__deserialize_object(data)
- elif klass == datetime.date:
- return self.__deserialize_date(data)
- elif klass == datetime.datetime:
- return self.__deserialize_datatime(data)
- else:
- return self.__deserialize_model(data, klass)
-
- def call_api(
- self,
- resource_path,
- method,
- path_params=None,
- query_params=None,
- header_params=None,
- body=None,
- post_params=None,
- files=None,
- response_type=None,
- auth_settings=None,
- async_req=None,
- _return_http_data_only=None,
- collection_formats=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- """Makes the HTTP request (synchronous) and returns deserialized data.
-
- To make an async_req request, set the async_req parameter.
-
- :param resource_path: Path to method endpoint.
- :param method: Method to call.
- :param path_params: Path parameters in the url.
- :param query_params: Query parameters in the url.
- :param header_params: Header parameters to be
- placed in the request header.
- :param body: Request body.
- :param post_params dict: Request post form parameters,
- for `application/x-www-form-urlencoded`, `multipart/form-data`.
- :param auth_settings list: Auth Settings names for the request.
- :param response: Response data type.
- :param files dict: key -> filename, value -> filepath,
- for `multipart/form-data`.
- :param async_req bool: execute request asynchronously
- :param _return_http_data_only: response data without head status code
- and headers
- :param collection_formats: dict of collection formats for path, query,
- header, and post parameters.
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- :return:
- If async_req parameter is True,
- the request will be called asynchronously.
- The method will return the request thread.
- If parameter async_req is False or missing,
- then the method will return the response directly.
- """
- if not async_req:
- return self.__call_api(
- resource_path,
- method,
- path_params,
- query_params,
- header_params,
- body,
- post_params,
- files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- )
- else:
- thread = self.pool.apply_async(
- self.__call_api,
- (
- resource_path,
- method,
- path_params,
- query_params,
- header_params,
- body,
- post_params,
- files,
- response_type,
- auth_settings,
- _return_http_data_only,
- collection_formats,
- _preload_content,
- _request_timeout,
- ),
- )
- return thread
-
- def request(
- self,
- method,
- url,
- query_params=None,
- headers=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- """Makes the HTTP request using RESTClient."""
- if method == "GET":
- return self.rest_client.GET(
- url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- )
- elif method == "HEAD":
- return self.rest_client.HEAD(
- url,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- headers=headers,
- )
- elif method == "OPTIONS":
- return self.rest_client.OPTIONS(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
- elif method == "POST":
- return self.rest_client.POST(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
- elif method == "PUT":
- return self.rest_client.PUT(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
- elif method == "PATCH":
- return self.rest_client.PATCH(
- url,
- query_params=query_params,
- headers=headers,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
- elif method == "DELETE":
- return self.rest_client.DELETE(
- url,
- query_params=query_params,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
- else:
- raise ValueError(
- "http method must be `GET`, `HEAD`, `OPTIONS`,"
- " `POST`, `PATCH`, `PUT` or `DELETE`."
- )
-
- def parameters_to_tuples(self, params, collection_formats):
- """Get parameters as list of tuples, formatting collections.
-
- :param params: Parameters as dict or list of two-tuples
- :param dict collection_formats: Parameter collection formats
- :return: Parameters as list of tuples, collections formatted
- """
- new_params = []
- if collection_formats is None:
- collection_formats = {}
- for k, v in (
- six.iteritems(params) if isinstance(params, dict) else params
- ): # noqa: E501
- if k in collection_formats:
- collection_format = collection_formats[k]
- if collection_format == "multi":
- new_params.extend((k, value) for value in v)
- else:
- if collection_format == "ssv":
- delimiter = " "
- elif collection_format == "tsv":
- delimiter = "\t"
- elif collection_format == "pipes":
- delimiter = "|"
- else: # csv is the default
- delimiter = ","
- new_params.append(
- (k, delimiter.join(str(value) for value in v))
- )
- else:
- new_params.append((k, v))
- return new_params
-
- def prepare_post_parameters(self, post_params=None, files=None):
- """Builds form parameters.
-
- :param post_params: Normal form parameters.
- :param files: File parameters.
- :return: Form parameters with files.
- """
- params = []
-
- if post_params:
- params = post_params
-
- if files:
- for k, v in six.iteritems(files):
- if not v:
- continue
- file_names = v if type(v) is list else [v]
- for n in file_names:
- with open(n, "rb") as f:
- filename = os.path.basename(f.name)
- filedata = f.read()
- mimetype = (
- mimetypes.guess_type(filename)[0]
- or "application/octet-stream"
- )
- params.append(
- tuple([k, tuple([filename, filedata, mimetype])])
- )
-
- return params
-
- def select_header_accept(self, accepts):
- """Returns `Accept` based on an array of accepts provided.
-
- :param accepts: List of headers.
- :return: Accept (e.g. application/json).
- """
- if not accepts:
- return
-
- accepts = [x.lower() for x in accepts]
-
- if "application/json" in accepts:
- return "application/json"
- else:
- return ", ".join(accepts)
-
- def select_header_content_type(self, content_types):
- """Returns `Content-Type` based on an array of content_types provided.
-
- :param content_types: List of content-types.
- :return: Content-Type (e.g. application/json).
- """
- if not content_types:
- return "application/json"
-
- content_types = [x.lower() for x in content_types]
-
- if "application/json" in content_types or "*/*" in content_types:
- return "application/json"
- else:
- return content_types[0]
-
- def update_params_for_auth(self, headers, querys, auth_settings):
- """Updates header and query params based on authentication setting.
-
- :param headers: Header parameters dict to be updated.
- :param querys: Query parameters tuple list to be updated.
- :param auth_settings: Authentication setting identifiers list.
- """
- if not auth_settings:
- return
-
- for auth in auth_settings:
- auth_setting = self.configuration.auth_settings().get(auth)
- if auth_setting:
- if not auth_setting["value"]:
- continue
- elif auth_setting["in"] == "header":
- headers[auth_setting["key"]] = auth_setting["value"]
- elif auth_setting["in"] == "query":
- querys.append((auth_setting["key"], auth_setting["value"]))
- else:
- raise ValueError(
- "Authentication token must be in `query` or `header`"
- )
-
- def __deserialize_file(self, response):
- """Deserializes body to file
-
- Saves response body into a file in a temporary folder,
- using the filename from the `Content-Disposition` header if provided.
-
- :param response: RESTResponse.
- :return: file path.
- """
- fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path)
- os.close(fd)
- os.remove(path)
-
- content_disposition = response.getheader("Content-Disposition")
- if content_disposition:
- filename = re.search(
- r'filename=[\'"]?([^\'"\s]+)[\'"]?', content_disposition
- ).group(1)
- path = os.path.join(os.path.dirname(path), filename)
-
- with open(path, "wb") as f:
- f.write(response.data)
-
- return path
-
- def __deserialize_primitive(self, data, klass):
- """Deserializes string to primitive type.
-
- :param data: str.
- :param klass: class literal.
-
- :return: int, long, float, str, bool.
- """
- try:
- return klass(data)
- except UnicodeEncodeError:
- return six.text_type(data)
- except TypeError:
- return data
-
- def __deserialize_object(self, value):
- """Return an original value.
-
- :return: object.
- """
- return value
-
- def __deserialize_date(self, string):
- """Deserializes string to date.
-
- :param string: str.
- :return: date.
- """
- try:
- from dateutil.parser import parse
-
- return parse(string).date()
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason="Failed to parse `{0}` as date object".format(string),
- )
-
- def __deserialize_datatime(self, string):
- """Deserializes string to datetime.
-
- The string should be in iso8601 datetime format.
-
- :param string: str.
- :return: datetime.
- """
- try:
- from dateutil.parser import parse
-
- return parse(string)
- except ImportError:
- return string
- except ValueError:
- raise rest.ApiException(
- status=0,
- reason=(
- "Failed to parse `{0}` as datetime object".format(string)
- ),
- )
-
- def __deserialize_model(self, data, klass):
- """Deserializes list or dict to model.
-
- :param data: dict, list.
- :param klass: class literal.
- :return: model object.
- """
-
- if not klass.openapi_types and not hasattr(
- klass, "get_real_child_model"
- ):
- return data
-
- kwargs = {}
- if klass.openapi_types is not None:
- for attr, attr_type in six.iteritems(klass.openapi_types):
- if (
- data is not None
- and klass.attribute_map[attr] in data
- and isinstance(data, (list, dict))
- ):
- value = data[klass.attribute_map[attr]]
- kwargs[attr] = self.__deserialize(value, attr_type)
-
- instance = klass(**kwargs)
-
- if hasattr(instance, "get_real_child_model"):
- klass_name = instance.get_real_child_model(data)
- if klass_name:
- instance = self.__deserialize(data, klass_name)
- return instance
diff --git a/python-packages/sra_client/sra_client/configuration.py b/python-packages/sra_client/sra_client/configuration.py
deleted file mode 100644
index 9b0cc05bb..000000000
--- a/python-packages/sra_client/sra_client/configuration.py
+++ /dev/null
@@ -1,225 +0,0 @@
-# coding: utf-8
-
-
-from __future__ import absolute_import
-
-import copy
-import logging
-import multiprocessing
-import sys
-import urllib3
-
-import six
-from six.moves import http_client as httplib
-
-
-class TypeWithDefault(type):
- def __init__(cls, name, bases, dct):
- super(TypeWithDefault, cls).__init__(name, bases, dct)
- cls._default = None
-
- def __call__(cls):
- if cls._default is None:
- cls._default = type.__call__(cls)
- return copy.copy(cls._default)
-
- def set_default(cls, default):
- cls._default = copy.copy(default)
-
-
-class Configuration(six.with_metaclass(TypeWithDefault, object)):
- """NOTE: This class is auto generated by OpenAPI Generator
-
- Ref: https://openapi-generator.tech
- Do not edit the class manually.
- """
-
- def __init__(self):
- """Constructor"""
- # Default Base url
- self.host = "http://localhost:3000"
- # Temp file folder for downloading files
- self.temp_folder_path = None
-
- # Authentication Settings
- # dict to store API key(s)
- self.api_key = {}
- # dict to store API prefix (e.g. Bearer)
- self.api_key_prefix = {}
- # Username for HTTP basic authentication
- self.username = ""
- # Password for HTTP basic authentication
- self.password = ""
-
- # Logging Settings
- self.logger = {}
- self.logger["package_logger"] = logging.getLogger("sra_client")
- self.logger["urllib3_logger"] = logging.getLogger("urllib3")
- # Log format
- self.logger_format = "%(asctime)s %(levelname)s %(message)s"
- # Log stream handler
- self.logger_stream_handler = None
- # Log file handler
- self.logger_file_handler = None
- # Debug file location
- self.logger_file = None
- # Debug switch
- self.debug = False
-
- # SSL/TLS verification
- # Set this to false to skip verifying SSL certificate when calling API
- # from https server.
- self.verify_ssl = True
- # Set this to customize the certificate file to verify the peer.
- self.ssl_ca_cert = None
- # client certificate file
- self.cert_file = None
- # client key file
- self.key_file = None
- # Set this to True/False to enable/disable SSL hostname verification.
- self.assert_hostname = None
-
- # urllib3 connection pool's maximum number of connections saved
- # per pool. urllib3 uses 1 connection as default value, but this is
- # not the best value when you are making a lot of possibly parallel
- # requests to the same host, which is often the case here.
- # cpu_count * 5 is used as default value to increase performance.
- self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
-
- # Proxy URL
- self.proxy = None
- # Safe chars for path_param
- self.safe_chars_for_path_param = ""
-
- @property
- def logger_file(self):
- """The logger file.
-
- If the logger_file is None, then add stream handler and remove file
- handler. Otherwise, add file handler and remove stream handler.
-
- :param value: The logger_file path.
- :type: str
- """
- return self.__logger_file
-
- @logger_file.setter
- def logger_file(self, value):
- """The logger file.
-
- If the logger_file is None, then add stream handler and remove file
- handler. Otherwise, add file handler and remove stream handler.
-
- :param value: The logger_file path.
- :type: str
- """
- self.__logger_file = value
- if self.__logger_file:
- # If set logging file,
- # then add file handler and remove stream handler.
- self.logger_file_handler = logging.FileHandler(self.__logger_file)
- self.logger_file_handler.setFormatter(self.logger_formatter)
- for _, logger in six.iteritems(self.logger):
- logger.addHandler(self.logger_file_handler)
-
- @property
- def debug(self):
- """Debug status
-
- :param value: The debug status, True or False.
- :type: bool
- """
- return self.__debug
-
- @debug.setter
- def debug(self, value):
- """Debug status
-
- :param value: The debug status, True or False.
- :type: bool
- """
- self.__debug = value
- if self.__debug:
- # if debug status is True, turn on debug logging
- for _, logger in six.iteritems(self.logger):
- logger.setLevel(logging.DEBUG)
- # turn on httplib debug
- httplib.HTTPConnection.debuglevel = 1
- else:
- # if debug status is False, turn off debug logging,
- # setting log level to default `logging.WARNING`
- for _, logger in six.iteritems(self.logger):
- logger.setLevel(logging.WARNING)
- # turn off httplib debug
- httplib.HTTPConnection.debuglevel = 0
-
- @property
- def logger_format(self):
- """The logger format.
-
- The logger_formatter will be updated when sets logger_format.
-
- :param value: The format string.
- :type: str
- """
- return self.__logger_format
-
- @logger_format.setter
- def logger_format(self, value):
- """The logger format.
-
- The logger_formatter will be updated when sets logger_format.
-
- :param value: The format string.
- :type: str
- """
- self.__logger_format = value
- self.logger_formatter = logging.Formatter(self.__logger_format)
-
- def get_api_key_with_prefix(self, identifier):
- """Gets API key (with prefix if set).
-
- :param identifier: The identifier of apiKey.
- :return: The token for api key authentication.
- """
- if self.api_key.get(identifier) and self.api_key_prefix.get(
- identifier
- ):
- return (
- self.api_key_prefix[identifier]
- + " "
- + self.api_key[identifier]
- ) # noqa: E501
- elif self.api_key.get(identifier):
- return self.api_key[identifier]
-
- def get_basic_auth_token(self):
- """Gets HTTP basic authentication header (string).
-
- :return: The token for basic HTTP authentication.
- """
- return urllib3.util.make_headers(
- basic_auth=self.username + ":" + self.password
- ).get("authorization")
-
- def auth_settings(self):
- """Gets Auth Settings dict for api client.
-
- :return: The Auth Settings information dict.
- """
- return {}
-
- def to_debug_report(self):
- """Gets the essential information for debugging.
-
- :return: The report for debugging.
- """
- return (
- "Python SDK Debug Report:\n"
- "OS: {env}\n"
- "Python Version: {pyversion}\n"
- "Version of the API: 2.0.0\n"
- "SDK Package Version: 1.0.0".format(
- env=sys.platform, pyversion=sys.version
- )
- )
diff --git a/python-packages/sra_client/sra_client/models/__init__.py b/python-packages/sra_client/sra_client/models/__init__.py
deleted file mode 100644
index 5e6d1baa3..000000000
--- a/python-packages/sra_client/sra_client/models/__init__.py
+++ /dev/null
@@ -1,49 +0,0 @@
-# coding: utf-8
-
-# flake8: noqa
-
-from __future__ import absolute_import
-
-# import models into model package
-from sra_client.models.order_schema import OrderSchema
-from sra_client.models.paginated_collection_schema import (
- PaginatedCollectionSchema,
-)
-from sra_client.models.relayer_api_asset_data_pairs_response_schema import (
- RelayerApiAssetDataPairsResponseSchema,
-)
-from sra_client.models.relayer_api_asset_data_trade_info_schema import (
- RelayerApiAssetDataTradeInfoSchema,
-)
-from sra_client.models.relayer_api_error_response_schema import (
- RelayerApiErrorResponseSchema,
-)
-from sra_client.models.relayer_api_error_response_schema_validation_errors import (
- RelayerApiErrorResponseSchemaValidationErrors,
-)
-from sra_client.models.relayer_api_fee_recipients_response_schema import (
- RelayerApiFeeRecipientsResponseSchema,
-)
-from sra_client.models.relayer_api_order_config_payload_schema import (
- RelayerApiOrderConfigPayloadSchema,
-)
-from sra_client.models.relayer_api_order_config_response_schema import (
- RelayerApiOrderConfigResponseSchema,
-)
-from sra_client.models.relayer_api_order_schema import RelayerApiOrderSchema
-from sra_client.models.relayer_api_orderbook_response_schema import (
- RelayerApiOrderbookResponseSchema,
-)
-from sra_client.models.relayer_api_orders_channel_subscribe_payload_schema import (
- RelayerApiOrdersChannelSubscribePayloadSchema,
-)
-from sra_client.models.relayer_api_orders_channel_subscribe_schema import (
- RelayerApiOrdersChannelSubscribeSchema,
-)
-from sra_client.models.relayer_api_orders_channel_update_schema import (
- RelayerApiOrdersChannelUpdateSchema,
-)
-from sra_client.models.relayer_api_orders_response_schema import (
- RelayerApiOrdersResponseSchema,
-)
-from sra_client.models.signed_order_schema import SignedOrderSchema
diff --git a/python-packages/sra_client/sra_client/models/order_schema.py b/python-packages/sra_client/sra_client/models/order_schema.py
deleted file mode 100644
index 48fef39d8..000000000
--- a/python-packages/sra_client/sra_client/models/order_schema.py
+++ /dev/null
@@ -1,550 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class OrderSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "maker_address": "str",
- "taker_address": "str",
- "maker_fee": "str",
- "taker_fee": "str",
- "sender_address": "str",
- "maker_asset_amount": "str",
- "taker_asset_amount": "str",
- "maker_asset_data": "str",
- "taker_asset_data": "str",
- "salt": "str",
- "exchange_address": "str",
- "fee_recipient_address": "str",
- "expiration_time_seconds": "str",
- }
-
- attribute_map = {
- "maker_address": "makerAddress",
- "taker_address": "takerAddress",
- "maker_fee": "makerFee",
- "taker_fee": "takerFee",
- "sender_address": "senderAddress",
- "maker_asset_amount": "makerAssetAmount",
- "taker_asset_amount": "takerAssetAmount",
- "maker_asset_data": "makerAssetData",
- "taker_asset_data": "takerAssetData",
- "salt": "salt",
- "exchange_address": "exchangeAddress",
- "fee_recipient_address": "feeRecipientAddress",
- "expiration_time_seconds": "expirationTimeSeconds",
- }
-
- def __init__(
- self,
- maker_address=None,
- taker_address=None,
- maker_fee=None,
- taker_fee=None,
- sender_address=None,
- maker_asset_amount=None,
- taker_asset_amount=None,
- maker_asset_data=None,
- taker_asset_data=None,
- salt=None,
- exchange_address=None,
- fee_recipient_address=None,
- expiration_time_seconds=None,
- ): # noqa: E501
- """OrderSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._maker_address = None
- self._taker_address = None
- self._maker_fee = None
- self._taker_fee = None
- self._sender_address = None
- self._maker_asset_amount = None
- self._taker_asset_amount = None
- self._maker_asset_data = None
- self._taker_asset_data = None
- self._salt = None
- self._exchange_address = None
- self._fee_recipient_address = None
- self._expiration_time_seconds = None
- self.discriminator = None
-
- self.maker_address = maker_address
- self.taker_address = taker_address
- self.maker_fee = maker_fee
- self.taker_fee = taker_fee
- self.sender_address = sender_address
- self.maker_asset_amount = maker_asset_amount
- self.taker_asset_amount = taker_asset_amount
- self.maker_asset_data = maker_asset_data
- self.taker_asset_data = taker_asset_data
- self.salt = salt
- self.exchange_address = exchange_address
- self.fee_recipient_address = fee_recipient_address
- self.expiration_time_seconds = expiration_time_seconds
-
- @property
- def maker_address(self):
- """Gets the maker_address of this OrderSchema. # noqa: E501
-
-
- :return: The maker_address of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_address
-
- @maker_address.setter
- def maker_address(self, maker_address):
- """Sets the maker_address of this OrderSchema.
-
-
- :param maker_address: The maker_address of this OrderSchema. # noqa: E501
- :type: str
- """
- if maker_address is None:
- raise ValueError(
- "Invalid value for `maker_address`, must not be `None`"
- ) # noqa: E501
- if maker_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", maker_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._maker_address = maker_address
-
- @property
- def taker_address(self):
- """Gets the taker_address of this OrderSchema. # noqa: E501
-
-
- :return: The taker_address of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_address
-
- @taker_address.setter
- def taker_address(self, taker_address):
- """Sets the taker_address of this OrderSchema.
-
-
- :param taker_address: The taker_address of this OrderSchema. # noqa: E501
- :type: str
- """
- if taker_address is None:
- raise ValueError(
- "Invalid value for `taker_address`, must not be `None`"
- ) # noqa: E501
- if taker_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", taker_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._taker_address = taker_address
-
- @property
- def maker_fee(self):
- """Gets the maker_fee of this OrderSchema. # noqa: E501
-
-
- :return: The maker_fee of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_fee
-
- @maker_fee.setter
- def maker_fee(self, maker_fee):
- """Sets the maker_fee of this OrderSchema.
-
-
- :param maker_fee: The maker_fee of this OrderSchema. # noqa: E501
- :type: str
- """
- if maker_fee is None:
- raise ValueError(
- "Invalid value for `maker_fee`, must not be `None`"
- ) # noqa: E501
- if maker_fee is not None and not re.search(
- r"^\\d+$", maker_fee
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._maker_fee = maker_fee
-
- @property
- def taker_fee(self):
- """Gets the taker_fee of this OrderSchema. # noqa: E501
-
-
- :return: The taker_fee of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_fee
-
- @taker_fee.setter
- def taker_fee(self, taker_fee):
- """Sets the taker_fee of this OrderSchema.
-
-
- :param taker_fee: The taker_fee of this OrderSchema. # noqa: E501
- :type: str
- """
- if taker_fee is None:
- raise ValueError(
- "Invalid value for `taker_fee`, must not be `None`"
- ) # noqa: E501
- if taker_fee is not None and not re.search(
- r"^\\d+$", taker_fee
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._taker_fee = taker_fee
-
- @property
- def sender_address(self):
- """Gets the sender_address of this OrderSchema. # noqa: E501
-
-
- :return: The sender_address of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._sender_address
-
- @sender_address.setter
- def sender_address(self, sender_address):
- """Sets the sender_address of this OrderSchema.
-
-
- :param sender_address: The sender_address of this OrderSchema. # noqa: E501
- :type: str
- """
- if sender_address is None:
- raise ValueError(
- "Invalid value for `sender_address`, must not be `None`"
- ) # noqa: E501
- if sender_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", sender_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `sender_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._sender_address = sender_address
-
- @property
- def maker_asset_amount(self):
- """Gets the maker_asset_amount of this OrderSchema. # noqa: E501
-
-
- :return: The maker_asset_amount of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_amount
-
- @maker_asset_amount.setter
- def maker_asset_amount(self, maker_asset_amount):
- """Sets the maker_asset_amount of this OrderSchema.
-
-
- :param maker_asset_amount: The maker_asset_amount of this OrderSchema. # noqa: E501
- :type: str
- """
- if maker_asset_amount is None:
- raise ValueError(
- "Invalid value for `maker_asset_amount`, must not be `None`"
- ) # noqa: E501
- if maker_asset_amount is not None and not re.search(
- r"^\\d+$", maker_asset_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._maker_asset_amount = maker_asset_amount
-
- @property
- def taker_asset_amount(self):
- """Gets the taker_asset_amount of this OrderSchema. # noqa: E501
-
-
- :return: The taker_asset_amount of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_amount
-
- @taker_asset_amount.setter
- def taker_asset_amount(self, taker_asset_amount):
- """Sets the taker_asset_amount of this OrderSchema.
-
-
- :param taker_asset_amount: The taker_asset_amount of this OrderSchema. # noqa: E501
- :type: str
- """
- if taker_asset_amount is None:
- raise ValueError(
- "Invalid value for `taker_asset_amount`, must not be `None`"
- ) # noqa: E501
- if taker_asset_amount is not None and not re.search(
- r"^\\d+$", taker_asset_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._taker_asset_amount = taker_asset_amount
-
- @property
- def maker_asset_data(self):
- """Gets the maker_asset_data of this OrderSchema. # noqa: E501
-
-
- :return: The maker_asset_data of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_data
-
- @maker_asset_data.setter
- def maker_asset_data(self, maker_asset_data):
- """Sets the maker_asset_data of this OrderSchema.
-
-
- :param maker_asset_data: The maker_asset_data of this OrderSchema. # noqa: E501
- :type: str
- """
- if maker_asset_data is None:
- raise ValueError(
- "Invalid value for `maker_asset_data`, must not be `None`"
- ) # noqa: E501
- if maker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", maker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._maker_asset_data = maker_asset_data
-
- @property
- def taker_asset_data(self):
- """Gets the taker_asset_data of this OrderSchema. # noqa: E501
-
-
- :return: The taker_asset_data of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_data
-
- @taker_asset_data.setter
- def taker_asset_data(self, taker_asset_data):
- """Sets the taker_asset_data of this OrderSchema.
-
-
- :param taker_asset_data: The taker_asset_data of this OrderSchema. # noqa: E501
- :type: str
- """
- if taker_asset_data is None:
- raise ValueError(
- "Invalid value for `taker_asset_data`, must not be `None`"
- ) # noqa: E501
- if taker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", taker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._taker_asset_data = taker_asset_data
-
- @property
- def salt(self):
- """Gets the salt of this OrderSchema. # noqa: E501
-
-
- :return: The salt of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._salt
-
- @salt.setter
- def salt(self, salt):
- """Sets the salt of this OrderSchema.
-
-
- :param salt: The salt of this OrderSchema. # noqa: E501
- :type: str
- """
- if salt is None:
- raise ValueError(
- "Invalid value for `salt`, must not be `None`"
- ) # noqa: E501
- if salt is not None and not re.search(r"^\\d+$", salt): # noqa: E501
- raise ValueError(
- r"Invalid value for `salt`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._salt = salt
-
- @property
- def exchange_address(self):
- """Gets the exchange_address of this OrderSchema. # noqa: E501
-
-
- :return: The exchange_address of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._exchange_address
-
- @exchange_address.setter
- def exchange_address(self, exchange_address):
- """Sets the exchange_address of this OrderSchema.
-
-
- :param exchange_address: The exchange_address of this OrderSchema. # noqa: E501
- :type: str
- """
- if exchange_address is None:
- raise ValueError(
- "Invalid value for `exchange_address`, must not be `None`"
- ) # noqa: E501
- if exchange_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", exchange_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `exchange_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._exchange_address = exchange_address
-
- @property
- def fee_recipient_address(self):
- """Gets the fee_recipient_address of this OrderSchema. # noqa: E501
-
-
- :return: The fee_recipient_address of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._fee_recipient_address
-
- @fee_recipient_address.setter
- def fee_recipient_address(self, fee_recipient_address):
- """Sets the fee_recipient_address of this OrderSchema.
-
-
- :param fee_recipient_address: The fee_recipient_address of this OrderSchema. # noqa: E501
- :type: str
- """
- if fee_recipient_address is None:
- raise ValueError(
- "Invalid value for `fee_recipient_address`, must not be `None`"
- ) # noqa: E501
- if fee_recipient_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", fee_recipient_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `fee_recipient_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._fee_recipient_address = fee_recipient_address
-
- @property
- def expiration_time_seconds(self):
- """Gets the expiration_time_seconds of this OrderSchema. # noqa: E501
-
-
- :return: The expiration_time_seconds of this OrderSchema. # noqa: E501
- :rtype: str
- """
- return self._expiration_time_seconds
-
- @expiration_time_seconds.setter
- def expiration_time_seconds(self, expiration_time_seconds):
- """Sets the expiration_time_seconds of this OrderSchema.
-
-
- :param expiration_time_seconds: The expiration_time_seconds of this OrderSchema. # noqa: E501
- :type: str
- """
- if expiration_time_seconds is None:
- raise ValueError(
- "Invalid value for `expiration_time_seconds`, must not be `None`"
- ) # noqa: E501
- if expiration_time_seconds is not None and not re.search(
- r"^\\d+$", expiration_time_seconds
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `expiration_time_seconds`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._expiration_time_seconds = expiration_time_seconds
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, OrderSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/paginated_collection_schema.py b/python-packages/sra_client/sra_client/models/paginated_collection_schema.py
deleted file mode 100644
index 4c73d31f4..000000000
--- a/python-packages/sra_client/sra_client/models/paginated_collection_schema.py
+++ /dev/null
@@ -1,161 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class PaginatedCollectionSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"total": "float", "per_page": "float", "page": "float"}
-
- attribute_map = {"total": "total", "per_page": "perPage", "page": "page"}
-
- def __init__(self, total=None, per_page=None, page=None): # noqa: E501
- """PaginatedCollectionSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._total = None
- self._per_page = None
- self._page = None
- self.discriminator = None
-
- self.total = total
- self.per_page = per_page
- self.page = page
-
- @property
- def total(self):
- """Gets the total of this PaginatedCollectionSchema. # noqa: E501
-
-
- :return: The total of this PaginatedCollectionSchema. # noqa: E501
- :rtype: float
- """
- return self._total
-
- @total.setter
- def total(self, total):
- """Sets the total of this PaginatedCollectionSchema.
-
-
- :param total: The total of this PaginatedCollectionSchema. # noqa: E501
- :type: float
- """
- if total is None:
- raise ValueError(
- "Invalid value for `total`, must not be `None`"
- ) # noqa: E501
-
- self._total = total
-
- @property
- def per_page(self):
- """Gets the per_page of this PaginatedCollectionSchema. # noqa: E501
-
-
- :return: The per_page of this PaginatedCollectionSchema. # noqa: E501
- :rtype: float
- """
- return self._per_page
-
- @per_page.setter
- def per_page(self, per_page):
- """Sets the per_page of this PaginatedCollectionSchema.
-
-
- :param per_page: The per_page of this PaginatedCollectionSchema. # noqa: E501
- :type: float
- """
- if per_page is None:
- raise ValueError(
- "Invalid value for `per_page`, must not be `None`"
- ) # noqa: E501
-
- self._per_page = per_page
-
- @property
- def page(self):
- """Gets the page of this PaginatedCollectionSchema. # noqa: E501
-
-
- :return: The page of this PaginatedCollectionSchema. # noqa: E501
- :rtype: float
- """
- return self._page
-
- @page.setter
- def page(self, page):
- """Sets the page of this PaginatedCollectionSchema.
-
-
- :param page: The page of this PaginatedCollectionSchema. # noqa: E501
- :type: float
- """
- if page is None:
- raise ValueError(
- "Invalid value for `page`, must not be `None`"
- ) # noqa: E501
-
- self._page = page
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, PaginatedCollectionSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_asset_data_pairs_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_asset_data_pairs_response_schema.py
deleted file mode 100644
index 97110b13a..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_asset_data_pairs_response_schema.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiAssetDataPairsResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"records": "list[object]"}
-
- attribute_map = {"records": "records"}
-
- def __init__(self, records=None): # noqa: E501
- """RelayerApiAssetDataPairsResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._records = None
- self.discriminator = None
-
- self.records = records
-
- @property
- def records(self):
- """Gets the records of this RelayerApiAssetDataPairsResponseSchema. # noqa: E501
-
-
- :return: The records of this RelayerApiAssetDataPairsResponseSchema. # noqa: E501
- :rtype: list[object]
- """
- return self._records
-
- @records.setter
- def records(self, records):
- """Sets the records of this RelayerApiAssetDataPairsResponseSchema.
-
-
- :param records: The records of this RelayerApiAssetDataPairsResponseSchema. # noqa: E501
- :type: list[object]
- """
- if records is None:
- raise ValueError(
- "Invalid value for `records`, must not be `None`"
- ) # noqa: E501
-
- self._records = records
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiAssetDataPairsResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_asset_data_trade_info_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_asset_data_trade_info_schema.py
deleted file mode 100644
index c449d0a6a..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_asset_data_trade_info_schema.py
+++ /dev/null
@@ -1,209 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiAssetDataTradeInfoSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "asset_data": "str",
- "min_amount": "str",
- "max_amount": "str",
- "precision": "float",
- }
-
- attribute_map = {
- "asset_data": "assetData",
- "min_amount": "minAmount",
- "max_amount": "maxAmount",
- "precision": "precision",
- }
-
- def __init__(
- self, asset_data=None, min_amount=None, max_amount=None, precision=None
- ): # noqa: E501
- """RelayerApiAssetDataTradeInfoSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._asset_data = None
- self._min_amount = None
- self._max_amount = None
- self._precision = None
- self.discriminator = None
-
- self.asset_data = asset_data
- if min_amount is not None:
- self.min_amount = min_amount
- if max_amount is not None:
- self.max_amount = max_amount
- if precision is not None:
- self.precision = precision
-
- @property
- def asset_data(self):
- """Gets the asset_data of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
-
-
- :return: The asset_data of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :rtype: str
- """
- return self._asset_data
-
- @asset_data.setter
- def asset_data(self, asset_data):
- """Sets the asset_data of this RelayerApiAssetDataTradeInfoSchema.
-
-
- :param asset_data: The asset_data of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :type: str
- """
- if asset_data is None:
- raise ValueError(
- "Invalid value for `asset_data`, must not be `None`"
- ) # noqa: E501
- if asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._asset_data = asset_data
-
- @property
- def min_amount(self):
- """Gets the min_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
-
-
- :return: The min_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :rtype: str
- """
- return self._min_amount
-
- @min_amount.setter
- def min_amount(self, min_amount):
- """Sets the min_amount of this RelayerApiAssetDataTradeInfoSchema.
-
-
- :param min_amount: The min_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :type: str
- """
- if min_amount is not None and not re.search(
- r"^\\d+$", min_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `min_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._min_amount = min_amount
-
- @property
- def max_amount(self):
- """Gets the max_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
-
-
- :return: The max_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :rtype: str
- """
- return self._max_amount
-
- @max_amount.setter
- def max_amount(self, max_amount):
- """Sets the max_amount of this RelayerApiAssetDataTradeInfoSchema.
-
-
- :param max_amount: The max_amount of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :type: str
- """
- if max_amount is not None and not re.search(
- r"^\\d+$", max_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `max_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._max_amount = max_amount
-
- @property
- def precision(self):
- """Gets the precision of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
-
-
- :return: The precision of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :rtype: float
- """
- return self._precision
-
- @precision.setter
- def precision(self, precision):
- """Sets the precision of this RelayerApiAssetDataTradeInfoSchema.
-
-
- :param precision: The precision of this RelayerApiAssetDataTradeInfoSchema. # noqa: E501
- :type: float
- """
-
- self._precision = precision
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiAssetDataTradeInfoSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema.py
deleted file mode 100644
index fd06bb9f4..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema.py
+++ /dev/null
@@ -1,176 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiErrorResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "code": "int",
- "reason": "str",
- "validation_errors": "list[RelayerApiErrorResponseSchemaValidationErrors]",
- }
-
- attribute_map = {
- "code": "code",
- "reason": "reason",
- "validation_errors": "validationErrors",
- }
-
- def __init__(
- self, code=None, reason=None, validation_errors=None
- ): # noqa: E501
- """RelayerApiErrorResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._code = None
- self._reason = None
- self._validation_errors = None
- self.discriminator = None
-
- self.code = code
- self.reason = reason
- if validation_errors is not None:
- self.validation_errors = validation_errors
-
- @property
- def code(self):
- """Gets the code of this RelayerApiErrorResponseSchema. # noqa: E501
-
-
- :return: The code of this RelayerApiErrorResponseSchema. # noqa: E501
- :rtype: int
- """
- return self._code
-
- @code.setter
- def code(self, code):
- """Sets the code of this RelayerApiErrorResponseSchema.
-
-
- :param code: The code of this RelayerApiErrorResponseSchema. # noqa: E501
- :type: int
- """
- if code is None:
- raise ValueError(
- "Invalid value for `code`, must not be `None`"
- ) # noqa: E501
- if code is not None and code > 103: # noqa: E501
- raise ValueError(
- "Invalid value for `code`, must be a value less than or equal to `103`"
- ) # noqa: E501
- if code is not None and code < 100: # noqa: E501
- raise ValueError(
- "Invalid value for `code`, must be a value greater than or equal to `100`"
- ) # noqa: E501
-
- self._code = code
-
- @property
- def reason(self):
- """Gets the reason of this RelayerApiErrorResponseSchema. # noqa: E501
-
-
- :return: The reason of this RelayerApiErrorResponseSchema. # noqa: E501
- :rtype: str
- """
- return self._reason
-
- @reason.setter
- def reason(self, reason):
- """Sets the reason of this RelayerApiErrorResponseSchema.
-
-
- :param reason: The reason of this RelayerApiErrorResponseSchema. # noqa: E501
- :type: str
- """
- if reason is None:
- raise ValueError(
- "Invalid value for `reason`, must not be `None`"
- ) # noqa: E501
-
- self._reason = reason
-
- @property
- def validation_errors(self):
- """Gets the validation_errors of this RelayerApiErrorResponseSchema. # noqa: E501
-
-
- :return: The validation_errors of this RelayerApiErrorResponseSchema. # noqa: E501
- :rtype: list[RelayerApiErrorResponseSchemaValidationErrors]
- """
- return self._validation_errors
-
- @validation_errors.setter
- def validation_errors(self, validation_errors):
- """Sets the validation_errors of this RelayerApiErrorResponseSchema.
-
-
- :param validation_errors: The validation_errors of this RelayerApiErrorResponseSchema. # noqa: E501
- :type: list[RelayerApiErrorResponseSchemaValidationErrors]
- """
-
- self._validation_errors = validation_errors
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiErrorResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema_validation_errors.py b/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema_validation_errors.py
deleted file mode 100644
index ee344bbf7..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_error_response_schema_validation_errors.py
+++ /dev/null
@@ -1,171 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiErrorResponseSchemaValidationErrors(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"field": "str", "code": "int", "reason": "str"}
-
- attribute_map = {"field": "field", "code": "code", "reason": "reason"}
-
- def __init__(self, field=None, code=None, reason=None): # noqa: E501
- """RelayerApiErrorResponseSchemaValidationErrors - a model defined in OpenAPI""" # noqa: E501
-
- self._field = None
- self._code = None
- self._reason = None
- self.discriminator = None
-
- self.field = field
- self.code = code
- self.reason = reason
-
- @property
- def field(self):
- """Gets the field of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
-
-
- :return: The field of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :rtype: str
- """
- return self._field
-
- @field.setter
- def field(self, field):
- """Sets the field of this RelayerApiErrorResponseSchemaValidationErrors.
-
-
- :param field: The field of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :type: str
- """
- if field is None:
- raise ValueError(
- "Invalid value for `field`, must not be `None`"
- ) # noqa: E501
-
- self._field = field
-
- @property
- def code(self):
- """Gets the code of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
-
-
- :return: The code of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :rtype: int
- """
- return self._code
-
- @code.setter
- def code(self, code):
- """Sets the code of this RelayerApiErrorResponseSchemaValidationErrors.
-
-
- :param code: The code of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :type: int
- """
- if code is None:
- raise ValueError(
- "Invalid value for `code`, must not be `None`"
- ) # noqa: E501
- if code is not None and code > 1006: # noqa: E501
- raise ValueError(
- "Invalid value for `code`, must be a value less than or equal to `1006`"
- ) # noqa: E501
- if code is not None and code < 1000: # noqa: E501
- raise ValueError(
- "Invalid value for `code`, must be a value greater than or equal to `1000`"
- ) # noqa: E501
-
- self._code = code
-
- @property
- def reason(self):
- """Gets the reason of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
-
-
- :return: The reason of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :rtype: str
- """
- return self._reason
-
- @reason.setter
- def reason(self, reason):
- """Sets the reason of this RelayerApiErrorResponseSchemaValidationErrors.
-
-
- :param reason: The reason of this RelayerApiErrorResponseSchemaValidationErrors. # noqa: E501
- :type: str
- """
- if reason is None:
- raise ValueError(
- "Invalid value for `reason`, must not be `None`"
- ) # noqa: E501
-
- self._reason = reason
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(
- other, RelayerApiErrorResponseSchemaValidationErrors
- ):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_fee_recipients_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_fee_recipients_response_schema.py
deleted file mode 100644
index 002eb00d7..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_fee_recipients_response_schema.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiFeeRecipientsResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"records": "list[str]"}
-
- attribute_map = {"records": "records"}
-
- def __init__(self, records=None): # noqa: E501
- """RelayerApiFeeRecipientsResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._records = None
- self.discriminator = None
-
- self.records = records
-
- @property
- def records(self):
- """Gets the records of this RelayerApiFeeRecipientsResponseSchema. # noqa: E501
-
-
- :return: The records of this RelayerApiFeeRecipientsResponseSchema. # noqa: E501
- :rtype: list[str]
- """
- return self._records
-
- @records.setter
- def records(self, records):
- """Sets the records of this RelayerApiFeeRecipientsResponseSchema.
-
-
- :param records: The records of this RelayerApiFeeRecipientsResponseSchema. # noqa: E501
- :type: list[str]
- """
- if records is None:
- raise ValueError(
- "Invalid value for `records`, must not be `None`"
- ) # noqa: E501
-
- self._records = records
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiFeeRecipientsResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_order_config_payload_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_order_config_payload_schema.py
deleted file mode 100644
index 8d19d80e2..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_order_config_payload_schema.py
+++ /dev/null
@@ -1,372 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrderConfigPayloadSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "maker_address": "str",
- "taker_address": "str",
- "maker_asset_amount": "str",
- "taker_asset_amount": "str",
- "maker_asset_data": "str",
- "taker_asset_data": "str",
- "exchange_address": "str",
- "expiration_time_seconds": "str",
- }
-
- attribute_map = {
- "maker_address": "makerAddress",
- "taker_address": "takerAddress",
- "maker_asset_amount": "makerAssetAmount",
- "taker_asset_amount": "takerAssetAmount",
- "maker_asset_data": "makerAssetData",
- "taker_asset_data": "takerAssetData",
- "exchange_address": "exchangeAddress",
- "expiration_time_seconds": "expirationTimeSeconds",
- }
-
- def __init__(
- self,
- maker_address=None,
- taker_address=None,
- maker_asset_amount=None,
- taker_asset_amount=None,
- maker_asset_data=None,
- taker_asset_data=None,
- exchange_address=None,
- expiration_time_seconds=None,
- ): # noqa: E501
- """RelayerApiOrderConfigPayloadSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._maker_address = None
- self._taker_address = None
- self._maker_asset_amount = None
- self._taker_asset_amount = None
- self._maker_asset_data = None
- self._taker_asset_data = None
- self._exchange_address = None
- self._expiration_time_seconds = None
- self.discriminator = None
-
- self.maker_address = maker_address
- self.taker_address = taker_address
- self.maker_asset_amount = maker_asset_amount
- self.taker_asset_amount = taker_asset_amount
- self.maker_asset_data = maker_asset_data
- self.taker_asset_data = taker_asset_data
- self.exchange_address = exchange_address
- self.expiration_time_seconds = expiration_time_seconds
-
- @property
- def maker_address(self):
- """Gets the maker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The maker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_address
-
- @maker_address.setter
- def maker_address(self, maker_address):
- """Sets the maker_address of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param maker_address: The maker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if maker_address is None:
- raise ValueError(
- "Invalid value for `maker_address`, must not be `None`"
- ) # noqa: E501
- if maker_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", maker_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._maker_address = maker_address
-
- @property
- def taker_address(self):
- """Gets the taker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The taker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_address
-
- @taker_address.setter
- def taker_address(self, taker_address):
- """Sets the taker_address of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param taker_address: The taker_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if taker_address is None:
- raise ValueError(
- "Invalid value for `taker_address`, must not be `None`"
- ) # noqa: E501
- if taker_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", taker_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._taker_address = taker_address
-
- @property
- def maker_asset_amount(self):
- """Gets the maker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The maker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_amount
-
- @maker_asset_amount.setter
- def maker_asset_amount(self, maker_asset_amount):
- """Sets the maker_asset_amount of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param maker_asset_amount: The maker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if maker_asset_amount is None:
- raise ValueError(
- "Invalid value for `maker_asset_amount`, must not be `None`"
- ) # noqa: E501
- if maker_asset_amount is not None and not re.search(
- r"^\\d+$", maker_asset_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._maker_asset_amount = maker_asset_amount
-
- @property
- def taker_asset_amount(self):
- """Gets the taker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The taker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_amount
-
- @taker_asset_amount.setter
- def taker_asset_amount(self, taker_asset_amount):
- """Sets the taker_asset_amount of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param taker_asset_amount: The taker_asset_amount of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if taker_asset_amount is None:
- raise ValueError(
- "Invalid value for `taker_asset_amount`, must not be `None`"
- ) # noqa: E501
- if taker_asset_amount is not None and not re.search(
- r"^\\d+$", taker_asset_amount
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_amount`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._taker_asset_amount = taker_asset_amount
-
- @property
- def maker_asset_data(self):
- """Gets the maker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The maker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_data
-
- @maker_asset_data.setter
- def maker_asset_data(self, maker_asset_data):
- """Sets the maker_asset_data of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param maker_asset_data: The maker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if maker_asset_data is None:
- raise ValueError(
- "Invalid value for `maker_asset_data`, must not be `None`"
- ) # noqa: E501
- if maker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", maker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._maker_asset_data = maker_asset_data
-
- @property
- def taker_asset_data(self):
- """Gets the taker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The taker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_data
-
- @taker_asset_data.setter
- def taker_asset_data(self, taker_asset_data):
- """Sets the taker_asset_data of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param taker_asset_data: The taker_asset_data of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if taker_asset_data is None:
- raise ValueError(
- "Invalid value for `taker_asset_data`, must not be `None`"
- ) # noqa: E501
- if taker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", taker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._taker_asset_data = taker_asset_data
-
- @property
- def exchange_address(self):
- """Gets the exchange_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The exchange_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._exchange_address
-
- @exchange_address.setter
- def exchange_address(self, exchange_address):
- """Sets the exchange_address of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param exchange_address: The exchange_address of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if exchange_address is None:
- raise ValueError(
- "Invalid value for `exchange_address`, must not be `None`"
- ) # noqa: E501
- if exchange_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", exchange_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `exchange_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._exchange_address = exchange_address
-
- @property
- def expiration_time_seconds(self):
- """Gets the expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
-
-
- :return: The expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._expiration_time_seconds
-
- @expiration_time_seconds.setter
- def expiration_time_seconds(self, expiration_time_seconds):
- """Sets the expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema.
-
-
- :param expiration_time_seconds: The expiration_time_seconds of this RelayerApiOrderConfigPayloadSchema. # noqa: E501
- :type: str
- """
- if expiration_time_seconds is None:
- raise ValueError(
- "Invalid value for `expiration_time_seconds`, must not be `None`"
- ) # noqa: E501
- if expiration_time_seconds is not None and not re.search(
- r"^\\d+$", expiration_time_seconds
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `expiration_time_seconds`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._expiration_time_seconds = expiration_time_seconds
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrderConfigPayloadSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_order_config_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_order_config_response_schema.py
deleted file mode 100644
index a6bfcf32b..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_order_config_response_schema.py
+++ /dev/null
@@ -1,228 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrderConfigResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "maker_fee": "str",
- "taker_fee": "str",
- "fee_recipient_address": "str",
- "sender_address": "str",
- }
-
- attribute_map = {
- "maker_fee": "makerFee",
- "taker_fee": "takerFee",
- "fee_recipient_address": "feeRecipientAddress",
- "sender_address": "senderAddress",
- }
-
- def __init__(
- self,
- maker_fee=None,
- taker_fee=None,
- fee_recipient_address=None,
- sender_address=None,
- ): # noqa: E501
- """RelayerApiOrderConfigResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._maker_fee = None
- self._taker_fee = None
- self._fee_recipient_address = None
- self._sender_address = None
- self.discriminator = None
-
- self.maker_fee = maker_fee
- self.taker_fee = taker_fee
- self.fee_recipient_address = fee_recipient_address
- self.sender_address = sender_address
-
- @property
- def maker_fee(self):
- """Gets the maker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
-
-
- :return: The maker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_fee
-
- @maker_fee.setter
- def maker_fee(self, maker_fee):
- """Sets the maker_fee of this RelayerApiOrderConfigResponseSchema.
-
-
- :param maker_fee: The maker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :type: str
- """
- if maker_fee is None:
- raise ValueError(
- "Invalid value for `maker_fee`, must not be `None`"
- ) # noqa: E501
- if maker_fee is not None and not re.search(
- r"^\\d+$", maker_fee
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._maker_fee = maker_fee
-
- @property
- def taker_fee(self):
- """Gets the taker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
-
-
- :return: The taker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_fee
-
- @taker_fee.setter
- def taker_fee(self, taker_fee):
- """Sets the taker_fee of this RelayerApiOrderConfigResponseSchema.
-
-
- :param taker_fee: The taker_fee of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :type: str
- """
- if taker_fee is None:
- raise ValueError(
- "Invalid value for `taker_fee`, must not be `None`"
- ) # noqa: E501
- if taker_fee is not None and not re.search(
- r"^\\d+$", taker_fee
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_fee`, must be a follow pattern or equal to `/^\\d+$/`"
- ) # noqa: E501
-
- self._taker_fee = taker_fee
-
- @property
- def fee_recipient_address(self):
- """Gets the fee_recipient_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
-
-
- :return: The fee_recipient_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :rtype: str
- """
- return self._fee_recipient_address
-
- @fee_recipient_address.setter
- def fee_recipient_address(self, fee_recipient_address):
- """Sets the fee_recipient_address of this RelayerApiOrderConfigResponseSchema.
-
-
- :param fee_recipient_address: The fee_recipient_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :type: str
- """
- if fee_recipient_address is None:
- raise ValueError(
- "Invalid value for `fee_recipient_address`, must not be `None`"
- ) # noqa: E501
- if fee_recipient_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", fee_recipient_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `fee_recipient_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._fee_recipient_address = fee_recipient_address
-
- @property
- def sender_address(self):
- """Gets the sender_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
-
-
- :return: The sender_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :rtype: str
- """
- return self._sender_address
-
- @sender_address.setter
- def sender_address(self, sender_address):
- """Sets the sender_address of this RelayerApiOrderConfigResponseSchema.
-
-
- :param sender_address: The sender_address of this RelayerApiOrderConfigResponseSchema. # noqa: E501
- :type: str
- """
- if sender_address is None:
- raise ValueError(
- "Invalid value for `sender_address`, must not be `None`"
- ) # noqa: E501
- if sender_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", sender_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `sender_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._sender_address = sender_address
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrderConfigResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_order_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_order_schema.py
deleted file mode 100644
index 5ee45cb30..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_order_schema.py
+++ /dev/null
@@ -1,134 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrderSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"order": "OrderSchema", "meta_data": "object"}
-
- attribute_map = {"order": "order", "meta_data": "metaData"}
-
- def __init__(self, order=None, meta_data=None): # noqa: E501
- """RelayerApiOrderSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._order = None
- self._meta_data = None
- self.discriminator = None
-
- self.order = order
- self.meta_data = meta_data
-
- @property
- def order(self):
- """Gets the order of this RelayerApiOrderSchema. # noqa: E501
-
-
- :return: The order of this RelayerApiOrderSchema. # noqa: E501
- :rtype: OrderSchema
- """
- return self._order
-
- @order.setter
- def order(self, order):
- """Sets the order of this RelayerApiOrderSchema.
-
-
- :param order: The order of this RelayerApiOrderSchema. # noqa: E501
- :type: OrderSchema
- """
- if order is None:
- raise ValueError(
- "Invalid value for `order`, must not be `None`"
- ) # noqa: E501
-
- self._order = order
-
- @property
- def meta_data(self):
- """Gets the meta_data of this RelayerApiOrderSchema. # noqa: E501
-
-
- :return: The meta_data of this RelayerApiOrderSchema. # noqa: E501
- :rtype: object
- """
- return self._meta_data
-
- @meta_data.setter
- def meta_data(self, meta_data):
- """Sets the meta_data of this RelayerApiOrderSchema.
-
-
- :param meta_data: The meta_data of this RelayerApiOrderSchema. # noqa: E501
- :type: object
- """
- if meta_data is None:
- raise ValueError(
- "Invalid value for `meta_data`, must not be `None`"
- ) # noqa: E501
-
- self._meta_data = meta_data
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrderSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_orderbook_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_orderbook_response_schema.py
deleted file mode 100644
index 364785b03..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_orderbook_response_schema.py
+++ /dev/null
@@ -1,137 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrderbookResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "bids": "RelayerApiOrdersResponseSchema",
- "asks": "RelayerApiOrdersResponseSchema",
- }
-
- attribute_map = {"bids": "bids", "asks": "asks"}
-
- def __init__(self, bids=None, asks=None): # noqa: E501
- """RelayerApiOrderbookResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._bids = None
- self._asks = None
- self.discriminator = None
-
- self.bids = bids
- self.asks = asks
-
- @property
- def bids(self):
- """Gets the bids of this RelayerApiOrderbookResponseSchema. # noqa: E501
-
-
- :return: The bids of this RelayerApiOrderbookResponseSchema. # noqa: E501
- :rtype: RelayerApiOrdersResponseSchema
- """
- return self._bids
-
- @bids.setter
- def bids(self, bids):
- """Sets the bids of this RelayerApiOrderbookResponseSchema.
-
-
- :param bids: The bids of this RelayerApiOrderbookResponseSchema. # noqa: E501
- :type: RelayerApiOrdersResponseSchema
- """
- if bids is None:
- raise ValueError(
- "Invalid value for `bids`, must not be `None`"
- ) # noqa: E501
-
- self._bids = bids
-
- @property
- def asks(self):
- """Gets the asks of this RelayerApiOrderbookResponseSchema. # noqa: E501
-
-
- :return: The asks of this RelayerApiOrderbookResponseSchema. # noqa: E501
- :rtype: RelayerApiOrdersResponseSchema
- """
- return self._asks
-
- @asks.setter
- def asks(self, asks):
- """Sets the asks of this RelayerApiOrderbookResponseSchema.
-
-
- :param asks: The asks of this RelayerApiOrderbookResponseSchema. # noqa: E501
- :type: RelayerApiOrdersResponseSchema
- """
- if asks is None:
- raise ValueError(
- "Invalid value for `asks`, must not be `None`"
- ) # noqa: E501
-
- self._asks = asks
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrderbookResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_payload_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_payload_schema.py
deleted file mode 100644
index f6bb758f9..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_payload_schema.py
+++ /dev/null
@@ -1,344 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrdersChannelSubscribePayloadSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "maker_asset_proxy_id": "str",
- "taker_asset_proxy_id": "str",
- "network_id": "float",
- "maker_asset_address": "str",
- "taker_asset_address": "str",
- "maker_asset_data": "str",
- "taker_asset_data": "str",
- "trader_asset_data": "str",
- }
-
- attribute_map = {
- "maker_asset_proxy_id": "makerAssetProxyId",
- "taker_asset_proxy_id": "takerAssetProxyId",
- "network_id": "networkId",
- "maker_asset_address": "makerAssetAddress",
- "taker_asset_address": "takerAssetAddress",
- "maker_asset_data": "makerAssetData",
- "taker_asset_data": "takerAssetData",
- "trader_asset_data": "traderAssetData",
- }
-
- def __init__(
- self,
- maker_asset_proxy_id=None,
- taker_asset_proxy_id=None,
- network_id=None,
- maker_asset_address=None,
- taker_asset_address=None,
- maker_asset_data=None,
- taker_asset_data=None,
- trader_asset_data=None,
- ): # noqa: E501
- """RelayerApiOrdersChannelSubscribePayloadSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._maker_asset_proxy_id = None
- self._taker_asset_proxy_id = None
- self._network_id = None
- self._maker_asset_address = None
- self._taker_asset_address = None
- self._maker_asset_data = None
- self._taker_asset_data = None
- self._trader_asset_data = None
- self.discriminator = None
-
- if maker_asset_proxy_id is not None:
- self.maker_asset_proxy_id = maker_asset_proxy_id
- if taker_asset_proxy_id is not None:
- self.taker_asset_proxy_id = taker_asset_proxy_id
- if network_id is not None:
- self.network_id = network_id
- if maker_asset_address is not None:
- self.maker_asset_address = maker_asset_address
- if taker_asset_address is not None:
- self.taker_asset_address = taker_asset_address
- if maker_asset_data is not None:
- self.maker_asset_data = maker_asset_data
- if taker_asset_data is not None:
- self.taker_asset_data = taker_asset_data
- if trader_asset_data is not None:
- self.trader_asset_data = trader_asset_data
-
- @property
- def maker_asset_proxy_id(self):
- """Gets the maker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The maker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_proxy_id
-
- @maker_asset_proxy_id.setter
- def maker_asset_proxy_id(self, maker_asset_proxy_id):
- """Sets the maker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param maker_asset_proxy_id: The maker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if maker_asset_proxy_id is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", maker_asset_proxy_id
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_proxy_id`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._maker_asset_proxy_id = maker_asset_proxy_id
-
- @property
- def taker_asset_proxy_id(self):
- """Gets the taker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The taker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_proxy_id
-
- @taker_asset_proxy_id.setter
- def taker_asset_proxy_id(self, taker_asset_proxy_id):
- """Sets the taker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param taker_asset_proxy_id: The taker_asset_proxy_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if taker_asset_proxy_id is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", taker_asset_proxy_id
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_proxy_id`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._taker_asset_proxy_id = taker_asset_proxy_id
-
- @property
- def network_id(self):
- """Gets the network_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The network_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: float
- """
- return self._network_id
-
- @network_id.setter
- def network_id(self, network_id):
- """Sets the network_id of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param network_id: The network_id of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: float
- """
-
- self._network_id = network_id
-
- @property
- def maker_asset_address(self):
- """Gets the maker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The maker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_address
-
- @maker_asset_address.setter
- def maker_asset_address(self, maker_asset_address):
- """Sets the maker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param maker_asset_address: The maker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if maker_asset_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", maker_asset_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._maker_asset_address = maker_asset_address
-
- @property
- def taker_asset_address(self):
- """Gets the taker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The taker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_address
-
- @taker_asset_address.setter
- def taker_asset_address(self, taker_asset_address):
- """Sets the taker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param taker_asset_address: The taker_asset_address of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if taker_asset_address is not None and not re.search(
- r"^0x[0-9a-f]{40}$", taker_asset_address
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_address`, must be a follow pattern or equal to `/^0x[0-9a-f]{40}$/`"
- ) # noqa: E501
-
- self._taker_asset_address = taker_asset_address
-
- @property
- def maker_asset_data(self):
- """Gets the maker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The maker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._maker_asset_data
-
- @maker_asset_data.setter
- def maker_asset_data(self, maker_asset_data):
- """Sets the maker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param maker_asset_data: The maker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if maker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", maker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `maker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._maker_asset_data = maker_asset_data
-
- @property
- def taker_asset_data(self):
- """Gets the taker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The taker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._taker_asset_data
-
- @taker_asset_data.setter
- def taker_asset_data(self, taker_asset_data):
- """Sets the taker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param taker_asset_data: The taker_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if taker_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", taker_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `taker_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._taker_asset_data = taker_asset_data
-
- @property
- def trader_asset_data(self):
- """Gets the trader_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
-
-
- :return: The trader_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :rtype: str
- """
- return self._trader_asset_data
-
- @trader_asset_data.setter
- def trader_asset_data(self, trader_asset_data):
- """Sets the trader_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema.
-
-
- :param trader_asset_data: The trader_asset_data of this RelayerApiOrdersChannelSubscribePayloadSchema. # noqa: E501
- :type: str
- """
- if trader_asset_data is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", trader_asset_data
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `trader_asset_data`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._trader_asset_data = trader_asset_data
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(
- other, RelayerApiOrdersChannelSubscribePayloadSchema
- ):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_schema.py
deleted file mode 100644
index 2f72d5307..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_subscribe_schema.py
+++ /dev/null
@@ -1,211 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrdersChannelSubscribeSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "type": "str",
- "channel": "str",
- "request_id": "str",
- "payload": "RelayerApiOrdersChannelSubscribePayloadSchema",
- }
-
- attribute_map = {
- "type": "type",
- "channel": "channel",
- "request_id": "requestId",
- "payload": "payload",
- }
-
- def __init__(
- self, type=None, channel=None, request_id=None, payload=None
- ): # noqa: E501
- """RelayerApiOrdersChannelSubscribeSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._type = None
- self._channel = None
- self._request_id = None
- self._payload = None
- self.discriminator = None
-
- self.type = type
- self.channel = channel
- self.request_id = request_id
- if payload is not None:
- self.payload = payload
-
- @property
- def type(self):
- """Gets the type of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
-
-
- :return: The type of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :rtype: str
- """
- return self._type
-
- @type.setter
- def type(self, type):
- """Sets the type of this RelayerApiOrdersChannelSubscribeSchema.
-
-
- :param type: The type of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :type: str
- """
- if type is None:
- raise ValueError(
- "Invalid value for `type`, must not be `None`"
- ) # noqa: E501
- allowed_values = ["subscribe"] # noqa: E501
- if type not in allowed_values:
- raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format( # noqa: E501
- type, allowed_values
- )
- )
-
- self._type = type
-
- @property
- def channel(self):
- """Gets the channel of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
-
-
- :return: The channel of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :rtype: str
- """
- return self._channel
-
- @channel.setter
- def channel(self, channel):
- """Sets the channel of this RelayerApiOrdersChannelSubscribeSchema.
-
-
- :param channel: The channel of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :type: str
- """
- if channel is None:
- raise ValueError(
- "Invalid value for `channel`, must not be `None`"
- ) # noqa: E501
- allowed_values = ["orders"] # noqa: E501
- if channel not in allowed_values:
- raise ValueError(
- "Invalid value for `channel` ({0}), must be one of {1}".format( # noqa: E501
- channel, allowed_values
- )
- )
-
- self._channel = channel
-
- @property
- def request_id(self):
- """Gets the request_id of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
-
-
- :return: The request_id of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :rtype: str
- """
- return self._request_id
-
- @request_id.setter
- def request_id(self, request_id):
- """Sets the request_id of this RelayerApiOrdersChannelSubscribeSchema.
-
-
- :param request_id: The request_id of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :type: str
- """
- if request_id is None:
- raise ValueError(
- "Invalid value for `request_id`, must not be `None`"
- ) # noqa: E501
-
- self._request_id = request_id
-
- @property
- def payload(self):
- """Gets the payload of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
-
-
- :return: The payload of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :rtype: RelayerApiOrdersChannelSubscribePayloadSchema
- """
- return self._payload
-
- @payload.setter
- def payload(self, payload):
- """Sets the payload of this RelayerApiOrdersChannelSubscribeSchema.
-
-
- :param payload: The payload of this RelayerApiOrdersChannelSubscribeSchema. # noqa: E501
- :type: RelayerApiOrdersChannelSubscribePayloadSchema
- """
-
- self._payload = payload
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrdersChannelSubscribeSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_update_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_update_schema.py
deleted file mode 100644
index 68aa2fddb..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_orders_channel_update_schema.py
+++ /dev/null
@@ -1,211 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrdersChannelUpdateSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {
- "type": "str",
- "channel": "str",
- "request_id": "str",
- "payload": "list[RelayerApiOrderSchema]",
- }
-
- attribute_map = {
- "type": "type",
- "channel": "channel",
- "request_id": "requestId",
- "payload": "payload",
- }
-
- def __init__(
- self, type=None, channel=None, request_id=None, payload=None
- ): # noqa: E501
- """RelayerApiOrdersChannelUpdateSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._type = None
- self._channel = None
- self._request_id = None
- self._payload = None
- self.discriminator = None
-
- self.type = type
- self.channel = channel
- self.request_id = request_id
- if payload is not None:
- self.payload = payload
-
- @property
- def type(self):
- """Gets the type of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
-
-
- :return: The type of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :rtype: str
- """
- return self._type
-
- @type.setter
- def type(self, type):
- """Sets the type of this RelayerApiOrdersChannelUpdateSchema.
-
-
- :param type: The type of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :type: str
- """
- if type is None:
- raise ValueError(
- "Invalid value for `type`, must not be `None`"
- ) # noqa: E501
- allowed_values = ["update"] # noqa: E501
- if type not in allowed_values:
- raise ValueError(
- "Invalid value for `type` ({0}), must be one of {1}".format( # noqa: E501
- type, allowed_values
- )
- )
-
- self._type = type
-
- @property
- def channel(self):
- """Gets the channel of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
-
-
- :return: The channel of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :rtype: str
- """
- return self._channel
-
- @channel.setter
- def channel(self, channel):
- """Sets the channel of this RelayerApiOrdersChannelUpdateSchema.
-
-
- :param channel: The channel of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :type: str
- """
- if channel is None:
- raise ValueError(
- "Invalid value for `channel`, must not be `None`"
- ) # noqa: E501
- allowed_values = ["orders"] # noqa: E501
- if channel not in allowed_values:
- raise ValueError(
- "Invalid value for `channel` ({0}), must be one of {1}".format( # noqa: E501
- channel, allowed_values
- )
- )
-
- self._channel = channel
-
- @property
- def request_id(self):
- """Gets the request_id of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
-
-
- :return: The request_id of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :rtype: str
- """
- return self._request_id
-
- @request_id.setter
- def request_id(self, request_id):
- """Sets the request_id of this RelayerApiOrdersChannelUpdateSchema.
-
-
- :param request_id: The request_id of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :type: str
- """
- if request_id is None:
- raise ValueError(
- "Invalid value for `request_id`, must not be `None`"
- ) # noqa: E501
-
- self._request_id = request_id
-
- @property
- def payload(self):
- """Gets the payload of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
-
-
- :return: The payload of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :rtype: list[RelayerApiOrderSchema]
- """
- return self._payload
-
- @payload.setter
- def payload(self, payload):
- """Sets the payload of this RelayerApiOrdersChannelUpdateSchema.
-
-
- :param payload: The payload of this RelayerApiOrdersChannelUpdateSchema. # noqa: E501
- :type: list[RelayerApiOrderSchema]
- """
-
- self._payload = payload
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrdersChannelUpdateSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/relayer_api_orders_response_schema.py b/python-packages/sra_client/sra_client/models/relayer_api_orders_response_schema.py
deleted file mode 100644
index d72b74cb7..000000000
--- a/python-packages/sra_client/sra_client/models/relayer_api_orders_response_schema.py
+++ /dev/null
@@ -1,107 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class RelayerApiOrdersResponseSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"records": "list[RelayerApiOrderSchema]"}
-
- attribute_map = {"records": "records"}
-
- def __init__(self, records=None): # noqa: E501
- """RelayerApiOrdersResponseSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._records = None
- self.discriminator = None
-
- self.records = records
-
- @property
- def records(self):
- """Gets the records of this RelayerApiOrdersResponseSchema. # noqa: E501
-
-
- :return: The records of this RelayerApiOrdersResponseSchema. # noqa: E501
- :rtype: list[RelayerApiOrderSchema]
- """
- return self._records
-
- @records.setter
- def records(self, records):
- """Sets the records of this RelayerApiOrdersResponseSchema.
-
-
- :param records: The records of this RelayerApiOrdersResponseSchema. # noqa: E501
- :type: list[RelayerApiOrderSchema]
- """
- if records is None:
- raise ValueError(
- "Invalid value for `records`, must not be `None`"
- ) # noqa: E501
-
- self._records = records
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, RelayerApiOrdersResponseSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/models/signed_order_schema.py b/python-packages/sra_client/sra_client/models/signed_order_schema.py
deleted file mode 100644
index 8c71bff89..000000000
--- a/python-packages/sra_client/sra_client/models/signed_order_schema.py
+++ /dev/null
@@ -1,113 +0,0 @@
-# coding: utf-8
-
-
-import pprint
-import re # noqa: F401
-
-import six
-
-
-class SignedOrderSchema(object):
- """NOTE: This class is auto generated by OpenAPI Generator.
- Ref: https://openapi-generator.tech
-
- Do not edit the class manually.
- """
-
- """
- Attributes:
- openapi_types (dict): The key is attribute name
- and the value is attribute type.
- attribute_map (dict): The key is attribute name
- and the value is json key in definition.
- """
- openapi_types = {"signature": "str"}
-
- attribute_map = {"signature": "signature"}
-
- def __init__(self, signature=None): # noqa: E501
- """SignedOrderSchema - a model defined in OpenAPI""" # noqa: E501
-
- self._signature = None
- self.discriminator = None
-
- self.signature = signature
-
- @property
- def signature(self):
- """Gets the signature of this SignedOrderSchema. # noqa: E501
-
-
- :return: The signature of this SignedOrderSchema. # noqa: E501
- :rtype: str
- """
- return self._signature
-
- @signature.setter
- def signature(self, signature):
- """Sets the signature of this SignedOrderSchema.
-
-
- :param signature: The signature of this SignedOrderSchema. # noqa: E501
- :type: str
- """
- if signature is None:
- raise ValueError(
- "Invalid value for `signature`, must not be `None`"
- ) # noqa: E501
- if signature is not None and not re.search(
- r"^0x(([0-9a-f][0-9a-f])+)?$", signature
- ): # noqa: E501
- raise ValueError(
- r"Invalid value for `signature`, must be a follow pattern or equal to `/^0x(([0-9a-f][0-9a-f])+)?$/`"
- ) # noqa: E501
-
- self._signature = signature
-
- def to_dict(self):
- """Returns the model properties as a dict"""
- result = {}
-
- for attr, _ in six.iteritems(self.openapi_types):
- value = getattr(self, attr)
- if isinstance(value, list):
- result[attr] = list(
- map(
- lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
- value,
- )
- )
- elif hasattr(value, "to_dict"):
- result[attr] = value.to_dict()
- elif isinstance(value, dict):
- result[attr] = dict(
- map(
- lambda item: (item[0], item[1].to_dict())
- if hasattr(item[1], "to_dict")
- else item,
- value.items(),
- )
- )
- else:
- result[attr] = value
-
- return result
-
- def to_str(self):
- """Returns the string representation of the model"""
- return pprint.pformat(self.to_dict())
-
- def __repr__(self):
- """For `print` and `pprint`"""
- return self.to_str()
-
- def __eq__(self, other):
- """Returns true if both objects are equal"""
- if not isinstance(other, SignedOrderSchema):
- return False
-
- return self.__dict__ == other.__dict__
-
- def __ne__(self, other):
- """Returns true if both objects are not equal"""
- return not self == other
diff --git a/python-packages/sra_client/sra_client/rest.py b/python-packages/sra_client/sra_client/rest.py
deleted file mode 100644
index b38cabd70..000000000
--- a/python-packages/sra_client/sra_client/rest.py
+++ /dev/null
@@ -1,421 +0,0 @@
-# coding: utf-8
-
-
-from __future__ import absolute_import
-
-import io
-import json
-import logging
-import re
-import ssl
-
-import certifi
-
-# python 2 and python 3 compatibility library
-import six
-from six.moves.urllib.parse import urlencode
-
-try:
- import urllib3
-except ImportError:
- raise ImportError("OpenAPI Python client requires urllib3.")
-
-
-logger = logging.getLogger(__name__)
-
-
-class RESTResponse(io.IOBase):
- def __init__(self, resp):
- self.urllib3_response = resp
- self.status = resp.status
- self.reason = resp.reason
- self.data = resp.data
-
- def getheaders(self):
- """Returns a dictionary of the response headers."""
- return self.urllib3_response.getheaders()
-
- def getheader(self, name, default=None):
- """Returns a given response header."""
- return self.urllib3_response.getheader(name, default)
-
-
-class RESTClientObject(object):
- def __init__(self, configuration, pools_size=4, maxsize=None):
- # urllib3.PoolManager will pass all kw parameters to connectionpool
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
- # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
- # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
- # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
-
- # cert_reqs
- if configuration.verify_ssl:
- cert_reqs = ssl.CERT_REQUIRED
- else:
- cert_reqs = ssl.CERT_NONE
-
- # ca_certs
- if configuration.ssl_ca_cert:
- ca_certs = configuration.ssl_ca_cert
- else:
- # if not set certificate file, use Mozilla's root certificates.
- ca_certs = certifi.where()
-
- addition_pool_args = {}
- if configuration.assert_hostname is not None:
- addition_pool_args[
- "assert_hostname"
- ] = configuration.assert_hostname # noqa: E501
-
- if maxsize is None:
- if configuration.connection_pool_maxsize is not None:
- maxsize = configuration.connection_pool_maxsize
- else:
- maxsize = 4
-
- # https pool manager
- if configuration.proxy:
- self.pool_manager = urllib3.ProxyManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=ca_certs,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- proxy_url=configuration.proxy,
- **addition_pool_args
- )
- else:
- self.pool_manager = urllib3.PoolManager(
- num_pools=pools_size,
- maxsize=maxsize,
- cert_reqs=cert_reqs,
- ca_certs=ca_certs,
- cert_file=configuration.cert_file,
- key_file=configuration.key_file,
- **addition_pool_args
- )
-
- def request(
- self,
- method,
- url,
- query_params=None,
- headers=None,
- body=None,
- post_params=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- """Perform requests.
-
- :param method: http request method
- :param url: http request url
- :param query_params: query parameters in the url
- :param headers: http request headers
- :param body: request json body, for `application/json`
- :param post_params: request post parameters,
- `application/x-www-form-urlencoded`
- and `multipart/form-data`
- :param _preload_content: if False, the urllib3.HTTPResponse object will
- be returned without reading/decoding response
- data. Default is True.
- :param _request_timeout: timeout setting for this request. If one
- number provided, it will be total request
- timeout. It can also be a pair (tuple) of
- (connection, read) timeouts.
- """
- method = method.upper()
- assert method in [
- "GET",
- "HEAD",
- "DELETE",
- "POST",
- "PUT",
- "PATCH",
- "OPTIONS",
- ]
-
- if post_params and body:
- raise ValueError(
- "body parameter cannot be used with post_params parameter."
- )
-
- post_params = post_params or {}
- headers = headers or {}
-
- timeout = None
- if _request_timeout:
- if isinstance(
- _request_timeout, (int,) if six.PY3 else (int, long)
- ): # noqa: E501,F821
- timeout = urllib3.Timeout(total=_request_timeout)
- elif (
- isinstance(_request_timeout, tuple)
- and len(_request_timeout) == 2
- ):
- timeout = urllib3.Timeout(
- connect=_request_timeout[0], read=_request_timeout[1]
- )
-
- if "Content-Type" not in headers:
- headers["Content-Type"] = "application/json"
-
- try:
- # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
- if method in ["POST", "PUT", "PATCH", "OPTIONS", "DELETE"]:
- if query_params:
- url += "?" + urlencode(query_params)
- if re.search("json", headers["Content-Type"], re.IGNORECASE):
- request_body = None
- if body is not None:
- request_body = json.dumps(body)
- r = self.pool_manager.request(
- method,
- url,
- body=request_body,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- )
- elif (
- headers["Content-Type"]
- == "application/x-www-form-urlencoded"
- ): # noqa: E501
- r = self.pool_manager.request(
- method,
- url,
- fields=post_params,
- encode_multipart=False,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- )
- elif headers["Content-Type"] == "multipart/form-data":
- # must del headers['Content-Type'], or the correct
- # Content-Type which generated by urllib3 will be
- # overwritten.
- del headers["Content-Type"]
- r = self.pool_manager.request(
- method,
- url,
- fields=post_params,
- encode_multipart=True,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- )
- # Pass a `string` parameter directly in the body to support
- # other content types than Json when `body` argument is
- # provided in serialized form
- elif isinstance(body, str):
- request_body = body
- r = self.pool_manager.request(
- method,
- url,
- body=request_body,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- )
- else:
- # Cannot generate the request from given parameters
- msg = """Cannot prepare a request message for provided
- arguments. Please check that your arguments match
- declared content type."""
- raise ApiException(status=0, reason=msg)
- # For `GET`, `HEAD`
- else:
- r = self.pool_manager.request(
- method,
- url,
- fields=query_params,
- preload_content=_preload_content,
- timeout=timeout,
- headers=headers,
- )
- except urllib3.exceptions.SSLError as e:
- msg = "{0}\n{1}".format(type(e).__name__, str(e))
- raise ApiException(status=0, reason=msg)
-
- if _preload_content:
- r = RESTResponse(r)
-
- # In the python 3, the response.data is bytes.
- # we need to decode it to string.
- if six.PY3:
- r.data = r.data.decode("utf8")
-
- # log response body
- logger.debug("response body: %s", r.data)
-
- if not 200 <= r.status <= 299:
- raise ApiException(http_resp=r)
-
- return r
-
- def GET(
- self,
- url,
- headers=None,
- query_params=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "GET",
- url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- )
-
- def HEAD(
- self,
- url,
- headers=None,
- query_params=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "HEAD",
- url,
- headers=headers,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- query_params=query_params,
- )
-
- def OPTIONS(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "OPTIONS",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def DELETE(
- self,
- url,
- headers=None,
- query_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "DELETE",
- url,
- headers=headers,
- query_params=query_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def POST(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "POST",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def PUT(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "PUT",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
- def PATCH(
- self,
- url,
- headers=None,
- query_params=None,
- post_params=None,
- body=None,
- _preload_content=True,
- _request_timeout=None,
- ):
- return self.request(
- "PATCH",
- url,
- headers=headers,
- query_params=query_params,
- post_params=post_params,
- _preload_content=_preload_content,
- _request_timeout=_request_timeout,
- body=body,
- )
-
-
-class ApiException(Exception):
- def __init__(self, status=None, reason=None, http_resp=None):
- if http_resp:
- self.status = http_resp.status
- self.reason = http_resp.reason
- self.body = http_resp.data
- self.headers = http_resp.getheaders()
- else:
- self.status = status
- self.reason = reason
- self.body = None
- self.headers = None
-
- def __str__(self):
- """Custom error messages for exception"""
- error_message = "({0})\n" "Reason: {1}\n".format(
- self.status, self.reason
- )
- if self.headers:
- error_message += "HTTP response headers: {0}\n".format(
- self.headers
- )
-
- if self.body:
- error_message += "HTTP response body: {0}\n".format(self.body)
-
- return error_message
diff --git a/python-packages/sra_client/test-requirements.txt b/python-packages/sra_client/test-requirements.txt
deleted file mode 100644
index 2702246c0..000000000
--- a/python-packages/sra_client/test-requirements.txt
+++ /dev/null
@@ -1,5 +0,0 @@
-coverage>=4.0.3
-nose>=1.3.7
-pluggy>=0.3.1
-py>=1.4.31
-randomize>=0.13
diff --git a/python-packages/sra_client/test/__init__.py b/python-packages/sra_client/test/__init__.py
deleted file mode 100644
index e69de29bb..000000000
--- a/python-packages/sra_client/test/__init__.py
+++ /dev/null
diff --git a/python-packages/sra_client/test/test_default_api.py b/python-packages/sra_client/test/test_default_api.py
deleted file mode 100644
index d23c6173f..000000000
--- a/python-packages/sra_client/test/test_default_api.py
+++ /dev/null
@@ -1,35 +0,0 @@
-# coding: utf-8
-
-
-from __future__ import absolute_import
-
-import unittest
-
-import sra_client
-from sra_client.api.default_api import DefaultApi # noqa: E501
-from sra_client.models.relayer_api_asset_data_pairs_response_schema import (
- RelayerApiAssetDataPairsResponseSchema
-)
-from sra_client.rest import ApiException
-
-
-class TestDefaultApi(unittest.TestCase):
- """DefaultApi unit test stubs"""
-
- def setUp(self):
- self.api = sra_client.api.default_api.DefaultApi() # noqa: E501
-
- def tearDown(self):
- pass
-
- def test_get_asset_pairs(self):
- """Test case for get_asset_pairs
-
- """
- expected = RelayerApiAssetDataPairsResponseSchema([])
- actual = self.api.get_asset_pairs()
- self.assertEqual(actual, expected)
-
-
-if __name__ == "__main__":
- unittest.main()
diff --git a/python-packages/sra_client/tox.ini b/python-packages/sra_client/tox.ini
deleted file mode 100644
index 69d59f4ff..000000000
--- a/python-packages/sra_client/tox.ini
+++ /dev/null
@@ -1,24 +0,0 @@
-[tox]
-envlist = py27, py3
-
-[testenv]
-deps=-r{toxinidir}/requirements.txt
- -r{toxinidir}/test-requirements.txt
-
-commands=
- nosetests \
- []
-
-[testenv:run_tests_against_test_deployment]
-commands =
- # install dependencies from real PyPI
- pip install mypy_extensions pytest
- # install package-under-test from test PyPI
- pip install --index-url https://test.pypi.org/legacy/ 0x-sra-client
- pytest test
-
-[testenv:run_tests_against_deployment]
-deps=pytest
-commands =
- pip install 0x-sra-client
- pytest test
diff --git a/python-packages/test b/python-packages/test
deleted file mode 100755
index 5bf37cca3..000000000
--- a/python-packages/test
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/usr/bin/env python
-
-"""Script to run tests against local copy of all components."""
-
-from os import path
-import subprocess
-
-subprocess.check_call(
- (
- f"{path.join('.', 'cmd_pkgs_in_dep_order.py')}"
- + f" {path.join('.', 'setup.py')} test"
- ).split()
-)
diff --git a/tsconfig.json b/tsconfig.json
index a49483972..fe4f2c902 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -8,7 +8,7 @@
"noImplicitReturns": true,
"pretty": true,
"skipLibCheck": true,
- "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
+ "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@dexon-foundation/typescript-typings/types", "node_modules/@types"],
"strict": true,
// These settings are required for TypeScript project references
"composite": true,
@@ -29,7 +29,6 @@
{ "path": "./contracts/test-utils" },
{ "path": "./contracts/tokens" },
{ "path": "./contracts/utils" },
- { "path": "./packages/0x.js" },
{ "path": "./packages/abi-gen-wrappers" },
{ "path": "./packages/abi-gen" },
{ "path": "./packages/assert" },
diff --git a/yarn.lock b/yarn.lock
index e4db8d4e8..6132c9bbb 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -472,161 +472,278 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"
-"@0x/abi-gen-wrappers@^1.0.2":
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/@0x/abi-gen-wrappers/-/abi-gen-wrappers-1.1.0.tgz#d4e4f10699b5da6bcfadc3842f165fc59f686e09"
+"@0x/assert@^1.0.23":
+ version "1.0.23"
+ resolved "https://registry.yarnpkg.com/@0x/assert/-/assert-1.0.23.tgz#2f663efae9b0ba2a00f2d5821b7a767f87058d3d"
dependencies:
- "@0x/base-contract" "^3.0.7"
+ "@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"
+
+"@0x/dev-utils@^1.0.24":
+ version "1.0.24"
+ resolved "https://registry.yarnpkg.com/@0x/dev-utils/-/dev-utils-1.0.24.tgz#7fa1d209865a502fef23933e6a85df00f4dad8ab"
+ dependencies:
+ "@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"
+ chai "^4.0.1"
+ ethereum-types "^1.1.6"
+ lodash "^4.17.5"
-"@0x/contract-addresses@^1.1.0":
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/@0x/contract-addresses/-/contract-addresses-1.2.0.tgz#aa5001d73adb1ec9cc58ab4f6e0cac0acc4ad0a8"
+"@0x/json-schemas@^2.1.7":
+ version "2.1.7"
+ resolved "https://registry.yarnpkg.com/@0x/json-schemas/-/json-schemas-2.1.7.tgz#19e34f6c9cb3b0f112d1e4722c3951fa6d147b44"
dependencies:
- lodash "^4.17.5"
+ "@0x/typescript-typings" "^3.0.8"
+ "@types/node" "*"
+ jsonschema "^1.2.0"
+ lodash.values "^4.3.0"
-"@0x/contract-wrappers@^3.0.0":
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/@0x/contract-wrappers/-/contract-wrappers-3.0.1.tgz#e25f5812595d994ff66e36aa2aa99eb53becfc7c"
- dependencies:
- "@0x/abi-gen-wrappers" "^1.0.2"
- "@0x/assert" "^1.0.15"
- "@0x/contract-addresses" "^1.1.0"
- "@0x/contract-artifacts" "^1.1.0"
- "@0x/fill-scenarios" "^1.0.9"
- "@0x/json-schemas" "^2.0.1"
- "@0x/order-utils" "^2.0.1"
- "@0x/types" "^1.2.1"
- "@0x/typescript-typings" "^3.0.4"
- "@0x/utils" "^2.0.4"
- "@0x/web3-wrapper" "^3.1.1"
- ethereum-types "^1.1.2"
- ethereumjs-blockstream "6.0.0"
- ethereumjs-util "^5.1.1"
- ethers "~4.0.4"
- js-sha3 "^0.7.0"
+"@0x/sol-resolver@^1.2.3":
+ version "1.2.3"
+ resolved "https://registry.yarnpkg.com/@0x/sol-resolver/-/sol-resolver-1.2.3.tgz#d45d18a6bdeb212abf791b1cbbeac1bb780a94d0"
+ dependencies:
+ "@0x/types" "^1.5.2"
+ "@0x/typescript-typings" "^3.0.8"
lodash "^4.17.5"
- uuid "^3.1.0"
-"@0x/order-utils@^2.0.1":
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/@0x/order-utils/-/order-utils-2.0.1.tgz#8c46d7aeb9e2cce54a0822824c12427cbe5f7eb4"
- dependencies:
- "@0x/abi-gen-wrappers" "^1.0.2"
- "@0x/assert" "^1.0.15"
- "@0x/base-contract" "^3.0.3"
- "@0x/contract-artifacts" "^1.1.0"
- "@0x/json-schemas" "^2.0.1"
- "@0x/types" "^1.2.1"
- "@0x/typescript-typings" "^3.0.4"
- "@0x/utils" "^2.0.4"
- "@0x/web3-wrapper" "^3.1.1"
- "@types/node" "*"
+"@0x/subproviders@^2.1.11":
+ version "2.1.11"
+ resolved "https://registry.yarnpkg.com/@0x/subproviders/-/subproviders-2.1.11.tgz#3f2dc27467b933c97732c466a23ff86bf835ada9"
+ dependencies:
+ "@0x/assert" "^1.0.23"
+ "@0x/types" "^1.5.2"
+ "@0x/typescript-typings" "^3.0.8"
+ "@0x/utils" "^3.0.1"
+ "@0x/web3-wrapper" "^3.2.4"
+ "@ledgerhq/hw-app-eth" "^4.3.0"
+ "@ledgerhq/hw-transport-u2f" "4.24.0"
+ "@types/eth-lightwallet" "^3.0.0"
+ "@types/ganache-core" "^2.1.0"
+ "@types/hdkey" "^0.7.0"
+ "@types/web3-provider-engine" "^14.0.0"
+ bip39 "^2.5.0"
bn.js "^4.11.8"
- ethereum-types "^1.1.2"
- ethereumjs-abi "0.6.5"
+ eth-lightwallet "^3.0.1"
+ ethereum-types "^1.1.6"
+ ethereumjs-tx "^1.3.5"
ethereumjs-util "^5.1.1"
- ethers "~4.0.4"
+ ganache-core "^2.2.1"
+ hdkey "^0.7.1"
+ json-rpc-error "2.0.0"
lodash "^4.17.5"
+ semaphore-async-await "^1.5.1"
+ web3-provider-engine "14.0.6"
+ optionalDependencies:
+ "@ledgerhq/hw-transport-node-hid" "^4.3.0"
-"@0x/utils@^2.0.4":
- version "2.1.1"
- resolved "https://registry.npmjs.org/@0x/utils/-/utils-2.1.1.tgz#0a79f9ce6207a8a7ff0751366e618d0f6b9d903f"
+"@0x/tslint-config@^2.0.2":
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/@0x/tslint-config/-/tslint-config-2.0.2.tgz#a202f2cb943c6e5feab7446f3a004de874fb8b94"
+ dependencies:
+ lodash "^4.17.5"
+ tslint "5.11.0"
+ tslint-eslint-rules "5.4.0"
+ tslint-react "^3.2.0"
+ tsutils "3.0.0"
+
+"@0x/types@^1.5.2":
+ version "1.5.2"
+ resolved "https://registry.yarnpkg.com/@0x/types/-/types-1.5.2.tgz#19c99ff796664fc256facb10e704aa6541912551"
+ dependencies:
+ "@types/node" "*"
+ bignumber.js "~4.1.0"
+ ethereum-types "^1.1.6"
+
+"@0x/typescript-typings@^3.0.8":
+ version "3.0.8"
+ resolved "https://registry.yarnpkg.com/@0x/typescript-typings/-/typescript-typings-3.0.8.tgz#85689e477c1cb5e5bd3eeee0dd1e73e9c2f1db83"
+ dependencies:
+ "@types/bn.js" "^4.11.0"
+ "@types/react" "*"
+ bignumber.js "~4.1.0"
+ ethereum-types "^1.1.6"
+ popper.js "1.14.3"
+
+"@0x/utils@^3.0.1":
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/@0x/utils/-/utils-3.0.1.tgz#20ada4a98f001c0a6656d45ae56e111b73ef8803"
dependencies:
- "@0x/types" "^1.5.0"
- "@0x/typescript-typings" "^3.0.6"
+ "@0x/types" "^1.5.2"
+ "@0x/typescript-typings" "^3.0.8"
"@types/node" "*"
abortcontroller-polyfill "^1.1.9"
bignumber.js "~4.1.0"
chalk "^2.4.1"
detect-node "2.0.3"
- ethereum-types "^1.1.4"
+ ethereum-types "^1.1.6"
ethereumjs-util "^5.1.1"
ethers "~4.0.4"
isomorphic-fetch "^2.2.1"
js-sha3 "^0.7.0"
lodash "^4.17.5"
+"@0x/web3-wrapper@^3.2.4":
+ version "3.2.4"
+ resolved "https://registry.yarnpkg.com/@0x/web3-wrapper/-/web3-wrapper-3.2.4.tgz#02d84e36866d3b7c4b71ed2ddf23c05f73bb340d"
+ dependencies:
+ "@0x/assert" "^1.0.23"
+ "@0x/json-schemas" "^2.1.7"
+ "@0x/typescript-typings" "^3.0.8"
+ "@0x/utils" "^3.0.1"
+ ethereum-types "^1.1.6"
+ ethereumjs-util "^5.1.1"
+ ethers "~4.0.4"
+ lodash "^4.17.5"
+
"@0xproject/npm-cli-login@^0.0.11":
version "0.0.11"
resolved "https://registry.yarnpkg.com/@0xproject/npm-cli-login/-/npm-cli-login-0.0.11.tgz#3f1ec06112ce62aad300ff0575358f68aeecde2e"
dependencies:
npm-registry-client "7.0.9"
-"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35":
- version "7.0.0"
- resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0.tgz#06e2ab19bdb535385559aabb5ba59729482800f8"
- dependencies:
- "@babel/highlight" "^7.0.0"
-
-"@babel/helper-annotate-as-pure@^7.0.0":
- version "7.0.0"
- resolved "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.0.0.tgz#323d39dd0b50e10c7c06ca7d7638e6864d8c5c32"
- dependencies:
- "@babel/types" "^7.0.0"
-
-"@babel/helper-module-imports@^7.0.0":
- version "7.0.0"
- resolved "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.0.0.tgz#96081b7111e486da4d2cd971ad1a4fe216cc2e3d"
- dependencies:
- "@babel/types" "^7.0.0"
-
-"@babel/highlight@^7.0.0":
- version "7.0.0"
- resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0.tgz#f710c38c8d458e6dd9a201afb637fcb781ce99e4"
+"@dexon-foundation/dsolc@^0.5.1":
+ version "0.5.1"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/dsolc/-/dsolc-0.5.1.tgz#c69fe2858f8e12db581117182a05a2c6b6fc9ef6"
dependencies:
- chalk "^2.0.0"
- esutils "^2.0.2"
- js-tokens "^4.0.0"
+ command-exists "^1.2.8"
+ fs-extra "^0.30.0"
+ keccak "^1.0.2"
+ memorystream "^0.3.1"
+ require-from-string "^2.0.0"
+ semver "^5.5.0"
+ tmp "0.0.33"
+ yargs "^11.0.0"
-"@babel/runtime@7.0.0", "@babel/runtime@^7.0.0":
- version "7.0.0"
- resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0.tgz#adeb78fedfc855aa05bc041640f3f6f98e85424c"
+"@dexon-foundation/eth-json-rpc-infura@^3.1.0":
+ version "3.1.2"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/eth-json-rpc-infura/-/eth-json-rpc-infura-3.1.2.tgz#ee1a6247870f940b14821fdacffb3d63cafc8e65"
dependencies:
- regenerator-runtime "^0.12.0"
+ "@dexon-foundation/eth-json-rpc-middleware" "^3.1.8"
+ cross-fetch "^2.1.1"
+ json-rpc-engine "^3.4.0"
+ json-rpc-error "^2.0.0"
+ tape "^4.8.0"
-"@babel/runtime@7.0.0-rc.1":
- version "7.0.0-rc.1"
- resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.0.0-rc.1.tgz#42f36fc5817911c89ea75da2b874054922967616"
+"@dexon-foundation/eth-json-rpc-middleware@^3.1.8":
+ version "3.1.8"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/eth-json-rpc-middleware/-/eth-json-rpc-middleware-3.1.8.tgz#a3183bb23414929547a33b62826c6dbbf3285fe5"
dependencies:
- regenerator-runtime "^0.12.0"
+ "@dexon-foundation/eth-tx-summary" "^3.2.3"
+ "@dexon-foundation/ethereumjs-vm" "^2.4.3"
+ babel-preset-es2015 "^6.24.1"
+ btoa "^1.2.1"
+ clone "^2.1.1"
+ eth-query "^2.1.2"
+ eth-sig-util "^1.4.2"
+ ethereumjs-block "^1.6.0"
+ ethereumjs-tx "^1.3.3"
+ ethereumjs-util "^5.1.2"
+ fetch-ponyfill "^4.0.0"
+ json-rpc-engine "^3.8.0"
+ json-rpc-error "^2.0.0"
+ json-stable-stringify "^1.0.1"
+ pify "^3.0.0"
+ safe-event-emitter "^1.0.1"
-"@babel/runtime@^7.1.2":
- version "7.2.0"
- resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.2.0.tgz#b03e42eeddf5898e00646e4c840fa07ba8dcad7f"
+"@dexon-foundation/eth-tx-summary@^3.2.3":
+ version "3.2.3"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/eth-tx-summary/-/eth-tx-summary-3.2.3.tgz#f9b398cb5c3dcb05ddca426bf61764d1e2e05408"
dependencies:
- regenerator-runtime "^0.12.0"
+ "@dexon-foundation/ethereumjs-vm" "^2.4.3"
+ "@dexon-foundation/web3-provider-engine" "^14.1.0"
+ async "^2.1.2"
+ bn.js "^4.11.8"
+ clone "^2.0.0"
+ concat-stream "^1.5.1"
+ end-of-stream "^1.1.0"
+ eth-query "^2.0.2"
+ ethereumjs-block "^1.4.1"
+ ethereumjs-tx "^1.1.1"
+ ethereumjs-util "^5.0.1"
+ through2 "^2.0.3"
+ treeify "^1.0.1"
-"@babel/types@^7.0.0":
- version "7.1.3"
- resolved "https://registry.npmjs.org/@babel/types/-/types-7.1.3.tgz#3a767004567060c2f40fca49a304712c525ee37d"
+"@dexon-foundation/ethereumjs-vm@^2.4.3":
+ version "2.4.3"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/ethereumjs-vm/-/ethereumjs-vm-2.4.3.tgz#3d2df5f83184df7ca2b6da3b731011f21ffd4297"
dependencies:
- esutils "^2.0.2"
- lodash "^4.17.10"
- to-fast-properties "^2.0.0"
+ async "^2.1.2"
+ async-eventemitter "^0.2.2"
+ ethereumjs-account "^2.0.3"
+ ethereumjs-block "~1.7.0"
+ ethereumjs-common "~0.4.0"
+ ethereumjs-util "^5.2.0"
+ fake-merkle-patricia-tree "^1.0.1"
+ functional-red-black-tree "^1.0.1"
+ merkle-patricia-tree "^2.1.2"
+ rustbn.js "~0.2.0"
+ safe-buffer "^5.1.1"
-"@emotion/is-prop-valid@^0.6.8":
- version "0.6.8"
- resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.6.8.tgz#68ad02831da41213a2089d2cab4e8ac8b30cbd85"
+"@dexon-foundation/ganache-core@^2.3.2":
+ version "2.3.2"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/ganache-core/-/ganache-core-2.3.2.tgz#f3fe8a067462902d30cb07d4e9c8091b2b09c932"
dependencies:
- "@emotion/memoize" "^0.6.6"
+ "@dexon-foundation/ethereumjs-vm" "^2.4.3"
+ "@dexon-foundation/web3-provider-engine" "^14.1.1"
+ abstract-leveldown "3.0.0"
+ async "2.6.1"
+ bip39 "2.5.0"
+ bn.js "4.11.8"
+ cachedown "1.0.0"
+ clone "2.1.2"
+ debug "3.1.0"
+ encoding-down "5.0.4"
+ eth-sig-util "2.0.2"
+ ethereumjs-abi "0.6.5"
+ ethereumjs-account "2.0.5"
+ ethereumjs-block "2.1.0"
+ ethereumjs-tx "1.3.7"
+ ethereumjs-util "5.2.0"
+ heap "0.2.6"
+ level-sublevel "6.6.4"
+ levelup "3.1.1"
+ lodash "4.17.10"
+ merkle-patricia-tree "2.3.1"
+ rlp "2.1.0"
+ seedrandom "2.4.4"
+ source-map-support "0.5.9"
+ tmp "0.0.33"
+ websocket "1.0.26"
+ optionalDependencies:
+ ethereumjs-wallet "0.6.2"
+ web3 "1.0.0-beta.35"
-"@emotion/is-prop-valid@^0.7.3":
- version "0.7.3"
- resolved "https://registry.npmjs.org/@emotion/is-prop-valid/-/is-prop-valid-0.7.3.tgz#a6bf4fa5387cbba59d44e698a4680f481a8da6cc"
+"@dexon-foundation/web3-provider-engine@^14.1.0", "@dexon-foundation/web3-provider-engine@^14.1.1":
+ version "14.1.1"
+ resolved "https://registry.yarnpkg.com/@dexon-foundation/web3-provider-engine/-/web3-provider-engine-14.1.1.tgz#3c7614a6f569cccc1e01c32e9894ba65583645e1"
dependencies:
- "@emotion/memoize" "0.7.1"
-
-"@emotion/memoize@0.7.1":
- version "0.7.1"
- resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.7.1.tgz#e93c13942592cf5ef01aa8297444dc192beee52f"
-
-"@emotion/memoize@^0.6.6":
- version "0.6.6"
- resolved "https://registry.npmjs.org/@emotion/memoize/-/memoize-0.6.6.tgz#004b98298d04c7ca3b4f50ca2035d4f60d2eed1b"
-
-"@emotion/unitless@^0.7.0":
- version "0.7.2"
- resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.2.tgz#b180097bb44a40c3b59efea9cf28df2fe542d518"
+ "@dexon-foundation/eth-json-rpc-infura" "^3.1.0"
+ "@dexon-foundation/ethereumjs-vm" "^2.4.3"
+ async "^2.5.0"
+ backoff "^2.5.0"
+ clone "^2.0.0"
+ cross-fetch "^2.1.0"
+ eth-block-tracker "^3.0.0"
+ eth-sig-util "^1.4.2"
+ ethereumjs-block "^1.2.2"
+ ethereumjs-tx "^1.2.0"
+ ethereumjs-util "^5.1.5"
+ json-rpc-error "^2.0.0"
+ json-stable-stringify "^1.0.1"
+ promise-to-callback "^1.0.0"
+ readable-stream "^2.2.9"
+ request "^2.85.0"
+ semaphore "^1.0.3"
+ ws "^5.1.1"
+ xhr "^2.2.0"
+ xtend "^4.0.1"
"@ledgerhq/hw-app-eth@^4.3.0":
version "4.7.3"
@@ -676,12 +793,12 @@
semver "^5.5.0"
"@lerna/batch-packages@^3.0.0-beta.18":
- version "3.0.0-beta.18"
- resolved "http://registry.yarnpkg.com/@lerna%2fbatch-packages/-/batch-packages-3.0.0-beta.18.tgz#69d5e3f5003e454a1615c38d9f0b65b10853625a"
+ version "3.10.6"
+ resolved "https://registry.yarnpkg.com/@lerna/batch-packages/-/batch-packages-3.10.6.tgz#2d6dfc9be13ea4da49244dd84bfcd46c3d62f4d0"
dependencies:
- "@lerna/package-graph" "^3.0.0-beta.18"
- "@lerna/validation-error" "^3.0.0-beta.10"
- npmlog "^4.1.2"
+ "@lerna/package-graph" "3.10.6"
+ "@lerna/validation-error" "3.6.0"
+ libnpm "^2.0.1"
"@lerna/batch-packages@^3.1.2":
version "3.1.2"
@@ -1003,11 +1120,12 @@
dependencies:
npmlog "^4.1.2"
-"@lerna/package-graph@^3.0.0-beta.18":
- version "3.0.0-beta.18"
- resolved "http://registry.yarnpkg.com/@lerna%2fpackage-graph/-/package-graph-3.0.0-beta.18.tgz#8c33a6a10453d310e14fc9d317dc51e845e11963"
+"@lerna/package-graph@3.10.6":
+ version "3.10.6"
+ resolved "https://registry.yarnpkg.com/@lerna/package-graph/-/package-graph-3.10.6.tgz#8940d1ed7003100117cb1b618f7690585c00db81"
dependencies:
- npm-package-arg "^6.0.0"
+ "@lerna/validation-error" "3.6.0"
+ libnpm "^2.0.1"
semver "^5.5.0"
"@lerna/package-graph@^3.1.2":
@@ -1147,18 +1265,18 @@
p-map "^1.2.0"
p-map-series "^1.0.0"
+"@lerna/validation-error@3.6.0":
+ version "3.6.0"
+ resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.6.0.tgz#550cf66bb2ef88edc02e36017b575a7a9100d5d8"
+ dependencies:
+ libnpm "^2.0.1"
+
"@lerna/validation-error@^3.0.0":
version "3.0.0"
resolved "https://registry.yarnpkg.com/@lerna/validation-error/-/validation-error-3.0.0.tgz#a27e90051c3ba71995e2a800a43d94ad04b3e3f4"
dependencies:
npmlog "^4.1.2"
-"@lerna/validation-error@^3.0.0-beta.10":
- version "3.0.0-beta.10"
- resolved "http://registry.yarnpkg.com/@lerna%2fvalidation-error/-/validation-error-3.0.0-beta.10.tgz#cf5cbc39c4d27b89c6080e326de745f6fb7451ab"
- dependencies:
- npmlog "^4.1.2"
-
"@lerna/version@^3.4.1":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@lerna/version/-/version-3.4.1.tgz#029448cccd3ccefb4d5f666933bd13cfb37edab0"
@@ -1192,49 +1310,6 @@
npmlog "^4.1.2"
write-file-atomic "^2.3.0"
-"@loopback/dist-util@^0.3.6":
- version "0.3.6"
- resolved "https://registry.npmjs.org/@loopback/dist-util/-/dist-util-0.3.6.tgz#bd1d5887aa0f2bec41722f1d74fc19319d04e975"
-
-"@loopback/openapi-v3-types@^0.8.2":
- version "0.8.3"
- resolved "https://registry.npmjs.org/@loopback/openapi-v3-types/-/openapi-v3-types-0.8.3.tgz#d87948591295fb85057f4a2460283ea6a0e01c8c"
- dependencies:
- "@loopback/dist-util" "^0.3.6"
- openapi3-ts "^0.11.0"
-
-"@material-ui/core@^3.0.1":
- version "3.0.1"
- resolved "https://registry.npmjs.org/@material-ui/core/-/core-3.0.1.tgz#e8476394a42d89ae404355ddbc093db4d044b225"
- dependencies:
- "@babel/runtime" "7.0.0"
- "@types/jss" "^9.5.3"
- "@types/react-transition-group" "^2.0.8"
- brcast "^3.0.1"
- classnames "^2.2.5"
- csstype "^2.5.2"
- debounce "^1.1.0"
- deepmerge "^2.0.1"
- dom-helpers "^3.2.1"
- hoist-non-react-statics "^2.5.0"
- is-plain-object "^2.0.4"
- jss "^9.3.3"
- jss-camel-case "^6.0.0"
- jss-default-unit "^8.0.2"
- jss-global "^3.0.0"
- jss-nested "^6.0.1"
- jss-props-sort "^6.0.0"
- jss-vendor-prefixer "^7.0.0"
- keycode "^2.1.9"
- normalize-scroll-left "^0.1.2"
- popper.js "^1.14.1"
- prop-types "^15.6.0"
- react-event-listener "^0.6.2"
- react-jss "^8.1.0"
- react-transition-group "^2.2.1"
- recompose "^0.29.0"
- warning "^4.0.1"
-
"@mrmlnc/readdir-enhanced@^2.2.1":
version "2.2.1"
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
@@ -1242,99 +1317,24 @@
call-me-maybe "^1.0.1"
glob-to-regexp "^0.3.0"
-"@reach/component-component@^0.1.1":
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/@reach/component-component/-/component-component-0.1.1.tgz#62ea2ec290da32f5e3a9872fb51f9a3ae4370cc4"
-
-"@reach/dialog@^0.1.2":
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/@reach/dialog/-/dialog-0.1.2.tgz#46a3639c01928e125110fd5ccb753281172e844d"
- dependencies:
- "@reach/component-component" "^0.1.1"
- "@reach/portal" "^0.1.1"
- "@reach/utils" "^0.1.2"
- focus-trap "^3.0.0"
-
-"@reach/portal@^0.1.1":
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/@reach/portal/-/portal-0.1.1.tgz#94f3f9b999c5a0dfb819309912ec23e36807e70b"
- dependencies:
- "@reach/component-component" "^0.1.1"
-
-"@reach/utils@^0.1.2":
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/@reach/utils/-/utils-0.1.2.tgz#72f547b5c9b0401a56de303d9e508abf6d3fa56a"
-
-"@samverschueren/stream-to-observable@^0.3.0":
- version "0.3.0"
- resolved "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz#ecdf48d532c58ea477acfcab80348424f8d0662f"
- dependencies:
- any-observable "^0.3.0"
-
"@sinonjs/formatio@^2.0.0":
version "2.0.0"
resolved "http://registry.npmjs.org/@sinonjs/formatio/-/formatio-2.0.0.tgz#84db7e9eb5531df18a8c5e0bfb6e449e55e654b2"
dependencies:
samsam "1.3.0"
-"@static/discharge@https://github.com/0xProject/discharge.git":
- version "1.2.2"
- resolved "https://github.com/0xProject/discharge.git#3aed990822cabbb79b71b52700fdef08cd9eb400"
- dependencies:
- aws-sdk "^2.347.0"
- execa "^1.0.0"
- glob "^7.1.3"
- inquirer "^6.2.0"
- listr "^0.14.2"
- lodash.differenceby "^4.8.0"
- lodash.intersectionby "^4.7.0"
- lodash.intersectionwith "^4.4.0"
- log-symbols "^2.2.0"
- meow "^5.0.0"
- mime "^2.3.1"
- update-notifier "^2.5.0"
-
-"@types/accounting@^0.4.1":
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/@types/accounting/-/accounting-0.4.1.tgz#865d9f5694fd7c438fba34eb4bc82eec6f34cdd5"
-
-"@types/axios@^0.14.0":
- version "0.14.0"
- resolved "https://registry.yarnpkg.com/@types/axios/-/axios-0.14.0.tgz#ec2300fbe7d7dddd7eb9d3abf87999964cafce46"
- dependencies:
- axios "*"
-
-"@types/bintrees@^1.0.2":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/@types/bintrees/-/bintrees-1.0.2.tgz#0dfdce4eeebdf90427bd35b0e79dc248b3d157a6"
-
"@types/bip39@^2.4.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/@types/bip39/-/bip39-2.4.0.tgz#eee31a14abc8ebbb41a1ff14575c447b18346cbc"
dependencies:
"@types/node" "*"
-"@types/blockies@^0.0.0":
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/@types/blockies/-/blockies-0.0.0.tgz#e1dea77f138ee718bebbeb5b59d5d02139983617"
-
"@types/bn.js@^4.11.0":
version "4.11.0"
resolved "https://registry.yarnpkg.com/@types/bn.js/-/bn.js-4.11.0.tgz#401cb20874f0a7b8414e46308a99c449759b7de9"
dependencies:
"@types/node" "*"
-"@types/body-parser@*", "@types/body-parser@^1.16.1":
- version "1.16.8"
- resolved "https://registry.yarnpkg.com/@types/body-parser/-/body-parser-1.16.8.tgz#687ec34140624a3bec2b1a8ea9268478ae8f3be3"
- dependencies:
- "@types/express" "*"
- "@types/node" "*"
-
-"@types/cheerio@*":
- version "0.22.9"
- resolved "https://registry.npmjs.org/@types/cheerio/-/cheerio-0.22.9.tgz#b5990152604c2ada749b7f88cab3476f21f39d7b"
-
"@types/chokidar@^1.7.5":
version "1.7.5"
resolved "https://registry.yarnpkg.com/@types/chokidar/-/chokidar-1.7.5.tgz#1fa78c8803e035bed6d98e6949e514b133b0c9b6"
@@ -1342,41 +1342,10 @@
"@types/events" "*"
"@types/node" "*"
-"@types/compare-versions@^3.0.0":
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/@types/compare-versions/-/compare-versions-3.0.0.tgz#4a45dffe0ebbc00d0f2daef8a0e96ffc66cf5955"
-
-"@types/deep-equal@^1.0.0":
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/@types/deep-equal/-/deep-equal-1.0.1.tgz#71cfabb247c22bcc16d536111f50c0ed12476b03"
-
"@types/depcheck@^0.6.0":
version "0.6.0"
resolved "https://registry.yarnpkg.com/@types/depcheck/-/depcheck-0.6.0.tgz#13c8654983feb0916f45c40b2d9fafe0c8b0e4a8"
-"@types/detect-node@2.0.0":
- version "2.0.0"
- resolved "https://registry.npmjs.org/@types/detect-node/-/detect-node-2.0.0.tgz#696e024ddd105c72bbc6a2e3f97902a2886f2c3f"
-
-"@types/dockerode@^2.5.9":
- version "2.5.10"
- resolved "https://registry.yarnpkg.com/@types/dockerode/-/dockerode-2.5.10.tgz#837379703c8140fdb704460b6cfee4621a5412a3"
- dependencies:
- "@types/node" "*"
-
-"@types/enzyme-adapter-react-16@^1.0.3":
- version "1.0.3"
- resolved "https://registry.npmjs.org/@types/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.0.3.tgz#0cf7025b036694ca8d596fe38f24162e7117acf1"
- dependencies:
- "@types/enzyme" "*"
-
-"@types/enzyme@*", "@types/enzyme@^3.1.14":
- version "3.1.14"
- resolved "https://registry.npmjs.org/@types/enzyme/-/enzyme-3.1.14.tgz#379c26205f6e0e272f3a51d6bbdd50071a9d03a6"
- dependencies:
- "@types/cheerio" "*"
- "@types/react" "*"
-
"@types/eth-lightwallet@^3.0.0":
version "3.0.0"
resolved "https://registry.npmjs.org/@types/eth-lightwallet/-/eth-lightwallet-3.0.0.tgz#9be5b59dc6fb3fcdb01e65c2c2a79cd601f72dd4"
@@ -1389,12 +1358,6 @@
dependencies:
bignumber.js "7.2.1"
-"@types/ethereumjs-abi@^0.6.0":
- version "0.6.0"
- resolved "https://registry.yarnpkg.com/@types/ethereumjs-abi/-/ethereumjs-abi-0.6.0.tgz#72d21083a36d9288821b62905e04b15e0c12175d"
- dependencies:
- "@types/node" "*"
-
"@types/ethereumjs-tx@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@types/ethereumjs-tx/-/ethereumjs-tx-1.0.0.tgz#ae2ce90a145cc1a6849656db38baf0e793ff7927"
@@ -1405,42 +1368,19 @@
version "1.2.0"
resolved "https://registry.yarnpkg.com/@types/events/-/events-1.2.0.tgz#81a6731ce4df43619e5c8c945383b3e62a89ea86"
-"@types/express-serve-static-core@*":
- version "4.11.1"
- resolved "https://registry.yarnpkg.com/@types/express-serve-static-core/-/express-serve-static-core-4.11.1.tgz#f6f7212382d59b19d696677bcaa48a37280f5d45"
- dependencies:
- "@types/events" "*"
- "@types/node" "*"
-
-"@types/express@*", "@types/express@^4.0.35":
- version "4.11.1"
- resolved "https://registry.yarnpkg.com/@types/express/-/express-4.11.1.tgz#f99663b3ab32d04cb11db612ef5dd7933f75465b"
- dependencies:
- "@types/body-parser" "*"
- "@types/express-serve-static-core" "*"
- "@types/serve-static" "*"
-
-"@types/fetch-mock@^6.0.3":
- version "6.0.3"
- resolved "https://registry.yarnpkg.com/@types/fetch-mock/-/fetch-mock-6.0.3.tgz#54ba90776293e728089bf53ba53e3c69f1c80655"
-
-"@types/find-versions@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@types/find-versions/-/find-versions-2.0.0.tgz#a976ca032ab8dd1161116604eded0620d2b85df2"
-
"@types/fs-extra@^5.0.3":
version "5.0.4"
resolved "https://registry.yarnpkg.com/@types/fs-extra/-/fs-extra-5.0.4.tgz#b971134d162cc0497d221adde3dbb67502225599"
dependencies:
"@types/node" "*"
-"@types/ganache-core@^2.1.2":
+"@types/ganache-core@^2.1.0", "@types/ganache-core@^2.1.2":
version "2.1.2"
resolved "https://registry.yarnpkg.com/@types/ganache-core/-/ganache-core-2.1.2.tgz#e4db6ce901da03be4d2a66de34e06b1f9b90c5e8"
dependencies:
"@types/ethereum-protocol" "*"
-"@types/glob@*", "@types/glob@5.0.35", "@types/glob@^5.0.33":
+"@types/glob@*":
version "5.0.35"
resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.35.tgz#1ae151c802cece940443b5ac246925c85189f32a"
dependencies:
@@ -1448,9 +1388,13 @@
"@types/minimatch" "*"
"@types/node" "*"
-"@types/handlebars@^4.0.36":
- version "4.0.37"
- resolved "https://registry.yarnpkg.com/@types/handlebars/-/handlebars-4.0.37.tgz#a3bc3eba0c0f03f753cac00841a5b21e26a02c03"
+"@types/glob@^5.0.33":
+ version "5.0.36"
+ resolved "https://registry.yarnpkg.com/@types/glob/-/glob-5.0.36.tgz#0c80a9c8664fc7d19781de229f287077fd622cb2"
+ dependencies:
+ "@types/events" "*"
+ "@types/minimatch" "*"
+ "@types/node" "*"
"@types/handlebars@^4.0.38":
version "4.0.39"
@@ -1466,60 +1410,15 @@
version "9.12.3"
resolved "https://registry.yarnpkg.com/@types/highlight.js/-/highlight.js-9.12.3.tgz#b672cfaac25cbbc634a0fd92c515f66faa18dbca"
-"@types/history@*":
- version "4.6.2"
- resolved "https://registry.yarnpkg.com/@types/history/-/history-4.6.2.tgz#12cfaba693ba20f114ed5765467ff25fdf67ddb0"
-
-"@types/is-mobile@0.3.0":
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/@types/is-mobile/-/is-mobile-0.3.0.tgz#821825eeddb9016c41dd11c0dd6d2db8621432fc"
-
"@types/istanbul@^0.4.30":
version "0.4.30"
resolved "https://registry.yarnpkg.com/@types/istanbul/-/istanbul-0.4.30.tgz#073159320ab3296b2cfeb481f756a1f8f4c9c8e4"
-"@types/jest@^23.3.5":
- version "23.3.5"
- resolved "https://registry.npmjs.org/@types/jest/-/jest-23.3.5.tgz#870a1434208b60603745bfd214fc3fc675142364"
-
-"@types/js-combinatorics@^0.5.29":
- version "0.5.29"
- resolved "https://registry.yarnpkg.com/@types/js-combinatorics/-/js-combinatorics-0.5.29.tgz#47a7819a0b6925b6dc4bd2c2278a7e6329b29387"
-
-"@types/jsonschema@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@types/jsonschema/-/jsonschema-1.1.1.tgz#08703dfe074010e8e829123111594af731f57b1a"
- dependencies:
- jsonschema "*"
-
-"@types/jss@^9.5.3":
- version "9.5.4"
- resolved "https://registry.npmjs.org/@types/jss/-/jss-9.5.4.tgz#89a4ee32a14a8d2937187b1a7f443750e964a74d"
- dependencies:
- csstype "^2.0.0"
- indefinite-observable "^1.0.1"
-
-"@types/lodash.foreach@^4.5.3":
- version "4.5.3"
- resolved "https://registry.yarnpkg.com/@types/lodash.foreach/-/lodash.foreach-4.5.3.tgz#87c01a0c5d9d17eec936ca3c28897af79440cdfc"
- dependencies:
- "@types/lodash" "*"
-
-"@types/lodash.values@^4.3.3":
- version "4.3.3"
- resolved "https://registry.yarnpkg.com/@types/lodash.values/-/lodash.values-4.3.3.tgz#910edc65b391782d65dc4b4d8804a0dabc5370e6"
- dependencies:
- "@types/lodash" "*"
-
-"@types/lodash@*":
- version "4.14.107"
- resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.107.tgz#b2d2ae3958bfb8ff828495cbe12214af9e4d035e"
-
"@types/lodash@4.14.104":
version "4.14.104"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.104.tgz#53ee2357fa2e6e68379341d92eb2ecea4b11bb80"
-"@types/lodash@^4.14.110", "@types/lodash@^4.14.116":
+"@types/lodash@^4.14.110":
version "4.14.116"
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.116.tgz#5ccf215653e3e8c786a58390751033a9adca0eb9"
@@ -1531,24 +1430,6 @@
version "0.4.0"
resolved "https://registry.yarnpkg.com/@types/marked/-/marked-0.4.0.tgz#057a6165703e7419217f8ffc6887747f980b6315"
-"@types/material-ui@0.18.0":
- version "0.18.0"
- resolved "https://registry.yarnpkg.com/@types/material-ui/-/material-ui-0.18.0.tgz#f3abc5431df8faa4592233c6c5377f2843eb807f"
- dependencies:
- "@types/react" "*"
- "@types/react-addons-linked-state-mixin" "*"
-
-"@types/material-ui@^0.20.0":
- version "0.20.8"
- resolved "https://registry.npmjs.org/@types/material-ui/-/material-ui-0.20.8.tgz#76e46f9accc48944f532c3b1038a2b46214454fa"
- dependencies:
- "@types/react" "*"
- "@types/react-addons-linked-state-mixin" "*"
-
-"@types/mime@*":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b"
-
"@types/minimatch@*", "@types/minimatch@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d"
@@ -1563,10 +1444,6 @@
version "2.2.48"
resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-2.2.48.tgz#3523b126a0b049482e1c3c11877460f76622ffab"
-"@types/mocha@^5.2.2":
- version "5.2.3"
- resolved "https://registry.yarnpkg.com/@types/mocha/-/mocha-5.2.3.tgz#11f3a5629d67cd444fa6c94536576244e6a52ea9"
-
"@types/node@*":
version "9.6.5"
resolved "https://registry.yarnpkg.com/@types/node/-/node-9.6.5.tgz#ee700810fdf49ac1c399fc5980b7559b3e5a381d"
@@ -1575,24 +1452,12 @@
version "10.9.4"
resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897"
-"@types/node@^10.5.3":
- version "10.5.7"
- resolved "https://registry.npmjs.org/@types/node/-/node-10.5.7.tgz#960d9feb3ade2233bcc9843c918d740b4f78a7cf"
-
-"@types/numeral@^0.0.22":
- version "0.0.22"
- resolved "https://registry.yarnpkg.com/@types/numeral/-/numeral-0.0.22.tgz#86bef1f0a2d743afdc2ef3168d45f2905e1a0b93"
-
"@types/opn@^5.1.0":
version "5.1.0"
resolved "https://registry.yarnpkg.com/@types/opn/-/opn-5.1.0.tgz#bff7bc371677f4bdbb37884400e03fd81f743927"
dependencies:
"@types/node" "*"
-"@types/p-limit@^2.0.0":
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/@types/p-limit/-/p-limit-2.0.0.tgz#c076b7daa9163108a35899ea6a9d927526943ea2"
-
"@types/pluralize@^0.0.29":
version "0.0.29"
resolved "https://registry.yarnpkg.com/@types/pluralize/-/pluralize-0.0.29.tgz#6ffa33ed1fc8813c469b859681d09707eb40d03c"
@@ -1603,176 +1468,13 @@
dependencies:
"@types/react" "*"
-"@types/query-string@^5.0.1", "@types/query-string@^5.1.0":
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/@types/query-string/-/query-string-5.1.0.tgz#7f40cdea49ddafa0ea4f3db35fb6c24d3bfd4dcc"
-
-"@types/ramda@^0.25.38":
- version "0.25.46"
- resolved "https://registry.yarnpkg.com/@types/ramda/-/ramda-0.25.46.tgz#8399a35eb117f4a821deb9c4cfecc9b276fb7daf"
-
-"@types/rc-slider@^8.6.0":
- version "8.6.0"
- resolved "https://registry.yarnpkg.com/@types/rc-slider/-/rc-slider-8.6.0.tgz#7f061a920b067825c8455cf481c57b0927889c72"
- dependencies:
- "@types/rc-tooltip" "*"
- "@types/react" "*"
-
-"@types/rc-tooltip@*":
- version "3.7.0"
- resolved "https://registry.yarnpkg.com/@types/rc-tooltip/-/rc-tooltip-3.7.0.tgz#6dc9898dc426495baea1b786e5dbde8980bf9737"
- dependencies:
- "@types/react" "*"
-
-"@types/react-addons-linked-state-mixin@*":
- version "0.14.19"
- resolved "https://registry.yarnpkg.com/@types/react-addons-linked-state-mixin/-/react-addons-linked-state-mixin-0.14.19.tgz#7ef00a5618a089da4a99e1f58c9aa4c1781d46d5"
- dependencies:
- "@types/react" "*"
-
-"@types/react-copy-to-clipboard@^4.2.0":
- version "4.2.5"
- resolved "https://registry.yarnpkg.com/@types/react-copy-to-clipboard/-/react-copy-to-clipboard-4.2.5.tgz#bda288b4256288676019b75ca86f1714bbd206d4"
- dependencies:
- "@types/react" "*"
-
-"@types/react-dom@*":
- version "16.0.6"
- resolved "https://registry.yarnpkg.com/@types/react-dom/-/react-dom-16.0.6.tgz#f1a65a4e7be8ed5d123f8b3b9eacc913e35a1a3c"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
-
-"@types/react-dom@^16.0.7":
- version "16.0.7"
- resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.0.7.tgz#54d0f867a76b90597e8432030d297982f25c20ba"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
-
-"@types/react-dom@^16.0.8":
- version "16.0.8"
- resolved "https://registry.npmjs.org/@types/react-dom/-/react-dom-16.0.8.tgz#6e1366ed629cadf55860cbfcc25db533f5d2fa7d"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
-
-"@types/react-helmet@^5.0.6":
- version "5.0.6"
- resolved "https://registry.yarnpkg.com/@types/react-helmet/-/react-helmet-5.0.6.tgz#49607cbb72e1bb7dcefa9174cb591434d3b6f0af"
- dependencies:
- "@types/react" "*"
-
-"@types/react-lazyload@^2.3.1":
- version "2.3.1"
- resolved "https://registry.yarnpkg.com/@types/react-lazyload/-/react-lazyload-2.3.1.tgz#6a1814432f668081ff693abfa8e09bff09aa3649"
- dependencies:
- "@types/react" "*"
-
-"@types/react-loadable@^5.4.1":
- version "5.4.1"
- resolved "https://registry.yarnpkg.com/@types/react-loadable/-/react-loadable-5.4.1.tgz#bc76978c6d9039e5808797b5ee35f6ae18b7329f"
- dependencies:
- "@types/react" "*"
- "@types/webpack" "*"
-
-"@types/react-loadable@^5.4.2":
- version "5.4.3"
- resolved "https://registry.yarnpkg.com/@types/react-loadable/-/react-loadable-5.4.3.tgz#b3891da6609a869b021319494b27ba85aaa83634"
- dependencies:
- "@types/react" "*"
- "@types/webpack" "*"
-
-"@types/react-lottie@^1.2.0":
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/@types/react-lottie/-/react-lottie-1.2.0.tgz#87eccca2580a18c95a3fbb9f421c85debafb95e4"
- dependencies:
- "@types/react" "*"
-
-"@types/react-redux@^4.4.37":
- version "4.4.47"
- resolved "https://registry.yarnpkg.com/@types/react-redux/-/react-redux-4.4.47.tgz#12af1677116e08d413fe2620d0a85560c8a0536e"
- dependencies:
- "@types/react" "*"
- redux "^3.6.0"
-
-"@types/react-redux@^6.0.9":
- version "6.0.9"
- resolved "https://registry.npmjs.org/@types/react-redux/-/react-redux-6.0.9.tgz#96aa7f5b0716bcc3bfb36ceaa1223118d509f79a"
- dependencies:
- "@types/react" "*"
- redux "^4.0.0"
-
-"@types/react-router-dom@^4.0.4":
- version "4.2.6"
- resolved "https://registry.yarnpkg.com/@types/react-router-dom/-/react-router-dom-4.2.6.tgz#9f7eb3c0e6661a9607d878ff8675cc4ea95cd276"
- dependencies:
- "@types/history" "*"
- "@types/react" "*"
- "@types/react-router" "*"
-
-"@types/react-router@*":
- version "4.0.23"
- resolved "https://registry.yarnpkg.com/@types/react-router/-/react-router-4.0.23.tgz#d0509dcbdb1c686aed8f3d5cb186f42e5fbe7c2a"
- dependencies:
- "@types/history" "*"
- "@types/react" "*"
-
-"@types/react-scroll@1.5.3":
- version "1.5.3"
- resolved "https://registry.yarnpkg.com/@types/react-scroll/-/react-scroll-1.5.3.tgz#cc4e94db3d7d5b1cd244bfee24091c335d3e2598"
- dependencies:
- "@types/react" "*"
-
-"@types/react-syntax-highlighter@^0.0.8":
- version "0.0.8"
- resolved "https://registry.yarnpkg.com/@types/react-syntax-highlighter/-/react-syntax-highlighter-0.0.8.tgz#ed44e2ead992c513327bcf2ede5eda7daa981421"
- dependencies:
- "@types/react" "*"
-
-"@types/react-tabs@^2.3.0":
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/@types/react-tabs/-/react-tabs-2.3.0.tgz#6afdf6e85c3a68ffe33824c65fee641982ef2b48"
- dependencies:
- "@types/react" "*"
-
-"@types/react-tap-event-plugin@0.0.30":
- version "0.0.30"
- resolved "https://registry.yarnpkg.com/@types/react-tap-event-plugin/-/react-tap-event-plugin-0.0.30.tgz#123f35080412f489b6770c5a65c159ff96654cb5"
-
-"@types/react-transition-group@^2.0.8":
- version "2.0.13"
- resolved "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-2.0.13.tgz#7769fb61eb71d64d087a713956f086a42c3ee171"
- dependencies:
- "@types/react" "*"
-
-"@types/react@*", "@types/react@^16.4.16":
+"@types/react@*":
version "16.4.16"
resolved "https://registry.npmjs.org/@types/react/-/react-16.4.16.tgz#99f91b1200ae8c2062030402006d3b3c3a177043"
dependencies:
"@types/prop-types" "*"
csstype "^2.2.0"
-"@types/react@^16.4.2":
- version "16.4.11"
- resolved "https://registry.npmjs.org/@types/react/-/react-16.4.11.tgz#330f3d864300f71150dc2d125e48644c098f8770"
- dependencies:
- "@types/prop-types" "*"
- csstype "^2.2.0"
-
-"@types/react@^16.7.7":
- version "16.7.18"
- resolved "https://registry.yarnpkg.com/@types/react/-/react-16.7.18.tgz#f4ce0d539a893dd61e36cd11ae3a5e54f5a48337"
- dependencies:
- "@types/prop-types" "*"
- csstype "^2.2.0"
-
-"@types/redux@^3.6.0":
- version "3.6.0"
- resolved "https://registry.yarnpkg.com/@types/redux/-/redux-3.6.0.tgz#f1ebe1e5411518072e4fdfca5c76e16e74c1399a"
- dependencies:
- redux "*"
-
"@types/require-from-string@^1.2.0":
version "1.2.0"
resolved "https://registry.yarnpkg.com/@types/require-from-string/-/require-from-string-1.2.0.tgz#c18cfc8a2c1a0259e5841d1fef2b5e9d01c64242"
@@ -1788,13 +1490,6 @@
version "5.5.0"
resolved "https://registry.yarnpkg.com/@types/semver/-/semver-5.5.0.tgz#146c2a29ee7d3bae4bf2fcb274636e264c813c45"
-"@types/serve-static@*":
- version "1.13.1"
- resolved "https://registry.yarnpkg.com/@types/serve-static/-/serve-static-1.13.1.tgz#1d2801fa635d274cd97d4ec07e26b21b44127492"
- dependencies:
- "@types/express-serve-static-core" "*"
- "@types/mime" "*"
-
"@types/shelljs@^0.8.0":
version "0.8.0"
resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.0.tgz#0caa56b68baae4f68f44e0dd666ab30b098e3632"
@@ -1806,82 +1501,16 @@
version "2.3.7"
resolved "https://registry.yarnpkg.com/@types/sinon/-/sinon-2.3.7.tgz#e92c2fed3297eae078d78d1da032b26788b4af86"
-"@types/sleep@^0.0.7":
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/@types/sleep/-/sleep-0.0.7.tgz#0572b5d06978b4305671c614b0f68b4640ce7d43"
-
"@types/solidity-parser-antlr@^0.2.0":
version "0.2.1"
resolved "https://registry.npmjs.org/@types/solidity-parser-antlr/-/solidity-parser-antlr-0.2.1.tgz#29ff386773a72a06c8a9c40c666d2a1cea53c2ed"
-"@types/styled-components@4.0.0":
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.0.0.tgz#33b47071885003878a62689e0883aa2fc59f970a"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
-
-"@types/styled-components@4.0.1":
- version "4.0.1"
- resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.0.1.tgz#5eb9a5474dbde3becab2bcc8f04e0b8e8dcf8c06"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
-
-"@types/styled-components@4.1.1":
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/@types/styled-components/-/styled-components-4.1.1.tgz#1a9f8ebff7ee5cbc9ddc08b486e55e5a152bb408"
- dependencies:
- "@types/node" "*"
- "@types/react" "*"
- csstype "^2.2.0"
-
-"@types/tapable@*":
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/@types/tapable/-/tapable-1.0.4.tgz#b4ffc7dc97b498c969b360a41eee247f82616370"
-
-"@types/tmp@^0.0.33":
- version "0.0.33"
- resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.0.33.tgz#1073c4bc824754ae3d10cfab88ab0237ba964e4d"
-
-"@types/uglify-js@*":
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.0.4.tgz#96beae23df6f561862a830b4288a49e86baac082"
- dependencies:
- source-map "^0.6.1"
-
-"@types/uuid@^3.4.2", "@types/uuid@^3.4.3":
- version "3.4.3"
- resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.3.tgz#121ace265f5569ce40f4f6d0ff78a338c732a754"
- dependencies:
- "@types/node" "*"
-
-"@types/valid-url@^1.0.2":
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/@types/valid-url/-/valid-url-1.0.2.tgz#60fa435ce24bfd5ba107b8d2a80796aeaf3a8f45"
-
"@types/web3-provider-engine@^14.0.0":
version "14.0.0"
resolved "https://registry.npmjs.org/@types/web3-provider-engine/-/web3-provider-engine-14.0.0.tgz#43adc3b39dc9812b82aef8cd2d66577665ad59b0"
dependencies:
"@types/ethereum-protocol" "*"
-"@types/webpack@*":
- version "4.4.17"
- resolved "https://registry.yarnpkg.com/@types/webpack/-/webpack-4.4.17.tgz#3da3e0823a051311ba510bdc32354888921fc8b4"
- dependencies:
- "@types/node" "*"
- "@types/tapable" "*"
- "@types/uglify-js" "*"
- source-map "^0.6.0"
-
-"@types/websocket@^0.0.39":
- version "0.0.39"
- resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-0.0.39.tgz#aa971e24f9c1455fe2a57ee3e69c7d395016b12a"
- dependencies:
- "@types/events" "*"
- "@types/node" "*"
-
"@types/yargs@^10.0.0":
version "10.0.2"
resolved "https://registry.yarnpkg.com/@types/yargs/-/yargs-10.0.2.tgz#cc4ea921877874d1261e2c44b89807bc836e1b12"
@@ -2023,13 +1652,6 @@
version "4.2.1"
resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.1.tgz#5c85d662f76fa1d34575766c5dcd6615abcd30d8"
-JSONStream@1.3.2:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.2.tgz#c102371b6ec3a7cf3b847ca00c20bb0fce4c6dea"
- dependencies:
- jsonparse "^1.2.0"
- through ">=2.2.7 <3"
-
JSONStream@^1.0.4:
version "1.3.3"
resolved "http://registry.yarnpkg.com/JSONStream/-/JSONStream-1.3.3.tgz#27b4b8fbbfeab4e71bcf551e7f27be8d952239bf"
@@ -2044,10 +1666,6 @@ JSONStream@^1.3.4:
jsonparse "^1.2.0"
through ">=2.2.7 <3"
-abab@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/abab/-/abab-2.0.0.tgz#aba0ab4c5eee2d4c79d3487d85450fb2376ebb0f"
-
abbrev@1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/abbrev/-/abbrev-1.1.1.tgz#f8f2c887ad10bf67f634f005b6987fed3179aac8"
@@ -2084,60 +1702,27 @@ abstract-leveldown@~2.6.0:
dependencies:
xtend "~4.0.0"
-accepts@~1.3.4, accepts@~1.3.5:
+accepts@~1.3.5:
version "1.3.5"
resolved "https://registry.yarnpkg.com/accepts/-/accepts-1.3.5.tgz#eb777df6011723a3b14e8a72c0805c8e86746bd2"
dependencies:
mime-types "~2.1.18"
negotiator "0.6.1"
-accounting@^0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/accounting/-/accounting-0.4.1.tgz#87dd4103eff7f4460f1e186f5c677ed6cf566883"
-
acorn-dynamic-import@^3.0.0:
version "3.0.0"
resolved "https://registry.npmjs.org/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278"
dependencies:
acorn "^5.0.0"
-acorn-globals@^4.1.0:
- version "4.3.0"
- resolved "https://registry.npmjs.org/acorn-globals/-/acorn-globals-4.3.0.tgz#e3b6f8da3c1552a95ae627571f7dd6923bb54103"
- dependencies:
- acorn "^6.0.1"
- acorn-walk "^6.0.1"
-
-acorn-jsx@^5.0.0:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e"
-
-acorn-walk@^6.0.1:
- version "6.1.0"
- resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-6.1.0.tgz#c957f4a1460da46af4a0388ce28b4c99355b0cbc"
-
acorn@^5.0.0:
version "5.5.3"
resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.5.3.tgz#f473dd47e0277a08e28e9bec5aeeb04751f0b8c9"
-acorn@^5.5.3, acorn@^5.6.2, acorn@^5.7.3:
+acorn@^5.6.2:
version "5.7.3"
resolved "https://registry.npmjs.org/acorn/-/acorn-5.7.3.tgz#67aa231bf8812974b85235a96771eb6bd07ea279"
-acorn@^6.0.1:
- version "6.0.2"
- resolved "https://registry.npmjs.org/acorn/-/acorn-6.0.2.tgz#6a459041c320ab17592c6317abbfdf4bbaa98ca4"
-
-acorn@^6.0.2:
- version "6.0.5"
- resolved "https://registry.yarnpkg.com/acorn/-/acorn-6.0.5.tgz#81730c0815f3f3b34d8efa95cb7430965f4d887a"
-
-add-dom-event-listener@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.1.0.tgz#6a92db3a0dd0abc254e095c0f1dc14acbbaae310"
- dependencies:
- object-assign "4.x"
-
aes-js@3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/aes-js/-/aes-js-3.0.0.tgz#e21df10ad6c2053295bcbb8dab40b09dbea87e4d"
@@ -2158,10 +1743,6 @@ agentkeepalive@^3.4.1:
dependencies:
humanize-ms "^1.2.1"
-ajv-errors@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.0.tgz#ecf021fa108fd17dfb5e6b383f2dd233e31ffc59"
-
ajv-keywords@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.1.0.tgz#ac2b27939c543e95d2c06e7f7f5c27be4aa543be"
@@ -2191,15 +1772,6 @@ ajv@^6.1.0:
json-schema-traverse "^0.3.0"
uri-js "^3.0.2"
-ajv@^6.5.3, ajv@^6.6.1:
- version "6.6.2"
- resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.6.2.tgz#caceccf474bf3fc3ce3b147443711a24063cc30d"
- dependencies:
- fast-deep-equal "^2.0.1"
- fast-json-stable-stringify "^2.0.0"
- json-schema-traverse "^0.4.1"
- uri-js "^4.2.2"
-
align-text@^0.1.1, align-text@^0.1.3:
version "0.1.4"
resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117"
@@ -2208,42 +1780,14 @@ align-text@^0.1.1, align-text@^0.1.3:
longest "^1.0.1"
repeat-string "^1.5.2"
-alphanum-sort@^1.0.1, alphanum-sort@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"
-
amdefine@>=0.0.4:
version "1.0.1"
resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5"
-ansi-align@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/ansi-align/-/ansi-align-2.0.0.tgz#c36aeccba563b89ceb556f3690f0b1d9e3547f7f"
- dependencies:
- string-width "^2.0.0"
-
-ansi-colors@^3.0.0:
- version "3.1.0"
- resolved "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.1.0.tgz#dcfaacc90ef9187de413ec3ef8d5eb981a98808f"
-
-ansi-escapes@^1.0.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
-
ansi-escapes@^3.0.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.1.0.tgz#f73207bb81207d75fd6c83f125af26eea378ca30"
-ansi-gray@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/ansi-gray/-/ansi-gray-0.1.1.tgz#2962cf54ec9792c48510a3deb524436861ef7251"
- dependencies:
- ansi-wrap "0.1.0"
-
-ansi-html@0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
-
ansi-regex@^1.0.0, ansi-regex@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-1.1.1.tgz#41c847194646375e6a1a5d10c3ca054ef9fc980d"
@@ -2256,10 +1800,6 @@ ansi-regex@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998"
-ansi-regex@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.0.0.tgz#70de791edf021404c3fd615aa89118ae0432e5a9"
-
ansi-styles@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe"
@@ -2270,33 +1810,14 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1:
dependencies:
color-convert "^1.9.0"
-ansi-wrap@0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf"
-
ansi@^0.3.0, ansi@~0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/ansi/-/ansi-0.3.1.tgz#0c42d4fb17160d5a9af1e484bace1c66922c1b21"
-antlr4@4.7.1:
- version "4.7.1"
- resolved "https://registry.yarnpkg.com/antlr4/-/antlr4-4.7.1.tgz#69984014f096e9e775f53dd9744bf994d8959773"
-
-any-observable@^0.3.0:
- version "0.3.0"
- resolved "https://registry.npmjs.org/any-observable/-/any-observable-0.3.0.tgz#af933475e5806a67d0d7df090dd5e8bef65d119b"
-
any-promise@1.3.0, any-promise@^1.0.0, any-promise@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/any-promise/-/any-promise-1.3.0.tgz#abc6afeedcea52e809cdc0376aed3ce39635d17f"
-anymatch@^1.1.0, anymatch@^1.3.0:
- version "1.3.2"
- resolved "https://registry.npmjs.org/anymatch/-/anymatch-1.3.2.tgz#553dcb8f91e3c889845dfdba34c77721b90b9d7a"
- dependencies:
- micromatch "^2.1.5"
- normalize-path "^2.0.0"
-
anymatch@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb"
@@ -2304,10 +1825,6 @@ anymatch@^2.0.0:
micromatch "^3.1.4"
normalize-path "^2.1.1"
-app-root-path@^2.0.1:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/app-root-path/-/app-root-path-2.1.0.tgz#98bf6599327ecea199309866e8140368fd2e646a"
-
append-buffer@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/append-buffer/-/append-buffer-1.0.2.tgz#d8220cf466081525efea50614f3de6514dfa58f1"
@@ -2320,11 +1837,11 @@ append-transform@^0.4.0:
dependencies:
default-require-extensions "^1.0.0"
-aproba@^1.0.3, aproba@^1.1.1:
+aproba@^1.0.3, aproba@^1.1.1, aproba@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a"
-aproba@^2.0.0:
+"aproba@^1.1.2 || 2", aproba@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/aproba/-/aproba-2.0.0.tgz#52520b8ae5b569215b354efc0caa3fe1e45a8adc"
@@ -2367,14 +1884,6 @@ array-differ@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-1.0.0.tgz#eff52e3758249d33be402b8bb8e564bb2b5d4031"
-array-each@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/array-each/-/array-each-1.0.1.tgz#a794af0c05ab1752846ee753a1f211a05ba0c44f"
-
-array-equal@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/array-equal/-/array-equal-1.0.0.tgz#8c2a5ef2472fd9ea742b04c77a75093ba2757c93"
-
array-filter@~0.0.0:
version "0.0.1"
resolved "https://registry.yarnpkg.com/array-filter/-/array-filter-0.0.1.tgz#7da8cf2e26628ed732803581fd21f67cacd2eeec"
@@ -2387,10 +1896,6 @@ array-flatten@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2"
-array-flatten@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-2.1.1.tgz#426bb9da84090c1838d812c8150af20a8331e296"
-
array-ify@^1.0.0:
version "1.0.0"
resolved "http://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece"
@@ -2403,17 +1908,13 @@ array-reduce@~0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/array-reduce/-/array-reduce-0.0.0.tgz#173899d3ffd1c7d9383e4479525dbe278cab5f2b"
-array-slice@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/array-slice/-/array-slice-1.1.0.tgz#e368ea15f89bc7069f7ffb89aec3a6c7d4ac22d4"
-
array-union@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39"
dependencies:
array-uniq "^1.0.1"
-array-uniq@^1.0.0, array-uniq@^1.0.1, array-uniq@^1.0.2:
+array-uniq@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/array-uniq/-/array-uniq-1.0.3.tgz#af6ac877a25cc7f74e058894753858dfdb24fdb6"
@@ -2425,19 +1926,11 @@ array-unique@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428"
-array.prototype.flat@^1.2.1:
- version "1.2.1"
- resolved "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.1.tgz#812db8f02cad24d3fab65dd67eabe3b8903494a4"
- dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.10.0"
- function-bind "^1.1.1"
-
arrify@^1.0.0, arrify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d"
-asap@^2.0.0, asap@~2.0.3:
+asap@^2.0.0:
version "2.0.6"
resolved "https://registry.yarnpkg.com/asap/-/asap-2.0.6.tgz#e50347611d7e690943208bbdafebcbc2fb866d46"
@@ -2475,10 +1968,6 @@ assign-symbols@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367"
-astral-regex@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz#6c8c3fb827dd43ee3918f27b82782ab7658a6fd9"
-
async-child-process@^1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/async-child-process/-/async-child-process-1.1.1.tgz#27d0a598b5738707f9898c048bd231340583747b"
@@ -2505,15 +1994,11 @@ async-limiter@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8"
-async-parallel@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/async-parallel/-/async-parallel-1.2.3.tgz#0b90550aeffb7a365d8cee881eb0618f656a3450"
-
-async@1.x, async@^1.4.0, async@^1.4.2, async@^1.5.2:
+async@1.x, async@^1.4.0, async@^1.4.2:
version "1.5.2"
resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a"
-async@2.6.1, async@^2.1.4:
+async@2.6.1:
version "2.6.1"
resolved "https://registry.npmjs.org/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610"
dependencies:
@@ -2523,7 +2008,7 @@ async@^0.9.0, async@~0.9.0:
version "0.9.2"
resolved "https://registry.yarnpkg.com/async/-/async-0.9.2.tgz#aea74d5e61c1f899613bf64bda66d4c78f2fd17d"
-async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0, async@^2.6.0:
+async@^2.0.1, async@^2.1.2, async@^2.4.0, async@^2.5.0:
version "2.6.0"
resolved "https://registry.yarnpkg.com/async/-/async-2.6.0.tgz#61a29abb6fcc026fea77e56d1c6ec53a795951f4"
dependencies:
@@ -2533,10 +2018,6 @@ async@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/async/-/async-1.0.0.tgz#f8fc04ca3a13784ade9e1641af98578cfbd647a9"
-async@~1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/async/-/async-1.2.1.tgz#a4816a17cd5ff516dfa2c7698a453369b9790de0"
-
asynckit@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79"
@@ -2545,62 +2026,6 @@ atob@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.0.tgz#ab2b150e51d7b122b9efc8d7340c06b6c41076bc"
-atob@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9"
-
-autoprefixer@^6.3.1:
- version "6.7.7"
- resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-6.7.7.tgz#1dbd1c835658e35ce3f9984099db00585c782014"
- dependencies:
- browserslist "^1.7.6"
- caniuse-db "^1.0.30000634"
- normalize-range "^0.1.2"
- num2fraction "^1.2.2"
- postcss "^5.2.16"
- postcss-value-parser "^3.2.3"
-
-awesome-typescript-loader@^5.2.1:
- version "5.2.1"
- resolved "https://registry.npmjs.org/awesome-typescript-loader/-/awesome-typescript-loader-5.2.1.tgz#a41daf7847515f4925cdbaa3075d61f289e913fc"
- dependencies:
- chalk "^2.4.1"
- enhanced-resolve "^4.0.0"
- loader-utils "^1.1.0"
- lodash "^4.17.5"
- micromatch "^3.1.9"
- mkdirp "^0.5.1"
- source-map-support "^0.5.3"
- webpack-log "^1.2.0"
-
-aws-sdk@^2.127.0:
- version "2.290.0"
- resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.290.0.tgz#e0e4777a62ad29df3b86521a103b3f02189a30f5"
- dependencies:
- buffer "4.9.1"
- events "1.1.1"
- ieee754 "1.1.8"
- jmespath "0.15.0"
- querystring "0.2.0"
- sax "1.2.1"
- url "0.10.3"
- uuid "3.1.0"
- xml2js "0.4.19"
-
-aws-sdk@^2.347.0:
- version "2.348.0"
- resolved "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.348.0.tgz#69c5b6dd77a5eac85b54bf7cc1640c19d762d3ee"
- dependencies:
- buffer "4.9.1"
- events "1.1.1"
- ieee754 "1.1.8"
- jmespath "0.15.0"
- querystring "0.2.0"
- sax "1.2.1"
- url "0.10.3"
- uuid "3.1.0"
- xml2js "0.4.19"
-
aws-sign2@~0.6.0:
version "0.6.0"
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
@@ -2617,7 +2042,7 @@ aws4@^1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f"
-axios@*, axios@^0.18.0:
+axios@^0.18.0:
version "0.18.0"
resolved "http://registry.npmjs.org/axios/-/axios-0.18.0.tgz#32d53e4851efdc0a11993b6cd000789d70c05102"
dependencies:
@@ -2632,30 +2057,6 @@ babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
esutils "^2.0.2"
js-tokens "^3.0.2"
-babel-core@^6.0.0:
- version "6.26.3"
- resolved "https://registry.npmjs.org/babel-core/-/babel-core-6.26.3.tgz#b2e2f09e342d0f0c88e2f02e067794125e75c207"
- dependencies:
- babel-code-frame "^6.26.0"
- babel-generator "^6.26.0"
- babel-helpers "^6.24.1"
- babel-messages "^6.23.0"
- babel-register "^6.26.0"
- babel-runtime "^6.26.0"
- babel-template "^6.26.0"
- babel-traverse "^6.26.0"
- babel-types "^6.26.0"
- babylon "^6.18.0"
- convert-source-map "^1.5.1"
- debug "^2.6.9"
- json5 "^0.5.1"
- lodash "^4.17.4"
- minimatch "^3.0.4"
- path-is-absolute "^1.0.1"
- private "^0.1.8"
- slash "^1.0.0"
- source-map "^0.5.7"
-
babel-core@^6.0.14, babel-core@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-6.26.0.tgz#af32f78b31a6fcef119c87b0fd8d9753f03a0bb8"
@@ -2701,14 +2102,6 @@ babel-helper-builder-binary-assignment-operator-visitor@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-helper-builder-react-jsx@^6.24.1:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-helper-builder-react-jsx/-/babel-helper-builder-react-jsx-6.26.0.tgz#39ff8313b75c8b65dceff1f31d383e0ff2a408a0"
- dependencies:
- babel-runtime "^6.26.0"
- babel-types "^6.26.0"
- esutils "^2.0.2"
-
babel-helper-call-delegate@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-call-delegate/-/babel-helper-call-delegate-6.24.1.tgz#ece6aacddc76e41c3461f88bfc575bd0daa2df8d"
@@ -2802,13 +2195,6 @@ babel-helpers@^6.24.1:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-jest@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/babel-jest/-/babel-jest-23.6.0.tgz#a644232366557a2240a0c083da6b25786185a2f1"
- dependencies:
- babel-plugin-istanbul "^4.1.6"
- babel-preset-jest "^23.2.0"
-
babel-messages@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e"
@@ -2821,30 +2207,6 @@ babel-plugin-check-es2015-constants@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-istanbul@^4.1.6:
- version "4.1.6"
- resolved "http://registry.npmjs.org/babel-plugin-istanbul/-/babel-plugin-istanbul-4.1.6.tgz#36c59b2192efce81c5b378321b74175add1c9a45"
- dependencies:
- babel-plugin-syntax-object-rest-spread "^6.13.0"
- find-up "^2.1.0"
- istanbul-lib-instrument "^1.10.1"
- test-exclude "^4.2.1"
-
-babel-plugin-jest-hoist@^23.2.0:
- version "23.2.0"
- resolved "https://registry.npmjs.org/babel-plugin-jest-hoist/-/babel-plugin-jest-hoist-23.2.0.tgz#e61fae05a1ca8801aadee57a6d66b8cefaf44167"
-
-babel-plugin-react-svg@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-react-svg/-/babel-plugin-react-svg-2.1.0.tgz#169eeba1a20fa2dee3a71ff38eedd63d08e69487"
-
-"babel-plugin-styled-components@>= 1":
- version "1.8.0"
- resolved "https://registry.npmjs.org/babel-plugin-styled-components/-/babel-plugin-styled-components-1.8.0.tgz#9dd054c8e86825203449a852a5746f29f2dab857"
- dependencies:
- "@babel/helper-annotate-as-pure" "^7.0.0"
- lodash "^4.17.10"
-
babel-plugin-syntax-async-functions@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-async-functions/-/babel-plugin-syntax-async-functions-6.13.0.tgz#cad9cad1191b5ad634bf30ae0872391e0647be95"
@@ -2853,18 +2215,6 @@ babel-plugin-syntax-exponentiation-operator@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-exponentiation-operator/-/babel-plugin-syntax-exponentiation-operator-6.13.0.tgz#9ee7e8337290da95288201a6a57f4170317830de"
-babel-plugin-syntax-flow@^6.18.0:
- version "6.18.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-syntax-flow/-/babel-plugin-syntax-flow-6.18.0.tgz#4c3ab20a2af26aa20cd25995c398c4eb70310c8d"
-
-babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0:
- version "6.18.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
-
-babel-plugin-syntax-object-rest-spread@^6.13.0, babel-plugin-syntax-object-rest-spread@^6.8.0:
- version "6.13.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-syntax-object-rest-spread/-/babel-plugin-syntax-object-rest-spread-6.13.0.tgz#fd6536f2bce13836ffa3a5458c4903a597bb3bf5"
-
babel-plugin-syntax-trailing-function-commas@^6.22.0:
version "6.22.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-trailing-function-commas/-/babel-plugin-syntax-trailing-function-commas-6.22.0.tgz#ba0360937f8d06e40180a43fe0d5616fff532cf3"
@@ -2889,7 +2239,7 @@ babel-plugin-transform-es2015-block-scoped-functions@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-block-scoping@^6.23.0:
+babel-plugin-transform-es2015-block-scoping@^6.23.0, babel-plugin-transform-es2015-block-scoping@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-block-scoping/-/babel-plugin-transform-es2015-block-scoping-6.26.0.tgz#d70f5299c1308d05c12f463813b0a09e73b1895f"
dependencies:
@@ -2899,7 +2249,7 @@ babel-plugin-transform-es2015-block-scoping@^6.23.0:
babel-types "^6.26.0"
lodash "^4.17.4"
-babel-plugin-transform-es2015-classes@^6.23.0:
+babel-plugin-transform-es2015-classes@^6.23.0, babel-plugin-transform-es2015-classes@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-classes/-/babel-plugin-transform-es2015-classes-6.24.1.tgz#5a4c58a50c9c9461e564b4b2a3bfabc97a2584db"
dependencies:
@@ -2913,33 +2263,33 @@ babel-plugin-transform-es2015-classes@^6.23.0:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-computed-properties@^6.22.0:
+babel-plugin-transform-es2015-computed-properties@^6.22.0, babel-plugin-transform-es2015-computed-properties@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-computed-properties/-/babel-plugin-transform-es2015-computed-properties-6.24.1.tgz#6fe2a8d16895d5634f4cd999b6d3480a308159b3"
dependencies:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-destructuring@^6.23.0:
+babel-plugin-transform-es2015-destructuring@^6.22.0, babel-plugin-transform-es2015-destructuring@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-destructuring/-/babel-plugin-transform-es2015-destructuring-6.23.0.tgz#997bb1f1ab967f682d2b0876fe358d60e765c56d"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-duplicate-keys@^6.22.0:
+babel-plugin-transform-es2015-duplicate-keys@^6.22.0, babel-plugin-transform-es2015-duplicate-keys@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-duplicate-keys/-/babel-plugin-transform-es2015-duplicate-keys-6.24.1.tgz#73eb3d310ca969e3ef9ec91c53741a6f1576423e"
dependencies:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-for-of@^6.23.0:
+babel-plugin-transform-es2015-for-of@^6.22.0, babel-plugin-transform-es2015-for-of@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-for-of/-/babel-plugin-transform-es2015-for-of-6.23.0.tgz#f47c95b2b613df1d3ecc2fdb7573623c75248691"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-function-name@^6.22.0:
+babel-plugin-transform-es2015-function-name@^6.22.0, babel-plugin-transform-es2015-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-function-name/-/babel-plugin-transform-es2015-function-name-6.24.1.tgz#834c89853bc36b1af0f3a4c5dbaa94fd8eacaa8b"
dependencies:
@@ -2970,7 +2320,7 @@ babel-plugin-transform-es2015-modules-commonjs@^6.23.0, babel-plugin-transform-e
babel-template "^6.26.0"
babel-types "^6.26.0"
-babel-plugin-transform-es2015-modules-systemjs@^6.23.0:
+babel-plugin-transform-es2015-modules-systemjs@^6.23.0, babel-plugin-transform-es2015-modules-systemjs@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-systemjs/-/babel-plugin-transform-es2015-modules-systemjs-6.24.1.tgz#ff89a142b9119a906195f5f106ecf305d9407d23"
dependencies:
@@ -2978,7 +2328,7 @@ babel-plugin-transform-es2015-modules-systemjs@^6.23.0:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-modules-umd@^6.23.0:
+babel-plugin-transform-es2015-modules-umd@^6.23.0, babel-plugin-transform-es2015-modules-umd@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-modules-umd/-/babel-plugin-transform-es2015-modules-umd-6.24.1.tgz#ac997e6285cd18ed6176adb607d602344ad38468"
dependencies:
@@ -2986,14 +2336,14 @@ babel-plugin-transform-es2015-modules-umd@^6.23.0:
babel-runtime "^6.22.0"
babel-template "^6.24.1"
-babel-plugin-transform-es2015-object-super@^6.22.0:
+babel-plugin-transform-es2015-object-super@^6.22.0, babel-plugin-transform-es2015-object-super@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-object-super/-/babel-plugin-transform-es2015-object-super-6.24.1.tgz#24cef69ae21cb83a7f8603dad021f572eb278f8d"
dependencies:
babel-helper-replace-supers "^6.24.1"
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-parameters@^6.23.0:
+babel-plugin-transform-es2015-parameters@^6.23.0, babel-plugin-transform-es2015-parameters@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-parameters/-/babel-plugin-transform-es2015-parameters-6.24.1.tgz#57ac351ab49caf14a97cd13b09f66fdf0a625f2b"
dependencies:
@@ -3004,7 +2354,7 @@ babel-plugin-transform-es2015-parameters@^6.23.0:
babel-traverse "^6.24.1"
babel-types "^6.24.1"
-babel-plugin-transform-es2015-shorthand-properties@^6.22.0:
+babel-plugin-transform-es2015-shorthand-properties@^6.22.0, babel-plugin-transform-es2015-shorthand-properties@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-shorthand-properties/-/babel-plugin-transform-es2015-shorthand-properties-6.24.1.tgz#24f875d6721c87661bbd99a4622e51f14de38aa0"
dependencies:
@@ -3017,7 +2367,7 @@ babel-plugin-transform-es2015-spread@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-sticky-regex@^6.22.0:
+babel-plugin-transform-es2015-sticky-regex@^6.22.0, babel-plugin-transform-es2015-sticky-regex@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-sticky-regex/-/babel-plugin-transform-es2015-sticky-regex-6.24.1.tgz#00c1cdb1aca71112cdf0cf6126c2ed6b457ccdbc"
dependencies:
@@ -3031,13 +2381,13 @@ babel-plugin-transform-es2015-template-literals@^6.22.0:
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
+babel-plugin-transform-es2015-typeof-symbol@^6.22.0, babel-plugin-transform-es2015-typeof-symbol@^6.23.0:
version "6.23.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-typeof-symbol/-/babel-plugin-transform-es2015-typeof-symbol-6.23.0.tgz#dec09f1cddff94b52ac73d505c84df59dcceb372"
dependencies:
babel-runtime "^6.22.0"
-babel-plugin-transform-es2015-unicode-regex@^6.22.0:
+babel-plugin-transform-es2015-unicode-regex@^6.22.0, babel-plugin-transform-es2015-unicode-regex@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-es2015-unicode-regex/-/babel-plugin-transform-es2015-unicode-regex-6.24.1.tgz#d38b12f42ea7323f729387f18a7c5ae1faeb35e9"
dependencies:
@@ -3053,49 +2403,7 @@ babel-plugin-transform-exponentiation-operator@^6.22.0:
babel-plugin-syntax-exponentiation-operator "^6.8.0"
babel-runtime "^6.22.0"
-babel-plugin-transform-flow-strip-types@^6.22.0:
- version "6.22.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-flow-strip-types/-/babel-plugin-transform-flow-strip-types-6.22.0.tgz#84cb672935d43714fdc32bce84568d87441cf7cf"
- dependencies:
- babel-plugin-syntax-flow "^6.18.0"
- babel-runtime "^6.22.0"
-
-babel-plugin-transform-object-rest-spread@^6.26.0:
- version "6.26.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-object-rest-spread/-/babel-plugin-transform-object-rest-spread-6.26.0.tgz#0f36692d50fef6b7e2d4b3ac1478137a963b7b06"
- dependencies:
- babel-plugin-syntax-object-rest-spread "^6.8.0"
- babel-runtime "^6.26.0"
-
-babel-plugin-transform-react-display-name@^6.23.0:
- version "6.25.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-display-name/-/babel-plugin-transform-react-display-name-6.25.0.tgz#67e2bf1f1e9c93ab08db96792e05392bf2cc28d1"
- dependencies:
- babel-runtime "^6.22.0"
-
-babel-plugin-transform-react-jsx-self@^6.22.0:
- version "6.22.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-self/-/babel-plugin-transform-react-jsx-self-6.22.0.tgz#df6d80a9da2612a121e6ddd7558bcbecf06e636e"
- dependencies:
- babel-plugin-syntax-jsx "^6.8.0"
- babel-runtime "^6.22.0"
-
-babel-plugin-transform-react-jsx-source@^6.22.0:
- version "6.22.0"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx-source/-/babel-plugin-transform-react-jsx-source-6.22.0.tgz#66ac12153f5cd2d17b3c19268f4bf0197f44ecd6"
- dependencies:
- babel-plugin-syntax-jsx "^6.8.0"
- babel-runtime "^6.22.0"
-
-babel-plugin-transform-react-jsx@^6.24.1:
- version "6.24.1"
- resolved "https://registry.yarnpkg.com/babel-plugin-transform-react-jsx/-/babel-plugin-transform-react-jsx-6.24.1.tgz#840a028e7df460dfc3a2d29f0c0d91f6376e66a3"
- dependencies:
- babel-helper-builder-react-jsx "^6.24.1"
- babel-plugin-syntax-jsx "^6.8.0"
- babel-runtime "^6.22.0"
-
-babel-plugin-transform-regenerator@^6.22.0:
+babel-plugin-transform-regenerator@^6.22.0, babel-plugin-transform-regenerator@^6.24.1:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-regenerator/-/babel-plugin-transform-regenerator-6.26.0.tgz#e0703696fbde27f0a3efcacf8b4dca2f7b3a8f2f"
dependencies:
@@ -3143,29 +2451,69 @@ babel-preset-env@^1.3.2:
invariant "^2.2.2"
semver "^5.3.0"
-babel-preset-flow@^6.23.0:
- version "6.23.0"
- resolved "https://registry.yarnpkg.com/babel-preset-flow/-/babel-preset-flow-6.23.0.tgz#e71218887085ae9a24b5be4169affb599816c49d"
- dependencies:
- babel-plugin-transform-flow-strip-types "^6.22.0"
-
-babel-preset-jest@^23.2.0:
- version "23.2.0"
- resolved "https://registry.npmjs.org/babel-preset-jest/-/babel-preset-jest-23.2.0.tgz#8ec7a03a138f001a1a8fb1e8113652bf1a55da46"
+babel-preset-env@^1.7.0:
+ version "1.7.0"
+ resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.7.0.tgz#dea79fa4ebeb883cd35dab07e260c1c9c04df77a"
dependencies:
- babel-plugin-jest-hoist "^23.2.0"
- babel-plugin-syntax-object-rest-spread "^6.13.0"
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-syntax-trailing-function-commas "^6.22.0"
+ babel-plugin-transform-async-to-generator "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.23.0"
+ babel-plugin-transform-es2015-classes "^6.23.0"
+ babel-plugin-transform-es2015-computed-properties "^6.22.0"
+ babel-plugin-transform-es2015-destructuring "^6.23.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.22.0"
+ babel-plugin-transform-es2015-for-of "^6.23.0"
+ babel-plugin-transform-es2015-function-name "^6.22.0"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.22.0"
+ babel-plugin-transform-es2015-modules-commonjs "^6.23.0"
+ babel-plugin-transform-es2015-modules-systemjs "^6.23.0"
+ babel-plugin-transform-es2015-modules-umd "^6.23.0"
+ babel-plugin-transform-es2015-object-super "^6.22.0"
+ babel-plugin-transform-es2015-parameters "^6.23.0"
+ babel-plugin-transform-es2015-shorthand-properties "^6.22.0"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.22.0"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.23.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.22.0"
+ babel-plugin-transform-exponentiation-operator "^6.22.0"
+ babel-plugin-transform-regenerator "^6.22.0"
+ browserslist "^3.2.6"
+ invariant "^2.2.2"
+ semver "^5.3.0"
-babel-preset-react@^6.24.1:
+babel-preset-es2015@^6.24.1:
version "6.24.1"
- resolved "https://registry.yarnpkg.com/babel-preset-react/-/babel-preset-react-6.24.1.tgz#ba69dfaea45fc3ec639b6a4ecea6e17702c91380"
+ resolved "https://registry.yarnpkg.com/babel-preset-es2015/-/babel-preset-es2015-6.24.1.tgz#d44050d6bc2c9feea702aaf38d727a0210538939"
dependencies:
- babel-plugin-syntax-jsx "^6.3.13"
- babel-plugin-transform-react-display-name "^6.23.0"
- babel-plugin-transform-react-jsx "^6.24.1"
- babel-plugin-transform-react-jsx-self "^6.22.0"
- babel-plugin-transform-react-jsx-source "^6.22.0"
- babel-preset-flow "^6.23.0"
+ babel-plugin-check-es2015-constants "^6.22.0"
+ babel-plugin-transform-es2015-arrow-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoped-functions "^6.22.0"
+ babel-plugin-transform-es2015-block-scoping "^6.24.1"
+ babel-plugin-transform-es2015-classes "^6.24.1"
+ babel-plugin-transform-es2015-computed-properties "^6.24.1"
+ babel-plugin-transform-es2015-destructuring "^6.22.0"
+ babel-plugin-transform-es2015-duplicate-keys "^6.24.1"
+ babel-plugin-transform-es2015-for-of "^6.22.0"
+ babel-plugin-transform-es2015-function-name "^6.24.1"
+ babel-plugin-transform-es2015-literals "^6.22.0"
+ babel-plugin-transform-es2015-modules-amd "^6.24.1"
+ babel-plugin-transform-es2015-modules-commonjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-systemjs "^6.24.1"
+ babel-plugin-transform-es2015-modules-umd "^6.24.1"
+ babel-plugin-transform-es2015-object-super "^6.24.1"
+ babel-plugin-transform-es2015-parameters "^6.24.1"
+ babel-plugin-transform-es2015-shorthand-properties "^6.24.1"
+ babel-plugin-transform-es2015-spread "^6.22.0"
+ babel-plugin-transform-es2015-sticky-regex "^6.24.1"
+ babel-plugin-transform-es2015-template-literals "^6.22.0"
+ babel-plugin-transform-es2015-typeof-symbol "^6.22.0"
+ babel-plugin-transform-es2015-unicode-regex "^6.24.1"
+ babel-plugin-transform-regenerator "^6.24.1"
babel-register@^6.26.0:
version "6.26.0"
@@ -3179,7 +2527,7 @@ babel-register@^6.26.0:
mkdirp "^0.5.1"
source-map-support "^0.4.15"
-babel-runtime@6.x, babel-runtime@6.x.x, babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.23.0, babel-runtime@^6.26.0:
+babel-runtime@^6.11.6, babel-runtime@^6.18.0, babel-runtime@^6.22.0, babel-runtime@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-runtime/-/babel-runtime-6.26.0.tgz#965c7058668e82b55d7bfe04ff2337bc8b5647fe"
dependencies:
@@ -3196,7 +2544,7 @@ babel-template@^6.16.0, babel-template@^6.24.1, babel-template@^6.26.0:
babylon "^6.18.0"
lodash "^4.17.4"
-babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0, babel-traverse@^6.7.3:
+babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-traverse@^6.26.0, babel-traverse@^6.7.3:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.26.0.tgz#46a9cbd7edcc62c8e5c064e2d2d8d0f4035766ee"
dependencies:
@@ -3210,7 +2558,7 @@ babel-traverse@^6.0.0, babel-traverse@^6.18.0, babel-traverse@^6.24.1, babel-tra
invariant "^2.2.2"
lodash "^4.17.4"
-babel-types@^6.0.0, babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
+babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1, babel-types@^6.26.0:
version "6.26.0"
resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.26.0.tgz#a3b073f94ab49eb6fa55cd65227a334380632497"
dependencies:
@@ -3236,14 +2584,6 @@ backoff@^2.5.0:
dependencies:
precond "0.2"
-bail@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/bail/-/bail-1.0.3.tgz#63cfb9ddbac829b02a3128cd53224be78e6c21a3"
-
-balanced-match@^0.4.2:
- version "0.4.2"
- resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838"
-
balanced-match@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767"
@@ -3274,89 +2614,12 @@ base@^0.11.1:
mixin-deep "^1.2.0"
pascalcase "^0.1.1"
-basscss-align@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/basscss-align/-/basscss-align-1.0.2.tgz#294aa689d6f99da86e4af4c5c2892870855c1c37"
-
-basscss-border@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/basscss-border/-/basscss-border-4.0.2.tgz#14b4506329b90cb14abe5f4d3473e9fe9202df2e"
-
-basscss-flexbox@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/basscss-flexbox/-/basscss-flexbox-1.0.2.tgz#0f85e8c50618c023c5cff1227e6b3538fc0d9a32"
-
-basscss-grid@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/basscss-grid/-/basscss-grid-2.0.0.tgz#6f4c3198e786a38529f8362bc3b3bce5254c1369"
-
-basscss-hide@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/basscss-hide/-/basscss-hide-1.0.1.tgz#34bc138bba867c6c49ab8682a610ef495e47d750"
-
-basscss-layout@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/basscss-layout/-/basscss-layout-3.1.0.tgz#f9f392e480da66657d9fe5de9ca4c07c579c3a4e"
-
-basscss-margin@^1.0.8:
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/basscss-margin/-/basscss-margin-1.0.8.tgz#f9845a6eabc806b4ddcd956a461ac90a43d7e283"
-
-basscss-padding@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/basscss-padding/-/basscss-padding-1.1.3.tgz#69db799414e6dd58bed83776952cc299e2e6874e"
-
-basscss-position@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/basscss-position/-/basscss-position-2.0.3.tgz#467180a1f8f386e9072ed8d08294d2a6e0ba4305"
-
-basscss-type-scale@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/basscss-type-scale/-/basscss-type-scale-1.0.5.tgz#23bf5e41c9d142c8061cf9829ccf23e9b3258ec7"
-
-basscss-typography@^3.0.4:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/basscss-typography/-/basscss-typography-3.0.4.tgz#ec946a2bad8dd1af97be9ea108ad4bb7be932464"
-
-basscss@^8.0.3:
- version "8.0.4"
- resolved "https://registry.yarnpkg.com/basscss/-/basscss-8.0.4.tgz#b371a2ce25aeb9b322302f37f4e425753dd29ae1"
- dependencies:
- basscss-align "^1.0.2"
- basscss-border "^4.0.2"
- basscss-flexbox "^1.0.2"
- basscss-grid "^2.0.0"
- basscss-hide "^1.0.1"
- basscss-layout "^3.1.0"
- basscss-margin "^1.0.8"
- basscss-padding "^1.1.3"
- basscss-position "^2.0.3"
- basscss-type-scale "^1.0.5"
- basscss-typography "^3.0.4"
-
-batch@0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
-
bcrypt-pbkdf@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
dependencies:
tweetnacl "^0.14.3"
-beeper@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/beeper/-/beeper-1.1.1.tgz#e6d5ea8c5dad001304a70b22638447f69cb2f809"
-
-bfj@^6.1.1:
- version "6.1.1"
- resolved "https://registry.yarnpkg.com/bfj/-/bfj-6.1.1.tgz#05a3b7784fbd72cfa3c22e56002ef99336516c48"
- dependencies:
- bluebird "^3.5.1"
- check-types "^7.3.0"
- hoopy "^0.1.2"
- tryer "^1.0.0"
-
big.js@^3.1.3:
version "3.2.0"
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
@@ -3365,10 +2628,6 @@ bignumber.js@7.2.1:
version "7.2.1"
resolved "https://registry.npmjs.org/bignumber.js/-/bignumber.js-7.2.1.tgz#80c048759d826800807c4bfd521e50edbba57a5f"
-"bignumber.js@git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2":
- version "2.0.7"
- resolved "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2"
-
"bignumber.js@git+https://github.com/frozeman/bignumber.js-nolookahead.git":
version "2.0.7"
resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
@@ -3381,6 +2640,16 @@ bignumber.js@~8.0.2:
version "8.0.2"
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-8.0.2.tgz#d8c4e1874359573b1ef03011a2d861214aeef137"
+bin-links@^1.1.2:
+ version "1.1.2"
+ resolved "https://registry.yarnpkg.com/bin-links/-/bin-links-1.1.2.tgz#fb74bd54bae6b7befc6c6221f25322ac830d9757"
+ dependencies:
+ bluebird "^3.5.0"
+ cmd-shim "^2.0.2"
+ gentle-fs "^2.0.0"
+ graceful-fs "^4.1.11"
+ write-file-atomic "^2.3.0"
+
binary-extensions@^1.0.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
@@ -3389,10 +2658,6 @@ bindings@^1.2.1, bindings@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/bindings/-/bindings-1.3.0.tgz#b346f6ecf6a95f5a815c5839fc7cdb22502f1ed7"
-bintrees@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8"
-
bip39@2.5.0, bip39@^2.5.0:
version "2.5.0"
resolved "https://registry.yarnpkg.com/bip39/-/bip39-2.5.0.tgz#51cbd5179460504a63ea3c000db3f787ca051235"
@@ -3446,11 +2711,7 @@ block-stream@*:
dependencies:
inherits "~2.0.0"
-blockies@^0.0.2:
- version "0.0.2"
- resolved "https://registry.yarnpkg.com/blockies/-/blockies-0.0.2.tgz#22ad58da4f6b382bc79bf4386c5820c70047e4ed"
-
-bluebird@^2.9.24, bluebird@^2.9.34:
+bluebird@^2.9.34:
version "2.11.0"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-2.11.0.tgz#534b9033c022c9579c56ba3b3e5a5caafbb650e1"
@@ -3458,6 +2719,10 @@ bluebird@^3.5.0, bluebird@^3.5.1:
version "3.5.1"
resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.1.tgz#d9551f9de98f1fcda1e683d17ee91a0602ee2eb9"
+bluebird@^3.5.3:
+ version "3.5.3"
+ resolved "https://registry.yarnpkg.com/bluebird/-/bluebird-3.5.3.tgz#7d01c6f9616c9a51ab0f8c549a79dfe6ec33efa7"
+
bn.js@4.11.6:
version "4.11.6"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-4.11.6.tgz#53344adb14617a13f6e8dd2ce28905d1c0ba3215"
@@ -3474,7 +2739,7 @@ bn.js@^2.0.3:
version "2.2.0"
resolved "https://registry.yarnpkg.com/bn.js/-/bn.js-2.2.0.tgz#12162bc2ae71fc40a5626c33438f3a875cd37625"
-body-parser@1.18.2, body-parser@^1.16.0, body-parser@^1.17.1:
+body-parser@1.18.2, body-parser@^1.16.0:
version "1.18.2"
resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.2.tgz#87678a19d84b47d859b83199bd59bce222b10454"
dependencies:
@@ -3489,36 +2754,6 @@ body-parser@1.18.2, body-parser@^1.16.0, body-parser@^1.17.1:
raw-body "2.3.2"
type-is "~1.6.15"
-body-parser@1.18.3:
- version "1.18.3"
- resolved "https://registry.yarnpkg.com/body-parser/-/body-parser-1.18.3.tgz#5b292198ffdd553b3a0f20ded0592b956955c8b4"
- dependencies:
- bytes "3.0.0"
- content-type "~1.0.4"
- debug "2.6.9"
- depd "~1.1.2"
- http-errors "~1.6.3"
- iconv-lite "0.4.23"
- on-finished "~2.3.0"
- qs "6.5.2"
- raw-body "2.3.3"
- type-is "~1.6.16"
-
-bonjour@^3.5.0:
- version "3.5.0"
- resolved "https://registry.yarnpkg.com/bonjour/-/bonjour-3.5.0.tgz#8e890a183d8ee9a2393b3844c691a42bcf7bc9f5"
- dependencies:
- array-flatten "^2.1.0"
- deep-equal "^1.0.1"
- dns-equal "^1.0.0"
- dns-txt "^2.0.2"
- multicast-dns "^6.0.1"
- multicast-dns-service-types "^1.1.0"
-
-boolbase@~1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
-
boom@2.x.x:
version "2.10.1"
resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
@@ -3537,31 +2772,7 @@ boom@5.x.x:
dependencies:
hoek "4.x.x"
-bottleneck@^2.13.2:
- version "2.15.0"
- resolved "https://registry.yarnpkg.com/bottleneck/-/bottleneck-2.15.0.tgz#538ec3a32f0e94a06e934bcb2080eb2c4c901c5a"
-
-bowser@^1.7.3, bowser@^1.9.3:
- version "1.9.3"
- resolved "https://registry.yarnpkg.com/bowser/-/bowser-1.9.3.tgz#6643ae4d783f31683f6d23156976b74183862162"
-
-bowser@^1.9.4:
- version "1.9.4"
- resolved "https://registry.npmjs.org/bowser/-/bowser-1.9.4.tgz#890c58a2813a9d3243704334fa81b96a5c150c9a"
-
-boxen@^1.2.1:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/boxen/-/boxen-1.3.0.tgz#55c6c39a8ba58d9c61ad22cd877532deb665a20b"
- dependencies:
- ansi-align "^2.0.0"
- camelcase "^4.0.0"
- chalk "^2.0.1"
- cli-boxes "^1.0.0"
- string-width "^2.0.0"
- term-size "^1.2.0"
- widest-line "^2.0.0"
-
-brace-expansion@^1.0.0, brace-expansion@^1.1.7:
+brace-expansion@^1.1.7:
version "1.1.11"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd"
dependencies:
@@ -3591,24 +2802,10 @@ braces@^2.3.0, braces@^2.3.1:
split-string "^3.0.2"
to-regex "^3.0.1"
-brcast@^3.0.1:
- version "3.0.1"
- resolved "https://registry.npmjs.org/brcast/-/brcast-3.0.1.tgz#6256a8349b20de9eed44257a9b24d71493cd48dd"
-
brorand@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f"
-browser-process-hrtime@^0.1.2:
- version "0.1.3"
- resolved "https://registry.npmjs.org/browser-process-hrtime/-/browser-process-hrtime-0.1.3.tgz#616f00faef1df7ec1b5bf9cfe2bdc3170f26c7b4"
-
-browser-resolve@^1.11.3:
- version "1.11.3"
- resolved "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz#9b7cbb3d0f510e4cb86bdbd796124d28b5890af6"
- dependencies:
- resolve "1.1.7"
-
browser-stdout@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
@@ -3675,13 +2872,6 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"
-browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6:
- version "1.7.7"
- resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-1.7.7.tgz#0bd76704258be829b2398bb50e4b62d1a166b0b9"
- dependencies:
- caniuse-db "^1.0.30000639"
- electron-to-chromium "^1.2.7"
-
browserslist@^2.1.2:
version "2.11.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-2.11.3.tgz#fe36167aed1bbcde4827ebfe71347a2cc70b99b2"
@@ -3689,11 +2879,12 @@ browserslist@^2.1.2:
caniuse-lite "^1.0.30000792"
electron-to-chromium "^1.3.30"
-bs-logger@0.x:
- version "0.2.5"
- resolved "https://registry.npmjs.org/bs-logger/-/bs-logger-0.2.5.tgz#1d82f0cf88864e1341cd9262237f8d0748a49b22"
+browserslist@^3.2.6:
+ version "3.2.8"
+ resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-3.2.8.tgz#b0005361d6471f0f5952797a76fc985f1f978fc6"
dependencies:
- fast-json-stable-stringify "^2.0.0"
+ caniuse-lite "^1.0.30000844"
+ electron-to-chromium "^1.3.47"
bs58@=4.0.1, bs58@^4.0.0:
version "4.0.1"
@@ -3713,11 +2904,9 @@ bs58check@^2.1.2:
create-hash "^1.1.0"
safe-buffer "^5.1.2"
-bser@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/bser/-/bser-2.0.0.tgz#9ac78d3ed5d915804fd87acb158bc797147a1719"
- dependencies:
- node-int64 "^0.4.0"
+btoa@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/btoa/-/btoa-1.2.1.tgz#01a9909f8b2c93f6bf680ba26131eb30f7fa3d73"
buffer-compare@=1.1.1:
version "1.1.1"
@@ -3731,38 +2920,18 @@ buffer-equal@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-equal/-/buffer-equal-1.0.0.tgz#59616b498304d556abd466966b22eeda3eca5fbe"
-buffer-from@1.x, buffer-from@^1.1.0:
- version "1.1.1"
- resolved "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
-
buffer-from@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.0.0.tgz#4cb8832d23612589b0406e9e2956c17f06fdf531"
-buffer-indexof@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/buffer-indexof/-/buffer-indexof-1.1.1.tgz#52fabcc6a606d1a00302802648ef68f639da268c"
-
buffer-to-arraybuffer@^0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/buffer-to-arraybuffer/-/buffer-to-arraybuffer-0.0.5.tgz#6064a40fa76eb43c723aba9ef8f6e1216d10511a"
-buffer-writer@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/buffer-writer/-/buffer-writer-2.0.0.tgz#ce7eb81a38f7829db09c873f2fbb792c0c98ec04"
-
buffer-xor@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/buffer-xor/-/buffer-xor-1.0.3.tgz#26e61ed1422fb70dd42e6e36729ed51d855fe8d9"
-buffer@4.9.1, buffer@^4.3.0, buffer@^4.9.0:
- version "4.9.1"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
- dependencies:
- base64-js "^1.0.2"
- ieee754 "^1.1.4"
- isarray "^1.0.0"
-
buffer@^3.0.1:
version "3.6.0"
resolved "https://registry.yarnpkg.com/buffer/-/buffer-3.6.0.tgz#a72c936f77b96bf52f5f7e7b467180628551defb"
@@ -3771,16 +2940,17 @@ buffer@^3.0.1:
ieee754 "^1.1.4"
isarray "^1.0.0"
-buffer@^5.0.3, buffer@^5.0.5:
- version "5.1.0"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.1.0.tgz#c913e43678c7cb7c8bd16afbcddb6c5505e8f9fe"
+buffer@^4.3.0, buffer@^4.9.0:
+ version "4.9.1"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-4.9.1.tgz#6d1bb601b07a4efced97094132093027c95bc298"
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"
+ isarray "^1.0.0"
-buffer@^5.1.0:
- version "5.2.1"
- resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.2.1.tgz#dd57fa0f109ac59c602479044dca7b8b3d0b71d6"
+buffer@^5.0.5:
+ version "5.1.0"
+ resolved "https://registry.yarnpkg.com/buffer/-/buffer-5.1.0.tgz#c913e43678c7cb7c8bd16afbcddb6c5505e8f9fe"
dependencies:
base64-js "^1.0.2"
ieee754 "^1.1.4"
@@ -3854,7 +3024,7 @@ cacache@^10.0.4:
unique-filename "^1.1.0"
y18n "^4.0.0"
-cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0:
+cacache@^11.0.1, cacache@^11.0.2:
version "11.2.0"
resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.2.0.tgz#617bdc0b02844af56310e411c0878941d5739965"
dependencies:
@@ -3873,6 +3043,25 @@ cacache@^11.0.1, cacache@^11.0.2, cacache@^11.2.0:
unique-filename "^1.1.0"
y18n "^4.0.0"
+cacache@^11.3.2:
+ version "11.3.2"
+ resolved "https://registry.yarnpkg.com/cacache/-/cacache-11.3.2.tgz#2d81e308e3d258ca38125b676b98b2ac9ce69bfa"
+ dependencies:
+ bluebird "^3.5.3"
+ chownr "^1.1.1"
+ figgy-pudding "^3.5.1"
+ glob "^7.1.3"
+ graceful-fs "^4.1.15"
+ lru-cache "^5.1.1"
+ mississippi "^3.0.0"
+ mkdirp "^0.5.1"
+ move-concurrently "^1.0.1"
+ promise-inflight "^1.0.1"
+ rimraf "^2.6.2"
+ ssri "^6.0.1"
+ unique-filename "^1.1.1"
+ y18n "^4.0.0"
+
cache-base@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2"
@@ -3906,21 +3095,6 @@ call-me-maybe@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/call-me-maybe/-/call-me-maybe-1.0.1.tgz#26d208ea89e37b5cbde60250a15f031c16a4d66b"
-callsites@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/callsites/-/callsites-2.0.0.tgz#06eb84f00eea413da86affefacbffb36093b3c50"
-
-callsites@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.0.0.tgz#fb7eb569b72ad7a45812f93fd9430a3e410b3dd3"
-
-camel-case@3.0.x, camel-case@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/camel-case/-/camel-case-3.0.0.tgz#ca3c3688a4e9cf3a4cda777dc4dcbc713249cf73"
- dependencies:
- no-case "^2.2.0"
- upper-case "^1.1.1"
-
camelcase-keys@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/camelcase-keys/-/camelcase-keys-2.1.0.tgz#308beeaffdf28119051efa1d932213c91b8f92e7"
@@ -3940,7 +3114,7 @@ camelcase@^1.0.2:
version "1.2.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39"
-camelcase@^2.0.0, camelcase@^2.0.1:
+camelcase@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-2.1.1.tgz#7c1d16d679a1bbe59ca02cacecfb011e201f5a1f"
@@ -3948,36 +3122,17 @@ camelcase@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-3.0.0.tgz#32fc4b9fcdaf845fcdf7e73bb97cac2261f0ab0a"
-camelcase@^4.0.0, camelcase@^4.1.0:
+camelcase@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd"
-camelcase@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.0.0.tgz#03295527d58bd3cd4aa75363f35b2e8d97be2f42"
-
-caniuse-api@^1.5.2:
- version "1.6.1"
- resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-1.6.1.tgz#b534e7c734c4f81ec5fbe8aca2ad24354b962c6c"
- dependencies:
- browserslist "^1.3.6"
- caniuse-db "^1.0.30000529"
- lodash.memoize "^4.1.2"
- lodash.uniq "^4.5.0"
-
-caniuse-db@^1.0.30000529, caniuse-db@^1.0.30000634, caniuse-db@^1.0.30000639:
- version "1.0.30000830"
- resolved "https://registry.yarnpkg.com/caniuse-db/-/caniuse-db-1.0.30000830.tgz#6e45255b345649fd15ff59072da1e12bb3de2f13"
-
caniuse-lite@^1.0.30000792:
version "1.0.30000830"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000830.tgz#cb96b8a2dd3cbfe04acea2af3c4e894249095328"
-capture-exit@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/capture-exit/-/capture-exit-1.2.0.tgz#1c5fcc489fd0ab00d4f1ac7ae1072e3173fbab6f"
- dependencies:
- rsvp "^3.3.3"
+caniuse-lite@^1.0.30000844:
+ version "1.0.30000929"
+ resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30000929.tgz#7b391b781a9c3097ecc39ea053301aea8ea16317"
capture-stack-trace@^1.0.0:
version "1.0.0"
@@ -3994,7 +3149,7 @@ center-align@^0.1.1:
align-text "^0.1.3"
lazy-cache "^1.0.3"
-chai-as-promised@^7.1.0, chai-as-promised@^7.1.1:
+chai-as-promised@^7.1.0:
version "7.1.1"
resolved "https://registry.yarnpkg.com/chai-as-promised/-/chai-as-promised-7.1.1.tgz#08645d825deb8696ee61725dbf590c012eb00ca0"
dependencies:
@@ -4015,11 +3170,7 @@ chai@^4.0.1, chai@^4.1.2:
pathval "^1.0.0"
type-detect "^4.0.0"
-chain-function@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.0.tgz#0d4ab37e7e18ead0bdc47b920764118ce58733dc"
-
-chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
+chalk@^1.0.0, chalk@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
dependencies:
@@ -4029,7 +3180,7 @@ chalk@^1.0.0, chalk@^1.1.1, chalk@^1.1.3:
strip-ansi "^3.0.0"
supports-color "^2.0.0"
-chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1, chalk@^2.3.2:
+chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0, chalk@^2.3.1:
version "2.4.0"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.0.tgz#a060a297a6b57e15b61ca63ce84995daa0fe6e52"
dependencies:
@@ -4045,45 +3196,6 @@ chalk@^2.4.0, chalk@^2.4.1:
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
-change-case@^3.0.2:
- version "3.0.2"
- resolved "https://registry.yarnpkg.com/change-case/-/change-case-3.0.2.tgz#fd48746cce02f03f0a672577d1d3a8dc2eceb037"
- dependencies:
- camel-case "^3.0.0"
- constant-case "^2.0.0"
- dot-case "^2.1.0"
- header-case "^1.0.0"
- is-lower-case "^1.1.0"
- is-upper-case "^1.1.0"
- lower-case "^1.1.1"
- lower-case-first "^1.0.0"
- no-case "^2.3.2"
- param-case "^2.1.0"
- pascal-case "^2.0.0"
- path-case "^2.1.0"
- sentence-case "^2.1.0"
- snake-case "^2.1.0"
- swap-case "^1.1.0"
- title-case "^2.1.0"
- upper-case "^1.1.1"
- upper-case-first "^1.1.0"
-
-change-emitter@^0.1.2:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/change-emitter/-/change-emitter-0.1.6.tgz#e8b2fe3d7f1ab7d69a32199aff91ea6931409515"
-
-character-entities-legacy@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/character-entities-legacy/-/character-entities-legacy-1.1.2.tgz#7c6defb81648498222c9855309953d05f4d63a9c"
-
-character-entities@^1.0.0:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-1.2.2.tgz#58c8f371c0774ef0ba9b2aca5f00d8f100e6e363"
-
-character-reference-invalid@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz#21e421ad3d84055952dab4a43a04e73cd425d3ed"
-
chardet@^0.4.0:
version "0.4.2"
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
@@ -4096,54 +3208,13 @@ check-error@^1.0.1, check-error@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/check-error/-/check-error-1.0.2.tgz#574d312edd88bb5dd8912e9286dd6c0aed4aac82"
-check-types@^7.3.0:
- version "7.4.0"
- resolved "https://registry.yarnpkg.com/check-types/-/check-types-7.4.0.tgz#0378ec1b9616ec71f774931a3c6516fad8c152f4"
-
checkpoint-store@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/checkpoint-store/-/checkpoint-store-1.1.0.tgz#04e4cb516b91433893581e6d4601a78e9552ea06"
dependencies:
functional-red-black-tree "^1.0.1"
-cheerio@1.0.0-rc.2, cheerio@^1.0.0-rc.2:
- version "1.0.0-rc.2"
- resolved "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.2.tgz#4b9f53a81b27e4d5dac31c0ffd0cfa03cc6830db"
- dependencies:
- css-select "~1.2.0"
- dom-serializer "~0.1.0"
- entities "~1.1.1"
- htmlparser2 "^3.9.1"
- lodash "^4.15.0"
- parse5 "^3.0.1"
-
-chokidar-cli@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/chokidar-cli/-/chokidar-cli-1.2.0.tgz#8e7f58442273182018be1868e53c22af65a21948"
- dependencies:
- anymatch "^1.1.0"
- bluebird "^2.9.24"
- chokidar "^1.0.1"
- lodash "^3.7.0"
- shell-quote "^1.4.3"
- yargs "^3.7.2"
-
-chokidar@^1.0.1:
- version "1.7.0"
- resolved "https://registry.npmjs.org/chokidar/-/chokidar-1.7.0.tgz#798e689778151c8076b4b360e5edd28cda2bb468"
- dependencies:
- anymatch "^1.3.0"
- async-each "^1.0.0"
- glob-parent "^2.0.0"
- inherits "^2.0.1"
- is-binary-path "^1.0.0"
- is-glob "^2.0.0"
- path-is-absolute "^1.0.0"
- readdirp "^2.0.0"
- optionalDependencies:
- fsevents "^1.0.0"
-
-chokidar@^2.0.0, chokidar@^2.0.2:
+chokidar@^2.0.2:
version "2.0.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176"
dependencies:
@@ -4184,6 +3255,10 @@ chownr@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181"
+chownr@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494"
+
chrome-trace-event@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.0.tgz#45a91bd2c20c9411f0963b5aaeb9a1b95e09cc48"
@@ -4201,16 +3276,6 @@ cipher-base@^1.0.0, cipher-base@^1.0.1, cipher-base@^1.0.3:
inherits "^2.0.1"
safe-buffer "^5.0.1"
-circular-json@^0.3.1:
- version "0.3.3"
- resolved "https://registry.yarnpkg.com/circular-json/-/circular-json-0.3.3.tgz#815c99ea84f6809529d2f45791bdf82711352d66"
-
-clap@^1.0.9:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/clap/-/clap-1.2.3.tgz#4f36745b32008492557f46412d66d50cb99bce51"
- dependencies:
- chalk "^1.1.3"
-
class-utils@^0.3.5:
version "0.3.6"
resolved "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463"
@@ -4220,63 +3285,12 @@ class-utils@^0.3.5:
isobject "^3.0.0"
static-extend "^0.1.1"
-classnames@^2.2.0, classnames@^2.2.3, classnames@^2.2.6:
- version "2.2.6"
- resolved "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz#43935bffdd291f326dad0a205309b38d00f650ce"
-
-classnames@^2.2.5:
- version "2.2.5"
- resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.2.5.tgz#fb3801d453467649ef3603c7d61a02bd129bde6d"
-
-clean-css@4.2.1, clean-css@4.2.x:
- version "4.2.1"
- resolved "https://registry.yarnpkg.com/clean-css/-/clean-css-4.2.1.tgz#2d411ef76b8569b6d0c84068dabe85b0aa5e5c17"
- dependencies:
- source-map "~0.6.0"
-
-clean-webpack-plugin@^0.1.19:
- version "0.1.19"
- resolved "https://registry.yarnpkg.com/clean-webpack-plugin/-/clean-webpack-plugin-0.1.19.tgz#ceda8bb96b00fe168e9b080272960d20fdcadd6d"
- dependencies:
- rimraf "^2.6.1"
-
-cli-boxes@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/cli-boxes/-/cli-boxes-1.0.0.tgz#4fa917c3e59c94a004cd61f8ee509da651687143"
-
-cli-cursor@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987"
- dependencies:
- restore-cursor "^1.0.1"
-
cli-cursor@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5"
dependencies:
restore-cursor "^2.0.0"
-cli-highlight@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/cli-highlight/-/cli-highlight-1.2.3.tgz#b200f97ed0e43d24633e89de0f489a48bb87d2bf"
- dependencies:
- chalk "^2.3.0"
- highlight.js "^9.6.0"
- mz "^2.4.0"
- parse5 "^3.0.3"
- yargs "^10.0.3"
-
-cli-spinners@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-0.1.2.tgz#bb764d88e185fb9e1e6a2a1f19772318f605e31c"
-
-cli-truncate@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/cli-truncate/-/cli-truncate-0.2.1.tgz#9f15cfbb0705005369216c626ac7d05ab90dd574"
- dependencies:
- slice-ansi "0.0.4"
- string-width "^1.0.1"
-
cli-width@^1.0.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-1.1.1.tgz#a4d293ef67ebb7b88d4a4d42c0ccf00c4d1e366d"
@@ -4285,14 +3299,6 @@ cli-width@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
-clipboard@^2.0.0:
- version "2.0.1"
- resolved "https://registry.npmjs.org/clipboard/-/clipboard-2.0.1.tgz#a12481e1c13d8a50f5f036b0560fe5d16d74e46a"
- dependencies:
- good-listener "^1.2.2"
- select "^1.1.2"
- tiny-emitter "^2.0.0"
-
cliui@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1"
@@ -4301,7 +3307,7 @@ cliui@^2.1.0:
right-align "^0.1.1"
wordwrap "0.0.2"
-cliui@^3.0.3, cliui@^3.2.0:
+cliui@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d"
dependencies:
@@ -4321,10 +3327,6 @@ clone-buffer@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-buffer/-/clone-buffer-1.0.0.tgz#e3e25b207ac4e701af721e2cb5a16792cac3dc58"
-clone-stats@^0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-0.0.1.tgz#b88f94a82cf38b8791d58046ea4029ad88ca99d1"
-
clone-stats@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/clone-stats/-/clone-stats-1.0.0.tgz#b3782dff8bb5474e18b9b6bf0fdfe782f8777680"
@@ -4333,11 +3335,7 @@ clone@2.1.2, clone@^2.0.0, clone@^2.1.1:
version "2.1.2"
resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f"
-clone@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/clone/-/clone-0.2.0.tgz#c6126a90ad4f72dbf5acdb243cc37724fe93fc1f"
-
-clone@^1.0.0, clone@^1.0.2:
+clone@^1.0.2:
version "1.0.4"
resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e"
@@ -4360,12 +3358,6 @@ co@^4.6.0:
version "4.6.0"
resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184"
-coa@~1.0.1:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/coa/-/coa-1.0.4.tgz#a9ef153660d6a86a8bdec0289a5c684d217432fd"
- dependencies:
- q "^1.1.2"
-
code-point-at@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77"
@@ -4377,10 +3369,6 @@ coinstring@^2.0.0:
bs58 "^2.0.1"
create-hash "^1.1.1"
-collapse-white-space@^1.0.2:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/collapse-white-space/-/collapse-white-space-1.0.4.tgz#ce05cf49e54c3277ae573036a26851ba430a0091"
-
collection-visit@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0"
@@ -4388,57 +3376,23 @@ collection-visit@^1.0.0:
map-visit "^1.0.0"
object-visit "^1.0.0"
-color-convert@^1.3.0, color-convert@^1.9.0:
+color-convert@^1.9.0:
version "1.9.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.1.tgz#c1261107aeb2f294ebffec9ed9ecad529a6097ed"
dependencies:
color-name "^1.1.1"
-color-name@^1.0.0, color-name@^1.1.1:
+color-name@^1.1.1:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
-color-string@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/color-string/-/color-string-0.3.0.tgz#27d46fb67025c5c2fa25993bfbf579e47841b991"
- dependencies:
- color-name "^1.0.0"
-
-color-support@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2"
-
-color@^0.11.0:
- version "0.11.4"
- resolved "https://registry.yarnpkg.com/color/-/color-0.11.4.tgz#6d7b5c74fb65e841cd48792ad1ed5e07b904d764"
- dependencies:
- clone "^1.0.2"
- color-convert "^1.3.0"
- color-string "^0.3.0"
-
-colormin@^1.0.5:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/colormin/-/colormin-1.1.2.tgz#ea2f7420a72b96881a38aae59ec124a6f7298133"
- dependencies:
- color "^0.11.0"
- css-color-names "0.0.4"
- has "^1.0.1"
-
-colors@0.5.x:
- version "0.5.1"
- resolved "https://registry.npmjs.org/colors/-/colors-0.5.1.tgz#7d0023eaeb154e8ee9fce75dcb923d0ed1667774"
-
colors@1.0.x:
version "1.0.3"
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
colors@^1.1.2:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/colors/-/colors-1.2.1.tgz#f4a3d302976aaf042356ba1ade3b1a2c62d9d794"
-
-colors@~1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
+ version "1.3.3"
+ resolved "https://registry.yarnpkg.com/colors/-/colors-1.3.3.tgz#39e005d546afe01e01f9c4ca8fa50f686a01205d"
columnify@^1.5.4:
version "1.5.4"
@@ -4453,12 +3407,6 @@ combined-stream@1.0.6, combined-stream@^1.0.5, combined-stream@~1.0.5, combined-
dependencies:
delayed-stream "~1.0.0"
-comma-separated-tokens@^1.0.0:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/comma-separated-tokens/-/comma-separated-tokens-1.0.5.tgz#b13793131d9ea2d2431cf5b507ddec258f0ce0db"
- dependencies:
- trim "0.0.1"
-
command-exists@^1.2.8:
version "1.2.8"
resolved "https://registry.yarnpkg.com/command-exists/-/command-exists-1.2.8.tgz#715acefdd1223b9c9b37110a149c6392c2852291"
@@ -4471,15 +3419,7 @@ commander@2.15.1, commander@^2.12.1, commander@^2.8.1:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
-commander@2.17.x, commander@^2.7.1, commander@~2.17.1:
- version "2.17.1"
- resolved "https://registry.npmjs.org/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf"
-
-commander@2.18.0:
- version "2.18.0"
- resolved "https://registry.yarnpkg.com/commander/-/commander-2.18.0.tgz#2bf063ddee7c7891176981a2cc798e5754bc6970"
-
-commander@^2.15.1, commander@^2.18.0:
+commander@^2.15.1:
version "2.19.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
@@ -4504,47 +3444,15 @@ compare-func@^1.3.1:
array-ify "^1.0.0"
dot-prop "^3.0.0"
-compare-versions@^3.0.1:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/compare-versions/-/compare-versions-3.1.0.tgz#43310256a5c555aaed4193c04d8f154cf9c6efd5"
-
-component-classes@^1.2.5:
- version "1.2.6"
- resolved "https://registry.yarnpkg.com/component-classes/-/component-classes-1.2.6.tgz#c642394c3618a4d8b0b8919efccbbd930e5cd691"
- dependencies:
- component-indexof "0.0.3"
-
component-emitter@^1.2.1:
version "1.2.1"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.2.1.tgz#137918d6d78283f7df7a6b7c5a63e140e69425e6"
-component-indexof@0.0.3:
- version "0.0.3"
- resolved "https://registry.yarnpkg.com/component-indexof/-/component-indexof-0.0.3.tgz#11d091312239eb8f32c8f25ae9cb002ffe8d3c24"
-
-compressible@~2.0.13:
- version "2.0.13"
- resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.13.tgz#0d1020ab924b2fdb4d6279875c7d6daba6baa7a9"
- dependencies:
- mime-db ">= 1.33.0 < 2"
-
-compression@^1.5.2:
- version "1.7.2"
- resolved "http://registry.npmjs.org/compression/-/compression-1.7.2.tgz#aaffbcd6aaf854b44ebb280353d5ad1651f59a69"
- dependencies:
- accepts "~1.3.4"
- bytes "3.0.0"
- compressible "~2.0.13"
- debug "2.6.9"
- on-headers "~1.0.1"
- safe-buffer "5.1.1"
- vary "~1.1.2"
-
concat-map@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b"
-concat-stream@1.6.2, concat-stream@^1.4.6, concat-stream@^1.5.1, concat-stream@^1.6.0, concat-stream@~1.6.2:
+concat-stream@^1.4.6, concat-stream@^1.5.1, concat-stream@^1.6.0:
version "1.6.2"
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
dependencies:
@@ -4568,21 +3476,6 @@ config-chain@^1.1.11:
ini "^1.3.4"
proto-list "~1.2.1"
-configstore@^3.0.0:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/configstore/-/configstore-3.1.2.tgz#c6f25defaeef26df12dd33414b001fe81a543f8f"
- dependencies:
- dot-prop "^4.1.0"
- graceful-fs "^4.1.2"
- make-dir "^1.0.0"
- unique-string "^1.0.0"
- write-file-atomic "^2.0.0"
- xdg-basedir "^3.0.0"
-
-connect-history-api-fallback@^1.3.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a"
-
console-browserify@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-browserify/-/console-browserify-1.1.0.tgz#f0241c45730a9fc6323b206dbf38edc741d0bb10"
@@ -4593,17 +3486,6 @@ console-control-strings@^1.0.0, console-control-strings@~1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/console-control-strings/-/console-control-strings-1.1.0.tgz#3d7cf4464db6446ea644bf4b39507f9851008e8e"
-console-polyfill@0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/console-polyfill/-/console-polyfill-0.3.0.tgz#84900902a18c47a5eba932be75fa44d23e8af861"
-
-constant-case@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/constant-case/-/constant-case-2.0.0.tgz#4175764d389d3fa9c8ecd29186ed6005243b6a46"
- dependencies:
- snake-case "^2.1.0"
- upper-case "^1.1.1"
-
constants-browserify@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/constants-browserify/-/constants-browserify-1.0.0.tgz#c20b96d8c617748aaf1c16021760cd27fcb8cb75"
@@ -4768,12 +3650,6 @@ conventional-recommended-bump@^4.0.1:
meow "^4.0.0"
q "^1.5.1"
-convert-source-map@^1.4.0:
- version "1.6.0"
- resolved "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.6.0.tgz#51b537a8c43e0f04dec1993bffcdd504e758ac20"
- dependencies:
- safe-buffer "~5.1.1"
-
convert-source-map@^1.5.0, convert-source-map@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.5.1.tgz#b8278097b9bc229365de5c62cf5fcaed8b5599e5"
@@ -4805,25 +3681,6 @@ copy-descriptor@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d"
-copy-to-clipboard@^3, copy-to-clipboard@^3.0.8:
- version "3.0.8"
- resolved "https://registry.npmjs.org/copy-to-clipboard/-/copy-to-clipboard-3.0.8.tgz#f4e82f4a8830dce4666b7eb8ded0c9bcc313aba9"
- dependencies:
- toggle-selection "^1.0.3"
-
-copy-webpack-plugin@^4.5.4:
- version "4.5.4"
- resolved "https://registry.yarnpkg.com/copy-webpack-plugin/-/copy-webpack-plugin-4.5.4.tgz#f2b2782b3cd5225535c3dc166a80067e7d940f27"
- dependencies:
- cacache "^10.0.4"
- find-cache-dir "^1.0.0"
- globby "^7.1.1"
- is-glob "^4.0.0"
- loader-utils "^1.1.0"
- minimatch "^3.0.4"
- p-limit "^1.0.0"
- serialize-javascript "^1.4.0"
-
copyfiles@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.0.0.tgz#bbd78bb78e8fd6db5c67adf54249317b24560f2a"
@@ -4835,10 +3692,6 @@ copyfiles@^2.0.0:
through2 "^2.0.1"
yargs "^11.0.0"
-core-js@^1.0.0:
- version "1.2.7"
- resolved "https://registry.yarnpkg.com/core-js/-/core-js-1.2.7.tgz#652294c14651db28fa93bd2d5ff2983a4f08c636"
-
core-js@^2.4.0, core-js@^2.5.0:
version "2.5.5"
resolved "https://registry.yarnpkg.com/core-js/-/core-js-2.5.5.tgz#b14dde936c640c0579a6b50cabcc132dd6127e3b"
@@ -4906,13 +3759,6 @@ create-hmac@^1.1.0, create-hmac@^1.1.2, create-hmac@^1.1.4:
safe-buffer "^5.0.1"
sha.js "^2.4.8"
-create-react-context@^0.2.1:
- version "0.2.2"
- resolved "https://registry.npmjs.org/create-react-context/-/create-react-context-0.2.2.tgz#9836542f9aaa22868cd7d4a6f82667df38019dca"
- dependencies:
- fbjs "^0.8.0"
- gud "^1.0.0"
-
cross-fetch@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.1.0.tgz#7d4ea7e10a4f3bb73d5c2f0a3791ec3752d39b50"
@@ -4920,7 +3766,14 @@ cross-fetch@^2.1.0:
node-fetch "2.1.1"
whatwg-fetch "2.0.3"
-cross-spawn@^4, cross-spawn@^4.0.0:
+cross-fetch@^2.1.1:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/cross-fetch/-/cross-fetch-2.2.3.tgz#e8a0b3c54598136e037f8650f8e823ccdfac198e"
+ dependencies:
+ node-fetch "2.1.2"
+ whatwg-fetch "2.0.4"
+
+cross-spawn@^4:
version "4.0.2"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-4.0.2.tgz#7b9247621c23adfdd3856004a823cbe397424d41"
dependencies:
@@ -4935,7 +3788,7 @@ cross-spawn@^5.0.1:
shebang-command "^1.2.0"
which "^1.2.9"
-cross-spawn@^6.0.0, cross-spawn@^6.0.4, cross-spawn@^6.0.5:
+cross-spawn@^6.0.0, cross-spawn@^6.0.4:
version "6.0.5"
resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-6.0.5.tgz#4a5ec7c64dfae22c3a14124dbacdee846d80cbc4"
dependencies:
@@ -4977,197 +3830,6 @@ crypto-js@^3.1.4, crypto-js@^3.1.5:
version "3.1.8"
resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.8.tgz#715f070bf6014f2ae992a98b3929258b713f08d5"
-crypto-js@^3.1.9-1:
- version "3.1.9-1"
- resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-3.1.9-1.tgz#fda19e761fc077e01ffbfdc6e9fdfc59e8806cd8"
-
-crypto-random-string@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/crypto-random-string/-/crypto-random-string-1.0.0.tgz#a230f64f568310e1498009940790ec99545bca7e"
-
-css-animation@^1.3.2:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/css-animation/-/css-animation-1.5.0.tgz#c96b9097a5ef74a7be8480b45cc44e4ec6ca2bf5"
- dependencies:
- babel-runtime "6.x"
- component-classes "^1.2.5"
-
-css-color-keywords@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/css-color-keywords/-/css-color-keywords-1.0.0.tgz#fea2616dc676b2962686b3af8dbdbe180b244e05"
-
-css-color-names@0.0.4:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/css-color-names/-/css-color-names-0.0.4.tgz#808adc2e79cf84738069b646cb20ec27beb629e0"
-
-css-in-js-utils@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/css-in-js-utils/-/css-in-js-utils-2.0.1.tgz#3b472b398787291b47cfe3e44fecfdd9e914ba99"
- dependencies:
- hyphenate-style-name "^1.0.2"
- isobject "^3.0.1"
-
-css-loader@0.23.x:
- version "0.23.1"
- resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-0.23.1.tgz#9fa23f2b5c0965235910ad5ecef3b8a36390fe50"
- dependencies:
- css-selector-tokenizer "^0.5.1"
- cssnano ">=2.6.1 <4"
- loader-utils "~0.2.2"
- lodash.camelcase "^3.0.1"
- object-assign "^4.0.1"
- postcss "^5.0.6"
- postcss-modules-extract-imports "^1.0.0"
- postcss-modules-local-by-default "^1.0.1"
- postcss-modules-scope "^1.0.0"
- postcss-modules-values "^1.1.0"
- source-list-map "^0.1.4"
-
-css-mediaquery@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/css-mediaquery/-/css-mediaquery-0.1.2.tgz#6a2c37344928618631c54bd33cedd301da18bea0"
-
-css-select@^1.1.0, css-select@~1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/css-select/-/css-select-1.2.0.tgz#2b3a110539c5355f1cd8d314623e870b121ec858"
- dependencies:
- boolbase "~1.0.0"
- css-what "2.1"
- domutils "1.5.1"
- nth-check "~1.0.1"
-
-css-selector-tokenizer@^0.5.1:
- version "0.5.4"
- resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.5.4.tgz#139bafd34a35fd0c1428487049e0699e6f6a2c21"
- dependencies:
- cssesc "^0.1.0"
- fastparse "^1.1.1"
-
-css-selector-tokenizer@^0.7.0:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/css-selector-tokenizer/-/css-selector-tokenizer-0.7.0.tgz#e6988474ae8c953477bf5e7efecfceccd9cf4c86"
- dependencies:
- cssesc "^0.1.0"
- fastparse "^1.1.1"
- regexpu-core "^1.0.0"
-
-css-to-react-native@^2.0.3:
- version "2.2.0"
- resolved "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.2.0.tgz#d524ef7f39a2747a8914e86563669ba35b7cf2e7"
- dependencies:
- css-color-keywords "^1.0.0"
- fbjs "^0.8.5"
- postcss-value-parser "^3.3.0"
-
-css-to-react-native@^2.2.2:
- version "2.2.2"
- resolved "https://registry.npmjs.org/css-to-react-native/-/css-to-react-native-2.2.2.tgz#c077d0f7bf3e6c915a539e7325821c9dd01f9965"
- dependencies:
- css-color-keywords "^1.0.0"
- fbjs "^0.8.5"
- postcss-value-parser "^3.3.0"
-
-css-tree@1.0.0-alpha.28:
- version "1.0.0-alpha.28"
- resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.28.tgz#8e8968190d886c9477bc8d61e96f61af3f7ffa7f"
- dependencies:
- mdn-data "~1.1.0"
- source-map "^0.5.3"
-
-css-tree@1.0.0-alpha.29:
- version "1.0.0-alpha.29"
- resolved "https://registry.yarnpkg.com/css-tree/-/css-tree-1.0.0-alpha.29.tgz#3fa9d4ef3142cbd1c301e7664c1f352bd82f5a39"
- dependencies:
- mdn-data "~1.1.0"
- source-map "^0.5.3"
-
-css-vendor@^0.3.8:
- version "0.3.8"
- resolved "https://registry.npmjs.org/css-vendor/-/css-vendor-0.3.8.tgz#6421cfd3034ce664fe7673972fd0119fc28941fa"
- dependencies:
- is-in-browser "^1.0.2"
-
-css-what@2.1:
- version "2.1.0"
- resolved "https://registry.npmjs.org/css-what/-/css-what-2.1.0.tgz#9467d032c38cfaefb9f2d79501253062f87fa1bd"
-
-css@2.2.4:
- version "2.2.4"
- resolved "https://registry.yarnpkg.com/css/-/css-2.2.4.tgz#c646755c73971f2bba6a601e2cf2fd71b1298929"
- dependencies:
- inherits "^2.0.3"
- source-map "^0.6.1"
- source-map-resolve "^0.5.2"
- urix "^0.1.0"
-
-cssesc@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-0.1.0.tgz#c814903e45623371a0477b40109aaafbeeaddbb4"
-
-"cssnano@>=2.6.1 <4":
- version "3.10.0"
- resolved "https://registry.yarnpkg.com/cssnano/-/cssnano-3.10.0.tgz#4f38f6cea2b9b17fa01490f23f1dc68ea65c1c38"
- dependencies:
- autoprefixer "^6.3.1"
- decamelize "^1.1.2"
- defined "^1.0.0"
- has "^1.0.1"
- object-assign "^4.0.1"
- postcss "^5.0.14"
- postcss-calc "^5.2.0"
- postcss-colormin "^2.1.8"
- postcss-convert-values "^2.3.4"
- postcss-discard-comments "^2.0.4"
- postcss-discard-duplicates "^2.0.1"
- postcss-discard-empty "^2.0.1"
- postcss-discard-overridden "^0.1.1"
- postcss-discard-unused "^2.2.1"
- postcss-filter-plugins "^2.0.0"
- postcss-merge-idents "^2.1.5"
- postcss-merge-longhand "^2.0.1"
- postcss-merge-rules "^2.0.3"
- postcss-minify-font-values "^1.0.2"
- postcss-minify-gradients "^1.0.1"
- postcss-minify-params "^1.0.4"
- postcss-minify-selectors "^2.0.4"
- postcss-normalize-charset "^1.1.0"
- postcss-normalize-url "^3.0.7"
- postcss-ordered-values "^2.1.0"
- postcss-reduce-idents "^2.2.2"
- postcss-reduce-initial "^1.0.0"
- postcss-reduce-transforms "^1.0.3"
- postcss-svgo "^2.1.1"
- postcss-unique-selectors "^2.0.2"
- postcss-value-parser "^3.2.3"
- postcss-zindex "^2.0.1"
-
-csso@~2.3.1:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/csso/-/csso-2.3.2.tgz#ddd52c587033f49e94b71fc55569f252e8ff5f85"
- dependencies:
- clap "^1.0.9"
- source-map "^0.5.3"
-
-csso@~3.5.0:
- version "3.5.1"
- resolved "https://registry.yarnpkg.com/csso/-/csso-3.5.1.tgz#7b9eb8be61628973c1b261e169d2f024008e758b"
- dependencies:
- css-tree "1.0.0-alpha.29"
-
-cssom@0.3.x, "cssom@>= 0.3.2 < 0.4.0":
- version "0.3.4"
- resolved "https://registry.npmjs.org/cssom/-/cssom-0.3.4.tgz#8cd52e8a3acfd68d3aed38ee0a640177d2f9d797"
-
-cssstyle@^1.0.0:
- version "1.1.1"
- resolved "https://registry.npmjs.org/cssstyle/-/cssstyle-1.1.1.tgz#18b038a9c44d65f7a8e428a653b9f6fe42faf5fb"
- dependencies:
- cssom "0.3.x"
-
-csstype@^2.0.0, csstype@^2.5.2:
- version "2.5.6"
- resolved "https://registry.npmjs.org/csstype/-/csstype-2.5.6.tgz#2ae1db2319642d8b80a668d2d025c6196071e788"
-
csstype@^2.2.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.4.2.tgz#158e36c69566bf968da63d0ba14eda1c20e8643a"
@@ -5186,12 +3848,6 @@ cyclist@~0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-0.2.2.tgz#1b33792e11e914a2fd6d6ed6447464444e5fa640"
-d@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f"
- dependencies:
- es5-ext "^0.10.9"
-
dargs@^4.0.1:
version "4.1.0"
resolved "http://registry.yarnpkg.com/dargs/-/dargs-4.1.0.tgz#03a9dbb4b5c2f139bf14ae53f0b8a2a6a86f4e17"
@@ -5204,45 +3860,19 @@ dashdash@^1.12.0:
dependencies:
assert-plus "^1.0.0"
-data-urls@^1.0.0:
- version "1.0.1"
- resolved "https://registry.npmjs.org/data-urls/-/data-urls-1.0.1.tgz#d416ac3896918f29ca84d81085bc3705834da579"
- dependencies:
- abab "^2.0.0"
- whatwg-mimetype "^2.1.0"
- whatwg-url "^7.0.0"
-
-date-fns@^1.27.2:
- version "1.29.0"
- resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-1.29.0.tgz#12e609cdcb935127311d04d33334e2960a2a54e6"
-
date-now@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b"
-dateformat@^2.0.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-2.2.0.tgz#4065e2013cf9fb916ddfd82efb506ad4c6769062"
-
dateformat@^3.0.0:
version "3.0.3"
resolved "https://registry.yarnpkg.com/dateformat/-/dateformat-3.0.3.tgz#a6e37499a4d9a9cf85ef5872044d62901c9889ae"
-debounce@^1.1.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/debounce/-/debounce-1.2.0.tgz#44a540abc0ea9943018dc0eaa95cce87f65cd131"
-
debug-log@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/debug-log/-/debug-log-1.0.1.tgz#2307632d4c04382b8df8a32f70b895046d52745f"
-debug@2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da"
- dependencies:
- ms "0.7.1"
-
-debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8, debug@^2.6.9:
+debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8:
version "2.6.9"
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
dependencies:
@@ -5254,28 +3884,10 @@ debug@3.1.0, debug@=3.1.0, debug@^3.1.0:
dependencies:
ms "2.0.0"
-debug@^3.2.6:
- version "3.2.6"
- resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b"
- dependencies:
- ms "^2.1.1"
-
-debug@^4.0.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791"
- dependencies:
- ms "^2.1.1"
-
debuglog@^1.0.1:
version "1.0.1"
resolved "http://registry.yarnpkg.com/debuglog/-/debuglog-1.0.1.tgz#aa24ffb9ac3df9a2351837cfb2d279360cd78492"
-decache@^3.0.5:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/decache/-/decache-3.1.0.tgz#4f5036fbd6581fcc97237ac3954a244b9536c2da"
- dependencies:
- find "^0.2.4"
-
decamelize-keys@^1.0.0:
version "1.1.0"
resolved "http://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9"
@@ -5283,7 +3895,7 @@ decamelize-keys@^1.0.0:
decamelize "^1.1.0"
map-obj "^1.0.0"
-decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0:
+decamelize@^1.0.0, decamelize@^1.1.0, decamelize@^1.1.1, decamelize@^1.1.2:
version "1.2.0"
resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290"
@@ -5293,10 +3905,6 @@ decamelize@^2.0.0:
dependencies:
xregexp "4.0.0"
-decko@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/decko/-/decko-1.2.0.tgz#fd43c735e967b8013306884a56fbe665996b6817"
-
decode-uri-component@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545"
@@ -5365,14 +3973,14 @@ deep-eql@^3.0.0:
dependencies:
type-detect "^4.0.0"
-deep-equal@^1.0.1, deep-equal@~1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
-
deep-equal@~0.2.1:
version "0.2.2"
resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-0.2.2.tgz#84b745896f34c684e98f2ce0e42abaf43bba017d"
+deep-equal@~1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5"
+
deep-extend@^0.6.0:
version "0.6.0"
resolved "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac"
@@ -5385,24 +3993,13 @@ deep-is@~0.1.3:
version "0.1.3"
resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34"
-deepmerge@^2.0.1:
- version "2.1.1"
- resolved "https://registry.npmjs.org/deepmerge/-/deepmerge-2.1.1.tgz#e862b4e45ea0555072bf51e7fd0d9845170ae768"
-
-default-gateway@^2.6.0:
- version "2.7.2"
- resolved "https://registry.npmjs.org/default-gateway/-/default-gateway-2.7.2.tgz#b7ef339e5e024b045467af403d50348db4642d0f"
- dependencies:
- execa "^0.10.0"
- ip-regex "^2.1.0"
-
default-require-extensions@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/default-require-extensions/-/default-require-extensions-1.0.0.tgz#f37ea15d3e13ffd9b437d33e1a75b5fb97874cb8"
dependencies:
strip-bom "^2.0.0"
-defaults@^1.0.0, defaults@^1.0.3:
+defaults@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
dependencies:
@@ -5447,48 +4044,21 @@ define-property@^2.0.2:
is-descriptor "^1.0.2"
isobject "^3.0.1"
-defined@^1.0.0, defined@~1.0.0:
+defined@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693"
-del@^2.0.2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/del/-/del-2.2.2.tgz#c12c981d067846c84bcaf862cff930d907ffd1a8"
- dependencies:
- globby "^5.0.0"
- is-path-cwd "^1.0.0"
- is-path-in-cwd "^1.0.0"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
- rimraf "^2.2.8"
-
-del@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5"
- dependencies:
- globby "^6.1.0"
- is-path-cwd "^1.0.0"
- is-path-in-cwd "^1.0.0"
- p-map "^1.1.1"
- pify "^3.0.0"
- rimraf "^2.2.8"
-
delayed-stream@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delayed-stream/-/delayed-stream-1.0.0.tgz#df3ae199acadfb7d440aaae0b29e2272b24ec619"
-delegate@^3.1.2:
- version "3.2.0"
- resolved "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz#b66b71c3158522e8ab5744f720d8ca0c2af59166"
-
delegates@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a"
depcheck@^0.6.9:
- version "0.6.9"
- resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.6.9.tgz#efe6fdf5cf00c2172811bc2a2403d59e5341e519"
+ version "0.6.11"
+ resolved "https://registry.yarnpkg.com/depcheck/-/depcheck-0.6.11.tgz#6b616f2cf8c44ddcfdc5d7c7f7759bc53b479262"
dependencies:
babel-traverse "^6.7.3"
babylon "^6.1.21"
@@ -5511,12 +4081,8 @@ depd@~1.1.1, depd@~1.1.2:
resolved "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9"
deprecate@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/deprecate/-/deprecate-1.0.0.tgz#661490ed2428916a6c8883d8834e5646f4e4a4a8"
-
-deprecated@^0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/deprecated/-/deprecated-0.0.1.tgz#f9c9af5464afa1e7a971458a8bdef2aa94d5bb19"
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/deprecate/-/deprecate-1.1.0.tgz#bbd069d62b232175b4e8459b2650cd2bad51f4b8"
deps-regex@^0.1.4:
version "0.1.4"
@@ -5529,18 +4095,10 @@ des.js@^1.0.0:
inherits "^2.0.1"
minimalistic-assert "^1.0.0"
-desandro-matches-selector@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/desandro-matches-selector/-/desandro-matches-selector-2.0.2.tgz#717beed4dc13e7d8f3762f707a6d58a6774218e1"
-
destroy@~1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/destroy/-/destroy-1.0.4.tgz#978857442c44749e4206613e37946205826abd80"
-detect-file@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/detect-file/-/detect-file-1.0.0.tgz#f0d66d03672a825cb1b73bdb3fe62310c8e552b7"
-
detect-indent@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-4.0.0.tgz#f76d064352cdf43a1cb6ce619c4ee3a9475de208"
@@ -5555,11 +4113,7 @@ detect-libc@^1.0.2, detect-libc@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
-detect-newline@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz#f41f1c10be4b00e87b5f13da680759f2c5bfd3e2"
-
-detect-node@2.0.3, detect-node@^2.0.3:
+detect-node@2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127"
@@ -5597,61 +4151,6 @@ dirty-chai@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/dirty-chai/-/dirty-chai-2.0.1.tgz#6b2162ef17f7943589da840abc96e75bda01aff3"
-discharge@^0.7.1:
- version "0.7.1"
- resolved "https://registry.npmjs.org/discharge/-/discharge-0.7.1.tgz#9067f5b79b1123a565b5aa6f0cacc7305b7e22af"
- dependencies:
- aws-sdk "^2.127.0"
- execa "^0.9.0"
- glob "^7.1.2"
- inquirer "^3.3.0"
- listr "^0.12.0"
- lodash.differenceby "^4.8.0"
- lodash.intersectionby "^4.7.0"
- lodash.intersectionwith "^4.4.0"
- log-symbols "^2.2.0"
- meow "^3.7.0"
- mime "^2.0.3"
- update-notifier "^2.3.0"
-
-discontinuous-range@1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/discontinuous-range/-/discontinuous-range-1.0.0.tgz#e38331f0844bba49b9a9cb71c771585aab1bc65a"
-
-dns-equal@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/dns-equal/-/dns-equal-1.0.0.tgz#b39e7f1da6eb0a75ba9c17324b34753c47e0654d"
-
-dns-packet@^1.3.1:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/dns-packet/-/dns-packet-1.3.1.tgz#12aa426981075be500b910eedcd0b47dd7deda5a"
- dependencies:
- ip "^1.1.0"
- safe-buffer "^5.0.1"
-
-dns-txt@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/dns-txt/-/dns-txt-2.0.2.tgz#b91d806f5d27188e4ab3e7d107d881a1cc4642b6"
- dependencies:
- buffer-indexof "^1.0.0"
-
-docker-modem@^1.0.8:
- version "1.0.8"
- resolved "https://registry.yarnpkg.com/docker-modem/-/docker-modem-1.0.8.tgz#465d3b42764e5c49289454ebc06950c169b7d1fa"
- dependencies:
- JSONStream "1.3.2"
- debug "^3.2.6"
- readable-stream "~1.0.26-4"
- split-ca "^1.0.0"
-
-dockerode@^2.5.7:
- version "2.5.8"
- resolved "https://registry.yarnpkg.com/dockerode/-/dockerode-2.5.8.tgz#1b661e36e1e4f860e25f56e0deabe9f87f1d0acc"
- dependencies:
- concat-stream "~1.6.2"
- docker-modem "^1.0.8"
- tar-fs "~1.16.3"
-
doctrine@0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-0.7.2.tgz#7cb860359ba3be90e040b26b729ce4bfa654c523"
@@ -5659,33 +4158,6 @@ doctrine@0.7.2:
esutils "^1.1.6"
isarray "0.0.1"
-doctrine@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d"
- dependencies:
- esutils "^2.0.2"
-
-dom-align@^1.7.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/dom-align/-/dom-align-1.8.0.tgz#c0e89b5b674c6e836cd248c52c2992135f093654"
-
-dom-converter@~0.2:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/dom-converter/-/dom-converter-0.2.0.tgz#6721a9daee2e293682955b6afe416771627bb768"
- dependencies:
- utila "~0.4"
-
-dom-helpers@^3.2.0, dom-helpers@^3.2.1, dom-helpers@^3.3.1:
- version "3.3.1"
- resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.3.1.tgz#fc1a4e15ffdf60ddde03a480a9c0fece821dd4a6"
-
-dom-serializer@0, dom-serializer@~0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/dom-serializer/-/dom-serializer-0.1.0.tgz#073c697546ce0780ce23be4a28e293e40bc30c82"
- dependencies:
- domelementtype "~1.1.1"
- entities "~1.1.1"
-
dom-walk@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/dom-walk/-/dom-walk-0.1.1.tgz#672226dc74c8f799ad35307df936aba11acd6018"
@@ -5694,96 +4166,22 @@ domain-browser@^1.1.1:
version "1.2.0"
resolved "https://registry.yarnpkg.com/domain-browser/-/domain-browser-1.2.0.tgz#3d31f50191a6749dd1375a7f522e823d42e54eda"
-domelementtype@1, domelementtype@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.3.0.tgz#b17aed82e8ab59e52dd9c19b1756e0fc187204c2"
-
-domelementtype@~1.1.1:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/domelementtype/-/domelementtype-1.1.3.tgz#bd28773e2642881aec51544924299c5cd822185b"
-
-domexception@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/domexception/-/domexception-1.0.1.tgz#937442644ca6a31261ef36e3ec677fe805582c90"
- dependencies:
- webidl-conversions "^4.0.2"
-
-domhandler@2.1:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.1.0.tgz#d2646f5e57f6c3bab11cf6cb05d3c0acf7412594"
- dependencies:
- domelementtype "1"
-
-domhandler@^2.3.0:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-2.4.1.tgz#892e47000a99be55bbf3774ffea0561d8879c259"
- dependencies:
- domelementtype "1"
-
-domhandler@^2.4.2:
- version "2.4.2"
- resolved "https://registry.npmjs.org/domhandler/-/domhandler-2.4.2.tgz#8805097e933d65e85546f726d60f5eb88b44f803"
- dependencies:
- domelementtype "1"
-
-dompurify@^1.0.6:
- version "1.0.7"
- resolved "https://registry.npmjs.org/dompurify/-/dompurify-1.0.7.tgz#33e5c4a5fc84df93b58ca162d1d3f28537aa3ec2"
-
-domutils@1.1:
- version "1.1.6"
- resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.1.6.tgz#bddc3de099b9a2efacc51c623f28f416ecc57485"
- dependencies:
- domelementtype "1"
-
-domutils@1.5.1:
- version "1.5.1"
- resolved "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz#dcd8488a26f563d61079e48c9f7b7e32373682cf"
- dependencies:
- dom-serializer "0"
- domelementtype "1"
-
-domutils@^1.5.1:
- version "1.7.0"
- resolved "https://registry.yarnpkg.com/domutils/-/domutils-1.7.0.tgz#56ea341e834e06e6748af7a1cb25da67ea9f8c2a"
- dependencies:
- dom-serializer "0"
- domelementtype "1"
-
-dot-case@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/dot-case/-/dot-case-2.1.1.tgz#34dcf37f50a8e93c2b3bca8bb7fb9155c7da3bee"
- dependencies:
- no-case "^2.2.0"
-
dot-prop@^3.0.0:
version "3.0.0"
resolved "http://registry.yarnpkg.com/dot-prop/-/dot-prop-3.0.0.tgz#1b708af094a49c9a0e7dbcad790aba539dac1177"
dependencies:
is-obj "^1.0.0"
-dot-prop@^4.1.0, dot-prop@^4.2.0:
+dot-prop@^4.2.0:
version "4.2.0"
resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-4.2.0.tgz#1f19e0c2e1aa0e32797c49799f2837ac6af69c57"
dependencies:
is-obj "^1.0.0"
-dotenv-cli@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/dotenv-cli/-/dotenv-cli-1.4.0.tgz#e8e80830ed88b48a03b5eb7ec26147ca717f7409"
- dependencies:
- cross-spawn "^4.0.0"
- dotenv "^4.0.0"
- minimist "^1.1.3"
-
dotenv@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-4.0.0.tgz#864ef1379aced55ce6f95debecdce179f7a0cd1d"
-dotenv@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/dotenv/-/dotenv-5.0.1.tgz#a5317459bd3d79ab88cff6e44057a6a3fbb1fcef"
-
drbg.js@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/drbg.js/-/drbg.js-1.0.1.tgz#3e36b6c42b37043823cdbc332d58f31e2445480b"
@@ -5792,7 +4190,7 @@ drbg.js@^1.0.1:
create-hash "^1.1.2"
create-hmac "^1.1.4"
-duplexer2@0.0.2, duplexer2@~0.0.2:
+duplexer2@~0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.0.2.tgz#c614dcf67e2fb14995a91711e5a617e8a60a31db"
dependencies:
@@ -5838,17 +4236,13 @@ ee-first@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d"
-ejs@^2.6.1:
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/ejs/-/ejs-2.6.1.tgz#498ec0d495655abc6f23cd61868d926464071aa0"
-
-electron-to-chromium@^1.2.7, electron-to-chromium@^1.3.30:
+electron-to-chromium@^1.3.30:
version "1.3.42"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.42.tgz#95c33bf01d0cc405556aec899fe61fd4d76ea0f9"
-elegant-spinner@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/elegant-spinner/-/elegant-spinner-1.0.1.tgz#db043521c95d7e303fd8f345bedc3349cfb0729e"
+electron-to-chromium@^1.3.47:
+ version "1.3.103"
+ resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.103.tgz#a695777efdbc419cad6cbb0e58458251302cd52f"
elliptic@6.3.3:
version "6.3.3"
@@ -5880,10 +4274,6 @@ elliptic@^3.1.0:
hash.js "^1.0.0"
inherits "^2.0.1"
-emoji-regex@^7.0.1, emoji-regex@^7.0.3:
- version "7.0.3"
- resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156"
-
emojis-list@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389"
@@ -5914,20 +4304,6 @@ end-of-stream@^1.0.0, end-of-stream@^1.1.0:
dependencies:
once "^1.4.0"
-end-of-stream@~0.1.5:
- version "0.1.5"
- resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-0.1.5.tgz#8e177206c3c80837d85632e8b9359dfe8b2f6eaf"
- dependencies:
- once "~1.3.0"
-
-enhanced-resolve@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-4.0.0.tgz#e34a6eaa790f62fccd71d93959f56b2b432db10a"
- dependencies:
- graceful-fs "^4.1.2"
- memory-fs "^0.4.0"
- tapable "^1.0.0"
-
enhanced-resolve@^4.1.0:
version "4.1.0"
resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-4.1.0.tgz#41c7e0bfdfe74ac1ffe1e57ad6a5c6c9f3742a7f"
@@ -5936,59 +4312,11 @@ enhanced-resolve@^4.1.0:
memory-fs "^0.4.0"
tapable "^1.0.0"
-entities@^1.1.1, entities@~1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/entities/-/entities-1.1.1.tgz#6e5c2d0a5621b5dadaecef80b90edfb5cd7772f0"
-
-enzyme-adapter-react-16@^1.5.0:
- version "1.5.0"
- resolved "https://registry.npmjs.org/enzyme-adapter-react-16/-/enzyme-adapter-react-16-1.5.0.tgz#50af8d76a45fe0915de932bd95d34cdca75c0be3"
- dependencies:
- enzyme-adapter-utils "^1.8.0"
- function.prototype.name "^1.1.0"
- object.assign "^4.1.0"
- object.values "^1.0.4"
- prop-types "^15.6.2"
- react-is "^16.4.2"
- react-test-renderer "^16.0.0-0"
-
-enzyme-adapter-utils@^1.8.0:
- version "1.8.0"
- resolved "https://registry.npmjs.org/enzyme-adapter-utils/-/enzyme-adapter-utils-1.8.0.tgz#ee9f07250663a985f1f2caaf297720787da559f1"
- dependencies:
- function.prototype.name "^1.1.0"
- object.assign "^4.1.0"
- prop-types "^15.6.2"
-
-enzyme@^3.6.0:
- version "3.6.0"
- resolved "https://registry.npmjs.org/enzyme/-/enzyme-3.6.0.tgz#d213f280a258f61e901bc663d4cc2d6fd9a9dec8"
- dependencies:
- array.prototype.flat "^1.2.1"
- cheerio "^1.0.0-rc.2"
- function.prototype.name "^1.1.0"
- has "^1.0.3"
- is-boolean-object "^1.0.0"
- is-callable "^1.1.4"
- is-number-object "^1.0.3"
- is-string "^1.0.4"
- is-subset "^0.1.1"
- lodash.escape "^4.0.1"
- lodash.isequal "^4.5.0"
- object-inspect "^1.6.0"
- object-is "^1.0.1"
- object.assign "^4.1.0"
- object.entries "^1.0.4"
- object.values "^1.0.4"
- raf "^3.4.0"
- rst-selector-parser "^2.2.3"
- string.prototype.trim "^1.1.2"
-
err-code@^1.0.0:
version "1.1.2"
resolved "https://registry.yarnpkg.com/err-code/-/err-code-1.1.2.tgz#06e0116d3028f6aef4806849eb0ea6a748ae6960"
-errno@^0.1.1, errno@^0.1.3, errno@~0.1.1, errno@~0.1.7:
+errno@^0.1.3, errno@~0.1.1, errno@~0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/errno/-/errno-0.1.7.tgz#4684d71779ad39af177e3f007996f7c67c852618"
dependencies:
@@ -6000,22 +4328,6 @@ error-ex@^1.2.0, error-ex@^1.3.1:
dependencies:
is-arrayish "^0.2.1"
-error-stack-parser@1.3.3:
- version "1.3.3"
- resolved "https://registry.yarnpkg.com/error-stack-parser/-/error-stack-parser-1.3.3.tgz#fada6e3a9cd2b0e080e6d6fc751418649734f35c"
- dependencies:
- stackframe "^0.3.1"
-
-es-abstract@^1.10.0, es-abstract@^1.5.1, es-abstract@^1.6.1:
- version "1.12.0"
- resolved "https://registry.npmjs.org/es-abstract/-/es-abstract-1.12.0.tgz#9dbbdd27c6856f0001421ca18782d786bf8a6165"
- dependencies:
- es-to-primitive "^1.1.1"
- function-bind "^1.1.1"
- has "^1.0.1"
- is-callable "^1.1.3"
- is-regex "^1.0.4"
-
es-abstract@^1.4.3, es-abstract@^1.5.0:
version "1.11.0"
resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.11.0.tgz#cce87d518f0496893b1a30cd8461835535480681"
@@ -6034,22 +4346,6 @@ es-to-primitive@^1.1.1:
is-date-object "^1.0.1"
is-symbol "^1.0.1"
-es5-ext@^0.10.35, es5-ext@^0.10.9, es5-ext@~0.10.14:
- version "0.10.42"
- resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.42.tgz#8c07dd33af04d5dcd1310b5cef13bea63a89ba8d"
- dependencies:
- es6-iterator "~2.0.3"
- es6-symbol "~3.1.1"
- next-tick "1"
-
-es6-iterator@~2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.3.tgz#a7de889141a05a94b0854403b2d0a0fbfa98f3b7"
- dependencies:
- d "1"
- es5-ext "^0.10.35"
- es6-symbol "^3.1.1"
-
es6-object-assign@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/es6-object-assign/-/es6-object-assign-1.1.0.tgz#c2c3582656247c39ea107cb1e6652b6f9f24523c"
@@ -6058,23 +4354,12 @@ es6-promise@^4.0.3:
version "4.2.4"
resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.4.tgz#dc4221c2b16518760bd8c39a52d8f356fc00ed29"
-es6-promise@^4.1.1:
- version "4.2.5"
- resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.5.tgz#da6d0d5692efb461e082c14817fe2427d8f5d054"
-
es6-promisify@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203"
dependencies:
es6-promise "^4.0.3"
-es6-symbol@^3.1.1, es6-symbol@~3.1.1:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77"
- dependencies:
- d "1"
- es5-ext "~0.10.14"
-
escape-html@~1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988"
@@ -6094,17 +4379,6 @@ escodegen@1.8.x:
optionalDependencies:
source-map "~0.2.0"
-escodegen@^1.9.1:
- version "1.11.0"
- resolved "https://registry.npmjs.org/escodegen/-/escodegen-1.11.0.tgz#b27a9389481d5bfd5bec76f7bb1eb3f8f4556589"
- dependencies:
- esprima "^3.1.3"
- estraverse "^4.2.0"
- esutils "^2.0.2"
- optionator "^0.8.1"
- optionalDependencies:
- source-map "~0.6.1"
-
eslint-scope@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-4.0.0.tgz#50bf3071e9338bcdc43331794a0cb533f0136172"
@@ -6112,88 +4386,14 @@ eslint-scope@^4.0.0:
esrecurse "^4.1.0"
estraverse "^4.1.1"
-eslint-utils@^1.3.1:
- version "1.3.1"
- resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-1.3.1.tgz#9a851ba89ee7c460346f97cf8939c7298827e512"
-
-eslint-visitor-keys@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz#3f3180fb2e291017716acb4c9d6d5b5c34a6a81d"
-
-eslint@^5.6.0:
- version "5.12.0"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-5.12.0.tgz#fab3b908f60c52671fb14e996a450b96c743c859"
- dependencies:
- "@babel/code-frame" "^7.0.0"
- ajv "^6.5.3"
- chalk "^2.1.0"
- cross-spawn "^6.0.5"
- debug "^4.0.1"
- doctrine "^2.1.0"
- eslint-scope "^4.0.0"
- eslint-utils "^1.3.1"
- eslint-visitor-keys "^1.0.0"
- espree "^5.0.0"
- esquery "^1.0.1"
- esutils "^2.0.2"
- file-entry-cache "^2.0.0"
- functional-red-black-tree "^1.0.1"
- glob "^7.1.2"
- globals "^11.7.0"
- ignore "^4.0.6"
- import-fresh "^3.0.0"
- imurmurhash "^0.1.4"
- inquirer "^6.1.0"
- js-yaml "^3.12.0"
- json-stable-stringify-without-jsonify "^1.0.1"
- levn "^0.3.0"
- lodash "^4.17.5"
- minimatch "^3.0.4"
- mkdirp "^0.5.1"
- natural-compare "^1.4.0"
- optionator "^0.8.2"
- path-is-inside "^1.0.2"
- pluralize "^7.0.0"
- progress "^2.0.0"
- regexpp "^2.0.1"
- semver "^5.5.1"
- strip-ansi "^4.0.0"
- strip-json-comments "^2.0.1"
- table "^5.0.2"
- text-table "^0.2.0"
-
-espree@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/espree/-/espree-5.0.0.tgz#fc7f984b62b36a0f543b13fb9cd7b9f4a7f5b65c"
- dependencies:
- acorn "^6.0.2"
- acorn-jsx "^5.0.0"
- eslint-visitor-keys "^1.0.0"
-
-esprima-extract-comments@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/esprima-extract-comments/-/esprima-extract-comments-1.1.0.tgz#0dacab567a5900240de6d344cf18c33617becbc9"
- dependencies:
- esprima "^4.0.0"
-
-esprima@2.7.x, esprima@^2.6.0, esprima@^2.7.1:
+esprima@2.7.x, esprima@^2.7.1:
version "2.7.3"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581"
-esprima@^3.1.3:
- version "3.1.3"
- resolved "https://registry.npmjs.org/esprima/-/esprima-3.1.3.tgz#fdca51cee6133895e3c88d535ce49dbff62a4633"
-
esprima@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804"
-esquery@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.1.tgz#406c51658b1f5991a5f9b62b1dc25b00e3e5c708"
- dependencies:
- estraverse "^4.0.0"
-
esrecurse@^4.1.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/esrecurse/-/esrecurse-4.2.1.tgz#007a3b9fdbc2b3bb87e4879ea19c92fdbd3942cf"
@@ -6204,7 +4404,7 @@ estraverse@^1.9.1:
version "1.9.3"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-1.9.3.tgz#af67f2dc922582415950926091a4005d29c9bb44"
-estraverse@^4.0.0, estraverse@^4.1.0, estraverse@^4.1.1, estraverse@^4.2.0:
+estraverse@^4.1.0, estraverse@^4.1.1:
version "4.2.0"
resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.2.0.tgz#0dee3fed31fcd469618ce7342099fc1afa0bdb13"
@@ -6356,6 +4556,13 @@ ethereum-common@^0.0.18:
version "0.0.18"
resolved "https://registry.yarnpkg.com/ethereum-common/-/ethereum-common-0.0.18.tgz#2fdc3576f232903358976eb39da783213ff9523f"
+ethereum-types@^1.1.6:
+ version "1.1.6"
+ resolved "https://registry.yarnpkg.com/ethereum-types/-/ethereum-types-1.1.6.tgz#14437dbf401de361e70dac6358e5f2915ad3c35d"
+ dependencies:
+ "@types/node" "*"
+ bignumber.js "~4.1.0"
+
ethereumjs-abi@0.6.5:
version "0.6.5"
resolved "https://registry.yarnpkg.com/ethereumjs-abi/-/ethereumjs-abi-0.6.5.tgz#5a637ef16ab43473fa72a29ad90871405b3f5241"
@@ -6405,14 +4612,6 @@ ethereumjs-block@^1.2.2, ethereumjs-block@^1.4.1, ethereumjs-block@^1.6.0, ether
ethereumjs-util "^5.0.0"
merkle-patricia-tree "^2.1.2"
-ethereumjs-blockstream@6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/ethereumjs-blockstream/-/ethereumjs-blockstream-6.0.0.tgz#79d726d1f358935eb65195e91d40344c31e87eff"
- dependencies:
- immutable "3.8.2"
- source-map-support "0.5.6"
- uuid "3.2.1"
-
ethereumjs-common@^0.6.0:
version "0.6.1"
resolved "https://registry.yarnpkg.com/ethereumjs-common/-/ethereumjs-common-0.6.1.tgz#ec98edf315a7f107afb6acc48e937a8266979fae"
@@ -6529,14 +4728,6 @@ ethers@~4.0.4:
uuid "2.0.1"
xmlhttprequest "1.8.0"
-ethjs-abi@0.1.8:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.1.8.tgz#cd288583ed628cdfadaf8adefa3ba1dbcbca6c18"
- dependencies:
- bn.js "4.11.6"
- js-sha3 "0.5.5"
- number-to-bn "1.7.0"
-
ethjs-abi@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/ethjs-abi/-/ethjs-abi-0.2.1.tgz#e0a7a93a7e81163a94477bad56ede524ab6de533"
@@ -6559,10 +4750,6 @@ ethjs-util@^0.1.3:
is-hex-prefixed "1.0.0"
strip-hex-prefix "1.0.0"
-ev-emitter@^1.0.0, ev-emitter@^1.0.1, ev-emitter@^1.0.2:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/ev-emitter/-/ev-emitter-1.1.1.tgz#8f18b0ce5c76a5d18017f71c0a795c65b9138f2a"
-
event-stream@~3.3.0:
version "3.3.4"
resolved "http://registry.npmjs.org/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571"
@@ -6579,15 +4766,7 @@ eventemitter3@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.1.1.tgz#47786bdaa087caf7b1b75e73abc5c7d540158cd0"
-eventemitter3@1.x.x:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-1.2.0.tgz#1c86991d816ad1e504750e73874224ecf3bec508"
-
-eventemitter3@^3.0.0:
- version "3.1.0"
- resolved "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.0.tgz#090b4d6cdbd645ed10bf750d4b5407942d7ba163"
-
-events@1.1.1, events@^1.0.0:
+events@^1.0.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924"
@@ -6599,12 +4778,6 @@ events@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/events/-/events-3.0.0.tgz#9a0a0dfaf62893d92b875b8f2698ca4114973e88"
-eventsource@0.1.6:
- version "0.1.6"
- resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232"
- dependencies:
- original ">=0.0.5"
-
evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz#7fcbdb198dc71959432efe13842684e0525acb02"
@@ -6612,12 +4785,6 @@ evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3:
md5.js "^1.3.4"
safe-buffer "^5.1.1"
-exec-sh@^0.2.0:
- version "0.2.2"
- resolved "https://registry.npmjs.org/exec-sh/-/exec-sh-0.2.2.tgz#2a5e7ffcbd7d0ba2755bdecb16e5a427dfbdec36"
- dependencies:
- merge "^1.2.0"
-
execa@^0.10.0:
version "0.10.0"
resolved "http://registry.yarnpkg.com/execa/-/execa-0.10.0.tgz#ff456a8f53f90f8eccc71a96d11bdfc7f082cb50"
@@ -6642,18 +4809,6 @@ execa@^0.7.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
-execa@^0.9.0:
- version "0.9.0"
- resolved "https://registry.npmjs.org/execa/-/execa-0.9.0.tgz#adb7ce62cf985071f60580deb4a88b9e34712d01"
- dependencies:
- cross-spawn "^5.0.1"
- get-stream "^3.0.0"
- is-stream "^1.1.0"
- npm-run-path "^2.0.0"
- p-finally "^1.0.0"
- signal-exit "^3.0.0"
- strip-eof "^1.0.0"
-
execa@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8"
@@ -6666,18 +4821,6 @@ execa@^1.0.0:
signal-exit "^3.0.0"
strip-eof "^1.0.0"
-exenv@^1.2.1:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/exenv/-/exenv-1.2.2.tgz#2ae78e85d9894158670b03d47bec1f03bd91bb9d"
-
-exit-hook@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8"
-
-exit@^0.1.2:
- version "0.1.2"
- resolved "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c"
-
expand-brackets@^0.1.4:
version "0.1.5"
resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b"
@@ -6706,28 +4849,7 @@ expand-template@^1.0.2:
version "1.1.0"
resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-1.1.0.tgz#e09efba977bf98f9ee0ed25abd0c692e02aec3fc"
-expand-tilde@^2.0.0, expand-tilde@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
- dependencies:
- homedir-polyfill "^1.0.1"
-
-expect@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/expect/-/expect-23.6.0.tgz#1e0c8d3ba9a581c87bd71fb9bc8862d443425f98"
- dependencies:
- ansi-styles "^3.2.0"
- jest-diff "^23.6.0"
- jest-get-type "^22.1.0"
- jest-matcher-utils "^23.6.0"
- jest-message-util "^23.4.0"
- jest-regex-util "^23.3.0"
-
-express-history-api-fallback@2.2.1:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/express-history-api-fallback/-/express-history-api-fallback-2.2.1.tgz#3a2ad27f7bebc90fc533d110d7c6d83097bcd057"
-
-express@4.16.3, express@^4.14.0, express@^4.15.2, express@^4.16.2:
+express@^4.14.0:
version "4.16.3"
resolved "https://registry.yarnpkg.com/express/-/express-4.16.3.tgz#6af8a502350db3246ecc4becf6b5a34d22f7ed53"
dependencies:
@@ -6762,41 +4884,6 @@ express@4.16.3, express@^4.14.0, express@^4.15.2, express@^4.16.2:
utils-merge "1.0.1"
vary "~1.1.2"
-express@^4.16.3:
- version "4.16.4"
- resolved "https://registry.yarnpkg.com/express/-/express-4.16.4.tgz#fddef61926109e24c515ea97fd2f1bdbf62df12e"
- dependencies:
- accepts "~1.3.5"
- array-flatten "1.1.1"
- body-parser "1.18.3"
- content-disposition "0.5.2"
- content-type "~1.0.4"
- cookie "0.3.1"
- cookie-signature "1.0.6"
- debug "2.6.9"
- depd "~1.1.2"
- encodeurl "~1.0.2"
- escape-html "~1.0.3"
- etag "~1.8.1"
- finalhandler "1.1.1"
- fresh "0.5.2"
- merge-descriptors "1.0.1"
- methods "~1.1.2"
- on-finished "~2.3.0"
- parseurl "~1.3.2"
- path-to-regexp "0.1.7"
- proxy-addr "~2.0.4"
- qs "6.5.2"
- range-parser "~1.2.0"
- safe-buffer "5.1.2"
- send "0.16.2"
- serve-static "1.13.2"
- setprototypeof "1.1.0"
- statuses "~1.4.0"
- type-is "~1.6.16"
- utils-merge "1.0.1"
- vary "~1.1.2"
-
extend-shallow@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f"
@@ -6818,7 +4905,7 @@ extend@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
-external-editor@^2.0.4, external-editor@^2.1.0:
+external-editor@^2.1.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
dependencies:
@@ -6853,22 +4940,6 @@ extglob@^2.0.4:
snapdragon "^0.8.1"
to-regex "^3.0.1"
-extract-comments@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/extract-comments/-/extract-comments-1.1.0.tgz#b90bca033a056bd69b8ba1c6b6b120fc2ee95c18"
- dependencies:
- esprima-extract-comments "^1.1.0"
- parse-code-context "^1.0.0"
-
-extract-zip@^1.6.6:
- version "1.6.7"
- resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9"
- dependencies:
- concat-stream "1.6.2"
- debug "2.6.9"
- mkdirp "0.5.1"
- yauzl "2.4.1"
-
extsprintf@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.3.0.tgz#96918440e3041a7a414f8c52e3c574eb3c3e1e05"
@@ -6887,26 +4958,10 @@ fake-merkle-patricia-tree@^1.0.1:
dependencies:
checkpoint-store "^1.1.0"
-fancy-log@^1.1.0:
- version "1.3.2"
- resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.2.tgz#f41125e3d84f2e7d89a43d06d958c8f78be16be1"
- dependencies:
- ansi-gray "^0.1.1"
- color-support "^1.1.3"
- time-stamp "^1.0.0"
-
fast-deep-equal@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614"
-fast-deep-equal@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
-
-fast-diff@^1.1.2:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
-
fast-glob@^2.0.2:
version "2.2.1"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.1.tgz#686c2345be88f3741e174add0be6f2e5b6078889"
@@ -6917,80 +4972,20 @@ fast-glob@^2.0.2:
merge2 "^1.2.1"
micromatch "^3.1.10"
-fast-json-stable-stringify@2.x, fast-json-stable-stringify@^2.0.0:
+fast-json-stable-stringify@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz#d5142c0caee6b1189f87d3a76111064f86c8bbf2"
-fast-levenshtein@^2.0.6, fast-levenshtein@~2.0.4:
+fast-levenshtein@~2.0.4:
version "2.0.6"
resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917"
-fastparse@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/fastparse/-/fastparse-1.1.1.tgz#d1e2643b38a94d7583b479060e6c4affc94071f8"
-
-fault@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/fault/-/fault-1.0.2.tgz#c3d0fec202f172a3a4d414042ad2bb5e2a3ffbaa"
- dependencies:
- format "^0.2.2"
-
-faye-websocket@^0.10.0:
- version "0.10.0"
- resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.10.0.tgz#4e492f8d04dfb6f89003507f6edbf2d501e7c6f4"
- dependencies:
- websocket-driver ">=0.5.1"
-
-faye-websocket@~0.11.0:
- version "0.11.1"
- resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38"
- dependencies:
- websocket-driver ">=0.5.1"
-
-fb-watchman@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/fb-watchman/-/fb-watchman-2.0.0.tgz#54e9abf7dfa2f26cd9b1636c588c1afc05de5d58"
- dependencies:
- bser "^2.0.0"
-
-fbjs@^0.8.0, fbjs@^0.8.1, fbjs@^0.8.16, fbjs@^0.8.5:
- version "0.8.16"
- resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db"
- dependencies:
- core-js "^1.0.0"
- isomorphic-fetch "^2.1.1"
- loose-envify "^1.0.0"
- object-assign "^4.1.0"
- promise "^7.1.1"
- setimmediate "^1.0.5"
- ua-parser-js "^0.7.9"
-
-fbjs@^0.8.12:
- version "0.8.17"
- resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.17.tgz#c4d598ead6949112653d6588b01a5cdcd9f90fdd"
- dependencies:
- core-js "^1.0.0"
- isomorphic-fetch "^2.1.1"
- loose-envify "^1.0.0"
- object-assign "^4.1.0"
- promise "^7.1.1"
- setimmediate "^1.0.5"
- ua-parser-js "^0.7.18"
-
fd-slicer@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65"
dependencies:
pend "~1.2.0"
-fetch-mock@^5.13.1:
- version "5.13.1"
- resolved "https://registry.yarnpkg.com/fetch-mock/-/fetch-mock-5.13.1.tgz#955794a77f3d972f1644b9ace65a0fdfd60f1df7"
- dependencies:
- glob-to-regexp "^0.3.0"
- node-fetch "^1.3.3"
- path-to-regexp "^1.7.0"
-
fetch-ponyfill@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/fetch-ponyfill/-/fetch-ponyfill-4.1.0.tgz#ae3ce5f732c645eab87e4ae8793414709b239893"
@@ -7001,11 +4996,7 @@ figgy-pudding@^3.1.0, figgy-pudding@^3.2.1, figgy-pudding@^3.4.1, figgy-pudding@
version "3.5.1"
resolved "https://registry.yarnpkg.com/figgy-pudding/-/figgy-pudding-3.5.1.tgz#862470112901c727a0e495a80744bd5baa1d6790"
-figlet@^1.1.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/figlet/-/figlet-1.2.1.tgz#48d35df9d9b10b1b3888302e6e57904a0b00509c"
-
-figures@^1.3.5, figures@^1.7.0:
+figures@^1.3.5:
version "1.7.0"
resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e"
dependencies:
@@ -7018,14 +5009,7 @@ figures@^2.0.0:
dependencies:
escape-string-regexp "^1.0.5"
-file-entry-cache@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/file-entry-cache/-/file-entry-cache-2.0.0.tgz#c392990c3e684783d838b8c84a45d8a048458361"
- dependencies:
- flat-cache "^1.2.1"
- object-assign "^4.0.1"
-
-file-type@^3.6.0, file-type@^3.8.0:
+file-type@^3.8.0:
version "3.9.0"
resolved "https://registry.yarnpkg.com/file-type/-/file-type-3.9.0.tgz#257a078384d1db8087bc449d107d52a52672b9e9"
@@ -7041,17 +5025,6 @@ filename-regex@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/filename-regex/-/filename-regex-2.0.1.tgz#c1c4b9bee3e09725ddb106b75c1e301fe2f18b26"
-fileset@^2.0.2:
- version "2.0.3"
- resolved "https://registry.npmjs.org/fileset/-/fileset-2.0.3.tgz#8e7548a96d3cc2327ee5e674168723a333bba2a0"
- dependencies:
- glob "^7.0.3"
- minimatch "^3.0.3"
-
-filesize@^3.5.11, filesize@^3.6.1:
- version "3.6.1"
- resolved "https://registry.yarnpkg.com/filesize/-/filesize-3.6.1.tgz#090bb3ee01b6f801a8a8be99d31710b3422bb317"
-
fill-range@^2.1.0:
version "2.2.3"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-2.2.3.tgz#50b77dfd7e469bc7492470963699fe7a8485a723"
@@ -7099,17 +5072,9 @@ find-cache-dir@^1.0.0:
make-dir "^1.0.0"
pkg-dir "^2.0.0"
-find-cache-dir@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/find-cache-dir/-/find-cache-dir-2.0.0.tgz#4c1faed59f45184530fb9d7fa123a4d04a98472d"
- dependencies:
- commondir "^1.0.1"
- make-dir "^1.0.0"
- pkg-dir "^3.0.0"
-
-find-index@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/find-index/-/find-index-0.1.1.tgz#675d358b2ca3892d795a1ab47232f8b6e2e0dde4"
+find-npm-prefix@^1.0.2:
+ version "1.0.2"
+ resolved "https://registry.yarnpkg.com/find-npm-prefix/-/find-npm-prefix-1.0.2.tgz#8d8ce2c78b3b4b9e66c8acc6a37c231eb841cfdf"
find-up@^1.0.0:
version "1.1.2"
@@ -7130,76 +5095,6 @@ find-up@^3.0.0:
dependencies:
locate-path "^3.0.0"
-find-versions@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/find-versions/-/find-versions-2.0.0.tgz#2ad90d490f6828c1aa40292cf709ac3318210c3c"
- dependencies:
- array-uniq "^1.0.0"
- semver-regex "^1.0.0"
-
-find@^0.2.4:
- version "0.2.9"
- resolved "https://registry.yarnpkg.com/find/-/find-0.2.9.tgz#4b73f1ff9e56ad91b76e716407fe5ffe6554bb8c"
- dependencies:
- traverse-chain "~0.1.0"
-
-findup-sync@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/findup-sync/-/findup-sync-2.0.0.tgz#9326b1488c22d1a6088650a86901b2d9a90a2cbc"
- dependencies:
- detect-file "^1.0.0"
- is-glob "^3.1.0"
- micromatch "^3.0.4"
- resolve-dir "^1.0.1"
-
-fined@^1.0.1:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/fined/-/fined-1.1.0.tgz#b37dc844b76a2f5e7081e884f7c0ae344f153476"
- dependencies:
- expand-tilde "^2.0.2"
- is-plain-object "^2.0.3"
- object.defaults "^1.1.0"
- object.pick "^1.2.0"
- parse-filepath "^1.0.1"
-
-first-chunk-stream@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/first-chunk-stream/-/first-chunk-stream-1.0.0.tgz#59bfb50cd905f60d7c394cd3d9acaab4e6ad934e"
-
-fizzy-ui-utils@^2.0.0:
- version "2.0.7"
- resolved "https://registry.yarnpkg.com/fizzy-ui-utils/-/fizzy-ui-utils-2.0.7.tgz#7df45dcc4eb374a08b65d39bb9a4beedf7330505"
- dependencies:
- desandro-matches-selector "^2.0.0"
-
-flagged-respawn@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/flagged-respawn/-/flagged-respawn-1.0.0.tgz#4e79ae9b2eb38bf86b3bb56bf3e0a56aa5fcabd7"
-
-flat-cache@^1.2.1:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-1.3.0.tgz#d3030b32b38154f4e3b7e9c709f490f7ef97c481"
- dependencies:
- circular-json "^0.3.1"
- del "^2.0.2"
- graceful-fs "^4.1.2"
- write "^0.2.1"
-
-flatten@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.2.tgz#dae46a9d78fbe25292258cc1e780a41d95c03782"
-
-flickity@^2.1.1:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/flickity/-/flickity-2.1.2.tgz#f1be68a75c8d8d8d6df68fb2a49f358268279bd0"
- dependencies:
- desandro-matches-selector "^2.0.0"
- ev-emitter "^1.0.2"
- fizzy-ui-utils "^2.0.0"
- get-size "^2.0.0"
- tap-listener "^2.0.0"
- unidragger "^2.3.0"
-
flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/flush-write-stream/-/flush-write-stream-1.0.3.tgz#c5d586ef38af6097650b49bc41b55fabb19f35bd"
@@ -7207,13 +5102,6 @@ flush-write-stream@^1.0.0, flush-write-stream@^1.0.2:
inherits "^2.0.1"
readable-stream "^2.0.4"
-focus-trap@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/focus-trap/-/focus-trap-3.0.0.tgz#4d2ee044ae66bf7eb6ebc6c93bd7a1039481d7dc"
- dependencies:
- tabbable "^3.1.0"
- xtend "^4.0.1"
-
follow-redirects@^1.3.0:
version "1.5.8"
resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.5.8.tgz#1dbfe13e45ad969f813e86c00e5296f525c885a1"
@@ -7236,13 +5124,7 @@ for-own@^0.1.4:
dependencies:
for-in "^1.0.1"
-for-own@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/for-own/-/for-own-1.0.0.tgz#c63332f415cedc4b04dbfe70cf836494c53cb44b"
- dependencies:
- for-in "^1.0.1"
-
-foreach@^2.0.4, foreach@^2.0.5:
+foreach@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/foreach/-/foreach-2.0.5.tgz#0bee005018aeb260d0a3af3ae658dd0136ec1b99"
@@ -7273,14 +5155,6 @@ form-data@~2.3.1, form-data@~2.3.2:
combined-stream "1.0.6"
mime-types "^2.1.12"
-format-util@^1.0.3:
- version "1.0.3"
- resolved "https://registry.npmjs.org/format-util/-/format-util-1.0.3.tgz#032dca4a116262a12c43f4c3ec8566416c5b2d95"
-
-format@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/format/-/format-0.2.2.tgz#d6170107e9efdc4ed30c9dc39016df942b5cb58b"
-
forwarded@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.1.2.tgz#98c23dab1175657b8c0573e8ceccd91b0ff18c84"
@@ -7361,6 +5235,14 @@ fs-promise@^2.0.0:
mz "^2.6.0"
thenify-all "^1.6.0"
+fs-vacuum@^1.2.10:
+ version "1.2.10"
+ resolved "https://registry.yarnpkg.com/fs-vacuum/-/fs-vacuum-1.2.10.tgz#b7629bec07a4031a2548fdf99f5ecf1cc8b31e36"
+ dependencies:
+ graceful-fs "^4.1.2"
+ path-is-inside "^1.0.1"
+ rimraf "^2.5.2"
+
fs-write-stream-atomic@^1.0.8:
version "1.0.10"
resolved "https://registry.yarnpkg.com/fs-write-stream-atomic/-/fs-write-stream-atomic-1.0.10.tgz#b47df53493ef911df75731e70a9ded0189db40c9"
@@ -7374,13 +5256,6 @@ fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
-fsevents@^1.0.0, fsevents@^1.2.2, fsevents@^1.2.3:
- version "1.2.4"
- resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426"
- dependencies:
- nan "^2.9.2"
- node-pre-gyp "^0.10.0"
-
fsevents@^1.1.2:
version "1.1.3"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.1.3.tgz#11f82318f5fe7bb2cd22965a108e9306208216d8"
@@ -7388,6 +5263,13 @@ fsevents@^1.1.2:
nan "^2.3.0"
node-pre-gyp "^0.6.39"
+fsevents@^1.2.2:
+ version "1.2.4"
+ resolved "https://registry.npmjs.org/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426"
+ dependencies:
+ nan "^2.9.2"
+ node-pre-gyp "^0.10.0"
+
fstream-ignore@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/fstream-ignore/-/fstream-ignore-1.0.5.tgz#9c31dae34767018fe1d249b24dada67d092da105"
@@ -7405,18 +5287,10 @@ fstream@^1.0.0, fstream@^1.0.10, fstream@^1.0.2, fstream@^1.0.8:
mkdirp ">=0.5 0"
rimraf "2"
-function-bind@^1.0.2, function-bind@^1.1.0, function-bind@^1.1.1, function-bind@~1.1.1:
+function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d"
-function.prototype.name@^1.1.0:
- version "1.1.0"
- resolved "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.0.tgz#8bd763cc0af860a859cc5d49384d74b932cd2327"
- dependencies:
- define-properties "^1.1.2"
- function-bind "^1.1.1"
- is-callable "^1.1.3"
-
functional-red-black-tree@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327"
@@ -7427,7 +5301,7 @@ ganache-cli@6.1.8:
dependencies:
source-map-support "^0.5.3"
-ganache-core@^2.3.3:
+ganache-core@^2.2.1:
version "2.3.3"
resolved "https://registry.yarnpkg.com/ganache-core/-/ganache-core-2.3.3.tgz#e35c76d405f0ffba5c48621596fdcc38b0a03136"
dependencies:
@@ -7484,16 +5358,27 @@ gauge@~2.7.3:
strip-ansi "^3.0.1"
wide-align "^1.1.0"
-gaze@^0.5.1:
- version "0.5.2"
- resolved "https://registry.yarnpkg.com/gaze/-/gaze-0.5.2.tgz#40b709537d24d1d45767db5a908689dfe69ac44f"
- dependencies:
- globule "~0.1.0"
-
genfun@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/genfun/-/genfun-4.0.1.tgz#ed10041f2e4a7f1b0a38466d17a5c3e27df1dfc1"
+genfun@^5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537"
+
+gentle-fs@^2.0.0:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/gentle-fs/-/gentle-fs-2.0.1.tgz#585cfd612bfc5cd52471fdb42537f016a5ce3687"
+ dependencies:
+ aproba "^1.1.2"
+ fs-vacuum "^1.2.10"
+ graceful-fs "^4.1.11"
+ iferr "^0.1.5"
+ mkdirp "^0.5.1"
+ path-is-inside "^1.0.2"
+ read-cmd-shim "^1.0.1"
+ slide "^1.1.6"
+
get-caller-file@^1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.2.tgz#f702e63127e7e231c160a80c1554acb70d5047e5"
@@ -7516,18 +5401,10 @@ get-port@^3.2.0:
version "3.2.0"
resolved "http://registry.yarnpkg.com/get-port/-/get-port-3.2.0.tgz#dd7ce7de187c06c8bf353796ac71e099f0980ebc"
-get-size@^2.0.0:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/get-size/-/get-size-2.0.3.tgz#54a1d0256b20ea7ac646516756202769941ad2ef"
-
get-stdin@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe"
-get-stdin@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-5.0.1.tgz#122e161591e21ff4c52530305693f20e6393a398"
-
get-stream@^2.2.0:
version "2.3.1"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-2.3.1.tgz#5f38f93f346009666ee0150a054167f91bdd95de"
@@ -7539,7 +5416,7 @@ get-stream@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14"
-get-stream@^4.0.0:
+get-stream@^4.0.0, get-stream@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
dependencies:
@@ -7642,17 +5519,6 @@ glob-parent@^3.1.0:
is-glob "^3.1.0"
path-dirname "^1.0.0"
-glob-stream@^3.1.5:
- version "3.1.18"
- resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-3.1.18.tgz#9170a5f12b790306fdfe598f313f8f7954fd143b"
- dependencies:
- glob "^4.3.1"
- glob2base "^0.0.12"
- minimatch "^2.0.1"
- ordered-read-streams "^0.1.0"
- through2 "^0.6.1"
- unique-stream "^1.0.0"
-
glob-stream@^6.1.0:
version "6.1.0"
resolved "https://registry.yarnpkg.com/glob-stream/-/glob-stream-6.1.0.tgz#7045c99413b3eb94888d83ab46d0b404cc7bdde4"
@@ -7672,18 +5538,6 @@ glob-to-regexp@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab"
-glob-watcher@^0.0.6:
- version "0.0.6"
- resolved "https://registry.yarnpkg.com/glob-watcher/-/glob-watcher-0.0.6.tgz#b95b4a8df74b39c83298b0c05c978b4d9a3b710b"
- dependencies:
- gaze "^0.5.1"
-
-glob2base@^0.0.12:
- version "0.0.12"
- resolved "https://registry.yarnpkg.com/glob2base/-/glob2base-0.0.12.tgz#9d419b3e28f12e83a362164a277055922c9c0d56"
- dependencies:
- find-index "^0.1.1"
-
glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, glob@~7.1.2:
version "7.1.2"
resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15"
@@ -7695,26 +5549,6 @@ glob@7.1.2, glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glo
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@7.1.3, glob@^7.1.3:
- version "7.1.3"
- resolved "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
- dependencies:
- fs.realpath "^1.0.0"
- inflight "^1.0.4"
- inherits "2"
- minimatch "^3.0.4"
- once "^1.3.0"
- path-is-absolute "^1.0.0"
-
-glob@^4.3.1:
- version "4.5.3"
- resolved "https://registry.yarnpkg.com/glob/-/glob-4.5.3.tgz#c6cb73d3226c1efef04de3c56d012f03377ee15f"
- dependencies:
- inflight "^1.0.4"
- inherits "2"
- minimatch "^2.0.1"
- once "^1.3.0"
-
glob@^5.0.15:
version "5.0.15"
resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1"
@@ -7725,89 +5559,28 @@ glob@^5.0.15:
once "^1.3.0"
path-is-absolute "^1.0.0"
-glob@~3.1.21:
- version "3.1.21"
- resolved "https://registry.yarnpkg.com/glob/-/glob-3.1.21.tgz#d29e0a055dea5138f4d07ed40e8982e83c2066cd"
- dependencies:
- graceful-fs "~1.2.0"
- inherits "1"
- minimatch "~0.2.11"
-
-global-dirs@^0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445"
- dependencies:
- ini "^1.3.4"
-
-global-modules-path@^2.3.0:
- version "2.3.0"
- resolved "https://registry.npmjs.org/global-modules-path/-/global-modules-path-2.3.0.tgz#b0e2bac6beac39745f7db5c59d26a36a0b94f7dc"
-
-global-modules@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/global-modules/-/global-modules-1.0.0.tgz#6d770f0eb523ac78164d72b5e71a8877265cc3ea"
- dependencies:
- global-prefix "^1.0.1"
- is-windows "^1.0.1"
- resolve-dir "^1.0.0"
-
-global-prefix@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
+glob@^7.1.3:
+ version "7.1.3"
+ resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1"
dependencies:
- expand-tilde "^2.0.2"
- homedir-polyfill "^1.0.1"
- ini "^1.3.4"
- is-windows "^1.0.1"
- which "^1.2.14"
+ fs.realpath "^1.0.0"
+ inflight "^1.0.4"
+ inherits "2"
+ minimatch "^3.0.4"
+ once "^1.3.0"
+ path-is-absolute "^1.0.0"
-global@^4.3.0, global@~4.3.0:
+global@~4.3.0:
version "4.3.2"
resolved "https://registry.yarnpkg.com/global/-/global-4.3.2.tgz#e76989268a6c74c38908b1305b10fc0e394e9d0f"
dependencies:
min-document "^2.19.0"
process "~0.5.1"
-globals@^11.7.0:
- version "11.10.0"
- resolved "https://registry.yarnpkg.com/globals/-/globals-11.10.0.tgz#1e09776dffda5e01816b3bb4077c8b59c24eaa50"
-
globals@^9.18.0:
version "9.18.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a"
-globby@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d"
- dependencies:
- array-union "^1.0.1"
- arrify "^1.0.0"
- glob "^7.0.3"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
-
-globby@^6.1.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/globby/-/globby-6.1.0.tgz#f5a6d70e8395e21c858fb0489d64df02424d506c"
- dependencies:
- array-union "^1.0.1"
- glob "^7.0.3"
- object-assign "^4.0.1"
- pify "^2.0.0"
- pinkie-promise "^2.0.0"
-
-globby@^7.1.1:
- version "7.1.1"
- resolved "https://registry.yarnpkg.com/globby/-/globby-7.1.1.tgz#fb2ccff9401f8600945dfada97440cca972b8680"
- dependencies:
- array-union "^1.0.1"
- dir-glob "^2.0.0"
- glob "^7.1.2"
- ignore "^3.3.5"
- pify "^3.0.0"
- slash "^1.0.0"
-
globby@^8.0.1:
version "8.0.1"
resolved "https://registry.yarnpkg.com/globby/-/globby-8.0.1.tgz#b5ad48b8aa80b35b814fc1281ecc851f1d2b5b50"
@@ -7820,26 +5593,6 @@ globby@^8.0.1:
pify "^3.0.0"
slash "^1.0.0"
-globule@~0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/globule/-/globule-0.1.0.tgz#d9c8edde1da79d125a151b79533b978676346ae5"
- dependencies:
- glob "~3.1.21"
- lodash "~1.0.1"
- minimatch "~0.2.11"
-
-glogg@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/glogg/-/glogg-1.0.1.tgz#dcf758e44789cc3f3d32c1f3562a3676e6a34810"
- dependencies:
- sparkles "^1.0.0"
-
-good-listener@^1.2.2:
- version "1.2.2"
- resolved "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz#d53b30cdf9313dffb7dc9a0d477096aa6d145c50"
- dependencies:
- delegate "^3.1.2"
-
got@7.1.0, got@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/got/-/got-7.1.0.tgz#05450fd84094e6bbea56f451a43a9c289166385a"
@@ -7875,7 +5628,7 @@ got@^6.7.1:
unzip-response "^2.0.1"
url-parse-lax "^1.0.0"
-graceful-fs@4.1.15, graceful-fs@^3.0.0, graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9, graceful-fs@~1.2.0:
+graceful-fs@4.1.15, graceful-fs@^4.0.0, graceful-fs@^4.1.10, graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9:
version "4.1.15"
resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz#ffb703e1066e8a0eeaa4c8b80ba9253eeefbfb00"
@@ -7891,61 +5644,6 @@ growl@1.10.5:
version "1.10.5"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
-growly@^1.3.0:
- version "1.3.0"
- resolved "https://registry.npmjs.org/growly/-/growly-1.3.0.tgz#f10748cbe76af964b7c96c93c6bcc28af120c081"
-
-gud@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
-
-gulp-util@^3.0.0:
- version "3.0.8"
- resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.8.tgz#0054e1e744502e27c04c187c3ecc505dd54bbb4f"
- dependencies:
- array-differ "^1.0.0"
- array-uniq "^1.0.2"
- beeper "^1.0.0"
- chalk "^1.0.0"
- dateformat "^2.0.0"
- fancy-log "^1.1.0"
- gulplog "^1.0.0"
- has-gulplog "^0.1.0"
- lodash._reescape "^3.0.0"
- lodash._reevaluate "^3.0.0"
- lodash._reinterpolate "^3.0.0"
- lodash.template "^3.0.0"
- minimist "^1.1.0"
- multipipe "^0.1.2"
- object-assign "^3.0.0"
- replace-ext "0.0.1"
- through2 "^2.0.0"
- vinyl "^0.5.0"
-
-gulp@^3.9.1:
- version "3.9.1"
- resolved "https://registry.yarnpkg.com/gulp/-/gulp-3.9.1.tgz#571ce45928dd40af6514fc4011866016c13845b4"
- dependencies:
- archy "^1.0.0"
- chalk "^1.0.0"
- deprecated "^0.0.1"
- gulp-util "^3.0.0"
- interpret "^1.0.0"
- liftoff "^2.1.0"
- minimist "^1.1.0"
- orchestrator "^0.3.0"
- pretty-hrtime "^1.0.0"
- semver "^4.1.0"
- tildify "^1.0.0"
- v8flags "^2.0.2"
- vinyl-fs "^0.3.0"
-
-gulplog@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/gulplog/-/gulplog-1.0.0.tgz#e28c4d45d05ecbbed818363ce8f9c5926229ffe5"
- dependencies:
- glogg "^1.0.0"
-
gzip-size@^4.0.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-4.1.0.tgz#8ae096257eabe7d69c45be2b67c448124ffb517c"
@@ -7953,18 +5651,7 @@ gzip-size@^4.0.0:
duplexer "^0.1.1"
pify "^3.0.0"
-gzip-size@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-5.0.0.tgz#a55ecd99222f4c48fd8c01c625ce3b349d0a0e80"
- dependencies:
- duplexer "^0.1.1"
- pify "^3.0.0"
-
-handle-thing@^1.2.5:
- version "1.2.5"
- resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4"
-
-handlebars@^4.0.1, handlebars@^4.0.11, handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.6:
+handlebars@^4.0.1, handlebars@^4.0.2, handlebars@^4.0.3, handlebars@^4.0.6:
version "4.0.11"
resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc"
dependencies:
@@ -8021,12 +5708,6 @@ has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
-has-gulplog@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/has-gulplog/-/has-gulplog-0.1.0.tgz#6414c82913697da51590397dafb12f22967811ce"
- dependencies:
- sparkles "^1.0.0"
-
has-symbol-support-x@^1.4.1:
version "1.4.2"
resolved "https://registry.yarnpkg.com/has-symbol-support-x/-/has-symbol-support-x-1.4.2.tgz#1409f98bc00247da45da67cee0a36f282ff26455"
@@ -8078,12 +5759,6 @@ has@^1.0.1, has@~1.0.1:
dependencies:
function-bind "^1.0.2"
-has@^1.0.3:
- version "1.0.3"
- resolved "https://registry.npmjs.org/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796"
- dependencies:
- function-bind "^1.1.1"
-
hash-base@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/hash-base/-/hash-base-2.0.2.tgz#66ea1d856db4e8a5470cadf6fce23ae5244ef2e1"
@@ -8104,19 +5779,6 @@ hash.js@1.1.3, hash.js@^1.0.0, hash.js@^1.0.3:
inherits "^2.0.3"
minimalistic-assert "^1.0.0"
-hast-util-parse-selector@^2.2.0:
- version "2.2.1"
- resolved "https://registry.yarnpkg.com/hast-util-parse-selector/-/hast-util-parse-selector-2.2.1.tgz#4ddbae1ae12c124e3eb91b581d2556441766f0ab"
-
-hastscript@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/hastscript/-/hastscript-5.0.0.tgz#fee10382c1bc4ba3f1be311521d368c047d2c43a"
- dependencies:
- comma-separated-tokens "^1.0.0"
- hast-util-parse-selector "^2.2.0"
- property-information "^5.0.1"
- space-separated-tokens "^1.0.0"
-
hawk@3.1.3, hawk@~3.1.3:
version "3.1.3"
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
@@ -8150,49 +5812,18 @@ hdkey@^1.0.0:
safe-buffer "^5.1.1"
secp256k1 "^3.0.1"
-he@1.1.1, he@1.1.x:
+he@1.1.1:
version "1.1.1"
resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd"
-header-case@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/header-case/-/header-case-1.0.1.tgz#9535973197c144b09613cd65d317ef19963bd02d"
- dependencies:
- no-case "^2.2.0"
- upper-case "^1.1.3"
-
heap@0.2.6:
version "0.2.6"
resolved "https://registry.yarnpkg.com/heap/-/heap-0.2.6.tgz#087e1f10b046932fc8594dd9e6d378afc9d1e5ac"
-highland@2.13.0:
- version "2.13.0"
- resolved "https://registry.yarnpkg.com/highland/-/highland-2.13.0.tgz#a4394d8dcb970cd071a79a20f0762b906258dc19"
- dependencies:
- util-deprecate "^1.0.2"
-
-highlight.js@^9.0.0, highlight.js@^9.11.0, highlight.js@~9.12.0:
+highlight.js@^9.0.0:
version "9.12.0"
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.12.0.tgz#e6d9dbe57cbefe60751f02af336195870c90c01e"
-highlight.js@^9.13.1, highlight.js@^9.6.0:
- version "9.13.1"
- resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-9.13.1.tgz#054586d53a6863311168488a0f58d6c505ce641e"
-
-highlightjs-solidity@^1.0.5:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/highlightjs-solidity/-/highlightjs-solidity-1.0.6.tgz#59394d8a2c57013580d5bfbb62f7df98386ae7ac"
-
-history@^4.7.2:
- version "4.7.2"
- resolved "https://registry.yarnpkg.com/history/-/history-4.7.2.tgz#22b5c7f31633c5b8021c7f4a8a954ac139ee8d5b"
- dependencies:
- invariant "^2.2.1"
- loose-envify "^1.2.0"
- resolve-pathname "^2.2.0"
- value-equal "^0.4.0"
- warning "^3.0.0"
-
hmac-drbg@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/hmac-drbg/-/hmac-drbg-1.0.1.tgz#d2745701025a6c775a6c545793ed502fc0c649a1"
@@ -8209,14 +5840,6 @@ hoek@4.x.x:
version "4.2.1"
resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb"
-hoist-non-react-statics@^2.3.0, hoist-non-react-statics@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.5.0.tgz#d2ca2dfc19c5a91c5a6615ce8e564ef0347e2a40"
-
-hoist-non-react-statics@^2.3.1:
- version "2.5.5"
- resolved "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-2.5.5.tgz#c5903cf409c0dfd908f388e619d86b9c1174cb47"
-
home-or-tmp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/home-or-tmp/-/home-or-tmp-2.0.0.tgz#e36c3f2d2cae7d746a857e38d18d5f32a7882db8"
@@ -8224,16 +5847,6 @@ home-or-tmp@^2.0.0:
os-homedir "^1.0.0"
os-tmpdir "^1.0.1"
-homedir-polyfill@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc"
- dependencies:
- parse-passwd "^1.0.0"
-
-hoopy@^0.1.2:
- version "0.1.4"
- resolved "https://registry.yarnpkg.com/hoopy/-/hoopy-0.1.4.tgz#609207d661100033a9a9402ad3dea677381c1b1d"
-
hosted-git-info@^2.1.4:
version "2.6.0"
resolved "https://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.6.0.tgz#23235b29ab230c576aab0d4f13fc046b0b038222"
@@ -8242,102 +5855,10 @@ hosted-git-info@^2.1.5, hosted-git-info@^2.6.0:
version "2.7.1"
resolved "http://registry.yarnpkg.com/hosted-git-info/-/hosted-git-info-2.7.1.tgz#97f236977bd6e125408930ff6de3eec6281ec047"
-hpack.js@^2.1.6:
- version "2.1.6"
- resolved "https://registry.yarnpkg.com/hpack.js/-/hpack.js-2.1.6.tgz#87774c0949e513f42e84575b3c45681fade2a0b2"
- dependencies:
- inherits "^2.0.1"
- obuf "^1.0.0"
- readable-stream "^2.0.1"
- wbuf "^1.1.0"
-
-html-comment-regex@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.1.tgz#668b93776eaae55ebde8f3ad464b307a4963625e"
-
-html-encoding-sniffer@^1.0.2:
- version "1.0.2"
- resolved "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-1.0.2.tgz#e70d84b94da53aa375e11fe3a351be6642ca46f8"
- dependencies:
- whatwg-encoding "^1.0.1"
-
-html-entities@^1.2.0:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f"
-
-html-minifier@3.5.20, html-minifier@^3.2.3:
- version "3.5.20"
- resolved "https://registry.yarnpkg.com/html-minifier/-/html-minifier-3.5.20.tgz#7b19fd3caa0cb79f7cde5ee5c3abdf8ecaa6bb14"
- dependencies:
- camel-case "3.0.x"
- clean-css "4.2.x"
- commander "2.17.x"
- he "1.1.x"
- param-case "2.1.x"
- relateurl "0.2.x"
- uglify-js "3.4.x"
-
-html-to-react@^1.3.4:
- version "1.3.4"
- resolved "https://registry.npmjs.org/html-to-react/-/html-to-react-1.3.4.tgz#647b3a54fdec73a6461864b129fb0d1eec7d4589"
- dependencies:
- domhandler "^2.4.2"
- escape-string-regexp "^1.0.5"
- htmlparser2 "^3.10.0"
- lodash.camelcase "^4.3.0"
- ramda "^0.26"
-
-html-webpack-plugin@^3.2.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/html-webpack-plugin/-/html-webpack-plugin-3.2.0.tgz#b01abbd723acaaa7b37b6af4492ebda03d9dd37b"
- dependencies:
- html-minifier "^3.2.3"
- loader-utils "^0.2.16"
- lodash "^4.17.3"
- pretty-error "^2.0.2"
- tapable "^1.0.0"
- toposort "^1.0.0"
- util.promisify "1.0.0"
-
-htmlparser2@^3.10.0:
- version "3.10.0"
- resolved "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.10.0.tgz#5f5e422dcf6119c0d983ed36260ce9ded0bee464"
- dependencies:
- domelementtype "^1.3.0"
- domhandler "^2.3.0"
- domutils "^1.5.1"
- entities "^1.1.1"
- inherits "^2.0.1"
- readable-stream "^3.0.6"
-
-htmlparser2@^3.9.1:
- version "3.9.2"
- resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.9.2.tgz#1bdf87acca0f3f9e53fa4fcceb0f4b4cbb00b338"
- dependencies:
- domelementtype "^1.3.0"
- domhandler "^2.3.0"
- domutils "^1.5.1"
- entities "^1.1.1"
- inherits "^2.0.1"
- readable-stream "^2.0.2"
-
-htmlparser2@~3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/htmlparser2/-/htmlparser2-3.3.0.tgz#cc70d05a59f6542e43f0e685c982e14c924a9efe"
- dependencies:
- domelementtype "1"
- domhandler "2.1"
- domutils "1.1"
- readable-stream "1.0"
-
http-cache-semantics@^3.8.1:
version "3.8.1"
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-3.8.1.tgz#39b0e16add9b605bf0a9ef3d9daaf4843b4cacd2"
-http-deceiver@^1.2.7:
- version "1.2.7"
- resolved "https://registry.yarnpkg.com/http-deceiver/-/http-deceiver-1.2.7.tgz#fa7168944ab9a519d337cb0bec7284dc3e723d87"
-
http-errors@1.6.2:
version "1.6.2"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.2.tgz#0a002cc85707192a7e7946ceedc11155f60ec736"
@@ -8347,7 +5868,7 @@ http-errors@1.6.2:
setprototypeof "1.0.3"
statuses ">= 1.3.1 < 2"
-http-errors@1.6.3, http-errors@~1.6.2, http-errors@~1.6.3:
+http-errors@~1.6.2:
version "1.6.3"
resolved "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d"
dependencies:
@@ -8360,10 +5881,6 @@ http-https@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/http-https/-/http-https-1.0.0.tgz#2f908dd5f1db4068c058cd6e6d4ce392c913389b"
-http-parser-js@>=0.4.0:
- version "0.4.11"
- resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.11.tgz#5b720849c650903c27e521633d94696ee95f3529"
-
http-proxy-agent@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/http-proxy-agent/-/http-proxy-agent-2.1.0.tgz#e4821beef5b2142a2026bd73926fe537631c5405"
@@ -8371,22 +5888,6 @@ http-proxy-agent@^2.1.0:
agent-base "4"
debug "3.1.0"
-http-proxy-middleware@~0.18.0:
- version "0.18.0"
- resolved "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab"
- dependencies:
- http-proxy "^1.16.2"
- is-glob "^4.0.0"
- lodash "^4.17.5"
- micromatch "^3.1.9"
-
-http-proxy@^1.16.2:
- version "1.16.2"
- resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.16.2.tgz#06dff292952bf64dbe8471fa9df73066d4f37742"
- dependencies:
- eventemitter3 "1.x.x"
- requires-port "1.x.x"
-
http-signature@~1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
@@ -8427,10 +5928,6 @@ hyperquest@~1.2.0:
duplexer2 "~0.0.2"
through2 "~0.6.3"
-hyphenate-style-name@^1.0.0, hyphenate-style-name@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b"
-
i@0.3.x:
version "0.3.6"
resolved "https://registry.yarnpkg.com/i/-/i-0.3.6.tgz#d96c92732076f072711b6b10fd7d4f65ad8ee23d"
@@ -8439,31 +5936,23 @@ iconv-lite@0.4.19:
version "0.4.19"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
-iconv-lite@0.4.23, iconv-lite@^0.4.4:
- version "0.4.23"
- resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
+iconv-lite@^0.4.17, iconv-lite@~0.4.13:
+ version "0.4.21"
+ resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798"
dependencies:
- safer-buffer ">= 2.1.2 < 3"
+ safer-buffer "^2.1.0"
-iconv-lite@0.4.24, iconv-lite@^0.4.24:
+iconv-lite@^0.4.24:
version "0.4.24"
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
dependencies:
safer-buffer ">= 2.1.2 < 3"
-iconv-lite@^0.4.17, iconv-lite@~0.4.13:
- version "0.4.21"
- resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.21.tgz#c47f8733d02171189ebc4a400f3218d348094798"
+iconv-lite@^0.4.4:
+ version "0.4.23"
+ resolved "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63"
dependencies:
- safer-buffer "^2.1.0"
-
-icss-replace-symbols@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded"
-
-ieee754@1.1.8:
- version "1.1.8"
- resolved "https://registry.npmjs.org/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4"
+ safer-buffer ">= 2.1.2 < 3"
ieee754@^1.1.4:
version "1.1.11"
@@ -8473,10 +5962,6 @@ iferr@^0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/iferr/-/iferr-0.1.5.tgz#c60eed69e6d8fdb6b3104a1fcbca1c192dc5b501"
-ignore-by-default@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/ignore-by-default/-/ignore-by-default-1.0.1.tgz#48ca6d72f6c6a3af00a9ad4ae6876be3889e2b09"
-
ignore-walk@^3.0.1:
version "3.0.1"
resolved "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz#a83e62e7d272ac0e3b551aaa82831a19b69f82f8"
@@ -8487,39 +5972,10 @@ ignore@^3.3.5:
version "3.3.7"
resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.7.tgz#612289bfb3c220e186a58118618d5be8c1bab021"
-ignore@^4.0.6:
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc"
-
-image-size@~0.5.0:
- version "0.5.5"
- resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c"
-
-imagesloaded@^4.1.3:
- version "4.1.4"
- resolved "https://registry.yarnpkg.com/imagesloaded/-/imagesloaded-4.1.4.tgz#1376efcd162bb768c34c3727ac89cc04051f3cc7"
- dependencies:
- ev-emitter "^1.0.0"
-
immediate@^3.2.3:
version "3.2.3"
resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.2.3.tgz#d140fa8f614659bd6541233097ddaac25cdd991c"
-immutable@3.8.2:
- version "3.8.2"
- resolved "https://registry.yarnpkg.com/immutable/-/immutable-3.8.2.tgz#c2439951455bb39913daf281376f1530e104adf3"
-
-import-fresh@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/import-fresh/-/import-fresh-3.0.0.tgz#a3d897f420cab0e671236897f75bc14b4885c390"
- dependencies:
- parent-module "^1.0.0"
- resolve-from "^4.0.0"
-
-import-lazy@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/import-lazy/-/import-lazy-2.1.0.tgz#05698e3d45c88e8d7e9d92cb0584e77f096f3e43"
-
import-local@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
@@ -8527,23 +5983,10 @@ import-local@^1.0.0:
pkg-dir "^2.0.0"
resolve-cwd "^2.0.0"
-import-local@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d"
- dependencies:
- pkg-dir "^3.0.0"
- resolve-cwd "^2.0.0"
-
imurmurhash@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/imurmurhash/-/imurmurhash-0.1.4.tgz#9218b9b2b928a238b13dc4fb6b6d576f231453ea"
-indefinite-observable@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/indefinite-observable/-/indefinite-observable-1.0.1.tgz#09915423cc8d6f7eb1cb7882ad134633c9a6edc3"
- dependencies:
- symbol-observable "1.0.4"
-
indent-string@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-2.1.0.tgz#8e2d48348742121b4a8218b7a137e9a52049dc80"
@@ -8554,10 +5997,6 @@ indent-string@^3.0.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/indent-string/-/indent-string-3.2.0.tgz#4a5fd6d27cc332f37e5419a504dbb837105c9289"
-indexes-of@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607"
-
indexof@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/indexof/-/indexof-0.0.1.tgz#82dc336d232b9062179d05ab3293a66059fd435d"
@@ -8569,10 +6008,6 @@ inflight@^1.0.4:
once "^1.3.0"
wrappy "1"
-inherits@1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/inherits/-/inherits-1.0.2.tgz#ca4309dadee6b54cc0b8d247e8d7c7a0975bdc9b"
-
inherits@2, inherits@2.0.3, inherits@^2.0.1, inherits@^2.0.3, inherits@~2.0.0, inherits@~2.0.1, inherits@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de"
@@ -8581,7 +6016,7 @@ inherits@2.0.1, inherits@=2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.1.tgz#b17d08d326b4423e568eff719f91b0b1cbdf69f1"
-ini@^1.3.2, ini@^1.3.4, ini@~1.3.0:
+ini@^1.3.2, ini@^1.3.4, ini@^1.3.5, ini@~1.3.0:
version "1.3.5"
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.5.tgz#eee25f56db1c9ec6085e0c22778083f596abf927"
@@ -8598,13 +6033,6 @@ init-package-json@^1.10.3:
validate-npm-package-license "^3.0.1"
validate-npm-package-name "^3.0.0"
-inline-style-prefixer@^3.0.8:
- version "3.0.8"
- resolved "https://registry.yarnpkg.com/inline-style-prefixer/-/inline-style-prefixer-3.0.8.tgz#8551b8e5b4d573244e66a34b04f7d32076a2b534"
- dependencies:
- bowser "^1.7.3"
- css-in-js-utils "^2.0.0"
-
inquirer@^0.8.2:
version "0.8.5"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.8.5.tgz#dbd740cf6ca3b731296a63ce6f6d961851f336df"
@@ -8618,25 +6046,6 @@ inquirer@^0.8.2:
rx "^2.4.3"
through "^2.3.6"
-inquirer@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.0"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^2.0.4"
- figures "^2.0.0"
- lodash "^4.3.0"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rx-lite "^4.0.8"
- rx-lite-aggregates "^4.0.8"
- string-width "^2.1.0"
- strip-ansi "^4.0.0"
- through "^2.3.6"
-
inquirer@^5.1.0:
version "5.2.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-5.2.0.tgz#db350c2b73daca77ff1243962e9f22f099685726"
@@ -8655,24 +6064,6 @@ inquirer@^5.1.0:
strip-ansi "^4.0.0"
through "^2.3.6"
-inquirer@^6.1.0:
- version "6.2.1"
- resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.1.tgz#9943fc4882161bdb0b0c9276769c75b32dbfcd52"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.0"
- cli-cursor "^2.1.0"
- cli-width "^2.0.0"
- external-editor "^3.0.0"
- figures "^2.0.0"
- lodash "^4.17.10"
- mute-stream "0.0.7"
- run-async "^2.2.0"
- rxjs "^6.1.0"
- string-width "^2.1.0"
- strip-ansi "^5.0.0"
- through "^2.3.6"
-
inquirer@^6.2.0:
version "6.2.0"
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8"
@@ -8691,18 +6082,11 @@ inquirer@^6.2.0:
strip-ansi "^4.0.0"
through "^2.3.6"
-internal-ip@^3.0.1:
- version "3.0.1"
- resolved "https://registry.npmjs.org/internal-ip/-/internal-ip-3.0.1.tgz#df5c99876e1d2eb2ea2d74f520e3f669a00ece27"
- dependencies:
- default-gateway "^2.6.0"
- ipaddr.js "^1.5.2"
-
-interpret@^1.0.0, interpret@^1.1.0:
+interpret@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.1.0.tgz#7ed1b1410c6a0e0f78cf95d3b8440c63f78b8614"
-invariant@^2.0.0, invariant@^2.2.1, invariant@^2.2.2, invariant@^2.2.4:
+invariant@^2.2.2:
version "2.2.4"
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.4.tgz#610f3c92c9359ce1db616e538008d23ff35158e6"
dependencies:
@@ -8716,11 +6100,7 @@ invert-kv@^2.0.0:
version "2.0.0"
resolved "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02"
-ip-regex@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9"
-
-ip@^1.1.0, ip@^1.1.5:
+ip@^1.1.5:
version "1.1.5"
resolved "https://registry.npmjs.org/ip/-/ip-1.1.5.tgz#bdded70114290828c0a039e72ef25f5aaec4354a"
@@ -8728,18 +6108,6 @@ ipaddr.js@1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.6.0.tgz#e3fa357b773da619f26e95f049d055c72796f86b"
-ipaddr.js@1.8.0:
- version "1.8.0"
- resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.0.tgz#eaa33d6ddd7ace8f7f6fe0c9ca0440e706738b1e"
-
-ipaddr.js@^1.5.2:
- version "1.8.1"
- resolved "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.1.tgz#fa4b79fa47fd3def5e3b159825161c0a519c9427"
-
-is-absolute-url@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-absolute-url/-/is-absolute-url-2.1.0.tgz#50530dfb84fcc9aa7dbe7852e83a37b93b9f2aa6"
-
is-absolute@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-absolute/-/is-absolute-1.0.0.tgz#395e1ae84b11f26ad1795e73c17378e48a301576"
@@ -8759,17 +6127,6 @@ is-accessor-descriptor@^1.0.0:
dependencies:
kind-of "^6.0.0"
-is-alphabetical@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-alphabetical/-/is-alphabetical-1.0.1.tgz#c77079cc91d4efac775be1034bf2d243f95e6f08"
-
-is-alphanumerical@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-alphanumerical/-/is-alphanumerical-1.0.1.tgz#dfb4aa4d1085e33bdb61c2dee9c80e9c6c19f53b"
- dependencies:
- is-alphabetical "^1.0.0"
- is-decimal "^1.0.0"
-
is-arrayish@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d"
@@ -8780,11 +6137,7 @@ is-binary-path@^1.0.0:
dependencies:
binary-extensions "^1.0.0"
-is-boolean-object@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.0.0.tgz#98f8b28030684219a95f375cfbd88ce3405dff93"
-
-is-buffer@^1.1.4, is-buffer@^1.1.5:
+is-buffer@^1.1.5:
version "1.1.6"
resolved "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be"
@@ -8798,10 +6151,6 @@ is-callable@^1.1.1, is-callable@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.3.tgz#86eb75392805ddc33af71c92a0eedf74ee7604b2"
-is-callable@^1.1.4:
- version "1.1.4"
- resolved "https://registry.npmjs.org/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75"
-
is-ci@^1.0.10:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-ci/-/is-ci-1.1.0.tgz#247e4162e7860cebbdaf30b774d6b0ac7dcfe7a5"
@@ -8824,10 +6173,6 @@ is-date-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16"
-is-decimal@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-decimal/-/is-decimal-1.0.1.tgz#f5fb6a94996ad9e8e3761fbfbd091f1fca8c4e82"
-
is-descriptor@^0.1.0:
version "0.1.6"
resolved "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.6.tgz#366d8240dde487ca51823b1ab9f07a10a78251ca"
@@ -8900,10 +6245,6 @@ is-function@^1.0.1, is-function@~1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-function/-/is-function-1.0.1.tgz#12cfb98b65b57dd3d193a3121f5f6e2f437602b5"
-is-generator-fn@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/is-generator-fn/-/is-generator-fn-1.0.0.tgz#969d49e1bb3329f6bb7f09089be26578b2ddd46a"
-
is-glob@^2.0.0, is-glob@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-2.0.1.tgz#d096f926a3ded5600f3fdfd91198cb0888c2d863"
@@ -8926,31 +6267,6 @@ is-hex-prefixed@1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-hex-prefixed/-/is-hex-prefixed-1.0.0.tgz#7d8d37e6ad77e5d127148913c573e082d777f554"
-is-hexadecimal@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-hexadecimal/-/is-hexadecimal-1.0.1.tgz#6e084bbc92061fbb0971ec58b6ce6d404e24da69"
-
-is-in-browser@^1.0.2, is-in-browser@^1.1.3:
- version "1.1.3"
- resolved "https://registry.npmjs.org/is-in-browser/-/is-in-browser-1.1.3.tgz#56ff4db683a078c6082eb95dad7dc62e1d04f835"
-
-is-installed-globally@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/is-installed-globally/-/is-installed-globally-0.1.0.tgz#0dfd98f5a9111716dd535dda6492f67bf3d25a80"
- dependencies:
- global-dirs "^0.1.0"
- is-path-inside "^1.0.0"
-
-is-lower-case@^1.1.0:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/is-lower-case/-/is-lower-case-1.1.3.tgz#7e147be4768dc466db3bfb21cc60b31e6ad69393"
- dependencies:
- lower-case "^1.1.0"
-
-is-mobile@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/is-mobile/-/is-mobile-0.2.2.tgz#0e2e006d99ed2c2155b761df80f2a3619ae2ad9f"
-
is-natural-number@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/is-natural-number/-/is-natural-number-4.0.1.tgz#ab9d76e1db4ced51e35de0c72ebecf09f734cde8"
@@ -8959,14 +6275,6 @@ is-negated-glob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-negated-glob/-/is-negated-glob-1.0.0.tgz#6910bca5da8c95e784b5751b976cf5a10fee36d2"
-is-npm@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-npm/-/is-npm-1.0.0.tgz#f2fb63a65e4905b406c86072765a1a4dc793b9f4"
-
-is-number-object@^1.0.3:
- version "1.0.3"
- resolved "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.3.tgz#f265ab89a9f445034ef6aff15a8f00b00f551799"
-
is-number@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-2.1.0.tgz#01fcbbb393463a548f2f466cce16dece49db908f"
@@ -8991,34 +6299,12 @@ is-object@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-object/-/is-object-1.0.1.tgz#8952688c5ec2ffd6b03ecc85e769e02903083470"
-is-observable@^1.1.0:
- version "1.1.0"
- resolved "https://registry.npmjs.org/is-observable/-/is-observable-1.1.0.tgz#b3e986c8f44de950867cab5403f5a3465005975e"
- dependencies:
- symbol-observable "^1.1.0"
-
is-odd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24"
dependencies:
is-number "^4.0.0"
-is-path-cwd@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d"
-
-is-path-in-cwd@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52"
- dependencies:
- is-path-inside "^1.0.0"
-
-is-path-inside@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036"
- dependencies:
- path-is-inside "^1.0.1"
-
is-plain-obj@^1.0.0, is-plain-obj@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e"
@@ -9065,20 +6351,10 @@ is-stream@^1.0.0, is-stream@^1.0.1, is-stream@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-1.1.0.tgz#12d4a3dd4e68e0b79ceb8dbc84173ae80d91ca44"
-is-string@^1.0.4:
- version "1.0.4"
- resolved "https://registry.npmjs.org/is-string/-/is-string-1.0.4.tgz#cc3a9b69857d621e963725a24caeec873b826e64"
-
is-subset@^0.1.1:
version "0.1.1"
resolved "http://registry.yarnpkg.com/is-subset/-/is-subset-0.1.1.tgz#8a59117d932de1de00f245fcdd39ce43f1e939a6"
-is-svg@^2.0.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/is-svg/-/is-svg-2.1.0.tgz#cf61090da0d9efbcab8722deba6f032208dbb0e9"
- dependencies:
- html-comment-regex "^1.1.0"
-
is-symbol@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.1.tgz#3cc59f00025194b6ab2e38dbae6689256b660572"
@@ -9099,12 +6375,6 @@ is-unc-path@^1.0.0:
dependencies:
unc-path-regex "^0.1.2"
-is-upper-case@^1.1.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/is-upper-case/-/is-upper-case-1.1.2.tgz#8d0b1fa7e7933a1e58483600ec7d9661cbaf756f"
- dependencies:
- upper-case "^1.1.0"
-
is-url@^1.1.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/is-url/-/is-url-1.2.4.tgz#04a4df46d28c4cff3d73d01ff06abeb318a1aa52"
@@ -9117,26 +6387,14 @@ is-valid-glob@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/is-valid-glob/-/is-valid-glob-1.0.0.tgz#29bf3eff701be2d4d315dbacc39bc39fe8f601aa"
-is-whitespace-character@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-whitespace-character/-/is-whitespace-character-1.0.1.tgz#9ae0176f3282b65457a1992cdb084f8a5f833e3b"
-
is-windows@^1.0.1, is-windows@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d"
-is-word-character@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.1.tgz#5a03fa1ea91ace8a6eb0c7cd770eb86d65c8befb"
-
is-wsl@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d"
-is_js@^0.9.0:
- version "0.9.0"
- resolved "https://registry.yarnpkg.com/is_js/-/is_js-0.9.0.tgz#0ab94540502ba7afa24c856aa985561669e9c52d"
-
isarray@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf"
@@ -9145,10 +6403,6 @@ isarray@1.0.0, isarray@^1.0.0, isarray@~1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
-isarray@^2.0.4:
- version "2.0.4"
- resolved "https://registry.npmjs.org/isarray/-/isarray-2.0.4.tgz#38e7bcbb0f3ba1b7933c86ba1894ddfc3781bbb7"
-
isexe@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10"
@@ -9163,7 +6417,7 @@ isobject@^3.0.0, isobject@^3.0.1:
version "3.0.1"
resolved "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df"
-isomorphic-fetch@2.2.1, isomorphic-fetch@^2.1.1, isomorphic-fetch@^2.2.1:
+isomorphic-fetch@2.2.1, isomorphic-fetch@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/isomorphic-fetch/-/isomorphic-fetch-2.2.1.tgz#611ae1acf14f5e81f729507472819fe9733558a9"
dependencies:
@@ -9174,42 +6428,16 @@ isstream@0.1.x, isstream@~0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a"
-istanbul-api@^1.3.1:
- version "1.3.7"
- resolved "https://registry.npmjs.org/istanbul-api/-/istanbul-api-1.3.7.tgz#a86c770d2b03e11e3f778cd7aedd82d2722092aa"
- dependencies:
- async "^2.1.4"
- fileset "^2.0.2"
- istanbul-lib-coverage "^1.2.1"
- istanbul-lib-hook "^1.2.2"
- istanbul-lib-instrument "^1.10.2"
- istanbul-lib-report "^1.1.5"
- istanbul-lib-source-maps "^1.2.6"
- istanbul-reports "^1.5.1"
- js-yaml "^3.7.0"
- mkdirp "^0.5.1"
- once "^1.4.0"
-
istanbul-lib-coverage@^1.1.2, istanbul-lib-coverage@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.0.tgz#f7d8f2e42b97e37fe796114cb0f9d68b5e3a4341"
-istanbul-lib-coverage@^1.2.1:
- version "1.2.1"
- resolved "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-1.2.1.tgz#ccf7edcd0a0bb9b8f729feeb0930470f9af664f0"
-
istanbul-lib-hook@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/istanbul-lib-hook/-/istanbul-lib-hook-1.1.0.tgz#8538d970372cb3716d53e55523dd54b557a8d89b"
dependencies:
append-transform "^0.4.0"
-istanbul-lib-hook@^1.2.2:
- version "1.2.2"
- resolved "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-1.2.2.tgz#bc6bf07f12a641fbf1c85391d0daa8f0aea6bf86"
- dependencies:
- append-transform "^0.4.0"
-
istanbul-lib-instrument@^1.10.0:
version "1.10.1"
resolved "https://registry.yarnpkg.com/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.1.tgz#724b4b6caceba8692d3f1f9d0727e279c401af7b"
@@ -9222,18 +6450,6 @@ istanbul-lib-instrument@^1.10.0:
istanbul-lib-coverage "^1.2.0"
semver "^5.3.0"
-istanbul-lib-instrument@^1.10.1, istanbul-lib-instrument@^1.10.2:
- version "1.10.2"
- resolved "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-1.10.2.tgz#1f55ed10ac3c47f2bdddd5307935126754d0a9ca"
- dependencies:
- babel-generator "^6.18.0"
- babel-template "^6.16.0"
- babel-traverse "^6.18.0"
- babel-types "^6.18.0"
- babylon "^6.18.0"
- istanbul-lib-coverage "^1.2.1"
- semver "^5.3.0"
-
istanbul-lib-report@^1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/istanbul-lib-report/-/istanbul-lib-report-1.1.3.tgz#2df12188c0fa77990c0d2176d2d0ba3394188259"
@@ -9243,15 +6459,6 @@ istanbul-lib-report@^1.1.3:
path-parse "^1.0.5"
supports-color "^3.1.2"
-istanbul-lib-report@^1.1.5:
- version "1.1.5"
- resolved "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-1.1.5.tgz#f2a657fc6282f96170aaf281eb30a458f7f4170c"
- dependencies:
- istanbul-lib-coverage "^1.2.1"
- mkdirp "^0.5.1"
- path-parse "^1.0.5"
- supports-color "^3.1.2"
-
istanbul-lib-source-maps@^1.2.3:
version "1.2.3"
resolved "https://registry.yarnpkg.com/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.3.tgz#20fb54b14e14b3fb6edb6aca3571fd2143db44e6"
@@ -9262,28 +6469,12 @@ istanbul-lib-source-maps@^1.2.3:
rimraf "^2.6.1"
source-map "^0.5.3"
-istanbul-lib-source-maps@^1.2.4, istanbul-lib-source-maps@^1.2.6:
- version "1.2.6"
- resolved "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-1.2.6.tgz#37b9ff661580f8fca11232752ee42e08c6675d8f"
- dependencies:
- debug "^3.1.0"
- istanbul-lib-coverage "^1.2.1"
- mkdirp "^0.5.1"
- rimraf "^2.6.1"
- source-map "^0.5.3"
-
istanbul-reports@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/istanbul-reports/-/istanbul-reports-1.4.0.tgz#3d7b44b912ecbe7652a603662b962120739646a1"
dependencies:
handlebars "^4.0.3"
-istanbul-reports@^1.5.1:
- version "1.5.1"
- resolved "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-1.5.1.tgz#97e4dbf3b515e8c484caea15d6524eebd3ff4e1a"
- dependencies:
- handlebars "^4.0.3"
-
istanbul@^0.4.5:
version "0.4.5"
resolved "https://registry.yarnpkg.com/istanbul/-/istanbul-0.4.5.tgz#65c7d73d4c4da84d4f3ac310b918fb0b8033733b"
@@ -9310,308 +6501,6 @@ isurl@^1.0.0-alpha5:
has-to-string-tag-x "^1.2.0"
is-object "^1.0.1"
-jest-changed-files@^23.4.2:
- version "23.4.2"
- resolved "https://registry.npmjs.org/jest-changed-files/-/jest-changed-files-23.4.2.tgz#1eed688370cd5eebafe4ae93d34bb3b64968fe83"
- dependencies:
- throat "^4.0.0"
-
-jest-cli@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-cli/-/jest-cli-23.6.0.tgz#61ab917744338f443ef2baa282ddffdd658a5da4"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.1"
- exit "^0.1.2"
- glob "^7.1.2"
- graceful-fs "^4.1.11"
- import-local "^1.0.0"
- is-ci "^1.0.10"
- istanbul-api "^1.3.1"
- istanbul-lib-coverage "^1.2.0"
- istanbul-lib-instrument "^1.10.1"
- istanbul-lib-source-maps "^1.2.4"
- jest-changed-files "^23.4.2"
- jest-config "^23.6.0"
- jest-environment-jsdom "^23.4.0"
- jest-get-type "^22.1.0"
- jest-haste-map "^23.6.0"
- jest-message-util "^23.4.0"
- jest-regex-util "^23.3.0"
- jest-resolve-dependencies "^23.6.0"
- jest-runner "^23.6.0"
- jest-runtime "^23.6.0"
- jest-snapshot "^23.6.0"
- jest-util "^23.4.0"
- jest-validate "^23.6.0"
- jest-watcher "^23.4.0"
- jest-worker "^23.2.0"
- micromatch "^2.3.11"
- node-notifier "^5.2.1"
- prompts "^0.1.9"
- realpath-native "^1.0.0"
- rimraf "^2.5.4"
- slash "^1.0.0"
- string-length "^2.0.0"
- strip-ansi "^4.0.0"
- which "^1.2.12"
- yargs "^11.0.0"
-
-jest-config@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-config/-/jest-config-23.6.0.tgz#f82546a90ade2d8c7026fbf6ac5207fc22f8eb1d"
- dependencies:
- babel-core "^6.0.0"
- babel-jest "^23.6.0"
- chalk "^2.0.1"
- glob "^7.1.1"
- jest-environment-jsdom "^23.4.0"
- jest-environment-node "^23.4.0"
- jest-get-type "^22.1.0"
- jest-jasmine2 "^23.6.0"
- jest-regex-util "^23.3.0"
- jest-resolve "^23.6.0"
- jest-util "^23.4.0"
- jest-validate "^23.6.0"
- micromatch "^2.3.11"
- pretty-format "^23.6.0"
-
-jest-diff@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-diff/-/jest-diff-23.6.0.tgz#1500f3f16e850bb3d71233408089be099f610c7d"
- dependencies:
- chalk "^2.0.1"
- diff "^3.2.0"
- jest-get-type "^22.1.0"
- pretty-format "^23.6.0"
-
-jest-docblock@^23.2.0:
- version "23.2.0"
- resolved "https://registry.npmjs.org/jest-docblock/-/jest-docblock-23.2.0.tgz#f085e1f18548d99fdd69b20207e6fd55d91383a7"
- dependencies:
- detect-newline "^2.1.0"
-
-jest-each@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-each/-/jest-each-23.6.0.tgz#ba0c3a82a8054387016139c733a05242d3d71575"
- dependencies:
- chalk "^2.0.1"
- pretty-format "^23.6.0"
-
-jest-environment-jsdom@^23.4.0:
- version "23.4.0"
- resolved "https://registry.npmjs.org/jest-environment-jsdom/-/jest-environment-jsdom-23.4.0.tgz#056a7952b3fea513ac62a140a2c368c79d9e6023"
- dependencies:
- jest-mock "^23.2.0"
- jest-util "^23.4.0"
- jsdom "^11.5.1"
-
-jest-environment-node@^23.4.0:
- version "23.4.0"
- resolved "https://registry.npmjs.org/jest-environment-node/-/jest-environment-node-23.4.0.tgz#57e80ed0841dea303167cce8cd79521debafde10"
- dependencies:
- jest-mock "^23.2.0"
- jest-util "^23.4.0"
-
-jest-get-type@^22.1.0:
- version "22.4.3"
- resolved "https://registry.npmjs.org/jest-get-type/-/jest-get-type-22.4.3.tgz#e3a8504d8479342dd4420236b322869f18900ce4"
-
-jest-haste-map@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-haste-map/-/jest-haste-map-23.6.0.tgz#2e3eb997814ca696d62afdb3f2529f5bbc935e16"
- dependencies:
- fb-watchman "^2.0.0"
- graceful-fs "^4.1.11"
- invariant "^2.2.4"
- jest-docblock "^23.2.0"
- jest-serializer "^23.0.1"
- jest-worker "^23.2.0"
- micromatch "^2.3.11"
- sane "^2.0.0"
-
-jest-jasmine2@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-jasmine2/-/jest-jasmine2-23.6.0.tgz#840e937f848a6c8638df24360ab869cc718592e0"
- dependencies:
- babel-traverse "^6.0.0"
- chalk "^2.0.1"
- co "^4.6.0"
- expect "^23.6.0"
- is-generator-fn "^1.0.0"
- jest-diff "^23.6.0"
- jest-each "^23.6.0"
- jest-matcher-utils "^23.6.0"
- jest-message-util "^23.4.0"
- jest-snapshot "^23.6.0"
- jest-util "^23.4.0"
- pretty-format "^23.6.0"
-
-jest-leak-detector@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-23.6.0.tgz#e4230fd42cf381a1a1971237ad56897de7e171de"
- dependencies:
- pretty-format "^23.6.0"
-
-jest-matcher-utils@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-matcher-utils/-/jest-matcher-utils-23.6.0.tgz#726bcea0c5294261a7417afb6da3186b4b8cac80"
- dependencies:
- chalk "^2.0.1"
- jest-get-type "^22.1.0"
- pretty-format "^23.6.0"
-
-jest-message-util@^23.4.0:
- version "23.4.0"
- resolved "https://registry.npmjs.org/jest-message-util/-/jest-message-util-23.4.0.tgz#17610c50942349508d01a3d1e0bda2c079086a9f"
- dependencies:
- "@babel/code-frame" "^7.0.0-beta.35"
- chalk "^2.0.1"
- micromatch "^2.3.11"
- slash "^1.0.0"
- stack-utils "^1.0.1"
-
-jest-mock@^23.2.0:
- version "23.2.0"
- resolved "https://registry.npmjs.org/jest-mock/-/jest-mock-23.2.0.tgz#ad1c60f29e8719d47c26e1138098b6d18b261134"
-
-jest-regex-util@^23.3.0:
- version "23.3.0"
- resolved "https://registry.npmjs.org/jest-regex-util/-/jest-regex-util-23.3.0.tgz#5f86729547c2785c4002ceaa8f849fe8ca471bc5"
-
-jest-resolve-dependencies@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-resolve-dependencies/-/jest-resolve-dependencies-23.6.0.tgz#b4526af24c8540d9a3fab102c15081cf509b723d"
- dependencies:
- jest-regex-util "^23.3.0"
- jest-snapshot "^23.6.0"
-
-jest-resolve@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-resolve/-/jest-resolve-23.6.0.tgz#cf1d1a24ce7ee7b23d661c33ba2150f3aebfa0ae"
- dependencies:
- browser-resolve "^1.11.3"
- chalk "^2.0.1"
- realpath-native "^1.0.0"
-
-jest-runner@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-runner/-/jest-runner-23.6.0.tgz#3894bd219ffc3f3cb94dc48a4170a2e6f23a5a38"
- dependencies:
- exit "^0.1.2"
- graceful-fs "^4.1.11"
- jest-config "^23.6.0"
- jest-docblock "^23.2.0"
- jest-haste-map "^23.6.0"
- jest-jasmine2 "^23.6.0"
- jest-leak-detector "^23.6.0"
- jest-message-util "^23.4.0"
- jest-runtime "^23.6.0"
- jest-util "^23.4.0"
- jest-worker "^23.2.0"
- source-map-support "^0.5.6"
- throat "^4.0.0"
-
-jest-runtime@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-runtime/-/jest-runtime-23.6.0.tgz#059e58c8ab445917cd0e0d84ac2ba68de8f23082"
- dependencies:
- babel-core "^6.0.0"
- babel-plugin-istanbul "^4.1.6"
- chalk "^2.0.1"
- convert-source-map "^1.4.0"
- exit "^0.1.2"
- fast-json-stable-stringify "^2.0.0"
- graceful-fs "^4.1.11"
- jest-config "^23.6.0"
- jest-haste-map "^23.6.0"
- jest-message-util "^23.4.0"
- jest-regex-util "^23.3.0"
- jest-resolve "^23.6.0"
- jest-snapshot "^23.6.0"
- jest-util "^23.4.0"
- jest-validate "^23.6.0"
- micromatch "^2.3.11"
- realpath-native "^1.0.0"
- slash "^1.0.0"
- strip-bom "3.0.0"
- write-file-atomic "^2.1.0"
- yargs "^11.0.0"
-
-jest-serializer@^23.0.1:
- version "23.0.1"
- resolved "https://registry.npmjs.org/jest-serializer/-/jest-serializer-23.0.1.tgz#a3776aeb311e90fe83fab9e533e85102bd164165"
-
-jest-snapshot@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-snapshot/-/jest-snapshot-23.6.0.tgz#f9c2625d1b18acda01ec2d2b826c0ce58a5aa17a"
- dependencies:
- babel-types "^6.0.0"
- chalk "^2.0.1"
- jest-diff "^23.6.0"
- jest-matcher-utils "^23.6.0"
- jest-message-util "^23.4.0"
- jest-resolve "^23.6.0"
- mkdirp "^0.5.1"
- natural-compare "^1.4.0"
- pretty-format "^23.6.0"
- semver "^5.5.0"
-
-jest-util@^23.4.0:
- version "23.4.0"
- resolved "https://registry.npmjs.org/jest-util/-/jest-util-23.4.0.tgz#4d063cb927baf0a23831ff61bec2cbbf49793561"
- dependencies:
- callsites "^2.0.0"
- chalk "^2.0.1"
- graceful-fs "^4.1.11"
- is-ci "^1.0.10"
- jest-message-util "^23.4.0"
- mkdirp "^0.5.1"
- slash "^1.0.0"
- source-map "^0.6.0"
-
-jest-validate@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474"
- dependencies:
- chalk "^2.0.1"
- jest-get-type "^22.1.0"
- leven "^2.1.0"
- pretty-format "^23.6.0"
-
-jest-watcher@^23.4.0:
- version "23.4.0"
- resolved "https://registry.npmjs.org/jest-watcher/-/jest-watcher-23.4.0.tgz#d2e28ce74f8dad6c6afc922b92cabef6ed05c91c"
- dependencies:
- ansi-escapes "^3.0.0"
- chalk "^2.0.1"
- string-length "^2.0.0"
-
-jest-worker@^23.2.0:
- version "23.2.0"
- resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-23.2.0.tgz#faf706a8da36fae60eb26957257fa7b5d8ea02b9"
- dependencies:
- merge-stream "^1.0.1"
-
-jest@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/jest/-/jest-23.6.0.tgz#ad5835e923ebf6e19e7a1d7529a432edfee7813d"
- dependencies:
- import-local "^1.0.0"
- jest-cli "^23.6.0"
-
-jmespath@0.15.0:
- version "0.15.0"
- resolved "https://registry.npmjs.org/jmespath/-/jmespath-0.15.0.tgz#a3f222a9aae9f966f5d27c796510e28091764217"
-
-js-base64@^2.1.9:
- version "2.4.3"
- resolved "https://registry.yarnpkg.com/js-base64/-/js-base64-2.4.3.tgz#2e545ec2b0f2957f41356510205214e98fad6582"
-
-js-combinatorics@^0.5.3:
- version "0.5.3"
- resolved "https://registry.yarnpkg.com/js-combinatorics/-/js-combinatorics-0.5.3.tgz#5da5a1c4632ec59fdf8d49dccfe59ef088122b15"
-
js-sha3@0.5.5:
version "0.5.5"
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.5.5.tgz#baf0c0e8c54ad5903447df96ade7a4a1bca79a4a"
@@ -9632,73 +6521,31 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
-js-tokens@^4.0.0:
- version "4.0.0"
- resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
-
-js-yaml@3.x, js-yaml@^3.4.2, js-yaml@^3.6.1, js-yaml@^3.7.0:
+js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.7.0:
version "3.11.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.11.0.tgz#597c1a8bd57152f26d622ce4117851a51f5ebaef"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
-js-yaml@^3.11.0:
+js-yaml@^3.4.2:
version "3.12.1"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.1.tgz#295c8632a18a23e054cf5c9d3cecafe678167600"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
-js-yaml@^3.12.0, js-yaml@^3.9.0:
+js-yaml@^3.9.0:
version "3.12.0"
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1"
dependencies:
argparse "^1.0.7"
esprima "^4.0.0"
-js-yaml@~3.7.0:
- version "3.7.0"
- resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80"
- dependencies:
- argparse "^1.0.7"
- esprima "^2.6.0"
-
jsbn@~0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513"
-jsdom@^11.5.1:
- version "11.12.0"
- resolved "https://registry.npmjs.org/jsdom/-/jsdom-11.12.0.tgz#1a80d40ddd378a1de59656e9e6dc5a3ba8657bc8"
- dependencies:
- abab "^2.0.0"
- acorn "^5.5.3"
- acorn-globals "^4.1.0"
- array-equal "^1.0.0"
- cssom ">= 0.3.2 < 0.4.0"
- cssstyle "^1.0.0"
- data-urls "^1.0.0"
- domexception "^1.0.1"
- escodegen "^1.9.1"
- html-encoding-sniffer "^1.0.2"
- left-pad "^1.3.0"
- nwsapi "^2.0.7"
- parse5 "4.0.0"
- pn "^1.1.0"
- request "^2.87.0"
- request-promise-native "^1.0.5"
- sax "^1.2.4"
- symbol-tree "^3.2.2"
- tough-cookie "^2.3.4"
- w3c-hr-time "^1.0.1"
- webidl-conversions "^4.0.2"
- whatwg-encoding "^1.0.3"
- whatwg-mimetype "^2.1.0"
- whatwg-url "^6.4.1"
- ws "^5.2.0"
- xml-name-validator "^3.0.0"
-
jsesc@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-1.3.0.tgz#46c3fec8c1892b12b0833db9bc7622176dbab34b"
@@ -9711,12 +6558,6 @@ json-parse-better-errors@^1.0.0, json-parse-better-errors@^1.0.1, json-parse-bet
version "1.0.2"
resolved "https://registry.yarnpkg.com/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz#bb867cfb3450e69107c131d1c514bab3dc8bcaa9"
-json-pointer@^0.6.0:
- version "0.6.0"
- resolved "https://registry.npmjs.org/json-pointer/-/json-pointer-0.6.0.tgz#8e500550a6aac5464a473377da57aa6cc22828d7"
- dependencies:
- foreach "^2.0.4"
-
json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0:
version "3.6.1"
resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.6.1.tgz#f53084726dc6dedeead0e2c457eeb997135f1e25"
@@ -9727,6 +6568,17 @@ json-rpc-engine@^3.4.0, json-rpc-engine@^3.6.0:
json-rpc-error "^2.0.0"
promise-to-callback "^1.0.0"
+json-rpc-engine@^3.8.0:
+ version "3.8.0"
+ resolved "https://registry.yarnpkg.com/json-rpc-engine/-/json-rpc-engine-3.8.0.tgz#9d4ff447241792e1d0a232f6ef927302bb0c62a9"
+ dependencies:
+ async "^2.0.1"
+ babel-preset-env "^1.7.0"
+ babelify "^7.3.0"
+ json-rpc-error "^2.0.0"
+ promise-to-callback "^1.0.0"
+ safe-event-emitter "^1.0.1"
+
json-rpc-error@2.0.0, json-rpc-error@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/json-rpc-error/-/json-rpc-error-2.0.0.tgz#a7af9c202838b5e905c7250e547f1aff77258a02"
@@ -9737,51 +6589,24 @@ json-rpc-random-id@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-rpc-random-id/-/json-rpc-random-id-1.0.1.tgz#ba49d96aded1444dbb8da3d203748acbbcdec8c8"
-json-schema-ref-parser@^5.1.1:
- version "5.1.2"
- resolved "https://registry.npmjs.org/json-schema-ref-parser/-/json-schema-ref-parser-5.1.2.tgz#c9cdaec76ea894f71eb3776c3b3291dfa62e56c9"
- dependencies:
- call-me-maybe "^1.0.1"
- debug "^3.1.0"
- js-yaml "^3.12.0"
- ono "^4.0.5"
-
json-schema-traverse@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340"
-json-schema-traverse@^0.4.1:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660"
-
json-schema@0.2.3:
version "0.2.3"
resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13"
-json-stable-stringify-without-jsonify@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651"
-
json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af"
dependencies:
jsonify "~0.0.0"
-json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.0, json-stringify-safe@~5.0.1:
+json-stringify-safe@^5.0.1, json-stringify-safe@~5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
-json3@^3.3.2:
- version "3.3.2"
- resolved "https://registry.yarnpkg.com/json3/-/json3-3.3.2.tgz#3c0434743df93e2f5c42aee7b19bcb483575f4e1"
-
-json5@2.x:
- version "2.1.0"
- resolved "https://registry.npmjs.org/json5/-/json5-2.1.0.tgz#e7a0c62c48285c628d20a10b85c89bb807c32850"
- dependencies:
- minimist "^1.2.0"
-
json5@^0.5.0, json5@^0.5.1:
version "0.5.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-0.5.1.tgz#1eade7acc012034ad84e2396767ead9fa5495821"
@@ -9810,11 +6635,7 @@ jsonparse@^1.2.0:
version "1.3.1"
resolved "http://registry.yarnpkg.com/jsonparse/-/jsonparse-1.3.1.tgz#3f4dae4a91fac315f71062f8521cc239f1366280"
-jsonschema-draft4@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/jsonschema-draft4/-/jsonschema-draft4-1.0.0.tgz#f0af2005054f0f0ade7ea2118614b69dc512d865"
-
-jsonschema@*, jsonschema@1.2.4, jsonschema@^1.2.0:
+jsonschema@^1.2.0:
version "1.2.4"
resolved "https://registry.yarnpkg.com/jsonschema/-/jsonschema-1.2.4.tgz#a46bac5d3506a254465bc548876e267c6d0d6464"
@@ -9827,85 +6648,6 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
-jss-camel-case@^6.0.0, jss-camel-case@^6.1.0:
- version "6.1.0"
- resolved "https://registry.npmjs.org/jss-camel-case/-/jss-camel-case-6.1.0.tgz#ccb1ff8d6c701c02a1fed6fb6fb6b7896e11ce44"
- dependencies:
- hyphenate-style-name "^1.0.2"
-
-jss-compose@^5.0.0:
- version "5.0.0"
- resolved "https://registry.npmjs.org/jss-compose/-/jss-compose-5.0.0.tgz#ce01b2e4521d65c37ea42cf49116e5f7ab596484"
- dependencies:
- warning "^3.0.0"
-
-jss-default-unit@^8.0.2:
- version "8.0.2"
- resolved "https://registry.npmjs.org/jss-default-unit/-/jss-default-unit-8.0.2.tgz#cc1e889bae4c0b9419327b314ab1c8e2826890e6"
-
-jss-expand@^5.3.0:
- version "5.3.0"
- resolved "https://registry.npmjs.org/jss-expand/-/jss-expand-5.3.0.tgz#02be076efe650125c842f5bb6fb68786fe441ed6"
-
-jss-extend@^6.2.0:
- version "6.2.0"
- resolved "https://registry.npmjs.org/jss-extend/-/jss-extend-6.2.0.tgz#4af09d0b72fb98ee229970f8ca852fec1ca2a8dc"
- dependencies:
- warning "^3.0.0"
-
-jss-global@^3.0.0:
- version "3.0.0"
- resolved "https://registry.npmjs.org/jss-global/-/jss-global-3.0.0.tgz#e19e5c91ab2b96353c227e30aa2cbd938cdaafa2"
-
-jss-nested@^6.0.1:
- version "6.0.1"
- resolved "https://registry.npmjs.org/jss-nested/-/jss-nested-6.0.1.tgz#ef992b79d6e8f63d939c4397b9d99b5cbbe824ca"
- dependencies:
- warning "^3.0.0"
-
-jss-preset-default@^4.3.0:
- version "4.5.0"
- resolved "https://registry.npmjs.org/jss-preset-default/-/jss-preset-default-4.5.0.tgz#d3a457012ccd7a551312014e394c23c4b301cadd"
- dependencies:
- jss-camel-case "^6.1.0"
- jss-compose "^5.0.0"
- jss-default-unit "^8.0.2"
- jss-expand "^5.3.0"
- jss-extend "^6.2.0"
- jss-global "^3.0.0"
- jss-nested "^6.0.1"
- jss-props-sort "^6.0.0"
- jss-template "^1.0.1"
- jss-vendor-prefixer "^7.0.0"
-
-jss-props-sort@^6.0.0:
- version "6.0.0"
- resolved "https://registry.npmjs.org/jss-props-sort/-/jss-props-sort-6.0.0.tgz#9105101a3b5071fab61e2d85ea74cc22e9b16323"
-
-jss-template@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/jss-template/-/jss-template-1.0.1.tgz#09aed9d86cc547b07f53ef355d7e1777f7da430a"
- dependencies:
- warning "^3.0.0"
-
-jss-vendor-prefixer@^7.0.0:
- version "7.0.0"
- resolved "https://registry.npmjs.org/jss-vendor-prefixer/-/jss-vendor-prefixer-7.0.0.tgz#0166729650015ef19d9f02437c73667231605c71"
- dependencies:
- css-vendor "^0.3.8"
-
-jss@^9.3.3, jss@^9.7.0:
- version "9.8.7"
- resolved "https://registry.npmjs.org/jss/-/jss-9.8.7.tgz#ed9763fc0f2f0260fc8260dac657af61e622ce05"
- dependencies:
- is-in-browser "^1.1.3"
- symbol-observable "^1.1.0"
- warning "^3.0.0"
-
-jump.js@1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/jump.js/-/jump.js-1.0.1.tgz#0de2b1631ba9a1c2c6b8572ad277d877e8503600"
-
just-extend@^1.1.27:
version "1.1.27"
resolved "https://registry.yarnpkg.com/just-extend/-/just-extend-1.1.27.tgz#ec6e79410ff914e472652abfa0e603c03d60e905"
@@ -9926,14 +6668,6 @@ keccakjs@^0.2.0, keccakjs@^0.2.1:
browserify-sha3 "^0.0.1"
sha3 "^1.1.0"
-keycode@^2.1.8, keycode@^2.1.9:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/keycode/-/keycode-2.2.0.tgz#3d0af56dc7b8b8e5cba8d0a97f107204eec22b04"
-
-killable@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b"
-
kind-of@^3.0.2, kind-of@^3.0.3, kind-of@^3.2.0:
version "3.2.2"
resolved "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64"
@@ -9960,16 +6694,6 @@ klaw@^1.0.0:
optionalDependencies:
graceful-fs "^4.1.9"
-kleur@^2.0.1:
- version "2.0.2"
- resolved "https://registry.npmjs.org/kleur/-/kleur-2.0.2.tgz#b704f4944d95e255d038f0cb05fb8a602c55a300"
-
-latest-version@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/latest-version/-/latest-version-3.1.0.tgz#a205383fea322b33b5ae3b18abee0dc2f356ee15"
- dependencies:
- package-json "^4.0.0"
-
lazy-cache@^1.0.3:
version "1.0.4"
resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e"
@@ -10010,10 +6734,6 @@ lead@^1.0.0:
dependencies:
flush-write-stream "^1.0.2"
-left-pad@^1.3.0:
- version "1.3.0"
- resolved "https://registry.npmjs.org/left-pad/-/left-pad-1.3.0.tgz#5b8a3a7765dfe001261dde915589e782f8c94d1e"
-
lerna@^3.0.0-beta.25:
version "3.4.3"
resolved "https://registry.yarnpkg.com/lerna/-/lerna-3.4.3.tgz#501454efb453c65c305802d370ee337f7298787e"
@@ -10036,27 +6756,6 @@ lerna@^3.0.0-beta.25:
import-local "^1.0.0"
npmlog "^4.1.2"
-less-loader@^4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/less-loader/-/less-loader-4.1.0.tgz#2c1352c5b09a4f84101490274fd51674de41363e"
- dependencies:
- clone "^2.1.1"
- loader-utils "^1.1.0"
- pify "^3.0.0"
-
-less@^2.7.2:
- version "2.7.3"
- resolved "https://registry.yarnpkg.com/less/-/less-2.7.3.tgz#cc1260f51c900a9ec0d91fb6998139e02507b63b"
- optionalDependencies:
- errno "^0.1.1"
- graceful-fs "^4.1.2"
- image-size "~0.5.0"
- mime "^1.2.11"
- mkdirp "^0.5.0"
- promise "^7.1.1"
- request "2.81.0"
- source-map "^0.5.3"
-
level-codec@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/level-codec/-/level-codec-9.0.0.tgz#2d3a0e835c4aa8339ec63de3f5a37480b74a5f87"
@@ -10157,17 +6856,38 @@ levelup@^1.2.1:
semver "~5.4.1"
xtend "~4.0.0"
-leven@^2.1.0:
- version "2.1.0"
- resolved "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz#c2e7a9f772094dee9d34202ae8acce4687875580"
-
-levn@^0.3.0, levn@~0.3.0:
+levn@~0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/levn/-/levn-0.3.0.tgz#3b09924edf9f083c0490fdd4c0bc4421e04764ee"
dependencies:
prelude-ls "~1.1.2"
type-check "~0.3.2"
+libnpm@^2.0.1:
+ version "2.0.1"
+ resolved "https://registry.yarnpkg.com/libnpm/-/libnpm-2.0.1.tgz#a48fcdee3c25e13c77eb7c60a0efe561d7fb0d8f"
+ dependencies:
+ bin-links "^1.1.2"
+ bluebird "^3.5.3"
+ find-npm-prefix "^1.0.2"
+ libnpmaccess "^3.0.1"
+ libnpmconfig "^1.2.1"
+ libnpmhook "^5.0.2"
+ libnpmorg "^1.0.0"
+ libnpmpublish "^1.1.0"
+ libnpmsearch "^2.0.0"
+ libnpmteam "^1.0.1"
+ lock-verify "^2.0.2"
+ npm-lifecycle "^2.1.0"
+ npm-logical-tree "^1.2.1"
+ npm-package-arg "^6.1.0"
+ npm-profile "^4.0.1"
+ npm-registry-fetch "^3.8.0"
+ npmlog "^4.1.2"
+ pacote "^9.2.3"
+ read-package-json "^2.0.13"
+ stringify-package "^1.0.0"
+
libnpmaccess@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.0.tgz#33cc9c8a5cb53e87d06bf2e547c2eba974f619af"
@@ -10177,92 +6897,71 @@ libnpmaccess@^3.0.0:
npm-package-arg "^6.1.0"
npm-registry-fetch "^3.8.0"
-liftoff@^2.1.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/liftoff/-/liftoff-2.5.0.tgz#2009291bb31cea861bbf10a7c15a28caf75c31ec"
+libnpmaccess@^3.0.1:
+ version "3.0.1"
+ resolved "https://registry.yarnpkg.com/libnpmaccess/-/libnpmaccess-3.0.1.tgz#5b3a9de621f293d425191aa2e779102f84167fa8"
dependencies:
- extend "^3.0.0"
- findup-sync "^2.0.0"
- fined "^1.0.1"
- flagged-respawn "^1.0.0"
- is-plain-object "^2.0.4"
- object.map "^1.0.0"
- rechoir "^0.6.2"
- resolve "^1.1.7"
+ aproba "^2.0.0"
+ get-stream "^4.0.0"
+ npm-package-arg "^6.1.0"
+ npm-registry-fetch "^3.8.0"
-listr-silent-renderer@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/listr-silent-renderer/-/listr-silent-renderer-1.1.1.tgz#924b5a3757153770bf1a8e3fbf74b8bbf3f9242e"
+libnpmconfig@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/libnpmconfig/-/libnpmconfig-1.2.1.tgz#c0c2f793a74e67d4825e5039e7a02a0044dfcbc0"
+ dependencies:
+ figgy-pudding "^3.5.1"
+ find-up "^3.0.0"
+ ini "^1.3.5"
-listr-update-renderer@^0.2.0:
- version "0.2.0"
- resolved "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.2.0.tgz#ca80e1779b4e70266807e8eed1ad6abe398550f9"
+libnpmhook@^5.0.2:
+ version "5.0.2"
+ resolved "https://registry.yarnpkg.com/libnpmhook/-/libnpmhook-5.0.2.tgz#d12817b0fb893f36f1d5be20017f2aea25825d94"
dependencies:
- chalk "^1.1.3"
- cli-truncate "^0.2.1"
- elegant-spinner "^1.0.1"
- figures "^1.7.0"
- indent-string "^3.0.0"
- log-symbols "^1.0.2"
- log-update "^1.0.2"
- strip-ansi "^3.0.1"
+ aproba "^2.0.0"
+ figgy-pudding "^3.4.1"
+ get-stream "^4.0.0"
+ npm-registry-fetch "^3.8.0"
-listr-update-renderer@^0.4.0:
- version "0.4.0"
- resolved "https://registry.npmjs.org/listr-update-renderer/-/listr-update-renderer-0.4.0.tgz#344d980da2ca2e8b145ba305908f32ae3f4cc8a7"
+libnpmorg@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/libnpmorg/-/libnpmorg-1.0.0.tgz#979b868c48ba28c5820e3bb9d9e73c883c16a232"
dependencies:
- chalk "^1.1.3"
- cli-truncate "^0.2.1"
- elegant-spinner "^1.0.1"
- figures "^1.7.0"
- indent-string "^3.0.0"
- log-symbols "^1.0.2"
- log-update "^1.0.2"
- strip-ansi "^3.0.1"
+ aproba "^2.0.0"
+ figgy-pudding "^3.4.1"
+ get-stream "^4.0.0"
+ npm-registry-fetch "^3.8.0"
-listr-verbose-renderer@^0.4.0:
- version "0.4.1"
- resolved "https://registry.yarnpkg.com/listr-verbose-renderer/-/listr-verbose-renderer-0.4.1.tgz#8206f4cf6d52ddc5827e5fd14989e0e965933a35"
+libnpmpublish@^1.1.0:
+ version "1.1.0"
+ resolved "https://registry.yarnpkg.com/libnpmpublish/-/libnpmpublish-1.1.0.tgz#773bd6fc9ed247e4a41a68ebd69fdc096ea630a3"
dependencies:
- chalk "^1.1.3"
- cli-cursor "^1.0.2"
- date-fns "^1.27.2"
- figures "^1.7.0"
+ aproba "^2.0.0"
+ figgy-pudding "^3.5.1"
+ get-stream "^4.0.0"
+ lodash.clonedeep "^4.5.0"
+ normalize-package-data "^2.4.0"
+ npm-package-arg "^6.1.0"
+ npm-registry-fetch "^3.8.0"
+ semver "^5.5.1"
+ ssri "^6.0.1"
-listr@^0.12.0:
- version "0.12.0"
- resolved "https://registry.npmjs.org/listr/-/listr-0.12.0.tgz#6bce2c0f5603fa49580ea17cd6a00cc0e5fa451a"
+libnpmsearch@^2.0.0:
+ version "2.0.0"
+ resolved "https://registry.yarnpkg.com/libnpmsearch/-/libnpmsearch-2.0.0.tgz#de05af47ada81554a5f64276a69599070d4a5685"
dependencies:
- chalk "^1.1.3"
- cli-truncate "^0.2.1"
- figures "^1.7.0"
- indent-string "^2.1.0"
- is-promise "^2.1.0"
- is-stream "^1.1.0"
- listr-silent-renderer "^1.1.1"
- listr-update-renderer "^0.2.0"
- listr-verbose-renderer "^0.4.0"
- log-symbols "^1.0.2"
- log-update "^1.0.2"
- ora "^0.2.3"
- p-map "^1.1.1"
- rxjs "^5.0.0-beta.11"
- stream-to-observable "^0.1.0"
- strip-ansi "^3.0.1"
+ figgy-pudding "^3.5.1"
+ get-stream "^4.0.0"
+ npm-registry-fetch "^3.8.0"
-listr@^0.14.2:
- version "0.14.2"
- resolved "https://registry.npmjs.org/listr/-/listr-0.14.2.tgz#cbe44b021100a15376addfc2d79349ee430bfe14"
+libnpmteam@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/libnpmteam/-/libnpmteam-1.0.1.tgz#ff704b1b6c06ea674b3b1101ac3e305f5114f213"
dependencies:
- "@samverschueren/stream-to-observable" "^0.3.0"
- is-observable "^1.1.0"
- is-promise "^2.1.0"
- is-stream "^1.1.0"
- listr-silent-renderer "^1.1.1"
- listr-update-renderer "^0.4.0"
- listr-verbose-renderer "^0.4.0"
- p-map "^1.1.1"
- rxjs "^6.1.0"
+ aproba "^2.0.0"
+ figgy-pudding "^3.4.1"
+ get-stream "^4.0.0"
+ npm-registry-fetch "^3.8.0"
load-json-file@^1.0.0:
version "1.1.0"
@@ -10296,7 +6995,7 @@ loader-runner@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/loader-runner/-/loader-runner-2.3.0.tgz#f482aea82d543e07921700d5a46ef26fdac6b8a2"
-loader-utils@1.1.0, loader-utils@^1.1.0:
+loader-utils@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-1.1.0.tgz#c98aef488bcceda2ffb5e2de646d6a754429f5cd"
dependencies:
@@ -10304,15 +7003,6 @@ loader-utils@1.1.0, loader-utils@^1.1.0:
emojis-list "^2.0.0"
json5 "^0.5.0"
-loader-utils@^0.2.16, loader-utils@~0.2.2:
- version "0.2.17"
- resolved "https://registry.yarnpkg.com/loader-utils/-/loader-utils-0.2.17.tgz#f86e6374d43205a6e6c60e9196f17c0299bfb348"
- dependencies:
- big.js "^3.1.3"
- emojis-list "^2.0.0"
- json5 "^0.5.0"
- object-assign "^4.0.1"
-
locate-path@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/locate-path/-/locate-path-2.0.0.tgz#2b568b265eec944c6d9c0de9c3dbbbca0354cd8e"
@@ -10327,144 +7017,34 @@ locate-path@^3.0.0:
p-locate "^3.0.0"
path-exists "^3.0.0"
-lodash-es@^4.17.5, lodash-es@^4.2.1:
- version "4.17.8"
- resolved "https://registry.yarnpkg.com/lodash-es/-/lodash-es-4.17.8.tgz#6fa8c8c5d337481df0bdf1c0d899d42473121e45"
-
-lodash._basecopy@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/lodash._basecopy/-/lodash._basecopy-3.0.1.tgz#8da0e6a876cf344c0ad8a54882111dd3c5c7ca36"
-
-lodash._basetostring@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/lodash._basetostring/-/lodash._basetostring-3.0.1.tgz#d1861d877f824a52f669832dcaf3ee15566a07d5"
-
-lodash._basevalues@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._basevalues/-/lodash._basevalues-3.0.0.tgz#5b775762802bde3d3297503e26300820fdf661b7"
-
-lodash._createcompounder@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._createcompounder/-/lodash._createcompounder-3.0.0.tgz#5dd2cb55372d6e70e0e2392fb2304d6631091075"
+lock-verify@^2.0.2:
+ version "2.0.2"
+ resolved "https://registry.yarnpkg.com/lock-verify/-/lock-verify-2.0.2.tgz#148e4f85974915c9e3c34d694b7de9ecb18ee7a8"
dependencies:
- lodash.deburr "^3.0.0"
- lodash.words "^3.0.0"
-
-lodash._getnative@^3.0.0:
- version "3.9.1"
- resolved "https://registry.yarnpkg.com/lodash._getnative/-/lodash._getnative-3.9.1.tgz#570bc7dede46d61cdcde687d65d3eecbaa3aaff5"
-
-lodash._isiterateecall@^3.0.0:
- version "3.0.9"
- resolved "https://registry.yarnpkg.com/lodash._isiterateecall/-/lodash._isiterateecall-3.0.9.tgz#5203ad7ba425fae842460e696db9cf3e6aac057c"
-
-lodash._reescape@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._reescape/-/lodash._reescape-3.0.0.tgz#2b1d6f5dfe07c8a355753e5f27fac7f1cde1616a"
-
-lodash._reevaluate@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed"
+ npm-package-arg "^5.1.2 || 6"
+ semver "^5.4.1"
-lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0:
+lodash._reinterpolate@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d"
-lodash._root@^3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/lodash._root/-/lodash._root-3.0.1.tgz#fba1c4524c19ee9a5f8136b4609f017cf4ded692"
-
lodash.assign@^4.0.3, lodash.assign@^4.0.6:
version "4.2.0"
resolved "https://registry.yarnpkg.com/lodash.assign/-/lodash.assign-4.2.0.tgz#0d99f3ccd7a6d261d19bdaeb9245005d285808e7"
-lodash.camelcase@^3.0.1:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/lodash.camelcase/-/lodash.camelcase-3.0.1.tgz#932c8b87f8a4377897c67197533282f97aeac298"
- dependencies:
- lodash._createcompounder "^3.0.0"
-
-lodash.camelcase@^4.3.0:
- version "4.3.0"
- resolved "https://registry.npmjs.org/lodash.camelcase/-/lodash.camelcase-4.3.0.tgz#b28aa6288a2b9fc651035c7711f65ab6190331a6"
+lodash.clonedeep@^4.5.0:
+ version "4.5.0"
+ resolved "https://registry.yarnpkg.com/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz#e23f3f9c4f8fbdde872529c1071857a086e5ccef"
lodash.debounce@^4.0.8:
version "4.0.8"
resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af"
-lodash.deburr@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/lodash.deburr/-/lodash.deburr-3.2.0.tgz#6da8f54334a366a7cf4c4c76ef8d80aa1b365ed5"
- dependencies:
- lodash._root "^3.0.0"
-
-lodash.differenceby@^4.8.0:
- version "4.8.0"
- resolved "https://registry.npmjs.org/lodash.differenceby/-/lodash.differenceby-4.8.0.tgz#cfd59e94353af5de51da5d302ca4ebff33faac57"
-
-lodash.escape@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/lodash.escape/-/lodash.escape-3.2.0.tgz#995ee0dc18c1b48cc92effae71a10aab5b487698"
- dependencies:
- lodash._root "^3.0.0"
-
-lodash.escape@^4.0.1:
- version "4.0.1"
- resolved "https://registry.npmjs.org/lodash.escape/-/lodash.escape-4.0.1.tgz#c9044690c21e04294beaa517712fded1fa88de98"
-
-lodash.find@^4.3.0:
- version "4.6.0"
- resolved "https://registry.npmjs.org/lodash.find/-/lodash.find-4.6.0.tgz#cb0704d47ab71789ffa0de8b97dd926fb88b13b1"
-
-lodash.flattendeep@^4.4.0:
- version "4.4.0"
- resolved "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz#fb030917f86a3134e5bc9bec0d69e0013ddfedb2"
-
-lodash.foreach@^4.2.0, lodash.foreach@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.foreach/-/lodash.foreach-4.5.0.tgz#1a6a35eace401280c7f06dddec35165ab27e3e53"
-
-lodash.get@^4.0.0, lodash.get@^4.4.2:
+lodash.get@^4.4.2:
version "4.4.2"
resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99"
-lodash.intersectionby@^4.7.0:
- version "4.7.0"
- resolved "https://registry.npmjs.org/lodash.intersectionby/-/lodash.intersectionby-4.7.0.tgz#12f125e4da00b22290febda1b6c1b68bb9255125"
-
-lodash.intersectionwith@^4.4.0:
- version "4.4.0"
- resolved "https://registry.npmjs.org/lodash.intersectionwith/-/lodash.intersectionwith-4.4.0.tgz#818949e293052ba7fc73a440f6114c2c81c38e1c"
-
-lodash.isarguments@^3.0.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/lodash.isarguments/-/lodash.isarguments-3.1.0.tgz#2f573d85c6a24289ff00663b491c1d338ff3458a"
-
-lodash.isarray@^3.0.0:
- version "3.0.4"
- resolved "https://registry.yarnpkg.com/lodash.isarray/-/lodash.isarray-3.0.4.tgz#79e4eb88c36a8122af86f844aa9bcd851b5fbb55"
-
-lodash.isequal@^4.0.0, lodash.isequal@^4.5.0:
- version "4.5.0"
- resolved "https://registry.npmjs.org/lodash.isequal/-/lodash.isequal-4.5.0.tgz#415c4478f2bcc30120c22ce10ed3226f7d3e18e0"
-
-lodash.isplainobject@^4.0.6:
- version "4.0.6"
- resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb"
-
-lodash.keys@^3.0.0, lodash.keys@^3.1.2:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/lodash.keys/-/lodash.keys-3.1.2.tgz#4dbc0472b156be50a0b286855d1bd0b0c656098a"
- dependencies:
- lodash._getnative "^3.0.0"
- lodash.isarguments "^3.0.0"
- lodash.isarray "^3.0.0"
-
-lodash.memoize@^4.1.2:
- version "4.1.2"
- resolved "https://registry.yarnpkg.com/lodash.memoize/-/lodash.memoize-4.1.2.tgz#bcc6c49a42a2840ed997f323eada5ecd182e0bfe"
-
-lodash.merge@^4.6.0, lodash.merge@^4.6.1:
+lodash.merge@^4.6.1:
version "4.6.1"
resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.1.tgz#adc25d9cb99b9391c59624f379fbba60d7111d54"
@@ -10480,32 +7060,10 @@ lodash.padstart@^4.1.0:
version "4.6.1"
resolved "https://registry.yarnpkg.com/lodash.padstart/-/lodash.padstart-4.6.1.tgz#d2e3eebff0d9d39ad50f5cbd1b52a7bce6bb611b"
-lodash.reduce@^4.3.0:
- version "4.6.0"
- resolved "https://registry.npmjs.org/lodash.reduce/-/lodash.reduce-4.6.0.tgz#f1ab6b839299ad48f784abbf476596f03b914d3b"
-
-lodash.restparam@^3.0.0:
- version "3.6.1"
- resolved "https://registry.yarnpkg.com/lodash.restparam/-/lodash.restparam-3.6.1.tgz#936a4e309ef330a7645ed4145986c85ae5b20805"
-
lodash.sortby@^4.7.0:
version "4.7.0"
resolved "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz#edd14c824e2cc9c1e0b0a1b42bb5210516a42438"
-lodash.template@^3.0.0:
- version "3.6.2"
- resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-3.6.2.tgz#f8cdecc6169a255be9098ae8b0c53d378931d14f"
- dependencies:
- lodash._basecopy "^3.0.0"
- lodash._basetostring "^3.0.0"
- lodash._basevalues "^3.0.0"
- lodash._isiterateecall "^3.0.0"
- lodash._reinterpolate "^3.0.0"
- lodash.escape "^3.0.0"
- lodash.keys "^3.0.0"
- lodash.restparam "^3.0.0"
- lodash.templatesettings "^3.0.0"
-
lodash.template@^4.0.2:
version "4.4.0"
resolved "http://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0"
@@ -10513,37 +7071,16 @@ lodash.template@^4.0.2:
lodash._reinterpolate "~3.0.0"
lodash.templatesettings "^4.0.0"
-lodash.templatesettings@^3.0.0:
- version "3.1.1"
- resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-3.1.1.tgz#fb307844753b66b9f1afa54e262c745307dba8e5"
- dependencies:
- lodash._reinterpolate "^3.0.0"
- lodash.escape "^3.0.0"
-
lodash.templatesettings@^4.0.0:
version "4.1.0"
resolved "http://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316"
dependencies:
lodash._reinterpolate "~3.0.0"
-lodash.throttle@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/lodash.throttle/-/lodash.throttle-4.1.1.tgz#c23e91b710242ac70c37f1e1cda9274cc39bf2f4"
-
-lodash.uniq@^4.5.0:
- version "4.5.0"
- resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773"
-
lodash.values@^4.3.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/lodash.values/-/lodash.values-4.3.0.tgz#a3a6c2b0ebecc5c2cba1c17e6e620fe81b53d347"
-lodash.words@^3.0.0:
- version "3.2.0"
- resolved "https://registry.yarnpkg.com/lodash.words/-/lodash.words-3.2.0.tgz#4e2a8649bc08745b17c695b1a3ce8fee596623b3"
- dependencies:
- lodash._root "^3.0.0"
-
lodash@4.17.10, lodash@^4.17.10:
version "4.17.10"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7"
@@ -10552,56 +7089,26 @@ lodash@=4.17.4:
version "4.17.4"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae"
-lodash@^3.3.1, lodash@^3.6.0, lodash@^3.7.0:
+lodash@^3.3.1, lodash@^3.6.0:
version "3.10.1"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
-lodash@^4.0.0, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.11, lodash@^4.17.3:
- version "4.17.11"
- resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
-
-lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0, lodash@^4.5.1:
+lodash@^4.14.0, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.1, lodash@^4.3.0:
version "4.17.5"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.5.tgz#99a92d65c0272debe8c96b6057bc8fbfa3bed511"
-lodash@~1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/lodash/-/lodash-1.0.2.tgz#8f57560c83b59fc270bd3d561b690043430e2551"
+lodash@^4.5.1:
+ version "4.17.11"
+ resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
log-driver@^1.2.5:
version "1.2.7"
resolved "https://registry.yarnpkg.com/log-driver/-/log-driver-1.2.7.tgz#63b95021f0702fedfa2c9bb0a24e7797d71871d8"
-log-symbols@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-1.0.2.tgz#376ff7b58ea3086a0f09facc74617eca501e1a18"
- dependencies:
- chalk "^1.0.0"
-
-log-symbols@^2.1.0, log-symbols@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
- dependencies:
- chalk "^2.0.1"
-
-log-update@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/log-update/-/log-update-1.0.2.tgz#19929f64c4093d2d2e7075a1dad8af59c296b8d1"
- dependencies:
- ansi-escapes "^1.0.0"
- cli-cursor "^1.0.2"
-
-loglevel@^1.4.1, loglevel@^1.6.1:
+loglevel@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
-loglevelnext@^1.0.1:
- version "1.0.5"
- resolved "https://registry.npmjs.org/loglevelnext/-/loglevelnext-1.0.5.tgz#36fc4f5996d6640f539ff203ba819641680d75a2"
- dependencies:
- es6-symbol "^3.1.1"
- object.assign "^4.1.0"
-
lolex@^2.2.0, lolex@^2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/lolex/-/lolex-2.3.2.tgz#85f9450425103bf9e7a60668ea25dc43274ca807"
@@ -10618,16 +7125,12 @@ looper@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/looper/-/looper-3.0.0.tgz#2efa54c3b1cbaba9b94aee2e5914b0be57fbb749"
-loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.2.0, loose-envify@^1.3.1:
+loose-envify@^1.0.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848"
dependencies:
js-tokens "^3.0.0"
-lottie-web@^5.1.3:
- version "5.4.1"
- resolved "https://registry.yarnpkg.com/lottie-web/-/lottie-web-5.4.1.tgz#98465741d4907293656cab31e395d79d0546ef26"
-
loud-rejection@^1.0.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/loud-rejection/-/loud-rejection-1.6.0.tgz#5b46f80147edee578870f086d04821cf998e551f"
@@ -10635,31 +7138,10 @@ loud-rejection@^1.0.0:
currently-unhandled "^0.4.1"
signal-exit "^3.0.0"
-lower-case-first@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/lower-case-first/-/lower-case-first-1.0.2.tgz#e5da7c26f29a7073be02d52bac9980e5922adfa1"
- dependencies:
- lower-case "^1.1.2"
-
-lower-case@^1.1.0, lower-case@^1.1.1, lower-case@^1.1.2:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/lower-case/-/lower-case-1.1.4.tgz#9a2cabd1b9e8e0ae993a4bf7d5875c39c42e8eac"
-
lowercase-keys@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
-lowlight@~1.9.1:
- version "1.9.2"
- resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.9.2.tgz#0b9127e3cec2c3021b7795dd81005c709a42fdd1"
- dependencies:
- fault "^1.0.2"
- highlight.js "~9.12.0"
-
-lru-cache@2:
- version "2.7.3"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.7.3.tgz#6d4524e8b955f95d4f5b58851ce21dd72fb4e952"
-
lru-cache@^3.2.0:
version "3.2.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-3.2.0.tgz#71789b3b7f5399bec8565dda38aa30d2a097efee"
@@ -10680,9 +7162,11 @@ lru-cache@^4.1.2, lru-cache@^4.1.3:
pseudomap "^1.0.2"
yallist "^2.1.2"
-lru-cache@~2.2.1:
- version "2.2.4"
- resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-2.2.4.tgz#6c658619becf14031d0d0b594b16042ce4dc063d"
+lru-cache@^5.1.1:
+ version "5.1.1"
+ resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920"
+ dependencies:
+ yallist "^3.0.2"
ltgt@^2.1.2, ltgt@~2.2.0:
version "2.2.1"
@@ -10692,28 +7176,12 @@ ltgt@~2.1.1:
version "2.1.3"
resolved "https://registry.yarnpkg.com/ltgt/-/ltgt-2.1.3.tgz#10851a06d9964b971178441c23c9e52698eece34"
-lunr@^2.3.0:
- version "2.3.1"
- resolved "https://registry.npmjs.org/lunr/-/lunr-2.3.1.tgz#113616a2b602ddc10932a7bf8a4e6e57ebfecdf2"
-
-macaddress@^0.2.8:
- version "0.2.8"
- resolved "https://registry.yarnpkg.com/macaddress/-/macaddress-0.2.8.tgz#5904dc537c39ec6dbefeae902327135fa8511f12"
-
make-dir@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/make-dir/-/make-dir-1.2.0.tgz#6d6a49eead4aae296c53bbf3a1a008bd6c89469b"
dependencies:
pify "^3.0.0"
-make-error@1.x:
- version "1.3.5"
- resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.5.tgz#efe4e81f6db28cadd605c70f29c831b58ef776c8"
-
-make-error@^1.1.1:
- version "1.3.4"
- resolved "https://registry.npmjs.org/make-error/-/make-error-1.3.4.tgz#19978ed575f9e9545d2ff8c13e33b5d18a67d535"
-
make-fetch-happen@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/make-fetch-happen/-/make-fetch-happen-4.0.1.tgz#141497cb878f243ba93136c83d8aba12c216c083"
@@ -10730,29 +7198,17 @@ make-fetch-happen@^4.0.1:
socks-proxy-agent "^4.0.0"
ssri "^6.0.0"
-make-iterator@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/make-iterator/-/make-iterator-1.0.1.tgz#29b33f312aa8f547c4a5e490f56afcec99133ad6"
- dependencies:
- kind-of "^6.0.2"
-
make-promises-safe@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/make-promises-safe/-/make-promises-safe-1.1.0.tgz#b4d28c61ef8ad5502f38dbb3a0ee89627f76ad61"
-makeerror@1.0.x:
- version "1.0.11"
- resolved "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
- dependencies:
- tmpl "1.0.x"
-
map-age-cleaner@^0.1.1:
version "0.1.2"
resolved "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.2.tgz#098fb15538fd3dbe461f12745b0ca8568d4e3f74"
dependencies:
p-defer "^1.0.0"
-map-cache@^0.2.0, map-cache@^0.2.2:
+map-cache@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf"
@@ -10774,48 +7230,10 @@ map-visit@^1.0.0:
dependencies:
object-visit "^1.0.0"
-mark.js@^8.11.1:
- version "8.11.1"
- resolved "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz#180f1f9ebef8b0e638e4166ad52db879beb2ffc5"
-
-markdown-escapes@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/markdown-escapes/-/markdown-escapes-1.0.2.tgz#e639cbde7b99c841c0bacc8a07982873b46d2122"
-
-marked@0.3.18:
- version "0.3.18"
- resolved "https://registry.npmjs.org/marked/-/marked-0.3.18.tgz#3ef058cd926101849b92a7a7c15db18c7fc76b2f"
-
marked@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/marked/-/marked-0.4.0.tgz#9ad2c2a7a1791f10a852e0112f77b571dce10c66"
-matchmediaquery@^0.3.0:
- version "0.3.0"
- resolved "https://registry.yarnpkg.com/matchmediaquery/-/matchmediaquery-0.3.0.tgz#6f672bcdbc44de16825c6917fbcdcfb9b82607b1"
- dependencies:
- css-mediaquery "^0.1.2"
-
-material-ui@^0.20.0:
- version "0.20.2"
- resolved "https://registry.npmjs.org/material-ui/-/material-ui-0.20.2.tgz#5fc9b4b62b691d3b16c89d8e54597a0412b52c7d"
- dependencies:
- babel-runtime "^6.23.0"
- inline-style-prefixer "^3.0.8"
- keycode "^2.1.8"
- lodash.merge "^4.6.0"
- lodash.throttle "^4.1.1"
- prop-types "^15.5.7"
- react-event-listener "^0.6.2"
- react-transition-group "^1.2.1"
- recompose "^0.26.0"
- simple-assign "^0.1.0"
- warning "^3.0.0"
-
-math-expression-evaluator@^1.2.14:
- version "1.2.17"
- resolved "https://registry.yarnpkg.com/math-expression-evaluator/-/math-expression-evaluator-1.2.17.tgz#de819fdbcd84dccd8fae59c6aeb79615b9d266ac"
-
md5-hex@^1.2.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/md5-hex/-/md5-hex-1.3.0.tgz#d2c4afe983c4370662179b8cad145219135046c4"
@@ -10833,16 +7251,6 @@ md5.js@^1.3.4:
hash-base "^3.0.0"
inherits "^2.0.1"
-mdast-add-list-metadata@1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/mdast-add-list-metadata/-/mdast-add-list-metadata-1.0.1.tgz#95e73640ce2fc1fa2dcb7ec443d09e2bfe7db4cf"
- dependencies:
- unist-util-visit-parents "1.1.2"
-
-mdn-data@~1.1.0:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/mdn-data/-/mdn-data-1.1.4.tgz#50b5d4ffc4575276573c4eedb8780812a8419f01"
-
media-typer@0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748"
@@ -10872,10 +7280,6 @@ memdown@^1.0.0:
ltgt "~2.2.0"
safe-buffer "~5.1.1"
-memoize-one@^4.0.0:
- version "4.0.0"
- resolved "https://registry.npmjs.org/memoize-one/-/memoize-one-4.0.0.tgz#fc5e2f1427a216676a62ec652cf7398cfad123db"
-
memory-fs@^0.4.0, memory-fs@~0.4.1:
version "0.4.1"
resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552"
@@ -10887,7 +7291,7 @@ memorystream@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/memorystream/-/memorystream-0.3.1.tgz#86d7090b30ce455d63fbae12dda51a47ddcaf9b2"
-meow@^3.1.0, meow@^3.3.0, meow@^3.7.0:
+meow@^3.1.0, meow@^3.3.0:
version "3.7.0"
resolved "https://registry.yarnpkg.com/meow/-/meow-3.7.0.tgz#72cb668b425228290abbfa856892587308a801fb"
dependencies:
@@ -10916,20 +7320,6 @@ meow@^4.0.0:
redent "^2.0.0"
trim-newlines "^2.0.0"
-meow@^5.0.0:
- version "5.0.0"
- resolved "https://registry.npmjs.org/meow/-/meow-5.0.0.tgz#dfc73d63a9afc714a5e371760eb5c88b91078aa4"
- dependencies:
- camelcase-keys "^4.0.0"
- decamelize-keys "^1.0.0"
- loud-rejection "^1.0.0"
- minimist-options "^3.0.1"
- normalize-package-data "^2.3.4"
- read-pkg-up "^3.0.0"
- redent "^2.0.0"
- trim-newlines "^2.0.0"
- yargs-parser "^10.0.0"
-
merge-descriptors@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/merge-descriptors/-/merge-descriptors-1.0.1.tgz#b00aaa556dd8b44568150ec9d1b953f3f90cbb61"
@@ -10940,20 +7330,10 @@ merge-source-map@^1.0.2:
dependencies:
source-map "^0.6.1"
-merge-stream@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/merge-stream/-/merge-stream-1.0.1.tgz#4041202d508a342ba00174008df0c251b8c135e1"
- dependencies:
- readable-stream "^2.0.1"
-
merge2@^1.2.1:
version "1.2.2"
resolved "https://registry.yarnpkg.com/merge2/-/merge2-1.2.2.tgz#03212e3da8d86c4d8523cebd6318193414f94e34"
-merge@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
-
merkle-patricia-tree@2.3.1, merkle-patricia-tree@^2.1.2:
version "2.3.1"
resolved "https://registry.yarnpkg.com/merkle-patricia-tree/-/merkle-patricia-tree-2.3.1.tgz#7d4e7263a9c85c1679187cad4a6d71f48d524c71"
@@ -10971,7 +7351,7 @@ methods@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
-micromatch@^2.1.5, micromatch@^2.3.11:
+micromatch@^2.3.11:
version "2.3.11"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-2.3.11.tgz#86677c97d1720b363431d04d0d15293bd38c1565"
dependencies:
@@ -10989,7 +7369,7 @@ micromatch@^2.1.5, micromatch@^2.3.11:
parse-glob "^3.0.4"
regex-cache "^0.4.2"
-micromatch@^3.0.4, micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8, micromatch@^3.1.9:
+micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8:
version "3.1.10"
resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23"
dependencies:
@@ -11014,7 +7394,7 @@ miller-rabin@^4.0.0:
bn.js "^4.0.0"
brorand "^1.0.1"
-"mime-db@>= 1.33.0 < 2", mime-db@~1.33.0:
+mime-db@~1.33.0:
version "1.33.0"
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.33.0.tgz#a3492050a5cb9b63450541e39d9788d2272783db"
@@ -11038,14 +7418,10 @@ mime@1.4.1:
version "1.4.1"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
-mime@^1.2.11, mime@^1.3.4:
+mime@^1.3.4:
version "1.6.0"
resolved "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1"
-mime@^2.0.3, mime@^2.3.1:
- version "2.3.1"
- resolved "https://registry.npmjs.org/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369"
-
mimic-fn@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022"
@@ -11060,17 +7436,6 @@ min-document@^2.19.0:
dependencies:
dom-walk "^0.1.0"
-minimalcss@0.7.10:
- version "0.7.10"
- resolved "https://registry.yarnpkg.com/minimalcss/-/minimalcss-0.7.10.tgz#453b642e43065cfebcaf21344171b9c34fb4e00e"
- dependencies:
- cheerio "1.0.0-rc.2"
- css-tree "1.0.0-alpha.28"
- csso "~3.5.0"
- filesize "^3.5.11"
- minimist "^1.2.0"
- puppeteer "^1.4.0"
-
minimalistic-assert@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7"
@@ -11085,19 +7450,6 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
dependencies:
brace-expansion "^1.1.7"
-minimatch@^2.0.1:
- version "2.0.10"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-2.0.10.tgz#8d087c39c6b38c001b97fca7ce6d0e1e80afbac7"
- dependencies:
- brace-expansion "^1.0.0"
-
-minimatch@~0.2.11:
- version "0.2.14"
- resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-0.2.14.tgz#c74e780574f63c6f9a090e90efbe6ef53a6a756a"
- dependencies:
- lru-cache "2"
- sigmund "~1.0.0"
-
minimist-options@^3.0.1:
version "3.0.2"
resolved "http://registry.yarnpkg.com/minimist-options/-/minimist-options-3.0.2.tgz#fba4c8191339e13ecf4d61beb03f070103f3d954"
@@ -11113,7 +7465,7 @@ minimist@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.1.0.tgz#99df657a52574c21c9057497df742790b2b4c0de"
-minimist@^1.1.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
+minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0, minimist@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
@@ -11128,12 +7480,25 @@ minipass@^2.2.1, minipass@^2.3.3:
safe-buffer "^5.1.2"
yallist "^3.0.0"
+minipass@^2.3.4, minipass@^2.3.5:
+ version "2.3.5"
+ resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.5.tgz#cacebe492022497f656b0f0f51e2682a9ed2d848"
+ dependencies:
+ safe-buffer "^5.1.2"
+ yallist "^3.0.0"
+
minizlib@^1.1.0:
version "1.1.0"
resolved "https://registry.npmjs.org/minizlib/-/minizlib-1.1.0.tgz#11e13658ce46bc3a70a267aac58359d1e0c29ceb"
dependencies:
minipass "^2.2.1"
+minizlib@^1.1.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-1.2.1.tgz#dd27ea6136243c7c880684e8672bb3a45fd9b614"
+ dependencies:
+ minipass "^2.2.1"
+
mississippi@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/mississippi/-/mississippi-2.0.0.tgz#3442a508fafc28500486feea99409676e4ee5a6f"
@@ -11177,24 +7542,13 @@ mkdirp-promise@^5.0.1:
dependencies:
mkdirp "*"
-mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0, mkdirp@~0.5.1:
+mkdirp@*, mkdirp@0.5.1, mkdirp@0.5.x, mkdirp@0.x.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@~0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903"
dependencies:
minimist "0.0.8"
-mobx-react@^5.2.3:
- version "5.2.5"
- resolved "https://registry.npmjs.org/mobx-react/-/mobx-react-5.2.5.tgz#fc44ac17e1798f6b590f064b831d8a1d89850ef0"
- dependencies:
- hoist-non-react-statics "^2.5.0"
- react-lifecycles-compat "^3.0.2"
-
-mobx@^4.2.0:
- version "4.3.1"
- resolved "https://registry.npmjs.org/mobx/-/mobx-4.3.1.tgz#334e5aab4916b1d43f0faf3605a64b1b4b3ccb8d"
-
-mocha@^4.0.1, mocha@^4.1.0:
+mocha@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-4.1.0.tgz#7d86cfbcf35cb829e2754c32e17355ec05338794"
dependencies:
@@ -11241,10 +7595,6 @@ moment@^2.6.0:
version "2.22.2"
resolved "http://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66"
-moo@^0.4.3:
- version "0.4.3"
- resolved "https://registry.npmjs.org/moo/-/moo-0.4.3.tgz#3f847a26f31cf625a956a87f2b10fbc013bfd10e"
-
mout@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/mout/-/mout-0.11.1.tgz#ba3611df5f0e5b1ffbfd01166b8f02d1f5fa2b99"
@@ -11260,29 +7610,14 @@ move-concurrently@^1.0.1:
rimraf "^2.5.4"
run-queue "^1.0.3"
-ms@0.7.1:
- version "0.7.1"
- resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098"
-
ms@2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
-ms@^2.0.0, ms@^2.1.1:
+ms@^2.0.0:
version "2.1.1"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a"
-multicast-dns-service-types@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901"
-
-multicast-dns@^6.0.1:
- version "6.2.3"
- resolved "https://registry.yarnpkg.com/multicast-dns/-/multicast-dns-6.2.3.tgz#a0ec7bd9055c4282f790c3c82f4e28db3b31b229"
- dependencies:
- dns-packet "^1.3.1"
- thunky "^1.0.2"
-
multimatch@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-2.1.0.tgz#9c7906a22fb4c02919e2f5f75161b4cdbd4b2a2b"
@@ -11292,12 +7627,6 @@ multimatch@^2.1.0:
arrify "^1.0.0"
minimatch "^3.0.0"
-multipipe@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/multipipe/-/multipipe-0.1.2.tgz#2a8f2ddf70eed564dff2d57f1e1a137d9f05078b"
- dependencies:
- duplexer2 "0.0.2"
-
mute-stream@0.0.4:
version "0.0.4"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.4.tgz#a9219960a6d5d5d046597aee51252c6655f7177e"
@@ -11306,7 +7635,7 @@ mute-stream@0.0.7, mute-stream@~0.0.4:
version "0.0.7"
resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab"
-mz@^2.4.0, mz@^2.6.0:
+mz@^2.6.0:
version "2.7.0"
resolved "https://registry.yarnpkg.com/mz/-/mz-2.7.0.tgz#95008057a56cafadc2bc63dde7f9ff6955948e32"
dependencies:
@@ -11314,7 +7643,7 @@ mz@^2.4.0, mz@^2.6.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"
-nan@2.10.0, nan@>=2.5.1, nan@^2.0.8, nan@^2.2.1, nan@^2.3.0, nan@^2.3.3, nan@^2.6.2, nan@^2.9.2, nan@~2.10.0:
+nan@2.10.0, nan@^2.0.8, nan@^2.2.1, nan@^2.3.0, nan@^2.3.3, nan@^2.6.2, nan@^2.9.2:
version "2.10.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
@@ -11339,24 +7668,10 @@ nanomatch@^1.2.9:
snapdragon "^0.8.1"
to-regex "^3.0.1"
-natural-compare@^1.4.0:
- version "1.4.0"
- resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
-
ncp@1.0.x:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ncp/-/ncp-1.0.1.tgz#d15367e5cb87432ba117d2bf80fdf45aecfb4246"
-nearley@^2.7.10:
- version "2.15.1"
- resolved "https://registry.npmjs.org/nearley/-/nearley-2.15.1.tgz#965e4e6ec9ed6b80fc81453e161efbcebb36d247"
- dependencies:
- moo "^0.4.3"
- nomnom "~1.6.2"
- railroad-diagrams "^1.0.0"
- randexp "0.4.6"
- semver "^5.4.1"
-
needle@^2.2.1:
version "2.2.2"
resolved "https://registry.npmjs.org/needle/-/needle-2.2.2.tgz#1120ca4c41f2fcc6976fd28a8968afe239929418"
@@ -11373,10 +7688,6 @@ neo-async@^2.5.0:
version "2.5.1"
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.1.tgz#acb909e327b1e87ec9ef15f41b8a269512ad41ee"
-next-tick@1:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/next-tick/-/next-tick-1.0.0.tgz#ca86d1fe8828169b0120208e3dc8424b9db8342c"
-
nice-try@^1.0.4:
version "1.0.4"
resolved "https://registry.yarnpkg.com/nice-try/-/nice-try-1.0.4.tgz#d93962f6c52f2c1558c0fbda6d512819f1efe1c4"
@@ -11391,12 +7702,6 @@ nise@^1.2.0:
path-to-regexp "^1.7.0"
text-encoding "^0.6.4"
-no-case@^2.2.0, no-case@^2.3.2:
- version "2.3.2"
- resolved "https://registry.yarnpkg.com/no-case/-/no-case-2.3.2.tgz#60b813396be39b3f1288a4c1ed5d1e7d28b464ac"
- dependencies:
- lower-case "^1.1.1"
-
node-abi@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.3.0.tgz#f3d554d6ac72a9ee16f0f4dc9548db7c08de4986"
@@ -11415,17 +7720,17 @@ node-fetch@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.1.tgz#369ca70b82f50c86496104a6c776d274f4e4a2d4"
-node-fetch@^1.0.1, node-fetch@^1.3.3, node-fetch@~1.7.1:
+node-fetch@2.1.2:
+ version "2.1.2"
+ resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-2.1.2.tgz#ab884e8e7e57e38a944753cec706f788d1768bb5"
+
+node-fetch@^1.0.1, node-fetch@~1.7.1:
version "1.7.3"
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
dependencies:
encoding "^0.1.11"
is-stream "^1.0.1"
-node-forge@0.7.1:
- version "0.7.1"
- resolved "https://registry.yarnpkg.com/node-forge/-/node-forge-0.7.1.tgz#9da611ea08982f4b94206b3beb4cc9665f20c300"
-
node-gyp@^3.6.2:
version "3.7.0"
resolved "http://registry.yarnpkg.com/node-gyp/-/node-gyp-3.7.0.tgz#789478e8f6c45e277aa014f3e28f958f286f9203"
@@ -11443,6 +7748,23 @@ node-gyp@^3.6.2:
tar "^2.0.0"
which "1"
+node-gyp@^3.8.0:
+ version "3.8.0"
+ resolved "https://registry.yarnpkg.com/node-gyp/-/node-gyp-3.8.0.tgz#540304261c330e80d0d5edce253a68cb3964218c"
+ dependencies:
+ fstream "^1.0.0"
+ glob "^7.0.3"
+ graceful-fs "^4.1.2"
+ mkdirp "^0.5.0"
+ nopt "2 || 3"
+ npmlog "0 || 1 || 2 || 3 || 4"
+ osenv "0"
+ request "^2.87.0"
+ rimraf "2"
+ semver "~5.3.0"
+ tar "^2.0.0"
+ which "1"
+
node-hid@^0.7.2:
version "0.7.2"
resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-0.7.2.tgz#15025cdea2e9756aca2de7266529996d40e52c56"
@@ -11451,10 +7773,6 @@ node-hid@^0.7.2:
nan "^2.6.2"
prebuild-install "^2.2.2"
-node-int64@^0.4.0:
- version "0.4.0"
- resolved "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
-
node-libs-browser@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/node-libs-browser/-/node-libs-browser-2.1.0.tgz#5f94263d404f6e44767d726901fff05478d600df"
@@ -11483,16 +7801,7 @@ node-libs-browser@^2.0.0:
util "^0.10.3"
vm-browserify "0.0.4"
-node-notifier@^5.2.1:
- version "5.2.1"
- resolved "https://registry.npmjs.org/node-notifier/-/node-notifier-5.2.1.tgz#fa313dd08f5517db0e2502e5758d664ac69f9dea"
- dependencies:
- growly "^1.3.0"
- semver "^5.4.1"
- shellwords "^0.1.1"
- which "^1.3.0"
-
-node-pre-gyp@^0.10.0, node-pre-gyp@^0.10.3:
+node-pre-gyp@^0.10.0:
version "0.10.3"
resolved "https://registry.npmjs.org/node-pre-gyp/-/node-pre-gyp-0.10.3.tgz#3070040716afdc778747b61b6887bf78880b80fc"
dependencies:
@@ -11523,28 +7832,6 @@ node-pre-gyp@^0.6.39:
tar "^2.2.1"
tar-pack "^3.4.0"
-nodemon@^1.11.0:
- version "1.17.3"
- resolved "https://registry.yarnpkg.com/nodemon/-/nodemon-1.17.3.tgz#3b0bbc2ee05ccb43b1aef15ba05c63c7bc9b8530"
- dependencies:
- chokidar "^2.0.2"
- debug "^3.1.0"
- ignore-by-default "^1.0.1"
- minimatch "^3.0.4"
- pstree.remy "^1.1.0"
- semver "^5.5.0"
- supports-color "^5.2.0"
- touch "^3.1.0"
- undefsafe "^2.0.2"
- update-notifier "^2.3.0"
-
-nomnom@~1.6.2:
- version "1.6.2"
- resolved "https://registry.npmjs.org/nomnom/-/nomnom-1.6.2.tgz#84a66a260174408fc5b77a18f888eccc44fb6971"
- dependencies:
- colors "0.5.x"
- underscore "~1.4.4"
-
noms@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/noms/-/noms-0.0.0.tgz#da8ebd9f3af9d6760919b27d9cdc8092a7332859"
@@ -11569,12 +7856,6 @@ nopt@^4.0.1:
abbrev "1"
osenv "^0.1.4"
-nopt@~1.0.10:
- version "1.0.10"
- resolved "https://registry.yarnpkg.com/nopt/-/nopt-1.0.10.tgz#6ddd21bd2a31417b92727dd585f8a6f37608ebee"
- dependencies:
- abbrev "1"
-
normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-data@^2.3.2, normalize-package-data@^2.3.4, normalize-package-data@^2.3.5, normalize-package-data@^2.4.0, "normalize-package-data@~1.0.1 || ^2.0.0":
version "2.4.0"
resolved "https://registry.yarnpkg.com/normalize-package-data/-/normalize-package-data-2.4.0.tgz#12f95a307d58352075a04907b84ac8be98ac012f"
@@ -11584,29 +7865,12 @@ normalize-package-data@^2.0.0, normalize-package-data@^2.3.0, normalize-package-
semver "2 || 3 || 4 || 5"
validate-npm-package-license "^3.0.1"
-normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1:
+normalize-path@^2.0.1, normalize-path@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9"
dependencies:
remove-trailing-separator "^1.0.1"
-normalize-range@^0.1.2:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942"
-
-normalize-scroll-left@^0.1.2:
- version "0.1.2"
- resolved "https://registry.npmjs.org/normalize-scroll-left/-/normalize-scroll-left-0.1.2.tgz#6b79691ba79eb5fb107fa5edfbdc06b55caee2aa"
-
-normalize-url@^1.4.0:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-1.9.1.tgz#2cc0d66b31ea23036458436e3620d85954c66c3c"
- dependencies:
- object-assign "^4.0.1"
- prepend-http "^1.0.0"
- query-string "^4.1.0"
- sort-keys "^1.0.0"
-
now-and-later@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/now-and-later/-/now-and-later-2.0.0.tgz#bc61cbb456d79cb32207ce47ca05136ff2e7d6ee"
@@ -11630,6 +7894,23 @@ npm-lifecycle@^2.0.0:
umask "^1.1.0"
which "^1.3.0"
+npm-lifecycle@^2.1.0:
+ version "2.1.0"
+ resolved "https://registry.yarnpkg.com/npm-lifecycle/-/npm-lifecycle-2.1.0.tgz#1eda2eedb82db929e3a0c50341ab0aad140ed569"
+ dependencies:
+ byline "^5.0.0"
+ graceful-fs "^4.1.11"
+ node-gyp "^3.8.0"
+ resolve-from "^4.0.0"
+ slide "^1.1.6"
+ uid-number "0.0.6"
+ umask "^1.1.0"
+ which "^1.3.1"
+
+npm-logical-tree@^1.2.1:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/npm-logical-tree/-/npm-logical-tree-1.2.1.tgz#44610141ca24664cad35d1e607176193fd8f5b88"
+
"npm-package-arg@^3.0.0 || ^4.0.0":
version "4.2.1"
resolved "https://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-4.2.1.tgz#593303fdea85f7c422775f17f9eb7670f680e3ec"
@@ -11637,7 +7918,7 @@ npm-lifecycle@^2.0.0:
hosted-git-info "^2.1.5"
semver "^5.1.0"
-"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0:
+"npm-package-arg@^4.0.0 || ^5.0.0 || ^6.0.0", "npm-package-arg@^5.1.2 || 6", npm-package-arg@^6.0.0, npm-package-arg@^6.1.0:
version "6.1.0"
resolved "http://registry.yarnpkg.com/npm-package-arg/-/npm-package-arg-6.1.0.tgz#15ae1e2758a5027efb4c250554b85a737db7fcc1"
dependencies:
@@ -11653,6 +7934,13 @@ npm-packlist@^1.1.10:
ignore-walk "^3.0.1"
npm-bundled "^1.0.1"
+npm-packlist@^1.1.12:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.2.0.tgz#55a60e793e272f00862c7089274439a4cc31fc7f"
+ dependencies:
+ ignore-walk "^3.0.1"
+ npm-bundled "^1.0.1"
+
npm-packlist@^1.1.6:
version "1.1.11"
resolved "https://registry.npmjs.org/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de"
@@ -11667,6 +7955,22 @@ npm-pick-manifest@^2.1.0:
npm-package-arg "^6.0.0"
semver "^5.4.1"
+npm-pick-manifest@^2.2.3:
+ version "2.2.3"
+ resolved "https://registry.yarnpkg.com/npm-pick-manifest/-/npm-pick-manifest-2.2.3.tgz#32111d2a9562638bb2c8f2bf27f7f3092c8fae40"
+ dependencies:
+ figgy-pudding "^3.5.1"
+ npm-package-arg "^6.0.0"
+ semver "^5.4.1"
+
+npm-profile@^4.0.1:
+ version "4.0.1"
+ resolved "https://registry.yarnpkg.com/npm-profile/-/npm-profile-4.0.1.tgz#d350f7a5e6b60691c7168fbb8392c3603583f5aa"
+ dependencies:
+ aproba "^1.1.2 || 2"
+ figgy-pudding "^3.4.1"
+ npm-registry-fetch "^3.8.0"
+
npm-registry-client@7.0.9:
version "7.0.9"
resolved "https://registry.yarnpkg.com/npm-registry-client/-/npm-registry-client-7.0.9.tgz#1baf86ee5285c4e6d38d4556208ded56049231bb"
@@ -11697,7 +8001,7 @@ npm-registry-fetch@^3.0.0, npm-registry-fetch@^3.8.0:
make-fetch-happen "^4.0.1"
npm-package-arg "^6.1.0"
-npm-run-all@^4.1.2, npm-run-all@^4.1.3:
+npm-run-all@^4.1.2:
version "4.1.3"
resolved "https://registry.yarnpkg.com/npm-run-all/-/npm-run-all-4.1.3.tgz#49f15b55a66bb4101664ce270cb18e7103f8f185"
dependencies:
@@ -11734,16 +8038,6 @@ npmlog@~2.0.0:
are-we-there-yet "~1.1.2"
gauge "~1.2.5"
-nth-check@~1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/nth-check/-/nth-check-1.0.1.tgz#9929acdf628fc2c41098deab82ac580cf149aae4"
- dependencies:
- boolbase "~1.0.0"
-
-num2fraction@^1.2.2:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede"
-
number-is-nan@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d"
@@ -11755,14 +8049,6 @@ number-to-bn@1.7.0:
bn.js "4.11.6"
strip-hex-prefix "1.0.0"
-numeral@^2.0.6:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/numeral/-/numeral-2.0.6.tgz#4ad080936d443c2561aed9f2197efffe25f4e506"
-
-nwsapi@^2.0.7:
- version "2.0.9"
- resolved "https://registry.npmjs.org/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016"
-
nyc@^11.0.1:
version "11.7.1"
resolved "https://registry.yarnpkg.com/nyc/-/nyc-11.7.1.tgz#7cb0a422e501b88ff2c1634341dec2560299d67b"
@@ -11803,14 +8089,10 @@ oauth-sign@~0.9.0:
version "0.9.0"
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455"
-object-assign@4.x, object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
+object-assign@^4, object-assign@^4.0.0, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@^4.1.1:
version "4.1.1"
resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863"
-object-assign@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-3.0.0.tgz#9bedd5ca0897949bca47e7ff408062d549f587f2"
-
object-copy@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c"
@@ -11819,18 +8101,10 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
-object-inspect@^1.6.0:
- version "1.6.0"
- resolved "https://registry.npmjs.org/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b"
-
object-inspect@~1.5.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.5.0.tgz#9d876c11e40f485c79215670281b767488f9bfe3"
-object-is@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/object-is/-/object-is-1.0.1.tgz#0aa60ec9989a0b3ed795cf4d06f62cf1ad6539b6"
-
object-keys@^1.0.11, object-keys@^1.0.8:
version "1.0.11"
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d"
@@ -11845,7 +8119,7 @@ object-visit@^1.0.0:
dependencies:
isobject "^3.0.0"
-object.assign@^4.0.4, object.assign@^4.1.0:
+object.assign@^4.0.4:
version "4.1.0"
resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.0.tgz#968bf1100d7956bb3ca086f006f846b3bc4008da"
dependencies:
@@ -11854,38 +8128,6 @@ object.assign@^4.0.4, object.assign@^4.1.0:
has-symbols "^1.0.0"
object-keys "^1.0.11"
-object.defaults@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/object.defaults/-/object.defaults-1.1.0.tgz#3a7f868334b407dea06da16d88d5cd29e435fecf"
- dependencies:
- array-each "^1.0.1"
- array-slice "^1.0.0"
- for-own "^1.0.0"
- isobject "^3.0.0"
-
-object.entries@^1.0.4:
- version "1.0.4"
- resolved "https://registry.npmjs.org/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f"
- dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.6.1"
- function-bind "^1.1.0"
- has "^1.0.1"
-
-object.getownpropertydescriptors@^2.0.3:
- version "2.0.3"
- resolved "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.0.3.tgz#8758c846f5b407adab0f236e0986f14b051caa16"
- dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.5.1"
-
-object.map@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/object.map/-/object.map-1.0.1.tgz#cf83e59dc8fcc0ad5f4250e1f78b3b81bd801d37"
- dependencies:
- for-own "^1.0.0"
- make-iterator "^1.0.0"
-
object.omit@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/object.omit/-/object.omit-2.0.1.tgz#1a9c744829f39dbb858c76ca3579ae2a54ebd1fa"
@@ -11893,111 +8135,39 @@ object.omit@^2.0.0:
for-own "^0.1.4"
is-extendable "^0.1.1"
-object.pick@^1.2.0, object.pick@^1.3.0:
+object.pick@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747"
dependencies:
isobject "^3.0.1"
-object.values@^1.0.4:
- version "1.0.4"
- resolved "https://registry.npmjs.org/object.values/-/object.values-1.0.4.tgz#e524da09b4f66ff05df457546ec72ac99f13069a"
- dependencies:
- define-properties "^1.1.2"
- es-abstract "^1.6.1"
- function-bind "^1.1.0"
- has "^1.0.1"
-
oboe@2.1.3:
version "2.1.3"
resolved "https://registry.yarnpkg.com/oboe/-/oboe-2.1.3.tgz#2b4865dbd46be81225713f4e9bfe4bcf4f680a4f"
dependencies:
http-https "^1.0.0"
-obuf@^1.0.0, obuf@^1.1.1:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e"
-
on-finished@~2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947"
dependencies:
ee-first "1.1.1"
-on-headers@~1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7"
-
once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.2, once@^1.3.3, once@^1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
dependencies:
wrappy "1"
-once@~1.3.0:
- version "1.3.3"
- resolved "https://registry.yarnpkg.com/once/-/once-1.3.3.tgz#b2e261557ce4c314ec8304f3fa82663e4297ca20"
- dependencies:
- wrappy "1"
-
-onetime@^1.0.0:
- version "1.1.0"
- resolved "http://registry.npmjs.org/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789"
-
onetime@^2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4"
dependencies:
mimic-fn "^1.0.0"
-ono@^4.0.5:
- version "4.0.5"
- resolved "https://registry.npmjs.org/ono/-/ono-4.0.5.tgz#bc62740493a5c1c08b2c21e60cbb0e5c56ab7de2"
- dependencies:
- format-util "^1.0.3"
-
-openapi-sampler@1.0.0-beta.13:
- version "1.0.0-beta.13"
- resolved "https://registry.npmjs.org/openapi-sampler/-/openapi-sampler-1.0.0-beta.13.tgz#bb8ea6f38471d6f0140c716e5f89242d1d277093"
- dependencies:
- json-pointer "^0.6.0"
-
-openapi-schema-validation@^0.4.1:
- version "0.4.1"
- resolved "https://registry.npmjs.org/openapi-schema-validation/-/openapi-schema-validation-0.4.1.tgz#927e1277082ef61688239730470bfbbdd0f1268d"
- dependencies:
- jsonschema "1.2.4"
- jsonschema-draft4 "^1.0.0"
- swagger-schema-official "2.0.0-bab6bed"
-
-openapi3-ts@^0.11.0:
- version "0.11.0"
- resolved "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-0.11.0.tgz#8e4c51ad8d54f8f2516b895e4ce8c01550cd4854"
-
-opener@^1.5.1:
- version "1.5.1"
- resolved "https://registry.yarnpkg.com/opener/-/opener-1.5.1.tgz#6d2f0e77f1a0af0032aca716c2c1fbb8e7e8abed"
-
-opn-cli@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/opn-cli/-/opn-cli-3.1.0.tgz#f819ae6cae0b411bd0149b8560fe6c88adad20f8"
- dependencies:
- file-type "^3.6.0"
- get-stdin "^5.0.1"
- meow "^3.7.0"
- opn "^4.0.0"
- temp-write "^2.1.0"
-
-opn@^4.0.0:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
- dependencies:
- object-assign "^4.0.1"
- pinkie-promise "^2.0.0"
-
-opn@^5.1.0, opn@^5.3.0:
- version "5.3.0"
- resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c"
+opn@^5.3.0:
+ version "5.4.0"
+ resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
dependencies:
is-wsl "^1.1.0"
@@ -12008,7 +8178,7 @@ optimist@^0.6.1:
minimist "~0.0.1"
wordwrap "~0.0.2"
-optionator@^0.8.1, optionator@^0.8.2:
+optionator@^0.8.1:
version "0.8.2"
resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.2.tgz#364c5e409d3f4d6301d6c0b4c05bba50180aeb64"
dependencies:
@@ -12019,39 +8189,12 @@ optionator@^0.8.1, optionator@^0.8.2:
type-check "~0.3.2"
wordwrap "~1.0.0"
-ora@^0.2.3:
- version "0.2.3"
- resolved "https://registry.yarnpkg.com/ora/-/ora-0.2.3.tgz#37527d220adcd53c39b73571d754156d5db657a4"
- dependencies:
- chalk "^1.1.1"
- cli-cursor "^1.0.2"
- cli-spinners "^0.1.2"
- object-assign "^4.0.1"
-
-orchestrator@^0.3.0:
- version "0.3.8"
- resolved "https://registry.yarnpkg.com/orchestrator/-/orchestrator-0.3.8.tgz#14e7e9e2764f7315fbac184e506c7aa6df94ad7e"
- dependencies:
- end-of-stream "~0.1.5"
- sequencify "~0.0.7"
- stream-consume "~0.1.0"
-
-ordered-read-streams@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-0.1.0.tgz#fd565a9af8eb4473ba69b6ed8a34352cb552f126"
-
ordered-read-streams@^1.0.0:
version "1.0.1"
resolved "https://registry.yarnpkg.com/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz#77c0cb37c41525d64166d990ffad7ec6a0e1363e"
dependencies:
readable-stream "^2.0.1"
-original@>=0.0.5:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b"
- dependencies:
- url-parse "1.0.x"
-
os-browserify@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/os-browserify/-/os-browserify-0.3.0.tgz#854373c7f5c2315914fc9bfc6bd8238fdda1ec27"
@@ -12109,12 +8252,6 @@ p-is-promise@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-1.1.0.tgz#9c9456989e9f6588017b0434d56097675c3da05e"
-p-limit@^1.0.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8"
- dependencies:
- p-try "^1.0.0"
-
p-limit@^1.1.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.2.0.tgz#0e92b6bedcb59f022c13d0f1949dc82d15909f1c"
@@ -12145,7 +8282,7 @@ p-map-series@^1.0.0:
dependencies:
p-reduce "^1.0.0"
-p-map@^1.1.1, p-map@^1.2.0:
+p-map@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b"
@@ -12177,7 +8314,7 @@ p-waterfall@^1.0.0:
dependencies:
p-reduce "^1.0.0"
-package-json@^4.0.0, package-json@^4.0.1:
+package-json@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/package-json/-/package-json-4.0.1.tgz#8869a0401253661c4c4ca3da6c2121ed555f5eed"
dependencies:
@@ -12186,10 +8323,6 @@ package-json@^4.0.0, package-json@^4.0.1:
registry-url "^3.0.3"
semver "^5.1.0"
-packet-reader@0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/packet-reader/-/packet-reader-0.3.1.tgz#cd62e60af8d7fea8a705ec4ff990871c46871f27"
-
pacote@^9.1.0:
version "9.1.0"
resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.1.0.tgz#59810859bbd72984dcb267269259375d32f391e5"
@@ -12222,6 +8355,38 @@ pacote@^9.1.0:
unique-filename "^1.1.0"
which "^1.3.0"
+pacote@^9.2.3:
+ version "9.4.0"
+ resolved "https://registry.yarnpkg.com/pacote/-/pacote-9.4.0.tgz#af979abdeb175cd347c3e33be3241af1ed254807"
+ dependencies:
+ bluebird "^3.5.3"
+ cacache "^11.3.2"
+ figgy-pudding "^3.5.1"
+ get-stream "^4.1.0"
+ glob "^7.1.3"
+ lru-cache "^5.1.1"
+ make-fetch-happen "^4.0.1"
+ minimatch "^3.0.4"
+ minipass "^2.3.5"
+ mississippi "^3.0.0"
+ mkdirp "^0.5.1"
+ normalize-package-data "^2.4.0"
+ npm-package-arg "^6.1.0"
+ npm-packlist "^1.1.12"
+ npm-pick-manifest "^2.2.3"
+ npm-registry-fetch "^3.8.0"
+ osenv "^0.1.5"
+ promise-inflight "^1.0.1"
+ promise-retry "^1.1.1"
+ protoduck "^5.0.1"
+ rimraf "^2.6.2"
+ safe-buffer "^5.1.2"
+ semver "^5.6.0"
+ ssri "^6.0.1"
+ tar "^4.4.8"
+ unique-filename "^1.1.1"
+ which "^1.3.1"
+
pako@~1.0.5:
version "1.0.6"
resolved "https://registry.yarnpkg.com/pako/-/pako-1.0.6.tgz#0101211baa70c4bca4a0f63f2206e97b7dfaf258"
@@ -12234,22 +8399,6 @@ parallel-transform@^1.1.0:
inherits "^2.0.3"
readable-stream "^2.1.5"
-param-case@2.1.x, param-case@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/param-case/-/param-case-2.1.1.tgz#df94fd8cf6531ecf75e6bef9a0858fbc72be2247"
- dependencies:
- no-case "^2.2.0"
-
-parent-module@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/parent-module/-/parent-module-1.0.0.tgz#df250bdc5391f4a085fb589dad761f5ad6b865b5"
- dependencies:
- callsites "^3.0.0"
-
-parent-require@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/parent-require/-/parent-require-1.0.0.tgz#746a167638083a860b0eef6732cb27ed46c32977"
-
parse-asn1@^5.0.0:
version "5.1.1"
resolved "https://registry.yarnpkg.com/parse-asn1/-/parse-asn1-5.1.1.tgz#f6bf293818332bd0dab54efb16087724745e6ca8"
@@ -12260,40 +8409,6 @@ parse-asn1@^5.0.0:
evp_bytestokey "^1.0.0"
pbkdf2 "^3.0.3"
-parse-code-context@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/parse-code-context/-/parse-code-context-1.0.0.tgz#718c295c593d0d19a37f898473268cc75e98de1e"
-
-parse-entities@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.1.tgz#8112d88471319f27abae4d64964b122fe4e1b890"
- dependencies:
- character-entities "^1.0.0"
- character-entities-legacy "^1.0.0"
- character-reference-invalid "^1.0.0"
- is-alphanumerical "^1.0.0"
- is-decimal "^1.0.0"
- is-hexadecimal "^1.0.0"
-
-parse-entities@^1.1.2:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.2.0.tgz#9deac087661b2e36814153cb78d7e54a4c5fd6f4"
- dependencies:
- character-entities "^1.0.0"
- character-entities-legacy "^1.0.0"
- character-reference-invalid "^1.0.0"
- is-alphanumerical "^1.0.0"
- is-decimal "^1.0.0"
- is-hexadecimal "^1.0.0"
-
-parse-filepath@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/parse-filepath/-/parse-filepath-1.0.2.tgz#a632127f53aaf3d15876f5872f3ffac763d6c891"
- dependencies:
- is-absolute "^1.0.0"
- map-cache "^0.2.0"
- path-root "^0.1.1"
-
parse-github-repo-url@^1.3.0:
version "1.4.1"
resolved "http://registry.yarnpkg.com/parse-github-repo-url/-/parse-github-repo-url-1.4.1.tgz#9e7d8bb252a6cb6ba42595060b7bf6df3dbc1f50"
@@ -12327,31 +8442,10 @@ parse-json@^4.0.0:
error-ex "^1.3.1"
json-parse-better-errors "^1.0.1"
-parse-passwd@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6"
-
-parse5@4.0.0:
- version "4.0.0"
- resolved "https://registry.npmjs.org/parse5/-/parse5-4.0.0.tgz#6d78656e3da8d78b4ec0b906f7c08ef1dfe3f608"
-
-parse5@^3.0.1, parse5@^3.0.3:
- version "3.0.3"
- resolved "https://registry.npmjs.org/parse5/-/parse5-3.0.3.tgz#042f792ffdd36851551cf4e9e066b3874ab45b5c"
- dependencies:
- "@types/node" "*"
-
parseurl@~1.3.2:
version "1.3.2"
resolved "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.2.tgz#fc289d4ed8993119460c156253262cdc8de65bf3"
-pascal-case@^2.0.0:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/pascal-case/-/pascal-case-2.0.1.tgz#2d578d3455f660da65eca18ef95b4e0de912761e"
- dependencies:
- camel-case "^3.0.0"
- upper-case-first "^1.1.0"
-
pascalcase@^0.1.1:
version "0.1.1"
resolved "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14"
@@ -12360,12 +8454,6 @@ path-browserify@0.0.0:
version "0.0.0"
resolved "https://registry.yarnpkg.com/path-browserify/-/path-browserify-0.0.0.tgz#a0b870729aae214005b7d5032ec2cbbb0fb4451a"
-path-case@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/path-case/-/path-case-2.1.1.tgz#94b8037c372d3fe2906e465bb45e25d226e8eea5"
- dependencies:
- no-case "^2.2.0"
-
path-dirname@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0"
@@ -12396,16 +8484,6 @@ path-parse@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.5.tgz#3c1adf871ea9cd6c9431b6ea2bd74a0ff055c4c1"
-path-root-regex@^0.1.0:
- version "0.1.2"
- resolved "https://registry.yarnpkg.com/path-root-regex/-/path-root-regex-0.1.2.tgz#bfccdc8df5b12dc52c8b43ec38d18d72c04ba96d"
-
-path-root@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/path-root/-/path-root-0.1.1.tgz#9a4a6814cac1c0cd73360a95f32083c8ea4745b7"
- dependencies:
- path-root-regex "^0.1.0"
-
path-to-regexp@0.1.7:
version "0.1.7"
resolved "https://registry.yarnpkg.com/path-to-regexp/-/path-to-regexp-0.1.7.tgz#df604178005f522f15eb4490e7247a1bfaa67f8c"
@@ -12460,10 +8538,6 @@ pend@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
-perfect-scrollbar@^1.4.0:
- version "1.4.0"
- resolved "https://registry.npmjs.org/perfect-scrollbar/-/perfect-scrollbar-1.4.0.tgz#5d014ef9775e1f43058a1dbae9ed1daf0e7091f1"
-
performance-now@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5"
@@ -12472,42 +8546,7 @@ performance-now@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-2.1.0.tgz#6309f4e0e5fa913ec1c69307ae364b4b377c9e7b"
-pg-connection-string@0.1.3:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/pg-connection-string/-/pg-connection-string-0.1.3.tgz#da1847b20940e42ee1492beaf65d49d91b245df7"
-
-pg-pool@^2.0.4:
- version "2.0.6"
- resolved "https://registry.yarnpkg.com/pg-pool/-/pg-pool-2.0.6.tgz#7b561a482feb0a0e599b58b5137fd2db3ad8111c"
-
-pg-types@~1.12.1:
- version "1.12.1"
- resolved "https://registry.yarnpkg.com/pg-types/-/pg-types-1.12.1.tgz#d64087e3903b58ffaad279e7595c52208a14c3d2"
- dependencies:
- postgres-array "~1.0.0"
- postgres-bytea "~1.0.0"
- postgres-date "~1.0.0"
- postgres-interval "^1.1.0"
-
-pg@^7.5.0:
- version "7.7.1"
- resolved "https://registry.yarnpkg.com/pg/-/pg-7.7.1.tgz#546b192ff484322b69689391f885de3ba91a30d4"
- dependencies:
- buffer-writer "2.0.0"
- packet-reader "0.3.1"
- pg-connection-string "0.1.3"
- pg-pool "^2.0.4"
- pg-types "~1.12.1"
- pgpass "1.x"
- semver "4.3.2"
-
-pgpass@1.x:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/pgpass/-/pgpass-1.0.2.tgz#2a7bb41b6065b67907e91da1b07c1847c877b306"
- dependencies:
- split "^1.0.0"
-
-pify@^2.0.0, pify@^2.2.0, pify@^2.3.0:
+pify@^2.0.0, pify@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/pify/-/pify-2.3.0.tgz#ed141a6ac043a849ea588498e7dca8b15330e90c"
@@ -12537,12 +8576,6 @@ pkg-dir@^2.0.0:
dependencies:
find-up "^2.1.0"
-pkg-dir@^3.0.0:
- version "3.0.0"
- resolved "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3"
- dependencies:
- find-up "^3.0.0"
-
pkginfo@0.3.x, pkginfo@^0.3.0:
version "0.3.1"
resolved "https://registry.yarnpkg.com/pkginfo/-/pkginfo-0.3.1.tgz#5b29f6a81f70717142e09e765bbeab97b4f81e21"
@@ -12555,308 +8588,14 @@ pluralize@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777"
-pn@^1.1.0:
- version "1.1.0"
- resolved "https://registry.npmjs.org/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb"
-
-polished@^1.9.2:
- version "1.9.2"
- resolved "https://registry.npmjs.org/polished/-/polished-1.9.2.tgz#d705cac66f3a3ed1bd38aad863e2c1e269baf6b6"
-
-polished@^1.9.3:
- version "1.9.3"
- resolved "https://registry.npmjs.org/polished/-/polished-1.9.3.tgz#d61b8a0c4624efe31e2583ff24a358932b6b75e1"
-
-polished@^2.2.0:
- version "2.2.0"
- resolved "https://registry.npmjs.org/polished/-/polished-2.2.0.tgz#5ca7e178cc5352bd7fd1efc45342f7c6d59cc982"
- dependencies:
- "@babel/runtime" "^7.0.0"
-
-popper.js@1.14.3, popper.js@^1.14.1:
+popper.js@1.14.3:
version "1.14.3"
resolved "https://registry.yarnpkg.com/popper.js/-/popper.js-1.14.3.tgz#1438f98d046acf7b4d78cd502bf418ac64d4f095"
-portfinder@^1.0.9:
- version "1.0.13"
- resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"
- dependencies:
- async "^1.5.2"
- debug "^2.2.0"
- mkdirp "0.5.x"
-
posix-character-classes@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab"
-postcss-calc@^5.2.0:
- version "5.3.1"
- resolved "https://registry.yarnpkg.com/postcss-calc/-/postcss-calc-5.3.1.tgz#77bae7ca928ad85716e2fda42f261bf7c1d65b5e"
- dependencies:
- postcss "^5.0.2"
- postcss-message-helpers "^2.0.0"
- reduce-css-calc "^1.2.6"
-
-postcss-colormin@^2.1.8:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/postcss-colormin/-/postcss-colormin-2.2.2.tgz#6631417d5f0e909a3d7ec26b24c8a8d1e4f96e4b"
- dependencies:
- colormin "^1.0.5"
- postcss "^5.0.13"
- postcss-value-parser "^3.2.3"
-
-postcss-convert-values@^2.3.4:
- version "2.6.1"
- resolved "https://registry.yarnpkg.com/postcss-convert-values/-/postcss-convert-values-2.6.1.tgz#bbd8593c5c1fd2e3d1c322bb925dcae8dae4d62d"
- dependencies:
- postcss "^5.0.11"
- postcss-value-parser "^3.1.2"
-
-postcss-discard-comments@^2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/postcss-discard-comments/-/postcss-discard-comments-2.0.4.tgz#befe89fafd5b3dace5ccce51b76b81514be00e3d"
- dependencies:
- postcss "^5.0.14"
-
-postcss-discard-duplicates@^2.0.1:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/postcss-discard-duplicates/-/postcss-discard-duplicates-2.1.0.tgz#b9abf27b88ac188158a5eb12abcae20263b91932"
- dependencies:
- postcss "^5.0.4"
-
-postcss-discard-empty@^2.0.1:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/postcss-discard-empty/-/postcss-discard-empty-2.1.0.tgz#d2b4bd9d5ced5ebd8dcade7640c7d7cd7f4f92b5"
- dependencies:
- postcss "^5.0.14"
-
-postcss-discard-overridden@^0.1.1:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/postcss-discard-overridden/-/postcss-discard-overridden-0.1.1.tgz#8b1eaf554f686fb288cd874c55667b0aa3668d58"
- dependencies:
- postcss "^5.0.16"
-
-postcss-discard-unused@^2.2.1:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/postcss-discard-unused/-/postcss-discard-unused-2.2.3.tgz#bce30b2cc591ffc634322b5fb3464b6d934f4433"
- dependencies:
- postcss "^5.0.14"
- uniqs "^2.0.0"
-
-postcss-filter-plugins@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/postcss-filter-plugins/-/postcss-filter-plugins-2.0.2.tgz#6d85862534d735ac420e4a85806e1f5d4286d84c"
- dependencies:
- postcss "^5.0.4"
- uniqid "^4.0.0"
-
-postcss-merge-idents@^2.1.5:
- version "2.1.7"
- resolved "https://registry.yarnpkg.com/postcss-merge-idents/-/postcss-merge-idents-2.1.7.tgz#4c5530313c08e1d5b3bbf3d2bbc747e278eea270"
- dependencies:
- has "^1.0.1"
- postcss "^5.0.10"
- postcss-value-parser "^3.1.1"
-
-postcss-merge-longhand@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/postcss-merge-longhand/-/postcss-merge-longhand-2.0.2.tgz#23d90cd127b0a77994915332739034a1a4f3d658"
- dependencies:
- postcss "^5.0.4"
-
-postcss-merge-rules@^2.0.3:
- version "2.1.2"
- resolved "https://registry.yarnpkg.com/postcss-merge-rules/-/postcss-merge-rules-2.1.2.tgz#d1df5dfaa7b1acc3be553f0e9e10e87c61b5f721"
- dependencies:
- browserslist "^1.5.2"
- caniuse-api "^1.5.2"
- postcss "^5.0.4"
- postcss-selector-parser "^2.2.2"
- vendors "^1.0.0"
-
-postcss-message-helpers@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/postcss-message-helpers/-/postcss-message-helpers-2.0.0.tgz#a4f2f4fab6e4fe002f0aed000478cdf52f9ba60e"
-
-postcss-minify-font-values@^1.0.2:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/postcss-minify-font-values/-/postcss-minify-font-values-1.0.5.tgz#4b58edb56641eba7c8474ab3526cafd7bbdecb69"
- dependencies:
- object-assign "^4.0.1"
- postcss "^5.0.4"
- postcss-value-parser "^3.0.2"
-
-postcss-minify-gradients@^1.0.1:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/postcss-minify-gradients/-/postcss-minify-gradients-1.0.5.tgz#5dbda11373703f83cfb4a3ea3881d8d75ff5e6e1"
- dependencies:
- postcss "^5.0.12"
- postcss-value-parser "^3.3.0"
-
-postcss-minify-params@^1.0.4:
- version "1.2.2"
- resolved "https://registry.yarnpkg.com/postcss-minify-params/-/postcss-minify-params-1.2.2.tgz#ad2ce071373b943b3d930a3fa59a358c28d6f1f3"
- dependencies:
- alphanum-sort "^1.0.1"
- postcss "^5.0.2"
- postcss-value-parser "^3.0.2"
- uniqs "^2.0.0"
-
-postcss-minify-selectors@^2.0.4:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/postcss-minify-selectors/-/postcss-minify-selectors-2.1.1.tgz#b2c6a98c0072cf91b932d1a496508114311735bf"
- dependencies:
- alphanum-sort "^1.0.2"
- has "^1.0.1"
- postcss "^5.0.14"
- postcss-selector-parser "^2.0.0"
-
-postcss-modules-extract-imports@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-extract-imports/-/postcss-modules-extract-imports-1.1.0.tgz#b614c9720be6816eaee35fb3a5faa1dba6a05ddb"
- dependencies:
- postcss "^6.0.1"
-
-postcss-modules-local-by-default@^1.0.1:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-local-by-default/-/postcss-modules-local-by-default-1.2.0.tgz#f7d80c398c5a393fa7964466bd19500a7d61c069"
- dependencies:
- css-selector-tokenizer "^0.7.0"
- postcss "^6.0.1"
-
-postcss-modules-scope@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-scope/-/postcss-modules-scope-1.1.0.tgz#d6ea64994c79f97b62a72b426fbe6056a194bb90"
- dependencies:
- css-selector-tokenizer "^0.7.0"
- postcss "^6.0.1"
-
-postcss-modules-values@^1.1.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/postcss-modules-values/-/postcss-modules-values-1.3.0.tgz#ecffa9d7e192518389f42ad0e83f72aec456ea20"
- dependencies:
- icss-replace-symbols "^1.1.0"
- postcss "^6.0.1"
-
-postcss-normalize-charset@^1.1.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/postcss-normalize-charset/-/postcss-normalize-charset-1.1.1.tgz#ef9ee71212d7fe759c78ed162f61ed62b5cb93f1"
- dependencies:
- postcss "^5.0.5"
-
-postcss-normalize-url@^3.0.7:
- version "3.0.8"
- resolved "https://registry.yarnpkg.com/postcss-normalize-url/-/postcss-normalize-url-3.0.8.tgz#108f74b3f2fcdaf891a2ffa3ea4592279fc78222"
- dependencies:
- is-absolute-url "^2.0.0"
- normalize-url "^1.4.0"
- postcss "^5.0.14"
- postcss-value-parser "^3.2.3"
-
-postcss-ordered-values@^2.1.0:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/postcss-ordered-values/-/postcss-ordered-values-2.2.3.tgz#eec6c2a67b6c412a8db2042e77fe8da43f95c11d"
- dependencies:
- postcss "^5.0.4"
- postcss-value-parser "^3.0.1"
-
-postcss-reduce-idents@^2.2.2:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/postcss-reduce-idents/-/postcss-reduce-idents-2.4.0.tgz#c2c6d20cc958284f6abfbe63f7609bf409059ad3"
- dependencies:
- postcss "^5.0.4"
- postcss-value-parser "^3.0.2"
-
-postcss-reduce-initial@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/postcss-reduce-initial/-/postcss-reduce-initial-1.0.1.tgz#68f80695f045d08263a879ad240df8dd64f644ea"
- dependencies:
- postcss "^5.0.4"
-
-postcss-reduce-transforms@^1.0.3:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/postcss-reduce-transforms/-/postcss-reduce-transforms-1.0.4.tgz#ff76f4d8212437b31c298a42d2e1444025771ae1"
- dependencies:
- has "^1.0.1"
- postcss "^5.0.8"
- postcss-value-parser "^3.0.1"
-
-postcss-selector-parser@^2.0.0, postcss-selector-parser@^2.2.2:
- version "2.2.3"
- resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-2.2.3.tgz#f9437788606c3c9acee16ffe8d8b16297f27bb90"
- dependencies:
- flatten "^1.0.2"
- indexes-of "^1.0.1"
- uniq "^1.0.1"
-
-postcss-svgo@^2.1.1:
- version "2.1.6"
- resolved "https://registry.yarnpkg.com/postcss-svgo/-/postcss-svgo-2.1.6.tgz#b6df18aa613b666e133f08adb5219c2684ac108d"
- dependencies:
- is-svg "^2.0.0"
- postcss "^5.0.14"
- postcss-value-parser "^3.2.3"
- svgo "^0.7.0"
-
-postcss-unique-selectors@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/postcss-unique-selectors/-/postcss-unique-selectors-2.0.2.tgz#981d57d29ddcb33e7b1dfe1fd43b8649f933ca1d"
- dependencies:
- alphanum-sort "^1.0.1"
- postcss "^5.0.4"
- uniqs "^2.0.0"
-
-postcss-value-parser@^3.0.1, postcss-value-parser@^3.0.2, postcss-value-parser@^3.1.1, postcss-value-parser@^3.1.2, postcss-value-parser@^3.2.3, postcss-value-parser@^3.3.0:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-3.3.0.tgz#87f38f9f18f774a4ab4c8a232f5c5ce8872a9d15"
-
-postcss-zindex@^2.0.1:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/postcss-zindex/-/postcss-zindex-2.2.0.tgz#d2109ddc055b91af67fc4cb3b025946639d2af22"
- dependencies:
- has "^1.0.1"
- postcss "^5.0.4"
- uniqs "^2.0.0"
-
-postcss@^5.0.10, postcss@^5.0.11, postcss@^5.0.12, postcss@^5.0.13, postcss@^5.0.14, postcss@^5.0.16, postcss@^5.0.2, postcss@^5.0.4, postcss@^5.0.5, postcss@^5.0.6, postcss@^5.0.8, postcss@^5.2.16:
- version "5.2.18"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-5.2.18.tgz#badfa1497d46244f6390f58b319830d9107853c5"
- dependencies:
- chalk "^1.1.3"
- js-base64 "^2.1.9"
- source-map "^0.5.6"
- supports-color "^3.2.3"
-
-postcss@^6.0.1:
- version "6.0.21"
- resolved "https://registry.yarnpkg.com/postcss/-/postcss-6.0.21.tgz#8265662694eddf9e9a5960db6da33c39e4cd069d"
- dependencies:
- chalk "^2.3.2"
- source-map "^0.6.1"
- supports-color "^5.3.0"
-
-postgres-array@~1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/postgres-array/-/postgres-array-1.0.3.tgz#c561fc3b266b21451fc6555384f4986d78ec80f5"
-
-postgres-bytea@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/postgres-bytea/-/postgres-bytea-1.0.0.tgz#027b533c0aa890e26d172d47cf9ccecc521acd35"
-
-postgres-date@~1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/postgres-date/-/postgres-date-1.0.3.tgz#e2d89702efdb258ff9d9cee0fe91bd06975257a8"
-
-postgres-interval@^1.1.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/postgres-interval/-/postgres-interval-1.1.2.tgz#bf71ff902635f21cb241a013fc421d81d1db15a9"
- dependencies:
- xtend "^4.0.0"
-
-postinstall-build@^5.0.1:
- version "5.0.3"
- resolved "https://registry.yarnpkg.com/postinstall-build/-/postinstall-build-5.0.3.tgz#238692f712a481d8f5bc8960e94786036241efc7"
-
prebuild-install@^2.2.2:
version "2.5.3"
resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-2.5.3.tgz#9f65f242782d370296353710e9bc843490c19f69"
@@ -12885,7 +8624,7 @@ prelude-ls@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.1.2.tgz#21932a549f5e52ffd9a827f570e04be62a97da54"
-prepend-http@^1.0.0, prepend-http@^1.0.1:
+prepend-http@^1.0.1:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"
@@ -12893,24 +8632,7 @@ preserve@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
-prettier-linter-helpers@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
- dependencies:
- fast-diff "^1.1.2"
-
-prettier-plugin-solidity@^1.0.0-alpha.4:
- version "1.0.0-alpha.16"
- resolved "https://registry.yarnpkg.com/prettier-plugin-solidity/-/prettier-plugin-solidity-1.0.0-alpha.16.tgz#8e2a4b1fe49a5a6a23789806b55017378442e5c7"
- dependencies:
- emoji-regex "^7.0.3"
- escape-string-regexp "^1.0.5"
- extract-comments "^1.1.0"
- prettier "^1.15.3"
- solidity-parser-antlr "^0.3.3"
- string-width "^3.0.0"
-
-prettier@^1.14.3, prettier@^1.15.3:
+prettier@^1.15.3:
version "1.15.3"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.3.tgz#1feaac5bdd181237b54dbe65d874e02a1472786a"
@@ -12921,31 +8643,7 @@ pretty-bytes@^1.0.4:
get-stdin "^4.0.1"
meow "^3.1.0"
-pretty-error@^2.0.2:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/pretty-error/-/pretty-error-2.1.1.tgz#5f4f87c8f91e5ae3f3ba87ab4cf5e03b1a17f1a3"
- dependencies:
- renderkid "^2.0.1"
- utila "~0.4"
-
-pretty-format@^23.6.0:
- version "23.6.0"
- resolved "https://registry.npmjs.org/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"
- dependencies:
- ansi-regex "^3.0.0"
- ansi-styles "^3.2.0"
-
-pretty-hrtime@^1.0.0:
- version "1.0.3"
- resolved "https://registry.yarnpkg.com/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz#b7e3ea42435a4c9b2759d99e0f201eb195802ee1"
-
-prismjs@^1.15.0, prismjs@^1.8.4, prismjs@~1.15.0:
- version "1.15.0"
- resolved "https://registry.npmjs.org/prismjs/-/prismjs-1.15.0.tgz#8801d332e472091ba8def94976c8877ad60398d9"
- optionalDependencies:
- clipboard "^2.0.0"
-
-private@^0.1.6, private@^0.1.7, private@^0.1.8:
+private@^0.1.6, private@^0.1.7:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
@@ -12990,15 +8688,9 @@ promise-to-callback@^1.0.0:
is-fn "^1.0.0"
set-immediate-shim "^1.0.1"
-promise@^7.1.1:
- version "7.3.1"
- resolved "https://registry.yarnpkg.com/promise/-/promise-7.3.1.tgz#064b72602b18f90f29192b8b1bc418ffd1ebd3bf"
- dependencies:
- asap "~2.0.3"
-
promisify-child-process@^1.0.5:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/promisify-child-process/-/promisify-child-process-1.0.5.tgz#817ad1aec92c013d83bb37e1f143e9b4033d9669"
+ version "1.0.6"
+ resolved "https://registry.yarnpkg.com/promisify-child-process/-/promisify-child-process-1.0.6.tgz#1a1f60ee62e7699e3f5744dfaed48ef76548652a"
prompt@^1.0.0:
version "1.0.0"
@@ -13011,40 +8703,12 @@ prompt@^1.0.0:
utile "0.3.x"
winston "2.1.x"
-prompts@^0.1.9:
- version "0.1.14"
- resolved "https://registry.npmjs.org/prompts/-/prompts-0.1.14.tgz#a8e15c612c5c9ec8f8111847df3337c9cbd443b2"
- dependencies:
- kleur "^2.0.1"
- sisteransi "^0.1.1"
-
promzard@^0.3.0:
version "0.3.0"
resolved "http://registry.yarnpkg.com/promzard/-/promzard-0.3.0.tgz#26a5d6ee8c7dee4cb12208305acfb93ba382a9ee"
dependencies:
read "1"
-prop-types@15.x, prop-types@^15.5.0, prop-types@^15.5.10, prop-types@^15.6.2:
- version "15.6.2"
- resolved "https://registry.npmjs.org/prop-types/-/prop-types-15.6.2.tgz#05d5ca77b4453e985d60fc7ff8c859094a497102"
- dependencies:
- loose-envify "^1.3.1"
- object-assign "^4.1.1"
-
-prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1:
- version "15.6.1"
- resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.1.tgz#36644453564255ddda391191fb3a125cbdf654ca"
- dependencies:
- fbjs "^0.8.16"
- loose-envify "^1.3.1"
- object-assign "^4.1.1"
-
-property-information@^5.0.1:
- version "5.0.1"
- resolved "https://registry.yarnpkg.com/property-information/-/property-information-5.0.1.tgz#c3b09f4f5750b1634c0b24205adbf78f18bdf94f"
- dependencies:
- xtend "^4.0.1"
-
proto-list@~1.2.1:
version "1.2.4"
resolved "http://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
@@ -13055,6 +8719,12 @@ protoduck@^5.0.0:
dependencies:
genfun "^4.0.1"
+protoduck@^5.0.1:
+ version "5.0.1"
+ resolved "https://registry.yarnpkg.com/protoduck/-/protoduck-5.0.1.tgz#03c3659ca18007b69a50fd82a7ebcc516261151f"
+ dependencies:
+ genfun "^5.0.0"
+
proxy-addr@~2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.3.tgz#355f262505a621646b3130a728eb647e22055341"
@@ -13062,17 +8732,6 @@ proxy-addr@~2.0.3:
forwarded "~0.1.2"
ipaddr.js "1.6.0"
-proxy-addr@~2.0.4:
- version "2.0.4"
- resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-2.0.4.tgz#ecfc733bf22ff8c6f407fa275327b9ab67e48b93"
- dependencies:
- forwarded "~0.1.2"
- ipaddr.js "1.8.0"
-
-proxy-from-env@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee"
-
prr@~1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
@@ -13091,12 +8750,6 @@ psl@^1.1.24:
version "1.1.29"
resolved "https://registry.yarnpkg.com/psl/-/psl-1.1.29.tgz#60f580d360170bb722a797cc704411e6da850c67"
-pstree.remy@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/pstree.remy/-/pstree.remy-1.1.0.tgz#f2af27265bd3e5b32bbfcc10e80bac55ba78688b"
- dependencies:
- ps-tree "^1.1.0"
-
public-encrypt@^4.0.0:
version "4.0.2"
resolved "https://registry.yarnpkg.com/public-encrypt/-/public-encrypt-4.0.2.tgz#46eb9107206bf73489f8b85b69d91334c6610994"
@@ -13219,20 +8872,7 @@ punycode@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.0.tgz#5f863edc89b96db09074bad7947bf09056ca4e7d"
-puppeteer@^1.4.0:
- version "1.9.0"
- resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.9.0.tgz#56dba79e7ea4faac807877bee3b23d63291fc59e"
- dependencies:
- debug "^3.1.0"
- extract-zip "^1.6.6"
- https-proxy-agent "^2.2.1"
- mime "^2.0.3"
- progress "^2.0.0"
- proxy-from-env "^1.0.0"
- rimraf "^2.6.1"
- ws "^5.1.1"
-
-q@^1.1.2, q@^1.5.1:
+q@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
@@ -13240,20 +8880,13 @@ qs@6.5.1, qs@~6.5.1:
version "6.5.1"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8"
-qs@6.5.2, qs@~6.5.2:
- version "6.5.2"
- resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
-
qs@~6.4.0:
version "6.4.0"
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
-query-string@^4.1.0:
- version "4.3.4"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
- dependencies:
- object-assign "^4.1.0"
- strict-uri-encode "^1.0.0"
+qs@~6.5.2:
+ version "6.5.2"
+ resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
query-string@^5.0.1:
version "5.1.1"
@@ -13263,13 +8896,6 @@ query-string@^5.0.1:
object-assign "^4.1.0"
strict-uri-encode "^1.0.0"
-query-string@^6.0.0:
- version "6.0.0"
- resolved "https://registry.yarnpkg.com/query-string/-/query-string-6.0.0.tgz#8b8f39447b73e8290d6f5e3581779218e9171142"
- dependencies:
- decode-uri-component "^0.2.0"
- strict-uri-encode "^2.0.0"
-
querystring-es3@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/querystring-es3/-/querystring-es3-0.2.1.tgz#9ec61f79049875707d69414596fd907a4d711e73"
@@ -13278,53 +8904,10 @@ querystring@0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/querystring/-/querystring-0.2.0.tgz#b209849203bb25df820da756e747005878521620"
-querystringify@0.0.x:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-0.0.4.tgz#0cf7f84f9463ff0ae51c4c4b142d95be37724d9c"
-
-querystringify@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-1.0.0.tgz#6286242112c5b712fa654e526652bf6a13ff05cb"
-
quick-lru@^1.0.0:
version "1.1.0"
resolved "http://registry.yarnpkg.com/quick-lru/-/quick-lru-1.1.0.tgz#4360b17c61136ad38078397ff11416e186dcfbb8"
-raf@^3.3.0:
- version "3.4.1"
- resolved "https://registry.yarnpkg.com/raf/-/raf-3.4.1.tgz#0742e99a4a6552f445d73e3ee0328af0ff1ede39"
- dependencies:
- performance-now "^2.1.0"
-
-raf@^3.4.0:
- version "3.4.0"
- resolved "https://registry.npmjs.org/raf/-/raf-3.4.0.tgz#a28876881b4bc2ca9117d4138163ddb80f781575"
- dependencies:
- performance-now "^2.1.0"
-
-railroad-diagrams@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/railroad-diagrams/-/railroad-diagrams-1.0.0.tgz#eb7e6267548ddedfb899c1b90e57374559cddb7e"
-
-ramda@0.21.0:
- version "0.21.0"
- resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.21.0.tgz#a001abedb3ff61077d4ff1d577d44de77e8d0a35"
-
-ramda@^0.25.0:
- version "0.25.0"
- resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9"
-
-ramda@^0.26:
- version "0.26.1"
- resolved "https://registry.npmjs.org/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06"
-
-randexp@0.4.6:
- version "0.4.6"
- resolved "https://registry.npmjs.org/randexp/-/randexp-0.4.6.tgz#e986ad5e5e31dae13ddd6f7b3019aa7c87f60ca3"
- dependencies:
- discontinuous-range "1.0.0"
- ret "~0.1.10"
-
randomatic@^1.1.3:
version "1.1.7"
resolved "https://registry.yarnpkg.com/randomatic/-/randomatic-1.1.7.tgz#c7abe9cc8b87c0baa876b19fde83fd464797e38c"
@@ -13349,7 +8932,7 @@ randomhex@0.1.5:
version "0.1.5"
resolved "https://registry.yarnpkg.com/randomhex/-/randomhex-0.1.5.tgz#baceef982329091400f2a2912c6cd02f1094f585"
-range-parser@^1.0.3, range-parser@~1.2.0:
+range-parser@~1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e"
@@ -13362,79 +8945,6 @@ raw-body@2.3.2:
iconv-lite "0.4.19"
unpipe "1.0.0"
-raw-body@2.3.3:
- version "2.3.3"
- resolved "https://registry.yarnpkg.com/raw-body/-/raw-body-2.3.3.tgz#1b324ece6b5706e153855bc1148c65bb7f6ea0c3"
- dependencies:
- bytes "3.0.0"
- http-errors "1.6.3"
- iconv-lite "0.4.23"
- unpipe "1.0.0"
-
-raw-loader@^0.5.1:
- version "0.5.1"
- resolved "https://registry.yarnpkg.com/raw-loader/-/raw-loader-0.5.1.tgz#0c3d0beaed8a01c966d9787bf778281252a979aa"
-
-rc-align@^2.4.0:
- version "2.4.3"
- resolved "https://registry.yarnpkg.com/rc-align/-/rc-align-2.4.3.tgz#b9b3c2a6d68adae71a8e1d041cd5e3b2a655f99a"
- dependencies:
- babel-runtime "^6.26.0"
- dom-align "^1.7.0"
- prop-types "^15.5.8"
- rc-util "^4.0.4"
-
-rc-animate@2.x:
- version "2.6.0"
- resolved "https://registry.yarnpkg.com/rc-animate/-/rc-animate-2.6.0.tgz#ca8440d042781af7a1329d84f97ea94794c5ec15"
- dependencies:
- babel-runtime "6.x"
- classnames "^2.2.6"
- css-animation "^1.3.2"
- prop-types "15.x"
- raf "^3.4.0"
- react-lifecycles-compat "^3.0.4"
-
-rc-slider@^8.6.3:
- version "8.6.4"
- resolved "https://registry.yarnpkg.com/rc-slider/-/rc-slider-8.6.4.tgz#b9d9000180f2b89bb71b58717753164b479fc75f"
- dependencies:
- babel-runtime "6.x"
- classnames "^2.2.5"
- prop-types "^15.5.4"
- rc-tooltip "^3.7.0"
- rc-util "^4.0.4"
- shallowequal "^1.0.1"
- warning "^3.0.0"
-
-rc-tooltip@^3.7.0:
- version "3.7.3"
- resolved "https://registry.yarnpkg.com/rc-tooltip/-/rc-tooltip-3.7.3.tgz#280aec6afcaa44e8dff0480fbaff9e87fc00aecc"
- dependencies:
- babel-runtime "6.x"
- prop-types "^15.5.8"
- rc-trigger "^2.2.2"
-
-rc-trigger@^2.2.2:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/rc-trigger/-/rc-trigger-2.6.2.tgz#a9c09ba5fad63af3b2ec46349c7db6cb46657001"
- dependencies:
- babel-runtime "6.x"
- classnames "^2.2.6"
- prop-types "15.x"
- rc-align "^2.4.0"
- rc-animate "2.x"
- rc-util "^4.4.0"
-
-rc-util@^4.0.4, rc-util@^4.4.0:
- version "4.6.0"
- resolved "https://registry.yarnpkg.com/rc-util/-/rc-util-4.6.0.tgz#ba33721783192ec4f3afb259e182b04e55deb7f6"
- dependencies:
- add-dom-event-listener "^1.1.0"
- babel-runtime "6.x"
- prop-types "^15.5.10"
- shallowequal "^0.2.2"
-
rc@^1.0.1, rc@^1.1.6, rc@^1.1.7:
version "1.2.6"
resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.6.tgz#eb18989c6d4f4f162c399f79ddd29f3835568092"
@@ -13453,386 +8963,13 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
-react-copy-to-clipboard@^5.0.0:
- version "5.0.1"
- resolved "https://registry.npmjs.org/react-copy-to-clipboard/-/react-copy-to-clipboard-5.0.1.tgz#8eae107bb400be73132ed3b6a7b4fb156090208e"
- dependencies:
- copy-to-clipboard "^3"
- prop-types "^15.5.8"
-
-react-document-title@^2.0.3:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/react-document-title/-/react-document-title-2.0.3.tgz#bbf922a0d71412fc948245e4283b2412df70f2b9"
- dependencies:
- prop-types "^15.5.6"
- react-side-effect "^1.0.2"
-
-react-dom@^16.3.2:
- version "16.4.2"
- resolved "https://registry.npmjs.org/react-dom/-/react-dom-16.4.2.tgz#4afed569689f2c561d2b8da0b819669c38a0bda4"
- dependencies:
- fbjs "^0.8.16"
- loose-envify "^1.1.0"
- object-assign "^4.1.1"
- prop-types "^15.6.0"
-
-react-dom@^16.5.2:
- version "16.5.2"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.5.2.tgz#b69ee47aa20bab5327b2b9d7c1fe2a30f2cfa9d7"
- dependencies:
- loose-envify "^1.1.0"
- object-assign "^4.1.1"
- prop-types "^15.6.2"
- schedule "^0.5.0"
-
-react-dropdown@^1.3.0:
- version "1.5.0"
- resolved "https://registry.npmjs.org/react-dropdown/-/react-dropdown-1.5.0.tgz#3a08f0dd574b64d8eddde60ce51e45b72edc81c3"
- dependencies:
- classnames "^2.2.3"
-
-react-event-listener@^0.6.2:
- version "0.6.3"
- resolved "https://registry.npmjs.org/react-event-listener/-/react-event-listener-0.6.3.tgz#8eab88129a76e095ed8aa684c29679eded1e843d"
- dependencies:
- "@babel/runtime" "7.0.0-rc.1"
- prop-types "^15.6.0"
- warning "^4.0.1"
-
-react-flickity-component@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/react-flickity-component/-/react-flickity-component-3.1.0.tgz#3e519028e6b622ac852a6ab93a272cdbf37f6e00"
- dependencies:
- fbjs "^0.8.12"
- flickity "^2.1.1"
- imagesloaded "^4.1.3"
- prop-types "^15.5.10"
- react "^16.3.2"
- react-dom "^16.3.2"
-
-react-headroom@2.2.2:
- version "2.2.2"
- resolved "https://registry.yarnpkg.com/react-headroom/-/react-headroom-2.2.2.tgz#5ddea3bc87cd54be38f6f98c3fde4527e2a5fb0f"
- dependencies:
- prop-types "^15.5.8"
- raf "^3.3.0"
- shallowequal "^0.2.2"
-
-react-helmet@^5.2.0:
- version "5.2.0"
- resolved "https://registry.yarnpkg.com/react-helmet/-/react-helmet-5.2.0.tgz#a81811df21313a6d55c5f058c4aeba5d6f3d97a7"
- dependencies:
- deep-equal "^1.0.1"
- object-assign "^4.1.1"
- prop-types "^15.5.4"
- react-side-effect "^1.1.0"
-
-react-highlight@0xproject/react-highlight#fix/react-version:
- version "1.0.0"
- resolved "https://codeload.github.com/0xproject/react-highlight/tar.gz/699ac4d9529e33520bff4b9bd9c624d21efbba75"
- dependencies:
- highlight.js "^9.11.0"
- highlightjs-solidity "^1.0.5"
- react "^16.4.2"
- react-dom "^16.4.2"
-
-react-hot-loader@^4.3.3:
- version "4.3.4"
- resolved "https://registry.npmjs.org/react-hot-loader/-/react-hot-loader-4.3.4.tgz#4f9bdd55bb20d77a6ae8931fa1c187e5f0ce6279"
- dependencies:
- fast-levenshtein "^2.0.6"
- global "^4.3.0"
- hoist-non-react-statics "^2.5.0"
- prop-types "^15.6.1"
- react-lifecycles-compat "^3.0.4"
- shallowequal "^1.0.2"
-
-react-is@^16.3.1:
- version "16.4.0"
- resolved "https://registry.npmjs.org/react-is/-/react-is-16.4.0.tgz#cc9fdc855ac34d2e7d9d2eb7059bbc240d35ffcf"
-
-react-is@^16.4.2, react-is@^16.5.2:
- version "16.5.2"
- resolved "https://registry.npmjs.org/react-is/-/react-is-16.5.2.tgz#e2a7b7c3f5d48062eb769fcb123505eb928722e3"
-
-react-is@^16.6.0:
- version "16.6.3"
- resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.6.3.tgz#d2d7462fcfcbe6ec0da56ad69047e47e56e7eac0"
-
-react-jss@^8.1.0:
- version "8.6.1"
- resolved "https://registry.npmjs.org/react-jss/-/react-jss-8.6.1.tgz#a06e2e1d2c4d91b4d11befda865e6c07fbd75252"
- dependencies:
- hoist-non-react-statics "^2.5.0"
- jss "^9.7.0"
- jss-preset-default "^4.3.0"
- prop-types "^15.6.0"
- theming "^1.3.0"
-
-react-lazyload@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/react-lazyload/-/react-lazyload-2.3.0.tgz#ccb134223012447074a96543954f44b055dc6185"
-
-react-lifecycles-compat@^3.0.2, react-lifecycles-compat@^3.0.4:
- version "3.0.4"
- resolved "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz#4f1a273afdfc8f3488a8c516bfda78f872352362"
-
-react-loadable@^5.5.0:
- version "5.5.0"
- resolved "https://registry.yarnpkg.com/react-loadable/-/react-loadable-5.5.0.tgz#582251679d3da86c32aae2c8e689c59f1196d8c4"
- dependencies:
- prop-types "^15.5.0"
-
-react-lottie@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/react-lottie/-/react-lottie-1.2.3.tgz#8544b96939e088658072eea5e12d912cdaa3acc1"
- dependencies:
- babel-runtime "^6.26.0"
- lottie-web "^5.1.3"
-
-react-markdown@^3.2.2:
- version "3.3.0"
- resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-3.3.0.tgz#a87cdd822aa9302d6add9687961dd1a82a45d02e"
- dependencies:
- prop-types "^15.6.1"
- remark-parse "^5.0.0"
- unified "^6.1.5"
- unist-util-visit "^1.3.0"
- xtend "^4.0.1"
-
-react-markdown@^4.0.6:
- version "4.0.6"
- resolved "https://registry.npmjs.org/react-markdown/-/react-markdown-4.0.6.tgz#927d44421735cd90b7634bb221e9d7d8656e01e9"
- dependencies:
- html-to-react "^1.3.4"
- mdast-add-list-metadata "1.0.1"
- prop-types "^15.6.1"
- remark-parse "^5.0.0"
- unified "^6.1.5"
- unist-util-visit "^1.3.0"
- xtend "^4.0.1"
-
-react-popper@^1.0.0-beta.6:
- version "1.0.0-beta.6"
- resolved "https://registry.npmjs.org/react-popper/-/react-popper-1.0.0-beta.6.tgz#cb27a2ac56adccbaf5f9c4132387289069240834"
- dependencies:
- babel-runtime "6.x.x"
- create-react-context "^0.2.1"
- popper.js "^1.14.1"
- prop-types "^15.6.1"
- typed-styles "^0.0.5"
- warning "^3.0.0"
-
-react-redux@^5.0.3, react-redux@^5.0.7:
- version "5.0.7"
- resolved "https://registry.yarnpkg.com/react-redux/-/react-redux-5.0.7.tgz#0dc1076d9afb4670f993ffaef44b8f8c1155a4c8"
- dependencies:
- hoist-non-react-statics "^2.5.0"
- invariant "^2.0.0"
- lodash "^4.17.5"
- lodash-es "^4.17.5"
- loose-envify "^1.1.0"
- prop-types "^15.6.0"
-
-react-responsive@^6.0.1:
- version "6.0.1"
- resolved "https://registry.yarnpkg.com/react-responsive/-/react-responsive-6.0.1.tgz#b6fc7772dd55f1d1e3c9352651a798f990145ece"
- dependencies:
- hyphenate-style-name "^1.0.0"
- matchmediaquery "^0.3.0"
- prop-types "^15.6.1"
-
-react-router-dom@^4.1.1:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-4.2.2.tgz#c8a81df3adc58bba8a76782e946cbd4eae649b8d"
- dependencies:
- history "^4.7.2"
- invariant "^2.2.2"
- loose-envify "^1.3.1"
- prop-types "^15.5.4"
- react-router "^4.2.0"
- warning "^3.0.0"
-
-react-router-dom@^4.3.1:
- version "4.3.1"
- resolved "https://registry.npmjs.org/react-router-dom/-/react-router-dom-4.3.1.tgz#4c2619fc24c4fa87c9fd18f4fb4a43fe63fbd5c6"
- dependencies:
- history "^4.7.2"
- invariant "^2.2.4"
- loose-envify "^1.3.1"
- prop-types "^15.6.1"
- react-router "^4.3.1"
- warning "^4.0.1"
-
-react-router@^4.2.0:
- version "4.2.0"
- resolved "https://registry.yarnpkg.com/react-router/-/react-router-4.2.0.tgz#61f7b3e3770daeb24062dae3eedef1b054155986"
- dependencies:
- history "^4.7.2"
- hoist-non-react-statics "^2.3.0"
- invariant "^2.2.2"
- loose-envify "^1.3.1"
- path-to-regexp "^1.7.0"
- prop-types "^15.5.4"
- warning "^3.0.0"
-
-react-router@^4.3.1:
- version "4.3.1"
- resolved "https://registry.npmjs.org/react-router/-/react-router-4.3.1.tgz#aada4aef14c809cb2e686b05cee4742234506c4e"
- dependencies:
- history "^4.7.2"
- hoist-non-react-statics "^2.5.0"
- invariant "^2.2.4"
- loose-envify "^1.3.1"
- path-to-regexp "^1.7.0"
- prop-types "^15.6.1"
- warning "^4.0.1"
-
-react-scroll@0xproject/react-scroll#pr-330-and-replace-state:
- version "1.7.11"
- resolved "https://codeload.github.com/0xproject/react-scroll/tar.gz/d2afc2729dc09980e4113d8c38a1b012ba180d81"
- dependencies:
- lodash.throttle "^4.1.1"
- prop-types "^15.5.8"
-
-react-scrollable-anchor@^0.6.1:
- version "0.6.1"
- resolved "https://registry.yarnpkg.com/react-scrollable-anchor/-/react-scrollable-anchor-0.6.1.tgz#fd6e78026c744f76414053d06903b82adccb54d9"
- dependencies:
- jump.js "1.0.1"
- prop-types "^15.5.10"
-
-react-side-effect@^1.0.2, react-side-effect@^1.1.0:
- version "1.1.5"
- resolved "https://registry.yarnpkg.com/react-side-effect/-/react-side-effect-1.1.5.tgz#f26059e50ed9c626d91d661b9f3c8bb38cd0ff2d"
- dependencies:
- exenv "^1.2.1"
- shallowequal "^1.0.1"
-
-react-snap@^1.19.0:
- version "1.19.0"
- resolved "https://registry.yarnpkg.com/react-snap/-/react-snap-1.19.0.tgz#125883c95434987d78a55a3a72c733227721acb3"
- dependencies:
- clean-css "4.2.1"
- express "4.16.3"
- express-history-api-fallback "2.2.1"
- highland "2.13.0"
- html-minifier "3.5.20"
- minimalcss "0.7.10"
- mkdirp "0.5.1"
- puppeteer "^1.4.0"
- serve-static "1.13.2"
- sourcemapped-stacktrace-node "2.1.8"
-
-react-svg-core@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/react-svg-core/-/react-svg-core-2.1.0.tgz#3700322af70117c91f83f18febb481128de3cfbb"
- dependencies:
- babel-core "^6.26.0"
- babel-plugin-react-svg "^2.1.0"
- babel-plugin-syntax-jsx "^6.18.0"
- babel-plugin-transform-object-rest-spread "^6.26.0"
- babel-preset-react "^6.24.1"
- lodash.isplainobject "^4.0.6"
- svgo "^0.7.2"
-
-react-svg-loader@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/react-svg-loader/-/react-svg-loader-2.1.0.tgz#ba15019413b9b11e2012e86580aea1eecc93677e"
- dependencies:
- loader-utils "^1.1.0"
- react-svg-core "^2.1.0"
-
-react-syntax-highlighter@^10.1.1:
- version "10.1.2"
- resolved "https://registry.yarnpkg.com/react-syntax-highlighter/-/react-syntax-highlighter-10.1.2.tgz#645ad5e3d8667fd7a2b73fc1059f871055d23f82"
- dependencies:
- "@babel/runtime" "^7.1.2"
- highlight.js "~9.12.0"
- lowlight "~1.9.1"
- prismjs "^1.8.4"
- refractor "^2.4.1"
-
-react-tabs@^2.0.0:
- version "2.2.2"
- resolved "https://registry.npmjs.org/react-tabs/-/react-tabs-2.2.2.tgz#2f2935da379889484751d1df47c1b639e5ee835d"
- dependencies:
- classnames "^2.2.0"
- prop-types "^15.5.0"
-
-react-tabs@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/react-tabs/-/react-tabs-2.3.0.tgz#0c37e786f288d369824acd06a96bd1818ab8b0dc"
- dependencies:
- classnames "^2.2.0"
- prop-types "^15.5.0"
-
-react-test-renderer@^16.0.0-0:
- version "16.5.2"
- resolved "https://registry.npmjs.org/react-test-renderer/-/react-test-renderer-16.5.2.tgz#92e9d2c6f763b9821b2e0b22f994ee675068b5ae"
- dependencies:
- object-assign "^4.1.1"
- prop-types "^15.6.2"
- react-is "^16.5.2"
- schedule "^0.5.0"
-
-react-tooltip@^3.2.7:
- version "3.5.0"
- resolved "https://registry.yarnpkg.com/react-tooltip/-/react-tooltip-3.5.0.tgz#f4bff54b3c70415b6bd25b8bcf7801c230d1b517"
- dependencies:
- classnames "^2.2.5"
- prop-types "^15.6.0"
-
-react-transition-group@^1.2.1:
- version "1.2.1"
- resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6"
- dependencies:
- chain-function "^1.0.0"
- dom-helpers "^3.2.0"
- loose-envify "^1.3.1"
- prop-types "^15.5.6"
- warning "^3.0.0"
-
-react-transition-group@^2.2.1:
- version "2.4.0"
- resolved "https://registry.npmjs.org/react-transition-group/-/react-transition-group-2.4.0.tgz#1d9391fabfd82e016f26fabd1eec329dbd922b5a"
- dependencies:
- dom-helpers "^3.3.1"
- loose-envify "^1.3.1"
- prop-types "^15.6.2"
- react-lifecycles-compat "^3.0.4"
-
-react-typist@^2.0.4:
- version "2.0.4"
- resolved "https://registry.npmjs.org/react-typist/-/react-typist-2.0.4.tgz#e7ee4de53ead913d363d38f07b700c00ce271be0"
- dependencies:
- prop-types "^15.5.10"
-
-react@^16.3.2:
- version "16.4.2"
- resolved "https://registry.npmjs.org/react/-/react-16.4.2.tgz#2cd90154e3a9d9dd8da2991149fdca3c260e129f"
- dependencies:
- fbjs "^0.8.16"
- loose-envify "^1.1.0"
- object-assign "^4.1.1"
- prop-types "^15.6.0"
-
-react@^16.5.2:
- version "16.5.2"
- resolved "https://registry.yarnpkg.com/react/-/react-16.5.2.tgz#19f6b444ed139baa45609eee6dc3d318b3895d42"
- dependencies:
- loose-envify "^1.1.0"
- object-assign "^4.1.1"
- prop-types "^15.6.2"
- schedule "^0.5.0"
-
read-cmd-shim@^1.0.1:
version "1.0.1"
resolved "http://registry.yarnpkg.com/read-cmd-shim/-/read-cmd-shim-1.0.1.tgz#2d5d157786a37c055d22077c32c53f8329e91c7b"
dependencies:
graceful-fs "^4.1.2"
-"read-package-json@1 || 2", read-package-json@^2.0.0:
+"read-package-json@1 || 2", read-package-json@^2.0.0, read-package-json@^2.0.13:
version "2.0.13"
resolved "http://registry.yarnpkg.com/read-package-json/-/read-package-json-2.0.13.tgz#2e82ebd9f613baa6d2ebe3aa72cefe3f68e41f4a"
dependencies:
@@ -13916,7 +9053,7 @@ read@1, read@1.0.x, read@~1.0.1, read@~1.0.5:
string_decoder "~1.1.1"
util-deprecate "~1.0.1"
-readable-stream@1.0, "readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.15, readable-stream@~1.0.26, readable-stream@~1.0.26-4, readable-stream@~1.0.31:
+"readable-stream@>=1.0.33-1 <1.1.0-0", readable-stream@~1.0.15, readable-stream@~1.0.26, readable-stream@~1.0.31:
version "1.0.34"
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c"
dependencies:
@@ -13934,14 +9071,6 @@ readable-stream@^1.0.33, readable-stream@~1.1.9:
isarray "0.0.1"
string_decoder "~0.10.x"
-readable-stream@^3.0.6:
- version "3.1.1"
- resolved "https://registry.npmjs.org/readable-stream/-/readable-stream-3.1.1.tgz#ed6bbc6c5ba58b090039ff18ce670515795aeb06"
- dependencies:
- inherits "^2.0.3"
- string_decoder "^1.1.1"
- util-deprecate "^1.0.1"
-
readdir-scoped-modules@^1.0.0:
version "1.0.2"
resolved "http://registry.yarnpkg.com/readdir-scoped-modules/-/readdir-scoped-modules-1.0.2.tgz#9fafa37d286be5d92cbaebdee030dc9b5f406747"
@@ -13967,38 +9096,12 @@ readline2@^0.1.1:
mute-stream "0.0.4"
strip-ansi "^2.0.1"
-realpath-native@^1.0.0:
- version "1.0.2"
- resolved "https://registry.npmjs.org/realpath-native/-/realpath-native-1.0.2.tgz#cd51ce089b513b45cf9b1516c82989b51ccc6560"
- dependencies:
- util.promisify "^1.0.0"
-
rechoir@^0.6.2:
version "0.6.2"
resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384"
dependencies:
resolve "^1.1.6"
-recompose@^0.26.0:
- version "0.26.0"
- resolved "https://registry.npmjs.org/recompose/-/recompose-0.26.0.tgz#9babff039cb72ba5bd17366d55d7232fbdfb2d30"
- dependencies:
- change-emitter "^0.1.2"
- fbjs "^0.8.1"
- hoist-non-react-statics "^2.3.1"
- symbol-observable "^1.0.4"
-
-recompose@^0.29.0:
- version "0.29.0"
- resolved "https://registry.npmjs.org/recompose/-/recompose-0.29.0.tgz#f1a4e20d5f24d6ef1440f83924e821de0b1bccef"
- dependencies:
- "@babel/runtime" "^7.0.0"
- change-emitter "^0.1.2"
- fbjs "^0.8.1"
- hoist-non-react-statics "^2.3.1"
- react-lifecycles-compat "^3.0.2"
- symbol-observable "^1.0.4"
-
redent@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde"
@@ -14013,98 +9116,6 @@ redent@^2.0.0:
indent-string "^3.0.0"
strip-indent "^2.0.0"
-redoc-cli@^0.6.1:
- version "0.6.1"
- resolved "https://registry.npmjs.org/redoc-cli/-/redoc-cli-0.6.1.tgz#497fd9d4c5f3aff7cb0d1b043222f2546789b48e"
- dependencies:
- handlebars "^4.0.11"
- isarray "^2.0.4"
- mkdirp "^0.5.1"
- mobx "^4.2.0"
- react "^16.3.2"
- react-dom "^16.3.2"
- redoc "^2.0.0-alpha.29"
- tslib "^1.9.0"
- yargs "^11.0.0"
-
-redoc@^2.0.0-alpha.29:
- version "2.0.0-alpha.34"
- resolved "https://registry.npmjs.org/redoc/-/redoc-2.0.0-alpha.34.tgz#3c46aa3902212ac20c5cbe2b7d0d7621f175f7e9"
- dependencies:
- classnames "^2.2.6"
- decko "^1.2.0"
- dompurify "^1.0.6"
- eventemitter3 "^3.0.0"
- json-pointer "^0.6.0"
- json-schema-ref-parser "^5.1.1"
- lunr "^2.3.0"
- mark.js "^8.11.1"
- marked "0.3.18"
- memoize-one "^4.0.0"
- mobx-react "^5.2.3"
- openapi-sampler "1.0.0-beta.13"
- perfect-scrollbar "^1.4.0"
- polished "^1.9.3"
- prismjs "^1.15.0"
- prop-types "^15.6.2"
- react-dropdown "^1.3.0"
- react-hot-loader "^4.3.3"
- react-tabs "^2.0.0"
- slugify "^1.2.1"
- stickyfill "^1.1.1"
- styled-components "^3.3.3"
- tslib "^1.9.3"
-
-reduce-css-calc@^1.2.6:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/reduce-css-calc/-/reduce-css-calc-1.3.0.tgz#747c914e049614a4c9cfbba629871ad1d2927716"
- dependencies:
- balanced-match "^0.4.2"
- math-expression-evaluator "^1.2.14"
- reduce-function-call "^1.0.1"
-
-reduce-function-call@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/reduce-function-call/-/reduce-function-call-1.0.2.tgz#5a200bf92e0e37751752fe45b0ab330fd4b6be99"
- dependencies:
- balanced-match "^0.4.2"
-
-redux-devtools-extension@^2.13.2:
- version "2.13.2"
- resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.2.tgz#e0f9a8e8dfca7c17be92c7124958a3b94eb2911d"
-
-redux-devtools-extension@^2.13.5:
- version "2.13.5"
- resolved "https://registry.yarnpkg.com/redux-devtools-extension/-/redux-devtools-extension-2.13.5.tgz#3ff34f7227acfeef3964194f5f7fc2765e5c5a39"
-
-redux@*, redux@^4.0.0:
- version "4.0.0"
- resolved "https://registry.yarnpkg.com/redux/-/redux-4.0.0.tgz#aa698a92b729315d22b34a0553d7e6533555cc03"
- dependencies:
- loose-envify "^1.1.0"
- symbol-observable "^1.2.0"
-
-redux@^3.6.0:
- version "3.7.2"
- resolved "https://registry.yarnpkg.com/redux/-/redux-3.7.2.tgz#06b73123215901d25d065be342eb026bc1c8537b"
- dependencies:
- lodash "^4.2.1"
- lodash-es "^4.2.1"
- loose-envify "^1.1.0"
- symbol-observable "^1.0.3"
-
-reflect-metadata@^0.1.12:
- version "0.1.12"
- resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.12.tgz#311bf0c6b63cd782f228a81abe146a2bfa9c56f2"
-
-refractor@^2.4.1:
- version "2.6.2"
- resolved "https://registry.yarnpkg.com/refractor/-/refractor-2.6.2.tgz#8e0877ab8864165275aafeea5d9c8eebe871552f"
- dependencies:
- hastscript "^5.0.0"
- parse-entities "^1.1.2"
- prismjs "~1.15.0"
-
regenerate@^1.2.1:
version "1.3.3"
resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.3.3.tgz#0c336d3980553d755c39b586ae3b20aa49c82b7f"
@@ -14113,10 +9124,6 @@ regenerator-runtime@^0.11.0:
version "0.11.1"
resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.11.1.tgz#be05ad7f9bf7d22e056f9726cee5017fbf19e2e9"
-regenerator-runtime@^0.12.0:
- version "0.12.1"
- resolved "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.12.1.tgz#fa1a71544764c036f8c49b13a08b2594c9f8a0de"
-
regenerator-transform@^0.10.0:
version "0.10.1"
resolved "https://registry.yarnpkg.com/regenerator-transform/-/regenerator-transform-0.10.1.tgz#1e4996837231da8b7f3cf4114d71b5691a0680dd"
@@ -14138,18 +9145,6 @@ regex-not@^1.0.0, regex-not@^1.0.2:
extend-shallow "^3.0.2"
safe-regex "^1.1.0"
-regexpp@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-2.0.1.tgz#8d19d31cf632482b589049f8281f93dbcba4d07f"
-
-regexpu-core@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-1.0.0.tgz#86a763f58ee4d7c2f6b102e4764050de7ed90c6b"
- dependencies:
- regenerate "^1.2.1"
- regjsgen "^0.2.0"
- regjsparser "^0.1.4"
-
regexpu-core@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/regexpu-core/-/regexpu-core-2.0.0.tgz#49d038837b8dcf8bfa5b9a42139938e6ea2ae240"
@@ -14181,30 +9176,6 @@ regjsparser@^0.1.4:
dependencies:
jsesc "~0.5.0"
-relateurl@0.2.x:
- version "0.2.7"
- resolved "https://registry.yarnpkg.com/relateurl/-/relateurl-0.2.7.tgz#54dbf377e51440aca90a4cd274600d3ff2d888a9"
-
-remark-parse@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/remark-parse/-/remark-parse-5.0.0.tgz#4c077f9e499044d1d5c13f80d7a98cf7b9285d95"
- dependencies:
- collapse-white-space "^1.0.2"
- is-alphabetical "^1.0.0"
- is-decimal "^1.0.0"
- is-whitespace-character "^1.0.0"
- is-word-character "^1.0.0"
- markdown-escapes "^1.0.0"
- parse-entities "^1.1.0"
- repeat-string "^1.5.4"
- state-toggle "^1.0.0"
- trim "0.0.1"
- trim-trailing-lines "^1.0.0"
- unherit "^1.0.4"
- unist-util-remove-position "^1.0.0"
- vfile-location "^2.0.0"
- xtend "^4.0.1"
-
remove-bom-buffer@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz#c2bf1e377520d324f623892e33c10cac2c252b53"
@@ -14224,21 +9195,11 @@ remove-trailing-separator@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef"
-renderkid@^2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/renderkid/-/renderkid-2.0.2.tgz#12d310f255360c07ad8fde253f6c9e9de372d2aa"
- dependencies:
- css-select "^1.1.0"
- dom-converter "~0.2"
- htmlparser2 "~3.3.0"
- strip-ansi "^3.0.0"
- utila "^0.4.0"
-
repeat-element@^1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a"
-repeat-string@^1.5.2, repeat-string@^1.5.4, repeat-string@^1.6.1:
+repeat-string@^1.5.2, repeat-string@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637"
@@ -14248,38 +9209,10 @@ repeating@^2.0.0:
dependencies:
is-finite "^1.0.0"
-replace-ext@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-0.0.1.tgz#29bbd92078a739f0bcce2b4ee41e837953522924"
-
-replace-ext@1.0.0, replace-ext@^1.0.0:
+replace-ext@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/replace-ext/-/replace-ext-1.0.0.tgz#de63128373fcbf7c3ccfa4de5a480c45a67958eb"
-request-ip@~1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-1.2.3.tgz#66988f0e22406ec4af630d19b573fe4b447c3b49"
-
-request-ip@~2.0.1:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/request-ip/-/request-ip-2.0.2.tgz#deeae6d4af21768497db8cd05fa37143f8f1257e"
- dependencies:
- is_js "^0.9.0"
-
-request-promise-core@1.1.1:
- version "1.1.1"
- resolved "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.1.tgz#3eee00b2c5aa83239cfb04c5700da36f81cd08b6"
- dependencies:
- lodash "^4.13.1"
-
-request-promise-native@^1.0.5:
- version "1.0.5"
- resolved "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5"
- dependencies:
- request-promise-core "1.1.1"
- stealthy-require "^1.1.0"
- tough-cookie ">=2.3.3"
-
request@2.81.0, "request@>=2.9.0 <2.82.0":
version "2.81.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
@@ -14307,7 +9240,7 @@ request@2.81.0, "request@>=2.9.0 <2.82.0":
tunnel-agent "^0.6.0"
uuid "^3.0.0"
-request@^2.47.0, request@^2.87.0:
+request@^2.47.0, request@^2.54.0, request@^2.87.0:
version "2.88.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
dependencies:
@@ -14332,7 +9265,7 @@ request@^2.47.0, request@^2.87.0:
tunnel-agent "^0.6.0"
uuid "^3.3.2"
-request@^2.54.0, request@^2.67.0, request@^2.79.0:
+request@^2.67.0, request@^2.79.0:
version "2.85.0"
resolved "https://registry.yarnpkg.com/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa"
dependencies:
@@ -14404,23 +9337,12 @@ require-package-name@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/require-package-name/-/require-package-name-2.0.1.tgz#c11e97276b65b8e2923f75dabf5fb2ef0c3841b9"
-requires-port@1.0.x, requires-port@1.x.x, requires-port@~1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff"
-
resolve-cwd@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-cwd/-/resolve-cwd-2.0.0.tgz#00a9f7387556e27038eae232caa372a6a59b665a"
dependencies:
resolve-from "^3.0.0"
-resolve-dir@^1.0.0, resolve-dir@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/resolve-dir/-/resolve-dir-1.0.1.tgz#79a40644c362be82f26effe739c9bb5382046f43"
- dependencies:
- expand-tilde "^2.0.0"
- global-modules "^1.0.0"
-
resolve-from@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-2.0.0.tgz#9480ab20e94ffa1d9e80a804c7ea147611966b57"
@@ -14439,19 +9361,15 @@ resolve-options@^1.1.0:
dependencies:
value-or-function "^3.0.0"
-resolve-pathname@^2.2.0:
- version "2.2.0"
- resolved "https://registry.yarnpkg.com/resolve-pathname/-/resolve-pathname-2.2.0.tgz#7e9ae21ed815fd63ab189adeee64dc831eefa879"
-
resolve-url@^0.2.1:
version "0.2.1"
resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a"
-resolve@1.1.7, resolve@1.1.x:
+resolve@1.1.x:
version "1.1.7"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b"
-resolve@^1.1.6, resolve@^1.1.7, resolve@^1.3.2:
+resolve@^1.1.6, resolve@^1.3.2:
version "1.7.1"
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.7.1.tgz#aadd656374fd298aee895bc026b8297418677fd3"
dependencies:
@@ -14463,13 +9381,6 @@ resolve@~1.5.0:
dependencies:
path-parse "^1.0.5"
-restore-cursor@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541"
- dependencies:
- exit-hook "^1.0.0"
- onetime "^1.0.0"
-
restore-cursor@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf"
@@ -14505,12 +9416,18 @@ right-align@^0.1.1:
dependencies:
align-text "^0.1.1"
-rimraf@2, rimraf@2.x.x, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
+rimraf@2, rimraf@^2.2.8, rimraf@^2.5.1, rimraf@^2.5.4, rimraf@^2.6.1, rimraf@^2.6.2:
version "2.6.2"
resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36"
dependencies:
glob "^7.0.5"
+rimraf@2.x.x, rimraf@^2.5.2:
+ version "2.6.3"
+ resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab"
+ dependencies:
+ glob "^7.1.3"
+
ripemd160@^2.0.0, ripemd160@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.1.tgz#0f4584295c53a3628af7e6d79aca21ce57d1c6e7"
@@ -14528,72 +9445,6 @@ rlp@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/rlp/-/rlp-2.0.0.tgz#9db384ff4b89a8f61563d92395d8625b18f3afb0"
-rollbar-sourcemap-webpack-plugin@^2.4.0:
- version "2.4.0"
- resolved "https://registry.yarnpkg.com/rollbar-sourcemap-webpack-plugin/-/rollbar-sourcemap-webpack-plugin-2.4.0.tgz#0d864fe4d7a141a09fafd417415b704f95faddad"
- dependencies:
- async "^2.6.0"
- babel-runtime "^6.26.0"
- lodash.find "^4.3.0"
- lodash.foreach "^4.2.0"
- lodash.reduce "^4.3.0"
- request "^2.85.0"
- verror "^1.6.1"
-
-rollbar@^0.6.5:
- version "0.6.6"
- resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-0.6.6.tgz#8630cff4af967667d06b227f243635ea86dcc5ba"
- dependencies:
- async "~1.2.1"
- debug "2.2.0"
- json-stringify-safe "~5.0.0"
- lru-cache "~2.2.1"
- request-ip "~1.2.3"
- uuid "~3.0.0"
- optionalDependencies:
- decache "^3.0.5"
-
-rollbar@^2.4.7:
- version "2.4.7"
- resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-2.4.7.tgz#9b1de1a0fab6b6e63fcfcd322c26081a1d8242e8"
- dependencies:
- async "~1.2.1"
- console-polyfill "0.3.0"
- debug "2.6.9"
- error-stack-parser "1.3.3"
- json-stringify-safe "~5.0.0"
- lru-cache "~2.2.1"
- request-ip "~2.0.1"
- uuid "3.0.x"
- optionalDependencies:
- decache "^3.0.5"
-
-rollbar@^2.5.0:
- version "2.5.1"
- resolved "https://registry.yarnpkg.com/rollbar/-/rollbar-2.5.1.tgz#0416c793e08fd2fd37ea6e2c623aeadb81ce4804"
- dependencies:
- async "~1.2.1"
- console-polyfill "0.3.0"
- debug "2.6.9"
- error-stack-parser "1.3.3"
- json-stringify-safe "~5.0.0"
- lru-cache "~2.2.1"
- request-ip "~2.0.1"
- uuid "3.0.x"
- optionalDependencies:
- decache "^3.0.5"
-
-rst-selector-parser@^2.2.3:
- version "2.2.3"
- resolved "https://registry.npmjs.org/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91"
- dependencies:
- lodash.flattendeep "^4.4.0"
- nearley "^2.7.10"
-
-rsvp@^3.3.3:
- version "3.6.2"
- resolved "https://registry.npmjs.org/rsvp/-/rsvp-3.6.2.tgz#2e96491599a96cde1b515d5674a8f7a91452926a"
-
run-async@^2.2.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0"
@@ -14606,10 +9457,6 @@ run-queue@^1.0.0, run-queue@^1.0.3:
dependencies:
aproba "^1.1.1"
-run-s@^0.0.0:
- version "0.0.0"
- resolved "https://registry.yarnpkg.com/run-s/-/run-s-0.0.0.tgz#599912be20c00ba7698655c9936d075d31b71754"
-
rustbn.js@~0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.1.2.tgz#979fa0f9562216dd667c9d2cd179ae5d13830eff"
@@ -14618,30 +9465,10 @@ rustbn.js@~0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/rustbn.js/-/rustbn.js-0.2.0.tgz#8082cb886e707155fd1cb6f23bd591ab8d55d0ca"
-rx-lite-aggregates@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be"
- dependencies:
- rx-lite "*"
-
-rx-lite@*, rx-lite@^4.0.8:
- version "4.0.8"
- resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444"
-
-rx@4.1.0:
- version "4.1.0"
- resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
-
rx@^2.4.3:
version "2.5.3"
resolved "https://registry.yarnpkg.com/rx/-/rx-2.5.3.tgz#21adc7d80f02002af50dae97fd9dbf248755f566"
-rxjs@^5.0.0-beta.11:
- version "5.5.11"
- resolved "https://registry.npmjs.org/rxjs/-/rxjs-5.5.11.tgz#f733027ca43e3bec6b994473be4ab98ad43ced87"
- dependencies:
- symbol-observable "1.0.1"
-
rxjs@^5.5.2:
version "5.5.10"
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-5.5.10.tgz#fde02d7a614f6c8683d0d1957827f492e09db045"
@@ -14658,10 +9485,16 @@ safe-buffer@5.1.1, safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@^5.1.1, s
version "5.1.1"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.1.tgz#893312af69b2123def71f57889001671eeb2c853"
-safe-buffer@5.1.2, safe-buffer@^5.1.2:
+safe-buffer@^5.1.2:
version "5.1.2"
resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
+safe-event-emitter@^1.0.1:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/safe-event-emitter/-/safe-event-emitter-1.0.1.tgz#5b692ef22329ed8f69fdce607e50ca734f6f20af"
+ dependencies:
+ events "^3.0.0"
+
safe-regex@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e"
@@ -14676,35 +9509,10 @@ samsam@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/samsam/-/samsam-1.3.0.tgz#8d1d9350e25622da30de3e44ba692b5221ab7c50"
-sane@^2.0.0:
- version "2.5.2"
- resolved "https://registry.npmjs.org/sane/-/sane-2.5.2.tgz#b4dc1861c21b427e929507a3e751e2a2cb8ab3fa"
- dependencies:
- anymatch "^2.0.0"
- capture-exit "^1.2.0"
- exec-sh "^0.2.0"
- fb-watchman "^2.0.0"
- micromatch "^3.1.4"
- minimist "^1.1.1"
- walker "~1.0.5"
- watch "~0.18.0"
- optionalDependencies:
- fsevents "^1.2.3"
-
-sax@1.2.1:
- version "1.2.1"
- resolved "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz#7b8e656190b228e81a66aea748480d828cd2d37a"
-
-sax@>=0.6.0, sax@^1.2.4, sax@~1.2.1:
+sax@^1.2.4:
version "1.2.4"
resolved "https://registry.yarnpkg.com/sax/-/sax-1.2.4.tgz#2816234e2378bddc4e5354fab5caa895df7100d9"
-schedule@^0.5.0:
- version "0.5.0"
- resolved "https://registry.npmjs.org/schedule/-/schedule-0.5.0.tgz#c128fffa0b402488b08b55ae74bb9df55cc29cc8"
- dependencies:
- object-assign "^4.1.1"
-
schema-utils@^0.4.4:
version "0.4.7"
resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-0.4.7.tgz#ba74f597d2be2ea880131746ee17d0a093c68187"
@@ -14719,14 +9527,6 @@ schema-utils@^0.4.5:
ajv "^6.1.0"
ajv-keywords "^3.1.0"
-schema-utils@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
- dependencies:
- ajv "^6.1.0"
- ajv-errors "^1.0.0"
- ajv-keywords "^3.1.0"
-
scrypt-async@^1.2.0:
version "1.3.1"
resolved "https://registry.yarnpkg.com/scrypt-async/-/scrypt-async-1.3.1.tgz#a11fd6fac981b4b823ee01dee0221169500ddae9"
@@ -14777,20 +9577,6 @@ seek-bzip@^1.0.5:
dependencies:
commander "~2.8.1"
-select-hose@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/select-hose/-/select-hose-2.0.0.tgz#625d8658f865af43ec962bfc376a37359a4994ca"
-
-select@^1.1.2:
- version "1.1.2"
- resolved "https://registry.npmjs.org/select/-/select-1.1.2.tgz#0e7350acdec80b1108528786ec1d4418d11b396d"
-
-selfsigned@^1.9.1:
- version "1.10.2"
- resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.2.tgz#b4449580d99929b65b10a48389301a6592088758"
- dependencies:
- node-forge "0.7.1"
-
semaphore-async-await@^1.5.1:
version "1.5.1"
resolved "https://registry.yarnpkg.com/semaphore-async-await/-/semaphore-async-await-1.5.1.tgz#857bef5e3644601ca4b9570b87e9df5ca12974fa"
@@ -14799,7 +9585,7 @@ semaphore@>=1.0.1, semaphore@^1.0.3:
version "1.1.0"
resolved "https://registry.yarnpkg.com/semaphore/-/semaphore-1.1.0.tgz#aaad8b86b20fe8e9b32b16dc2ee682a8cd26a8aa"
-semver-diff@^2.0.0, semver-diff@^2.1.0:
+semver-diff@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/semver-diff/-/semver-diff-2.1.0.tgz#4bbb8437c8d37e4b0cf1a68fd726ec6d645d6d36"
dependencies:
@@ -14816,11 +9602,11 @@ semver-sort@0.0.4:
semver "^5.0.3"
semver-regex "^1.0.0"
-"semver@2 >=2.2.1 || 3.x || 4 || 5", semver@^5.5:
+"semver@2 >=2.2.1 || 3.x || 4 || 5":
version "5.5.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477"
-"semver@2 || 3 || 4 || 5", semver@^5.0.3, semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@~5.4.1:
+"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@~5.4.1:
version "5.4.1"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.4.1.tgz#e059c09d8571f0540823733433505d3a2f00b18e"
@@ -14828,15 +9614,7 @@ semver-sort@0.0.4:
version "5.5.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab"
-semver@4.3.2:
- version "4.3.2"
- resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.2.tgz#c7a07158a80bedd052355b770d82d6640f803be7"
-
-semver@^4.1.0:
- version "4.3.6"
- resolved "https://registry.yarnpkg.com/semver/-/semver-4.3.6.tgz#300bc6e0e86374f7ba61068b5b1ecd57fc6532da"
-
-semver@^5.5.1:
+semver@^5.0.3, semver@^5.5.1, semver@^5.6.0:
version "5.6.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004"
@@ -14862,33 +9640,10 @@ send@0.16.2:
range-parser "~1.2.0"
statuses "~1.4.0"
-sentence-case@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/sentence-case/-/sentence-case-2.1.1.tgz#1f6e2dda39c168bf92d13f86d4a918933f667ed4"
- dependencies:
- no-case "^2.2.0"
- upper-case-first "^1.1.2"
-
-sequencify@~0.0.7:
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/sequencify/-/sequencify-0.0.7.tgz#90cff19d02e07027fd767f5ead3e7b95d1e7380c"
-
serialize-javascript@^1.4.0:
version "1.5.0"
resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe"
-serve-index@^1.7.2:
- version "1.9.1"
- resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239"
- dependencies:
- accepts "~1.3.4"
- batch "0.6.1"
- debug "2.6.9"
- escape-html "~1.0.3"
- http-errors "~1.6.2"
- mime-types "~2.1.17"
- parseurl "~1.3.2"
-
serve-static@1.13.2:
version "1.13.2"
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.13.2.tgz#095e8472fd5b46237db50ce486a43f4b86c6cec1"
@@ -14963,20 +9718,6 @@ sha3@^1.1.0:
dependencies:
nan "2.10.0"
-shallowequal@^0.2.2:
- version "0.2.2"
- resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-0.2.2.tgz#1e32fd5bcab6ad688a4812cb0cc04efc75c7014e"
- dependencies:
- lodash.keys "^3.1.2"
-
-shallowequal@^1.0.1:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/shallowequal/-/shallowequal-1.0.2.tgz#1561dbdefb8c01408100319085764da3fcf83f8f"
-
-shallowequal@^1.0.2:
- version "1.1.0"
- resolved "https://registry.npmjs.org/shallowequal/-/shallowequal-1.1.0.tgz#188d521de95b9087404fd4dcb68b13df0ae4e7f8"
-
shebang-command@^1.2.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea"
@@ -14987,7 +9728,7 @@ shebang-regex@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3"
-shell-quote@^1.4.3, shell-quote@^1.6.1:
+shell-quote@^1.6.1:
version "1.6.1"
resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.6.1.tgz#f4781949cce402697127430ea3b3c5476f481767"
dependencies:
@@ -15012,10 +9753,6 @@ shelljs@^0.8.2:
interpret "^1.0.0"
rechoir "^0.6.2"
-shellwords@^0.1.1:
- version "0.1.1"
- resolved "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz#d6b9181c1a48d397324c84871efbcfc73fc0654b"
-
shx@^0.2.2:
version "0.2.2"
resolved "https://registry.yarnpkg.com/shx/-/shx-0.2.2.tgz#0a304d020b0edf1306ad81570e80f0346df58a39"
@@ -15024,18 +9761,10 @@ shx@^0.2.2:
minimist "^1.2.0"
shelljs "^0.7.3"
-sigmund@~1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/sigmund/-/sigmund-1.0.1.tgz#3ff21f198cad2175f9f3b781853fd94d0d19b590"
-
signal-exit@^3.0.0, signal-exit@^3.0.1, signal-exit@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d"
-simple-assign@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/simple-assign/-/simple-assign-0.1.0.tgz#17fd3066a5f3d7738f50321bb0f14ca281cc4baa"
-
simple-concat@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.0.tgz#7344cbb8b6e26fb27d66b2fc86f9f6d5997521c6"
@@ -15064,50 +9793,18 @@ sinon@^4.0.0:
supports-color "^5.1.0"
type-detect "^4.0.5"
-sisteransi@^0.1.1:
- version "0.1.1"
- resolved "https://registry.npmjs.org/sisteransi/-/sisteransi-0.1.1.tgz#5431447d5f7d1675aac667ccd0b865a4994cb3ce"
-
slash@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
-sleep@^5.1.1:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/sleep/-/sleep-5.1.1.tgz#878fa1d44d08eeb0f26fb2018ef8629eb1a3ab94"
- dependencies:
- nan ">=2.5.1"
-
-slice-ansi@0.0.4:
- version "0.0.4"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35"
-
-slice-ansi@2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-2.0.0.tgz#5373bdb8559b45676e8541c66916cdd6251612e7"
- dependencies:
- ansi-styles "^3.2.0"
- astral-regex "^1.0.0"
- is-fullwidth-code-point "^2.0.0"
-
slide@^1.1.3, slide@^1.1.5, slide@^1.1.6:
version "1.1.6"
resolved "https://registry.yarnpkg.com/slide/-/slide-1.1.6.tgz#56eb027d65b4d2dce6cb2e2d32c4d4afc9e1d707"
-slugify@^1.2.1:
- version "1.3.1"
- resolved "https://registry.npmjs.org/slugify/-/slugify-1.3.1.tgz#f572127e8535329fbc6c1edb74ab856b61ad7de2"
-
smart-buffer@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/smart-buffer/-/smart-buffer-4.0.1.tgz#07ea1ca8d4db24eb4cac86537d7d18995221ace3"
-snake-case@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/snake-case/-/snake-case-2.1.0.tgz#41bdb1b73f30ec66a04d4e2cad1b76387d4d6d9f"
- dependencies:
- no-case "^2.2.0"
-
snapdragon-node@^2.0.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b"
@@ -15147,24 +9844,6 @@ sntp@2.x.x:
dependencies:
hoek "4.x.x"
-sockjs-client@1.1.5:
- version "1.1.5"
- resolved "https://registry.npmjs.org/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83"
- dependencies:
- debug "^2.6.6"
- eventsource "0.1.6"
- faye-websocket "~0.11.0"
- inherits "^2.0.1"
- json3 "^3.3.2"
- url-parse "^1.1.8"
-
-sockjs@0.3.19:
- version "0.3.19"
- resolved "https://registry.yarnpkg.com/sockjs/-/sockjs-0.3.19.tgz#d976bbe800af7bd20ae08598d582393508993c0d"
- dependencies:
- faye-websocket "^0.10.0"
- uuid "^3.0.1"
-
socks-proxy-agent@^4.0.0:
version "4.0.1"
resolved "https://registry.yarnpkg.com/socks-proxy-agent/-/socks-proxy-agent-4.0.1.tgz#5936bf8b707a993079c6f37db2091821bffa6473"
@@ -15189,70 +9868,20 @@ solc@^0.4.2:
semver "^5.3.0"
yargs "^4.7.1"
-solc@^0.5.2:
- version "0.5.2"
- resolved "https://registry.yarnpkg.com/solc/-/solc-0.5.2.tgz#45d5d11569e41c2b2535f3a50fe0616ca771a347"
- dependencies:
- command-exists "^1.2.8"
- fs-extra "^0.30.0"
- keccak "^1.0.2"
- memorystream "^0.3.1"
- require-from-string "^2.0.0"
- semver "^5.5.0"
- tmp "0.0.33"
- yargs "^11.0.0"
-
-solhint@^1.4.1:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/solhint/-/solhint-1.5.0.tgz#02a097c0b989b6c6d423629ac8297a9a045ba8bf"
- dependencies:
- antlr4 "4.7.1"
- commander "2.18.0"
- eslint "^5.6.0"
- fast-diff "^1.1.2"
- glob "7.1.3"
- ignore "^4.0.6"
- lodash "^4.17.11"
- prettier-linter-helpers "^1.0.0"
- optionalDependencies:
- prettier "^1.14.3"
- prettier-plugin-solidity "^1.0.0-alpha.4"
-
solidity-parser-antlr@^0.2.12:
version "0.2.12"
resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.2.12.tgz#1154f183d5cdda2c7677549ee584dbdb7fb2269c"
-solidity-parser-antlr@^0.3.3:
- version "0.3.3"
- resolved "https://registry.yarnpkg.com/solidity-parser-antlr/-/solidity-parser-antlr-0.3.3.tgz#0352e35f914095daa7eef9f3a55cf8074e28cc5b"
-
-sort-keys@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-1.1.2.tgz#441b6d4d346798f1b4e49e8920adfba0e543f9ad"
- dependencies:
- is-plain-obj "^1.0.0"
-
sort-keys@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/sort-keys/-/sort-keys-2.0.0.tgz#658535584861ec97d730d6cf41822e1f56684128"
dependencies:
is-plain-obj "^1.0.0"
-source-list-map@^0.1.4:
- version "0.1.8"
- resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-0.1.8.tgz#c550b2ab5427f6b3f21f5afead88c4f5587b2106"
-
source-list-map@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/source-list-map/-/source-list-map-2.0.0.tgz#aaa47403f7b245a92fbc97ea08f250d6087ed085"
-source-map-loader@^0.2.4:
- version "0.2.4"
- resolved "https://registry.yarnpkg.com/source-map-loader/-/source-map-loader-0.2.4.tgz#c18b0dc6e23bf66f6792437557c569a11e072271"
- dependencies:
- async "^2.5.0"
- loader-utils "^1.1.0"
-
source-map-resolve@^0.5.0:
version "0.5.1"
resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.1.tgz#7ad0f593f2281598e854df80f19aae4b92d7a11a"
@@ -15263,24 +9892,7 @@ source-map-resolve@^0.5.0:
source-map-url "^0.4.0"
urix "^0.1.0"
-source-map-resolve@^0.5.2:
- version "0.5.2"
- resolved "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.2.tgz#72e2cc34095543e43b2c62b2c4c10d4a9054f259"
- dependencies:
- atob "^2.1.1"
- decode-uri-component "^0.2.0"
- resolve-url "^0.2.1"
- source-map-url "^0.4.0"
- urix "^0.1.0"
-
-source-map-support@0.5.6, source-map-support@^0.5.6:
- version "0.5.6"
- resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
- dependencies:
- buffer-from "^1.0.0"
- source-map "^0.6.0"
-
-source-map-support@0.5.9, source-map-support@~0.5.6:
+source-map-support@0.5.9:
version "0.5.9"
resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.9.tgz#41bc953b2534267ea2d605bccfa7bfa3111ced5f"
dependencies:
@@ -15299,6 +9911,13 @@ source-map-support@^0.5.0, source-map-support@^0.5.3:
dependencies:
source-map "^0.6.0"
+source-map-support@^0.5.6:
+ version "0.5.6"
+ resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.6.tgz#4435cee46b1aab62b8e8610ce60f788091c51c13"
+ dependencies:
+ buffer-from "^1.0.0"
+ source-map "^0.6.0"
+
source-map-url@^0.4.0:
version "0.4.0"
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
@@ -15313,7 +9932,7 @@ source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
version "0.5.7"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
-source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.0, source-map@~0.6.1:
+source-map@^0.6.0, source-map@^0.6.1, source-map@~0.6.1:
version "0.6.1"
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263"
@@ -15323,24 +9942,6 @@ source-map@~0.2.0:
dependencies:
amdefine ">=0.0.4"
-sourcemapped-stacktrace-node@2.1.8:
- version "2.1.8"
- resolved "https://registry.yarnpkg.com/sourcemapped-stacktrace-node/-/sourcemapped-stacktrace-node-2.1.8.tgz#96fd64263051e252ce8dabf9801bea29dc7e5990"
- dependencies:
- es6-promise "^4.1.1"
- isomorphic-fetch "^2.2.1"
- source-map "^0.6.1"
-
-space-separated-tokens@^1.0.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/space-separated-tokens/-/space-separated-tokens-1.1.2.tgz#e95ab9d19ae841e200808cd96bc7bd0adbbb3412"
- dependencies:
- trim "0.0.1"
-
-sparkles@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/sparkles/-/sparkles-1.0.0.tgz#1acbbfb592436d10bbe8f785b7cc6f82815012c3"
-
spawn-wrap@^1.4.2:
version "1.4.2"
resolved "https://registry.yarnpkg.com/spawn-wrap/-/spawn-wrap-1.4.2.tgz#cff58e73a8224617b6561abdc32586ea0c82248c"
@@ -15374,37 +9975,10 @@ spdx-license-ids@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87"
-spdy-transport@^2.0.18:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1"
- dependencies:
- debug "^2.6.8"
- detect-node "^2.0.3"
- hpack.js "^2.1.6"
- obuf "^1.1.1"
- readable-stream "^2.2.9"
- safe-buffer "^5.0.1"
- wbuf "^1.7.2"
-
-spdy@^3.4.1:
- version "3.4.7"
- resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc"
- dependencies:
- debug "^2.6.8"
- handle-thing "^1.2.5"
- http-deceiver "^1.2.7"
- safe-buffer "^5.0.1"
- select-hose "^2.0.0"
- spdy-transport "^2.0.18"
-
speedometer@~0.1.2:
version "0.1.4"
resolved "https://registry.yarnpkg.com/speedometer/-/speedometer-0.1.4.tgz#9876dbd2a169d3115402d48e6ea6329c8816a50d"
-split-ca@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/split-ca/-/split-ca-1.0.1.tgz#6c83aff3692fa61256e0cd197e05e9de157691a6"
-
split-string@^3.0.1, split-string@^3.0.2:
version "3.1.0"
resolved "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2"
@@ -15433,14 +10007,6 @@ sprintf-js@~1.0.2:
version "1.0.3"
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.0.3.tgz#04e6926f662895354f3dd015203633b857297e2c"
-sqlite3@^4.0.2:
- version "4.0.4"
- resolved "https://registry.yarnpkg.com/sqlite3/-/sqlite3-4.0.4.tgz#1f75e3ededad6e26f7dd819929460ce44a49dfcd"
- dependencies:
- nan "~2.10.0"
- node-pre-gyp "^0.10.3"
- request "^2.87.0"
-
sshpk@^1.7.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/sshpk/-/sshpk-1.14.1.tgz#130f5975eddad963f1d56f92b9ac6c51fa9f83eb"
@@ -15461,7 +10027,7 @@ ssri@^5.2.4:
dependencies:
safe-buffer "^5.1.1"
-ssri@^6.0.0:
+ssri@^6.0.0, ssri@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/ssri/-/ssri-6.0.1.tgz#2a3c41b28dd45b62b63676ecb74001265ae9edd8"
dependencies:
@@ -15471,18 +10037,6 @@ stack-trace@0.0.x:
version "0.0.10"
resolved "https://registry.yarnpkg.com/stack-trace/-/stack-trace-0.0.10.tgz#547c70b347e8d32b4e108ea1a2a159e5fdde19c0"
-stack-utils@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/stack-utils/-/stack-utils-1.0.1.tgz#d4f33ab54e8e38778b0ca5cfd3b3afb12db68620"
-
-stackframe@^0.3.1:
- version "0.3.1"
- resolved "https://registry.yarnpkg.com/stackframe/-/stackframe-0.3.1.tgz#33aa84f1177a5548c8935533cbfeb3420975f5a4"
-
-state-toggle@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/state-toggle/-/state-toggle-1.0.0.tgz#d20f9a616bb4f0c3b98b91922d25b640aa2bc425"
-
static-extend@^0.1.1:
version "0.1.2"
resolved "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6"
@@ -15498,14 +10052,6 @@ statuses@~1.4.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/statuses/-/statuses-1.4.0.tgz#bb73d446da2796106efcc1b601a253d6c46bd087"
-stealthy-require@^1.1.0:
- version "1.1.1"
- resolved "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz#35b09875b4ff49f26a777e509b3090a3226bf24b"
-
-stickyfill@^1.1.1:
- version "1.1.1"
- resolved "https://registry.npmjs.org/stickyfill/-/stickyfill-1.1.1.tgz#39413fee9d025c74a7e59ceecb23784cc0f17f02"
-
stream-browserify@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/stream-browserify/-/stream-browserify-2.0.1.tgz#66266ee5f9bdb9940a4e4514cafb43bb71e5c9db"
@@ -15519,10 +10065,6 @@ stream-combiner@~0.0.4:
dependencies:
duplexer "~0.1.1"
-stream-consume@~0.1.0:
- version "0.1.1"
- resolved "https://registry.yarnpkg.com/stream-consume/-/stream-consume-0.1.1.tgz#d3bdb598c2bd0ae82b8cac7ac50b1107a7996c48"
-
stream-each@^1.1.0:
version "1.2.2"
resolved "https://registry.yarnpkg.com/stream-each/-/stream-each-1.2.2.tgz#8e8c463f91da8991778765873fe4d960d8f616bd"
@@ -15544,10 +10086,6 @@ stream-shift@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.0.tgz#d5c752825e5367e786f78e18e445ea223a155952"
-stream-to-observable@^0.1.0:
- version "0.1.0"
- resolved "https://registry.npmjs.org/stream-to-observable/-/stream-to-observable-0.1.0.tgz#45bf1d9f2d7dc09bed81f1c307c430e68b84cffe"
-
stream-to-pull-stream@^1.7.1:
version "1.7.2"
resolved "https://registry.yarnpkg.com/stream-to-pull-stream/-/stream-to-pull-stream-1.7.2.tgz#757609ae1cebd33c7432d4afbe31ff78650b9dde"
@@ -15559,23 +10097,12 @@ strict-uri-encode@^1.0.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-1.1.0.tgz#279b225df1d582b1f54e65addd4352e18faa0713"
-strict-uri-encode@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz#b9c7330c7042862f6b142dc274bbcc5866ce3546"
-
string-editor@^0.1.0:
version "0.1.2"
resolved "https://registry.yarnpkg.com/string-editor/-/string-editor-0.1.2.tgz#f5ff1b5ac4aed7ac6c2fb8de236d1551b20f61d0"
dependencies:
editor "^1.0.0"
-string-length@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/string-length/-/string-length-2.0.0.tgz#d40dbb686a3ace960c1cffca562bf2c45f8363ed"
- dependencies:
- astral-regex "^1.0.0"
- strip-ansi "^4.0.0"
-
string-width@^1.0.1, string-width@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3"
@@ -15591,14 +10118,6 @@ string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"
-string-width@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.0.0.tgz#5a1690a57cc78211fffd9bf24bbe24d090604eb1"
- dependencies:
- emoji-regex "^7.0.1"
- is-fullwidth-code-point "^2.0.0"
- strip-ansi "^5.0.0"
-
string.prototype.padend@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0"
@@ -15607,7 +10126,7 @@ string.prototype.padend@^3.0.0:
es-abstract "^1.4.3"
function-bind "^1.0.2"
-string.prototype.trim@^1.1.2, string.prototype.trim@~1.1.2:
+string.prototype.trim@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea"
dependencies:
@@ -15621,16 +10140,14 @@ string_decoder@^1.0.0, string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"
-string_decoder@^1.1.1:
- version "1.2.0"
- resolved "https://registry.npmjs.org/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d"
- dependencies:
- safe-buffer "~5.1.0"
-
string_decoder@~0.10.x:
version "0.10.31"
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94"
+stringify-package@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/stringify-package/-/stringify-package-1.0.0.tgz#e02828089333d7d45cd8c287c30aa9a13375081b"
+
stringstream@~0.0.4, stringstream@~0.0.5:
version "0.0.5"
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@@ -15653,29 +10170,16 @@ strip-ansi@^4.0.0:
dependencies:
ansi-regex "^3.0.0"
-strip-ansi@^5.0.0:
- version "5.0.0"
- resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.0.0.tgz#f78f68b5d0866c20b2c9b8c61b5298508dc8756f"
- dependencies:
- ansi-regex "^4.0.0"
-
-strip-bom@3.0.0, strip-bom@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
-
-strip-bom@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-1.0.0.tgz#85b8862f3844b5a6d5ec8467a93598173a36f794"
- dependencies:
- first-chunk-stream "^1.0.0"
- is-utf8 "^0.2.0"
-
strip-bom@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e"
dependencies:
is-utf8 "^0.2.0"
+strip-bom@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3"
+
strip-dirs@^2.0.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/strip-dirs/-/strip-dirs-2.1.0.tgz#4987736264fc344cf20f6c34aca9d13d1d4ed6c5"
@@ -15702,7 +10206,7 @@ strip-indent@^2.0.0:
version "2.0.0"
resolved "http://registry.yarnpkg.com/strip-indent/-/strip-indent-2.0.0.tgz#5ef8db295d01e6ed6cbf7aab96998d7822527b68"
-strip-json-comments@^2.0.1, strip-json-comments@~2.0.1:
+strip-json-comments@~2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-2.0.1.tgz#3c531942e908c2697c0ec344858c286c7ca0a60a"
@@ -15725,90 +10229,13 @@ strong-log-transformer@^2.0.0:
minimist "^1.2.0"
through "^2.3.4"
-style-loader@0.23.x:
- version "0.23.0"
- resolved "https://registry.yarnpkg.com/style-loader/-/style-loader-0.23.0.tgz#8377fefab68416a2e05f1cabd8c3a3acfcce74f1"
- dependencies:
- loader-utils "^1.1.0"
- schema-utils "^0.4.5"
-
-styled-components@^3.3.3:
- version "3.4.2"
- resolved "https://registry.npmjs.org/styled-components/-/styled-components-3.4.2.tgz#8f518419932327e47fe9144824e3184b3e2da95d"
- dependencies:
- buffer "^5.0.3"
- css-to-react-native "^2.0.3"
- fbjs "^0.8.16"
- hoist-non-react-statics "^2.5.0"
- prop-types "^15.5.4"
- react-is "^16.3.1"
- stylis "^3.5.0"
- stylis-rule-sheet "^0.0.10"
- supports-color "^3.2.3"
-
-styled-components@^4.0.1:
- version "4.1.3"
- resolved "https://registry.npmjs.org/styled-components/-/styled-components-4.1.3.tgz#4472447208e618b57e84deaaeb6acd34a5e0fe9b"
- dependencies:
- "@babel/helper-module-imports" "^7.0.0"
- "@emotion/is-prop-valid" "^0.7.3"
- "@emotion/unitless" "^0.7.0"
- babel-plugin-styled-components ">= 1"
- css-to-react-native "^2.2.2"
- memoize-one "^4.0.0"
- prop-types "^15.5.4"
- react-is "^16.6.0"
- stylis "^3.5.0"
- stylis-rule-sheet "^0.0.10"
- supports-color "^5.5.0"
-
-styled-components@^4.0.2:
- version "4.0.2"
- resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.0.2.tgz#7d4409ada019cdd34c25ba68c4577ea95dbcf0c5"
- dependencies:
- "@emotion/is-prop-valid" "^0.6.8"
- babel-plugin-styled-components ">= 1"
- css-to-react-native "^2.2.2"
- memoize-one "^4.0.0"
- prop-types "^15.5.4"
- react-is "^16.3.1"
- stylis "^3.5.0"
- stylis-rule-sheet "^0.0.10"
-
-styled-components@^4.1.1:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/styled-components/-/styled-components-4.1.1.tgz#943922048fae556e286bcbfdd29da4f1399446bc"
- dependencies:
- "@emotion/is-prop-valid" "^0.6.8"
- "@emotion/unitless" "^0.7.0"
- babel-plugin-styled-components ">= 1"
- css-to-react-native "^2.2.2"
- memoize-one "^4.0.0"
- prop-types "^15.5.4"
- react-is "^16.6.0"
- stylis "^3.5.0"
- stylis-rule-sheet "^0.0.10"
- supports-color "^5.5.0"
-
-styled-normalize@^8.0.1:
- version "8.0.1"
- resolved "https://registry.yarnpkg.com/styled-normalize/-/styled-normalize-8.0.1.tgz#f1c390de61075cdcc45ae38a1c8c381c5667a0af"
-
-stylis-rule-sheet@^0.0.10:
- version "0.0.10"
- resolved "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz#44e64a2b076643f4b52e5ff71efc04d8c3c4a430"
-
-stylis@^3.5.0:
- version "3.5.0"
- resolved "https://registry.npmjs.org/stylis/-/stylis-3.5.0.tgz#016fa239663d77f868fef5b67cf201c4b7c701e1"
-
supports-color@4.4.0:
version "4.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e"
dependencies:
has-flag "^2.0.0"
-supports-color@5.4.0, supports-color@^5.1.0, supports-color@^5.2.0, supports-color@^5.3.0:
+supports-color@5.4.0, supports-color@^5.1.0, supports-color@^5.3.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
dependencies:
@@ -15818,79 +10245,12 @@ supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
-supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3:
+supports-color@^3.1.0, supports-color@^3.1.2:
version "3.2.3"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-3.2.3.tgz#65ac0504b3954171d8a64946b2ae3cbb8a5f54f6"
dependencies:
has-flag "^1.0.0"
-supports-color@^5.5.0:
- version "5.5.0"
- resolved "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
- dependencies:
- has-flag "^3.0.0"
-
-svg-react-loader@^0.4.6:
- version "0.4.6"
- resolved "https://registry.yarnpkg.com/svg-react-loader/-/svg-react-loader-0.4.6.tgz#b263efb3e3d2fff4c682a729351aba5f185051a1"
- dependencies:
- css "2.2.4"
- loader-utils "1.1.0"
- ramda "0.21.0"
- rx "4.1.0"
- traverse "0.6.6"
- xml2js "0.4.17"
-
-svgo@^0.7.0, svgo@^0.7.2:
- version "0.7.2"
- resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
- dependencies:
- coa "~1.0.1"
- colors "~1.1.2"
- csso "~2.3.1"
- js-yaml "~3.7.0"
- mkdirp "~0.5.1"
- sax "~1.2.1"
- whet.extend "~0.9.9"
-
-swagger-cli@^2.1.1:
- version "2.1.1"
- resolved "https://registry.npmjs.org/swagger-cli/-/swagger-cli-2.1.1.tgz#f91748e9dabbd659091228af6bb86529d6d12d2a"
- dependencies:
- chalk "^2.4.1"
- js-yaml "^3.12.0"
- mkdirp "^0.5.1"
- swagger-parser "^5.0.1"
- yargs "^12.0.1"
-
-swagger-methods@^1.0.4:
- version "1.0.4"
- resolved "https://registry.npmjs.org/swagger-methods/-/swagger-methods-1.0.4.tgz#2c5b844f4a22ab2f5e773f98193c28e386b1c37e"
-
-swagger-parser@^5.0.1:
- version "5.0.2"
- resolved "https://registry.npmjs.org/swagger-parser/-/swagger-parser-5.0.2.tgz#8ff382dd7b2ce39d8ad68b9d56ee9973abfb7f19"
- dependencies:
- call-me-maybe "^1.0.1"
- debug "^3.1.0"
- json-schema-ref-parser "^5.1.1"
- ono "^4.0.5"
- openapi-schema-validation "^0.4.1"
- swagger-methods "^1.0.4"
- swagger-schema-official "2.0.0-bab6bed"
- z-schema "^3.19.1"
-
-swagger-schema-official@2.0.0-bab6bed:
- version "2.0.0-bab6bed"
- resolved "https://registry.npmjs.org/swagger-schema-official/-/swagger-schema-official-2.0.0-bab6bed.tgz#70070468d6d2977ca5237b2e519ca7d06a2ea3fd"
-
-swap-case@^1.1.0:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/swap-case/-/swap-case-1.1.2.tgz#c39203a4587385fad3c850a0bd1bcafa081974e3"
- dependencies:
- lower-case "^1.1.1"
- upper-case "^1.1.1"
-
swarm-js@0.1.37:
version "0.1.37"
resolved "https://registry.yarnpkg.com/swarm-js/-/swarm-js-0.1.37.tgz#27d485317a340bbeec40292af783cc10acfa4663"
@@ -15913,37 +10273,6 @@ symbol-observable@1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.0.1.tgz#8340fc4702c3122df5d22288f88283f513d3fdd4"
-symbol-observable@1.0.4:
- version "1.0.4"
- resolved "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.0.4.tgz#29bf615d4aa7121bdd898b22d4b3f9bc4e2aa03d"
-
-symbol-observable@^1.0.3, symbol-observable@^1.0.4, symbol-observable@^1.1.0, symbol-observable@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/symbol-observable/-/symbol-observable-1.2.0.tgz#c22688aed4eab3cdc2dfeacbb561660560a00804"
-
-symbol-tree@^3.2.2:
- version "3.2.2"
- resolved "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6"
-
-tabbable@^3.1.0:
- version "3.1.2"
- resolved "https://registry.yarnpkg.com/tabbable/-/tabbable-3.1.2.tgz#f2d16cccd01f400e38635c7181adfe0ad965a4a2"
-
-table@^5.0.2:
- version "5.1.1"
- resolved "https://registry.yarnpkg.com/table/-/table-5.1.1.tgz#92030192f1b7b51b6eeab23ed416862e47b70837"
- dependencies:
- ajv "^6.6.1"
- lodash "^4.17.11"
- slice-ansi "2.0.0"
- string-width "^2.1.1"
-
-tap-listener@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/tap-listener/-/tap-listener-2.0.0.tgz#d2e11d0d8e7c92b26a56ae4f35538a248b44ad63"
- dependencies:
- unipointer "^2.1.0"
-
tapable@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2"
@@ -15979,15 +10308,6 @@ tar-fs@^1.13.0:
pump "^1.0.0"
tar-stream "^1.1.2"
-tar-fs@~1.16.3:
- version "1.16.3"
- resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-1.16.3.tgz#966a628841da2c4010406a82167cbd5e0c72d509"
- dependencies:
- chownr "^1.0.1"
- mkdirp "^0.5.1"
- pump "^1.0.0"
- tar-stream "^1.1.2"
-
tar-pack@^3.4.0:
version "3.4.1"
resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f"
@@ -16040,21 +10360,22 @@ tar@^4, tar@^4.4.3:
safe-buffer "^5.1.2"
yallist "^3.0.2"
+tar@^4.4.8:
+ version "4.4.8"
+ resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.8.tgz#b19eec3fde2a96e64666df9fdb40c5ca1bc3747d"
+ dependencies:
+ chownr "^1.1.1"
+ fs-minipass "^1.2.5"
+ minipass "^2.3.4"
+ minizlib "^1.1.1"
+ mkdirp "^0.5.0"
+ safe-buffer "^5.1.2"
+ yallist "^3.0.2"
+
temp-dir@^1.0.0:
version "1.0.0"
resolved "http://registry.yarnpkg.com/temp-dir/-/temp-dir-1.0.0.tgz#0a7c0ea26d3a39afa7e0ebea9c1fc0bc4daa011d"
-temp-write@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/temp-write/-/temp-write-2.1.0.tgz#59890918e0ef09d548aaa342f4bd3409d8404e96"
- dependencies:
- graceful-fs "^4.1.2"
- mkdirp "^0.5.0"
- os-tmpdir "^1.0.0"
- pify "^2.2.0"
- pinkie-promise "^2.0.0"
- uuid "^2.0.1"
-
temp-write@^3.4.0:
version "3.4.0"
resolved "http://registry.yarnpkg.com/temp-write/-/temp-write-3.4.0.tgz#8cff630fb7e9da05f047c74ce4ce4d685457d492"
@@ -16066,33 +10387,6 @@ temp-write@^3.4.0:
temp-dir "^1.0.0"
uuid "^3.0.1"
-term-size@^1.2.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/term-size/-/term-size-1.2.0.tgz#458b83887f288fc56d6fffbfad262e26638efa69"
- dependencies:
- execa "^0.7.0"
-
-terser-webpack-plugin@^1.1.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-1.1.0.tgz#cf7c25a1eee25bf121f4a587bb9e004e3f80e528"
- dependencies:
- cacache "^11.0.2"
- find-cache-dir "^2.0.0"
- schema-utils "^1.0.0"
- serialize-javascript "^1.4.0"
- source-map "^0.6.1"
- terser "^3.8.1"
- webpack-sources "^1.1.0"
- worker-farm "^1.5.2"
-
-terser@^3.8.1:
- version "3.9.2"
- resolved "https://registry.yarnpkg.com/terser/-/terser-3.9.2.tgz#d139d8292eb3a23091304c934fb539d9f456fb19"
- dependencies:
- commander "~2.17.1"
- source-map "~0.6.1"
- source-map-support "~0.5.6"
-
test-exclude@^4.2.0:
version "4.2.1"
resolved "https://registry.yarnpkg.com/test-exclude/-/test-exclude-4.2.1.tgz#dfa222f03480bca69207ca728b37d74b45f724fa"
@@ -16103,16 +10397,6 @@ test-exclude@^4.2.0:
read-pkg-up "^1.0.1"
require-main-filename "^1.0.1"
-test-exclude@^4.2.1:
- version "4.2.3"
- resolved "https://registry.npmjs.org/test-exclude/-/test-exclude-4.2.3.tgz#a9a5e64474e4398339245a0a769ad7c2f4a97c20"
- dependencies:
- arrify "^1.0.1"
- micromatch "^2.3.11"
- object-assign "^4.1.0"
- read-pkg-up "^1.0.1"
- require-main-filename "^1.0.1"
-
text-encoding@^0.6.4:
version "0.6.4"
resolved "https://registry.yarnpkg.com/text-encoding/-/text-encoding-0.6.4.tgz#e399a982257a276dae428bb92845cb71bdc26d19"
@@ -16121,23 +10405,6 @@ text-extensions@^1.0.0:
version "1.7.0"
resolved "http://registry.yarnpkg.com/text-extensions/-/text-extensions-1.7.0.tgz#faaaba2625ed746d568a23e4d0aacd9bf08a8b39"
-text-table@^0.2.0:
- version "0.2.0"
- resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4"
-
-theming@^1.3.0:
- version "1.3.0"
- resolved "https://registry.npmjs.org/theming/-/theming-1.3.0.tgz#286d5bae80be890d0adc645e5ca0498723725bdc"
- dependencies:
- brcast "^3.0.1"
- is-function "^1.0.1"
- is-plain-object "^2.0.1"
- prop-types "^15.5.8"
-
-thenby@^1.2.3:
- version "1.2.3"
- resolved "https://registry.yarnpkg.com/thenby/-/thenby-1.2.3.tgz#62465b07e3d8b9466f01026df837f738e0faaa69"
-
thenify-all@^1.0.0, thenify-all@^1.6.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/thenify-all/-/thenify-all-1.6.0.tgz#1a1918d402d8fc3f98fbf234db0bcc8cc10e9726"
@@ -16150,7 +10417,7 @@ thenify-all@^1.0.0, thenify-all@^1.6.0:
dependencies:
any-promise "^1.0.0"
-throat@^4.0.0, throat@^4.1.0:
+throat@^4.1.0:
version "4.1.0"
resolved "https://registry.yarnpkg.com/throat/-/throat-4.1.0.tgz#89037cbc92c56ab18926e6ba4cbb200e15672a6a"
@@ -16161,13 +10428,6 @@ through2-filter@^2.0.0:
through2 "~2.0.0"
xtend "~4.0.0"
-through2@^0.6.1, through2@~0.6.3:
- version "0.6.5"
- resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
- dependencies:
- readable-stream ">=1.0.33-1 <1.1.0-0"
- xtend ">=4.0.0 <4.1.0-0"
-
through2@^2.0.0, through2@^2.0.1, through2@^2.0.2, through2@^2.0.3, through2@~2.0.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.3.tgz#0004569b37c7c74ba39c43f3ced78d1ad94140be"
@@ -16182,24 +10442,17 @@ through2@~0.2.3:
readable-stream "~1.1.9"
xtend "~2.1.1"
+through2@~0.6.3:
+ version "0.6.5"
+ resolved "https://registry.yarnpkg.com/through2/-/through2-0.6.5.tgz#41ab9c67b29d57209071410e1d7a7a968cd3ad48"
+ dependencies:
+ readable-stream ">=1.0.33-1 <1.1.0-0"
+ xtend ">=4.0.0 <4.1.0-0"
+
through@2, "through@>=2.2.7 <3", through@^2.3.4, through@^2.3.6, through@~2.3, through@~2.3.1, through@~2.3.4, through@~2.3.8:
version "2.3.8"
resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"
-thunky@^1.0.2:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/thunky/-/thunky-1.0.2.tgz#a862e018e3fb1ea2ec3fce5d55605cf57f247371"
-
-tildify@^1.0.0:
- version "1.2.0"
- resolved "https://registry.yarnpkg.com/tildify/-/tildify-1.2.0.tgz#dcec03f55dca9b7aa3e5b04f21817eb56e63588a"
- dependencies:
- os-homedir "^1.0.0"
-
-time-stamp@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/time-stamp/-/time-stamp-1.1.0.tgz#764a5a11af50561921b133f3b44e618687e0f5c3"
-
timed-out@^4.0.0, timed-out@^4.0.1:
version "4.0.1"
resolved "https://registry.yarnpkg.com/timed-out/-/timed-out-4.0.1.tgz#f32eacac5a175bea25d7fab565ab3ed8741ef56f"
@@ -16210,27 +10463,12 @@ timers-browserify@^2.0.4:
dependencies:
setimmediate "^1.0.4"
-tiny-emitter@^2.0.0:
- version "2.0.2"
- resolved "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.0.2.tgz#82d27468aca5ade8e5fd1e6d22b57dd43ebdfb7c"
-
-title-case@^2.1.0:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/title-case/-/title-case-2.1.1.tgz#3e127216da58d2bc5becf137ab91dae3a7cd8faa"
- dependencies:
- no-case "^2.2.0"
- upper-case "^1.0.3"
-
tmp@0.0.33, tmp@^0.0.33:
version "0.0.33"
resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9"
dependencies:
os-tmpdir "~1.0.2"
-tmpl@1.0.x:
- version "1.0.4"
- resolved "https://registry.npmjs.org/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1"
-
to-absolute-glob@^2.0.0:
version "2.0.2"
resolved "https://registry.yarnpkg.com/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz#1865f43d9e74b0822db9f145b78cff7d0f7c849b"
@@ -16246,14 +10484,6 @@ to-fast-properties@^1.0.3:
version "1.0.3"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47"
-to-fast-properties@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
-
-to-no-case@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/to-no-case/-/to-no-case-1.0.2.tgz#c722907164ef6b178132c8e69930212d1b4aa16a"
-
to-object-path@^0.3.0:
version "0.3.0"
resolved "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af"
@@ -16276,65 +10506,31 @@ to-regex@^3.0.1, to-regex@^3.0.2:
regex-not "^1.0.2"
safe-regex "^1.1.0"
-to-snake-case@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/to-snake-case/-/to-snake-case-1.0.0.tgz#ce746913897946019a87e62edfaeaea4c608ab8c"
- dependencies:
- to-space-case "^1.0.0"
-
-to-space-case@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/to-space-case/-/to-space-case-1.0.0.tgz#b052daafb1b2b29dc770cea0163e5ec0ebc9fc17"
- dependencies:
- to-no-case "^1.0.0"
-
to-through@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-through/-/to-through-2.0.0.tgz#fc92adaba072647bc0b67d6b03664aa195093af6"
dependencies:
through2 "^2.0.3"
-toggle-selection@^1.0.3:
- version "1.0.6"
- resolved "https://registry.yarnpkg.com/toggle-selection/-/toggle-selection-1.0.6.tgz#6e45b1263f2017fa0acc7d89d78b15b8bf77da32"
-
-toposort@^1.0.0:
- version "1.0.7"
- resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.7.tgz#2e68442d9f64ec720b8cc89e6443ac6caa950029"
-
-touch@^3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/touch/-/touch-3.1.0.tgz#fe365f5f75ec9ed4e56825e0bb76d24ab74af83b"
+tough-cookie@~2.3.0, tough-cookie@~2.3.3:
+ version "2.3.4"
+ resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
dependencies:
- nopt "~1.0.10"
+ punycode "^1.4.1"
-tough-cookie@>=2.3.3, tough-cookie@^2.3.4, tough-cookie@~2.4.3:
+tough-cookie@~2.4.3:
version "2.4.3"
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781"
dependencies:
psl "^1.1.24"
punycode "^1.4.1"
-tough-cookie@~2.3.0, tough-cookie@~2.3.3:
- version "2.3.4"
- resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
- dependencies:
- punycode "^1.4.1"
-
tr46@^1.0.1:
version "1.0.1"
resolved "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz#a8b13fd6bfd2489519674ccde55ba3693b706d09"
dependencies:
punycode "^2.1.0"
-traverse-chain@~0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/traverse-chain/-/traverse-chain-0.1.0.tgz#61dbc2d53b69ff6091a12a168fd7d433107e40f1"
-
-traverse@0.6.6:
- version "0.6.6"
- resolved "https://registry.yarnpkg.com/traverse/-/traverse-0.6.6.tgz#cbdf560fd7b9af632502fed40f918c157ea97137"
-
treeify@^1.0.1:
version "1.1.0"
resolved "https://registry.yarnpkg.com/treeify/-/treeify-1.1.0.tgz#4e31c6a463accd0943879f30667c4fdaff411bb8"
@@ -16355,87 +10551,18 @@ trim-right@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003"
-trim-trailing-lines@^1.0.0:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/trim-trailing-lines/-/trim-trailing-lines-1.1.0.tgz#7aefbb7808df9d669f6da2e438cac8c46ada7684"
-
trim@0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/trim/-/trim-0.0.1.tgz#5858547f6b290757ee95cccc666fb50084c460dd"
-trough@^1.0.0:
- version "1.0.2"
- resolved "https://registry.yarnpkg.com/trough/-/trough-1.0.2.tgz#7f1663ec55c480139e2de5e486c6aef6cc24a535"
-
-truffle-blockchain-utils@0.0.1:
- version "0.0.1"
- resolved "https://registry.yarnpkg.com/truffle-blockchain-utils/-/truffle-blockchain-utils-0.0.1.tgz#07a58e55bb0555a64208c9119c0b04ffe1464aa4"
- dependencies:
- web3 "^0.18.0"
-
-truffle-contract-schema@0.0.5:
- version "0.0.5"
- resolved "https://registry.yarnpkg.com/truffle-contract-schema/-/truffle-contract-schema-0.0.5.tgz#5e9d20bd0bf2a27fe94310748249d484eee49961"
- dependencies:
- crypto-js "^3.1.9-1"
-
-truffle-contract@2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/truffle-contract/-/truffle-contract-2.0.1.tgz#f83e3f18d8044027f2a9ee7c33767ba10fd39dd8"
- dependencies:
- ethjs-abi "0.1.8"
- truffle-blockchain-utils "0.0.1"
- truffle-contract-schema "0.0.5"
- web3 "^0.18.0"
-
-tryer@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/tryer/-/tryer-1.0.1.tgz#f2c85406800b9b0f74c9f7465b81eaad241252f8"
-
-ts-jest@^23.10.3:
- version "23.10.3"
- resolved "https://registry.npmjs.org/ts-jest/-/ts-jest-23.10.3.tgz#f42de669888dfd2795b1491016b1813230d553fa"
- dependencies:
- bs-logger "0.x"
- buffer-from "1.x"
- fast-json-stable-stringify "2.x"
- json5 "2.x"
- make-error "1.x"
- mkdirp "0.x"
- semver "^5.5"
- yargs-parser "10.x"
-
-ts-node@^7.0.0:
- version "7.0.0"
- resolved "https://registry.npmjs.org/ts-node/-/ts-node-7.0.0.tgz#a94a13c75e5e1aa6b82814b84c68deb339ba7bff"
- dependencies:
- arrify "^1.0.0"
- buffer-from "^1.1.0"
- diff "^3.1.0"
- make-error "^1.1.1"
- minimist "^1.2.0"
- mkdirp "^0.5.1"
- source-map-support "^0.5.6"
- yn "^2.0.0"
-
-ts-optchain@^0.1.1:
- version "0.1.1"
- resolved "https://registry.npmjs.org/ts-optchain/-/ts-optchain-0.1.1.tgz#9d45e2c3fc6201c2f9be82edad4c76fefb2a36d9"
-
tslib@1.9.0, tslib@^1.8.0, tslib@^1.8.1:
version "1.9.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.9.0.tgz#e37a86fda8cbbaf23a057f473c9f4dc64e5fc2e8"
-tslib@^1.9.0, tslib@^1.9.3:
+tslib@^1.9.0:
version "1.9.3"
resolved "https://registry.npmjs.org/tslib/-/tslib-1.9.3.tgz#d7e4dd79245d85428c4d7e4822a79917954ca286"
-tslint-config-0xproject@^0.0.2:
- version "0.0.2"
- resolved "https://registry.yarnpkg.com/tslint-config-0xproject/-/tslint-config-0xproject-0.0.2.tgz#39901e0c0b3e9388f00092a28b90c015395d5bba"
- dependencies:
- tslint-react "^3.0.0"
-
tslint-eslint-rules@5.4.0:
version "5.4.0"
resolved "https://registry.yarnpkg.com/tslint-eslint-rules/-/tslint-eslint-rules-5.4.0.tgz#e488cc9181bf193fe5cd7bfca213a7695f1737b5"
@@ -16444,7 +10571,7 @@ tslint-eslint-rules@5.4.0:
tslib "1.9.0"
tsutils "^3.0.0"
-tslint-react@^3.0.0, tslint-react@^3.2.0:
+tslint-react@^3.2.0:
version "3.5.1"
resolved "https://registry.yarnpkg.com/tslint-react/-/tslint-react-3.5.1.tgz#a5ca48034bf583fb63b42763bb89fa23062d5390"
dependencies:
@@ -16467,30 +10594,13 @@ tslint@5.11.0:
tslib "^1.8.0"
tsutils "^2.27.2"
-tslint@^5.9.1:
- version "5.9.1"
- resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
- dependencies:
- babel-code-frame "^6.22.0"
- builtin-modules "^1.1.1"
- chalk "^2.3.0"
- commander "^2.12.1"
- diff "^3.2.0"
- glob "^7.1.1"
- js-yaml "^3.7.0"
- minimatch "^3.0.4"
- resolve "^1.3.2"
- semver "^5.3.0"
- tslib "^1.8.0"
- tsutils "^2.12.1"
-
tsutils@3.0.0, tsutils@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.0.0.tgz#0c5070a17a0503e056da038c48b5a1870a50a9ad"
dependencies:
tslib "^1.8.1"
-tsutils@^2.12.1, tsutils@^2.13.1, tsutils@^2.27.2:
+tsutils@^2.13.1, tsutils@^2.27.2:
version "2.29.0"
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-2.29.0.tgz#32b488501467acbedd4b85498673a0812aca0b99"
dependencies:
@@ -16531,10 +10641,6 @@ type-is@~1.6.15, type-is@~1.6.16:
media-typer "0.3.0"
mime-types "~2.1.18"
-typed-styles@^0.0.5:
- version "0.0.5"
- resolved "https://registry.npmjs.org/typed-styles/-/typed-styles-0.0.5.tgz#a60df245d482a9b1adf9c06c078d0f06085ed1cf"
-
typedarray-to-buffer@^3.1.2:
version "3.1.5"
resolved "https://registry.yarnpkg.com/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz#a97ee7a9ff42691b9f783ff1bc5112fe3fca9080"
@@ -16571,32 +10677,6 @@ typedoc@0.13.0:
typedoc-default-themes "^0.5.0"
typescript "3.1.x"
-typemoq@^2.1.0:
- version "2.1.0"
- resolved "https://registry.yarnpkg.com/typemoq/-/typemoq-2.1.0.tgz#4452ce360d92cf2a1a180f0c29de2803f87af1e8"
- dependencies:
- circular-json "^0.3.1"
- lodash "^4.17.4"
- postinstall-build "^5.0.1"
-
-typeorm@^0.2.7:
- version "0.2.11"
- resolved "https://registry.yarnpkg.com/typeorm/-/typeorm-0.2.11.tgz#d81a295ed822e05043f2920cd539f52a963896b0"
- dependencies:
- app-root-path "^2.0.1"
- buffer "^5.1.0"
- chalk "^2.3.2"
- cli-highlight "^1.2.3"
- debug "^3.1.0"
- dotenv "^5.0.1"
- glob "^7.1.2"
- js-yaml "^3.11.0"
- mkdirp "^0.5.1"
- reflect-metadata "^0.1.12"
- xml2js "^0.4.17"
- yargonaut "^1.1.2"
- yargs "^12.0.5"
-
types-bn@^0.0.1:
version "0.0.1"
resolved "https://registry.yarnpkg.com/types-bn/-/types-bn-0.0.1.tgz#4253c7c7251b14e1d77cdca6f58800e5e2b82c4b"
@@ -16629,14 +10709,6 @@ u2f-api@0.2.7:
version "0.2.7"
resolved "https://registry.yarnpkg.com/u2f-api/-/u2f-api-0.2.7.tgz#17bf196b242f6bf72353d9858e6a7566cc192720"
-ua-parser-js@^0.7.18:
- version "0.7.19"
- resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.19.tgz#94151be4c0a7fb1d001af7022fdaca4642659e4b"
-
-ua-parser-js@^0.7.9:
- version "0.7.17"
- resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
-
uglify-es@^3.3.4:
version "3.3.9"
resolved "https://registry.yarnpkg.com/uglify-es/-/uglify-es-3.3.9.tgz#0c1c4f0700bed8dbc124cdb304d2592ca203e677"
@@ -16644,13 +10716,6 @@ uglify-es@^3.3.4:
commander "~2.13.0"
source-map "~0.6.1"
-uglify-js@3.4.x, uglify-js@^3.0.0:
- version "3.4.9"
- resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.4.9.tgz#af02f180c1207d76432e473ed24a28f4a782bae3"
- dependencies:
- commander "~2.17.1"
- source-map "~0.6.1"
-
uglify-js@^2.6:
version "2.8.29"
resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd"
@@ -16677,19 +10742,6 @@ uglifyjs-webpack-plugin@^1.2.4:
webpack-sources "^1.1.0"
worker-farm "^1.5.2"
-uglifyjs-webpack-plugin@^2.0.1:
- version "2.0.1"
- resolved "https://registry.yarnpkg.com/uglifyjs-webpack-plugin/-/uglifyjs-webpack-plugin-2.0.1.tgz#f346af53ed496ce72fef462517d417f62bec3010"
- dependencies:
- cacache "^11.2.0"
- find-cache-dir "^2.0.0"
- schema-utils "^1.0.0"
- serialize-javascript "^1.4.0"
- source-map "^0.6.1"
- uglify-js "^3.0.0"
- webpack-sources "^1.1.0"
- worker-farm "^1.5.2"
-
uid-number@0.0.6, uid-number@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/uid-number/-/uid-number-0.0.6.tgz#0ea10e8035e8eb5b8e4449f06da1c730663baa81"
@@ -16713,45 +10765,10 @@ unc-path-regex@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/unc-path-regex/-/unc-path-regex-0.1.2.tgz#e73dd3d7b0d7c5ed86fbac6b0ae7d8c6a69d50fa"
-undefsafe@^2.0.2:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/undefsafe/-/undefsafe-2.0.2.tgz#225f6b9e0337663e0d8e7cfd686fc2836ccace76"
- dependencies:
- debug "^2.2.0"
-
underscore@1.8.3:
version "1.8.3"
resolved "https://registry.yarnpkg.com/underscore/-/underscore-1.8.3.tgz#4f3fb53b106e6097fcf9cb4109f2a5e9bdfa5022"
-underscore@~1.4.4:
- version "1.4.4"
- resolved "https://registry.npmjs.org/underscore/-/underscore-1.4.4.tgz#61a6a32010622afa07963bf325203cf12239d604"
-
-unherit@^1.0.4:
- version "1.1.0"
- resolved "https://registry.yarnpkg.com/unherit/-/unherit-1.1.0.tgz#6b9aaedfbf73df1756ad9e316dd981885840cd7d"
- dependencies:
- inherits "^2.0.1"
- xtend "^4.0.1"
-
-unidragger@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/unidragger/-/unidragger-2.3.0.tgz#ab9d9fd62106f3252d88fae5f3a99575e6d31d02"
- dependencies:
- unipointer "^2.3.0"
-
-unified@^6.1.5:
- version "6.1.6"
- resolved "https://registry.yarnpkg.com/unified/-/unified-6.1.6.tgz#5ea7f807a0898f1f8acdeefe5f25faa010cc42b1"
- dependencies:
- bail "^1.0.0"
- extend "^3.0.0"
- is-plain-obj "^1.1.0"
- trough "^1.0.0"
- vfile "^2.0.0"
- x-is-function "^1.0.4"
- x-is-string "^0.1.0"
-
union-value@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/union-value/-/union-value-1.0.0.tgz#5c71c34cb5bad5dcebe3ea0cd08207ba5aa1aea4"
@@ -16761,42 +10778,24 @@ union-value@^1.0.0:
is-extendable "^0.1.1"
set-value "^0.4.3"
-unipointer@^2.1.0, unipointer@^2.3.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/unipointer/-/unipointer-2.3.0.tgz#ba0dc462ce31c2a88e80810e19c3bae0ce47ed9f"
- dependencies:
- ev-emitter "^1.0.1"
-
-uniq@^1.0.1:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff"
-
-uniqid@^4.0.0:
- version "4.1.1"
- resolved "https://registry.yarnpkg.com/uniqid/-/uniqid-4.1.1.tgz#89220ddf6b751ae52b5f72484863528596bb84c1"
- dependencies:
- macaddress "^0.2.8"
-
-uniqs@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/uniqs/-/uniqs-2.0.0.tgz#ffede4b36b25290696e6e165d4a59edb998e6b02"
-
unique-filename@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.0.tgz#d05f2fe4032560871f30e93cbe735eea201514f3"
dependencies:
unique-slug "^2.0.0"
+unique-filename@^1.1.1:
+ version "1.1.1"
+ resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230"
+ dependencies:
+ unique-slug "^2.0.0"
+
unique-slug@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/unique-slug/-/unique-slug-2.0.0.tgz#db6676e7c7cc0629878ff196097c78855ae9f4ab"
dependencies:
imurmurhash "^0.1.4"
-unique-stream@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-1.0.0.tgz#d59a4a75427447d9aa6c91e70263f8d26a4b104b"
-
unique-stream@^2.0.2:
version "2.2.1"
resolved "https://registry.yarnpkg.com/unique-stream/-/unique-stream-2.2.1.tgz#5aa003cfbe94c5ff866c4e7d668bb1c4dbadb369"
@@ -16804,36 +10803,6 @@ unique-stream@^2.0.2:
json-stable-stringify "^1.0.0"
through2-filter "^2.0.0"
-unique-string@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/unique-string/-/unique-string-1.0.0.tgz#9e1057cca851abb93398f8b33ae187b99caec11a"
- dependencies:
- crypto-random-string "^1.0.0"
-
-unist-util-is@^2.1.1:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/unist-util-is/-/unist-util-is-2.1.1.tgz#0c312629e3f960c66e931e812d3d80e77010947b"
-
-unist-util-remove-position@^1.0.0:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/unist-util-remove-position/-/unist-util-remove-position-1.1.1.tgz#5a85c1555fc1ba0c101b86707d15e50fa4c871bb"
- dependencies:
- unist-util-visit "^1.1.0"
-
-unist-util-stringify-position@^1.0.0, unist-util-stringify-position@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/unist-util-stringify-position/-/unist-util-stringify-position-1.1.1.tgz#3ccbdc53679eed6ecf3777dd7f5e3229c1b6aa3c"
-
-unist-util-visit-parents@1.1.2:
- version "1.1.2"
- resolved "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-1.1.2.tgz#f6e3afee8bdbf961c0e6f028ea3c0480028c3d06"
-
-unist-util-visit@^1.1.0, unist-util-visit@^1.3.0:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/unist-util-visit/-/unist-util-visit-1.3.0.tgz#41ca7c82981fd1ce6c762aac397fc24e35711444"
- dependencies:
- unist-util-is "^2.1.1"
-
universalify@^0.1.0:
version "0.1.1"
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.1.tgz#fa71badd4437af4c148841e3b3b165f9e9e590b7"
@@ -16865,43 +10834,12 @@ upath@^1.0.5:
version "1.1.0"
resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd"
-update-notifier@^2.3.0, update-notifier@^2.5.0:
- version "2.5.0"
- resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6"
- dependencies:
- boxen "^1.2.1"
- chalk "^2.0.1"
- configstore "^3.0.0"
- import-lazy "^2.1.0"
- is-ci "^1.0.10"
- is-installed-globally "^0.1.0"
- is-npm "^1.0.0"
- latest-version "^3.0.0"
- semver-diff "^2.0.0"
- xdg-basedir "^3.0.0"
-
-upper-case-first@^1.1.0, upper-case-first@^1.1.2:
- version "1.1.2"
- resolved "https://registry.yarnpkg.com/upper-case-first/-/upper-case-first-1.1.2.tgz#5d79bedcff14419518fd2edb0a0507c9b6859115"
- dependencies:
- upper-case "^1.1.1"
-
-upper-case@^1.0.3, upper-case@^1.1.0, upper-case@^1.1.1, upper-case@^1.1.3:
- version "1.1.3"
- resolved "https://registry.yarnpkg.com/upper-case/-/upper-case-1.1.3.tgz#f6b4501c2ec4cdd26ba78be7222961de77621598"
-
uri-js@^3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-3.0.2.tgz#f90b858507f81dea4dcfbb3c4c3dbfa2b557faaa"
dependencies:
punycode "^2.1.0"
-uri-js@^4.2.2:
- version "4.2.2"
- resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.2.2.tgz#94c540e1ff772956e2299507c010aea6c8838eb0"
- dependencies:
- punycode "^2.1.0"
-
urix@^0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72"
@@ -16912,20 +10850,6 @@ url-parse-lax@^1.0.0:
dependencies:
prepend-http "^1.0.1"
-url-parse@1.0.x:
- version "1.0.5"
- resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.0.5.tgz#0854860422afdcfefeb6c965c662d4800169927b"
- dependencies:
- querystringify "0.0.x"
- requires-port "1.0.x"
-
-url-parse@^1.1.8:
- version "1.3.0"
- resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.3.0.tgz#04a06c420d22beb9804f7ada2d57ad13160a4258"
- dependencies:
- querystringify "~1.0.0"
- requires-port "~1.0.0"
-
url-set-query@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/url-set-query/-/url-set-query-1.0.0.tgz#016e8cfd7c20ee05cafe7795e892bd0702faa339"
@@ -16934,13 +10858,6 @@ url-to-options@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/url-to-options/-/url-to-options-1.0.1.tgz#1505a03a289a48cbd7a434efbaeec5055f5633a9"
-url@0.10.3:
- version "0.10.3"
- resolved "https://registry.npmjs.org/url/-/url-0.10.3.tgz#021e4d9c7705f21bbf37d03ceb58767402774c64"
- dependencies:
- punycode "1.3.2"
- querystring "0.2.0"
-
url@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/url/-/url-0.11.0.tgz#3838e97cfc60521eb73c525a8e55bfdd9e2e28f1"
@@ -16954,10 +10871,6 @@ use@^3.1.0:
dependencies:
kind-of "^6.0.2"
-user-home@^1.1.1:
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190"
-
utf8@2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/utf8/-/utf8-2.1.1.tgz#2e01db02f7d8d0944f77104f1609eb0c304cf768"
@@ -16970,27 +10883,16 @@ utf8@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/utf8/-/utf8-3.0.0.tgz#f052eed1364d696e769ef058b183df88c87f69d1"
-util-deprecate@^1.0.1, util-deprecate@^1.0.2, util-deprecate@~1.0.1:
+util-deprecate@~1.0.1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
-util.promisify@1.0.0, util.promisify@^1.0.0:
- version "1.0.0"
- resolved "https://registry.npmjs.org/util.promisify/-/util.promisify-1.0.0.tgz#440f7165a459c9a16dc145eb8e72f35687097030"
- dependencies:
- define-properties "^1.1.2"
- object.getownpropertydescriptors "^2.0.3"
-
util@0.10.3, util@^0.10.3:
version "0.10.3"
resolved "https://registry.yarnpkg.com/util/-/util-0.10.3.tgz#7afb1afe50805246489e3db7fe0ed379336ac0f9"
dependencies:
inherits "2.0.1"
-utila@^0.4.0, utila@~0.4:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/utila/-/utila-0.4.0.tgz#8a16a05d445657a3aea5eecc5b12a4fa5379772c"
-
utile@0.3.x:
version "0.3.0"
resolved "https://registry.yarnpkg.com/utile/-/utile-0.3.0.tgz#1352c340eb820e4d8ddba039a4fbfaa32ed4ef3a"
@@ -17010,36 +10912,14 @@ uuid@2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.1.tgz#c2a30dedb3e535d72ccf82e343941a50ba8533ac"
-uuid@3.0.x, uuid@~3.0.0:
- version "3.0.1"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.0.1.tgz#6544bba2dfda8c1cf17e629a3a305e2bb1fee6c1"
-
-uuid@3.1.0:
- version "3.1.0"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24d7b0d3a034ffababe28ebbc04"
-
-uuid@3.2.1, uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0:
+uuid@^3.0.0, uuid@^3.0.1, uuid@^3.1.0:
version "3.2.1"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.2.1.tgz#12c528bb9d58d0b9265d9a2f6f0fe8be17ff1f14"
-uuid@^2.0.1:
- version "2.0.3"
- resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a"
-
uuid@^3.3.2:
version "3.3.2"
resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.3.2.tgz#1b4af4955eb3077c501c23872fc6513811587131"
-v8-compile-cache@^2.0.2:
- version "2.0.2"
- resolved "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.2.tgz#a428b28bb26790734c4fc8bc9fa106fccebf6a6c"
-
-v8flags@^2.0.2:
- version "2.1.1"
- resolved "https://registry.yarnpkg.com/v8flags/-/v8flags-2.1.1.tgz#aab1a1fa30d45f88dd321148875ac02c0b55e5b4"
- dependencies:
- user-home "^1.1.1"
-
valid-url@^1.0.9:
version "1.0.9"
resolved "https://registry.yarnpkg.com/valid-url/-/valid-url-1.0.9.tgz#1c14479b40f1397a75782f115e4086447433a200"
@@ -17057,14 +10937,6 @@ validate-npm-package-name@^3.0.0:
dependencies:
builtins "^1.0.3"
-validator@^10.0.0:
- version "10.5.0"
- resolved "https://registry.npmjs.org/validator/-/validator-10.5.0.tgz#1debbe1e6f5fd0c920ed2af47516f3762033939c"
-
-value-equal@^0.4.0:
- version "0.4.0"
- resolved "https://registry.yarnpkg.com/value-equal/-/value-equal-0.4.0.tgz#c5bdd2f54ee093c04839d71ce2e4758a6890abc7"
-
value-or-function@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/value-or-function/-/value-or-function-3.0.0.tgz#1c243a50b595c1be54a754bfece8563b9ff8d813"
@@ -17073,11 +10945,7 @@ vary@^1, vary@~1.1.2:
version "1.1.2"
resolved "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc"
-vendors@^1.0.0:
- version "1.0.1"
- resolved "https://registry.yarnpkg.com/vendors/-/vendors-1.0.1.tgz#37ad73c8ee417fb3d580e785312307d274847f22"
-
-verror@1.10.0, verror@^1.6.1:
+verror@1.10.0:
version "1.10.0"
resolved "https://registry.yarnpkg.com/verror/-/verror-1.10.0.tgz#3a105ca17053af55d6e270c1f8288682e18da400"
dependencies:
@@ -17085,38 +10953,6 @@ verror@1.10.0, verror@^1.6.1:
core-util-is "1.0.2"
extsprintf "^1.2.0"
-vfile-location@^2.0.0:
- version "2.0.2"
- resolved "https://registry.yarnpkg.com/vfile-location/-/vfile-location-2.0.2.tgz#d3675c59c877498e492b4756ff65e4af1a752255"
-
-vfile-message@^1.0.0:
- version "1.0.0"
- resolved "https://registry.yarnpkg.com/vfile-message/-/vfile-message-1.0.0.tgz#a6adb0474ea400fa25d929f1d673abea6a17e359"
- dependencies:
- unist-util-stringify-position "^1.1.1"
-
-vfile@^2.0.0:
- version "2.3.0"
- resolved "https://registry.yarnpkg.com/vfile/-/vfile-2.3.0.tgz#e62d8e72b20e83c324bc6c67278ee272488bf84a"
- dependencies:
- is-buffer "^1.1.4"
- replace-ext "1.0.0"
- unist-util-stringify-position "^1.0.0"
- vfile-message "^1.0.0"
-
-vinyl-fs@^0.3.0:
- version "0.3.14"
- resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-0.3.14.tgz#9a6851ce1cac1c1cea5fe86c0931d620c2cfa9e6"
- dependencies:
- defaults "^1.0.0"
- glob-stream "^3.1.5"
- glob-watcher "^0.0.6"
- graceful-fs "^3.0.0"
- mkdirp "^0.5.0"
- strip-bom "^1.0.0"
- through2 "^0.6.1"
- vinyl "^0.4.0"
-
vinyl-fs@^3.0.2:
version "3.0.3"
resolved "https://registry.yarnpkg.com/vinyl-fs/-/vinyl-fs-3.0.3.tgz#c85849405f67428feabbbd5c5dbdd64f47d31bc7"
@@ -17151,21 +10987,6 @@ vinyl-sourcemap@^1.1.0:
remove-bom-buffer "^3.0.0"
vinyl "^2.0.0"
-vinyl@^0.4.0:
- version "0.4.6"
- resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.4.6.tgz#2f356c87a550a255461f36bbeb2a5ba8bf784847"
- dependencies:
- clone "^0.2.0"
- clone-stats "^0.0.1"
-
-vinyl@^0.5.0:
- version "0.5.3"
- resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-0.5.3.tgz#b0455b38fc5e0cf30d4325132e461970c2091cde"
- dependencies:
- clone "^1.0.0"
- clone-stats "^0.0.1"
- replace-ext "0.0.1"
-
vinyl@^2.0.0, vinyl@^2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/vinyl/-/vinyl-2.1.0.tgz#021f9c2cf951d6b939943c89eb5ee5add4fd924c"
@@ -17183,41 +11004,10 @@ vm-browserify@0.0.4:
dependencies:
indexof "0.0.1"
-w3c-hr-time@^1.0.1:
- version "1.0.1"
- resolved "https://registry.npmjs.org/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
- dependencies:
- browser-process-hrtime "^0.1.2"
-
walkdir@0.0.11:
version "0.0.11"
resolved "https://registry.yarnpkg.com/walkdir/-/walkdir-0.0.11.tgz#a16d025eb931bd03b52f308caed0f40fcebe9532"
-walker@~1.0.5:
- version "1.0.7"
- resolved "https://registry.npmjs.org/walker/-/walker-1.0.7.tgz#2f7f9b8fd10d677262b18a884e28d19618e028fb"
- dependencies:
- makeerror "1.0.x"
-
-warning@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c"
- dependencies:
- loose-envify "^1.0.0"
-
-warning@^4.0.1:
- version "4.0.2"
- resolved "https://registry.npmjs.org/warning/-/warning-4.0.2.tgz#aa6876480872116fa3e11d434b0d0d8d91e44607"
- dependencies:
- loose-envify "^1.0.0"
-
-watch@~0.18.0:
- version "0.18.0"
- resolved "https://registry.npmjs.org/watch/-/watch-0.18.0.tgz#28095476c6df7c90c963138990c0a5423eb4b986"
- dependencies:
- exec-sh "^0.2.0"
- minimist "^1.2.0"
-
watchpack@^1.5.0:
version "1.6.0"
resolved "https://registry.npmjs.org/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
@@ -17226,12 +11016,6 @@ watchpack@^1.5.0:
graceful-fs "^4.1.2"
neo-async "^2.5.0"
-wbuf@^1.1.0, wbuf@^1.7.2:
- version "1.7.3"
- resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df"
- dependencies:
- minimalistic-assert "^1.0.0"
-
wcwidth@^1.0.0:
version "1.0.1"
resolved "http://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
@@ -17560,114 +11344,10 @@ web3@1.0.0-beta.35:
web3-shh "1.0.0-beta.35"
web3-utils "1.0.0-beta.35"
-web3@^0.18.0:
- version "0.18.4"
- resolved "https://registry.yarnpkg.com/web3/-/web3-0.18.4.tgz#81ec1784145491f2eaa8955b31c06049e07c5e7d"
- dependencies:
- bignumber.js "git+https://github.com/debris/bignumber.js.git#94d7146671b9719e00a09c29b01a691bc85048c2"
- crypto-js "^3.1.4"
- utf8 "^2.1.1"
- xhr2 "*"
- xmlhttprequest "*"
-
webidl-conversions@^4.0.2:
version "4.0.2"
resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
-webpack-bundle-analyzer@^3.0.3:
- version "3.0.3"
- resolved "https://registry.yarnpkg.com/webpack-bundle-analyzer/-/webpack-bundle-analyzer-3.0.3.tgz#dbc7fff8f52058b6714a20fddf309d0790e3e0a0"
- dependencies:
- acorn "^5.7.3"
- bfj "^6.1.1"
- chalk "^2.4.1"
- commander "^2.18.0"
- ejs "^2.6.1"
- express "^4.16.3"
- filesize "^3.6.1"
- gzip-size "^5.0.0"
- lodash "^4.17.10"
- mkdirp "^0.5.1"
- opener "^1.5.1"
- ws "^6.0.0"
-
-webpack-cli@3.1.2, webpack-cli@^3.1.1:
- version "3.1.2"
- resolved "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.1.2.tgz#17d7e01b77f89f884a2bbf9db545f0f6a648e746"
- dependencies:
- chalk "^2.4.1"
- cross-spawn "^6.0.5"
- enhanced-resolve "^4.1.0"
- global-modules-path "^2.3.0"
- import-local "^2.0.0"
- interpret "^1.1.0"
- loader-utils "^1.1.0"
- supports-color "^5.5.0"
- v8-compile-cache "^2.0.2"
- yargs "^12.0.2"
-
-webpack-dev-middleware@3.4.0:
- version "3.4.0"
- resolved "https://registry.npmjs.org/webpack-dev-middleware/-/webpack-dev-middleware-3.4.0.tgz#1132fecc9026fd90f0ecedac5cbff75d1fb45890"
- dependencies:
- memory-fs "~0.4.1"
- mime "^2.3.1"
- range-parser "^1.0.3"
- webpack-log "^2.0.0"
-
-webpack-dev-server@^3.1.9:
- version "3.1.9"
- resolved "https://registry.npmjs.org/webpack-dev-server/-/webpack-dev-server-3.1.9.tgz#8b32167624d2faff40dcedc2cbce17ed1f34d3e0"
- dependencies:
- ansi-html "0.0.7"
- bonjour "^3.5.0"
- chokidar "^2.0.0"
- compression "^1.5.2"
- connect-history-api-fallback "^1.3.0"
- debug "^3.1.0"
- del "^3.0.0"
- express "^4.16.2"
- html-entities "^1.2.0"
- http-proxy-middleware "~0.18.0"
- import-local "^2.0.0"
- internal-ip "^3.0.1"
- ip "^1.1.5"
- killable "^1.0.0"
- loglevel "^1.4.1"
- opn "^5.1.0"
- portfinder "^1.0.9"
- schema-utils "^1.0.0"
- selfsigned "^1.9.1"
- serve-index "^1.7.2"
- sockjs "0.3.19"
- sockjs-client "1.1.5"
- spdy "^3.4.1"
- strip-ansi "^3.0.0"
- supports-color "^5.1.0"
- webpack-dev-middleware "3.4.0"
- webpack-log "^2.0.0"
- yargs "12.0.2"
-
-webpack-log@^1.2.0:
- version "1.2.0"
- resolved "https://registry.npmjs.org/webpack-log/-/webpack-log-1.2.0.tgz#a4b34cda6b22b518dbb0ab32e567962d5c72a43d"
- dependencies:
- chalk "^2.1.0"
- log-symbols "^2.1.0"
- loglevelnext "^1.0.1"
- uuid "^3.1.0"
-
-webpack-log@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/webpack-log/-/webpack-log-2.0.0.tgz#5b7928e0637593f119d32f6227c1e0ac31e1b47f"
- dependencies:
- ansi-colors "^3.0.0"
- uuid "^3.3.2"
-
-webpack-node-externals@^1.6.0:
- version "1.7.2"
- resolved "https://registry.yarnpkg.com/webpack-node-externals/-/webpack-node-externals-1.7.2.tgz#6e1ee79ac67c070402ba700ef033a9b8d52ac4e3"
-
webpack-sources@^1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-sources-1.1.0.tgz#a101ebae59d6507354d71d8013950a3a8b7a5a54"
@@ -17711,17 +11391,6 @@ webpack@^4.20.2:
watchpack "^1.5.0"
webpack-sources "^1.3.0"
-websocket-driver@>=0.5.1:
- version "0.7.0"
- resolved "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.0.tgz#0caf9d2d755d93aee049d4bdd0d3fe2cca2a24eb"
- dependencies:
- http-parser-js ">=0.4.0"
- websocket-extensions ">=0.1.1"
-
-websocket-extensions@>=0.1.1:
- version "0.1.3"
- resolved "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.3.tgz#5d2ff22977003ec687a4b87073dfbbac146ccf29"
-
websocket@1.0.26:
version "1.0.26"
resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.26.tgz#a03a01299849c35268c83044aa919c6374be8194"
@@ -17731,15 +11400,6 @@ websocket@1.0.26:
typedarray-to-buffer "^3.1.2"
yaeti "^0.0.6"
-websocket@^1.0.25:
- version "1.0.25"
- resolved "https://registry.yarnpkg.com/websocket/-/websocket-1.0.25.tgz#998ec790f0a3eacb8b08b50a4350026692a11958"
- dependencies:
- debug "^2.2.0"
- nan "^2.3.3"
- typedarray-to-buffer "^3.1.2"
- yaeti "^0.0.6"
-
"websocket@git://github.com/frozeman/WebSocket-Node.git#browserifyCompatible":
version "1.0.26"
resolved "git://github.com/frozeman/WebSocket-Node.git#6c72925e3f8aaaea8dc8450f97627e85263999f2"
@@ -17749,27 +11409,13 @@ websocket@^1.0.25:
typedarray-to-buffer "^3.1.2"
yaeti "^0.0.6"
-whatwg-encoding@^1.0.1, whatwg-encoding@^1.0.3:
- version "1.0.5"
- resolved "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-1.0.5.tgz#5abacf777c32166a51d085d6b4f3e7d27113ddb0"
- dependencies:
- iconv-lite "0.4.24"
-
whatwg-fetch@2.0.3, whatwg-fetch@>=0.10.0:
version "2.0.3"
resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.3.tgz#9c84ec2dcf68187ff00bc64e1274b442176e1c84"
-whatwg-mimetype@^2.1.0:
- version "2.2.0"
- resolved "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-2.2.0.tgz#a3d58ef10b76009b042d03e25591ece89b88d171"
-
-whatwg-url@^6.4.1:
- version "6.5.0"
- resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-6.5.0.tgz#f2df02bff176fd65070df74ad5ccbb5a199965a8"
- dependencies:
- lodash.sortby "^4.7.0"
- tr46 "^1.0.1"
- webidl-conversions "^4.0.2"
+whatwg-fetch@2.0.4:
+ version "2.0.4"
+ resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f"
whatwg-url@^7.0.0:
version "7.0.0"
@@ -17779,10 +11425,6 @@ whatwg-url@^7.0.0:
tr46 "^1.0.1"
webidl-conversions "^4.0.2"
-whet.extend@~0.9.9:
- version "0.9.9"
- resolved "https://registry.yarnpkg.com/whet.extend/-/whet.extend-0.9.9.tgz#f877d5bf648c97e5aa542fadc16d6a259b9c11a1"
-
which-module@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/which-module/-/which-module-1.0.0.tgz#bba63ca861948994ff307736089e3b96026c2a4f"
@@ -17795,13 +11437,13 @@ which-pm-runs@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
-which@1, which@^1.2.12:
+which@1, which@^1.3.1:
version "1.3.1"
resolved "http://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
dependencies:
isexe "^2.0.0"
-which@^1.1.1, which@^1.2.14, which@^1.2.9, which@^1.3.0:
+which@^1.1.1, which@^1.2.9, which@^1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/which/-/which-1.3.0.tgz#ff04bdfc010ee547d780bec38e1ac1c2777d253a"
dependencies:
@@ -17813,20 +11455,10 @@ wide-align@^1.1.0:
dependencies:
string-width "^1.0.2"
-widest-line@^2.0.0:
- version "2.0.0"
- resolved "https://registry.yarnpkg.com/widest-line/-/widest-line-2.0.0.tgz#0142a4e8a243f8882c0233aa0e0281aa76152273"
- dependencies:
- string-width "^2.1.1"
-
window-size@0.1.0:
version "0.1.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d"
-window-size@^0.1.4:
- version "0.1.4"
- resolved "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz#f8e1aa1ee5a53ec5bf151ffa09742a6ad7697876"
-
window-size@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.2.0.tgz#b4315bb4214a3d7058ebeee892e13fa24d98b075"
@@ -17880,7 +11512,7 @@ write-file-atomic@^1.1.4:
imurmurhash "^0.1.4"
slide "^1.1.5"
-write-file-atomic@^2.0.0, write-file-atomic@^2.1.0, write-file-atomic@^2.3.0:
+write-file-atomic@^2.0.0, write-file-atomic@^2.3.0:
version "2.3.0"
resolved "https://registry.yarnpkg.com/write-file-atomic/-/write-file-atomic-2.3.0.tgz#1ff61575c2e2a4e8e510d6fa4e243cce183999ab"
dependencies:
@@ -17906,12 +11538,6 @@ write-pkg@^3.1.0:
sort-keys "^2.0.0"
write-json-file "^2.2.0"
-write@^0.2.1:
- version "0.2.1"
- resolved "https://registry.yarnpkg.com/write/-/write-0.2.1.tgz#5fc03828e264cea3fe91455476f7a3c566cb0757"
- dependencies:
- mkdirp "^0.5.1"
-
ws@^3.0.0:
version "3.3.3"
resolved "https://registry.yarnpkg.com/ws/-/ws-3.3.3.tgz#f1cf84fe2d5e901ebce94efaece785f187a228f2"
@@ -17926,18 +11552,6 @@ ws@^5.1.1:
dependencies:
async-limiter "~1.0.0"
-ws@^5.2.0:
- version "5.2.2"
- resolved "https://registry.npmjs.org/ws/-/ws-5.2.2.tgz#dffef14866b8e8dc9133582514d1befaf96e980f"
- dependencies:
- async-limiter "~1.0.0"
-
-ws@^6.0.0:
- version "6.1.0"
- resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.0.tgz#119a9dbf92c54e190ec18d10e871d55c95cf9373"
- dependencies:
- async-limiter "~1.0.0"
-
wsrun@^2.2.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/wsrun/-/wsrun-2.2.0.tgz#fe05ca2c466e9281059d255b2773e7964dbcb3a7"
@@ -17950,18 +11564,6 @@ wsrun@^2.2.0:
throat "^4.1.0"
yargs "^10.0.3"
-x-is-function@^1.0.4:
- version "1.0.4"
- resolved "https://registry.yarnpkg.com/x-is-function/-/x-is-function-1.0.4.tgz#5d294dc3d268cbdd062580e0c5df77a391d1fa1e"
-
-x-is-string@^0.1.0:
- version "0.1.0"
- resolved "https://registry.yarnpkg.com/x-is-string/-/x-is-string-0.1.0.tgz#474b50865af3a49a9c4657f05acd145458f77d82"
-
-xdg-basedir@^3.0.0:
- version "3.0.0"
- resolved "https://registry.yarnpkg.com/xdg-basedir/-/xdg-basedir-3.0.0.tgz#496b2cc109eca8dbacfe2dc72b603c17c5870ad4"
-
xhr-request-promise@^0.1.2:
version "0.1.2"
resolved "https://registry.yarnpkg.com/xhr-request-promise/-/xhr-request-promise-0.1.2.tgz#343c44d1ee7726b8648069682d0f840c83b4261d"
@@ -17999,40 +11601,6 @@ xhr@^2.0.4, xhr@^2.2.0, xhr@^2.3.3:
parse-headers "^2.0.0"
xtend "^4.0.0"
-xml-js@^1.6.4:
- version "1.6.4"
- resolved "https://registry.yarnpkg.com/xml-js/-/xml-js-1.6.4.tgz#fcf9fdc9fb6d691122a02fe5a55c30f84d93ab90"
- dependencies:
- sax "^1.2.4"
-
-xml-name-validator@^3.0.0:
- version "3.0.0"
- resolved "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-3.0.0.tgz#6ae73e06de4d8c6e47f9fb181f78d648ad457c6a"
-
-xml2js@0.4.17:
- version "0.4.17"
- resolved "https://registry.yarnpkg.com/xml2js/-/xml2js-0.4.17.tgz#17be93eaae3f3b779359c795b419705a8817e868"
- dependencies:
- sax ">=0.6.0"
- xmlbuilder "^4.1.0"
-
-xml2js@0.4.19, xml2js@^0.4.17:
- version "0.4.19"
- resolved "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz#686c20f213209e94abf0d1bcf1efaa291c7827a7"
- dependencies:
- sax ">=0.6.0"
- xmlbuilder "~9.0.1"
-
-xmlbuilder@^4.1.0:
- version "4.2.1"
- resolved "http://registry.npmjs.org/xmlbuilder/-/xmlbuilder-4.2.1.tgz#aa58a3041a066f90eaa16c2f5389ff19f3f461a5"
- dependencies:
- lodash "^4.0.0"
-
-xmlbuilder@~9.0.1:
- version "9.0.7"
- resolved "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz#132ee63d2ec5565c557e20f4c22df9aca686b10d"
-
xmlhttprequest@*, xmlhttprequest@1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz#67fe075c5c24fef39f9d65f5f7b7fe75171968fc"
@@ -18051,7 +11619,7 @@ xtend@~2.1.1:
dependencies:
object-keys "~0.4.0"
-y18n@^3.2.0, y18n@^3.2.1:
+y18n@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-3.2.1.tgz#6d15fba884c08679c0d77e88e7759e811e07fa41"
@@ -18071,27 +11639,12 @@ yallist@^3.0.0, yallist@^3.0.2:
version "3.0.2"
resolved "https://registry.npmjs.org/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9"
-yargonaut@^1.1.2:
- version "1.1.4"
- resolved "https://registry.yarnpkg.com/yargonaut/-/yargonaut-1.1.4.tgz#c64f56432c7465271221f53f5cc517890c3d6e0c"
- dependencies:
- chalk "^1.1.1"
- figlet "^1.1.1"
- parent-require "^1.0.0"
-
-yargs-parser@10.x, yargs-parser@^10.0.0, yargs-parser@^10.1.0:
+yargs-parser@^10.1.0:
version "10.1.0"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8"
dependencies:
camelcase "^4.1.0"
-yargs-parser@^11.1.1:
- version "11.1.1"
- resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4"
- dependencies:
- camelcase "^5.0.0"
- decamelize "^1.2.0"
-
yargs-parser@^2.4.1:
version "2.4.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-2.4.1.tgz#85568de3cf150ff49fa51825f03a8c880ddcc5c4"
@@ -18134,23 +11687,6 @@ yargs@11.1.0:
y18n "^3.2.1"
yargs-parser "^9.0.2"
-yargs@12.0.2, yargs@^12.0.2:
- version "12.0.2"
- resolved "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc"
- dependencies:
- cliui "^4.0.0"
- decamelize "^2.0.0"
- find-up "^3.0.0"
- get-caller-file "^1.0.1"
- os-locale "^3.0.0"
- require-directory "^2.1.1"
- require-main-filename "^1.0.1"
- set-blocking "^2.0.0"
- string-width "^2.0.0"
- which-module "^2.0.0"
- y18n "^3.2.1 || ^4.0.0"
- yargs-parser "^10.1.0"
-
yargs@^10.0.3:
version "10.1.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-10.1.2.tgz#454d074c2b16a51a43e2fb7807e4f9de69ccb5c5"
@@ -18202,12 +11738,12 @@ yargs@^12.0.1:
y18n "^3.2.1 || ^4.0.0"
yargs-parser "^10.1.0"
-yargs@^12.0.5:
- version "12.0.5"
- resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13"
+yargs@^12.0.2:
+ version "12.0.2"
+ resolved "https://registry.npmjs.org/yargs/-/yargs-12.0.2.tgz#fe58234369392af33ecbef53819171eff0f5aadc"
dependencies:
cliui "^4.0.0"
- decamelize "^1.2.0"
+ decamelize "^2.0.0"
find-up "^3.0.0"
get-caller-file "^1.0.1"
os-locale "^3.0.0"
@@ -18217,19 +11753,7 @@ yargs@^12.0.5:
string-width "^2.0.0"
which-module "^2.0.0"
y18n "^3.2.1 || ^4.0.0"
- yargs-parser "^11.1.1"
-
-yargs@^3.7.2:
- version "3.32.0"
- resolved "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz#03088e9ebf9e756b69751611d2a5ef591482c995"
- dependencies:
- camelcase "^2.0.1"
- cliui "^3.0.3"
- decamelize "^1.1.1"
- os-locale "^1.4.0"
- string-width "^1.0.1"
- window-size "^0.1.4"
- y18n "^3.2.0"
+ yargs-parser "^10.1.0"
yargs@^4.7.1:
version "4.8.1"
@@ -18277,12 +11801,6 @@ yargs@~3.10.0:
decamelize "^1.0.0"
window-size "0.1.0"
-yauzl@2.4.1:
- version "2.4.1"
- resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005"
- dependencies:
- fd-slicer "~1.0.1"
-
yauzl@^2.4.2:
version "2.9.1"
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.9.1.tgz#a81981ea70a57946133883f029c5821a89359a7f"
@@ -18290,20 +11808,6 @@ yauzl@^2.4.2:
buffer-crc32 "~0.2.3"
fd-slicer "~1.0.1"
-yn@^2.0.0:
- version "2.0.0"
- resolved "https://registry.npmjs.org/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a"
-
-z-schema@^3.19.1:
- version "3.22.0"
- resolved "https://registry.npmjs.org/z-schema/-/z-schema-3.22.0.tgz#e1326063cb438f348c648350770258ff5e20a22b"
- dependencies:
- lodash.get "^4.0.0"
- lodash.isequal "^4.0.0"
- validator "^10.0.0"
- optionalDependencies:
- commander "^2.7.1"
-
zeppelin-solidity@1.8.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/zeppelin-solidity/-/zeppelin-solidity-1.8.0.tgz#049fcde7daea9fc85210f8c6db9f8cd1ab8a853a"