Oko contract explorer
Contract

Code for 0x7be1…3c40

Since block 20393571

Panoramix decompilation

# Palkeoramix decompiler. 

def storage:
  stor3608 is address at storage 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
  stor3608 is uint256 at storage 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
  owner is address at storage 0xfeb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61
  storFEB5 is uint256 at storage 0xfeb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61

def owner(): # not payable
  return address(owner)

#
#  Regular functions
#

def _fallback(?) payable: # default function
  delegate uint256(stor3608) with:
     funct call.data[0 len 4]
       gas gas_remaining wei
      args call.data[4 len calldata.size - 4]
  if not delegate.return_code:
      revert with ext_call.return_data[0 len return_data.size]
  return ext_call.return_data[0 len return_data.size]

def transferOwnership(address newOwner): # not payable
  require calldata.size - 4 >=′ 32
  require newOwner == newOwner
  if address(owner) != caller:
      revert with 0, 'NOT_AUTHORIZED'
  uint256(storFEB5) = newOwner
  log OwnershipTransferred(
        address previousOwner=address(owner),
        address newOwner=newOwner)

def upgradeTo(address newImplementation): # not payable
  require calldata.size - 4 >=′ 32
  require newImplementation == newImplementation
  if address(owner) != caller:
      revert with 0, 'NOT_AUTHORIZED'
  uint256(stor3608) = newImplementation
  log ProxyImplementationUpdated(
        address previousImplementation=address(stor3608),
        address newImplementation=newImplementation)

def supportsInterface(bytes4 interfaceId): # not payable
  require calldata.size - 4 >=′ 32
  require interfaceId == Mask(32, 224, interfaceId)
  if Mask(32, 224, interfaceId) == 0x1ffc9a700000000000000000000000000000000000000000000000000000000:
      return 1
  if Mask(32, 224, interfaceId) == 0x7f5828d000000000000000000000000000000000000000000000000000000000:
      return 1
  if not -Mask(32, 224, interfaceId) - 0x100000000000000000000000000000000000000000000000000000000:
      return 0
  static call address(stor3608).supportsInterface(bytes4 interfaceId) with:
          gas gas_remaining wei
         args Mask(32, 224, interfaceId)
  if not ext_call.success:
      return 0
  require return_data.size >=′ 32
  require ext_call.return_data[0] == bool(ext_call.return_data[0])
  return bool(ext_call.return_data[0])

def upgradeToAndCall(address newImplementation, bytes data) payable: 
  require calldata.size - 4 >=′ 64
  require newImplementation == newImplementation
  require data <= LOCK8605463013()
  require calldata.size >′ data + 35
  require data.length <= LOCK8605463013()
  require data + data.length + 36 <= calldata.size
  if address(owner) != caller:
      revert with 0, 'NOT_AUTHORIZED'
  mem[128 len data.length] = data[all]
  mem[data.length + 128] = 0
  uint256(stor3608) = newImplementation
  log ProxyImplementationUpdated(
        address previousImplementation=address(stor3608),
        address newImplementation=newImplementation)
  if data.length:
      mem[ceil32(data.length) + 128 len ceil32(data.length)] = data[all], mem[data.length + 128 len ceil32(data.length) - data.length]
      mem[ceil32(data.length) + data.length + 128] = 0
      delegate newImplementation with:
         funct (Mask(32, -(8 * ceil32(data.length) + -data.length + 4) + 256, 0) >> -(8 * ceil32(data.length) + -data.length + 4) + 256)
           gas gas_remaining wei
          args mem[ceil32(data.length) + 132 len data.length - 4]
      if not delegate.return_code:
          revert with ext_call.return_data[0 len return_data.size]

Decompilation generated by Panoramix.

Raw bytecode

0x60806040526004361061004e5760003560e01c806301ffc9a71461005f5780633659cfe6146100945780634f1ef286146100b45780638da5cb5b146100c7578063f2fde38b146100f457610055565b3661005557005b61005d610114565b005b34801561006b57600080fd5b5061007f61007a3660046104ef565b610162565b60405190151581526020015b60405180910390f35b3480156100a057600080fd5b5061005d6100af366004610535565b61025a565b61005d6100c2366004610550565b6102bf565b3480156100d357600080fd5b506100dc61033f565b6040516001600160a01b03909116815260200161008b565b34801561010057600080fd5b5061005d61010f366004610535565b61035c565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc543660008037600080366000845af490503d806000803e81801561015857816000f35b816000fd5b505050565b60006301ffc9a760e01b6001600160e01b03198316148061019357506307f5828d60e41b6001600160e01b03198316145b156101a057506001919050565b6001600160e01b031980831690036101ba57506000919050565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc546040516301ffc9a760e01b81526001600160e01b0319841660048201526001600160a01b038216906301ffc9a790602401602060405180830381865afa925050508015610246575060408051601f3d908101601f19168201909252610243918101906105d5565b60015b6102535750600092915050565b9392505050565b60008051602061064f833981519152546001600160a01b0316336001600160a01b0316146102a35760405162461bcd60e51b815260040161029a906105f7565b60405180910390fd5b6102bc81604051806020016040528060008152506103a5565b50565b60008051602061064f833981519152546001600160a01b0316336001600160a01b0316146102ff5760405162461bcd60e51b815260040161029a906105f7565b61015d8383838080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506103a592505050565b600061035760008051602061064f8339815191525490565b905090565b60008051602061064f833981519152546001600160a01b0316336001600160a01b03161461039c5760405162461bcd60e51b815260040161029a906105f7565b6102bc81610480565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc8054908390556040516001600160a01b0380851691908316907f5570d70a002632a7b0b3c9304cc89efb62d8da9eca0dbd7752c83b737906829690600090a381511561015d576000836001600160a01b031683604051610426919061061f565b600060405180830381855af49150503d8060008114610461576040519150601f19603f3d011682016040523d82523d6000602084013e610466565b606091505b505090508061047a573d806000803e806000fd5b50505050565b600061049860008051602061064f8339815191525490565b90508160008051602061064f83398151915255816001600160a01b0316816001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60006020828403121561050157600080fd5b81356001600160e01b03198116811461025357600080fd5b80356001600160a01b038116811461053057600080fd5b919050565b60006020828403121561054757600080fd5b61025382610519565b60008060006040848603121561056557600080fd5b61056e84610519565b9250602084013567ffffffffffffffff81111561058a57600080fd5b8401601f8101861361059b57600080fd5b803567ffffffffffffffff8111156105b257600080fd5b8660208284010111156105c457600080fd5b939660209190910195509293505050565b6000602082840312156105e757600080fd5b8151801515811461025357600080fd5b6020808252600e908201526d1393d517d055551213d49256915160921b604082015260600190565b6000825160005b818110156106405760208186018101518583015201610626565b50600092019182525091905056feb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103a2646970667358221220b426854d91526e2547708096d506a92d01a6c4e8d4834d092566209af83d39e064736f6c634300081a0033