Most Popular

1500 questions
10
votes
2 answers

How can i transfer ERC20 tokens from a contract to an user account?

I have deployed an ERC20 token (contract A) and the tokens are being used for a service in my other contract (Contract B). I can easily transfer tokens from an user owned account(EOA) to Contract B after i call approve on the token Contract A to…
tushalien
  • 123
  • 1
  • 1
  • 5
10
votes
1 answer

How to convert BN result into readable string or number in ethjs?

I'm receiving the result in BN format. How can I convert it into actual string or number? I'm using ethjs library to interact with Smart Contract. token.totalSupply().then((totalSupply) => { // result 4500000 });
Sowmay Jain
  • 794
  • 1
  • 10
  • 25
10
votes
1 answer

Is it dangerous to name my function ccccvKygDv?

For those keeping track at home, the function hash of a function named ccccvKygDv() is 0xffffffff, the same as a null address. pragma solidity ^0.4.0; contract NullFunction { function ccccvKygDv() public pure { } } contract NormalFunction { …
Hooked
  • 412
  • 1
  • 3
  • 10
10
votes
1 answer

How can I configure Ethereum to run over Tor or I2P

If Tor or I2P support is not yet practical, is there a guide of best practices to help protect IP and other metadata?
cooldude45
  • 375
  • 1
  • 5
10
votes
2 answers

What does msg.sender.call() do in Solidity?

Hi was going through solidity documentation. There was some code that I was not able to understand, even after researching a lot I was not able to find some satisfactory output. The code is as under: contract Mutex { bool locked; modifier…
Thinker
  • 837
  • 2
  • 10
  • 14
10
votes
2 answers

How Do I Update A Struct Property in Solidity

I am trying to update the value of one of the props in a struct in a solidity contract. updating a variable works fine if it is not in a struct. but when i try to update a value in a struct like in the contract below, gas is used to update the…
X0r0N
  • 364
  • 1
  • 5
  • 17
10
votes
1 answer

How should I secure a private key in my dapp?

We are currently building an app that interacts with the blockchain. It needs to be able to make transactions on the blockchain on it's own - for instance to add addresses to a whitelist. This means that it needs to have access to a private key that…
karianneberg
  • 564
  • 6
  • 15
10
votes
1 answer

How much gas does an ERC20 transfer cost?

ERC20 is an interface and not a contract definition. And since gas is paid for each executed machine instruction, it is not possible to specify precisely how much a call to transfer costs for an ERC20 contract. This will depend on how the ERC20…
Thorkil Værge
  • 4,220
  • 2
  • 16
  • 38
10
votes
4 answers

API to gather list of top token holders

I working on a Ethereum project and I would like to gather a list of top X (20 for example) Ethereum accounts. This would behave similar to etherscan.io (https://etherscan.io/accounts) Is there an API that does this ? If not does anyone know of a…
Rstack
  • 103
  • 1
  • 1
  • 5
10
votes
4 answers

How can I configure Mist to use a non-default IPC path?

When using Mist, it always uses the default IPC path to my OS (In this case of OSX this is /Users/me/Library/Ethereum/geth.ipc). Is there a way to configure or specify a non-default IPC path for Mist? This would allow me to separate mainnet and…
J-B
  • 8,941
  • 16
  • 46
  • 77
10
votes
2 answers

Preventing Ether getting trapped in Smart Contracts

Since contract code can possibly live forever once deployed, what are some best practices or patterns to use in Smart Contract development to prevent the potential for unintended loss of Ether or loss of owner control of the contract? For example,…
dbryson
  • 6,403
  • 2
  • 27
  • 37
10
votes
1 answer

Where is the updated Ethereum roadmap?

Googling "Ethereum Roadmap" just brings up outdated blog posts. Where can i find the current, updated roadmap?
ripper234
  • 685
  • 6
  • 17
10
votes
3 answers

What does it really mean to burn tokens?

I don't quite understand what it really means to burn tokens. Since the blockchain is immutable, there should be no way to delete the record. Thus, in my understanding, to burn the token merely means to send it to the address without the private…
sflow
  • 373
  • 1
  • 4
  • 12
10
votes
2 answers

How do I connect the geth console to an INFURA endpoint?

Rather than have a local node on my PC, I'd like to be able to attach the geth cli console to INFURA and then issue requests within geth's java console, e.g. web3.eth.getBalance(
) I signed up for INFURA and received an email with some…
user2061575
  • 153
  • 2
  • 6
10
votes
4 answers

Are failed transactions included in the blockchain?

When a transaction that executes a smart contract fails (maybe for an exception or require rule), is the transaction propagated to the network and included in the blockchain? If yes, what would be the reason for that?
Ahmad
  • 275
  • 2
  • 9