New answers tagged

0

TL;DR: freely. Mining is based on economic incentives. The miners are believed to want to maximize their profits. Therefore because mining a block (finding the right solution to the mining puzzle) is so hard he should include as much transaction to a block as he can because the amount of time processing the extra transactions is insignificant compared to ...


0

In Ethereum (and basically any blockchain) speed is vital. So as soon as anyone sees a transaction they should forward it - there's no reason to stack them in bundles of some sort or at least the saved bandwidth is not worth it. The faster transactions propagate throughout the network the less there are side chains and therefore less uncle blocks and dead ...


2

I found it very easy to use Google BigQuery to do this. It is free up to a point. Was able to easily retrieve my data. I will update when I figure out how to add fees. https://console.cloud.google.com/bigquery select tx.token_address, t.name, tx.from_address, tx.to_address, tx.value, tx.block_timestamp, (trans.receipt_gas_used * trans.gas_price) / ...


0

User can make transaction to the blockchain using third party api. User needs to sign the transaction with his keystore. Then he can send it to the blockchain. Metamask you can use; which is a browser plugin. It can be connected to any node of the network. The user will provide the credentials of the keystore in this plugin and make transaction. To get the ...


0

The result of a view (read-only) function in web3.js and ethjs are object-like types, with string keys for the integer positions of the return values. If you stringified it, it would look like {'0': BN<some balance here>} Try balance['0'].toNumber() If your view functions return multiple values, it would look like `{'0': val0, '1': val1, ... }`


0

This looks like an issue with version 2.0.0 of ethereumjs-tx: https://github.com/ethereumjs/ethereumjs-tx/issues/165 16 You will need to construct your transaction like below: const tx = new Tx(txObject, {chain:'ropsten', hardfork: 'petersburg'})


2

Your Javascript code should be asynchronous (either with async/await, or using Promise objects), because both contract.new and object.showNumber return a Promise. For example: async function run() { var contract = eth.contract(ABI); var bytecode = '0xBIN'; var deploy = {from: eth.coinbase, data: bytecode, gas: 2000000}; var object = await ...


1

As the application developer, you need to handle this yourself. There's a little documentation here. You send (and get returned) a queryId. You should check that this is valid inside your __callback() function when it is called. You need to do this anyway, as the callback is public and can be called by anyone - so it could be an attack vector by a ...


1

It is a miner mistake to allow invalid transactions. A block with invalid transactions is using blockchain space with something useless for infinite time. If the user doesn't have enough balance the miner cannot charge a fee. nonces serve the purpose of having a defined execution order and protecting from certain attacks like transaction replay.


0

Ok, I found what I needed. https://bloxy.info/ offers to see which call what and with the function names when viewing a transaction.


1

This is probably a bad idea. First, the "pending" transactions are subjective from the perspective of each node. They can only report transactions they know about. You have seen that yourself. Testing in the Kovan network may include or exclude pending as follows Second, pending transactions are not reliably confirmed. They can be cancelled by the ...


0

I've got an answer with exactly what the user requested. A single private key, and hence a single gas pool for all the ERC 20 wallets. The solution: A contract that generates other contracts that act as receivers. Relevant Stackexchange Answer: Common Gas Wallet for ERC20 Wallets? Relevant Github Link: https://github.com/Meshugah/ERC20-CommonGasWallet


2

Yes, you absolutely can! You will have to us the EthereumJS-tx package from NPM, you can get more information here: https://github.com/ethereumjs/ethereumjs-tx. It's as simple as: const EthereumTx = require('ethereumjs-tx').Transaction const privateKey = Buffer.from( 'e331b6d69882b4cb4ea581d88e0b604039a3de5967688d3dcffdd2270c0fd109', 'hex', ) const ...


1

Partial answer... When it comes to smart contracts, how smart contracts deal with this kind of revert/rollback problems due to chain reorganization? The smart contract itself doesn't need to deal with anything: it will be as though the transaction never happened, and no state changes occurred. What might need to be dealt with are any changes that happen ...


2

is it possible for the two to be mined in the same block? Yes. As long as they're ordered in the block in such a way that the state transitions are valid (i.e. transaction #1 must happen before transaction #2). This should happen automatically, as miners will (should) always order transactions from the same account by their nonce. See: What is the default ...


0

If the account does not have enough balance, the transaction will fail. Prior to that, there will be no prevention.


Top 50 recent answers are included