Update docs
This commit is contained in:
@ -227,7 +227,6 @@ function _unsafeAccess(
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
// GENERATE
|
||||
module.exports = format(
|
||||
|
||||
@ -11,7 +11,6 @@ import {SafeCast} from "@openzeppelin/contracts/utils/math/SafeCast.sol";
|
||||
import {Checkpoints} from "@openzeppelin/contracts/utils/structs/Checkpoints.sol";
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const template = opts => `\
|
||||
using Checkpoints for Checkpoints.${opts.historyTypeName};
|
||||
|
||||
|
||||
@ -2,7 +2,6 @@ const format = require('../format-lines');
|
||||
const { fromBytes32, toBytes32 } = require('./conversion');
|
||||
const { TYPES } = require('./EnumerableMap.opts');
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const header = `\
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
@ -52,7 +51,6 @@ import {EnumerableSet} from "./EnumerableSet.sol";
|
||||
* ====
|
||||
*/
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const defaultMap = `\
|
||||
// To implement this library for multiple types with as little code repetition as possible, we write it in
|
||||
|
||||
@ -2,7 +2,6 @@ const format = require('../format-lines');
|
||||
const { fromBytes32, toBytes32 } = require('./conversion');
|
||||
const { TYPES } = require('./EnumerableSet.opts');
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const header = `\
|
||||
pragma solidity ^0.8.20;
|
||||
|
||||
@ -41,7 +40,6 @@ pragma solidity ^0.8.20;
|
||||
* ====
|
||||
*/
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const defaultSet = `\
|
||||
// To implement this library for multiple types with as little code
|
||||
|
||||
@ -43,7 +43,6 @@ const errors = `\
|
||||
error MerkleProofInvalidMultiproof();
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const templateProof = ({ suffix, location, visibility, hash }) => `\
|
||||
/**
|
||||
* @dev Returns true if a \`leaf\` can be proved to be a part of a Merkle tree
|
||||
@ -172,7 +171,6 @@ function processMultiProof${suffix}(${formatArgsMultiline(
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
// GENERATE
|
||||
module.exports = format(
|
||||
|
||||
@ -1,3 +1,3 @@
|
||||
module.exports = {
|
||||
SIZES: [1, 2, 4, 6, 8, 12, 16, 20, 24, 28, 32],
|
||||
SIZES: [1, 2, 4, 6, 8, 10, 12, 16, 20, 22, 24, 28, 32],
|
||||
};
|
||||
|
||||
@ -11,14 +11,14 @@ import {Packing} from "@openzeppelin/contracts/utils/Packing.sol";
|
||||
`;
|
||||
|
||||
const testPack = (left, right) => `\
|
||||
function testPack(bytes${left} left, bytes${right} right) external {
|
||||
function testPack(bytes${left} left, bytes${right} right) external pure {
|
||||
assertEq(left, Packing.pack_${left}_${right}(left, right).extract_${left + right}_${left}(0));
|
||||
assertEq(right, Packing.pack_${left}_${right}(left, right).extract_${left + right}_${right}(${left}));
|
||||
}
|
||||
`;
|
||||
|
||||
const testReplace = (outer, inner) => `\
|
||||
function testReplace(bytes${outer} container, bytes${inner} newValue, uint8 offset) external {
|
||||
function testReplace(bytes${outer} container, bytes${inner} newValue, uint8 offset) external pure {
|
||||
offset = uint8(bound(offset, 0, ${outer - inner}));
|
||||
|
||||
bytes${inner} oldValue = container.extract_${outer}_${inner}(offset);
|
||||
|
||||
@ -61,7 +61,6 @@ function toUint${length}(uint256 value) internal pure returns (uint${length}) {
|
||||
}
|
||||
`;
|
||||
|
||||
/* eslint-disable max-len */
|
||||
const toIntDownCast = length => `\
|
||||
/**
|
||||
* @dev Returns the downcasted int${length} from int256, reverting on
|
||||
@ -81,7 +80,6 @@ function toInt${length}(int256 value) internal pure returns (int${length} downca
|
||||
}
|
||||
}
|
||||
`;
|
||||
/* eslint-enable max-len */
|
||||
|
||||
const toInt = length => `\
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user