Imagine a contract that does not require_auth() but instead has conditional behavior depending upon which auth is present.

if (<conditional that checks auth>) {
  // do stuff given auth from account A
} else {
  // do stuff given any other auth

What is an example of the conditional that checks auth?

1 Answer 1


An example: has_auth(accountname)

See: https://eosio.github.io/eosio.cdt/1.5.0/group__action.html#function-hasauth

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.