BERA Price: $3.72 (+1.02%)

Contract

0xB02040AcE6C251Ed6E1258E4DD26682cA85A3B58

Overview

BERA Balance

Berachain LogoBerachain LogoBerachain Logo0 BERA

BERA Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Zap In40861732025-04-23 12:28:401 hr ago1745411320IN
0xB02040Ac...cA85A3B58
0 BERA00.00000005
Zap In40858342025-04-23 12:17:341 hr ago1745410654IN
0xB02040Ac...cA85A3B58
0 BERA00.00000096
Zap In40857962025-04-23 12:16:211 hr ago1745410581IN
0xB02040Ac...cA85A3B58
0 BERA0.000299750.5
Zap Out40833772025-04-23 10:56:462 hrs ago1745405806IN
0xB02040Ac...cA85A3B58
0 BERA00.00000005
Zap Out40833702025-04-23 10:56:322 hrs ago1745405792IN
0xB02040Ac...cA85A3B58
0 BERA00.00000005
Zap In40826362025-04-23 10:32:293 hrs ago1745404349IN
0xB02040Ac...cA85A3B58
0 BERA0.000299760.5
Zap In40814132025-04-23 9:52:213 hrs ago1745401941IN
0xB02040Ac...cA85A3B58
0 BERA00.00000005
Zap In40798662025-04-23 9:01:364 hrs ago1745398896IN
0xB02040Ac...cA85A3B58
0 BERA0.000306570.5
Zap In40797622025-04-23 8:58:124 hrs ago1745398692IN
0xB02040Ac...cA85A3B58
0 BERA00.00000005
Zap In40793492025-04-23 8:44:404 hrs ago1745397880IN
0xB02040Ac...cA85A3B58
0 BERA00.000002
Zap In40792812025-04-23 8:42:264 hrs ago1745397746IN
0xB02040Ac...cA85A3B58
0 BERA00.0000003
Zap In40763582025-04-23 7:06:006 hrs ago1745391960IN
0xB02040Ac...cA85A3B58
0 BERA00.000013
Zap In40739172025-04-23 5:45:377 hrs ago1745387137IN
0xB02040Ac...cA85A3B58
0 BERA0.000306580.50000002
Zap In40722362025-04-23 4:50:238 hrs ago1745383823IN
0xB02040Ac...cA85A3B58
0 BERA00.00000501
Zap Out40710882025-04-23 4:12:349 hrs ago1745381554IN
0xB02040Ac...cA85A3B58
0 BERA0.000000050.000101
Zap Out40709452025-04-23 4:07:529 hrs ago1745381272IN
0xB02040Ac...cA85A3B58
0 BERA00.000001
Zap In40705332025-04-23 3:54:199 hrs ago1745380459IN
0xB02040Ac...cA85A3B58
0 BERA0.00000070.001201
Zap In40695312025-04-23 3:21:1610 hrs ago1745378476IN
0xB02040Ac...cA85A3B58
0 BERA0.000000050.00008964
Zap In40694642025-04-23 3:19:0310 hrs ago1745378343IN
0xB02040Ac...cA85A3B58
0 BERA0.000000050.00010005
Zap In40642982025-04-23 0:28:5613 hrs ago1745368136IN
0xB02040Ac...cA85A3B58
0 BERA00.00000014
Zap In40621282025-04-22 23:17:4114 hrs ago1745363861IN
0xB02040Ac...cA85A3B58
0 BERA0.000001720.00228625
Zap In40604502025-04-22 22:22:3115 hrs ago1745360551IN
0xB02040Ac...cA85A3B58
0 BERA0.000001260.001779
Zap Out40598442025-04-22 22:02:3115 hrs ago1745359351IN
0xB02040Ac...cA85A3B58
0 BERA0.000000070.000101
Zap In40575552025-04-22 20:47:2016 hrs ago1745354840IN
0xB02040Ac...cA85A3B58
0 BERA0.000000660.00107658
Zap Out40572872025-04-22 20:38:3116 hrs ago1745354311IN
0xB02040Ac...cA85A3B58
0 BERA0.000000730.00139889
View all transactions

Parent Transaction Hash Block From To
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
OsBgtZapper

Compiler Version
v0.8.26+commit.8a97fa7a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
cancun EvmVersion
File 1 of 13 : osBGTZapper.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import {SafeERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {ErrorsLib} from "src/lib/ErrorsLib.sol";
import {IPSM} from "src/interfaces/IPSM.sol";
import {IERC4626} from "@openzeppelin/contracts/interfaces/IERC4626.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/utils/Pausable.sol";

contract OsBgtZapper is ReentrancyGuard, Ownable, Pausable {
    using SafeERC20 for IERC20;

    address public immutable oriBGTPSM;
    IERC20 public immutable osBGT;
    IERC20 public constant iBGT = IERC20(0xac03CABA51e17c86c921E1f6CBFBdC91F8BB2E6b);
    IERC4626 public constant oriBGT = IERC4626(0x69f1E971257419B1E9C405A553f252c64A29A30a);

    event ZapIn(address tokenFrom, uint256 amountIn, uint256 amountOut);

    event ZapOut(address tokenTo, uint256 amountIn, uint256 amountOut);

    constructor(address _osBGT, address _oriBGTPSM) Ownable(msg.sender) {
        if (_osBGT == address(0) || _oriBGTPSM == address(0)) {
            revert ErrorsLib.InvalidConstructorArgs();
        }

        osBGT = IERC20(_osBGT);
        oriBGTPSM = _oriBGTPSM;
    }

    /// @notice minReceived is the minimum amount of osBGT tokens to be received
    function zapIn(address tokenFrom, uint256 amount, uint256 minReceived) external nonReentrant whenNotPaused {
        if (amount == 0) revert ErrorsLib.ZeroAmountInput();
        if (tokenFrom == address(osBGT)) revert ErrorsLib.InvalidInputToken();

        transferIn(IERC20(tokenFrom), amount);

        uint256 iBgtReceived;

        if (tokenFrom == address(iBGT)) {
            iBgtReceived = amount;
        } else if (tokenFrom == address(oriBGT)) {
            iBgtReceived = oriBGT.redeem(amount, address(this), address(this));
        } else {
            revert ErrorsLib.InvalidInputToken();
        }

        iBGT.forceApprove(oriBGTPSM, iBgtReceived);

        uint256 amountReceived = IPSM(oriBGTPSM).buy(msg.sender, iBgtReceived);

        if (amountReceived < minReceived) revert ErrorsLib.TooLittleReceived();

        emit ZapIn(tokenFrom, amount, amountReceived);
    }

    /// @notice minReceived is the minimum amount of `tokenTo` tokens to be received
    function zapOut(address tokenTo, uint256 amount, uint256 minReceived) external nonReentrant whenNotPaused {
        if (amount == 0) revert ErrorsLib.ZeroAmountInput();

        transferIn(osBGT, amount);
        osBGT.forceApprove(oriBGTPSM, amount);

        uint256 iBGTReceived = IPSM(oriBGTPSM).sell(tokenTo == address(iBGT) ? msg.sender : address(this), amount);

        uint256 outputAmount;

        if (tokenTo == address(iBGT)) {
            outputAmount = iBGTReceived;
        } else if (tokenTo == address(oriBGT)) {
            iBGT.forceApprove(address(oriBGT), iBGTReceived);
            outputAmount = oriBGT.deposit(iBGTReceived, msg.sender);
        } else {
            revert ErrorsLib.InvalidOutputToken();
        }

        if (outputAmount < minReceived) revert ErrorsLib.TooLittleReceived();
        emit ZapOut(tokenTo, amount, outputAmount);
    }

    function transferIn(IERC20 token, uint256 amount) internal {
        token.safeTransferFrom(msg.sender, address(this), amount);
    }

    function pause() external onlyOwner {
        _pause();
    }

    function unpause() external onlyOwner {
        _unpause();
    }
}

File 2 of 13 : IERC20.sol
// 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);
}

File 3 of 13 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";
import {IERC20Permit} from "../extensions/IERC20Permit.sol";
import {Address} from "../../../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;

    /**
     * @dev An operation with an ERC20 token failed.
     */
    error SafeERC20FailedOperation(address token);

    /**
     * @dev Indicates a failed `decreaseAllowance` request.
     */
    error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);

    /**
     * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeTransfer(IERC20 token, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
    }

    /**
     * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
     * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
     */
    function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
        _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
    }

    /**
     * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful.
     */
    function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
        uint256 oldAllowance = token.allowance(address(this), spender);
        forceApprove(token, spender, oldAllowance + value);
    }

    /**
     * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
     * value, non-reverting calls are assumed to be successful.
     */
    function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
        unchecked {
            uint256 currentAllowance = token.allowance(address(this), spender);
            if (currentAllowance < requestedDecrease) {
                revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
            }
            forceApprove(token, spender, currentAllowance - requestedDecrease);
        }
    }

    /**
     * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
     * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
     * to be set to zero before setting it to a non-zero value, such as USDT.
     */
    function forceApprove(IERC20 token, address spender, uint256 value) internal {
        bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));

        if (!_callOptionalReturnBool(token, approvalCall)) {
            _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
            _callOptionalReturn(token, approvalCall);
        }
    }

    /**
     * @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);
        if (returndata.length != 0 && !abi.decode(returndata, (bool))) {
            revert SafeERC20FailedOperation(address(token));
        }
    }

    /**
     * @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).
     *
     * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
     */
    function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
        // 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 cannot use {Address-functionCall} here since this should return false
        // and not revert is the subcall reverts.

        (bool success, bytes memory returndata) = address(token).call(data);
        return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0;
    }
}

File 4 of 13 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol)

pragma solidity ^0.8.20;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant NOT_ENTERED = 1;
    uint256 private constant ENTERED = 2;

    uint256 private _status;

    /**
     * @dev Unauthorized reentrant call.
     */
    error ReentrancyGuardReentrantCall();

    constructor() {
        _status = NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be NOT_ENTERED
        if (_status == ENTERED) {
            revert ReentrancyGuardReentrantCall();
        }

        // Any calls to nonReentrant after this point will fail
        _status = ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == ENTERED;
    }
}

File 5 of 13 : ErrorsLib.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

library ErrorsLib {
    error InvalidConstructorArgs();
    error ZeroAmountInput();
    error InvalidAddress();
    error TooLittleReceived();
    error TooMuchAsked();
    error InvalidOutputToken();
    error InvalidInputToken();
    error InvalidRewardToken();
    error InvalidProfitModule();
}

File 6 of 13 : IPSM.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.26;

/// @title IPSM
/// @author OpenState Labs
/// @custom:contact [email protected]
/// @notice The OpenState Peg-Stability Module Interface
interface IPSM {
    error PSM_FeeExceedsMaximum();

    event Buy(address indexed txSender, address indexed recipient, uint256 amount, uint256 mintAmount);
    event Sell(address indexed txSender, address indexed recipient, uint256 amount, uint256 withdrawnAmount);

    event EntryFeeSet(uint256 newEntryFee);
    event ExitFeeSet(uint256 newExitFee);
    event FeeExemptSet(address account, bool exempt);

    function buy(address recipient, uint256 amount) external returns (uint256);
    function sell(address recipient, uint256 amount) external returns (uint256);
    function underlyingBalance() external view returns (uint256);
}

File 7 of 13 : IERC4626.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC4626.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../token/ERC20/IERC20.sol";
import {IERC20Metadata} from "../token/ERC20/extensions/IERC20Metadata.sol";

/**
 * @dev Interface of the ERC4626 "Tokenized Vault Standard", as defined in
 * https://eips.ethereum.org/EIPS/eip-4626[ERC-4626].
 */
interface IERC4626 is IERC20, IERC20Metadata {
    event Deposit(address indexed sender, address indexed owner, uint256 assets, uint256 shares);

    event Withdraw(
        address indexed sender,
        address indexed receiver,
        address indexed owner,
        uint256 assets,
        uint256 shares
    );

    /**
     * @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
     *
     * - MUST be an ERC-20 token contract.
     * - MUST NOT revert.
     */
    function asset() external view returns (address assetTokenAddress);

    /**
     * @dev Returns the total amount of the underlying asset that is “managed” by Vault.
     *
     * - SHOULD include any compounding that occurs from yield.
     * - MUST be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT revert.
     */
    function totalAssets() external view returns (uint256 totalManagedAssets);

    /**
     * @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToShares(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
     * scenario where all the conditions are met.
     *
     * - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
     * - MUST NOT show any variations depending on the caller.
     * - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
     * - MUST NOT revert.
     *
     * NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
     * “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
     * from.
     */
    function convertToAssets(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
     * through a deposit call.
     *
     * - MUST return a limited value if receiver is subject to some deposit limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
     * - MUST NOT revert.
     */
    function maxDeposit(address receiver) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
     *   call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
     *   in the same transaction.
     * - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
     *   deposit would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewDeposit(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   deposit execution, and are accounted for during deposit.
     * - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function deposit(uint256 assets, address receiver) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
     * - MUST return a limited value if receiver is subject to some mint limit.
     * - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
     * - MUST NOT revert.
     */
    function maxMint(address receiver) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
     * current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
     *   in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
     *   same transaction.
     * - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
     *   would be accepted, regardless if the user has enough tokens approved, etc.
     * - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by minting.
     */
    function previewMint(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
     *
     * - MUST emit the Deposit event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
     *   execution, and are accounted for during mint.
     * - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
     *   approving enough underlying tokens to the Vault contract, etc).
     *
     * NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
     */
    function mint(uint256 shares, address receiver) external returns (uint256 assets);

    /**
     * @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
     * Vault, through a withdraw call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxWithdraw(address owner) external view returns (uint256 maxAssets);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
     *   call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
     *   called
     *   in the same transaction.
     * - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
     *   the withdrawal would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by depositing.
     */
    function previewWithdraw(uint256 assets) external view returns (uint256 shares);

    /**
     * @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   withdraw execution, and are accounted for during withdraw.
     * - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function withdraw(uint256 assets, address receiver, address owner) external returns (uint256 shares);

    /**
     * @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
     * through a redeem call.
     *
     * - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
     * - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
     * - MUST NOT revert.
     */
    function maxRedeem(address owner) external view returns (uint256 maxShares);

    /**
     * @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
     * given current on-chain conditions.
     *
     * - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
     *   in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
     *   same transaction.
     * - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
     *   redemption would be accepted, regardless if the user has enough shares, etc.
     * - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
     * - MUST NOT revert.
     *
     * NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
     * share price or some other type of condition, meaning the depositor will lose assets by redeeming.
     */
    function previewRedeem(uint256 shares) external view returns (uint256 assets);

    /**
     * @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
     *
     * - MUST emit the Withdraw event.
     * - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
     *   redeem execution, and are accounted for during redeem.
     * - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
     *   not having enough shares, etc).
     *
     * NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
     * Those methods should be performed separately.
     */
    function redeem(uint256 shares, address receiver, address owner) external returns (uint256 assets);
}

File 8 of 13 : Ownable.sol
// 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);
    }
}

File 9 of 13 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Pausable.sol)

pragma solidity ^0.8.20;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    bool private _paused;

    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    /**
     * @dev The operation failed because the contract is paused.
     */
    error EnforcedPause();

    /**
     * @dev The operation failed because the contract is not paused.
     */
    error ExpectedPause();

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        if (paused()) {
            revert EnforcedPause();
        }
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        if (!paused()) {
            revert ExpectedPause();
        }
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 10 of 13 : IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol)

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ==== Security Considerations
 *
 * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature
 * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be
 * considered as an intention to spend the allowance in any specific way. The second is that because permits have
 * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should
 * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be
 * generally recommended is:
 *
 * ```solidity
 * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public {
 *     try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {}
 *     doThing(..., value);
 * }
 *
 * function doThing(..., uint256 value) public {
 *     token.safeTransferFrom(msg.sender, address(this), value);
 *     ...
 * }
 * ```
 *
 * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of
 * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also
 * {SafeERC20-safeTransferFrom}).
 *
 * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so
 * contracts should have entry points that don't rely on permit.
 */
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].
     *
     * CAUTION: See Security Considerations above.
     */
    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 11 of 13 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol)

pragma solidity ^0.8.20;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev The ETH balance of the account is not enough to perform the operation.
     */
    error AddressInsufficientBalance(address account);

    /**
     * @dev There's no code at `target` (it is not a contract).
     */
    error AddressEmptyCode(address target);

    /**
     * @dev A call to an address target failed. The target may have reverted.
     */
    error FailedInnerCall();

    /**
     * @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://consensys.net/diligence/blog/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.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AddressInsufficientBalance(address(this));
        }

        (bool success, ) = recipient.call{value: amount}("");
        if (!success) {
            revert FailedInnerCall();
        }
    }

    /**
     * @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 or custom error, it is bubbled
     * up by this function (like regular Solidity function calls). However, if
     * the call reverted with no returned reason, this function reverts with a
     * {FailedInnerCall} error.
     *
     * 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.
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0);
    }

    /**
     * @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`.
     */
    function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
        if (address(this).balance < value) {
            revert AddressInsufficientBalance(address(this));
        }
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
     * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
     * unsuccessful call.
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata
    ) internal view returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            // only check if target is a contract if the call was successful and the return data is empty
            // otherwise we already know that it was a contract
            if (returndata.length == 0 && target.code.length == 0) {
                revert AddressEmptyCode(target);
            }
            return returndata;
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
     * revert reason or with a default {FailedInnerCall} error.
     */
    function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
        if (!success) {
            _revert(returndata);
        } else {
            return returndata;
        }
    }

    /**
     * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
     */
    function _revert(bytes memory returndata) 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 FailedInnerCall();
        }
    }
}

File 12 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.20;

import {IERC20} from "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 13 of 13 : Context.sol
// 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;
    }
}

Settings
{
  "remappings": [
    "@openzeppelin/contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/contracts/",
    "@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts/",
    "ds-test/=lib/openzeppelin-contracts-upgradeable/lib/forge-std/lib/ds-test/src/",
    "erc4626-tests/=lib/openzeppelin-contracts-upgradeable/lib/erc4626-tests/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts-upgradeable/lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "cancun",
  "viaIR": false,
  "libraries": {}
}

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_osBGT","type":"address"},{"internalType":"address","name":"_oriBGTPSM","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[],"name":"EnforcedPause","type":"error"},{"inputs":[],"name":"ExpectedPause","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[],"name":"InvalidConstructorArgs","type":"error"},{"inputs":[],"name":"InvalidInputToken","type":"error"},{"inputs":[],"name":"InvalidOutputToken","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"inputs":[],"name":"TooLittleReceived","type":"error"},{"inputs":[],"name":"ZeroAmountInput","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenFrom","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"ZapIn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"tokenTo","type":"address"},{"indexed":false,"internalType":"uint256","name":"amountIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amountOut","type":"uint256"}],"name":"ZapOut","type":"event"},{"inputs":[],"name":"iBGT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oriBGT","outputs":[{"internalType":"contract IERC4626","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oriBGTPSM","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"osBGT","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenFrom","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReceived","type":"uint256"}],"name":"zapIn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenTo","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"minReceived","type":"uint256"}],"name":"zapOut","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60c060405234801561000f575f80fd5b5060405161116538038061116583398101604081905261002e9161012c565b60015f55338061005757604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b610060816100c0565b506001805460ff60a01b191690556001600160a01b038216158061008b57506001600160a01b038116155b156100a95760405163d3c1346960e01b815260040160405180910390fd5b6001600160a01b0391821660a0521660805261015d565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b80516001600160a01b0381168114610127575f80fd5b919050565b5f806040838503121561013d575f80fd5b61014683610111565b915061015460208401610111565b90509250929050565b60805160a051610fb66101af5f395f81816101a50152818161022601528181610558015261058a01525f818161015a015281816103a501528181610401015281816105ac01526105d40152610fb65ff3fe608060405234801561000f575f80fd5b50600436106100cf575f3560e01c8063874069741161007d578063a88f98ff11610058578063a88f98ff146101a0578063f0291f05146101c7578063f2fde38b146101e2575f80fd5b80638740697414610155578063884cfd361461017c5780638da5cb5b1461018f575f80fd5b80635c975abb116100ad5780635c975abb14610128578063715018a6146101455780638456cb591461014d575f80fd5b80631da3fd3e146100d3578063291abb911461010b5780633f4ba83a14610120575b5f80fd5b6100ee7369f1e971257419b1e9c405a553f252c64a29a30a81565b6040516001600160a01b0390911681526020015b60405180910390f35b61011e610119366004610eeb565b6101f5565b005b61011e6104f1565b600154600160a01b900460ff166040519015158152602001610102565b61011e610503565b61011e610514565b6100ee7f000000000000000000000000000000000000000000000000000000000000000081565b61011e61018a366004610eeb565b610524565b6001546001600160a01b03166100ee565b6100ee7f000000000000000000000000000000000000000000000000000000000000000081565b6100ee73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b81565b61011e6101f0366004610f1b565b610876565b6101fd6108d1565b610205610912565b815f0361022457604051629079b160e61b815260040160405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316836001600160a01b03160361027657604051632df9739b60e01b815260040160405180910390fd5b6102808383610956565b5f73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6a196001600160a01b038516016102ad57508161038b565b7369f1e971257419b1e9c405a553f252c64a29a309196001600160a01b03851601610372576040517fba08765200000000000000000000000000000000000000000000000000000000815260048101849052306024820181905260448201527369f1e971257419b1e9c405a553f252c64a29a30a9063ba087652906064016020604051808303815f875af1158015610347573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036b9190610f34565b905061038b565b604051632df9739b60e01b815260040160405180910390fd5b6103ca73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b7f00000000000000000000000000000000000000000000000000000000000000008361096f565b6040517fcce7ec13000000000000000000000000000000000000000000000000000000008152336004820152602481018290525f907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063cce7ec13906044016020604051808303815f875af115801561044f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104739190610f34565b9050828110156104965760405163c9f52c7160e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018690529081018290527f193fb64a5cf261bde281eeee0a0c87ac3818fc1b82a9eeafb907889bc3f84ced906060015b60405180910390a150506104ec60015f55565b505050565b6104f9610a75565b610501610abb565b565b61050b610a75565b6105015f610b10565b61051c610a75565b610501610b79565b61052c6108d1565b610534610912565b815f0361055357604051629079b160e61b815260040160405180910390fd5b61057d7f000000000000000000000000000000000000000000000000000000000000000083610956565b6105d16001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000167f00000000000000000000000000000000000000000000000000000000000000008461096f565b5f7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636c197ff573ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b6001600160a01b0316866001600160a01b0316146106345730610636565b335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303815f875af1158015610698573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106bc9190610f34565b90505f73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6a196001600160a01b038616016106eb57508061080e565b7369f1e971257419b1e9c405a553f252c64a29a309196001600160a01b038616016107dc5761074373ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b7369f1e971257419b1e9c405a553f252c64a29a30a8461096f565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523360248201527369f1e971257419b1e9c405a553f252c64a29a30a90636e553f65906044016020604051808303815f875af11580156107b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d59190610f34565b905061080e565b6040517f0620202000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281101561082f5760405163c9f52c7160e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018690529081018290527f5900ba65fd71e811777065e5cbb82962409a483059fe1ad66930362f114653bf906060016104d9565b61087e610a75565b6001600160a01b0381166108c5576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6108ce81610b10565b50565b60025f540361090c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b600154600160a01b900460ff1615610501576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61096b6001600160a01b038316333084610bbc565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526109ee8482610bf5565b610a6f576040516001600160a01b0384811660248301525f6044830152610a6591869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610c96565b610a6f8482610c96565b50505050565b6001546001600160a01b03163314610501576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016108bc565b610ac3610d10565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610b81610912565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610af33390565b6040516001600160a01b038481166024830152838116604483015260648201839052610a6f9186918216906323b872dd90608401610a1e565b5f805f846001600160a01b031684604051610c109190610f4b565b5f604051808303815f865af19150503d805f8114610c49576040519150601f19603f3d011682016040523d82523d5f602084013e610c4e565b606091505b5091509150818015610c78575080511580610c78575080806020019051810190610c789190610f61565b8015610c8d57505f856001600160a01b03163b115b95945050505050565b5f610caa6001600160a01b03841683610d53565b905080515f14158015610cce575080806020019051810190610ccc9190610f61565b155b156104ec576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024016108bc565b600154600160a01b900460ff16610501576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060610d6083835f610d67565b9392505050565b606081471015610da5576040517fcd7860590000000000000000000000000000000000000000000000000000000081523060048201526024016108bc565b5f80856001600160a01b03168486604051610dc09190610f4b565b5f6040518083038185875af1925050503d805f8114610dfa576040519150601f19603f3d011682016040523d82523d5f602084013e610dff565b606091505b5091509150610e0f868383610e19565b9695505050505050565b606082610e2e57610e2982610e8e565b610d60565b8151158015610e4557506001600160a01b0384163b155b15610e87576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016108bc565b5080610d60565b805115610e9e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b0381168114610ee6575f80fd5b919050565b5f805f60608486031215610efd575f80fd5b610f0684610ed0565b95602085013595506040909401359392505050565b5f60208284031215610f2b575f80fd5b610d6082610ed0565b5f60208284031215610f44575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f60208284031215610f71575f80fd5b81518015158114610d60575f80fdfea2646970667358221220426222f7bb1a2f05d903dd28e381d5a490b50156498a90f80a049235d070feb864736f6c634300081a0033000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb58000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b

Deployed Bytecode

0x608060405234801561000f575f80fd5b50600436106100cf575f3560e01c8063874069741161007d578063a88f98ff11610058578063a88f98ff146101a0578063f0291f05146101c7578063f2fde38b146101e2575f80fd5b80638740697414610155578063884cfd361461017c5780638da5cb5b1461018f575f80fd5b80635c975abb116100ad5780635c975abb14610128578063715018a6146101455780638456cb591461014d575f80fd5b80631da3fd3e146100d3578063291abb911461010b5780633f4ba83a14610120575b5f80fd5b6100ee7369f1e971257419b1e9c405a553f252c64a29a30a81565b6040516001600160a01b0390911681526020015b60405180910390f35b61011e610119366004610eeb565b6101f5565b005b61011e6104f1565b600154600160a01b900460ff166040519015158152602001610102565b61011e610503565b61011e610514565b6100ee7f000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b81565b61011e61018a366004610eeb565b610524565b6001546001600160a01b03166100ee565b6100ee7f000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb5881565b6100ee73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b81565b61011e6101f0366004610f1b565b610876565b6101fd6108d1565b610205610912565b815f0361022457604051629079b160e61b815260040160405180910390fd5b7f000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb586001600160a01b0316836001600160a01b03160361027657604051632df9739b60e01b815260040160405180910390fd5b6102808383610956565b5f73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6a196001600160a01b038516016102ad57508161038b565b7369f1e971257419b1e9c405a553f252c64a29a309196001600160a01b03851601610372576040517fba08765200000000000000000000000000000000000000000000000000000000815260048101849052306024820181905260448201527369f1e971257419b1e9c405a553f252c64a29a30a9063ba087652906064016020604051808303815f875af1158015610347573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061036b9190610f34565b905061038b565b604051632df9739b60e01b815260040160405180910390fd5b6103ca73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b7f000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b8361096f565b6040517fcce7ec13000000000000000000000000000000000000000000000000000000008152336004820152602481018290525f907f000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b6001600160a01b03169063cce7ec13906044016020604051808303815f875af115801561044f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906104739190610f34565b9050828110156104965760405163c9f52c7160e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018690529081018290527f193fb64a5cf261bde281eeee0a0c87ac3818fc1b82a9eeafb907889bc3f84ced906060015b60405180910390a150506104ec60015f55565b505050565b6104f9610a75565b610501610abb565b565b61050b610a75565b6105015f610b10565b61051c610a75565b610501610b79565b61052c6108d1565b610534610912565b815f0361055357604051629079b160e61b815260040160405180910390fd5b61057d7f000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb5883610956565b6105d16001600160a01b037f000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb58167f000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b8461096f565b5f7f000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b6001600160a01b0316636c197ff573ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b6001600160a01b0316866001600160a01b0316146106345730610636565b335b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e084901b1681526001600160a01b039091166004820152602481018690526044016020604051808303815f875af1158015610698573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106bc9190610f34565b90505f73ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6a196001600160a01b038616016106eb57508061080e565b7369f1e971257419b1e9c405a553f252c64a29a309196001600160a01b038616016107dc5761074373ac03caba51e17c86c921e1f6cbfbdc91f8bb2e6b7369f1e971257419b1e9c405a553f252c64a29a30a8461096f565b6040517f6e553f65000000000000000000000000000000000000000000000000000000008152600481018390523360248201527369f1e971257419b1e9c405a553f252c64a29a30a90636e553f65906044016020604051808303815f875af11580156107b1573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107d59190610f34565b905061080e565b6040517f0620202000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8281101561082f5760405163c9f52c7160e01b815260040160405180910390fd5b604080516001600160a01b0387168152602081018690529081018290527f5900ba65fd71e811777065e5cbb82962409a483059fe1ad66930362f114653bf906060016104d9565b61087e610a75565b6001600160a01b0381166108c5576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f60048201526024015b60405180910390fd5b6108ce81610b10565b50565b60025f540361090c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60025f55565b600154600160a01b900460ff1615610501576040517fd93c066500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61096b6001600160a01b038316333084610bbc565b5050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f095ea7b3000000000000000000000000000000000000000000000000000000001790526109ee8482610bf5565b610a6f576040516001600160a01b0384811660248301525f6044830152610a6591869182169063095ea7b3906064015b604051602081830303815290604052915060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610c96565b610a6f8482610c96565b50505050565b6001546001600160a01b03163314610501576040517f118cdaa70000000000000000000000000000000000000000000000000000000081523360048201526024016108bc565b610ac3610d10565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b610b81610912565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610af33390565b6040516001600160a01b038481166024830152838116604483015260648201839052610a6f9186918216906323b872dd90608401610a1e565b5f805f846001600160a01b031684604051610c109190610f4b565b5f604051808303815f865af19150503d805f8114610c49576040519150601f19603f3d011682016040523d82523d5f602084013e610c4e565b606091505b5091509150818015610c78575080511580610c78575080806020019051810190610c789190610f61565b8015610c8d57505f856001600160a01b03163b115b95945050505050565b5f610caa6001600160a01b03841683610d53565b905080515f14158015610cce575080806020019051810190610ccc9190610f61565b155b156104ec576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024016108bc565b600154600160a01b900460ff16610501576040517f8dfc202b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6060610d6083835f610d67565b9392505050565b606081471015610da5576040517fcd7860590000000000000000000000000000000000000000000000000000000081523060048201526024016108bc565b5f80856001600160a01b03168486604051610dc09190610f4b565b5f6040518083038185875af1925050503d805f8114610dfa576040519150601f19603f3d011682016040523d82523d5f602084013e610dff565b606091505b5091509150610e0f868383610e19565b9695505050505050565b606082610e2e57610e2982610e8e565b610d60565b8151158015610e4557506001600160a01b0384163b155b15610e87576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024016108bc565b5080610d60565b805115610e9e5780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356001600160a01b0381168114610ee6575f80fd5b919050565b5f805f60608486031215610efd575f80fd5b610f0684610ed0565b95602085013595506040909401359392505050565b5f60208284031215610f2b575f80fd5b610d6082610ed0565b5f60208284031215610f44575f80fd5b5051919050565b5f82518060208501845e5f920191825250919050565b5f60208284031215610f71575f80fd5b81518015158114610d60575f80fdfea2646970667358221220426222f7bb1a2f05d903dd28e381d5a490b50156498a90f80a049235d070feb864736f6c634300081a0033

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

000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb58000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b

-----Decoded View---------------
Arg [0] : _osBGT (address): 0xD2C41BF4033A83C0FC3A7F58a392Bf37d6dCDb58
Arg [1] : _oriBGTPSM (address): 0xe5CAB105E2dC57bf0c27670D1aED543Dd526B68b

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000d2c41bf4033a83c0fc3a7f58a392bf37d6dcdb58
Arg [1] : 000000000000000000000000e5cab105e2dc57bf0c27670d1aed543dd526b68b


Block Transaction 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
[ 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.