Skip to content
This repository has been archived by the owner on Aug 22, 2018. It is now read-only.

Commit

Permalink
Added gasPrice param when scheduling transaction
Browse files Browse the repository at this point in the history
  • Loading branch information
kosecki123 committed Feb 14, 2018
1 parent cdac90d commit 99cde49
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/scheduling/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ class Scheduler {
this.sender = opts.from
this.gasLimit = opts.gas
this.sendValue = opts.value
this.gasPrice = opts.gasPrice
}

setGas(gasLimit) {
this.gasLimit = gasLimit
}

setGasPrice(gasPrice) {
this.gasPrice = gasPrice
}

setSender(address) {
// TODO verfiy with ethUtil
this.sender = address
Expand Down Expand Up @@ -79,6 +84,7 @@ class Scheduler {
from: this.sender,
gas: this.gasLimit,
value: this.sendValue,
gasPrice: this.gasPrice
},
(err, txHash) => {
if (err) reject(err)
Expand Down Expand Up @@ -132,6 +138,7 @@ class Scheduler {
from: this.sender,
gas: this.gasLimit,
value: this.sendValue,
gasPrice: this.gasPrice
},
(err, txHash) => {
if (err) reject(err)
Expand Down
2 changes: 2 additions & 0 deletions test/scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ describe("Scheduler", () => {
from: web3.eth.defaultAccount,
gas: 3000000,
value: endowment,
gasPrice
})

const receipt = await eacScheduler.blockSchedule(
Expand Down Expand Up @@ -109,6 +110,7 @@ describe("Scheduler", () => {
from: web3.eth.defaultAccount,
gas: 3000000,
value: endowment,
gasPrice
})

const receipt = await eacScheduler.timestampSchedule(
Expand Down

0 comments on commit 99cde49

Please sign in to comment.