Raghav Sood
  • Member for 3 years, 8 months
  • Last seen more than a week ago
2 answers
1 votes
201 views
Sending hundreds of signed transactions with web3js which succeed but can only find a couple on Etherscan
2 votes

As long as your nonces are sequential and do not skip, your transactions will be mined eventually. Etherscan will prioritize indexing immediate pending transactions, and show transactions that are ...

View answer
1 answers
1 votes
1k views
Golang binding - call contract method and get its return value or tuple?
Accepted answer
2 votes

type.Transaction is a transaction type. When you call a contract using the code generated via abigen, signing and broadcasting is handled for you, using the key details specified in your session. The ...

View answer
2 answers
2 votes
13k views
Transaction reverted during contract execution [Reverted]
Accepted answer
2 votes

It looks like when buy() runs, it invokes token.buyTokens(). buyTokens() in turn calls transfer(). The vast majority of transfer functions check user balances before transferring, so I'm assuming ...

View answer
1 answers
0 votes
289 views
Intializing ERC20 token using payable constructor from another function of different contract
2 votes

By default, when you call new REP(), msg.value is not passed through, since the msg changes to the contract deployment. You need to pass value explicitly, as described in this section of the ...

View answer
2 answers
2 votes
119 views
Transaction rolled back and re-mined later?
2 votes

This is normal in the event of a chain reorganization. Blocks can be rolled back if newer blocks with more work appear (basically, if your chain is at block N, and someone broadcasts block N+1 with a ...

View answer
2 answers
1 votes
227 views
What is the size of byte code stored in the EVM?
2 votes

I mean the approx average value of it or bytecode of a simple hello world program (setting and getting a string). I'm not aware of anyone tracking these statistic, you will have to compute them ...

View answer
1 answers
0 votes
250 views
Send accurate ERC 20 custom token
Accepted answer
2 votes

0x44 is 68 in decimals. Moreover, your token has 18 decimals. This means that to send one unit of a token, you need to send 1 * 10^18. Remember, there are no decimals on ethereum, and everything is ...

View answer
3 answers
1 votes
704 views
how do you check if the account exists in current state?
2 votes

This is a somewhat roundabout way to achieve what you want, but I don't believe there is a direct one. An account will exist in the state trie if it has a non-zero balance (such as an externally ...

View answer
1 answers
0 votes
62 views
How do I solve/get around this 'Gas estimation failed' error in my smart contract?
2 votes

This fails because your array has a size of zero, so trying to assign members[totalMembers] will cause a revert. Either use a mapping of uint to address, use members.push() to append to the array and ...

View answer
1 answers
3 votes
549 views
Trace transaction with Go client
Accepted answer
2 votes

Transaction tracing is not exposed via ethclient. You must connect over the regular rpc and invoke it as a regular call. The reasoning for that is given here.

View answer
1 answers
2 votes
862 views
find & download all smart contracts deployed?
2 votes

is there any existing tools that can find & download all smart contracts deployed on Ethereum blockchain, regardless they have source code or not? There is no such tool. if there is no such a ...

View answer
1 answers
1 votes
308 views
Can I emit event in function modifier?
Accepted answer
2 votes

Yes, this is legal and works just fine. Here's a quick sample contract I used to test it: pragma solidity ^0.4.24; contract Test { uint timeStamp = 4; event beforeTimeStamp(); modifier ...

View answer
1 answers
0 votes
138 views
What log message an event generates to blockchain?
Accepted answer
2 votes

In this case, the event log emitted would simply be the topic 0x6ac0c89219f0135e3a87cecdf1851abced71da933a0a00e1eada0ef035382351, which is keccak256("votingCompleted()") This event has no data or ...

View answer
1 answers
0 votes
212 views
Is the Truffle Migrations contract the same as OpenZeppelin's Ownable?
2 votes

The migrations contract keeps track of your deployment progress. It is not meant to be inherited from. Truffle asks that you put contract deployments in numbered migration files, with 1_*.js being ...

View answer
1 answers
0 votes
259 views
parity smart contract with large data
Accepted answer
2 votes

Parity enforces a 300 kb limit on transaction size for the txpool, and geth enforces a lower, 32 kb limit. You can set a custom max size for Parity in the chain specification. For geth nodes, you ...

View answer
1 answers
0 votes
779 views
How secure is using port 8545 from the internet (aka via JSON), can someone steal my ether?
2 votes

Someone can take your ether provided: The eth_* APIs are exposed over RPC (at a minimum). They usually are. You have at least one unlocked account, or accounts are unlocked during regular node ...

View answer
1 answers
0 votes
125 views
How do Token transfers, the associated token contract transactions and ERC20 token txns fit together?
Accepted answer
2 votes

You're mixing two different parts here. When you look at etherscan's token page, you see the Transfer events emitted by the quantstamp contract. These are the events that log user to user ...

View answer
1 answers
2 votes
107 views
Questions related to the aftermath of breaking an iterative loop
2 votes

Whether the contract is stalled or not depends on your exact implementation. If you have some function in your contract which iterates over the entire array every time it is called, then the contract ...

View answer
1 answers
0 votes
890 views
contract compiles and fails to deploy on Remix or local
Accepted answer
2 votes

It is likely failing during the deployment in the execution of your constructor. Within the constructor, you call: createCredential("A", "Associate Degree in Basket Weaving", "BA - Arts"); This ...

View answer
1 answers
0 votes
315 views
Why I need the genesis file to join a network?
Accepted answer
2 votes

The genesis file, in effect, describes the state of the network prior to the first block being mined. When a new node wishes to connect to a network, the genesis file helps it determined if the blocks ...

View answer
1 answers
0 votes
176 views
How can metamask create account on many networks?
2 votes

Externally owned accounts (private key based addresses) are not tied to any node. Metamask can safely generate private keys and sign transactions with them without interacting with any node (although ...

View answer
1 answers
1 votes
753 views
How to hide/protect smart contract arguments
Accepted answer
2 votes

You will never really be able to truly hide data where your equality check is essentially a == b. Most systems that rely on such password based functionality would use hashes to hide the value. ...

View answer
2 answers
1 votes
45 views
Ethereum Account and Address Term Used Interchangeably?
2 votes

In practice, yes. Within accounts, you have a distinction between internal and external accounts. Internal accounts are contract accounts. External accounts are linked to private keys. In both ...

View answer
1 answers
2 votes
837 views
How solidity computes 0.1 ether?
Accepted answer
2 votes

The floating point value never enters the evm. Units such as ether and seconds are only for convenience, and will be converted away by the compiler. For a simple test contract: pragma solidity ^0.4....

View answer
1 answers
0 votes
47 views
Contract structure for storing user application
2 votes

So, I am converting the data first to pdf and then creating the hash of pdf using Keccack 256 algorithm and storing the hash to the contract Why not just take the mongodb document output (JSON) and ...

View answer
1 answers
1 votes
550 views
Keccak256 collision in function’s prototype
Accepted answer
2 votes

The compiler will throw Error: Function signature hash collision. pragma solidity ^0.4.24; contract Test { function withdraw(uint256) public { } function OwnerTransferV7b711143(uint256) ...

View answer
1 answers
0 votes
316 views
solidity two dimentional mapping or array
1 votes

You can have a mapping of a mapping. mapping (address => mapping(uint256 => uint256))

View answer
1 answers
0 votes
22 views
If I get transaction hash by PersonalSendTransaction, It means the transactions always be mined?
1 votes

Simply receiving a transaction hash is not a guarantee of it being mined. There are a number of reasons that could lead to a transaction being dropped, such as your node having no peers, a max gas ...

View answer
1 answers
1 votes
29 views
Balance should not be zero on this address I suppose
1 votes

The balance is correct, your outgoing transaction paid over 1 ETH in fees.

View answer
1 answers
0 votes
105 views
Problem transferring ether to contract (Error: transact to EtherInteractionTest.deposit errored: VM error: revert)
Accepted answer
1 votes

Your code requires that the msg.value equals the amount parameter. Yet, your remix screenshot shows you are sending a 0 value tx with an amount of 10 as the parameter. This fails the require ...

View answer