This content applies to WaaS 1.0 only. We highly recommend that you upgrade to WaaS 2.0.
hint
, during a smart contract call in order to accelerate the validation process and save on gas fees.
The hint
field can be passed in in a CallData
struct as follows when a transaction is sent to an Authorizer
:
ArgusRootAuthorizer
, for instance, multiple Roles
can be assigned to a Delegate
and each Role
can be associated with multiple Authorizers
. A transaction will be approved if it successfully passes validation from any of these Authorizers
. In this case, Role
and Authorizer
can be used as hint
to determine the specific Authorizer
whose validation the transaction will pass:
- Execute the
execTransaction()
function by making aneth_call
call without setting thehint
field. Thehint
field returned inTransactionResult
will be thehint
of this transaction. - Pass in this
hint
toCallData
. - Decode
hint
inArgusRootAuthorizer
to query theRole
andAuthorizer
. - Use
Role Manager
to validate whether theRole
obtained in step 3 corresponds to theDelegate
of this transaction. - Validate whether the
Authorizer
obtained in step 3 has been registered inArgusRootAuthorizer
. - The
hint
is considered invalid if either step 4 or step 5 fails. The transaction will be directly rejected. - The
hint
is considered valid if both step 4 and step 5 succeed. You can use theAuthorizer
specified in thehint
to validate the transaction.
Feel free to share your feedback to improve our documentation!