// Contract: BTCETHSwap
// Target function: function swapPBTCforETH (uint256 amount, address payable recipient) public
pragma solidity ^0.8.7;

/* Interface for ERC20 Tokens */
abstract contract Token {
    function transferFrom(address _from, address _to, uint256 _value) public virtual returns (bool success);
}

abstract contract pToken {
    function redeem(uint256 _value, string memory destinationAddress, bytes4 destinationChainId) public virtual returns (bool _success);
}

interface Curve {
    function exchange_underlying(int128 i, int128 j, uint256 dx, uint256 min_dy, address receiver) external returns (uint256);
}

interface WETH {
    function withdraw(uint256 amount) external;
}

interface UniswapRouter {
    struct ExactInputSingleParams {
        address tokenIn;
        address tokenOut;
        uint24 fee;
        address recipient;
        uint256 deadline;
        uint256 amountIn;
        uint256 amountOutMinimum;
        uint160 sqrtPriceLimitX96;
    }

    function exactInputSingle(ExactInputSingleParams calldata params) external returns (uint256 amountOut);
}


contract BTCETHSwap {

    fallback() external {
        revert();
    }

    // ARB
    address public PBTC_ETH_ADDRESS = address(0x62199B909FB8B8cf870f97BEf2cE6783493c4908); 
    address public WBTC_ETH_ADDRESS = address(0x2260FAC5E5542a773Aa44fBCfeDf7C193bc2C599); 
    address public WETH_ETH_ADDRESS = address(0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2);
    address public CURVE_PBTC_POOL  = address(0xC9467E453620f16b57a34a770C6bceBECe002587);
    address public UNISWAP_ROUTER   = address(0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45);

    int128 public CURVE_WBTC_INDEX = 2;
    int128 public CURVE_PBTC_INDEX = 0;
    
    uint24 public UNISWAP_FEE = 300;
    bytes4 public PTOKENS_BTC_CHAINID = 0x01ec97de;


    // Constructor function, initializes the contract and sets the core variables
    constructor() {}