ETH Price: $3,817.37 (+6.95%)

Contract

0xBE1a8Fe5CB3B7E50825Cef73aFDf29E3fc34DE33
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Bridge To201351352024-06-20 19:50:59173 days ago1718913059IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001453714.97281788
Bridge To201148452024-06-17 23:41:11176 days ago1718667671IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001442674.9256299
Bridge To200905522024-06-14 14:09:59180 days ago1718374199IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.0036536213.5296976
Bridge To200871682024-06-14 2:49:35180 days ago1718333375IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001946357
Bridge To200816852024-06-13 8:22:59181 days ago1718266979IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.0028233410.4554271
Bridge To200629972024-06-10 17:43:35183 days ago1718041415IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.0034951612.85158359
Bridge To200538662024-06-09 11:07:47185 days ago1717931267IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.003049989.97227301
Bridge To200485092024-06-08 17:09:59185 days ago1717866599IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.002026877.292902
Bridge To200477802024-06-08 14:42:59186 days ago1717857779IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001958767.01362523
Bridge To200334202024-06-06 14:35:59188 days ago1717684559IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.006904425.38719909
Bridge To200274982024-06-05 18:44:23188 days ago1717613063IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.0046936817.25849055
Bridge To199965062024-06-01 10:55:35193 days ago1717239335IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001303464.31226723
Bridge To199801982024-05-30 4:12:35195 days ago1717042355IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001906926.81210196
Bridge To199476172024-05-25 14:54:23200 days ago1716648863IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001937876.92493906
Bridge To199397362024-05-24 12:26:47201 days ago1716553607IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001856046.6000766
Bridge To199245272024-05-22 9:27:47203 days ago1716370067IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.00039846.82906433
Bridge To199245262024-05-22 9:27:35203 days ago1716370055IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001904556.79583384
Bridge To199106702024-05-20 10:54:35205 days ago1716202475IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001933236.91220678
Bridge To199082012024-05-20 2:37:23205 days ago1716172643IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.000940272.82636314
Bridge To198829762024-05-16 13:56:47209 days ago1715867807IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.002083117.53336403
Bridge To198829472024-05-16 13:50:59209 days ago1715867459IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001935816.9248554
Bridge To198820282024-05-16 10:45:47209 days ago1715856347IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001465625
Bridge To198785812024-05-15 23:11:23209 days ago1715814683IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001191073.87356173
Bridge To198733312024-05-15 5:37:11210 days ago1715751431IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001283114.22865233
Bridge To198514612024-05-12 4:08:47213 days ago1715486927IN
0xBE1a8Fe5...3fc34DE33
0 ETH0.001067233.34987634
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
LockboxAdapterBlast

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 7 : LockboxAdapterBlast.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;

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

interface IXERC20Registry {
    function getXERC20(address erc20) external view returns (address xerc20);

    function getERC20(address xerc20) external view returns (address erc20);

    function getLockbox(address erc20) external view returns (address xerc20);
}

interface L1StandardBridge {
    function bridgeERC20To(
        address _localToken,
        address _remoteToken,
        address _to,
        uint256 _amount,
        uint32 _minGasLimit,
        bytes calldata _extraData
    ) external;
}

/// @notice This adapter is only used for sending assets from Ethereum mainnet to Blast.
/// @dev Combines Lockbox deposit and Blast bridge's BridgeERC20 call to minimize user transactions.
contract LockboxAdapterBlast {
    address immutable blastStandardBridge;
    address immutable registry;

    // ERRORS
    error InvalidRemoteToken(address _remoteToken);
    error AmountLessThanZero();
    error InvalidAddress();

    constructor(address _blastStandardBridge, address _registry) {
        // Sanity check
        if (_blastStandardBridge == address(0) || _registry == address(0)) {
            revert InvalidAddress();
        }

        blastStandardBridge = _blastStandardBridge;
        registry = _registry;
    }

    /// @dev Combines Lockbox deposit and Blast bridge's BridgeERC20To call.
    /// @param _to The recipient or contract address on destination.
    /// @param _erc20 The address of the adopted ERC20 on the origin chain.
    /// @param _remoteToken The address of the asset to be received on the destination chain.
    /// @param _amount The amount of asset to bridge.
    /// @param _minGasLimit Minimum amount of gas that the bridge can be relayed with.
    /// @param _extraData Extra data to be sent with the transaction.
    function bridgeTo(
        address _to,
        address _erc20,
        address _remoteToken,
        uint256 _amount,
        uint32 _minGasLimit,
        bytes calldata _extraData
    ) external {
        // Sanity check
        if (_amount <= 0) {
            revert AmountLessThanZero();
        }

        address xerc20 = IXERC20Registry(registry).getXERC20(_erc20);
        address lockbox = IXERC20Registry(registry).getLockbox(xerc20);

        // Sanity check
        if (xerc20 == address(0) || lockbox == address(0)) {
            revert InvalidAddress();
        }

        // If using xERC20, the assumption is that the contract should be deployed at same address
        // on both networks.
        if (xerc20 != _remoteToken) {
            revert InvalidRemoteToken(_remoteToken);
        }

        SafeERC20.safeTransferFrom(IERC20(_erc20), msg.sender, address(this), _amount);
        SafeERC20.safeApprove(IERC20(_erc20), lockbox, _amount);
        IXERC20Lockbox(lockbox).deposit(_amount);
        SafeERC20.safeApprove(IERC20(xerc20), blastStandardBridge, _amount);
        L1StandardBridge(blastStandardBridge).bridgeERC20To(
            xerc20,
            _remoteToken,
            _to,
            _amount,
            _minGasLimit,
            _extraData
        );
    }
}

File 2 of 7 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.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));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @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 3 of 7 : 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 4 of 7 : IXERC20.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.4 <0.9.0;

interface IXERC20 {
  /**
   * @notice Emits when a lockbox is set
   *
   * @param _lockbox The address of the lockbox
   */

  event LockboxSet(address _lockbox);

  /**
   * @notice Emits when a limit is set
   *
   * @param _mintingLimit The updated minting limit we are setting to the bridge
   * @param _burningLimit The updated burning limit we are setting to the bridge
   * @param _bridge The address of the bridge we are setting the limit too
   */
  event BridgeLimitsSet(uint256 _mintingLimit, uint256 _burningLimit, address indexed _bridge);

  /**
   * @notice Reverts when a user with too low of a limit tries to call mint/burn
   */

  error IXERC20_NotHighEnoughLimits();

  /**
   * @notice Reverts when caller is not the factory
   */

  error IXERC20_NotFactory();

  struct Bridge {
    BridgeParameters minterParams;
    BridgeParameters burnerParams;
  }

  struct BridgeParameters {
    uint256 timestamp;
    uint256 ratePerSecond;
    uint256 maxLimit;
    uint256 currentLimit;
  }

  /**
   * @notice Sets the lockbox address
   *
   * @param _lockbox The address of the lockbox
   */

  function setLockbox(address _lockbox) external;

  /**
   * @notice Updates the limits of any bridge
   * @dev Can only be called by the owner
   * @param _mintingLimit The updated minting limit we are setting to the bridge
   * @param _burningLimit The updated burning limit we are setting to the bridge
   * @param _bridge The address of the bridge we are setting the limits too
   */
  function setLimits(address _bridge, uint256 _mintingLimit, uint256 _burningLimit) external;

  /**
   * @notice The address of the lockbox contract
   */
  function lockbox() external view returns (address);

  /**
   * @notice Returns the max limit of a minter
   *
   * @param _minter The minter we are viewing the limits of
   *  @return _limit The limit the minter has
   */
  function mintingMaxLimitOf(address _minter) external view returns (uint256 _limit);

  /**
   * @notice Returns the max limit of a bridge
   *
   * @param _bridge the bridge we are viewing the limits of
   * @return _limit The limit the bridge has
   */

  function burningMaxLimitOf(address _bridge) external view returns (uint256 _limit);

  /**
   * @notice Returns the current limit of a minter
   *
   * @param _minter The minter we are viewing the limits of
   * @return _limit The limit the minter has
   */

  function mintingCurrentLimitOf(address _minter) external view returns (uint256 _limit);

  /**
   * @notice Returns the current limit of a bridge
   *
   * @param _bridge the bridge we are viewing the limits of
   * @return _limit The limit the bridge has
   */

  function burningCurrentLimitOf(address _bridge) external view returns (uint256 _limit);

  /**
   * @notice Mints tokens for a user
   * @dev Can only be called by a minter
   * @param _user The address of the user who needs tokens minted
   * @param _amount The amount of tokens being minted
   */

  function mint(address _user, uint256 _amount) external;

  /**
   * @notice Burns tokens for a user
   * @dev Can only be called by a minter
   * @param _user The address of the user who needs tokens burned
   * @param _amount The amount of tokens being burned
   */

  function burn(address _user, uint256 _amount) external;
}

File 5 of 7 : IXERC20Lockbox.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.4 <0.9.0;

interface IXERC20Lockbox {
  /**
   * @notice Emitted when tokens are deposited into the lockbox
   */

  event Deposit(address _sender, uint256 _amount);

  /**
   * @notice Emitted when tokens are withdrawn from the lockbox
   */

  event Withdraw(address _sender, uint256 _amount);

  /**
   * @notice Reverts when a user tries to deposit native tokens on a non-native lockbox
   */

  error IXERC20Lockbox_NotNative();

  /**
   * @notice Reverts when a user tries to deposit non-native tokens on a native lockbox
   */

  error IXERC20Lockbox_Native();

  /**
   * @notice Reverts when a user tries to withdraw and the call fails
   */

  error IXERC20Lockbox_WithdrawFailed();

  /**
   * @notice The XERC20 token of this contract
   */

  function XERC20() external view returns (address);

  /**
   * @notice The ERC20 token of this contract
   */

  function ERC20() external view returns (address);

  /**
   * @notice Whether the ERC20 token is the native gas token of this chain
   */

  function IS_NATIVE() external view returns (bool);

  /**
   * @notice Deposit ERC20 tokens into the lockbox
   *
   * @param _amount The amount of tokens to deposit
   */

  function deposit(uint256 _amount) external;

  /**
   * @notice Deposit native tokens into the lockbox
   */

  function depositNative() external payable;

  /**
   * @notice Deposit ERC20 tokens into the lockbox, and send the XERC20 to a user
   *
   * @param _user The user to send the XERC20 to
   * @param _amount The amount of tokens to deposit
   */

  function depositTo(address _user, uint256 _amount) external;

  /**
   * @notice Deposit the native asset into the lockbox, and send the XERC20 to a user
   *
   * @param _user The user to send the XERC20 to
   */

  function depositNativeTo(address _user) external payable;

  /**
   * @notice Withdraw ERC20 tokens from the lockbox
   *
   * @param _amount The amount of tokens to withdraw
   */

  function withdraw(uint256 _amount) external;

  /**
   * @notice Withdraw ERC20 tokens from the lockbox
   *
   * @param _user The user to withdraw to
   * @param _amount The amount of tokens to withdraw
   */

  function withdrawTo(address _user, uint256 _amount) external;
}

File 6 of 7 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

File 7 of 7 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

Settings
{
  "remappings": [
    "@defi-wonderland/xerc20/=lib/xerc20/",
    "@0xged/=node_modules/@0xged/",
    "@chainlink/=node_modules/@chainlink/",
    "@connext/=node_modules/@connext/",
    "@ensdomains/=node_modules/@ensdomains/",
    "@eth-optimism/=node_modules/@eth-optimism/",
    "@mean-finance/=node_modules/@mean-finance/",
    "@openzeppelin/=node_modules/@openzeppelin/",
    "@rari-capital/=node_modules/@rari-capital/",
    "@uniswap/=node_modules/@uniswap/",
    "base64-sol/=node_modules/base64-sol/",
    "connext-interfaces/=lib/connext-interfaces/",
    "ds-test/=lib/xerc20/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "eth-gas-reporter/=node_modules/eth-gas-reporter/",
    "forge-gas-snapshot/=lib/xerc20/lib/permit2/lib/forge-gas-snapshot/src/",
    "forge-std/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/src/",
    "hardhat-deploy/=node_modules/hardhat-deploy/",
    "hardhat/=node_modules/hardhat/",
    "isolmate/=lib/xerc20/lib/isolmate/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/xerc20/lib/openzeppelin-contracts/",
    "openzeppelin/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "permit2/=lib/xerc20/lib/permit2/",
    "prb-test/=lib/xerc20/lib/prb-test/src/",
    "prb/test/=lib/xerc20/lib/prb-test/src/",
    "solmate/=lib/xerc20/lib/permit2/lib/solmate/",
    "xerc20/=lib/xerc20/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "viaIR": true,
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_blastStandardBridge","type":"address"},{"internalType":"address","name":"_registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountLessThanZero","type":"error"},{"inputs":[],"name":"InvalidAddress","type":"error"},{"inputs":[{"internalType":"address","name":"_remoteToken","type":"address"}],"name":"InvalidRemoteToken","type":"error"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"address","name":"_erc20","type":"address"},{"internalType":"address","name":"_remoteToken","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"uint32","name":"_minGasLimit","type":"uint32"},{"internalType":"bytes","name":"_extraData","type":"bytes"}],"name":"bridgeTo","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c0346100b757601f61096238819003918201601f19168301916001600160401b038311848410176100bc5780849260409485528339810103126100b757610052602061004b836100d2565b92016100d2565b906001600160a01b03808216159081156100ac575b5061009a5760805260a05260405161087b90816100e7823960805181610273015260a051818181610102015261015c0152f35b60405163e6c4247b60e01b8152600490fd5b905082161538610067565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036100b75756fe608080604052600436101561001357600080fd5b6000803560e01c63636626f11461002957600080fd5b346103705760c0366003190112610370576004356001600160a01b038116810361046f57602435926001600160a01b038416840361046b57604435916001600160a01b0383168303610467576084359163ffffffff831683036104635767ffffffffffffffff60a435116104635736602360a4350112156104635767ffffffffffffffff60a43560040135116104635736602460a4356004013560a4350101116104635760643515610454575060405163476a536360e11b81526001600160a01b038681166004830152909190602090839060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa918215610396578592610433575b5060405163eec9567960e01b81526001600160a01b038381166004830152602090829060249082907f0000000000000000000000000000000000000000000000000000000000000000165afa9081156104285786916103f9575b506001600160a01b0383161580156103e8575b6103d6576001600160a01b03858116908416036103b5576040516323b872dd60e01b60208201523360248201523060448201526064803581830152815260a0810167ffffffffffffffff8111828210176103a157604052959687966102269190610212906001600160a01b03831661062c565b6064359083906001600160a01b03166104e3565b6001600160a01b0381163b1561037e5760405163b6b55f2560e01b8152606435600482015296869188916024918391906001600160a01b03165af1801561039657610382575b93945084937f00000000000000000000000000000000000000000000000000000000000000006102a8606435826001600160a01b0386166104e3565b6001600160a01b031690813b1561037e57859363ffffffff9160405196879563540abf7360e01b875260018060a01b0316600487015260018060a01b0316602486015260018060a01b03166044850152606435606485015216608483015260c060a483015260a4356004013560c483015260a43560040135602460a4350160e48401378260e460a4356004013584010152818360e482601f19601f60a43560040135011681010301925af18015610373576103605750f35b61036990610473565b6103705780f35b80fd5b6040513d84823e3d90fd5b8580fd5b93909461038e90610473565b92849061026c565b6040513d87823e3d90fd5b634e487b7160e01b88526041600452602488fd5b60405163359ff56f60e01b81526001600160a01b0386166004820152602490fd5b60405163e6c4247b60e01b8152600490fd5b506001600160a01b0381161561019f565b61041b915060203d602011610421575b610413818361049d565b8101906104bf565b3861018c565b503d610409565b6040513d88823e3d90fd5b61044d91925060203d60201161042157610413818361049d565b9038610132565b63820bf1e560e01b8152600490fd5b8480fd5b8380fd5b8280fd5b5080fd5b67ffffffffffffffff811161048757604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761048757604052565b908160209103126104de57516001600160a01b03811681036104de5790565b600080fd5b91801580156105a7575b156105435760405163095ea7b360e01b60208201526001600160a01b0390921660248301526044808301919091528152608081019167ffffffffffffffff831182841017610487576105419260405261062c565b565b60405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608490fd5b50604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526020908290604490829088165afa908115610620576000916105ef575b50156104ed565b906020823d8211610618575b816106086020938361049d565b81010312610370575051386105e8565b3d91506105fb565b6040513d6000823e3d90fd5b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610487576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610766573d92831161075257906106c7939291604051926106ba88601f19601f840116018561049d565b83523d868885013e610771565b8051806106d5575b50505050565b8184918101031261046f578201519081159182150361037057506106fb578080806106cf565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b634e487b7160e01b85526041600452602485fd5b906106c79392506060915b919290156107d35750815115610785575090565b3b1561078e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156107e65750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061082c575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935061080956fea2646970667358221220ccb5894e7ee5d863bbdcb36e2ce6551aebeed85599ea3c6c477c272f4a0713ec64736f6c63430008140033000000000000000000000000697402166fbf2f22e970df8a6486ef171dbfc524000000000000000000000000bf29a2d67efb6766e44c163b19c6f4118b164702

Deployed Bytecode

0x608080604052600436101561001357600080fd5b6000803560e01c63636626f11461002957600080fd5b346103705760c0366003190112610370576004356001600160a01b038116810361046f57602435926001600160a01b038416840361046b57604435916001600160a01b0383168303610467576084359163ffffffff831683036104635767ffffffffffffffff60a435116104635736602360a4350112156104635767ffffffffffffffff60a43560040135116104635736602460a4356004013560a4350101116104635760643515610454575060405163476a536360e11b81526001600160a01b038681166004830152909190602090839060249082907f000000000000000000000000bf29a2d67efb6766e44c163b19c6f4118b164702165afa918215610396578592610433575b5060405163eec9567960e01b81526001600160a01b038381166004830152602090829060249082907f000000000000000000000000bf29a2d67efb6766e44c163b19c6f4118b164702165afa9081156104285786916103f9575b506001600160a01b0383161580156103e8575b6103d6576001600160a01b03858116908416036103b5576040516323b872dd60e01b60208201523360248201523060448201526064803581830152815260a0810167ffffffffffffffff8111828210176103a157604052959687966102269190610212906001600160a01b03831661062c565b6064359083906001600160a01b03166104e3565b6001600160a01b0381163b1561037e5760405163b6b55f2560e01b8152606435600482015296869188916024918391906001600160a01b03165af1801561039657610382575b93945084937f000000000000000000000000697402166fbf2f22e970df8a6486ef171dbfc5246102a8606435826001600160a01b0386166104e3565b6001600160a01b031690813b1561037e57859363ffffffff9160405196879563540abf7360e01b875260018060a01b0316600487015260018060a01b0316602486015260018060a01b03166044850152606435606485015216608483015260c060a483015260a4356004013560c483015260a43560040135602460a4350160e48401378260e460a4356004013584010152818360e482601f19601f60a43560040135011681010301925af18015610373576103605750f35b61036990610473565b6103705780f35b80fd5b6040513d84823e3d90fd5b8580fd5b93909461038e90610473565b92849061026c565b6040513d87823e3d90fd5b634e487b7160e01b88526041600452602488fd5b60405163359ff56f60e01b81526001600160a01b0386166004820152602490fd5b60405163e6c4247b60e01b8152600490fd5b506001600160a01b0381161561019f565b61041b915060203d602011610421575b610413818361049d565b8101906104bf565b3861018c565b503d610409565b6040513d88823e3d90fd5b61044d91925060203d60201161042157610413818361049d565b9038610132565b63820bf1e560e01b8152600490fd5b8480fd5b8380fd5b8280fd5b5080fd5b67ffffffffffffffff811161048757604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761048757604052565b908160209103126104de57516001600160a01b03811681036104de5790565b600080fd5b91801580156105a7575b156105435760405163095ea7b360e01b60208201526001600160a01b0390921660248301526044808301919091528152608081019167ffffffffffffffff831182841017610487576105419260405261062c565b565b60405162461bcd60e51b815260206004820152603660248201527f5361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f60448201527520746f206e6f6e2d7a65726f20616c6c6f77616e636560501b6064820152608490fd5b50604051636eb1769f60e11b81523060048201526001600160a01b0383811660248301526020908290604490829088165afa908115610620576000916105ef575b50156104ed565b906020823d8211610618575b816106086020938361049d565b81010312610370575051386105e8565b3d91506105fb565b6040513d6000823e3d90fd5b60018060a01b0316906040516040810167ffffffffffffffff9082811082821117610487576040526020938483527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564858401526000808587829751910182855af1903d15610766573d92831161075257906106c7939291604051926106ba88601f19601f840116018561049d565b83523d868885013e610771565b8051806106d5575b50505050565b8184918101031261046f578201519081159182150361037057506106fb578080806106cf565b6084906040519062461bcd60e51b82526004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152fd5b634e487b7160e01b85526041600452602485fd5b906106c79392506060915b919290156107d35750815115610785575090565b3b1561078e5790565b60405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606490fd5b8251909150156107e65750805190602001fd5b6040519062461bcd60e51b82528160208060048301528251908160248401526000935b82851061082c575050604492506000838284010152601f80199101168101030190fd5b848101820151868601604401529381019385935061080956fea2646970667358221220ccb5894e7ee5d863bbdcb36e2ce6551aebeed85599ea3c6c477c272f4a0713ec64736f6c63430008140033

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

000000000000000000000000697402166fbf2f22e970df8a6486ef171dbfc524000000000000000000000000bf29a2d67efb6766e44c163b19c6f4118b164702

-----Decoded View---------------
Arg [0] : _blastStandardBridge (address): 0x697402166Fbf2F22E970df8a6486Ef171dbfc524
Arg [1] : _registry (address): 0xBf29A2D67eFb6766E44c163B19C6F4118b164702

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000697402166fbf2f22e970df8a6486ef171dbfc524
Arg [1] : 000000000000000000000000bf29a2d67efb6766e44c163b19c6f4118b164702


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  ]

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.