Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unable to call no-param extrinsic #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hahaschool
Copy link

Hi guys,

I'm a collator on Moonbeam network (also an orbiter on MOVR) and have some needs to sign no-param extrinsics like moonbeamOrbiters.orbiterRegister() offline. But I found this offline sign always convert an empty param list to a one-item array so I made some modifications to make it work.

Before the fix, I will get:

./moonbeam-signer-macos createAndSendTx "moonbeam" wss://wss.api.moonbeam.network "<our_orbiter_address>" "moonbeamOrbiters.orbiterRegister" ""

Error: Extrinsic moonbeamOrbiters.orbiterRegister expects 0 arguments, got 1.
    at assert (/snapshot/dist/index.js)
    at extrinsicFn (/snapshot/dist/index.js)
    at Object.decorated [as orbiterRegister] (/snapshot/dist/index.js)
    at createAndSendTx (/snapshot/dist/index.js)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Object.handler (/snapshot/dist/index.js)

After fix, it could work.

Feel free to contact if there's any issue. Many Thanks!

Adam

@crystalin
Copy link
Collaborator

You need to use the new version, you can then pass the empty params:

npm run cli -- createAndSendTx  --network moonbase --ws wss://wss.api.moonbeam.network --address "<your_address>" --tx moonbeamOrbiters.orbiterRegister --params []

@hahaschool
Copy link
Author

You need to use the new version, you can then pass the empty params:

npm run cli -- createAndSendTx  --network moonbase --ws wss://wss.api.moonbeam.network --address "<your_address>" --tx moonbeamOrbiters.orbiterRegister --params []

Thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants