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 --preimage storage value #675

Closed
wants to merge 1 commit into from

Conversation

serban300
Copy link

@serban300 serban300 commented Feb 29, 2024

Related to: #630 and paritytech/polkadot-sdk#3522

I'm trying to simulate some bridge-initialization calls using chopsticks. I used the code found in dry-run-preimage.ts as an example for crafting my own dev_setStorage call for simulating an approved preimage. The initial version didn't work (it was failing with CallUnavailable) and it took quite a while to find the solution presented in #630. Not sure if this is the best fix, but I think it would bring value to have this fixed. At least it would have saved a lot of time for me.

@ermalkaleci
Copy link
Collaborator

dry-run-preimage works fine. what are you trying to fix?

@ermalkaleci
Copy link
Collaborator

ok I see. in your case it didn't work because compactAddLength returns u8a and your using rpc method dev_setStorage which will stringily params and sending invalid data. that's why u8aToHex fixes your issue.

@serban300
Copy link
Author

Oh, I see. Sorry, I didn't realize. Ok. I'll close the PR then.

@serban300 serban300 closed this Feb 29, 2024
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