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
13
votes
2 answers

How to receive and send USDT in a smart contract?

Is there any guide or code that can serve as an example to implement the functionality where a smart contract receives and sends USDT to other addresses. I appreciate your help
jeissoni22
  • 285
  • 1
  • 2
  • 11
13
votes
4 answers

Error: The method eth_sendTransaction does not exist/is not available

Showing an error while calling solidity contract, which is deployed already in ropsten-infura. I'm using web3(@0.19.1) for calling contract. Anybody faced the same issue?
Aditya V
  • 548
  • 2
  • 8
  • 17
13
votes
2 answers

React Native and web3 v1.0.0

I've managed to run React Native and web3@0.19.0 with both rn-nodeify and ReactNativify successfully. I'm aware that web3 v1.0 does build the modules dynamically, but I'm wondering if anyone has been successful in integrating web3@1.0.0 into React…
user2067956
13
votes
3 answers

How can I return an array of struct in solidity?

I am designing a solution for an ethereum smart contract that does bidding. The use-case includes reserving a name eg. "myName" and assigning to an address. And then, people can bid for that name (in this case myName). There can be multiple such…
13
votes
6 answers

Is blockchain a decentralised database?

I understand bitcoin uses blockchain technology to maintain a decentralised ledger of all transactions. I have also read many posts eluding to future applications of blockchain technology, none of which have been very clear to me. Is blockchain…
Dercni
  • 1,216
  • 3
  • 18
  • 38
12
votes
4 answers

Ethers.js "Error: unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION)"

I'm trying to fetch the price of ETH from KyberSwap, using Ethers.js, but I'm receiving the following error: Error: unknown account #0 (operation="getAddress", code=UNSUPPORTED_OPERATION, version=providers/5.5.3) I'm connected to an Infura web…
Jasperan
  • 2,154
  • 1
  • 16
  • 40
12
votes
3 answers

`Property 'ethereum' does not exist on type 'Window & typeof globalThis'` error in React

I am getting the Property 'ethereum' does not exist on type 'Window & typeof globalThis' error in React. This is the line generating the issue: import { ethers } from 'ethers' const provider = new…
Boris
  • 11,373
  • 2
  • 33
  • 35
12
votes
1 answer

The field extraData is 97 bytes, but should be 32. It is quite likely that you are connected to a POA chain

I deployed a private network via geth and posted a smart contract there. Accounts are set in the genesis block I'm creating a python function in which I want to call a smart contract function import web3 import json class Estate(): with…
Ilya
  • 343
  • 3
  • 10
12
votes
3 answers

I am trying to execute a swap on Pancakeswap using web3, but I get an error when calculating transaction cost

I am new at ethereum development and I am working on a simple script to execute swaps using Pancakeswap. Everything seems to be working well up to the point where I am building my transaction and calculate the tx-cost. I am using the…
manolo
  • 301
  • 1
  • 2
  • 9
12
votes
0 answers

Ethereum LES getProofsV2 Always Returns [] (Empty Nodes)

I'm unable to get an Ethereum LES getProofsV2 (or getProofs) request to produce a ProofsV2 (or Proofs) response with anything but an empty array of Nodes. This is for a request targeted to a GETH node open to LES connections. The request arguments…
GoZoner
  • 67,920
  • 20
  • 95
  • 145
12
votes
3 answers

web3 websocket connection prevents node process from exiting

I have a node js process that creates a web3 websocket connection, like so: web3 = new Web3('ws://localhost:7545') When the process completes (I send it a SIGTERM), it does not exit, but rather hangs forever with no console output. I registered a…
Andy Pang
  • 387
  • 4
  • 10
12
votes
2 answers

MetaMask - RPC Error: Error: MetaMask Tx Signature: User denied transaction signature

In javascript I run contract's method contract[methodName](...params, { from: myAccount }, (err, response) => { console.log('get transaction', methodName, err, response); if (err) return reject(err); resolve(response); }); and then…
12
votes
5 answers

calling smart contracts methods using web3 ethereum

Trying to work around the blockchain using Ethereum, I'm facing problems when trying to interface with a deployed contract. What I would try to achieve is to call a method to display information added to a private blockchain deployed locally using…
SKYnine
  • 2,708
  • 7
  • 31
  • 41
12
votes
6 answers

Test ethereum Event Logs with truffle

I have a contract's function which emit events on each call. I would like to have an event emitted on each test which are passing, here are some tests : it("should emit Error event when sending 5 ether", function(done){ var insurance =…
ltheron
  • 301
  • 1
  • 3
  • 12
12
votes
9 answers

Event triggering in solidity

I'm currently working on ethereum platform(node.js and solidity). My question is how do I trigger an event in solidity(contract) using node.js?
Yajnesh Rai
  • 290
  • 1
  • 6
  • 17