-
Notifications
You must be signed in to change notification settings - Fork 431
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
Reexport scale
dependencies, introduce #[ink::scale_derive]
#1890
Conversation
scale
dependencies, introduce ink::scale_derive
macroscale
dependencies, introduce #[ink::scale_derive]
Can we make derive specs to be camel case? |
We could. I had to decide between idiomatic attribute configuration I was in two minds and decided to go with the idiomatic attribute config style, on the basis that it is clear what is happening and no magic. Could possibly be persuaded to do use |
Codecov Report
@@ Coverage Diff @@
## master #1890 +/- ##
==========================================
- Coverage 52.96% 52.90% -0.06%
==========================================
Files 215 220 +5
Lines 6786 6822 +36
==========================================
+ Hits 3594 3609 +15
- Misses 3192 3213 +21
... and 5 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Done. |
Closes #1885.
Removes requirement for contracts to have direct dependencies on
parity-scale-codec
andscale-info
, instead using reexports from theink
umbrella crate. This require some additional attributes e.g.#[codec(crate = ::ink::scale)]
to specify the path of the reexported crate for the built in derives.To this end I have added a convenience attribute macro to add the necessary attributes:instead of doing
derive(Encode, Decode)
orderive(TypeInfo)
, simply:#[ink::scale_derive(Encode, Decode, TypeInfo)]
This would expand to
todo
scale
dependenciesink::scale_derive
scale_derive
macro