Most Popular
1500 questions
43
votes
6 answers
Create and sign OFFLINE raw transactions?
I'm looking to create a raw transaction, sign it, and broadcast it using the eth.sendRawTransaction RPC method.
I would like to do this offline using code or an open-source library OR online but without the need of using an specific wallet or…
Nico
- 797
- 1
- 8
- 10
43
votes
6 answers
Truffle Migrate doesn't work: Error: No network specified. Cannot determine current network
When I try to run my migration with truffle migrate the following error message appears:
Error: No network specified. Cannot determine current network.
at Object.detect (/usr/local/lib/node_modules/truffle/build/cli.bundled.js:43157:23)
at…
user1491307
- 1,221
- 1
- 9
- 11
43
votes
4 answers
What happens when a transaction nonce is too high?
From Design Rationale:
One weakness of the account paradigm is that in order to prevent replay attacks, every transaction must have a "nonce", such that the account keeps track of the nonces used and only accepts a transaction if its nonce is 1…
BokkyPooBah
- 40,274
- 14
- 123
- 193
43
votes
3 answers
What are the limitations to estimateGas and when would its estimate be considerably wrong?
web3.eth.estimateGas and JSON-RPC estimateGas can be used to see how much gas should be specified for a transaction, before crafting the transaction.
Since it is an estimate, are there any limitations to it? What cases should its use be relied upon…
eth
- 85,679
- 53
- 285
- 406
43
votes
1 answer
Where is the private key for a contract stored?
This is a question that I am asked often by developers who assume that a contract has a private key of its own to sign any transactions that it makes.
J-B
- 8,941
- 16
- 46
- 77
42
votes
3 answers
I see no way to obtain the return value of a non-view function (ethers.js)
In a Buidler/Hardhat test I have:
const { expect } = require("chai");
describe("SumOfTokens", function() {
it("Checks correct transfers", async function() {
const SumOfTokens = await ethers.getContractFactory("SumOfTokens");
const…
porton
- 1,774
- 5
- 17
- 38
42
votes
4 answers
How to listen to contract events using ethers.js?
I need to listen to the specific contract events and do some task once the event is emitted. I didn't find proper docs on ethers.js documentation.
Can anybody tell me how can I keep listening to my contract events using ethers.js?
MYANZIK shrestha
- 788
- 1
- 7
- 14
42
votes
2 answers
Do contracts also have a nonce?
Do contracts also have a nonce and if so how is it calculated? Usual accounts have a nonce that is increased with every transaction. However, contracts can't make transactions, they can only make calls that are triggered by transactions.
But…
mKoeppelmann
- 7,616
- 8
- 36
- 48
42
votes
4 answers
zk-SNARKs vs. Zk-STARKs vs. BulletProofs? (Updated)
zk-SNARKs, Zk-STARKs and BulletProofs are three major zero knowledge proofs to provide privacy for the blockchain technology.
If we can compare them,
(1) Bulletproofs and Zk-STARKs require no trusted setup.
Unlike zk-SNARKs that requires a…
Questioner
- 2,670
- 2
- 33
- 62
42
votes
3 answers
Why is ether divisible to 18 decimal places?
1 ether is 10^18 wei, the smallest denomination. Why does ether have such a high degree of divisibility?
J-B
- 8,941
- 16
- 46
- 77
42
votes
4 answers
Is it possible to cancel a transaction?
Is it possible to cancel a transaction after it has been broadcasted, but before it has been mined?
This could be useful on sending an erroneous transaction containing invalid data.
Shuzheng
- 1,855
- 3
- 19
- 31
42
votes
7 answers
How does a contract find out if another address is a contract?
Is it possible, from within a contract written in Solidity, to check if a contract is placed on a specific address or if this address does not contain any code?
Thorkil Værge
- 4,220
- 2
- 16
- 38
42
votes
4 answers
How do oracle services work under the hood?
I have read many questions about oracle services, but I do not understand how they work.
Often I read answers like this: https://ethereum.stackexchange.com/a/9825/5892
Smart contract can not access an external environment...
But how do "Oraclize"…
Artem
- 687
- 1
- 5
- 12
42
votes
1 answer
How does the Keccak256 hash function work?
As the Ethereum platform relies on the Keccak256 hash algorithm, I'd like to get a better understanding of it.
My rough understanding is something like this:
a function accepting a finite set of bits into a giant imaginary rubik's cube which is…
Lee
- 8,548
- 6
- 46
- 80
42
votes
6 answers
How to check my sync status on Geth 1.5.5, Raspberry Pi 3
Have a Geth 1.5.5 node running on a raspberry pi 3. When I type in
sudo systemctl status geth
I'll get ever changing time and block information. Neat, but how do I know when I am synced up? Is there another sudo command I should do?
Arthur D. Howland
- 1,111
- 1
- 8
- 6