-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
enhancementNew feature or improvement.New feature or improvement.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.v6Issues regarding v6Issues regarding v6
Description
Describe the Feature
Overview
A provider can emit events to facilitate observing interesting things happening on chain. It'd be really nice if we could subscribe to the latest safe block. See #3068 for more details. This would allow applications to respond only when the safe block changes which is a good happy-medium between pending (higher likelihood of reorganization) and finalized (takes up to 15 minutes on networks like Sepolia)
Specific request
- A new
safeevent is emitted when the latestsafeblock becomes available
Code Example
// Typescript example using Ethereum JSON RPC provider
const provider = new JsonRpcProvider("https://rpc.ankr.com/eth");
provider.on("safe", (blockNumber: number) => {
console.log(`Received new safe block number: ${blockNumber}`);
});lw-karlynelson, karlyanelson, ngshaw and lirc571
Metadata
Metadata
Assignees
Labels
enhancementNew feature or improvement.New feature or improvement.fixed/completeThis Bug is fixed or Enhancement is complete and published.This Bug is fixed or Enhancement is complete and published.v6Issues regarding v6Issues regarding v6