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_callcall without setting thehintfield. Thehintfield returned inTransactionResultwill be thehintof this transaction. - Pass in this
hinttoCallData. - Decode
hintinArgusRootAuthorizerto query theRoleandAuthorizer. - Use
Role Managerto validate whether theRoleobtained in step 3 corresponds to theDelegateof this transaction. - Validate whether the
Authorizerobtained in step 3 has been registered inArgusRootAuthorizer. - The
hintis considered invalid if either step 4 or step 5 fails. The transaction will be directly rejected. - The
hintis considered valid if both step 4 and step 5 succeed. You can use theAuthorizerspecified in thehintto validate the transaction.
