All Questions

2
votes
1answer
64 views

Rolling a die at some point in the future

This question has been asked previously by someone else but the answers weren't quite sufficient. I want to write a simple contract that will yield an immutable 'random' number after a period of time....
0
votes
2answers
13 views

Unable to fetch output from a public function in solidity

I am writing a solidity public function that changes the value of state variable and then returns it. pragma solidity >=0.4.22 <0.6.0; contract white_label { uint currentId = 1; ...
0
votes
0answers
9 views

Encrypt and anonymize communication

I want to anonymize the communication between participants (communication = exchange of data, not currency). This should have the effect that two participants send messages to each others but now ...
0
votes
1answer
34 views

why several Draw event logs when there is actually one?

I'm looking into the event logs of makerdao's CDP operation, and I'm confused why there are several event logs for 1 cdp operation, like this tx: https://etherscan.io/tx/...
0
votes
1answer
21 views

how to deal with large numbers in Ethereum?

I am confused with the use of large numbers in solidity, ethereum. I have some doubts please help me with them. 1) I am not able to represent the value of p using p.toNumber() but can represent it ...
-3
votes
0answers
20 views

Send Eth to other coin adress by mistake on poloniex and they not help me [duplicate]

hello everyone i send 2 eth to my poloniex account but by mistake my 2 eth goes to loom coin adress but poloniex use cotract to deposit thats why my 2 eth goes to their main account via contract i am ...
1
vote
1answer
18 views

eth-crypto: How can I use the library in the browser?

Has anyone manage to use eth-crypto in the browser? I tried to use browserify but I failed. Any hints, what to do? EDIT: This is what I did (node:10.15.1/npm:6.4.1) 1) Installed eth-crypto (v1.3.2))...
3
votes
1answer
26 views

What is the username / node ID in an enode URL?

Looking at https://github.com/ethereum/wiki/wiki/enode-url-format and https://github.com/ethereum/go-ethereum/wiki/Connecting-to-the-network I can see that the enode URL includes some information ...
2
votes
0answers
12 views

What is the methodID for SafeMath function when SafeMath library is referenced internally?

For the contract below contract Example { using SafeMath for uint256; uint256 internal _amount; function example(uint256 amount) external { _amount = _amount.add(amount);...
0
votes
0answers
5 views

Truffle Console detecting a single key press as multiple key presses

So I have installed truffle using: npm install truffle -g, now when running the truffle console some of the key presses are being detected as two key presses for example, pressing up to load the last ...
0
votes
0answers
9 views

TypeError: web3_eth_personal__WEBPACK_IMPORTED_MODULE_0___default.a is not a constructor

I have an application using truffle and webpack. When I run npm run server ( server's definition in package.json is : "server": "concurrently 'webpack --mode development --watch' 'wait-on build/...
0
votes
1answer
24 views

Private Ethereum nodes crash after 2-3 hours

Some background: I setup private Ethereum nodes on my local docker system and built some modules that use the web3 Ethereum client to exercise these nodes. I've been testing on it for the last 3-4 ...
2
votes
1answer
22 views

How to create and compare a 32 byte hash of a string in solidity 0.5

I simply want to create a 32 byte hash of a string and compare equality to another one, but this is proving almost impossible for some reason. E.g: hash("a") == hash("b") My compiler throws errors ...
1
vote
0answers
18 views

What are the Minimum Requirements for a Quroum node?

I am planning to run a Quorum (Ethereum fork) blockchain on my business. I was wondering if quorum node will run on a Raspberry Pi 3 Model B+. Raspberri Specs: Broadcom BCM2837B0, Cortex-A53 (ARMv8)...
0
votes
1answer
12 views

MetaMask repeated errors with LocalHost

Every time I try to send ETH to my locally deployed contract I get errors like this: -While the error message says "out of gas" I know that can't be true since all my accounts have like 100ETH in ...
1
vote
0answers
11 views

How to mine a Empty Block or reject transaction?

How Can a miner can mine a empty block,reject honest transactions to be added into block ; does it mean we could tweak the miner client , if yes could someone tell how it is done and what are the ...
0
votes
0answers
12 views

How to accept tokens coming to my contract address and withdraw it on my Owner address in ERC223 token standard smart contract?

I want to withdraw tokens which are coming from different contract addresses, on my Owner address. I am working on ERC223 token standard and solidity version 0.5.1;
0
votes
2answers
17 views

How to handle real-time data in dapps? [closed]

Am not sure how to store location data in a real-time location tracking in dapps. Storing these data in blockchain is not instantaneous and we don't need that data after a while. Any ideas on how to ...
0
votes
1answer
22 views

Is the following scenario doable by a smart contract?

I have 2 persons ( say A or B). They want to have the following agreement. Person ‘A’ specify a deposit (x coins ) for user ‘B’ under a certain condition with a future time lock ‘t’. If user ‘B’ ...
0
votes
1answer
16 views

Can smart contract reference its own state variables to make branching decisions?

I have to apologize for not being very familiar with solidity or the EVM ahead of time. Say that in the contract there are several state variables, a, b, c. It would seem like that if I wrote a ...
1
vote
1answer
23 views

Is there any simple explanation to multisig wallets?

I read on ConsenSys and Ethereum MultiSigWallet. I got that "The purpose of multisig wallets is to increase security by requiring multiple parties to agree on transactions before execution. ...
2
votes
1answer
16 views

Passing in an array of complex structs

I am wondering what pattern I am supposed to follow in Solidity to take in an array of structs as a parameter. I am translating code from CPP and mostly everything translates directly besides this (...
0
votes
1answer
13 views

How to prevent someone running a transaction before me?

Let's say I have the following in my smart contract: string passwordHash; uint money; function checkPassword(string cleanPassword, string newPasswordHash)[...] When running the function ...
0
votes
1answer
40 views

How to get require() to accept decimal value of ether in payable functions in Solidity?

On using, require(msg.value == registerFeeMap[msg.sender] /_currentRate) (fractional ETH value calculated) require(msg.value == registerFeeMap[msg.sender]*10**18/ _currentRate) (ETH converted to ...
1
vote
0answers
9 views

Javascript library to use zkSnark circuit

I would like to generate the proofs for zkSnarks on client side and therefore would need a library in javascript that helps to read a circuit and generate proofs. I found one combination here which ...
1
vote
1answer
15 views

ENS Domains and new receive addresses for privacy

Currently I use a new receive addresses every time I receive ETH - Ledger Live creates new receive addresses by default when an address has been 'used' as this is good practice in terms of privacy. ...
1
vote
0answers
23 views

How to get the returned value of a smart contract function when it called by using cacheSend() in drizzle

I just tried to build a simple DApp using truffle, react and drizzle. My question is how to get the returned value of a smart contract function when it called by using cacheSend() in drizzle? As ...
0
votes
1answer
17 views

Is it possible to put tax lien certificates on the blockchain?

Tax lien certificates are investment vehicles issued by a county taxing authority secured by unpaid tax liens on property. Is it possible to put these assets onto the blockchain so they can be traded ...
1
vote
1answer
17 views

How are transactions ordered in POS?

With POW, the miners who finds the block chooses the order of transactions in that block. How will this work with POS?
1
vote
2answers
25 views

Why I can not trade coins stored in cold wallet?

There are two kinds of wallet hot wallet and a cold wallet. Ideally, people keep minimum balance for trading in a hot wallet and most of the coins are stored in cold wallet. I am wondering why coins ...
0
votes
1answer
21 views

Is every node connected to all other nodes?

In ethereum network, does every node has to be connected to each and every other node in the network? Or for syncing, they just connect to any random node?
0
votes
1answer
19 views

How network hashrate is being calculated? [duplicate]

Hashrate The number of attempts that miner makes per second is known as the hash rate or hash power. Network's hashrate It is the most important data point in blockchain tech. ... Essentially, the ...
0
votes
0answers
22 views

DApps using Ethereum and Web3 js

I am writing very basic sample contract to get the name of instructor on browser using Ganache. Contract looks fine but web3.js page is not responding . Contract code : pragma solidity ^0.5.0; ...
0
votes
0answers
15 views

very basic sample code for set/get name in printing on web3 js page using Ganache [closed]

do anyone have very basic sample code for set/get name in printing on web3 js page using Ganache
1
vote
2answers
23 views

Average calculation error

I have this contract that calculate average pragma solidity ^0.4.24; contract test{ uint average; uint counter; function calcAverage( uint _newValue) public { average = ((average * counter) + ...
0
votes
1answer
25 views

How to get result from contract function called through web3 using sendTransaction

I use the following to call a solidity contract function in nodejs(v10.14.2) + web3(v0.20.7) + ganache(v1.2.3): contract.getItemCount(function(err1,result1){ console.log(result1); } result1(...
2
votes
1answer
21 views

Could the Oraclize _callback function be run twice by the same query?

An example _callback function from Oraclize: function __callback(bytes32 _queryId, string _result, bytes _proof) { if (msg.sender != oraclize_cbAddress()) throw; if (...
0
votes
1answer
22 views

Remix vs Truffle project in VSCode [closed]

I do this post to ask your methodologies and customs when developing smart contracts. Between Remix + Ganache and Truffle Project + Ganache. What is more comfortable for you? Why is one better than ...
0
votes
1answer
34 views

How to start auditing smart contract?

I want to become a smart contract auditor. I will report all the vulnerabilities which I have explored while auditing smart contracts. Is there any platform available to learn how to audit smart ...
0
votes
1answer
14 views

If Address and private key doesn't get stored in Ethereum,then how will it validate users?

I think in a normal database,the username and password gets stored in the database and when a user enters his/her credentials,it checks with the content in the database to know his/her Authenticity. ...
0
votes
0answers
45 views

How can I create a new public blockchain by cloning go-ethereum? [duplicate]

I want to clone Go version of Ethereum to make a new public blockchain. I just want to make small changes like: (1) Change the difficulty value. (2) Change the maximum gas limit. (3) I want to set ...
1
vote
1answer
37 views

Type contract is not implicitly convertible to expected type address

what is the wrong with this function i can't get the address of LenderRegistration contract mapping (address=>address) lendersToContracts; function lenderRegister(uint256 ...
0
votes
1answer
27 views

DeployError: Provided address is invalid,the capitalization checksum test failed,or its an indrect IBAN address which can't be converted

I have the following code: var account = web3.utils.toChecksumAddress("0x249eb..") const accounts = await web3.eth.getAccounts(); let Contr = new web3.eth.Contract(abi, {from: account, gas: 47000, ...
0
votes
0answers
30 views

Web3 is injecting but stilling getting an invalid provider error

I'm injecting web3 with MetaMask, and everything works, but when I make a production build, I notice that it injects web3 alright, but when I try to call a web3 function, it throws `Please provide an ...
2
votes
1answer
50 views

Why do truffle compile or migrate commands fail silently?

Truffle v5.0.3 config: truffle-config.js module.exports = { // See <http://truffleframework.com/docs/advanced/configuration> networks: { development: { host: "127.0.0.1", //also ...
2
votes
1answer
33 views

Recovering address (web3.eth.accounts.recover) does not return the address of message signer

I am writing a test for a function in my smart contract which attempts to verify that a message comes from the signer. I'm currently using web3.eth.accounts.sign to sign my message with the sender ...
1
vote
0answers
11 views

Error deploying the subgraph: Internal error: Could not pick index node

I'm playing with "The Graph" example counter project. If all I do is change the contract address in the mapping.ts to the same Counter contract on Rinkeby, then try to deploy, I get this error: ...
0
votes
0answers
14 views

conversion of BTH address needed [closed]

i want to send bithereum BTH from desktop GUARDA wallet to my MEW wallet. addresses in guarda are short, capitalized and start for example with BB.... but the address in MEW is long, not capitalized ...
0
votes
1answer
35 views

Send Transaction to smart contract using web3 ^1.0.0-beta.41 throws parsing error

I want to send to smart contract using this code : this.myContract.methods.addData(declaration).send({ from: '0x3b0282D31174B927e102bA71d80dF34F4e596Fc4', gas: 12000 ...
1
vote
1answer
22 views

How to import files into remix (ERC721 contract)?

I get this error - Unable to import "undefined": Not Found And this flashes onto the screen - Loading https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/introspection/...

15 30 50 per page