Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public subscribe(
eventName: AbiGenDummyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, AbiGenDummyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
AbiGenDummyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public async getLogsAsync(
eventName: AbiGenDummyEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, AbiGenDummyEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
this.address,
eventName,
blockRange,
indexFilterValues,
AbiGenDummyContract.ABI(),
);
return logs;
}
constructor(
public subscribe(
eventName: DummyERC721TokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, DummyERC721TokenEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
DummyERC721TokenContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: ERC20TokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ERC20TokenContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: ZRXTokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ZRXTokenEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ZRXTokenContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: MultiAssetProxyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, MultiAssetProxyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
MultiAssetProxyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: ERC20ProxyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ERC20ProxyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ERC20ProxyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: ERC20ProxyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ERC20ProxyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ERC20ProxyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: ERC721ProxyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ERC721ProxyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ERC721ProxyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public async getLogsAsync(
eventName: StakingProxyEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, StakingProxyEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
this.address,
eventName,
blockRange,
indexFilterValues,
StakingProxyContract.ABI(),
);
return logs;
}
constructor(