Remove "available since" comments (#4424)

Co-authored-by: Hadrien Croubois <hadrien.croubois@gmail.com>
This commit is contained in:
Francisco
2023-07-06 05:00:34 -03:00
committed by GitHub
parent 3fe28e19af
commit 6bf68a41d1
68 changed files with 26 additions and 407 deletions

View File

@ -1,22 +1,15 @@
const format = require('../format-lines');
const { capitalize, unique } = require('../../helpers');
const { capitalize } = require('../../helpers');
const TYPES = [
{ type: 'address', isValueType: true, version: '4.1' },
{ type: 'bool', isValueType: true, name: 'Boolean', version: '4.1' },
{ type: 'bytes32', isValueType: true, version: '4.1' },
{ type: 'uint256', isValueType: true, version: '4.1' },
{ type: 'string', isValueType: false, version: '4.9' },
{ type: 'bytes', isValueType: false, version: '4.9' },
{ type: 'address', isValueType: true },
{ type: 'bool', isValueType: true, name: 'Boolean' },
{ type: 'bytes32', isValueType: true },
{ type: 'uint256', isValueType: true },
{ type: 'string', isValueType: false },
{ type: 'bytes', isValueType: false },
].map(type => Object.assign(type, { struct: (type.name ?? capitalize(type.type)) + 'Slot' }));
const VERSIONS = unique(TYPES.map(t => t.version)).map(
version =>
`_Available since v${version} for ${TYPES.filter(t => t.version == version)
.map(t => `\`${t.type}\``)
.join(', ')}._`,
);
const header = `\
pragma solidity ^0.8.19;
@ -43,8 +36,6 @@ pragma solidity ^0.8.19;
* }
* }
* \`\`\`
*
${VERSIONS.map(s => ` * ${s}`).join('\n')}
*/
`;