Add checkpoint variant with uint256 keys and values (#5748)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Arr00
2025-06-23 11:55:24 -04:00
committed by GitHub
parent 6079eb3f01
commit b84db20fb2
7 changed files with 337 additions and 15 deletions

View File

@ -1,11 +1,12 @@
// OPTIONS
const VALUE_SIZES = [224, 208, 160];
const VALUE_SIZES = [256, 224, 208, 160];
const defaultOpts = size => ({
historyTypeName: `Trace${size}`,
checkpointTypeName: `Checkpoint${size}`,
checkpointFieldName: '_checkpoints',
keyTypeName: `uint${256 - size}`,
checkpointSize: size < 256 ? 1 : 2,
keyTypeName: size < 256 ? `uint${256 - size}` : 'uint256',
keyFieldName: '_key',
valueTypeName: `uint${size}`,
valueFieldName: '_value',