Rename Signer to Wallet, rename GAS_ESTIMATE to GAS_LIMIT

This commit is contained in:
Amir Bandeali 2018-05-29 11:22:57 -07:00
parent d625b65a09
commit 8f2fd9b603
8 changed files with 10 additions and 10 deletions

View File

@ -11,7 +11,7 @@ before('migrate contracts', async function(): Promise<void> {
const mochaTestTimeoutMs = 20000; const mochaTestTimeoutMs = 20000;
this.timeout(mochaTestTimeoutMs); this.timeout(mochaTestTimeoutMs);
const txDefaults = { const txDefaults = {
gas: devConstants.GAS_ESTIMATE, gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS, from: devConstants.TESTRPC_FIRST_ADDRESS,
}; };
const artifactsDir = `../migrations/artifacts/1.0.0`; const artifactsDir = `../migrations/artifacts/1.0.0`;

View File

@ -11,7 +11,7 @@ before('migrate contracts', async function(): Promise<void> {
const mochaTestTimeoutMs = 20000; const mochaTestTimeoutMs = 20000;
this.timeout(mochaTestTimeoutMs); this.timeout(mochaTestTimeoutMs);
const txDefaults = { const txDefaults = {
gas: devConstants.GAS_ESTIMATE, gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS, from: devConstants.TESTRPC_FIRST_ADDRESS,
}; };
const artifactsDir = `../migrations/artifacts/1.0.0`; const artifactsDir = `../migrations/artifacts/1.0.0`;

View File

@ -20,7 +20,7 @@ pragma solidity ^0.4.24;
import "./mixins/MSignatureValidator.sol"; import "./mixins/MSignatureValidator.sol";
import "./mixins/MTransactions.sol"; import "./mixins/MTransactions.sol";
import "./interfaces/ISigner.sol"; import "./interfaces/IWallet.sol";
import "./interfaces/IValidator.sol"; import "./interfaces/IValidator.sol";
import "./libs/LibExchangeErrors.sol"; import "./libs/LibExchangeErrors.sol";
import "../../utils/LibBytes/LibBytes.sol"; import "../../utils/LibBytes/LibBytes.sol";
@ -168,7 +168,7 @@ contract MixinSignatureValidator is
// Signature verified by wallet contract. // Signature verified by wallet contract.
// If used with an order, the maker of the order is the wallet contract. // If used with an order, the maker of the order is the wallet contract.
} else if (signatureType == SignatureType.Wallet) { } else if (signatureType == SignatureType.Wallet) {
isValid = ISigner(signer).isValidSignature(hash, signature); isValid = IWallet(signer).isValidSignature(hash, signature);
return isValid; return isValid;
// Signature verified by validator contract. // Signature verified by validator contract.

View File

@ -18,7 +18,7 @@
pragma solidity ^0.4.24; pragma solidity ^0.4.24;
contract ISigner { contract IWallet {
/// @dev Verifies that a signature is valid. /// @dev Verifies that a signature is valid.
/// @param hash Message hash that is signed. /// @param hash Message hash that is signed.

View File

@ -7,7 +7,7 @@ import { coverage } from './coverage';
export const txDefaults = { export const txDefaults = {
from: devConstants.TESTRPC_FIRST_ADDRESS, from: devConstants.TESTRPC_FIRST_ADDRESS,
gas: devConstants.GAS_ESTIMATE, gas: devConstants.GAS_LIMIT,
}; };
const providerConfigs = { shouldUseInProcessGanache: true }; const providerConfigs = { shouldUseInProcessGanache: true };
export const provider = web3Factory.getRpcProvider(providerConfigs); export const provider = web3Factory.getRpcProvider(providerConfigs);

View File

@ -1,6 +1,6 @@
export const constants = { export const constants = {
RPC_URL: 'http://localhost:8545', RPC_URL: 'http://localhost:8545',
RPC_PORT: 8545, RPC_PORT: 8545,
GAS_ESTIMATE: 8000000, GAS_LIMIT: 7000000,
TESTRPC_FIRST_ADDRESS: '0x5409ed021d9299bf6814279a6a1411a7e866a631', TESTRPC_FIRST_ADDRESS: '0x5409ed021d9299bf6814279a6a1411a7e866a631',
}; };

View File

@ -28,7 +28,7 @@ export const web3Factory = {
if (!hasAddresses) { if (!hasAddresses) {
provider.addProvider(new EmptyWalletSubprovider()); provider.addProvider(new EmptyWalletSubprovider());
} }
provider.addProvider(new FakeGasEstimateSubprovider(constants.GAS_ESTIMATE)); provider.addProvider(new FakeGasEstimateSubprovider(constants.GAS_LIMIT));
const logger = { const logger = {
log: (arg: any) => { log: (arg: any) => {
fs.appendFileSync('ganache.log', `${arg}\n`); fs.appendFileSync('ganache.log', `${arg}\n`);
@ -41,7 +41,7 @@ export const web3Factory = {
} }
provider.addProvider( provider.addProvider(
new GanacheSubprovider({ new GanacheSubprovider({
gasLimit: constants.GAS_ESTIMATE, gasLimit: constants.GAS_LIMIT,
logger, logger,
verbose: env.parseBoolean(EnvVars.VerboseGanache), verbose: env.parseBoolean(EnvVars.VerboseGanache),
port: 8545, port: 8545,

View File

@ -12,7 +12,7 @@ before('migrate contracts', async function(): Promise<void> {
const mochaTestTimeoutMs = 20000; const mochaTestTimeoutMs = 20000;
this.timeout(mochaTestTimeoutMs); this.timeout(mochaTestTimeoutMs);
const txDefaults = { const txDefaults = {
gas: devConstants.GAS_ESTIMATE, gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS, from: devConstants.TESTRPC_FIRST_ADDRESS,
}; };
const artifactsDir = `../migrations/artifacts/1.0.0`; const artifactsDir = `../migrations/artifacts/1.0.0`;