move icon indicating copy to clipboard operation
move copied to clipboard

feat(stdlib): encode and decode base16

Open zouguangxian opened this issue 3 years ago • 2 comments

Motivation

provide a human-friendly representation of binary-coded values.

Have you read the Contributing Guidelines on pull requests?

Yes

Test Plan

move test passed in language/move-stdlib/nursery/sources directory.

zouguangxian avatar Aug 24 '22 07:08 zouguangxian

I am personally in favor of having more of these utility encoding/decoding libraries inside the Move stdlib, but we need to think carefully about how we want to organize them--one module per format (as this suggests?). All in one big bytes module? Something else?

sblackshear avatar Sep 03 '22 15:09 sblackshear

I support one module per format

jolestar avatar Sep 06 '22 01:09 jolestar

Another approach we could consider here (that would make the testing burden a bit less onerous) is to implement this via native functions that wrap the Rust hex library.

sblackshear avatar Oct 03 '22 16:10 sblackshear

Another approach we could consider here (that would make the testing burden a bit less onerous) is to implement this via native functions that wrap the Rust hex library.

I also think it is possible to let the User Module implement a native function with a WASM runtime in the future. This approach lets adding new native functions more gracefully and does not need a hard fork upgrade.

jolestar avatar Oct 04 '22 06:10 jolestar