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

module_with_calls is not public caused I failed to compose two calls #112

Closed
Dengjianping opened this issue May 22, 2020 · 3 comments · Fixed by #123
Closed

module_with_calls is not public caused I failed to compose two calls #112

Dengjianping opened this issue May 22, 2020 · 3 comments · Fixed by #123

Comments

@Dengjianping
Copy link

Hi there,

This issue might be quite the same with How could I send a sudo call.

I'm using subxt-0.6, which works fast and as expected. But I find out that this interface module_with_calls become private while I try to upgrade to 0.7. Here is code sample with subxt-0.6

let proposal = client.metadata().module_with_calls("MyModule")
		.and_then(|module| module.call("my_call", my_call_args))
		.map_err(|_| crate::Error::SubxtError("failed to compose a sudo call"))?;
let call = Call::new("Sudo", "sudo", proposal);

So now I cannot upgrade subxt to 0.7 or higher, can that interface change to be public? Or maybe you can give me a better solution instead of changing that interface.

Thanks!

@dvc94ch
Copy link
Contributor

dvc94ch commented May 25, 2020

You should look at the examples, for example the frame/balances module.

@Dengjianping
Copy link
Author

Yes, those examples are really good. I checked it, but it's not meet my requirements.
I have a my own module, and one of call from this module still needs sudo privilege, so I didn't find any example that can send a sudo call.
But in subxt-0.6, I can compose a sudo call as listed above, and it works.

@dvc94ch
Copy link
Contributor

dvc94ch commented May 26, 2020

I see, so you want to construct an extrinsic and pass it as the argument to another extrinsic. I think #113 could help with that, but I'd need to try it.

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