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

drop dependency of examples on test node_runtime crate #26

Closed
brenzi opened this issue Sep 21, 2019 · 3 comments · Fixed by #52
Closed

drop dependency of examples on test node_runtime crate #26

brenzi opened this issue Sep 21, 2019 · 3 comments · Fixed by #52
Labels
F7-enhancement Enhances an already existing functionality

Comments

@brenzi
Copy link
Contributor

brenzi commented Sep 21, 2019

It is cumbersome to fix dependency issues because we import substrate-test-runtime

  1. the build script enforces wasm build which is not necessary here
  2. too many dependencies are added for only a fow type definitions
@brenzi brenzi changed the title drop dependency on custom node_runtime drop dependency of examples on test node_runtime crate Sep 21, 2019
@brenzi
Copy link
Contributor Author

brenzi commented Sep 22, 2019

done, except example_contracts.rs which depends on runtime's Event type. Can we define that ourselves? If I use node_runtime::Event it won't recognize a contract Event - obviously.

https://github.com/scs/substrate-api-client/tree/no_std_rstd

@brenzi brenzi added the F7-enhancement Enhances an already existing functionality label Sep 22, 2019
@brenzi brenzi mentioned this issue Sep 22, 2019
@clangenb
Copy link
Collaborator

We can do that. The event enum is constructed in the same manner as the call enums, which can therefore be constructed from the metadata. I reckon approximately 2-3 ours to have that work.

Would do that with a macro in order handle the dynamic argument types.

@brenzi
Copy link
Contributor Author

brenzi commented Feb 8, 2020

Unfortunately, the root cause why we have to disable the contract example right now is still an open issue:
rust-lang/cargo#6571

So, if we can work around the Event enum dependency easily, that'd be great

clangenb added a commit that referenced this issue Feb 14, 2020
implemented listening generically for events based on data obtained from the metadata
added example_generic_event_callback
modified contract example to listen generically. -> contract example is fixed now. closes #26 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F7-enhancement Enhances an already existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants