Questions tagged [blockchain]

The Ethereum blockchain is a distributed database based on the Ethereum whitepaper specification and stores both the full transaction list and the most recent state.

Filter by
Sorted by
Tagged with
0 votes
1 answer
9 views

I want to retieve data from contract A that has been already stored in the contract B by contract A?

dex.sol(contract A) //SPDX-License-Identifier: MIT pragma solidity 0.8.19; import "./storage.sol"; contract dex1{ storage_contract public contractaddress; constructor(address ...
kumar's user avatar
  • 1
1 vote
2 answers
48 views

How to make payment gateway and confirm from transaction hash

I am looking for a payment solution for my website using crypto. I have seen some websites that display a modal with a QR code and a recipient address. I wonder how they know if someone has deposited ...
Peter Jack's user avatar
0 votes
0 answers
12 views

We were not able to estimate gas contract solidity in testnet working, but in mainnet not work

We were not able to estimate gas. There might be an error in the contract and this transaction may fail. function minterMint( address to, uint256 quantity, address payee, uint256 price ) external ...
bunthoeun dev's user avatar
0 votes
0 answers
12 views

How to solve Unhandled Rejection (Error): invalid address error?

I am new to blockchain, I am getting this error when I try to login to the donor page. Unhandled Rejection (Error): invalid address (argument="address", value="...
Drunken Master's user avatar
0 votes
1 answer
28 views

After registry of both the consumer and prosumer properly, when I try to do the transaction, the transaction is reverted

//SPDX-License-Identifier:GPL-3.0 pragma solidity 0.8.13; contract trade{ constructor() { owner = msg. sender; } address owner; modifier onlyOwner { require(msg.sender == ...
Shekh Shihab Uddin's user avatar
0 votes
0 answers
12 views

How to get and decode logs of all transactions of a block in web3?

How to get and decode logs of all transactions of a block in web3? My question is very similar to: Is there a way to get the logs for all transactions in a block? But the suggestions were given using ...
Alison Silva's user avatar
3 votes
1 answer
323 views

Where to store IPFS hash other than infura.io without paying

I used infura.io to store IPFS hash few months ago in my Ethereum dapp based on React JS but now it's not free anymore and it is asking for my bank account details. I want to use it for small personal ...
MaheenUnzeelah's user avatar
0 votes
1 answer
13 views

Error HH8: There's one or more errors in your config file: * Invalid account: #0 for network: sepolia - Expected string, received undefined

I have this code in .env API_URL = "https://eth-sepolia.g.alchemy.com/v2/<API>" PRIVATE_KEY = "6**********2a4********************7b96***********5af*****1" But when I run ...
Cynthia Tyeh's user avatar
0 votes
1 answer
20 views

ParserError: Expected '(' but got identifier --> dao.sol:98:10: | 98 | function correctMap(uint256 _mapId) external { |

pragma solidity ^0.8.0; contract EvacDAO { struct EvacuationMap { address submitter; string mapData; bool isValid; } mapping(uint256 => EvacuationMap) public ...
esko _______'s user avatar
1 vote
1 answer
17 views

Is it possible to re-route the “burned” gas from EIP-1559 and instead of burning it

Is it possible to re-route the “burned” gas from EIP-1559 and instead of burning it, send it to a smart contract
Vijay raj panchal's user avatar
0 votes
0 answers
23 views

How can I perform a pre-check transaction to verify if it will be successful without recording it on the blockchain?

We aim to implement transaction checking, specifically for swaps, to ensure they won't be reverted. This will help users avoid unnecessary gas costs. I want to do this on the front-end, using the ...
Shubham Gupta's user avatar
0 votes
0 answers
12 views

Is it worth to pursue master's on blockchain technology in USA? [closed]

Completed my bachelor's in computer science looking forward to do master's. Is it worth to take blockchain technology as my course, as I am really interested in crypto
Sharath's user avatar
0 votes
0 answers
4 views

failed connecting with virtual machine

I have 4 geth Nodes runnning on my PC bootnode address is 192.168.1.2 the 5th node is running on Virtual machine with address ( 192.168.1.5 ) when i try to run the 5th node it doesn't sync with the ...
Amxdz's user avatar
  • 1
0 votes
1 answer
10 views

How to call a payable function in ethers, which takes 0 input and payable bnb?

I have wrote it like this but it is always throwing error that inputAmount is not in range but it is in range, const transaction = await preSaleContract.buyTokens({value: inputAmount, from: ...
Gajeel Redfox's user avatar
0 votes
0 answers
11 views

Creating geth nodes in virtual machines

I have 2 nodes the first node is on my machine ( host ) with an address 192.168.1.4 the second node is on Virtual machine with an address 192.168.1.8 the ping working fine, but when I used this ...
Amxdz's user avatar
  • 1
1 vote
0 answers
16 views

List failed (ERC20-)Transactions for a specific address?

is there a way to show all failed (or all including failed) transactions regarding a destination address? Example: https://etherscan.io/tx/...
WhatTheShack3932's user avatar
0 votes
1 answer
15 views

How only allow NFT minting after course completion

I am new to ethereum I building a course page where you would get an NFT if you complete the course. Any idea on how to implement it.
Ashutosh Jha's user avatar
0 votes
1 answer
32 views

ethers.js version 6: TypeError: wallet.getTransactionCount is not a function

I am getting the following error using ethers.js version 6 while getting the total transaction counts. TypeError: wallet.getTransactionCount is not a function
Ali Murtaza's user avatar
0 votes
0 answers
10 views

What is the most suitable node provider for Avalanche c chain transactions and assets tracking

On Avalanche C-chain I need to be able to publish transactions and track their status whether it’s mined/confirmed/dropped, furthermore I need to be able to track multiple account balances. There is a ...
Andrey Obruchkov's user avatar
0 votes
0 answers
7 views

Tips for installing multiple blockchain nodes?

we are developing a product that requires connection to several blockchain nodes. Our customers decided to assemble their hardware to install a full node on it. In this connection, we have a question ...
Mod diller's user avatar
0 votes
0 answers
20 views

Error code from `web3.eth.getTransactionReceipt`

I have code structure like this. try { await web3.eth.getTransactionReceipt(hash); } catch (e) { console.log(e.message); console.log(e.code); console.log(e); } When the hash is 123, ...
Samvel Topuzyan's user avatar
0 votes
0 answers
9 views

Load last N blocks with eth-defi python

Using the web3-ethereum-defi lib and JSONRPCReorganisationMonitor how do you only load the last N blocks? This code wants to load data from block 0 to latest. reorg_mon = JSONRPCReorganisationMonitor(...
BAR's user avatar
  • 125
0 votes
0 answers
13 views

Error: Transaction has been reverted by the EVM

I am trying to call the following solidity method from my smart contract in javascript: address[] public investors; function addInvestor(address investor) public { investors.push(investor); ...
Zubair's user avatar
  • 1
0 votes
0 answers
11 views

Get exact Swap price using LP info

I want to calculate the exact price for each swap event that comes through on the blockchain. I gather that the only way to do that is to track the LP balances for WETH and the token. If there is ...
BAR's user avatar
  • 125
0 votes
0 answers
25 views

Decoding the array from the solidity events using web3.js

I want to track an event emitted by the smart contract from the backend using web3.js, But the Problem is there is the array type(uint8[]) in the event ,whenever I try to decode it it gives the ...
shiva sai's user avatar
0 votes
1 answer
23 views

Is it possible to make a multisig wallet where one of the owners can cancel a transaction?

The objective is to create a wallet, that depends on a time-frame (e.g.. 2days) before a transaction gets executed. Before this time frame is reached, one of the owners could cancel the transaction if ...
Fliper's user avatar
  • 1
0 votes
0 answers
28 views

How i can install eth infinitism bundler locally to my system

i am new to learning account abstraction which is defined in ERC-4337. i had found the following repo on the github which is the implementation of bundler from the original authors of ERC-4337. https:/...
Umar Raza's user avatar
0 votes
0 answers
10 views

Why is it not showing any results in the Table / Collection Section?

this is my transport.request.model import mongoose from "mongoose"; const schema = new mongoose.Schema({ Transport : String, Product : String, Material : String, Capacity : Number, ...
abdou's user avatar
  • 3
0 votes
1 answer
8 views

Is the previous state of Ethereum saved to level db file after a state change has occurred

Newbie here please I am a bit confused. when a state change occurs is the previous state trie updated or it is saved to level db and a new state trie is generated.
Emmanuel Anah's user avatar
0 votes
0 answers
22 views

How i can copy the same transaction of 1 address on ethereum?

How i can copy the same transaction of 1 address on ethereum ?I mean like a copytrading onchain... I choose 1 address and my addres do the same thing automatically.
user121114's user avatar
0 votes
0 answers
27 views

Is there a way to bridge another wallet to my smart contract to retrieve the finds wrongfully sent there? Or selfdestruct it to get funds back? [duplicate]

So my wallet was used to create a smart contract on the Remix ethereum website. The code used to initiate this contract has malicious intent in which once I try to withdraw my tokens, they will be ...
Jorge's user avatar
  • 1
0 votes
1 answer
31 views

Error: Returned error: sender account not recognized

this contract for Deploys instances of other smart contracts and i'm using ganache contract Contracts_Factory { // Common Section uint256 SIZE = 10; uint index = 0; string[] accounts = ...
abdou's user avatar
  • 3
0 votes
0 answers
14 views

VM Exception while processing transaction: revert Tried all but Still getting error

Have tried all things, I am running the following program on Remix there i use Injected web3 Metamask but continously getting error when I call convertToUsd function and same code run through truffle ...
M saqib iqbal's user avatar
0 votes
1 answer
17 views

Trying to Create a Staking Smart Contract, but when I call the Mine function from ERC20 contract. The transaction Reverts

I am writing the below code for a staking smart contract. pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; interface Token { function transfer(address _To, ...
Pratik Jussal's user avatar
2 votes
2 answers
68 views

How to decode the event logs in polygonscan mumbai?

This is my transaction hash: https://mumbai.polygonscan.com/tx/0x79ed502a8d319ab3b278781042898115d9d6bece15d3d91626a7a6a39c0873b3#eventlog The event logs of the event DataCredentialized is not human ...
Praveen M's user avatar
0 votes
2 answers
62 views

I got an Error in Encrypting the Private Key using ethers

const ethers = require ("ethers") const fs = require ("fs-extra") require ("dotenv").config() async function main () { const wallet = new ethers.Wallet(process.env....
YASH BONDE's user avatar
0 votes
0 answers
129 views

Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'args')

I get this error Unhandled Runtime Error TypeError: Cannot read properties of undefined (reading 'args') whenever I want to create an nft on my decentralised application and it only appears after I ...
Eyad Ahmed's user avatar
0 votes
0 answers
21 views

MetaMask showing incorrect price. Could be a RPC error

MetaMask is showing fictitious $USD value displayed in MetaMask for $(sample)this was MetaMask support response: This is out of scope for MetaMask Support; however, I can share with you our source ...
Block guy's user avatar
0 votes
0 answers
15 views

What is the equivalent of Brownie's (Pytest) "Contract.from_abi()" in Foundry test?

There is a test that uses brownie (pytest) where it creates a new contract using two contracts' abi: Contract.from_abi("mock", mock.address, Contract1.abi + Contract2.abi, owner=accounts[0]) ...
Kemmgl's user avatar
  • 1
0 votes
1 answer
25 views

How to set the logic contract in proxy contract so that proxy contract can delegatecall to the logic contract?

i am making a upgradable contract, i am facing issue to set the proxy contract for implementation contract. I am usign openzeppelin-contracts-upgradable. This is my deployscript : pragma solidity ^0.8....
Hacek 's user avatar
  • 625
0 votes
1 answer
31 views

Is it possibleimpersonate an account using only ethers.js without using Hardhat

Is it possible to impersonate an account using ether js only? I don't want to use Hardhat. Though I have forked mainnet using foundry. Now wants to transfer eth of let's say vitalik to my own account ...
DEEPAK Kumar's user avatar
1 vote
0 answers
22 views

React dapp using same previous account(from ganache) even though changed in metamask

I have tried to interact and call functions from ethereum contract deployed at local blockchain ganache in my react dapp. And I am using metamask. But even though I change the account in metamask the ...
K7000's user avatar
  • 11
0 votes
1 answer
28 views

How is consensus reached in a Decentralized Oracle Network?

I understand the deterministic nature of blockchains thus the need for oracles to feed outputs of non deterministic algorithms or API-calls to smart contracts. Using a single node oracle would defeat ...
Ahmed Rami Berrahal's user avatar
0 votes
1 answer
15 views

How to set owner wallet into useState from router.query?

I'm trying to set the address of a connected wallet into useState as string so that another function can use it to run it's function. const router = useRouter(); const { walletAddress } = ...
Miles Donald's user avatar
0 votes
1 answer
24 views

Using connected wallet to fetch all NFTs using alchemy sdk

I'm trying to pass the user's connected wallet into getNftsForOwner function but am not sure how to do it. If I type out the address into the function like this: const NFTs = await alchemy.nft....
Miles Donald's user avatar
0 votes
1 answer
14 views

The struct member's value is not updating

I am trying to make a voting system and I have come up with something but at the moment the vote count is not increasing. Can you check what is wrong? I am beginner and my code is below. Contract Code ...
sauravk000's user avatar
0 votes
0 answers
10 views

Active miners present in a blockchain network

What are the various approaches/mechanisms used in different Blockchain networks to find the number of active miners present in the network.
erlich bachman's user avatar
0 votes
2 answers
30 views

Trying to Run a unit test, but getting the following error: AssertionError: expected '0xCAEc8498aB11D596116B5175017B9Ab220b…' to equal undefined

I am trying to write a unit test for the simple condition of checking the owner's address once the contract is deployed. The unit test code for this is as follows: const { ethers } = require("...
Pratik Jussal's user avatar
0 votes
2 answers
265 views

We were not able to estimate gas. There might be an error in the contract and this transaction may fail

I cannot add a candidate as it shows there is an error in the contract, but the code does not show any error. **// SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.9.0; contract Election{...
Sheefa Jalali's user avatar
0 votes
0 answers
4 views

the command isn't running when I run the command truffle server

truffle serve is not a valid truffle command. Please see truffle help for available commands
manish reddy's user avatar

1
2 3 4 5
63