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
0 answers
8 views

Detecting fake products using QR code!

Building my first blockchain based application for my graduation project that is to detect fake products using QR code. Any recommendations on how to get started and the tools needed to complete the ...
  • 11
0 votes
1 answer
23 views

How to call a function in solidity Smart contract from different addresses

I am a beginner with Blockchain development using python. I have a solidity smart contract with 3 functions, the first one can be called only by a ganache account A and the other functions can be ...
0 votes
1 answer
19 views

What is the usual workflow among a user, a smart contract and an oracle?

Suppose a user A wants to feed a certain smart contract F with some data d that can be obtained from an oracle O. What is the usual workflow in the most popular oracle solutions? I imagine two ...
0 votes
0 answers
30 views

web3 returns Uncaught TypeError: Cannot read properties of undefined (reading 'method') error

I am trying to implement collect all button where user will be able to harvest all profit from farms/pools so that he will not need to go and click every harvest button manually,and it works fine. But ...
  • 147
0 votes
0 answers
15 views

Chainlink Random Number generator failing with Gas error

I am trying to generate a random number using chainlink VRF i have changed all the address as per goreli I have deployed in goreli testnet and sent some link token to the contract address Clicking on ...
  • 1
0 votes
1 answer
12 views

Creating a smart contract with ipfs

I created a site with the help of ipfs, my goal is to create a smart contract with the ipfs CID of this site. but i have no idea about this, can anyone help?
  • 1
0 votes
1 answer
14 views

I want my raw value in string format, but enum giving output only in int format. How can I make enum output in string value?

//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; contract Library { enum Book {WingsOfFire, RichDadPoorDad,DoItToday,AtomicHabits,TheArtOfSuccess} struct StudentStruct { string name; ...
0 votes
1 answer
20 views

What is the current gas price to deploy an ethereum contract? How much will I have to pay?

I couldn't find anywhere to get this data. With ETH 2.0, does anyone know the price?
  • 23
0 votes
0 answers
23 views

solana and neon evm working

Neon is the first evm compatible chain for solana. I want to talk here about binance smart chain here which is evm compatible meaning has evm runtime built in the binance chain. so you can create an ...
  • 113
0 votes
0 answers
9 views

Dai has no network configuration for its current network id (5777)

When I run truffle migrate --reset I get this error: Error: Dai has no network configuration for its current network id (5777). const Dex = artifacts.require("Dex.sol"); const Dai = ...
  • 1
1 vote
0 answers
16 views

Could not find files for the given pattern(s)

from solcx import compile_standard, install_solc import json install_solc("0.8.0") with open("./SimpleStorage.sol", "r") as file: simple_storage_file = file.read() ...
0 votes
0 answers
68 views

I am having trouble deploying contracts or connecting contracts to Bitgert testnet.Any helpful workaround please

const BITGERT = new ethers.providers.JsonRpcProvider( "https://testnet-rpc.brisescan.com", 64668 ); I get the error as: For both Brise mainnet as well as testnet I get the same error as ...
0 votes
1 answer
21 views

Anyway to recover lost ether sent to unowned wallet?

I was sent a smart contract by a "friend" described as an MEV sandwich bot. But when I started up the bot and finally took a hard look at the code, I realized that all of the ether was ...
0 votes
0 answers
6 views

Get peers with public key without admin

I have evmos node (it's cosmos with evm) and I ahve json-rpc. I want to connect geth to this node, but I need node-key. On json-rpc I don't have "admin" module... so my question is... How ...
0 votes
0 answers
31 views

crated a liquidity pool on Uniswap v2 instead of v3, how to remove?

I created a token and was looking to add liquidity through Uniswap v2, i somehow managed to crate it on Uniswap v3. I now have no idea how to remove it to redo it on v2. So when I created the pool I ...
0 votes
0 answers
23 views

How to Run Mythril tool using hardhat?

Mythril fails to import remotely and all-time searches in the local file system - to solve this I used Hardhat to compile my contract - and hardhat compiled contract. Now I am stuck on How to run ...
0 votes
0 answers
21 views

how can I fix my error with this import function

//SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./SimpleStorage.sol"; contract ExtraStorage is SimpleStorage { // + 5 // override // virtual and override ...
0 votes
0 answers
10 views

Bitkeep unable connect wallet account for android device

need help for bitkeep app unable connect the wallet. I have used bitkeep wallet service in my project. It works on web and ios devices, both can connect the wallet successful, only for android devices ...
0 votes
1 answer
45 views

is solana benifiting with solana virtual machine

What is the meaning for a blockchain of not having evm or vm compatibility? What benefits solana will get of now having svm?
  • 113
0 votes
1 answer
63 views

How to get user addresses from mapping?

I am having trouble trying to get addresses from a mapping. code 1 :mapping (uint8 => address payable[]) playersByNumber; // list of players with their number code 2 : uint8[] public numbers; // ...
  • 11
0 votes
1 answer
17 views

How to develop a network or chain agnostic subgraph?

Multichain applications setup a network/chain config that could be simplified to an object where each key is a unique ID for a supported chain such as the chainId as follows: // typescript: enum ...
  • 391
0 votes
0 answers
16 views

During minting of nft ndRestPayload.js:16 if (!url.includes("alchemy")) ^ TypeError: Cannot read properties of undefined (reading 'includes')

if (!url.includes("alchemy")) { ^ TypeError: Cannot read properties of undefined (reading 'includes') at Object.makeRestPayloadSender (F:\hardhat-nft\node_modules\@alch\...
0 votes
0 answers
9 views

How much gas limit when convert type number in solidity?

My contract uses many code convert-type numbers. So, how much gas limit for converting a type of number? I already deploy a small contract and tested the gas used, but I saw convert is cheaper. ...
  • 1
1 vote
1 answer
9 views

How does the EVM read values in the Stack?

For opcodes like dup2, how does the EVM read the stack value that is not at the top of the stack for this kind of operation?
0 votes
0 answers
17 views

The concept of wallet, private and public key encryption in private blockchain

I understand that in public blockchain implementation like Bitcoin, ETH, ... the encryption method of public and private key is crucial for secure transaction. But is this concept required for a ...
0 votes
0 answers
9 views

How to calculate exact gas used by transaction from tracer output

A real transaction from explorer: etherscan And this is tracer output: { "type": "CALL", "from": "0x3eadde4a48d0aebda37eed7076e736edac9a8b40", "to&...
0 votes
1 answer
20 views

Code Your Own Cryptocurrency & ICO on Ethereum | Tutorial

getting the following error Contract: DappToken ✔ initializes the contract with the correct values (106ms) 1) allocates the initial supply upon deployment > No events were emitted ...
0 votes
0 answers
47 views

TypeError: Cannot read properties of undefined (reading 'length')

Here's my code for deploying a mock contract : const { network, ethers } = require("hardhat") const { developmentChains } = require("../helper-hardhat-config") const BASE_FEE = &...
1 vote
1 answer
50 views

is layer0 and layer-1 blockchain both mainnet?

I want to ask here a fundamental question about the difference between layer 0 and layer 1 for my understanding. i have read you can create main blockchains on layer 1 which lacks scaling. while the ...
  • 113
0 votes
1 answer
23 views

what is the major difference between transfer() and receive() function in this code.?

contract Funder{ uint public numOfFunders; mapping(uint256 => address) private funders; receive() external payable {} function transfer() external payable { funders[...
1 vote
0 answers
18 views

Is there a way to do Monte Carlo Simulation for Ethereum Blockchain?

I'm a financial engineer student taking a blockchain technology electives. I recently also studied the Monte Carlo Simulation. I'm trying to see how we can use blockchain to do Monte Carlo Simulation. ...
  • 11
0 votes
0 answers
36 views

error: "VirtualMachineError: revert"

I am watching free codecamp's blockchain course by PatrickAlphaC. In the lottery lesson I have this problem: in the lottery.sol file I use AggregatorV3Interface to get eth/usd price and use it to ...
0 votes
1 answer
25 views

How can I make a game that allows players to earn a certain NFT or crypto currency after they beat a boss?

I am an aspiring game developer and my friends and I have recently decided to make a game that centers around a main storyline and characters that can be defeated for crypto or NFT's. Could you give a ...
1 vote
1 answer
18 views

I have a question regarding promise, In Promises the flow is then() and finally() but here I am getting O/P of finally first later then() [closed]

const Web3 = require('web3'); const web3 = new Web3(new Web3.providers.HttpProvider("HTTP://127.0.0.1:8545")); // connecting to Ganache let bal = web3.eth.getBalance("...
0 votes
0 answers
100 views

Error HH502: Couldn't download compiler version list. Please check your internet connection and try again

I am following the process from https://hardhat.org/tutorial/creating-a-new-hardhat-project to create a new hardhat project. After Doing yarn hardhat, I choose >Create a JavaScript project But when ...
  • 1
1 vote
3 answers
38 views

Why the two functions differ in gas cost? [duplicate]

function1: function testFunc1(uint256 num) public pure returns(uint256){ return unm; } function2: function testFunc1(uint256 num) public returns(uint256){ return unm; ...
0 votes
0 answers
25 views

Crypto Exchange Account Model (HD Wallet?)

There are some crypto networks such as Bitcoin, Ethereum, TRON, Solana, etc. To develop a crypto exchange, it is a good idea to have a private key for each network, and generate an address (for ...
0 votes
0 answers
49 views

How to Fork Public Mainnet Ethereum Binance Smart Chain or Polygon

I want to make my own blockchain but not a private blockchain but a public blockchain, is there a complete documentation or channel from youtube how to make genesis, bootnode settings, change chainId, ...
0 votes
0 answers
7 views

Solidity Compiler - Python package error

"I just realised that solc-x isn't running on my Mac-OS Monterey version. What could be wrong?"
0 votes
0 answers
38 views

How do we get to know the gas fee of a transaction on Ethereum Blockchain with Brownie

I was recently searching for a way using which I can calculate the gas fee for a transaction in Brownie Ethereum development environment.
0 votes
0 answers
159 views

Staging test error: replacement fee too low

I am running a staging test in Goerli Network, this is an simple test to test a fund and withdraw function but i am facing error while running it. Hoping some-one could help me through it. Test:- it(&...
0 votes
1 answer
34 views

Is this EVM high-level definition valid?

I have a problem understanding Ethereum's fundamental concept of EVM. Is EVM an identical VM created by each user(node) in their enviroment(PC) which has a specific architecture(state etc, I get that),...
  • 5
0 votes
1 answer
25 views

Is it possible to make smart contract that charges user 0.1 eth once a month?

is it possible to make smart contract that charges user 0.1 eth once a month?( after user confirms that he agrees)
0 votes
1 answer
28 views

How each new transaction from a smart contract is validated in the blockchain and tracked?

I have read all the other similar questions but it cant seem to get a firm grasp of the concept. There are steps in the process i understand due to the help of other posts and some i totally miss. I ...
  • 5
0 votes
1 answer
49 views

Error while creating a 'Near' application [closed]

I'm trying to create a 'Near' bootstrap application using this command npx create-near-app blockvote --contract js --frontend react --tests js. This isn't creating bootstrap files as it should. The ...
0 votes
1 answer
57 views

get marketcap of a token using ethers.js

I'm wondering if we would get the marketcap of a token using ether.js, i made research those last few weeks i did not find a solution. if someone could share an approach or a code, it will be much ...
0 votes
0 answers
15 views

Hardhat: Forking enabled=false not working

I want to toggle the forking in my Hardhat config file when running the hardhat network. This is because I want to run with forking locally, but without on Github actions. Defining my hardhat config ...
1 vote
1 answer
54 views

How are BeaconBlocks and BeaconStates interconnected?

After the Ethereum merge took place, the original blockchain merged into the Beacon chain and its data is referenced under the execution_payload field in the class BeaconBlock(...) and the Beacon ...
  • 81
0 votes
1 answer
57 views

How to get network name and chain Id to which metamask wallet is connected using Ether.js library?

Hey I am looking for a solution that I would use in my Dapp to get the network name and the chain Id of the network to which the wallet is connected using Ether.js library. For eg- If my wallet is ...
1 vote
1 answer
40 views

Weird issue with ERC1155

I have write a simple smart contract ERC1155 allow ppl to mint NFTs and everything was ok except for the mint function. The transaction was ok but when i checked the balanceOf it always returned 0 ...
  • 11

1
2
3 4 5
61