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
2
votes
1 answer

Handling UI when a transaction is in pending (MetaMask)

I have a Metamask payment that works fine. It's triggered by an onClick of a button. I want to show something to the user during the pending of the transaction, but I can't figure out how since the promise returned is already the mined transaction.…
gringo
  • 88
  • 7
2
votes
3 answers

Pass parameter as bytes32 to Solidity Smart Contract

I am using this Ethereum Go Client and trying to pass a string / bytes32 to Solidity. The function in the smart contract is very simple (for testing now): function vote(bytes32 id) { //id has the value…
bergben
  • 1,385
  • 1
  • 16
  • 35
2
votes
1 answer

How to persist data after deployment in Solidity

I am pretty new to Solidity and working with Ethereum in general. In the (d)app I'm working on I need to be able to persist data onto the ledger, but I'm not sure I understand how this works. Let's say I have the following contract (simplified for…
Karim Stekelenburg
  • 633
  • 12
  • 26
2
votes
0 answers

Evaluation of DApp (Smart Contract) storage concept with IPFS

i hope you can help me improve or validate my storage concept. I am glad for each suggestion. Since this is my first DApp, i might not consider all possible options for my problem. To understand the Background: I plan to realize a DApp (based on…
MrMoehner
  • 21
  • 3
2
votes
2 answers

Algorithm for finding high scores in Solidity/Ethereum

In terms of minimizing gas costs (or any other relevant benchmark), what's the best way in Solidity to sort an array of values and find the highest scores? If it matters, the numbers are all within a fairly tight range
Michael C
  • 153
  • 1
  • 7
2
votes
0 answers

solidity cannot access member variable from another contract on private chain, works fine on remix javascript vm

I have the following solidity code. pragma solidity ^0.4.21; contract Parent { uint public childCount; Child[] public children; function makeChild(string name) external { children.push(new Child(address(this), childCount,…
3tbraden
  • 667
  • 1
  • 10
  • 21
2
votes
0 answers

Web3js interact with local truffle without metamask

I have my dapp that runs correctly on ganache using metamask to sign transactions. However, I want to stop using metamask and have transactions sign themselves. I would like to keep using ganache as this is only for a demo presentation. However, I…
2
votes
1 answer

Contract address collision

So from my understanding when creating a contract the two variables that are used in determining what the address of the contract will be are the msg.sender and the nonce value. So if I create two contracts in the same transaction such as I did with…
user9785654
2
votes
2 answers

Create contract address from the address of the creator and nonce

I am sure that a contract address can be deterministically created using msg.sender and nonce.I read that they used RLPEncoding in python…
ToniyaSundaram
  • 191
  • 3
  • 12
2
votes
3 answers

Installing Web3j CLI tools

this question may seem a bit trivial but I can not seem to find how to get it done. I am trying to install web3j CLI tools and I am not sure how to. I have downloaded the latest release from here as a zip file. I have tried installing using windows…
2
votes
1 answer

Ganache Address Parameter Being Overrided Web3 -0.2

Anyone know why my parameter is being seemingly ignored when I run the dapp? This function is called when I press the button to send an X amount of money to a ganache account who's address I input into an HTML form while using the dapp. …
benjamin852
  • 509
  • 7
  • 19
2
votes
1 answer

Why is my re-entrancy attack failing when executed in a constructor?

I am trying to recreate a re-entrancy attack using the vulnerable below: https://ropsten.etherscan.io/address/0xe350eef4aab5a55d4efaa2aa6f7d7420057eee2a#code And the exploitation contract…
user9785654
2
votes
0 answers

Ganache Cli private network, all ethers on the network go to 0 after a while

I create a ganache cli and initialize my accounts to have ethers using ganache-cli -h "159.89.119.189" -a 3 -e "1000000000000000000000000000" --secure -u 0 -u 1 -u 2 -s 20 but after a couple of minutes, all accounts on the network are 0. I'm not…
Dike Jude
  • 199
  • 3
  • 9
2
votes
0 answers

eth.getBlock("latest").number is always 0 in Rinkeby testnet?

In Rinkeby testnet blocks are importing but BlockNumber always shows zero only.I did transaction also for my account thatt block was downloaded but balance also not updated It shows in blockexplorer but not in show in the geth console These are the…
M Gopi
  • 81
  • 1
  • 14
2
votes
1 answer

Access variables through auto-generated getters from a different contract

I am storing the variables of my token outside of the main contract in a contract called Storage and, therefore, need to access the auto generated getters of the publicly declared variables from a different contract than the one in which they are…
Lucas Aschenbach
  • 862
  • 1
  • 11
  • 17
1 2 3
99
100