All Questions

Filter by
Sorted by
Tagged with
0
votes
2answers
13 views

Ethereum Smart Contract Storage

I'm currently creating my first dApp, and have some trouble understanding the storage of data of smart contract on the Ethereum blockchain. I've altered the react basic code by adding a constructor. ...
0
votes
2answers
39 views

Data validation using Ethereum

I'm pretty new to the BC and specifically Ethereum world and I'm just starting to scratch the surface of the potential applications of this powerful technology. As I'm approaching to build my first ...
0
votes
2answers
180 views

web3 erroneously returning error

This is strange. My web3 script to deploy a contract seems to work, but always activates the .on('error', fcn) clause even though there is no error. The message says Transaction has been reverted by ...
0
votes
1answer
17 views

Withdraw function in my staking dapp not working as it should

I'm making a staking dApp (tutorial project) and my withdraw and reward function that is to be called when the msg.sender wants to stop staking doesn't work well. The function calls and returns a ...
8
votes
1answer
456 views

getting started with geth and ENS commands: Error: invalid address

I'm starting from square zero, sorry. I'm just trying to get a javascript console up and running so that I can learn more about ENS: http://docs.ens.domains/en/latest/userguide.html#resolving I've ...
0
votes
1answer
16 views

How can I listen to certain contract's method's changes?

Let's say I have a method: function appendNewName(string name) { names.push(name); } I want to store this in the backend in DB once a new name is inserted. How can I achieve that? Unfortunately ...
0
votes
1answer
16 views

whether the value stored in levedb in Ethereum can be changed?

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
1answer
53 views

Can I monitor contract attributes without sync the whole block?

I deployed a contract in my private ethereum network using geth. Now I am only intrested in some specific atrributes of this contract, can I only monitor these values without downloading the whole ...
1
vote
1answer
15 views

Web3.py 'topics'

I have question regarding topic:. I'd want to query and filter for specific transaction below. Transaction Recept Event Logs Topics -1st log- 0 - ...
1
vote
0answers
26 views

Preserve msg.sender but not storage

In this particular scheme, we pass the address of the Attacker contract in Victim.foo. By using delegatecall, we maintain the msg.sender field, but we are not using the storage of Storage but Attacker'...
5
votes
1answer
3k views

geth 1.8.15 flag provided but not defined: --fast

Geth version I have: Version: 1.8.15-unstable Architecture: amd64 Protocol Versions: [63 62] Network Id: 1 Go Version: go1.11 Operating System: linux GOPATH= GOROOT=/usr/local/go go version: $ which ...
0
votes
1answer
191 views

Getter and Setter Functions in Solidity not showing any output

I have written a smart contract with the Getter and Setter functions but it is not showing any output in IDE-Remix. My code is ''' pragma solidity ^0.4.21; contract GetandSet{ string name; ...
2
votes
1answer
177 views

Unable to deploy the smart contract using solc compiler in mac

I am trying to deploy the Lottery contract using solc compiler of verison 0.4.17 but it's showing me nothing. But the same contract is working good in the remix ide. I providing you the the Solidiy ...
2
votes
1answer
41 views

How to implemet condition for constructor?

Looking to learn solidity so need your support for this I have made a constructor in my contract where maxAvailableNumber = 1; What I want to do is if the balance of user is more than certail limit ...
0
votes
0answers
9 views

How large network traffic is expected for Ethereum 2.0 Staking node?

Would be interested what can be rough estimated network costs of running full staking client. For staking it's currently required to run: Eth1 node (Not counting initial sync which require initial ...
0
votes
2answers
165 views

how to write backend for contract if you use infura ropsten metamask and remix

i'm using metamask with ropsten. deployed my contract on ropsten using remix. for the backend i used infura to create instance of web3. ew Web3(new Web3.providers.HttpProvider('https://ropsten.infura....
0
votes
1answer
203 views

Metamask TestRPC shows 0 Ether while connecting to Ganache- CLI

I've gone through various Q/A(s) of the problem of ganache-cli and metamask not linking but after trying all the solutions, still doesn't work for me. As soon as I type ganache-cli in windows cmd ...
1
vote
1answer
370 views

When do you get eth when mining eth?

I ran Claymore's eth miner for 8 hours and got 200 shares. I set my eth address when I ran the miner, but no eth was deposited to my address. When I restarted the miner the shares were reset to 0. ...
0
votes
1answer
13 views

Why addresses from the exchanges does not shows on etherscan?

I have some ether in exchange but when I searched it on etherscan.io it is showing There are no matching entries there I got to know exchanges have the balances on their own wallet address, but if ...
1
vote
1answer
51 views

How to transferFrom an external erc20 token with IERC20?

Currently, I try to send Wrapped ETH from my account to a contract address by using IERC20. But it returned an error on Remix. By the way, I could call token.balanceOf(msg.sender) but can't execute ...
3
votes
0answers
19 views

What happens in the account state when we pre-send ethers to a smart contract?

I'm asking this question in relation to this one : pre_sending Ether where the OP asked in a comment of the answer about what happens at the low-level when pre-sending ethers to a smart contract. As ...
1
vote
1answer
15 views

Ether withdrawal shown as “internal” transaction

I requested a withdrawal of 490usd of eth to this address : 0x4fc9bbcf8fd82221ffa0508cac3e094cf7123de7 from bitstamp. The transaction showed "finished" in bitstamp but I never received the ...
1
vote
0answers
8 views

Proof of Stake leader-election [duplicate]

So I understand Proof-of-work high level, where nodes work to solve a "puzzle". And once they've created a valid block they then broadcast it to the network. So that node receives the reward ...
2
votes
0answers
20 views

How to store array parameter of a function to contract state?

I am trying to save an invoice to contract storage (see function addNewInvoice(..)) but I seem to be tripping over the data locations. // SPDX-License-Identifier: private pragma solidity >=0.7.0; ...
0
votes
1answer
38 views

Deploy.js script is inifinite, does not show any errors

This is the deploy.js file: const assert = require('assert'); const HDWalletProvider = require('truffle-hdwallet-provider'); const Web3 = require('web3'); const cF =...
0
votes
0answers
10 views

How to fill transaction nounce gap for an EOA?

If for whatever the reason, one transaction submitted (say lost transaction with nonce N) was not mined into block. The consequence is that any transactions submitted after the lost transaction will ...
3
votes
1answer
55 views
+50

How to set multiple nodes in HttpProvider web3 v1.2.0

I'm working with Nodejs application, and using a multi-node setup on different servers. If I have single node end point like http://localhost:8545 I can use Web3 providers as below var web3 = new Web3(...
1
vote
3answers
96 views

Is it possible Refund the ETH within ERC20 Contracts?

if user sent the 1.5 ETH then accepted the 1 ETH, but 0.5 ETH should be refunded to sender. I tried like msg.sender.transfer(0.5) and tried like msg.sender.transfer(500000000000000000) but nothing ...
0
votes
1answer
362 views

How to state private keys when using node.js and ethereum to run a contract?

I have to run node.js to execute smart contracts. My quetsion is about the keys. I have seen this from the docs - 1. Code to sign 2. Code to execute But I am unsure how the two are combined. Could ...
0
votes
1answer
19 views

Query token balance before transferFrom

I am trying, but without luck, to query the token balance of the approver address before transferFrom event. function transferFrom(IERC20Token _token, address _sender, address _receiver) external ...
3
votes
1answer
33 views

Do miners undergo a sunken cost of attempting to verify an invalid transaction signature?

In the case of an 'invalid' transaction whereby the state transition of the execution is deemed to conflict in some way and reverts, the transaction itself is actually valid; gas is consumed, tx ...
0
votes
0answers
8 views

Ethereum validator voting [closed]

How does voting work exactly in Ethereum? While reading the white paper and some blog entries it repeatedly says validators "vote" on blocks. But how does voting work in a decentralized ...
0
votes
1answer
120 views

Deploy contract to Parity dev chain using Remix

I'm trying to deploy a contract via remix to my local development chain. However, the transaction never gets mined and is pending forever. When I use a node script it works (at least I receive the ...
2
votes
1answer
149 views

How to add custom precompiled contract?

I want to implement some features as precompiled contracts in Ethereum. I read some articles and the contract code, but I still don't know how to do this. Is there's a tutorial from scratch?
3
votes
1answer
66 views

mining requires access to the entire blockchain?

I am reading the white paper and confused by two sentences bellow: In the Section of Mining Centralization: ... miners are required to fetch random data from the state, compute some randomly ...
1
vote
1answer
34 views

Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. Even after updating truffle

I am getting the Error: Truffle Box at URL https://github.com/truffle-box/bare-box.git doesn't exist. If you believe this is an error, please contact Truffle support. Even after updating of truffle to ...
0
votes
1answer
111 views

Invalid address

I deployed my contract in ganache. When I was started to call a function with two arguments I started getting an error. I used an address from ganache. Error: invalid address (arg="user", ...
1
vote
0answers
10 views

Verifying ETH Deposit Contract signatures using Chainsafe BLS library

I am attempting to verify BLS signatures using the Chainsafe BLS library. I am attempting to independently verify signatures associated with deposits to the ETH Deposit Contract. In order to test that ...
0
votes
1answer
224 views

Getting “gas required exceeds allowance (93846700840810) or always failing transaction” on private network. How to access geth client via nodejs?

I have recently started using Ethereum. I am trying to test my contract using multiple machines. Only solution I found was to setup a private network using Geth and add peers. Following is the genesis ...
0
votes
1answer
51 views

Gas amount to store a contract?

i'm trying to run truffle migrate and it gives me always this error. Error: The contract code couldn't be stored, please check your gas amount. MBP-de-Alicia-2:smartContracts alicialombarte$ truffle ...
0
votes
2answers
59 views

I'm trying to create an app that allows people to exchange ether between themselves but I have the error: “web3.eth.transact is not a function”

<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <center> <title>dEnergy</title> </head> <body> <label for="name" ...
1
vote
2answers
50 views

How can i know my smart contract , compilar version.I cant verify my contract properly

I want to know compilar version of my smart contract.(https://i.stack.imgur.com/6K5sM.png)
0
votes
1answer
22 views

Sending Ether between two contracts not working

I am trying to transfer some Ether between two contracts but it is just not working for me. Here is my code: pragma solidity ^0.6.0; contract ContractA { uint public tips; /** * ...
0
votes
1answer
185 views

Transfer money between accounts in solidity

I am writing a contract where I want to transfer money (present in the contract owners account and not the contract) to an account address passed to a function in the contract. for some reason this ...
0
votes
2answers
67 views

Self-destributing token contract template

Self-destributing token contract template Hello, Are there any complete templates or resources for making a token which distributes itself when funds are sent to the contract? I. e. user sends 0.01 ...
0
votes
0answers
14 views

Issue Instantiating instance of a deployed smart contract. TypeError Should be marked Abstract

I'm having an issue using an instance of a deployed smart contract in my code. This could easily be me being a solidity novice, but perhaps some of you might be able to point out what I am missing. I ...
0
votes
1answer
25 views

Encode data into a single bytes variable using assembly

I'm currently testing a few things using the Solidity assembly. Basically, what I want to do is Pack several variables of different type together into one bytes array i.e. similar to what abi....
0
votes
1answer
53 views

Ganache Storage

I am trying to push data to an address array within a struct array. There are no errors, however, when I check the storage of the array in my contract in Ganache, it remains empty. Is there something ...
5
votes
0answers
26 views

Deploy gas issue for require reason string

I found a strange case and didn't find out why. ... modifier onlyMaster() { require(msg.sender == master || msg.sender == developer, "caller is not the master"); _; } ... ...
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 ...

15 30 50 per page
1
2 3 4 5
617