Giter Club home page Giter Club logo

Comments (3)

andynog avatar andynog commented on August 15, 2024

These are the required steps to implement a future workflow with authz to claim rewards and re-delegate. So need to implement the required tx authz with multisig. This is for reference while working on this issue.

Grant Withdraw rewards

[binary] tx authz grant [grantee_addr] generic --msg-type /cosmos.distribution.v1beta1.MsgWithdrawDelegatorReward --expiration=1651060212 --from=ledgerS --keyring-backend=os --fees=3000ucrbrus --ledger

Grant Delegate

[binary] tx authz grant [grantee_addr] generic --msg-type /cosmos.staking.v1beta1.MsgDelegate --expiration=1651060212 --from=[account] --keyring-backend=os --fees=1000denom

Generate Withdraw Rewards Tx

[binary] tx distribution withdraw-all-rewards --keyring-backend=os --from [granter_address] --fees 1500denom --generate-only > tx.json

Execute Withdraw Rewards Tx (grantee on behalf of granter)

[binary] tx authz exec tx.json --from grantee --keyring-backend=os -y --output json

Generate Delegate Tx

[binary] tx staking delegate [valoper_addr] $([binary] query bank balances [account] -o json | jq '.balances[].amount' | xargs -I % sh -c 'echo $((%-3000));')denom --from account --keyring-backend=os --generate-only > tx_delegate.json

Execute Withdraw Rewards Tx (grantee on behalf of granter)

[binary] tx authz exec tx_delegate.json --from grantee --keyring-backend=os -y

from multisig.

andynog avatar andynog commented on August 15, 2024

While working in the multisig authz support, realized one thing. I believe the idea is to do a tx authz grant for multiple msg-types (comma separated list) in one shot, like

multisig tx authz grant <chain name> <key name> <grantee address> <message-types (eg. withdraw,commission,delegate)> [flags]

but the binary (e.g. gaiad) only allows one message type, like:

[binary] tx authz grant [grantee_addr] generic --msg-type /cosmos.staking.v1beta1.MsgDelegate --expiration=1651060212 --from=[account] --keyring-backend=os --fees=1000denom

so any ideas how this could be accomplished ? is there a way to have multiple txs to be signed in one unsigned.json ?

from multisig.

andynog avatar andynog commented on August 15, 2024

Implemented the tx authz grant command. I'm now just thinking what would be the right workflow for the remaining parts. I believe the tx authz exec will be executed by the grantee (e.g. bot). But the bot doesn't need multisig support as far as I understand. It could generate a tx (e.g. delegate) and execute it via tx authz exec.

from multisig.

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.