New answers tagged

0

When a transaction is issued, the transaction is sent to a node to be mined and added in a block. After issuing the transaction, if the transaction structure is properly filled with necessary fields, the transaction hash will be returned instantly. If there is any wrong in the given transaction structure like to address is not properly set, the error will be ...


0

There are two types of transaction in Ethereum, one is simple balance transfer and the other one is making any modification in the contract(either it could be contract deployment/contract's method invocation). The 'data' field in the raw transaction json structure of Ethereum contains the code to execute a transaction in the EVM. In case of contract ...


3

I fixed it. Add this code in app.js: // MetaMask injects its own web3 instance in all pages, override it // as it might be not compatible with the one used here if (window.web3) window.web3 = web3;


2

You can try events, check this out: https://solidity.readthedocs.io/en/v0.5.10/structure-of-a-contract.html?highlight=events#events


0

A possibility would be to 'double submit' a transaction. If one were to submit a transaction to the ethereum network, with sufficient gas limit, gas price, no contract call errors, etc (a perfect transaction) and THEN submit another 'perfect' transaction from the same account, with the SAME nonce as the previously sent transaction, one of these transactions ...


0

If you are using blockcypher simply send -1 as the amount.


0

"input" is the receiver & "output" is the sender. In your example you have that backwards. The signer PK must match the "output" address.


0

It shouldn't be as ERC20 wallets are token agnostic, however Coinbase does not give you access to the wallet keys and there is no way for you to send the tokens back. Best to reach out to Coinbase directly and maybe they can help you out.


1

The team at Blocknative wrote an excellent post detailing Canceled Transactions that answers your question: https://blog.blocknative.com/blog/canceled-transactions Here is what they say about Canceled TX: What are Canceled transactions? On Ethereum, a Cancel transaction is an attempt to overwrite a currently pending transaction with a new transaction. ...


3

I can't speak to the others as I work on Quorum, but there are a few good sources that our team uses and references. Here is performance evaluation done by an external team with published method and results: https://arxiv.org/abs/1809.03421 Here is one of the tools we use that tries to standardize a way to submit and measure txn throughput in ethereum like ...


1

I am not sure about modifying the nonce with send methods. You can use instead classic web3.eth.sendTransaction method (https://web3js.readthedocs.io/en/v1.2.1/web3-eth.html#sendtransaction). However, you'll need to provide the data field for this transaction. const nonceThatIWant = x; const txObject = smartContractObject.methods.addSomething(_valueToAdd); ...


2

The target contract is a non standard ERC20 token. It should have three topics, two indexed parameters and the event id and the transfer value in the data field. But it has four topics instead. "topics": [ "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", "0x000000000000000000000000c5ec6937d3278311e2ace517df214717310c0820", "...


2

The value is actually returned, but we just don't have a way to get it with web3 libraries yet. Think about it: how can your client get the return value if it has no clue when or if the transaction will be included in a block. Luckily for you, there's a solution. It's called "Events", check it out: https://solidity.readthedocs.io/en/v0.5.10/structure-of-a-...


1

You misunderstood the flow. You have User => Escrow.deposit() 1. Escrow => token.approve(this, amount) 2. Escrow => token.transferFrom(msg.sender, amount); // msg.sender did not approve this That won't work for the same reason I (for example) can't approve myself to withdraw your funds and then do it. It has to go: User => token....


1

Do we need to sign the transaction by web3.eth.signTransaction after initiating transaction via web3.eth.sendTransaction? To me, the fact that you've used the word after implies that you are totally baffled here... unless you actually meant before... In either case, here is the deal: You may use web3.eth.sendTransaction({from: account, ...}) only if you ...


1

I'd assume you are using web3 v1.2. signTransaction will sign a transaction but it will not send it, returning an hexadecimal string with the signed transaction instead. You can use sendSignedTransaction to send it to the network. sendTransaction will sign and send the transaction to the network.


0

Yes, it is returned right after the transaction is sent and a transaction hash is available. Read the first bullet on the return value of function web3.eth.sendTransaction here.


0

Partial answer, in an ethereum transaction there is a data field used for interacting with the smartcontract address. So if you're looking for an amount of erc-20 token using the hash of a transaction, it could mean you probably want to know the amount of an erc-20 token transfered by a specific transaction using its hash: I would investigate the data or ...


0

We've solved this exact issue with TrueBlocks which watches every block and extracts from it a list of every involved address. With this ongoing list, it creates an easily searchable index which can be continually monitored to extract exactly these type of 'internal transactions' or 'message calls.' You have to be running your own --tracing node for it to ...


3

OK, so when we (me and the ShaneT) implemented hardware signing (private key stored exclusively on AWS CloudHSM) there were a number of things we learned. Hopefully this gives you a guide on how you can achieve it. Unfortunately I can't directly share the code as it's my firm's IP. Here is the actual tx we first made using AWS CloudHSM on mainnet :) ...


0

If I'm not mistaken, addresses in quotes, like this: ["0xca35b7d915458ef540ade6068dfe2f44e8fa733c","0xca35b7d915458ef540ade6068dfe2f44e8fa733c"] Hope it helps.


0

Try with web3.eth.subscribe, where the documentation is here. function subscribeToTxs(address) { return web3.eth.subscribe('pendingTransactions', (err, txHash) => { if (err) { throw(err); } }) .on("data", function(txHash){ return web3.eth.getTransaction(txHash, (err, returnedValue) => { if (err) { // error ...


0

There are no events related to EOA in ethereum, what you could do is check on every block for tx of a particular account. You can also use an API like etherscan and periodically check for transactions of the address if interest in a range of blocks. See here https://etherscan.io/apis#accounts Hope this helps.


Top 50 recent answers are included