casper-network / casper-network/casper-node
Extend SSE for common events (delegation, undelegation, redelegation, bid changes...)
- Dominant language
- Rust
- Stars
- 399
- Forks
- 224
- Avg merge
- 15h 44m
- Merged PRs (30d)
- 2
Description
According to my knowledge and experience there are at least 3 ways on how to delegate:
1. Call the "delegate" entrypoint of the Auction system contract. Example:
- https://cspr.live/deploy/5dc5868c327c12bdaa54cc669ebbda8dab85880f90e8d3367d6b89c8dba956a6
2. Deploy your own version of the Auction Smart Contract and call it's delegate entrypoint (I think?). Example:
- https://cspr.live/deploy/2c8bb7c48e7ee8fd8102754924d9a146b657be4d0640369f3f5ca1145ab88d43
3. Deploy a custom smart contract calling the Auction System Contract as seen here:
- https://cspr.live/deploy/786ee3fea3ece2d9914c8556bd7948c3a1962a84dd8b9d336f3180b300847e89
In case no. 3 you even have to parse the transforms which seem to be not well documented publicly.
On top of that there are at least 3 ways I'm aware of to specify the target so you have 3 different data types:
1. PublicKey
2. Account Hash
3. URef (Main Purse?)
Right now it's super tedious to detect all of those actions/deploys and to make sense out of them. Even https://cspr.live doesn't detect case no. 3 properly but shows "WASM Deploy" only. And I'm talking about "delegate" only so far - but there are much more like "undelegate", "redelegate", "withdraw_bid" and so on.
Therefore I think the SSE endpoint should be extended to handle all that parsing internally (which is done already anyway) and provide events like "Delegate", "Undelegate", the new "Redelegate", "WithdrawBid" and so on for all possible cases which are straightforward and ready to consume without the possibility of missing something. That would greatly enhance the developer experience and all development of tools which need to track such events.
Examples for such event consumers:
- Tools to create statistics like https://caspermetrics.io, https://cspr.live
- Tools for monitoring & notifications like any kind of bots
- Chain analysis tools
Are there any reasons why this doesn't exist yet?
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.