ETH Price: $3,122.29 (+2.15%)

Contract

0x0031130c56162e00A7e9C01eE4147b11cbac8776
 

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
0x60a06040150187962022-06-24 14:43:45878 days ago1656081825IN
 Create: CurveStEthBridge
0 ETH0.0482723354.78600236

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
185050102023-11-05 9:47:23380 days ago1699177643
0x0031130c...1cbac8776
0.00000017 ETH
185050102023-11-05 9:47:23380 days ago1699177643
0x0031130c...1cbac8776
0.00000017 ETH
156639592022-10-03 0:10:47778 days ago1664755847
0x0031130c...1cbac8776
0.0261342 ETH
156639592022-10-03 0:10:47778 days ago1664755847
0x0031130c...1cbac8776
0.0261342 ETH
156568092022-10-02 0:15:47779 days ago1664669747
0x0031130c...1cbac8776
0.579249 ETH
156568092022-10-02 0:15:47779 days ago1664669747
0x0031130c...1cbac8776
0.579249 ETH
156555172022-10-01 19:54:47779 days ago1664654087
0x0031130c...1cbac8776
4.36255527 ETH
156555172022-10-01 19:54:47779 days ago1664654087
0x0031130c...1cbac8776
4.36255527 ETH
156317932022-09-28 12:19:47782 days ago1664367587
0x0031130c...1cbac8776
0.61102189 ETH
156317932022-09-28 12:19:47782 days ago1664367587
0x0031130c...1cbac8776
0.61102189 ETH
156281682022-09-28 0:10:35783 days ago1664323835
0x0031130c...1cbac8776
0.41064203 ETH
156281682022-09-28 0:10:35783 days ago1664323835
0x0031130c...1cbac8776
0.41064203 ETH
156246372022-09-27 12:17:47783 days ago1664281067
0x0031130c...1cbac8776
2.46799033 ETH
156246372022-09-27 12:17:47783 days ago1664281067
0x0031130c...1cbac8776
2.46799033 ETH
156214962022-09-27 1:45:23784 days ago1664243123
0x0031130c...1cbac8776
2.9301419 ETH
156214962022-09-27 1:45:23784 days ago1664243123
0x0031130c...1cbac8776
2.9301419 ETH
156210272022-09-27 0:10:23784 days ago1664237423
0x0031130c...1cbac8776
3.2942564 ETH
156210272022-09-27 0:10:23784 days ago1664237423
0x0031130c...1cbac8776
3.2942564 ETH
156174602022-09-26 12:10:35784 days ago1664194235
0x0031130c...1cbac8776
0.18606097 ETH
156174602022-09-26 12:10:35784 days ago1664194235
0x0031130c...1cbac8776
0.18606097 ETH
156173562022-09-26 11:49:47784 days ago1664192987
0x0031130c...1cbac8776
8.9248487 ETH
156173562022-09-26 11:49:47784 days ago1664192987
0x0031130c...1cbac8776
8.9248487 ETH
155995442022-09-24 0:10:35787 days ago1663978235
0x0031130c...1cbac8776
0.18527199 ETH
155995442022-09-24 0:10:35787 days ago1663978235
0x0031130c...1cbac8776
0.18527199 ETH
155982892022-09-23 19:59:11787 days ago1663963151
0x0031130c...1cbac8776
7.31847799 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CurveStEthBridge

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 12 : CurveStEthBridge.sol
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec.
pragma solidity >=0.8.4;

import {ICurvePool} from "../../interfaces/curve/ICurvePool.sol";
import {ILido} from "../../interfaces/lido/ILido.sol";
import {IWstETH} from "../../interfaces/lido/IWstETH.sol";
import {IRollupProcessor} from "../../aztec/interfaces/IRollupProcessor.sol";

import {BridgeBase} from "../base/BridgeBase.sol";
import {ErrorLib} from "../base/ErrorLib.sol";
import {AztecTypes} from "../../aztec/libraries/AztecTypes.sol";

import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";

/**
 * @notice A DeFiBridge for trading between Eth and wstEth using curve and the stEth wrapper.
 * @dev Synchronous and stateless bridge that will hold no funds beyond dust for gas-savings.
 * @author Aztec Team
 */
contract CurveStEthBridge is BridgeBase {
    using SafeERC20 for ILido;
    using SafeERC20 for IWstETH;

    error InvalidConfiguration();
    error InvalidUnwrapReturnValue();

    ILido public constant LIDO = ILido(0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84);
    IWstETH public constant WRAPPED_STETH = IWstETH(0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0);
    ICurvePool public constant CURVE_POOL = ICurvePool(0xDC24316b9AE028F1497c275EB9192a3Ea0f67022);

    // Indexes of the assets in the curve pool
    int128 private constant CURVE_ETH_INDEX = 0;
    int128 private constant CURVE_STETH_INDEX = 1;

    /**
     * @notice Sets the address of the RollupProcessor and pre-approve tokens
     * @dev As the contract will not be holding state nor tokens, it can be approved safely.
     * @param _rollupProcessor The address of the RollupProcessor to use
     */
    constructor(address _rollupProcessor) BridgeBase(_rollupProcessor) {
        if (CURVE_POOL.coins(uint256(uint128(CURVE_STETH_INDEX))) != address(LIDO)) {
            revert InvalidConfiguration();
        }

        LIDO.safeIncreaseAllowance(address(WRAPPED_STETH), type(uint256).max);
        LIDO.safeIncreaseAllowance(address(CURVE_POOL), type(uint256).max);
        WRAPPED_STETH.safeIncreaseAllowance(ROLLUP_PROCESSOR, type(uint256).max);
    }

    // Empty receive function for the contract to be able to receive Eth
    receive() external payable {}

    /**
     * @notice Swaps between the eth<->wstEth tokens through the curve eth/stEth pool and wrapping stEth
     * @param _inputAssetA The inputAsset (eth or wstEth)
     * @param _outputAssetA The output asset (eth or wstEth) opposite `_inputAssetB`
     * @param _inputValue The amount of token deposited
     * @param _interactionNonce The nonce of the DeFi interaction, used when swapping wstEth -> eth
     * @return outputValueA The amount of `_outputAssetA` that the RollupProcessor should pull
     */
    function convert(
        AztecTypes.AztecAsset calldata _inputAssetA,
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata _outputAssetA,
        AztecTypes.AztecAsset calldata,
        uint256 _inputValue,
        uint256 _interactionNonce,
        uint64,
        address
    )
        external
        payable
        override(BridgeBase)
        onlyRollup
        returns (
            uint256 outputValueA,
            uint256,
            bool
        )
    {
        bool isETHInput = _inputAssetA.assetType == AztecTypes.AztecAssetType.ETH;
        bool isWstETHInput = _inputAssetA.assetType == AztecTypes.AztecAssetType.ERC20 &&
            _inputAssetA.erc20Address == address(WRAPPED_STETH);

        if (!(isETHInput || isWstETHInput)) {
            revert ErrorLib.InvalidInputA();
        }

        outputValueA = isETHInput
            ? _wrapETH(_inputValue, _outputAssetA)
            : _unwrapETH(_inputValue, _outputAssetA, _interactionNonce);
    }

    /**
     * @notice Swaps eth to stEth through curve and wrap the stEth into wstEth
     * @dev Reverts if `_outputAsset` is not wstEth
     * @param _inputValue The amount of token that is deposited
     * @param _outputAsset The asset that the DeFi interaction specify as output, must be wstEth
     * @return outputValue The amount of wstEth received from the interaction
     */
    function _wrapETH(uint256 _inputValue, AztecTypes.AztecAsset calldata _outputAsset)
        private
        returns (uint256 outputValue)
    {
        if (
            _outputAsset.assetType != AztecTypes.AztecAssetType.ERC20 ||
            _outputAsset.erc20Address != address(WRAPPED_STETH)
        ) {
            revert ErrorLib.InvalidOutputA();
        }

        // Swap eth -> stEth on curve
        uint256 dy = CURVE_POOL.exchange{value: _inputValue}(CURVE_ETH_INDEX, CURVE_STETH_INDEX, _inputValue, 0);

        // wrap stEth
        outputValue = WRAPPED_STETH.wrap(dy);
    }

    /**
     * @notice Unwraps wstEth and swap stEth to eth through curve
     * @dev Reverts if `_outputAsset` is not eth
     * @param _inputValue The amount of token that is deposited
     * @param _outputAsset The asset that the DeFi interaction specify as output, must be eth
     * @return outputValue The amount of eth received from the interaction
     */
    function _unwrapETH(
        uint256 _inputValue,
        AztecTypes.AztecAsset calldata _outputAsset,
        uint256 _interactionNonce
    ) private returns (uint256 outputValue) {
        if (_outputAsset.assetType != AztecTypes.AztecAssetType.ETH) {
            revert ErrorLib.InvalidOutputA();
        }

        // Convert wstETH to stETH so we can exchange it on curve
        uint256 stETH = WRAPPED_STETH.unwrap(_inputValue);

        // Exchange stETH to ETH via curve
        uint256 dy = CURVE_POOL.exchange(CURVE_STETH_INDEX, CURVE_ETH_INDEX, stETH, 0);

        outputValue = address(this).balance;
        if (outputValue < dy) {
            revert InvalidUnwrapReturnValue();
        }

        // Send ETH to rollup processor
        IRollupProcessor(ROLLUP_PROCESSOR).receiveEthFromBridge{value: outputValue}(_interactionNonce);
    }
}

File 2 of 12 : ICurvePool.sol
// SPDX-License-Identifier: GPLv2
pragma solidity >=0.8.4;

interface ICurvePool {
    function coins(uint256) external view returns (address);

    function get_dy(
        int128 i,
        int128 j,
        uint256 dx
    ) external view returns (uint256);

    function exchange(
        int128 i,
        int128 j,
        uint256 dx,
        uint256 min_dy
    ) external payable returns (uint256);
}

File 3 of 12 : ILido.sol
// SPDX-License-Identifier: GPLv2
pragma solidity >=0.8.4;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface ILido is IERC20 {
    function getTotalShares() external view returns (uint256);

    function sharesOf(address _account) external view returns (uint256);

    function getSharesByPooledEth(uint256 _amount) external view returns (uint256);

    function getPooledEthByShares(uint256 _amount) external view returns (uint256);

    function submit(address _referral) external payable returns (uint256);
}

File 4 of 12 : IWstETH.sol
// SPDX-License-Identifier: GPLv2
pragma solidity >=0.8.4;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IWstETH is IERC20 {
    function wrap(uint256 _stETHAmount) external returns (uint256);

    function unwrap(uint256 _wstETHAmount) external returns (uint256);

    function getStETHByWstETH(uint256 _wstETHAmount) external view returns (uint256);

    function getWstETHByStETH(uint256 _stETHAmount) external view returns (uint256);
}

File 5 of 12 : IRollupProcessor.sol
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec
pragma solidity >=0.8.4;

interface IRollupProcessor {
    /*----------------------------------------
      MUTATING FUNCTIONS
      ----------------------------------------*/

    function pause() external;

    function unpause() external;

    function setRollupProvider(address providerAddress, bool valid) external;

    function setVerifier(address verifierAddress) external;

    function setAllowThirdPartyContracts(bool _flag) external;

    function setDefiBridgeProxy(address feeDistributorAddress) external;

    function setSupportedAsset(address linkedToken, uint256 gasLimit) external;

    function setSupportedBridge(address linkedBridge, uint256 gasLimit) external;

    function processRollup(bytes calldata proofData, bytes calldata signatures) external;

    function receiveEthFromBridge(uint256 interactionNonce) external payable;

    function approveProof(bytes32 _proofHash) external;

    function depositPendingFunds(
        uint256 assetId,
        uint256 amount,
        address owner,
        bytes32 proofHash
    ) external payable;

    function depositPendingFundsPermit(
        uint256 assetId,
        uint256 amount,
        address owner,
        bytes32 proofHash,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function depositPendingFundsPermitNonStandard(
        uint256 assetId,
        uint256 amount,
        address owner,
        bytes32 proofHash,
        uint256 nonce,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    function offchainData(
        uint256 rollupId,
        uint256 chunk,
        uint256 totalChunks,
        bytes calldata offchainTxData
    ) external;

    function processAsyncDefiInteraction(uint256 interactionNonce) external returns (bool);

    /*----------------------------------------
      NON-MUTATING FUNCTIONS
      ----------------------------------------*/

    function rollupStateHash() external view returns (bytes32);

    function userPendingDeposits(uint256 assetId, address userAddress) external view returns (uint256);

    function defiBridgeProxy() external view returns (address);

    function prevDefiInteractionsHash() external view returns (bytes32);

    function paused() external view returns (bool);

    function verifier() external view returns (address);

    function getDataSize() external view returns (uint256);

    function getPendingDefiInteractionHashesLength() external view returns (uint256);

    function getDefiInteractionHashesLength() external view returns (uint256);

    function getAsyncDefiInteractionHashesLength() external view returns (uint256 res);

    function getSupportedBridge(uint256 bridgeAddressId) external view returns (address);

    function getSupportedBridgesLength() external view returns (uint256);

    function getSupportedAssetsLength() external view returns (uint256);

    function getSupportedAsset(uint256 assetId) external view returns (address);

    function getBridgeGasLimit(uint256 bridgeAddressId) external view returns (uint256);

    function getEscapeHatchStatus() external view returns (bool, uint256);

    function getDefiInteractionHashes() external view returns (bytes32[] memory);

    function getAsyncDefiInteractionHashes() external view returns (bytes32[] memory);

    function getSupportedAssets() external view returns (address[] memory, uint256[] memory);

    function getSupportedBridges() external view returns (address[] memory, uint256[] memory);
}

File 6 of 12 : BridgeBase.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2022 Spilsbury Holdings Ltd
pragma solidity >=0.8.4;

import {IDefiBridge} from "../../aztec/interfaces/IDefiBridge.sol";
import {AztecTypes} from "../../aztec/libraries/AztecTypes.sol";
import {ErrorLib} from "./ErrorLib.sol";

/**
 * @title BridgeBase
 * @notice A base that bridges can be built upon which imports a limited set of features
 * @dev Reverts `convert` with missing implementation, and `finalise` with async disabled
 * @author Lasse Herskind
 */
abstract contract BridgeBase is IDefiBridge {
    error MissingImplementation();

    address public immutable ROLLUP_PROCESSOR;

    constructor(address _rollupProcessor) {
        ROLLUP_PROCESSOR = _rollupProcessor;
    }

    modifier onlyRollup() {
        if (msg.sender != ROLLUP_PROCESSOR) {
            revert ErrorLib.InvalidCaller();
        }
        _;
    }

    function convert(
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        uint256,
        uint256,
        uint64,
        address
    )
        external
        payable
        virtual
        override(IDefiBridge)
        returns (
            uint256,
            uint256,
            bool
        )
    {
        revert MissingImplementation();
    }

    function finalise(
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        AztecTypes.AztecAsset calldata,
        uint256,
        uint64
    )
        external
        payable
        virtual
        override(IDefiBridge)
        returns (
            uint256,
            uint256,
            bool
        )
    {
        revert ErrorLib.AsyncDisabled();
    }
}

File 7 of 12 : ErrorLib.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2022 Spilsbury Holdings Ltd
pragma solidity >=0.8.4;

library ErrorLib {
    error InvalidCaller();

    error InvalidInput();
    error InvalidInputA();
    error InvalidInputB();
    error InvalidOutputA();
    error InvalidOutputB();
    error InvalidInputAmount();
    error InvalidAuxData();

    error ApproveFailed(address token);
    error TransferFailed(address token);

    error InvalidNonce();
    error AsyncDisabled();
}

File 8 of 12 : AztecTypes.sol
// SPDX-License-Identifier: Apache-2.0
// Copyright 2022 Aztec
pragma solidity >=0.8.4;

library AztecTypes {
    enum AztecAssetType {
        NOT_USED,
        ETH,
        ERC20,
        VIRTUAL
    }

    struct AztecAsset {
        uint256 id;
        address erc20Address;
        AztecAssetType assetType;
    }
}

File 9 of 12 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 10 of 12 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);
}

File 11 of 12 : IDefiBridge.sol
// SPDX-License-Identifier: GPL-2.0-only
// Copyright 2022 Spilsbury Holdings Ltd
pragma solidity >=0.8.4;

import {AztecTypes} from "../libraries/AztecTypes.sol";

interface IDefiBridge {
    /**
     * Input cases:
     * Case1: 1 real input.
     * Case2: 1 virtual asset input.
     * Case3: 1 real 1 virtual input.
     *
     * Output cases:
     * Case1: 1 real
     * Case2: 2 real
     * Case3: 1 real 1 virtual
     * Case4: 1 virtual
     *
     * Example use cases with asset mappings
     * 1 1: Swapping.
     * 1 2: Swapping with incentives (2nd output reward token).
     * 1 3: Borrowing. Lock up collateral, get back loan asset and virtual position asset.
     * 1 4: Opening lending position OR Purchasing NFT. Input real asset, get back virtual asset representing NFT or position.
     * 2 1: Selling NFT. Input the virtual asset, get back a real asset.
     * 2 2: Closing a lending position. Get back original asset and reward asset.
     * 2 3: Claiming fees from an open position.
     * 2 4: Voting on a 1 4 case.
     * 3 1: Repaying a borrow. Return loan plus interest. Get collateral back.
     * 3 2: Repaying a borrow. Return loan plus interest. Get collateral plus reward token. (AAVE)
     * 3 3: Partial loan repayment.
     * 3 4: DAO voting stuff.
     */

    // @dev This function is called from the RollupProcessor.sol contract via the DefiBridgeProxy. It receives the aggregate sum of all users funds for the input assets.
    // @param AztecAsset inputAssetA a struct detailing the first input asset, this will always be set
    // @param AztecAsset inputAssetB an optional struct detailing the second input asset, this is used for repaying borrows and should be virtual
    // @param AztecAsset outputAssetA a struct detailing the first output asset, this will always be set
    // @param AztecAsset outputAssetB a struct detailing an optional second output asset
    // @param uint256 inputValue, the total amount input, if there are two input assets, equal amounts of both assets will have been input
    // @param uint256 interactionNonce a globally unique identifier for this DeFi interaction. This is used as the assetId if one of the output assets is virtual
    // @param uint64 auxData other data to be passed into the bridge contract (slippage / nftID etc)
    // @return uint256 outputValueA the amount of outputAssetA returned from this interaction, should be 0 if async
    // @return uint256 outputValueB the amount of outputAssetB returned from this interaction, should be 0 if async or bridge only returns 1 asset.
    // @return bool isAsync a flag to toggle if this bridge interaction will return assets at a later date after some third party contract has interacted with it via finalise()
    function convert(
        AztecTypes.AztecAsset calldata inputAssetA,
        AztecTypes.AztecAsset calldata inputAssetB,
        AztecTypes.AztecAsset calldata outputAssetA,
        AztecTypes.AztecAsset calldata outputAssetB,
        uint256 inputValue,
        uint256 interactionNonce,
        uint64 auxData,
        address rollupBeneficiary
    )
        external
        payable
        returns (
            uint256 outputValueA,
            uint256 outputValueB,
            bool isAsync
        );

    // @dev This function is called from the RollupProcessor.sol contract via the DefiBridgeProxy. It receives the aggregate sum of all users funds for the input assets.
    // @param AztecAsset inputAssetA a struct detailing the first input asset, this will always be set
    // @param AztecAsset inputAssetB an optional struct detailing the second input asset, this is used for repaying borrows and should be virtual
    // @param AztecAsset outputAssetA a struct detailing the first output asset, this will always be set
    // @param AztecAsset outputAssetB a struct detailing an optional second output asset
    // @param uint256 interactionNonce
    // @param uint64 auxData other data to be passed into the bridge contract (slippage / nftID etc)
    // @return uint256 outputValueA the return value of output asset A
    // @return uint256 outputValueB optional return value of output asset B
    // @dev this function should have a modifier on it to ensure it can only be called by the Rollup Contract
    function finalise(
        AztecTypes.AztecAsset calldata inputAssetA,
        AztecTypes.AztecAsset calldata inputAssetB,
        AztecTypes.AztecAsset calldata outputAssetA,
        AztecTypes.AztecAsset calldata outputAssetB,
        uint256 interactionNonce,
        uint64 auxData
    )
        external
        payable
        returns (
            uint256 outputValueA,
            uint256 outputValueB,
            bool interactionComplete
        );
}

File 12 of 12 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_rollupProcessor","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AsyncDisabled","type":"error"},{"inputs":[],"name":"InvalidCaller","type":"error"},{"inputs":[],"name":"InvalidConfiguration","type":"error"},{"inputs":[],"name":"InvalidInputA","type":"error"},{"inputs":[],"name":"InvalidOutputA","type":"error"},{"inputs":[],"name":"InvalidUnwrapReturnValue","type":"error"},{"inputs":[],"name":"MissingImplementation","type":"error"},{"inputs":[],"name":"CURVE_POOL","outputs":[{"internalType":"contract ICurvePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LIDO","outputs":[{"internalType":"contract ILido","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLLUP_PROCESSOR","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WRAPPED_STETH","outputs":[{"internalType":"contract IWstETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"_inputAssetA","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"_outputAssetA","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"internalType":"uint256","name":"_inputValue","type":"uint256"},{"internalType":"uint256","name":"_interactionNonce","type":"uint256"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"address","name":"","type":"address"}],"name":"convert","outputs":[{"internalType":"uint256","name":"outputValueA","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"address","name":"erc20Address","type":"address"},{"internalType":"enum AztecTypes.AztecAssetType","name":"assetType","type":"uint8"}],"internalType":"struct AztecTypes.AztecAsset","name":"","type":"tuple"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint64","name":"","type":"uint64"}],"name":"finalise","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"payable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60a06040523480156200001157600080fd5b506040516200129b3803806200129b833981016040819052620000349162000522565b6001600160a01b03811660805260405163c661065760e01b81526001600482015273ae7ab96520de3a18e5e111b5eaab095312d7fe849073dc24316b9ae028f1497c275eb9192a3ea0f670229063c661065790602401602060405180830381865afa158015620000a8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ce919062000522565b6001600160a01b031614620000f65760405163c52a9bd360e01b815260040160405180910390fd5b6200013973ae7ab96520de3a18e5e111b5eaab095312d7fe84737f39c581f595b53c5cb19bd0b3f8da6c935e2ca0600019620001c0602090811b620002c917901c565b6200017c73ae7ab96520de3a18e5e111b5eaab095312d7fe8473dc24316b9ae028f1497c275eb9192a3ea0f67022600019620001c0602090811b620002c917901c565b620001b9608051600019737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06001600160a01b0316620001c060201b620002c9179092919060201c565b5062000634565b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801562000212573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200023891906200054d565b62000244919062000567565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152919250620002a091869190620002a616565b50505050565b600062000302826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166200038d60201b620003a3179092919060201c565b8051909150156200038857808060200190518101906200032391906200058e565b620003885760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b60606200039e8484600085620003a8565b90505b9392505050565b6060824710156200040b5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016200037f565b6001600160a01b0385163b620004645760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016200037f565b600080866001600160a01b03168587604051620004829190620005e1565b60006040518083038185875af1925050503d8060008114620004c1576040519150601f19603f3d011682016040523d82523d6000602084013e620004c6565b606091505b509092509050620004d9828286620004e4565b979650505050505050565b60608315620004f5575081620003a1565b825115620005065782518084602001fd5b8160405162461bcd60e51b81526004016200037f9190620005ff565b6000602082840312156200053557600080fd5b81516001600160a01b0381168114620003a157600080fd5b6000602082840312156200056057600080fd5b5051919050565b600082198211156200058957634e487b7160e01b600052601160045260246000fd5b500190565b600060208284031215620005a157600080fd5b81518015158114620003a157600080fd5b60005b83811015620005cf578181015183820152602001620005b5565b83811115620002a05750506000910152565b60008251620005f5818460208701620005b2565b9190910192915050565b602081526000825180602084015262000620816040850160208701620005b2565b601f01601f19169190910160400192915050565b608051610c3d6200065e6000396000818161014f0152818161018001526105440152610c3d6000f3fe6080604052600436106100595760003560e01c806312280c191461006557806326c3b515146100aa57806386a8b4b5146100da5780638b21f170146101025780639b07d3421461012a578063ae9467b51461013d57600080fd5b3661006057005b600080fd5b34801561007157600080fd5b5061008d737f39c581f595b53c5cb19bd0b3f8da6c935e2ca081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100bd6100b83660046109d2565b610171565b6040805193845260208401929092521515908201526060016100a1565b3480156100e657600080fd5b5061008d73dc24316b9ae028f1497c275eb9192a3ea0f6702281565b34801561010e57600080fd5b5061008d73ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b6100bd610138366004610a64565b6102ab565b34801561014957600080fd5b5061008d7f000000000000000000000000000000000000000000000000000000000000000081565b60008080336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146101be576040516348f5c3ed60e01b815260040160405180910390fd5b600060016101d260608e0160408f01610aef565b60038111156101e3576101e3610ad9565b149050600060028d60400160208101906101fd9190610aef565b600381111561020e5761020e610ad9565b1480156102525750737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06001600160a01b03168d60200160208101906102479190610b10565b6001600160a01b0316145b9050818061025d5750805b61027a5760405163c582880b60e01b815260040160405180910390fd5b8161028f5761028a898c8a6103bc565b610299565b610299898c6105b3565b94505050985098509895505050505050565b60008060006040516326d18eab60e01b815260040160405180910390fd5b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561031a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033e9190610b2b565b6103489190610b44565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905290915061039d908590610740565b50505050565b60606103b2848460008561081c565b90505b9392505050565b600060016103d06060850160408601610aef565b60038111156103e1576103e1610ad9565b146103ff57604051636c98dcaf60e01b815260040160405180910390fd5b604051636f074d1f60e11b815260048101859052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063de0e9a3e906024016020604051808303816000875af1158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610b2b565b604051630f7c084960e21b815260016004820152600060248201819052604482018390526064820181905291925073dc24316b9ae028f1497c275eb9192a3ea0f6702290633df02124906084016020604051808303816000875af11580156104e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105089190610b2b565b90504792508083101561052e57604051637225adaf60e11b815260040160405180910390fd5b6040516312a5362360e01b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906312a536239085906024016000604051808303818588803b15801561059157600080fd5b505af11580156105a5573d6000803e3d6000fd5b505050505050509392505050565b600060026105c76060840160408501610aef565b60038111156105d8576105d8610ad9565b1415806106115750737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06106056040840160208501610b10565b6001600160a01b031614155b1561062f57604051636c98dcaf60e01b815260040160405180910390fd5b604051630f7c084960e21b81526000600482018190526001602483015260448201859052606482018190529073dc24316b9ae028f1497c275eb9192a3ea0f6702290633df0212490869060840160206040518083038185885af115801561069a573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106bf9190610b2b565b604051630ea598cb60e41b815260048101829052909150737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063ea598cb0906024016020604051808303816000875af1158015610714573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107389190610b2b565b949350505050565b6000610795826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103a39092919063ffffffff16565b80519091501561081757808060200190518101906107b39190610b6a565b6108175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b60608247101561087d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161080e565b6001600160a01b0385163b6108d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080e565b600080866001600160a01b031685876040516108f09190610bb8565b60006040518083038185875af1925050503d806000811461092d576040519150601f19603f3d011682016040523d82523d6000602084013e610932565b606091505b509150915061094282828661094d565b979650505050505050565b6060831561095c5750816103b5565b82511561096c5782518084602001fd5b8160405162461bcd60e51b815260040161080e9190610bd4565b60006060828403121561099857600080fd5b50919050565b803567ffffffffffffffff811681146109b657600080fd5b919050565b80356001600160a01b03811681146109b657600080fd5b600080600080600080600080610200898b0312156109ef57600080fd5b6109f98a8a610986565b9750610a088a60608b01610986565b9650610a178a60c08b01610986565b9550610a278a6101208b01610986565b945061018089013593506101a08901359250610a466101c08a0161099e565b9150610a556101e08a016109bb565b90509295985092959890939650565b6000806000806000806101c08789031215610a7e57600080fd5b610a888888610986565b9550610a978860608901610986565b9450610aa68860c08901610986565b9350610ab6886101208901610986565b92506101808701359150610acd6101a0880161099e565b90509295509295509295565b634e487b7160e01b600052602160045260246000fd5b600060208284031215610b0157600080fd5b8135600481106103b557600080fd5b600060208284031215610b2257600080fd5b6103b5826109bb565b600060208284031215610b3d57600080fd5b5051919050565b60008219821115610b6557634e487b7160e01b600052601160045260246000fd5b500190565b600060208284031215610b7c57600080fd5b815180151581146103b557600080fd5b60005b83811015610ba7578181015183820152602001610b8f565b8381111561039d5750506000910152565b60008251610bca818460208701610b8c565b9190910192915050565b6020815260008251806020840152610bf3816040850160208701610b8c565b601f01601f1916919091016040019291505056fea26469706673582212202ebbda38eb6eab24473cd62153816676acba7c441f91ed1fb88442305a33093b64736f6c634300080a0033000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b351680455

Deployed Bytecode

0x6080604052600436106100595760003560e01c806312280c191461006557806326c3b515146100aa57806386a8b4b5146100da5780638b21f170146101025780639b07d3421461012a578063ae9467b51461013d57600080fd5b3661006057005b600080fd5b34801561007157600080fd5b5061008d737f39c581f595b53c5cb19bd0b3f8da6c935e2ca081565b6040516001600160a01b0390911681526020015b60405180910390f35b6100bd6100b83660046109d2565b610171565b6040805193845260208401929092521515908201526060016100a1565b3480156100e657600080fd5b5061008d73dc24316b9ae028f1497c275eb9192a3ea0f6702281565b34801561010e57600080fd5b5061008d73ae7ab96520de3a18e5e111b5eaab095312d7fe8481565b6100bd610138366004610a64565b6102ab565b34801561014957600080fd5b5061008d7f000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b35168045581565b60008080336001600160a01b037f000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b35168045516146101be576040516348f5c3ed60e01b815260040160405180910390fd5b600060016101d260608e0160408f01610aef565b60038111156101e3576101e3610ad9565b149050600060028d60400160208101906101fd9190610aef565b600381111561020e5761020e610ad9565b1480156102525750737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06001600160a01b03168d60200160208101906102479190610b10565b6001600160a01b0316145b9050818061025d5750805b61027a5760405163c582880b60e01b815260040160405180910390fd5b8161028f5761028a898c8a6103bc565b610299565b610299898c6105b3565b94505050985098509895505050505050565b60008060006040516326d18eab60e01b815260040160405180910390fd5b604051636eb1769f60e11b81523060048201526001600160a01b038381166024830152600091839186169063dd62ed3e90604401602060405180830381865afa15801561031a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061033e9190610b2b565b6103489190610b44565b604080516001600160a01b038616602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b17905290915061039d908590610740565b50505050565b60606103b2848460008561081c565b90505b9392505050565b600060016103d06060850160408601610aef565b60038111156103e1576103e1610ad9565b146103ff57604051636c98dcaf60e01b815260040160405180910390fd5b604051636f074d1f60e11b815260048101859052600090737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063de0e9a3e906024016020604051808303816000875af1158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104789190610b2b565b604051630f7c084960e21b815260016004820152600060248201819052604482018390526064820181905291925073dc24316b9ae028f1497c275eb9192a3ea0f6702290633df02124906084016020604051808303816000875af11580156104e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105089190610b2b565b90504792508083101561052e57604051637225adaf60e11b815260040160405180910390fd5b6040516312a5362360e01b8152600481018590527f000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b3516804556001600160a01b0316906312a536239085906024016000604051808303818588803b15801561059157600080fd5b505af11580156105a5573d6000803e3d6000fd5b505050505050509392505050565b600060026105c76060840160408501610aef565b60038111156105d8576105d8610ad9565b1415806106115750737f39c581f595b53c5cb19bd0b3f8da6c935e2ca06106056040840160208501610b10565b6001600160a01b031614155b1561062f57604051636c98dcaf60e01b815260040160405180910390fd5b604051630f7c084960e21b81526000600482018190526001602483015260448201859052606482018190529073dc24316b9ae028f1497c275eb9192a3ea0f6702290633df0212490869060840160206040518083038185885af115801561069a573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106bf9190610b2b565b604051630ea598cb60e41b815260048101829052909150737f39c581f595b53c5cb19bd0b3f8da6c935e2ca09063ea598cb0906024016020604051808303816000875af1158015610714573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107389190610b2b565b949350505050565b6000610795826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103a39092919063ffffffff16565b80519091501561081757808060200190518101906107b39190610b6a565b6108175760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b505050565b60608247101561087d5760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b606482015260840161080e565b6001600160a01b0385163b6108d45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015260640161080e565b600080866001600160a01b031685876040516108f09190610bb8565b60006040518083038185875af1925050503d806000811461092d576040519150601f19603f3d011682016040523d82523d6000602084013e610932565b606091505b509150915061094282828661094d565b979650505050505050565b6060831561095c5750816103b5565b82511561096c5782518084602001fd5b8160405162461bcd60e51b815260040161080e9190610bd4565b60006060828403121561099857600080fd5b50919050565b803567ffffffffffffffff811681146109b657600080fd5b919050565b80356001600160a01b03811681146109b657600080fd5b600080600080600080600080610200898b0312156109ef57600080fd5b6109f98a8a610986565b9750610a088a60608b01610986565b9650610a178a60c08b01610986565b9550610a278a6101208b01610986565b945061018089013593506101a08901359250610a466101c08a0161099e565b9150610a556101e08a016109bb565b90509295985092959890939650565b6000806000806000806101c08789031215610a7e57600080fd5b610a888888610986565b9550610a978860608901610986565b9450610aa68860c08901610986565b9350610ab6886101208901610986565b92506101808701359150610acd6101a0880161099e565b90509295509295509295565b634e487b7160e01b600052602160045260246000fd5b600060208284031215610b0157600080fd5b8135600481106103b557600080fd5b600060208284031215610b2257600080fd5b6103b5826109bb565b600060208284031215610b3d57600080fd5b5051919050565b60008219821115610b6557634e487b7160e01b600052601160045260246000fd5b500190565b600060208284031215610b7c57600080fd5b815180151581146103b557600080fd5b60005b83811015610ba7578181015183820152602001610b8f565b8381111561039d5750506000910152565b60008251610bca818460208701610b8c565b9190910192915050565b6020815260008251806020840152610bf3816040850160208701610b8c565b601f01601f1916919091016040019291505056fea26469706673582212202ebbda38eb6eab24473cd62153816676acba7c441f91ed1fb88442305a33093b64736f6c634300080a0033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b351680455

-----Decoded View---------------
Arg [0] : _rollupProcessor (address): 0xFF1F2B4ADb9dF6FC8eAFecDcbF96A2B351680455

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000ff1f2b4adb9df6fc8eafecdcbf96a2b351680455


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.