-
Notifications
You must be signed in to change notification settings - Fork 5k
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 #2660 from princesinha19/miner-methods
Geth "Miner and DAG" management API's implemented (web3-eth-miner)
- Loading branch information
Showing
28 changed files
with
1,471 additions
and
30 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
36 changes: 36 additions & 0 deletions
36
packages/web3-core-method/src/methods/miner/SetEtherBaseMethod.js
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
This file is part of web3.js. | ||
web3.js is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
web3.js is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with web3.js. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** | ||
* @file SetEtherBaseMethod.js | ||
* @author Prince Sinha <sinhaprince013@gmail.com> | ||
* @date 2019 | ||
*/ | ||
|
||
import AbstractMethod from '../../../lib/methods/AbstractMethod'; | ||
|
||
export default class SetEtherBaseMethod extends AbstractMethod { | ||
/** | ||
* @param {Utils} utils | ||
* @param {Object} formatters | ||
* @param {AbstractWeb3Module} moduleInstance | ||
* | ||
* @constructor | ||
*/ | ||
constructor(utils, formatters, moduleInstance) { | ||
super('miner_setEtherbase', 1, utils, formatters, moduleInstance); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
packages/web3-core-method/src/methods/miner/SetExtraMethod.js
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
This file is part of web3.js. | ||
web3.js is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
web3.js is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with web3.js. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** | ||
* @file SetExtraMethod.js | ||
* @author Prince Sinha <sinhaprince013@gmail.com> | ||
* @date 2019 | ||
*/ | ||
|
||
import AbstractMethod from '../../../lib/methods/AbstractMethod'; | ||
|
||
export default class SetExtraMethod extends AbstractMethod { | ||
/** | ||
* @param {Utils} utils | ||
* @param {Object} formatters | ||
* @param {AbstractWeb3Module} moduleInstance | ||
* | ||
* @constructor | ||
*/ | ||
constructor(utils, formatters, moduleInstance) { | ||
super('miner_setExtra', 1, utils, formatters, moduleInstance); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
packages/web3-core-method/src/methods/miner/SetGasPriceMethod.js
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
This file is part of web3.js. | ||
web3.js is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
web3.js is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with web3.js. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** | ||
* @file SetGasPriceMethod.js | ||
* @author Prince Sinha <sinhaprince013@gmail.com> | ||
* @date 2019 | ||
*/ | ||
|
||
import AbstractMethod from '../../../lib/methods/AbstractMethod'; | ||
|
||
export default class SetGasPriceMethod extends AbstractMethod { | ||
/** | ||
* @param {Utils} utils | ||
* @param {Object} formatters | ||
* @param {AbstractWeb3Module} moduleInstance | ||
* | ||
* @constructor | ||
*/ | ||
constructor(utils, formatters, moduleInstance) { | ||
super('miner_setGasPrice', 1, utils, formatters, moduleInstance); | ||
} | ||
} |
36 changes: 36 additions & 0 deletions
36
packages/web3-core-method/src/methods/miner/StartMinerMethod.js
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
/* | ||
This file is part of web3.js. | ||
web3.js is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU Lesser General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
web3.js is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU Lesser General Public License for more details. | ||
You should have received a copy of the GNU Lesser General Public License | ||
along with web3.js. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
/** | ||
* @file StartMinerMethod.js | ||
* @author Prince Sinha <sinhaprince013@gmail.com> | ||
* @date 2019 | ||
*/ | ||
|
||
import AbstractMethod from '../../../lib/methods/AbstractMethod'; | ||
|
||
export default class StartMinerMethod extends AbstractMethod { | ||
/** | ||
* @param {Utils} utils | ||
* @param {Object} formatters | ||
* @param {AbstractWeb3Module} moduleInstance | ||
* | ||
* @constructor | ||
*/ | ||
constructor(utils, formatters, moduleInstance) { | ||
super('miner_start', 1, utils, formatters, moduleInstance); | ||
} | ||
} |
Oops, something went wrong.