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
0answers
4 views

How to pass IERC20 as argument in solidity?

i'm trying to deploy sushiSwap on my local machine. but i don't know what should i pass a argument in constructor... code is like... pragma solidity 0.6.12; import "./IERC20.sol"; import &...
0
votes
0answers
5 views

signing into Infura from MS code

Trying to work with Azure Blockchain extension in MScode. When connecting to existing networks, Code complains that it can't sign into Infura but does not initiate any OAuth and I don't see settings ...
0
votes
1answer
21 views

whether the value stored in levedb in Ethereum can be changed? [closed]

I can store some key-value pairs through smart contracts in Ethereum, and this key-value pair will be stored in levelDB. But why can I still modify this key-value pair? In my opinion, the data stored ...
0
votes
0answers
14 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.
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 ...
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 ...
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
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; ...
2
votes
1answer
93 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 ...
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, &...
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
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 ...
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 ...
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 ...
0
votes
2answers
48 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 ...
0
votes
0answers
19 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
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....
0
votes
1answer
26 views

How to use web3js in vanilla javascript?

I used to use nodejs for working with web3js and it worked fine..But now I want to use vanilla javascript to connect with web3js. I used CDN <script src="https://cdn.jsdelivr.net/npm/web3@...
0
votes
0answers
17 views

How to track deposits into my account using web3.py

I'm learning how to build blockchain applications. I'm using Django and Web3.py to create one. I wanna know if there's a way to listen for deposits into wallets I will be creating in the application. ...
2
votes
0answers
17 views

What other blockchains support the EVM execution model?

In essence I'm interested in which other chains (mostly Layer 1) I can deploy Solidity smart contracts to? I know of TRON. And I also know Cosmos, Polkadot and NEAR have at least some support. But ...
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
84 views

ERC721 Token Transfers and Approvals

ORIGINAL POST (EDITED POST BELOW): I keep getting the following error in my ERC721 Contract: “ERC721: transfer caller is not owner nor approved” This happens when I’m trying to buy a Token that has ...
0
votes
1answer
19 views

expected identifier but got '('

I am receiving the above mentioned error when compling the code. Can you understand what's the issue? Thanks pragma solidity 0.6.12; interface ITRC20 { function transfer(address to, uint256 ...
0
votes
1answer
20 views

When exactly does a state change happen for a variable?

I am not sure if I asked right. What I don't understand is if a tx changes value of a state variable , it has to be mined and confirmed and brodcasted to network in order for the rest of network to ...
0
votes
1answer
28 views

How to read and write file data using blockchain? [closed]

I am a beginner to Blockchain. Can you suggest me some ways on how to write a file data to blockchain and how to read data from a blockchain to a file. If this cannot be done in Ethereum then on which ...
0
votes
1answer
52 views

what is use of question mark '?' in solidity

In solidity I came across a code uint256 q = p % 2 != 0 ? a : b; what does it mean ?
0
votes
1answer
36 views

Is it bad idea to store my passwords on blockchain with a smart contract?

I want to save my passwords and some other personal data on a ethereum like blockchain. it seems more persistant to me. I may lose my e-mail , my pc may crush and I may lose my usb stick. But nothing ...
0
votes
0answers
22 views

Is it bad idea to store my passwords on blockchain with a smart contract? [duplicate]

I want to save my passwords and some other personal data on a ethereum like blockchain. it seems more persistant to me. I may lose my e-mail , my pc may crush and I may lose my usb stick. But nothing ...
0
votes
0answers
25 views

Require not working properly, always lead to an error

There is a login page and register page in my dapp based on refer and earn concept to authenticate and authorize user respectively..Login part is working fine, but when I try to register a new account ...
0
votes
0answers
20 views

How to collect logs from Uniswap V2: Router 2?

I have a problem with collecting logs from Uniswap router contract. I use json_rpc eth_getlogs When I call the method I receive nothing. What I'm doing wrong? curl -X POST --data '{"jsonrpc":...
0
votes
0answers
16 views

In Ethereum, is it possible for a malicious client to duplicate a coin by double executing a transaction?

Is it possible a scenario in which a malicious client executes two transactions with the same nonce of a specific account and copies and sends coins? Suppose users A, B, and C have the following ...
0
votes
1answer
12 views

Conceptual Question: What is the point of making an auction decentralized?

I understand how a blockchain works, I know the pro/cons between a centralized vs decentralized system. My question is specifically tied to auctions (eg: ascending auctions): what advantages would be ...
0
votes
1answer
31 views

Why is no block created for this function? [duplicate]

I have this contract and I've deployed it to ganache pragma solidity >= 0.5.0; contract HelloWorld { string public payload; function setPayload(string memory content) public { ...
0
votes
1answer
64 views

Deploying Smart Contract to Rinkeby

I'm getting the following error when I try to deploy my smart contract to Rinkeby using Truffle: Error: Unknown arguments format passed to new HDWalletProvider. Please check your configuration and try ...
0
votes
0answers
16 views

Storing Struct inside an array. Help Please

I am designing an EHR System that will store patient records (with a unique ID) and separated by the date and Hospital entered. I am able to enter data in Hospital struct mapping to the Record struct, ...
1
vote
1answer
44 views

how to get list of transactions history about specific contract address using web3?

I really don't know how to get a list of transactions history about specific contract address using web3.py and I use Infura HTTPProvider I just have only one 'contract address'. Can i get information ...
0
votes
0answers
10 views

How do two parties verify a transaction initially?

Sorry for the beginner question. Im trying to understand how a blockchain transaction is initially verified by both parties. I think I understand the process of externally verifying a transaction but ...
1
vote
1answer
18 views

where is receipt tree stored?

Simple question. I know that state trie is stored in each node's drive. but they are not stored on actual state. Question 1) What about receipt tree ? do they get stored separately too from the chain ...
0
votes
1answer
20 views

in which currency does state trie's balance is stored?

My question is very simple and I couldn't find the answer for it. There's a state trie in ethereum. Each state trie has address as key and value as an object which has balance as one of the keys. I am ...
0
votes
1answer
11 views

How do you handle a chain re-org with contract events?

Given that events are fired whenever a transaction is included in a newly mined block, how do you handle the situation when the mined block containing the transaction gets orphaned? Say I have a ...
0
votes
3answers
29 views

Broadcast transactions to specific miners?

Is it possible to broadcast transactions specific or a small number of miners? I believe there is a concept of private transactions, as used to mitigate front running to rescue vulnerable funds for ...
0
votes
0answers
18 views

Only see the last item of struct using for loop in web3.js

I don't understand what mistake I did in my code. I created a folder before and I was successfully see the correct result of smart contract. For more clarify , Actually I want to see the struct result ...
0
votes
1answer
18 views

What are the required platform to make mobile app that has dapp features?

I recently went over dapp with ethereum block chain but most of the coureses and documentation follows example in webApps. I want to know what are the possible frameworks/library, technology/ ...
0
votes
1answer
32 views

Free transaction on a private ethereum blockchain

I have developed a Dapp powered by Ethereum with truffle. And I want to deploy it on a private blockchain. But I have one question to ask before that. My question is: can I make in sort that my Dapp ...
0
votes
1answer
93 views

Transaction Error. Exception thrown in contract code. REVERT

I keep getting an error when trying to call function "setTokenAddress(address input)" Here's my contract code: pragma solidity 0.6.12; library SafeMath { function add(uint256 a, ...
0
votes
1answer
64 views

Updating ERC-721 Token's Metadata after it was Minted

Is it possible to somehow update an existing ERC-721 Token's MetaData after it was already minted? Let's say we've created a Knight character for a game - by minting an NFT for it, and 3 months later ...
1
vote
0answers
9 views

how does casper help with finality?

My question is very simple... I've watched some videos and read articles, but couldn't figure this. It's said that on the internet If the block has been finalized, it can't be reverted/changed in ...
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....

1
2 3 4 5
38