Revert "Add Bytes32x2Set (#5442)" (#5569)

This commit is contained in:
Hadrien Croubois
2025-03-11 17:16:41 +01:00
committed by GitHub
parent ca7a4e39de
commit f740084582
5 changed files with 10 additions and 288 deletions

View File

@ -1,16 +1,12 @@
const { capitalize } = require('../../helpers');
const mapType = ({ type, size }) => [type == 'uint256' ? 'Uint' : capitalize(type), size].filter(Boolean).join('x');
const mapType = str => (str == 'uint256' ? 'Uint' : capitalize(str));
const formatType = ({ type, size = undefined }) => ({
name: `${mapType({ type, size })}Set`,
type: size != undefined ? `${type}[${size}]` : type,
base: size != undefined ? type : undefined,
size,
const formatType = type => ({
name: `${mapType(type)}Set`,
type,
});
const TYPES = [{ type: 'bytes32' }, { type: 'bytes32', size: 2 }, { type: 'address' }, { type: 'uint256' }].map(
formatType,
);
const TYPES = ['bytes32', 'address', 'uint256'].map(formatType);
module.exports = { TYPES, formatType };