How to use the web3-core-method.GetPastLogsMethod function in web3-core-method

To help you get started, we’ve selected a few web3-core-method 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 ethereum / web3.js / packages / web3-eth-contract / src / factories / EventSubscriptionFactory.js View on Github external
createEventLogSubscription(eventLogDecoder, contract, options, abiItemModel) {
        return new EventLogSubscription(
            options,
            this.utils,
            this.formatters,
            contract,
            new GetPastLogsMethod(this.utils, this.formatters, contract),
            eventLogDecoder,
            abiItemModel
        );
    }
github ethereum / web3.js / packages / web3-eth / src / factories / SubscriptionsFactory.js View on Github external
getSubscription(moduleInstance, type, options) {
        switch (type) {
            case 'logs':
                return new LogSubscription(
                    options,
                    this.utils,
                    this.formatters,
                    moduleInstance,
                    new GetPastLogsMethod(this.utils, this.formatters, moduleInstance)
                );
            case 'newBlockHeaders':
                return new NewHeadsSubscription(this.utils, this.formatters, moduleInstance);
            case 'pendingTransactions':
                return new NewPendingTransactionsSubscription(this.utils, this.formatters, moduleInstance);
            case 'syncing':
                return new SyncingSubscription(this.utils, this.formatters, moduleInstance);
            case 'accountsChanged':
                return new AccountsChangedSubscription(this.utils, this.formatters, moduleInstance);
            case 'networkChanged':
                return new NetworkChangedSubscription(this.utils, this.formatters, moduleInstance);
            case 'chainChanged':
                return new ChainChangedSubscription(this.utils, this.formatters, moduleInstance);
            default:
                throw new Error(`Unknown subscription: ${type}`);
        }
github ethereum / web3.js / modules / ethereum / src / contract / factories / EventSubscriptionFactory.js View on Github external
createEventLogSubscription(eventLogDecoder, contract, options, abiItemModel) {
        return new EventLogSubscription(
            options,
            this.utils,
            this.formatters,
            contract,
            new GetPastLogsMethod(this.utils, this.formatters, contract),
            eventLogDecoder,
            abiItemModel
        );
    }
github ethereum / web3.js / packages / web3-eth-contract / src / factories / EventSubscriptionFactory.js View on Github external
createAllEventsLogSubscription(allEventsLogDecoder, contract, options) {
        return new AllEventsLogSubscription(
            options,
            this.utils,
            this.formatters,
            contract,
            new GetPastLogsMethod(this.utils, this.formatters, contract),
            allEventsLogDecoder,
            contract.abiModel
        );
    }
}
github ethereum / web3.js / packages / web3-eth / src / factories / SubscriptionsFactory.js View on Github external
getSubscription(moduleInstance, type, options) {
        switch (type) {
            case 'logs':
                return new LogSubscription(
                    options,
                    this.utils,
                    this.formatters,
                    moduleInstance,
                    new GetPastLogsMethod(this.utils, this.formatters)
                );
            case 'newBlockHeaders':
                return new NewHeadsSubscription(this.utils, this.formatters, moduleInstance);
            case 'pendingTransactions':
                return new NewPendingTransactionsSubscription(this.utils, this.formatters, moduleInstance);
            case 'syncing':
                return new SyncingSubscription(this.utils, this.formatters, moduleInstance);
            default:
                throw new Error(`Unknown subscription: ${type}`);
        }
    }
}
github ethereum / web3.js / modules / ethereum / src / contract / factories / EventSubscriptionFactory.js View on Github external
createAllEventsLogSubscription(allEventsLogDecoder, contract, options) {
        return new AllEventsLogSubscription(
            options,
            this.utils,
            this.formatters,
            contract,
            new GetPastLogsMethod(this.utils, this.formatters, contract),
            allEventsLogDecoder,
            contract.abiModel
        );
    }
}