Skip to content

Feature Support & Comparison

Trevor Clarke edited this page Jul 2, 2019 · 10 revisions

Details about web3.js & ethers.js

References:

Feature Web3.js Ethers.js Support in Web3data.js Notes
getAccount
getHashrate × ×
getGasPrice Web3.js returns "20000000000", ethers returns: "20000000000", use endpoint: https://docs.amberdata.io/reference/transactions#get-gas-predictions using fastest or average
getAccounts ×
getBlockNumber Web3.js returns: 7280000, ethers returns: 7280000, use endpoint: https://github.com/amberdata/data-api#get-blocksid using the block.current
getBalance
getStorageAt ×
getCode
getBlock
getBlockTransactionCount ×
getUncle ×
getTransaction
getPendingTransactions ×
getTransactionFromBlock ×
getTransactionReceipt ?
getTransactionCount
sendTransaction ×
sendSignedTransaction × ×
sign ×
signTransaction ×
call ×
estimateGas ×
getPastLogs Ethersjs - getLogs()
getWork × ×
submitWork × ×
getChainId ×
Contract.getPastEvents ×
utils ?
getEtherPrice ×

Websockets

Feature Web3.js Ethers.js Support in Web3data.js Notes
Contract.on
Contract.once
Contract.events.MyEvent ✓^ ? Ethers.js - Only available via filters
Contract.events.allEvents ✓^ ? Ethers.js - Only available via filters
Clone this wiki locally