You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a string however, and not the easiest to use in migrate. to say, "allow migration where version.major == 0 && [8..-=10].contains(version.minor)".
As a first step, is a utility to parse a valid semver string into:
pubSemverstruct{pub major: u32;pub minor: u32;pub patch: u32;// if you think this needs even more structure here, feel free to addpub tag:Option<String>;}
Also please add some basic constructors and implement Ord, so we can do something like:
if version < Semver::new(0,8,0){returnErr("too low");}elseif version >= Semver::new(0,10,1){returnErr("too high");}else{// do migration}
The types above are meant to give inspiration and you can change them if you have a better idea that fulfills the same purpose.
The text was updated successfully, but these errors were encountered:
Useful feature for migration support.
Pretty much every contract uses cw2 to store the version as defined by cargo:
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
This is a string however, and not the easiest to use in migrate. to say, "allow migration where
version.major == 0 && [8..-=10].contains(version.minor)
".As a first step, is a utility to parse a valid semver string into:
Also please add some basic constructors and implement Ord, so we can do something like:
The types above are meant to give inspiration and you can change them if you have a better idea that fulfills the same purpose.
The text was updated successfully, but these errors were encountered: