Category "web3js"

metaplex and solana web3 dependency conflict (react.js)

I am developing a react app and I have code from 2 different applications I wrote Application A uses metaplex to find all the NFT's owned by a user (wallet addr

Powerapps code components with react and web3

I am doing a very simple powerapps code component project using react and web3. As soon as I build the project, I get a bunch of errors. Many of them I managed

How to get cw20 token details from terra.js

I can get cw20 token balance using this code snippet const response = await terraConfig.wasm.contractQuery(tokenAddress, { balance: { address: walletAddress }

Why is a transaction consuming gas for a public view function?

I deployed the following smart contract on Ropsten ethereum test network and afterwards I tried making a transaction using @alch/alchemy-web3 npm package (Yes,

Web3 contract call is always returning null

I am trying to connect to a smart contract deployed using Truffle. I am using Web3 from a React app but when I make a call to any of the contract functions I al

How to fix Invalid sender error when sending a signed transaction with ethereumjs-tx?

I am getting invalid sender when trying to send a signed transaction. Here is the error: Uncaught (in promise) Error: Returned error: invalid sender and this i

Why Web3 .GetReserves() is spamming my console?

My code below gets the data correctly; however, there is one problem where when I try to get the reserves of a token. It spams the data over and over again to t

How to extract image URL from ens avatar text record

When using ethers JavaScript library to retrieve ENS text records from the Ethereum Name Service. I got the NFT URI from the text record but not the image URL.

Web3 error when trying to call contract methods

I encounter the following error while trying to run a dapp made using React, Truffle & Ganache. I'm also using web3 version 1.7.1. The problem is that the c

Web3 code working in terminal but not my IDE

I am very new to web3 and relatively new to JavaScript. The following code returns undefined for the variable accounts. Here is my code: const Web3= require('we

Cannot read properties of undefined (reading 'map') at NFTContainer for nft collection

So im making a function in react that enables me to connect my react page with my metamask and display my nfts that ive purchaed on opensea onto my webpage once

ERC721A smart contract

I'm writing an ERC721A smart contract and getting a warning in the Remix IDE. There is the code: function tokenOfOwnerByIndex(address owner, uint256 index) pub

Solana web3 js keep gives Cannot read properties of undefined (reading 'negative') while trying to confirm transaction

I'm trying to sign a transaction with connected user's wallet, through phantom but I keep getting this error message Cannot read properties of undefined (readi

Numerous errors when importing web3 into app.js

Attempt to import web3 into App.js gives me 9 errors import React from "react"; import Web3 from "web3"; function App() { return ( <div className="App

Get metamask profile picture and name use web3

Is there possible we get Metamask profile picture and name using web3? I'm using react for Frontend with web3. as I know I use web3.eth.get.Accounts().then(rsp=

Got "gas" is missing error when trying to run a node.js script using web3.js to interact with smart contract function

I am trying to use Web3.js to claim a token from a Smart Contract. I am meeting the error return new Error('"gas" is missing');. const Web3 = require('Web3'); c

web3 sendTransaction select and send token different than native currency

I'm not much of a professional with web3 and trying to figure out how to create a transaction that is using a symbol/token/cryptocurrency or whatever you might

ETH ENS Web3 - How to get Registrant

I've following code snippet to get the "Controller" (The owner of the domain) but I need to get the "Registrant" of provided ENS name const Web3 = require("web3

How do I get the address of the connected wallet with web3modal?

I'm building an application with next.js and web3. To connect the user wallet to the front-end I'm using web3modal as following: const Home: NextPage = () =>

Is it possible to set up readable names to addresses using Infura?

In my application, I want to create readable names for eth addresses. Currently, I use my own node and it's easy to use: WEB3 = Web3(Web3.HTTPProvider(NODE_NAME