How to use the @ethersproject/abstract-provider.ForkEvent.isForkEvent function in @ethersproject/abstract-provider

To help you get started, we’ve selected a few @ethersproject/abstract-provider 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 ethers-io / ethers.js / packages / providers / lib.esm / base-provider.js View on Github external
function getEventTag(eventName) {
    if (typeof (eventName) === "string") {
        eventName = eventName.toLowerCase();
        if (hexDataLength(eventName) === 32) {
            return "tx:" + eventName;
        }
        if (eventName.indexOf(":") === -1) {
            return eventName;
        }
    }
    else if (Array.isArray(eventName)) {
        return "filter:*:" + serializeTopics(eventName);
    }
    else if (ForkEvent.isForkEvent(eventName)) {
        logger.warn("not implemented");
        throw new Error("not implemented");
    }
    else if (eventName && typeof (eventName) === "object") {
        return "filter:" + (eventName.address || "*") + ":" + serializeTopics(eventName.topics || []);
    }
    throw new Error("invalid event - " + eventName);
}
//////////////////////////////

@ethersproject/abstract-provider

An Abstract Class for describing an Ethereum Provider for ethers.

MIT
Latest version published 2 years ago

Package Health Score

62 / 100
Full package analysis