Skip to Content
Mastering Blockchain Programming with Solidity
book

Mastering Blockchain Programming with Solidity

by Jitendra Chittoda
August 2019
Intermediate to advanced
486 pages
13h 52m
English
Packt Publishing
Content preview from Mastering Blockchain Programming with Solidity

The isApprovedForAll function

The isApprovedForAll() function is used to check that the given operator has operator rights on the given owner's tokens.

This function takes the following arguments:

  • owner: The address of owner of the tokens who has given full approvals before
  • operator: The address of operator that has received the approval from owner before

This function returns a Boolean value. The following are the return values:

  • true: The owner has previously given full approvals to the operator
  • false: The owner has not given approval to the operator

Let's look at the isApprovedForAll() function code:

function isApprovedForAll(address owner, address operator) public view returns (bool) {    return _operatorApprovals[owner][operator];}
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mastering Ethereum

Mastering Ethereum

Andreas M. Antonopoulos, Gavin Wood
Complete Cryptocurrency and Blockchain Course | Learn Solidity

Complete Cryptocurrency and Blockchain Course | Learn Solidity

Ravinder Deol, Codestars By Rob Percival, Thomas Wiesner

Publisher Resources

ISBN: 9781839218262Supplemental Content