782 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
45
views
Invalid address error when publishing on custom network (Pontus-X Testnet) despite manual config
I'm building a data service using @deltadao/nautilus and ethers.js (v5.8.0) in an AdonisJS environment. I am trying to publish a data asset on the Pontus-X Testnet (Chain ID 32457).
Since this network ...
2
votes
1
answer
80
views
Ethers.js can call fetchMarketItems() fine, but PHP (web3p/web3.php) fails to decode the tuple[] return — how do I read struct[] results?
I have an NFT marketplace contract running on a local Hardhat node. The function below returns an array of structs:
struct MarketItem {
uint256 tokenId;
address payable seller;
address ...
0
votes
1
answer
64
views
Contract deployed successfully on Hedera Testnet, but has no code. Script works for anvil
I have the following deploment script:
require('dotenv').config();
const { ethers } = require("ethers");
const fs = require("fs");
const path = require("path");
const ...
0
votes
1
answer
58
views
Correct way to obtain address from a BIP39 seed phrase using ethersjs v6
What is the correct way to get an address from a seed phrase, using ethersjs v6?
This is what I'm using:
import { HDNodeWallet } from 'ethers';
const hdWallet = HDNodeWallet.fromPhrase(seedPhrase, ...
1
vote
0
answers
54
views
Hardhat ethers.getContract("VRFCoordinatorV2Mock") returns undefined even though contract is compiled and deployed
I'm working on a Lottery Project (Raffle) in solidity using hardhat. For now it has two contracts as :
Raffle.sol
VRFCoordinatorV2Mock.sol
I created deployment scripts as :
00-deploy-raffle.js
01-...
0
votes
0
answers
38
views
Could not decode result data while connecting to wallet in local hardhat deployed token
async function connectWallet() {
if (window.ethereum) {
try {
const accounts = await window.ethereum.request({
method: "eth_requestAccounts",
});
...
1
vote
0
answers
69
views
ethersjs disconnects websocker after a while
I'm using ethers.js to handle functions and listen events on ethereum for both mainnet and sepolia. I'm also using Alchemy as RPC provider.
I have created a service:
import { Injectable } from "@...
0
votes
0
answers
46
views
NETWORK_ERROR. under next14 server side it cannot connect to local chain (eg, npx hardhat node), but the same file works fine if run standalone
general description of the problem,
OK if standalone run: ethers provider object can sucessfully attach with the hardhat local chain (ie, "npx hardhat node") at 127.0.0.1:8545, and do ...
0
votes
0
answers
41
views
Bad rate on pancakeswap
The rate of the transaction is always smaller than expected.
For example, I should be able to buy 7-8 tokens, but I only get 5-6. The same happens when I buy with WBNB — the rate is still not as good ...
7
votes
2
answers
171
views
Trying to send funds to a long zero (0x0000...0abcd) address isn't working
I'm trying to send hbar to a long zero address using ethers.js and it's not working.
I converted an accountId (0.0.5465603) to a solidity address (0x0000000000000000000000000000000000536603) but I can'...
2
votes
0
answers
28
views
How to write data into a hardhat test blockchain from a javascript front end using ether js
The contract is fully tested and has no issue, I'm having trouble writing data to the blockchain from the frontend, while the same function test successfully in the tests the don't work while coming ...
0
votes
1
answer
96
views
Solidity Testing. 1 wei issue. How to handle rounding differences when testing balance changes in ethers.js contracts?
I'm working on a smart contract test using ethers.js, and I'm facing an issue with rounding errors when comparing ether balances of accounts after executing transactions. Specifically, the problem ...
-3
votes
2
answers
210
views
how to convert the compressed public key to the uncompressed one using ethers js sdk?
When create a wallet using the ethers library, only the compressed publick key(33bytes) is generated. how could i get the uncompressed public key(65 bytes)?
0
votes
1
answer
104
views
Failing to deploy smart contract through ganache gui
const ethers = require("ethers");
const fs = require("fs-extra");
async function main() {
try {
const provider = new ethers.JsonRpcProvider("http://127.0.0.1:7545")...
0
votes
1
answer
104
views
Connect Walle Modal shows 2 Metamask options while using RainBowKit
I was trying to integrate Metamask and Phantom wallet into my presale website.
But when I click the "connect wallet" button, it shows 2 metamask (and/or phantom) wallet.
I have installed ...