creation_sourcecode: {{
    "language": "Solidity",
    "sources": {
      "/contracts/StakingTransfer.sol": {
        "content": "// SPDX-License-Identifier: MIT\n\npragma solidity ^0.7.4;\n\ninterface IProxyAdmin {\n    function owner() external view returns (address);\n    function getProxyAdmin(address proxy) external view returns (address);\n    function getProxyImplementation(address proxy) external view returns (address);\n}\ninterface IERC20 {\n    function balanceOf(address account) external view returns (uint256);\n}\ncontract StakingTransfer {\n    address public constant oldOwner = 0xC1Ea2716f60433B564041A9411D5D1dE5364beB9;\n    address public newOwner = 0xC1Ea2716f60433B564041A9411D5D1dE5364beB9;\n    address public constant stakingPoolProxy = 0xb36ff0DDd5ce1276cA2A0E79FD5345897b9DE8d0;\n    address public constant stakingPoolImpl = 0xC79D590C904EDD4569ee69Cab04861496Ce62b1D;\n    address public constant bondly = 0x91dFbEE3965baAEE32784c2d546B7a0C62F268c9;\n    IProxyAdmin public proxyAdmin = IProxyAdmin(0xAfB606C04Cc6835A1fD1A42Cc2C3a93c0965C1E7);\n    uint256 public expiration;\n\n    constructor() {\n        expiration = block.timestamp + 3 days;\n    }\n\n    receive() external payable {}\n\n    function claim() external {\n        require(msg.sender == oldOwner, \"Only old owner can claim\");\n        require(expiration > block.timestamp, \"Contract expired\");\n        require(\n            proxyAdmin.owner() == newOwner &&\n                proxyAdmin.getProxyAdmin(stakingPoolProxy) == address(proxyAdmin) &&\n                proxyAdmin.getProxyImplementation(stakingPoolProxy) == stakingPoolImpl &&\n                IERC20(bondly).balanceOf(stakingPoolProxy) >= 58000000 * 1e18 - 7000000 * 1e18,\n            \"Conditions not met for transfer\"\n        );\n\n        (bool transferSuccess, ) = payable(oldOwner).call{value: address(this).balance}(\"\");\n        require(transferSuccess, \"ETH transfer failed\");\n    }\n\n    function recoverFunds() external {\n        require(proxyAdmin.owner() != newOwner, \"Ownership already tranferred\");\n        require(msg.sender == newOwner, \"Only new owner can recover funds\");\n        require(block.timestamp > expiration, \"Contract is not expired\");\n        (bool transferSuccess, ) = payable(newOwner).call{value: address(this).balance}(\"\");\n        require(transferSuccess, \"ETH transfer failed\");\n    }\n}\n"
      }
    },
    "settings": {
      "remappings": [],
      "optimizer": {
        "enabled": true,
        "runs": 200
      },
      "evmVersion": "istanbul",
      "libraries": {},
      "outputSelection": {
        "*": {
          "*": [
            "evm.bytecode",
            "evm.deployedBytecode",
            "devdoc",
            "userdoc",
            "metadata",
            "abi"
          ]
        }
      }
    }
  }}