Timeline for How to bit shift a bytes in solidity / assembly?
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Feb 15, 2022 at 8:46 | vote | accept | ClementWalter | ||
Jan 21, 2022 at 20:11 | comment | added | Ismael♦ |
DSL in this context is en.wikipedia.org/wiki/Domain-specific_language, e.g. you do not perform the shift but returns something like Shift(byteArray,8) so in the frontend the shift will be performed.
|
|
Jan 21, 2022 at 19:15 | comment | added | ClementWalter | what is DSL? And why do you think it is a bad idea? I am interested in learning more! thx | |
Jan 21, 2022 at 19:06 | comment | added | Ismael♦ | It sounds like a bad idea shifting byte arrays. If necessary I'd do it off-chain or use some kind of DSL. | |
Jan 21, 2022 at 18:51 | comment | added | ClementWalter | it's a custom encoding of data for on-chain NFTs, I didn't mean to advertise here but you can find out more on our page chaindreamers.xyz/on-chain-storage | |
Jan 21, 2022 at 17:15 | comment | added | Ismael♦ | Why do you have to shift a bytes array? What are the possible values for the shift length? It has a bad smell shifting a bytes array of arbitrary length. | |
Jan 21, 2022 at 16:27 | comment | added | ClementWalter |
I am considering this actually, split my bytes into chunks of bytes32
|
|
Jan 21, 2022 at 12:35 | comment | added | Ismael♦ | How long is byte array? If it is less or equal to 32 you could use bytes32 instead of bytes and the shift should work. | |
Jan 18, 2022 at 21:38 | answer | added | Richard | timeline score: 3 | |
Jan 18, 2022 at 20:40 | history | asked | ClementWalter | CC BY-SA 4.0 |