aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts/test/zrx_token.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-02-24 06:13:35 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-02-28 04:05:46 +0800
commit93b2736d6533f983aeb74005004de7f40eb35851 (patch)
tree51f25e54b7afeebc7fc482bf78f12a0f9bb1eda1 /packages/contracts/test/zrx_token.ts
parent34274a10428bbc07a4f075bcf4a3ccafe0c04f5e (diff)
downloaddexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.gz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.bz2
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.lz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.xz
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.tar.zst
dexon-sol-tools-93b2736d6533f983aeb74005004de7f40eb35851.zip
Use the same templates as 0x.js
Diffstat (limited to 'packages/contracts/test/zrx_token.ts')
-rw-r--r--packages/contracts/test/zrx_token.ts12
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);
});
});