How to use the web3-core-method 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 MyEtherWallet / MyEtherWallet / src / wallets / web3-provider / web3Calls.js View on Github external
new Method({
        name: 'getGasPrice',
        call: 'eth_gasPrice',
        params: 0
      }),
      new Method({
        name: 'getBlockNumber',
        call: 'eth_blockNumber',
        params: 0
      }),
      new Method({
        name: 'getBlockByNumber',
        call: 'eth_getBlockByNumber',
        params: 2
      }),
      new Method({
        name: 'estimateGas',
        call: 'eth_estimateGas',
        params: 1,
        inputFormatter: [formatters.inputCallFormatter],
        outputFormatter: utils.hexToNumber
      }),
      new Method({
        name: 'sendSignedTransaction',
        call: 'eth_sendRawTransaction',
        params: 1,
        inputFormatter: [null]
      }),
      new Method({
        name: 'getTransactionReceipt',
        call: 'eth_getTransactionReceipt',
        params: 1,