Skip to content

Unable to get democracy.vote call #292

Answered by arjanz
frmz asked this question in Q&A
Discussion options

You must be logged in to vote

The format of the call_params looks very similar as PolkadotJS, but do has a few differences. So some adjustments have to be made:

call = substrate.compose_call(
            call_module='Democracy',
            call_function='vote',
            call_params={
                'ref_index': 208,
                'vote': {'Standard': ({'aye': True, 'conviction': 'Locked2x'}, 1100000000000)}
            }
        )

I agree a better helper function should be available to format those call function args better (like for storage functions ), until then I think the best way is the fetch an existing extrinsic on-chain and examine the format, for example:

extrinsic_receipt = substrate.retrieve_extrins…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by arjanz
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #221 on January 03, 2023 14:57.