Raghav Sood
  • Member for 3 years, 10 months
  • Last seen more than a month ago
Syncing events on Database - Dealing with blockchain reorganization
Accepted answer
1 votes

If you want a reorganization free testnet, try Kovan. Ropsten is proof of work, and anyone who can point enough hashpower to it can rewrite the chain for a considerable number of blocks. Kovan is ...

View answer
How to view and access the smart contract deployed by some other node in the Private Network?
Accepted answer
1 votes

Contracts work the same way as they do in public ethereum networks. Once your contract deployment transaction is mined into a block, any node on the network can broadcast a transaction that interacts ...

View answer
All geth nodes getting the same enode id
1 votes

The enode is calculated based on the nodekey value. If all your nodes refer to the same datadir, or you bootstrapped multiple instances by copying the data dir, then they will have the same enode ID. ...

View answer
What has changed with admin.getPeer?
1 votes

A node generates a key known as the nodekey when it first starts up. This is an secp256k1, same as ethereum addresses. Previously, the enode URI was scheme://pubkey@ip:port. This was recently updated ...

View answer
Deploy contract - have total supply but no token holder and balance
Accepted answer
1 votes

Your contract works as expected. It is simply an etherscan indexing issue that prevents the information from showing. If you look up the balance of 0x40bd749d975349e6aaf310007d3ee00bcef5ebdd using ...

View answer
Warning: Using contract member "balance" inherited from the address type is deprecated. Convert the contract to "address" type to access the member
1 votes

this refers to the contract instance itself, which means it is of type contract. As of solidity 0.4.21, you need to cast this to type address to access the member functions of that type, such as ...

View answer
getting result of a method of smart contract that don't change any state variables
Accepted answer
1 votes

I imagine someone, somewhere, has written a web3 implementation for PHP, but regardless of that, you can do this via simple HTTP calls to a node, or a proxy such as infura. To read from a function, ...

View answer
what encryption does myetherwallet use?
1 votes

MyEtherWallet, like most ethereum wallets, follows the Secret Storage Definition. The result is a JSON file which contains the encrypted key, and the parameter definitions used in its encryption.

View answer
ICO functions & limitations
Accepted answer
1 votes

Yes, you can do this via the fallback function. If a contract is called with empty input data, or with a function signature that doesn't match any function on the contract, the fallback function is ...

View answer
Calling a function of another contract is not working properly?
Accepted answer
1 votes

Your second implementation of TrafficFine does not specify the return value. Try changing: function getOfficer(address officer) public; to: function getOfficer(address officer) public view returns ...

View answer
how do I make users sign different strings with their private key separatelly
1 votes

You can't. Metamask follows a 1 dialog, 1 signature system for users' security. If you want to perform actions like this, you will need to implement your own signed (web3 has direct support for it), ...

View answer
Can we modify ERC20 functions?
1 votes

If you do so, you will no longer be an ERC20 token. An ERC20 token must expose the defined methods with the exact same signatures. This means you cannot change the parameters or names. You can add ...

View answer
using Ethereum without any gas or coins usage for transactions
1 votes

However, I would like to know if I can use the platform without requiring the user's to buy Ether and submit their data for sharing / storage. Also note that, I am planning to try out building an ...

View answer
How to migrate ethereum based crypto currency to other (possibly own) blockchain?
1 votes

Usually, you hold some form of a coin swap. A rough way to go about this is as follows. Build a pause functionality into your ERC20 contract, and pause the contract on the swap date Have some method ...

View answer
Scope confusion using delegate call
Accepted answer
1 votes

To expand on Henk's answer, an important implementation detail is that the storage layout is also used from the calling contract. Since you declare testVar first, as far as CalledContract is ...

View answer
How Do I take a Snapshot and Migrate Token Holders to a new ERC20 Contract?
1 votes

There are two ways to go about it: Get all the Transfer, Mint, and Burn events for your contract Computer a user balance based on the credits and debits from the events for each address that holds ...

View answer
etherscan api token name and symbol not shown,is this bug for etherscan?
1 votes

This is not a bug. Etherscan will only show information such as the token name, symbol, total supply etc. if a token contract adheres to the ERC20 specification and provides that information using the ...

View answer
Remix: how is gas price determined?
1 votes

Remix in particularly uses ethgasstation.info, but many wallets such as metamask will use eth_gasPrice from the node they are connected to

View answer
Abi to call value
1 votes

solc will generate the ABI for you (as will remix and truffle) Just run solc --abi yourfile.sol. You can see a list of compiler options here.

View answer
Contract design by contract -> correctness and maximum gas consumption
1 votes

I fear that there may not be a fool-proof answer to this, for the simple reason that over the course of forks, gas costs can change for certain op codes (as was done to stop spam attacks some time ago)...

View answer
Generate / recover HD wallet with username/password only
1 votes

I could imagine running PBKDF2 on the password with username as salt and using that as an entropy for entropyToMnemonic() from bip39 - could that work? Sure, you could do this. The downside here is ...

View answer
Error encountered, bailing. Network state unknown. Review successful transactions manually. exceeds block gas limit
Accepted answer
1 votes

The ropsten gas limit is currently hovering around 4,700,000. It's unlikely that your contract actually needs that much to deploy, but since you specify 4867350 in your truffle.js, that is used as ...

View answer
Expose securely your network to make possible anyone can hit your smart contract
Accepted answer
1 votes

is this aproach secure? It is reasonably secure, yes. You shouldn't be facing any issues with having the standard node exposed. Is there another way to allow anyone in the world to use Metamask to ...

View answer
Sound but incorrect change in Merkle-tree
1 votes

For an example, let's take a very simply merkle tree, with four identical leafs, L. Our tree looks like: hash(A, A) / \ A = hash(L,L) A = ...

View answer
Implications/Impact Analysis of increasing the transaction size to 64KB in tx_pool.go to support bigger bytecodes deployment
Accepted answer
1 votes

The transaction size limits exist mainly to prevent denial of service attacks by filling up a node's txpool with huge transactions. They are not a consensus rule, and if you are able to survive such ...

View answer
Confirming sender identity read function call with MyEtherWallet.com
Accepted answer
1 votes

Modifiers like onlyOwner cannot be enforced on view or pure (or the deprecated constant) functions, since when reading from outside, any view-able data is public. A simple read operation does not ...

View answer
How does smart contract work in network
1 votes

When we deploy our contracts, does it mean that every node that belongs to the main ethereum network has access to it and must execute it? Correct, every node executes every transaction in a block, ...

View answer
How to generate a seed for multi-currency wallet?
1 votes

You're going about this in the wrong direction. You cannot construct arbitrary seeds from existing keys, nor can you add existing keys to an existing seed. A seed->address key process is one way, ...

View answer
When syncing, the current block is 6154852 and eth.blockNumber shows 0
1 votes

You are doing a fast sync, which is not complete until the entire state trie has been retrieved. This process takes a long longer than syncing the blocks themselves. As of July 29th, there 181,012,...

View answer
Function owned() is public
Accepted answer
1 votes

In this particular case, no. The contract is also called owned, so the function acts as the constructor. In recent versions of solidity, you should explicitly declare it as constructor() public {..} ...

View answer