Most Popular
1500 questions
17
votes
3 answers
What's the proper way to wait for a transaction to be mined and get the results?
I'm using react to write the frontend for my dApp, and doing this to (attempt to) update react's state via an asynchronous sendTransaction call:
var thisJS = this
web3.eth.sendTransaction({from: adminAccount, to: contractAddress, value:…
glowkeeper
- 614
- 1
- 7
- 18
17
votes
1 answer
How does EIP 150 change the call depth attack?
It seems that EIP-150 introduced a more expensive gas based restriction on the call stack and completely removed the previous 1024 hard stack limit. Is this true? It seems it took cues from EIP-90 & EIP-114, but not entirely sure what was…
Simon de la Rouviere
- 1,224
- 10
- 18
17
votes
2 answers
Canceling / overwriting a pending transaction using geth JSON RPC
This is a private network
A transaction was sent to create a contract using the eth_sendTransaction RPC call.
The transaction is "removed" marked "will be removed" because it ran out of gas but remains in the pending state and miners keep trying to…
Bruno Grieder
- 656
- 1
- 7
- 19
17
votes
9 answers
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 returned a different chain ID: 0x539
Chidi Nkwocha
- 171
- 1
- 1
- 3
17
votes
2 answers
Accounts can't display incoming transactions
In Ethereum-Mist_wallet, Under accounts, I see:
Accounts can't display incoming transactions, but hold and send ether. To see incoming transactions create a wallet contract to store ether.
What does this exactly means? On my private network I am…
Prashant Prabhakar Singh
- 8,026
- 5
- 40
- 79
17
votes
2 answers
How to deploy contract with ether.js
I am trying to figure out the best way to deploy a contract using ethers.js
with web3 I can just do:
const contractInstance = new this.web3.eth.Contract(contractObject.abi)
var deployTx
debug(contractInstance)
if (params…
Lucas Rodriguez Benitez
- 551
- 1
- 4
- 16
17
votes
6 answers
Can a solidity compiler be written in solidity?
Can a solidity compiler be written in solidity? How much gas would it cost?
Fernando Tiberti
- 2,299
- 1
- 15
- 28
17
votes
1 answer
Passing an array as a parameter from javascrpt (web3) to a Solidity function
I have the following Solidity function:
function func(bytes32[2] data) external {
bytes32 x;
bytes32 y;
x = data[0];
y = data[1];
}
I'm trying to call it from Javascript (using web3), but passing an array a…
Eyal Ron
- 321
- 1
- 2
- 5
17
votes
4 answers
How get network ID with ethers.js?
Using web3js it is possible get network ID using the following method:
// Contract ABI Load
const ABISimpleStorage = require("./build/contracts/SimpleStorage.json");
// Besu Connection Web3 Load
let web3 = new Web3(
new…
brunillopu
- 333
- 1
- 3
- 8
17
votes
2 answers
How to make Ethereum mining difficulty static for a private chain?
I have implemented private chain in ethereum but its difficulty level increases by time as a result the mining process slows down. Is it possible to make the difficulty static or disable it in testnet.
Abhishek Ranjan
- 455
- 4
- 12
17
votes
3 answers
How to use bignumbers in truffle tests?
I am testing a smartcontract with Truffle V5. All works well if I do not use all decimals. If I set 18 decimals all explodes. The test code is this (from truffle docs):
const MetaCoin = artifacts.require("MetaCoin");
contract("2nd MetaCoin test",…
PragMan
- 173
- 1
- 1
- 6
17
votes
2 answers
Return a mapping in a getAll function
pragma solidity ^0.4.24;
contract User {
mapping(uint=>address) addresses;
uint addressRegistryCount;
function set(address userAddress) public {
addresses[addressRegistryCount] = userAddress;
addressRegistryCount++;
…
UnexpectedCharacter
- 852
- 1
- 11
- 30
17
votes
2 answers
calldata keyword as parameter in solidity v0.5.0 function?
What purpose does the "calldata" serve in this parameter _owners? Is it a new keyword?
function setup(address[] calldata _owners, uint256 _threshold, address to, bytes calldata data)
Taken from Gnosis Safe Contract - GnosisSafe.sol
Lul Bai
- 191
- 1
- 1
- 5
17
votes
4 answers
What is the maximum value an int and uint can store
I need to understand a couple of things:
What is the maximum value an int and uint can store?
Are the maximum values stored in int and uint the same?
iappmaker
- 813
- 2
- 11
- 26
17
votes
3 answers
Why do we need both nonce and mixhash values in a block?
Looking over the sample genesis blocks, I notice that both nonce and mixhash values can be assigned independent values. Reading the yellow paper it's mentioned that:
mixhash: is a 256 - bit hash which proves combined with the nonce that a…
Sebi
- 5,294
- 6
- 27
- 52