opshin icon indicating copy to clipboard operation
opshin copied to clipboard

Implement bytes.fromhex

Open nielstron opened this issue 1 year ago • 2 comments

A lot of data in Cardano (public key hashes, validator addresses, etc) are binary but usually displayed in hexadecimal notation.

Opshin should hence let users transform this usual notation to actual bytes with bytes.fromhex("...") as it is done in python most frequently.

Ideally this comes with pre-evaluation of constant terms on the opshin level, so that the (expensive) transformation is not actually done on-chain but at compilation time.

Note: goes well with #365

Bug bounty: 1000 ADA

nielstron avatar Mar 25 '23 19:03 nielstron

this is alread covered for constants as part of #139 hence decreases in priority

nielstron avatar Jul 02 '23 10:07 nielstron

just a small comment on this issue as I also would like to use bytes.fromhex() in my smart contracts :)

chrissiwaffler avatar Aug 26 '23 10:08 chrissiwaffler

claiming this issue

nielstron avatar Jul 23 '24 14:07 nielstron