Code Monkey home page Code Monkey logo

Comments (3)

kwunyeung avatar kwunyeung commented on June 15, 2024

@RiccardoM The self delegation ratio is the how much the validator has self delegated from it's own delegator account. We need to know the self delegation address which you can convert it from the desmosvaloper address back to desmos prefix. Currently I save the self delegation address once a new validator appears on the network. And then query the /staking/delegators/{delegatorAddr}/delegations/{validatorAddr} endpoint. For example,

http://lcd.morpheus.desmos.network:1317/staking/delegators/desmos1835rcx9ahn0a62pfpufsfj7jwv0vfsw47tk7tz/delegations/desmosvaloper1835rcx9ahn0a62pfpufsfj7jwv0vfsw4qx72ps

Then you can get the number of shares or tokens the delegation has.

from callisto.

HarleyAppleChoi avatar HarleyAppleChoi commented on June 15, 2024

I am doing a message handler approach that catches the MsgDelegate, every change of delegation. If that is from the self delegation address then safe it to table
It can also store the delegation from other accounts. Do we interested in that?

from callisto.

RiccardoM avatar RiccardoM commented on June 15, 2024

@HarleyAppleChoi I'm currently implemented what you have suggested inside #18 so don't bother going after that.

The way of handling MsgDelegate is perfect. Just make sure to also parse the genesis (you can do so by using a GenesisHandler so that you can get the starting data from when the chain spins up.

from callisto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.