File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -199,6 +199,13 @@ class ContractDeployer {
199199 function applyBeforeDeploy ( next ) {
200200 self . plugins . emitAndRunActionsForEvent ( 'deploy:contract:beforeDeploy' , { contract : contract } , next ) ;
201201 } ,
202+ function getGasPriceForNetwork ( next ) {
203+ self . events . request ( "blockchain:gasPrice" , ( gasPrice ) => {
204+ console . dir ( '[contracts/contracts]: got gasPrice of ' + gasPrice ) ;
205+ contract . gasPrice = contract . gasPrice || gasPrice ;
206+ next ( ) ;
207+ } ) ;
208+ } ,
202209 function createDeployObject ( next ) {
203210 let contractObject = self . blockchain . ContractObject ( { abi : contract . abiDefinition } ) ;
204211
Original file line number Diff line number Diff line change @@ -95,13 +95,7 @@ class ContractsManager {
9595 } ,
9696 function getGasPriceForNetwork ( callback ) {
9797 console . dir ( '[contracts/contracts]: gas price for network, passed in gasPrice from config: ' + self . contractsConfig . gasPrice ) ;
98- if ( self . contractsConfig . gasPrice ) {
99- return callback ( null , self . contractsConfig . gasPrice ) ;
100- }
101- self . events . request ( "blockchain:gasPrice" , ( gasprice ) => {
102- console . dir ( '[contracts/contracts]: got gasPrice of ' + gasprice ) ;
103- callback ( null , gasprice ) ;
104- } ) ;
98+ return callback ( null , self . contractsConfig . gasPrice ) ;
10599 } ,
106100 function prepareContractsFromCompilation ( gasPrice , callback ) {
107101 console . dir ( '[contracts/contracts]: using gasprice ' + gasPrice + ', prepare contracts from compilation' ) ;
You can’t perform that action at this time.
0 commit comments