Skip to content

Commit

Permalink
gas limit changes (#127)
Browse files Browse the repository at this point in the history
  • Loading branch information
dkent600 authored Mar 7, 2018
1 parent 5987b3b commit 87b08d6
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ The default configuration settings for Arc.js can be found in its `config/defaul
{
"providerUrl": "http://127.0.0.0:8545",
"network": "ganache",
"gasLimit": 6015000
"gasLimit_runtime": 6015000
}
```

Expand Down
3 changes: 2 additions & 1 deletion config/default.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"autoApproveTokenTransfers": true,
"defaultVotingMachine": "AbsoluteVote",
"gasLimit": 6300000,
"gasLimit_deployment": 6300000,
"gasLimit_runtime": 4543760,
"network": "ganache",
"providerUrl": "http://127.0.0.1:8545"
}
2 changes: 1 addition & 1 deletion lib/ExtendTruffleContract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export abstract class ExtendTruffleContract {
solidityContract.defaults({
// Use web3.eth.defaultAccount as the from account for all transactions
from: Utils.getDefaultAccount(),
gas: Config.get("gasLimit"),
gas: Config.get("gasLimit_runtime"),
});
}

Expand Down
2 changes: 1 addition & 1 deletion lib/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class Utils {
contract.setProvider(myWeb3.currentProvider);
contract.defaults({
from: Utils.getDefaultAccount(),
gas: Config.get("gasLimit"),
gas: Config.get("gasLimit_runtime"),
});
return contract;
} catch (ex) {
Expand Down
4 changes: 2 additions & 2 deletions package-scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ const network = env.network || Config.network || "ganache";
const truffleIsInternal = fs.existsSync(joinPath(pathArcJsRoot, "node_modules", "truffle-core-migrate-without-compile"));
const truffleCommand = `node ${joinPath(pathArcJsRoot, truffleIsInternal ? "node_modules" : "../../", "truffle-core-migrate-without-compile", "cli")}`;

const ganacheCommand = `ganache-cli -l ${Config.gasLimit} --account="0x0191ecbd1b150b8a3c27c27010ba51b45521689611e669109e034fd66ae69621,9999999999999999999999999999999999999999999" --account="0x00f360233e89c65970a41d4a85990ec6669526b2230e867c352130151453180d,9999999999999999999999999999999999999999999" --account="0x987a26abca7432016104ce2f24ce639340e25afe06ac69f68791399e7a5d1028,9999999999999999999999999999999999999999999" --account="0x89af34b1b7347834048b99423dad174a14bf14540d720d72c16ae92e94b987cb,9999999999999999999999999999999999999999999" --account="0xc867be647eb2bc51e4c0d61066859875cf3634fe949b6f5f85c69ab90e485b37,9999999999999999999999999999999999999999999" --account="0xefabcc2377dee5e51b5a9e65a3854aec85fbbec3cb584d8ad4f9679869fb33c6,9999999999999999999999999999999999999999999"`;
const ganacheDbCommand = `ganache-cli --db ${pathDaostackArcGanacheDb} -l ${Config.gasLimit} --networkId 1512051714758 --mnemonic "behave pipe turkey animal voyage dial relief menu blush match jeans general"`;
const ganacheCommand = `ganache-cli -l ${Config.gasLimit_deployment} --account="0x0191ecbd1b150b8a3c27c27010ba51b45521689611e669109e034fd66ae69621,9999999999999999999999999999999999999999999" --account="0x00f360233e89c65970a41d4a85990ec6669526b2230e867c352130151453180d,9999999999999999999999999999999999999999999" --account="0x987a26abca7432016104ce2f24ce639340e25afe06ac69f68791399e7a5d1028,9999999999999999999999999999999999999999999" --account="0x89af34b1b7347834048b99423dad174a14bf14540d720d72c16ae92e94b987cb,9999999999999999999999999999999999999999999" --account="0xc867be647eb2bc51e4c0d61066859875cf3634fe949b6f5f85c69ab90e485b37,9999999999999999999999999999999999999999999" --account="0xefabcc2377dee5e51b5a9e65a3854aec85fbbec3cb584d8ad4f9679869fb33c6,9999999999999999999999999999999999999999999"`;
const ganacheDbCommand = `ganache-cli --db ${pathDaostackArcGanacheDb} -l ${Config.gasLimit_deployment} --networkId 1512051714758 --mnemonic "behave pipe turkey animal voyage dial relief menu blush match jeans general"`;

module.exports = {
scripts: {
Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@daostack/arc.js",
"version": "0.0.0-alpha.32",
"version": "0.0.0-alpha.33",
"description": "A JavaScript library for interacting with @daostack/arc ethereum smart contracts",
"main": "dist/arc.js",
"types": "index.d.ts",
Expand Down Expand Up @@ -50,8 +50,7 @@
},
"homepage": "https://github.com/daostack/arc.js#readme",
"peerDependencies": {
"babel-preset-env": "^1.6.1",
"run-with-ganache": "^0.1.1"
"babel-preset-env": "^1.6.1"
},
"dependencies": {
"archiver": "^2.1.0",
Expand Down

0 comments on commit 87b08d6

Please sign in to comment.