0

Why my ERC20 approval function has the same owner and spender?

//SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/IERC20.sol";

contract TokenUtilizer {

    IERC20 public SBToken;

    constructor(IERC20 _SBTokenAddress) {
        SBToken = _SBTokenAddress;
    }

  
    function approval() public {
        SBToken.approve(address(this), 1000);
    }
1
  • Elaborate your question please. How is the owner and spender seems same to you? Who is the owner here? Apr 2 at 12:56

0

Your Answer

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

Browse other questions tagged or ask your own question.