From 3bf2a0117f77cc575d7c47a97adaf0a5c0c203ce Mon Sep 17 00:00:00 2001 From: David Date: Sun, 17 Dec 2023 21:05:30 +0800 Subject: [PATCH] feat(protocol): fix an function selector issue in `AddSGXVerifierInstances` (#15392) Co-authored-by: Daniel Wang --- packages/protocol/contracts/4844/BlobHashReader.yulp | 2 +- packages/protocol/script/AddSGXVerifierInstances.s.sol | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/protocol/contracts/4844/BlobHashReader.yulp b/packages/protocol/contracts/4844/BlobHashReader.yulp index 27fab8646ba..47715e8b98b 100644 --- a/packages/protocol/contracts/4844/BlobHashReader.yulp +++ b/packages/protocol/contracts/4844/BlobHashReader.yulp @@ -22,7 +22,7 @@ object "BlobHashReader" { code { // Match against the keccak of the ABI function signature needed. switch shr(0xe0,calldataload(0)) - // bytes4(keccak("function getFirstBlobHash()")) + // bytes4(keccak("getFirstBlobHash()")) // Returns the versioned hash for the first blob in this transaction. case 0xfd122ecf { // DATAHASH opcode has hex value 0x49 diff --git a/packages/protocol/script/AddSGXVerifierInstances.s.sol b/packages/protocol/script/AddSGXVerifierInstances.s.sol index a1464ecee8f..90cb08ed82d 100644 --- a/packages/protocol/script/AddSGXVerifierInstances.s.sol +++ b/packages/protocol/script/AddSGXVerifierInstances.s.sol @@ -18,7 +18,7 @@ import "../test/DeployCapability.sol"; import "../contracts/L1/gov/TaikoTimelockController.sol"; import "../contracts/L1/verifiers/SgxVerifier.sol"; -contract AddSGXVerifierInstance is DeployCapability { +contract AddSGXVerifierInstances is DeployCapability { uint256 public privateKey = vm.envUint("PRIVATE_KEY"); address public timelockAddress = vm.envAddress("TIMELOCK_ADDRESS"); address public sgxVerifier = vm.envAddress("SGX_VERIFIER"); @@ -38,7 +38,7 @@ contract AddSGXVerifierInstance is DeployCapability { bytes32 salt = bytes32(block.timestamp); bytes memory payload = - abi.encodeWithSelector(bytes4(keccak256("function addInstances(address[])")), instances); + abi.encodeWithSelector(bytes4(keccak256("addInstances(address[])")), instances); TaikoTimelockController timelockController = TaikoTimelockController(payable(timelock));