Questions tagged [ethereum]

Ethereum is a blockchain currency (like Bitcoin) with a public ledger. Questions should relate to programming. General questions about Ethereum should be asked on https://ethereum.stackexchange.com

is an open-source, public, blockchain-based distributed computing platform featuring smart contract (scripting) functionality. It provides a decentralized Turing-complete virtual machine, the Ethereum Virtual Machine (EVM), which can execute scripts using an international network of public nodes. Ethereum also provides a cryptocurrency token called , which can be transferred between accounts and used to compensate participant nodes for computations performed. Gas, an internal transaction pricing mechanism, is used to mitigate spam and allocate resources on the network.

was proposed in late 2013 by Vitalik Buterin, a cryptocurrency researcher and programmer.

The official website of is Ethereum.org

6757 questions
8
votes
2 answers

What is blockchain and Ethereum? Where is it used?

I just got chance to work on Ethereum, block-chain based platform. But I don't have a clear idea in which scenarios this is used, any real life use of this.Could anybody help me understand blockchain based platform and its real life uses?
Deep Pahadua
  • 153
  • 1
  • 4
8
votes
2 answers

In Ethereum Solidity, when changing an array length, I get "Value must be an lvalue". Why?

In Solidity, you can increase the size of an array to make room for a new member by using array.length++. But I'm getting an error: Value must be an lvalue
fivedogit
  • 8,374
  • 7
  • 34
  • 43
8
votes
1 answer

In Ethereum, what is gas, how is it used, and what is the difference between "startgas" and "gasprice"?

I'm looking for an explanation of gas usage in Ethereum. What is it, how is it calculated, and what value does it have?
fivedogit
  • 8,374
  • 7
  • 34
  • 43
7
votes
1 answer

Invalid signature error from ethers when trying to verify a Smart Contract Wallet(account abstraction) signature

I am working on a dapp that needs to verify users' signatures. When testing with Metamask, everything is okay. When trying to verify a signature from Ambire wallet, I get "Error: invalid signature string" from ethers.utils.verifyMessage For example,…
whd
  • 1,819
  • 1
  • 21
  • 52
7
votes
5 answers

Error: invalid BigNumber value (argument="value", value={"value":"25000000000000000"}, code=INVALID_ARGUMENT, version=bignumber/5.5.0)

I have tried changing the values from 0.025 ether to 1 ether then also its showing the same error. Also, I have tried with the rational number like 1/8 still not working. LOOKED into some answers but they didn't resolve the error. I have the same…
Megabyte
  • 139
  • 1
  • 2
  • 9
7
votes
1 answer

Check balance of ERC20 token in Hardhat using Ethers.js

I'm writing unit tests using Hardhat's mainnet fork, and for a test I want to check the owner account's initial balance of an ERC20 token, in particular DAI. Here's my test so far: const { ethers } = require("hardhat"); describe("Simple Test",…
Jasperan
  • 2,154
  • 1
  • 16
  • 40
7
votes
2 answers

difference between interface and abstract contract in solidity

I am learning solidity and got to know that interface and abstract are both classes that may contain unused functions. My doubt is: What is the difference between interface and abstract contract in a solidity smart contract?
7
votes
1 answer

Opensea not generating preview for 3d model glb

Hope you're doing well. I am a developer and have a query regarding my 3d model preview on opensea testnet. I have created a metadata file https://pattirose.growwithsabrina.org/nft/1.json using pinanta server for hosting the glb file. Opensea failed…
Ali Raza
  • 83
  • 5
7
votes
1 answer

Web3 python: how can I decode Input Data

using web3 (python3) I am trying to decode InputData of the BSC transaction as seen on BscScan In some solutions I've found code below is being used: import web3 from web3.contract import Contract ... contract =…
Penko_Mlakar
  • 79
  • 1
  • 4
7
votes
4 answers

Provided Address is invalid, the capitalization checksum test failed

I am trying to send a method on a contract using web3. I'm creating an account using the privateKeyToAccount method but when sending the method on the contract I get the following error: Provided address [object Object] is invalid, the…
Andrei Florian
  • 131
  • 1
  • 2
  • 7
7
votes
1 answer

Error: Returned error: The method eth_sendTransaction does not exist

I am trying to transfer an erc20 token from contract address to an ETH address using this code: var _from = "from Address"; var contAddress = "contract address"; var _to = "to address"; var _Amount = '50'; var txnObject = { "from": _from, …
Muhammad Noman
  • 155
  • 1
  • 5
  • 12
7
votes
2 answers

Solidity - Why default getter of a public Struct variable doesn't return every variable inside Struct

I am currently learning Solidity language and I've noticed that when I'm trying to get the value of a Struct inside my JS code, Solidity returns every variable without arrays. I have to create custom getter to access all the data inside my…
Nicolas M.
  • 360
  • 6
  • 12
7
votes
3 answers

Using local private key with Web3.js

How can I interact with smart contracts and send transactions with Web3.js by having a local private key? The private key is either hardcoded or comes from an environment (.env) file? This is needed for Node.js and server-side interaction or batch…
Mikko Ohtamaa
  • 82,057
  • 50
  • 264
  • 435
7
votes
5 answers

How to properly use revert reason in web3.js to show meaningful error message in UI

I want to use web3.js to show revert reason to user, for example in the case of user trying to mint erc721 token that has already been minted. I am using try catch block and see the error message but I want to isolate the error message to show the…
Anas Shad
  • 179
  • 3
  • 11
7
votes
1 answer

DeclarationError: Undeclared identifier - although it's present in ERC721.sol

I am writing a contract on solidity 0.8.3 and I get this strange error for _setTokenURI() although the method is defined in OpenZeppelin 4.X. pragma solidity ^0.8.3; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import…
Marcel
  • 1,537
  • 5
  • 19
  • 38