More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
DomeCore
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT pragma solidity ^0.8.17; /// Openzeppelin imports import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC4626.sol"; import "@openzeppelin/contracts/interfaces/IERC4626.sol"; /// Local imports import "./Interfaces/ImAssetSaveWrapper.sol"; import "./Interfaces/ImUSDToken.sol"; import "./Interfaces/ImUSDSavingsContract.sol"; contract DomeCore is ERC4626, Ownable { using SafeERC20 for IERC20; struct BeneficiaryInfo { string beneficiaryCID; address wallet; uint256 percentage; } /// contracts IERC20 public stakingCoin; ImUSDSavingsContract public mUSDSavingsContract; ImUSDToken public mUSDToken; ImAssetSaveWrapper public mAssetSaveWrapper; address public mUSDSavingsVault; address public _systemOwner; uint256 public _systemOwnerPercentage; //Amount Of Underlying assets owned by depositor, interested + principal uint256 public underlyingAssetsOwnedByDepositor; string public _domeCID; BeneficiaryInfo[] public beneficiaries; event Staked(address indexed staker, uint256 amount, uint256 timestamp); event Unstaked(address indexed unstaker, uint256 unstakedAmount, uint256 timestamp); event Claimed(address indexed claimer, uint256 amount, uint256 timestamp); /// Constructor constructor( string[] memory domeInfo, address stakingCoinAddress, address mUSDSavingsContractAddress, address mUSDTokenAddress, address mAssetSaveWrapperAddress, address mUSDSavingsVaultAddress, address owner, address systemOwner, uint256 systemOwnerPercentage, BeneficiaryInfo[] memory beneficiariesInfo ) ERC20(domeInfo[1], domeInfo[2]) ERC4626(IERC20Metadata(stakingCoinAddress)) { stakingCoin = IERC20(stakingCoinAddress); mUSDSavingsContract = ImUSDSavingsContract(mUSDSavingsContractAddress); mUSDToken = ImUSDToken(mUSDTokenAddress); mAssetSaveWrapper = ImAssetSaveWrapper(mAssetSaveWrapperAddress); mUSDSavingsVault = mUSDSavingsVaultAddress; _domeCID = domeInfo[0]; for (uint256 i; i < beneficiariesInfo.length; i++) { beneficiaries.push(beneficiariesInfo[i]); } transferOwnership(owner); stakingCoin.approve(mAssetSaveWrapperAddress, 2**256 - 1); _systemOwner = systemOwner; _systemOwnerPercentage = systemOwnerPercentage; } function decimals() public pure override(ERC20, IERC20Metadata) returns (uint8) { return 6; } function getBeneficiariesInfo() public view returns (BeneficiaryInfo[] memory) { return beneficiaries; } function totalBalance() public view returns (uint256) { uint256 mUSD = mUSDSavingsContract.balanceOfUnderlying(address(this)); uint256 asset = mUSDToken.getRedeemOutput(address(stakingCoin), mUSD); return asset; } function setApproveForDome(uint256 amount) public onlyOwner { stakingCoin.approve(address(mAssetSaveWrapper), amount); } function deposit(uint256 assets, address receiver) public override returns (uint256) { uint256 shares = previewDeposit(assets); _deposit(msg.sender, receiver, assets, shares); return shares; } function mint(uint256 shares, address receiver) public virtual override returns (uint256) { uint256 assets = previewMint(shares); _deposit(msg.sender, receiver, assets, shares); return assets; } function withdraw( uint256 assets, address receiver, address owner ) public override returns (uint256) { uint256 shares = previewWithdraw(assets); _withdraw(msg.sender, receiver, owner, assets, shares); return shares; } function redeem( uint256 shares, address receiver, address owner ) public virtual override returns (uint256) { uint256 assets = previewRedeem(shares); _withdraw(msg.sender, receiver, owner, assets, shares); return assets; } function claimInterests() public { uint256 reward; uint256 balanceINmStable = totalBalance(); if (balanceINmStable >= underlyingAssetsOwnedByDepositor) { reward = balanceINmStable - underlyingAssetsOwnedByDepositor; } else { return; } uint256 systemFee = (reward * _systemOwnerPercentage) / 100; uint256 beneficiariesReward = ((reward - systemFee) * beneficiariesPercentage()) / 100; uint256 shares; uint256 mAssets; (shares, mAssets) = estimateSharesForWithdraw( beneficiariesReward + systemFee ); uint256 minAmountOut = mUSDToken.getRedeemOutput( address(stakingCoin), mAssets ); mUSDSavingsContract.redeemAndUnwrap( shares, true, minAmountOut, address(stakingCoin), address(this), address(mUSDToken), true ); stakingCoin.safeTransfer(_systemOwner, systemFee); uint256 totalTransfered = systemFee; uint256 toTransfer; for (uint256 i; i < beneficiaries.length; i++) { if (i == beneficiaries.length - 1) { toTransfer = minAmountOut - totalTransfered; stakingCoin.safeTransfer(beneficiaries[i].wallet, toTransfer); totalTransfered += toTransfer; } else { toTransfer = ((reward - systemFee) * beneficiaries[i].percentage) / 100; stakingCoin.safeTransfer(beneficiaries[i].wallet, toTransfer); totalTransfered += toTransfer; } } underlyingAssetsOwnedByDepositor += (reward - totalTransfered); emit Claimed(msg.sender, totalTransfered, block.timestamp); } function beneficiariesPercentage() public view returns (uint256 totalPercentage) { for (uint256 i; i < beneficiaries.length; i++) { totalPercentage += beneficiaries[i].percentage; } } function balanceOfUnderlying(address user) public view returns (uint256) { if (balanceOf(user) == 0) { return 0; } else { return (balanceOf(user) * estimateReward()) / totalSupply(); } } function convertToAssets(uint256 shares) public view virtual override returns (uint256 assets) { if (totalSupply() == 0) { return shares; } else { return (shares * estimateReward()) / totalSupply(); } } function convertToShares(uint256 assets) public view virtual override returns (uint256 shares) { if (totalSupply() == 0) { return assets; } else { return (assets * totalSupply()) / estimateReward(); } } function maxWithdraw(address owner) public view virtual override returns (uint256) { return balanceOfUnderlying(owner); } function previewDeposit(uint256 assets) public view virtual override returns (uint256) { return convertToShares(assets); } function previewMint(uint256 shares) public view virtual override returns (uint256) { return convertToAssets(shares); } function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { return convertToShares(assets); } function previewRedeem(uint256 shares) public view virtual override returns (uint256) { return convertToAssets(shares); } function estimateReward() internal view returns (uint256) { uint256 totalReward = totalBalance(); uint256 reward; if (totalReward > underlyingAssetsOwnedByDepositor) { uint256 newReward = totalReward - underlyingAssetsOwnedByDepositor; uint256 systemFee = (newReward * _systemOwnerPercentage) / 100; uint256 beneficiariesInterest = ((newReward - systemFee) * beneficiariesPercentage()) / 100; reward = totalReward - systemFee - beneficiariesInterest; } else { reward = totalReward; } return reward; } function _deposit( address caller, address receiver, uint256 assets, uint256 shares ) internal virtual override { require(assets > 0, "The assets must be greater than 0"); require( assets <= stakingCoin.allowance(caller, address(this)), "There is no as much allowance for staking coin" ); require( assets <= stakingCoin.balanceOf(caller), "There is no as much balance for staking coin" ); stakingCoin.safeTransferFrom(caller, address(this), assets); uint256 minOut = mUSDToken.getMintOutput(address(stakingCoin), assets); mAssetSaveWrapper.saveViaMint( address(mUSDToken), address(mUSDSavingsContract), mUSDSavingsVault, address(stakingCoin), assets, minOut, false ); underlyingAssetsOwnedByDepositor += assets; _mint(receiver, shares); emit Staked(receiver, assets, block.timestamp); } function _withdraw( address caller, address receiver, address owner, uint256 assets, uint256 shares ) internal virtual override { require(owner == caller, "Caller is not an owner"); require(0 < assets, "The amount must be greater than 0"); uint256 liquidityAmount = balanceOf(owner); require(shares <= liquidityAmount, "You don't have enough balance"); claimInterests(); uint256 sharesInMstable; uint256 mAssets; (sharesInMstable, mAssets) = estimateSharesForWithdraw(assets); uint256 minAmountOut = mUSDToken.getRedeemOutput( address(stakingCoin), mAssets ); mUSDSavingsContract.redeemAndUnwrap( sharesInMstable, true, minAmountOut, address(stakingCoin), receiver, address(mUSDToken), true ); underlyingAssetsOwnedByDepositor -= assets; _burn(owner, shares); emit Unstaked(owner, assets, block.timestamp); } function estimateSharesForWithdraw(uint256 asset) public view returns (uint256 shares, uint256 mAsset) { uint256 coefficient = mUSDToken.getRedeemOutput( address(stakingCoin), 10**18 ); mAsset = (asset * 10**18) / (coefficient + 1); shares = mUSDSavingsContract.convertToShares(mAsset); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface ImAssetSaveWrapper { function saveViaMint( address _mAsset, address _save, address _vault, address _bAsset, uint256 _amount, uint256 _minOut, bool _stake ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface ImUSDToken { function getMintOutput(address _input, uint256 _inputQuantity) external view returns (uint256 mintOutput); function getRedeemOutput(address _output, uint256 _mAssetQuantity) external view returns (uint256 bAssetOutput); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; interface ImUSDSavingsContract { function balanceOf(address account) external view returns (uint256); function balanceOfUnderlying(address _user) external view returns (uint256 balance); function convertToShares(uint256 assets) external view returns (uint256 shares); function convertToAssets(uint256 shares) external view returns (uint256 assets); function redeemAndUnwrap( uint256 _amount, bool _isCreditAmt, uint256 _minAmountOut, address _output, address _beneficiary, address _router, bool _isBassetOut ) external returns ( uint256 creditsBurned, uint256 massetRedeemed, uint256 outputQuantity ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @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 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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 changes 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. * * 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 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` 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 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../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. * * By default, the owner account will be the one that deploys the contract. 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; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (interfaces/IERC4626.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol"; import "../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]. * * _Available since v4.7._ */ interface IERC4626 is IERC20, IERC20Metadata { event Deposit(address indexed caller, address indexed owner, uint256 assets, uint256 shares); event Withdraw( address indexed caller, 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../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; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @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, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/extensions/ERC4626.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../utils/SafeERC20.sol"; import "../../../interfaces/IERC4626.sol"; import "../../../utils/math/Math.sol"; /** * @dev Implementation of the ERC4626 "Tokenized Vault Standard" as defined in * https://eips.ethereum.org/EIPS/eip-4626[EIP-4626]. * * This extension allows the minting and burning of "shares" (represented using the ERC20 inheritance) in exchange for * underlying "assets" through standardized {deposit}, {mint}, {redeem} and {burn} workflows. This contract extends * the ERC20 standard. Any additional extensions included along it would affect the "shares" token represented by this * contract and not the "assets" token which is an independent contract. * * CAUTION: Deposits and withdrawals may incur unexpected slippage. Users should verify that the amount received of * shares or assets is as expected. EOAs should operate through a wrapper that performs these checks such as * https://github.com/fei-protocol/ERC4626#erc4626router-and-base[ERC4626Router]. * * _Available since v4.7._ */ abstract contract ERC4626 is ERC20, IERC4626 { using Math for uint256; IERC20Metadata private immutable _asset; /** * @dev Set the underlying asset contract. This must be an ERC20-compatible contract (ERC20 or ERC777). */ constructor(IERC20Metadata asset_) { _asset = asset_; } /** @dev See {IERC4262-asset}. */ function asset() public view virtual override returns (address) { return address(_asset); } /** @dev See {IERC4262-totalAssets}. */ function totalAssets() public view virtual override returns (uint256) { return _asset.balanceOf(address(this)); } /** @dev See {IERC4262-convertToShares}. */ function convertToShares(uint256 assets) public view virtual override returns (uint256 shares) { return _convertToShares(assets, Math.Rounding.Down); } /** @dev See {IERC4262-convertToAssets}. */ function convertToAssets(uint256 shares) public view virtual override returns (uint256 assets) { return _convertToAssets(shares, Math.Rounding.Down); } /** @dev See {IERC4262-maxDeposit}. */ function maxDeposit(address) public view virtual override returns (uint256) { return _isVaultCollateralized() ? type(uint256).max : 0; } /** @dev See {IERC4262-maxMint}. */ function maxMint(address) public view virtual override returns (uint256) { return type(uint256).max; } /** @dev See {IERC4262-maxWithdraw}. */ function maxWithdraw(address owner) public view virtual override returns (uint256) { return _convertToAssets(balanceOf(owner), Math.Rounding.Down); } /** @dev See {IERC4262-maxRedeem}. */ function maxRedeem(address owner) public view virtual override returns (uint256) { return balanceOf(owner); } /** @dev See {IERC4262-previewDeposit}. */ function previewDeposit(uint256 assets) public view virtual override returns (uint256) { return _convertToShares(assets, Math.Rounding.Down); } /** @dev See {IERC4262-previewMint}. */ function previewMint(uint256 shares) public view virtual override returns (uint256) { return _convertToAssets(shares, Math.Rounding.Up); } /** @dev See {IERC4262-previewWithdraw}. */ function previewWithdraw(uint256 assets) public view virtual override returns (uint256) { return _convertToShares(assets, Math.Rounding.Up); } /** @dev See {IERC4262-previewRedeem}. */ function previewRedeem(uint256 shares) public view virtual override returns (uint256) { return _convertToAssets(shares, Math.Rounding.Down); } /** @dev See {IERC4262-deposit}. */ function deposit(uint256 assets, address receiver) public virtual override returns (uint256) { require(assets <= maxDeposit(receiver), "ERC4626: deposit more than max"); uint256 shares = previewDeposit(assets); _deposit(_msgSender(), receiver, assets, shares); return shares; } /** @dev See {IERC4262-mint}. */ function mint(uint256 shares, address receiver) public virtual override returns (uint256) { require(shares <= maxMint(receiver), "ERC4626: mint more than max"); uint256 assets = previewMint(shares); _deposit(_msgSender(), receiver, assets, shares); return assets; } /** @dev See {IERC4262-withdraw}. */ function withdraw( uint256 assets, address receiver, address owner ) public virtual override returns (uint256) { require(assets <= maxWithdraw(owner), "ERC4626: withdraw more than max"); uint256 shares = previewWithdraw(assets); _withdraw(_msgSender(), receiver, owner, assets, shares); return shares; } /** @dev See {IERC4262-redeem}. */ function redeem( uint256 shares, address receiver, address owner ) public virtual override returns (uint256) { require(shares <= maxRedeem(owner), "ERC4626: redeem more than max"); uint256 assets = previewRedeem(shares); _withdraw(_msgSender(), receiver, owner, assets, shares); return assets; } /** * @dev Internal conversion function (from assets to shares) with support for rounding direction. * * Will revert if assets > 0, totalSupply > 0 and totalAssets = 0. That corresponds to a case where any asset * would represent an infinite amout of shares. */ function _convertToShares(uint256 assets, Math.Rounding rounding) internal view virtual returns (uint256 shares) { uint256 supply = totalSupply(); return (assets == 0 || supply == 0) ? assets.mulDiv(10**decimals(), 10**_asset.decimals(), rounding) : assets.mulDiv(supply, totalAssets(), rounding); } /** * @dev Internal conversion function (from shares to assets) with support for rounding direction. */ function _convertToAssets(uint256 shares, Math.Rounding rounding) internal view virtual returns (uint256 assets) { uint256 supply = totalSupply(); return (supply == 0) ? shares.mulDiv(10**_asset.decimals(), 10**decimals(), rounding) : shares.mulDiv(totalAssets(), supply, rounding); } /** * @dev Deposit/mint common workflow. */ function _deposit( address caller, address receiver, uint256 assets, uint256 shares ) internal virtual { // If _asset is ERC777, `transferFrom` can trigger a reenterancy BEFORE the transfer happens through the // `tokensToSend` hook. On the other hand, the `tokenReceived` hook, that is triggered after the transfer, // calls the vault, which is assumed not malicious. // // Conclusion: we need to do the transfer before we mint so that any reentrancy would happen before the // assets are transfered and before the shares are minted, which is a valid state. // slither-disable-next-line reentrancy-no-eth SafeERC20.safeTransferFrom(_asset, caller, address(this), assets); _mint(receiver, shares); emit Deposit(caller, receiver, assets, shares); } /** * @dev Withdraw/redeem common workflow. */ function _withdraw( address caller, address receiver, address owner, uint256 assets, uint256 shares ) internal virtual { if (caller != owner) { _spendAllowance(owner, caller, shares); } // If _asset is ERC777, `transfer` can trigger a reentrancy AFTER the transfer happens through the // `tokensReceived` hook. On the other hand, the `tokensToSend` hook, that is triggered before the transfer, // calls the vault, which is assumed not malicious. // // Conclusion: we need to do the transfer after the burn so that any reentrancy would happen after the // shares are burned and after the assets are transfered, which is a valid state. _burn(owner, shares); SafeERC20.safeTransfer(_asset, receiver, assets); emit Withdraw(caller, receiver, owner, assets, shares); } function _isVaultCollateralized() private view returns (bool) { return totalAssets() > 0 || totalSupply() == 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @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://diligence.consensys.net/posts/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.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @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, it is bubbled up by this * function (like regular Solidity function calls). * * 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. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @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`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // 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(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @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. */ 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]. */ 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. It the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. // We also know that `k`, the position of the most significant bit, is such that `msb(a) = 2**k`. // This gives `2**k < a <= 2**(k+1)` → `2**(k/2) <= sqrt(a) < 2 ** (k/2+1)`. // Using an algorithm similar to the msb conmputation, we are able to compute `result = 2**(k/2)` which is a // good first aproximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1; uint256 x = a; if (x >> 128 > 0) { x >>= 128; result <<= 64; } if (x >> 64 > 0) { x >>= 64; result <<= 32; } if (x >> 32 > 0) { x >>= 32; result <<= 16; } if (x >> 16 > 0) { x >>= 16; result <<= 8; } if (x >> 8 > 0) { x >>= 8; result <<= 4; } if (x >> 4 > 0) { x >>= 4; result <<= 2; } if (x >> 2 > 0) { result <<= 1; } // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { uint256 result = sqrt(a); if (rounding == Rounding.Up && result * result < a) { result += 1; } return result; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"string[]","name":"domeInfo","type":"string[]"},{"internalType":"address","name":"stakingCoinAddress","type":"address"},{"internalType":"address","name":"mUSDSavingsContractAddress","type":"address"},{"internalType":"address","name":"mUSDTokenAddress","type":"address"},{"internalType":"address","name":"mAssetSaveWrapperAddress","type":"address"},{"internalType":"address","name":"mUSDSavingsVaultAddress","type":"address"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"systemOwner","type":"address"},{"internalType":"uint256","name":"systemOwnerPercentage","type":"uint256"},{"components":[{"internalType":"string","name":"beneficiaryCID","type":"string"},{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct DomeCore.BeneficiaryInfo[]","name":"beneficiariesInfo","type":"tuple[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Claimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Deposit","type":"event"},{"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":true,"internalType":"address","name":"staker","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Staked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"unstaker","type":"address"},{"indexed":false,"internalType":"uint256","name":"unstakedAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Unstaked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"caller","type":"address"},{"indexed":true,"internalType":"address","name":"receiver","type":"address"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"assets","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"_domeCID","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_systemOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_systemOwnerPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"asset","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceOfUnderlying","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"beneficiaries","outputs":[{"internalType":"string","name":"beneficiaryCID","type":"string"},{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beneficiariesPercentage","outputs":[{"internalType":"uint256","name":"totalPercentage","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimInterests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"convertToAssets","outputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"convertToShares","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"deposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"asset","type":"uint256"}],"name":"estimateSharesForWithdraw","outputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"uint256","name":"mAsset","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBeneficiariesInfo","outputs":[{"components":[{"internalType":"string","name":"beneficiaryCID","type":"string"},{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"percentage","type":"uint256"}],"internalType":"struct DomeCore.BeneficiaryInfo[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mAssetSaveWrapper","outputs":[{"internalType":"contract ImAssetSaveWrapper","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mUSDSavingsContract","outputs":[{"internalType":"contract ImUSDSavingsContract","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mUSDSavingsVault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mUSDToken","outputs":[{"internalType":"contract ImUSDToken","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"maxMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"maxWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"previewRedeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"}],"name":"previewWithdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"redeem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setApproveForDome","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingCoin","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalAssets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"underlyingAssetsOwnedByDepositor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assets","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"withdraw","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620030663803806200306683398101604081905262000034916200067c565b888a6001815181106200004b576200004b62000774565b60200260200101518b60028151811062000069576200006962000774565b6020026020010151816003908162000082919062000819565b50600462000091828262000819565b5050506001600160a01b0316608052620000ab336200028b565b600680546001600160a01b03199081166001600160a01b038c8116919091179092556007805482168b84161790556008805482168a8416179055600980548216898416179055600a805490911691871691909117905589518a9060009062000117576200011762000774565b6020026020010151600e90816200012f919062000819565b5060005b8151811015620001d057600f82828151811062000154576200015462000774565b6020908102919091018101518254600181018455600093845291909220825160039092020190819062000188908262000819565b5060208201516001820180546001600160a01b0319166001600160a01b0390921691909117905560409091015160029091015580620001c781620008e5565b91505062000133565b50620001dc84620002dd565b60065460405163095ea7b360e01b81526001600160a01b03888116600483015260001960248301529091169063095ea7b3906044016020604051808303816000875af115801562000231573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200025791906200090d565b5050600b80546001600160a01b0319166001600160a01b039390931692909217909155600c55506200093895505050505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620002e762000360565b6001600160a01b038116620003525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b6200035d816200028b565b50565b6005546001600160a01b03163314620003bc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640162000349565b565b634e487b7160e01b600052604160045260246000fd5b604051606081016001600160401b0381118282101715620003f957620003f9620003be565b60405290565b604051601f8201601f191681016001600160401b03811182821017156200042a576200042a620003be565b604052919050565b60006001600160401b038211156200044e576200044e620003be565b5060051b60200190565b600082601f8301126200046a57600080fd5b81516001600160401b03811115620004865762000486620003be565b60206200049c601f8301601f19168201620003ff565b8281528582848701011115620004b157600080fd5b60005b83811015620004d1578581018301518282018401528201620004b4565b506000928101909101919091529392505050565b600082601f830112620004f757600080fd5b81516020620005106200050a8362000432565b620003ff565b82815260059290921b840181019181810190868411156200053057600080fd5b8286015b84811015620005745780516001600160401b03811115620005555760008081fd5b620005658986838b010162000458565b84525091830191830162000534565b509695505050505050565b80516001600160a01b03811681146200059757600080fd5b919050565b600082601f830112620005ae57600080fd5b81516020620005c16200050a8362000432565b82815260059290921b84018101918181019086841115620005e157600080fd5b8286015b84811015620005745780516001600160401b0380821115620006075760008081fd5b908801906060828b03601f1901811315620006225760008081fd5b6200062c620003d4565b87840151838111156200063f5760008081fd5b6200064f8d8a8388010162000458565b82525060409250620006638385016200057f565b81890152920151908201528352918301918301620005e5565b6000806000806000806000806000806101408b8d0312156200069d57600080fd5b8a516001600160401b0380821115620006b557600080fd5b620006c38e838f01620004e5565b9b50620006d360208e016200057f565b9a50620006e360408e016200057f565b9950620006f360608e016200057f565b98506200070360808e016200057f565b97506200071360a08e016200057f565b96506200072360c08e016200057f565b95506200073360e08e016200057f565b94506101008d015193506101208d01519150808211156200075357600080fd5b50620007628d828e016200059c565b9150509295989b9194979a5092959850565b634e487b7160e01b600052603260045260246000fd5b600181811c908216806200079f57607f821691505b602082108103620007c057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200081457600081815260208120601f850160051c81016020861015620007ef5750805b601f850160051c820191505b818110156200081057828155600101620007fb565b5050505b505050565b81516001600160401b03811115620008355762000835620003be565b6200084d816200084684546200078a565b84620007c6565b602080601f8311600181146200088557600084156200086c5750858301515b600019600386901b1c1916600185901b17855562000810565b600085815260208120601f198616915b82811015620008b65788860151825594840194600190910190840162000895565b5085821015620008d55787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000600182016200090657634e487b7160e01b600052601160045260246000fd5b5060010190565b6000602082840312156200092057600080fd5b815180151581146200093157600080fd5b9392505050565b60805161270b6200095b600039600081816103720152610627015261270b6000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c806395d89b4111610167578063c3533dcf116100ce578063dd2b2f8e11610087578063dd2b2f8e146105a1578063dd62ed3e146105b4578063ef8b30f714610308578063efeb5e58146105c7578063f0cb9783146105e9578063f2fde38b146105fc57600080fd5b8063c3533dcf14610537578063c63d75b614610540578063c6e6f59214610555578063ce96cb7714610568578063d905777e1461057b578063da6b688e1461058e57600080fd5b8063b149b55011610120578063b149b550146104e3578063b3d7f6b9146103cf578063b460af94146104f6578063ba08765214610509578063bd275b1f1461051c578063bf4dc9801461052457600080fd5b806395d89b4114610490578063983bf1bd146104985780639af08330146104a0578063a457c2d7146104b5578063a9059cbb146104c8578063ad7a672f146104db57600080fd5b8063395093511161020b5780636e553f65116101c45780636e553f65146103fe57806370a0823114610411578063715018a61461043a57806386da754c146104445780638da5cb5b1461046c57806394bf804d1461047d57600080fd5b806339509351146103965780633af9e669146103a9578063402d267d146103bc5780634cdad506146103cf5780635c109ec8146103e257806364e5c695146103f557600080fd5b80630a28a4771161025d5780630a28a477146103085780630a6f60ff1461031b57806318160ddd1461034657806323b872dd1461034e578063313ce5671461036157806338d52e0f1461037057600080fd5b806301e1d1141461029a57806306fdde03146102b557806307a2d13a146102ca57806308d68258146102dd578063095ea7b3146102e5575b600080fd5b6102a261060f565b6040519081526020015b60405180910390f35b6102bd61069f565b6040516102ac919061232d565b6102a26102d8366004612340565b610731565b6102a2610771565b6102f86102f3366004612370565b6107c7565b60405190151581526020016102ac565b6102a2610316366004612340565b6107df565b60065461032e906001600160a01b031681565b6040516001600160a01b0390911681526020016102ac565b6002546102a2565b6102f861035c36600461239a565b6107ea565b604051600681526020016102ac565b7f000000000000000000000000000000000000000000000000000000000000000061032e565b6102f86103a4366004612370565b610810565b6102a26103b73660046123d6565b610832565b6102a26103ca3660046123d6565b610888565b6102a26103dd366004612340565b6108a6565b60075461032e906001600160a01b031681565b6102a2600d5481565b6102a261040c3660046123f1565b6108b1565b6102a261041f3660046123d6565b6001600160a01b031660009081526020819052604090205490565b6104426108cb565b005b610457610452366004612340565b6108df565b604080519283526020830191909152016102ac565b6005546001600160a01b031661032e565b6102a261048b3660046123f1565b610a03565b6102bd610a1d565b610442610a2c565b6104a8610d45565b6040516102ac919061241d565b6102f86104c3366004612370565b610e59565b6102f86104d6366004612370565b610ee4565b6102a2610ef2565b60095461032e906001600160a01b031681565b6102a26105043660046124a7565b610fe0565b6102a26105173660046124a7565b611003565b6102bd61101e565b610442610532366004612340565b6110ac565b6102a2600c5481565b6102a261054e3660046123d6565b5060001990565b6102a2610563366004612340565b61112d565b6102a26105763660046123d6565b611153565b6102a26105893660046123d6565b61115e565b600a5461032e906001600160a01b031681565b60085461032e906001600160a01b031681565b6102a26105c23660046124e3565b61117c565b6105da6105d5366004612340565b6111a7565b6040516102ac9392919061250d565b600b5461032e906001600160a01b031681565b61044261060a3660046123d6565b611273565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069a919061253b565b905090565b6060600380546106ae90612554565b80601f01602080910402602001604051908101604052809291908181526020018280546106da90612554565b80156107275780601f106106fc57610100808354040283529160200191610727565b820191906000526020600020905b81548152906001019060200180831161070a57829003601f168201915b5050505050905090565b600061073c60025490565b600003610747575090565b6002546107526112ec565b61075c908461259e565b61076691906125b5565b92915050565b919050565b6000805b600f548110156107c357600f8181548110610792576107926125d7565b906000526020600020906003020160020154826107af91906125ed565b9150806107bb81612600565b915050610775565b5090565b6000336107d5818585611386565b5060019392505050565b60006107668261112d565b6000336107f88582856114aa565b610803858585611524565b60019150505b9392505050565b6000336107d5818585610823838361117c565b61082d91906125ed565b611386565b6001600160a01b03811660009081526020819052604081205460000361085a57506000919050565b6002546108656112ec565b6001600160a01b03841660009081526020819052604090205461075c919061259e565b60006108926116f2565b61089d576000610766565b60001992915050565b600061076682610731565b6000806108bd846107df565b90506108093384868461170c565b6108d3611aaa565b6108dd6000611b04565b565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152670de0b6b3a76400006024820152600092839283929116906378aa987e90604401602060405180830381865afa158015610940573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610964919061253b565b90506109718160016125ed565b61098385670de0b6b3a764000061259e565b61098d91906125b5565b6007546040516363737ac960e11b8152600481018390529193506001600160a01b03169063c6e6f59290602401602060405180830381865afa1580156109d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fb919061253b565b925050915091565b600080610a0f846108a6565b90506108093384838761170c565b6060600480546106ae90612554565b600080610a37610ef2565b9050600d548110610a5657600d54610a4f9082612619565b9150610a5a565b5050565b60006064600c5484610a6c919061259e565b610a7691906125b5565b905060006064610a84610771565b610a8e8487612619565b610a98919061259e565b610aa291906125b5565b9050600080610ab461045285856125ed565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529395509193506000929116906378aa987e90604401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061253b565b60075460065460085460405163f25816b560e01b81529394506001600160a01b039283169363f25816b593610b7c93899360019389939283169230921690859060040161262c565b6060604051808303816000875af1158015610b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbf9190612669565b5050600b54600654610bdf92506001600160a01b03908116911687611b56565b846000805b600f54811015610cde57600f54610bfd90600190612619565b8103610c6057610c0d8385612619565b9150610c4f600f8281548110610c2557610c256125d7565b60009182526020909120600160039092020101546006546001600160a01b03908116911684611b56565b610c5982846125ed565b9250610ccc565b6064600f8281548110610c7557610c756125d7565b906000526020600020906003020160020154898c610c939190612619565b610c9d919061259e565b610ca791906125b5565b9150610cbf600f8281548110610c2557610c256125d7565b610cc982846125ed565b92505b80610cd681612600565b915050610be4565b50610ce9828a612619565b600d6000828254610cfa91906125ed565b90915550506040805183815242602082015233917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a91015b60405180910390a2505050505050505050565b6060600f805480602002602001604051908101604052809291908181526020016000905b82821015610e505783829060005260206000209060030201604051806060016040529081600082018054610d9c90612554565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc890612554565b8015610e155780601f10610dea57610100808354040283529160200191610e15565b820191906000526020600020905b815481529060010190602001808311610df857829003601f168201915b50505091835250506001828101546001600160a01b031660208084019190915260029093015460409092019190915291835292019101610d69565b50505050905090565b60003381610e67828661117c565b905083811015610ecc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610ed98286868403611386565b506001949350505050565b6000336107d5818585611524565b600754604051633af9e66960e01b815230600482015260009182916001600160a01b0390911690633af9e66990602401602060405180830381865afa158015610f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f63919061253b565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529293506000929116906378aa987e90604401602060405180830381865afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610809919061253b565b600080610fec856107df565b9050610ffb3385858885611bbe565b949350505050565b60008061100f856108a6565b9050610ffb3385858489611bbe565b600e805461102b90612554565b80601f016020809104026020016040519081016040528092919081815260200182805461105790612554565b80156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b505050505081565b6110b4611aaa565b60065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af1158015611109573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612697565b600061113860025490565b600003611143575090565b61114b6112ec565b600254610752565b600061076682610832565b6001600160a01b038116600090815260208190526040812054610766565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600f81815481106111b757600080fd5b90600052602060002090600302016000915090508060000180546111da90612554565b80601f016020809104026020016040519081016040528092919081815260200182805461120690612554565b80156112535780601f1061122857610100808354040283529160200191611253565b820191906000526020600020905b81548152906001019060200180831161123657829003601f168201915b50505050600183015460029093015491926001600160a01b031691905083565b61127b611aaa565b6001600160a01b0381166112e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ec3565b6112e981611b04565b50565b6000806112f7610ef2565b90506000600d54821115611380576000600d54836113159190612619565b905060006064600c5483611329919061259e565b61133391906125b5565b905060006064611341610771565b61134b8486612619565b611355919061259e565b61135f91906125b5565b90508061136c8387612619565b6113769190612619565b9350505050610766565b50919050565b6001600160a01b0383166113e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ec3565b6001600160a01b0382166114495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ec3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006114b6848461117c565b9050600019811461151e57818110156115115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610ec3565b61151e8484848403611386565b50505050565b6001600160a01b0383166115885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ec3565b6001600160a01b0382166115ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ec3565b6001600160a01b038316600090815260208190526040902054818110156116625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ec3565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906116999084906125ed565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116e591815260200190565b60405180910390a361151e565b6000806116fd61060f565b118061069a5750506002541590565b600082116117665760405162461bcd60e51b815260206004820152602160248201527f54686520617373657473206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610ec3565b600654604051636eb1769f60e11b81526001600160a01b0386811660048301523060248301529091169063dd62ed3e90604401602060405180830381865afa1580156117b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117da919061253b565b8211156118405760405162461bcd60e51b815260206004820152602e60248201527f5468657265206973206e6f206173206d75636820616c6c6f77616e636520666f60448201526d391039ba30b5b4b7339031b7b4b760911b6064820152608401610ec3565b6006546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a0823190602401602060405180830381865afa15801561188a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ae919061253b565b8211156119125760405162461bcd60e51b815260206004820152602c60248201527f5468657265206973206e6f206173206d7563682062616c616e636520666f722060448201526b39ba30b5b4b7339031b7b4b760a11b6064820152608401610ec3565b60065461192a906001600160a01b0316853085611e92565b60085460065460405163119849cf60e01b81526001600160a01b03918216600482015260248101859052600092919091169063119849cf90604401602060405180830381865afa158015611982573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a6919061253b565b600954600854600754600a54600654604051631c08892160e11b81526001600160a01b03948516600482015292841660248401529083166044830152821660648201526084810187905260a48101849052600060c4820152929350169063381112429060e401600060405180830381600087803b158015611a2657600080fd5b505af1158015611a3a573d6000803e3d6000fd5b5050505082600d6000828254611a5091906125ed565b90915550611a6090508483611eca565b604080518481524260208201526001600160a01b038616917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90910160405180910390a25050505050565b6005546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ec3565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b038316602482015260448101829052611bb990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611fa9565b505050565b846001600160a01b0316836001600160a01b031614611c185760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba1030b71037bbb732b960511b6044820152606401610ec3565b81600010611c725760405162461bcd60e51b815260206004820152602160248201527f54686520616d6f756e74206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610ec3565b6001600160a01b03831660009081526020819052604090205480821115611cdb5760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206861766520656e6f7567682062616c616e63650000006044820152606401610ec3565b611ce3610a2c565b600080611cef856108df565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529395509193506000929116906378aa987e90604401602060405180830381865afa158015611d4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6f919061253b565b9050600760009054906101000a90046001600160a01b03166001600160a01b031663f25816b584600184600660009054906101000a90046001600160a01b03168d600860009054906101000a90046001600160a01b031660016040518863ffffffff1660e01b8152600401611dea979695949392919061262c565b6060604051808303816000875af1158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190612669565b50505085600d6000828254611e429190612619565b90915550611e529050878661207b565b604080518781524260208201526001600160a01b038916917f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9101610d32565b6040516001600160a01b038085166024830152831660448201526064810182905261151e9085906323b872dd60e01b90608401611b82565b6001600160a01b038216611f205760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ec3565b8060026000828254611f3291906125ed565b90915550506001600160a01b03821660009081526020819052604081208054839290611f5f9084906125ed565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000611ffe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121c99092919063ffffffff16565b805190915015611bb9578080602001905181019061201c9190612697565b611bb95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ec3565b6001600160a01b0382166120db5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ec3565b6001600160a01b0382166000908152602081905260409020548181101561214f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ec3565b6001600160a01b038316600090815260208190526040812083830390556002805484929061217e908490612619565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6060610ffb8484600085856001600160a01b0385163b61222b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ec3565b600080866001600160a01b0316858760405161224791906126b9565b60006040518083038185875af1925050503d8060008114612284576040519150601f19603f3d011682016040523d82523d6000602084013e612289565b606091505b50915091506122998282866122a4565b979650505050505050565b606083156122b3575081610809565b8251156122c35782518084602001fd5b8160405162461bcd60e51b8152600401610ec3919061232d565b60005b838110156122f85781810151838201526020016122e0565b50506000910152565b600081518084526123198160208601602086016122dd565b601f01601f19169290920160200192915050565b6020815260006108096020830184612301565b60006020828403121561235257600080fd5b5035919050565b80356001600160a01b038116811461076c57600080fd5b6000806040838503121561238357600080fd5b61238c83612359565b946020939093013593505050565b6000806000606084860312156123af57600080fd5b6123b884612359565b92506123c660208501612359565b9150604084013590509250925092565b6000602082840312156123e857600080fd5b61080982612359565b6000806040838503121561240457600080fd5b8235915061241460208401612359565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561249957603f1989840301855281516060815181865261246a82870182612301565b838b01516001600160a01b0316878c015292890151958901959095525094870194925090860190600101612444565b509098975050505050505050565b6000806000606084860312156124bc57600080fd5b833592506124cc60208501612359565b91506124da60408501612359565b90509250925092565b600080604083850312156124f657600080fd5b6124ff83612359565b915061241460208401612359565b6060815260006125206060830186612301565b6001600160a01b039490941660208301525060400152919050565b60006020828403121561254d57600080fd5b5051919050565b600181811c9082168061256857607f821691505b60208210810361138057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761076657610766612588565b6000826125d257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b8082018082111561076657610766612588565b60006001820161261257612612612588565b5060010190565b8181038181111561076657610766612588565b968752941515602087015260408601939093526001600160a01b039182166060860152811660808501521660a0830152151560c082015260e00190565b60008060006060848603121561267e57600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156126a957600080fd5b8151801515811461080957600080fd5b600082516126cb8184602087016122dd565b919091019291505056fea264697066735822122087ec5651f9cb5b39081f5b81a0bf77fbd0607cfd5a4445ce0855dfcbb1bcab6764736f6c634300081100330000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000030647a72dc82d7fbb1123ea74716ab8a317eac19000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a50000000000000000000000000ca7a25181fc991e3cc62bac511e62973991f32500000000000000000000000078befca7de27d07dc6e71da295cc2946681a6c7b000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002e516d54346b7253664d7a696a48484c766552746e58535870615756524e4d714e4e5873595272754156716567734e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000094669727374446f6d650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000346445400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000f38cfd68632849a9499857411d883b86a4b73bb20000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e516d56554472755a6247365963335875396f39677544573644527a6e7a33665250453155626b57325756345045630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000ae492e3873945f9af9b6cad802e030e2935073ce000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e516d636b4d43335a766a5774487773446b37554d3831396641594a4a41344442536e717071514e63524847437738000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102955760003560e01c806395d89b4111610167578063c3533dcf116100ce578063dd2b2f8e11610087578063dd2b2f8e146105a1578063dd62ed3e146105b4578063ef8b30f714610308578063efeb5e58146105c7578063f0cb9783146105e9578063f2fde38b146105fc57600080fd5b8063c3533dcf14610537578063c63d75b614610540578063c6e6f59214610555578063ce96cb7714610568578063d905777e1461057b578063da6b688e1461058e57600080fd5b8063b149b55011610120578063b149b550146104e3578063b3d7f6b9146103cf578063b460af94146104f6578063ba08765214610509578063bd275b1f1461051c578063bf4dc9801461052457600080fd5b806395d89b4114610490578063983bf1bd146104985780639af08330146104a0578063a457c2d7146104b5578063a9059cbb146104c8578063ad7a672f146104db57600080fd5b8063395093511161020b5780636e553f65116101c45780636e553f65146103fe57806370a0823114610411578063715018a61461043a57806386da754c146104445780638da5cb5b1461046c57806394bf804d1461047d57600080fd5b806339509351146103965780633af9e669146103a9578063402d267d146103bc5780634cdad506146103cf5780635c109ec8146103e257806364e5c695146103f557600080fd5b80630a28a4771161025d5780630a28a477146103085780630a6f60ff1461031b57806318160ddd1461034657806323b872dd1461034e578063313ce5671461036157806338d52e0f1461037057600080fd5b806301e1d1141461029a57806306fdde03146102b557806307a2d13a146102ca57806308d68258146102dd578063095ea7b3146102e5575b600080fd5b6102a261060f565b6040519081526020015b60405180910390f35b6102bd61069f565b6040516102ac919061232d565b6102a26102d8366004612340565b610731565b6102a2610771565b6102f86102f3366004612370565b6107c7565b60405190151581526020016102ac565b6102a2610316366004612340565b6107df565b60065461032e906001600160a01b031681565b6040516001600160a01b0390911681526020016102ac565b6002546102a2565b6102f861035c36600461239a565b6107ea565b604051600681526020016102ac565b7f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4861032e565b6102f86103a4366004612370565b610810565b6102a26103b73660046123d6565b610832565b6102a26103ca3660046123d6565b610888565b6102a26103dd366004612340565b6108a6565b60075461032e906001600160a01b031681565b6102a2600d5481565b6102a261040c3660046123f1565b6108b1565b6102a261041f3660046123d6565b6001600160a01b031660009081526020819052604090205490565b6104426108cb565b005b610457610452366004612340565b6108df565b604080519283526020830191909152016102ac565b6005546001600160a01b031661032e565b6102a261048b3660046123f1565b610a03565b6102bd610a1d565b610442610a2c565b6104a8610d45565b6040516102ac919061241d565b6102f86104c3366004612370565b610e59565b6102f86104d6366004612370565b610ee4565b6102a2610ef2565b60095461032e906001600160a01b031681565b6102a26105043660046124a7565b610fe0565b6102a26105173660046124a7565b611003565b6102bd61101e565b610442610532366004612340565b6110ac565b6102a2600c5481565b6102a261054e3660046123d6565b5060001990565b6102a2610563366004612340565b61112d565b6102a26105763660046123d6565b611153565b6102a26105893660046123d6565b61115e565b600a5461032e906001600160a01b031681565b60085461032e906001600160a01b031681565b6102a26105c23660046124e3565b61117c565b6105da6105d5366004612340565b6111a7565b6040516102ac9392919061250d565b600b5461032e906001600160a01b031681565b61044261060a3660046123d6565b611273565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401602060405180830381865afa158015610676573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069a919061253b565b905090565b6060600380546106ae90612554565b80601f01602080910402602001604051908101604052809291908181526020018280546106da90612554565b80156107275780601f106106fc57610100808354040283529160200191610727565b820191906000526020600020905b81548152906001019060200180831161070a57829003601f168201915b5050505050905090565b600061073c60025490565b600003610747575090565b6002546107526112ec565b61075c908461259e565b61076691906125b5565b92915050565b919050565b6000805b600f548110156107c357600f8181548110610792576107926125d7565b906000526020600020906003020160020154826107af91906125ed565b9150806107bb81612600565b915050610775565b5090565b6000336107d5818585611386565b5060019392505050565b60006107668261112d565b6000336107f88582856114aa565b610803858585611524565b60019150505b9392505050565b6000336107d5818585610823838361117c565b61082d91906125ed565b611386565b6001600160a01b03811660009081526020819052604081205460000361085a57506000919050565b6002546108656112ec565b6001600160a01b03841660009081526020819052604090205461075c919061259e565b60006108926116f2565b61089d576000610766565b60001992915050565b600061076682610731565b6000806108bd846107df565b90506108093384868461170c565b6108d3611aaa565b6108dd6000611b04565b565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152670de0b6b3a76400006024820152600092839283929116906378aa987e90604401602060405180830381865afa158015610940573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610964919061253b565b90506109718160016125ed565b61098385670de0b6b3a764000061259e565b61098d91906125b5565b6007546040516363737ac960e11b8152600481018390529193506001600160a01b03169063c6e6f59290602401602060405180830381865afa1580156109d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109fb919061253b565b925050915091565b600080610a0f846108a6565b90506108093384838761170c565b6060600480546106ae90612554565b600080610a37610ef2565b9050600d548110610a5657600d54610a4f9082612619565b9150610a5a565b5050565b60006064600c5484610a6c919061259e565b610a7691906125b5565b905060006064610a84610771565b610a8e8487612619565b610a98919061259e565b610aa291906125b5565b9050600080610ab461045285856125ed565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529395509193506000929116906378aa987e90604401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b34919061253b565b60075460065460085460405163f25816b560e01b81529394506001600160a01b039283169363f25816b593610b7c93899360019389939283169230921690859060040161262c565b6060604051808303816000875af1158015610b9b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bbf9190612669565b5050600b54600654610bdf92506001600160a01b03908116911687611b56565b846000805b600f54811015610cde57600f54610bfd90600190612619565b8103610c6057610c0d8385612619565b9150610c4f600f8281548110610c2557610c256125d7565b60009182526020909120600160039092020101546006546001600160a01b03908116911684611b56565b610c5982846125ed565b9250610ccc565b6064600f8281548110610c7557610c756125d7565b906000526020600020906003020160020154898c610c939190612619565b610c9d919061259e565b610ca791906125b5565b9150610cbf600f8281548110610c2557610c256125d7565b610cc982846125ed565b92505b80610cd681612600565b915050610be4565b50610ce9828a612619565b600d6000828254610cfa91906125ed565b90915550506040805183815242602082015233917f987d620f307ff6b94d58743cb7a7509f24071586a77759b77c2d4e29f75a2f9a91015b60405180910390a2505050505050505050565b6060600f805480602002602001604051908101604052809291908181526020016000905b82821015610e505783829060005260206000209060030201604051806060016040529081600082018054610d9c90612554565b80601f0160208091040260200160405190810160405280929190818152602001828054610dc890612554565b8015610e155780601f10610dea57610100808354040283529160200191610e15565b820191906000526020600020905b815481529060010190602001808311610df857829003601f168201915b50505091835250506001828101546001600160a01b031660208084019190915260029093015460409092019190915291835292019101610d69565b50505050905090565b60003381610e67828661117c565b905083811015610ecc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084015b60405180910390fd5b610ed98286868403611386565b506001949350505050565b6000336107d5818585611524565b600754604051633af9e66960e01b815230600482015260009182916001600160a01b0390911690633af9e66990602401602060405180830381865afa158015610f3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f63919061253b565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529293506000929116906378aa987e90604401602060405180830381865afa158015610fbc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610809919061253b565b600080610fec856107df565b9050610ffb3385858885611bbe565b949350505050565b60008061100f856108a6565b9050610ffb3385858489611bbe565b600e805461102b90612554565b80601f016020809104026020016040519081016040528092919081815260200182805461105790612554565b80156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b505050505081565b6110b4611aaa565b60065460095460405163095ea7b360e01b81526001600160a01b0391821660048201526024810184905291169063095ea7b3906044016020604051808303816000875af1158015611109573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a569190612697565b600061113860025490565b600003611143575090565b61114b6112ec565b600254610752565b600061076682610832565b6001600160a01b038116600090815260208190526040812054610766565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600f81815481106111b757600080fd5b90600052602060002090600302016000915090508060000180546111da90612554565b80601f016020809104026020016040519081016040528092919081815260200182805461120690612554565b80156112535780601f1061122857610100808354040283529160200191611253565b820191906000526020600020905b81548152906001019060200180831161123657829003601f168201915b50505050600183015460029093015491926001600160a01b031691905083565b61127b611aaa565b6001600160a01b0381166112e05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610ec3565b6112e981611b04565b50565b6000806112f7610ef2565b90506000600d54821115611380576000600d54836113159190612619565b905060006064600c5483611329919061259e565b61133391906125b5565b905060006064611341610771565b61134b8486612619565b611355919061259e565b61135f91906125b5565b90508061136c8387612619565b6113769190612619565b9350505050610766565b50919050565b6001600160a01b0383166113e85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610ec3565b6001600160a01b0382166114495760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610ec3565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006114b6848461117c565b9050600019811461151e57818110156115115760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610ec3565b61151e8484848403611386565b50505050565b6001600160a01b0383166115885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610ec3565b6001600160a01b0382166115ea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610ec3565b6001600160a01b038316600090815260208190526040902054818110156116625760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610ec3565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906116999084906125ed565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116e591815260200190565b60405180910390a361151e565b6000806116fd61060f565b118061069a5750506002541590565b600082116117665760405162461bcd60e51b815260206004820152602160248201527f54686520617373657473206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610ec3565b600654604051636eb1769f60e11b81526001600160a01b0386811660048301523060248301529091169063dd62ed3e90604401602060405180830381865afa1580156117b6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117da919061253b565b8211156118405760405162461bcd60e51b815260206004820152602e60248201527f5468657265206973206e6f206173206d75636820616c6c6f77616e636520666f60448201526d391039ba30b5b4b7339031b7b4b760911b6064820152608401610ec3565b6006546040516370a0823160e01b81526001600160a01b038681166004830152909116906370a0823190602401602060405180830381865afa15801561188a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ae919061253b565b8211156119125760405162461bcd60e51b815260206004820152602c60248201527f5468657265206973206e6f206173206d7563682062616c616e636520666f722060448201526b39ba30b5b4b7339031b7b4b760a11b6064820152608401610ec3565b60065461192a906001600160a01b0316853085611e92565b60085460065460405163119849cf60e01b81526001600160a01b03918216600482015260248101859052600092919091169063119849cf90604401602060405180830381865afa158015611982573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119a6919061253b565b600954600854600754600a54600654604051631c08892160e11b81526001600160a01b03948516600482015292841660248401529083166044830152821660648201526084810187905260a48101849052600060c4820152929350169063381112429060e401600060405180830381600087803b158015611a2657600080fd5b505af1158015611a3a573d6000803e3d6000fd5b5050505082600d6000828254611a5091906125ed565b90915550611a6090508483611eca565b604080518481524260208201526001600160a01b038616917f1449c6dd7851abc30abf37f57715f492010519147cc2652fbc38202c18a6ee90910160405180910390a25050505050565b6005546001600160a01b031633146108dd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ec3565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6040516001600160a01b038316602482015260448101829052611bb990849063a9059cbb60e01b906064015b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152611fa9565b505050565b846001600160a01b0316836001600160a01b031614611c185760405162461bcd60e51b815260206004820152601660248201527521b0b63632b91034b9903737ba1030b71037bbb732b960511b6044820152606401610ec3565b81600010611c725760405162461bcd60e51b815260206004820152602160248201527f54686520616d6f756e74206d7573742062652067726561746572207468616e206044820152600360fc1b6064820152608401610ec3565b6001600160a01b03831660009081526020819052604090205480821115611cdb5760405162461bcd60e51b815260206004820152601d60248201527f596f7520646f6e2774206861766520656e6f7567682062616c616e63650000006044820152606401610ec3565b611ce3610a2c565b600080611cef856108df565b600854600654604051633c554c3f60e11b81526001600160a01b039182166004820152602481018490529395509193506000929116906378aa987e90604401602060405180830381865afa158015611d4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d6f919061253b565b9050600760009054906101000a90046001600160a01b03166001600160a01b031663f25816b584600184600660009054906101000a90046001600160a01b03168d600860009054906101000a90046001600160a01b031660016040518863ffffffff1660e01b8152600401611dea979695949392919061262c565b6060604051808303816000875af1158015611e09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e2d9190612669565b50505085600d6000828254611e429190612619565b90915550611e529050878661207b565b604080518781524260208201526001600160a01b038916917f7fc4727e062e336010f2c282598ef5f14facb3de68cf8195c2f23e1454b2b74e9101610d32565b6040516001600160a01b038085166024830152831660448201526064810182905261151e9085906323b872dd60e01b90608401611b82565b6001600160a01b038216611f205760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610ec3565b8060026000828254611f3291906125ed565b90915550506001600160a01b03821660009081526020819052604081208054839290611f5f9084906125ed565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6000611ffe826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166121c99092919063ffffffff16565b805190915015611bb9578080602001905181019061201c9190612697565b611bb95760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610ec3565b6001600160a01b0382166120db5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610ec3565b6001600160a01b0382166000908152602081905260409020548181101561214f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610ec3565b6001600160a01b038316600090815260208190526040812083830390556002805484929061217e908490612619565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b6060610ffb8484600085856001600160a01b0385163b61222b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610ec3565b600080866001600160a01b0316858760405161224791906126b9565b60006040518083038185875af1925050503d8060008114612284576040519150601f19603f3d011682016040523d82523d6000602084013e612289565b606091505b50915091506122998282866122a4565b979650505050505050565b606083156122b3575081610809565b8251156122c35782518084602001fd5b8160405162461bcd60e51b8152600401610ec3919061232d565b60005b838110156122f85781810151838201526020016122e0565b50506000910152565b600081518084526123198160208601602086016122dd565b601f01601f19169290920160200192915050565b6020815260006108096020830184612301565b60006020828403121561235257600080fd5b5035919050565b80356001600160a01b038116811461076c57600080fd5b6000806040838503121561238357600080fd5b61238c83612359565b946020939093013593505050565b6000806000606084860312156123af57600080fd5b6123b884612359565b92506123c660208501612359565b9150604084013590509250925092565b6000602082840312156123e857600080fd5b61080982612359565b6000806040838503121561240457600080fd5b8235915061241460208401612359565b90509250929050565b60006020808301818452808551808352604092508286019150828160051b87010184880160005b8381101561249957603f1989840301855281516060815181865261246a82870182612301565b838b01516001600160a01b0316878c015292890151958901959095525094870194925090860190600101612444565b509098975050505050505050565b6000806000606084860312156124bc57600080fd5b833592506124cc60208501612359565b91506124da60408501612359565b90509250925092565b600080604083850312156124f657600080fd5b6124ff83612359565b915061241460208401612359565b6060815260006125206060830186612301565b6001600160a01b039490941660208301525060400152919050565b60006020828403121561254d57600080fd5b5051919050565b600181811c9082168061256857607f821691505b60208210810361138057634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808202811582820484141761076657610766612588565b6000826125d257634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b8082018082111561076657610766612588565b60006001820161261257612612612588565b5060010190565b8181038181111561076657610766612588565b968752941515602087015260408601939093526001600160a01b039182166060860152811660808501521660a0830152151560c082015260e00190565b60008060006060848603121561267e57600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156126a957600080fd5b8151801515811461080957600080fd5b600082516126cb8184602087016122dd565b919091019291505056fea264697066735822122087ec5651f9cb5b39081f5b81a0bf77fbd0607cfd5a4445ce0855dfcbb1bcab6764736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000000000140000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4800000000000000000000000030647a72dc82d7fbb1123ea74716ab8a317eac19000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a50000000000000000000000000ca7a25181fc991e3cc62bac511e62973991f32500000000000000000000000078befca7de27d07dc6e71da295cc2946681a6c7b000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d000000000000000000000000000000000000000000000000000000000000000a00000000000000000000000000000000000000000000000000000000000002a00000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000c00000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000002e516d54346b7253664d7a696a48484c766552746e58535870615756524e4d714e4e5873595272754156716567734e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000094669727374446f6d650000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000346445400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000f38cfd68632849a9499857411d883b86a4b73bb20000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000002e516d56554472755a6247365963335875396f39677544573644527a6e7a33665250453155626b57325756345045630000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000060000000000000000000000000ae492e3873945f9af9b6cad802e030e2935073ce000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000002e516d636b4d43335a766a5774487773446b37554d3831396641594a4a41344442536e717071514e63524847437738000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : domeInfo (string[]): QmT4krSfMzijHHLveRtnXSXpaWVRNMqNNXsYRruAVqegsN,FirstDome,FDT
Arg [1] : stakingCoinAddress (address): 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
Arg [2] : mUSDSavingsContractAddress (address): 0x30647a72Dc82d7Fbb1123EA74716aB8A317Eac19
Arg [3] : mUSDTokenAddress (address): 0xe2f2a5C287993345a840Db3B0845fbC70f5935a5
Arg [4] : mAssetSaveWrapperAddress (address): 0x0CA7A25181FC991e3cC62BaC511E62973991f325
Arg [5] : mUSDSavingsVaultAddress (address): 0x78BefCa7de27d07DC6e71da295Cc2946681A6c7B
Arg [6] : owner (address): 0xC95cE5A64b5f2d3772Ee6B9adF9AA27d7fF2b68D
Arg [7] : systemOwner (address): 0xC95cE5A64b5f2d3772Ee6B9adF9AA27d7fF2b68D
Arg [8] : systemOwnerPercentage (uint256): 10
Arg [9] : beneficiariesInfo (tuple[]): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput],System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
-----Encoded View---------------
36 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [1] : 000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Arg [2] : 00000000000000000000000030647a72dc82d7fbb1123ea74716ab8a317eac19
Arg [3] : 000000000000000000000000e2f2a5c287993345a840db3b0845fbc70f5935a5
Arg [4] : 0000000000000000000000000ca7a25181fc991e3cc62bac511e62973991f325
Arg [5] : 00000000000000000000000078befca7de27d07dc6e71da295cc2946681a6c7b
Arg [6] : 000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d
Arg [7] : 000000000000000000000000c95ce5a64b5f2d3772ee6b9adf9aa27d7ff2b68d
Arg [8] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [9] : 00000000000000000000000000000000000000000000000000000000000002a0
Arg [10] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [11] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [12] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [14] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [15] : 516d54346b7253664d7a696a48484c766552746e58535870615756524e4d714e
Arg [16] : 4e5873595272754156716567734e000000000000000000000000000000000000
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000009
Arg [18] : 4669727374446f6d650000000000000000000000000000000000000000000000
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [20] : 4644540000000000000000000000000000000000000000000000000000000000
Arg [21] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [22] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [25] : 000000000000000000000000f38cfd68632849a9499857411d883b86a4b73bb2
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [27] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [28] : 516d56554472755a6247365963335875396f39677544573644527a6e7a336652
Arg [29] : 50453155626b5732575634504563000000000000000000000000000000000000
Arg [30] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [31] : 000000000000000000000000ae492e3873945f9af9b6cad802e030e2935073ce
Arg [32] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [33] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [34] : 516d636b4d43335a766a5774487773446b37554d3831396641594a4a41344442
Arg [35] : 536e717071514e63524847437738000000000000000000000000000000000000
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.