solid-grinder 0.1.0

A CLI that goes along with building blocks of smart contract. Along with our front-end snippets, this toolbox can reduce L2 gas cost by encoding calldata for dApps development to use as little bytes of calldata as possible.
// 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',
  },
};