3

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?

3

An example: has_auth(accountname)

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

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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