terra-money / warp-contracts

Other
15 stars 14 forks source link

Fix validation of job creation when a var is only used by another var but not in msg or condition #49

Closed dev8723 closed 1 year ago

dev8723 commented 1 year ago

a corner case in the validation of job msg / condition / vars during job creation, if i have 2 variables, say var1 and var2, if var1 is only used in var2 but not used in any msg or condition, i would run into ExcessVariablesInVector error, cause if a var is only used in other vars, it's considered as unused according to the current implementation

dev8723 commented 1 year ago

This is resolved by skipping the excessive var check (basically we only check all vars used in msgs / condition / vars are present, not the other way around, so user could put unused vars without error)