More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 194 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 21778261 | 13 days ago | IN | 0 ETH | 0.00020881 | ||||
Mint | 21368132 | 70 days ago | IN | 0 ETH | 0.00248846 | ||||
Mint | 21240634 | 88 days ago | IN | 0 ETH | 0.00085492 | ||||
Mint | 21240627 | 88 days ago | IN | 0 ETH | 0.00086749 | ||||
Mint | 21231749 | 89 days ago | IN | 0 ETH | 0.0011091 | ||||
Mint | 21231687 | 89 days ago | IN | 0 ETH | 0.00148206 | ||||
Mint | 21231680 | 89 days ago | IN | 0 ETH | 0.00130557 | ||||
Mint | 21200473 | 94 days ago | IN | 0 ETH | 0.00084792 | ||||
Mint | 21191019 | 95 days ago | IN | 0 ETH | 0.0011151 | ||||
Mint | 21188217 | 95 days ago | IN | 0 ETH | 0.00197604 | ||||
Mint | 21188212 | 95 days ago | IN | 0 ETH | 0.00186996 | ||||
Mint | 21188211 | 95 days ago | IN | 0 ETH | 0.00182073 | ||||
Mint | 21188209 | 95 days ago | IN | 0 ETH | 0.00186345 | ||||
Mint | 21169045 | 98 days ago | IN | 0 ETH | 0.0013553 | ||||
Mint | 21088770 | 109 days ago | IN | 0 ETH | 0.00051409 | ||||
Mint | 21088741 | 109 days ago | IN | 0 ETH | 0.00051863 | ||||
Burn | 20983167 | 124 days ago | IN | 0 ETH | 0.0007159 | ||||
Mint | 20958062 | 127 days ago | IN | 0 ETH | 0.0012119 | ||||
Mint | 20942148 | 130 days ago | IN | 0 ETH | 0.00144289 | ||||
Mint | 20928117 | 132 days ago | IN | 0 ETH | 0.00190323 | ||||
Mint | 20905138 | 135 days ago | IN | 0 ETH | 0.00044556 | ||||
Mint | 20897349 | 136 days ago | IN | 0 ETH | 0.00057721 | ||||
Mint | 20897113 | 136 days ago | IN | 0 ETH | 0.00048817 | ||||
Mint | 20893250 | 136 days ago | IN | 0 ETH | 0.00211062 | ||||
Mint | 20878765 | 138 days ago | IN | 0 ETH | 0.00131434 |
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
Contract Source Code (Solidity Standard Json-Input format)
// 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; } }
/** * 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); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC677Receiver { function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool); }
// 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; }
// 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; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"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"}]
Contract Creation Code
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
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.