solidity-bytes-utils
solidity-bytes-utils copied to clipboard
Utility Solidity library composed of basic operations for tightly packed bytes arrays
@GNSPS First of all, thanks for writing a great library! I'm having a hard time understanding the following [line](https://github.com/GNSPS/solidity-bytes-utils/blob/6458fb2780a3092bc756e737f246be1de6d3d362/contracts/BytesLib.sol#L112): ``` switch add(lt(slength, 32), lt(newlength, 32)) case 2 { // Since...
Bumps [lodash](https://github.com/lodash/lodash) from 4.17.15 to 4.17.21. Commits f299b52 Bump to v4.17.21 c4847eb Improve performance of toNumber, trim and trimEnd on large input strings 3469357 Prevent command injection through _.template's variable...
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.12.2 to 6.12.6. Release notes Sourced from ajv's releases. v6.12.6 Fix performance issue of "url" format. v6.12.5 Fix uri scheme validation (@ChALkeR). Fix boolean schemas with strictKeywords...
Why was the "toUint24" method removed? Here is the rather simple code to implement it: ``` function toUint24(bytes memory _bytes, uint256 _start) internal pure returns (uint24) { require(_bytes.length >= _start...
I've been playing around with this lib and thought these might be useful functions to help code flow a little better.
Hi, I have a question on the first require on the slice method. Shouldn't this `require(_length + 31 >= _length, "slice_overflow");` be `require(_bytes.length + 31 >= _length, "slice_overflow");` to be...
`BytesLib.equal` and `BytesLib.equal_nonAligned` can be replaced with a much simpler, more gas efficient and purely Solidity (YUL probably won't bring any benefits here): `return _preBytes.length == _postBytes.length && keccak256(_preBytes) ==...
### The problem `forge-std` and `ds-test` are being installed in downstream projects even though they are not needed for this library. They are only used for testing so they should...
### In this PR - Remove `dependencies` from `package.json` - The `forge-std` dependency is quite outdated, preferred way of installing this is `forge install foundry-rs/forge-std` - These dependencies are not...