Skip to content

Commit ca5b4c6

Browse files
decofe0xKitsune
andauthored
docs(spec): add missing event definitions to contract interfaces (#393)
Amp-Thread-ID: https://ampcode.com/threads/T-019d9300-8bb9-76b9-a881-ce8cef9d6080 Co-authored-by: 0xKitsune <[email protected]>
1 parent a051bae commit ca5b4c6

1 file changed

Lines changed: 56 additions & 0 deletions

File tree

docs/specs/zone_spec.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,34 @@ interface IZoneFactory {
10581058

10591059
```solidity
10601060
interface IZonePortal {
1061+
// Events
1062+
event DepositMade(
1063+
bytes32 indexed newCurrentDepositQueueHash, address indexed sender,
1064+
address token, address to, uint128 netAmount, uint128 fee, bytes32 memo
1065+
);
1066+
event EncryptedDepositMade(
1067+
bytes32 indexed newCurrentDepositQueueHash, address indexed sender,
1068+
address token, uint128 netAmount, uint128 fee, uint256 keyIndex,
1069+
bytes32 ephemeralPubkeyX, uint8 ephemeralPubkeyYParity,
1070+
bytes ciphertext, bytes12 nonce, bytes16 tag
1071+
);
1072+
event BatchSubmitted(
1073+
uint64 indexed withdrawalBatchIndex, bytes32 nextProcessedDepositQueueHash,
1074+
bytes32 nextBlockHash, bytes32 withdrawalQueueHash
1075+
);
1076+
event WithdrawalProcessed(address indexed to, address token, uint128 amount, bool callbackSuccess);
1077+
event BounceBack(
1078+
bytes32 indexed newCurrentDepositQueueHash, address indexed fallbackRecipient,
1079+
address token, uint128 amount
1080+
);
1081+
event SequencerTransferStarted(address indexed currentSequencer, address indexed pendingSequencer);
1082+
event SequencerTransferred(address indexed previousSequencer, address indexed newSequencer);
1083+
event SequencerEncryptionKeyUpdated(bytes32 x, uint8 yParity, uint256 keyIndex, uint64 activationBlock);
1084+
event ZoneGasRateUpdated(uint128 zoneGasRate);
1085+
event TokenEnabled(address indexed token, string name, string symbol, string currency);
1086+
event DepositsPaused(address indexed token);
1087+
event DepositsResumed(address indexed token);
1088+
10611089
// Token management
10621090
function enableToken(address token) external;
10631091
function pauseDeposits(address token) external;
@@ -1134,6 +1162,8 @@ Address: `0x1c00000000000000000000000000000000000000`
11341162

11351163
```solidity
11361164
interface ITempoState {
1165+
event TempoBlockFinalized(bytes32 indexed blockHash, uint64 indexed blockNumber, bytes32 stateRoot);
1166+
11371167
function tempoBlockHash() external view returns (bytes32);
11381168
function tempoBlockNumber() external view returns (uint64);
11391169
function tempoStateRoot() external view returns (bytes32);
@@ -1151,6 +1181,23 @@ Address: `0x1c00000000000000000000000000000000000001`
11511181

11521182
```solidity
11531183
interface IZoneInbox {
1184+
event TempoAdvanced(
1185+
bytes32 indexed tempoBlockHash, uint64 indexed tempoBlockNumber,
1186+
uint256 depositsProcessed, bytes32 newProcessedDepositQueueHash
1187+
);
1188+
event DepositProcessed(
1189+
bytes32 indexed depositHash, address indexed sender, address indexed to,
1190+
address token, uint128 amount, bytes32 memo
1191+
);
1192+
event EncryptedDepositProcessed(
1193+
bytes32 indexed depositHash, address indexed sender, address indexed to,
1194+
address token, uint128 amount, bytes32 memo
1195+
);
1196+
event EncryptedDepositFailed(
1197+
bytes32 indexed depositHash, address indexed sender, address token, uint128 amount
1198+
);
1199+
event TokenEnabled(address indexed token, string name, string symbol, string currency);
1200+
11541201
function processedDepositQueueHash() external view returns (bytes32);
11551202
function advanceTempo(
11561203
bytes calldata header, QueuedDeposit[] calldata deposits, DecryptionData[] calldata decryptions,
@@ -1167,6 +1214,15 @@ Address: `0x1c00000000000000000000000000000000000002`
11671214

11681215
```solidity
11691216
interface IZoneOutbox {
1217+
event WithdrawalRequested(
1218+
uint64 indexed withdrawalIndex, address indexed sender, address token, address to,
1219+
uint128 amount, uint128 fee, bytes32 memo, uint64 gasLimit,
1220+
address fallbackRecipient, bytes data, bytes revealTo
1221+
);
1222+
event TempoGasRateUpdated(uint128 tempoGasRate);
1223+
event MaxWithdrawalsPerBlockUpdated(uint256 maxWithdrawalsPerBlock);
1224+
event BatchFinalized(bytes32 indexed withdrawalQueueHash, uint64 withdrawalBatchIndex);
1225+
11701226
function tempoGasRate() external view returns (uint128);
11711227
function lastBatch() external view returns (LastBatch memory);
11721228
function calculateWithdrawalFee(uint64 gasLimit) external view returns (uint128);

0 commit comments

Comments
 (0)