Most Popular
1500 questions
12
votes
3 answers
Setting up a private PoA Clique network with puppeth
I would like to set-up a new private network using Clique as protocol with the help of puppeth.
When configuring the new Genesis block, this question is being asked:
Which accounts are allowed to seal? (mandatory at least one)
How can I specify an…
Bruno Grieder
- 656
- 1
- 7
- 19
12
votes
2 answers
Why does delete increase overall gas cost?
My understanding is there is a gas refund for delete and the idea is to encourage developers to remove garbage from contract states.
Consider this contract with a delete-enabled index of keys to mapped structs. The delete operations in…
Rob Hitchens
- 55,151
- 11
- 89
- 145
12
votes
1 answer
Ethereum signature verification not matching
What I want to achieve is sign a message and then verify the signature whether verified by same address or not.
Contract to Invoke ecrecover method to verify the address
contract MyAuth {
function verify( bytes32 hash, uint8 v, bytes32 r,…
Susmit
- 1,804
- 2
- 14
- 29
12
votes
14 answers
TypeError: Cannot read properties of undefined (reading 'JsonRpcProvider')
const ethers = require("ethers");
const provider = new ethers.providers.JsonRpcProvider('https://mainnet.infura.io/v3/MYKEYISHERE')
web3.eth.getBlockNumber().then(console.log)
Error:
const provider = new…
dertobiaszwei
- 123
- 1
- 1
- 5
12
votes
7 answers
Does giving enough zero knowledge proofs give knowledge?
Let's say I want to use a zero-knowledge proof to prove that I am older than 18 to vote, without revealing my age.
But then, let's say I give another one to prove that I can 'drink', and am older than 21.
And then, another proof that I'm older than…
Patrick Collins
- 11,186
- 5
- 44
- 97
12
votes
3 answers
Miner-modifiability of block timestamp after the Merge
Under proof of work, the Ethereum block interval varied, but miners could modify the block timestamp by +/-15 seconds, as long as the modified value was greater than the parent timestamp, without the block getting rejected.
Under proof of stake, the…
Luke Hutchison
- 420
- 3
- 11
12
votes
2 answers
Adding private network peers to Parity
If possible, I would like to use parity with my private ethereum network.
This answer (https://ethereum.stackexchange.com/a/9148/4575) provides us a solution that geth will run on the background and parity will pull information from geth.
[Q] Is it…
alper
- 8,395
- 11
- 63
- 152
12
votes
8 answers
ProviderError: Error: Transaction reverted: function selector was not recognized and there's no fallback function
I'm trying to call a function[propose] from Openzeppelin governor.sol. The function is like this...
function propose(
address[] memory targets,
uint256[] memory values,
bytes[] memory calldatas,
string memory…
Muhammed Adil
- 133
- 1
- 1
- 7
12
votes
4 answers
How do you configure geth to use coinbase?
I'm a novice. I'm looking for instructions on how to configure geth so it sends my mined eth to coinbase.
In my head, I think the process is:
Sync the blockchain
geth --datadir /data/ethData --autodag --verbosity 1
wait for it to finish. Get…
Albert T. Wong
- 241
- 1
- 2
- 5
12
votes
1 answer
How to call a library contract
library ECVerify is deployed on 0x3bbb367afe5075e0461f535d6ed2a640822edb1c on the Ropsten test net.
How do I call function ecverify(bytes32 hash, bytes sig, address signer) returns (bool) {} in that library contract from a contract foo.
cryptorenaisance
- 593
- 1
- 6
- 8
12
votes
1 answer
How to test if a struct state variable is set
I have the following struct defined as a state variable and conditionally set at runtime.
Transaction private tx;
struct Transaction {
address to;
uint value;
bytes data;
}
I would like to check if the variable was set before executing…
Oli
- 313
- 2
- 7
12
votes
2 answers
_mint vs _safeMint, which is best for ERC721?
Is there a relevant difference for an ER721 contract? Is there a difference in gas cost?
highrankin
- 183
- 2
- 7
12
votes
1 answer
parity Ropsten testnet forked at block 296151?
I am seeing what looks like a fork in the Ropsten testnet at block 296151 (Jan 6, 11:14 PM UTC). Is this expected?
My local Parity node (Parity/v1.4.7-beta-f2058bd-20161227/x86_64-macos/rustc1.13.0) shows block hash 0x779e9f9...:
>…
pyggie
- 558
- 5
- 10
12
votes
1 answer
How to generate a keystore (UTC) file from the raw private key?
If I have the plaintext private key, -how- can I generate a geth-compatible keystore file using Node.js?
I think I need to encrypt it using the scrypt algorithm by supplying a password, but I don't know how to do this. Any -preferrably…
jeff
- 2,550
- 2
- 18
- 40
12
votes
4 answers
hardhat mainnet forking and impersonating an account isnt working, help!
So I'm trying to fork the mainnet using hardhat, impersonate a Dai whale, and transfer its Dai to a hardhat wallet for testing a smart contract, but I'm running into problems.
My code looks like this:
hardhat.config network section:
hardhat: {
…
Nolan Jannotta
- 325
- 1
- 3
- 12