aboutsummaryrefslogtreecommitdiffstats
path: root/packages/contracts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/contracts')
-rw-r--r--packages/contracts/contracts/tokens/ERC20Token.sol1
-rw-r--r--packages/contracts/contracts/tokens/Token.sol1
-rw-r--r--packages/contracts/test/ts/ether_token.ts5
-rw-r--r--packages/contracts/test/ts/ether_token_v2.ts10
-rw-r--r--packages/contracts/test/ts/unlimited_allowance_token.ts15
-rw-r--r--packages/contracts/test/ts/unlimited_allowance_token_v2.ts15
6 files changed, 29 insertions, 18 deletions
diff --git a/packages/contracts/contracts/tokens/ERC20Token.sol b/packages/contracts/contracts/tokens/ERC20Token.sol
index aead59d6d..318da8c01 100644
--- a/packages/contracts/contracts/tokens/ERC20Token.sol
+++ b/packages/contracts/contracts/tokens/ERC20Token.sol
@@ -56,3 +56,4 @@ contract ERC20Token is Token_v2 {
mapping (address => mapping (address => uint)) allowed;
uint public totalSupply;
}
+
diff --git a/packages/contracts/contracts/tokens/Token.sol b/packages/contracts/contracts/tokens/Token.sol
index f18614498..507de9b12 100644
--- a/packages/contracts/contracts/tokens/Token.sol
+++ b/packages/contracts/contracts/tokens/Token.sol
@@ -36,3 +36,4 @@ contract Token {
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
+
diff --git a/packages/contracts/test/ts/ether_token.ts b/packages/contracts/test/ts/ether_token.ts
index db281e511..2f9df59a4 100644
--- a/packages/contracts/test/ts/ether_token.ts
+++ b/packages/contracts/test/ts/ether_token.ts
@@ -81,8 +81,9 @@ contract('EtherToken', (accounts: string[]) => {
const initEthBalance = await getEthBalanceAsync(account);
const ethTokensToWithdraw = initEthTokenBalance;
expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0);
- const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account,
- {gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS});
+ const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account, {
+ gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS,
+ });
const receipt = await zeroEx.awaitTransactionMinedAsync(txHash);
const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
diff --git a/packages/contracts/test/ts/ether_token_v2.ts b/packages/contracts/test/ts/ether_token_v2.ts
index 61bf1a980..b88fef579 100644
--- a/packages/contracts/test/ts/ether_token_v2.ts
+++ b/packages/contracts/test/ts/ether_token_v2.ts
@@ -104,8 +104,9 @@ contract('EtherTokenV2', (accounts: string[]) => {
const initEthBalance = await getEthBalanceAsync(account);
const ethTokensToWithdraw = initEthTokenBalance;
expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0);
- const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account,
- {gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS});
+ const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account, {
+ gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS,
+ });
const receipt = await zeroEx.awaitTransactionMinedAsync(txHash);
const ethSpentOnGas = gasPrice.times(receipt.gasUsed);
@@ -122,8 +123,9 @@ contract('EtherTokenV2', (accounts: string[]) => {
const initEthBalance = await getEthBalanceAsync(account);
const ethTokensToWithdraw = initEthTokenBalance;
expect(ethTokensToWithdraw).to.not.be.bignumber.equal(0);
- const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account,
- {gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS});
+ const txHash = await zeroEx.etherToken.withdrawAsync(ethTokensToWithdraw, account, {
+ gasLimit: constants.MAX_ETHERTOKEN_WITHDRAW_GAS,
+ });
const receipt = await zeroEx.awaitTransactionMinedAsync(txHash);
const logs = receipt.logs;
diff --git a/packages/contracts/test/ts/unlimited_allowance_token.ts b/packages/contracts/test/ts/unlimited_allowance_token.ts
index a328563cd..33b2a5721 100644
--- a/packages/contracts/test/ts/unlimited_allowance_token.ts
+++ b/packages/contracts/test/ts/unlimited_allowance_token.ts
@@ -85,8 +85,9 @@ contract('UnlimitedAllowanceToken', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newSpenderAllowance = await zeroEx.token.getAllowanceAsync(tokenAddress, owner, spender);
expect(initSpenderAllowance).to.be.bignumber.equal(newSpenderAllowance);
@@ -97,8 +98,9 @@ contract('UnlimitedAllowanceToken', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = initOwnerBalance;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newOwnerBalance = await zeroEx.token.getBalanceAsync(tokenAddress, owner);
const newSpenderBalance = await zeroEx.token.getBalanceAsync(tokenAddress, spender);
@@ -112,8 +114,9 @@ contract('UnlimitedAllowanceToken', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = initOwnerBalance;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newSpenderAllowance = await zeroEx.token.getAllowanceAsync(tokenAddress, owner, spender);
expect(newSpenderAllowance).to.be.bignumber.equal(0);
diff --git a/packages/contracts/test/ts/unlimited_allowance_token_v2.ts b/packages/contracts/test/ts/unlimited_allowance_token_v2.ts
index 137fcd8a5..4fa06e483 100644
--- a/packages/contracts/test/ts/unlimited_allowance_token_v2.ts
+++ b/packages/contracts/test/ts/unlimited_allowance_token_v2.ts
@@ -92,8 +92,9 @@ contract('UnlimitedAllowanceTokenV2', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = zeroEx.token.UNLIMITED_ALLOWANCE_IN_BASE_UNITS;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newSpenderAllowance = await zeroEx.token.getAllowanceAsync(tokenAddress, owner, spender);
expect(initSpenderAllowance).to.be.bignumber.equal(newSpenderAllowance);
@@ -104,8 +105,9 @@ contract('UnlimitedAllowanceTokenV2', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = initOwnerBalance;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newOwnerBalance = await zeroEx.token.getBalanceAsync(tokenAddress, owner);
const newSpenderBalance = await zeroEx.token.getBalanceAsync(tokenAddress, spender);
@@ -119,8 +121,9 @@ contract('UnlimitedAllowanceTokenV2', (accounts: string[]) => {
const amountToTransfer = initOwnerBalance;
const initSpenderAllowance = initOwnerBalance;
await zeroEx.token.setAllowanceAsync(tokenAddress, owner, spender, initSpenderAllowance);
- await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer,
- {gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS});
+ await zeroEx.token.transferFromAsync(tokenAddress, owner, spender, spender, amountToTransfer, {
+ gasLimit: constants.MAX_TOKEN_TRANSFERFROM_GAS,
+ });
const newSpenderAllowance = await zeroEx.token.getAllowanceAsync(tokenAddress, owner, spender);
expect(newSpenderAllowance).to.be.bignumber.equal(0);