Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
212 additions
and
45 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
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,32 @@ | ||
import BigNumber from 'bignumber.js'; | ||
|
||
export interface IEconomicStrategy { | ||
/** | ||
* Maximum deposit a TimeNode would be willing | ||
* to stake while claiming a transaction. | ||
*/ | ||
maxDeposit?: BigNumber; | ||
|
||
/** | ||
* Minimum balance a TimeNode has to | ||
* have in order to claim a transaction. | ||
*/ | ||
minBalance?: BigNumber; | ||
|
||
/** | ||
* Minimum profitability a scheduled transactions | ||
* has to bring in order for the TimeNode to claim it. | ||
*/ | ||
minProfitability?: BigNumber; | ||
|
||
/** | ||
* A number which defines the percentage with which | ||
* the TimeNode would be able to subsidize the amount of gas | ||
* it sends at the time of the execution. | ||
* | ||
* e.g. If the scheduled transaction has set the gas price to 20 gwei | ||
* and `maxGasSubsidy` is set to 50, the TimeNode would be willing | ||
* to subsidize gas costs to up to 30 gwei. | ||
*/ | ||
maxGasSubsidy?: number; | ||
} |
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,2 +1,2 @@ | ||
export { IEconomicStrategy } from './IEconomicStrategy'; | ||
export { shouldClaimTx } from './EconomicStrategyHelpers'; | ||
export { shouldClaimTx, shouldExecuteTx, getExecutionGasPrice } from './EconomicStrategyHelpers'; |
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
Oops, something went wrong.