Most Popular
1500 questions
21
votes
3 answers
Can I set the gas price to whatever I want?
The default gas price is 0.02e12 Wei. But while creating transactions on the command line or Geth's Javascript console you can define your own gasPrice:
web3.eth.sendTransaction({/* ... */, gasPrice: 123456789});
In Mist browser based Ethereum…
q9f
- 32,913
- 47
- 156
- 395
20
votes
3 answers
How can DApp developers profit from their work?
Suppose that I make a new, cool DApp that gets very popular. In order to cover development costs and make some profit, I charge users of the app a small quantity which is required to use to app - all dealt by the contract, automatically. But, since…
MaiaVictor
- 3,177
- 2
- 17
- 37
20
votes
7 answers
How to get ETH contract balance with Ethers.js
I am trying to get the ETH balance of a contract:
const balance = await contract.getBalance();
but it fails:
TypeError: contract.getBalance is not a function
What I do wrong and how to fix the error?
porton
- 1,774
- 5
- 17
- 38
20
votes
2 answers
Is transfer() still safe after the Istanbul update?
In other words, is using transfer() safe?
function transfer(address contractB) public
{
contractB.transfer(1000);
//balances[msg.sender] -= 1000;
}
How about using call.gas?
function transfer2(address receiver) public
{
…
Robert Ggg
- 469
- 5
- 13
20
votes
8 answers
Question on the terms 'distributed' and 'decentralised'
I am writing a paper on distributed ledger technologies, an umbrella term I have borrowed to put everything that has any relation to blockchains and distributed consensus. Under this umbrella term I am discussing primarily bitcoin, Ethereum,…
pn7a
- 303
- 1
- 2
- 6
20
votes
1 answer
Are gas limit in transaction and block gas limit different?
What does gas limit mean?
Are there two meanings of gas limit?
gas limit in a transaction
block gas limit
Satoshi Nakanishi
- 5,749
- 7
- 38
- 57
20
votes
1 answer
What is the difference between transaction and message?
What is the definition of a transaction and a message in Ethereum?
How are they different?
Satoshi Nakanishi
- 5,749
- 7
- 38
- 57
20
votes
2 answers
Truffle vs Embark
Truffle Embark Can anyone explain the characteristics of, and differences between, the two frameworks?
BlockA
- 857
- 2
- 7
- 15
20
votes
2 answers
Algebra symbology guidance for Ethereum Yellow Paper
There are numerate people who have limited experience in interpreting the algebra used in computer science papers. Therefore, it would be most useful if there were a list of all algebraic symbols used in the Yellow Paper, along with their definition…
Lee
- 8,548
- 6
- 46
- 80
20
votes
5 answers
How to convert from Wei to Ether in React?
In React, I use a Web3js call function to get a value. The returned value is in Wei. However, I want to render it in Ethers. What would be the best way to do it?
Ruham
- 963
- 2
- 12
- 34
20
votes
3 answers
Can you inherit from a contract already deployed to the blockchain?
So instead of doing something like:
contract Parent {
...
}
contract Child is Parent {
...
}
Can the Parent be declared referencing an already deployed contract?
contract Parent = 0x123123123...
contract Child is Parent {
...
}
Fernando Tiberti
- 2,299
- 1
- 15
- 28
20
votes
4 answers
How to properly create a raw transaction and sign it using web3 in browser
I want to create and sign a transaction in browser using web3. In order to create a raw transaction, I think I have to do something like this (hopefully you can fill the gaps of my knowledge)
var pk =…
S1r_Mar71n
- 347
- 1
- 2
- 8
20
votes
3 answers
What are some examples of how inline assembly benefits smart contract development?
A lot of people have expressed excitement at the potential of using inline assembly in smart contracts. After seeing this comment on reddit I'm curious to see some basic (and more advanced, if you like) examples of how inline assembly may be used to…
Joël
- 1,720
- 2
- 17
- 35
20
votes
4 answers
Should the constructor function be public?
In all the tutorials I'm watching nobody specifies public, but remix presents warnings that function visibility has not been specified, and public is assumed.
Since I don't like warnings if possible, I am specifying public where necessary, but I…
urbanespaceman
- 323
- 1
- 2
- 9
20
votes
2 answers
Getting ABI data for ERC20 tokens programatically with Web3
I am just starting to dive into Web3. I am trying to display the various ERC20 token values for a given Ethereum Address.
The pieces I need to do this are:
Token Contract Address
Token Contract ABI
Are there any programmatic ways to get the…
Shawn Tabrizi
- 8,008
- 4
- 19
- 38