Evaluates the //tx// by running it against the current Blockchain state. This cannot change state and has no cost, 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.
The transaction to evaluate
Optional
revision: stringThe revision to evaluate the transaction against
the result of the evaluation
Returns a new instance of this Signer connected to //provider// or detached from any Provider if undefined.
The provider to connect to
a new instance of this Signer connected to //provider// or detached
Estimates the required gas required to execute //tx// on the Blockchain. This will be the expected amount a transaction will require to successfully run all the necessary computations and store the needed state that the transaction intends.
The transaction to estimate gas for
the total estimated gas required
Get the address of the Signer.
the address of the signer
Gets the next nonce required for this Signer to send a transaction.
Optional
blockTag: stringThe blocktag to base the transaction count on, keep in mind
many nodes do not honour this value and silently ignore it [default: "latest"
]
@NOTE: This method generates a random number as nonce. It is because the nonce in VeChain is a 6-byte number.
Prepares a TransactionRequestInput for calling:
to
and from
addressesfrom
is specified, check that it matches this Signer@note: Here the base support of multi-clause transaction is added. So, if clauses are provided in the transaction, it will be used as it is. Otherwise, standard transaction will be prepared.
The call to prepare
the prepared call transaction
Prepares a TransactionRequestInput 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")
signer.estimateGas(tx)
The call to prepare
the prepared transaction
Optional
providerThe provider attached to this Signer (if any).
Resolves an VNS Name to an address.
Sends %%transactionToSend%% to the Network. The signer.populateTransaction(transactionToSend)
is called first to ensure all necessary properties for the
transaction to be valid have been populated first.
The transaction to send
The transaction response
Signs an [[link-eip-191]] prefixed a personal message.
If the %%message%% is a string, it is signed as UTF-8 encoded bytes. It is not
interpreted 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 ])
).
Signs %%transactionToSign%%, returning the fully signed transaction. This does not populate any additional properties within the transaction.
The transaction to sign
The fully signed transaction
Signs the [[link-eip-712]] typed data.
A signer for VeChain, adding specific methods for VeChain to the ethers signer
@NOTE: Su support completely our providers (that already support ethers provider format) We use our supported providers instead of ethers providers