How to use the @0x/contract-artifacts.ERC20Token.compilerOutput function in @0x/contract-artifacts

To help you get started, we’ve selected a few @0x/contract-artifacts 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 / contract-wrappers / src / contract_wrappers / erc20_token_wrapper.ts View on Github external
tokenAddress: string,
        eventName: ERC20TokenEvents,
        indexFilterValues: IndexedFilterValues,
        callback: EventCallback,
        isVerbose: boolean = false,
    ): string {
        assert.isETHAddressHex('tokenAddress', tokenAddress);
        assert.doesBelongToStringEnum('eventName', eventName, ERC20TokenEvents);
        assert.doesConformToSchema('indexFilterValues', indexFilterValues, schemas.indexFilterValuesSchema);
        assert.isFunction('callback', callback);
        const normalizedTokenAddress = tokenAddress.toLowerCase();
        const subscriptionToken = this._subscriptionManager.subscribe(
            normalizedTokenAddress,
            eventName,
            indexFilterValues,
            ERC20Token.compilerOutput.abi,
            callback,
            isVerbose,
            this._blockPollingIntervalMs,
        );
        return subscriptionToken;
    }
    /**