Complete the code to declare the transfer function signature.
function transfer(address [1], uint256 amount) public returns (bool);The transfer function sends tokens to the to address.
Complete the code to approve a spender to spend tokens.
function approve(address [1], uint256 amount) public returns (bool);The approve function allows the spender to spend tokens on behalf of the owner.
Fix the error in the transferFrom function parameter name.
function transferFrom(address [1], address to, uint256 amount) public returns (bool);The transferFrom function moves tokens from the from address to to.
Fill both blanks to complete the allowance mapping declaration.
mapping([1] => mapping([2] => uint256)) private _allowances;
The _allowances mapping tracks how many tokens an owner allows a spender to use. Both keys are addresses.
Fill all three blanks to complete the transferFrom function body snippet.
require(_allowances[[1]][[2]] >= amount, "Allowance too low"); _allowances[[3]][[2]] -= amount;
The allowance is checked and reduced for the from owner and spender. The from address's allowance is decreased.
