DECOMPILED SOLIDITY (Heimdall)
VERIFY
// SPDX-License-Identifier: MIT
pragma solidity > = 0.8 . 0 ;
/// @title Decompiled Contract
/// @author Jonathan Becker <jonathan@jbecker.dev>
/// @custom:version heimdall-rs v0.9.2
///
/// @notice This contract was decompiled using the heimdall-rs decompiler.
/// It was generated directly by tracing the EVM opcodes from this contract.
/// As a result, it may not compile or even be valid solidity code.
/// Despite this, it should be obvious what each function does. Overall
/// logic should have been preserved throughout decompiling.
///
/// @custom:github You can find the open-source decompiler here:
/// https://heimdall.rs
contract DecompiledContract {
uint256 public identifier;
address public owner;
mapping ( bytes32 = > bytes32 ) storage_map_f;
uint32 public optimisticOracleLiveness;
mapping ( bytes32 = > bytes32 ) storage_map_d;
mapping ( bytes32 = > bytes32 ) storage_map_i;
mapping ( bytes32 = > bytes32 ) storage_map_h;
mapping ( bytes32 = > bytes32 ) storage_map_g;
mapping ( bytes32 = > bytes32 ) storage_map_e;
address public finder;
event SetProposerBondPct( uint64 ) ;
event SetOptimisticOracleLiveness( uint32 ) ;
event SetMinimumBridgingDelay( uint256 , uint64 ) ;
event DepositsEnabled( uint256 , address , bool ) ;
event SetCrossDomainAdmin( uint256 , address ) ;
event OwnershipTransferred( address , address ) ;
/// @custom:selector 0x93444127
/// @custom:signature Unresolved_93444127(uint256 arg0, address arg1) public pure
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
function Unresolved_93444127( uint256 arg0, address arg1) public pure {
require ( arg1 = = ( address ( arg1) ) ) ;
}
/// @custom:selector 0x715018a6
/// @custom:signature renounceOwnership() public
function renounceOwnership( ) public {
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
emit OwnershipTransferred( address ( owner) , 0 ) ;
owner = uint96 ( owner) ;
}
/// @custom:selector 0xf2fde38b
/// @custom:signature transferOwnership(address arg0) public
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
function transferOwnership( address arg0) public {
require ( arg0 = = ( address ( arg0) ) ) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
require ( address ( arg0) , "Ownable: new owner is the zero address" ) ;
emit OwnershipTransferred( address ( owner) , address ( arg0) ) ;
owner = ( address ( arg0) ) | ( uint96 ( owner) ) ;
}
/// @custom:selector 0x50a7c20e
/// @custom:signature transferBridgePoolAdmin(address[] arg0, address arg1) public pure
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
function transferBridgePoolAdmin( address [ ] arg0, address arg1) public pure {
require ( ! arg0 > 0xffffffffffffffff ) ;
require ( ! ( arg0) > 0xffffffffffffffff ) ;
require ( ! ( ( var_c + ( uint248 ( ( arg0 < < 0x05 ) + 0x3f ) ) ) > 0xffffffffffffffff ) | ( ( var_c + ( uint248 ( ( arg0 < < 0x05 ) + 0x3f ) ) ) < var_c) ) ;
require ( ! ( 0x20 + ( 0x04 + arg0) ) < ( 0x20 + ( ( arg0 < < 0x05 ) + ( 0x04 + arg0) ) ) ) ;
require ( ( 0x20 + ( arg0) ) = = ( address ( 0x20 + ( arg0) ) ) ) ;
}
/// @custom:selector 0xbf06c19a
/// @custom:signature whitelistedTokens(address arg0, uint256 arg1) public view returns (bytes memory)
/// @param arg0 ["address", "uint160", "bytes20", "int160"]
/// @param arg1 ["uint256", "bytes32", "int256"]
function whitelistedTokens( address arg0, uint256 arg1) public view returns ( bytes memory ) {
require ( arg0 = = ( address ( arg0) ) ) ;
var_a = arg1;
var_a = address ( arg0) ;
return abi. encodePacked( address ( storage_map_d[ var_a] ) , address ( storage_map_e[ var_a] ) ) ;
}
/// @custom:selector 0x63e463f4
/// @custom:signature setOptimisticOracleLiveness(uint32 arg0) public
/// @param arg0 ["uint32", "bytes4", "int32"]
function setOptimisticOracleLiveness( uint32 arg0) public {
require ( arg0 = = ( uint32 ( arg0) ) ) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
require ( bytes1 ( owner / 0x010000000000000000000000000000000000000000 ) , "Liveness too large" ) ;
owner = uint248 ( owner) ;
require ( uint32 ( arg0) < 0xbb744800 , "Liveness too large" ) ;
require ( uint32 ( arg0) > 0 , "Liveness cannot be 0" ) ;
optimisticOracleLiveness = ( uint32 ( arg0) ) | ( uint224( optimisticOracleLiveness) ) ;
emit SetOptimisticOracleLiveness( uint32 ( arg0) ) ;
owner = 0x010000000000000000000000000000000000000000 | ( uint248 ( owner) ) ;
}
/// @custom:selector 0xaae3863e
/// @custom:signature Unresolved_aae3863e(uint256 arg0, address arg1) public pure
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
function Unresolved_aae3863e( uint256 arg0, address arg1) public pure {
require ( arg1 = = ( address ( arg1) ) ) ;
}
/// @custom:selector 0x47448521
/// @custom:signature Unresolved_47448521(uint256 arg0, address arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5, uint256 arg6) public payable
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
/// @param arg2 ["uint256", "bytes32", "int256"]
/// @param arg3 ["uint256", "bytes32", "int256"]
/// @param arg4 ["uint256", "bytes32", "int256"]
/// @param arg5 ["uint256", "bytes32", "int256"]
/// @param arg6 ["uint256", "bytes32", "int256"]
function Unresolved_47448521( uint256 arg0, address arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5, uint256 arg6) public payable {
require ( arg1 = = ( address ( arg1) ) ) ;
require ( arg2 = = arg2) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
uint256 var_e = arg0;
require ( ! ( address ( storage_map_f[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( ! ( ! address ( storage_map_g[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( bytes1 ( owner / 0x010000000000000000000000000000000000000000 ) , "Wrong number of ETH sent" ) ;
owner = uint248 ( owner) ;
var_e = arg0;
uint256 var_g = 0x64 + var_g;
require ( arg3 = = msg. value, "Wrong number of ETH sent" ) ;
uint256 var_k = address ( storage_map_f[ var_e] ) ;
uint256 var_m = arg3;
require ( ! 0 > var_g. length) ;
require ( address ( storage_map_g[ var_e] ) . code. length) ;
( bool success, bytes memory ret0) = address ( storage_map_g[ var_e] ) . { value: var_m } Unresolved_9e353c70( var_k) ; // call
emit DepositsEnabled( arg0, address ( arg1) , arg2) ;
owner = 0x010000000000000000000000000000000000000000 | ( uint248 ( owner) ) ;
}
/// @custom:selector 0x7eb4fa73
/// @custom:signature depositContracts(uint256 arg0) public view returns (bytes memory)
/// @param arg0 ["uint256", "bytes32", "int256"]
function depositContracts( uint256 arg0) public view returns ( bytes memory ) {
uint256 var_d = arg0;
var_a = 0x40 + var_a;
return abi. encodePacked( address ( var_a. length) , address ( var_k) ) ;
}
/// @custom:selector 0x7d726c75
/// @custom:signature setMinimumBridgingDelay(uint256 arg0, uint64 arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5) public payable
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["uint64", "bytes8", "int64"]
/// @param arg2 ["uint256", "bytes32", "int256"]
/// @param arg3 ["uint256", "bytes32", "int256"]
/// @param arg4 ["uint256", "bytes32", "int256"]
/// @param arg5 ["uint256", "bytes32", "int256"]
function setMinimumBridgingDelay( uint256 arg0, uint64 arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5) public payable {
require ( arg1 = = ( uint64 ( arg1) ) ) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
uint256 var_e = arg0;
require ( ! ( address ( storage_map_f[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( ! ( ! address ( storage_map_g[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( bytes1 ( owner / 0x010000000000000000000000000000000000000000 ) , "Wrong number of ETH sent" ) ;
owner = uint248 ( owner) ;
var_e = arg0;
uint256 var_g = 0x44 + var_g;
require ( arg2 = = msg. value, "Wrong number of ETH sent" ) ;
uint256 var_j = address ( storage_map_f[ var_e] ) ;
uint256 var_l = arg2;
require ( ! 0 > var_g. length) ;
require ( address ( storage_map_g[ var_e] ) . code. length) ;
( bool success, bytes memory ret0) = address ( storage_map_g[ var_e] ) . { value: var_l } Unresolved_9e353c70( var_j) ; // call
emit SetMinimumBridgingDelay( arg0, uint64 ( arg1) ) ;
owner = 0x010000000000000000000000000000000000000000 | ( uint248 ( owner) ) ;
}
/// @custom:selector 0xb0915850
/// @custom:signature setProposerBondPct(uint64 arg0) public
/// @param arg0 ["uint64", "bytes8", "int64"]
function setProposerBondPct( uint64 arg0) public {
require ( arg0 = = ( uint64 ( arg0) ) ) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
require ( bytes1 ( owner / 0x010000000000000000000000000000000000000000 ) , "ReentrancyGuard: reentrant call" ) ;
owner = uint248 ( owner) ;
optimisticOracleLiveness = ( 0x0100000000 * ( uint64 ( arg0) ) ) | ( uint192( optimisticOracleLiveness) ) ;
emit SetProposerBondPct( uint64 ( ( 0x0100000000 * ( arg0) ) | ( uint192( optimisticOracleLiveness) ) / 0x0100000000 ) ) ;
owner = 0x010000000000000000000000000000000000000000 | ( uint248 ( owner) ) ;
}
/// @custom:selector 0x0a69da28
/// @custom:signature setCrossDomainAdmin(uint256 arg0, address arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5) public payable
/// @param arg0 ["uint256", "bytes32", "int256"]
/// @param arg1 ["address", "uint160", "bytes20", "int160"]
/// @param arg2 ["uint256", "bytes32", "int256"]
/// @param arg3 ["uint256", "bytes32", "int256"]
/// @param arg4 ["uint256", "bytes32", "int256"]
/// @param arg5 ["uint256", "bytes32", "int256"]
function setCrossDomainAdmin( uint256 arg0, address arg1, uint256 arg2, uint256 arg3, uint256 arg4, uint256 arg5) public payable {
require ( arg1 = = ( address ( arg1) ) ) ;
require ( msg. sender = = ( address ( owner) ) , "Ownable: caller is not the owner" ) ;
uint256 var_e = arg0;
require ( ! ( address ( storage_map_f[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( ! ( ! address ( storage_map_g[ var_e] ) ) , "Wrong number of ETH sent" ) ;
require ( bytes1 ( owner / 0x010000000000000000000000000000000000000000 ) , "Wrong number of ETH sent" ) ;
owner = uint248 ( owner) ;
require ( address ( arg1) , "Wrong number of ETH sent" ) ;
var_e = arg0;
uint256 var_g = 0x44 + var_g;
require ( arg2 = = msg. value, "Wrong number of ETH sent" ) ;
uint256 var_j = address ( storage_map_f[ var_e] ) ;
uint256 var_l = arg2;
require ( ! 0 > var_g. length) ;
require ( address ( storage_map_g[ var_e] ) . code. length) ;
( bool success, bytes memory ret0) = address ( storage_map_g[ var_e] ) . { value: var_l } Unresolved_9e353c70( var_j) ; // call
emit SetCrossDomainAdmin( arg0, address ( arg1) ) ;
owner = 0x010000000000000000000000000000000000000000 | ( uint248 ( owner) ) ;
}
}
ABI
[
{
"type": "function",
"name": "Unresolved_47448521",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "address"
},
{
"name": "arg2",
"type": "uint256"
},
{
"name": "arg3",
"type": "uint256"
},
{
"name": "arg4",
"type": "uint256"
},
{
"name": "arg5",
"type": "uint256"
},
{
"name": "arg6",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "Unresolved_93444127",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "Unresolved_aae3863e",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "depositContracts",
"inputs": [
{
"name": "arg0",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bytes"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "finder",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "identifier",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint256"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "optimisticOracleLiveness",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint32"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "owner",
"inputs": [],
"outputs": [
{
"name": "",
"type": "address"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "proposerBondPct",
"inputs": [],
"outputs": [
{
"name": "",
"type": "uint64"
}
],
"stateMutability": "view"
},
{
"type": "function",
"name": "renounceOwnership",
"inputs": [],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setCrossDomainAdmin",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "address"
},
{
"name": "arg2",
"type": "uint256"
},
{
"name": "arg3",
"type": "uint256"
},
{
"name": "arg4",
"type": "uint256"
},
{
"name": "arg5",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "setMinimumBridgingDelay",
"inputs": [
{
"name": "arg0",
"type": "uint256"
},
{
"name": "arg1",
"type": "uint64"
},
{
"name": "arg2",
"type": "uint256"
},
{
"name": "arg3",
"type": "uint256"
},
{
"name": "arg4",
"type": "uint256"
},
{
"name": "arg5",
"type": "uint256"
}
],
"outputs": [],
"stateMutability": "payable"
},
{
"type": "function",
"name": "setOptimisticOracleLiveness",
"inputs": [
{
"name": "arg0",
"type": "uint32"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "setProposerBondPct",
"inputs": [
{
"name": "arg0",
"type": "uint64"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "transferBridgePoolAdmin",
"inputs": [
{
"name": "arg0",
"type": "address[]"
},
{
"name": "arg1",
"type": "address"
}
],
"outputs": [],
"stateMutability": "pure"
},
{
"type": "function",
"name": "transferOwnership",
"inputs": [
{
"name": "arg0",
"type": "address"
}
],
"outputs": [],
"stateMutability": "nonpayable"
},
{
"type": "function",
"name": "whitelistedTokens",
"inputs": [
{
"name": "arg0",
"type": "address"
},
{
"name": "arg1",
"type": "uint256"
}
],
"outputs": [
{
"name": "",
"type": "bytes"
}
],
"stateMutability": "view"
},
{
"type": "event",
"name": "DepositsEnabled",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
},
{
"name": "arg1",
"type": "address",
"indexed": false
},
{
"name": "arg2",
"type": "bool",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "OwnershipTransferred",
"inputs": [
{
"name": "arg0",
"type": "address",
"indexed": false
},
{
"name": "arg1",
"type": "address",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetCrossDomainAdmin",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
},
{
"name": "arg1",
"type": "address",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetMinimumBridgingDelay",
"inputs": [
{
"name": "arg0",
"type": "uint256",
"indexed": false
},
{
"name": "arg1",
"type": "uint64",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetOptimisticOracleLiveness",
"inputs": [
{
"name": "arg0",
"type": "uint32",
"indexed": false
}
],
"anonymous": false
},
{
"type": "event",
"name": "SetProposerBondPct",
"inputs": [
{
"name": "arg0",
"type": "uint64",
"indexed": false
}
],
"anonymous": false
}
]