August 2019
Intermediate to advanced
486 pages
13h 52m
English
The allowed state variable is defined in the contract as follows:
mapping (address => mapping (address => uint256)) internal allowed;
allowed is a nested mapping of two Solidity mapping data types. In the ERC20 standard specification, it is possible for a token holder, X, to assign some allowances to another account, Y, so that Y is allowed to take the approved number of tokens from the token balance of X:

As in the preceding diagram, Owner has 100 TKN ERC20 tokens, out of which he has given approval of 50 TKN to Approved person. At any time the Approved person can withdraw ...