Skip to content

Add macro key for overriding the int type used in (de)serializing#1332

Draft
batconjurer wants to merge 8 commits into
bat/test-reforge-pipelinefrom
bat/add-length-type-opt-macros
Draft

Add macro key for overriding the int type used in (de)serializing#1332
batconjurer wants to merge 8 commits into
bat/test-reforge-pipelinefrom
bat/add-length-type-opt-macros

Conversation

@batconjurer

Copy link
Copy Markdown
Contributor

Why this should be merged

Before this, when serializing arrays, the length was always encoded via a uint256. This is not compatible with some of our existing hand-rolled serialization methods, so this fixes that by allowing a length type override.

How this works

How this was tested

How is this documented

@batconjurer batconjurer requested a review from a team as a code owner May 26, 2026 10:34
@batconjurer batconjurer marked this pull request as draft May 26, 2026 10:34
function packDynamicStruct(DynamicStruct memory obj) public pure returns (bytes memory) {
bytes memory Addresses_bytes;
Addresses_bytes = abi.encodePacked(uint32(obj.Addresses.length));
for (uint256 i_0 = 0; i_0 < obj.Addresses.length;) {
@batconjurer batconjurer force-pushed the bat/test-reforge-pipeline branch from 615fb2c to ab43fca Compare May 28, 2026 08:19
@batconjurer batconjurer force-pushed the bat/test-reforge-pipeline branch from ab43fca to d1f044a Compare May 28, 2026 08:25
@batconjurer batconjurer force-pushed the bat/add-length-type-opt-macros branch from 608eab5 to 6edf09b Compare May 28, 2026 08:26
@batconjurer batconjurer force-pushed the bat/test-reforge-pipeline branch 2 times, most recently from 73c33b2 to 3852d60 Compare June 18, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants