Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

[pallet-contracts] Schedule is not public for developer to change the config #8869

Closed
atenjin opened this issue May 20, 2021 · 2 comments
Closed

Comments

@atenjin
Copy link
Contributor

atenjin commented May 20, 2021

after #8773 Schedule is moved from a storage to outside, but Schedule just provide a Default::default() implementation, but not provide the construct function to set any attribute!

https://github.com/paritytech/substrate/blob/master/frame/contracts/src/schedule.rs#L50-L59

it's attributes are all (crate)

and the Limits and other structs are not public.

For example If I wanna change the max_code_len, I cannot set from the runtime.

@atenjin
Copy link
Contributor Author

atenjin commented May 20, 2021

related to #8433

@athei
Copy link
Member

athei commented May 20, 2021

The rational for this change is explained in the issue you linked. That said, I intent to add back the ability to fully customize the the Schedule before the next version of this crate is released. But that cannot be accomplished by making the fields public for the reason explained in the linked issue. I will probably write a proc macro that creates versioned constructors that let you set all fields.

Closing because this is subsumed by #8433.

@athei athei closed this as completed May 20, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants