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
10
votes
3 answers

Where does ganache store the Ethereum blockchain

I'm actually using truffle with Ganache to do some development. I would like to know where does Ganache store it's blockchain to see how much data is used by my test. Is it stored somewhere accessible on the pc ? I'm using Ubuntu 17.10…
Zackorrigan
  • 178
  • 1
  • 10
10
votes
4 answers

How to authenticate and send contract method using web3.js 1.0

I am confused about how I should be executing a contract's method using the web3 1.0 library. This code works (so long as I manually unlock the account first): var contract = new web3.eth.Contract(contractJson, contractAddress); contract.methods …
Nick Young
  • 885
  • 1
  • 10
  • 21
10
votes
4 answers

How to detect if an Ethereum address is an ERC20 token contract?

If I only get an Ethereum address from the input, is there a way to find out whether it matches the ERC20 token standard?
kaichen
  • 157
  • 1
  • 2
  • 7
10
votes
3 answers

Historical ethereum prices - Coinbase API

Using the python coinbase API-- The functions-- get_buy_price, get_sell_price, get_spot_price, get_historical_data, etc... all seem to return bitcoin prices only. Is there a way of querying Ethereum prices? It would seem that currency_pair =…
sam
  • 488
  • 8
  • 21
10
votes
4 answers

Unable to add ethereum peer. Peer list is empty

I am trying to setup a private ethereum network. I started two nodes in the same machine (Windows 7) in two different ports. I am unable to add one node as the peer of the other node. What I have done so far is this. Start two nodes with same…
Lahiru Chandima
  • 22,324
  • 22
  • 103
  • 179
10
votes
1 answer

Difference between IPFS and Filecoin?

They both seems to store files in a decentralized network. So what's the difference between them in terms of data structure and algorithms they use? And also what's the difference between them in terms of use cases? If I store a file in IPFS or…
Narayan Prusty
  • 2,501
  • 3
  • 22
  • 41
10
votes
5 answers

Ethereum Genesis Block Private Network

I am trying to mine on a private network. How does one go about creating a genesis block for a private network in frontier ethereum? I have seen: https://blog.ethereum.org/2015/07/27/final-steps/ but this is to get the public Genesis block.
BDGapps
  • 3,318
  • 10
  • 56
  • 75
9
votes
1 answer

Connect the Remix Ethereum IDE to localhost

I would like to connect Remix - Ethereum IDE (https://remix.ethereum.org) to localhost. I followed the instructions https://remix-ide.readthedocs.io/en/latest/remixd.html#update-to-the-latest-remixd: I installed remix daemon npm install -g…
Zufar Sunagatov
  • 668
  • 1
  • 6
  • 16
9
votes
4 answers

How to send ETH to a contract function with ethers.js?

I am trying to send ETH to a contract function from a web app via metamask and ethers.js. So far I have tried: const provider = new ethers.providers.Web3Provider(window.ethereum); const signer = provider.getSigner(); const splitterManager = new…
Bruce Jayasinghe
  • 173
  • 1
  • 1
  • 7
9
votes
2 answers

How do I find the tax of a token programatically?

I'm trying to fetch the Buy or Sell Tax of a BSC token, but I haven't found a way yet. I query the DEX via router_contract.functions.getAmountsOut(web3.toWei(1, 'Ether'), [ buying_token_address, pair_token]).call() (in this case pancakeswap), but…
Crypto7
  • 91
  • 1
  • 2
9
votes
6 answers

Invalid address or ENS name

I can't understand what the problem is. When I am run the app I am getting this error: Unhandled Runtime Error Error: invalid address or ENS name (argument="name", value=5.050201689117535e+47, code=INVALID_ARGUMENT, version=contracts/5.5.0) My code…
Ishtiaq Mahmood
  • 154
  • 1
  • 2
  • 8
9
votes
4 answers

how to withdraw all tokens from the my contract in solidity

Can anyone help me? I created a basic contract.But don't know the withdrawal function.Please help me.Thanks everyone I tried creating a basic function but it doesn't work function withdraw() public { …
learn code
  • 91
  • 1
  • 1
  • 3
9
votes
9 answers

Error connecting to localhost after npm hardhat run

I am new to deploying smart contracts with hardhat and am following a tutorial at https://dev.to/dabit3/the-complete-guide-to-full-stack-ethereum-development-3j13. However, after running npx hardhat run scripts/deploy.js --network localhost, I get…
sultan m_c_t
  • 99
  • 1
  • 1
  • 3
9
votes
1 answer

how to calculate percentage in solidity

function splitAmount(uint256 amount) private { a1.transfer(amount.div(2)); a2.transfer(amount.div(2)); } I've seen other threads on this but I feel like over complicate things. With this code the amount is evenly split…
Spacebar
  • 95
  • 1
  • 1
  • 3
9
votes
3 answers

How to connect ethers.js library with Rinkeby programmatically?

According to official docs of ethers.js, this should be the way how to connect to a specific network like Rinkeby-testnet with custom data: const provider = ethers.getDefaultProvider(network, { etherscan: ETHERSCAN_API_KEY, infura:…
delete
  • 18,144
  • 15
  • 48
  • 79