Code Monkey home page Code Monkey logo

delegations-to-csv's Introduction

Delegations to CSV

Running

To run the code

make; ./getData

getData takes several arguments who have defaults. They are listed here

./getData -h
Usage of ./getData:
  -delegationsFile string
    	the output file for the delegations csv (default "delegations.csv")
  -multipleDelegationsFile string
    	the output csv file for the delegations who delegated to more than one validator (default "multipleDelegations.csv")
  -node string
    	the node to query (default "grpc.osmosis.zone:9090")
  -validatorFile string
    	the output file for the validators csv (default "validators.csv")

getData will overwrite the output files on subsequent runs (for convenience).

To run the tests

go test ./...

Output file formats

validators.csv

The columns are labeled on the first line of the csv:

moniker, voting_power, self_delegation, and total_delegation

moniker,voting_power,self_delegation,total_delegation
Inotel,5954186,1,5954186272952.000000000000000000
Provalidator,5919132,1,5919132600191.000000000000000000
SG-1,4633419,1,4633419291280.000000000000000000
DACM,4172534,90000000,4172534401353.000000000000000000
strangelove-ventures,3450774,1,3450774672524.000000000000000000
Imperator.co,2872057,1,2872057393075.000000000000000000
Parakeet,2845181,1,2845181639728.000000000000000000
Stakecito,2651033,1,2651033528949.000000000000000000
wosmongton,2445932,1,2445932846498.000000000000000000

delegations.csv

This file can be very large but it lists the totals for each delegator across all validators. The colums are labeled on the first line of the csv:

delegator, voting_power

moniker,voting_power,self_delegation,total_delegation
Inotel,5954186,1,5954186272952.000000000000000000
Provalidator,5919132,1,5919132600191.000000000000000000
SG-1,4633419,1,4633419291280.000000000000000000
DACM,4172534,90000000,4172534401353.000000000000000000
strangelove-ventures,3450774,1,3450774672524.000000000000000000
Imperator.co,2872057,1,2872057393075.000000000000000000
Parakeet,2845181,1,2845181639728.000000000000000000
Stakecito,2651033,1,2651033528949.000000000000000000
wosmongton,2445932,1,2445932846498.000000000000000000

multipleDelegations.csv

This file lists the multiple delegations for each delegator that has delegated tokens to more than one validator. The colums are labeled on the first line of the csv:

delegator, validator, bonded_tokens

Bonded tokens is zero if the validator is unbonded.

delegator,validator,bonded_tokens
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1z89utvygweg5l56fsk8ak7t6hh88fd0axx2fya,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1gy0nyn2hscxxayj2pdyu8axmfvv75nnvhc079s,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper196ax4vc0lwpxndu9dyhvca7jhxp70rmcmmarz7,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1q6xc9x054z9y7ll7k740j2cvdsllsfhs5rxyaj,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1r2u5q6t6w0wssrk6l66n3t2q3dw2uqny4gj2e3,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1t8qckan2yrygq7kl9apwhzfalwzgc2429p8f0s,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1prmsfrgvla0u8x3kwc8k0mcqqve3h8y73d37nm,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper12rzd5qr2wmpseypvkjl0spusts0eruw2g35lkn,10
osmo1kpn0v2rz54aljzdyflxhfd686kazfkjh7u0qg0,osmovaloper1thsw3n94lzxy0knhss9n554zqp4dnfzx78j7sq,10

delegations-to-csv's People

Contributors

brianosaurus avatar

Watchers

 avatar Abhishek Kumar  avatar

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.