How to use the @0x/json-schemas.schemas.blockRangeSchema function in @0x/json-schemas

To help you get started, we’ve selected a few @0x/json-schemas examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github 0xProject / 0x-monorepo / packages / abi-gen / test-cli / expected-output / typescript / abi_gen_dummy.ts View on Github external
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(
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / generated-wrappers / weth9.ts View on Github external
public async getLogsAsync(
        eventName: WETH9Events,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, WETH9Events);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            WETH9Contract.ABI(),
        );
        return logs;
    }
    constructor(
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / generated-wrappers / erc20_token.ts View on Github external
public async getLogsAsync(
        eventName: ERC20TokenEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            ERC20TokenContract.ABI(),
        );
        return logs;
    }
    constructor(
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / contract_wrappers / erc721_token_wrapper.ts View on Github external
public async getLogsAsync(
        tokenAddress: string,
        eventName: ERC721TokenEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.isETHAddressHex('tokenAddress', tokenAddress);
        assert.doesBelongToStringEnum('eventName', eventName, ERC721TokenEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const normalizedTokenAddress = tokenAddress.toLowerCase();
        const logs = await this._subscriptionManager.getLogsAsync(
            normalizedTokenAddress,
            eventName,
            blockRange,
            indexFilterValues,
            ERC721Token.compilerOutput.abi,
        );
        return logs;
    }
    private async _getTokenContractAsync(tokenAddress: string): Promise {
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / multi_asset_proxy.ts View on Github external
public async getLogsAsync(
        eventName: MultiAssetProxyEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, MultiAssetProxyEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            MultiAssetProxyContract.ABI(),
        );
        return logs;
    }
    constructor(
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / dummy_erc20_token.ts View on Github external
public async getLogsAsync(
        eventName: DummyERC20TokenEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, DummyERC20TokenEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            DummyERC20TokenContract.ABI(),
        );
        return logs;
    }
    constructor(
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / contract_wrappers / exchange_wrapper.ts View on Github external
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;
    }
    /**
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / contract_wrappers / ether_token_wrapper.ts View on Github external
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;
    }
    /**
github 0xProject / 0x-monorepo / packages / abi-gen-wrappers / src / generated-wrappers / erc1155_proxy.ts View on Github external
public async getLogsAsync(
        eventName: ERC1155ProxyEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, ERC1155ProxyEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            ERC1155ProxyContract.ABI(),
        );
        return logs;
    }
    constructor(
github 0xProject / 0x-monorepo / packages / contract-wrappers / src / generated-wrappers / erc20_proxy.ts View on Github external
public async getLogsAsync(
        eventName: ERC20ProxyEvents,
        blockRange: BlockRange,
        indexFilterValues: IndexedFilterValues,
    ): Promise>> {
        assert.doesBelongToStringEnum('eventName', eventName, ERC20ProxyEvents);
        assert.doesConformToSchema('blockRange', blockRange, schemas.blockRangeSchema);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        const logs = await this._subscriptionManager.getLogsAsync(
            this.address,
            eventName,
            blockRange,
            indexFilterValues,
            ERC20ProxyContract.ABI(),
        );
        return logs;
    }
    constructor(