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
The pop-api should use explicit types for function id and version. By relying on constants, someone can accidentally switch the order of a function id and version and there will be no error.
How do you envisage this is done? An enum with variants might be nice, but would still require conversion to a u8 to pass into the func_id expected by the chain extension, which could be implemented via Into<u8>. Would need to ensure no affect on contract size tho...
The pop-api should use explicit types for function id and version. By relying on constants, someone can accidentally switch the order of a function id and version and there will be no error.
See here: https://github.com/r0gue-io/pop-node/blob/daan/api/pop-api/src/lib.rs#L29
The text was updated successfully, but these errors were encountered: