-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #51 from provable-things/add-optional-gas-prices
feat(CLI): add optional gas prices
- Loading branch information
Showing
14 changed files
with
13,753 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,9 @@ | ||
const deployEthersContract = (_contractFactory, _constructorArgs = []) => | ||
console.info('✔ Deployment tx sent, awaiting mining...') || | ||
const deployEthersContract = (_contractFactory, _constructorArgs = [], _maybeGasPrice = null) => | ||
console.info( | ||
`✔ Deployment tx sent${_maybeGasPrice && ` using gas price ${_maybeGasPrice} gwei`}, awaiting mining...` | ||
) || | ||
_contractFactory | ||
.deploy(..._constructorArgs) | ||
.deploy(..._constructorArgs, _maybeGasPrice === null ? {} : { gasPrice: _maybeGasPrice }) | ||
.catch(_err => Promise.reject(new Error(`${_err.message}\n✘ Deployment failed! See above for more info.`))) | ||
|
||
module.exports = { deployEthersContract } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
const { getPTokenContract } = require('./get-ptoken-contract') | ||
const { callFxnInContractAndAwaitReceipt } = require('./contract-utils') | ||
|
||
const setAdminOperator = (_deployedContractAddress, _ethAddress) => | ||
const setAdminOperator = (_deployedContractAddress, _ethAddress, _maybeGasPrice = null) => | ||
console.info('✔ Getting origin chain ID...') || | ||
getPTokenContract(_deployedContractAddress) | ||
.then(callFxnInContractAndAwaitReceipt('setAdminOperator', [ _ethAddress ])) | ||
.then(callFxnInContractAndAwaitReceipt('setAdminOperator', [ _ethAddress ], _maybeGasPrice)) | ||
.then(console.info) | ||
|
||
module.exports = { setAdminOperator } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.