Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 async getLogsAsync(
eventName: ERC721ProxyEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, ERC721ProxyEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
this.address,
eventName,
blockRange,
indexFilterValues,
ERC721ProxyContract.ABI(),
);
return logs;
}
constructor(
public async getLogsAsync(
eventName: ERC721TokenEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, ERC721TokenEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
this.address,
eventName,
blockRange,
indexFilterValues,
ERC721TokenContract.ABI(),
);
return logs;
}
constructor(
public async getLogsAsync(
eventName: ExchangeEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, ExchangeEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._exchangeContract.getLogsAsync(eventName, blockRange, indexFilterValues);
return logs;
}
/**
public async getLogsAsync(
etherTokenAddress: string,
eventName: WETH9Events,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.isETHAddressHex('etherTokenAddress', etherTokenAddress);
const normalizedEtherTokenAddress = etherTokenAddress.toLowerCase();
assert.doesBelongToStringEnum('eventName', eventName, WETH9Events);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
normalizedEtherTokenAddress,
eventName,
blockRange,
indexFilterValues,
WETH9.compilerOutput.abi,
);
return logs;
}
/**
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: ERC1155MintableEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, ERC1155MintableEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
ERC1155MintableContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public subscribe(
eventName: DummyERC20TokenEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, DummyERC20TokenEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
DummyERC20TokenContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**
public async getLogsAsync(
eventName: ZRXTokenEvents,
blockRange: BlockRange,
indexFilterValues: IndexedFilterValues,
): Promise>> {
assert.doesBelongToStringEnum('eventName', eventName, ZRXTokenEvents);
assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
const logs = await this._subscriptionManager.getLogsAsync(
this.address,
eventName,
blockRange,
indexFilterValues,
ZRXTokenContract.ABI(),
);
return logs;
}
constructor(
public subscribe(
eventName: StakingProxyEvents,
indexFilterValues: IndexedFilterValues,
callback: EventCallback,
isVerbose: boolean = false,
blockPollingIntervalMs?: number,
): string {
assert.doesBelongToStringEnum('eventName', eventName, StakingProxyEvents);
assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
assert.isFunction('callback', callback);
const subscriptionToken = this._subscriptionManager.subscribe(
this.address,
eventName,
indexFilterValues,
StakingProxyContract.ABI(),
callback,
isVerbose,
blockPollingIntervalMs,
);
return subscriptionToken;
}
/**