Normalize the dependencies
This commit is contained in:
parent
2f65fadeaa
commit
1e9147b8bb
@ -2,27 +2,24 @@
|
||||
"name": "0x.js",
|
||||
"version": "0.31.0",
|
||||
"description": "A javascript library for interacting with the 0x protocol",
|
||||
"keywords": [
|
||||
"0x.js",
|
||||
"0xproject",
|
||||
"ethereum",
|
||||
"tokens",
|
||||
"exchange"
|
||||
],
|
||||
"keywords": ["0x.js", "0xproject", "ethereum", "tokens", "exchange"],
|
||||
"main": "lib/src/index.js",
|
||||
"types": "lib/src/index.d.ts",
|
||||
"scripts": {
|
||||
"prebuild": "run-s clean generate_contract_wrappers",
|
||||
"build": "run-p build:umd:prod build:commonjs; exit 0;",
|
||||
"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",
|
||||
"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",
|
||||
"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",
|
||||
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
|
||||
"test:circleci": "run-s test:coverage report_test_coverage",
|
||||
"test": "run-s clean test:commonjs",
|
||||
"test:coverage": "nyc npm run test --all",
|
||||
"report_test_coverage": "nyc report --reporter=text-lcov | coveralls",
|
||||
"update_contracts": "for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;",
|
||||
"update_contracts":
|
||||
"for i in ${npm_package_config_artifacts}; do copyfiles -u 4 ../contracts/build/contracts/$i.json ../0x.js/src/artifacts; done;",
|
||||
"clean": "shx rm -rf _bundles lib test_temp",
|
||||
"build:umd:prod": "NODE_ENV=production webpack",
|
||||
"build:commonjs": "tsc && copyfiles -u 2 './src/artifacts/**/*.json' ./lib/src/artifacts;",
|
||||
@ -66,7 +63,7 @@
|
||||
"nyc": "^11.0.1",
|
||||
"opn-cli": "^3.1.0",
|
||||
"request": "^2.81.0",
|
||||
"request-promise-native": "^1.0.4",
|
||||
"request-promise-native": "^1.0.5",
|
||||
"shx": "^0.2.2",
|
||||
"sinon": "^4.0.0",
|
||||
"source-map-support": "^0.5.0",
|
||||
@ -89,7 +86,7 @@
|
||||
"ethereumjs-abi": "^0.6.4",
|
||||
"ethereumjs-blockstream": "^2.0.6",
|
||||
"ethereumjs-util": "^5.1.1",
|
||||
"js-sha3": "^0.6.1",
|
||||
"js-sha3": "^0.7.0",
|
||||
"lodash": "^4.17.4",
|
||||
"uuid": "^3.1.0",
|
||||
"web3": "^0.20.0"
|
||||
|
@ -1,6 +1,6 @@
|
||||
import { schemas } from '@0xproject/json-schemas';
|
||||
import { AbiDecoder, BigNumber } from '@0xproject/utils';
|
||||
import { LogWithDecodedArgs } from '@0xproject/types';
|
||||
import { AbiDecoder, BigNumber } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import * as _ from 'lodash';
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ContractEventArg, DecodedLogArgs, LogWithDecodedArgs, TransactionReceipt } from '@0xproject/types';
|
||||
import { ContractEventArg, LogWithDecodedArgs } from '@0xproject/types';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as Web3 from 'web3';
|
||||
|
||||
|
@ -9,15 +9,13 @@
|
||||
"url": "git+https://github.com/0xProject/0x.js.git"
|
||||
},
|
||||
"author": "Fabio Berger",
|
||||
"contributors": [
|
||||
"Leonid Logvinov <logvinov.leon@gmail.com>"
|
||||
],
|
||||
"contributors": ["Leonid Logvinov <logvinov.leon@gmail.com>"],
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/0xProject/0x.js/issues"
|
||||
},
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/chai-as-promised-typescript-typings#readme",
|
||||
"dependencies": {
|
||||
"chai-typescript-typings": "^0.0.0"
|
||||
"chai-typescript-typings": "^0.0.2"
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@
|
||||
"truffle": "^4.0.1",
|
||||
"tslint": "5.8.0",
|
||||
"types-bn": "^0.0.1",
|
||||
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
|
||||
"types-ethereumjs-util": "0xproject/types-ethereumjs-util",
|
||||
"typescript": "~2.6.1",
|
||||
"web3-typescript-typings": "^0.9.7",
|
||||
"yargs": "^10.0.3"
|
||||
|
@ -147,9 +147,8 @@ describe('Exchange', () => {
|
||||
takerTokenAmount: new BigNumber(3),
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountBefore).to.be.bignumber.equal(0);
|
||||
|
||||
const fillTakerTokenAmount1 = new BigNumber(2);
|
||||
@ -157,9 +156,8 @@ describe('Exchange', () => {
|
||||
fillTakerTokenAmount: fillTakerTokenAmount1,
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountAfter1 = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter1 = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountAfter1).to.be.bignumber.equal(fillTakerTokenAmount1);
|
||||
|
||||
const fillTakerTokenAmount2 = new BigNumber(1);
|
||||
@ -167,9 +165,8 @@ describe('Exchange', () => {
|
||||
fillTakerTokenAmount: fillTakerTokenAmount2,
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountAfter2 = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter2 = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountAfter2).to.be.bignumber.equal(filledTakerTokenAmountAfter1);
|
||||
});
|
||||
|
||||
@ -179,17 +176,15 @@ describe('Exchange', () => {
|
||||
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18),
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountBefore).to.be.bignumber.equal(0);
|
||||
|
||||
const fillTakerTokenAmount = order.params.takerTokenAmount.div(2);
|
||||
await exWrapper.fillOrderAsync(order, taker, { fillTakerTokenAmount });
|
||||
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountAfter).to.be.bignumber.equal(fillTakerTokenAmount);
|
||||
|
||||
const newBalances = await dmyBalances.getAsync();
|
||||
@ -232,17 +227,15 @@ describe('Exchange', () => {
|
||||
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(100), 18),
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountBefore).to.be.bignumber.equal(0);
|
||||
|
||||
const fillTakerTokenAmount = order.params.takerTokenAmount.div(2);
|
||||
await exWrapper.fillOrderAsync(order, taker, { fillTakerTokenAmount });
|
||||
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountAfter).to.be.bignumber.equal(fillTakerTokenAmount);
|
||||
|
||||
const newBalances = await dmyBalances.getAsync();
|
||||
@ -285,17 +278,15 @@ describe('Exchange', () => {
|
||||
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18),
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountBefore).to.be.bignumber.equal(0);
|
||||
|
||||
const fillTakerTokenAmount = order.params.takerTokenAmount.div(2);
|
||||
await exWrapper.fillOrderAsync(order, taker, { fillTakerTokenAmount });
|
||||
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountAfter).to.be.bignumber.equal(fillTakerTokenAmount);
|
||||
|
||||
const newBalances = await dmyBalances.getAsync();
|
||||
@ -339,17 +330,15 @@ describe('Exchange', () => {
|
||||
takerTokenAmount: ZeroEx.toBaseUnitAmount(new BigNumber(200), 18),
|
||||
});
|
||||
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountBefore = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
expect(filledTakerTokenAmountBefore).to.be.bignumber.equal(0);
|
||||
|
||||
const fillTakerTokenAmount = order.params.takerTokenAmount.div(2);
|
||||
await exWrapper.fillOrderAsync(order, taker, { fillTakerTokenAmount });
|
||||
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(
|
||||
order.params.orderHashHex,
|
||||
);
|
||||
const filledTakerTokenAmountAfter = await zeroEx.exchange.getFilledTakerAmountAsync(order.params
|
||||
.orderHashHex as string);
|
||||
const expectedFillAmountTAfter = fillTakerTokenAmount.add(filledTakerTokenAmountBefore);
|
||||
expect(filledTakerTokenAmountAfter).to.be.bignumber.equal(expectedFillAmountTAfter);
|
||||
|
||||
@ -678,7 +667,7 @@ describe('Exchange', () => {
|
||||
expect(newBalances).to.be.deep.equal(balances);
|
||||
});
|
||||
|
||||
it.skip('should throw if getBalance or getAllowance attempts to change state and \
|
||||
it('should throw if getBalance or getAllowance attempts to change state and \
|
||||
shouldThrowOnInsufficientBalanceOrAllowance = false', async () => {
|
||||
const maliciousToken = await deployer.deployAsync('MaliciousToken');
|
||||
await maliciousToken.approve(tokenTransferProxy.address, INITIAL_ALLOWANCE, { from: taker });
|
||||
@ -691,7 +680,7 @@ describe('Exchange', () => {
|
||||
exWrapper.fillOrderAsync(order, taker, {
|
||||
shouldThrowOnInsufficientBalanceOrAllowance: false,
|
||||
}),
|
||||
).to.be.rejectedWith(constants.REVERT);
|
||||
).to.be.rejectedWith(constants.INVALID_OPCODE);
|
||||
});
|
||||
|
||||
it('should not change balances if an order is expired', async () => {
|
||||
|
@ -175,7 +175,7 @@ describe('TokenRegistry', () => {
|
||||
});
|
||||
|
||||
it('should change the token symbol when called by owner', async () => {
|
||||
const res = await tokenReg.setTokenSymbol(token1.address, token2.symbol, { from: owner });
|
||||
await tokenReg.setTokenSymbol(token1.address, token2.symbol, { from: owner });
|
||||
const [newData, oldData] = await Promise.all([
|
||||
tokenRegWrapper.getTokenBySymbolAsync(token2.symbol),
|
||||
tokenRegWrapper.getTokenBySymbolAsync(token1.symbol),
|
||||
@ -216,7 +216,7 @@ describe('TokenRegistry', () => {
|
||||
|
||||
it('should remove token metadata when called by owner', async () => {
|
||||
const index = 0;
|
||||
const res = await tokenReg.removeToken(token1.address, index, {
|
||||
await tokenReg.removeToken(token1.address, index, {
|
||||
from: owner,
|
||||
});
|
||||
const tokenData = await tokenRegWrapper.getTokenMetaDataAsync(token1.address);
|
||||
|
@ -4,8 +4,6 @@
|
||||
"outDir": "lib",
|
||||
"baseUrl": ".",
|
||||
"declaration": false,
|
||||
"strictNullChecks": false,
|
||||
"strictFunctionTypes": false,
|
||||
"allowJs": true
|
||||
},
|
||||
"include": [
|
||||
|
@ -1,4 +1,4 @@
|
||||
import { ExchangeContractEventArgs, TransactionReceiptWithDecodedLogs, ZeroEx } from '0x.js';
|
||||
import { TransactionReceiptWithDecodedLogs, ZeroEx } from '0x.js';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import * as _ from 'lodash';
|
||||
import * as Web3 from 'web3';
|
||||
@ -108,9 +108,14 @@ export class ExchangeWrapper {
|
||||
public async batchFillOrKillOrdersAsync(
|
||||
orders: Order[],
|
||||
from: string,
|
||||
opts: { fillTakerTokenAmounts?: BigNumber[] } = {},
|
||||
opts: { fillTakerTokenAmounts?: BigNumber[]; shouldThrowOnInsufficientBalanceOrAllowance?: boolean } = {},
|
||||
): Promise<TransactionReceiptWithDecodedLogs> {
|
||||
const params = formatters.createBatchFill(orders, undefined, opts.fillTakerTokenAmounts);
|
||||
const shouldThrowOnInsufficientBalanceOrAllowance = !!opts.shouldThrowOnInsufficientBalanceOrAllowance;
|
||||
const params = formatters.createBatchFill(
|
||||
orders,
|
||||
shouldThrowOnInsufficientBalanceOrAllowance,
|
||||
opts.fillTakerTokenAmounts,
|
||||
);
|
||||
const txHash = await this._exchange.batchFillOrKillOrders(
|
||||
params.orderAddresses,
|
||||
params.orderValues,
|
||||
@ -128,10 +133,7 @@ export class ExchangeWrapper {
|
||||
public async fillOrdersUpToAsync(
|
||||
orders: Order[],
|
||||
from: string,
|
||||
opts: {
|
||||
fillTakerTokenAmount?: BigNumber;
|
||||
shouldThrowOnInsufficientBalanceOrAllowance?: boolean;
|
||||
} = {},
|
||||
opts: { fillTakerTokenAmount: BigNumber; shouldThrowOnInsufficientBalanceOrAllowance?: boolean },
|
||||
): Promise<TransactionReceiptWithDecodedLogs> {
|
||||
const shouldThrowOnInsufficientBalanceOrAllowance = !!opts.shouldThrowOnInsufficientBalanceOrAllowance;
|
||||
const params = formatters.createFillUpTo(
|
||||
|
@ -35,9 +35,9 @@ export const formatters = {
|
||||
order.params.expirationTimestampInSec,
|
||||
order.params.salt,
|
||||
]);
|
||||
batchFill.v.push(order.params.v);
|
||||
batchFill.r.push(order.params.r);
|
||||
batchFill.s.push(order.params.s);
|
||||
batchFill.v.push(order.params.v as number);
|
||||
batchFill.r.push(order.params.r as string);
|
||||
batchFill.s.push(order.params.s as string);
|
||||
if (fillTakerTokenAmounts.length < orders.length) {
|
||||
batchFill.fillTakerTokenAmounts.push(order.params.takerTokenAmount);
|
||||
}
|
||||
@ -74,9 +74,9 @@ export const formatters = {
|
||||
order.params.expirationTimestampInSec,
|
||||
order.params.salt,
|
||||
]);
|
||||
fillUpTo.v.push(order.params.v);
|
||||
fillUpTo.r.push(order.params.r);
|
||||
fillUpTo.s.push(order.params.s);
|
||||
fillUpTo.v.push(order.params.v as number);
|
||||
fillUpTo.r.push(order.params.r as string);
|
||||
fillUpTo.s.push(order.params.s as string);
|
||||
});
|
||||
return fillUpTo;
|
||||
},
|
||||
|
@ -1,16 +1,11 @@
|
||||
import { BigNumber, promisify } from '@0xproject/utils';
|
||||
import { BigNumber } from '@0xproject/utils';
|
||||
import { Web3Wrapper } from '@0xproject/web3-wrapper';
|
||||
import ethUtil = require('ethereumjs-util');
|
||||
import * as _ from 'lodash';
|
||||
import Web3 = require('web3');
|
||||
|
||||
import { crypto } from './crypto';
|
||||
import { OrderParams } from './types';
|
||||
|
||||
// In order to benefit from type-safety, we re-assign the global web3 instance injected by Truffle
|
||||
// with type `any` to a variable of type `Web3`.
|
||||
const web3: Web3 = (global as any).web3;
|
||||
|
||||
export class Order {
|
||||
public params: OrderParams;
|
||||
private _web3Wrapper: Web3Wrapper;
|
||||
|
@ -13,7 +13,7 @@ export class OrderFactory {
|
||||
this._defaultOrderParams = defaultOrderParams;
|
||||
this._web3Wrapper = web3Wrapper;
|
||||
}
|
||||
public async newSignedOrderAsync(customOrderParams: OptionalOrderParams = {}) {
|
||||
public async newSignedOrderAsync(customOrderParams: OptionalOrderParams = {}): Promise<Order> {
|
||||
const randomExpiration = new BigNumber(Math.floor((Date.now() + Math.random() * 100000000000) / 1000));
|
||||
const orderParams: OrderParams = _.assign(
|
||||
{},
|
||||
|
@ -34,7 +34,7 @@
|
||||
"web3-typescript-typings": "^0.9.7"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/utils": "^0.1.3",
|
||||
"@0xproject/utils": "^0.2.1",
|
||||
"@0xproject/web3-wrapper": "^0.1.8",
|
||||
"lodash": "^4.17.4",
|
||||
"solc": "^0.4.18",
|
||||
|
@ -21,12 +21,12 @@
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^0.4.5",
|
||||
"@types/lodash": "^4.14.86",
|
||||
"@0xproject/types": "^0.1.4",
|
||||
"@0xproject/types": "^0.1.5",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.8.0",
|
||||
"types-bn": "^0.0.1",
|
||||
"types-ethereumjs-util": "0xProject/types-ethereumjs-util",
|
||||
"types-ethereumjs-util": "0xproject/types-ethereumjs-util",
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -49,7 +49,7 @@
|
||||
"types-bn": "^0.0.1",
|
||||
"types-ethereumjs-util": "0xproject/types-ethereumjs-util",
|
||||
"typescript": "~2.6.1",
|
||||
"web3-typescript-typings": "^0.7.2",
|
||||
"web3-typescript-typings": "^0.9.5",
|
||||
"webpack": "^3.1.0"
|
||||
}
|
||||
}
|
||||
|
@ -22,11 +22,10 @@
|
||||
"@0xproject/tslint-config": "^0.4.5",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.8.0",
|
||||
"web3-typescript-typings": "^0.9.4",
|
||||
"web3-typescript-typings": "^0.9.5",
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
"@0xproject/utils": "^0.2.3",
|
||||
"bignumber.js": "~4.1.0",
|
||||
"web3": "^0.20.0"
|
||||
}
|
||||
|
@ -20,12 +20,12 @@
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/utils/README.md",
|
||||
"devDependencies": {
|
||||
"@0xproject/tslint-config": "^0.4.5",
|
||||
"@0xproject/types": "^0.1.4",
|
||||
"@0xproject/types": "^0.1.5",
|
||||
"@types/lodash": "^4.14.86",
|
||||
"npm-run-all": "^4.1.2",
|
||||
"shx": "^0.2.2",
|
||||
"tslint": "5.8.0",
|
||||
"web3-typescript-typings": "^0.9.4",
|
||||
"web3-typescript-typings": "^0.9.5",
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
"dependencies": {
|
||||
|
@ -3,6 +3,7 @@ import * as _ from 'lodash';
|
||||
import * as Web3 from 'web3';
|
||||
import * as SolidityCoder from 'web3/lib/solidity/coder';
|
||||
|
||||
// tslint:disable-next-line:no-unused-variable
|
||||
import { BigNumber } from './configured_bignumber';
|
||||
|
||||
export class AbiDecoder {
|
||||
|
@ -12,9 +12,7 @@
|
||||
"url": "git+https://github.com/0xProject/0x.js.git"
|
||||
},
|
||||
"author": "Fabio Berger",
|
||||
"contributors": [
|
||||
"Leonid Logvinov <logvinov.leon@gmail.com>"
|
||||
],
|
||||
"contributors": ["Leonid Logvinov <logvinov.leon@gmail.com>"],
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/0xProject/0x.js/issues"
|
||||
@ -22,7 +20,7 @@
|
||||
"homepage": "https://github.com/0xProject/0x.js/packages/web3-typescript-typings#readme",
|
||||
"devDependencies": {
|
||||
"@types/bignumber.js": "^4.0.2",
|
||||
"tslint": "^5.5.0",
|
||||
"tslint": "5.8.0",
|
||||
"tslint-config-0xproject": "^0.0.2",
|
||||
"typescript": "~2.6.1"
|
||||
},
|
||||
|
65
yarn.lock
65
yarn.lock
@ -2,14 +2,6 @@
|
||||
# yarn lockfile v1
|
||||
|
||||
|
||||
"@0xproject/utils@^0.1.3":
|
||||
version "0.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@0xproject/utils/-/utils-0.1.3.tgz#58a9c7e19ab7710e0af17a0c2f1c7fc1b3140e85"
|
||||
dependencies:
|
||||
bignumber.js "~4.1.0"
|
||||
js-sha3 "^0.7.0"
|
||||
lodash "^4.17.4"
|
||||
|
||||
"@types/accounting@^0.4.1":
|
||||
version "0.4.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/accounting/-/accounting-0.4.1.tgz#865d9f5694fd7c438fba34eb4bc82eec6f34cdd5"
|
||||
@ -1291,10 +1283,6 @@ big.js@^3.1.3:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e"
|
||||
|
||||
bignumber.js@^4.0.2, bignumber.js@~4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1"
|
||||
|
||||
"bignumber.js@git+https://github.com/debris/bignumber.js#master":
|
||||
version "2.0.7"
|
||||
resolved "git+https://github.com/debris/bignumber.js#c7a38de919ed75e6fb6ba38051986e294b328df9"
|
||||
@ -1307,6 +1295,10 @@ bignumber.js@^4.0.2, bignumber.js@~4.1.0:
|
||||
version "2.0.7"
|
||||
resolved "git+https://github.com/frozeman/bignumber.js-nolookahead.git#57692b3ecfc98bbdd6b3a516cb2353652ea49934"
|
||||
|
||||
bignumber.js@~4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/bignumber.js/-/bignumber.js-4.1.0.tgz#db6f14067c140bd46624815a7916c92d9b6c24b1"
|
||||
|
||||
binary-extensions@^1.0.0:
|
||||
version "1.11.0"
|
||||
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205"
|
||||
@ -1698,10 +1690,6 @@ chai-bignumber@^2.0.1:
|
||||
version "2.0.2"
|
||||
resolved "https://registry.yarnpkg.com/chai-bignumber/-/chai-bignumber-2.0.2.tgz#de6c219c690b2d66b646ad6930096f9ba2199643"
|
||||
|
||||
chai-typescript-typings@^0.0.0:
|
||||
version "0.0.0"
|
||||
resolved "https://registry.yarnpkg.com/chai-typescript-typings/-/chai-typescript-typings-0.0.0.tgz#52e076d72cf29129c94ab1dba6e33ce3828a0724"
|
||||
|
||||
chai@^4.0.1:
|
||||
version "4.1.2"
|
||||
resolved "https://registry.yarnpkg.com/chai/-/chai-4.1.2.tgz#0f64584ba642f0f2ace2806279f4f06ca23ad73c"
|
||||
@ -1979,7 +1967,7 @@ commander@2.9.0:
|
||||
dependencies:
|
||||
graceful-readlink ">= 1.0.0"
|
||||
|
||||
commander@^2.12.1, commander@^2.9.0:
|
||||
commander@^2.9.0:
|
||||
version "2.13.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||
|
||||
@ -3215,7 +3203,7 @@ ethereumjs-util@4.5.0, ethereumjs-util@^4.0.1, ethereumjs-util@^4.3.0, ethereumj
|
||||
rlp "^2.0.0"
|
||||
secp256k1 "^3.0.1"
|
||||
|
||||
ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1, ethereumjs-util@^5.1.2:
|
||||
ethereumjs-util@^5.0.0, ethereumjs-util@^5.0.1, ethereumjs-util@^5.1.1:
|
||||
version "5.1.3"
|
||||
resolved "https://registry.yarnpkg.com/ethereumjs-util/-/ethereumjs-util-5.1.3.tgz#0c1f6efb1da9c5b6720a65697859fc0be6672df0"
|
||||
dependencies:
|
||||
@ -5021,10 +5009,6 @@ js-sha3@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.3.1.tgz#86122802142f0828502a0d1dee1d95e253bb0243"
|
||||
|
||||
js-sha3@^0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.6.1.tgz#5b89f77a7477679877f58c4a075240934b1f95c0"
|
||||
|
||||
js-sha3@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/js-sha3/-/js-sha3-0.7.0.tgz#0a5c57b36f79882573b2d84051f8bb85dd1bd63a"
|
||||
@ -5033,7 +5017,7 @@ js-tokens@^3.0.0, js-tokens@^3.0.2:
|
||||
version "3.0.2"
|
||||
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
|
||||
|
||||
js-yaml@^3.6.1, js-yaml@^3.7.0:
|
||||
js-yaml@^3.6.1:
|
||||
version "3.10.0"
|
||||
resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc"
|
||||
dependencies:
|
||||
@ -7765,7 +7749,7 @@ request-promise-core@1.1.1:
|
||||
dependencies:
|
||||
lodash "^4.13.1"
|
||||
|
||||
request-promise-native@^1.0.4, request-promise-native@^1.0.5:
|
||||
request-promise-native@^1.0.5:
|
||||
version "1.0.5"
|
||||
resolved "https://registry.yarnpkg.com/request-promise-native/-/request-promise-native-1.0.5.tgz#5281770f68e0c9719e5163fd3fab482215f4fda5"
|
||||
dependencies:
|
||||
@ -9095,7 +9079,7 @@ truffle@^4.0.1:
|
||||
original-require "^1.0.1"
|
||||
solc "0.4.18"
|
||||
|
||||
tslib@^1.0.0, tslib@^1.7.1, tslib@^1.8.0, tslib@^1.8.1:
|
||||
tslib@^1.0.0, tslib@^1.7.1, tslib@^1.8.1:
|
||||
version "1.8.1"
|
||||
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.8.1.tgz#6946af2d1d651a7b1863b531d6e5afa41aa44eac"
|
||||
|
||||
@ -9135,23 +9119,6 @@ tslint@5.8.0:
|
||||
tslib "^1.7.1"
|
||||
tsutils "^2.12.1"
|
||||
|
||||
tslint@^5.5.0:
|
||||
version "5.9.1"
|
||||
resolved "https://registry.yarnpkg.com/tslint/-/tslint-5.9.1.tgz#1255f87a3ff57eb0b0e1f0e610a8b4748046c9ae"
|
||||
dependencies:
|
||||
babel-code-frame "^6.22.0"
|
||||
builtin-modules "^1.1.1"
|
||||
chalk "^2.3.0"
|
||||
commander "^2.12.1"
|
||||
diff "^3.2.0"
|
||||
glob "^7.1.1"
|
||||
js-yaml "^3.7.0"
|
||||
minimatch "^3.0.4"
|
||||
resolve "^1.3.2"
|
||||
semver "^5.3.0"
|
||||
tslib "^1.8.0"
|
||||
tsutils "^2.12.1"
|
||||
|
||||
tsutils@^1.4.0:
|
||||
version "1.9.1"
|
||||
resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-1.9.1.tgz#b9f9ab44e55af9681831d5f28d0aeeaf5c750cb0"
|
||||
@ -9229,14 +9196,6 @@ types-bn@^0.0.1:
|
||||
dependencies:
|
||||
bn.js "4.11.7"
|
||||
|
||||
types-ethereumjs-util@0xProject/types-ethereumjs-util:
|
||||
version "0.0.6"
|
||||
resolved "https://codeload.github.com/0xProject/types-ethereumjs-util/tar.gz/0c5058e4f9d6585f7c7c1f88939546acb14323b8"
|
||||
dependencies:
|
||||
bn.js "^4.11.7"
|
||||
buffer "^5.0.6"
|
||||
rlp "^2.0.0"
|
||||
|
||||
types-ethereumjs-util@0xproject/types-ethereumjs-util:
|
||||
version "0.0.6"
|
||||
resolved "https://codeload.github.com/0xproject/types-ethereumjs-util/tar.gz/0c5058e4f9d6585f7c7c1f88939546acb14323b8"
|
||||
@ -9643,12 +9602,6 @@ web3-provider-engine@^8.4.0:
|
||||
xhr "^2.2.0"
|
||||
xtend "^4.0.1"
|
||||
|
||||
web3-typescript-typings@^0.7.2:
|
||||
version "0.7.2"
|
||||
resolved "https://registry.yarnpkg.com/web3-typescript-typings/-/web3-typescript-typings-0.7.2.tgz#5312bb786936a9c91381eee7af3d02ac21cf13b3"
|
||||
dependencies:
|
||||
bignumber.js "^4.0.2"
|
||||
|
||||
web3-utils@1.0.0-beta.27:
|
||||
version "1.0.0-beta.27"
|
||||
resolved "https://registry.yarnpkg.com/web3-utils/-/web3-utils-1.0.0-beta.27.tgz#d097d5c336a16b9f6ca9b60af68dd15c0643214b"
|
||||
|
Loading…
x
Reference in New Issue
Block a user