diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-03-02 05:04:55 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-03-02 05:04:55 +0800 |
commit | 0c16f0ea221d65e66942c27a69dda1c54f49e775 (patch) | |
tree | 5530d18fcd6e6c5e15272de3cb915fc2025c01bf /packages/contracts/test/zrx_token.ts | |
parent | 003d43b03ae373ca24d6d728ffa6b0f2dfcda79a (diff) | |
parent | 451a0dacbe85d7a0d16ef007c1eb945a4c1977cb (diff) | |
download | dexon-0x-contracts-0c16f0ea221d65e66942c27a69dda1c54f49e775.tar.gz dexon-0x-contracts-0c16f0ea221d65e66942c27a69dda1c54f49e775.tar.zst dexon-0x-contracts-0c16f0ea221d65e66942c27a69dda1c54f49e775.zip |
Merge branch 'development' into feature/sra-reporter
* development: (71 commits)
Set max to 2 ETH/2 ZRX
Add missing types from website
Add dependencies
Update the README
Move BaseContract to its own package
Upgrate prettier
remove unused import
Move more configs into docsInfo and remove logic that does not belong there elsewhere
Fix a bug with displaying solidity functions returning multiple return values
Add ethers-contracts as a dependency
Include types for ethers-contracts
Fix the version
Include types for ethers-contracts
Rename idx to i
Remove tslint disable
Move BaseContract to web3Wrapper
Merge ifs
Fix an option description
Add link to the docs
Improve CHANGELOG entry
...
Diffstat (limited to 'packages/contracts/test/zrx_token.ts')
-rw-r--r-- | packages/contracts/test/zrx_token.ts | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packages/contracts/test/zrx_token.ts b/packages/contracts/test/zrx_token.ts index 1610ada12..4ccc66b36 100644 --- a/packages/contracts/test/zrx_token.ts +++ b/packages/contracts/test/zrx_token.ts @@ -36,7 +36,7 @@ describe('ZRXToken', () => { networkId: constants.TESTRPC_NETWORK_ID, }); const zrxInstance = await deployer.deployAsync(ContractName.ZRXToken); - zrx = new ZRXTokenContract(zrxInstance); + zrx = new ZRXTokenContract(web3Wrapper, zrxInstance.abi, zrxInstance.address); zrxAddress = zrx.address; MAX_UINT = zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS; }); @@ -48,25 +48,25 @@ describe('ZRXToken', () => { }); describe('constants', () => { it('should have 18 decimals', async () => { - const decimals = new BigNumber(await zrx.decimals()); + const decimals = new BigNumber(await zrx.decimals.callAsync()); const expectedDecimals = 18; expect(decimals).to.be.bignumber.equal(expectedDecimals); }); it('should have a total supply of 1 billion tokens', async () => { - const totalSupply = new BigNumber(await zrx.totalSupply()); + const totalSupply = new BigNumber(await zrx.totalSupply.callAsync()); const expectedTotalSupply = 1000000000; expect(ZeroEx.toUnitAmount(totalSupply, 18)).to.be.bignumber.equal(expectedTotalSupply); }); it('should be named 0x Protocol Token', async () => { - const name = await zrx.name(); + const name = await zrx.name.callAsync(); const expectedName = '0x Protocol Token'; expect(name).to.be.equal(expectedName); }); it('should have the symbol ZRX', async () => { - const symbol = await zrx.symbol(); + const symbol = await zrx.symbol.callAsync(); const expectedSymbol = 'ZRX'; expect(symbol).to.be.equal(expectedSymbol); }); @@ -75,7 +75,7 @@ describe('ZRXToken', () => { describe('constructor', () => { it('should initialize owner balance to totalSupply', async () => { const ownerBalance = await zeroEx.token.getBalanceAsync(zrxAddress, owner); - const totalSupply = new BigNumber(await zrx.totalSupply()); + const totalSupply = new BigNumber(await zrx.totalSupply.callAsync()); expect(totalSupply).to.be.bignumber.equal(ownerBalance); }); }); |