Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add gas price on initialization of Foreign erc-to-erc mode #91

Merged
merged 5 commits into from
Oct 17, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion test/erc_to_erc/foreign_bridge.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const BridgeValidators = artifacts.require("BridgeValidators.sol");
const EternalStorageProxy = artifacts.require("EternalStorageProxy.sol");

const ERC677BridgeToken = artifacts.require("ERC677BridgeToken.sol");
const {ERROR_MSG, ZERO_ADDRESS} = require('../setup');
const {ERROR_MSG, ZERO_ADDRESS, INVALID_ARGUMENTS} = require('../setup');
const {createMessage, sign, signatureToVRS} = require('../helpers/helpers');
const halfEther = web3.toBigNumber(web3.toWei(0.5, "ether"));
const requireBlockConfirmations = 8;
Expand All @@ -29,6 +29,9 @@ contract('ForeignBridge_ERC20_to_ERC20', async (accounts) => {
'0'.should.be.bignumber.equal(await foreignBridge.deployedAtBlock())
false.should.be.equal(await foreignBridge.isInitialized())
'0'.should.be.bignumber.equal(await foreignBridge.requiredBlockConfirmations())

await foreignBridge.initialize(validatorContract.address, token.address, requireBlockConfirmations).should.be.rejectedWith(INVALID_ARGUMENTS);
akolotov marked this conversation as resolved.
Show resolved Hide resolved

await foreignBridge.initialize(validatorContract.address, token.address, requireBlockConfirmations, gasPrice);
akolotov marked this conversation as resolved.
Show resolved Hide resolved

token.address.should.be.equal(await foreignBridge.erc20token());
Expand Down
1 change: 1 addition & 0 deletions test/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ require('chai')
exports.ERROR_MSG = 'VM Exception while processing transaction: revert';
exports.ERROR_MSG_OPCODE = 'VM Exception while processing transaction: invalid opcode';
exports.ZERO_ADDRESS = '0x0000000000000000000000000000000000000000'
exports.INVALID_ARGUMENTS = 'Invalid number of arguments to Solidity function'