Merge branch 'development' into fix/ether_token_address

This commit is contained in:
Leonid
2018-02-05 12:33:40 +01:00
committed by GitHub
244 changed files with 8273 additions and 8866 deletions

1
.gitattributes vendored Normal file
View File

@@ -0,0 +1 @@
*.sol linguist-language=Solidity

1
CODEOWNERS Normal file
View File

@@ -0,0 +1 @@
* @abandeali1 @BMillman19 @dekz @fabioberger @LogvinovLeon @Remco

View File

@@ -81,6 +81,12 @@ Build all packages
yarn lerna:run build yarn lerna:run build
``` ```
Continuously rebuild on exchange
```bash
yarn dev
```
### Lint ### Lint
Lint all packages Lint all packages

View File

@@ -2,6 +2,11 @@
"lerna": "2.5.1", "lerna": "2.5.1",
"packages": ["packages/*"], "packages": ["packages/*"],
"version": "independent", "version": "independent",
"commands": {
"publish": {
"ignore": ["test/**/*", "*.md", "scripts", "lib", "tslint.json", "tsconfig.json"]
}
},
"npmClient": "yarn", "npmClient": "yarn",
"useWorkspaces": true "useWorkspaces": true
} }

View File

@@ -3,6 +3,7 @@
"name": "0x.js", "name": "0x.js",
"workspaces": ["packages/*"], "workspaces": ["packages/*"],
"scripts": { "scripts": {
"dev": "lerna run --parallel build:watch",
"testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"", "testrpc": "testrpc -p 8545 --networkId 50 -m \"${npm_package_config_mnemonic}\"",
"prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc", "prettier": "prettier --write '**/*.{ts,tsx,json,md}' --config .prettierrc",
"prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc", "prettier:ci": "prettier --list-different '**/*.{ts,tsx,json,md}' --config .prettierrc",

View File

@@ -1,9 +1,14 @@
# CHANGELOG # CHANGELOG
## v0.x.0 - _TBD, 2018_ ## v0.x.0 - _TBD, 2018_
* Add `zeroEx.etherToken.getContractAddressIfExists` (#350) * Add `zeroEx.etherToken.getContractAddressIfExists` (#350)
## v0.31.1 - _February 1, 2018_
* Fix the bug causing order watcher to throw is makerToken === zrx (#357)
## v0.31.0 - _January 30, 2018_ ## v0.31.0 - _January 30, 2018_
* Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the * Add the `shouldAddPersonalMessagePrefix` parameter to `signOrderHashAsync` so that the

View File

@@ -20,6 +20,6 @@ export class {{contractName}}Contract extends BaseContract {
{{/each}} {{/each}}
constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) { constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) {
super(web3ContractInstance, defaults); super(web3ContractInstance, defaults);
classUtils.bindAll(this, ['web3ContractInstance', 'defaults']); classUtils.bindAll(this, ['_web3ContractInstance', '_defaults']);
} }
} // tslint:disable:max-file-line-count } // tslint:disable:max-file-line-count

View File

@@ -5,8 +5,8 @@ public {{this.name}} = {
): Promise<{{> return_type outputs=outputs}}> { ): Promise<{{> return_type outputs=outputs}}> {
const self = this as {{contractName}}Contract; const self = this as {{contractName}}Contract;
const result = await promisify<{{> return_type outputs=outputs}}>( const result = await promisify<{{> return_type outputs=outputs}}>(
self.web3ContractInstance.{{this.name}}.call, self._web3ContractInstance.{{this.name}}.call,
self.web3ContractInstance, self._web3ContractInstance,
)( )(
{{> params inputs=inputs}} {{> params inputs=inputs}}
); );

View File

@@ -9,7 +9,7 @@ public {{this.name}} = {
{{/this.payable}} {{/this.payable}}
): Promise<string> { ): Promise<string> {
const self = this as {{contractName}}Contract; const self = this as {{contractName}}Contract;
const txDataWithDefaults = await self.applyDefaultsToTxDataAsync( const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
txData, txData,
self.{{this.name}}.estimateGasAsync.bind( self.{{this.name}}.estimateGasAsync.bind(
self, self,
@@ -17,7 +17,7 @@ public {{this.name}} = {
), ),
); );
const txHash = await promisify<string>( const txHash = await promisify<string>(
self.web3ContractInstance.{{this.name}}, self.web3ContractInstance, self._web3ContractInstance.{{this.name}}, self._web3ContractInstance,
)( )(
{{> params inputs=inputs}} {{> params inputs=inputs}}
txDataWithDefaults, txDataWithDefaults,
@@ -29,11 +29,11 @@ public {{this.name}} = {
txData: TxData = {}, txData: TxData = {},
): Promise<number> { ): Promise<number> {
const self = this as {{contractName}}Contract; const self = this as {{contractName}}Contract;
const txDataWithDefaults = await self.applyDefaultsToTxDataAsync( const txDataWithDefaults = await self._applyDefaultsToTxDataAsync(
txData, txData,
); );
const gas = await promisify<number>( const gas = await promisify<number>(
self.web3ContractInstance.{{this.name}}.estimateGas, self.web3ContractInstance, self._web3ContractInstance.{{this.name}}.estimateGas, self._web3ContractInstance,
)( )(
{{> params inputs=inputs}} {{> params inputs=inputs}}
txDataWithDefaults, txDataWithDefaults,
@@ -45,7 +45,7 @@ public {{this.name}} = {
txData: TxData = {}, txData: TxData = {},
): string { ): string {
const self = this as {{contractName}}Contract; const self = this as {{contractName}}Contract;
const abiEncodedTransactionData = self.web3ContractInstance.{{this.name}}.getData(); const abiEncodedTransactionData = self._web3ContractInstance.{{this.name}}.getData();
return abiEncodedTransactionData; return abiEncodedTransactionData;
}, },
}; };

View File

@@ -1,6 +1,6 @@
{ {
"name": "0x.js", "name": "0x.js",
"version": "0.31.0", "version": "0.31.1",
"description": "A javascript library for interacting with the 0x protocol", "description": "A javascript library for interacting with the 0x protocol",
"keywords": [ "keywords": [
"0x.js", "0x.js",
@@ -12,11 +12,12 @@
"main": "lib/src/index.js", "main": "lib/src/index.js",
"types": "lib/src/index.d.ts", "types": "lib/src/index.d.ts",
"scripts": { "scripts": {
"build:watch": "tsc -w",
"prebuild": "run-s clean generate_contract_wrappers", "prebuild": "run-s clean generate_contract_wrappers",
"build": "run-p build:umd:prod build:commonjs; exit 0;", "build": "run-p build:umd:prod build:commonjs; exit 0;",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR",
"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", "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",
"generate_contract_wrappers": "node ../abi-gen/lib/index.js --abiGlob 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --templates contract_templates --output src/contract_wrappers/generated", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(Exchange|Token|TokenTransferProxy|EtherToken|TokenRegistry|DummyToken).json' --template contract_templates/contract.handlebars --partials 'contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
"test:circleci": "run-s test:coverage report_test_coverage", "test:circleci": "run-s test:coverage report_test_coverage",
"test": "run-s clean test:commonjs", "test": "run-s clean test:commonjs",
@@ -41,9 +42,9 @@
"node": ">=6.0.0" "node": ">=6.0.0"
}, },
"devDependencies": { "devDependencies": {
"@0xproject/abi-gen": "^0.1.5", "@0xproject/abi-gen": "^0.1.6",
"@0xproject/dev-utils": "^0.0.8", "@0xproject/dev-utils": "^0.0.9",
"@0xproject/tslint-config": "^0.4.5", "@0xproject/tslint-config": "^0.4.6",
"@types/bintrees": "^1.0.2", "@types/bintrees": "^1.0.2",
"@types/jsonschema": "^1.1.1", "@types/jsonschema": "^1.1.1",
"@types/lodash": "^4.14.86", "@types/lodash": "^4.14.86",
@@ -54,7 +55,7 @@
"awesome-typescript-loader": "^3.1.3", "awesome-typescript-loader": "^3.1.3",
"chai": "^4.0.1", "chai": "^4.0.1",
"chai-as-promised": "^7.1.0", "chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.7", "chai-as-promised-typescript-typings": "^0.0.8",
"chai-bignumber": "^2.0.1", "chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.2", "chai-typescript-typings": "^0.0.2",
"copyfiles": "^1.2.0", "copyfiles": "^1.2.0",
@@ -66,30 +67,30 @@
"nyc": "^11.0.1", "nyc": "^11.0.1",
"opn-cli": "^3.1.0", "opn-cli": "^3.1.0",
"request": "^2.81.0", "request": "^2.81.0",
"request-promise-native": "^1.0.4", "request-promise-native": "^1.0.5",
"shx": "^0.2.2", "shx": "^0.2.2",
"sinon": "^4.0.0", "sinon": "^4.0.0",
"source-map-support": "^0.5.0", "source-map-support": "^0.5.0",
"truffle-hdwallet-provider": "^0.0.3", "truffle-hdwallet-provider": "^0.0.3",
"tslint": "5.8.0", "tslint": "5.8.0",
"typedoc": "~0.8.0", "typedoc": "~0.8.0",
"typescript": "~2.6.1", "typescript": "2.7.1",
"web3-provider-engine": "^13.0.1", "web3-provider-engine": "^13.0.1",
"web3-typescript-typings": "^0.9.7", "web3-typescript-typings": "^0.9.8",
"webpack": "^3.1.0" "webpack": "^3.1.0"
}, },
"dependencies": { "dependencies": {
"@0xproject/assert": "^0.0.14", "@0xproject/assert": "^0.0.15",
"@0xproject/json-schemas": "^0.7.6", "@0xproject/json-schemas": "^0.7.7",
"@0xproject/types": "^0.1.7", "@0xproject/types": "^0.1.8",
"@0xproject/utils": "^0.2.3", "@0xproject/utils": "^0.2.4",
"@0xproject/web3-wrapper": "^0.1.8", "@0xproject/web3-wrapper": "^0.1.9",
"bintrees": "^1.0.2", "bintrees": "^1.0.2",
"bn.js": "^4.11.8", "bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4", "ethereumjs-abi": "^0.6.4",
"ethereumjs-blockstream": "^2.0.6", "ethereumjs-blockstream": "^2.0.6",
"ethereumjs-util": "^5.1.1", "ethereumjs-util": "^5.1.1",
"js-sha3": "^0.6.1", "js-sha3": "^0.7.0",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"uuid": "^3.1.0", "uuid": "^3.1.0",
"web3": "^0.20.0" "web3": "^0.20.0"

View File

@@ -1,5 +1,6 @@
import { schemas, SchemaValidator } from '@0xproject/json-schemas'; import { schemas, SchemaValidator } from '@0xproject/json-schemas';
import { BigNumber, intervalUtils } from '@0xproject/utils'; import { TransactionReceiptWithDecodedLogs } from '@0xproject/types';
import { AbiDecoder, BigNumber, intervalUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as ethUtil from 'ethereumjs-util'; import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -12,16 +13,7 @@ import { TokenTransferProxyWrapper } from './contract_wrappers/token_transfer_pr
import { TokenWrapper } from './contract_wrappers/token_wrapper'; import { TokenWrapper } from './contract_wrappers/token_wrapper';
import { OrderStateWatcher } from './order_watcher/order_state_watcher'; import { OrderStateWatcher } from './order_watcher/order_state_watcher';
import { zeroExConfigSchema } from './schemas/zero_ex_config_schema'; import { zeroExConfigSchema } from './schemas/zero_ex_config_schema';
import { import { ECSignature, Order, SignedOrder, Web3Provider, ZeroExConfig, ZeroExError } from './types';
ECSignature,
Order,
SignedOrder,
TransactionReceiptWithDecodedLogs,
Web3Provider,
ZeroExConfig,
ZeroExError,
} from './types';
import { AbiDecoder } from './utils/abi_decoder';
import { assert } from './utils/assert'; import { assert } from './utils/assert';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { decorators } from './utils/decorators'; import { decorators } from './utils/decorators';
@@ -334,8 +326,8 @@ export class ZeroEx {
); );
}, },
); );
const txReceipt = await txReceiptPromise;
return txReceiptPromise; return txReceipt;
} }
/* /*
* HACK: `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from * HACK: `TokenWrapper` needs a token transfer proxy address. `TokenTransferProxy` address is fetched from

View File

@@ -1,4 +1,5 @@
import { intervalUtils } from '@0xproject/utils'; import { LogWithDecodedArgs, RawLog } from '@0xproject/types';
import { AbiDecoder, intervalUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import { Block, BlockAndLogStreamer } from 'ethereumjs-blockstream'; import { Block, BlockAndLogStreamer } from 'ethereumjs-blockstream';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -13,11 +14,8 @@ import {
EventCallback, EventCallback,
IndexedFilterValues, IndexedFilterValues,
InternalZeroExError, InternalZeroExError,
LogWithDecodedArgs,
RawLog,
ZeroExError, ZeroExError,
} from '../types'; } from '../types';
import { AbiDecoder } from '../utils/abi_decoder';
import { constants } from '../utils/constants'; import { constants } from '../utils/constants';
import { filterUtils } from '../utils/filter_utils'; import { filterUtils } from '../utils/filter_utils';
@@ -36,8 +34,8 @@ export class ContractWrapper {
protected _web3Wrapper: Web3Wrapper; protected _web3Wrapper: Web3Wrapper;
protected _networkId: number; protected _networkId: number;
private _abiDecoder?: AbiDecoder; private _abiDecoder?: AbiDecoder;
private _blockAndLogStreamerIfExists: BlockAndLogStreamer | undefined; private _blockAndLogStreamerIfExists?: BlockAndLogStreamer;
private _blockAndLogStreamInterval: NodeJS.Timer; private _blockAndLogStreamIntervalIfExists?: NodeJS.Timer;
private _filters: { [filterToken: string]: Web3.FilterObject }; private _filters: { [filterToken: string]: Web3.FilterObject };
private _filterCallbacks: { private _filterCallbacks: {
[filterToken: string]: EventCallback<ContractEventArgs>; [filterToken: string]: EventCallback<ContractEventArgs>;
@@ -54,7 +52,7 @@ export class ContractWrapper {
this._onLogAddedSubscriptionToken = undefined; this._onLogAddedSubscriptionToken = undefined;
this._onLogRemovedSubscriptionToken = undefined; this._onLogRemovedSubscriptionToken = undefined;
} }
protected unsubscribeAll(): void { protected _unsubscribeAll(): void {
const filterTokens = _.keys(this._filterCallbacks); const filterTokens = _.keys(this._filterCallbacks);
_.each(filterTokens, filterToken => { _.each(filterTokens, filterToken => {
this._unsubscribe(filterToken); this._unsubscribe(filterToken);
@@ -164,7 +162,7 @@ export class ContractWrapper {
); );
const catchAllLogFilter = {}; const catchAllLogFilter = {};
this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter); this._blockAndLogStreamerIfExists.addLogFilter(catchAllLogFilter);
this._blockAndLogStreamInterval = intervalUtils.setAsyncExcludingInterval( this._blockAndLogStreamIntervalIfExists = intervalUtils.setAsyncExcludingInterval(
this._reconcileBlockAsync.bind(this), this._reconcileBlockAsync.bind(this),
constants.DEFAULT_BLOCK_POLLING_INTERVAL, constants.DEFAULT_BLOCK_POLLING_INTERVAL,
this._onReconcileBlockError.bind(this), this._onReconcileBlockError.bind(this),
@@ -193,7 +191,7 @@ export class ContractWrapper {
} }
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string); this._blockAndLogStreamerIfExists.unsubscribeFromOnLogAdded(this._onLogAddedSubscriptionToken as string);
this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string); this._blockAndLogStreamerIfExists.unsubscribeFromOnLogRemoved(this._onLogRemovedSubscriptionToken as string);
intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamInterval); intervalUtils.clearAsyncExcludingInterval(this._blockAndLogStreamIntervalIfExists as NodeJS.Timer);
delete this._blockAndLogStreamerIfExists; delete this._blockAndLogStreamerIfExists;
} }
private async _reconcileBlockAsync(): Promise<void> { private async _reconcileBlockAsync(): Promise<void> {

View File

@@ -1,5 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { BigNumber } from '@0xproject/utils'; import { LogWithDecodedArgs } from '@0xproject/types';
import { AbiDecoder, BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -10,11 +11,9 @@ import {
EtherTokenEvents, EtherTokenEvents,
EventCallback, EventCallback,
IndexedFilterValues, IndexedFilterValues,
LogWithDecodedArgs,
TransactionOpts, TransactionOpts,
ZeroExError, ZeroExError,
} from '../types'; } from '../types';
import { AbiDecoder } from '../utils/abi_decoder';
import { assert } from '../utils/assert'; import { assert } from '../utils/assert';
import { ContractWrapper } from './contract_wrapper'; import { ContractWrapper } from './contract_wrapper';
@@ -160,8 +159,8 @@ export class EtherTokenWrapper extends ContractWrapper {
/** /**
* Cancels all existing subscriptions * Cancels all existing subscriptions
*/ */
public unsubscribeAll(): void { public _unsubscribeAll(): void {
super.unsubscribeAll(); super._unsubscribeAll();
} }
/** /**
* Retrieves the Ethereum address of the EtherToken contract deployed on the network * Retrieves the Ethereum address of the EtherToken contract deployed on the network
@@ -177,7 +176,7 @@ export class EtherTokenWrapper extends ContractWrapper {
return contractAddressIfExists; return contractAddressIfExists;
} }
private _invalidateContractInstance(): void { private _invalidateContractInstance(): void {
this.unsubscribeAll(); this._unsubscribeAll();
this._etherTokenContractsByAddress = {}; this._etherTokenContractsByAddress = {};
} }
private async _getEtherTokenContractAsync(etherTokenAddress: string): Promise<EtherTokenContract> { private async _getEtherTokenContractAsync(etherTokenAddress: string): Promise<EtherTokenContract> {

View File

@@ -1,5 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { BigNumber } from '@0xproject/utils'; import { DecodedLogArgs, LogWithDecodedArgs } from '@0xproject/types';
import { AbiDecoder, BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash'; import * as _ from 'lodash';
import * as Web3 from 'web3'; import * as Web3 from 'web3';
@@ -8,7 +9,6 @@ import { artifacts } from '../artifacts';
import { import {
BlockParamLiteral, BlockParamLiteral,
BlockRange, BlockRange,
DecodedLogArgs,
ECSignature, ECSignature,
EventCallback, EventCallback,
ExchangeContractErrCodes, ExchangeContractErrCodes,
@@ -17,7 +17,6 @@ import {
ExchangeEvents, ExchangeEvents,
IndexedFilterValues, IndexedFilterValues,
LogErrorContractEventArgs, LogErrorContractEventArgs,
LogWithDecodedArgs,
MethodOpts, MethodOpts,
Order, Order,
OrderAddresses, OrderAddresses,
@@ -28,7 +27,6 @@ import {
SignedOrder, SignedOrder,
ValidateOrderFillableOpts, ValidateOrderFillableOpts,
} from '../types'; } from '../types';
import { AbiDecoder } from '../utils/abi_decoder';
import { assert } from '../utils/assert'; import { assert } from '../utils/assert';
import { decorators } from '../utils/decorators'; import { decorators } from '../utils/decorators';
import { ExchangeTransferSimulator } from '../utils/exchange_transfer_simulator'; import { ExchangeTransferSimulator } from '../utils/exchange_transfer_simulator';
@@ -680,8 +678,8 @@ export class ExchangeWrapper extends ContractWrapper {
/** /**
* Cancels all existing subscriptions * Cancels all existing subscriptions
*/ */
public unsubscribeAll(): void { public _unsubscribeAll(): void {
super.unsubscribeAll(); super._unsubscribeAll();
} }
/** /**
* Gets historical logs without creating a subscription * Gets historical logs without creating a subscription
@@ -846,9 +844,9 @@ export class ExchangeWrapper extends ContractWrapper {
public throwLogErrorsAsErrors(logs: Array<LogWithDecodedArgs<DecodedLogArgs> | Web3.LogEntry>): void { public throwLogErrorsAsErrors(logs: Array<LogWithDecodedArgs<DecodedLogArgs> | Web3.LogEntry>): void {
const errLog = _.find(logs, { const errLog = _.find(logs, {
event: ExchangeEvents.LogError, event: ExchangeEvents.LogError,
}) as LogWithDecodedArgs<LogErrorContractEventArgs> | undefined; });
if (!_.isUndefined(errLog)) { if (!_.isUndefined(errLog)) {
const logArgs = errLog.args; const logArgs = (errLog as LogWithDecodedArgs<LogErrorContractEventArgs>).args;
const errCode = logArgs.errorId.toNumber(); const errCode = logArgs.errorId.toNumber();
const errMessage = this._exchangeContractErrCodesToMsg[errCode]; const errMessage = this._exchangeContractErrCodesToMsg[errCode];
throw new Error(errMessage); throw new Error(errMessage);
@@ -863,7 +861,7 @@ export class ExchangeWrapper extends ContractWrapper {
return contractAddress; return contractAddress;
} }
private _invalidateContractInstances(): void { private _invalidateContractInstances(): void {
this.unsubscribeAll(); this._unsubscribeAll();
delete this._exchangeContractIfExists; delete this._exchangeContractIfExists;
} }
private async _isValidSignatureUsingContractCallAsync( private async _isValidSignatureUsingContractCallAsync(

View File

@@ -3,9 +3,9 @@ import * as _ from 'lodash';
import * as Web3 from 'web3'; import * as Web3 from 'web3';
export class BaseContract { export class BaseContract {
protected web3ContractInstance: Web3.ContractInstance; protected _web3ContractInstance: Web3.ContractInstance;
protected defaults: Partial<TxData>; protected _defaults: Partial<TxData>;
protected async applyDefaultsToTxDataAsync<T extends TxData|TxDataPayable>( protected async _applyDefaultsToTxDataAsync<T extends TxData|TxDataPayable>(
txData: T, txData: T,
estimateGasAsync?: (txData: T) => Promise<number>, estimateGasAsync?: (txData: T) => Promise<number>,
): Promise<TxData> { ): Promise<TxData> {
@@ -15,7 +15,7 @@ export class BaseContract {
// 3. Gas estimate calculation + safety margin // 3. Gas estimate calculation + safety margin
const removeUndefinedProperties = _.pickBy; const removeUndefinedProperties = _.pickBy;
const txDataWithDefaults = { const txDataWithDefaults = {
...removeUndefinedProperties(this.defaults), ...removeUndefinedProperties(this._defaults),
...removeUndefinedProperties(txData as any), ...removeUndefinedProperties(txData as any),
// HACK: TS can't prove that T is spreadable. // HACK: TS can't prove that T is spreadable.
// Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged // Awaiting https://github.com/Microsoft/TypeScript/pull/13288 to be merged
@@ -27,7 +27,7 @@ export class BaseContract {
return txDataWithDefaults; return txDataWithDefaults;
} }
constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) { constructor(web3ContractInstance: Web3.ContractInstance, defaults: Partial<TxData>) {
this.web3ContractInstance = web3ContractInstance; this._web3ContractInstance = web3ContractInstance;
this.defaults = defaults; this._defaults = defaults;
} }
} }

View File

@@ -1,5 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { BigNumber } from '@0xproject/utils'; import { LogWithDecodedArgs } from '@0xproject/types';
import { AbiDecoder, BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -8,14 +9,12 @@ import {
BlockRange, BlockRange,
EventCallback, EventCallback,
IndexedFilterValues, IndexedFilterValues,
LogWithDecodedArgs,
MethodOpts, MethodOpts,
TokenContractEventArgs, TokenContractEventArgs,
TokenEvents, TokenEvents,
TransactionOpts, TransactionOpts,
ZeroExError, ZeroExError,
} from '../types'; } from '../types';
import { AbiDecoder } from '../utils/abi_decoder';
import { assert } from '../utils/assert'; import { assert } from '../utils/assert';
import { constants } from '../utils/constants'; import { constants } from '../utils/constants';
@@ -343,8 +342,8 @@ export class TokenWrapper extends ContractWrapper {
/** /**
* Cancels all existing subscriptions * Cancels all existing subscriptions
*/ */
public unsubscribeAll(): void { public _unsubscribeAll(): void {
super.unsubscribeAll(); super._unsubscribeAll();
} }
/** /**
* Gets historical logs without creating a subscription * Gets historical logs without creating a subscription
@@ -375,7 +374,7 @@ export class TokenWrapper extends ContractWrapper {
return logs; return logs;
} }
private _invalidateContractInstances(): void { private _invalidateContractInstances(): void {
this.unsubscribeAll(); this._unsubscribeAll();
this._tokenContractsByAddress = {}; this._tokenContractsByAddress = {};
} }
private async _getTokenContractAsync(tokenAddress: string): Promise<TokenContract> { private async _getTokenContractAsync(tokenAddress: string): Promise<TokenContract> {

View File

@@ -41,19 +41,3 @@ declare module 'truffle-hdwallet-provider' {
} }
export = HDWalletProvider; export = HDWalletProvider;
} }
// abi-decoder declarations
interface DecodedLogArg {}
interface DecodedLog {
name: string;
events: DecodedLogArg[];
}
declare module 'abi-decoder' {
import * as Web3 from 'web3';
const addABI: (abi: Web3.AbiDefinition) => void;
const decodeLogs: (logs: Web3.LogEntry[]) => DecodedLog[];
}
declare module 'web3/lib/solidity/coder' {
const decodeParams: (types: string[], data: string) => any[];
}

View File

@@ -28,12 +28,9 @@ export {
WithdrawalContractEventArgs, WithdrawalContractEventArgs,
DepositContractEventArgs, DepositContractEventArgs,
ContractEventArgs, ContractEventArgs,
ContractEventArg,
Web3Provider, Web3Provider,
ZeroExConfig, ZeroExConfig,
EtherTokenEvents, EtherTokenEvents,
TransactionReceiptWithDecodedLogs,
LogWithDecodedArgs,
MethodOpts, MethodOpts,
OrderTransactionOpts, OrderTransactionOpts,
TransactionOpts, TransactionOpts,
@@ -47,4 +44,6 @@ export {
OrderState, OrderState,
} from './types'; } from './types';
export { ContractEventArg, LogWithDecodedArgs, TransactionReceiptWithDecodedLogs } from '@0xproject/types';
export { TransactionReceipt } from '@0xproject/types'; export { TransactionReceipt } from '@0xproject/types';

View File

@@ -1,5 +1,6 @@
import { schemas } from '@0xproject/json-schemas'; import { schemas } from '@0xproject/json-schemas';
import { intervalUtils } from '@0xproject/utils'; import { LogWithDecodedArgs } from '@0xproject/types';
import { AbiDecoder, intervalUtils } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -19,7 +20,6 @@ import {
LogCancelContractEventArgs, LogCancelContractEventArgs,
LogEvent, LogEvent,
LogFillContractEventArgs, LogFillContractEventArgs,
LogWithDecodedArgs,
OnOrderStateChangeCallback, OnOrderStateChangeCallback,
OrderState, OrderState,
OrderStateWatcherConfig, OrderStateWatcherConfig,
@@ -29,7 +29,6 @@ import {
WithdrawalContractEventArgs, WithdrawalContractEventArgs,
ZeroExError, ZeroExError,
} from '../types'; } from '../types';
import { AbiDecoder } from '../utils/abi_decoder';
import { assert } from '../utils/assert'; import { assert } from '../utils/assert';
import { OrderStateUtils } from '../utils/order_state_utils'; import { OrderStateUtils } from '../utils/order_state_utils';
import { utils } from '../utils/utils'; import { utils } from '../utils/utils';
@@ -134,8 +133,12 @@ export class OrderStateWatcher {
delete this._orderStateByOrderHashCache[orderHash]; delete this._orderStateByOrderHashCache[orderHash];
const exchange = (this._orderFilledCancelledLazyStore as any)._exchange as ExchangeWrapper; const exchange = (this._orderFilledCancelledLazyStore as any)._exchange as ExchangeWrapper;
const zrxTokenAddress = exchange.getZRXTokenAddress(); const zrxTokenAddress = exchange.getZRXTokenAddress();
this._removeFromDependentOrderHashes(signedOrder.maker, zrxTokenAddress, orderHash); this._removeFromDependentOrderHashes(signedOrder.maker, zrxTokenAddress, orderHash);
this._removeFromDependentOrderHashes(signedOrder.maker, signedOrder.makerTokenAddress, orderHash); if (zrxTokenAddress !== signedOrder.makerTokenAddress) {
this._removeFromDependentOrderHashes(signedOrder.maker, signedOrder.makerTokenAddress, orderHash);
}
this._expirationWatcher.removeOrder(orderHash); this._expirationWatcher.removeOrder(orderHash);
} }
/** /**
@@ -224,12 +227,12 @@ export class OrderStateWatcher {
return; return;
} }
const log = logIfExists as LogEvent; // At this moment we are sure that no error occured and log is defined. const log = logIfExists as LogEvent; // At this moment we are sure that no error occured and log is defined.
const maybeDecodedLog = this._abiDecoder.tryToDecodeLogOrNoop(log); const maybeDecodedLog = this._abiDecoder.tryToDecodeLogOrNoop<ContractEventArgs>(log);
const isLogDecoded = !_.isUndefined((maybeDecodedLog as LogWithDecodedArgs<any>).event); const isLogDecoded = !_.isUndefined(((maybeDecodedLog as any) as LogWithDecodedArgs<ContractEventArgs>).event);
if (!isLogDecoded) { if (!isLogDecoded) {
return; // noop return; // noop
} }
const decodedLog = maybeDecodedLog as LogWithDecodedArgs<ContractEventArgs>; const decodedLog = (maybeDecodedLog as any) as LogWithDecodedArgs<ContractEventArgs>;
let makerToken: string; let makerToken: string;
let makerAddress: string; let makerAddress: string;
switch (decodedLog.event) { switch (decodedLog.event) {

View File

@@ -1,4 +1,4 @@
import { TransactionReceipt } from '@0xproject/types'; import { ContractEventArg, LogWithDecodedArgs } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as Web3 from 'web3'; import * as Web3 from 'web3';
@@ -53,13 +53,6 @@ export interface DecodedLogEvent<ArgsType> {
export type EventCallback<ArgsType> = (err: null | Error, log?: DecodedLogEvent<ArgsType>) => void; export type EventCallback<ArgsType> = (err: null | Error, log?: DecodedLogEvent<ArgsType>) => void;
export type EventWatcherCallback = (err: null | Error, log?: LogEvent) => void; export type EventWatcherCallback = (err: null | Error, log?: LogEvent) => void;
export enum SolidityTypes {
Address = 'address',
Uint256 = 'uint256',
Uint8 = 'uint8',
Uint = 'uint',
}
export enum ExchangeContractErrCodes { export enum ExchangeContractErrCodes {
ERROR_FILL_EXPIRED, // Order has already expired ERROR_FILL_EXPIRED, // Order has already expired
ERROR_FILL_NO_VALUE, // Order has already been fully filled or cancelled ERROR_FILL_NO_VALUE, // Order has already been fully filled or cancelled
@@ -94,8 +87,6 @@ export enum ExchangeContractErrs {
BatchOrdersMustHaveAtLeastOneItem = 'BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM', BatchOrdersMustHaveAtLeastOneItem = 'BATCH_ORDERS_MUST_HAVE_AT_LEAST_ONE_ITEM',
} }
export type RawLog = Web3.LogEntry;
export interface ContractEvent { export interface ContractEvent {
logIndex: number; logIndex: number;
transactionIndex: number; transactionIndex: number;
@@ -163,7 +154,6 @@ export type EtherTokenContractEventArgs =
| DepositContractEventArgs | DepositContractEventArgs
| WithdrawalContractEventArgs; | WithdrawalContractEventArgs;
export type ContractEventArgs = ExchangeContractEventArgs | TokenContractEventArgs | EtherTokenContractEventArgs; export type ContractEventArgs = ExchangeContractEventArgs | TokenContractEventArgs | EtherTokenContractEventArgs;
export type ContractEventArg = string | BigNumber;
export interface Order { export interface Order {
maker: string; maker: string;
@@ -267,11 +257,6 @@ export type SyncMethod = (...args: any[]) => any;
*/ */
export type Web3Provider = Web3.Provider; export type Web3Provider = Web3.Provider;
export interface JSONRPCPayload {
params: any[];
method: string;
}
/* /*
* orderExpirationCheckingIntervalMs: How often to check for expired orders. Default: 50 * orderExpirationCheckingIntervalMs: How often to check for expired orders. Default: 50
* eventPollingIntervalMs: How often to poll the Ethereum node for new events. Defaults: 200 * eventPollingIntervalMs: How often to poll the Ethereum node for new events. Defaults: 200
@@ -305,23 +290,6 @@ export interface ZeroExConfig {
orderWatcherConfig?: OrderStateWatcherConfig; orderWatcherConfig?: OrderStateWatcherConfig;
} }
export enum AbiType {
Function = 'function',
Constructor = 'constructor',
Event = 'event',
Fallback = 'fallback',
}
export interface DecodedLogArgs {
[argName: string]: ContractEventArg;
}
export interface LogWithDecodedArgs<ArgsType> extends Web3.DecodedLogEntry<ArgsType> {}
export interface TransactionReceiptWithDecodedLogs extends TransactionReceipt {
logs: Array<LogWithDecodedArgs<DecodedLogArgs> | Web3.LogEntry>;
}
export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken'; export type ArtifactContractName = 'ZRX' | 'TokenTransferProxy' | 'TokenRegistry' | 'Token' | 'Exchange' | 'EtherToken';
export interface Artifact { export interface Artifact {

View File

@@ -1,10 +1,11 @@
import { SolidityTypes } from '@0xproject/types';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import BN = require('bn.js'); import BN = require('bn.js');
import * as ethABI from 'ethereumjs-abi'; import * as ethABI from 'ethereumjs-abi';
import * as ethUtil from 'ethereumjs-util'; import * as ethUtil from 'ethereumjs-util';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Order, SignedOrder, SolidityTypes } from '../types'; import { Order, SignedOrder } from '../types';
export const utils = { export const utils = {
/** /**

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -10,9 +10,8 @@ import { ApprovalContractEventArgs, LogWithDecodedArgs, Order, TokenEvents, Zero
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;

View File

@@ -1,3 +1,4 @@
import { web3Factory } from '@0xproject/dev-utils';
import * as chai from 'chai'; import * as chai from 'chai';
import 'mocha'; import 'mocha';
@@ -5,7 +6,6 @@ import { ZeroEx } from '../src';
import { assert } from '../src/utils/assert'; import { assert } from '../src/utils/assert';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { web3Factory } from './utils/web3_factory';
const expect = chai.expect; const expect = chai.expect;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import 'mocha'; import 'mocha';
@@ -23,11 +23,10 @@ import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { reportNodeCallbackErrors } from './utils/report_callback_errors';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
// Since the address depositing/withdrawing ETH/WETH also needs to pay gas costs for the transaction, // Since the address depositing/withdrawing ETH/WETH also needs to pay gas costs for the transaction,
// a small amount of ETH will be used to pay this gas cost. We therefore check that the difference between // a small amount of ETH will be used to pay this gas cost. We therefore check that the difference between
@@ -156,7 +155,7 @@ describe('EtherTokenWrapper', () => {
etherTokenAddress = etherToken.address; etherTokenAddress = etherToken.address;
}); });
afterEach(() => { afterEach(() => {
zeroEx.etherToken.unsubscribeAll(); zeroEx.etherToken._unsubscribeAll();
}); });
// Hack: Mocha does not allow a test to be both async and have a `done` callback // Hack: Mocha does not allow a test to be both async and have a `done` callback
// Since we need to await the receipt of the event in the `subscribe` callback, // Since we need to await the receipt of the event in the `subscribe` callback,

View File

@@ -1,3 +1,4 @@
import { web3Factory } from '@0xproject/dev-utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -11,7 +12,6 @@ import { DoneCallback } from '../src/types';
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { reportNodeCallbackErrors } from './utils/report_callback_errors';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
@@ -8,11 +8,10 @@ import { ExchangeTransferSimulator } from '../src/utils/exchange_transfer_simula
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('ExchangeTransferSimulator', () => { describe('ExchangeTransferSimulator', () => {
const web3 = web3Factory.create(); const web3 = web3Factory.create();

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -25,11 +25,10 @@ import { constants } from './utils/constants';
import { FillScenarios } from './utils/fill_scenarios'; import { FillScenarios } from './utils/fill_scenarios';
import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { reportNodeCallbackErrors } from './utils/report_callback_errors';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
const NON_EXISTENT_ORDER_HASH = '0x79370342234e7acd6bbeac335bd3bb1d368383294b64b8160a00f4060e4d3777'; const NON_EXISTENT_ORDER_HASH = '0x79370342234e7acd6bbeac335bd3bb1d368383294b64b8160a00f4060e4d3777';
@@ -922,7 +921,7 @@ describe('ExchangeWrapper', () => {
); );
}); });
afterEach(async () => { afterEach(async () => {
zeroEx.exchange.unsubscribeAll(); zeroEx.exchange._unsubscribeAll();
}); });
// Hack: Mocha does not allow a test to be both async and have a `done` callback // Hack: Mocha does not allow a test to be both async and have a `done` callback
// Since we need to await the receipt of the event in the `subscribe` callback, // Since we need to await the receipt of the event in the `subscribe` callback,

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -13,15 +13,13 @@ import { constants } from '../src/utils/constants';
import { utils } from '../src/utils/utils'; import { utils } from '../src/utils/utils';
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants as testConstants } from './utils/constants';
import { FillScenarios } from './utils/fill_scenarios'; import { FillScenarios } from './utils/fill_scenarios';
import { reportNoErrorCallbackErrors } from './utils/report_callback_errors'; import { reportNoErrorCallbackErrors } from './utils/report_callback_errors';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(testConstants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('ExpirationWatcher', () => { describe('ExpirationWatcher', () => {
let web3: Web3; let web3: Web3;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -22,13 +22,12 @@ import { constants } from './utils/constants';
import { FillScenarios } from './utils/fill_scenarios'; import { FillScenarios } from './utils/fill_scenarios';
import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { reportNodeCallbackErrors } from './utils/report_callback_errors';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
const TIMEOUT_MS = 150; const TIMEOUT_MS = 150;
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('OrderStateWatcher', () => { describe('OrderStateWatcher', () => {
let web3: Web3; let web3: Web3;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as chai from 'chai'; import * as chai from 'chai';
import * as Sinon from 'sinon'; import * as Sinon from 'sinon';
@@ -13,11 +13,10 @@ import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { FillScenarios } from './utils/fill_scenarios'; import { FillScenarios } from './utils/fill_scenarios';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('OrderValidation', () => { describe('OrderValidation', () => {
let web3: Web3; let web3: Web3;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import * as _ from 'lodash'; import * as _ from 'lodash';
import 'mocha'; import 'mocha';
@@ -11,10 +11,9 @@ import { DoneCallback } from '../src/types';
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { assertNodeCallbackError } from './utils/report_callback_errors'; import { assertNodeCallbackError } from './utils/report_callback_errors';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('SubscriptionTest', () => { describe('SubscriptionTest', () => {
let web3: Web3; let web3: Web3;
@@ -50,7 +49,7 @@ describe('SubscriptionTest', () => {
tokenAddress = token.address; tokenAddress = token.address;
}); });
afterEach(() => { afterEach(() => {
zeroEx.token.unsubscribeAll(); zeroEx.token._unsubscribeAll();
_.each(stubs, s => s.restore()); _.each(stubs, s => s.restore());
stubs = []; stubs = [];
}); });
@@ -77,7 +76,7 @@ describe('SubscriptionTest', () => {
const callback = (err: Error | null, logEvent?: DecodedLogEvent<ApprovalContractEventArgs>) => _.noop; const callback = (err: Error | null, logEvent?: DecodedLogEvent<ApprovalContractEventArgs>) => _.noop;
zeroEx.token.subscribe(tokenAddress, TokenEvents.Approval, indexFilterValues, callback); zeroEx.token.subscribe(tokenAddress, TokenEvents.Approval, indexFilterValues, callback);
stubs = [Sinon.stub((zeroEx as any)._web3Wrapper, 'getBlockAsync').throws(new Error('JSON RPC error'))]; stubs = [Sinon.stub((zeroEx as any)._web3Wrapper, 'getBlockAsync').throws(new Error('JSON RPC error'))];
zeroEx.token.unsubscribeAll(); zeroEx.token._unsubscribeAll();
done(); done();
})().catch(done); })().catch(done);
}); });

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { schemas, SchemaValidator } from '@0xproject/json-schemas'; import { schemas, SchemaValidator } from '@0xproject/json-schemas';
import * as chai from 'chai'; import * as chai from 'chai';
import * as _ from 'lodash'; import * as _ from 'lodash';
@@ -8,11 +8,10 @@ import { Token, ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
const TOKEN_REGISTRY_SIZE_AFTER_MIGRATION = 7; const TOKEN_REGISTRY_SIZE_AFTER_MIGRATION = 7;

View File

@@ -1,10 +1,10 @@
import { web3Factory } from '@0xproject/dev-utils';
import * as chai from 'chai'; import * as chai from 'chai';
import { ZeroEx } from '../src'; import { ZeroEx } from '../src';
import { chaiSetup } from './utils/chai_setup'; import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;

View File

@@ -1,4 +1,4 @@
import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { BlockchainLifecycle, devConstants, web3Factory } from '@0xproject/dev-utils';
import { BigNumber } from '@0xproject/utils'; import { BigNumber } from '@0xproject/utils';
import { Web3Wrapper } from '@0xproject/web3-wrapper'; import { Web3Wrapper } from '@0xproject/web3-wrapper';
import * as chai from 'chai'; import * as chai from 'chai';
@@ -22,11 +22,10 @@ import { chaiSetup } from './utils/chai_setup';
import { constants } from './utils/constants'; import { constants } from './utils/constants';
import { reportNodeCallbackErrors } from './utils/report_callback_errors'; import { reportNodeCallbackErrors } from './utils/report_callback_errors';
import { TokenUtils } from './utils/token_utils'; import { TokenUtils } from './utils/token_utils';
import { web3Factory } from './utils/web3_factory';
chaiSetup.configure(); chaiSetup.configure();
const expect = chai.expect; const expect = chai.expect;
const blockchainLifecycle = new BlockchainLifecycle(constants.RPC_URL); const blockchainLifecycle = new BlockchainLifecycle();
describe('TokenWrapper', () => { describe('TokenWrapper', () => {
let web3: Web3; let web3: Web3;
@@ -378,7 +377,7 @@ describe('TokenWrapper', () => {
tokenAddress = token.address; tokenAddress = token.address;
}); });
afterEach(() => { afterEach(() => {
zeroEx.token.unsubscribeAll(); zeroEx.token._unsubscribeAll();
}); });
// Hack: Mocha does not allow a test to be both async and have a `done` callback // Hack: Mocha does not allow a test to be both async and have a `done` callback
// Since we need to await the receipt of the event in the `subscribe` callback, // Since we need to await the receipt of the event in the `subscribe` callback,

View File

@@ -1,11 +1,9 @@
export const constants = { export const constants = {
NULL_ADDRESS: '0x0000000000000000000000000000000000000000', NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
RPC_URL: 'http://localhost:8545',
ROPSTEN_NETWORK_ID: 3, ROPSTEN_NETWORK_ID: 3,
KOVAN_NETWORK_ID: 42, KOVAN_NETWORK_ID: 42,
TESTRPC_NETWORK_ID: 50, TESTRPC_NETWORK_ID: 50,
KOVAN_RPC_URL: 'https://kovan.infura.io/', KOVAN_RPC_URL: 'https://kovan.infura.io/',
ROPSTEN_RPC_URL: 'https://ropsten.infura.io/', ROPSTEN_RPC_URL: 'https://ropsten.infura.io/',
ZRX_DECIMALS: 18, ZRX_DECIMALS: 18,
GAS_ESTIMATE: 500000,
}; };

View File

@@ -1,5 +1,9 @@
# CHANGELOG # CHANGELOG
## v0.2.0 - _???_
* Added CLI options for explicit specifying location of partials and main template (#346)
## v0.1.0 - _January 11, 2018_ ## v0.1.0 - _January 11, 2018_
* Fixed array typings with union types (#295) * Fixed array typings with union types (#295)

View File

@@ -1,10 +1,11 @@
{ {
"name": "@0xproject/abi-gen", "name": "@0xproject/abi-gen",
"version": "0.1.5", "version": "0.1.6",
"description": "Generate contract wrappers from ABI and handlebars templates", "description": "Generate contract wrappers from ABI and handlebars templates",
"main": "lib/index.js", "main": "lib/index.js",
"types": "lib/index.d.ts", "types": "lib/index.d.ts",
"scripts": { "scripts": {
"build:watch": "tsc -w",
"lint": "tslint --project . 'src/**/*.ts'", "lint": "tslint --project . 'src/**/*.ts'",
"clean": "shx rm -rf lib", "clean": "shx rm -rf lib",
"build": "tsc" "build": "tsc"
@@ -22,7 +23,7 @@
}, },
"homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md", "homepage": "https://github.com/0xProject/0x.js/packages/abi-gen/README.md",
"dependencies": { "dependencies": {
"@0xproject/utils": "^0.2.3", "@0xproject/utils": "^0.2.4",
"chalk": "^2.3.0", "chalk": "^2.3.0",
"glob": "^7.1.2", "glob": "^7.1.2",
"handlebars": "^4.0.11", "handlebars": "^4.0.11",
@@ -33,7 +34,7 @@
"yargs": "^10.0.3" "yargs": "^10.0.3"
}, },
"devDependencies": { "devDependencies": {
"@0xproject/tslint-config": "^0.4.5", "@0xproject/tslint-config": "^0.4.6",
"@types/glob": "^5.0.33", "@types/glob": "^5.0.33",
"@types/handlebars": "^4.0.36", "@types/handlebars": "^4.0.36",
"@types/mkdirp": "^0.5.1", "@types/mkdirp": "^0.5.1",
@@ -42,7 +43,7 @@
"npm-run-all": "^4.1.2", "npm-run-all": "^4.1.2",
"shx": "^0.2.2", "shx": "^0.2.2",
"tslint": "5.8.0", "tslint": "5.8.0",
"typescript": "~2.6.1", "typescript": "2.7.1",
"web3-typescript-typings": "^0.9.7" "web3-typescript-typings": "^0.9.8"
} }
} }

View File

@@ -17,24 +17,45 @@ import { utils } from './utils';
const ABI_TYPE_CONSTRUCTOR = 'constructor'; const ABI_TYPE_CONSTRUCTOR = 'constructor';
const ABI_TYPE_METHOD = 'function'; const ABI_TYPE_METHOD = 'function';
const ABI_TYPE_EVENT = 'event'; const ABI_TYPE_EVENT = 'event';
const MAIN_TEMPLATE_NAME = 'contract.mustache';
const args = yargs const args = yargs
.option('abiGlob', { .option('abis', {
describe: 'Glob pattern to search for ABI JSON files', describe: 'Glob pattern to search for ABI JSON files',
type: 'string', type: 'string',
demand: true, demandOption: true,
})
.option('templates', {
describe: 'Folder where to search for templates',
type: 'string',
demand: true,
}) })
.option('output', { .option('output', {
alias: ['o', 'out'],
describe: 'Folder where to put the output files', describe: 'Folder where to put the output files',
type: 'string', type: 'string',
demand: true, normalize: true,
}).argv; demandOption: true,
})
.option('partials', {
describe: 'Glob pattern for the partial template files',
type: 'string',
implies: 'template',
})
.option('template', {
describe: 'Path for the main template file that will be used to generate each contract',
type: 'string',
demandOption: true,
normalize: true,
})
.example(
"$0 --abis 'src/artifacts/**/*.json' --out 'src/contracts/generated/' --partials 'src/templates/partials/**/*.handlebars' --template 'src/templates/contract.handlebars'",
'Full usage example',
).argv;
function registerPartials(partialsGlob: string) {
const partialTemplateFileNames = globSync(partialsGlob);
utils.log(`Found ${chalk.green(`${partialTemplateFileNames.length}`)} ${chalk.bold('partial')} templates`);
for (const partialTemplateFileName of partialTemplateFileNames) {
const namedContent = utils.getNamedContent(partialTemplateFileName);
Handlebars.registerPartial(namedContent.name, namedContent.content);
}
return partialsGlob;
}
function writeOutputFile(name: string, renderedTsCode: string): void { function writeOutputFile(name: string, renderedTsCode: string): void {
const fileName = toSnakeCase(name); const fileName = toSnakeCase(name);
@@ -45,15 +66,14 @@ function writeOutputFile(name: string, renderedTsCode: string): void {
Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input)); Handlebars.registerHelper('parameterType', utils.solTypeToTsType.bind(utils, ParamKind.Input));
Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output)); Handlebars.registerHelper('returnType', utils.solTypeToTsType.bind(utils, ParamKind.Output));
const partialTemplateFileNames = globSync(`${args.templates}/partials/**/*.mustache`);
for (const partialTemplateFileName of partialTemplateFileNames) {
const namedContent = utils.getNamedContent(partialTemplateFileName);
Handlebars.registerPartial(namedContent.name, namedContent.content);
}
const mainTemplate = utils.getNamedContent(`${args.templates}/${MAIN_TEMPLATE_NAME}`); if (args.partials) {
registerPartials(args.partials);
}
const mainTemplate = utils.getNamedContent(args.template);
const template = Handlebars.compile<ContextData>(mainTemplate.content); const template = Handlebars.compile<ContextData>(mainTemplate.content);
const abiFileNames = globSync(args.abiGlob); const abiFileNames = globSync(args.abis);
if (_.isEmpty(abiFileNames)) { if (_.isEmpty(abiFileNames)) {
utils.log(`${chalk.red(`No ABI files found.`)}`); utils.log(`${chalk.red(`No ABI files found.`)}`);
utils.log(`Please make sure you've passed the correct folder name and that the files have utils.log(`Please make sure you've passed the correct folder name and that the files have

View File

@@ -1,10 +1,11 @@
{ {
"name": "@0xproject/assert", "name": "@0xproject/assert",
"version": "0.0.14", "version": "0.0.15",
"description": "Provides a standard way of performing type and schema validation across 0x projects", "description": "Provides a standard way of performing type and schema validation across 0x projects",
"main": "lib/src/index.js", "main": "lib/src/index.js",
"types": "lib/src/index.d.ts", "types": "lib/src/index.d.ts",
"scripts": { "scripts": {
"build:watch": "tsc -w",
"build": "tsc", "build": "tsc",
"clean": "shx rm -rf _bundles lib test_temp", "clean": "shx rm -rf _bundles lib test_temp",
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'", "lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
@@ -23,7 +24,7 @@
}, },
"homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md", "homepage": "https://github.com/0xProject/0x.js/packages/assert/README.md",
"devDependencies": { "devDependencies": {
"@0xproject/tslint-config": "^0.4.5", "@0xproject/tslint-config": "^0.4.6",
"@types/lodash": "^4.14.86", "@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42", "@types/mocha": "^2.2.42",
"@types/valid-url": "^1.0.2", "@types/valid-url": "^1.0.2",
@@ -34,11 +35,11 @@
"npm-run-all": "^4.1.2", "npm-run-all": "^4.1.2",
"shx": "^0.2.2", "shx": "^0.2.2",
"tslint": "5.8.0", "tslint": "5.8.0",
"typescript": "~2.6.1" "typescript": "2.7.1"
}, },
"dependencies": { "dependencies": {
"@0xproject/json-schemas": "^0.7.6", "@0xproject/json-schemas": "^0.7.7",
"@0xproject/utils": "^0.2.3", "@0xproject/utils": "^0.2.4",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"valid-url": "^1.0.9" "valid-url": "^1.0.9"
} }

View File

@@ -3,5 +3,10 @@
"compilerOptions": { "compilerOptions": {
"outDir": "lib" "outDir": "lib"
}, },
"include": ["./src/**/*", "./test/**/*", "../../node_modules/chai-typescript-typings/index.d.ts"] "include": [
"./src/**/*",
"./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts"
]
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "chai-as-promised-typescript-typings", "name": "chai-as-promised-typescript-typings",
"version": "0.0.7", "version": "0.0.8",
"description": "Typescript type definitions for chai-as-promised", "description": "Typescript type definitions for chai-as-promised",
"main": "index.d.ts", "main": "index.d.ts",
"types": "index.d.ts", "types": "index.d.ts",
@@ -18,6 +18,6 @@
}, },
"homepage": "https://github.com/0xProject/0x.js/packages/chai-as-promised-typescript-typings#readme", "homepage": "https://github.com/0xProject/0x.js/packages/chai-as-promised-typescript-typings#readme",
"dependencies": { "dependencies": {
"chai-typescript-typings": "^0.0.0" "chai-typescript-typings": "^0.0.2"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@0xproject/connect", "name": "@0xproject/connect",
"version": "0.5.3", "version": "0.5.4",
"description": "A javascript library for interacting with the standard relayer api", "description": "A javascript library for interacting with the standard relayer api",
"keywords": [ "keywords": [
"connect", "connect",
@@ -12,6 +12,7 @@
"main": "lib/src/index.js", "main": "lib/src/index.js",
"types": "lib/src/index.d.ts", "types": "lib/src/index.d.ts",
"scripts": { "scripts": {
"build:watch": "tsc -w",
"build": "tsc", "build": "tsc",
"clean": "shx rm -rf _bundles lib test_temp", "clean": "shx rm -rf _bundles lib test_temp",
"docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR", "docs:json": "typedoc --excludePrivate --excludeExternals --target ES5 --json $JSON_FILE_PATH $PROJECT_DIR",
@@ -36,16 +37,16 @@
}, },
"homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md", "homepage": "https://github.com/0xProject/0x.js/packages/connect/README.md",
"dependencies": { "dependencies": {
"@0xproject/assert": "^0.0.14", "@0xproject/assert": "^0.0.15",
"@0xproject/json-schemas": "^0.7.6", "@0xproject/json-schemas": "^0.7.7",
"@0xproject/utils": "^0.2.3", "@0xproject/utils": "^0.2.4",
"isomorphic-fetch": "^2.2.1", "isomorphic-fetch": "^2.2.1",
"lodash": "^4.17.4", "lodash": "^4.17.4",
"query-string": "^5.0.1", "query-string": "^5.0.1",
"websocket": "^1.0.25" "websocket": "^1.0.25"
}, },
"devDependencies": { "devDependencies": {
"@0xproject/tslint-config": "^0.4.5", "@0xproject/tslint-config": "^0.4.6",
"@types/fetch-mock": "^5.12.1", "@types/fetch-mock": "^5.12.1",
"@types/lodash": "^4.14.86", "@types/lodash": "^4.14.86",
"@types/mocha": "^2.2.42", "@types/mocha": "^2.2.42",
@@ -53,7 +54,7 @@
"@types/websocket": "^0.0.34", "@types/websocket": "^0.0.34",
"chai": "^4.0.1", "chai": "^4.0.1",
"chai-as-promised": "^7.1.0", "chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.7", "chai-as-promised-typescript-typings": "^0.0.8",
"chai-typescript-typings": "^0.0.2", "chai-typescript-typings": "^0.0.2",
"copyfiles": "^1.2.0", "copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1", "dirty-chai": "^2.0.1",
@@ -63,7 +64,7 @@
"shx": "^0.2.2", "shx": "^0.2.2",
"tslint": "5.8.0", "tslint": "5.8.0",
"typedoc": "~0.8.0", "typedoc": "~0.8.0",
"typescript": "~2.6.1", "typescript": "2.7.1",
"web3-typescript-typings": "^0.9.7" "web3-typescript-typings": "^0.9.8"
} }
} }

View File

@@ -6,6 +6,7 @@
"include": [ "include": [
"./src/**/*", "./src/**/*",
"./test/**/*", "./test/**/*",
"../../node_modules/web3-typescript-typings/index.d.ts",
"../../node_modules/chai-as-promised-typescript-typings/index.d.ts", "../../node_modules/chai-as-promised-typescript-typings/index.d.ts",
"../../node_modules/chai-typescript-typings/index.d.ts" "../../node_modules/chai-typescript-typings/index.d.ts"
] ]

View File

@@ -38,6 +38,12 @@ yarn install
yarn build yarn build
``` ```
or
```bash
yarn build:watch
```
### Clean ### Clean
```bash ```bash

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,188 @@
{
"contract_name": "ERC20Token",
"networks": {
"50": {
"solc_version": "0.4.18",
"keccak256": "0x31be5b5f8d7ae32e5ac282b8740cc7aa87cdc383cabafa02292ea6f38302efcc",
"optimizer_enabled": 0,
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary":
"0x6060604052341561000f57600080fd5b6109528061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610677565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106bf565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061089f565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b6000816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410158015610450575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104da57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e557600080fd5b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078d57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b151561079857600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820d9af9b2b6ffe19f00d45d30a243f833e31053a2e48142e183c9f1e6b0ead7a9e0029",
"updated_at": 1517509619365
}
}
}

View File

@@ -0,0 +1,182 @@
{
"contract_name": "ERC20Token_v1",
"networks": {
"50": {
"solc_version": "0.4.11",
"keccak256": "0x3d710b436c430d6fe49f64b091555405360d76da6454b93faa8e213eea34a96d",
"optimizer_enabled": 0,
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary":
"0x6060604052341561000c57fe5b5b61095b8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061066f565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106b9565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a7565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b600081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561043b575081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156104c75750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561065e5781600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050610668565b60009050610668565b5b9392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561078a5750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108975781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108a1565b600090506108a1565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a72305820441601e8451e1c2d31e6cde19fc920b8f95e79f9d42dd662aeefad13fd8bcfaa0029",
"updated_at": 1517509621756
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,49 @@
{
"contract_name": "Ownable",
"networks": {
"50": {
"solc_version": "0.4.18",
"keccak256": "0x04e5204925913f5ff6b8193f4ab38eef9d53fc9a553f1a737924fc69db492a99",
"optimizer_enabled": 0,
"abi": [
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"payable": false,
"stateMutability": "nonpayable",
"type": "constructor"
}
],
"unlinked_binary":
"0x6060604052341561000f57600080fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506102058061005e6000396000f30060606040526004361061004c576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610051578063f2fde38b146100a6575b600080fd5b341561005c57600080fd5b6100646100df565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100b157600080fd5b6100dd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610104565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561015f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101d657806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505600a165627a7a723058202c25abe7564c2f872e2f210a96faa6c7691055d67e9a3edd56dcef376c646e170029",
"updated_at": 1517509621376
}
}
}

View File

@@ -0,0 +1,46 @@
{
"contract_name": "Ownable_v1",
"networks": {
"50": {
"solc_version": "0.4.11",
"keccak256": "0x82a6595d8d4c3c9cd44ef0fd8f77528195c35c8173970d2b119374f5d74332f4",
"optimizer_enabled": 0,
"abi": [
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
}
],
"unlinked_binary":
"0x6060604052341561000c57fe5b5b33600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b6101fa8061005f6000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b14610046578063f2fde38b14610098575bfe5b341561004e57fe5b6100566100ce565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156100a057fe5b6100cc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506100f4565b005b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156101515760006000fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156101c95780600060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b505600a165627a7a723058201bce811586dc86b1fc25fa9779089c5bf0b5d2cf9e981a580ef44253300866520029",
"updated_at": 1517535966230
}
}
}

View File

@@ -0,0 +1,14 @@
{
"contract_name": "SafeMath",
"networks": {
"50": {
"solc_version": "0.4.18",
"keccak256": "0xb1d52f567a893c86f452bd80fbb6907d992046a31b35830bc779116d23fd5549",
"optimizer_enabled": 0,
"abi": [],
"unlinked_binary":
"0x60606040523415600e57600080fd5b603580601b6000396000f3006060604052600080fd00a165627a7a723058206526256c7c1e7d1d1b2df1caefcbd76717428d6237de37aacbb5097658456b720029",
"updated_at": 1517509621492
}
}
}

View File

@@ -0,0 +1,14 @@
{
"contract_name": "SafeMath_v1",
"networks": {
"50": {
"solc_version": "0.4.11",
"keccak256": "0xd2c1f0518a23e63d5892f66e7b8d228c7486495b139a0f3b049f6ba7803c892d",
"optimizer_enabled": 0,
"abi": [],
"unlinked_binary":
"0x60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00a165627a7a72305820acbb91f6e4b200e929056917b84223c3fedbdeca5c35f7bf9292edf2a8ee4aa00029",
"updated_at": 1517509621851
}
}
}

View File

@@ -0,0 +1,174 @@
{
"contract_name": "Token",
"networks": {
"50": {
"solc_version": "0.4.18",
"keccak256": "0xe43382be55ddb9c7a28567b4cc59e35072da198e6c49a90ff1396aa8399fd61e",
"optimizer_enabled": 0,
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary":
"0x6060604052341561000f57600080fd5b6102ac8061001e6000396000f30060606040526004361061006d576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007257806323b872dd146100cc57806370a0823114610145578063a9059cbb14610192578063dd62ed3e146101ec575b600080fd5b341561007d57600080fd5b6100b2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610258565b604051808215151515815260200191505060405180910390f35b34156100d757600080fd5b61012b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610260565b604051808215151515815260200191505060405180910390f35b341561015057600080fd5b61017c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610269565b6040518082815260200191505060405180910390f35b341561019d57600080fd5b6101d2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610270565b604051808215151515815260200191505060405180910390f35b34156101f757600080fd5b610242600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610278565b6040518082815260200191505060405180910390f35b600092915050565b60009392505050565b6000919050565b600092915050565b6000929150505600a165627a7a723058201ef98a5ecc619c89a935fee340b114a09fe44aa51aa765f4037dd3423f49d42d0029",
"updated_at": 1517509619496
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,182 @@
{
"contract_name": "Token_v1",
"networks": {
"50": {
"solc_version": "0.4.11",
"keccak256": "0x35a82bc7bc0994caa97f8ea44660b9b5e796acfe72705b5ff7ed8f2a3c47ff37",
"optimizer_enabled": 0,
"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"
}
],
"unlinked_binary":
"0x6060604052341561000c57fe5b5b6102d48061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df61027e565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610284565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061028e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610296565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061029f565b6040518082815260200191505060405180910390f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a72305820b8fd6d6a6fe5fb53fa4968f246aad074b179498a6d15208c4b2d8be473df69420029",
"updated_at": 1517509621946
}
}
}

View File

@@ -0,0 +1,188 @@
{
"contract_name": "UnlimitedAllowanceToken",
"networks": {
"50": {
"solc_version": "0.4.18",
"keccak256": "0xfc55032f0942ce4081a9f8c3eacfa0bddf61e1fb76593c8d6514adcb97a96690",
"optimizer_enabled": 0,
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"stateMutability": "nonpayable",
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"stateMutability": "view",
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary":
"0x6060604052341561000f57600080fd5b6109808061001e6000396000f300606060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007d57806318160ddd146100d757806323b872dd1461010057806370a0823114610179578063a9059cbb146101c6578063dd62ed3e14610220575b600080fd5b341561008857600080fd5b6100bd600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061028c565b604051808215151515815260200191505060405180910390f35b34156100e257600080fd5b6100ea61037e565b6040518082815260200191505060405180910390f35b341561010b57600080fd5b61015f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610384565b604051808215151515815260200191505060405180910390f35b341561018457600080fd5b6101b0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506106a5565b6040518082815260200191505060405180910390f35b34156101d157600080fd5b610206600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106ed565b604051808215151515815260200191505060405180910390f35b341561022b57600080fd5b610276600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108cd565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60025481565b600080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104545750828110155b80156104de57506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156104e957600080fd5b826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8110156106345782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107bb57506000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b15156107c657600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050929150505600a165627a7a72305820fcfe717221cfe35887f7cf953f3c89ebf20f5cc389a92a5b68e2fd22c236d0e30029",
"updated_at": 1517509620184
}
}
}

View File

@@ -0,0 +1,182 @@
{
"contract_name": "UnlimitedAllowanceToken_v1",
"networks": {
"50": {
"solc_version": "0.4.11",
"keccak256": "0x3b548a72cde0786747f9bdf42901fcf51ec546ced40506335d28b0778e35d25a",
"optimizer_enabled": 0,
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary":
"0x6060604052341561000c57fe5b5b61098a8061001c6000396000f30060606040523615610076576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff168063095ea7b31461007857806318160ddd146100cf57806323b872dd146100f557806370a082311461016b578063a9059cbb146101b5578063dd62ed3e1461020c575bfe5b341561008057fe5b6100b5600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610275565b604051808215151515815260200191505060405180910390f35b34156100d757fe5b6100df610368565b6040518082815260200191505060405180910390f35b34156100fd57fe5b610151600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061036e565b604051808215151515815260200191505060405180910390f35b341561017357fe5b61019f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061069e565b6040518082815260200191505060405180910390f35b34156101bd57fe5b6101f2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506106e8565b604051808215151515815260200191505060405180910390f35b341561021457fe5b61025f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108d6565b6040518082815260200191505060405180910390f35b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60025481565b60006000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156104405750828110155b80156104cc5750600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b1561068c5782600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555082600060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81101561061e5782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150610696565b60009150610696565b5b509392505050565b6000600060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600081600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156107b95750600060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482600060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110155b156108c65781600060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190506108d0565b600090506108d0565b5b92915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b929150505600a165627a7a723058204c2e4edd6947d81382e4a79ca7070d2068e887e849a5998d8cd99e1ae7e4107b0029",
"updated_at": 1517509622346
}
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,394 +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"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b6107598061001c6000396000f300606060405236156100935763ffffffff60e060020a60003504166306fdde0381146100a4578063095ea7b31461013457806318160ddd1461016757806323b872dd146101895780632e1a7d4d146101c2578063313ce567146101d757806370a08231146101fd57806395d89b411461022b578063a9059cbb146102bb578063d0e30db0146102ee578063dd62ed3e146102f8575b6100a25b61009f61032c565b5b565b005b34156100ac57fe5b6100b461037b565b6040805160208082528351818301528351919283929083019185019080838382156100fa575b8051825260208311156100fa57601f1990920191602091820191016100da565b505050905090810190601f1680156101265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013c57fe5b610153600160a060020a03600435166024356103a3565b604080519115158252519081900360200190f35b341561016f57fe5b61017761040e565b60408051918252519081900360200190f35b341561019157fe5b610153600160a060020a0360043581169060243516604435610414565b604080519115158252519081900360200190f35b34156101ca57fe5b6100a2600435610537565b005b34156101df57fe5b6101e76105b8565b6040805160ff9092168252519081900360200190f35b341561020557fe5b610177600160a060020a03600435166105bd565b60408051918252519081900360200190f35b341561023357fe5b6100b46105dc565b6040805160208082528351818301528351919283929083019185019080838382156100fa575b8051825260208311156100fa57601f1990920191602091820191016100da565b505050905090810190601f1680156101265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156102c357fe5b610153600160a060020a03600435166024356105fd565b604080519115158252519081900360200190f35b6100a261032c565b005b341561030057fe5b610177600160a060020a03600435811690602435166106af565b60408051918252519081900360200190f35b600160a060020a03331660009081526020819052604090205461034f90346106dc565b600160a060020a03331660009081526020819052604090205560025461037590346106dc565b6002555b565b60408051808201909152600b815260a960020a6a22ba3432b9102a37b5b2b702602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906104575750828110155b801561047d5750600160a060020a03841660009081526020819052604090205483810110155b1561052957600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156104e757600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a031660008051602061070e833981519152856040518082815260200191505060405180910390a36001915061052e565b600091505b5b509392505050565b600160a060020a03331660009081526020819052604090205461055a90826106f6565b600160a060020a03331660009081526020819052604090205560025461058090826106f6565b600255604051600160a060020a0333169082156108fc029083906000818181858888f1935050505015156105b45760006000fd5b5b50565b601281565b600160a060020a0381166000908152602081905260409020545b919050565b604080518082019091526004815260e360020a630ae8aa8902602082015281565b600160a060020a0333166000908152602081905260408120548290108015906106405750600160a060020a03831660009081526020819052604090205482810110155b156106a057600160a060020a03338116600081815260208181526040808320805488900390559387168083529184902080548701905583518681529351919360008051602061070e833981519152929081900390910190a3506001610408565b506000610408565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156106eb57fe5b8091505b5092915050565b60008282111561070257fe5b508082035b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582036b62e75991ca24307fbb7333dc79a1493b9acb6b3e146e3c707708262cfbe430029",
"networks": {
"1": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1502488087000,
"address": "0x2956356cd2a2bf3202f771f50d3d14a367b48070"
},
"42": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1502391794392,
"address": "0x05d090b51c40b020eab3bfcb6a2dff130df22e9c"
},
"50": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1513088404209,
"address": "0x48bacb9266a570d521063ef5dd96e61686dbe788"
}
},
"schema_version": "0.0.5",
"updated_at": 1513088404209
}

File diff suppressed because one or more lines are too long

View File

@@ -1,227 +0,0 @@
{
"contract_name": "MaliciousToken",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary": "0x60606040526003805460ff19166001179055341561001957fe5b5b610467806100296000396000f3006060604052361561005c5763ffffffff60e060020a600035041663095ea7b3811461005e57806318160ddd1461009157806323b872dd146100b357806370a08231146100ec578063a9059cbb1461011a578063dd62ed3e1461014d575bfe5b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561009957fe5b6100a16101ec565b60408051918252519081900360200190f35b34156100bb57fe5b61007d600160a060020a03600435811690602435166044356101f2565b604080519115158252519081900360200190f35b34156100f457fe5b6100a1600160a060020a03600435166102ee565b60408051918252519081900360200190f35b341561012257fe5b61007d600160a060020a0360043516602435610318565b604080519115158252519081900360200190f35b341561015557fe5b6100a1600160a060020a03600435811690602435166103ca565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a0383166000908152602081905260408120548290108015906102425750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b80156102685750600160a060020a03831660009081526020819052604090205482810110155b156102e257600160a060020a03808416600081815260208181526040808320805488019055888516808452818420805489900390556001835281842033909616845294825291829020805487900390558151868152915192939260008051602061041c8339815191529281900390910190a35060016102e6565b5060005b5b9392505050565b60006102f8610402565b50600160a060020a0381166000908152602081905260409020545b919050565b600160a060020a03331660009081526020819052604081205482901080159061035b5750600160a060020a03831660009081526020819052604090205482810110155b156103bb57600160a060020a03338116600081815260208181526040808320805488900390559387168083529184902080548701905583518681529351919360008051602061041c833981519152929081900390910190a35060016101e6565b5060006101e6565b5b92915050565b60006103d4610402565b50600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6003805460ff8082166001011660ff199091161790555b5600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582078edadabd342b34dc605a47ad9eab0ab5ad8513193a546e042b2ab9c6101d5250029",
"networks": {
"50": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1513088404210
}
},
"schema_version": "0.0.5",
"updated_at": 1513088404210
}

View File

@@ -1,72 +0,0 @@
{
"contract_name": "Migrations",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "new_address",
"type": "address"
}
],
"name": "upgrade",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "last_completed_migration",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "completed",
"type": "uint256"
}
],
"name": "setCompleted",
"outputs": [],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b60008054600160a060020a03191633600160a060020a03161790555b5b6101a0806100396000396000f300606060405263ffffffff60e060020a6000350416630900f0108114610042578063445df0ac146100605780638da5cb5b14610082578063fdacd576146100ae575bfe5b341561004a57fe5b61005e600160a060020a03600435166100c3565b005b341561006857fe5b61007061013d565b60408051918252519081900360200190f35b341561008a57fe5b610092610143565b60408051600160a060020a039092168252519081900360200190f35b34156100b657fe5b61005e600435610152565b005b6000805433600160a060020a03908116911614156101375781905080600160a060020a031663fdacd5766001546040518263ffffffff1660e060020a02815260040180828152602001915050600060405180830381600087803b151561012557fe5b6102c65a03f1151561013357fe5b5050505b5b5b5050565b60015481565b600054600160a060020a031681565b60005433600160a060020a039081169116141561016f5760018190555b5b5b505600a165627a7a72305820721709a2522264b5277c3048b17bea0e0f660776a386bacb5f36796ba40dac1c0029",
"networks": {
"50": {
"links": {},
"events": {},
"updated_at": 1513088404203
}
},
"schema_version": "0.0.5",
"updated_at": 1513088404203
}

View File

@@ -1,189 +0,0 @@
{
"contract_name": "Mintable",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_value",
"type": "uint256"
}
],
"name": "mint",
"outputs": [],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b6105018061001c6000396000f300606060405236156100675763ffffffff60e060020a600035041663095ea7b3811461006957806318160ddd1461009c57806323b872dd146100be57806370a08231146100f7578063a0712d6814610125578063a9059cbb1461013a578063dd62ed3e1461016d575bfe5b341561007157fe5b610088600160a060020a03600435166024356101a1565b604080519115158252519081900360200190f35b34156100a457fe5b6100ac61020c565b60408051918252519081900360200190f35b34156100c657fe5b610088600160a060020a0360043581169060243516604435610212565b604080519115158252519081900360200190f35b34156100ff57fe5b6100ac600160a060020a0360043516610335565b60408051918252519081900360200190f35b341561012d57fe5b610138600435610354565b005b341561014257fe5b610088600160a060020a03600435166024356103bc565b604080519115158252519081900360200190f35b341561017557fe5b6100ac600160a060020a036004358116906024351661046e565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906102555750828110155b801561027b5750600160a060020a03841660009081526020819052604090205483810110155b1561032757600160a060020a03808516600090815260208190526040808220805487019055918716815220805484900390556000198110156102e557600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206104b6833981519152856040518082815260200191505060405180910390a36001915061032c565b600091505b5b509392505050565b600160a060020a0381166000908152602081905260409020545b919050565b68056bc75e2d6310000081111561036b5760006000fd5b600160a060020a03331660009081526020819052604090205461038f90829061049b565b600160a060020a0333166000908152602081905260409020556002546103b5908261049b565b6002555b50565b600160a060020a0333166000908152602081905260408120548290108015906103ff5750600160a060020a03831660009081526020819052604090205482810110155b1561045f57600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206104b6833981519152929081900390910190a3506001610206565b506000610206565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b92915050565b6000828201838110156104aa57fe5b8091505b50929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820b1c955ed24ff28cfa482298867cac2a83e25903b0100a429152919223fdf653f0029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1513088402049
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -1,40 +0,0 @@
{
"contract_name": "Ownable",
"abi": [
{
"constant": true,
"inputs": [],
"name": "owner",
"outputs": [
{
"name": "",
"type": "address"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"payable": false,
"type": "function"
},
{
"inputs": [],
"payable": false,
"type": "constructor"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b60008054600160a060020a03191633600160a060020a03161790555b5b60f3806100386000396000f300606060405263ffffffff60e060020a6000350416638da5cb5b8114602a578063f2fde38b146053575bfe5b3415603157fe5b6037606e565b60408051600160a060020a039092168252519081900360200190f35b3415605a57fe5b606c600160a060020a0360043516607d565b005b600054600160a060020a031681565b60005433600160a060020a0390811691161460985760006000fd5b600160a060020a0381161560c25760008054600160a060020a031916600160a060020a0383161790555b5b5b505600a165627a7a7230582048ccfb6ebb285c80c8b4030a0e4f2e6ec2a0619b363a2d7cd20692a0cfb170550029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1513088402049
}

View File

@@ -1,8 +0,0 @@
{
"contract_name": "SafeMath",
"abi": [],
"unlinked_binary": "0x60606040523415600b57fe5b5b60338060196000396000f30060606040525bfe00a165627a7a72305820becdc80300a4dbf834bb9ab115616eb459f82b51a9133d360eb1e6e5402072eb0029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1513088402049
}

View File

@@ -1,176 +0,0 @@
{
"contract_name": "StandardToken",
"abi": [
{
"constant": false,
"inputs": [
{
"name": "_spender",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_from",
"type": "address"
},
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"constant": false,
"inputs": [
{
"name": "_to",
"type": "address"
},
{
"name": "_value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"name": "",
"type": "bool"
}
],
"payable": false,
"type": "function"
},
{
"constant": true,
"inputs": [
{
"name": "_owner",
"type": "address"
},
{
"name": "_spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"payable": false,
"type": "function"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_from",
"type": "address"
},
{
"indexed": true,
"name": "_to",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "_owner",
"type": "address"
},
{
"indexed": true,
"name": "_spender",
"type": "address"
},
{
"indexed": false,
"name": "_value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b6104388061001c6000396000f3006060604052361561005c5763ffffffff60e060020a600035041663095ea7b3811461005e57806318160ddd1461009157806323b872dd146100b357806370a08231146100ec578063a9059cbb1461011a578063dd62ed3e1461014d575bfe5b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561009957fe5b6100a16101ec565b60408051918252519081900360200190f35b34156100bb57fe5b61007d600160a060020a03600435811690602435166044356101f2565b604080519115158252519081900360200190f35b34156100f457fe5b6100a1600160a060020a03600435166102ee565b60408051918252519081900360200190f35b341561012257fe5b61007d600160a060020a036004351660243561030d565b604080519115158252519081900360200190f35b341561015557fe5b6100a1600160a060020a03600435811690602435166103bf565b60408051918252519081900360200190f35b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60025481565b600160a060020a0383166000908152602081905260408120548290108015906102425750600160a060020a0380851660009081526001602090815260408083203390941683529290522054829010155b80156102685750600160a060020a03831660009081526020819052604090205482810110155b156102e257600160a060020a0380841660008181526020818152604080832080548801905588851680845281842080548990039055600183528184203390961684529482529182902080548790039055815186815291519293926000805160206103ed8339815191529281900390910190a35060016102e6565b5060005b5b9392505050565b600160a060020a0381166000908152602081905260409020545b919050565b600160a060020a0333166000908152602081905260408120548290108015906103505750600160a060020a03831660009081526020819052604090205482810110155b156103b057600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206103ed833981519152929081900390910190a35060016101e6565b5060006101e6565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582056d411baf4691cc9a0a55ffa6b4a4e9308ea12187fd2fa738228bbd266709d4d0029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1513088402049
}

View File

@@ -1,176 +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"
}
],
"unlinked_binary": "0x6060604052341561000c57fe5b5b6101e08061001c6000396000f3006060604052361561005c5763ffffffff60e060020a600035041663095ea7b3811461005e57806318160ddd1461009157806323b872dd146100b357806370a08231146100ec578063a9059cbb1461005e578063dd62ed3e1461014d575bfe5b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561009957fe5b6100a161018a565b60408051918252519081900360200190f35b34156100bb57fe5b61007d600160a060020a0360043581169060243516604435610190565b604080519115158252519081900360200190f35b34156100f457fe5b6100a1600160a060020a036004351661019a565b60408051918252519081900360200190f35b341561006657fe5b61007d600160a060020a0360043516602435610181565b604080519115158252519081900360200190f35b341561015557fe5b6100a1600160a060020a0360043581169060243516610181565b60408051918252519081900360200190f35b60005b92915050565b60005b90565b60005b9392505050565b60005b919050565b60005b92915050565b60005b929150505600a165627a7a72305820107c1e9e7aa669d21343c42639b4bb080602c349d00c1da14b8ea6b6dcc0b0f80029",
"networks": {},
"schema_version": "0.0.5",
"updated_at": 1513088402049
}

File diff suppressed because one or more lines are too long

View File

@@ -1,298 +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"
}
],
"unlinked_binary": "0x60606040525b60008054600160a060020a03191633600160a060020a03161790555b5b6106e6806100316000396000f300606060405236156100725763ffffffff60e060020a60003504166315dacbea811461007457806342f1181e146100b3578063494503d4146100d157806370712939146101005780638da5cb5b1461011e578063b91816111461014a578063d39de6e91461017a578063f2fde38b146101e5575bfe5b341561007c57fe5b61009f600160a060020a0360043581169060243581169060443516606435610203565b604080519115158252519081900360200190f35b34156100bb57fe5b6100cf600160a060020a03600435166102ae565b005b34156100d957fe5b6100e4600435610390565b60408051600160a060020a039092168252519081900360200190f35b341561010857fe5b6100cf600160a060020a03600435166103c2565b005b341561012657fe5b6100e461055a565b60408051600160a060020a039092168252519081900360200190f35b341561015257fe5b61009f600160a060020a0360043516610569565b604080519115158252519081900360200190f35b341561018257fe5b61018a61057e565b60408051602080825283518183015283519192839290830191858101910280838382156101d2575b8051825260208311156101d257601f1990920191602091820191016101b2565b5050509050019250505060405180910390f35b34156101ed57fe5b6100cf600160a060020a03600435166105e7565b005b600160a060020a03331660009081526001602052604081205460ff16151561022b5760006000fd5b6040805160006020918201819052825160e060020a6323b872dd028152600160a060020a0388811660048301528781166024830152604482018790529351938916936323b872dd9360648084019491938390030190829087803b151561028d57fe5b6102c65a03f1151561029b57fe5b5050604051519150505b5b949350505050565b60005433600160a060020a039081169116146102ca5760006000fd5b600160a060020a038116600090815260016020526040902054819060ff16156102f35760006000fd5b600160a060020a0382166000908152600160208190526040909120805460ff191682179055600280549091810161032a8382610633565b916000526020600020900160005b81546101009190910a600160a060020a0381810219909216868316918202179092556040513390911692507f94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca90600090a35b5b505b50565b600280548290811061039e57fe5b906000526020600020900160005b915054906101000a9004600160a060020a031681565b6000805433600160a060020a039081169116146103df5760006000fd5b600160a060020a038216600090815260016020526040902054829060ff1615156104095760006000fd5b600160a060020a0383166000908152600160205260408120805460ff1916905591505b6002548210156105195782600160a060020a031660028381548110151561044f57fe5b906000526020600020900160005b9054906101000a9004600160a060020a0316600160a060020a0316141561050d5760028054600019810190811061049057fe5b906000526020600020900160005b9054906101000a9004600160a060020a03166002838154811015156104bf57fe5b906000526020600020900160005b6101000a815481600160a060020a030219169083600160a060020a0316021790555060016002818180549050039150816105079190610633565b50610519565b5b60019091019061042c565b604051600160a060020a0333811691908516907ff5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c90600090a35b5b505b5050565b600054600160a060020a031681565b60016020526000908152604090205460ff1681565b610586610687565b60028054806020026020016040519081016040528092919081815260200182805480156105dc57602002820191906000526020600020905b8154600160a060020a031681526001909101906020018083116105be575b505050505090505b90565b60005433600160a060020a039081169116146106035760006000fd5b600160a060020a0381161561038d5760008054600160a060020a031916600160a060020a0383161790555b5b5b50565b81548183558181151161055357600083815260209020610553918101908301610699565b5b505050565b81548183558181151161055357600083815260209020610553918101908301610699565b5b505050565b60408051602081019091526000815290565b6105e491905b808211156106b3576000815560010161069f565b5090565b905600a165627a7a72305820f53c9547789a008ccb8f24999a7b6fb4c8fb20655522030c87ba624e1fdb67ea0029",
"networks": {
"1": {
"links": {},
"events": {
"0x94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressAdded",
"type": "event"
},
"0xf5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressRemoved",
"type": "event"
}
},
"updated_at": 1502478966000,
"address": "0x8da0d80f5007ef1e431dd2127178d224e32c2ef4"
},
"42": {
"links": {},
"events": {
"0x94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressAdded",
"type": "event"
},
"0xf5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressRemoved",
"type": "event"
}
},
"updated_at": 1502391794384,
"address": "0x087Eed4Bc1ee3DE49BeFbd66C662B434B15d49d4"
},
"50": {
"links": {},
"events": {
"0x94bb87f4c15c4587ff559a7584006fa01ddf9299359be6b512b94527aa961aca": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressAdded",
"type": "event"
},
"0xf5b347a1e40749dd050f5f07fbdbeb7e3efa9756903044dd29401fd1d4bb4a1c": {
"anonymous": false,
"inputs": [
{
"indexed": true,
"name": "target",
"type": "address"
},
{
"indexed": true,
"name": "caller",
"type": "address"
}
],
"name": "LogAuthorizedAddressRemoved",
"type": "event"
}
},
"updated_at": 1513088404202,
"address": "0x871dd7c2b4b25e1aa18728e9d5f2af4c4e431f5c"
}
},
"schema_version": "0.0.5",
"updated_at": 1513088404202
}

View File

@@ -1,373 +0,0 @@
{
"contract_name": "ZRXToken",
"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"
}
],
"unlinked_binary": "0x60606040526b033b2e3c9fd0803ce8000000600355341561001c57fe5b5b600354600160a060020a0333166000908152602081905260409020555b5b6106198061004a6000396000f3006060604052361561007d5763ffffffff60e060020a60003504166306fdde03811461007f578063095ea7b31461010f57806318160ddd1461014257806323b872dd14610164578063313ce5671461019d57806370a08231146101c357806395d89b41146101f1578063a9059cbb14610281578063dd62ed3e146102b4575bfe5b341561008757fe5b61008f6102e8565b6040805160208082528351818301528351919283929083019185019080838382156100d5575b8051825260208311156100d557601f1990920191602091820191016100b5565b505050905090810190601f1680156101015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561011757fe5b61012e600160a060020a0360043516602435610316565b604080519115158252519081900360200190f35b341561014a57fe5b610152610381565b60408051918252519081900360200190f35b341561016c57fe5b61012e600160a060020a0360043581169060243516604435610387565b604080519115158252519081900360200190f35b34156101a557fe5b6101ad6104aa565b6040805160ff9092168252519081900360200190f35b34156101cb57fe5b610152600160a060020a03600435166104af565b60408051918252519081900360200190f35b34156101f957fe5b61008f6104ce565b6040805160208082528351818301528351919283929083019185019080838382156100d5575b8051825260208311156100d557601f1990920191602091820191016100b5565b505050905090810190601f1680156101015780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561028957fe5b61012e600160a060020a03600435166024356104ee565b604080519115158252519081900360200190f35b34156102bc57fe5b610152600160a060020a03600435811690602435166105a0565b60408051918252519081900360200190f35b6040805180820190915260118152607960020a70183c10283937ba37b1b7b6102a37b5b2b702602082015281565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060015b92915050565b60035481565b600160a060020a03808416600081815260016020908152604080832033909516835293815283822054928252819052918220548390108015906103ca5750828110155b80156103f05750600160a060020a03841660009081526020819052604090205483810110155b1561049c57600160a060020a038085166000908152602081905260408082208054870190559187168152208054849003905560001981101561045a57600160a060020a03808616600090815260016020908152604080832033909416835292905220805484900390555b83600160a060020a031685600160a060020a03166000805160206105ce833981519152856040518082815260200191505060405180910390a3600191506104a1565b600091505b5b509392505050565b601281565b600160a060020a0381166000908152602081905260409020545b919050565b604080518082019091526003815260eb60020a620b4a4b02602082015281565b600160a060020a0333166000908152602081905260408120548290108015906105315750600160a060020a03831660009081526020819052604090205482810110155b1561059157600160a060020a0333811660008181526020818152604080832080548890039055938716808352918490208054870190558351868152935191936000805160206105ce833981519152929081900390910190a350600161037b565b50600061037b565b5b92915050565b600160a060020a038083166000908152600160209081526040808320938516835292905220545b929150505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058206964b3cfca2af9b1d1448e45eb8b04a5c1df55275a172242166d69e576e2a3b70029",
"networks": {
"1": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1502477311000,
"address": "0xe41d2489571d322189246dafa5ebde1f4699f498"
},
"42": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1502391794391,
"address": "0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570"
},
"50": {
"links": {},
"events": {
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef": {
"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"
},
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925": {
"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"
}
},
"updated_at": 1513088404207
}
},
"schema_version": "0.0.5",
"updated_at": 1513088404207
}

View File

@@ -1,38 +0,0 @@
pragma solidity 0.4.18;
import "./Mintable_v2.sol";
import "./../utils/Ownable_v2.sol";
contract DummyToken_v2 is Mintable_v2, Ownable_v2 {
string public name;
string public symbol;
uint public decimals;
function DummyToken_v2(
string _name,
string _symbol,
uint _decimals,
uint _totalSupply)
public
{
name = _name;
symbol = _symbol;
decimals = _decimals;
totalSupply = _totalSupply;
balances[msg.sender] = _totalSupply;
}
function setBalance(address _target, uint _value)
public
onlyOwner
{
uint currBalance = balanceOf(_target);
if (_value < currBalance) {
totalSupply = safeSub(totalSupply, safeSub(currBalance, _value));
} else {
totalSupply = safeAdd(totalSupply, safeSub(_value, currBalance));
}
balances[_target] = _value;
}
}

View File

@@ -1,19 +0,0 @@
pragma solidity 0.4.18;
import "./../tokens/UnlimitedAllowanceToken_v2.sol";
import "./../utils/SafeMath_v2.sol";
/*
* Mintable
* Base contract that creates a mintable UnlimitedAllowanceToken
*/
contract Mintable_v2 is UnlimitedAllowanceToken_v2, SafeMath_v2 {
function mint(uint _value)
public
{
require(_value <= 100000000000000000000);
balances[msg.sender] = safeAdd(_value, balances[msg.sender]);
totalSupply = safeAdd(totalSupply, _value);
}
}

View File

@@ -1,74 +0,0 @@
pragma solidity ^0.4.11;
contract SafeMath {
function safeMul(uint a, uint b)
internal
constant
returns (uint256)
{
uint c = a * b;
assert(a == 0 || c / a == b);
return c;
}
function safeDiv(uint a, uint b)
internal
constant
returns (uint256)
{
uint c = a / b;
return c;
}
function safeSub(uint a, uint b)
internal
constant
returns (uint256)
{
assert(b <= a);
return a - b;
}
function safeAdd(uint a, uint b)
internal
constant
returns (uint256)
{
uint c = a + b;
assert(c >= a);
return c;
}
function max64(uint64 a, uint64 b)
internal
constant
returns (uint64)
{
return a >= b ? a : b;
}
function min64(uint64 a, uint64 b)
internal
constant
returns (uint64)
{
return a < b ? a : b;
}
function max256(uint256 a, uint256 b)
internal
constant
returns (uint256)
{
return a >= b ? a : b;
}
function min256(uint256 a, uint256 b)
internal
constant
returns (uint256)
{
return a < b ? a : b;
}
}

View File

@@ -32,7 +32,3 @@ declare module 'ethereumjs-abi' {
const soliditySHA3: (argTypes: string[], args: any[]) => Buffer; const soliditySHA3: (argTypes: string[], args: any[]) => Buffer;
const methodID: (name: string, types: string[]) => Buffer; const methodID: (name: string, types: string[]) => Buffer;
} }
// Truffle injects the following into the global scope
declare var artifacts: any;
declare var contract: any;

View File

@@ -1,6 +0,0 @@
import { Artifacts } from '../util/artifacts';
const { Migrations } = new Artifacts(artifacts);
module.exports = (deployer: any) => {
deployer.deploy(Migrations);
};

View File

@@ -1,41 +0,0 @@
import { Artifacts } from '../util/artifacts';
import { MultiSigConfigByNetwork } from '../util/types';
const { MultiSigWalletWithTimeLock, TokenTransferProxy, EtherToken, TokenRegistry } = new Artifacts(artifacts);
let multiSigConfigByNetwork: MultiSigConfigByNetwork;
try {
/* tslint:disable */
const multiSigConfig = require('./config/multisig');
multiSigConfigByNetwork = multiSigConfig.multiSig;
/* tslint:enable */
} catch (e) {
multiSigConfigByNetwork = {};
}
module.exports = (deployer: any, network: string, accounts: string[]) => {
const defaultConfig = {
owners: [accounts[0], accounts[1]],
confirmationsRequired: 2,
secondsRequired: 0,
};
const config = multiSigConfigByNetwork[network] || defaultConfig;
if (network !== 'live') {
deployer
.deploy(MultiSigWalletWithTimeLock, config.owners, config.confirmationsRequired, config.secondsRequired)
.then(() => {
return deployer.deploy(TokenTransferProxy);
})
.then(() => {
return deployer.deploy(TokenRegistry);
})
.then(() => {
return deployer.deploy(EtherToken);
});
} else {
deployer.deploy([
[MultiSigWalletWithTimeLock, config.owners, config.confirmationsRequired, config.secondsRequired],
TokenTransferProxy,
TokenRegistry,
]);
}
};

View File

@@ -1,95 +0,0 @@
import * as Bluebird from 'bluebird';
import * as _ from 'lodash';
import { Artifacts } from '../util/artifacts';
import { constants } from '../util/constants';
import { ContractInstance, Token } from '../util/types';
import { tokenInfo } from './config/token_info';
const { DummyToken, EtherToken, ZRXToken, TokenRegistry } = new Artifacts(artifacts);
module.exports = (deployer: any, network: string) => {
const tokens = network === 'live' ? tokenInfo.live : tokenInfo.development;
deployer
.then(() => {
return TokenRegistry.deployed();
})
.then((tokenRegistry: ContractInstance) => {
if (network !== 'live') {
const totalSupply = Math.pow(10, 18) * 1000000000;
return Bluebird.each(
tokens.map((token: Token) => DummyToken.new(token.name, token.symbol, token.decimals, totalSupply)),
_.noop,
).then((dummyTokens: ContractInstance[]) => {
const weth = {
address: EtherToken.address,
name: 'Ether Token',
symbol: 'WETH',
url: '',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
};
return Bluebird.each(
dummyTokens
.map((tokenContract: ContractInstance, i: number) => {
const token = tokens[i];
return tokenRegistry.addToken(
tokenContract.address,
token.name,
token.symbol,
token.decimals,
token.ipfsHash,
token.swarmHash,
);
})
.concat(
tokenRegistry.addToken(
weth.address,
weth.name,
weth.symbol,
weth.decimals,
weth.ipfsHash,
weth.swarmHash,
),
),
_.noop,
);
});
} else {
const zrx = {
address: ZRXToken.address,
name: '0x Protocol Token',
symbol: 'ZRX',
url: 'https://www.0xproject.com/',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
};
return Bluebird.each(
tokens
.map((token: Token) => {
return tokenRegistry.addToken(
token.address,
token.name,
token.symbol,
token.decimals,
token.ipfsHash,
token.swarmHash,
);
})
.concat(
tokenRegistry.addToken(
zrx.address,
zrx.name,
zrx.symbol,
zrx.decimals,
zrx.ipfsHash,
zrx.swarmHash,
),
),
_.noop,
);
}
});
};

View File

@@ -1,22 +0,0 @@
import { Artifacts } from '../util/artifacts';
import { ContractInstance } from '../util/types';
const { TokenTransferProxy, Exchange, TokenRegistry } = new Artifacts(artifacts);
let tokenTransferProxy: ContractInstance;
module.exports = (deployer: any) => {
deployer
.then(async () => {
return Promise.all([TokenTransferProxy.deployed(), TokenRegistry.deployed()]);
})
.then((instances: ContractInstance[]) => {
let tokenRegistry: ContractInstance;
[tokenTransferProxy, tokenRegistry] = instances;
return tokenRegistry.getTokenAddressBySymbol('ZRX');
})
.then((ptAddress: string) => {
return deployer.deploy(Exchange, ptAddress, tokenTransferProxy.address);
})
.then(() => {
return tokenTransferProxy.addAuthorizedAddress(Exchange.address);
});
};

View File

@@ -1,20 +0,0 @@
import { Artifacts } from '../util/artifacts';
import { ContractInstance } from '../util/types';
const { TokenTransferProxy, MultiSigWalletWithTimeLock, TokenRegistry } = new Artifacts(artifacts);
let tokenRegistry: ContractInstance;
module.exports = (deployer: any, network: string) => {
if (network !== 'development') {
deployer.then(async () => {
return Promise.all([TokenTransferProxy.deployed(), TokenRegistry.deployed()])
.then((instances: ContractInstance[]) => {
let tokenTransferProxy: ContractInstance;
[tokenTransferProxy, tokenRegistry] = instances;
return tokenTransferProxy.transferOwnership(MultiSigWalletWithTimeLock.address);
})
.then(() => {
return tokenRegistry.transferOwnership(MultiSigWalletWithTimeLock.address);
});
});
}
};

View File

@@ -1,10 +0,0 @@
import { MultiSigConfigByNetwork } from '../../util/types';
// Make a copy of this file named `multisig.js` and input custom params as needed
export const multiSig: MultiSigConfigByNetwork = {
kovan: {
owners: [],
confirmationsRequired: 0,
secondsRequired: 0,
},
};

View File

@@ -1,99 +0,0 @@
import { constants } from '../../util/constants';
import { TokenInfoByNetwork } from '../../util/types';
export const tokenInfo: TokenInfoByNetwork = {
development: [
{
name: '0x Protocol Token',
symbol: 'ZRX',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
name: 'Augur Reputation Token',
symbol: 'REP',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
name: 'Digix DAO Token',
symbol: 'DGD',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
name: 'Golem Network Token',
symbol: 'GNT',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
name: 'MakerDAO',
symbol: 'MKR',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
name: 'Melon Token',
symbol: 'MLN',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
],
live: [
{
address: '0xecf8f87f810ecf450940c9f60066b4a7a501d6a7',
name: 'ETH Wrapper Token',
symbol: 'WETH',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
address: '0x48c80f1f4d53d5951e5d5438b54cba84f29f32a5',
name: 'Augur Reputation Token',
symbol: 'REP',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
address: '0xe0b7927c4af23765cb51314a0e0521a9645f0e2a',
name: 'Digix DAO Token',
symbol: 'DGD',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
address: '0xa74476443119a942de498590fe1f2454d7d4ac0d',
name: 'Golem Network Token',
symbol: 'GNT',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
address: '0xc66ea802717bfb9833400264dd12c2bceaa34a6d',
name: 'MakerDAO',
symbol: 'MKR',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
{
address: '0xbeb9ef514a379b997e0798fdcc901ee474b6d9a1',
name: 'Melon Token',
symbol: 'MLN',
decimals: 18,
ipfsHash: constants.NULL_BYTES,
swarmHash: constants.NULL_BYTES,
},
],
};

View File

@@ -1,15 +1,19 @@
{ {
"private": true, "private": true,
"name": "contracts", "name": "contracts",
"version": "2.1.7", "version": "2.1.8",
"description": "Smart contract components of 0x protocol", "description": "Smart contract components of 0x protocol",
"main": "index.js", "main": "index.js",
"directories": { "directories": {
"test": "test" "test": "test"
}, },
"scripts": { "scripts": {
"build": "rm -rf ./lib; copyfiles ./build/**/* ./deploy/solc/solc_bin/* ./deploy/test/fixtures/contracts/**/* ./deploy/test/fixtures/contracts/* ./lib; tsc;", "build:watch": "tsc -w",
"test": "npm run build; truffle test", "prebuild": "run-s clean copy_artifacts",
"copy_artifacts": "copyfiles './artifacts/**/*' ./lib",
"build": "tsc",
"test": "run-s compile build run_mocha",
"run_mocha": "mocha 'lib/test/**/*.js' --timeout 10000 --bail --exit",
"compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846", "compile:comment": "Yarn workspaces do not link binaries correctly so we need to reference them directly https://github.com/yarnpkg/yarn/issues/3846",
"compile": "node ../deployer/lib/src/cli.js compile", "compile": "node ../deployer/lib/src/cli.js compile",
"clean": "rm -rf ./lib", "clean": "rm -rf ./lib",
@@ -28,9 +32,9 @@
}, },
"homepage": "https://github.com/0xProject/0x.js/packages/contracts/README.md", "homepage": "https://github.com/0xProject/0x.js/packages/contracts/README.md",
"devDependencies": { "devDependencies": {
"@0xproject/dev-utils": "^0.0.8", "@0xproject/dev-utils": "^0.0.9",
"@0xproject/tslint-config": "^0.4.5", "@0xproject/tslint-config": "^0.4.6",
"@0xproject/types": "^0.1.7", "@0xproject/types": "^0.1.8",
"@types/bluebird": "^3.5.3", "@types/bluebird": "^3.5.3",
"@types/lodash": "^4.14.86", "@types/lodash": "^4.14.86",
"@types/node": "^8.0.53", "@types/node": "^8.0.53",
@@ -38,27 +42,27 @@
"@types/yargs": "^10.0.0", "@types/yargs": "^10.0.0",
"chai": "^4.0.1", "chai": "^4.0.1",
"chai-as-promised": "^7.1.0", "chai-as-promised": "^7.1.0",
"chai-as-promised-typescript-typings": "^0.0.7", "chai-as-promised-typescript-typings": "^0.0.8",
"chai-bignumber": "^2.0.1", "chai-bignumber": "^2.0.1",
"chai-typescript-typings": "^0.0.2", "chai-typescript-typings": "^0.0.2",
"copyfiles": "^1.2.0", "copyfiles": "^1.2.0",
"dirty-chai": "^2.0.1", "dirty-chai": "^2.0.1",
"mocha": "^4.0.1", "mocha": "^4.0.1",
"npm-run-all": "^4.1.2",
"solc": "^0.4.18", "solc": "^0.4.18",
"truffle": "^4.0.1",
"tslint": "5.8.0", "tslint": "5.8.0",
"types-bn": "^0.0.1", "types-bn": "^0.0.1",
"types-ethereumjs-util": "0xProject/types-ethereumjs-util", "types-ethereumjs-util": "0xproject/types-ethereumjs-util",
"typescript": "~2.6.1", "typescript": "2.7.1",
"web3-typescript-typings": "^0.9.7", "web3-typescript-typings": "^0.9.8",
"yargs": "^10.0.3" "yargs": "^10.0.3"
}, },
"dependencies": { "dependencies": {
"0x.js": "^0.31.0", "0x.js": "^0.31.1",
"@0xproject/deployer": "^0.0.4", "@0xproject/deployer": "^0.0.5",
"@0xproject/json-schemas": "^0.7.6", "@0xproject/json-schemas": "^0.7.7",
"@0xproject/utils": "^0.2.3", "@0xproject/utils": "^0.2.4",
"@0xproject/web3-wrapper": "^0.1.8", "@0xproject/web3-wrapper": "^0.1.9",
"bluebird": "^3.5.0", "bluebird": "^3.5.0",
"bn.js": "^4.11.8", "bn.js": "^4.11.8",
"ethereumjs-abi": "^0.6.4", "ethereumjs-abi": "^0.6.4",

View File

@@ -1,4 +1,4 @@
pragma solidity ^0.4.11; pragma solidity ^0.4.10;
/// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution. /// @title Multisignature wallet - Allows multiple parties to agree on transactions before execution.
/// @author Stefan George - <stefan.george@consensys.net> /// @author Stefan George - <stefan.george@consensys.net>

View File

@@ -16,9 +16,9 @@
*/ */
pragma solidity ^0.4.11; pragma solidity ^0.4.10;
import "./MultiSigWallet.sol"; import { MultiSigWallet } from "../MultiSigWallet/MultiSigWallet.sol";
/// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed. /// @title Multisignature wallet with time lock- Allows multiple parties to execute a transaction after a time lock has passed.
/// @author Amir Bandeali - <amir@0xProject.com> /// @author Amir Bandeali - <amir@0xProject.com>
@@ -130,4 +130,3 @@ contract MultiSigWalletWithTimeLock is MultiSigWallet {
ConfirmationTimeSet(transactionId, confirmationTime); ConfirmationTimeSet(transactionId, confirmationTime);
} }
} }

View File

@@ -16,9 +16,9 @@
*/ */
pragma solidity ^0.4.11; pragma solidity ^0.4.10;
import "./MultiSigWalletWithTimeLock.sol"; import { MultiSigWalletWithTimeLock } from "../MultiSigWalletWithTimeLock/MultiSigWalletWithTimeLock.sol";
contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock { contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWalletWithTimeLock {
@@ -80,4 +80,3 @@ contract MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress is MultiSigWall
return true; return true;
} }
} }

View File

@@ -16,11 +16,11 @@
*/ */
pragma solidity ^0.4.11; pragma solidity ^0.4.14;
import "./TokenTransferProxy.sol"; import { TokenTransferProxy } from "../TokenTransferProxy/TokenTransferProxy.sol";
import "./tokens/Token.sol"; import { Token_v1 as Token } from "../../../previous/Token/Token_v1.sol";
import "./utils/SafeMath.sol"; import { SafeMath_v1 as SafeMath } from "../../../previous/SafeMath/SafeMath_v1.sol";
/// @title Exchange - Facilitates exchange of ERC20 tokens. /// @title Exchange - Facilitates exchange of ERC20 tokens.
/// @author Amir Bandeali - <amir@0xProject.com>, Will Warren - <will@0xProject.com> /// @author Amir Bandeali - <amir@0xProject.com>, Will Warren - <will@0xProject.com>
@@ -600,4 +600,3 @@ contract Exchange is SafeMath {
return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy return Token(token).allowance.gas(EXTERNAL_QUERY_GAS_LIMIT)(owner, TOKEN_TRANSFER_PROXY_CONTRACT); // Limit gas to prevent reentrancy
} }
} }

Some files were not shown because too many files have changed in this diff Show More