You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
542 B
23 lines
542 B
2 years ago
|
// OPTIONS
|
||
|
const VALUE_SIZES = [224, 160];
|
||
|
|
||
|
const defaultOpts = size => ({
|
||
|
historyTypeName: `Trace${size}`,
|
||
|
checkpointTypeName: `Checkpoint${size}`,
|
||
|
checkpointFieldName: '_checkpoints',
|
||
|
keyTypeName: `uint${256 - size}`,
|
||
|
keyFieldName: '_key',
|
||
|
valueTypeName: `uint${size}`,
|
||
|
valueFieldName: '_value',
|
||
|
});
|
||
|
|
||
|
module.exports = {
|
||
|
OPTS: VALUE_SIZES.map(size => defaultOpts(size)),
|
||
|
LEGACY_OPTS: {
|
||
|
...defaultOpts(224),
|
||
|
historyTypeName: 'History',
|
||
|
checkpointTypeName: 'Checkpoint',
|
||
|
keyFieldName: '_blockNumber',
|
||
|
},
|
||
|
};
|