-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Deployment of PricerRule and It's interactions #66
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
*/ | ||
async setAcceptanceMargin(payCurrencyCode, acceptanceMargin, txOptions) { | ||
const oThis = this; | ||
let txObject = oThis._setAcceptanceMarginRawTx(payCurrencyCode, acceptanceMargin); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
lib/helper/rules/PricerRule.js
Outdated
*/ | ||
async removeAcceptanceMargin(payCurrencyCode, txOptions) { | ||
const oThis = this; | ||
let txObject = oThis._removeAcceptanceMarginRawTx(payCurrencyCode); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
test/utils/configReader.js
Outdated
conversionRate: 2, | ||
conversionRateDecimals: 18, | ||
requiredPriceOracleDecimals: 18, | ||
sessionKeysSpendingLimits: [1000000], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation for class.
lib/helper/rules/PricerRule.js
Outdated
// | ||
// ---------------------------------------------------------------------------- | ||
|
||
'user strict'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
user strict
=> use strict
@@ -0,0 +1,183 @@ | |||
// Copyright 2019 OpenST Ltd. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggestion :-
From address should be only worker address.
Please update in other methods also.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 💯 👍
PR contain below tasks:
Testing of interaction methods are dependent on merging of EIP1077 and ExecuteRule tickets.