Extends
Properties
Methods
call()
Parameters
Returns
Promise<string>
A promise resolving to the result of the call.
Overrides
ContractRunner.call
Source
signers/signer.ts:124connect()
Parameters
Returns
Signer
A new instance of this Signer.
Throws
If the Signer cannot be connected to the Provider.Source
signers/signer.ts:31createAccessList()
Parameters
Returns
Promise<AccessList>
A promise resolving to the access list.
Overrides
ContractRunner.createAccessList
Source
signers/signer.ts:112estimateGas()
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.
Parameters
Returns
Promise<bigint>
A promise resolving to the estimated gas.
Overrides
ContractRunner.estimateGas
Throws
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 determinedgasLimit will need to be
made.
Source
signers/signer.ts:104getAddress()
Returns
Promise<string>
The address of the Signer.
Overrides
Addressable.getAddress
Throws
If the Signer has no address.Source
signers/signer.ts:42getNonce()
Parameters
Returns
Promise<number>
The next nonce.
Source
signers/signer.ts:51populateCall()
- Resolves
toandfromaddresses - If
fromis specified , check that it matches this Signer
Parameters
Returns
Promise<TransactionLike>
A promise resolving to the prepared transaction.
Source
signers/signer.ts:65populateQuaiTransaction()
- Resolves
toandfromaddresses - If
fromis specified , check that it matches this Signer - Populates
nonceviasigner.getNonce("pending") - Populates
gasLimitviasigner.estimateGas(tx) - Populates
chainIdviasigner.provider.getNetwork() - Populates
typeand relevant fee data for that type (gasPrice)
Parameters
Returns
Promise<TransactionLike>
A promise resolving to the prepared transaction.
Throws
If the transaction is invalid.Note
Some Signer implementations may skip populating properties that are populated downstream; for example JsonRpcSigner defers to the node to populate the nonce and fee data.Source
signers/signer.ts:84sendTransaction()
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.
Parameters
Returns
Promise<TransactionResponse>
A promise resolving to the transaction response.
Overrides
ContractRunner.sendTransaction
Throws
If the transaction is invalid.Source
signers/signer.ts:147signMessage()
message is a string, it is signed as UTF-8 encoded bytes. It is not interpretted as a
BytesLike; so the string "0x1234" is signed as six characters, not two bytes.
To sign that example as two bytes, the Uint8Array should be used (i.e. new Uint8Array([ 0x12, 0x34 ])).
Parameters
Returns
Promise<string>
A promise resolving to the signed message.
Throws
If the message is invalid.Source
signers/signer.ts:161signTransaction()
tx, returning the fully signed transaction. This does not populate any additional properties within the
transaction.
Parameters
Returns
Promise<string>
A promise resolving to the signed transaction.
Throws
If the transaction is invalid.Source
signers/signer.ts:137signTypedData()
Parameters
Returns
Promise<string>
A promise resolving to the signed typed data.
