Skip to content
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

Merged
merged 20 commits into from
Feb 6, 2019

Conversation

abhayks1
Copy link
Contributor

@abhayks1 abhayks1 commented Feb 4, 2019

PR contain below tasks:

Testing of interaction methods are dependent on merging of EIP1077 and ExecuteRule tickets.

const oThis = this;
let txObject = oThis._addPriceOracleRawTx(priceOracleAddress);

let txReceipt;
Copy link
Contributor

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.

*/
async removePriceOracle(payCurrencyCode, txOptions) {
const oThis = this;
let txObject = oThis._removePriceOracleRawTx(payCurrencyCode);
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

*/
async removeAcceptanceMargin(payCurrencyCode, txOptions) {
const oThis = this;
let txObject = oThis._removeAcceptanceMarginRawTx(payCurrencyCode);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

conversionRate: 2,
conversionRateDecimals: 18,
requiredPriceOracleDecimals: 18,
sessionKeysSpendingLimits: [1000000],
Copy link
Contributor

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.
Copy link
Contributor

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 {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation for class.

//
// ----------------------------------------------------------------------------

'user strict';
Copy link
Contributor

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.
Copy link
Contributor

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.
Copy link
Contributor

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.

Copy link
Contributor

@gulshanvasnani gulshanvasnani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 💯 👍

@gulshanvasnani gulshanvasnani merged commit 1b17fe3 into OpenST:develop Feb 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants