Near-One / near-plugins

Implementation of common patterns used for NEAR smart contracts.
Creative Commons Zero v1.0 Universal
27 stars 12 forks source link

`Upgradable::up_stage_code` should take param `code: Option<Vec<u8>>` #73

Open mooori opened 1 year ago

mooori commented 1 year ago

...with None removing any staged code. This is more idiomatic than removing staged code when the vector passed to up_stage_code is empty:

https://github.com/aurora-is-near/near-plugins/blob/c043add4c2a0810872c4326a55c5162bccd3f4ee/near-plugins-derive/src/upgradable.rs#L32-L39

The possibility to remove staged code should also be mentioned in the docs.

The issue is based on this discussion.