mirror of
https://github.com/vacp2p/linea-monorepo.git
synced 2026-01-09 04:08:01 -05:00
lint fixing and logging of setverifieraddress (#811)
This commit is contained in:
@@ -14,6 +14,8 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
||||
const { deployments } = hre;
|
||||
|
||||
const contractName = getRequiredEnvVar("PLONKVERIFIER_NAME");
|
||||
const verifierIndex = getRequiredEnvVar("PLONKVERIFIER_INDEX");
|
||||
|
||||
const existingContractAddress = await getDeployedContractAddress(contractName, deployments);
|
||||
|
||||
const provider = ethers.provider;
|
||||
@@ -31,6 +33,13 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
|
||||
process.env.PLONKVERIFIER_ADDRESS = contractAddress;
|
||||
await tryStoreAddress(hre.network.name, contractName, contractAddress, contract.deploymentTransaction()!.hash);
|
||||
|
||||
const setVerifierAddress = ethers.concat([
|
||||
"0xc2116974",
|
||||
ethers.AbiCoder.defaultAbiCoder().encode(["address", "uint256"], [contractAddress, verifierIndex]),
|
||||
]);
|
||||
|
||||
console.log("", setVerifierAddress);
|
||||
|
||||
await tryVerifyContract(contractAddress);
|
||||
};
|
||||
export default func;
|
||||
|
||||
@@ -150,7 +150,7 @@ abstract contract PauseManager is IPauseManager, AccessControlUpgradeable {
|
||||
if (isPaused(_pauseType)) {
|
||||
revert IsPaused(_pauseType);
|
||||
}
|
||||
|
||||
|
||||
unchecked {
|
||||
if (hasRole(SECURITY_COUNCIL_ROLE, _msgSender())) {
|
||||
pauseExpiryTimestamp = type(uint256).max - COOLDOWN_DURATION;
|
||||
@@ -193,9 +193,7 @@ abstract contract PauseManager is IPauseManager, AccessControlUpgradeable {
|
||||
* @dev Throws if UNUSED pause type is used, or the pause expiry period has not passed.
|
||||
* @param _pauseType The pause type value.
|
||||
*/
|
||||
function unPauseByExpiredType(
|
||||
PauseType _pauseType
|
||||
) external onlyUsedPausedTypes(_pauseType) {
|
||||
function unPauseByExpiredType(PauseType _pauseType) external onlyUsedPausedTypes(_pauseType) {
|
||||
if (!isPaused(_pauseType)) {
|
||||
revert IsNotPaused(_pauseType);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ import { ILineaRollup } from "src/rollup/interfaces/ILineaRollup.sol";
|
||||
import { IPauseManager } from "src/security/pausing/interfaces/IPauseManager.sol";
|
||||
import { IPermissionsManager } from "src/security/access/interfaces/IPermissionsManager.sol";
|
||||
import { AccessControlUpgradeable } from "@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol";
|
||||
import { ERC1967Proxy} from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
||||
import { ERC1967Proxy } from "@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.sol";
|
||||
|
||||
contract LineaRollupTestHelper is LineaRollup {
|
||||
function calculateY(bytes calldata data, bytes32 dataEvaluationPoint) external pure returns (bytes32) {
|
||||
@@ -24,7 +24,7 @@ contract LineaRollupTestHelper is LineaRollup {
|
||||
bytes32 _dataEvaluationPoint,
|
||||
bytes32 _dataEvaluationClaim
|
||||
) external pure returns (bytes32 shnarf) {
|
||||
return _computeShnarf(_parentShnarf, _snarkHash, _finalStateRootHash, _dataEvaluationPoint, _dataEvaluationClaim);
|
||||
return _computeShnarf(_parentShnarf, _snarkHash, _finalStateRootHash, _dataEvaluationPoint, _dataEvaluationClaim);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,17 +95,14 @@ contract LineaRollupTest is Test {
|
||||
// Adjust compressedData to start with 0x00
|
||||
submission.compressedData = hex"00112233445566778899aabbccddeeff00112233445566778899aabbccddeeff";
|
||||
|
||||
bytes32 dataEvaluationPoint = EfficientLeftRightKeccak._efficientKeccak(submission.snarkHash, keccak256(submission.compressedData));
|
||||
bytes32 dataEvaluationPoint = EfficientLeftRightKeccak._efficientKeccak(
|
||||
submission.snarkHash,
|
||||
keccak256(submission.compressedData)
|
||||
);
|
||||
|
||||
bytes32 dataEvaluationClaim = lineaRollup.calculateY(submission.compressedData, dataEvaluationPoint);
|
||||
|
||||
bytes32 parentShnarf = lineaRollup.computeShnarf(
|
||||
0x0,
|
||||
0x0,
|
||||
0x0,
|
||||
0x0,
|
||||
0x0
|
||||
);
|
||||
bytes32 parentShnarf = lineaRollup.computeShnarf(0x0, 0x0, 0x0, 0x0, 0x0);
|
||||
|
||||
bytes32 expectedShnarf = keccak256(
|
||||
abi.encodePacked(
|
||||
|
||||
Reference in New Issue
Block a user