Add RLP library#5680
Conversation
Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
Co-authored-by: Arr00 <13561405+arr00@users.noreply.github.com>
🦋 Changeset detectedLatest commit: 371595d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
| // OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/ERC4626.sol) | ||
|
|
||
| pragma solidity ^0.8.20; | ||
| pragma solidity ^0.8.24; |
There was a problem hiding this comment.
If we're keeping it we should add it to the changelog. I did in 698221f
There was a problem hiding this comment.
This imports memory, and memory needs 0.24 because it does mcopy
| uint256 lengthLength = prefix - SHORT_OFFSET - SHORT_THRESHOLD; | ||
|
|
||
| require(itemLength > lengthLength, RLPInvalidDataRemainder(lengthLength, itemLength)); | ||
| require(bytes1(item.load(0)) != 0x00); // TODO: custom error for sanity checks |
There was a problem hiding this comment.
Maybe panic with RESOURCE_ERROR code?
|
The only thing left to discuss is the error to use in Once that's done I think the PR should be good. The main problem may be the coverage hit but we may be fine with that (?) |
|
Can't approve my own PR, but LGTM |
|
The |
Requires:
Memoryutility library #5189reverseBitsoperations to Bytes.sol #5724clz(bytes)andclz(uint256)functions #5725PR Checklist
npx changeset add)