Oko contract explorer
Contract

Code for 0xbba3…b2bc

Since block 11147996

Panoramix decompilation

# Palkeoramix decompiler. 

def storage:
  stor1 is mapping of uint8 at storage 1
  stor2 is uint8 at storage 2
  stor3 is mapping of uint8 at storage 3
  stor4 is mapping of uint8 at storage 4
  unknown2299bda6 is array of address at storage 5
  unknownfc0a7f03 is array of address at storage 6
  stor7 is mapping of uint8 at storage 7
  stor8 is mapping of uint8 at storage 8
  unknown1f61aebe is uint256 at storage 9
  unknownd121b696 is mapping of uint256 at storage 10
  unknownd50fd1f4 is mapping of uint256 at storage 12
  unknowna971a0ad is mapping of uint256 at storage 13
  unknownd0134296Address is address at storage 14
  unknown638900e1 is uint256 at storage 15
  implementationAddress is address at storage 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc
  stor3608 is uint256 at storage 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc

def unknown1761d7ce(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == address(_param1)
  return bool(stor8[_param1])

def unknown1f61aebe(): # not payable
  return unknown1f61aebe

def unknown2299bda6(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == _param1
  require _param1 < unknown2299bda6.length
  return unknown2299bda6[_param1]

def isWhitelisted(address _user): # not payable
  require calldata.size - 4 >=′ 32
  require _user == _user
  if not _user:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  return bool(stor4[address(_user)])

def isPauser(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  return bool(stor1[address(account)])

def implementation(): # not payable
  return address(implementationAddress)

def paused(): # not payable
  return bool(stor2)

def unknown638900e1(): # not payable
  return unknown638900e1

def unknowna971a0ad(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == address(_param1)
  return unknowna971a0ad[_param1]

def isWhitelistAdmin(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  return bool(stor3[address(account)])

def unknownd0134296(): # not payable
  return unknownd0134296Address

def unknownd121b696(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == address(_param1)
  return unknownd121b696[_param1]

def unknownd50fd1f4(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == address(_param1)
  return unknownd50fd1f4[_param1]

def unknownfc0a7f03(uint256 _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 == _param1
  require _param1 < unknownfc0a7f03.length
  return unknownfc0a7f03[_param1]

#
#  Regular functions
#

def unknownca44f465(): # not payable
  idx = 0
  while idx < unknown2299bda6.length:
      mem[0] = 5
      if unknown2299bda6[idx] != caller:
          idx = idx + 1
          continue 
      stop
  revert with 0, 'not custodian'

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 renouncePauser(): # not payable
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor1[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account does not have role'
  stor1[caller] = 0
  log PauserRemoved(address account=caller)

def renounceWhitelisted(): # not payable
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor4[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account does not have role'
  stor4[caller] = 0
  log WhitelistedRemoved(address account=caller)

def renounceWhitelistAdmin(): # not payable
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor3[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account does not have role'
  stor3[caller] = 0
  log WhitelistAdminRemoved(address account=caller)

def isCustodian(address addr): # not payable
  require calldata.size - 4 >=′ 32
  require addr == addr
  idx = 0
  while idx < unknown2299bda6.length:
      mem[0] = 5
      if unknown2299bda6[idx] != addr:
          idx = idx + 1
          continue 
      return 1
  return 0

def pause(): # not payable
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor1[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'PauserRole: caller does not have the Pauser role'
  if stor2:
      revert with 0, 'Pausable: paused'
  stor2 = 1
  log Paused(address account=caller)

def unpause(): # not payable
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor1[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'PauserRole: caller does not have the Pauser role'
  if not stor2:
      revert with 0, 'Pausable: not paused'
  stor2 = 0
  log Unpaused(address account=caller)

def unknownfb80c747(array _param1): # not payable
  require calldata.size - 4 >=′ 32
  require _param1 <= LOCK8605463013()
  require _param1 + 35 <′ calldata.size
  require _param1.length <= LOCK8605463013()
  require ceil32(_param1.length) + 128 >= 96 and ceil32(_param1.length) + 128 <= LOCK8605463013()
  require _param1 + _param1.length + 36 <= calldata.size
  mem[ceil32(_param1.length) + 128] = bool(stor7[_param1[all]])
  return Mask(8 * -ceil32(_param1.length) + _param1.length + 32, 0, 0), 
         mem[_param1.length + 160 len -_param1.length + ceil32(_param1.length)]

def addPauser(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor1[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'PauserRole: caller does not have the Pauser role'
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if stor1[address(account)]:
      revert with 0, 'Roles: account already has role'
  stor1[address(account)] = 1
  log PauserAdded(address account=account)

def addWhitelisted(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor3[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 
                  'WhitelistAdminRole: caller does not have the WhitelistAdmin role'
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if stor4[address(account)]:
      revert with 0, 'Roles: account already has role'
  stor4[address(account)] = 1
  log WhitelistedAdded(address account=account)

def addWhitelistAdmin(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor3[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 
                  'WhitelistAdminRole: caller does not have the WhitelistAdmin role'
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if stor3[address(account)]:
      revert with 0, 'Roles: account already has role'
  stor3[address(account)] = 1
  log WhitelistAdminAdded(address account=account)

def removeWhitelisted(address account): # not payable
  require calldata.size - 4 >=′ 32
  require account == account
  if not caller:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor3[caller]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 
                  'WhitelistAdminRole: caller does not have the WhitelistAdmin role'
  if not account:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account is the zero address'
  if not stor4[address(account)]:
      revert with 0x8c379a000000000000000000000000000000000000000000000000000000000, 'Roles: account does not have role'
  stor4[address(account)] = 0
  log WhitelistedRemoved(address account=account)

Decompilation generated by Panoramix.

Raw bytecode

0x6080604052600436106101a15760003560e01c80636ef8d66d116100e1578063ca44f4651161008a578063d50fd1f411610064578063d50fd1f41461046c578063d6cd94731461048c578063fb80c747146104a1578063fc0a7f03146104c1576101a1565b8063ca44f46514610422578063d013429614610437578063d121b6961461044c576101a1565b80638456cb59116100bb5780638456cb59146103cd578063a971a0ad146103e2578063bb5f747b14610402576101a1565b80636ef8d66d146103785780637362d9c81461038d57806382dc1ec4146103ad576101a1565b80633af32abf1161014e5780634c5a628c116101285780634c5a628c146103245780635c60da1b146103395780635c975abb1461034e578063638900e114610363576101a1565b80633af32abf146102cf5780633f4ba83a146102ef57806346fbf68e14610304576101a1565b80632299bda61161017f5780632299bda614610262578063291d95491461028f57806335c80c8c146102af576101a1565b806310154bad146101e85780631761d7ce1461020a5780631f61aebe14610240575b6040517f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5436600083376000803684845af43d806000853e8180156101e4578185f35b8185fd5b3480156101f457600080fd5b50610208610203366004610b91565b6104e1565b005b34801561021657600080fd5b5061022a610225366004610b91565b61051d565b6040516102379190610eb0565b60405180910390f35b34801561024c57600080fd5b50610255610532565b6040516102379190610f3e565b34801561026e57600080fd5b5061028261027d366004610bec565b610538565b6040516102379190610e94565b34801561029b57600080fd5b506102086102aa366004610b91565b61055f565b3480156102bb57600080fd5b5061022a6102ca366004610b91565b61058f565b3480156102db57600080fd5b5061022a6102ea366004610b91565b6105e8565b3480156102fb57600080fd5b50610208610601565b34801561031057600080fd5b5061022a61031f366004610b91565b610694565b34801561033057600080fd5b506102086106a7565b34801561034557600080fd5b506102826106b9565b34801561035a57600080fd5b5061022a6106de565b34801561036f57600080fd5b506102556106e7565b34801561038457600080fd5b506102086106ed565b34801561039957600080fd5b506102086103a8366004610b91565b6106fd565b3480156103b957600080fd5b506102086103c8366004610b91565b61072d565b3480156103d957600080fd5b5061020861075d565b3480156103ee57600080fd5b506102556103fd366004610b91565b6107dd565b34801561040e57600080fd5b5061022a61041d366004610b91565b6107ef565b34801561042e57600080fd5b50610208610802565b34801561044357600080fd5b50610282610827565b34801561045857600080fd5b50610255610467366004610b91565b610836565b34801561047857600080fd5b50610255610487366004610b91565b610848565b34801561049857600080fd5b5061020861085a565b3480156104ad57600080fd5b5061022a6104bc366004610bb7565b61086a565b3480156104cd57600080fd5b506102826104dc366004610bec565b61088a565b6104ec61041d610897565b6105115760405162461bcd60e51b815260040161050890610f1e565b60405180910390fd5b61051a8161089b565b50565b60086020526000908152604090205460ff1681565b60095481565b6005818154811061054557fe5b6000918252602090912001546001600160a01b0316905081565b61056a61041d610897565b6105865760405162461bcd60e51b815260040161050890610f1e565b61051a816108e3565b6000805b6005548110156105e157826001600160a01b0316600582815481106105b457fe5b6000918252602090912001546001600160a01b031614156105d95760019150506105e3565b600101610593565b505b919050565b60006105fb60048363ffffffff61092b16565b92915050565b61060c61031f610897565b6106285760405162461bcd60e51b815260040161050890610ede565b60025460ff1661064a5760405162461bcd60e51b815260040161050890610ebe565b6002805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61067d610897565b60405161068a9190610ea2565b60405180910390a1565b60006105fb60018363ffffffff61092b16565b6106b76106b2610897565b610973565b565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b60025460ff1690565b600f5481565b6106b76106f8610897565b6109bb565b61070861041d610897565b6107245760405162461bcd60e51b815260040161050890610f1e565b61051a81610a03565b61073861031f610897565b6107545760405162461bcd60e51b815260040161050890610ede565b61051a81610a4b565b61076861031f610897565b6107845760405162461bcd60e51b815260040161050890610ede565b60025460ff16156107a75760405162461bcd60e51b815260040161050890610eee565b6002805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861067d610897565b600d6020526000908152604090205481565b60006105fb60038363ffffffff61092b16565b61080b3361058f565b6106b75760405162461bcd60e51b815260040161050890610f2e565b600e546001600160a01b031681565b600a6020526000908152604090205481565b600c6020526000908152604090205481565b6106b7610865610897565b6108e3565b805160208183018101805160078252928201919093012091525460ff1681565b6006818154811061054557fe5b3390565b6108ac60048263ffffffff610a9316565b6040516001600160a01b038216907fee1504a83b6d4a361f4c1dc78ab59bfa30d6a3b6612c403e86bb01ef2984295f90600090a250565b6108f460048263ffffffff610adf16565b6040516001600160a01b038216907f270d9b30cf5b0793bbfd54c9d5b94aeb49462b8148399000265144a8722da6b690600090a250565b60006001600160a01b0382166109535760405162461bcd60e51b815260040161050890610f0e565b506001600160a01b03166000908152602091909152604090205460ff1690565b61098460038263ffffffff610adf16565b6040516001600160a01b038216907f0a8eb35e5ca14b3d6f28e4abf2f128dbab231a58b56e89beb5d636115001e16590600090a250565b6109cc60018263ffffffff610adf16565b6040516001600160a01b038216907fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e90600090a250565b610a1460038263ffffffff610a9316565b6040516001600160a01b038216907f22380c05984257a1cb900161c713dd71d39e74820f1aea43bd3f1bdd2096129990600090a250565b610a5c60018263ffffffff610a9316565b6040516001600160a01b038216907f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f890600090a250565b610a9d828261092b565b15610aba5760405162461bcd60e51b815260040161050890610ece565b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b610ae9828261092b565b610b055760405162461bcd60e51b815260040161050890610efe565b6001600160a01b0316600090815260209190915260409020805460ff19169055565b80356105fb81610fe0565b600082601f830112610b4357600080fd5b8135610b56610b5182610f73565b610f4c565b91508082526020830160208301858383011115610b7257600080fd5b610b7d838284610fd4565b50505092915050565b80356105fb81610ff4565b600060208284031215610ba357600080fd5b6000610baf8484610b27565b949350505050565b600060208284031215610bc957600080fd5b813567ffffffffffffffff811115610be057600080fd5b610baf84828501610b32565b600060208284031215610bfe57600080fd5b6000610baf8484610b86565b610c1381610fc3565b82525050565b610c1381610fa4565b610c1381610faf565b6000610c38601483610f9b565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000815260200192915050565b6000610c71601f83610f9b565b7f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500815260200192915050565b6000610caa603083610f9b565b7f506175736572526f6c653a2063616c6c657220646f6573206e6f74206861766581527f207468652050617573657220726f6c6500000000000000000000000000000000602082015260400192915050565b6000610d09601083610f9b565b7f5061757361626c653a2070617573656400000000000000000000000000000000815260200192915050565b6000610d42602183610f9b565b7f526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c81527f6500000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610da1602283610f9b565b7f526f6c65733a206163636f756e7420697320746865207a65726f20616464726581527f7373000000000000000000000000000000000000000000000000000000000000602082015260400192915050565b6000610e00604083610f9b565b7f57686974656c69737441646d696e526f6c653a2063616c6c657220646f65732081527f6e6f742068617665207468652057686974656c69737441646d696e20726f6c65602082015260400192915050565b6000610e5f600d83610f9b565b7f6e6f7420637573746f6469616e00000000000000000000000000000000000000815260200192915050565b610c1381610fc0565b602081016105fb8284610c19565b602081016105fb8284610c0a565b602081016105fb8284610c22565b602080825281016105fb81610c2b565b602080825281016105fb81610c64565b602080825281016105fb81610c9d565b602080825281016105fb81610cfc565b602080825281016105fb81610d35565b602080825281016105fb81610d94565b602080825281016105fb81610df3565b602080825281016105fb81610e52565b602081016105fb8284610e8b565b60405181810167ffffffffffffffff81118282101715610f6b57600080fd5b604052919050565b600067ffffffffffffffff821115610f8a57600080fd5b506020601f91909101601f19160190565b90815260200190565b60006105fb82610fb4565b151590565b6001600160a01b031690565b90565b60006105fb8260006105fb82610fa4565b82818337506000910152565b610fe981610fa4565b811461051a57600080fd5b610fe981610fc0565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708115801590610baf575014159291505056fea365627a7a72315820400254e5b61e9a0fe0423d28929f2d6d85676f4c750413c403e0eae18d9ebf186c6578706572696d656e74616cf564736f6c634300050b0040