Files
openzeppelin-contracts/scripts/generate/templates/EnumerableMap.opts.js
Hadrien Croubois be0572a8dc Migrate ERC1155 tests to ethers v6 (#4771)
Co-authored-by: ernestognw <ernestognw@gmail.com>
2023-12-21 21:57:39 +00:00

22 lines
455 B
JavaScript

const { capitalize } = require('../../helpers');
const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str));
const formatType = (keyType, valueType) => ({
name: `${mapType(keyType)}To${mapType(valueType)}Map`,
keyType,
valueType,
});
const TYPES = [
['uint256', 'uint256'],
['uint256', 'address'],
['address', 'uint256'],
['bytes32', 'uint256'],
].map(args => formatType(...args));
module.exports = {
TYPES,
formatType,
};