I can’t figure out how to do this. I have seen some documentation talking about ethers.Wallet.fromMnemonic, but how does ethers know my wallet is a metamask one? Or, if the wallet provider is irrelevant (is it?) how does it know its address? Does it make any difference that I want to then interact with a liquidity pool on BSC? I
Tag: web3js
MetaMask does not inject window.ethereum: Uncaught (in promise) TypeError: Cannot read property ‘request’ of undefined
To start, let me mention this is an in-browser project, so i can only use So a few months back I made a dapp, which worked fine even tho I never set a provider, so I guessed it used the ones given by MetaMask. However, i am using the guide here the only issue is the following code, This code
web3 gives ” Error: Returned error: invalid sender” when broadcasting transaction
I am new to web3 and ethereum blockchain. I tried broadcasting a transaction using the following code but it always gives me an invalid sender error.The sample code is shown below. The error occurs at the below line Please help me know how to fix this problem. Thanks. Answer You can try changing const tx = new Tx(txObject); to const
calling smart contracts methods using web3 ethereum
Trying to work around the blockchain using Ethereum, I’m facing problems when trying to interface with a deployed contract. What I would try to achieve is to call a method to display information added to a private blockchain deployed locally using Geth. I can’t call any function from my smart contract and I’ve been wondering if I’m doing something wrong…
How to send an ERC20 token with web3js
I’m currently using the 0.2x.x version of the Web3 JavaScript API. I deployed my custom ERC20 token by creating smart contract in solidity (on REMIX IDE). I installed the MetaMask and had a test on https://wallet.ethereum.org/ to send some custom ERC token to another my account. It worked well. I want to add the ‘send custom ERC20 Token’ function in
Solidity Function Modifying Value Failing
Using Truffle Development framework (web3, react, and solidity) to test a simple smart contract. I have a basic function I am testing when I press a button on the UI, but it doesn’t seem to be working the way I’d expect it. I expect the contract to increment the value and return true. Note, that the value is later being
How to authenticate and send contract method using web3.js 1.0
I am confused about how I should be executing a contract’s method using the web3 1.0 library. This code works (so long as I manually unlock the account first): I get this error (if I don’t unlock manually first): Returned error: authentication needed: password or unlock The above code is an API endpoint in node.js, so I want it to