@@ -702,7 +702,7 @@ export class ProtocolContracts<
702
702
* @param {TAbi } abi The ABI of the contract to subscribe to.
703
703
* @param {Address } address The address of the contract.
704
704
* @param {InferEventName<TAbi, TEventName> } eventName The name of the event.
705
- * @param {(logs: GetFilterLogsReturnType<TAbi>) => void } onLogs Callback to execute when logs are received.
705
+ * @param {(logs: GetFilterLogsReturnType<TAbi>, maxBlockNumber: bigint ) => void } onLogs Callback to execute when logs are received.
706
706
* @param {bigint } [fromBlock] The block number from which to start listening for events.
707
707
* @param {number } [pollInterval=1000] The interval in milliseconds at which to poll for new events.
708
708
* @returns {() => void } A promise that resolves to an unsubscribe function.
@@ -782,14 +782,17 @@ export class ProtocolContracts<
782
782
*
783
783
* @template TEventName Type of event name.
784
784
* @param {InferEventName<typeof marketABI, TEventName> } eventName The event name to subscribe to.
785
- * @param {(logs: GetFilterLogsReturnType<typeof marketABI>) => void } onLogs Callback for when logs are received.
785
+ * @param {(logs: GetFilterLogsReturnType<typeof marketABI>, maxBlockNumber: bigint ) => void } onLogs Callback for when logs are received.
786
786
* @param {bigint } [fromBlock] Starting block number for listening for events.
787
787
* @param {number } [pollInterval=1000] Polling interval in milliseconds.
788
788
* @returns {() => void } Unsubscribe function.
789
789
*/
790
790
subscribeMarket < TEventName extends string | undefined = undefined > (
791
791
eventName : InferEventName < typeof marketABI , TEventName > ,
792
- onLogs : ( logs : GetFilterLogsReturnType < typeof marketABI > ) => void ,
792
+ onLogs : (
793
+ logs : GetFilterLogsReturnType < typeof marketABI > ,
794
+ maxBlockNumber : bigint ,
795
+ ) => void ,
793
796
fromBlock ?: bigint ,
794
797
pollInterval : number = 1000 ,
795
798
) : ( ) => void {
@@ -808,14 +811,17 @@ export class ProtocolContracts<
808
811
*
809
812
* @template TEventName Type of event name.
810
813
* @param {InferEventName<typeof entitiesRegistryABI, TEventName> } eventName The event name to subscribe to.
811
- * @param {(logs: GetFilterLogsReturnType<typeof entitiesRegistryABI>) => void } onLogs Callback for when logs are received.
814
+ * @param {(logs: GetFilterLogsReturnType<typeof entitiesRegistryABI>, maxBlockNumber: bigint ) => void } onLogs Callback for when logs are received.
812
815
* @param {bigint } [fromBlock] Starting block number for listening for events.
813
816
* @param {number } [pollInterval=1000] Polling interval in milliseconds.
814
817
* @returns {() => void } Unsubscribe function.
815
818
*/
816
819
subscribeEntities < TEventName extends string | undefined = undefined > (
817
820
eventName : InferEventName < typeof entitiesRegistryABI , TEventName > ,
818
- onLogs : ( logs : GetFilterLogsReturnType < typeof entitiesRegistryABI > ) => void ,
821
+ onLogs : (
822
+ logs : GetFilterLogsReturnType < typeof entitiesRegistryABI > ,
823
+ maxBlockNumber : bigint ,
824
+ ) => void ,
819
825
fromBlock ?: bigint ,
820
826
pollInterval : number = 1000 ,
821
827
) : ( ) => void {
@@ -834,14 +840,17 @@ export class ProtocolContracts<
834
840
*
835
841
* @template TEventName Type of event name.
836
842
* @param {InferEventName<typeof configABI, TEventName> } eventName The event name to subscribe to.
837
- * @param {(logs: GetFilterLogsReturnType<typeof configABI>) => void } onLogs Callback for when logs are received.
843
+ * @param {(logs: GetFilterLogsReturnType<typeof configABI>, maxBlockNumber: bigint ) => void } onLogs Callback for when logs are received.
838
844
* @param {bigint } [fromBlock] Starting block number for listening for events.
839
845
* @param {number } [pollInterval=1000] Polling interval in milliseconds.
840
846
* @returns {() => void } Unsubscribe function.
841
847
*/
842
848
subscribeConfig < TEventName extends string | undefined = undefined > (
843
849
eventName : InferEventName < typeof configABI , TEventName > ,
844
- onLogs : ( logs : GetFilterLogsReturnType < typeof configABI > ) => void ,
850
+ onLogs : (
851
+ logs : GetFilterLogsReturnType < typeof configABI > ,
852
+ maxBlockNumber : bigint ,
853
+ ) => void ,
845
854
fromBlock ?: bigint ,
846
855
pollInterval : number = 1000 ,
847
856
) : ( ) => void {
0 commit comments