EnumerableSet.opts.js 301 B

123456789101112
  1. const { capitalize } = require('../../helpers');
  2. const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str));
  3. const formatType = type => ({
  4. name: `${mapType(type)}Set`,
  5. type,
  6. });
  7. const TYPES = ['bytes32', 'address', 'uint256'].map(formatType);
  8. module.exports = { TYPES, formatType };