Skip to content
Verified contractExactMIT

TransparentUpgradeableProxy

Address0x0a00a2d8121e4cd5c49d5ae366f37a79fc72098b
Balance

0 ETH

 

Transactions

45

 

Compiler

solc 0.8.20

 

Same code

1,298 more contracts

 

Details

Compiler
solc 0.8.20+commit.a1b79de6
Language
solidity
Optimization
Yes, 200 runs
EVM version
paris
License
MIT
Match
Exactcreation code: yes, runtime code: yes
Verified on Sourcify
Created in block
20,341,577
Creation transaction
0xe40ba2c87e…93317b3e2c
Proxy implementation
0xa7973e8c…cacbc9d5Treasury
Main copy (most transactions)
0xda5e1988…847cbef6

112 files

The source code is large: one file is shown at a time. Choose a file in the list.

contracts/interfaces/IXERC20Lockbox.sol

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.20;

import "@openzeppelin/contracts/interfaces/IERC20.sol";
import "./IXERC20.sol";

interface IXERC20LockboxErrors {
    /// @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 Reverts when a user tries to withdraw to the XERC20Lockbox itself
    error IXERC20Lockbox_WrongReceiver();
}

interface IXERC20Lockbox is IXERC20LockboxErrors {
    /**
     * @notice Emitted when tokens are deposited into the lockbox
     *
     * @param _sender The address of the user who deposited
     * @param _amount The amount of tokens deposited
     */
    event Deposit(address _sender, uint256 _amount);

    /**
     * @notice Emitted when tokens are withdrawn from the lockbox
     *
     * @param _sender The address of the user who withdrew
     * @param _amount The amount of tokens withdrawn
     */
    event Withdraw(address _sender, uint256 _amount);

    function XERC20() external view returns (IXERC20 xerc20);

    function ERC20() external view returns (IERC20 erc20);

    /**
     * @notice Deposit ERC20 tokens into the lockbox
     *
     * @param _amount The amount of tokens to deposit
     */
    function deposit(uint256 _amount) external;

    /**
     * @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;
}
Compiler settingsShow
{
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "libraries": {},
  "optimizer": {
    "runs": 200,
    "enabled": true
  },
  "evmVersion": "paris",
  "remappings": []
}

Source code and metadata: Sourcify.

The source code belongs to the authors of the contract.