Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik committed Feb 16, 2024
1 parent d206ccf commit 0f239dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/protocol/contracts/signal/SignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ contract SignalService is EssentialContract, ISignalService {
}

mapping(uint64 chainId => mapping(bytes32 kind => uint64 topBlockId)) public topBlockId;
mapping(address => bool) public isRelayerAuthorized;
mapping(address => bool) public isAuthorized;
uint256[49] private __gap;

event RelayerAuthorized(address indexed addr, bool authrized);
event Authorized(address indexed addr, bool authrized);

error SS_EMPTY_PROOF();
error SS_INVALID_SENDER();
Expand Down Expand Up @@ -74,9 +74,9 @@ contract SignalService is EssentialContract, ISignalService {
/// @dev Authorize or deautohrize an address for calling relayChainData
/// @dev Note that addr is supposed to be TaikoL1 and TaikoL1 contracts deployed locally.
function authorize(address addr, bool toAuthorize) external onlyOwner {
if (isRelayerAuthorized[addr] == toAuthorize) revert SS_INVALID_STATE();
isRelayerAuthorized[addr] = toAuthorize;
emit RelayerAuthorized(addr, toAuthorize);
if (isAuthorized[addr] == toAuthorize) revert SS_INVALID_STATE();
isAuthorized[addr] = toAuthorize;
emit Authorized(addr, toAuthorize);
}

/// @inheritdoc ISignalService
Expand All @@ -94,7 +94,7 @@ contract SignalService is EssentialContract, ISignalService {
external
returns (bytes32 signal)
{
if (!isRelayerAuthorized[msg.sender]) revert SS_UNAUTHORIZED();
if (!isAuthorized[msg.sender]) revert SS_UNAUTHORIZED();
return _relayChainData(chainId, blockId, kind, chainData);
}

Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/utils/generate_genesis/taikoL2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ async function generateContractConfigs(
_owner: ownerSecurityCouncil,
// AddressResolver
addressManager: addressMap.SharedAddressManager,
isRelayerAuthorized: {
isAuthorized: {
[addressMap.TaikoL2]: true,
},
},
Expand Down

0 comments on commit 0f239dd

Please sign in to comment.