@0xcert/ethereum-erc20-contracts
Advanced tools
Comparing version 2.0.1-beta0 to 2.0.1
{ | ||
"files": {}, | ||
"files": { | ||
"packages/0xcert-ethereum-erc20-contracts/.solhint.json": "c72aedffae70ae4b1e2830449ec0e140eb7fb14a", | ||
"packages/0xcert-ethereum-erc20-contracts/CHANGELOG.json": "f7d7e0da21134c94063f1e19fa6d3d9f731b053a", | ||
"packages/0xcert-ethereum-erc20-contracts/CHANGELOG.md": "97ff2a2fbe75412ed12f36cd4c15556ea9b87cfc", | ||
"packages/0xcert-ethereum-erc20-contracts/README.md": "06e2df064ffa7d6321a6878eca16873f6491feca", | ||
"packages/0xcert-ethereum-erc20-contracts/nodemon.json": "82b893373db9861f1df4b55d8ea68a5d37b118de", | ||
"packages/0xcert-ethereum-erc20-contracts/package.json": "fe57a23e640aa1e71e1269b89fbfaba105a948f1", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/dapp-token.sol": "ef04ef4895b49abd32cf155723c6f206c392403a", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/erc20.sol": "7063bcef324d2b1391e684b0569d0cf050c19ebe", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/migration-receiver.sol": "7ebb1f8896a430fc52346b82db5ea7a9a6c1257e", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/mocks/dapp-token-mock.sol": "625853afc8563e886aca1a3c367af3f408e33909", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/mocks/token-mock.sol": "88dcaa034df424db1ba597a886f405cb4ca2ee2e", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/token.sol": "3642373fc1692b7e4cdf642f321955dec3e0a4ae", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/zxc-burner.sol": "7378001e358455608449daffbb026ec4435c3e23", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/zxc.sol": "634a705d3e9bc281e8bcba06e1d9af2a3551756b", | ||
"packages/0xcert-ethereum-erc20-contracts/src/core/types.ts": "be9414515fb92f954d214de5f1313a2348cb20b2", | ||
"packages/0xcert-ethereum-erc20-contracts/src/index.ts": "a7b884b8a2b9ec2a03c20192d83ff3d49c3b6cdd", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/dapp-token.test.ts": "66c2f4c86594c8b599cbb37c28afa0dd6b1835c2", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/helpers/common.ts": "28cfef796c13a9ec6b38a6623bab6d270ac6c202", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/mocks/zxc-mock.sol": "e54852daa7ce012679501f7c1f07481b8e771291", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/token.test.ts": "efe664b4bf7ef62cfbb3e142dfc55c0d2ac5192d", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/zxc-burner.test.ts": "a598736f8fb609986f33d7f349b6da150c96faf1", | ||
"packages/0xcert-ethereum-erc20-contracts/tsconfig.json": "aaa461c172cf0c93d58ffeef8e3ead76fe299b2e", | ||
"packages/0xcert-ethereum-erc20-contracts/tslint.json": "c57b3f0cdb7aa74ab2ab02888380f613589cbe66", | ||
"common/config/rush/npm-shrinkwrap.json": "77a8c31c9e43dfcf8e0c0e642def5ef762d30d1a" | ||
}, | ||
"arguments": "npm run clean && npx specron compile && npx tsc " | ||
} |
@@ -5,2 +5,8 @@ { | ||
{ | ||
"version": "2.0.1", | ||
"tag": "@0xcert/ethereum-erc20-contracts_v2.0.1", | ||
"date": "Fri, 06 Mar 2020 12:54:59 GMT", | ||
"comments": {} | ||
}, | ||
{ | ||
"version": "2.0.0", | ||
@@ -7,0 +13,0 @@ "tag": "@0xcert/ethereum-erc20-contracts_v2.0.0", |
# Change Log - @0xcert/ethereum-erc20-contracts | ||
This log was last generated on Sun, 01 Sep 2019 16:02:20 GMT and should not be manually modified. | ||
This log was last generated on Fri, 06 Mar 2020 12:54:59 GMT and should not be manually modified. | ||
## 1.9.0 | ||
Sun, 01 Sep 2019 16:02:20 GMT | ||
## 2.0.1 | ||
Fri, 06 Mar 2020 12:54:59 GMT | ||
*Version update only* | ||
## 1.8.1 | ||
Sun, 01 Sep 2019 15:46:11 GMT | ||
*Version update only* | ||
## 1.8.0 | ||
Tue, 30 Jul 2019 10:46:40 GMT | ||
*Version update only* | ||
## 2.0.0 | ||
@@ -21,0 +11,0 @@ Wed, 19 Jun 2019 10:31:05 GMT |
@@ -534,20 +534,5 @@ "use strict"; | ||
const signatureDataTuple = ctx.tuple(signatureData); | ||
yield dappToken.instance.methods.cancelApproveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: owner }); | ||
yield dappToken.instance.methods.cancelApproveWithSignature(sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: owner }); | ||
yield ctx.reverts(() => dappToken.instance.methods.approveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration, signatureDataTuple).send({ from: bob }), '010011'); | ||
})); | ||
spec.test('fails cancel approve with signature if you are not the approver', (ctx) => __awaiter(void 0, void 0, void 0, function* () { | ||
const dappToken = ctx.get('dappToken'); | ||
const token = ctx.get('token'); | ||
const owner = ctx.get('owner'); | ||
const bob = ctx.get('bob'); | ||
const sara = ctx.get('sara'); | ||
const decimalsMul = ctx.get('decimalsMul'); | ||
const tokenAmount = decimalsMul.mul(new ctx.web3.utils.BN('100')); | ||
const feeAmount = decimalsMul.mul(new ctx.web3.utils.BN('10')); | ||
const seed = common.getCurrentTime(); | ||
const expiration = common.getCurrentTime() + 3600; | ||
yield token.instance.methods.approve(dappToken.receipt._address, tokenAmount.toString()).send({ from: owner }); | ||
yield dappToken.instance.methods.deposit(tokenAmount.toString(), owner).send({ from: owner }); | ||
yield ctx.reverts(() => dappToken.instance.methods.cancelApproveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: bob }), '010012'); | ||
})); | ||
spec.test('fails approving with signature if signature kind is invalid', (ctx) => __awaiter(void 0, void 0, void 0, function* () { | ||
@@ -554,0 +539,0 @@ const dappToken = ctx.get('dappToken'); |
{ | ||
"name": "@0xcert/ethereum-erc20-contracts", | ||
"version": "2.0.1-beta0", | ||
"version": "2.0.1", | ||
"description": "Smart contract implementation of the ERC-20 standard on the Ethereum blockchain.", | ||
@@ -80,3 +80,3 @@ "scripts": { | ||
"@specron/flattener": "0.16.0", | ||
"@0xcert/ethereum-utils-contracts": "2.0.1-beta0", | ||
"@0xcert/ethereum-utils-contracts": "2.0.1", | ||
"solc": "0.6.1", | ||
@@ -83,0 +83,0 @@ "solhint": "2.3.0", |
@@ -624,24 +624,6 @@ import { Spec } from '@specron/spec'; | ||
const signatureDataTuple = ctx.tuple(signatureData); | ||
await dappToken.instance.methods.cancelApproveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: owner }); | ||
await dappToken.instance.methods.cancelApproveWithSignature(sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: owner }); | ||
await ctx.reverts(() => dappToken.instance.methods.approveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration, signatureDataTuple).send({ from: bob }), '010011'); | ||
}); | ||
spec.test('fails cancel approve with signature if you are not the approver', async (ctx) => { | ||
const dappToken = ctx.get('dappToken'); | ||
const token = ctx.get('token'); | ||
const owner = ctx.get('owner'); | ||
const bob = ctx.get('bob'); | ||
const sara = ctx.get('sara'); | ||
const decimalsMul = ctx.get('decimalsMul'); | ||
const tokenAmount = decimalsMul.mul(new ctx.web3.utils.BN('100')); | ||
const feeAmount = decimalsMul.mul(new ctx.web3.utils.BN('10')); | ||
const seed = common.getCurrentTime(); | ||
const expiration = common.getCurrentTime() + 3600; | ||
await token.instance.methods.approve(dappToken.receipt._address, tokenAmount.toString()).send({ from: owner }); | ||
await dappToken.instance.methods.deposit(tokenAmount.toString(), owner).send({ from: owner }); | ||
await ctx.reverts(() => dappToken.instance.methods.cancelApproveWithSignature(owner, sara, tokenAmount.toString(), bob, feeAmount.toString(), seed, expiration).send({ from: bob }), '010012'); | ||
}); | ||
spec.test('fails approving with signature if signature kind is invalid', async (ctx) => { | ||
@@ -648,0 +630,0 @@ const dappToken = ctx.get('dappToken'); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
672454
53
10796
0