Skip to content

Commit

Permalink
feat(protocol): extend SignalService interface (#15969)
Browse files Browse the repository at this point in the history
Co-authored-by: Keszey Dániel <keszeyd@MacBook-Pro.local>
Co-authored-by: Daniel Wang <99078276+dantaik@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 21, 2024
1 parent f142dfe commit d90e90a
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 1 deletion.
16 changes: 16 additions & 0 deletions packages/protocol/contracts/signal/ISignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ interface ISignalService {
returns (bool);

/// @notice Returns the given block's chain data.
/// @param chainId Indenitifer of the chainId.
/// @param kind A value to mark the data type.
/// @param blockId The chain data's corresponding block id. If this value is 0, use the top
/// block id.
Expand All @@ -106,4 +107,19 @@ interface ISignalService {
external
view
returns (uint64 _blockId, bytes32 _chainData);

/// @notice Returns the data to be used for caching slot generation.
/// @param chainId Indenitifer of the chainId.
/// @param kind A value to mark the data type.
/// @param blockId The chain data's corresponding block id. If this value is 0, use the top
/// block id.
/// @return signal The signal used for caching slot creation.
function signalForChainData(
uint64 chainId,
bytes32 kind,
uint64 blockId
)
external
pure
returns (bytes32 signal);
}
1 change: 1 addition & 0 deletions packages/protocol/contracts/signal/SignalService.sol
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ contract SignalService is EssentialContract, ISignalService {
}
}

/// @inheritdoc ISignalService
function signalForChainData(
uint64 chainId,
bytes32 kind,
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/team/airdrop/ERC20Airdrop.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ contract TestERC20Airdrop is TaikoTest {

// 2. Need to add it to the AddressManager (below here i'm just mocking it) so that we can
// mint TKO. Basically this step only required in this test. Only thing we need to be sure
// on testnet/mainnet. Vault (which Aridrop transfers from) HAVE tokens.
// on testnet/mainnet. Vault (which Airdrop transfers from) HAVE tokens.
addressManager = new MockAddressManager(address(vault));

// 3. Deploy a bridged TKO token (but on mainnet it will be just a bridged token from L1 to
Expand Down

0 comments on commit d90e90a

Please sign in to comment.