Category "web3js"

How can accept other token in my Smart Contract?

The token is ERC721 by OpenZeppelin I'm trying to add USDC payments to my Smart Contract, but I'm having problems. This is my function to accept token.. but tra

WalletConnectProvider not working with custom RPC

I want to connect custom RPC with WalletConnectProvider. But I keep getting an error of Uncaught Error: PollingBlockTracker - encountered and error. Here below

Solana / web3.js : getting web3.Signer from wallet

I want to send a token from one wallet to another using web3.js and spl-token. To send it I have to create an object named Token, one of the parameters of the c

web3 JS payment button for Metamask BSC bep20 token

I would like to accept donations from visitors, I only want an specific token with pre set amount and only people with metamask. if (typeof window.ethereum !==

Getting error every time while installation of truffle in window10

Every time when I try to install Truffle on my PC Windows 10 it's showing npm error install latest verion of vs code and many more things how do I tackle it ?

How to get the returned data from a smart contract function using ethers.js?

I'm trying to consume a function from a smart contract using ethers.js. The function retrieve the info of a user logged before (with the help of other function)

Ethers.js returns the same wallet address even if I switch accounts

I'm using Ethers.js to allow users to connect their Metamask wallets to my app. Here's the code that I have: import { ethers } from "ethers" async function con

@metamask/eth-sig-util" buffer isn't defined?

I'm trying to encrypt some data using MetaMask's public key for encryption (https://docs.metamask.io/guide/rpc-api.html#unrestricted-methods). However, on page

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