How to use the web3-core-method.GetBlockByNumberMethod 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 / MethodFactory.js View on Github external
if (moduleInstance.currentProvider.supportsSubscriptions()) {
            return new SocketTransactionObserver(
                moduleInstance.currentProvider,
                this.getTimeout(moduleInstance),
                moduleInstance.transactionConfirmationBlocks,
                new GetTransactionReceiptMethod(this.utils, this.formatters, moduleInstance),
                new NewHeadsSubscription(this.utils, this.formatters, moduleInstance)
            );
        }

        return new HttpTransactionObserver(
            moduleInstance.currentProvider,
            this.getTimeout(moduleInstance),
            moduleInstance.transactionConfirmationBlocks,
            new GetTransactionReceiptMethod(this.utils, this.formatters, moduleInstance),
            new GetBlockByNumberMethod(this.utils, this.formatters, moduleInstance)
        );
    }
}
github ethereum / web3.js / modules / ethereum / src / contract / factories / MethodFactory.js View on Github external
if (moduleInstance.currentProvider.supportsSubscriptions()) {
            return new SocketTransactionObserver(
                moduleInstance.currentProvider,
                this.getTimeout(moduleInstance),
                moduleInstance.transactionConfirmationBlocks,
                new GetTransactionReceiptMethod(this.utils, this.formatters, moduleInstance),
                new NewHeadsSubscription(this.utils, this.formatters, moduleInstance)
            );
        }

        return new HttpTransactionObserver(
            moduleInstance.currentProvider,
            this.getTimeout(moduleInstance),
            moduleInstance.transactionConfirmationBlocks,
            new GetTransactionReceiptMethod(this.utils, this.formatters, moduleInstance),
            new GetBlockByNumberMethod(this.utils, this.formatters, moduleInstance)
        );
    }
}