Deployment of PricerRule and It's interactions#66
Deployment of PricerRule and It's interactions#66gulshanvasnani merged 20 commits intoOpenST:developfrom
Conversation
# Conflicts: # dist/openst.js # dist/openst.min.js # lib/helper/User.js # lib/setup/TokenRules.js
# Conflicts: # dist/openst.js # dist/openst.min.js # index.js # lib/helper/User.js # test/integration/ExecuteRule.js # test/utils/configReader.js
lib/helper/rules/PricerRule.js
Outdated
| const oThis = this; | ||
| let txObject = oThis._addPriceOracleRawTx(priceOracleAddress); | ||
|
|
||
| let txReceipt; |
There was a problem hiding this comment.
Make declaration of txObject and txReceipt variables as const.
lib/helper/rules/PricerRule.js
Outdated
| */ | ||
| async removePriceOracle(payCurrencyCode, txOptions) { | ||
| const oThis = this; | ||
| let txObject = oThis._removePriceOracleRawTx(payCurrencyCode); |
| */ | ||
| async setAcceptanceMargin(payCurrencyCode, acceptanceMargin, txOptions) { | ||
| const oThis = this; | ||
| let txObject = oThis._setAcceptanceMarginRawTx(payCurrencyCode, acceptanceMargin); |
lib/helper/rules/PricerRule.js
Outdated
| */ | ||
| async removeAcceptanceMargin(payCurrencyCode, txOptions) { | ||
| const oThis = this; | ||
| let txObject = oThis._removeAcceptanceMarginRawTx(payCurrencyCode); |
test/utils/configReader.js
Outdated
| conversionRate: 2, | ||
| conversionRateDecimals: 18, | ||
| requiredPriceOracleDecimals: 18, | ||
| sessionKeysSpendingLimits: [1000000], |
There was a problem hiding this comment.
I believe we should not have arrays in configReader.
Instead it should be a value.
Suggestion :-
sessionKeysSpendingLimits: [1000000] => sessionKeysSpendingLimits: 1000000
Same comment for sessionKeysExpirationHeights.
| @@ -0,0 +1,122 @@ | |||
| // Copyright 2019 OpenST Ltd. | |||
There was a problem hiding this comment.
Change declaration type of the variable to const instead of let.
| PricerRuleContractName = 'PricerRule', | ||
| TxSender = require('./../../../utils/TxSender'); | ||
|
|
||
| class PricerRule { |
There was a problem hiding this comment.
Documentation for class.
lib/helper/rules/PricerRule.js
Outdated
| // | ||
| // ---------------------------------------------------------------------------- | ||
|
|
||
| 'user strict'; |
There was a problem hiding this comment.
user strict => use strict
| @@ -0,0 +1,183 @@ | |||
| // Copyright 2019 OpenST Ltd. | |||
There was a problem hiding this comment.
Change declaration type of the variable to const instead of let.
Please add method for generating executable data of pay method of PricerRule contract.
|
|
||
| /** | ||
| * Removes an acceptance margin of the base currency price in the | ||
| * specified pay currency. From should be worker only. |
There was a problem hiding this comment.
Suggestion :-
From address should be only worker address.
Please update in other methods also.
PR contain below tasks:
Testing of interaction methods are dependent on merging of EIP1077 and ExecuteRule tickets.