@0xcert/ethereum-erc20-contracts
Advanced tools
Comparing version 0.0.0-alpha0 to 0.0.0-alpha10
@@ -221,2 +221,3 @@ { | ||
"devdoc": { | ||
"details": "This interface uses the official ERC-20 specification from https://eips.ethereum.org/EIPS/eip-20 with the additional requirement that the functions specificed as optional have become required.", | ||
"methods": { | ||
@@ -228,3 +229,4 @@ "allowance(address,address)": { | ||
"_spender": "The address of the account able to transfer the tokens." | ||
} | ||
}, | ||
"return": "Remaining allowance." | ||
}, | ||
@@ -236,3 +238,4 @@ "approve(address,uint256)": { | ||
"_value": "The amount of tokens to be approved for transfer." | ||
} | ||
}, | ||
"return": "Success of operation." | ||
}, | ||
@@ -243,15 +246,20 @@ "balanceOf(address)": { | ||
"_owner": "The address from which the balance will be retrieved." | ||
} | ||
}, | ||
"return": "Balance of _owner." | ||
}, | ||
"decimals()": { | ||
"details": "Returns the number of decimals the token uses." | ||
"details": "Returns the number of decimals the token uses.", | ||
"return": "Number of decimals." | ||
}, | ||
"name()": { | ||
"details": "Returns the name of the token." | ||
"details": "Returns the name of the token.", | ||
"return": "Token name." | ||
}, | ||
"symbol()": { | ||
"details": "Returns the symbol of the token." | ||
"details": "Returns the symbol of the token.", | ||
"return": "Token symbol." | ||
}, | ||
"totalSupply()": { | ||
"details": "Returns the total token supply." | ||
"details": "Returns the total token supply.", | ||
"return": "Total supply." | ||
}, | ||
@@ -263,3 +271,4 @@ "transfer(address,uint256)": { | ||
"_value": "The amount of token to be transferred." | ||
} | ||
}, | ||
"return": "Success of operation." | ||
}, | ||
@@ -272,3 +281,4 @@ "transferFrom(address,address,uint256)": { | ||
"_value": "The amount of token to be transferred." | ||
} | ||
}, | ||
"return": "Success of operation." | ||
} | ||
@@ -275,0 +285,0 @@ }, |
{ | ||
"files": { | ||
"packages/0xcert-ethereum-erc20-contracts/nodemon.json": "82b893373db9861f1df4b55d8ea68a5d37b118de", | ||
"packages/0xcert-ethereum-erc20-contracts/package.json": "fcbfc9805c685943c503a4933132d555dbefe7dd", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/erc20.sol": "2eb2fdde355388c6e5c5236c7e9ad6703d5198e9", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/mocks/token-mock.sol": "93eec7fc4fd45b9fa10db8abcdd3823042bc62ff", | ||
"packages/0xcert-ethereum-erc20-contracts/src/contracts/token.sol": "adf6b1e7644ca1e96ee5bfb7ccb84c503287e1ac", | ||
"packages/0xcert-ethereum-erc20-contracts/src/tests/token.test.ts": "3cc6c3568912d2a4c27260b991c29f760c33bff6", | ||
"packages/0xcert-ethereum-erc20-contracts/tsconfig.json": "782c985f592bdbcb53a736d17cc96f19ea654f92", | ||
"common/config/rush/npm-shrinkwrap.json": "9dea1ec1c34d5bcf4df825f8250513472c8f14f2" | ||
}, | ||
"arguments": "npx specron compile && npx specron test " | ||
"files": {}, | ||
"arguments": "npm run clean && npx specron compile " | ||
} |
{ | ||
"name": "@0xcert/ethereum-erc20-contracts", | ||
"version": "0.0.0-alpha0", | ||
"description": "Fungible token standard implementation for the 0xcert protocol..", | ||
"version": "0.0.0-alpha10", | ||
"description": "Smart contract implementation of the ERC-20 standard on the Ethereum blockchain.", | ||
"scripts": { | ||
@@ -29,8 +29,41 @@ "clean": "rm -Rf ./build", | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/0xcert/framework.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/0xcert/framework/issues" | ||
}, | ||
"homepage": "https://github.com/0xcert/framework#readme", | ||
"keywords": [ | ||
"0xcert", | ||
"framework", | ||
"protocol", | ||
"asset", | ||
"value", | ||
"values", | ||
"currency", | ||
"token", | ||
"non-fungible", | ||
"fungible", | ||
"erc-721", | ||
"erc-20", | ||
"blockchain", | ||
"javascript", | ||
"typescript", | ||
"nodejs", | ||
"vuejs", | ||
"nuxtjs", | ||
"npm", | ||
"libraries", | ||
"smart-contract", | ||
"ethereum", | ||
"zxc" | ||
], | ||
"license": "MIT", | ||
"devDependencies": { | ||
"@0xcert/ethereum-utils-contracts": "0.0.0-alpha3", | ||
"@specron/cli": "^0.3.0", | ||
"@specron/spec": "^0.3.0", | ||
"solc": "^0.4.25", | ||
"@0xcert/ethereum-utils-contracts": "0.0.0-alpha10", | ||
"@specron/cli": "^0.5.1", | ||
"@specron/spec": "^0.5.1", | ||
"solc": "0.5.1", | ||
"ts-node": "^7.0.1", | ||
@@ -37,0 +70,0 @@ "typescript": "^3.1.1", |
@@ -34,2 +34,3 @@ import { Spec } from '@specron/spec'; | ||
contract: 'TokenMock', | ||
args: ['ERC20', 'ERC', 18, '300000000000000000000000000'], | ||
}); | ||
@@ -45,2 +46,16 @@ ctx.set('token', token); | ||
spec.test('correctly checks all the supported interfaces', async (ctx) => { | ||
const token = ctx.get('token'); | ||
const tokenInterface = await token.instance.methods.supportsInterface('0x36372b07').call(); | ||
const tokenNameInterface = await token.instance.methods.supportsInterface('0x06fdde03').call(); | ||
const tokenSymbolInterface = await token.instance.methods.supportsInterface('0x95d89b41').call(); | ||
const tokenDecimalsInterface = await token.instance.methods.supportsInterface('0x313ce567').call(); | ||
const tokenNoneExistingInterface = await token.instance.methods.supportsInterface('0x19be5360').call(); | ||
ctx.is(tokenInterface, true); | ||
ctx.is(tokenNameInterface, true); | ||
ctx.is(tokenSymbolInterface, true); | ||
ctx.is(tokenDecimalsInterface, true); | ||
ctx.is(tokenNoneExistingInterface, false); | ||
}); | ||
spec.test('has correct totalSupply after construction', async (ctx) => { | ||
@@ -56,4 +71,3 @@ const token = ctx.get('token'); | ||
const actualTokenName = await token.instance.methods.name().call(); | ||
const tokenName = 'Mock Token'; | ||
ctx.is(tokenName, actualTokenName); | ||
ctx.is(actualTokenName, 'ERC20'); | ||
}); | ||
@@ -64,4 +78,3 @@ | ||
const actualTokenSymbol = await token.instance.methods.symbol().call(); | ||
const tokenSymbol = 'MCK'; | ||
ctx.is(tokenSymbol, actualTokenSymbol); | ||
ctx.is(actualTokenSymbol, 'ERC'); | ||
}); | ||
@@ -72,4 +85,3 @@ | ||
const actualTokenDecimals = await token.instance.methods.decimals().call(); | ||
const tokenDecimals = '18'; | ||
ctx.is(tokenDecimals, actualTokenDecimals); | ||
ctx.is(actualTokenDecimals, '18'); | ||
}); | ||
@@ -76,0 +88,0 @@ |
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
Sorry, the diff of this file is not supported yet
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
1188196
14
35788
1
1
1
8
0