New answers tagged

0

According to https://github.com/ethereumbook/ethereumbook, this is the flow: Seed phrase -> Wallet -> Different addresses/accounts (private-public key-pairs) Therefore, If you have wallet A and B (different seed phrases), there is not a reliable way of identifying that your new address and old addresses belong to the same entity or are, in any way, ...


0

A web3 call means you're just reading from a local node, not mutating the state of the blockchain, see What is the difference between a transaction and a call? As you noticed, avoiding call and just calling the method on the web3 contract instance will mutate the contract state. This is because you are sending a transaction. In web3, sending a transaction ...


1

I see you modified the question after several valid/correct answers: Question is: how to invoke GenNextID like a regular function, that is: call to this function mutates internal state it returns result returned from the contract's code YOU DON'T You either mutate the state and get a receipt, or you get a response but you don't mutate the ...


0

You can run multiple instances of geth in the same PC, you have to configure different network ports so you don't have collisions, use separate directories and disable IPC or use different files for every instance. geth --port 30303 --rpcport 8545 --wsport 8546 --ipcdisable --datadir "directory_previously_created" "other parameters" To connect nodes ...


0

I'd suggest checking out Ganache to run a local Ethereum instance (exposed on 127.0.0.1:8545): https://www.trufflesuite.com/ganache If you are more of a CLI type of person: https://github.com/trufflesuite/ganache-cli I'd then suggest using a library such as Ethers.js or Web3.js to interface with the Ethereum instance: https://docs.ethers.io/ethers.js/html/...


1

When a transaction is transmitted on the blockchain, where does it go exactly? The pending transactions reside in the txpool of Ethereum, you can browse it here: https://etherscan.io/txsPending Miners monitor the txpool for new transactions to validate, usually opting to validate transactions with the higher gas prices compared to lower gas prices.


0

If your goal is to have persistent certification data storage on the blockchain, and retrieve the same, you can make use of setter and getter methods. Solidity creates a getter method for public state variables by default. In case of private state variables, you need to define a getter method to read the stored value.


1

You can see the "25" in the state change tab (switch to 'number'). But the easiest is probably to make the contract emit an event, as it is easy to read all events of contract from web3.


0

Just to amplify Lauri's answer, the question could be rephrased, What if I don't trust my own equipment? That is possibly a concern, but it isn't limited to the Ethereum node. It goes all the way to the metal. Exactly what you want to do about that will depend on the value you attach to the asset you want to protect. No one is stopping you from, for ...


2

This is not exactly about trusting a random node. This is about trusting the node you use to communicate with the blockchain - you most likely issue both types of transactions to the same node. If you don't trust that node then you can't trust anything really - you can't even know whether the node is even really connected to the blockchain or whether it just ...


1

In https://blog.ethereum.org/2015/11/15/merkling-in-ethereum Vitalik Buterin gave an example of using the different trees (transactions, receipt, state trees). Has this transaction been included in a particular block? Tell me all instances of an event of type X (eg. a crowdfunding contract reaching its goal) emitted by this address in the past 30 days What ...


1

Receipts are basically for proving logs and events, rather than details of a transaction. In https://blog.ethereum.org/2015/11/15/merkling-in-ethereum Vitalik Buterin gave an example of using receipts, as well as other examples that can be answered with Merkle proofs: Has this transaction been included in a particular block? Tell me all instances of an ...


2

Let's suppose you have signed three transactions with nonces 10, 11 and 12. Also assume that they were mined at blocks A, B and C. It is possible for a chain reorg to occur at block C, with the new blocks being B', C' and D'. Any transactions occurring in blocks B and C that do not appear in the newer blocks B', C' and D' should not be considered as mined. ...


1

There is not a strict one-up requirement for transaction nonces, i.e. you can post a transaction with nonce 42 then another one with nonce 44 and it will be accepted. If there is no transaction 43 on anyone's roadmap this is fine, but I understand you're asking about the outcome if transaction 43 did exist but ended up being invalidated and you didn't notice ...


1

You can decode it programmatically with web3.js (tested with version 1.2.1): const Web3 = require("web3"); const web3 = new Web3("https://mainnet.infura.io"); const addr = "0x241e82c79452f51fbfc89fac6d912e021db1a3b7"; const abi = [{"constant":false,"inputs":[{"name":"delegate","type":"address"}],"name":"approveDelegate","outputs":[],"payable":false,"...


Top 50 recent answers are included