ETH Price: $2,676.87 (-2.87%)

Contract

0x7bbe8F18040aF0032f4C2435E7a76db6F1E346DF
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint217782612025-02-05 5:39:1113 days ago1738733951IN
0x7bbe8F18...6F1E346DF
0 ETH0.000208813.20766971
Mint213681322024-12-09 23:08:3570 days ago1733785715IN
0x7bbe8F18...6F1E346DF
0 ETH0.0024884638.22591268
Mint212406342024-11-22 3:38:1188 days ago1732246691IN
0x7bbe8F18...6F1E346DF
0 ETH0.0008549213.13265406
Mint212406272024-11-22 3:36:4788 days ago1732246607IN
0x7bbe8F18...6F1E346DF
0 ETH0.0008674913.32581723
Mint212317492024-11-20 21:51:4789 days ago1732139507IN
0x7bbe8F18...6F1E346DF
0 ETH0.001109117.03717158
Mint212316872024-11-20 21:39:2389 days ago1732138763IN
0x7bbe8F18...6F1E346DF
0 ETH0.0014820622.76630289
Mint212316802024-11-20 21:37:5989 days ago1732138679IN
0x7bbe8F18...6F1E346DF
0 ETH0.0013055720.0551614
Mint212004732024-11-16 13:11:3594 days ago1731762695IN
0x7bbe8F18...6F1E346DF
0 ETH0.0008479213.02517323
Mint211910192024-11-15 5:30:4795 days ago1731648647IN
0x7bbe8F18...6F1E346DF
0 ETH0.001115117.12939688
Mint211882172024-11-14 20:07:4795 days ago1731614867IN
0x7bbe8F18...6F1E346DF
0 ETH0.0019760430.35451068
Mint211882122024-11-14 20:06:4795 days ago1731614807IN
0x7bbe8F18...6F1E346DF
0 ETH0.0018699628.72491579
Mint211882112024-11-14 20:06:3595 days ago1731614795IN
0x7bbe8F18...6F1E346DF
0 ETH0.0018207327.96874279
Mint211882092024-11-14 20:06:1195 days ago1731614771IN
0x7bbe8F18...6F1E346DF
0 ETH0.0018634528.62491567
Mint211690452024-11-12 3:53:4798 days ago1731383627IN
0x7bbe8F18...6F1E346DF
0 ETH0.001355320.81917452
Mint210887702024-10-31 23:00:11109 days ago1730415611IN
0x7bbe8F18...6F1E346DF
0 ETH0.000514097.8971582
Mint210887412024-10-31 22:54:23109 days ago1730415263IN
0x7bbe8F18...6F1E346DF
0 ETH0.000518637.96694245
Burn209831672024-10-17 5:22:47124 days ago1729142567IN
0x7bbe8F18...6F1E346DF
0 ETH0.00071598.46185723
Mint209580622024-10-13 17:12:23127 days ago1728839543IN
0x7bbe8F18...6F1E346DF
0 ETH0.001211912.66006058
Mint209421482024-10-11 11:41:47130 days ago1728646907IN
0x7bbe8F18...6F1E346DF
0 ETH0.0014428915.07116105
Mint209281172024-10-09 12:45:23132 days ago1728477923IN
0x7bbe8F18...6F1E346DF
0 ETH0.0019032319.8794358
Mint209051382024-10-06 7:52:11135 days ago1728201131IN
0x7bbe8F18...6F1E346DF
0 ETH0.000445565.66767287
Mint208973492024-10-05 5:49:47136 days ago1728107387IN
0x7bbe8F18...6F1E346DF
0 ETH0.000577216.0290202
Mint208971132024-10-05 5:02:23136 days ago1728104543IN
0x7bbe8F18...6F1E346DF
0 ETH0.000488175.09897242
Mint208932502024-10-04 16:06:59136 days ago1728058019IN
0x7bbe8F18...6F1E346DF
0 ETH0.0021106222.04837904
Mint208787652024-10-02 15:38:59138 days ago1727883539IN
0x7bbe8F18...6F1E346DF
0 ETH0.0013143413.72841221
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:
StablecoinBridge

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 5 : StablecoinBridge.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interface/IERC20.sol";
import "./interface/IERC677Receiver.sol";
import "./interface/IFrankencoin.sol";

/**
 * @title Stable Coin Bridge
 * @notice A minting contract for another Swiss franc stablecoin ('source stablecoin') that we trust.
 * @author Frankencoin
 */
contract StablecoinBridge {
    IERC20 public immutable chf; // the source stablecoin
    IFrankencoin public immutable zchf; // the Frankencoin

    /**
     * @notice The time horizon after which this bridge expires and needs to be replaced by a new contract.
     */
    uint256 public immutable horizon;

    /**
     * The maximum amount of outstanding converted source stablecoins.
     */
    uint256 public immutable limit;
    uint256 public minted;

    error Limit(uint256 amount, uint256 limit);
    error Expired(uint256 time, uint256 expiration);
    error UnsupportedToken(address token);

    constructor(address other, address zchfAddress, uint256 limit_) {
        chf = IERC20(other);
        zchf = IFrankencoin(zchfAddress);
        horizon = block.timestamp + 52 weeks;
        limit = limit_;
        minted = 0;
    }

    /**
     * @notice Convenience method for mint(msg.sender, amount)
     */
    function mint(uint256 amount) external {
        mintTo(msg.sender, amount);
    }

    /**
     * @notice Mint the target amount of Frankencoins, taking the equal amount of source coins from the sender.
     * @dev This only works if an allowance for the source coins has been set and the caller has enough of them.
     */
    function mintTo(address target, uint256 amount) public {
        chf.transferFrom(msg.sender, address(this), amount);
        _mint(target, amount);
    }

    function _mint(address target, uint256 amount) internal {
        if (block.timestamp > horizon) revert Expired(block.timestamp, horizon);
        zchf.mint(target, amount);
        minted += amount;
        if (minted > limit) revert Limit(amount, limit);
    }

    /**
     * @notice Convenience method for burnAndSend(msg.sender, amount)
     */
    function burn(uint256 amount) external {
        _burn(msg.sender, msg.sender, amount);
    }

    /**
     * @notice Burn the indicated amount of Frankencoin and send the same number of source coin to the caller.
     */
    function burnAndSend(address target, uint256 amount) external {
        _burn(msg.sender, target, amount);
    }

    function _burn(address zchfHolder, address target, uint256 amount) internal {
        zchf.burnFrom(zchfHolder, amount);
        chf.transfer(target, amount);
        minted -= amount;
    }
}

File 2 of 5 : IERC20.sol
/**
 * SPDX-License-Identifier: MIT
 *
 * Copyright (c) 2016-2019 zOS Global Limited
 *
 */
pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP. Does not include
 * the optional functions; to access them see `ERC20Detailed`.
 */

interface IERC20 {
    function name() external view returns (string memory);

    function symbol() external view returns (string memory);

    function decimals() external view returns (uint8);

    /**
     * @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 `recipient`.
     *
     * Returns always true. Throws error on failure.
     *
     * Emits a `Transfer` event.
     */
    function transfer(address recipient, 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 can change 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.
     *
     * > 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 `sender` to `recipient` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns always true. Throws error on failure.
     *
     * Emits a `Transfer` event.
     */
    function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);

    /**
     * @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);
}

File 3 of 5 : IERC677Receiver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface IERC677Receiver {
    
    function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool);

}

File 4 of 5 : IFrankencoin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./IReserve.sol";

interface IFrankencoin is IERC20 {
    function suggestMinter(address _minter, uint256 _applicationPeriod, uint256 _applicationFee, string calldata _message) external;

    function registerPosition(address position) external;

    function denyMinter(address minter, address[] calldata helpers, string calldata message) external;

    function reserve() external view returns (IReserve);

    function minterReserve() external view returns (uint256);

    function calculateAssignedReserve(uint256 mintedAmount, uint32 _reservePPM) external view returns (uint256);

    function equity() external view returns (uint256);

    function isMinter(address minter) external view returns (bool);

    function getPositionParent(address position) external view returns (address);

    function mint(address target, uint256 amount) external;

    function mintWithReserve(address target, uint256 amount, uint32 reservePPM, uint32 feePPM) external;

    function burnFrom(address target, uint256 amount) external;

    function burnWithoutReserve(uint256 amountIncludingReserve, uint32 reservePPM) external;

    function burnFromWithReserve(address payer, uint256 targetTotalBurnAmount, uint32 _reservePPM) external returns (uint256);

    function burnWithReserve(uint256 amountExcludingReserve, uint32 reservePPM) external returns (uint256);

    function coverLoss(address source, uint256 amount) external;

    function collectProfits(address source, uint256 _amount) external;
}

File 5 of 5 : IReserve.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./IERC20.sol";

interface IReserve is IERC20 {
   function invest(uint256 amount, uint256 expected) external returns (uint256);
   function checkQualified(address sender, address[] calldata helpers) external view;
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"other","type":"address"},{"internalType":"address","name":"zchfAddress","type":"address"},{"internalType":"uint256","name":"limit_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"time","type":"uint256"},{"internalType":"uint256","name":"expiration","type":"uint256"}],"name":"Expired","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"Limit","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"UnsupportedToken","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnAndSend","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"chf","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"horizon","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mintTo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"zchf","outputs":[{"internalType":"contract IFrankencoin","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61010060405234801561001157600080fd5b506040516107643803806107648339810160408190526100309161007e565b6001600160a01b03808416608052821660a052610051426301dfe2006100ba565b60c05260e0525050600080556100e1565b80516001600160a01b038116811461007957600080fd5b919050565b60008060006060848603121561009357600080fd5b61009c84610062565b92506100aa60208501610062565b9150604084015190509250925092565b808201808211156100db57634e487b7160e01b600052601160045260246000fd5b92915050565b60805160a05160c05160e0516106146101506000396000818161016d015281816104bb01526104f6015260008181609d015281816103b201526103ed015260008181610194015281816102a5015261044401526000818160d7015281816101e6015261032501526106146000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c80634f02c420116100665780634f02c420146101395780639e41b44d14610142578063a0712d6814610155578063a4d66daf14610168578063c4d4803a1461018f57600080fd5b80631ce832b51461009857806337b272b0146100d257806342966c6814610111578063449a52f814610126575b600080fd5b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6040519081526020015b60405180910390f35b6100f97f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100c9565b61012461011f366004610522565b6101b6565b005b61012461013436600461053b565b6101c4565b6100bf60005481565b61012461015036600461053b565b61026a565b610124610163366004610522565b610275565b6100bf7f000000000000000000000000000000000000000000000000000000000000000081565b6100f97f000000000000000000000000000000000000000000000000000000000000000081565b6101c133338361027f565b50565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025b9190610573565b5061026682826103b0565b5050565b61026633838361027f565b6101c133826101c4565b60405163079cc67960e41b81526001600160a01b038481166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906379cc679090604401600060405180830381600087803b1580156102e957600080fd5b505af11580156102fd573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f000000000000000000000000000000000000000000000000000000000000000016925063a9059cbb91506044016020604051808303816000875af1158015610370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103949190610573565b50806000808282546103a691906105b2565b9091555050505050565b7f000000000000000000000000000000000000000000000000000000000000000042111561041e5760405163aa2fd92560e01b81524260048201527f000000000000000000000000000000000000000000000000000000000000000060248201526044015b60405180910390fd5b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000000000000000000000000000000000000000000016906340c10f1990604401600060405180830381600087803b15801561048857600080fd5b505af115801561049c573d6000803e3d6000fd5b50505050806000808282546104b191906105cb565b90915550506000547f0000000000000000000000000000000000000000000000000000000000000000101561026657604051631927a4b960e21b8152600481018290527f00000000000000000000000000000000000000000000000000000000000000006024820152604401610415565b60006020828403121561053457600080fd5b5035919050565b6000806040838503121561054e57600080fd5b82356001600160a01b038116811461056557600080fd5b946020939093013593505050565b60006020828403121561058557600080fd5b8151801515811461059557600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156105c5576105c561059c565b92915050565b808201808211156105c5576105c561059c56fea26469706673582212200d23349045d49a02089d7b39302762f8a2d7ded4cba49045aa129e8f1f7fb75d64736f6c63430008140033000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc08000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb000000000000000000000000000000000000000000084595161401484a000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106100935760003560e01c80634f02c420116100665780634f02c420146101395780639e41b44d14610142578063a0712d6814610155578063a4d66daf14610168578063c4d4803a1461018f57600080fd5b80631ce832b51461009857806337b272b0146100d257806342966c6814610111578063449a52f814610126575b600080fd5b6100bf7f00000000000000000000000000000000000000000000000000000000671d683f81565b6040519081526020015b60405180910390f35b6100f97f000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc0881565b6040516001600160a01b0390911681526020016100c9565b61012461011f366004610522565b6101b6565b005b61012461013436600461053b565b6101c4565b6100bf60005481565b61012461015036600461053b565b61026a565b610124610163366004610522565b610275565b6100bf7f000000000000000000000000000000000000000000084595161401484a00000081565b6100f97f000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb81565b6101c133338361027f565b50565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc086001600160a01b0316906323b872dd906064016020604051808303816000875af1158015610237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025b9190610573565b5061026682826103b0565b5050565b61026633838361027f565b6101c133826101c4565b60405163079cc67960e41b81526001600160a01b038481166004830152602482018390527f000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb16906379cc679090604401600060405180830381600087803b1580156102e957600080fd5b505af11580156102fd573d6000803e3d6000fd5b505060405163a9059cbb60e01b81526001600160a01b038581166004830152602482018590527f000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc0816925063a9059cbb91506044016020604051808303816000875af1158015610370573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103949190610573565b50806000808282546103a691906105b2565b9091555050505050565b7f00000000000000000000000000000000000000000000000000000000671d683f42111561041e5760405163aa2fd92560e01b81524260048201527f00000000000000000000000000000000000000000000000000000000671d683f60248201526044015b60405180910390fd5b6040516340c10f1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb16906340c10f1990604401600060405180830381600087803b15801561048857600080fd5b505af115801561049c573d6000803e3d6000fd5b50505050806000808282546104b191906105cb565b90915550506000547f000000000000000000000000000000000000000000084595161401484a000000101561026657604051631927a4b960e21b8152600481018290527f000000000000000000000000000000000000000000084595161401484a0000006024820152604401610415565b60006020828403121561053457600080fd5b5035919050565b6000806040838503121561054e57600080fd5b82356001600160a01b038116811461056557600080fd5b946020939093013593505050565b60006020828403121561058557600080fd5b8151801515811461059557600080fd5b9392505050565b634e487b7160e01b600052601160045260246000fd5b818103818111156105c5576105c561059c565b92915050565b808201808211156105c5576105c561059c56fea26469706673582212200d23349045d49a02089d7b39302762f8a2d7ded4cba49045aa129e8f1f7fb75d64736f6c63430008140033

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

000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc08000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb000000000000000000000000000000000000000000084595161401484a000000

-----Decoded View---------------
Arg [0] : other (address): 0xB4272071eCAdd69d933AdcD19cA99fe80664fc08
Arg [1] : zchfAddress (address): 0xB58E61C3098d85632Df34EecfB899A1Ed80921cB
Arg [2] : limit_ (uint256): 10000000000000000000000000

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000b4272071ecadd69d933adcd19ca99fe80664fc08
Arg [1] : 000000000000000000000000b58e61c3098d85632df34eecfb899a1ed80921cb
Arg [2] : 000000000000000000000000000000000000000000084595161401484a000000


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.