1

Transactions are already atomic by nature. Contracts/functions do not sign transactions. Only EOAs (Externally Owned Account, such as your wallet) sign transaction. A contract function can simply call another contract, within the same transaction. When a transaction reverts, you are charged the gas fees until the revert happens. This is so that you couldn't ...


1

I guess I found what you want But not sure. async function creatChildContract(){ tx = await this.factoryContract.createChild(); tx.hash //returns hash of the transaction which user just signed. }


1

To 100% guarantee that this will execute in order, you can wait for a transaction to be mined. initial = contract.getTest() set_transaction = contract.setTest(1, {"from": 0x123123123...}) set_transaction.wait(1) final = contract.getTest() wait(1) means we are going to wait 1 block for the transaction to finish.


1

When you send a legacy (type-0 transaction), the legacy gasPrice is used for both maxFeePerGas and maxPriorityFeePerGas. In this case, if you send a transaction with both values set to 1000 Gwei and the base fee is only 300 Gwei, the remaining 700 Gwei will go to the miner like you said. In most situations using such a high priority fee is unnecessary ...


1

Here's a code snippet that uses Hardhat, Ethers and TypeChain: import { TransactionRequest, TransactionResponse } from "@ethersproject/abstract-provider"; import { SignerWithAddress } from "@nomiclabs/hardhat-ethers/signers"; import { task } from "hardhat/config"; import { PRBProxy__factory } from "../../typechain/...


Only top voted, non community-wiki answers of a minimum length are eligible