-
Notifications
You must be signed in to change notification settings - Fork 3
Conversation
51d07f6
to
7ce90bd
Compare
6ecb921
to
85c3124
Compare
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, except on the handler structure, that I don't like.
This pull request introduces 1 alert when merging 5c6a63f into 4d48f80 - view on LGTM.com new alerts:
|
5c6a63f
to
19d119f
Compare
This pull request introduces 1 alert when merging 19d119f into 4d48f80 - view on LGTM.com new alerts:
|
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.
Few suggestions
This pull request introduces 1 alert when merging 7ed468b into 4d48f80 - view on LGTM.com new alerts:
|
This pull request introduces 1 alert when merging 3658eb9 into 4d48f80 - view on LGTM.com new alerts:
|
Btw. this PR is blocked until the Staking PR is merged and released :-) |
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, now we only have to release the Staking part of the SC.
Blocked by: rsksmart/rif-marketplace-storage#112 |
Closes #284 |
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 don't really agree with the approach for fetching the token's symbol. I would just use config and have configured tokens and their addresses. Simplicity FTW here...
} | ||
|
||
const contract = new eth.Contract(tokenAbi, token) | ||
return contract.methods.symbol().call({ from: eth.accounts.create() }) |
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.
Ufff, so you are calling the ERC20 contract here to resolve for given token address its symbol here? I am not sure this is a good approach. How fast is this call? Also, how do you make sure that this is actually value defined in SupportedTokens
?
I would say first of all we want have defined list of tokens that we support (most probably already mentioned config
should be good place to have it there) and since we gonna do that we can add their address as well? We already do this for every other interaction with blockchain, so I would say it is standard and it will saves us lot of this work, that I am not sure if actually bring many benefits.
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.
Hmm... The call is fast enough (it's static call), but I agree that tokens in the config would be better
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, thanks for implementing the suggestions!
prepare staking contract event handling
use literals in offer scope where statement(allow to cast string to number on db layer)
fix stakes events handlers add stake service to channel
precache staking contract
add draft for aggregation of stakes and offer ordering by stakes
offer order by total-stakes-usd
adjust staking symbol resolving using config instead of SC
9d5b301
to
9ae86fe
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
This PR introduces listening and handling of Staking Contract Events