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;
this.timeout(mochaTestTimeoutMs);
const txDefaults = {
gas: devConstants.GAS_ESTIMATE,
gas: devConstants.GAS_LIMIT,
from: devConstants.TESTRPC_FIRST_ADDRESS,
};
const artifactsDir = `../migrations/artifacts/1.0.0`;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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