Questions tagged [blockchain]

The Ethereum blockchain is a distributed database based on the Ethereum whitepaper specification and stores both the full transaction list and the most recent state.

Filter by
Sorted by
Tagged with
0
votes
1answer
84 views

How to store and encrypt Keys?

I am developing chrome extension like metamask for the private Chain. I have generated the keys and using localStorage to store the Keys. But I am not sure whether I am going correct or not for ...
1
vote
1answer
112 views

How to kill a contract in ethereum?

I'm trying to kill this contract /** *Submitted for verification at Etherscan.io on 2016-08-31 */ //sol Wallet // Multi-sig, daily-limited account proxy/wallet. // @authors: // Gav Wood <g@...
0
votes
1answer
19 views

How are difficulty of finding a proof of work dynamically regulated without a central body? [duplicate]

The probability of a miners to mine a block dynamically changes so that blocks are mined at regular intervals.How does block chains accomplish this without a central regulating body,
0
votes
1answer
41 views

Im getting the following error: ParserError: Expected primary expression. struct ManagingOrder.Parking memory new_Parking = Parking({

Im using blockchain technology for the first time, for a college project. Im trying to run a smart contract from Github. After debugging the errors shown while compiling the smart contract (in ...
0
votes
0answers
12 views

How exactly crypto exchanges set price?

Since cryptos exchanges (Binance, Coinbase ... ) have differents trades volumes(sell and buy), how could they share the same prices for cryptocurrencies ? Thanks.
2
votes
1answer
89 views

How to increase stored block states from 128 to 10 000 in Geth?

AFAIK Geth preserves states for the last 128 blocks by default. I would like to keep states for, say 10000 blocks (not turning myself into archive node). Is it possible?
0
votes
0answers
13 views

Were the nowadays blockchain applications infeasible a few years ago?

Is it a proper argument to bring Moore's Law into equation when it comes to thinking why the current blockchain applications weren't feasible back in the day (2015-2016)? I am completely aware of the ...
1
vote
1answer
306 views

Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' By calling UniswapV2Router02 swapExactTokensForETH

I am trying to call UniswapV2Router02 swapExactTokensForETH function on my Solidity Contract. I got Fail with error 'TransferHelper: TRANSFER_FROM_FAILED' on etherscan. this is transaction url : ...
37
votes
5answers
32k views

How to get a contract's balance in Solidity?

How do I get the balance of a contract with solidity? I know geth has web3.eth.getBalance(), but that's to get the contract balance after it has been deployed. Is there a standard way of doing this, ...
0
votes
2answers
149 views

What are differences between Bitcoin and Ethereum transactions?

I have read about how transactions work and how they can be redeemed in bitcoin. In a very abstract way, the sender defines the output script that should redeem the transaction. But I am new to ...
0
votes
2answers
41 views

Is it a good practice to store a lot of keys in a string array in smart contracts?

I am working on a project where blockchain will be used on a supply chain. One can create and transfer assets to another in the same. Whenever one is creating an asset or transferring any asset, ...
0
votes
1answer
17 views

Gas requirement of function problem

I am trying to run below code, but I receive this error "Gas requirement of function Team3_SE427_Call.increaseCount is infinite: If the gas requirement of a function is higher than the block gas ...
0
votes
1answer
15 views

talking about PoS [closed]

This is also one of the very early papers talking about PoS. I guess then we can let nodes resync to the chain in which all the blocks add to the highest total stake by the winning miners. Please ...
1
vote
1answer
60 views

The endpoint returned a different chain ID: 0x539 (Ganache)

I am trying to connect Metamask to ganache by creating a custom RPC with the following details: New RPC URL: HTTP://127.0.0.1:7545 Chain Id: 5777 But I keep getting the error message The endpoint ...
1
vote
1answer
465 views

Why my geth system daemon not sync?

I've a machine with Ubuntu Server 16.04.4 LTS, the purpose of this machine is run a Geth process reachable by a web services. This is my "unit service": [Unit] Description=Ethereum go client [...
0
votes
1answer
81 views

Ethereum Smart Contract with Custom Fee and Percentage of the collected Fee Distrusted token holder

I wanted to know is there a possibility to create a smart contract for a token wherein the transaction fee could be overridden with the network fee and the fee collected on the transaction can be ...
0
votes
0answers
7 views

Blockchain & Solidity : Could you someone explain me what function entrySet is for?

I found this code online.It's about notorization of some document. I need to understand this code real quick. So could you tell me what function entrySet(bytes32 _checksum) do? pragma solidity ^0.5.0; ...
0
votes
1answer
73 views

Calling a function from another contract is not working. But calling the function from deployed contract is working

I have a problem with calling a function from another contract. I don't know why it is not working. Contract DateTime(https://github.com/pipermerriam/ethereum-datetime) is a util for converting ...
2
votes
1answer
99 views

In what way does Sharding allocate transactions for each shard? state? or node selection?

In what way does Sharding allocate transactions for each shard? I know that accounts are assigned to each shard based on prefix in the account's address and each shard processes the transactions ...
0
votes
1answer
19 views

Withdrawing ETH from Contract fails

Trying to write a quick function to withdraw ETH from my contract - it's not working. Here's the code: function withdrawEntireBalance() payable external { require(msg.sender == contractOwner, &...
1
vote
1answer
54 views

Where, or how, can I programmatically get a complete history of the major cryptocurrencies?

I would like to programmatically get a complete list of the historical: Number of transactions Average Transaction Fee Hashrate Mining Profitability Difficulty Block Time Block Size related to the ...
0
votes
0answers
14 views

How to Load JSON Build of Solidity Contract into Javascipt

I'm thinking there's gotta be a way to load the abi (or the entire JSON build file) of a smart contract into my front-end Javascript app after compilation automatically - meaning via some kind of ...
2
votes
2answers
659 views

ganache-cli: how to persist new created accounts

I start my service by: ganache-cli -d --gasPrice 0 -q --db=./db This persists my 10 defaults created accounts, but when I create new accounts using Web3: web3.eth.personal.newAccount('password') ...
1
vote
1answer
258 views

Performance Analysis of Ethereum Clients Geth and Parity

I want to do performance analysis of Geth and Parity. I want to run 1000 transactions serially on each client and want to get transaction processing time for each transaction. How can i get these ...
1
vote
1answer
81 views

Are there any virtual IoT simulators that facilitate the connection with Ethereum Blockchain?

I already built a smart contract for Ethereum Blockchain by using truffle; Now, I'm looking to connect my smart contract with the IoT environment. So are there any IoT simulators (platform, framework,...
0
votes
2answers
129 views

Is Merkle tree applicable at block level also?

As per my understanding, Merkle tree is applied in case of transactions. Through Merkle tree we generate root hash transaction from all the transaction present in a block. So does it work the same way ...
2
votes
1answer
110 views

How can I execute transferFrom function in node js

There is solidity erc865 code function transferFromPreSigned( bytes _signature, address _from, address _to, uint256 _value, uint256 _fee, uint256 _nonce ) public ...
1
vote
1answer
621 views

Error occurred when trying to send rpc requests(s)

I am using the nethereum package in .Net and trying to invoke a smart contract with web3. Initially it was working fine, but suddenly I am getting an error while trying to get the transaction count. ...
0
votes
1answer
38 views

Data encryption

Since all data on the Blockchain is public. Presume I have multiple users submitting data which I want to hide, is there a way I can encrypt that data on the Blockchain ? Or do I have to encrypt off-...
0
votes
0answers
6 views

Button to interact with a smart contract function

I have this function on a smart contract: function togglePlayerReverse(bool _isReverse) public { playerReverse[msg.sender] = _isReverse; } I want to use this button to allow the ...
0
votes
0answers
4 views

“Universal Proof of Work” with SNARKs?

If SNARKs are able to prove computations of arbitrary complexity and difficulty were executed correctly, would it be possible to use them to create a Proof of Work system where ANY computation can be ...
1
vote
5answers
383 views

Mist / Ethereum Wallet question

I bought a very small amount of ETH on coinbase just to try it, and I wanted to create my own wallet to get it out. However, I've been trying to get Mist working for 3 days and it is always stuck on ...
3
votes
1answer
71 views

Understanding what happens between transaction creation and block creation in Proof of Authority

I am currently writing my thesis where I'm investigating the potential of blockchain technology to become the underlying technology in a system that is create and record qualifications. I'm at the ...
0
votes
0answers
18 views

How to Host and deploy DAPP? [closed]

I have made DAPP successfully using Solidity as a primary backend language and HTML for frontend.. Now I want to deploy it. So anyone can access it permanently all over the world..But I can't able to ...
2
votes
1answer
79 views

How does Ethereum know who called a function first?

Scenerio 1 Say I have a function f(). Whoever calls the function first gets a reward. Persons A, B, and C all call the function at roughly the same time. Who will receive the reward? Scenerio 2 ...
1
vote
1answer
101 views

What would an Etheruem-like blockchain look like if each block were just an IPFS hash?

I see a lot of people tout the enormous benefits of using IPFS as a store of data. Meanwhile, the Ethereum blockchain is over 1TB in size, with quesitonable need to keep the earlier blocks. In ...
6
votes
1answer
294 views

What filesystem should I use for geth and leveldb?

I used old LGA775 machine for running geth node. Its mobo has older sata 3gb/s (benchmark showed that ssd bottlenecked there) and only 4gb of DDR2, with windows installed. So syncing is a real pain ...
0
votes
2answers
46 views

Solidity Split Comma-Delimited String into Individual words

Since Solidity functions can't accept String Arrays as arguments, I'm trying instead to pass in a long comma-delimited string, and then convert it to an array of strings on the fly. I'm close - but ...
4
votes
3answers
9k views

How to use web3 to send money from wallet A to wallet B?

var myContract = web3.eth.contract(abi); var address = contract address; var contract_data = myContract.at(address); var sender = '0xd3aaa525c087978133abb517593ea334f16abd1f'; var receiver = '...
0
votes
1answer
220 views

Synchronous call of external contract function in Solidity

I have two Solidity contracts, where contract Caller depends on a second contract Callee. Contract Callee provides a public view function which checks the validity of a string (e.g. an password), ...
0
votes
1answer
874 views

Error: The data field must be HEX encoded data

I am trying to make a simple dApp by using a tutorial. I am using the following command ; npm install ganache-cli web3 so that we can use web3 to get fake ethereum nodes/accounts by connecting it ...
0
votes
0answers
17 views

Solidity - Setting the length of an EnumerableSet UintSet

Is it possible to pre-set the length of the set of an EnumerableSet.UintSet type? For instance, if I declare this mapping: mapping (address => EnumerableSet.UintSet) private agentTickets; and then ...
0
votes
1answer
43 views

Two smart contracts interact can't pass value when I using web3.js

I have two different smart contracts interaction_1 and interaction_2 I input the data(team) from remix ide. What I want to accomplish is when user input team in user_input function at interaction_1,...
0
votes
1answer
19 views

Is the value of the privateFor param accesible in the contract?

Transaction params for quorum can contain a privateFor param { "jsonrpc":"2.0", "method":"eth_sendTransaction", "params":[ { ...
0
votes
1answer
35 views

Invalid implicit conversion from uint256 to bytes32 requested

I am trying to run someone else's code from GitHub and I encounter this issue. It said that Invalid implicit conversion from uint256 to bytes32 requested. Please have a look on this code. function ...
0
votes
1answer
14 views

How to capture my emitted event value after my bet function is executed

I have this contract: // SPDX-License-Identifier: GPL-2.0-or-later pragma solidity 0.7.4; contract CoinFlip { uint public contractBalance; address owner; constructor() { owner = msg....
1
vote
1answer
92 views

Deploying fails with different compile version

I'm trying to implement a simple card game. Actually, everything is working fine. Until I tried to move from 0.4.0 to 0.4.22. Any idea what is going wrong? Thanks a lot. And here the code: pragma ...
1
vote
1answer
68 views

The value of my variable change

I have two contracts (A and B) in the same smart contract. When I access from B to a A's variable the value is different that I can see from A. For instance, when I access from A to that variable ...
2
votes
1answer
38 views

Problem In Getting Rinkeby Test Ethers

I tried to get rinkeby ethers from https://faucet.rinkeby.io/ by creating a tweet but the website shows "insufficient funds for gas * price + value” error. I also tried the website faucets....
0
votes
1answer
42 views

Getting error in Deposit function in smart contract : The constructor should be payable if you send value

I am getting the error while deposit the amount in remix. Following is my code pragma solidity ^0.4.19; contract Savings { address owner; uint256 deadline; modifier onlyOwner() { require(...

1
2 3 4 5
38