Cryo Explorer Ethereum Mainnet

Address Contract Verified

Address 0x2172af2ecBF2e44286c092dDc2f676E9Adfb9Ede
Balance 0 ETH
Nonce 1
Code Size 2147 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

2147 bytes
0x608060405234801561001057600080fd5b50600436106100615760003560e01c806202ef7814610066578063715018a6146100825780638da5cb5b1461008c578063e78cea92146100aa578063f2fde38b146100c8578063fc0c546a146100e4575b600080fd5b610080600480360381019061007b91906105ce565b610102565b005b61008a6102d7565b005b6100946102eb565b6040516100a1919061061d565b60405180910390f35b6100b2610314565b6040516100bf9190610697565b60405180910390f35b6100e260048036038101906100dd91906106b2565b610338565b005b6100ec6103be565b6040516100f99190610700565b60405180910390f35b61010a6103e2565b807f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4873ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401610164919061061d565b602060405180830381865afa158015610181573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906101a59190610730565b10156101e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101dd906107ba565b60405180910390fd5b7f000000000000000000000000bf1e380f3d1ae31854764081c488eada9f4cb19573ffffffffffffffffffffffffffffffffffffffff1663ee778c5982846040518363ffffffff1660e01b81526004016102419291906107e9565b6020604051808303816000875af1158015610260573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102849190610730565b508173ffffffffffffffffffffffffffffffffffffffff167f9936746a4565f9766fa768f88f56a7487c78780ac179562773d1c75c5269537e826040516102cb9190610812565b60405180910390a25050565b6102df6103e2565b6102e96000610469565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b7f000000000000000000000000bf1e380f3d1ae31854764081c488eada9f4cb19581565b6103406103e2565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036103b25760006040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081526004016103a9919061061d565b60405180910390fd5b6103bb81610469565b50565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6103ea61052d565b73ffffffffffffffffffffffffffffffffffffffff166104086102eb565b73ffffffffffffffffffffffffffffffffffffffff16146104675761042b61052d565b6040517f118cdaa700000000000000000000000000000000000000000000000000000000815260040161045e919061061d565b60405180910390fd5b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600033905090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006105658261053a565b9050919050565b6105758161055a565b811461058057600080fd5b50565b6000813590506105928161056c565b92915050565b6000819050919050565b6105ab81610598565b81146105b657600080fd5b50565b6000813590506105c8816105a2565b92915050565b600080604083850312156105e5576105e4610535565b5b60006105f385828601610583565b9250506020610604858286016105b9565b9150509250929050565b6106178161055a565b82525050565b6000602082019050610632600083018461060e565b92915050565b6000819050919050565b600061065d6106586106538461053a565b610638565b61053a565b9050919050565b600061066f82610642565b9050919050565b600061068182610664565b9050919050565b61069181610676565b82525050565b60006020820190506106ac6000830184610688565b92915050565b6000602082840312156106c8576106c7610535565b5b60006106d684828501610583565b91505092915050565b60006106ea82610664565b9050919050565b6106fa816106df565b82525050565b600060208201905061071560008301846106f1565b92915050565b60008151905061072a816105a2565b92915050565b60006020828403121561074657610745610535565b5b60006107548482850161071b565b91505092915050565b600082825260208201905092915050565b7f496e73756666696369656e742062616c616e6365000000000000000000000000600082015250565b60006107a460148361075d565b91506107af8261076e565b602082019050919050565b600060208201905081810360008301526107d381610797565b9050919050565b6107e381610598565b82525050565b60006040820190506107fe60008301856107da565b61080b602083018461060e565b9392505050565b600060208201905061082760008301846107da565b9291505056fea264697066735822122014f4fe5cea9aa22e751ca7eb5ad76f31864eca934be4d2dbeae25c3f3d36fc5c64736f6c63430008180033

Verified Source Code Full Match

Compiler: v0.8.24+commit.e11b9ed9 EVM: paris Optimization: No
Ownable.sol 100 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * The initial owner is set to the address provided by the deployer. This can
 * later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.20;

/**
 * @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 value of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

    /**
     * @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);

    /**
     * @dev Moves a `value` amount of tokens from `from` to `to` using the
     * allowance mechanism. `value` 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 value) external returns (bool);
}
Context.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
Deposit.sol 33 lines
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.24;

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

interface ISimplifiedBridge {
    function depositUnderlying(uint256 amount, address receiver) external returns(uint256);
}

contract Deposit is Ownable {
    IERC20 public immutable token;
    ISimplifiedBridge public immutable bridge;

    event DepositReceived(address indexed from, uint256 amount);

    constructor(address _token, address _bridge) Ownable(msg.sender) {
        token = IERC20(_token);
        bridge = ISimplifiedBridge(_bridge);
        // Approve bridge to spend our tokens
        token.approve(_bridge, type(uint256).max);
    }

    // This will be called by our backend when it detects a deposit
    function forwardDeposit(address user, uint256 amount) external onlyOwner {
        require(token.balanceOf(address(this)) >= amount, "Insufficient balance");

        // Call depositUnderlying without storing the unused return value
        bridge.depositUnderlying(amount, user);
        
        emit DepositReceived(user, amount);
    }
}

Read Contract

bridge 0xe78cea92 → address
owner 0x8da5cb5b → address
token 0xfc0c546a → address

Write Contract 3 functions

These functions modify contract state and require a wallet transaction to execute.

forwardDeposit 0x0002ef78
address user
uint256 amount
renounceOwnership 0x715018a6
No parameters
transferOwnership 0xf2fde38b
address newOwner

Recent Transactions

No transactions found for this address