Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Javascript API and library for Ethereum To develop applications on Ethereum, you can use the web3 object provided by the web3.js library. Under the hood it communicates to a local node through RPC calls. web3.js works with any Ethereum node, which exposes an RPC layer. https://github.com/ethereum/wiki/wiki/JavaScript-API
1
vote
Accepted
Can't create Web3 websocket connection successfully
All available end-point rpc url are here https://docs.binance.org/smart-chain/developer/rpc.html. HttpProvider works well. For Websocket run your own BSC Full node or Light Node.
0
votes
Web3 - handling separation between read-only calls and send requests?
a way is iterating over contract
for (var i = 0; i < contract.abi.length; i++) {
if (contract.abi[i]["type"] === "function" && contract.abi[i]["stateMutability"] === "view") {
console.log( …
0
votes
Can I send ERC20 and ETH in the same transaction trough web3js?
Yes you need a custom transfer method in your token, default transfer method is not payable, so write another payableTransfer method to let user send ETH and in web3 set value field of transaction to …
2
votes
Accepted
How is transactionIndex decided in a block?
transactionIndex will be set by miner. each block has many transactions which are ordered to mine. your transaction's index is 0 when the block goes to mine the transaction was first tx in that block. …
2
votes
Adding Wallet using web3.eth.accounts.wallet.add
First create a wallet object.
first parameter is number of accounts which you want and the second parameter is 32 byte random array as an entropy
var wallet = w3.eth.accounts.wallet.create(0, utils.en …