Most Popular
1500 questions
35
votes
2 answers
List of pre-compiled contracts
Where can I find an authoritative/"official" listing of the pre-compiled contracts currently on the Ethereum network, along with their exact specifications? I couldn't find anything in the official documentation, but maybe I'm looking in the wrong…
Eugene Osovetsky
- 493
- 1
- 4
- 6
35
votes
3 answers
What is the distinction between libp2p, devp2p and RLPx?
What is the distinction between libp2p and devp2p? Do they refer to the same thing? How are they related to RLPx?
In the libp2p whitepaper, dated Nov 2014, they appear to be the same thing:
libp2p (aka ÐΞVp2p) aims to provide a lightweight…
Lee
- 8,548
- 6
- 46
- 80
35
votes
1 answer
How to update a deployed smart contract?
I've started developing smart contracts with Truffle and when I edit a contract I always redeploy it by adding another migration script. There are two things that I wonder about:
Is this the way it should be done, or is there a better way?
When I…
kramer65
- 655
- 1
- 6
- 11
35
votes
2 answers
How do Ethereum's transaction fees compare to Bitcoin?
Ethereum has faster transactions than the 10 minutes of standard bitcoin protocol.
How do the transaction fees compare at the moment if you translate the price into a comparable currency like dollars or euros?
Long-term how are they likely to…
Christian
- 753
- 1
- 7
- 11
34
votes
4 answers
Contract should be marked as abstract
I'm getting the error:
Contract "StarNotary" should be marked as abstract.
pragma solidity >=0.4.24;
import "../node_modules/@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract StarNotary is ERC721 {
struct Star {
string…
Kevvv
- 797
- 1
- 7
- 18
34
votes
2 answers
What is the difference between bytecode, init code, deployed bytecode, creation bytecode, and runtime bytecode?
I constantly see different types of bytecode and do not know what each of them are. What are the differences between bytecode, init code, deployed bytecode, creation bytecode, and runtime bytecode?
Shane Fontaine
- 18,036
- 20
- 54
- 82
34
votes
3 answers
How can I get a mnemonic phrase from a private key?
I have a private key for my wallet and also a keystore for it. I want to use it in MEWConnect. Is there a way to get a mnemonic phrase from a private key?
Incrediblez7
- 453
- 1
- 4
- 10
34
votes
8 answers
Smart Contract Error: Returned values aren't valid, did it run Out of Gas?
Deployed a contract using Remix IDE to Rinkeby testnet.
Etherscan contract address and code is here.
contract SimpleCounter {
int counter;
constructor() public {
counter = 0;
}
function getCounter() public view returns…
RafiAlhamd
- 755
- 1
- 6
- 13
34
votes
7 answers
how to catch "revert" error in truffle test javascript?
How can I catch "revert" error in truffle test written in javascript?
Error: VM Exception while processing transaction: revert
Here is part of test contract,
function doRevert() public {
revert();
}
and here is my part of test javascript,…
Kronos
- 896
- 1
- 10
- 21
34
votes
2 answers
Remix warnings - state mutability and public visibility
I noticed the new Remix gave me two new warnings:
browser/Untitled.sol:6:5: Warning: No visibility specified. Defaulting to "public".
function setFee(uint _fee){
^
Spanning multiple lines.
and
browser/Untitled.sol:15:3: Warning: Function…
thefett
- 3,873
- 5
- 26
- 48
34
votes
7 answers
How to store IPFS hash using bytes32?
Following Q/A (What datatype should I use for an IPFS address hash?) recommend us to use bytes to store IPFS hash.
I was using following example(https://github.com/AdrianClv/ethereum-ipfs/blob/master/NotSoSimpleStorage.sol), which uses string to…
alper
- 8,395
- 11
- 63
- 152
34
votes
2 answers
Solidity inherited constructors and calling the parent constructor
I'm trying to inherit from a contract. I'm expecting the child contract to have the same constructor as the parent (or be overwritten)
pragma solidity ^0.4.2;
contract parent{
string public name;
function parent(string _name){
…
user1938620
- 681
- 1
- 6
- 12
34
votes
6 answers
How do I specify a different Solidity version in a Truffle contract?
I've got a contract where I want to use .transfer(), which was released in the latest Solidity version 0.4.10.
I have as the first line of my contract: pragma solidity 0.4.10; but when I compile I get Error: Source file requires different…
JohnAllen
- 1,318
- 1
- 13
- 29
34
votes
6 answers
ecrecover from Geth and web3.eth.sign
I have tried to use ecrecover() to verify the signature of a message.
I have looked at lots of references here and elsewhere, like:
https://lab-blog.ey.com/2016/12/19/ecrecover/
How does one properly use ecrecover to verify Ethereum…
Daniel Mermelstein
- 575
- 1
- 5
- 13
33
votes
3 answers
How does Mapping in solidity work?
I went through the Crowdfunding example in solidity where i encountered the following:
contract Crowdfunding {
struct CampaignData {
address recipient;
uint contributed;
uint goal;
uint deadline;
uint num_contributions;
…
Rahul Sharma
- 1,303
- 2
- 16
- 24