Optional
provider: null | ProviderSigns an %%authorization%% to be used in [[link-eip-7702]] transactions.
Evaluates the //tx// by running it against the current Blockchain state. This cannot change state and has no cost in ether, as it is effectively simulating execution.
This can be used to have the Blockchain perform computations based on its state (e.g. running a Contract's getters) or to simulate the effect of a transaction before actually performing an operation.
Returns the signer connected to %%provider%%.
This may throw, for example, a Signer connected over a Socket or to a specific instance of a node may not be transferrable.
Estimates the required gas required to execute //tx// on the Blockchain. This
will be the expected amount a transaction will require as its gasLimit
to successfully run all the necessary computations and store the needed state
that the transaction intends.
Keep in mind that this is best efforts, since the state of the Blockchain is in flux, which could affect transaction gas requirements.
UNPREDICTABLE_GAS_LIMIT A transaction that is believed by the node to likely
fail will throw an error during gas estimation. This could indicate that it
will actually fail or that the circumstances are simply too complex for the
node to take into account. In these cases, a manually determined gasLimit
will need to be made.
Resolves to the Signer address.
Gets the next nonce required for this Signer to send a transaction.
Optional
blockTag: BlockTagThe blocktag to base the transaction count on, keep in mind
many nodes do not honour this value and silently ignore it [default: "latest"
]
Prepares an [[AuthorizationRequest]] for authorization by populating any missing properties:
address
(if an Addressable or ENS name)nonce
via signer.getNonce("pending")
chainId
via signer.provider.getNetwork()
Prepares a TransactionRequest for calling:
to
and from
addressesfrom
is specified , check that it matches this SignerThe call to prepare
Prepares a TransactionRequest for sending to the network by populating any missing properties:
to
and from
addressesfrom
is specified , check that it matches this Signernonce
via signer.getNonce("pending")
gasLimit
via signer.estimateGas(tx)
chainId
via signer.provider.getNetwork()
type
and relevant fee data for that type (gasPrice
for legacy transactions, maxFeePerGas
for EIP-1559, etc)The call to prepare
Resolves an ENS Name to an address.
Sends %%tx%% to the Network. The signer.populateTransaction(tx)
is called first to ensure all necessary properties for the
transaction to be valid have been popualted first.
Static
init
Deprecated
use DfnsWallet.init(options) instead