Change backend for contracts contracts

This commit is contained in:
Leonid Logvinov 2018-02-26 14:31:09 -08:00
parent 747732118c
commit 0bb0bff0b3
No known key found for this signature in database
GPG Key ID: 0DD294BFDE8C95D4
3 changed files with 8 additions and 8 deletions

View File

@ -17,7 +17,7 @@
"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 --contracts ${npm_package_config_contracts} --contracts-dir src/contracts --artifacts-dir src/artifacts", "compile": "node ../deployer/lib/src/cli.js compile --contracts ${npm_package_config_contracts} --contracts-dir src/contracts --artifacts-dir src/artifacts",
"clean": "shx rm -rf ./lib", "clean": "shx rm -rf ./lib",
"generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(DummyToken|TokenTransferProxy|Exchange|TokenRegistry|MultiSigWallet|MultiSigWalletWithTimeLock|MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress|TokenRegistry|ZRXToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend web3 && prettier --write 'src/contract_wrappers/generated/**.ts'", "generate_contract_wrappers": "node ../abi-gen/lib/index.js --abis 'src/artifacts/@(DummyToken|TokenTransferProxy|Exchange|TokenRegistry|MultiSigWallet|MultiSigWalletWithTimeLock|MultiSigWalletWithTimeLockExceptRemoveAuthorizedAddress|TokenRegistry|ZRXToken).json' --template ../contract_templates/contract.handlebars --partials '../contract_templates/partials/**/*.handlebars' --output src/contract_wrappers/generated --backend ethers && prettier --write 'src/contract_wrappers/generated/**.ts'",
"migrate": "node ../deployer/lib/src/cli.js migrate", "migrate": "node ../deployer/lib/src/cli.js migrate",
"lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'", "lint": "tslint --project . 'migrations/**/*.ts' 'test/**/*.ts' 'util/**/*.ts' 'deploy/**/*.ts'",
"test:circleci": "yarn test" "test:circleci": "yarn test"

View File

@ -724,7 +724,7 @@ describe('Exchange', () => {
const res = await exWrapper.fillOrderAsync(signedOrder, taker); const res = await exWrapper.fillOrderAsync(signedOrder, taker);
expect(res.logs).to.have.length(1); expect(res.logs).to.have.length(1);
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>; const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
const errCode = log.args.errorId.toNumber(); const errCode = log.args.errorId;
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED); expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED);
}); });
@ -735,7 +735,7 @@ describe('Exchange', () => {
const res = await exWrapper.fillOrderAsync(signedOrder, taker); const res = await exWrapper.fillOrderAsync(signedOrder, taker);
expect(res.logs).to.have.length(1); expect(res.logs).to.have.length(1);
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>; const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
const errCode = log.args.errorId.toNumber(); const errCode = log.args.errorId;
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED); expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED);
}); });
}); });
@ -863,7 +863,7 @@ describe('Exchange', () => {
const res = await exWrapper.cancelOrderAsync(signedOrder, maker); const res = await exWrapper.cancelOrderAsync(signedOrder, maker);
expect(res.logs).to.have.length(1); expect(res.logs).to.have.length(1);
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>; const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
const errCode = log.args.errorId.toNumber(); const errCode = log.args.errorId;
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED); expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_FULLY_FILLED_OR_CANCELLED);
}); });
@ -875,7 +875,7 @@ describe('Exchange', () => {
const res = await exWrapper.cancelOrderAsync(signedOrder, maker); const res = await exWrapper.cancelOrderAsync(signedOrder, maker);
expect(res.logs).to.have.length(1); expect(res.logs).to.have.length(1);
const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>; const log = res.logs[0] as LogWithDecodedArgs<LogErrorContractEventArgs>;
const errCode = log.args.errorId.toNumber(); const errCode = log.args.errorId;
expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED); expect(errCode).to.be.equal(ExchangeContractErrs.ERROR_ORDER_EXPIRED);
}); });
}); });

View File

@ -27,7 +27,7 @@ export class TokenRegWrapper {
address: data[0], address: data[0],
name: data[1], name: data[1],
symbol: data[2], symbol: data[2],
decimals: data[3].toNumber(), decimals: data[3],
ipfsHash: data[4], ipfsHash: data[4],
swarmHash: data[5], swarmHash: data[5],
}; };
@ -39,7 +39,7 @@ export class TokenRegWrapper {
address: data[0], address: data[0],
name: data[1], name: data[1],
symbol: data[2], symbol: data[2],
decimals: data[3].toNumber(), decimals: data[3],
ipfsHash: data[4], ipfsHash: data[4],
swarmHash: data[5], swarmHash: data[5],
}; };
@ -51,7 +51,7 @@ export class TokenRegWrapper {
address: data[0], address: data[0],
name: data[1], name: data[1],
symbol: data[2], symbol: data[2],
decimals: data[3].toNumber(), decimals: data[3],
ipfsHash: data[4], ipfsHash: data[4],
swarmHash: data[5], swarmHash: data[5],
}; };