Category "web3js"

How can we get Data from web3 using Nodejs

how can I get the token details like name, symbol, and decimals details using Nodejs and web3js

Web3Modal Injected Provider not showing in options

I have a problem using Web3Modal, the connect panel doesn't show the metamask provider. Here is the code: const providerOptions = { injected: {

Web3py swap tokens path of contracts

I'm trying to swap tokens with web3py using the swapExactETHForTokensSupportingFeeOnTransferTokens function, with some tokens it works perfectly, in others I ge

Ethers.js: Solidity method arguments of type "contract": Error: invalid address or ENS name

I'm trying to invoke the following solidity function from ethersjs (it takes another contract as argument): function getReservesData(IPoolAddressesProvider prov

throw new Error 'Returned values aren't valid, did it run Out of Gas?

I am getting this error: Error: Returned values aren't valid, did it run Out of Gas? You might also see this error if you are not using the correct ABI for the

Does Ethereum JSON-RPC have rate limits

I am currently using a public RPC URL to interact with smart contracts on a Ethereum-forked blockchain. I would like to understand if there are any limitations

How to connect Metamask based on the input wallet adress

When I type a wallet address and press the Save button I want to show a Metamask sign in popup to that wallet. for now, It's just randomly connects with the sel

Uncaught TypeError: web3 is not a constructor. the blockchain website cannot connect to metamask

i have issue on web3.eth.defaultAccount = web3.eth.getAccounts(); below is the code. it said Uncaught (in promise) TypeError: Cannot read properties of undefine

How to send a web3 or ethers transaction to bsc using javascript from back end?

I would like to send a transaction to the binance smart chain (BSC)that will buy an NFT for a crypto integrated game. I've looked at their contract to figure ou

Command 'Solidity: Compile Contract' resulted in an error (Cannot read properties of undefined(reading 'uri'))

Good day everyone, I am working on a lottery smart contract. I am currently done with the remix VM tests and proceeded with the unit tests with JavaScript. The

ethers can't get pure function return value

I built a test solidity pure function to display a greeting message. It only returns a string "Hello User". Here is the contract code: //SPDX-License-Identifie

.balanceOf is not a function - Interact with existing Contract on Blockchain

I want to automate my staking on The Sandbox. For that I need in the first step to interact with the mSand-Matic Pool Contract. It is this one: https://polygons

Call Solana web3.js from HTML

I am trying to run web3.js from HTML. Now so far I have been able to call window.solana.connect(); and window.solana.disconnect(); functions. However when I try

Web3js fails to import in Vue3 composition api project

I've created a brand new project with npm init vite bar -- --template vue. I've done an npm install web3 and I can see my package-lock.json includes this packag

list all token IDs by owner at ERC721

I have a simple ERC721 smart contract used for testing purposes, I was wondering if it is possible to query the token IDs a specific wallet owns in that smart c

deploy Openzeppelin ERC20 contract with web3JS

The openzeppelin codes of ERC20 token give error in deploying directly. Even after flattern the codes, i am unable to select contract MyToken out of many contra

Can't Retrieve Wallets transactions using web3

so yea I tried to get all the transactions of a wallet address on a certain token contract. But it keeps on returning null. const Web3 = require('web3') const

How to create React App including Web3 using create-react-app? I am getting Module not found Error. BREAKING CHANGE: webpack < 5 used

I am new to Web3 and I am trying to create a react app integrated with web3. Below are the steps I followed in Ubuntu. create-react-app app_name cd app_

Web3 JS How to get transactions from the block

Basically I am running these commands: var blocknumber = await web3.eth.getBlockNumber(); var transaction = await web3.eth.getTransactionFromBlock(blocknumber,

Best way to save a secretKey

I'm learning Solana API on ReactJS. After generating a keypair you can recreate the same keypair with the secretKey. How can I save this keypair? I'm using reac