aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.circleci/config.yml8
-rw-r--r--.prettierignore2
-rw-r--r--package.json2
-rw-r--r--packages/0x.js/CHANGELOG.json36
-rw-r--r--packages/0x.js/package.json21
-rw-r--r--packages/0x.js/src/0x.ts105
-rw-r--r--packages/0x.js/src/artifacts.ts7
-rw-r--r--packages/0x.js/src/artifacts/ZRXToken.json10031
-rw-r--r--packages/0x.js/src/compact_artifacts/DummyToken.json22
-rw-r--r--packages/0x.js/src/compact_artifacts/EtherToken.json287
-rw-r--r--packages/0x.js/src/compact_artifacts/Exchange.json610
-rw-r--r--packages/0x.js/src/compact_artifacts/Token.json172
-rw-r--r--packages/0x.js/src/compact_artifacts/TokenRegistry.json547
-rw-r--r--packages/0x.js/src/compact_artifacts/TokenTransferProxy.json187
-rw-r--r--packages/0x.js/src/compact_artifacts/ZRX.json20
-rw-r--r--packages/0x.js/src/index.ts55
-rw-r--r--packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts8
-rw-r--r--packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts4
-rw-r--r--packages/0x.js/test/0x.js_test.ts74
-rw-r--r--packages/0x.js/test/artifacts_test.ts48
-rw-r--r--packages/0x.js/test/global_hooks.ts6
-rw-r--r--packages/0x.js/test/utils/token_utils.ts39
-rw-r--r--packages/0x.js/test/utils/web3_wrapper.ts10
-rw-r--r--packages/abi-gen/CHANGELOG.json9
-rwxr-xr-xpackages/abi-gen/bin/abi-gen.js2
-rw-r--r--packages/abi-gen/coverage/.gitkeep0
-rw-r--r--packages/abi-gen/package.json15
-rw-r--r--packages/abi-gen/src/index.ts26
-rw-r--r--packages/abi-gen/src/utils.ts24
-rw-r--r--packages/abi-gen/test/utils_test.ts86
-rw-r--r--packages/connect/CHANGELOG.json9
-rw-r--r--packages/connect/package.json5
-rw-r--r--packages/connect/src/http_client.ts4
-rw-r--r--packages/connect/src/index.ts3
-rw-r--r--packages/connect/src/orderbook_channel_factory.ts32
-rw-r--r--packages/connect/src/schemas/schemas.ts2
-rw-r--r--packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts10
-rw-r--r--packages/connect/src/types.ts13
-rw-r--r--packages/connect/src/utils/assert.ts26
-rw-r--r--packages/connect/src/utils/orderbook_channel_message_parser.ts8
-rw-r--r--packages/connect/src/ws_orderbook_channel.ts185
-rw-r--r--packages/connect/test/orderbook_channel_factory_test.ts45
-rw-r--r--packages/connect/test/ws_orderbook_channel_test.ts60
-rw-r--r--packages/contract-wrappers/package.json3
-rw-r--r--packages/contract-wrappers/src/index.ts3
-rw-r--r--packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts8
-rw-r--r--packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts4
-rw-r--r--packages/contract-wrappers/src/utils/assert.ts2
-rw-r--r--packages/contract-wrappers/test/erc20_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/erc721_wrapper_test.ts3
-rw-r--r--packages/contract-wrappers/test/ether_token_wrapper_test.ts14
-rw-r--r--packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol4
-rw-r--r--packages/contracts/src/2.0.0/forwarder/Forwarder.sol1
-rw-r--r--packages/contracts/test/forwarder/forwarder.ts3
-rw-r--r--packages/dev-utils/package.json3
-rw-r--r--packages/dev-utils/src/web3_factory.ts21
-rw-r--r--packages/metacoin/package.json3
-rw-r--r--packages/metacoin/test/utils/web3_wrapper.ts8
-rw-r--r--packages/migrations/artifacts/2.0.0/Forwarder.json14
-rw-r--r--packages/migrations/compiler.json2
-rw-r--r--packages/migrations/package.json3
-rw-r--r--packages/migrations/src/2.0.0/migration.ts14
-rw-r--r--packages/migrations/src/utils/provider_factory.ts12
-rw-r--r--packages/order-utils/src/assert.ts2
-rw-r--r--packages/order-utils/src/signature_utils.ts20
-rw-r--r--packages/order-watcher/src/order_watcher/order_watcher.ts6
-rw-r--r--packages/order-watcher/src/utils/assert.ts2
-rw-r--r--packages/sol-compiler/package.json1
-rw-r--r--packages/sol-compiler/src/compiler.ts5
-rw-r--r--packages/subproviders/package.json1
-rw-r--r--packages/subproviders/src/index.ts2
-rw-r--r--packages/subproviders/src/subproviders/rpc_subprovider.ts90
-rw-r--r--packages/subproviders/src/subproviders/subprovider.ts24
-rw-r--r--packages/subproviders/src/utils/subprovider_utils.ts4
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts8
-rw-r--r--packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts3
-rw-r--r--packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts8
-rw-r--r--packages/testnet-faucets/package.json5
-rw-r--r--packages/testnet-faucets/src/ts/handler.ts17
-rw-r--r--packages/types/src/index.ts8
-rw-r--r--packages/typescript-typings/types/detect-node/index.d.ts3
-rw-r--r--packages/typescript-typings/types/json-rpc-error/index.d.ts8
-rw-r--r--packages/utils/package.json5
-rw-r--r--packages/utils/src/fetchAsync.ts37
-rw-r--r--packages/utils/src/index.ts1
-rw-r--r--packages/website/package.json1
-rw-r--r--packages/website/ts/blockchain.ts29
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal.tsx339
-rw-r--r--packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx73
-rw-r--r--packages/website/ts/components/order_json.tsx4
-rw-r--r--packages/website/ts/components/token_balances.tsx4
-rw-r--r--packages/website/ts/components/top_bar/top_bar.tsx23
-rw-r--r--packages/website/ts/containers/legacy_portal.ts92
-rw-r--r--packages/website/ts/index.tsx12
-rw-r--r--packages/website/ts/utils/doc_utils.ts6
-rw-r--r--packages/website/ts/utils/fetch_utils.ts6
-rw-r--r--packages/website/ts/utils/utils.ts5
-rw-r--r--yarn.lock108
102 files changed, 10991 insertions, 2976 deletions
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 7027e3999..3393da379 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -65,6 +65,7 @@ jobs:
keys:
- repo-{{ .Environment.CIRCLE_SHA1 }}
- run: yarn wsrun test:circleci @0xproject/0x.js
+ - run: yarn wsrun test:circleci @0xproject/abi-gen
- run: yarn wsrun test:circleci @0xproject/assert
- run: yarn wsrun test:circleci @0xproject/base-contract
- run: yarn wsrun test:circleci @0xproject/connect
@@ -84,6 +85,10 @@ jobs:
paths:
- ~/repo/packages/0x.js/coverage/lcov.info
- save_cache:
+ key: coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
+ paths:
+ - ~/repo/packages/abi-gen/coverage/lcov.info
+ - save_cache:
key: coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
paths:
- ~/repo/packages/assert/coverage/lcov.info
@@ -162,6 +167,9 @@ jobs:
- coverage-0xjs-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
+ - coverage-abi-gen-{{ .Environment.CIRCLE_SHA1 }}
+ - restore_cache:
+ keys:
- coverage-assert-{{ .Environment.CIRCLE_SHA1 }}
- restore_cache:
keys:
diff --git a/.prettierignore b/.prettierignore
index fe21d0bfc..1b2a75b4a 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -10,7 +10,7 @@ lib
/packages/migrations/src/1.0.0/contract_wrappers
/packages/migrations/src/2.0.0/contract_wrappers
/packages/migrations/src/2.0.0-beta-testnet/contract_wrappers
-/packages/0x.js/test/artifacts
+/packages/0x.js/src/artifacts
/packages/contracts/src/artifacts
/packages/metacoin/artifacts
/packages/contract-wrappers/test/artifacts
diff --git a/package.json b/package.json
index 1ef8a24b5..6dc8542fd 100644
--- a/package.json
+++ b/package.json
@@ -31,7 +31,7 @@
"stage_docs": "wsrun docs:stage $PKG --fast-exit --parallel --exclude-missing",
"lint": "wsrun lint $PKG --fast-exit --parallel --exclude-missing",
"comment:postinstall": "HACK: For some reason `yarn` is not setting up symlinks properly for order-utils. We temporarily set them manually. Remove this after V2 refactor is complete.",
- "postinstall": "rm -rf `pwd`/packages/order-utils/node_modules/@0xproject; mkdir `pwd`/packages/order-utils/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/order-utils/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/assert `pwd`/packages/order-utils/node_modules/@0xproject/assert; ln -s `pwd`/packages/types `pwd`/packages/order-utils/node_modules/@0xproject/types; rm -f `pwd`/packages/contracts/node_modules/@0xproject/types; ln -s `pwd`/packages/types `pwd`/packages/contracts/node_modules/@0xproject/types; rm -rf `pwd`/packages/fill-scenarios/node_modules/@0xproject; mkdir -p `pwd`/packages/fill-scenarios/node_modules/@0xproject; ln -s `pwd`/packages/types `pwd`/packages/fill-scenarios/node_modules/@0xproject/types; ln -s `pwd`/packages/json-schemas `pwd`/packages/fill-scenarios/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/order-utils `pwd`/packages/fill-scenarios/node_modules/@0xproject/order-utils; rm -rf `pwd`/packages/contract-wrappers/node_modules/@0xproject; mkdir -p `pwd`/packages/contract-wrappers/node_modules/@0xproject; ln -s `pwd`/packages/order-utils `pwd`/packages/contract-wrappers/node_modules/@0xproject/order-utils; ln -s `pwd`/packages/assert `pwd`/packages/contract-wrappers/node_modules/@0xproject/assert; ln -s `pwd`/packages/json-schemas `pwd`/packages/contract-wrappers/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/types `pwd`/packages/contract-wrappers/node_modules/@0xproject/types; ln -s `pwd`/packages/fill-scenarios `pwd`/packages/contract-wrappers/node_modules/@0xproject/fill-scenarios; rm -rf `pwd`/packages/assert/node_modules/@0xproject; mkdir -p `pwd`/packages/assert/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/assert/node_modules/@0xproject/json-schemas"
+ "postinstall": "rm -rf `pwd`/packages/0x.js/node_modules/@0xproject; mkdir `pwd`/packages/0x.js/node_modules/@0xproject; ln -s `pwd`/packages/contract-wrappers `pwd`/packages/0x.js/node_modules/@0xproject/contract-wrappers; ln -s `pwd`/packages/order-utils `pwd`/packages/0x.js/node_modules/@0xproject/order-utils; ln -s `pwd`/packages/types `pwd`/packages/0x.js/node_modules/@0xproject/types; rm -rf `pwd`/packages/order-utils/node_modules/@0xproject; mkdir `pwd`/packages/order-utils/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/order-utils/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/assert `pwd`/packages/order-utils/node_modules/@0xproject/assert; ln -s `pwd`/packages/types `pwd`/packages/order-utils/node_modules/@0xproject/types; rm -f `pwd`/packages/contracts/node_modules/@0xproject/types; ln -s `pwd`/packages/types `pwd`/packages/contracts/node_modules/@0xproject/types; rm -rf `pwd`/packages/fill-scenarios/node_modules/@0xproject; mkdir -p `pwd`/packages/fill-scenarios/node_modules/@0xproject; ln -s `pwd`/packages/types `pwd`/packages/fill-scenarios/node_modules/@0xproject/types; ln -s `pwd`/packages/json-schemas `pwd`/packages/fill-scenarios/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/order-utils `pwd`/packages/fill-scenarios/node_modules/@0xproject/order-utils; rm -rf `pwd`/packages/contract-wrappers/node_modules/@0xproject; mkdir -p `pwd`/packages/contract-wrappers/node_modules/@0xproject; ln -s `pwd`/packages/order-utils `pwd`/packages/contract-wrappers/node_modules/@0xproject/order-utils; ln -s `pwd`/packages/assert `pwd`/packages/contract-wrappers/node_modules/@0xproject/assert; ln -s `pwd`/packages/json-schemas `pwd`/packages/contract-wrappers/node_modules/@0xproject/json-schemas; ln -s `pwd`/packages/types `pwd`/packages/contract-wrappers/node_modules/@0xproject/types; ln -s `pwd`/packages/fill-scenarios `pwd`/packages/contract-wrappers/node_modules/@0xproject/fill-scenarios; rm -rf `pwd`/packages/assert/node_modules/@0xproject; mkdir -p `pwd`/packages/assert/node_modules/@0xproject; ln -s `pwd`/packages/json-schemas `pwd`/packages/assert/node_modules/@0xproject/json-schemas"
},
"config": {
"mnemonic": "concert load couple harbor equip island argue ramp clarify fence smart topic"
diff --git a/packages/0x.js/CHANGELOG.json b/packages/0x.js/CHANGELOG.json
index b39079ff2..3ec09cd7e 100644
--- a/packages/0x.js/CHANGELOG.json
+++ b/packages/0x.js/CHANGELOG.json
@@ -1,5 +1,41 @@
[
{
+ "version": "1.0.0",
+ "changes": [
+ {
+ "note": "Remove tokenRegistry wrapper",
+ "pr": 863
+ },
+ {
+ "note": "Rename zeroEx.token to zeroEx.erc20Token, and add zeroEx.erc721Token",
+ "pr": 863
+ },
+ {
+ "note": "Rename zeroEx.proxy to zeroEx.erc20Proxy and add zeroEx.erc721Proxy",
+ "pr": 863
+ },
+ {
+ "note":
+ "Refactored ZeroEx.isValidSignature to zeroEx.isValidSignatureAsync. It is now async so that it can verify contract-dependent signature types",
+ "pr": 863
+ },
+ {
+ "note":
+ "Refactored signOrderHashAsync to ecSignOrderHashAsync. There are now many non-ECSignature ways to sign orders too.",
+ "pr": 863
+ },
+ {
+ "note":
+ "Removed createOrderWatcherAsync method. Will be added back once OrderWatcher is refactored for V2",
+ "pr": 863
+ },
+ {
+ "note": "0x.js exports renamed contract events and event arg types",
+ "pr": 863
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.38.5",
"changes": [
diff --git a/packages/0x.js/package.json b/packages/0x.js/package.json
index 226452dbe..966770cf0 100644
--- a/packages/0x.js/package.json
+++ b/packages/0x.js/package.json
@@ -18,9 +18,10 @@
"watch_without_deps": "yarn pre_build && tsc -w",
"build": "yarn pre_build && yarn build:all && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"build:all": "run-p build:umd:prod build:commonjs; exit 0;",
- "pre_build": "run-s generate_contract_wrappers copy_artifacts",
- "copy_artifacts": "copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts",
- "generate_contract_wrappers": "abi-gen --abis 'src/compact_artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
+ "pre_build": "run-s update_artifacts generate_contract_wrappers",
+ "copy_artifacts": "copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts",
+ "update_artifacts": "for i in ${npm_package_config_contracts}; do copyfiles -u 4 ../migrations/artifacts/2.0.0/$i.json src/artifacts; done;",
+ "generate_contract_wrappers": "abi-gen --abis 'src/artifacts/@(ZRXToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/generated_contract_wrappers --backend ethers",
"lint": "tslint --project . --exclude **/src/generated_contract_wrappers/**/*",
"test:circleci": "run-s test:coverage",
"test": "yarn run_mocha",
@@ -29,7 +30,7 @@
"coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"clean": "shx rm -rf _bundles lib test_temp scripts src/generated_contract_wrappers",
"build:umd:prod": "NODE_ENV=production webpack",
- "build:commonjs": "tsc && copyfiles -u 2 './src/compact_artifacts/**/*.json' ./lib/src/compact_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
+ "build:commonjs": "tsc && yarn copy_artifacts && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
"run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js lib/test/global_hooks.js --timeout 10000 --bail --exit",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js",
"docs:stage": "node scripts/stage_docs.js",
@@ -37,7 +38,7 @@
"upload_docs_json": "aws s3 cp generated_docs/index.json $S3_URL --profile 0xproject --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers --content-type application/json"
},
"config": {
- "compact_artifacts": "Exchange DummyToken ZRXToken Token EtherToken TokenTransferProxy TokenRegistry",
+ "contracts": "ZRXToken",
"postpublish": {
"assets": [
"packages/0x.js/_bundles/index.js",
@@ -74,7 +75,6 @@
"@0xproject/migrations": "^0.0.9",
"@0xproject/monorepo-scripts": "^0.2.2",
"@0xproject/tslint-config": "^0.4.21",
- "@0xproject/sol-compiler": "^0.5.2",
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/node": "^8.0.53",
@@ -102,14 +102,15 @@
"dependencies": {
"@0xproject/assert": "^0.2.13",
"@0xproject/base-contract": "^0.3.5",
- "@0xproject/contract-wrappers": "^0.0.5",
- "@0xproject/order-utils": "^0.0.8",
- "@0xproject/order-watcher": "^0.0.7",
+ "@0xproject/contract-wrappers": "^0.1.0",
+ "@0xproject/order-utils": "^1.0.0",
"@0xproject/sol-compiler": "^0.5.3",
- "@0xproject/types": "^0.8.2",
+ "@0xproject/subproviders": "^0.10.5",
+ "@0xproject/types": "^1.0.0",
"@0xproject/typescript-typings": "^0.4.2",
"@0xproject/utils": "^0.7.2",
"@0xproject/web3-wrapper": "^0.7.2",
+ "ethereum-types": "^0.0.2",
"ethers": "3.0.22",
"lodash": "^4.17.4"
},
diff --git a/packages/0x.js/src/0x.ts b/packages/0x.js/src/0x.ts
index 001f336e7..5d9a03719 100644
--- a/packages/0x.js/src/0x.ts
+++ b/packages/0x.js/src/0x.ts
@@ -2,23 +2,24 @@ import { assert } from '@0xproject/assert';
import {
ContractWrappers,
ContractWrappersConfig,
+ ERC20ProxyWrapper,
+ ERC20TokenWrapper,
+ ERC721ProxyWrapper,
+ ERC721TokenWrapper,
EtherTokenWrapper,
ExchangeWrapper,
- TokenRegistryWrapper,
- TokenTransferProxyWrapper,
- TokenWrapper,
} from '@0xproject/contract-wrappers';
import {
+ ecSignOrderHashAsync,
generatePseudoRandomSalt,
- getOrderHashHex,
- isValidOrderHash,
- isValidSignature,
- signOrderHashAsync,
+ isValidSignatureAsync,
+ MessagePrefixOpts,
+ orderHashUtils,
} from '@0xproject/order-utils';
-import { OrderWatcher, OrderWatcherConfig } from '@0xproject/order-watcher';
-import { ECSignature, Order, Provider, SignedOrder, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
+import { ECSignature, Order, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import { Provider, TransactionReceiptWithDecodedLogs } from 'ethereum-types';
import { constants } from './utils/constants';
@@ -38,24 +39,28 @@ export class ZeroEx {
*/
public exchange: ExchangeWrapper;
/**
- * An instance of the TokenRegistryWrapper class containing methods for interacting with the 0x
- * TokenRegistry smart contract.
+ * An instance of the ERC20TokenWrapper class containing methods for interacting with any ERC20 token smart contract.
*/
- public tokenRegistry: TokenRegistryWrapper;
+ public erc20Token: ERC20TokenWrapper;
/**
- * An instance of the TokenWrapper class containing methods for interacting with any ERC20 token smart contract.
+ * An instance of the ERC721TokenWrapper class containing methods for interacting with any ERC721 token smart contract.
*/
- public token: TokenWrapper;
+ public erc721Token: ERC721TokenWrapper;
/**
* An instance of the EtherTokenWrapper class containing methods for interacting with the
* wrapped ETH ERC20 token smart contract.
*/
public etherToken: EtherTokenWrapper;
/**
- * An instance of the TokenTransferProxyWrapper class containing methods for interacting with the
- * tokenTransferProxy smart contract.
+ * An instance of the ERC20ProxyWrapper class containing methods for interacting with the
+ * ERC20 proxy smart contract.
*/
- public proxy: TokenTransferProxyWrapper;
+ public erc20Proxy: ERC20ProxyWrapper;
+ /**
+ * An instance of the ERC721ProxyWrapper class containing methods for interacting with the
+ * ERC721 proxy smart contract.
+ */
+ public erc721Proxy: ERC721ProxyWrapper;
private _contractWrappers: ContractWrappers;
/**
* Generates a pseudo-random 256-bit salt.
@@ -67,23 +72,12 @@ export class ZeroEx {
return generatePseudoRandomSalt();
}
/**
- * Verifies that the elliptic curve signature `signature` was generated
- * by signing `data` with the private key corresponding to the `signerAddress` address.
- * @param data The hex encoded data signed by the supplied signature.
- * @param signature An object containing the elliptic curve signature parameters.
- * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
- * @return Whether the signature is valid for the supplied signerAddress and data.
- */
- public static isValidSignature(data: string, signature: ECSignature, signerAddress: string): boolean {
- return isValidSignature(data, signature, signerAddress);
- }
- /**
* Computes the orderHash for a supplied order.
* @param order An object that conforms to the Order or SignedOrder interface definitions.
* @return The resulting orderHash from hashing the supplied order.
*/
public static getOrderHashHex(order: Order | SignedOrder): string {
- return getOrderHashHex(order);
+ return orderHashUtils.getOrderHashHex(order);
}
/**
* Checks if the supplied hex encoded order hash is valid.
@@ -93,7 +87,7 @@ export class ZeroEx {
* @return Whether the supplied orderHash has the expected format.
*/
public static isValidOrderHash(orderHash: string): boolean {
- return isValidOrderHash(orderHash);
+ return orderHashUtils.isValidOrderHash(orderHash);
}
/**
* A unit amount is defined as the amount of a token above the specified decimal places (integer part).
@@ -134,13 +128,30 @@ export class ZeroEx {
assert.isWeb3Provider('provider', provider);
this._contractWrappers = new ContractWrappers(provider, config);
- this.proxy = this._contractWrappers.proxy;
- this.token = this._contractWrappers.token;
+ this.erc20Proxy = this._contractWrappers.erc20Proxy;
+ this.erc721Proxy = this._contractWrappers.erc721Proxy;
+ this.erc20Token = this._contractWrappers.erc20Token;
+ this.erc721Token = this._contractWrappers.erc721Token;
this.exchange = this._contractWrappers.exchange;
- this.tokenRegistry = this._contractWrappers.tokenRegistry;
this.etherToken = this._contractWrappers.etherToken;
}
/**
+ * Verifies that the provided signature is valid according to the 0x Protocol smart contracts
+ * @param data The hex encoded data signed by the supplied signature.
+ * @param signature The hex encoded signature.
+ * @param signerAddress The hex encoded address that signed the data, producing the supplied signature.
+ * @return Whether the signature is valid for the supplied signerAddress and data.
+ */
+ public async isValidSignatureAsync(data: string, signature: string, signerAddress: string): Promise<boolean> {
+ const isValid = await isValidSignatureAsync(
+ this._contractWrappers.getProvider(),
+ data,
+ signature,
+ signerAddress,
+ );
+ return isValid;
+ }
+ /**
* Sets a new web3 provider for 0x.js. Updating the provider will stop all
* subscriptions so you will need to re-subscribe to all events relevant to your app after this call.
* @param provider The Web3Provider you would like the 0x.js library to use from now on.
@@ -172,23 +183,21 @@ export class ZeroEx {
* @param orderHash Hex encoded orderHash to sign.
* @param signerAddress The hex encoded Ethereum address you wish to sign it with. This address
* must be available via the Provider supplied to 0x.js.
- * @param shouldAddPersonalMessagePrefix Some signers add the personal message prefix `\x19Ethereum Signed Message`
- * themselves (e.g Parity Signer, Ledger, TestRPC) and others expect it to already be done by the client
- * (e.g Metamask). Depending on which signer this request is going to, decide on whether to add the prefix
- * before sending the request.
+ * @param MessagePrefixOpts Options regarding the desired prefix and whether to add it before calling `eth_sign`
* @return An object containing the Elliptic curve signature parameters generated by signing the orderHash.
*/
- public async signOrderHashAsync(
+ public async ecSignOrderHashAsync(
orderHash: string,
signerAddress: string,
- shouldAddPersonalMessagePrefix: boolean,
+ messagePrefixOpts: MessagePrefixOpts,
): Promise<ECSignature> {
- return signOrderHashAsync(
+ const signature = await ecSignOrderHashAsync(
this._contractWrappers.getProvider(),
orderHash,
signerAddress,
- shouldAddPersonalMessagePrefix,
+ messagePrefixOpts,
);
+ return signature;
}
/**
* Waits for a transaction to be mined and returns the transaction receipt.
@@ -211,18 +220,4 @@ export class ZeroEx {
);
return transactionReceiptWithDecodedLogs;
}
- /**
- * Instantiates and returns a new OrderWatcher instance.
- * Defaults to watching the pending state.
- * @param config The configuration object. Look up the type for the description.
- * @return An instance of the 0x.js OrderWatcher class.
- */
- public async createOrderWatcherAsync(config?: OrderWatcherConfig): Promise<OrderWatcher> {
- // Hack: Get Web3Wrapper from ContractWrappers
- const web3Wrapper: Web3Wrapper = (this._contractWrappers as any)._web3Wrapper;
- const networkId = await web3Wrapper.getNetworkIdAsync();
- const provider = this._contractWrappers.getProvider();
- const orderWatcher = new OrderWatcher(provider, networkId, config);
- return orderWatcher;
- }
}
diff --git a/packages/0x.js/src/artifacts.ts b/packages/0x.js/src/artifacts.ts
new file mode 100644
index 000000000..f68969d28
--- /dev/null
+++ b/packages/0x.js/src/artifacts.ts
@@ -0,0 +1,7 @@
+import { ContractArtifact } from '@0xproject/sol-compiler';
+
+import * as ZRXToken from './artifacts/ZRXToken.json';
+
+export const artifacts = {
+ ZRXToken: (ZRXToken as any) as ContractArtifact,
+};
diff --git a/packages/0x.js/src/artifacts/ZRXToken.json b/packages/0x.js/src/artifacts/ZRXToken.json
new file mode 100644
index 000000000..0ce91c1c1
--- /dev/null
+++ b/packages/0x.js/src/artifacts/ZRXToken.json
@@ -0,0 +1,10031 @@
+{
+ "schemaVersion": "2.0.0",
+ "contractName": "ZRXToken",
+ "compilerOutput": {
+ "abi": [
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "name",
+ "outputs": [
+ {
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_spender",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "approve",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "totalSupply",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_from",
+ "type": "address"
+ },
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transferFrom",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "decimals",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint8"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ }
+ ],
+ "name": "balanceOf",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [],
+ "name": "symbol",
+ "outputs": [
+ {
+ "name": "",
+ "type": "string"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": false,
+ "inputs": [
+ {
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "transfer",
+ "outputs": [
+ {
+ "name": "",
+ "type": "bool"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "constant": true,
+ "inputs": [
+ {
+ "name": "_owner",
+ "type": "address"
+ },
+ {
+ "name": "_spender",
+ "type": "address"
+ }
+ ],
+ "name": "allowance",
+ "outputs": [
+ {
+ "name": "",
+ "type": "uint256"
+ }
+ ],
+ "payable": false,
+ "type": "function"
+ },
+ {
+ "inputs": [],
+ "payable": false,
+ "type": "constructor"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "_from",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "_to",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Transfer",
+ "type": "event"
+ },
+ {
+ "anonymous": false,
+ "inputs": [
+ {
+ "indexed": true,
+ "name": "_owner",
+ "type": "address"
+ },
+ {
+ "indexed": true,
+ "name": "_spender",
+ "type": "address"
+ },
+ {
+ "indexed": false,
+ "name": "_value",
+ "type": "uint256"
+ }
+ ],
+ "name": "Approval",
+ "type": "event"
+ }
+ ],
+ "devdoc": {
+ "methods": {
+ "transferFrom(address,address,uint256)": {
+ "details": "ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.",
+ "params": {
+ "_from": "Address to transfer from.",
+ "_to": "Address to transfer to.",
+ "_value": "Amount to transfer."
+ },
+ "return": "Success of transfer."
+ }
+ }
+ },
+ "evm": {
+ "assembly": " /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":958:964 10**27 */\n 0x33b2e3c9fd0803ce8000000\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n 0x3\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\n jumpi(tag_1, iszero(callvalue))\n invalid\ntag_1:\ntag_2:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1222:1233 totalSupply */\n sload(0x3)\n sub(exp(0x2, 0xa0), 0x1)\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1208:1218 msg.sender */\n caller\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n and\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1207 balances */\n 0x0\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1219 balances[msg.sender] */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1199:1233 balances[msg.sender] = totalSupply */\n sstore\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1150:1240 function ZRXToken()... */\ntag_3:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\ntag_4:\n dataSize(sub_0)\n dup1\n dataOffset(sub_0)\n 0x0\n codecopy\n 0x0\n return\nstop\n\nsub_0: assembly {\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":795:1242 contract ZRXToken is UnlimitedAllowanceToken {... */\n mstore(0x40, 0x60)\n jumpi(tag_1, iszero(calldatasize))\n and(div(calldataload(0x0), 0x100000000000000000000000000000000000000000000000000000000), 0xffffffff)\n 0x6fdde03\n dup2\n eq\n tag_2\n jumpi\n dup1\n 0x95ea7b3\n eq\n tag_3\n jumpi\n dup1\n 0x18160ddd\n eq\n tag_4\n jumpi\n dup1\n 0x23b872dd\n eq\n tag_5\n jumpi\n dup1\n 0x313ce567\n eq\n tag_6\n jumpi\n dup1\n 0x70a08231\n eq\n tag_7\n jumpi\n dup1\n 0x95d89b41\n eq\n tag_8\n jumpi\n dup1\n 0xa9059cbb\n eq\n tag_9\n jumpi\n dup1\n 0xdd62ed3e\n eq\n tag_10\n jumpi\n tag_1:\n invalid\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_2:\n jumpi(tag_11, iszero(callvalue))\n invalid\n tag_11:\n tag_12\n jump(tag_13)\n tag_12:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_15:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_14:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_16:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_3:\n jumpi(tag_17, iszero(callvalue))\n invalid\n tag_17:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_19)\n tag_18:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_4:\n jumpi(tag_20, iszero(callvalue))\n invalid\n tag_20:\n tag_21\n jump(tag_22)\n tag_21:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_5:\n jumpi(tag_23, iszero(callvalue))\n invalid\n tag_23:\n tag_18\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n calldataload(0x44)\n jump(tag_25)\n tag_24:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_6:\n jumpi(tag_26, iszero(callvalue))\n invalid\n tag_26:\n tag_27\n jump(tag_28)\n tag_27:\n 0x40\n dup1\n mload\n 0xff\n swap1\n swap3\n and\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_7:\n jumpi(tag_29, iszero(callvalue))\n invalid\n tag_29:\n tag_21\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n jump(tag_31)\n tag_30:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_8:\n jumpi(tag_32, iszero(callvalue))\n invalid\n tag_32:\n tag_12\n jump(tag_34)\n tag_33:\n 0x40\n dup1\n mload\n 0x20\n dup1\n dup3\n mstore\n dup4\n mload\n dup2\n dup4\n add\n mstore\n dup4\n mload\n swap2\n swap3\n dup4\n swap3\n swap1\n dup4\n add\n swap2\n dup6\n add\n swap1\n dup1\n dup4\n dup4\n /* \"--CODEGEN--\":18:20 */\n dup3\n iszero\n /* \"--CODEGEN--\":13:16 */\n tag_14\n /* \"--CODEGEN--\":7:12 */\n jumpi\n /* \"--CODEGEN--\":32:37 */\n tag_36:\n /* \"--CODEGEN--\":59:62 */\n dup1\n /* \"--CODEGEN--\":53:58 */\n mload\n /* \"--CODEGEN--\":48:51 */\n dup3\n /* \"--CODEGEN--\":41:47 */\n mstore\n /* \"--CODEGEN--\":93:95 */\n 0x20\n /* \"--CODEGEN--\":88:91 */\n dup4\n /* \"--CODEGEN--\":85:87 */\n gt\n /* \"--CODEGEN--\":78:84 */\n iszero\n /* \"--CODEGEN--\":73:76 */\n tag_14\n /* \"--CODEGEN--\":67:72 */\n jumpi\n /* \"--CODEGEN--\":152:155 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0\n swap1\n swap3\n add\n swap2\n /* \"--CODEGEN--\":117:119 */\n 0x20\n /* \"--CODEGEN--\":108:111 */\n swap2\n dup3\n add\n swap2\n /* \"--CODEGEN--\":130:133 */\n add\n /* \"--CODEGEN--\":172:177 */\n tag_15\n /* \"--CODEGEN--\":167:171 */\n jump\n /* \"--CODEGEN--\":181:184 */\n tag_35:\n /* \"--CODEGEN--\":3:189 */\n pop\n pop\n pop\n swap1\n pop\n swap1\n dup2\n add\n swap1\n 0x1f\n and\n dup1\n iszero\n tag_16\n jumpi\n dup1\n dup3\n sub\n dup1\n mload\n 0x1\n dup4\n 0x20\n sub\n 0x100\n exp\n sub\n not\n and\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n tag_37:\n pop\n swap3\n pop\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_9:\n jumpi(tag_38, iszero(callvalue))\n invalid\n tag_38:\n tag_18\n and(calldataload(0x4), 0xffffffffffffffffffffffffffffffffffffffff)\n calldataload(0x24)\n jump(tag_40)\n tag_39:\n 0x40\n dup1\n mload\n swap2\n iszero\n iszero\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_10:\n jumpi(tag_41, iszero(callvalue))\n invalid\n tag_41:\n tag_21\n 0xffffffffffffffffffffffffffffffffffffffff\n calldataload(0x4)\n dup2\n and\n swap1\n calldataload(0x24)\n and\n jump(tag_43)\n tag_42:\n 0x40\n dup1\n mload\n swap2\n dup3\n mstore\n mload\n swap1\n dup2\n swap1\n sub\n 0x20\n add\n swap1\n return\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1009:1058 string constant public name = \"0x Protocol Token\" */\n tag_13:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x11\n dup2\n mstore\n 0x30782050726f746f636f6c20546f6b656e000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_19:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1168:1178 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n dup2\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1167 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap5\n dup8\n and\n dup1\n dup5\n mstore\n swap5\n dup3\n mstore\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1198 */\n dup7\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n dup1\n mload\n dup7\n dup2\n mstore\n swap1\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1144:1148 */\n swap3\n swap5\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1189 */\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1160:1179 */\n swap3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1208:1246 */\n 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925\n swap3\n swap2\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1263:1267 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1087:1274 */\n tag_44:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":932:964 uint public totalSupply = 10**27 */\n tag_22:\n sload(0x3)\n dup2\n jump\t// out\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_25:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1161:1165 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n dup2\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1205 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1212 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1213:1223 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1198:1224 */\n swap1\n swap6\n and\n dup4\n mstore\n swap4\n dup2\n mstore\n dup4\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1253 */\n swap3\n dup3\n mstore\n dup2\n swap1\n mstore\n swap2\n dup3\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1263 */\n dup4\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1292:1298 */\n dup3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1288 */\n dup2\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1279:1298 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1298 */\n tag_46:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n dup1\n iszero\n tag_47\n jumpi\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup5\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1348 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1340:1353 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1336 */\n dup4\n dup2\n add\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1314:1353 */\n lt\n iszero\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1238:1353 */\n tag_47:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n iszero\n tag_48\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup6\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1386 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1391 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup1\n dup3\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1378:1401 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1430 */\n swap2\n dup8\n and\n dup2\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1415:1440 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":768:778 */\n 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1458:1478 */\n dup2\n lt\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n iszero\n tag_49\n jumpi\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup7\n and\n 0x0\n swap1\n dup2\n mstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1505 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1512 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1513:1523 */\n caller\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1524 */\n swap1\n swap5\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1498:1534 */\n dup1\n sload\n dup5\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1454:1549 */\n tag_49:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1578:1581 */\n dup4\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1571:1576 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n 0xffffffffffffffffffffffffffffffffffffffff\n and\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1583:1589 */\n dup6\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1562:1590 */\n mload(0x40)\n dup1\n dup3\n dup2\n mstore\n 0x20\n add\n swap2\n pop\n pop\n mload(0x40)\n dup1\n swap2\n sub\n swap1\n log3\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1611:1615 */\n 0x1\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1604:1615 */\n swap2\n pop\n jump(tag_50)\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_48:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1653:1658 */\n 0x0\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1646:1658 */\n swap2\n pop\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1234:1669 */\n tag_50:\n /* \"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":1066:1675 */\n tag_45:\n pop\n swap4\n swap3\n pop\n pop\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n tag_28:\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":924:926 18 */\n 0x12\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":891:926 uint8 constant public decimals = 18 */\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_31:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1035:1039 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1058:1074 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":982:1081 */\n tag_51:\n swap2\n swap1\n pop\n jump\t// out\n /* \"2.0.0/tokens/ZRXToken/ZRXToken.sol\":1064:1101 string constant public symbol = \"ZRX\" */\n tag_34:\n 0x40\n dup1\n mload\n dup1\n dup3\n add\n swap1\n swap2\n mstore\n 0x3\n dup2\n mstore\n 0x5a52580000000000000000000000000000000000000000000000000000000000\n 0x20\n dup3\n add\n mstore\n dup2\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_40:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":276:286 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":178:182 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:287 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n dup2\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:297 */\n dup3\n swap1\n lt\n dup1\n iszero\n swap1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53\n jumpi\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:335 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":327:340 */\n swap1\n dup2\n mstore\n 0x20\n dup2\n swap1\n mstore\n 0x40\n swap1\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:323 */\n dup3\n dup2\n add\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":301:340 */\n lt\n iszero\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":267:340 */\n tag_53:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n iszero\n tag_54\n jumpi\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n 0xffffffffffffffffffffffffffffffffffffffff\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":365:375 */\n caller\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:364 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:376 */\n dup2\n dup2\n mstore\n 0x20\n dup2\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":356:386 */\n dup1\n sload\n dup9\n swap1\n sub\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap4\n dup8\n and\n dup1\n dup4\n mstore\n swap2\n dup5\n swap1\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:423 */\n dup1\n sload\n dup8\n add\n swap1\n sstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n dup4\n mload\n dup7\n dup2\n mstore\n swap4\n mload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":400:413 */\n swap2\n swap4\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":437:470 */\n 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\n swap3\n swap1\n dup2\n swap1\n sub\n swap1\n swap2\n add\n swap1\n log3\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":491:495 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":484:495 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_54:\n pop\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":521:526 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":514:526 */\n jump(tag_44)\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":263:529 */\n tag_55:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":125:535 */\n tag_52:\n swap3\n swap2\n pop\n pop\n jump\t// out\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_43:\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0xffffffffffffffffffffffffffffffffffffffff\n dup1\n dup4\n and\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1351:1355 */\n 0x0\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n swap1\n dup2\n mstore\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1381 */\n 0x1\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1389 */\n 0x20\n swap1\n dup2\n mstore\n 0x40\n dup1\n dup4\n sha3\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1374:1399 */\n swap4\n dup6\n and\n dup4\n mstore\n swap3\n swap1\n mstore\n sha3\n sload\n /* \"1.0.0/ERC20Token/ERC20Token_v1.sol\":1280:1406 */\n tag_56:\n swap3\n swap2\n pop\n pop\n jump\t// out\n}\n",
+ "bytecode": {
+ "linkReferences": {},
+ "object": "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b61078d8061004a6000396000f300606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029",
+ "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE PUSH12 0x33B2E3C9FD0803CE8000000 PUSH1 0x3 SSTORE CALLVALUE ISZERO PUSH2 0x1C JUMPI INVALID JUMPDEST JUMPDEST PUSH1 0x3 SLOAD PUSH1 0x1 PUSH1 0xA0 PUSH1 0x2 EXP SUB CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SSTORE JUMPDEST JUMPDEST PUSH2 0x78D DUP1 PUSH2 0x4A PUSH1 0x0 CODECOPY PUSH1 0x0 RETURN STOP PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ",
+ "sourceMap": "795:447:3:-;;;958:6;932:32;;1150:90;;;;;;;1222:11;;-1:-1:-1;;;;;1208:10:3;1199:20;:8;:20;;;;;;;;;;:34;1150:90;795:447;;;;;;;"
+ },
+ "deployedBytecode": {
+ "linkReferences": {},
+ "object": "0x606060405236156100965763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610098578063095ea7b31461014657806318160ddd1461018657806323b872dd146101a8578063313ce567146101ee57806370a082311461021457806395d89b411461024f578063a9059cbb146102fd578063dd62ed3e1461033d575bfe5b34156100a057fe5b6100a861037e565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014e57fe5b61017273ffffffffffffffffffffffffffffffffffffffff600435166024356103b5565b604080519115158252519081900360200190f35b341561018e57fe5b61019661042d565b60408051918252519081900360200190f35b34156101b057fe5b61017273ffffffffffffffffffffffffffffffffffffffff60043581169060243516604435610433565b604080519115158252519081900360200190f35b34156101f657fe5b6101fe6105d4565b6040805160ff9092168252519081900360200190f35b341561021c57fe5b61019673ffffffffffffffffffffffffffffffffffffffff600435166105d9565b60408051918252519081900360200190f35b341561025757fe5b6100a8610605565b60408051602080825283518183015283519192839290830191850190808383821561010c575b80518252602083111561010c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe090920191602091820191016100ce565b505050905090810190601f1680156101385780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561030557fe5b61017273ffffffffffffffffffffffffffffffffffffffff6004351660243561063c565b604080519115158252519081900360200190f35b341561034557fe5b61019673ffffffffffffffffffffffffffffffffffffffff60043581169060243516610727565b60408051918252519081900360200190f35b60408051808201909152601181527f30782050726f746f636f6c20546f6b656e000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b73ffffffffffffffffffffffffffffffffffffffff808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104835750828110155b80156104b6575073ffffffffffffffffffffffffffffffffffffffff841660009081526020819052604090205483810110155b156105c65773ffffffffffffffffffffffffffffffffffffffff808516600090815260208190526040808220805487019055918716815220805484900390557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156105585773ffffffffffffffffffffffffffffffffffffffff808616600090815260016020908152604080832033909416835292905220805484900390555b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191506105cb565b600091505b5b509392505050565b601281565b73ffffffffffffffffffffffffffffffffffffffff81166000908152602081905260409020545b919050565b60408051808201909152600381527f5a52580000000000000000000000000000000000000000000000000000000000602082015281565b73ffffffffffffffffffffffffffffffffffffffff3316600090815260208190526040812054829010801590610699575073ffffffffffffffffffffffffffffffffffffffff831660009081526020819052604090205482810110155b156107185773ffffffffffffffffffffffffffffffffffffffff33811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610427565b506000610427565b5b92915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152600160209081526040808320938516835292905220545b929150505600a165627a7a723058208999c5329f53064aac58d4b553cb379a45bfca17e024506ff916637cfc36f7b20029",
+ "opcodes": "PUSH1 0x60 PUSH1 0x40 MSTORE CALLDATASIZE ISZERO PUSH2 0x96 JUMPI PUSH4 0xFFFFFFFF PUSH29 0x100000000000000000000000000000000000000000000000000000000 PUSH1 0x0 CALLDATALOAD DIV AND PUSH4 0x6FDDE03 DUP2 EQ PUSH2 0x98 JUMPI DUP1 PUSH4 0x95EA7B3 EQ PUSH2 0x146 JUMPI DUP1 PUSH4 0x18160DDD EQ PUSH2 0x186 JUMPI DUP1 PUSH4 0x23B872DD EQ PUSH2 0x1A8 JUMPI DUP1 PUSH4 0x313CE567 EQ PUSH2 0x1EE JUMPI DUP1 PUSH4 0x70A08231 EQ PUSH2 0x214 JUMPI DUP1 PUSH4 0x95D89B41 EQ PUSH2 0x24F JUMPI DUP1 PUSH4 0xA9059CBB EQ PUSH2 0x2FD JUMPI DUP1 PUSH4 0xDD62ED3E EQ PUSH2 0x33D JUMPI JUMPDEST INVALID JUMPDEST CALLVALUE ISZERO PUSH2 0xA0 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x37E JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x14E JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x3B5 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x18E JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH2 0x42D JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1B0 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH1 0x44 CALLDATALOAD PUSH2 0x433 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x1F6 JUMPI INVALID JUMPDEST PUSH2 0x1FE PUSH2 0x5D4 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0xFF SWAP1 SWAP3 AND DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x21C JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH2 0x5D9 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x257 JUMPI INVALID JUMPDEST PUSH2 0xA8 PUSH2 0x605 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD PUSH1 0x20 DUP1 DUP3 MSTORE DUP4 MLOAD DUP2 DUP4 ADD MSTORE DUP4 MLOAD SWAP2 SWAP3 DUP4 SWAP3 SWAP1 DUP4 ADD SWAP2 DUP6 ADD SWAP1 DUP1 DUP4 DUP4 DUP3 ISZERO PUSH2 0x10C JUMPI JUMPDEST DUP1 MLOAD DUP3 MSTORE PUSH1 0x20 DUP4 GT ISZERO PUSH2 0x10C JUMPI PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0 SWAP1 SWAP3 ADD SWAP2 PUSH1 0x20 SWAP2 DUP3 ADD SWAP2 ADD PUSH2 0xCE JUMP JUMPDEST POP POP POP SWAP1 POP SWAP1 DUP2 ADD SWAP1 PUSH1 0x1F AND DUP1 ISZERO PUSH2 0x138 JUMPI DUP1 DUP3 SUB DUP1 MLOAD PUSH1 0x1 DUP4 PUSH1 0x20 SUB PUSH2 0x100 EXP SUB NOT AND DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP JUMPDEST POP SWAP3 POP POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x305 JUMPI INVALID JUMPDEST PUSH2 0x172 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD AND PUSH1 0x24 CALLDATALOAD PUSH2 0x63C JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 ISZERO ISZERO DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST CALLVALUE ISZERO PUSH2 0x345 JUMPI INVALID JUMPDEST PUSH2 0x196 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF PUSH1 0x4 CALLDATALOAD DUP2 AND SWAP1 PUSH1 0x24 CALLDATALOAD AND PUSH2 0x727 JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD SWAP2 DUP3 MSTORE MLOAD SWAP1 DUP2 SWAP1 SUB PUSH1 0x20 ADD SWAP1 RETURN JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x11 DUP2 MSTORE PUSH32 0x30782050726F746F636F6C20546F6B656E000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP5 DUP8 AND DUP1 DUP5 MSTORE SWAP5 DUP3 MSTORE DUP1 DUP4 SHA3 DUP7 SWAP1 SSTORE DUP1 MLOAD DUP7 DUP2 MSTORE SWAP1 MLOAD SWAP3 SWAP5 SWAP4 SWAP3 PUSH32 0x8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925 SWAP3 SWAP2 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH1 0x3 SLOAD DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP5 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP6 AND DUP4 MSTORE SWAP4 DUP2 MSTORE DUP4 DUP3 SHA3 SLOAD SWAP3 DUP3 MSTORE DUP2 SWAP1 MSTORE SWAP2 DUP3 SHA3 SLOAD DUP4 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x483 JUMPI POP DUP3 DUP2 LT ISZERO JUMPDEST DUP1 ISZERO PUSH2 0x4B6 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP5 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP4 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x5C6 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP6 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP1 DUP3 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE SWAP2 DUP8 AND DUP2 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE PUSH32 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 LT ISZERO PUSH2 0x558 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP7 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 CALLER SWAP1 SWAP5 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 DUP1 SLOAD DUP5 SWAP1 SUB SWAP1 SSTORE JUMPDEST DUP4 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND DUP6 PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF AND PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF DUP6 PUSH1 0x40 MLOAD DUP1 DUP3 DUP2 MSTORE PUSH1 0x20 ADD SWAP2 POP POP PUSH1 0x40 MLOAD DUP1 SWAP2 SUB SWAP1 LOG3 PUSH1 0x1 SWAP2 POP PUSH2 0x5CB JUMP JUMPDEST PUSH1 0x0 SWAP2 POP JUMPDEST JUMPDEST POP SWAP4 SWAP3 POP POP POP JUMP JUMPDEST PUSH1 0x12 DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP2 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD JUMPDEST SWAP2 SWAP1 POP JUMP JUMPDEST PUSH1 0x40 DUP1 MLOAD DUP1 DUP3 ADD SWAP1 SWAP2 MSTORE PUSH1 0x3 DUP2 MSTORE PUSH32 0x5A52580000000000000000000000000000000000000000000000000000000000 PUSH1 0x20 DUP3 ADD MSTORE DUP2 JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 DUP2 SHA3 SLOAD DUP3 SWAP1 LT DUP1 ISZERO SWAP1 PUSH2 0x699 JUMPI POP PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x20 DUP2 SWAP1 MSTORE PUSH1 0x40 SWAP1 SHA3 SLOAD DUP3 DUP2 ADD LT ISZERO JUMPDEST ISZERO PUSH2 0x718 JUMPI PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF CALLER DUP2 AND PUSH1 0x0 DUP2 DUP2 MSTORE PUSH1 0x20 DUP2 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 DUP1 SLOAD DUP9 SWAP1 SUB SWAP1 SSTORE SWAP4 DUP8 AND DUP1 DUP4 MSTORE SWAP2 DUP5 SWAP1 SHA3 DUP1 SLOAD DUP8 ADD SWAP1 SSTORE DUP4 MLOAD DUP7 DUP2 MSTORE SWAP4 MLOAD SWAP2 SWAP4 PUSH32 0xDDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF SWAP3 SWAP1 DUP2 SWAP1 SUB SWAP1 SWAP2 ADD SWAP1 LOG3 POP PUSH1 0x1 PUSH2 0x427 JUMP JUMPDEST POP PUSH1 0x0 PUSH2 0x427 JUMP JUMPDEST JUMPDEST SWAP3 SWAP2 POP POP JUMP JUMPDEST PUSH20 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF DUP1 DUP4 AND PUSH1 0x0 SWAP1 DUP2 MSTORE PUSH1 0x1 PUSH1 0x20 SWAP1 DUP2 MSTORE PUSH1 0x40 DUP1 DUP4 SHA3 SWAP4 DUP6 AND DUP4 MSTORE SWAP3 SWAP1 MSTORE SHA3 SLOAD JUMPDEST SWAP3 SWAP2 POP POP JUMP STOP LOG1 PUSH6 0x627A7A723058 SHA3 DUP10 SWAP10 0xc5 ORIGIN SWAP16 MSTORE8 MOD 0x4a 0xac PC 0xd4 0xb5 MSTORE8 0xcb CALLDATACOPY SWAP11 GASLIMIT 0xbf 0xca OR 0xe0 0x24 POP PUSH16 0xF916637CFC36F7B20029000000000000 ",
+ "sourceMap": "795:447:3:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1087:187:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;932:32:3;;;;;;;;;;;;;;;;;;;;;;;;;;1066:609:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;891:35:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;982:99:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1064:37:3;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;18:2:-1;;13:3;7:5;32;59:3;53:5;48:3;41:6;93:2;88:3;85:2;78:6;73:3;67:5;152:3;;;;;117:2;108:3;;;;130;172:5;167:4;181:3;3:186;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;125:410:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1280:126;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1009:49:3;;;;;;;;;;;;;;;;;;;:::o;1087:187:0:-;1160:19;1168:10;1160:19;;1144:4;1160:19;;;:7;:19;;;;;;;;:29;;;;;;;;;;;;:38;;;1208;;;;;;;1144:4;;1160:29;:19;1208:38;;;;;;;;;;;-1:-1:-1;1263:4:0;1087:187;;;;;:::o;932:32:3:-;;;;:::o;1066:609:2:-;1198:14;;;;1161:4;1198:14;;;:7;:14;;;;;;;;1213:10;1198:26;;;;;;;;;;;;1238:15;;;;;;;;;;:25;;;;;;:60;;;1292:6;1279:9;:19;;1238:60;:115;;;;-1:-1:-1;1340:13:2;;;:8;:13;;;;;;;;;;;1314:22;;;:39;;1238:115;1234:435;;;1378:13;;;;:8;:13;;;;;;;;;;;:23;;;;;;1415:15;;;;;;:25;;;;;;;768:10;1458:20;;1454:95;;;1498:14;;;;;;;;:7;:14;;;;;;;;1513:10;1498:26;;;;;;;;;:36;;;;;;;1454:95;1578:3;1562:28;;1571:5;1562:28;;;1583:6;1562:28;;;;;;;;;;;;;;;;;;1611:4;1604:11;;;;1234:435;1653:5;1646:12;;1234:435;1066:609;;;;;;;:::o;891:35:3:-;924:2;891:35;:::o;982:99:0:-;1058:16;;;1035:4;1058:16;;;;;;;;;;;982:99;;;;:::o;1064:37:3:-;;;;;;;;;;;;;;;;;;;:::o;125:410:0:-;267:20;276:10;267:20;178:4;267:20;;;;;;;;;;;:30;;;;;;:73;;-1:-1:-1;327:13:0;;;:8;:13;;;;;;;;;;;301:22;;;:39;;267:73;263:266;;;356:20;365:10;356:20;;:8;:20;;;;;;;;;;;:30;;;;;;;400:13;;;;;;;;;;:23;;;;;;437:33;;;;;;;400:13;;437:33;;;;;;;;;;;-1:-1:-1;491:4:0;484:11;;263:266;-1:-1:-1;521:5:0;514:12;;263:266;125:410;;;;;:::o;1280:126::-;1374:15;;;;1351:4;1374:15;;;:7;:15;;;;;;;;:25;;;;;;;;;;1280:126;;;;;:::o"
+ },
+ "gasEstimates": {
+ "creation": {
+ "codeDepositCost": "386600",
+ "executionCost": "40780",
+ "totalCost": "427380"
+ },
+ "external": {
+ "allowance(address,address)": "737",
+ "approve(address,uint256)": "22218",
+ "balanceOf(address)": "579",
+ "decimals()": "270",
+ "name()": "530",
+ "symbol()": "662",
+ "totalSupply()": "417",
+ "transfer(address,uint256)": "43393",
+ "transferFrom(address,address,uint256)": "64116"
+ }
+ },
+ "legacyAssembly": {
+ ".code": [
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "60"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 958,
+ "end": 964,
+ "name": "PUSH",
+ "value": "33B2E3C9FD0803CE8000000"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "PUSH [tag]",
+ "value": "1"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "1"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "2"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1222,
+ "end": 1233,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 1222,
+ "end": 1233,
+ "name": "SLOAD"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "A0"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "PUSH",
+ "value": "2"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "EXP"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "SUB"
+ },
+ {
+ "begin": 1208,
+ "end": 1218,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "AND"
+ },
+ {
+ "begin": 1199,
+ "end": 1207,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1199,
+ "end": 1219,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1199,
+ "end": 1233,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "tag",
+ "value": "3"
+ },
+ {
+ "begin": 1150,
+ "end": 1240,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "tag",
+ "value": "4"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH #[$]",
+ "value": "0000000000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [$]",
+ "value": "0000000000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CODECOPY"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "RETURN"
+ }
+ ],
+ ".data": {
+ "0": {
+ ".code": [
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "60"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CALLDATASIZE"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "FFFFFFFF"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "100000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DIV"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "AND"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "6FDDE03"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP2"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "2"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "95EA7B3"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "3"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "18160DDD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "4"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "23B872DD"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "5"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "313CE567"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "6"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "70A08231"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "7"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "95D89B41"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "8"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "A9059CBB"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "9"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "DUP1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH",
+ "value": "DD62ED3E"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "EQ"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "PUSH [tag]",
+ "value": "10"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "tag",
+ "value": "1"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 795,
+ "end": 1242,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "12"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH [tag]",
+ "value": "13"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "12"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP4"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "DUP3"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 13,
+ "end": 16,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 7,
+ "end": 12,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "tag",
+ "value": "15"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 59,
+ "end": 62,
+ "name": "DUP1"
+ },
+ {
+ "begin": 53,
+ "end": 58,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 48,
+ "end": 51,
+ "name": "DUP3"
+ },
+ {
+ "begin": 41,
+ "end": 47,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 93,
+ "end": 95,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 88,
+ "end": 91,
+ "name": "DUP4"
+ },
+ {
+ "begin": 85,
+ "end": 87,
+ "name": "GT"
+ },
+ {
+ "begin": 78,
+ "end": 84,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 73,
+ "end": 76,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 67,
+ "end": 72,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "ADD"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 117,
+ "end": 119,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "DUP3"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "ADD"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 130,
+ "end": 133,
+ "name": "ADD"
+ },
+ {
+ "begin": 172,
+ "end": 177,
+ "name": "PUSH [tag]",
+ "value": "15"
+ },
+ {
+ "begin": 167,
+ "end": 171,
+ "name": "JUMP"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "tag",
+ "value": "14"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1F"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH [tag]",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "100"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "EXP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "NOT"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "tag",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "17"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "17"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "AND"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH [tag]",
+ "value": "19"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "18"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SUB"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "ADD"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "RETURN"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "4"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "INVALID"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH [tag]",
+ "value": "22"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMP"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "21"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SUB"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "ADD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "5"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "23"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "23"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "AND"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "AND"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "44"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH [tag]",
+ "value": "25"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "24"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SUB"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "ADD"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "RETURN"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "6"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "26"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "INVALID"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "26"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "27"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH [tag]",
+ "value": "28"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMP"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "27"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "FF"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "AND"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP3"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP2"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SUB"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "ADD"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "RETURN"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "7"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "29"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "INVALID"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "29"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "AND"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH [tag]",
+ "value": "31"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMP"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "30"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP3"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "DUP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SUB"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "ADD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "8"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "32"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "32"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "12"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH [tag]",
+ "value": "34"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "33"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP4"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "DUP3"
+ },
+ {
+ "begin": 18,
+ "end": 20,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 13,
+ "end": 16,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 7,
+ "end": 12,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "tag",
+ "value": "36"
+ },
+ {
+ "begin": 32,
+ "end": 37,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 59,
+ "end": 62,
+ "name": "DUP1"
+ },
+ {
+ "begin": 53,
+ "end": 58,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 48,
+ "end": 51,
+ "name": "DUP3"
+ },
+ {
+ "begin": 41,
+ "end": 47,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 93,
+ "end": 95,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 88,
+ "end": 91,
+ "name": "DUP4"
+ },
+ {
+ "begin": 85,
+ "end": 87,
+ "name": "GT"
+ },
+ {
+ "begin": 78,
+ "end": 84,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 73,
+ "end": 76,
+ "name": "PUSH [tag]",
+ "value": "14"
+ },
+ {
+ "begin": 67,
+ "end": 72,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE0"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "ADD"
+ },
+ {
+ "begin": 152,
+ "end": 155,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 117,
+ "end": 119,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "DUP3"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "ADD"
+ },
+ {
+ "begin": 108,
+ "end": 111,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 130,
+ "end": 133,
+ "name": "ADD"
+ },
+ {
+ "begin": 172,
+ "end": 177,
+ "name": "PUSH [tag]",
+ "value": "15"
+ },
+ {
+ "begin": 167,
+ "end": 171,
+ "name": "JUMP"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "tag",
+ "value": "35"
+ },
+ {
+ "begin": 181,
+ "end": 184,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1F"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH [tag]",
+ "value": "16"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "100"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "EXP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "NOT"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "AND"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "ADD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "tag",
+ "value": "37"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "POP"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SUB"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 3,
+ "end": 189,
+ "name": "RETURN"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "9"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "38"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "INVALID"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "38"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "18"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "AND"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH [tag]",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "39"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP3"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "DUP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SUB"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "ADD"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "10"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLVALUE"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "41"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "INVALID"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "41"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "21"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "4"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "AND"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "24"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "CALLDATALOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "AND"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH [tag]",
+ "value": "43"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "42"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SUB"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "ADD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "RETURN"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "tag",
+ "value": "13"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "11"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "30782050726F746F636F6C20546F6B656E000000000000000000000000000000"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "ADD"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1009,
+ "end": 1058,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "19"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1168,
+ "end": 1178,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "AND"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1167,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "AND"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1160,
+ "end": 1198,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1144,
+ "end": 1148,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1160,
+ "end": 1189,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1160,
+ "end": 1179,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "PUSH",
+ "value": "8C5BE1E5EBEC7D5BD14F71427D1E84F3DD0314C0F7B2291E5B200AC8C7C3B925"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SUB"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "ADD"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1208,
+ "end": 1246,
+ "name": "LOG3"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 1263,
+ "end": 1267,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "tag",
+ "value": "44"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "POP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "POP"
+ },
+ {
+ "begin": 1087,
+ "end": 1274,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "tag",
+ "value": "22"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "DUP2"
+ },
+ {
+ "begin": 932,
+ "end": 964,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "25"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "AND"
+ },
+ {
+ "begin": 1161,
+ "end": 1165,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1205,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1212,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1213,
+ "end": 1223,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP6"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "AND"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1198,
+ "end": 1224,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1238,
+ "end": 1253,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "LT"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1263,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "PUSH [tag]",
+ "value": "46"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "POP"
+ },
+ {
+ "begin": 1292,
+ "end": 1298,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1279,
+ "end": 1288,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1279,
+ "end": 1298,
+ "name": "LT"
+ },
+ {
+ "begin": 1279,
+ "end": 1298,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "tag",
+ "value": "46"
+ },
+ {
+ "begin": 1238,
+ "end": 1298,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "PUSH [tag]",
+ "value": "47"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "JUMPI"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "AND"
+ },
+ {
+ "begin": 1340,
+ "end": 1348,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1340,
+ "end": 1353,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1314,
+ "end": 1336,
+ "name": "ADD"
+ },
+ {
+ "begin": 1314,
+ "end": 1353,
+ "name": "LT"
+ },
+ {
+ "begin": 1314,
+ "end": 1353,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "tag",
+ "value": "47"
+ },
+ {
+ "begin": 1238,
+ "end": 1353,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "PUSH [tag]",
+ "value": "48"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "AND"
+ },
+ {
+ "begin": 1378,
+ "end": 1386,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1378,
+ "end": 1391,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "ADD"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1378,
+ "end": 1401,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "DUP8"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "AND"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1415,
+ "end": 1430,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SUB"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1415,
+ "end": 1440,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 768,
+ "end": 778,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1458,
+ "end": 1478,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1458,
+ "end": 1478,
+ "name": "LT"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "PUSH [tag]",
+ "value": "49"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP7"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "AND"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1505,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1498,
+ "end": 1512,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1513,
+ "end": 1523,
+ "name": "CALLER"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP5"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "AND"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1498,
+ "end": 1524,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "DUP5"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SUB"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1498,
+ "end": 1534,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "tag",
+ "value": "49"
+ },
+ {
+ "begin": 1454,
+ "end": 1549,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1578,
+ "end": 1581,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "AND"
+ },
+ {
+ "begin": 1571,
+ "end": 1576,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "AND"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF"
+ },
+ {
+ "begin": 1583,
+ "end": 1589,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "ADD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "POP"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "POP"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SUB"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1562,
+ "end": 1590,
+ "name": "LOG3"
+ },
+ {
+ "begin": 1611,
+ "end": 1615,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "POP"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "PUSH [tag]",
+ "value": "50"
+ },
+ {
+ "begin": 1604,
+ "end": 1615,
+ "name": "JUMP"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "tag",
+ "value": "48"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1653,
+ "end": 1658,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1646,
+ "end": 1658,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1646,
+ "end": 1658,
+ "name": "POP"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "tag",
+ "value": "50"
+ },
+ {
+ "begin": 1234,
+ "end": 1669,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "tag",
+ "value": "45"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "POP"
+ },
+ {
+ "begin": 1066,
+ "end": 1675,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "tag",
+ "value": "28"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 924,
+ "end": 926,
+ "name": "PUSH",
+ "value": "12"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "DUP2"
+ },
+ {
+ "begin": 891,
+ "end": 926,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "31"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "AND"
+ },
+ {
+ "begin": 1035,
+ "end": 1039,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1058,
+ "end": 1074,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "tag",
+ "value": "51"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "POP"
+ },
+ {
+ "begin": 982,
+ "end": 1081,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "tag",
+ "value": "34"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "5A52580000000000000000000000000000000000000000000000000000000000"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP3"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "ADD"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1064,
+ "end": 1101,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "40"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 276,
+ "end": 286,
+ "name": "CALLER"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "AND"
+ },
+ {
+ "begin": 178,
+ "end": 182,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "DUP2"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SHA3"
+ },
+ {
+ "begin": 267,
+ "end": 287,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "DUP3"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "LT"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "DUP1"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 267,
+ "end": 297,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "PUSH [tag]",
+ "value": "53"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "JUMPI"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP4"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "AND"
+ },
+ {
+ "begin": 327,
+ "end": 335,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP2"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "DUP2"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SHA3"
+ },
+ {
+ "begin": 327,
+ "end": 340,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "DUP3"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "DUP2"
+ },
+ {
+ "begin": 301,
+ "end": 323,
+ "name": "ADD"
+ },
+ {
+ "begin": 301,
+ "end": 340,
+ "name": "LT"
+ },
+ {
+ "begin": 301,
+ "end": 340,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "tag",
+ "value": "53"
+ },
+ {
+ "begin": 267,
+ "end": 340,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "ISZERO"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "PUSH [tag]",
+ "value": "54"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPI"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 365,
+ "end": 375,
+ "name": "CALLER"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "AND"
+ },
+ {
+ "begin": 356,
+ "end": 364,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP2"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP1"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "DUP4"
+ },
+ {
+ "begin": 356,
+ "end": 376,
+ "name": "SHA3"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "DUP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "DUP9"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SUB"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 356,
+ "end": 386,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP8"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "AND"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP1"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP4"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "DUP5"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SHA3"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "DUP1"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "DUP8"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "ADD"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 400,
+ "end": 423,
+ "name": "SSTORE"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP7"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "MLOAD"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 400,
+ "end": 413,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "PUSH",
+ "value": "DDF252AD1BE2C89B69C2B068FC378DAA952BA7F163C4A11628F55A4DF523B3EF"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "DUP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SUB"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "ADD"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 437,
+ "end": 470,
+ "name": "LOG3"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 491,
+ "end": 495,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 484,
+ "end": 495,
+ "name": "PUSH [tag]",
+ "value": "44"
+ },
+ {
+ "begin": 484,
+ "end": 495,
+ "name": "JUMP"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "tag",
+ "value": "54"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": -1,
+ "end": -1,
+ "name": "POP"
+ },
+ {
+ "begin": 521,
+ "end": 526,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 514,
+ "end": 526,
+ "name": "PUSH [tag]",
+ "value": "44"
+ },
+ {
+ "begin": 514,
+ "end": 526,
+ "name": "JUMP"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "tag",
+ "value": "55"
+ },
+ {
+ "begin": 263,
+ "end": 529,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "tag",
+ "value": "52"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "POP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "POP"
+ },
+ {
+ "begin": 125,
+ "end": 535,
+ "name": "JUMP",
+ "value": "[out]"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "43"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "AND"
+ },
+ {
+ "begin": 1351,
+ "end": 1355,
+ "name": "PUSH",
+ "value": "0"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1381,
+ "name": "PUSH",
+ "value": "1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "20"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP2"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "PUSH",
+ "value": "40"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1389,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "DUP6"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "AND"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "DUP4"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SWAP1"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "MSTORE"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SHA3"
+ },
+ {
+ "begin": 1374,
+ "end": 1399,
+ "name": "SLOAD"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "tag",
+ "value": "56"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMPDEST"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP3"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "SWAP2"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "POP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "POP"
+ },
+ {
+ "begin": 1280,
+ "end": 1406,
+ "name": "JUMP",
+ "value": "[out]"
+ }
+ ]
+ }
+ }
+ },
+ "methodIdentifiers": {
+ "allowance(address,address)": "dd62ed3e",
+ "approve(address,uint256)": "095ea7b3",
+ "balanceOf(address)": "70a08231",
+ "decimals()": "313ce567",
+ "name()": "06fdde03",
+ "symbol()": "95d89b41",
+ "totalSupply()": "18160ddd",
+ "transfer(address,uint256)": "a9059cbb",
+ "transferFrom(address,address,uint256)": "23b872dd"
+ }
+ },
+ "metadata": "{\"compiler\":{\"version\":\"0.4.11+commit.68ef5810\"},\"language\":\"Solidity\",\"output\":{\"abi\":[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_spender\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_from\",\"type\":\"address\"},{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"name\":\"\",\"type\":\"uint8\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":false,\"inputs\":[{\"name\":\"_to\",\"type\":\"address\"},{\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"payable\":false,\"type\":\"function\"},{\"constant\":true,\"inputs\":[{\"name\":\"_owner\",\"type\":\"address\"},{\"name\":\"_spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"payable\":false,\"type\":\"function\"},{\"inputs\":[],\"payable\":false,\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_from\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_to\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"name\":\"_owner\",\"type\":\"address\"},{\"indexed\":true,\"name\":\"_spender\",\"type\":\"address\"},{\"indexed\":false,\"name\":\"_value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"}],\"devdoc\":{\"methods\":{\"transferFrom(address,address,uint256)\":{\"details\":\"ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\",\"params\":{\"_from\":\"Address to transfer from.\",\"_to\":\"Address to transfer to.\",\"_value\":\"Amount to transfer.\"},\"return\":\"Success of transfer.\"}}},\"userdoc\":{\"methods\":{}}},\"settings\":{\"compilationTarget\":{\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":\"ZRXToken\"},\"libraries\":{},\"optimizer\":{\"enabled\":true,\"runs\":1000000},\"remappings\":[]},\"sources\":{\"1.0.0/ERC20Token/ERC20Token_v1.sol\":{\"keccak256\":\"0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d\",\"urls\":[\"bzzr://d12710a563415ad98ff28ecb3aab0b68467b3d023e7c130c73ed9918ef86158e\"]},\"1.0.0/Token/Token_v1.sol\":{\"keccak256\":\"0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37\",\"urls\":[\"bzzr://a62ae857a4cf2e8948e36d02470c612ac1a5ac20ebe1c1b553ad1ed8becb634e\"]},\"1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\":{\"keccak256\":\"0x2e1f4b899081cedd8940a9cd0f0f7413264c883312ed0ba9c53885766fe0a1a5\",\"urls\":[\"bzzr://47c42a58e56ffe81e49c8aabd3c391f5fa807fea299b3a2178501e3669baeb52\"]},\"2.0.0/tokens/ZRXToken/ZRXToken.sol\":{\"keccak256\":\"0x9eeb623d48909b083c77688b13b610811c53e37622b3fcbaa23c01873230f5d6\",\"urls\":[\"bzzr://84f3b5c2653068092771d443281018ff2ee0543817426d0fb6f9037a3570e37f\"]}},\"version\":1}",
+ "userdoc": {
+ "methods": {}
+ }
+ },
+ "sources": {
+ "1.0.0/ERC20Token/ERC20Token_v1.sol": {
+ "id": 0,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 126,
+ "name": "PragmaDirective",
+ "src": "0:24:0"
+ },
+ {
+ "attributes": {
+ "file": "../Token/Token_v1.sol"
+ },
+ "id": 128,
+ "name": "ImportDirective",
+ "src": "26:58:0"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 322,
+ 397
+ ],
+ "name": "ERC20Token_v1"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "Token"
+ },
+ "id": 129,
+ "name": "UserDefinedTypeName",
+ "src": "112:5:0"
+ }
+ ],
+ "id": 130,
+ "name": "InheritanceSpecifier",
+ "src": "112:5:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transfer",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 131,
+ "name": "ElementaryTypeName",
+ "src": "143:7:0"
+ }
+ ],
+ "id": 132,
+ "name": "VariableDeclaration",
+ "src": "143:11:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 133,
+ "name": "ElementaryTypeName",
+ "src": "156:4:0"
+ }
+ ],
+ "id": 134,
+ "name": "VariableDeclaration",
+ "src": "156:11:0"
+ }
+ ],
+ "id": 135,
+ "name": "ParameterList",
+ "src": "142:26:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 136,
+ "name": "ElementaryTypeName",
+ "src": "178:4:0"
+ }
+ ],
+ "id": 137,
+ "name": "VariableDeclaration",
+ "src": "178:4:0"
+ }
+ ],
+ "id": 138,
+ "name": "ParameterList",
+ "src": "177:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 139,
+ "name": "Identifier",
+ "src": "267:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 140,
+ "name": "Identifier",
+ "src": "276:3:0"
+ }
+ ],
+ "id": 141,
+ "name": "MemberAccess",
+ "src": "276:10:0"
+ }
+ ],
+ "id": 142,
+ "name": "IndexAccess",
+ "src": "267:20:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 143,
+ "name": "Identifier",
+ "src": "291:6:0"
+ }
+ ],
+ "id": 144,
+ "name": "BinaryOperation",
+ "src": "267:30:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 145,
+ "name": "Identifier",
+ "src": "301:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 146,
+ "name": "Identifier",
+ "src": "310:3:0"
+ }
+ ],
+ "id": 147,
+ "name": "IndexAccess",
+ "src": "301:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 148,
+ "name": "Identifier",
+ "src": "317:6:0"
+ }
+ ],
+ "id": 149,
+ "name": "BinaryOperation",
+ "src": "301:22:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 150,
+ "name": "Identifier",
+ "src": "327:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 151,
+ "name": "Identifier",
+ "src": "336:3:0"
+ }
+ ],
+ "id": 152,
+ "name": "IndexAccess",
+ "src": "327:13:0"
+ }
+ ],
+ "id": 153,
+ "name": "BinaryOperation",
+ "src": "301:39:0"
+ }
+ ],
+ "id": 154,
+ "name": "BinaryOperation",
+ "src": "267:73:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 155,
+ "name": "Identifier",
+ "src": "356:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 156,
+ "name": "Identifier",
+ "src": "365:3:0"
+ }
+ ],
+ "id": 157,
+ "name": "MemberAccess",
+ "src": "365:10:0"
+ }
+ ],
+ "id": 158,
+ "name": "IndexAccess",
+ "src": "356:20:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 159,
+ "name": "Identifier",
+ "src": "380:6:0"
+ }
+ ],
+ "id": 160,
+ "name": "Assignment",
+ "src": "356:30:0"
+ }
+ ],
+ "id": 161,
+ "name": "ExpressionStatement",
+ "src": "356:30:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 162,
+ "name": "Identifier",
+ "src": "400:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 163,
+ "name": "Identifier",
+ "src": "409:3:0"
+ }
+ ],
+ "id": 164,
+ "name": "IndexAccess",
+ "src": "400:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 165,
+ "name": "Identifier",
+ "src": "417:6:0"
+ }
+ ],
+ "id": 166,
+ "name": "Assignment",
+ "src": "400:23:0"
+ }
+ ],
+ "id": 167,
+ "name": "ExpressionStatement",
+ "src": "400:23:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 168,
+ "name": "Identifier",
+ "src": "437:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 169,
+ "name": "Identifier",
+ "src": "446:3:0"
+ }
+ ],
+ "id": 170,
+ "name": "MemberAccess",
+ "src": "446:10:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 171,
+ "name": "Identifier",
+ "src": "458:3:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 172,
+ "name": "Identifier",
+ "src": "463:6:0"
+ }
+ ],
+ "id": 173,
+ "name": "FunctionCall",
+ "src": "437:33:0"
+ }
+ ],
+ "id": 174,
+ "name": "ExpressionStatement",
+ "src": "437:33:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 175,
+ "name": "Literal",
+ "src": "491:4:0"
+ }
+ ],
+ "id": 176,
+ "name": "Return",
+ "src": "484:11:0"
+ }
+ ],
+ "id": 177,
+ "name": "Block",
+ "src": "342:164:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 178,
+ "name": "Literal",
+ "src": "521:5:0"
+ }
+ ],
+ "id": 179,
+ "name": "Return",
+ "src": "514:12:0"
+ }
+ ],
+ "id": 180,
+ "name": "Block",
+ "src": "512:17:0"
+ }
+ ],
+ "id": 181,
+ "name": "IfStatement",
+ "src": "263:266:0"
+ }
+ ],
+ "id": 182,
+ "name": "Block",
+ "src": "184:351:0"
+ }
+ ],
+ "id": 183,
+ "name": "FunctionDefinition",
+ "src": "125:410:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 184,
+ "name": "ElementaryTypeName",
+ "src": "563:7:0"
+ }
+ ],
+ "id": 185,
+ "name": "VariableDeclaration",
+ "src": "563:13:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 186,
+ "name": "ElementaryTypeName",
+ "src": "578:7:0"
+ }
+ ],
+ "id": 187,
+ "name": "VariableDeclaration",
+ "src": "578:11:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 188,
+ "name": "ElementaryTypeName",
+ "src": "591:4:0"
+ }
+ ],
+ "id": 189,
+ "name": "VariableDeclaration",
+ "src": "591:11:0"
+ }
+ ],
+ "id": 190,
+ "name": "ParameterList",
+ "src": "562:41:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 191,
+ "name": "ElementaryTypeName",
+ "src": "613:4:0"
+ }
+ ],
+ "id": 192,
+ "name": "VariableDeclaration",
+ "src": "613:4:0"
+ }
+ ],
+ "id": 193,
+ "name": "ParameterList",
+ "src": "612:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 194,
+ "name": "Identifier",
+ "src": "633:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 195,
+ "name": "Identifier",
+ "src": "642:5:0"
+ }
+ ],
+ "id": 196,
+ "name": "IndexAccess",
+ "src": "633:15:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 197,
+ "name": "Identifier",
+ "src": "652:6:0"
+ }
+ ],
+ "id": 198,
+ "name": "BinaryOperation",
+ "src": "633:25:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 199,
+ "name": "Identifier",
+ "src": "662:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 200,
+ "name": "Identifier",
+ "src": "670:5:0"
+ }
+ ],
+ "id": 201,
+ "name": "IndexAccess",
+ "src": "662:14:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 202,
+ "name": "Identifier",
+ "src": "677:3:0"
+ }
+ ],
+ "id": 203,
+ "name": "MemberAccess",
+ "src": "677:10:0"
+ }
+ ],
+ "id": 204,
+ "name": "IndexAccess",
+ "src": "662:26:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 205,
+ "name": "Identifier",
+ "src": "692:6:0"
+ }
+ ],
+ "id": 206,
+ "name": "BinaryOperation",
+ "src": "662:36:0"
+ }
+ ],
+ "id": 207,
+ "name": "BinaryOperation",
+ "src": "633:65:0"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 208,
+ "name": "Identifier",
+ "src": "702:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 209,
+ "name": "Identifier",
+ "src": "711:3:0"
+ }
+ ],
+ "id": 210,
+ "name": "IndexAccess",
+ "src": "702:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 211,
+ "name": "Identifier",
+ "src": "718:6:0"
+ }
+ ],
+ "id": 212,
+ "name": "BinaryOperation",
+ "src": "702:22:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 213,
+ "name": "Identifier",
+ "src": "728:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 214,
+ "name": "Identifier",
+ "src": "737:3:0"
+ }
+ ],
+ "id": 215,
+ "name": "IndexAccess",
+ "src": "728:13:0"
+ }
+ ],
+ "id": 216,
+ "name": "BinaryOperation",
+ "src": "702:39:0"
+ }
+ ],
+ "id": 217,
+ "name": "BinaryOperation",
+ "src": "633:108:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 218,
+ "name": "Identifier",
+ "src": "757:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 219,
+ "name": "Identifier",
+ "src": "766:3:0"
+ }
+ ],
+ "id": 220,
+ "name": "IndexAccess",
+ "src": "757:13:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 221,
+ "name": "Identifier",
+ "src": "774:6:0"
+ }
+ ],
+ "id": 222,
+ "name": "Assignment",
+ "src": "757:23:0"
+ }
+ ],
+ "id": 223,
+ "name": "ExpressionStatement",
+ "src": "757:23:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 224,
+ "name": "Identifier",
+ "src": "794:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 225,
+ "name": "Identifier",
+ "src": "803:5:0"
+ }
+ ],
+ "id": 226,
+ "name": "IndexAccess",
+ "src": "794:15:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 227,
+ "name": "Identifier",
+ "src": "813:6:0"
+ }
+ ],
+ "id": 228,
+ "name": "Assignment",
+ "src": "794:25:0"
+ }
+ ],
+ "id": 229,
+ "name": "ExpressionStatement",
+ "src": "794:25:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 230,
+ "name": "Identifier",
+ "src": "833:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 231,
+ "name": "Identifier",
+ "src": "841:5:0"
+ }
+ ],
+ "id": 234,
+ "name": "IndexAccess",
+ "src": "833:14:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 232,
+ "name": "Identifier",
+ "src": "848:3:0"
+ }
+ ],
+ "id": 233,
+ "name": "MemberAccess",
+ "src": "848:10:0"
+ }
+ ],
+ "id": 235,
+ "name": "IndexAccess",
+ "src": "833:26:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 236,
+ "name": "Identifier",
+ "src": "863:6:0"
+ }
+ ],
+ "id": 237,
+ "name": "Assignment",
+ "src": "833:36:0"
+ }
+ ],
+ "id": 238,
+ "name": "ExpressionStatement",
+ "src": "833:36:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 239,
+ "name": "Identifier",
+ "src": "883:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 240,
+ "name": "Identifier",
+ "src": "892:5:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 241,
+ "name": "Identifier",
+ "src": "899:3:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 242,
+ "name": "Identifier",
+ "src": "904:6:0"
+ }
+ ],
+ "id": 243,
+ "name": "FunctionCall",
+ "src": "883:28:0"
+ }
+ ],
+ "id": 244,
+ "name": "ExpressionStatement",
+ "src": "883:28:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 245,
+ "name": "Literal",
+ "src": "932:4:0"
+ }
+ ],
+ "id": 246,
+ "name": "Return",
+ "src": "925:11:0"
+ }
+ ],
+ "id": 247,
+ "name": "Block",
+ "src": "743:204:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 248,
+ "name": "Literal",
+ "src": "962:5:0"
+ }
+ ],
+ "id": 249,
+ "name": "Return",
+ "src": "955:12:0"
+ }
+ ],
+ "id": 250,
+ "name": "Block",
+ "src": "953:17:0"
+ }
+ ],
+ "id": 251,
+ "name": "IfStatement",
+ "src": "629:341:0"
+ }
+ ],
+ "id": 252,
+ "name": "Block",
+ "src": "619:357:0"
+ }
+ ],
+ "id": 253,
+ "name": "FunctionDefinition",
+ "src": "541:435:0"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "balanceOf",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 254,
+ "name": "ElementaryTypeName",
+ "src": "1001:7:0"
+ }
+ ],
+ "id": 255,
+ "name": "VariableDeclaration",
+ "src": "1001:14:0"
+ }
+ ],
+ "id": 256,
+ "name": "ParameterList",
+ "src": "1000:16:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 257,
+ "name": "ElementaryTypeName",
+ "src": "1035:4:0"
+ }
+ ],
+ "id": 258,
+ "name": "VariableDeclaration",
+ "src": "1035:4:0"
+ }
+ ],
+ "id": 259,
+ "name": "ParameterList",
+ "src": "1034:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 260,
+ "name": "Identifier",
+ "src": "1058:8:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_owner"
+ },
+ "id": 261,
+ "name": "Identifier",
+ "src": "1067:6:0"
+ }
+ ],
+ "id": 262,
+ "name": "IndexAccess",
+ "src": "1058:16:0"
+ }
+ ],
+ "id": 263,
+ "name": "Return",
+ "src": "1051:23:0"
+ }
+ ],
+ "id": 264,
+ "name": "Block",
+ "src": "1041:40:0"
+ }
+ ],
+ "id": 265,
+ "name": "FunctionDefinition",
+ "src": "982:99:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "approve",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 266,
+ "name": "ElementaryTypeName",
+ "src": "1104:7:0"
+ }
+ ],
+ "id": 267,
+ "name": "VariableDeclaration",
+ "src": "1104:16:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 268,
+ "name": "ElementaryTypeName",
+ "src": "1122:4:0"
+ }
+ ],
+ "id": 269,
+ "name": "VariableDeclaration",
+ "src": "1122:11:0"
+ }
+ ],
+ "id": 270,
+ "name": "ParameterList",
+ "src": "1103:31:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 271,
+ "name": "ElementaryTypeName",
+ "src": "1144:4:0"
+ }
+ ],
+ "id": 272,
+ "name": "VariableDeclaration",
+ "src": "1144:4:0"
+ }
+ ],
+ "id": 273,
+ "name": "ParameterList",
+ "src": "1143:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 274,
+ "name": "Identifier",
+ "src": "1160:7:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 275,
+ "name": "Identifier",
+ "src": "1168:3:0"
+ }
+ ],
+ "id": 276,
+ "name": "MemberAccess",
+ "src": "1168:10:0"
+ }
+ ],
+ "id": 278,
+ "name": "IndexAccess",
+ "src": "1160:19:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 277,
+ "name": "Identifier",
+ "src": "1180:8:0"
+ }
+ ],
+ "id": 279,
+ "name": "IndexAccess",
+ "src": "1160:29:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 280,
+ "name": "Identifier",
+ "src": "1192:6:0"
+ }
+ ],
+ "id": 281,
+ "name": "Assignment",
+ "src": "1160:38:0"
+ }
+ ],
+ "id": 282,
+ "name": "ExpressionStatement",
+ "src": "1160:38:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Approval"
+ },
+ "id": 283,
+ "name": "Identifier",
+ "src": "1208:8:0"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 284,
+ "name": "Identifier",
+ "src": "1217:3:0"
+ }
+ ],
+ "id": 285,
+ "name": "MemberAccess",
+ "src": "1217:10:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 286,
+ "name": "Identifier",
+ "src": "1229:8:0"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 287,
+ "name": "Identifier",
+ "src": "1239:6:0"
+ }
+ ],
+ "id": 288,
+ "name": "FunctionCall",
+ "src": "1208:38:0"
+ }
+ ],
+ "id": 289,
+ "name": "ExpressionStatement",
+ "src": "1208:38:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 290,
+ "name": "Literal",
+ "src": "1263:4:0"
+ }
+ ],
+ "id": 291,
+ "name": "Return",
+ "src": "1256:11:0"
+ }
+ ],
+ "id": 292,
+ "name": "Block",
+ "src": "1150:124:0"
+ }
+ ],
+ "id": 293,
+ "name": "FunctionDefinition",
+ "src": "1087:187:0"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "allowance",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 294,
+ "name": "ElementaryTypeName",
+ "src": "1299:7:0"
+ }
+ ],
+ "id": 295,
+ "name": "VariableDeclaration",
+ "src": "1299:14:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 296,
+ "name": "ElementaryTypeName",
+ "src": "1315:7:0"
+ }
+ ],
+ "id": 297,
+ "name": "VariableDeclaration",
+ "src": "1315:16:0"
+ }
+ ],
+ "id": 298,
+ "name": "ParameterList",
+ "src": "1298:34:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 299,
+ "name": "ElementaryTypeName",
+ "src": "1351:4:0"
+ }
+ ],
+ "id": 300,
+ "name": "VariableDeclaration",
+ "src": "1351:4:0"
+ }
+ ],
+ "id": 301,
+ "name": "ParameterList",
+ "src": "1350:6:0"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 302,
+ "name": "Identifier",
+ "src": "1374:7:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_owner"
+ },
+ "id": 303,
+ "name": "Identifier",
+ "src": "1382:6:0"
+ }
+ ],
+ "id": 304,
+ "name": "IndexAccess",
+ "src": "1374:15:0"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_spender"
+ },
+ "id": 305,
+ "name": "Identifier",
+ "src": "1390:8:0"
+ }
+ ],
+ "id": 306,
+ "name": "IndexAccess",
+ "src": "1374:25:0"
+ }
+ ],
+ "id": 307,
+ "name": "Return",
+ "src": "1367:32:0"
+ }
+ ],
+ "id": 308,
+ "name": "Block",
+ "src": "1357:49:0"
+ }
+ ],
+ "id": 309,
+ "name": "FunctionDefinition",
+ "src": "1280:126:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "balances",
+ "storageLocation": "default",
+ "type": "mapping(address => uint256)",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 310,
+ "name": "ElementaryTypeName",
+ "src": "1421:7:0"
+ },
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 311,
+ "name": "ElementaryTypeName",
+ "src": "1432:4:0"
+ }
+ ],
+ "id": 312,
+ "name": "Mapping",
+ "src": "1412:25:0"
+ }
+ ],
+ "id": 313,
+ "name": "VariableDeclaration",
+ "src": "1412:34:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "allowed",
+ "storageLocation": "default",
+ "type": "mapping(address => mapping(address => uint256))",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 314,
+ "name": "ElementaryTypeName",
+ "src": "1461:7:0"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 315,
+ "name": "ElementaryTypeName",
+ "src": "1481:7:0"
+ },
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 316,
+ "name": "ElementaryTypeName",
+ "src": "1492:4:0"
+ }
+ ],
+ "id": 317,
+ "name": "Mapping",
+ "src": "1472:25:0"
+ }
+ ],
+ "id": 318,
+ "name": "Mapping",
+ "src": "1452:46:0"
+ }
+ ],
+ "id": 319,
+ "name": "VariableDeclaration",
+ "src": "1452:54:0"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "totalSupply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 320,
+ "name": "ElementaryTypeName",
+ "src": "1512:4:0"
+ }
+ ],
+ "id": 321,
+ "name": "VariableDeclaration",
+ "src": "1512:23:0"
+ }
+ ],
+ "id": 322,
+ "name": "ContractDefinition",
+ "src": "86:1452:0"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "1.0.0/Token/Token_v1.sol": {
+ "id": 1,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 324,
+ "name": "PragmaDirective",
+ "src": "0:24:1"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 397
+ ],
+ "name": "Token_v1"
+ },
+ "children": [
+ {
+ "attributes": {
+ "constant": true,
+ "name": "totalSupply",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [],
+ "id": 325,
+ "name": "ParameterList",
+ "src": "110:2:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "supply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 326,
+ "name": "ElementaryTypeName",
+ "src": "131:4:1"
+ }
+ ],
+ "id": 327,
+ "name": "VariableDeclaration",
+ "src": "131:11:1"
+ }
+ ],
+ "id": 328,
+ "name": "ParameterList",
+ "src": "130:13:1"
+ },
+ {
+ "children": [],
+ "id": 329,
+ "name": "Block",
+ "src": "144:2:1"
+ }
+ ],
+ "id": 330,
+ "name": "FunctionDefinition",
+ "src": "90:56:1"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "balanceOf",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 331,
+ "name": "ElementaryTypeName",
+ "src": "274:7:1"
+ }
+ ],
+ "id": 332,
+ "name": "VariableDeclaration",
+ "src": "274:14:1"
+ }
+ ],
+ "id": 333,
+ "name": "ParameterList",
+ "src": "273:16:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "balance",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 334,
+ "name": "ElementaryTypeName",
+ "src": "308:4:1"
+ }
+ ],
+ "id": 335,
+ "name": "VariableDeclaration",
+ "src": "308:12:1"
+ }
+ ],
+ "id": 336,
+ "name": "ParameterList",
+ "src": "307:14:1"
+ },
+ {
+ "children": [],
+ "id": 337,
+ "name": "Block",
+ "src": "322:2:1"
+ }
+ ],
+ "id": 338,
+ "name": "FunctionDefinition",
+ "src": "255:69:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transfer",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 339,
+ "name": "ElementaryTypeName",
+ "src": "578:7:1"
+ }
+ ],
+ "id": 340,
+ "name": "VariableDeclaration",
+ "src": "578:11:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 341,
+ "name": "ElementaryTypeName",
+ "src": "591:4:1"
+ }
+ ],
+ "id": 342,
+ "name": "VariableDeclaration",
+ "src": "591:11:1"
+ }
+ ],
+ "id": 343,
+ "name": "ParameterList",
+ "src": "577:26:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 344,
+ "name": "ElementaryTypeName",
+ "src": "613:4:1"
+ }
+ ],
+ "id": 345,
+ "name": "VariableDeclaration",
+ "src": "613:12:1"
+ }
+ ],
+ "id": 346,
+ "name": "ParameterList",
+ "src": "612:14:1"
+ },
+ {
+ "children": [],
+ "id": 347,
+ "name": "Block",
+ "src": "627:2:1"
+ }
+ ],
+ "id": 348,
+ "name": "FunctionDefinition",
+ "src": "560:69:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 349,
+ "name": "ElementaryTypeName",
+ "src": "972:7:1"
+ }
+ ],
+ "id": 350,
+ "name": "VariableDeclaration",
+ "src": "972:13:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 351,
+ "name": "ElementaryTypeName",
+ "src": "987:7:1"
+ }
+ ],
+ "id": 352,
+ "name": "VariableDeclaration",
+ "src": "987:11:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 353,
+ "name": "ElementaryTypeName",
+ "src": "1000:4:1"
+ }
+ ],
+ "id": 354,
+ "name": "VariableDeclaration",
+ "src": "1000:11:1"
+ }
+ ],
+ "id": 355,
+ "name": "ParameterList",
+ "src": "971:41:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 356,
+ "name": "ElementaryTypeName",
+ "src": "1022:4:1"
+ }
+ ],
+ "id": 357,
+ "name": "VariableDeclaration",
+ "src": "1022:12:1"
+ }
+ ],
+ "id": 358,
+ "name": "ParameterList",
+ "src": "1021:14:1"
+ },
+ {
+ "children": [],
+ "id": 359,
+ "name": "Block",
+ "src": "1036:2:1"
+ }
+ ],
+ "id": 360,
+ "name": "FunctionDefinition",
+ "src": "950:88:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "approve",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 361,
+ "name": "ElementaryTypeName",
+ "src": "1338:7:1"
+ }
+ ],
+ "id": 362,
+ "name": "VariableDeclaration",
+ "src": "1338:16:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 363,
+ "name": "ElementaryTypeName",
+ "src": "1356:4:1"
+ }
+ ],
+ "id": 364,
+ "name": "VariableDeclaration",
+ "src": "1356:11:1"
+ }
+ ],
+ "id": 365,
+ "name": "ParameterList",
+ "src": "1337:31:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "success",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 366,
+ "name": "ElementaryTypeName",
+ "src": "1378:4:1"
+ }
+ ],
+ "id": 367,
+ "name": "VariableDeclaration",
+ "src": "1378:12:1"
+ }
+ ],
+ "id": 368,
+ "name": "ParameterList",
+ "src": "1377:14:1"
+ },
+ {
+ "children": [],
+ "id": 369,
+ "name": "Block",
+ "src": "1392:2:1"
+ }
+ ],
+ "id": 370,
+ "name": "FunctionDefinition",
+ "src": "1321:73:1"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "allowance",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 371,
+ "name": "ElementaryTypeName",
+ "src": "1621:7:1"
+ }
+ ],
+ "id": 372,
+ "name": "VariableDeclaration",
+ "src": "1621:14:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 373,
+ "name": "ElementaryTypeName",
+ "src": "1637:7:1"
+ }
+ ],
+ "id": 374,
+ "name": "VariableDeclaration",
+ "src": "1637:16:1"
+ }
+ ],
+ "id": 375,
+ "name": "ParameterList",
+ "src": "1620:34:1"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "remaining",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 376,
+ "name": "ElementaryTypeName",
+ "src": "1673:4:1"
+ }
+ ],
+ "id": 377,
+ "name": "VariableDeclaration",
+ "src": "1673:14:1"
+ }
+ ],
+ "id": 378,
+ "name": "ParameterList",
+ "src": "1672:16:1"
+ },
+ {
+ "children": [],
+ "id": 379,
+ "name": "Block",
+ "src": "1689:2:1"
+ }
+ ],
+ "id": 380,
+ "name": "FunctionDefinition",
+ "src": "1602:89:1"
+ },
+ {
+ "attributes": {
+ "name": "Transfer"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 381,
+ "name": "ElementaryTypeName",
+ "src": "1712:7:1"
+ }
+ ],
+ "id": 382,
+ "name": "VariableDeclaration",
+ "src": "1712:21:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 383,
+ "name": "ElementaryTypeName",
+ "src": "1735:7:1"
+ }
+ ],
+ "id": 384,
+ "name": "VariableDeclaration",
+ "src": "1735:19:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 385,
+ "name": "ElementaryTypeName",
+ "src": "1756:4:1"
+ }
+ ],
+ "id": 386,
+ "name": "VariableDeclaration",
+ "src": "1756:11:1"
+ }
+ ],
+ "id": 387,
+ "name": "ParameterList",
+ "src": "1711:57:1"
+ }
+ ],
+ "id": 388,
+ "name": "EventDefinition",
+ "src": "1697:72:1"
+ },
+ {
+ "attributes": {
+ "name": "Approval"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_owner",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 389,
+ "name": "ElementaryTypeName",
+ "src": "1789:7:1"
+ }
+ ],
+ "id": 390,
+ "name": "VariableDeclaration",
+ "src": "1789:22:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": true,
+ "name": "_spender",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 391,
+ "name": "ElementaryTypeName",
+ "src": "1813:7:1"
+ }
+ ],
+ "id": 392,
+ "name": "VariableDeclaration",
+ "src": "1813:24:1"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "indexed": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 393,
+ "name": "ElementaryTypeName",
+ "src": "1839:4:1"
+ }
+ ],
+ "id": 394,
+ "name": "VariableDeclaration",
+ "src": "1839:11:1"
+ }
+ ],
+ "id": 395,
+ "name": "ParameterList",
+ "src": "1788:63:1"
+ }
+ ],
+ "id": 396,
+ "name": "EventDefinition",
+ "src": "1774:78:1"
+ }
+ ],
+ "id": 397,
+ "name": "ContractDefinition",
+ "src": "26:1828:1"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": {
+ "id": 2,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "^",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 33,
+ "name": "PragmaDirective",
+ "src": "580:24:2"
+ },
+ {
+ "attributes": {
+ "file": "../ERC20Token/ERC20Token_v1.sol"
+ },
+ "id": 35,
+ "name": "ImportDirective",
+ "src": "606:78:2"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 124,
+ 322,
+ 397
+ ],
+ "name": "UnlimitedAllowanceToken_v1"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "ERC20Token"
+ },
+ "id": 36,
+ "name": "UserDefinedTypeName",
+ "src": "725:10:2"
+ }
+ ],
+ "id": 37,
+ "name": "InheritanceSpecifier",
+ "src": "725:10:2"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "MAX_UINT",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 38,
+ "name": "ElementaryTypeName",
+ "src": "743:4:2"
+ },
+ {
+ "attributes": {
+ "operator": "-",
+ "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639935"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "**",
+ "type": "int_const 115792089237316195423570985008687907853269984665640564039457584007913129639936"
+ },
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "32",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 2",
+ "value": "2"
+ },
+ "id": 39,
+ "name": "Literal",
+ "src": "768:1:2"
+ },
+ {
+ "attributes": {
+ "hexvalue": "323536",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 256",
+ "value": "256"
+ },
+ "id": 40,
+ "name": "Literal",
+ "src": "771:3:2"
+ }
+ ],
+ "id": 41,
+ "name": "BinaryOperation",
+ "src": "768:6:2"
+ },
+ {
+ "attributes": {
+ "hexvalue": "31",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 1",
+ "value": "1"
+ },
+ "id": 42,
+ "name": "Literal",
+ "src": "777:1:2"
+ }
+ ],
+ "id": 43,
+ "name": "BinaryOperation",
+ "src": "768:10:2"
+ }
+ ],
+ "id": 44,
+ "name": "VariableDeclaration",
+ "src": "743:35:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "transferFrom",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_from",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 45,
+ "name": "ElementaryTypeName",
+ "src": "1088:7:2"
+ }
+ ],
+ "id": 46,
+ "name": "VariableDeclaration",
+ "src": "1088:13:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_to",
+ "storageLocation": "default",
+ "type": "address",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "address"
+ },
+ "id": 47,
+ "name": "ElementaryTypeName",
+ "src": "1103:7:2"
+ }
+ ],
+ "id": 48,
+ "name": "VariableDeclaration",
+ "src": "1103:11:2"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "_value",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 49,
+ "name": "ElementaryTypeName",
+ "src": "1116:4:2"
+ }
+ ],
+ "id": 50,
+ "name": "VariableDeclaration",
+ "src": "1116:11:2"
+ }
+ ],
+ "id": 51,
+ "name": "ParameterList",
+ "src": "1087:41:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "",
+ "storageLocation": "default",
+ "type": "bool",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "bool"
+ },
+ "id": 52,
+ "name": "ElementaryTypeName",
+ "src": "1161:4:2"
+ }
+ ],
+ "id": 53,
+ "name": "VariableDeclaration",
+ "src": "1161:4:2"
+ }
+ ],
+ "id": 54,
+ "name": "ParameterList",
+ "src": "1160:6:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "constant": false,
+ "name": "allowance",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "internal"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 55,
+ "name": "ElementaryTypeName",
+ "src": "1181:4:2"
+ }
+ ],
+ "id": 56,
+ "name": "VariableDeclaration",
+ "src": "1181:14:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 57,
+ "name": "Identifier",
+ "src": "1198:7:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 58,
+ "name": "Identifier",
+ "src": "1206:5:2"
+ }
+ ],
+ "id": 59,
+ "name": "IndexAccess",
+ "src": "1198:14:2"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 60,
+ "name": "Identifier",
+ "src": "1213:3:2"
+ }
+ ],
+ "id": 61,
+ "name": "MemberAccess",
+ "src": "1213:10:2"
+ }
+ ],
+ "id": 62,
+ "name": "IndexAccess",
+ "src": "1198:26:2"
+ }
+ ],
+ "id": 63,
+ "name": "VariableDeclarationStatement",
+ "src": "1181:43:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "&&",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 64,
+ "name": "Identifier",
+ "src": "1238:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 65,
+ "name": "Identifier",
+ "src": "1247:5:2"
+ }
+ ],
+ "id": 66,
+ "name": "IndexAccess",
+ "src": "1238:15:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 67,
+ "name": "Identifier",
+ "src": "1257:6:2"
+ }
+ ],
+ "id": 68,
+ "name": "BinaryOperation",
+ "src": "1238:25:2"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "allowance"
+ },
+ "id": 69,
+ "name": "Identifier",
+ "src": "1279:9:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 70,
+ "name": "Identifier",
+ "src": "1292:6:2"
+ }
+ ],
+ "id": 71,
+ "name": "BinaryOperation",
+ "src": "1279:19:2"
+ }
+ ],
+ "id": 72,
+ "name": "BinaryOperation",
+ "src": "1238:60:2"
+ },
+ {
+ "attributes": {
+ "operator": ">=",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "operator": "+",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 73,
+ "name": "Identifier",
+ "src": "1314:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 74,
+ "name": "Identifier",
+ "src": "1323:3:2"
+ }
+ ],
+ "id": 75,
+ "name": "IndexAccess",
+ "src": "1314:13:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 76,
+ "name": "Identifier",
+ "src": "1330:6:2"
+ }
+ ],
+ "id": 77,
+ "name": "BinaryOperation",
+ "src": "1314:22:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 78,
+ "name": "Identifier",
+ "src": "1340:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 79,
+ "name": "Identifier",
+ "src": "1349:3:2"
+ }
+ ],
+ "id": 80,
+ "name": "IndexAccess",
+ "src": "1340:13:2"
+ }
+ ],
+ "id": 81,
+ "name": "BinaryOperation",
+ "src": "1314:39:2"
+ }
+ ],
+ "id": 82,
+ "name": "BinaryOperation",
+ "src": "1238:115:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "+=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 83,
+ "name": "Identifier",
+ "src": "1378:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 84,
+ "name": "Identifier",
+ "src": "1387:3:2"
+ }
+ ],
+ "id": 85,
+ "name": "IndexAccess",
+ "src": "1378:13:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 86,
+ "name": "Identifier",
+ "src": "1395:6:2"
+ }
+ ],
+ "id": 87,
+ "name": "Assignment",
+ "src": "1378:23:2"
+ }
+ ],
+ "id": 88,
+ "name": "ExpressionStatement",
+ "src": "1378:23:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 89,
+ "name": "Identifier",
+ "src": "1415:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 90,
+ "name": "Identifier",
+ "src": "1424:5:2"
+ }
+ ],
+ "id": 91,
+ "name": "IndexAccess",
+ "src": "1415:15:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 92,
+ "name": "Identifier",
+ "src": "1434:6:2"
+ }
+ ],
+ "id": 93,
+ "name": "Assignment",
+ "src": "1415:25:2"
+ }
+ ],
+ "id": 94,
+ "name": "ExpressionStatement",
+ "src": "1415:25:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "<",
+ "type": "bool"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "allowance"
+ },
+ "id": 95,
+ "name": "Identifier",
+ "src": "1458:9:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "MAX_UINT"
+ },
+ "id": 96,
+ "name": "Identifier",
+ "src": "1470:8:2"
+ }
+ ],
+ "id": 97,
+ "name": "BinaryOperation",
+ "src": "1458:20:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "-=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => mapping(address => uint256))",
+ "value": "allowed"
+ },
+ "id": 98,
+ "name": "Identifier",
+ "src": "1498:7:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 99,
+ "name": "Identifier",
+ "src": "1506:5:2"
+ }
+ ],
+ "id": 102,
+ "name": "IndexAccess",
+ "src": "1498:14:2"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 100,
+ "name": "Identifier",
+ "src": "1513:3:2"
+ }
+ ],
+ "id": 101,
+ "name": "MemberAccess",
+ "src": "1513:10:2"
+ }
+ ],
+ "id": 103,
+ "name": "IndexAccess",
+ "src": "1498:26:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 104,
+ "name": "Identifier",
+ "src": "1528:6:2"
+ }
+ ],
+ "id": 105,
+ "name": "Assignment",
+ "src": "1498:36:2"
+ }
+ ],
+ "id": 106,
+ "name": "ExpressionStatement",
+ "src": "1498:36:2"
+ }
+ ],
+ "id": 107,
+ "name": "Block",
+ "src": "1480:69:2"
+ }
+ ],
+ "id": 108,
+ "name": "IfStatement",
+ "src": "1454:95:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "type": "tuple()",
+ "type_conversion": false
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "function (address,address,uint256) constant",
+ "value": "Transfer"
+ },
+ "id": 109,
+ "name": "Identifier",
+ "src": "1562:8:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_from"
+ },
+ "id": 110,
+ "name": "Identifier",
+ "src": "1571:5:2"
+ },
+ {
+ "attributes": {
+ "type": "address",
+ "value": "_to"
+ },
+ "id": 111,
+ "name": "Identifier",
+ "src": "1578:3:2"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "_value"
+ },
+ "id": 112,
+ "name": "Identifier",
+ "src": "1583:6:2"
+ }
+ ],
+ "id": 113,
+ "name": "FunctionCall",
+ "src": "1562:28:2"
+ }
+ ],
+ "id": 114,
+ "name": "ExpressionStatement",
+ "src": "1562:28:2"
+ },
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "74727565",
+ "subdenomination": null,
+ "token": "true",
+ "type": "bool",
+ "value": "true"
+ },
+ "id": 115,
+ "name": "Literal",
+ "src": "1611:4:2"
+ }
+ ],
+ "id": 116,
+ "name": "Return",
+ "src": "1604:11:2"
+ }
+ ],
+ "id": 117,
+ "name": "Block",
+ "src": "1364:262:2"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "66616c7365",
+ "subdenomination": null,
+ "token": "false",
+ "type": "bool",
+ "value": "false"
+ },
+ "id": 118,
+ "name": "Literal",
+ "src": "1653:5:2"
+ }
+ ],
+ "id": 119,
+ "name": "Return",
+ "src": "1646:12:2"
+ }
+ ],
+ "id": 120,
+ "name": "Block",
+ "src": "1632:37:2"
+ }
+ ],
+ "id": 121,
+ "name": "IfStatement",
+ "src": "1234:435:2"
+ }
+ ],
+ "id": 122,
+ "name": "Block",
+ "src": "1171:504:2"
+ }
+ ],
+ "id": 123,
+ "name": "FunctionDefinition",
+ "src": "1066:609:2"
+ }
+ ],
+ "id": 124,
+ "name": "ContractDefinition",
+ "src": "686:991:2"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ },
+ "2.0.0/tokens/ZRXToken/ZRXToken.sol": {
+ "id": 3,
+ "legacyAST": {
+ "children": [
+ {
+ "attributes": {
+ "literals": [
+ "solidity",
+ "0.4",
+ ".11"
+ ]
+ },
+ "id": 1,
+ "name": "PragmaDirective",
+ "src": "580:23:3"
+ },
+ {
+ "attributes": {
+ "file": "../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol"
+ },
+ "id": 3,
+ "name": "ImportDirective",
+ "src": "650:142:3"
+ },
+ {
+ "attributes": {
+ "fullyImplemented": true,
+ "isLibrary": false,
+ "linearizedBaseContracts": [
+ 31,
+ 124,
+ 322,
+ 397
+ ],
+ "name": "ZRXToken"
+ },
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "name": "UnlimitedAllowanceToken"
+ },
+ "id": 4,
+ "name": "UserDefinedTypeName",
+ "src": "816:23:3"
+ }
+ ],
+ "id": 5,
+ "name": "InheritanceSpecifier",
+ "src": "816:23:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "decimals",
+ "storageLocation": "default",
+ "type": "uint8",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint8"
+ },
+ "id": 6,
+ "name": "ElementaryTypeName",
+ "src": "891:5:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "3138",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 18",
+ "value": "18"
+ },
+ "id": 7,
+ "name": "Literal",
+ "src": "924:2:3"
+ }
+ ],
+ "id": 8,
+ "name": "VariableDeclaration",
+ "src": "891:35:3"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "totalSupply",
+ "storageLocation": "default",
+ "type": "uint256",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "uint"
+ },
+ "id": 9,
+ "name": "ElementaryTypeName",
+ "src": "932:4:3"
+ },
+ {
+ "attributes": {
+ "operator": "**",
+ "type": "int_const 1000000000000000000000000000"
+ },
+ "children": [
+ {
+ "attributes": {
+ "hexvalue": "3130",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 10",
+ "value": "10"
+ },
+ "id": 10,
+ "name": "Literal",
+ "src": "958:2:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "3237",
+ "subdenomination": null,
+ "token": null,
+ "type": "int_const 27",
+ "value": "27"
+ },
+ "id": 11,
+ "name": "Literal",
+ "src": "962:2:3"
+ }
+ ],
+ "id": 12,
+ "name": "BinaryOperation",
+ "src": "958:6:3"
+ }
+ ],
+ "id": 13,
+ "name": "VariableDeclaration",
+ "src": "932:32:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "name",
+ "storageLocation": "default",
+ "type": "string memory",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "string"
+ },
+ "id": 14,
+ "name": "ElementaryTypeName",
+ "src": "1009:6:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "30782050726f746f636f6c20546f6b656e",
+ "subdenomination": null,
+ "token": null,
+ "type": "literal_string \"0x Protocol Token\"",
+ "value": "0x Protocol Token"
+ },
+ "id": 15,
+ "name": "Literal",
+ "src": "1039:19:3"
+ }
+ ],
+ "id": 16,
+ "name": "VariableDeclaration",
+ "src": "1009:49:3"
+ },
+ {
+ "attributes": {
+ "constant": true,
+ "name": "symbol",
+ "storageLocation": "default",
+ "type": "string memory",
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "attributes": {
+ "name": "string"
+ },
+ "id": 17,
+ "name": "ElementaryTypeName",
+ "src": "1064:6:3"
+ },
+ {
+ "attributes": {
+ "hexvalue": "5a5258",
+ "subdenomination": null,
+ "token": null,
+ "type": "literal_string \"ZRX\"",
+ "value": "ZRX"
+ },
+ "id": 18,
+ "name": "Literal",
+ "src": "1096:5:3"
+ }
+ ],
+ "id": 19,
+ "name": "VariableDeclaration",
+ "src": "1064:37:3"
+ },
+ {
+ "attributes": {
+ "constant": false,
+ "name": "ZRXToken",
+ "payable": false,
+ "visibility": "public"
+ },
+ "children": [
+ {
+ "children": [],
+ "id": 20,
+ "name": "ParameterList",
+ "src": "1167:2:3"
+ },
+ {
+ "children": [],
+ "id": 21,
+ "name": "ParameterList",
+ "src": "1189:0:3"
+ },
+ {
+ "children": [
+ {
+ "children": [
+ {
+ "attributes": {
+ "operator": "=",
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "uint256"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "mapping(address => uint256)",
+ "value": "balances"
+ },
+ "id": 22,
+ "name": "Identifier",
+ "src": "1199:8:3"
+ },
+ {
+ "attributes": {
+ "member_name": "sender",
+ "type": "address"
+ },
+ "children": [
+ {
+ "attributes": {
+ "type": "msg",
+ "value": "msg"
+ },
+ "id": 23,
+ "name": "Identifier",
+ "src": "1208:3:3"
+ }
+ ],
+ "id": 24,
+ "name": "MemberAccess",
+ "src": "1208:10:3"
+ }
+ ],
+ "id": 25,
+ "name": "IndexAccess",
+ "src": "1199:20:3"
+ },
+ {
+ "attributes": {
+ "type": "uint256",
+ "value": "totalSupply"
+ },
+ "id": 26,
+ "name": "Identifier",
+ "src": "1222:11:3"
+ }
+ ],
+ "id": 27,
+ "name": "Assignment",
+ "src": "1199:34:3"
+ }
+ ],
+ "id": 28,
+ "name": "ExpressionStatement",
+ "src": "1199:34:3"
+ }
+ ],
+ "id": 29,
+ "name": "Block",
+ "src": "1189:51:3"
+ }
+ ],
+ "id": 30,
+ "name": "FunctionDefinition",
+ "src": "1150:90:3"
+ }
+ ],
+ "id": 31,
+ "name": "ContractDefinition",
+ "src": "795:447:3"
+ }
+ ],
+ "name": "SourceUnit"
+ }
+ }
+ },
+ "sourceCodes": {
+ "1.0.0/ERC20Token/ERC20Token_v1.sol": "pragma solidity ^0.4.11;\n\nimport { Token_v1 as Token } from \"../Token/Token_v1.sol\";\n\ncontract ERC20Token_v1 is Token {\n\n function transfer(address _to, uint _value) returns (bool) {\n //Default assumes totalSupply can't be over max (2^256 - 1).\n if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[msg.sender] -= _value;\n balances[_to] += _value;\n Transfer(msg.sender, _to, _value);\n return true;\n } else { return false; }\n }\n\n function transferFrom(address _from, address _to, uint _value) returns (bool) {\n if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) {\n balances[_to] += _value;\n balances[_from] -= _value;\n allowed[_from][msg.sender] -= _value;\n Transfer(_from, _to, _value);\n return true;\n } else { return false; }\n }\n\n function balanceOf(address _owner) constant returns (uint) {\n return balances[_owner];\n }\n\n function approve(address _spender, uint _value) returns (bool) {\n allowed[msg.sender][_spender] = _value;\n Approval(msg.sender, _spender, _value);\n return true;\n }\n\n function allowance(address _owner, address _spender) constant returns (uint) {\n return allowed[_owner][_spender];\n }\n\n mapping (address => uint) balances;\n mapping (address => mapping (address => uint)) allowed;\n uint public totalSupply;\n}\n",
+ "1.0.0/Token/Token_v1.sol": "pragma solidity ^0.4.11;\n\ncontract Token_v1 {\n\n /// @return total amount of tokens\n function totalSupply() constant returns (uint supply) {}\n\n /// @param _owner The address from which the balance will be retrieved\n /// @return The balance\n function balanceOf(address _owner) constant returns (uint balance) {}\n\n /// @notice send `_value` token to `_to` from `msg.sender`\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transfer(address _to, uint _value) returns (bool success) {}\n\n /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from`\n /// @param _from The address of the sender\n /// @param _to The address of the recipient\n /// @param _value The amount of token to be transferred\n /// @return Whether the transfer was successful or not\n function transferFrom(address _from, address _to, uint _value) returns (bool success) {}\n\n /// @notice `msg.sender` approves `_addr` to spend `_value` tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @param _value The amount of wei to be approved for transfer\n /// @return Whether the approval was successful or not\n function approve(address _spender, uint _value) returns (bool success) {}\n\n /// @param _owner The address of the account owning tokens\n /// @param _spender The address of the account able to transfer the tokens\n /// @return Amount of remaining tokens allowed to spent\n function allowance(address _owner, address _spender) constant returns (uint remaining) {}\n\n event Transfer(address indexed _from, address indexed _to, uint _value);\n event Approval(address indexed _owner, address indexed _spender, uint _value);\n}\n\n",
+ "1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity ^0.4.11;\n\nimport { ERC20Token_v1 as ERC20Token } from \"../ERC20Token/ERC20Token_v1.sol\";\n\ncontract UnlimitedAllowanceToken_v1 is ERC20Token {\n\n uint constant MAX_UINT = 2**256 - 1;\n\n /// @dev ERC20 transferFrom, modified such that an allowance of MAX_UINT represents an unlimited allowance.\n /// @param _from Address to transfer from.\n /// @param _to Address to transfer to.\n /// @param _value Amount to transfer.\n /// @return Success of transfer.\n function transferFrom(address _from, address _to, uint _value)\n public\n returns (bool)\n {\n uint allowance = allowed[_from][msg.sender];\n if (balances[_from] >= _value\n && allowance >= _value\n && balances[_to] + _value >= balances[_to]\n ) {\n balances[_to] += _value;\n balances[_from] -= _value;\n if (allowance < MAX_UINT) {\n allowed[_from][msg.sender] -= _value;\n }\n Transfer(_from, _to, _value);\n return true;\n } else {\n return false;\n }\n }\n}\n",
+ "2.0.0/tokens/ZRXToken/ZRXToken.sol": "/*\n\n Copyright 2018 ZeroEx Intl.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n*/\n\npragma solidity 0.4.11;\n\n// solhint-disable-next-line max-line-length\nimport { UnlimitedAllowanceToken_v1 as UnlimitedAllowanceToken } from \"../../../1.0.0/UnlimitedAllowanceToken/UnlimitedAllowanceToken_v1.sol\";\n\n\ncontract ZRXToken is UnlimitedAllowanceToken {\n\n // solhint-disable const-name-snakecase\n uint8 constant public decimals = 18;\n uint public totalSupply = 10**27; // 1 billion tokens, 18 decimal places\n string constant public name = \"0x Protocol Token\";\n string constant public symbol = \"ZRX\";\n // solhint-enableconst-name-snakecase\n\n function ZRXToken()\n public\n {\n balances[msg.sender] = totalSupply;\n }\n}\n"
+ },
+ "sourceTreeHashHex": "0xbcce67d129fe53ddb9717b4f567b33108c41a4f4324aa47ac609037e41f5b95d",
+ "compiler": {
+ "name": "solc",
+ "version": "soljson-v0.4.11+commit.68ef5810.js",
+ "settings": {
+ "optimizer": {
+ "enabled": true,
+ "runs": 1000000
+ },
+ "outputSelection": {
+ "*": {
+ "*": [
+ "abi",
+ "evm.bytecode.object",
+ "evm.bytecode.sourceMap",
+ "evm.deployedBytecode.object",
+ "evm.deployedBytecode.sourceMap"
+ ]
+ }
+ }
+ }
+ },
+ "networks": {
+ "50": {
+ "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c",
+ "links": {},
+ "constructorArgs": "[]"
+ }
+ }
+} \ No newline at end of file
diff --git a/packages/0x.js/src/compact_artifacts/DummyToken.json b/packages/0x.js/src/compact_artifacts/DummyToken.json
deleted file mode 100644
index f64a8cd3d..000000000
--- a/packages/0x.js/src/compact_artifacts/DummyToken.json
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "contract_name": "DummyToken",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_target",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "setBalance",
- "outputs": [],
- "payable": false,
- "type": "function"
- }
- ]
-}
diff --git a/packages/0x.js/src/compact_artifacts/EtherToken.json b/packages/0x.js/src/compact_artifacts/EtherToken.json
deleted file mode 100644
index 26cca57cd..000000000
--- a/packages/0x.js/src/compact_artifacts/EtherToken.json
+++ /dev/null
@@ -1,287 +0,0 @@
-{
- "contract_name": "EtherToken",
- "abi": [
- {
- "constant": true,
- "inputs": [],
- "name": "name",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_from",
- "type": "address"
- },
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "amount",
- "type": "uint256"
- }
- ],
- "name": "withdraw",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "decimals",
- "outputs": [
- {
- "name": "",
- "type": "uint8"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "symbol",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [],
- "name": "deposit",
- "outputs": [],
- "payable": true,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- },
- {
- "name": "_spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "payable": true,
- "type": "fallback"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Deposit",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Withdrawal",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "3": {
- "address": "0xc00fd9820cd2898cc4c054b7bf142de637ad129a"
- },
- "4": {
- "address": "0xc778417e063141139fce010982780140aa0cd5ab"
- },
- "42": {
- "address": "0x653e49e301e508a13237c0ddc98ae7d4cd2667a1"
- },
- "50": {
- "address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/Exchange.json b/packages/0x.js/src/compact_artifacts/Exchange.json
deleted file mode 100644
index af8db7360..000000000
--- a/packages/0x.js/src/compact_artifacts/Exchange.json
+++ /dev/null
@@ -1,610 +0,0 @@
-{
- "contract_name": "Exchange",
- "abi": [
- {
- "constant": true,
- "inputs": [
- {
- "name": "numerator",
- "type": "uint256"
- },
- {
- "name": "denominator",
- "type": "uint256"
- },
- {
- "name": "target",
- "type": "uint256"
- }
- ],
- "name": "isRoundingError",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "name": "filled",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "name": "cancelled",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "fillOrdersUpTo",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "cancelTakerTokenAmount",
- "type": "uint256"
- }
- ],
- "name": "cancelOrder",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "ZRX_TOKEN_CONTRACT",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmounts",
- "type": "uint256[]"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "batchFillOrKillOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "fillOrKillOrder",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "getUnavailableTakerTokenAmount",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "signer",
- "type": "address"
- },
- {
- "name": "hash",
- "type": "bytes32"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "isValidSignature",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "numerator",
- "type": "uint256"
- },
- {
- "name": "denominator",
- "type": "uint256"
- },
- {
- "name": "target",
- "type": "uint256"
- }
- ],
- "name": "getPartialAmount",
- "outputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "TOKEN_TRANSFER_PROXY_CONTRACT",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "fillTakerTokenAmounts",
- "type": "uint256[]"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8[]"
- },
- {
- "name": "r",
- "type": "bytes32[]"
- },
- {
- "name": "s",
- "type": "bytes32[]"
- }
- ],
- "name": "batchFillOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5][]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6][]"
- },
- {
- "name": "cancelTakerTokenAmounts",
- "type": "uint256[]"
- }
- ],
- "name": "batchCancelOrders",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- },
- {
- "name": "fillTakerTokenAmount",
- "type": "uint256"
- },
- {
- "name": "shouldThrowOnInsufficientBalanceOrAllowance",
- "type": "bool"
- },
- {
- "name": "v",
- "type": "uint8"
- },
- {
- "name": "r",
- "type": "bytes32"
- },
- {
- "name": "s",
- "type": "bytes32"
- }
- ],
- "name": "fillOrder",
- "outputs": [
- {
- "name": "filledTakerTokenAmount",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "orderAddresses",
- "type": "address[5]"
- },
- {
- "name": "orderValues",
- "type": "uint256[6]"
- }
- ],
- "name": "getOrderHash",
- "outputs": [
- {
- "name": "",
- "type": "bytes32"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "EXTERNAL_QUERY_GAS_LIMIT",
- "outputs": [
- {
- "name": "",
- "type": "uint16"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "VERSION",
- "outputs": [
- {
- "name": "",
- "type": "string"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "inputs": [
- {
- "name": "_zrxToken",
- "type": "address"
- },
- {
- "name": "_tokenTransferProxy",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "constructor"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "maker",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "taker",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipient",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "makerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "takerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "filledMakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "filledTakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "paidMakerFee",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "paidTakerFee",
- "type": "uint256"
- },
- {
- "indexed": true,
- "name": "tokens",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogFill",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "maker",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "feeRecipient",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "makerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "takerToken",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "cancelledMakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": false,
- "name": "cancelledTakerTokenAmount",
- "type": "uint256"
- },
- {
- "indexed": true,
- "name": "tokens",
- "type": "bytes32"
- },
- {
- "indexed": false,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogCancel",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "errorId",
- "type": "uint8"
- },
- {
- "indexed": true,
- "name": "orderHash",
- "type": "bytes32"
- }
- ],
- "name": "LogError",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x12459c951127e0c374ff9105dda097662a027093"
- },
- "3": {
- "address": "0x479cc461fecd078f766ecc58533d6f69580cf3ac"
- },
- "4": {
- "address": "0x1d16ef40fac01cec8adac2ac49427b9384192c05"
- },
- "42": {
- "address": "0x90fe2af704b34e0224bf2299c838e04d4dcf1364"
- },
- "50": {
- "address": "0x48bacb9266a570d521063ef5dd96e61686dbe788"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/Token.json b/packages/0x.js/src/compact_artifacts/Token.json
deleted file mode 100644
index 3b5a86ae0..000000000
--- a/packages/0x.js/src/compact_artifacts/Token.json
+++ /dev/null
@@ -1,172 +0,0 @@
-{
- "contract_name": "Token",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_spender",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "approve",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "totalSupply",
- "outputs": [
- {
- "name": "supply",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_from",
- "type": "address"
- },
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- }
- ],
- "name": "balanceOf",
- "outputs": [
- {
- "name": "balance",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_to",
- "type": "address"
- },
- {
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "transfer",
- "outputs": [
- {
- "name": "success",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_owner",
- "type": "address"
- },
- {
- "name": "_spender",
- "type": "address"
- }
- ],
- "name": "allowance",
- "outputs": [
- {
- "name": "remaining",
- "type": "uint256"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_from",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_to",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Transfer",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "_owner",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "_spender",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "_value",
- "type": "uint256"
- }
- ],
- "name": "Approval",
- "type": "event"
- }
- ]
-}
diff --git a/packages/0x.js/src/compact_artifacts/TokenRegistry.json b/packages/0x.js/src/compact_artifacts/TokenRegistry.json
deleted file mode 100644
index 0f583628c..000000000
--- a/packages/0x.js/src/compact_artifacts/TokenRegistry.json
+++ /dev/null
@@ -1,547 +0,0 @@
-{
- "contract_name": "TokenRegistry",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_index",
- "type": "uint256"
- }
- ],
- "name": "removeToken",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "getTokenAddressByName",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "getTokenAddressBySymbol",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_swarmHash",
- "type": "bytes"
- }
- ],
- "name": "setTokenSwarmHash",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- }
- ],
- "name": "getTokenMetaData",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_name",
- "type": "string"
- },
- {
- "name": "_symbol",
- "type": "string"
- },
- {
- "name": "_decimals",
- "type": "uint8"
- },
- {
- "name": "_ipfsHash",
- "type": "bytes"
- },
- {
- "name": "_swarmHash",
- "type": "bytes"
- }
- ],
- "name": "addToken",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "setTokenName",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "name": "tokens",
- "outputs": [
- {
- "name": "token",
- "type": "address"
- },
- {
- "name": "name",
- "type": "string"
- },
- {
- "name": "symbol",
- "type": "string"
- },
- {
- "name": "decimals",
- "type": "uint8"
- },
- {
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "tokenAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_name",
- "type": "string"
- }
- ],
- "name": "getTokenByName",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "getTokenAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address[]"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_ipfsHash",
- "type": "bytes"
- }
- ],
- "name": "setTokenIpfsHash",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "getTokenBySymbol",
- "outputs": [
- {
- "name": "",
- "type": "address"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "string"
- },
- {
- "name": "",
- "type": "uint8"
- },
- {
- "name": "",
- "type": "bytes"
- },
- {
- "name": "",
- "type": "bytes"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "_token",
- "type": "address"
- },
- {
- "name": "_symbol",
- "type": "string"
- }
- ],
- "name": "setTokenSymbol",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "name",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "symbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "decimals",
- "type": "uint8"
- },
- {
- "indexed": false,
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogAddToken",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "name",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "symbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "decimals",
- "type": "uint8"
- },
- {
- "indexed": false,
- "name": "ipfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "swarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogRemoveToken",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldName",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "newName",
- "type": "string"
- }
- ],
- "name": "LogTokenNameChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldSymbol",
- "type": "string"
- },
- {
- "indexed": false,
- "name": "newSymbol",
- "type": "string"
- }
- ],
- "name": "LogTokenSymbolChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldIpfsHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "newIpfsHash",
- "type": "bytes"
- }
- ],
- "name": "LogTokenIpfsHashChange",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "token",
- "type": "address"
- },
- {
- "indexed": false,
- "name": "oldSwarmHash",
- "type": "bytes"
- },
- {
- "indexed": false,
- "name": "newSwarmHash",
- "type": "bytes"
- }
- ],
- "name": "LogTokenSwarmHashChange",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x926a74c5c36adf004c87399e65f75628b0f98d2c"
- },
- "3": {
- "address": "0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed"
- },
- "4": {
- "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
- },
- "42": {
- "address": "0xf18e504561f4347bea557f3d4558f559dddbae7f"
- },
- "50": {
- "address": "0x0b1ba0af832d7c05fd64161e0db78e85978e8082"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json b/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json
deleted file mode 100644
index 8cf551ddb..000000000
--- a/packages/0x.js/src/compact_artifacts/TokenTransferProxy.json
+++ /dev/null
@@ -1,187 +0,0 @@
-{
- "contract_name": "TokenTransferProxy",
- "abi": [
- {
- "constant": false,
- "inputs": [
- {
- "name": "token",
- "type": "address"
- },
- {
- "name": "from",
- "type": "address"
- },
- {
- "name": "to",
- "type": "address"
- },
- {
- "name": "value",
- "type": "uint256"
- }
- ],
- "name": "transferFrom",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "target",
- "type": "address"
- }
- ],
- "name": "addAuthorizedAddress",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "uint256"
- }
- ],
- "name": "authorities",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "target",
- "type": "address"
- }
- ],
- "name": "removeAuthorizedAddress",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "owner",
- "outputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [
- {
- "name": "",
- "type": "address"
- }
- ],
- "name": "authorized",
- "outputs": [
- {
- "name": "",
- "type": "bool"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": true,
- "inputs": [],
- "name": "getAuthorizedAddresses",
- "outputs": [
- {
- "name": "",
- "type": "address[]"
- }
- ],
- "payable": false,
- "type": "function"
- },
- {
- "constant": false,
- "inputs": [
- {
- "name": "newOwner",
- "type": "address"
- }
- ],
- "name": "transferOwnership",
- "outputs": [],
- "payable": false,
- "type": "function"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "target",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "caller",
- "type": "address"
- }
- ],
- "name": "LogAuthorizedAddressAdded",
- "type": "event"
- },
- {
- "anonymous": false,
- "inputs": [
- {
- "indexed": true,
- "name": "target",
- "type": "address"
- },
- {
- "indexed": true,
- "name": "caller",
- "type": "address"
- }
- ],
- "name": "LogAuthorizedAddressRemoved",
- "type": "event"
- }
- ],
- "networks": {
- "1": {
- "address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4"
- },
- "3": {
- "address": "0x4e9aad8184de8833365fea970cd9149372fdf1e6"
- },
- "4": {
- "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
- },
- "42": {
- "address": "0x087eed4bc1ee3de49befbd66c662b434b15d49d4"
- },
- "50": {
- "address": "0x1dc4c1cefef38a777b15aa20260a54e584b16c48"
- }
- }
-}
diff --git a/packages/0x.js/src/compact_artifacts/ZRX.json b/packages/0x.js/src/compact_artifacts/ZRX.json
deleted file mode 100644
index e40b8f268..000000000
--- a/packages/0x.js/src/compact_artifacts/ZRX.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "contract_name": "ZRX",
- "networks": {
- "1": {
- "address": "0xe41d2489571d322189246dafa5ebde1f4699f498"
- },
- "3": {
- "address": "0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d"
- },
- "4": {
- "address": "0x00f58d6d585f84b2d7267940cede30ce2fe6eae8"
- },
- "42": {
- "address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570"
- },
- "50": {
- "address": "0x1d7022f5b17d2f8b695918fb48fa1089c9f85401"
- }
- }
-}
diff --git a/packages/0x.js/src/index.ts b/packages/0x.js/src/index.ts
index 5c7ad6e1c..95faa860d 100644
--- a/packages/0x.js/src/index.ts
+++ b/packages/0x.js/src/index.ts
@@ -1,32 +1,35 @@
export { ZeroEx } from './0x';
+export { MessagePrefixType, MessagePrefixOpts } from '@0xproject/order-utils';
+export { Web3ProviderEngine, RPCSubprovider } from '@0xproject/subproviders';
+
export {
- BlockParamLiteral,
- FilterObject,
- BlockParam,
- ContractEventArg,
ExchangeContractErrs,
- LogWithDecodedArgs,
Order,
- Provider,
SignedOrder,
ECSignature,
OrderStateValid,
OrderStateInvalid,
OrderState,
Token,
- TransactionReceipt,
- TransactionReceiptWithDecodedLogs,
} from '@0xproject/types';
-export { OrderWatcherConfig } from '@0xproject/order-watcher';
+export {
+ BlockParamLiteral,
+ FilterObject,
+ BlockParam,
+ LogWithDecodedArgs,
+ ContractEventArg,
+ Provider,
+ TransactionReceipt,
+ TransactionReceiptWithDecodedLogs,
+} from 'ethereum-types';
export {
EventCallback,
ContractEvent,
IndexedFilterValues,
BlockRange,
- OrderCancellationRequest,
OrderFillRequest,
ContractEventArgs,
MethodOpts,
@@ -36,18 +39,24 @@ export {
DecodedLogEvent,
OnOrderStateChangeCallback,
ContractWrappersError,
- EtherTokenContractEventArgs,
- WithdrawalContractEventArgs,
- DepositContractEventArgs,
- EtherTokenEvents,
- TransferContractEventArgs,
- ApprovalContractEventArgs,
- TokenContractEventArgs,
- TokenEvents,
- LogErrorContractEventArgs,
- LogCancelContractEventArgs,
- LogFillContractEventArgs,
- ExchangeContractEventArgs,
- ExchangeEvents,
+ WETH9Events,
+ WETH9WithdrawalEventArgs,
+ WETH9ApprovalEventArgs,
+ WETH9EventArgs,
+ WETH9DepositEventArgs,
+ WETH9TransferEventArgs,
+ ERC20TokenTransferEventArgs,
+ ERC20TokenApprovalEventArgs,
+ ERC20TokenEvents,
+ ERC20TokenEventArgs,
+ ERC721TokenApprovalEventArgs,
+ ERC721TokenApprovalForAllEventArgs,
+ ERC721TokenTransferEventArgs,
+ ERC721TokenEvents,
+ ExchangeCancelUpToEventArgs,
+ ExchangeAssetProxyRegisteredEventArgs,
+ ExchangeFillEventArgs,
+ ExchangeCancelEventArgs,
+ ExchangeEventArgs,
ContractWrappersConfig,
} from '@0xproject/contract-wrappers';
diff --git a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
index f7f649a6d..378b86e77 100644
--- a/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
+++ b/packages/0x.js/src/schemas/zero_ex_private_network_config_schema.ts
@@ -8,8 +8,8 @@ export const zeroExPrivateNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
@@ -29,7 +29,7 @@ export const zeroExPrivateNetworkConfigSchema = {
'networkId',
'zrxContractAddress',
'exchangeContractAddress',
- 'tokenRegistryContractAddress',
- 'tokenTransferProxyContractAddress',
+ 'erc20ProxyContractAddress',
+ 'erc721ProxyContractAddress',
],
};
diff --git a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
index f7f6727f0..f2a9a4d56 100644
--- a/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
+++ b/packages/0x.js/src/schemas/zero_ex_public_network_config_schema.ts
@@ -22,8 +22,8 @@ export const zeroExPublicNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
orderWatcherConfig: {
type: 'object',
properties: {
diff --git a/packages/0x.js/test/0x.js_test.ts b/packages/0x.js/test/0x.js_test.ts
index 425fc6380..b4baecb1e 100644
--- a/packages/0x.js/test/0x.js_test.ts
+++ b/packages/0x.js/test/0x.js_test.ts
@@ -2,14 +2,13 @@ import { ContractWrappers } from '@0xproject/contract-wrappers';
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
-import * as _ from 'lodash';
import 'mocha';
-import { ApprovalContractEventArgs, LogWithDecodedArgs, TokenEvents, ZeroEx } from '../src';
+import { ERC20TokenApprovalEventArgs, ERC20TokenEvents, LogWithDecodedArgs, ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants';
-import { TokenUtils } from './utils/token_utils';
+import { tokenUtils } from './utils/token_utils';
import { provider, web3Wrapper } from './utils/web3_wrapper';
const blockchainLifecycle = new BlockchainLifecycle(web3Wrapper);
@@ -28,9 +27,7 @@ describe('ZeroEx library', () => {
it('overrides provider in nested web3s and invalidates contractInstances', async () => {
// Instantiate the contract instances with the current provider
await (zeroEx.exchange as any)._getExchangeContractAsync();
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.not.be.undefined();
- expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.not.be.undefined();
// Add property to newProvider so that we can differentiate it from old provider
(provider as any).zeroExTestId = 1;
@@ -38,52 +35,43 @@ describe('ZeroEx library', () => {
// Check that contractInstances with old provider are removed after provider update
expect((zeroEx.exchange as any)._exchangeContractIfExists).to.be.undefined();
- expect((zeroEx.tokenRegistry as any)._tokenRegistryContractIfExists).to.be.undefined();
// Check that all nested zeroExContract/web3Wrapper instances return the updated provider
const nestedWeb3WrapperProvider = ((zeroEx as any)._contractWrappers as ContractWrappers).getProvider();
expect((nestedWeb3WrapperProvider as any).zeroExTestId).to.be.a('number');
const exchangeWeb3WrapperProvider = (zeroEx.exchange as any)._web3Wrapper.getProvider();
expect(exchangeWeb3WrapperProvider.zeroExTestId).to.be.a('number');
- const tokenRegistryWeb3WrapperProvider = (zeroEx.tokenRegistry as any)._web3Wrapper.getProvider();
- expect(tokenRegistryWeb3WrapperProvider.zeroExTestId).to.be.a('number');
});
});
describe('#isValidSignature', () => {
- // The Exchange smart contract `isValidSignature` method only validates orderHashes and assumes
- // the length of the data is exactly 32 bytes. Thus for these tests, we use data of this size.
const dataHex = '0x6927e990021d23b1eb7b8789f6a6feaf98fe104bb0cf8259421b79f9a34222b0';
- const signature = {
- v: 27,
- r: '0x61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc33',
- s: '0x40349190569279751135161d22529dc25add4f6069af05be04cacbda2ace2254',
- };
+ const ethSignSignature =
+ '0x1B61a3ed31b43c8780e905a260a35faefcc527be7516aa11c0256729b5b351bc3340349190569279751135161d22529dc25add4f6069af05be04cacbda2ace225403';
const address = '0x5409ed021d9299bf6814279a6a1411a7e866a631';
it("should return false if the data doesn't pertain to the signature & address", async () => {
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync('0x0', signature, address),
- ).to.become(false);
+ return expect((zeroEx.exchange as any).isValidSignatureAsync('0x0', address, ethSignSignature)).to.become(
+ false,
+ );
});
it("should return false if the address doesn't pertain to the signature & data", async () => {
const validUnrelatedAddress = '0x8b0292b11a196601ed2ce54b665cafeca0347d42';
return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(
- dataHex,
- signature,
- validUnrelatedAddress,
- ),
+ (zeroEx.exchange as any).isValidSignatureAsync(dataHex, validUnrelatedAddress, ethSignSignature),
).to.become(false);
});
it("should return false if the signature doesn't pertain to the dataHex & address", async () => {
- const wrongSignature = _.assign({}, signature, { v: 28 });
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, wrongSignature, address),
- ).to.become(false);
+ const signatureArray = ethSignSignature.split('');
+ // tslint:disable-next-line:custom-no-magic-numbers
+ signatureArray[5] = 'C'; // V = 28, instead of 27
+ const wrongSignature = signatureArray.join('');
+ return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, wrongSignature)).to.become(
+ false,
+ );
});
it('should return true if the signature does pertain to the dataHex & address', async () => {
- return expect(
- (zeroEx.exchange as any)._isValidSignatureUsingContractCallAsync(dataHex, signature, address),
- ).to.become(true);
+ return expect((zeroEx.exchange as any).isValidSignatureAsync(dataHex, address, ethSignSignature)).to.become(
+ true,
+ );
});
});
describe('#toUnitAmount', () => {
@@ -128,18 +116,16 @@ describe('ZeroEx library', () => {
it('returns transaction receipt with decoded logs', async () => {
const availableAddresses = await zeroEx.getAvailableAddressesAsync();
const coinbase = availableAddresses[0];
- const tokens = await zeroEx.tokenRegistry.getTokensAsync();
- const tokenUtils = new TokenUtils(tokens);
- const zrxTokenAddress = tokenUtils.getProtocolTokenOrThrow().address;
- const proxyAddress = zeroEx.proxy.getContractAddress();
- const txHash = await zeroEx.token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
+ const zrxTokenAddress = tokenUtils.getProtocolTokenAddress();
+ const erc20ProxyAddress = zeroEx.erc20Proxy.getContractAddress();
+ const txHash = await zeroEx.erc20Token.setUnlimitedProxyAllowanceAsync(zrxTokenAddress, coinbase);
const txReceiptWithDecodedLogs = await zeroEx.awaitTransactionMinedAsync(txHash);
// tslint:disable-next-line:no-unnecessary-type-assertion
- const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ApprovalContractEventArgs>;
- expect(log.event).to.be.equal(TokenEvents.Approval);
+ const log = txReceiptWithDecodedLogs.logs[0] as LogWithDecodedArgs<ERC20TokenApprovalEventArgs>;
+ expect(log.event).to.be.equal(ERC20TokenEvents.Approval);
expect(log.args._owner).to.be.equal(coinbase);
- expect(log.args._spender).to.be.equal(proxyAddress);
- expect(log.args._value).to.be.bignumber.equal(zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
+ expect(log.args._spender).to.be.equal(erc20ProxyAddress);
+ expect(log.args._value).to.be.bignumber.equal(zeroEx.erc20Token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS);
});
});
describe('#config', () => {
@@ -151,15 +137,13 @@ describe('ZeroEx library', () => {
const zeroExWithWrongExchangeAddress = new ZeroEx(provider, zeroExConfig);
expect(zeroExWithWrongExchangeAddress.exchange.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS);
});
- it('allows to specify token registry token contract address', async () => {
+ it('allows to specify erc20Proxy contract address', async () => {
const zeroExConfig = {
- tokenRegistryContractAddress: ZeroEx.NULL_ADDRESS,
+ erc20ProxyContractAddress: ZeroEx.NULL_ADDRESS,
networkId: constants.TESTRPC_NETWORK_ID,
};
- const zeroExWithWrongTokenRegistryAddress = new ZeroEx(provider, zeroExConfig);
- expect(zeroExWithWrongTokenRegistryAddress.tokenRegistry.getContractAddress()).to.be.equal(
- ZeroEx.NULL_ADDRESS,
- );
+ const zeroExWithWrongERC20ProxyAddress = new ZeroEx(provider, zeroExConfig);
+ expect(zeroExWithWrongERC20ProxyAddress.erc20Proxy.getContractAddress()).to.be.equal(ZeroEx.NULL_ADDRESS);
});
});
});
diff --git a/packages/0x.js/test/artifacts_test.ts b/packages/0x.js/test/artifacts_test.ts
deleted file mode 100644
index e65b85ad6..000000000
--- a/packages/0x.js/test/artifacts_test.ts
+++ /dev/null
@@ -1,48 +0,0 @@
-import { web3Factory } from '@0xproject/dev-utils';
-
-import { ZeroEx } from '../src';
-
-import { chaiSetup } from './utils/chai_setup';
-import { constants } from './utils/constants';
-
-chaiSetup.configure();
-
-// Those tests are slower cause they're talking to a remote node
-const TIMEOUT = 10000;
-
-describe('Artifacts', () => {
- describe('contracts are deployed on kovan', () => {
- const kovanRpcUrl = constants.KOVAN_RPC_URL;
- const provider = web3Factory.getRpcProvider({ rpcUrl: kovanRpcUrl });
- const config = {
- networkId: constants.KOVAN_NETWORK_ID,
- };
- const zeroEx = new ZeroEx(provider, config);
- it('token registry contract is deployed', async () => {
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
- }).timeout(TIMEOUT);
- it('proxy contract is deployed', async () => {
- await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
- }).timeout(TIMEOUT);
- it('exchange contract is deployed', async () => {
- await (zeroEx.exchange as any)._getExchangeContractAsync();
- }).timeout(TIMEOUT);
- });
- describe('contracts are deployed on ropsten', () => {
- const ropstenRpcUrl = constants.ROPSTEN_RPC_URL;
- const provider = web3Factory.getRpcProvider({ rpcUrl: ropstenRpcUrl });
- const config = {
- networkId: constants.ROPSTEN_NETWORK_ID,
- };
- const zeroEx = new ZeroEx(provider, config);
- it('token registry contract is deployed', async () => {
- await (zeroEx.tokenRegistry as any)._getTokenRegistryContractAsync();
- }).timeout(TIMEOUT);
- it('proxy contract is deployed', async () => {
- await (zeroEx.proxy as any)._getTokenTransferProxyContractAsync();
- }).timeout(TIMEOUT);
- it('exchange contract is deployed', async () => {
- await (zeroEx.exchange as any)._getExchangeContractAsync();
- }).timeout(TIMEOUT);
- });
-});
diff --git a/packages/0x.js/test/global_hooks.ts b/packages/0x.js/test/global_hooks.ts
index 9d6903af5..3d74634fe 100644
--- a/packages/0x.js/test/global_hooks.ts
+++ b/packages/0x.js/test/global_hooks.ts
@@ -1,5 +1,5 @@
import { devConstants } from '@0xproject/dev-utils';
-import { runV1MigrationsAsync } from '@0xproject/migrations';
+import { runV2MigrationsAsync } from '@0xproject/migrations';
import { provider } from './utils/web3_wrapper';
@@ -12,6 +12,6 @@ before('migrate contracts', async function(): Promise<void> {
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
};
- const artifactsDir = `../migrations/artifacts/1.0.0`;
- await runV1MigrationsAsync(provider, artifactsDir, txDefaults);
+ const artifactsDir = `../migrations/artifacts/2.0.0`;
+ await runV2MigrationsAsync(provider, artifactsDir, txDefaults);
});
diff --git a/packages/0x.js/test/utils/token_utils.ts b/packages/0x.js/test/utils/token_utils.ts
index fe4886ba4..a439c464d 100644
--- a/packages/0x.js/test/utils/token_utils.ts
+++ b/packages/0x.js/test/utils/token_utils.ts
@@ -1,34 +1,9 @@
-import { Token } from '@0xproject/types';
-import * as _ from 'lodash';
+import { artifacts } from '../../src/artifacts';
-import { InternalZeroExError } from '../../src/types';
+import { constants } from './constants';
-const PROTOCOL_TOKEN_SYMBOL = 'ZRX';
-const WETH_TOKEN_SYMBOL = 'WETH';
-
-export class TokenUtils {
- private _tokens: Token[];
- constructor(tokens: Token[]) {
- this._tokens = tokens;
- }
- public getProtocolTokenOrThrow(): Token {
- const zrxToken = _.find(this._tokens, { symbol: PROTOCOL_TOKEN_SYMBOL });
- if (_.isUndefined(zrxToken)) {
- throw new Error(InternalZeroExError.ZrxNotInTokenRegistry);
- }
- return zrxToken;
- }
- public getWethTokenOrThrow(): Token {
- const wethToken = _.find(this._tokens, { symbol: WETH_TOKEN_SYMBOL });
- if (_.isUndefined(wethToken)) {
- throw new Error(InternalZeroExError.WethNotInTokenRegistry);
- }
- return wethToken;
- }
- public getDummyTokens(): Token[] {
- const dummyTokens = _.filter(this._tokens, token => {
- return !_.includes([PROTOCOL_TOKEN_SYMBOL, WETH_TOKEN_SYMBOL], token.symbol);
- });
- return dummyTokens;
- }
-}
+export const tokenUtils = {
+ getProtocolTokenAddress(): string {
+ return artifacts.ZRXToken.networks[constants.TESTRPC_NETWORK_ID].address;
+ },
+};
diff --git a/packages/0x.js/test/utils/web3_wrapper.ts b/packages/0x.js/test/utils/web3_wrapper.ts
index f7d11f138..02c8c5918 100644
--- a/packages/0x.js/test/utils/web3_wrapper.ts
+++ b/packages/0x.js/test/utils/web3_wrapper.ts
@@ -1,8 +1,12 @@
-import { web3Factory } from '@0xproject/dev-utils';
-import { Provider } from '@0xproject/types';
+import { devConstants, web3Factory } from '@0xproject/dev-utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
+import { Provider } from 'ethereum-types';
+const txDefaults = {
+ from: devConstants.TESTRPC_FIRST_ADDRESS,
+ gas: devConstants.GAS_LIMIT,
+};
const provider: Provider = web3Factory.getRpcProvider({ shouldUseInProcessGanache: true });
const web3Wrapper = new Web3Wrapper(provider);
-export { provider, web3Wrapper };
+export { provider, web3Wrapper, txDefaults };
diff --git a/packages/abi-gen/CHANGELOG.json b/packages/abi-gen/CHANGELOG.json
index 38b72dbf3..ef8f5dd39 100644
--- a/packages/abi-gen/CHANGELOG.json
+++ b/packages/abi-gen/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "0.4.1",
+ "changes": [
+ {
+ "note": "skip generation of wrappers that are already up to date",
+ "pr": 788
+ }
+ ]
+ },
+ {
"version": "0.4.0",
"changes": [
{
diff --git a/packages/abi-gen/bin/abi-gen.js b/packages/abi-gen/bin/abi-gen.js
index c46eb9b66..8d6bdccf8 100755
--- a/packages/abi-gen/bin/abi-gen.js
+++ b/packages/abi-gen/bin/abi-gen.js
@@ -1,2 +1,2 @@
#!/usr/bin/env node
-require('../lib/index.js')
+require('../lib/src/index.js')
diff --git a/packages/abi-gen/coverage/.gitkeep b/packages/abi-gen/coverage/.gitkeep
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/packages/abi-gen/coverage/.gitkeep
diff --git a/packages/abi-gen/package.json b/packages/abi-gen/package.json
index 7d7a20e68..4fb335545 100644
--- a/packages/abi-gen/package.json
+++ b/packages/abi-gen/package.json
@@ -12,6 +12,11 @@
"lint": "tslint --project .",
"clean": "shx rm -rf lib scripts",
"build": "tsc && copyfiles -u 2 './lib/monorepo_scripts/**/*' ./scripts",
+ "test": "yarn run_mocha",
+ "run_mocha": "mocha --require source-map-support/register --require make-promises-safe lib/test/**/*_test.js --bail --exit",
+ "test:circleci": "yarn test:coverage",
+ "test:coverage": "nyc npm run test --all && yarn coverage:report:lcov",
+ "coverage:report:lcov": "nyc report --reporter=text-lcov > coverage/lcov.info",
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
},
"bin": {
@@ -31,11 +36,13 @@
"@0xproject/utils": "^0.7.2",
"ethereum-types": "^0.0.2",
"chalk": "^2.3.0",
+ "ethereum-types": "^0.0.2",
"glob": "^7.1.2",
"handlebars": "^4.0.11",
"lodash": "^4.17.4",
- "rimraf": "^2.6.2",
"mkdirp": "^0.5.1",
+ "sleep": "^5.1.1",
+ "tmp": "^0.0.33",
"to-snake-case": "^1.0.0",
"yargs": "^10.0.3"
},
@@ -43,13 +50,17 @@
"@0xproject/monorepo-scripts": "^0.2.2",
"@0xproject/tslint-config": "^0.4.21",
"@types/glob": "5.0.35",
- "@types/rimraf": "^2.0.2",
"@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1",
"@types/node": "^8.0.53",
+ "@types/sleep": "^0.0.7",
+ "@types/tmp": "^0.0.33",
"@types/yargs": "^10.0.0",
+ "chai": "^4.1.2",
"copyfiles": "^1.2.0",
+ "dirty-chai": "^2.0.1",
"make-promises-safe": "^1.1.0",
+ "mocha": "^5.2.0",
"npm-run-all": "^4.1.2",
"shx": "^0.2.2",
"tslint": "5.8.0",
diff --git a/packages/abi-gen/src/index.ts b/packages/abi-gen/src/index.ts
index 47f2c404b..753bb2cce 100644
--- a/packages/abi-gen/src/index.ts
+++ b/packages/abi-gen/src/index.ts
@@ -3,16 +3,12 @@
import { abiUtils, logUtils } from '@0xproject/utils';
import chalk from 'chalk';
import { AbiDefinition, ConstructorAbi, EventAbi, MethodAbi } from 'ethereum-types';
-import * as fs from 'fs';
import { sync as globSync } from 'glob';
import * as Handlebars from 'handlebars';
import * as _ from 'lodash';
import * as mkdirp from 'mkdirp';
-import * as rimraf from 'rimraf';
import * as yargs from 'yargs';
-import toSnakeCase = require('to-snake-case');
-
import { ContextData, ContractsBackend, ParamKind } from './types';
import { utils } from './utils';
@@ -71,16 +67,6 @@ function registerPartials(partialsGlob: string): void {
}
}
-function writeOutputFile(name: string, renderedTsCode: string): void {
- let fileName = toSnakeCase(name);
- // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations
- // so we special-case the abbreviations we use.
- fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc');
- const filePath = `${args.output}/${fileName}.ts`;
- fs.writeFileSync(filePath, renderedTsCode);
- logUtils.log(`Created: ${chalk.bold(filePath)}`);
-}
-
Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input, args.backend));
Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output, args.backend));
if (args.partials) {
@@ -97,7 +83,6 @@ if (_.isEmpty(abiFileNames)) {
process.exit(1);
} else {
logUtils.log(`Found ${chalk.green(`${abiFileNames.length}`)} ${chalk.bold('ABI')} files`);
- rimraf.sync(args.output);
mkdirp.sync(args.output);
}
for (const abiFileName of abiFileNames) {
@@ -120,6 +105,14 @@ for (const abiFileName of abiFileNames) {
process.exit(1);
}
+ const outFileName = utils.makeOutputFileName(namedContent.name);
+ const outFilePath = `${args.output}/${outFileName}.ts`;
+
+ if (utils.isOutputFileUpToDate(abiFileName, outFilePath)) {
+ logUtils.log(`Aready up to date: ${chalk.bold(outFilePath)}`);
+ continue;
+ }
+
let ctor = ABI.find((abi: AbiDefinition) => abi.type === ABI_TYPE_CONSTRUCTOR) as ConstructorAbi;
if (_.isUndefined(ctor)) {
ctor = utils.getEmptyConstructor(); // The constructor exists, but it's implicit in JSON's ABI definition
@@ -154,5 +147,6 @@ for (const abiFileName of abiFileNames) {
events: eventAbis,
};
const renderedTsCode = template(contextData);
- writeOutputFile(namedContent.name, renderedTsCode);
+ utils.writeOutputFile(outFilePath, renderedTsCode);
+ logUtils.log(`Created: ${chalk.bold(outFilePath)}`);
}
diff --git a/packages/abi-gen/src/utils.ts b/packages/abi-gen/src/utils.ts
index 66390174c..56b996ce3 100644
--- a/packages/abi-gen/src/utils.ts
+++ b/packages/abi-gen/src/utils.ts
@@ -2,6 +2,7 @@ import { AbiType, ConstructorAbi, DataItem } from 'ethereum-types';
import * as fs from 'fs';
import * as _ from 'lodash';
import * as path from 'path';
+import toSnakeCase = require('to-snake-case');
import { ContractsBackend, ParamKind } from './types';
@@ -92,4 +93,27 @@ export const utils = {
inputs: [],
};
},
+ makeOutputFileName(name: string): string {
+ let fileName = toSnakeCase(name);
+ // HACK: Snake case doesn't make a lot of sense for abbreviated names but we can't reliably detect abbreviations
+ // so we special-case the abbreviations we use.
+ fileName = fileName.replace('z_r_x', 'zrx').replace('e_r_c', 'erc');
+ return fileName;
+ },
+ writeOutputFile(filePath: string, renderedTsCode: string): void {
+ fs.writeFileSync(filePath, renderedTsCode);
+ },
+ isOutputFileUpToDate(abiFile: string, outputFile: string): boolean {
+ const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
+ try {
+ const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
+ return outFileModTimeMs > abiFileModTimeMs;
+ } catch (err) {
+ if (err.code === 'ENOENT') {
+ return false;
+ } else {
+ throw err;
+ }
+ }
+ },
};
diff --git a/packages/abi-gen/test/utils_test.ts b/packages/abi-gen/test/utils_test.ts
new file mode 100644
index 000000000..820c0c675
--- /dev/null
+++ b/packages/abi-gen/test/utils_test.ts
@@ -0,0 +1,86 @@
+import * as chai from 'chai';
+import * as dirtyChai from 'dirty-chai';
+import * as fs from 'fs';
+import 'mocha';
+import * as tmp from 'tmp';
+
+import { utils } from '../src/utils';
+
+tmp.setGracefulCleanup(); // remove tmp files even if there are failures
+
+chai.use(dirtyChai);
+
+const expect = chai.expect;
+
+describe('makeOutputFileName()', () => {
+ it('should handle Metacoin usage', () => {
+ expect(utils.makeOutputFileName('Metacoin')).to.equal('metacoin');
+ });
+ it('should handle special zrx_token case', () => {
+ expect(utils.makeOutputFileName('ZRXToken')).to.equal('zrx_token');
+ });
+ it('should handle special erc_token case', () => {
+ expect(utils.makeOutputFileName('ERC20Token')).to.equal('erc20_token');
+ });
+});
+
+describe('writeOutputFile()', () => {
+ let tempFilePath: string;
+ before(() => {
+ tempFilePath = tmp.fileSync(
+ { discardDescriptor: true }, // close file (so we can update it)
+ ).name;
+ });
+ it('should write content to output file', () => {
+ const content = 'hello world';
+
+ utils.writeOutputFile(tempFilePath, content);
+
+ expect(fs.readFileSync(tempFilePath).toString()).to.equal(content);
+ });
+});
+
+describe('isOutputFileUpToDate()', () => {
+ it('should throw ENOENT when there is no abi file', () => {
+ expect(utils.isOutputFileUpToDate.bind('nonexistant1', 'nonexistant2')).to.throw('ENOENT');
+ });
+
+ describe('when the abi input file exists', () => {
+ let abiFile: string;
+ before(() => {
+ abiFile = tmp.fileSync(
+ { discardDescriptor: true }, // close file (set timestamp)
+ ).name;
+ });
+
+ describe('without an existing output file', () => {
+ it('should return false', () => {
+ expect(utils.isOutputFileUpToDate(abiFile, 'nonexistant_file')).to.be.false();
+ });
+ });
+
+ describe('with an existing output file', () => {
+ let outputFile: string;
+ before(() => {
+ outputFile = tmp.fileSync(
+ { discardDescriptor: true }, // close file (set timestamp)
+ ).name;
+ const abiFileModTimeMs = fs.statSync(abiFile).mtimeMs;
+ const outfileModTimeMs = abiFileModTimeMs + 1;
+ fs.utimesSync(outputFile, outfileModTimeMs, outfileModTimeMs);
+ });
+
+ it('should return true when output file is newer than abi file', async () => {
+ expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.true();
+ });
+
+ it('should return false when output file exists but is older than abi file', () => {
+ const outFileModTimeMs = fs.statSync(outputFile).mtimeMs;
+ const abiFileModTimeMs = outFileModTimeMs + 1;
+ fs.utimesSync(abiFile, abiFileModTimeMs, abiFileModTimeMs);
+
+ expect(utils.isOutputFileUpToDate(abiFile, outputFile)).to.be.false();
+ });
+ });
+ });
+});
diff --git a/packages/connect/CHANGELOG.json b/packages/connect/CHANGELOG.json
index c426f974b..7b747f167 100644
--- a/packages/connect/CHANGELOG.json
+++ b/packages/connect/CHANGELOG.json
@@ -1,5 +1,14 @@
[
{
+ "version": "1.0.0",
+ "changes": [
+ {
+ "note":
+ "Remove WebSocketOrderbookChannel from the public interface and replace with orderbookChannelFactory"
+ }
+ ]
+ },
+ {
"timestamp": 1531149657,
"version": "0.6.16",
"changes": [
diff --git a/packages/connect/package.json b/packages/connect/package.json
index 469d47d33..343df4031 100644
--- a/packages/connect/package.json
+++ b/packages/connect/package.json
@@ -56,9 +56,9 @@
"@0xproject/types": "^0.8.2",
"@0xproject/typescript-typings": "^0.4.2",
"@0xproject/utils": "^0.7.2",
- "isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
"query-string": "^5.0.1",
+ "sinon": "^4.0.0",
"websocket": "^1.0.25"
},
"devDependencies": {
@@ -68,7 +68,8 @@
"@types/lodash": "4.14.104",
"@types/mocha": "^2.2.42",
"@types/query-string": "^5.0.1",
- "@types/websocket": "^0.0.34",
+ "@types/sinon": "^2.2.2",
+ "@types/websocket": "^0.0.39",
"async-child-process": "^1.1.1",
"chai": "^4.0.1",
"chai-as-promised": "^7.1.0",
diff --git a/packages/connect/src/http_client.ts b/packages/connect/src/http_client.ts
index f6503835a..f3800d581 100644
--- a/packages/connect/src/http_client.ts
+++ b/packages/connect/src/http_client.ts
@@ -1,7 +1,7 @@
import { assert } from '@0xproject/assert';
import { schemas } from '@0xproject/json-schemas';
import { SignedOrder } from '@0xproject/types';
-import 'isomorphic-fetch';
+import { fetchAsync } from '@0xproject/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';
@@ -167,7 +167,7 @@ export class HttpClient implements Client {
const headers = new Headers({
'content-type': 'application/json',
});
- const response = await fetch(url, {
+ const response = await fetchAsync(url, {
method: requestType,
body: JSON.stringify(payload),
headers,
diff --git a/packages/connect/src/index.ts b/packages/connect/src/index.ts
index ef5d8683e..7f5eb8ed3 100644
--- a/packages/connect/src/index.ts
+++ b/packages/connect/src/index.ts
@@ -1,5 +1,5 @@
export { HttpClient } from './http_client';
-export { WebSocketOrderbookChannel } from './ws_orderbook_channel';
+export { orderbookChannelFactory } from './orderbook_channel_factory';
export {
Client,
FeesRequest,
@@ -14,7 +14,6 @@ export {
TokenPairsItem,
TokenPairsRequestOpts,
TokenTradeInfo,
- WebSocketOrderbookChannelConfig,
} from './types';
export { Order, SignedOrder } from '@0xproject/types';
diff --git a/packages/connect/src/orderbook_channel_factory.ts b/packages/connect/src/orderbook_channel_factory.ts
new file mode 100644
index 000000000..5134af323
--- /dev/null
+++ b/packages/connect/src/orderbook_channel_factory.ts
@@ -0,0 +1,32 @@
+import * as WebSocket from 'websocket';
+
+import { OrderbookChannel, OrderbookChannelHandler } from './types';
+import { assert } from './utils/assert';
+import { WebSocketOrderbookChannel } from './ws_orderbook_channel';
+
+export const orderbookChannelFactory = {
+ /**
+ * Instantiates a new WebSocketOrderbookChannel instance
+ * @param url The relayer API base WS url you would like to interact with
+ * @param handler An OrderbookChannelHandler instance that responds to various
+ * channel updates
+ * @return An OrderbookChannel Promise
+ */
+ async createWebSocketOrderbookChannelAsync(
+ url: string,
+ handler: OrderbookChannelHandler,
+ ): Promise<OrderbookChannel> {
+ assert.isUri('url', url);
+ assert.isOrderbookChannelHandler('handler', handler);
+ return new Promise<OrderbookChannel>((resolve, reject) => {
+ const client = new WebSocket.w3cwebsocket(url);
+ client.onopen = () => {
+ const orderbookChannel = new WebSocketOrderbookChannel(client, handler);
+ resolve(orderbookChannel);
+ };
+ client.onerror = err => {
+ reject(err);
+ };
+ });
+ },
+};
diff --git a/packages/connect/src/schemas/schemas.ts b/packages/connect/src/schemas/schemas.ts
index b9a8472fb..0b8b798a9 100644
--- a/packages/connect/src/schemas/schemas.ts
+++ b/packages/connect/src/schemas/schemas.ts
@@ -3,7 +3,6 @@ import { orderBookRequestSchema } from './orderbook_request_schema';
import { ordersRequestOptsSchema } from './orders_request_opts_schema';
import { pagedRequestOptsSchema } from './paged_request_opts_schema';
import { tokenPairsRequestOptsSchema } from './token_pairs_request_opts_schema';
-import { webSocketOrderbookChannelConfigSchema } from './websocket_orderbook_channel_config_schema';
export const schemas = {
feesRequestSchema,
@@ -11,5 +10,4 @@ export const schemas = {
ordersRequestOptsSchema,
pagedRequestOptsSchema,
tokenPairsRequestOptsSchema,
- webSocketOrderbookChannelConfigSchema,
};
diff --git a/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts b/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts
deleted file mode 100644
index 81c0cac9c..000000000
--- a/packages/connect/src/schemas/websocket_orderbook_channel_config_schema.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-export const webSocketOrderbookChannelConfigSchema = {
- id: '/WebSocketOrderbookChannelConfig',
- type: 'object',
- properties: {
- heartbeatIntervalMs: {
- type: 'number',
- minimum: 10,
- },
- },
-};
diff --git a/packages/connect/src/types.ts b/packages/connect/src/types.ts
index f5e52f50d..fc7a4b24d 100644
--- a/packages/connect/src/types.ts
+++ b/packages/connect/src/types.ts
@@ -11,18 +11,11 @@ export interface Client {
}
export interface OrderbookChannel {
- subscribe: (subscriptionOpts: OrderbookChannelSubscriptionOpts, handler: OrderbookChannelHandler) => void;
+ subscribe: (subscriptionOpts: OrderbookChannelSubscriptionOpts) => void;
close: () => void;
}
/**
- * heartbeatInterval: Interval in milliseconds that the orderbook channel should ping the underlying websocket. Default: 15000
- */
-export interface WebSocketOrderbookChannelConfig {
- heartbeatIntervalMs?: number;
-}
-
-/**
* baseTokenAddress: The address of token designated as the baseToken in the currency pair calculation of price
* quoteTokenAddress: The address of token designated as the quoteToken in the currency pair calculation of price
* snapshot: If true, a snapshot of the orderbook will be sent before the updates to the orderbook
@@ -46,8 +39,8 @@ export interface OrderbookChannelHandler {
subscriptionOpts: OrderbookChannelSubscriptionOpts,
order: SignedOrder,
) => void;
- onError: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts, err: Error) => void;
- onClose: (channel: OrderbookChannel, subscriptionOpts: OrderbookChannelSubscriptionOpts) => void;
+ onError: (channel: OrderbookChannel, err: Error, subscriptionOpts?: OrderbookChannelSubscriptionOpts) => void;
+ onClose: (channel: OrderbookChannel) => void;
}
export type OrderbookChannelMessage =
diff --git a/packages/connect/src/utils/assert.ts b/packages/connect/src/utils/assert.ts
new file mode 100644
index 000000000..a0fd12fbd
--- /dev/null
+++ b/packages/connect/src/utils/assert.ts
@@ -0,0 +1,26 @@
+import { assert as sharedAssert } from '@0xproject/assert';
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// tslint:disable-next-line:no-unused-variable
+import { Schema, schemas } from '@0xproject/json-schemas';
+// tslint:disable-next-line:no-unused-variable
+import { ECSignature } from '@0xproject/types';
+// tslint:disable-next-line:no-unused-variable
+import { BigNumber } from '@0xproject/utils';
+import * as _ from 'lodash';
+
+export const assert = {
+ ...sharedAssert,
+ isOrderbookChannelSubscriptionOpts(variableName: string, subscriptionOpts: any): void {
+ sharedAssert.doesConformToSchema(
+ variableName,
+ subscriptionOpts,
+ schemas.relayerApiOrderbookChannelSubscribePayload,
+ );
+ },
+ isOrderbookChannelHandler(variableName: string, handler: any): void {
+ sharedAssert.isFunction(`${variableName}.onSnapshot`, _.get(handler, 'onSnapshot'));
+ sharedAssert.isFunction(`${variableName}.onUpdate`, _.get(handler, 'onUpdate'));
+ sharedAssert.isFunction(`${variableName}.onError`, _.get(handler, 'onError'));
+ sharedAssert.isFunction(`${variableName}.onClose`, _.get(handler, 'onClose'));
+ },
+};
diff --git a/packages/connect/src/utils/orderbook_channel_message_parser.ts b/packages/connect/src/utils/orderbook_channel_message_parser.ts
index 9a9ca8901..593288078 100644
--- a/packages/connect/src/utils/orderbook_channel_message_parser.ts
+++ b/packages/connect/src/utils/orderbook_channel_message_parser.ts
@@ -8,10 +8,16 @@ import { relayerResponseJsonParsers } from './relayer_response_json_parsers';
export const orderbookChannelMessageParser = {
parse(utf8Data: string): OrderbookChannelMessage {
+ // parse the message
const messageObj = JSON.parse(utf8Data);
+ // ensure we have a type parameter to switch on
const type: string = _.get(messageObj, 'type');
assert.assert(!_.isUndefined(type), `Message is missing a type parameter: ${utf8Data}`);
assert.isString('type', type);
+ // ensure we have a request id for the resulting message
+ const requestId: number = _.get(messageObj, 'requestId');
+ assert.assert(!_.isUndefined(requestId), `Message is missing a requestId parameter: ${utf8Data}`);
+ assert.isNumber('requestId', requestId);
switch (type) {
case OrderbookChannelMessageTypes.Snapshot: {
assert.doesConformToSchema('message', messageObj, schemas.relayerApiOrderbookChannelSnapshotSchema);
@@ -28,7 +34,7 @@ export const orderbookChannelMessageParser = {
default: {
return {
type: OrderbookChannelMessageTypes.Unknown,
- requestId: 0,
+ requestId,
payload: undefined,
};
}
diff --git a/packages/connect/src/ws_orderbook_channel.ts b/packages/connect/src/ws_orderbook_channel.ts
index bdcc8a75d..e1c55cce3 100644
--- a/packages/connect/src/ws_orderbook_channel.ts
+++ b/packages/connect/src/ws_orderbook_channel.ts
@@ -1,166 +1,105 @@
-import { assert } from '@0xproject/assert';
-import { schemas } from '@0xproject/json-schemas';
import * as _ from 'lodash';
import * as WebSocket from 'websocket';
-import { schemas as clientSchemas } from './schemas/schemas';
import {
OrderbookChannel,
OrderbookChannelHandler,
OrderbookChannelMessageTypes,
OrderbookChannelSubscriptionOpts,
- WebsocketClientEventType,
- WebsocketConnectionEventType,
- WebSocketOrderbookChannelConfig,
} from './types';
+import { assert } from './utils/assert';
import { orderbookChannelMessageParser } from './utils/orderbook_channel_message_parser';
-const DEFAULT_HEARTBEAT_INTERVAL_MS = 15000;
-const MINIMUM_HEARTBEAT_INTERVAL_MS = 10;
-
/**
* This class includes all the functionality related to interacting with a websocket endpoint
* that implements the standard relayer API v0
*/
export class WebSocketOrderbookChannel implements OrderbookChannel {
- private _apiEndpointUrl: string;
- private _client: WebSocket.client;
- private _connectionIfExists?: WebSocket.connection;
- private _heartbeatTimerIfExists?: NodeJS.Timer;
- private _subscriptionCounter = 0;
- private _heartbeatIntervalMs: number;
+ private _client: WebSocket.w3cwebsocket;
+ private _handler: OrderbookChannelHandler;
+ private _subscriptionOptsList: OrderbookChannelSubscriptionOpts[] = [];
/**
* Instantiates a new WebSocketOrderbookChannel instance
- * @param url The relayer API base WS url you would like to interact with
- * @param config The configuration object. Look up the type for the description.
+ * @param client A WebSocket client
+ * @param handler An OrderbookChannelHandler instance that responds to various
+ * channel updates
* @return An instance of WebSocketOrderbookChannel
*/
- constructor(url: string, config?: WebSocketOrderbookChannelConfig) {
- assert.isUri('url', url);
- if (!_.isUndefined(config)) {
- assert.doesConformToSchema('config', config, clientSchemas.webSocketOrderbookChannelConfigSchema);
- }
- this._apiEndpointUrl = url;
- this._heartbeatIntervalMs =
- _.isUndefined(config) || _.isUndefined(config.heartbeatIntervalMs)
- ? DEFAULT_HEARTBEAT_INTERVAL_MS
- : config.heartbeatIntervalMs;
- this._client = new WebSocket.client();
+ constructor(client: WebSocket.w3cwebsocket, handler: OrderbookChannelHandler) {
+ assert.isOrderbookChannelHandler('handler', handler);
+ // set private members
+ this._client = client;
+ this._handler = handler;
+ // attach client callbacks
+ this._client.onerror = err => {
+ this._handler.onError(this, err);
+ };
+ this._client.onclose = () => {
+ this._handler.onClose(this);
+ };
+ this._client.onmessage = message => {
+ this._handleWebSocketMessage(message);
+ };
}
/**
* Subscribe to orderbook snapshots and updates from the websocket
* @param subscriptionOpts An OrderbookChannelSubscriptionOpts instance describing which
* token pair to subscribe to
- * @param handler An OrderbookChannelHandler instance that responds to various
- * channel updates
*/
- public subscribe(subscriptionOpts: OrderbookChannelSubscriptionOpts, handler: OrderbookChannelHandler): void {
- assert.doesConformToSchema(
- 'subscriptionOpts',
- subscriptionOpts,
- schemas.relayerApiOrderbookChannelSubscribePayload,
- );
- assert.isFunction('handler.onSnapshot', _.get(handler, 'onSnapshot'));
- assert.isFunction('handler.onUpdate', _.get(handler, 'onUpdate'));
- assert.isFunction('handler.onError', _.get(handler, 'onError'));
- assert.isFunction('handler.onClose', _.get(handler, 'onClose'));
- this._subscriptionCounter += 1;
+ public subscribe(subscriptionOpts: OrderbookChannelSubscriptionOpts): void {
+ assert.isOrderbookChannelSubscriptionOpts('subscriptionOpts', subscriptionOpts);
+ assert.assert(this._client.readyState === WebSocket.w3cwebsocket.OPEN, 'WebSocket connection is closed');
+ this._subscriptionOptsList.push(subscriptionOpts);
+ // TODO: update requestId management to use UUIDs for v2
const subscribeMessage = {
type: 'subscribe',
channel: 'orderbook',
- requestId: this._subscriptionCounter,
+ requestId: this._subscriptionOptsList.length - 1,
payload: subscriptionOpts,
};
- this._getConnection((error, connection) => {
- if (!_.isUndefined(error)) {
- handler.onError(this, subscriptionOpts, error);
- } else if (!_.isUndefined(connection) && connection.connected) {
- connection.on(WebsocketConnectionEventType.Error, wsError => {
- handler.onError(this, subscriptionOpts, wsError);
- });
- connection.on(WebsocketConnectionEventType.Close, (_code: number, _desc: string) => {
- handler.onClose(this, subscriptionOpts);
- });
- connection.on(WebsocketConnectionEventType.Message, message => {
- this._handleWebSocketMessage(subscribeMessage.requestId, subscriptionOpts, message, handler);
- });
- connection.sendUTF(JSON.stringify(subscribeMessage));
- }
- });
+ this._client.send(JSON.stringify(subscribeMessage));
}
/**
* Close the websocket and stop receiving updates
*/
public close(): void {
- if (!_.isUndefined(this._connectionIfExists)) {
- this._connectionIfExists.close();
- }
- if (!_.isUndefined(this._heartbeatTimerIfExists)) {
- clearInterval(this._heartbeatTimerIfExists);
- }
+ this._client.close();
}
- private _getConnection(callback: (error?: Error, connection?: WebSocket.connection) => void): void {
- if (!_.isUndefined(this._connectionIfExists) && this._connectionIfExists.connected) {
- callback(undefined, this._connectionIfExists);
- } else {
- this._client.on(WebsocketClientEventType.Connect, connection => {
- this._connectionIfExists = connection;
- if (this._heartbeatIntervalMs >= MINIMUM_HEARTBEAT_INTERVAL_MS) {
- this._heartbeatTimerIfExists = setInterval(() => {
- connection.ping('');
- }, this._heartbeatIntervalMs);
- } else {
- callback(
- new Error(
- `Heartbeat interval is ${
- this._heartbeatIntervalMs
- }ms which is less than the required minimum of ${MINIMUM_HEARTBEAT_INTERVAL_MS}ms`,
- ),
- undefined,
- );
- }
- callback(undefined, this._connectionIfExists);
- });
- this._client.on(WebsocketClientEventType.ConnectFailed, error => {
- callback(error, undefined);
- });
- this._client.connect(this._apiEndpointUrl);
+ private _handleWebSocketMessage(message: any): void {
+ if (_.isUndefined(message.data)) {
+ this._handler.onError(this, new Error(`Message does not contain data. Url: ${this._client.url}`));
+ return;
}
- }
- private _handleWebSocketMessage(
- requestId: number,
- subscriptionOpts: OrderbookChannelSubscriptionOpts,
- message: WebSocket.IMessage,
- handler: OrderbookChannelHandler,
- ): void {
- if (!_.isUndefined(message.utf8Data)) {
- try {
- const utf8Data = message.utf8Data;
- const parserResult = orderbookChannelMessageParser.parse(utf8Data);
- if (parserResult.requestId === requestId) {
- switch (parserResult.type) {
- case OrderbookChannelMessageTypes.Snapshot: {
- handler.onSnapshot(this, subscriptionOpts, parserResult.payload);
- break;
- }
- case OrderbookChannelMessageTypes.Update: {
- handler.onUpdate(this, subscriptionOpts, parserResult.payload);
- break;
- }
- default: {
- handler.onError(
- this,
- subscriptionOpts,
- new Error(`Message has missing a type parameter: ${utf8Data}`),
- );
- }
- }
+ try {
+ const data = message.data;
+ const parserResult = orderbookChannelMessageParser.parse(data);
+ const subscriptionOpts = this._subscriptionOptsList[parserResult.requestId];
+ if (_.isUndefined(subscriptionOpts)) {
+ this._handler.onError(
+ this,
+ new Error(`Message has unknown requestId. Url: ${this._client.url} Message: ${data}`),
+ );
+ return;
+ }
+ switch (parserResult.type) {
+ case OrderbookChannelMessageTypes.Snapshot: {
+ this._handler.onSnapshot(this, subscriptionOpts, parserResult.payload);
+ break;
+ }
+ case OrderbookChannelMessageTypes.Update: {
+ this._handler.onUpdate(this, subscriptionOpts, parserResult.payload);
+ break;
+ }
+ default: {
+ this._handler.onError(
+ this,
+ new Error(`Message has unknown type parameter. Url: ${this._client.url} Message: ${data}`),
+ subscriptionOpts,
+ );
}
- } catch (error) {
- handler.onError(this, subscriptionOpts, error);
}
- } else {
- handler.onError(this, subscriptionOpts, new Error(`Message does not contain utf8Data`));
+ } catch (error) {
+ this._handler.onError(this, error);
}
}
}
diff --git a/packages/connect/test/orderbook_channel_factory_test.ts b/packages/connect/test/orderbook_channel_factory_test.ts
new file mode 100644
index 000000000..2ce361bd2
--- /dev/null
+++ b/packages/connect/test/orderbook_channel_factory_test.ts
@@ -0,0 +1,45 @@
+import * as chai from 'chai';
+import * as dirtyChai from 'dirty-chai';
+import * as _ from 'lodash';
+import 'mocha';
+
+import { orderbookChannelFactory } from '../src/orderbook_channel_factory';
+
+chai.config.includeStack = true;
+chai.use(dirtyChai);
+const expect = chai.expect;
+const emptyOrderbookChannelHandler = {
+ onSnapshot: () => {
+ _.noop();
+ },
+ onUpdate: () => {
+ _.noop();
+ },
+ onError: () => {
+ _.noop();
+ },
+ onClose: () => {
+ _.noop();
+ },
+};
+
+describe('orderbookChannelFactory', () => {
+ const websocketUrl = 'ws://localhost:8080';
+ describe('#createWebSocketOrderbookChannelAsync', () => {
+ it('throws when input is not a url', () => {
+ const badUrlInput = 54;
+ expect(
+ orderbookChannelFactory.createWebSocketOrderbookChannelAsync(
+ badUrlInput as any,
+ emptyOrderbookChannelHandler,
+ ),
+ ).to.be.rejected();
+ });
+ it('throws when handler has the incorrect members', () => {
+ const badHandlerInput = {};
+ expect(
+ orderbookChannelFactory.createWebSocketOrderbookChannelAsync(websocketUrl, badHandlerInput as any),
+ ).to.be.rejected();
+ });
+ });
+});
diff --git a/packages/connect/test/ws_orderbook_channel_test.ts b/packages/connect/test/ws_orderbook_channel_test.ts
index ce404d934..fed4f2217 100644
--- a/packages/connect/test/ws_orderbook_channel_test.ts
+++ b/packages/connect/test/ws_orderbook_channel_test.ts
@@ -2,60 +2,58 @@ import * as chai from 'chai';
import * as dirtyChai from 'dirty-chai';
import * as _ from 'lodash';
import 'mocha';
+import * as Sinon from 'sinon';
+import * as WebSocket from 'websocket';
import { WebSocketOrderbookChannel } from '../src/ws_orderbook_channel';
chai.config.includeStack = true;
chai.use(dirtyChai);
const expect = chai.expect;
+const emptyOrderbookChannelHandler = {
+ onSnapshot: () => {
+ _.noop();
+ },
+ onUpdate: () => {
+ _.noop();
+ },
+ onError: () => {
+ _.noop();
+ },
+ onClose: () => {
+ _.noop();
+ },
+};
describe('WebSocketOrderbookChannel', () => {
const websocketUrl = 'ws://localhost:8080';
- const orderbookChannel = new WebSocketOrderbookChannel(websocketUrl);
+ const openClient = new WebSocket.w3cwebsocket(websocketUrl);
+ Sinon.stub(openClient, 'readyState').get(() => WebSocket.w3cwebsocket.OPEN);
+ Sinon.stub(openClient, 'send').callsFake(_.noop);
+ const openOrderbookChannel = new WebSocketOrderbookChannel(openClient, emptyOrderbookChannelHandler);
const subscriptionOpts = {
baseTokenAddress: '0x323b5d4c32345ced77393b3530b1eed0f346429d',
quoteTokenAddress: '0xef7fff64389b814a946f3e92105513705ca6b990',
snapshot: true,
limit: 100,
};
- const emptyOrderbookChannelHandler = {
- onSnapshot: () => {
- _.noop();
- },
- onUpdate: () => {
- _.noop();
- },
- onError: () => {
- _.noop();
- },
- onClose: () => {
- _.noop();
- },
- };
describe('#subscribe', () => {
it('throws when subscriptionOpts does not conform to schema', () => {
- const badSubscribeCall = orderbookChannel.subscribe.bind(
- orderbookChannel,
- {},
- emptyOrderbookChannelHandler,
- );
+ const badSubscribeCall = openOrderbookChannel.subscribe.bind(openOrderbookChannel, {});
expect(badSubscribeCall).throws(
'Expected subscriptionOpts to conform to schema /RelayerApiOrderbookChannelSubscribePayload\nEncountered: {}\nValidation errors: instance requires property "baseTokenAddress", instance requires property "quoteTokenAddress"',
);
});
- it('throws when handler has the incorrect members', () => {
- const badSubscribeCall = orderbookChannel.subscribe.bind(orderbookChannel, subscriptionOpts, {});
- expect(badSubscribeCall).throws(
- 'Expected handler.onSnapshot to be of type function, encountered: undefined',
- );
- });
it('does not throw when inputs are of correct types', () => {
- const goodSubscribeCall = orderbookChannel.subscribe.bind(
- orderbookChannel,
- subscriptionOpts,
- emptyOrderbookChannelHandler,
- );
+ const goodSubscribeCall = openOrderbookChannel.subscribe.bind(openOrderbookChannel, subscriptionOpts);
expect(goodSubscribeCall).to.not.throw();
});
+ it('throws when client is closed', () => {
+ const closedClient = new WebSocket.w3cwebsocket(websocketUrl);
+ Sinon.stub(closedClient, 'readyState').get(() => WebSocket.w3cwebsocket.CLOSED);
+ const closedOrderbookChannel = new WebSocketOrderbookChannel(closedClient, emptyOrderbookChannelHandler);
+ const badSubscribeCall = closedOrderbookChannel.subscribe.bind(closedOrderbookChannel, subscriptionOpts);
+ expect(badSubscribeCall).throws('WebSocket connection is closed');
+ });
});
});
diff --git a/packages/contract-wrappers/package.json b/packages/contract-wrappers/package.json
index b8fd8bd50..a781496ab 100644
--- a/packages/contract-wrappers/package.json
+++ b/packages/contract-wrappers/package.json
@@ -70,8 +70,7 @@
"sinon": "^4.0.0",
"source-map-support": "^0.5.0",
"tslint": "5.8.0",
- "typescript": "2.7.1",
- "web3-provider-engine": "14.0.6"
+ "typescript": "2.7.1"
},
"dependencies": {
"@0xproject/assert": "^0.3.0",
diff --git a/packages/contract-wrappers/src/index.ts b/packages/contract-wrappers/src/index.ts
index b3c4b2c60..d8e597ed1 100644
--- a/packages/contract-wrappers/src/index.ts
+++ b/packages/contract-wrappers/src/index.ts
@@ -2,6 +2,9 @@ export { ContractWrappers } from './contract_wrappers';
export { ERC20TokenWrapper } from './contract_wrappers/erc20_token_wrapper';
export { EtherTokenWrapper } from './contract_wrappers/ether_token_wrapper';
export { ERC20ProxyWrapper } from './contract_wrappers/erc20_proxy_wrapper';
+export { ExchangeWrapper } from './contract_wrappers/exchange_wrapper';
+export { ERC721TokenWrapper } from './contract_wrappers/erc721_token_wrapper';
+export { ERC721ProxyWrapper } from './contract_wrappers/erc721_proxy_wrapper';
export {
ContractWrappersError,
diff --git a/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts b/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
index 4b68daf1a..7e2eca61c 100644
--- a/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
+++ b/packages/contract-wrappers/src/schemas/contract_wrappers_private_network_config_schema.ts
@@ -8,8 +8,8 @@ export const contractWrappersPrivateNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
blockPollingIntervalMs: { type: 'number' },
orderWatcherConfig: {
type: 'object',
@@ -30,7 +30,7 @@ export const contractWrappersPrivateNetworkConfigSchema = {
'networkId',
'zrxContractAddress',
'exchangeContractAddress',
- 'tokenRegistryContractAddress',
- 'tokenTransferProxyContractAddress',
+ 'erc20ProxyContractAddress',
+ 'erc721ProxyContractAddress',
],
};
diff --git a/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts b/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
index 988872376..b80e04310 100644
--- a/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
+++ b/packages/contract-wrappers/src/schemas/contract_wrappers_public_network_config_schema.ts
@@ -22,8 +22,8 @@ export const contractWrappersPublicNetworkConfigSchema = {
gasPrice: { $ref: '/Number' },
zrxContractAddress: { $ref: '/Address' },
exchangeContractAddress: { $ref: '/Address' },
- tokenRegistryContractAddress: { $ref: '/Address' },
- tokenTransferProxyContractAddress: { $ref: '/Address' },
+ erc20ProxyContractAddress: { $ref: '/Address' },
+ erc721ProxyContractAddress: { $ref: '/Address' },
blockPollingIntervalMs: { type: 'number' },
orderWatcherConfig: {
type: 'object',
diff --git a/packages/contract-wrappers/src/utils/assert.ts b/packages/contract-wrappers/src/utils/assert.ts
index da6697b08..842b16fa0 100644
--- a/packages/contract-wrappers/src/utils/assert.ts
+++ b/packages/contract-wrappers/src/utils/assert.ts
@@ -1,5 +1,5 @@
import { assert as sharedAssert } from '@0xproject/assert';
-// We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
import { Schema } from '@0xproject/json-schemas'; // tslint:disable-line:no-unused-variable
import { isValidSignatureAsync } from '@0xproject/order-utils';
import { ECSignature } from '@0xproject/types'; // tslint:disable-line:no-unused-variable
diff --git a/packages/contract-wrappers/test/erc20_wrapper_test.ts b/packages/contract-wrappers/test/erc20_wrapper_test.ts
index 0011508e0..cf7ac527e 100644
--- a/packages/contract-wrappers/test/erc20_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc20_wrapper_test.ts
@@ -1,11 +1,10 @@
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
-import { EmptyWalletSubprovider } from '@0xproject/subproviders';
+import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { DoneCallback } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { Provider } from 'ethereum-types';
import 'mocha';
-import Web3ProviderEngine = require('web3-provider-engine');
import {
BlockParamLiteral,
diff --git a/packages/contract-wrappers/test/erc721_wrapper_test.ts b/packages/contract-wrappers/test/erc721_wrapper_test.ts
index 96b8fcf1d..f005ac2e0 100644
--- a/packages/contract-wrappers/test/erc721_wrapper_test.ts
+++ b/packages/contract-wrappers/test/erc721_wrapper_test.ts
@@ -1,11 +1,10 @@
import { BlockchainLifecycle, callbackErrorReporter } from '@0xproject/dev-utils';
-import { EmptyWalletSubprovider } from '@0xproject/subproviders';
+import { EmptyWalletSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { DoneCallback } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai';
import { Provider } from 'ethereum-types';
import 'mocha';
-import Web3ProviderEngine = require('web3-provider-engine');
import {
BlockParamLiteral,
diff --git a/packages/contract-wrappers/test/ether_token_wrapper_test.ts b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
index 0a860884a..48bd6d3f6 100644
--- a/packages/contract-wrappers/test/ether_token_wrapper_test.ts
+++ b/packages/contract-wrappers/test/ether_token_wrapper_test.ts
@@ -336,15 +336,19 @@ describe('EtherTokenWrapper', () => {
describe('#getLogsAsync', () => {
let etherTokenAddress: string;
let erc20ProxyAddress: string;
- const blockRange: BlockRange = {
- fromBlock: 0,
- toBlock: BlockParamLiteral.Latest,
- };
+ let blockRange: BlockRange;
let txHash: string;
- before(() => {
+ before(async () => {
addressWithETH = userAddresses[0];
etherTokenAddress = tokenUtils.getWethTokenAddress();
erc20ProxyAddress = contractWrappers.erc20Proxy.getContractAddress();
+ // Start the block range after all migrations to avoid unexpected logs
+ const currentBlock = await web3Wrapper.getBlockNumberAsync();
+ const fromBlock = currentBlock + 1;
+ blockRange = {
+ fromBlock,
+ toBlock: BlockParamLiteral.Latest,
+ };
});
it('should get logs with decoded args emitted by Approval', async () => {
txHash = await contractWrappers.erc20Token.setUnlimitedProxyAllowanceAsync(
diff --git a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
index 241e02d4a..aee722c53 100644
--- a/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
+++ b/packages/contracts/src/1.0.0/MultiSigWalletWithTImeLockExceptRemoveAuthorizedAddress/MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress.sol
@@ -18,7 +18,7 @@
pragma solidity ^0.4.10;
-import "../../current/multisig/MultiSigWalletWithTimeLock.sol";
+import "../../2.0.0/multisig/MultiSigWalletWithTimeLock.sol";
contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {
@@ -79,4 +79,4 @@ contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWall
}
return true;
}
-} \ No newline at end of file
+}
diff --git a/packages/contracts/src/2.0.0/forwarder/Forwarder.sol b/packages/contracts/src/2.0.0/forwarder/Forwarder.sol
index fc17a4c72..546e7f22c 100644
--- a/packages/contracts/src/2.0.0/forwarder/Forwarder.sol
+++ b/packages/contracts/src/2.0.0/forwarder/Forwarder.sol
@@ -40,7 +40,6 @@ contract Forwarder is
address _exchange,
address _etherToken,
address _zrxToken,
- bytes4 _erc20AssetProxyId,
bytes memory _zrxAssetData,
bytes memory _wethAssetData
)
diff --git a/packages/contracts/test/forwarder/forwarder.ts b/packages/contracts/test/forwarder/forwarder.ts
index b4555d417..f0bf6ac03 100644
--- a/packages/contracts/test/forwarder/forwarder.ts
+++ b/packages/contracts/test/forwarder/forwarder.ts
@@ -1,6 +1,6 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils';
import { assetProxyUtils } from '@0xproject/order-utils';
-import { AssetProxyId, RevertReason, SignedOrder } from '@0xproject/types';
+import { RevertReason, SignedOrder } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai';
@@ -131,7 +131,6 @@ describe(ContractName.Forwarder, () => {
exchangeInstance.address,
wethContract.address,
zrxToken.address,
- AssetProxyId.ERC20,
zrxAssetData,
wethAssetData,
);
diff --git a/packages/dev-utils/package.json b/packages/dev-utils/package.json
index 1808e23e4..f0ef24684 100644
--- a/packages/dev-utils/package.json
+++ b/packages/dev-utils/package.json
@@ -51,8 +51,7 @@
"ethereum-types": "^0.0.2",
"@0xproject/typescript-typings": "^0.4.2",
"@0xproject/web3-wrapper": "^0.7.2",
- "lodash": "^4.17.4",
- "web3-provider-engine": "14.0.6"
+ "lodash": "^4.17.4"
},
"publishConfig": {
"access": "public"
diff --git a/packages/dev-utils/src/web3_factory.ts b/packages/dev-utils/src/web3_factory.ts
index 362a6c3c6..8e713fa68 100644
--- a/packages/dev-utils/src/web3_factory.ts
+++ b/packages/dev-utils/src/web3_factory.ts
@@ -1,7 +1,10 @@
-import ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
-
-import { EmptyWalletSubprovider, FakeGasEstimateSubprovider, GanacheSubprovider } from '@0xproject/subproviders';
+import {
+ EmptyWalletSubprovider,
+ FakeGasEstimateSubprovider,
+ GanacheSubprovider,
+ RPCSubprovider,
+ Web3ProviderEngine,
+} from '@0xproject/subproviders';
import * as fs from 'fs';
import * as _ from 'lodash';
@@ -16,8 +19,8 @@ export interface Web3Config {
}
export const web3Factory = {
- getRpcProvider(config: Web3Config = {}): ProviderEngine {
- const provider = new ProviderEngine();
+ getRpcProvider(config: Web3Config = {}): Web3ProviderEngine {
+ const provider = new Web3ProviderEngine();
const hasAddresses = _.isUndefined(config.hasAddresses) || config.hasAddresses;
config.shouldUseFakeGasEstimate =
_.isUndefined(config.shouldUseFakeGasEstimate) || config.shouldUseFakeGasEstimate;
@@ -49,11 +52,7 @@ export const web3Factory = {
}),
);
} else {
- provider.addProvider(
- new RpcSubprovider({
- rpcUrl: config.rpcUrl || constants.RPC_URL,
- }),
- );
+ provider.addProvider(new RPCSubprovider(config.rpcUrl || constants.RPC_URL));
}
provider.start();
return provider;
diff --git a/packages/metacoin/package.json b/packages/metacoin/package.json
index 9b96441c4..744e9e69a 100644
--- a/packages/metacoin/package.json
+++ b/packages/metacoin/package.json
@@ -44,8 +44,7 @@
"ethereum-types": "^0.0.2",
"ethers": "3.0.22",
"lodash": "^4.17.4",
- "run-s": "^0.0.0",
- "web3-provider-engine": "14.0.6"
+ "run-s": "^0.0.0"
},
"devDependencies": {
"@0xproject/dev-utils": "^0.4.5",
diff --git a/packages/metacoin/test/utils/web3_wrapper.ts b/packages/metacoin/test/utils/web3_wrapper.ts
index d3655cb6a..36bd6343f 100644
--- a/packages/metacoin/test/utils/web3_wrapper.ts
+++ b/packages/metacoin/test/utils/web3_wrapper.ts
@@ -1,10 +1,8 @@
import { env, EnvVars } from '@0xproject/dev-utils';
-import { GanacheSubprovider, prependSubprovider } from '@0xproject/subproviders';
+import { GanacheSubprovider, prependSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0xproject/subproviders';
import { errorUtils, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as fs from 'fs';
-import ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import { config } from './config';
import { coverage } from './coverage';
@@ -30,7 +28,7 @@ switch (process.env.TEST_PROVIDER) {
throw errorUtils.spawnSwitchErr('TEST_PROVIDER', process.env.TEST_PROVIDER);
}
-export const provider = new ProviderEngine();
+export const provider = new Web3ProviderEngine();
if (testProvider === ProviderType.Ganache) {
provider.addProvider(
new GanacheSubprovider({
@@ -45,7 +43,7 @@ if (testProvider === ProviderType.Ganache) {
}),
);
} else {
- provider.addProvider(new RpcSubprovider({ rpcUrl: 'http://localhost:8501' }));
+ provider.addProvider(new RPCSubprovider('http://localhost:8501'));
}
provider.start();
diff --git a/packages/migrations/artifacts/2.0.0/Forwarder.json b/packages/migrations/artifacts/2.0.0/Forwarder.json
index da1f54eca..0bef9adbc 100644
--- a/packages/migrations/artifacts/2.0.0/Forwarder.json
+++ b/packages/migrations/artifacts/2.0.0/Forwarder.json
@@ -709,10 +709,6 @@
"type": "address"
},
{
- "name": "_erc20AssetProxyId",
- "type": "bytes4"
- },
- {
"name": "_zrxAssetData",
"type": "bytes"
},
@@ -896,5 +892,11 @@
}
}
},
- "networks": {}
-} \ No newline at end of file
+ "networks": {
+ "50": {
+ "address": "0xb69e673309512a9d726f87304c6984054f87a93b",
+ "links": {},
+ "constructorArgs": "[\"0x48bacb9266a570d521063ef5dd96e61686dbe788\",\"0x0b1ba0af832d7c05fd64161e0db78e85978e8082\",\"0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c\",\"0xf47261b0\",\"0xf47261b0000000000000000000000000871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c\",\"0xf47261b00000000000000000000000000b1ba0af832d7c05fd64161e0db78e85978e8082\"]"
+ }
+ }
+}
diff --git a/packages/migrations/compiler.json b/packages/migrations/compiler.json
index eae22a73c..493a73d46 100644
--- a/packages/migrations/compiler.json
+++ b/packages/migrations/compiler.json
@@ -1,5 +1,5 @@
{
- "contractsDir": "../contracts/src/contracts",
+ "contractsDir": "../contracts/src/",
"compilerSettings": {
"optimizer": {
"enabled": true,
diff --git a/packages/migrations/package.json b/packages/migrations/package.json
index 0b7ab8ae2..d4aa73912 100644
--- a/packages/migrations/package.json
+++ b/packages/migrations/package.json
@@ -60,8 +60,7 @@
"@ledgerhq/hw-app-eth": "^4.3.0",
"ethereum-types": "^0.0.2",
"ethers": "3.0.22",
- "lodash": "^4.17.4",
- "web3-provider-engine": "14.0.6"
+ "lodash": "^4.17.4"
},
"optionalDependencies": {
"@ledgerhq/hw-transport-node-hid": "^4.3.0"
diff --git a/packages/migrations/src/2.0.0/migration.ts b/packages/migrations/src/2.0.0/migration.ts
index 75e60d3e2..226bf0a68 100644
--- a/packages/migrations/src/2.0.0/migration.ts
+++ b/packages/migrations/src/2.0.0/migration.ts
@@ -13,6 +13,7 @@ import { DummyERC721TokenContract } from './contract_wrappers/dummy_erc721_token
import { ERC20ProxyContract } from './contract_wrappers/erc20_proxy';
import { ERC721ProxyContract } from './contract_wrappers/erc721_proxy';
import { ExchangeContract } from './contract_wrappers/exchange';
+import { ForwarderContract } from './contract_wrappers/forwarder';
import { WETH9Contract } from './contract_wrappers/weth9';
import { ZRXTokenContract } from './contract_wrappers/zrx_token';
@@ -127,4 +128,17 @@ export const runV2MigrationsAsync = async (provider: Provider, artifactsDir: str
erc721TokenInfo[0].name,
erc721TokenInfo[0].symbol,
);
+
+ // Forwarder
+ const forwarder = await ForwarderContract.deployFrom0xArtifactAsync(
+ artifacts.Forwarder,
+ provider,
+ txDefaults,
+ exchange.address,
+ etherToken.address,
+ zrxToken.address,
+ assetProxyUtils.encodeERC20AssetData(zrxToken.address),
+ assetProxyUtils.encodeERC20AssetData(etherToken.address),
+ );
+ artifactsWriter.saveArtifact(forwarder);
};
diff --git a/packages/migrations/src/utils/provider_factory.ts b/packages/migrations/src/utils/provider_factory.ts
index 7a217b1e0..5f69b258d 100644
--- a/packages/migrations/src/utils/provider_factory.ts
+++ b/packages/migrations/src/utils/provider_factory.ts
@@ -1,10 +1,8 @@
-import { LedgerEthereumClient, LedgerSubprovider } from '@0xproject/subproviders';
+import { LedgerEthereumClient, LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '@0xproject/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 ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import { constants } from './constants';
@@ -15,18 +13,14 @@ async function ledgerEthereumNodeJsClientFactoryAsync(): Promise<LedgerEthereumC
}
export const providerFactory = {
async getLedgerProviderAsync(): Promise<Provider> {
- const provider = new ProviderEngine();
+ 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({
- rpcUrl: constants.RPC_URL,
- }),
- );
+ provider.addProvider(new RPCSubprovider(constants.RPC_URL));
provider.start();
return provider;
},
diff --git a/packages/order-utils/src/assert.ts b/packages/order-utils/src/assert.ts
index b4b57d02a..f8db7ac63 100644
--- a/packages/order-utils/src/assert.ts
+++ b/packages/order-utils/src/assert.ts
@@ -1,5 +1,5 @@
import { assert as sharedAssert } from '@0xproject/assert';
-// We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
// tslint:disable:no-unused-variable
import { Schema } from '@0xproject/json-schemas';
import { ECSignature, SignatureType } from '@0xproject/types';
diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts
index d8703bfda..26fb24705 100644
--- a/packages/order-utils/src/signature_utils.ts
+++ b/packages/order-utils/src/signature_utils.ts
@@ -27,6 +27,10 @@ export async function isValidSignatureAsync(
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}`);
@@ -90,6 +94,9 @@ export async function isValidPresignedSignatureAsync(
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;
@@ -108,6 +115,10 @@ export async function isValidWalletSignatureAsync(
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(-2);
const walletContract = new IWalletContract(artifacts.IWallet.compilerOutput.abi, signerAddress, provider);
@@ -128,6 +139,10 @@ export async function isValidValidatorSignatureAsync(
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(
@@ -192,7 +207,9 @@ export async function ecSignOrderHashAsync(
signerAddress: string,
messagePrefixOpts: MessagePrefixOpts,
): Promise<ECSignature> {
+ assert.isWeb3Provider('provider', provider);
assert.isHexString('orderHash', orderHash);
+ assert.isETHAddressHex('signerAddress', signerAddress);
const web3Wrapper = new Web3Wrapper(provider);
await assert.isSenderAddressAsync('signerAddress', signerAddress, web3Wrapper);
const normalizedSignerAddress = signerAddress.toLowerCase();
@@ -237,6 +254,8 @@ export async function ecSignOrderHashAsync(
* @return Prefixed message
*/
export function addSignedMessagePrefix(message: string, messagePrefixType: MessagePrefixType): string {
+ assert.isString('message', message);
+ assert.doesBelongToStringEnum('messagePrefixType', messagePrefixType, MessagePrefixType);
switch (messagePrefixType) {
case MessagePrefixType.None:
return message;
@@ -266,6 +285,7 @@ export function addSignedMessagePrefix(message: string, messagePrefixType: Messa
* @return An ECSignature object with r,s,v parameters
*/
export function parseECSignature(signature: string): ECSignature {
+ assert.isHexString('signature', signature);
const ecSignatureTypes = [SignatureType.EthSign, SignatureType.EIP712, SignatureType.Trezor];
assert.isOneOfExpectedSignatureTypes(signature, ecSignatureTypes);
diff --git a/packages/order-watcher/src/order_watcher/order_watcher.ts b/packages/order-watcher/src/order_watcher/order_watcher.ts
index 999c1c79e..b09ba8d9d 100644
--- a/packages/order-watcher/src/order_watcher/order_watcher.ts
+++ b/packages/order-watcher/src/order_watcher/order_watcher.ts
@@ -252,6 +252,7 @@ export class OrderWatcher {
switch (decodedLog.event) {
case TokenEvents.Approval: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as TokenApprovalEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteProxyAllowance(decodedLog.address, args._owner);
// Revalidate orders
@@ -268,6 +269,7 @@ export class OrderWatcher {
}
case TokenEvents.Transfer: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as TokenTransferEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._from);
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._to);
@@ -285,6 +287,7 @@ export class OrderWatcher {
}
case EtherTokenEvents.Deposit: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as EtherTokenDepositEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner);
// Revalidate orders
@@ -301,6 +304,7 @@ export class OrderWatcher {
}
case EtherTokenEvents.Withdrawal: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as EtherTokenWithdrawalEventArgs;
this._balanceAndProxyAllowanceLazyStore.deleteBalance(decodedLog.address, args._owner);
// Revalidate orders
@@ -317,6 +321,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogFill: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as ExchangeLogFillEventArgs;
this._orderFilledCancelledLazyStore.deleteFilledTakerAmount(args.orderHash);
// Revalidate orders
@@ -329,6 +334,7 @@ export class OrderWatcher {
}
case ExchangeEvents.LogCancel: {
// Invalidate cache
+ // tslint:disable-next-line:no-unnecessary-type-assertion
const args = decodedLog.args as ExchangeLogCancelEventArgs;
this._orderFilledCancelledLazyStore.deleteCancelledTakerAmount(args.orderHash);
// Revalidate orders
diff --git a/packages/order-watcher/src/utils/assert.ts b/packages/order-watcher/src/utils/assert.ts
index 5d7f72716..9c992d9b4 100644
--- a/packages/order-watcher/src/utils/assert.ts
+++ b/packages/order-watcher/src/utils/assert.ts
@@ -1,5 +1,5 @@
import { assert as sharedAssert } from '@0xproject/assert';
-// We need those two unused imports because they're actually used by sharedAssert which gets injected here
+// HACK: We need those two unused imports because they're actually used by sharedAssert which gets injected here
// tslint:disable:no-unused-variable
import { Schema } from '@0xproject/json-schemas';
import { ECSignature } from '@0xproject/types';
diff --git a/packages/sol-compiler/package.json b/packages/sol-compiler/package.json
index e738ab56b..8460420ad 100644
--- a/packages/sol-compiler/package.json
+++ b/packages/sol-compiler/package.json
@@ -87,7 +87,6 @@
"ethereum-types": "^0.0.2",
"chalk": "^2.3.0",
"ethereumjs-util": "^5.1.1",
- "isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4",
"mkdirp": "^0.5.1",
"require-from-string": "^2.0.1",
diff --git a/packages/sol-compiler/src/compiler.ts b/packages/sol-compiler/src/compiler.ts
index bb701a8ce..e61c606be 100644
--- a/packages/sol-compiler/src/compiler.ts
+++ b/packages/sol-compiler/src/compiler.ts
@@ -8,11 +8,10 @@ import {
Resolver,
URLResolver,
} from '@0xproject/sol-resolver';
-import { logUtils } from '@0xproject/utils';
+import { fetchAsync, logUtils } from '@0xproject/utils';
import chalk from 'chalk';
import * as ethUtil from 'ethereumjs-util';
import * as fs from 'fs';
-import 'isomorphic-fetch';
import * as _ from 'lodash';
import * as path from 'path';
import * as requireFromString from 'require-from-string';
@@ -149,7 +148,7 @@ export class Compiler {
} else {
logUtils.log(`Downloading ${fullSolcVersion}...`);
const url = `${constants.BASE_COMPILER_URL}${fullSolcVersion}`;
- const response = await fetch(url);
+ const response = await fetchAsync(url);
const SUCCESS_STATUS = 200;
if (response.status !== SUCCESS_STATUS) {
throw new Error(`Failed to load ${fullSolcVersion}`);
diff --git a/packages/subproviders/package.json b/packages/subproviders/package.json
index bdc846e6b..796d87cf4 100644
--- a/packages/subproviders/package.json
+++ b/packages/subproviders/package.json
@@ -55,6 +55,7 @@
"ethereumjs-util": "^5.1.1",
"ganache-core": "0xProject/ganache-core",
"hdkey": "^0.7.1",
+ "json-rpc-error": "2.0.0",
"lodash": "^4.17.4",
"semaphore-async-await": "^1.5.1",
"web3-provider-engine": "14.0.6"
diff --git a/packages/subproviders/src/index.ts b/packages/subproviders/src/index.ts
index 71d643f14..9d4480e59 100644
--- a/packages/subproviders/src/index.ts
+++ b/packages/subproviders/src/index.ts
@@ -1,5 +1,6 @@
import Eth from '@ledgerhq/hw-app-eth';
import TransportU2F from '@ledgerhq/hw-transport-u2f';
+export import Web3ProviderEngine = require('web3-provider-engine');
export { ECSignature } from '@0xproject/types';
import { LedgerEthereumClient } from './types';
@@ -10,6 +11,7 @@ export { FakeGasEstimateSubprovider } from './subproviders/fake_gas_estimate_sub
export { SignerSubprovider } from './subproviders/signer';
export { RedundantSubprovider } from './subproviders/redundant_subprovider';
export { LedgerSubprovider } from './subproviders/ledger';
+export { RPCSubprovider } from './subproviders/rpc_subprovider';
export { GanacheSubprovider } from './subproviders/ganache';
export { Subprovider } from './subproviders/subprovider';
export { NonceTrackerSubprovider } from './subproviders/nonce_tracker';
diff --git a/packages/subproviders/src/subproviders/rpc_subprovider.ts b/packages/subproviders/src/subproviders/rpc_subprovider.ts
new file mode 100644
index 000000000..3ad0e5325
--- /dev/null
+++ b/packages/subproviders/src/subproviders/rpc_subprovider.ts
@@ -0,0 +1,90 @@
+import { assert } from '@0xproject/assert';
+import { StatusCodes } from '@0xproject/types';
+import { fetchAsync } from '@0xproject/utils';
+import { JSONRPCRequestPayload } from 'ethereum-types';
+import JsonRpcError = require('json-rpc-error');
+
+import { Callback, ErrorCallback } from '../types';
+
+import { Subprovider } from './subprovider';
+
+/**
+ * This class implements the [web3-provider-engine](https://github.com/MetaMask/provider-engine) subprovider interface.
+ * It forwards on JSON RPC requests to the supplied `rpcUrl` endpoint
+ */
+export class RPCSubprovider extends Subprovider {
+ private _rpcUrl: string;
+ private _requestTimeoutMs: number;
+ constructor(rpcUrl: string, requestTimeoutMs: number = 20000) {
+ super();
+ assert.isString('rpcUrl', rpcUrl);
+ assert.isNumber('requestTimeoutMs', requestTimeoutMs);
+ this._rpcUrl = rpcUrl;
+ this._requestTimeoutMs = requestTimeoutMs;
+ }
+ /**
+ * This method conforms to the web3-provider-engine interface.
+ * It is called internally by the ProviderEngine when it is this subproviders
+ * turn to handle a JSON RPC request.
+ * @param payload JSON RPC payload
+ * @param next Callback to call if this subprovider decides not to handle the request
+ * @param end Callback to call if subprovider handled the request and wants to pass back the request.
+ */
+ // tslint:disable-next-line:prefer-function-over-method async-suffix
+ public async handleRequest(payload: JSONRPCRequestPayload, _next: Callback, end: ErrorCallback): Promise<void> {
+ const finalPayload = Subprovider._createFinalPayload(payload);
+ const headers = new Headers({
+ Accept: 'application/json',
+ 'Content-Type': 'application/json',
+ });
+
+ let response;
+ try {
+ response = await fetchAsync(
+ this._rpcUrl,
+ {
+ method: 'POST',
+ headers,
+ body: JSON.stringify(finalPayload),
+ },
+ this._requestTimeoutMs,
+ );
+ } catch (err) {
+ end(new JsonRpcError.InternalError(err));
+ return;
+ }
+
+ const text = await response.text();
+ if (!response.ok) {
+ const statusCode = response.status;
+ switch (statusCode) {
+ case StatusCodes.MethodNotAllowed:
+ end(new JsonRpcError.MethodNotFound());
+ return;
+ case StatusCodes.GatewayTimeout:
+ const errMsg =
+ 'Gateway timeout. The request took too long to process. This can happen when querying logs over too wide a block range.';
+ const err = new Error(errMsg);
+ end(new JsonRpcError.InternalError(err));
+ return;
+ default:
+ end(new JsonRpcError.InternalError(text));
+ return;
+ }
+ }
+
+ let data;
+ try {
+ data = JSON.parse(text);
+ } catch (err) {
+ end(new JsonRpcError.InternalError(err));
+ return;
+ }
+
+ if (data.error) {
+ end(data.error);
+ return;
+ }
+ end(null, data.result);
+ }
+}
diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts
index ff8378c4e..5dc273569 100644
--- a/packages/subproviders/src/subproviders/subprovider.ts
+++ b/packages/subproviders/src/subproviders/subprovider.ts
@@ -9,18 +9,7 @@ import { Callback, ErrorCallback, JSONRPCRequestPayloadWithMethod } from '../typ
export abstract class Subprovider {
// tslint:disable-next-line:underscore-private-and-protected
private engine!: Provider;
- // Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js
- private static _getRandomId(): number {
- const extraDigits = 3;
- const baseTen = 10;
- // 13 time digits
- const datePart = new Date().getTime() * Math.pow(baseTen, extraDigits);
- // 3 random digits
- const extraPart = Math.floor(Math.random() * Math.pow(baseTen, extraDigits));
- // 16 digits
- return datePart + extraPart;
- }
- private static _createFinalPayload(
+ protected static _createFinalPayload(
payload: Partial<JSONRPCRequestPayloadWithMethod>,
): Partial<JSONRPCRequestPayloadWithMethod> {
const finalPayload = {
@@ -32,6 +21,17 @@ export abstract class Subprovider {
};
return finalPayload;
}
+ // Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js
+ private static _getRandomId(): number {
+ const extraDigits = 3;
+ const baseTen = 10;
+ // 13 time digits
+ const datePart = new Date().getTime() * Math.pow(baseTen, extraDigits);
+ // 3 random digits
+ const extraPart = Math.floor(Math.random() * Math.pow(baseTen, extraDigits));
+ // 16 digits
+ return datePart + extraPart;
+ }
// tslint:disable-next-line:async-suffix
public abstract async handleRequest(
payload: JSONRPCRequestPayload,
diff --git a/packages/subproviders/src/utils/subprovider_utils.ts b/packages/subproviders/src/utils/subprovider_utils.ts
index 24ebedd06..beda408ab 100644
--- a/packages/subproviders/src/utils/subprovider_utils.ts
+++ b/packages/subproviders/src/utils/subprovider_utils.ts
@@ -1,4 +1,4 @@
-import ProviderEngine = require('web3-provider-engine');
+import Web3ProviderEngine = require('web3-provider-engine');
import { Subprovider } from '../subproviders/subprovider';
@@ -7,7 +7,7 @@ import { Subprovider } from '../subproviders/subprovider';
* @param provider Given provider
* @param subprovider Subprovider to prepend
*/
-export function prependSubprovider(provider: ProviderEngine, subprovider: Subprovider): void {
+export function prependSubprovider(provider: Web3ProviderEngine, subprovider: Subprovider): void {
subprovider.setEngine(provider);
// HACK: We use implementation details of provider engine here
// https://github.com/MetaMask/provider-engine/blob/master/index.js#L68
diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts
index 196cecf32..103e8f952 100644
--- a/packages/subproviders/test/integration/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts
@@ -7,10 +7,8 @@ import TransportNodeHid from '@ledgerhq/hw-transport-node-hid';
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
-import { LedgerSubprovider } from '../../src';
+import { LedgerSubprovider, RPCSubprovider, Web3ProviderEngine } from '../../src';
import { LedgerEthereumClient } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
@@ -86,9 +84,7 @@ describe('LedgerSubprovider', () => {
before(() => {
ledgerProvider = new Web3ProviderEngine();
ledgerProvider.addProvider(ledgerSubprovider);
- const httpProvider = new RpcSubprovider({
- rpcUrl: 'http://localhost:8545',
- });
+ const httpProvider = new RPCSubprovider('http://localhost:8545');
ledgerProvider.addProvider(httpProvider);
ledgerProvider.start();
diff --git a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
index f17c21f02..063817a95 100644
--- a/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/eth_lightwallet_subprovider_test.ts
@@ -2,9 +2,8 @@ import * as chai from 'chai';
import * as lightwallet from 'eth-lightwallet';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { EthLightwalletSubprovider } from '../../src';
+import { EthLightwalletSubprovider, Web3ProviderEngine } from '../../src';
import { DoneCallback } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts
index 3b57e125b..edff5144e 100644
--- a/packages/subproviders/test/unit/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts
@@ -2,9 +2,8 @@ import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
import * as _ from 'lodash';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { LedgerSubprovider } from '../../src';
+import { LedgerSubprovider, Web3ProviderEngine } from '../../src';
import {
DoneCallback,
LedgerCommunicationClient,
diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
index 51ba7094c..f2bdda3cd 100644
--- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
@@ -1,9 +1,8 @@
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { GanacheSubprovider, MnemonicWalletSubprovider } from '../../src/';
+import { GanacheSubprovider, MnemonicWalletSubprovider, Web3ProviderEngine } from '../../src/';
import { DoneCallback, WalletSubproviderErrors } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
index fa33cd50a..c437d0815 100644
--- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
+++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
@@ -1,11 +1,10 @@
import * as chai from 'chai';
-import Web3ProviderEngine = require('web3-provider-engine');
import FixtureSubprovider = require('web3-provider-engine/subproviders/fixture');
import { promisify } from '@0xproject/utils';
import EthereumTx = require('ethereumjs-tx');
-import { NonceTrackerSubprovider } from '../../src';
+import { NonceTrackerSubprovider, Web3ProviderEngine } from '../../src';
import { chaiSetup } from '../chai_setup';
const expect = chai.expect;
diff --git a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
index ab321bcff..95773145f 100644
--- a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
@@ -1,9 +1,8 @@
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as ethUtils from 'ethereumjs-util';
-import Web3ProviderEngine = require('web3-provider-engine');
-import { GanacheSubprovider, PrivateKeyWalletSubprovider } from '../../src/';
+import { GanacheSubprovider, PrivateKeyWalletSubprovider, Web3ProviderEngine } from '../../src/';
import { DoneCallback, WalletSubproviderErrors } from '../../src/types';
import { chaiSetup } from '../chai_setup';
import { fixtureData } from '../utils/fixture_data';
diff --git a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
index 810fb8f45..e30d2f74e 100644
--- a/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
+++ b/packages/subproviders/test/unit/redundant_rpc_subprovider_test.ts
@@ -2,10 +2,8 @@ import { DoneCallback } from '@0xproject/types';
import * as chai from 'chai';
import { JSONRPCResponsePayload } from 'ethereum-types';
import * as Sinon from 'sinon';
-import Web3ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
-import { RedundantSubprovider } from '../../src';
+import { RedundantSubprovider, RPCSubprovider, Web3ProviderEngine } from '../../src';
import { Subprovider } from '../../src/subproviders/subprovider';
import { chaiSetup } from '../chai_setup';
import { ganacheSubprovider } from '../utils/ganache_subprovider';
@@ -39,9 +37,7 @@ describe('RedundantSubprovider', () => {
});
it('succeeds when supplied at least one healthy endpoint', (done: DoneCallback) => {
provider = new Web3ProviderEngine();
- const nonExistentSubprovider = new RpcSubprovider({
- rpcUrl: 'http://does-not-exist:3000',
- });
+ const nonExistentSubprovider = new RPCSubprovider('http://does-not-exist:3000');
const handleRequestStub = Sinon.stub(nonExistentSubprovider, 'handleRequest').throws(
new Error('REQUEST_FAILED'),
);
diff --git a/packages/testnet-faucets/package.json b/packages/testnet-faucets/package.json
index 72ab8f61b..442f488c9 100644
--- a/packages/testnet-faucets/package.json
+++ b/packages/testnet-faucets/package.json
@@ -18,7 +18,7 @@
"author": "Fabio Berger",
"license": "Apache-2.0",
"dependencies": {
- "0x.js": "^0.38.0",
+ "0x.js": "0.38.4",
"@0xproject/subproviders": "^0.10.5",
"@0xproject/web3-wrapper": "^0.7.2",
"@0xproject/typescript-typings": "^0.4.2",
@@ -28,8 +28,7 @@
"ethereumjs-util": "^5.1.1",
"express": "^4.15.2",
"lodash": "^4.17.4",
- "rollbar": "^0.6.5",
- "web3-provider-engine": "14.0.6"
+ "rollbar": "^0.6.5"
},
"devDependencies": {
"@0xproject/tslint-config": "^0.4.21",
diff --git a/packages/testnet-faucets/src/ts/handler.ts b/packages/testnet-faucets/src/ts/handler.ts
index 6d26691d6..0f61159fa 100644
--- a/packages/testnet-faucets/src/ts/handler.ts
+++ b/packages/testnet-faucets/src/ts/handler.ts
@@ -5,9 +5,12 @@ import { Provider } from 'ethereum-types';
import * as express from 'express';
import * as _ from 'lodash';
-import { NonceTrackerSubprovider, PrivateKeyWalletSubprovider } from '@0xproject/subproviders';
-import ProviderEngine = require('web3-provider-engine');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
+import {
+ NonceTrackerSubprovider,
+ PrivateKeyWalletSubprovider,
+ RPCSubprovider,
+ Web3ProviderEngine,
+} from '@0xproject/subproviders';
import { configs } from './configs';
import { constants } from './constants';
@@ -39,14 +42,10 @@ export class Handler {
if (_.isUndefined(configs.DISPENSER_PRIVATE_KEY)) {
throw new Error('Dispenser Private key not found');
}
- const engine = new ProviderEngine();
+ const engine = new Web3ProviderEngine();
engine.addProvider(new NonceTrackerSubprovider());
engine.addProvider(new PrivateKeyWalletSubprovider(configs.DISPENSER_PRIVATE_KEY));
- engine.addProvider(
- new RpcSubprovider({
- rpcUrl,
- }),
- );
+ engine.addProvider(new RPCSubprovider(rpcUrl));
engine.start();
return engine;
}
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 03fa2fe8a..72e2a726b 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -221,3 +221,11 @@ export enum RevertReason {
ValueGreaterThanZero = 'VALUE_GREATER_THAN_ZERO',
InvalidMsgValue = 'INVALID_MSG_VALUE',
}
+
+export enum StatusCodes {
+ Success = 200,
+ NotFound = 404,
+ InternalError = 500,
+ MethodNotAllowed = 405,
+ GatewayTimeout = 504,
+}
diff --git a/packages/typescript-typings/types/detect-node/index.d.ts b/packages/typescript-typings/types/detect-node/index.d.ts
new file mode 100644
index 000000000..4c58b8450
--- /dev/null
+++ b/packages/typescript-typings/types/detect-node/index.d.ts
@@ -0,0 +1,3 @@
+declare module 'detect-node' {
+ export const isNode: boolean;
+}
diff --git a/packages/typescript-typings/types/json-rpc-error/index.d.ts b/packages/typescript-typings/types/json-rpc-error/index.d.ts
new file mode 100644
index 000000000..dfaf92167
--- /dev/null
+++ b/packages/typescript-typings/types/json-rpc-error/index.d.ts
@@ -0,0 +1,8 @@
+declare module 'json-rpc-error' {
+ export class InternalError extends Error {
+ constructor(err: Error | string);
+ }
+ export class MethodNotFound extends Error {
+ constructor();
+ }
+}
diff --git a/packages/utils/package.json b/packages/utils/package.json
index 9168a3538..a454b35ee 100644
--- a/packages/utils/package.json
+++ b/packages/utils/package.json
@@ -35,14 +35,15 @@
"typescript": "2.7.1"
},
"dependencies": {
- "ethereum-types": "^0.0.2",
+ "@0xproject/types": "^1.0.0",
"@0xproject/typescript-typings": "^0.4.2",
"@types/node": "^8.0.53",
- "ethereumjs-util": "^5.1.1",
"bignumber.js": "~4.1.0",
+ "detect-node": "2.0.3",
"ethereum-types": "^0.0.2",
"ethereumjs-util": "^5.1.1",
"ethers": "3.0.22",
+ "isomorphic-fetch": "^2.2.1",
"js-sha3": "^0.7.0",
"lodash": "^4.17.4"
},
diff --git a/packages/utils/src/fetchAsync.ts b/packages/utils/src/fetchAsync.ts
new file mode 100644
index 000000000..c02e5baba
--- /dev/null
+++ b/packages/utils/src/fetchAsync.ts
@@ -0,0 +1,37 @@
+import isNode = require('detect-node');
+import 'isomorphic-fetch';
+
+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/index.ts b/packages/utils/src/index.ts
index fd102cecb..b8e0b1775 100644
--- a/packages/utils/src/index.ts
+++ b/packages/utils/src/index.ts
@@ -8,3 +8,4 @@ export { logUtils } from './log_utils';
export { abiUtils } from './abi_utils';
export { NULL_BYTES } from './constants';
export { errorUtils } from './error_utils';
+export { fetchAsync } from './fetchAsync';
diff --git a/packages/website/package.json b/packages/website/package.json
index 3e48a3a26..39743cb44 100644
--- a/packages/website/package.json
+++ b/packages/website/package.json
@@ -59,7 +59,6 @@
"thenby": "^1.2.3",
"truffle-contract": "2.0.1",
"web3-provider-engine": "14.0.6",
- "whatwg-fetch": "^2.0.3",
"xml-js": "^1.6.4"
},
"devDependencies": {
diff --git a/packages/website/ts/blockchain.ts b/packages/website/ts/blockchain.ts
index 954595cef..93534e143 100644
--- a/packages/website/ts/blockchain.ts
+++ b/packages/website/ts/blockchain.ts
@@ -15,8 +15,9 @@ import {
ledgerEthereumBrowserClientFactoryAsync,
LedgerSubprovider,
RedundantSubprovider,
+ RPCSubprovider,
SignerSubprovider,
- Subprovider,
+ Web3ProviderEngine,
} from '@0xproject/subproviders';
import {
BlockParam,
@@ -60,9 +61,7 @@ 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';
-import ProviderEngine = require('web3-provider-engine');
import FilterSubprovider = require('web3-provider-engine/subproviders/filters');
-import RpcSubprovider = require('web3-provider-engine/subproviders/rpc');
import * as MintableArtifacts from '../contracts/Mintable.json';
@@ -148,7 +147,7 @@ export class Blockchain {
if (!isU2FSupported) {
throw new Error('Cannot update providerType to LEDGER without U2F support');
}
- const provider = new ProviderEngine();
+ const provider = new Web3ProviderEngine();
const ledgerWalletConfigs = {
networkId: networkIdIfExists,
ledgerEthereumClientFactoryAsync: ledgerEthereumBrowserClientFactoryAsync,
@@ -157,25 +156,21 @@ export class Blockchain {
provider.addProvider(ledgerSubprovider);
provider.addProvider(new FilterSubprovider());
const rpcSubproviders = _.map(configs.PUBLIC_NODE_URLS_BY_NETWORK_ID[networkIdIfExists], publicNodeUrl => {
- return new RpcSubprovider({
- rpcUrl: publicNodeUrl,
- });
+ return new RPCSubprovider(publicNodeUrl);
});
- provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[]));
+ provider.addProvider(new RedundantSubprovider(rpcSubproviders));
provider.start();
return [provider, ledgerSubprovider];
} else if (doesInjectedWeb3Exist && 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 ProviderEngine();
+ const provider = new Web3ProviderEngine();
provider.addProvider(new SignerSubprovider(injectedWeb3.currentProvider));
provider.addProvider(new FilterSubprovider());
const rpcSubproviders = _.map(publicNodeUrlsIfExistsForNetworkId, publicNodeUrl => {
- return new RpcSubprovider({
- rpcUrl: publicNodeUrl,
- });
+ return new RPCSubprovider(publicNodeUrl);
});
- provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[]));
+ provider.addProvider(new RedundantSubprovider(rpcSubproviders));
provider.start();
return [provider, undefined];
} else if (doesInjectedWeb3Exist) {
@@ -185,15 +180,13 @@ export class Blockchain {
// 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 ProviderEngine();
+ 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({
- rpcUrl: publicNodeUrl,
- });
+ return new RPCSubprovider(publicNodeUrl);
});
- provider.addProvider(new RedundantSubprovider(rpcSubproviders as Subprovider[]));
+ provider.addProvider(new RedundantSubprovider(rpcSubproviders));
provider.start();
return [provider, undefined];
}
diff --git a/packages/website/ts/components/legacy_portal/legacy_portal.tsx b/packages/website/ts/components/legacy_portal/legacy_portal.tsx
deleted file mode 100644
index c85d97207..000000000
--- a/packages/website/ts/components/legacy_portal/legacy_portal.tsx
+++ /dev/null
@@ -1,339 +0,0 @@
-import { colors } from '@0xproject/react-shared';
-import { BigNumber } from '@0xproject/utils';
-import * as _ from 'lodash';
-import CircularProgress from 'material-ui/CircularProgress';
-import Paper from 'material-ui/Paper';
-import * as React from 'react';
-import * as DocumentTitle from 'react-document-title';
-import { Route, 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 { WrappedEthSectionNoticeDialog } from 'ts/components/dialogs/wrapped_eth_section_notice_dialog';
-import { EthWrappers } from 'ts/components/eth_wrappers';
-import { FillOrder } from 'ts/components/fill_order';
-import { Footer } from 'ts/components/footer';
-import { LegacyPortalMenu } from 'ts/components/legacy_portal/legacy_portal_menu';
-import { TokenBalances } from 'ts/components/token_balances';
-import { TopBar } from 'ts/components/top_bar/top_bar';
-import { TradeHistory } from 'ts/components/trade_history/trade_history';
-import { FlashMessage } from 'ts/components/ui/flash_message';
-import { GenerateOrderForm } from 'ts/containers/generate_order_form';
-import { localStorage } from 'ts/local_storage/local_storage';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { BlockchainErrs, HashData, Order, ProviderType, ScreenWidths, TokenByAddress, WebsitePaths } from 'ts/types';
-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';
-
-const THROTTLE_TIMEOUT = 100;
-
-export interface LegacyPortalProps {
- 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: Order;
- location: Location;
- flashMessage?: string | React.ReactNode;
- lastForceTokenStateRefetch: number;
- translate: Translate;
-}
-
-interface LegacyPortalState {
- prevNetworkId: number;
- prevNodeVersion: string;
- prevUserAddress: string;
- prevPathname: string;
- isDisclaimerDialogOpen: boolean;
- isWethNoticeDialogOpen: boolean;
- isLedgerDialogOpen: boolean;
-}
-
-export class LegacyPortal extends React.Component<LegacyPortalProps, LegacyPortalState> {
- private _blockchain: Blockchain;
- private _sharedOrderIfExists: Order;
- private _throttledScreenWidthUpdate: () => void;
- public static hasAlreadyDismissedWethNotice(): boolean {
- const didDismissWethNotice = localStorage.getItemIfExists(constants.LOCAL_STORAGE_KEY_DISMISS_WETH_NOTICE);
- const hasAlreadyDismissedWethNotice = !_.isUndefined(didDismissWethNotice) && !_.isEmpty(didDismissWethNotice);
- return hasAlreadyDismissedWethNotice;
- }
- constructor(props: LegacyPortalProps) {
- super(props);
- this._sharedOrderIfExists = orderParser.parse(window.location.search);
- this._throttledScreenWidthUpdate = _.throttle(this._updateScreenWidth.bind(this), THROTTLE_TIMEOUT);
-
- const isViewingBalances = _.includes(props.location.pathname, `${WebsitePaths.Portal}/balances`);
- const hasAlreadyDismissedWethNotice = LegacyPortal.hasAlreadyDismissedWethNotice();
-
- const didAcceptPortalDisclaimer = localStorage.getItemIfExists(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER);
- const hasAcceptedDisclaimer =
- !_.isUndefined(didAcceptPortalDisclaimer) && !_.isEmpty(didAcceptPortalDisclaimer);
- this.state = {
- prevNetworkId: this.props.networkId,
- prevNodeVersion: this.props.nodeVersion,
- prevUserAddress: this.props.userAddress,
- prevPathname: this.props.location.pathname,
- isDisclaimerDialogOpen: !hasAcceptedDisclaimer,
- isWethNoticeDialogOpen: !hasAlreadyDismissedWethNotice && isViewingBalances,
- isLedgerDialogOpen: false,
- };
- }
- 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, changes user accounts, etc...)
- this.props.dispatcher.resetState();
- }
- public componentWillReceiveProps(nextProps: LegacyPortalProps): 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) {
- const isViewingBalances = _.includes(nextProps.location.pathname, `${WebsitePaths.Portal}/balances`);
- const hasAlreadyDismissedWethNotice = LegacyPortal.hasAlreadyDismissedWethNotice();
- this.setState({
- prevPathname: nextProps.location.pathname,
- isWethNoticeDialogOpen: !hasAlreadyDismissedWethNotice && isViewingBalances,
- });
- }
- }
- public render(): React.ReactNode {
- const updateShouldBlockchainErrDialogBeOpen = this.props.dispatcher.updateShouldBlockchainErrDialogBeOpen.bind(
- this.props.dispatcher,
- );
- const portalStyle: React.CSSProperties = {
- minHeight: '100vh',
- display: 'flex',
- flexDirection: 'column',
- justifyContent: 'space-between',
- };
- const portalMenuContainerStyle: React.CSSProperties = {
- overflow: 'hidden',
- backgroundColor: colors.darkestGrey,
- color: colors.white,
- };
- return (
- <div style={portalStyle}>
- <DocumentTitle title="0x Portal DApp" />
- <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}
- />
- <div id="portal" className="mx-auto max-width-4" style={{ width: '100%' }}>
- <Paper className="mb3 mt2">
- <div className="mx-auto flex">
- <div className="col col-2 pr2 pt1 sm-hide xs-hide" style={portalMenuContainerStyle}>
- <LegacyPortalMenu menuItemStyle={{ color: colors.white }} />
- </div>
- <div className="col col-12 lg-col-10 md-col-10 sm-col sm-col-12">
- <div className="py2" style={{ backgroundColor: colors.grey50 }}>
- {this.props.blockchainIsLoaded ? (
- <Switch>
- <Route
- path={`${WebsitePaths.Portal}/weth`}
- render={this._renderEthWrapper.bind(this)}
- />
- <Route
- path={`${WebsitePaths.Portal}/fill`}
- render={this._renderFillOrder.bind(this)}
- />
- <Route
- path={`${WebsitePaths.Portal}/balances`}
- render={this._renderTokenBalances.bind(this)}
- />
- <Route
- path={`${WebsitePaths.Portal}/trades`}
- render={this._renderTradeHistory.bind(this)}
- />
- <Route
- path={`${WebsitePaths.Home}`}
- render={this._renderGenerateOrderForm.bind(this)}
- />
- </Switch>
- ) : (
- <div className="pt4 sm-px2 sm-pt2 sm-m1" style={{ height: 500 }}>
- <div
- className="relative sm-px2 sm-pt2 sm-m1"
- style={{ height: 122, top: '50%', transform: 'translateY(-50%)' }}
- >
- <div className="center pb2">
- <CircularProgress size={40} thickness={5} />
- </div>
- <div className="center pt2" style={{ paddingBottom: 11 }}>
- Loading Portal...
- </div>
- </div>
- </div>
- )}
- </div>
- </div>
- </div>
- </Paper>
- <BlockchainErrDialog
- blockchain={this._blockchain}
- blockchainErr={this.props.blockchainErr}
- isOpen={this.props.shouldBlockchainErrDialogBeOpen}
- userAddress={this.props.userAddress}
- toggleDialogFn={updateShouldBlockchainErrDialogBeOpen}
- networkId={this.props.networkId}
- />
- <WrappedEthSectionNoticeDialog
- isOpen={this.state.isWethNoticeDialogOpen}
- onToggleDialog={this._onWethNoticeAccepted.bind(this)}
- />
- <PortalDisclaimerDialog
- isOpen={this.state.isDisclaimerDialogOpen}
- onToggleDialog={this._onPortalDisclaimerAccepted.bind(this)}
- />
- <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}
- />
- </div>
- <Footer translate={this.props.translate} dispatcher={this.props.dispatcher} />
- </div>
- );
- }
- public onToggleLedgerDialog(): void {
- this.setState({
- isLedgerDialogOpen: !this.state.isLedgerDialogOpen,
- });
- }
- 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}
- />
- );
- }
- private _renderTradeHistory(): React.ReactNode {
- return (
- <TradeHistory
- tokenByAddress={this.props.tokenByAddress}
- userAddress={this.props.userAddress}
- networkId={this.props.networkId}
- />
- );
- }
- private _renderTokenBalances(): React.ReactNode {
- const trackedTokens = utils.getTrackedTokens(this.props.tokenByAddress);
- 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={trackedTokens}
- userAddress={this.props.userAddress}
- userEtherBalanceInWei={this.props.userEtherBalanceInWei}
- networkId={this.props.networkId}
- lastForceTokenStateRefetch={this.props.lastForceTokenStateRefetch}
- />
- );
- }
- private _renderFillOrder(_match: any, _location: Location, _history: History): 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}
- />
- );
- }
- private _renderGenerateOrderForm(_match: any, _location: Location, _history: History): React.ReactNode {
- return (
- <GenerateOrderForm
- blockchain={this._blockchain}
- hashData={this.props.hashData}
- dispatcher={this.props.dispatcher}
- />
- );
- }
- private _onPortalDisclaimerAccepted(): void {
- localStorage.setItem(constants.LOCAL_STORAGE_KEY_ACCEPT_DISCLAIMER, 'set');
- this.setState({
- isDisclaimerDialogOpen: false,
- });
- }
- private _onWethNoticeAccepted(): void {
- localStorage.setItem(constants.LOCAL_STORAGE_KEY_DISMISS_WETH_NOTICE, 'set');
- this.setState({
- isWethNoticeDialogOpen: false,
- });
- }
- private _updateScreenWidth(): void {
- const newScreenWidth = utils.getScreenWidth();
- this.props.dispatcher.updateScreenWidth(newScreenWidth);
- }
-}
diff --git a/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx b/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx
deleted file mode 100644
index 1dd164f8b..000000000
--- a/packages/website/ts/components/legacy_portal/legacy_portal_menu.tsx
+++ /dev/null
@@ -1,73 +0,0 @@
-import * as _ from 'lodash';
-import * as React from 'react';
-import { MenuItem } from 'ts/components/ui/menu_item';
-import { WebsitePaths } from 'ts/types';
-
-export interface LegacyPortalMenuProps {
- menuItemStyle: React.CSSProperties;
- onClick?: () => void;
-}
-
-interface LegacyPortalMenuState {}
-
-export class LegacyPortalMenu extends React.Component<LegacyPortalMenuProps, LegacyPortalMenuState> {
- public static defaultProps: Partial<LegacyPortalMenuProps> = {
- onClick: _.noop,
- };
- public render(): React.ReactNode {
- return (
- <div>
- <MenuItem
- style={this.props.menuItemStyle}
- className="py2"
- to={`${WebsitePaths.Portal}`}
- onClick={this.props.onClick.bind(this)}
- >
- {this._renderMenuItemWithIcon('Generate order', 'zmdi-arrow-right-top')}
- </MenuItem>
- <MenuItem
- style={this.props.menuItemStyle}
- className="py2"
- to={`${WebsitePaths.Portal}/fill`}
- onClick={this.props.onClick.bind(this)}
- >
- {this._renderMenuItemWithIcon('Fill order', 'zmdi-arrow-left-bottom')}
- </MenuItem>
- <MenuItem
- style={this.props.menuItemStyle}
- className="py2"
- to={`${WebsitePaths.Portal}/balances`}
- onClick={this.props.onClick.bind(this)}
- >
- {this._renderMenuItemWithIcon('Balances', 'zmdi-balance-wallet')}
- </MenuItem>
- <MenuItem
- style={this.props.menuItemStyle}
- className="py2"
- to={`${WebsitePaths.Portal}/trades`}
- onClick={this.props.onClick.bind(this)}
- >
- {this._renderMenuItemWithIcon('Trade history', 'zmdi-format-list-bulleted')}
- </MenuItem>
- <MenuItem
- style={this.props.menuItemStyle}
- className="py2"
- to={`${WebsitePaths.Portal}/weth`}
- onClick={this.props.onClick.bind(this)}
- >
- {this._renderMenuItemWithIcon('Wrap ETH', 'zmdi-circle-o')}
- </MenuItem>
- </div>
- );
- }
- private _renderMenuItemWithIcon(title: string, iconName: string): React.ReactNode {
- return (
- <div className="flex" style={{ fontWeight: 100 }}>
- <div className="pr1 pl2">
- <i style={{ fontSize: 20 }} className={`zmdi ${iconName}`} />
- </div>
- <div className="pl1">{title}</div>
- </div>
- );
- }
-}
diff --git a/packages/website/ts/components/order_json.tsx b/packages/website/ts/components/order_json.tsx
index 35188c024..7a732de6a 100644
--- a/packages/website/ts/components/order_json.tsx
+++ b/packages/website/ts/components/order_json.tsx
@@ -1,5 +1,5 @@
import { ECSignature } from '@0xproject/types';
-import { BigNumber, logUtils } from '@0xproject/utils';
+import { BigNumber, fetchAsync, logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import Paper from 'material-ui/Paper';
import TextField from 'material-ui/TextField';
@@ -148,7 +148,7 @@ You can see and fill it here: ${this.state.shareLink}`);
const bitlyRequestUrl = `${constants.URL_BITLY_API}/v3/shorten?access_token=${
configs.BITLY_ACCESS_TOKEN
}&longUrl=${longUrl}`;
- const response = await fetch(bitlyRequestUrl);
+ const response = await fetchAsync(bitlyRequestUrl);
const responseBody = await response.text();
const bodyObj = JSON.parse(responseBody);
if (response.status !== 200 || bodyObj.status_code !== 200) {
diff --git a/packages/website/ts/components/token_balances.tsx b/packages/website/ts/components/token_balances.tsx
index 3fae83c00..1f2dfccb0 100644
--- a/packages/website/ts/components/token_balances.tsx
+++ b/packages/website/ts/components/token_balances.tsx
@@ -5,7 +5,7 @@ import {
Styles,
utils as sharedUtils,
} from '@0xproject/react-shared';
-import { BigNumber, errorUtils, logUtils } from '@0xproject/utils';
+import { BigNumber, errorUtils, fetchAsync, logUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash';
import Dialog from 'material-ui/Dialog';
@@ -548,7 +548,7 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
await utils.sleepAsync(ARTIFICIAL_FAUCET_REQUEST_DELAY);
const segment = isEtherRequest ? 'ether' : 'zrx';
- const response = await fetch(
+ const response = await fetchAsync(
`${constants.URL_TESTNET_FAUCET}/${segment}/${this.props.userAddress}?networkId=${this.props.networkId}`,
);
const responseBody = await response.text();
diff --git a/packages/website/ts/components/top_bar/top_bar.tsx b/packages/website/ts/components/top_bar/top_bar.tsx
index 960e5a824..63ea3475a 100644
--- a/packages/website/ts/components/top_bar/top_bar.tsx
+++ b/packages/website/ts/components/top_bar/top_bar.tsx
@@ -7,7 +7,6 @@ import MenuItem from 'material-ui/MenuItem';
import * as React from 'react';
import { Link } from 'react-router-dom';
import { Blockchain } from 'ts/blockchain';
-import { LegacyPortalMenu } from 'ts/components/legacy_portal/legacy_portal_menu';
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';
@@ -17,7 +16,6 @@ import { Dispatcher } from 'ts/redux/dispatcher';
import { Deco, Key, ProviderType, WebsiteLegacyPaths, WebsitePaths } from 'ts/types';
import { constants } from 'ts/utils/constants';
import { Translate } from 'ts/utils/translate';
-import { utils } from 'ts/utils/utils';
export enum TopBarDisplayType {
Default,
@@ -213,8 +211,6 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div>
);
const popoverContent = <Menu style={{ color: colors.darkGrey }}>{developerSectionMenuItems}</Menu>;
- // TODO : Remove this once we ship portal v2
- const shouldShowPortalV2Drawer = this._isViewingPortal() && utils.shouldShowPortalV2();
return (
<div
style={{ ...styles.topBar, ...bottomBorderStyle, ...this.props.style, ...{ height } }}
@@ -294,11 +290,11 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div>
</div>
</Container>
- {shouldShowPortalV2Drawer ? this._renderPortalV2Drawer() : this._renderDrawer()}
+ {this._isViewingPortal() ? this._renderPortalDrawer() : this._renderDrawer()}
</div>
);
}
- private _renderPortalV2Drawer(): React.ReactNode {
+ private _renderPortalDrawer(): React.ReactNode {
return (
<Drawer
open={this.state.isDrawerOpen}
@@ -326,7 +322,6 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
onRequestChange={this._onMenuButtonClick.bind(this)}
>
<div className="clearfix">
- {this._renderPortalMenu()}
{this._renderDocsMenu()}
{this._renderWiki()}
<div className="pl1 py1 mt3" style={{ backgroundColor: colors.lightGrey }}>
@@ -478,20 +473,6 @@ export class TopBar extends React.Component<TopBarProps, TopBarState> {
</div>
);
}
- private _renderPortalMenu(): React.ReactNode {
- if (!this._isViewingPortal()) {
- return undefined;
- }
-
- return (
- <div className="lg-hide md-hide">
- <div className="pl1 py1" style={{ backgroundColor: colors.lightGrey }}>
- {this.props.translate.get(Key.PortalDApp, Deco.CapWords)}
- </div>
- <LegacyPortalMenu menuItemStyle={{ color: 'black' }} onClick={this._onMenuButtonClick.bind(this)} />
- </div>
- );
- }
private _onMenuButtonClick(): void {
this.setState({
isDrawerOpen: !this.state.isDrawerOpen,
diff --git a/packages/website/ts/containers/legacy_portal.ts b/packages/website/ts/containers/legacy_portal.ts
deleted file mode 100644
index e99f47fb7..000000000
--- a/packages/website/ts/containers/legacy_portal.ts
+++ /dev/null
@@ -1,92 +0,0 @@
-import { BigNumber } from '@0xproject/utils';
-import * as _ from 'lodash';
-import * as React from 'react';
-import { connect } from 'react-redux';
-import { Dispatch } from 'redux';
-import {
- LegacyPortal as LegacyPortalComponent,
- LegacyPortalProps as LegacyPortalComponentProps,
-} from 'ts/components/legacy_portal/legacy_portal';
-import { Dispatcher } from 'ts/redux/dispatcher';
-import { State } from 'ts/redux/reducer';
-import { BlockchainErrs, HashData, Order, 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: Order;
- flashMessage?: string | React.ReactNode;
- translate: Translate;
-}
-
-interface ConnectedDispatch {
- dispatcher: Dispatcher;
-}
-
-const mapStateToProps = (state: State, _ownProps: LegacyPortalComponentProps): 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,
- };
-};
-
-const mapDispatchToProps = (dispatch: Dispatch<State>): ConnectedDispatch => ({
- dispatcher: new Dispatcher(dispatch),
-});
-
-export const LegacyPortal: React.ComponentClass<LegacyPortalComponentProps> = connect(
- mapStateToProps,
- mapDispatchToProps,
-)(LegacyPortalComponent);
diff --git a/packages/website/ts/index.tsx b/packages/website/ts/index.tsx
index 4838df6b4..2a5c5e4f1 100644
--- a/packages/website/ts/index.tsx
+++ b/packages/website/ts/index.tsx
@@ -19,7 +19,6 @@ import { WebsiteLegacyPaths, WebsitePaths } from 'ts/types';
import { muiTheme } from 'ts/utils/mui_theme';
import { utils } from 'ts/utils/utils';
// Polyfills
-import 'whatwg-fetch';
injectTapEventPlugin();
// Check if we've introduced an update that requires us to clear the tradeHistory local storage entries
@@ -34,14 +33,9 @@ import 'less/all.less';
// At the same time webpack statically parses for System.import() to determine bundle chunk split points
// so each lazy import needs it's own `System.import()` declaration.
-// TODO: Remove this once we ship V2
-const LazyPortal = utils.shouldShowPortalV2()
- ? createLazyComponent('Portal', async () =>
- System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
- )
- : createLazyComponent('LegacyPortal', async () =>
- System.import<any>(/* webpackChunkName: "legacyPortal" */ 'ts/containers/legacy_portal'),
- );
+const LazyPortal = createLazyComponent('Portal', async () =>
+ System.import<any>(/* webpackChunkName: "portal" */ 'ts/containers/portal'),
+);
const LazyZeroExJSDocumentation = createLazyComponent('Documentation', async () =>
System.import<any>(/* webpackChunkName: "zeroExDocs" */ 'ts/containers/zero_ex_js_documentation'),
);
diff --git a/packages/website/ts/utils/doc_utils.ts b/packages/website/ts/utils/doc_utils.ts
index 7768835fb..1627b9b0c 100644
--- a/packages/website/ts/utils/doc_utils.ts
+++ b/packages/website/ts/utils/doc_utils.ts
@@ -1,5 +1,5 @@
import { DoxityDocObj, TypeDocNode } from '@0xproject/react-docs';
-import { logUtils } from '@0xproject/utils';
+import { fetchAsync, logUtils } from '@0xproject/utils';
import findVersions = require('find-versions');
import * as _ from 'lodash';
import { S3FileObject, VersionToFilePath } from 'ts/types';
@@ -16,7 +16,7 @@ export const docUtils = {
return versionToFilePath;
},
async getVersionFileNamesAsync(s3DocJsonRoot: string, folderName: string): Promise<string[]> {
- const response = await fetch(s3DocJsonRoot);
+ 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();
@@ -73,7 +73,7 @@ export const docUtils = {
},
async getJSONDocFileAsync(filePath: string, s3DocJsonRoot: string): Promise<TypeDocNode | DoxityDocObj> {
const endpoint = `${s3DocJsonRoot}/${filePath}`;
- const response = await fetch(endpoint);
+ 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();
diff --git a/packages/website/ts/utils/fetch_utils.ts b/packages/website/ts/utils/fetch_utils.ts
index 513f7e479..f159e3180 100644
--- a/packages/website/ts/utils/fetch_utils.ts
+++ b/packages/website/ts/utils/fetch_utils.ts
@@ -1,4 +1,4 @@
-import { logUtils } from '@0xproject/utils';
+import { fetchAsync, logUtils } from '@0xproject/utils';
import * as _ from 'lodash';
import * as queryString from 'query-string';
@@ -19,14 +19,14 @@ 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 fetch(url);
+ 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 fetch(url, {
+ const response = await fetchAsync(url, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts
index 9c5e12ec7..f18459598 100644
--- a/packages/website/ts/utils/utils.ts
+++ b/packages/website/ts/utils/utils.ts
@@ -357,11 +357,6 @@ export const utils = {
return providerType === ProviderType.Injected && injectedProviderName !== constants.PROVIDER_NAME_PUBLIC;
},
isDogfood,
- shouldShowPortalV2(): boolean {
- // return this.isDevelopment() || this.isStaging() || this.isDogfood();
- // TODO: Remove this method entirely after launch.
- return true;
- },
shouldShowJobsPage(): boolean {
return this.isDevelopment() || this.isStaging() || this.isDogfood();
},
diff --git a/yarn.lock b/yarn.lock
index 8582b3897..b854f3398 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -2,6 +2,23 @@
# yarn lockfile v1
+"0x.js@0.38.4":
+ version "0.38.4"
+ resolved "https://registry.yarnpkg.com/0x.js/-/0x.js-0.38.4.tgz#735c12d3b8d68945caab87990e6cdd24bf5bc070"
+ dependencies:
+ "@0xproject/assert" "^0.2.12"
+ "@0xproject/base-contract" "^0.3.4"
+ "@0xproject/contract-wrappers" "^0.0.5"
+ "@0xproject/order-utils" "^0.0.7"
+ "@0xproject/order-watcher" "^0.0.6"
+ "@0xproject/sol-compiler" "^0.5.2"
+ "@0xproject/types" "^0.8.1"
+ "@0xproject/typescript-typings" "^0.4.1"
+ "@0xproject/utils" "^0.7.1"
+ "@0xproject/web3-wrapper" "^0.7.1"
+ ethers "3.0.22"
+ lodash "4.17.10"
+
"8fold-marked@0.3.9":
version "0.3.9"
resolved "https://registry.yarnpkg.com/8fold-marked/-/8fold-marked-0.3.9.tgz#bb89c645612f8ccfaffac1ca6e3c11f168c9cf59"
@@ -122,6 +139,24 @@
ethereumjs-util "5.1.5"
lodash "4.17.10"
+"@0xproject/order-watcher@^0.0.6":
+ version "0.0.6"
+ resolved "https://registry.yarnpkg.com/@0xproject/order-watcher/-/order-watcher-0.0.6.tgz#85a8fb21e5755bb555f427b12d64d10b89b332e6"
+ dependencies:
+ "@0xproject/assert" "^0.2.12"
+ "@0xproject/base-contract" "^0.3.4"
+ "@0xproject/contract-wrappers" "^0.0.5"
+ "@0xproject/fill-scenarios" "^0.0.4"
+ "@0xproject/json-schemas" "^0.8.1"
+ "@0xproject/order-utils" "^0.0.7"
+ "@0xproject/types" "^0.8.1"
+ "@0xproject/typescript-typings" "^0.4.1"
+ "@0xproject/utils" "^0.7.1"
+ "@0xproject/web3-wrapper" "^0.7.1"
+ bintrees "1.0.2"
+ ethers "3.0.22"
+ lodash "4.17.10"
+
"@0xproject/types@^0.5.0":
version "0.5.0"
resolved "https://registry.yarnpkg.com/@0xproject/types/-/types-0.5.0.tgz#ba3cfbc11a8c6344b57c9680aa7df2ea84b9bf05"
@@ -534,10 +569,18 @@
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.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@types/solidity-parser-antlr/-/solidity-parser-antlr-0.2.1.tgz#29ff386773a72a06c8a9c40c666d2a1cea53c2ed"
+"@types/tmp@^0.0.33":
+ version "0.0.33"
+ resolved "https://registry.yarnpkg.com/@types/tmp/-/tmp-0.0.33.tgz#1073c4bc824754ae3d10cfab88ab0237ba964e4d"
+
"@types/uuid@^3.4.2":
version "3.4.3"
resolved "https://registry.yarnpkg.com/@types/uuid/-/uuid-3.4.3.tgz#121ace265f5569ce40f4f6d0ff78a338c732a754"
@@ -548,10 +591,11 @@
version "1.0.2"
resolved "https://registry.yarnpkg.com/@types/valid-url/-/valid-url-1.0.2.tgz#60fa435ce24bfd5ba107b8d2a80796aeaf3a8f45"
-"@types/websocket@^0.0.34":
- version "0.0.34"
- resolved "https://registry.yarnpkg.com/@types/websocket/-/websocket-0.0.34.tgz#25596764cec885eda070fdb6d19cd76fe582747c"
+"@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":
@@ -1825,7 +1869,7 @@ 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:
+bintrees@1.0.2, bintrees@^1.0.2:
version "1.0.2"
resolved "https://registry.yarnpkg.com/bintrees/-/bintrees-1.0.2.tgz#49f896d6e858a4a499df85c38fb399b9aff840f8"
@@ -2024,6 +2068,10 @@ browser-stdout@1.3.0:
version "1.3.0"
resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.0.tgz#f351d32969d32fa5d7a5567154263d928ae3bd1f"
+browser-stdout@1.3.1:
+ version "1.3.1"
+ resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60"
+
browserify-aes@^1.0.0, browserify-aes@^1.0.4, browserify-aes@^1.0.6:
version "1.2.0"
resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48"
@@ -2730,7 +2778,7 @@ commander@2.13.0, commander@~2.13.0:
version "2.13.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
-commander@^2.12.1, commander@^2.8.1, commander@^2.9.0:
+commander@2.15.1, commander@^2.12.1, commander@^2.8.1, commander@^2.9.0:
version "2.15.1"
resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f"
@@ -3683,7 +3731,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-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"
@@ -3691,7 +3739,7 @@ diff@3.3.1:
version "3.3.1"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.3.1.tgz#aa8567a6eed03c531fc89d3f711cd0e5259dec75"
-diff@^3.1.0, diff@^3.2.0, diff@^3.3.1, diff@^3.5.0:
+diff@3.5.0, diff@^3.1.0, diff@^3.2.0, diff@^3.3.1, diff@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12"
@@ -5629,6 +5677,10 @@ growl@1.10.3:
version "1.10.3"
resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.3.tgz#1926ba90cf3edfe2adb4927f5880bc22c66c790f"
+growl@1.10.5:
+ version "1.10.5"
+ resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e"
+
gud@^1.0.0:
version "1.0.0"
resolved "https://registry.npmjs.org/gud/-/gud-1.0.0.tgz#a489581b17e6a70beca9abe3ae57de7a499852c0"
@@ -6882,7 +6934,7 @@ 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-error@^2.0.0:
+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"
dependencies:
@@ -7947,7 +7999,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1:
version "1.0.1"
resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a"
-"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
+"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4:
version "3.0.4"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083"
dependencies:
@@ -8038,6 +8090,22 @@ mocha@^4.0.1:
mkdirp "0.5.1"
supports-color "4.4.0"
+mocha@^5.2.0:
+ version "5.2.0"
+ resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6"
+ dependencies:
+ browser-stdout "1.3.1"
+ commander "2.15.1"
+ debug "3.1.0"
+ diff "3.5.0"
+ escape-string-regexp "1.0.5"
+ glob "7.1.2"
+ growl "1.10.5"
+ he "1.1.1"
+ minimatch "3.0.4"
+ mkdirp "0.5.1"
+ supports-color "5.4.0"
+
mock-fs@^4.1.0:
version "4.4.2"
resolved "https://registry.yarnpkg.com/mock-fs/-/mock-fs-4.4.2.tgz#09dec5313f97095a450be6aa2ad8ab6738d63d6b"
@@ -8119,7 +8187,7 @@ mz@^2.6.0:
object-assign "^4.0.1"
thenify-all "^1.0.0"
-nan@^2.0.5, nan@^2.0.8, nan@^2.2.1, nan@^2.3.0, nan@^2.3.3, nan@^2.6.2:
+nan@>=2.5.1, nan@^2.0.5, nan@^2.0.8, nan@^2.2.1, nan@^2.3.0, nan@^2.3.3, nan@^2.6.2:
version "2.10.0"
resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f"
@@ -10981,6 +11049,12 @@ 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"
@@ -11596,6 +11670,12 @@ supports-color@4.4.0:
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:
+ version "5.4.0"
+ resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54"
+ dependencies:
+ has-flag "^3.0.0"
+
supports-color@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7"
@@ -11612,12 +11692,6 @@ supports-color@^4.2.1:
dependencies:
has-flag "^2.0.0"
-supports-color@^5.1.0, supports-color@^5.2.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:
- has-flag "^3.0.0"
-
svgo@^0.7.0:
version "0.7.2"
resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5"
@@ -13215,7 +13289,7 @@ websocket@^1.0.24, websocket@^1.0.25:
typedarray-to-buffer "^3.1.2"
yaeti "^0.0.6"
-whatwg-fetch@2.0.3, whatwg-fetch@>=0.10.0, whatwg-fetch@^2.0.3:
+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"