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

How can I give Token-Customers access to a bunch of files that are not on the Blockchain? (Ethereum)

At first I was thinking about simply letting them see a Google Drive link but that would have to stay the same so the customers could just send the link to one another, even though the people should have to use the smart contract to get it.
scoperationX
  • 127
  • 1
  • 9
2
votes
1 answer

Solidity: Retrieving values of Array of Structs in Mapping

I have some solidity code where I am attempting to gather the ids which are a value stored on a Struct. I have a mapping where the key is an address, and the value is an array of Structs. Whenever I execute the getMediaByAddress function I get an…
Jackson
  • 6,391
  • 6
  • 32
  • 43
2
votes
1 answer

web3 with NativeScript

How can I use the web3.js library (for Ethereum development) in NativeScript? I tried: install web3 via npm install web3@0.20.7 --save install web3 through plugin manager in sidekick even tried const…
Alex
  • 475
  • 1
  • 5
  • 16
2
votes
1 answer

encode three integers into single integer

I have to encode 3 numbers into the same integer. I have these 3 measurements uint256 carLength; uint256 carWidth; uint256 carDepth; and i want to encode these 3 numbers into the same integer with the possibility to decode. My problem is that I'm…
Diagonal Think
  • 323
  • 1
  • 3
  • 14
2
votes
2 answers

Is it possible to get the return value of an external function that gets data from another contracts external function?

Note: This is ONLY an issue when calling external-view functions from web3js, as it doesn't create a transaction I've got 2 contracts, A and B (one is a storage contract, and the other is more of a logic contract) If A has a function like: function…
Justin
  • 4,434
  • 4
  • 28
  • 37
2
votes
0 answers

How to connect metamask account to remix (ropsten test)

I have my metamask account working on the Ropsten net, and I have a contract I wrote working in remix. However, when I select web3 for the environment, I cannot figure out how to add my address to the "account" tab. If you click on the add account…
Noah Omdal
  • 89
  • 12
2
votes
1 answer

Smart contract good practice for reentrancy attacks

I'm a rookie working with solidity and blockchain technologies and I was reading some good practices to improve my code. And I have a question about a code that I'm not quite understanding very well: Source:…
Cortesao
  • 123
  • 1
  • 5
2
votes
1 answer

Airdrop contract not working -- VM error: revert

I am trying to implement this Airdrop: https://github.com/odemio/airdropper/blob/master/Airdropper.sol Initially, I started writing tests for our use-case, but the airdrop was not working. function airdrop(address source, address[] dests, uint[]…
R-J
  • 928
  • 1
  • 7
  • 24
2
votes
1 answer

Cannot install web3 node module

As per the documentation, npm install web3 would install the library but when I am trying to install the module it is throwing the following error: PS F:\Sportist> npm install web3 npm WARN deprecated fs-promise@2.0.3: Use mz or fs-extra^3.0 with…
Paradox
  • 327
  • 3
  • 19
2
votes
1 answer

eth.sendTransaction from eth.coinbase makes multiple transactions and decrease the eth.coinbase balance

Im working on a distributed application using Ethereum, the go-ethereum implementation (Geth). On a Digital Ocean droplet (Ubuntu 16.04) i have installed geth. I have created a structure like this: devnet$ tree -L 2 . ├── accounts.txt ├──…
Marcos Martínez
  • 545
  • 2
  • 9
  • 24
2
votes
1 answer

insufficient funds for gas * price + value using geth --dev

I keep getting an error deploying a smart contract (using netheruem). The error is: insufficient funds for gas * price + value with geth command: geth --dev --rpc --rpcport "8545" --rpcapi="db,eth,net,web3,personal,web3" console I read that I need…
AshT
  • 535
  • 1
  • 8
  • 20
2
votes
1 answer

ethereum miner not giving ether to coinbase account

I am relatively new to Ethereum. I was trying to set up a private test network. I used the following genesis file: { "config": { "chainId": 15, "homesteadBlock": 0, "eip155Block": 0, "eip158Block": 0 }, "difficulty": "20", "gasLimit":…
raghav
  • 23
  • 3
2
votes
2 answers

Exit Scam Solidity game

I'm looking through Exit Scam's game code. But there are some lines that I do not understand at all. Contract code At Line 189: Why is there an address at ...Interface(...); ? F3DexternalSettingsInterface constant private extSettings =…
Hami
  • 335
  • 1
  • 7
  • 22
2
votes
1 answer

Installing npm install --save-dev web3@1.0.0-beta.26 error?

I am trying to install web3.js library and getting the below issue. Node.js 8.x Windows 7. I am able to find python installation under this folder. C:\Users\Mabel.windows-build-tools\python27 C:\Program…
Robert Ravikumar
  • 912
  • 2
  • 11
  • 29
2
votes
3 answers

Error: Number can only safely store up to 53 bits

I am trying to perform raw transaction in quorum , but I am getting the error: Error: Number can only safely store up to 53 bits. The code is, web3.eth.sendSignedTransaction(rawTx).then(function(transactionReciept,error){ if(error){ …
GPC
  • 381
  • 2
  • 14