Feature Tip: Add private address tag to any address under My Name Tag !
Source Code
Latest 7 from a total of 7 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Revoke Role | 24392065 | 18 days ago | IN | 0 ETH | 0.0000781 | ||||
| Grant Role | 23125549 | 195 days ago | IN | 0 ETH | 0.00012979 | ||||
| Grant Role | 22246692 | 318 days ago | IN | 0 ETH | 0.00007588 | ||||
| Revoke Role | 21940294 | 361 days ago | IN | 0 ETH | 0.00004167 | ||||
| Grant Role | 21875865 | 370 days ago | IN | 0 ETH | 0.00006511 | ||||
| Grant Role | 21639652 | 403 days ago | IN | 0 ETH | 0.00043078 | ||||
| Grant Role | 21539466 | 417 days ago | IN | 0 ETH | 0.0004539 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x680179BF...F30987D7E The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
MorphoUnderlyingAdapter
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {AccessControl} from "openzeppelin-contracts/contracts/access/AccessControl.sol";
import {IERC4626} from "openzeppelin-contracts/contracts/interfaces/IERC4626.sol";
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
import {IERC20Metadata} from "openzeppelin-contracts/contracts/token/ERC20/extensions/IERC20Metadata.sol";
import {IOracle} from "src/interfaces/IOracle.sol";
import {IAssetAdapter} from "src/interfaces/IAssetAdapter.sol";
contract MorphoUnderlyingAdapter is AccessControl, IAssetAdapter {
bytes32 public constant MANAGER =
keccak256(abi.encode("asset.adapter.manager"));
bytes32 public constant CONTROLLER =
keccak256(abi.encode("asset.adapter.controller"));
uint256 public immutable duration;
IOracle public immutable underlyingPriceOracle;
IOracle public immutable fundPriceOracle;
uint256 public underlyingRiskWeight = 0e6; // 100% = 1e6
uint256 public fundRiskWeight = 0e6; // 100% = 1e6
IERC4626 public immutable fund;
IERC20 public immutable underlying;
uint8 public immutable DECIMAL_FACTOR;
constructor(
address _admin,
address _underlyingAddr,
address _fundAddr,
address _underlyingPriceOracleAddr,
address _fundPriceOracleAddr,
uint256 _duration
) {
_grantRole(DEFAULT_ADMIN_ROLE, _admin);
underlying = IERC20(_underlyingAddr);
fund = IERC4626(_fundAddr);
duration = _duration;
DECIMAL_FACTOR = IERC20Metadata(address(underlying)).decimals();
underlyingPriceOracle = IOracle(_underlyingPriceOracleAddr);
fundPriceOracle = IOracle(_fundPriceOracleAddr);
}
function allocate(uint256 _assets) external {
underlying.transferFrom(msg.sender, address(this), _assets);
emit Allocate(msg.sender, _assets, block.timestamp);
}
function withdraw(uint256 _assets) external onlyRole(CONTROLLER) {
underlying.transfer(msg.sender, _assets);
emit Withdraw(msg.sender, _assets, block.timestamp);
}
function deposit(uint256 _assets) public onlyRole(CONTROLLER) {
underlying.approve(address(fund), _assets);
fund.deposit(_assets, address(this));
emit Deposit(msg.sender, _assets, block.timestamp);
}
function redeem(uint256 _shares) public onlyRole(CONTROLLER) {
fund.redeem(_shares, address(this), address(this));
emit Redeem(msg.sender, _shares, block.timestamp);
}
function setUnderlyingRiskWeight(
uint256 _riskWeight
) external onlyRole(MANAGER) {
require(1e6 > _riskWeight, "FA: Risk Weight can not be above 100%");
underlyingRiskWeight = _riskWeight;
emit UnderlyingRiskWeightUpdate(_riskWeight, block.timestamp);
}
function setFundRiskWeight(uint256 _riskWeight) external onlyRole(MANAGER) {
require(1e6 > _riskWeight, "FA: Risk Weight can not be above 100%");
fundRiskWeight = _riskWeight;
emit FundRiskWeightUpdate(_riskWeight, block.timestamp);
}
function totalValue() external view returns (uint256 total) {
total += _underlyingTotalValue();
total += _fundTotalValue();
}
function totalRiskValue() external view returns (uint256 total) {
total += _underlyingTotalRiskValue();
total += _fundTotalRiskValue();
}
function underlyingTotalRiskValue() external view returns (uint256) {
return _underlyingTotalRiskValue();
}
function _underlyingTotalRiskValue() private view returns (uint256) {
return _underlyingRiskValue(_underlyingBalance());
}
function underlyingRiskValue(
uint256 amount
) external view returns (uint256) {
return _underlyingRiskValue(amount);
}
function _underlyingRiskValue(
uint256 amount
) private view returns (uint256) {
return (underlyingRiskWeight * _underlyingValue(amount)) / 1e6;
}
function underlyingTotalValue() external view returns (uint256) {
return _underlyingTotalValue();
}
function _underlyingTotalValue() private view returns (uint256) {
return _underlyingValue(_underlyingBalance());
}
function underlyingValue(uint256 amount) external view returns (uint256) {
return _underlyingValue(amount);
}
function _underlyingValue(uint256 amount) private view returns (uint256) {
return
(_underlyingPriceOracleLatestAnswer() *
amount *
(10 ** (18 - DECIMAL_FACTOR))) / 1e8;
}
function underlyingBalance() external view returns (uint256) {
return _underlyingBalance();
}
function _underlyingBalance() private view returns (uint256) {
return underlying.balanceOf(address(this));
}
function fundTotalRiskValue() external view returns (uint256) {
return _fundTotalRiskValue();
}
function _fundTotalRiskValue() private view returns (uint256) {
return _fundRiskValue(_fundBalance());
}
function fundRiskValue(uint256 amount) external view returns (uint256) {
return _fundRiskValue(amount);
}
function _fundRiskValue(uint256 amount) private view returns (uint256) {
return (fundRiskWeight * _fundValue(amount)) / 1e6;
}
function fundTotalValue() external view returns (uint256) {
return _fundTotalValue();
}
function _fundTotalValue() private view returns (uint256) {
return _fundValue((_fundBalance()));
}
function fundValue(uint256 amount) external view returns (uint256) {
return _fundValue(amount);
}
function _fundValue(uint256 amount) private view returns (uint256) {
return (_fundPriceOracleLatestAnswer() * amount) / 1e8;
}
function fundBalance() external view returns (uint256) {
return _fundBalance();
}
function _fundBalance() private view returns (uint256) {
return fund.balanceOf(address(this));
}
function _underlyingPriceOracleLatestAnswer()
private
view
returns (uint256)
{
int256 latestAnswer = underlyingPriceOracle.latestAnswer();
return latestAnswer > 0 ? uint256(latestAnswer) : 0;
}
function _fundPriceOracleLatestAnswer() private view returns (uint256) {
int256 latestAnswer = fundPriceOracle.latestAnswer();
return latestAnswer > 0 ? uint256(latestAnswer) : 0;
}
function recover(
address _token,
address _reciever
) external onlyRole(MANAGER) {
IERC20 token = IERC20(_token);
token.transfer(_reciever, token.balanceOf(address(this)));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)
pragma solidity ^0.8.0;
import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";
/**
* @dev Contract module that allows children to implement role-based access
* control mechanisms. This is a lightweight version that doesn't allow enumerating role
* members except through off-chain means by accessing the contract event logs. Some
* applications may benefit from on-chain enumerability, for those cases see
* {AccessControlEnumerable}.
*
* Roles are referred to by their `bytes32` identifier. These should be exposed
* in the external API and be unique. The best way to achieve this is by
* using `public constant` hash digests:
*
* ```
* bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
* ```
*
* Roles can be used to represent a set of permissions. To restrict access to a
* function call, use {hasRole}:
*
* ```
* function foo() public {
* require(hasRole(MY_ROLE, msg.sender));
* ...
* }
* ```
*
* Roles can be granted and revoked dynamically via the {grantRole} and
* {revokeRole} functions. Each role has an associated admin role, and only
* accounts that have a role's admin role can call {grantRole} and {revokeRole}.
*
* By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
* that only accounts with this role will be able to grant or revoke other
* roles. More complex role relationships can be created by using
* {_setRoleAdmin}.
*
* WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
* grant and revoke this role. Extra precautions should be taken to secure
* accounts that have been granted it.
*/
abstract contract AccessControl is Context, IAccessControl, ERC165 {
struct RoleData {
mapping(address => bool) members;
bytes32 adminRole;
}
mapping(bytes32 => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with a standardized message including the required role.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*
* _Available since v4.1._
*/
modifier onlyRole(bytes32 role) {
_checkRole(role);
_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId);
}
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) public view virtual override returns (bool) {
return _roles[role].members[account];
}
/**
* @dev Revert with a standard message if `_msgSender()` is missing `role`.
* Overriding this function changes the behavior of the {onlyRole} modifier.
*
* Format of the revert message is described in {_checkRole}.
*
* _Available since v4.6._
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Revert with a standard message if `account` is missing `role`.
*
* The format of the revert reason is given by the following regular expression:
*
* /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert(
string(
abi.encodePacked(
"AccessControl: account ",
Strings.toHexString(account),
" is missing role ",
Strings.toHexString(uint256(role), 32)
)
)
);
}
}
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) {
return _roles[role].adminRole;
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleGranted} event.
*/
function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_grantRole(role, account);
}
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*
* May emit a {RoleRevoked} event.
*/
function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
_revokeRole(role, account);
}
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been revoked `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address account) public virtual override {
require(account == _msgSender(), "AccessControl: can only renounce roles for self");
_revokeRole(role, account);
}
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event. Note that unlike {grantRole}, this function doesn't perform any
* checks on the calling account.
*
* May emit a {RoleGranted} event.
*
* [WARNING]
* ====
* This function should only be called from the constructor when setting
* up the initial roles for the system.
*
* Using this function in any other way is effectively circumventing the admin
* system imposed by {AccessControl}.
* ====
*
* NOTE: This function is deprecated in favor of {_grantRole}.
*/
function _setupRole(bytes32 role, address account) internal virtual {
_grantRole(role, account);
}
/**
* @dev Sets `adminRole` as ``role``'s admin role.
*
* Emits a {RoleAdminChanged} event.
*/
function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
bytes32 previousAdminRole = getRoleAdmin(role);
_roles[role].adminRole = adminRole;
emit RoleAdminChanged(role, previousAdminRole, adminRole);
}
/**
* @dev Grants `role` to `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual {
if (!hasRole(role, account)) {
_roles[role].members[account] = true;
emit RoleGranted(role, account, _msgSender());
}
}
/**
* @dev Revokes `role` from `account`.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual {
if (hasRole(role, account)) {
_roles[role].members[account] = false;
emit RoleRevoked(role, account, _msgSender());
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 sender, address indexed owner, uint256 assets, uint256 shares);
event Withdraw(
address indexed sender,
address indexed receiver,
address indexed owner,
uint256 assets,
uint256 shares
);
/**
* @dev Returns the address of the underlying token used for the Vault for accounting, depositing, and withdrawing.
*
* - MUST be an ERC-20 token contract.
* - MUST NOT revert.
*/
function asset() external view returns (address assetTokenAddress);
/**
* @dev Returns the total amount of the underlying asset that is “managed” by Vault.
*
* - SHOULD include any compounding that occurs from yield.
* - MUST be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT revert.
*/
function totalAssets() external view returns (uint256 totalManagedAssets);
/**
* @dev Returns the amount of shares that the Vault would exchange for the amount of assets provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToShares(uint256 assets) external view returns (uint256 shares);
/**
* @dev Returns the amount of assets that the Vault would exchange for the amount of shares provided, in an ideal
* scenario where all the conditions are met.
*
* - MUST NOT be inclusive of any fees that are charged against assets in the Vault.
* - MUST NOT show any variations depending on the caller.
* - MUST NOT reflect slippage or other on-chain conditions, when performing the actual exchange.
* - MUST NOT revert.
*
* NOTE: This calculation MAY NOT reflect the “per-user” price-per-share, and instead should reflect the
* “average-user’s” price-per-share, meaning what the average user should expect to see when exchanging to and
* from.
*/
function convertToAssets(uint256 shares) external view returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be deposited into the Vault for the receiver,
* through a deposit call.
*
* - MUST return a limited value if receiver is subject to some deposit limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of assets that may be deposited.
* - MUST NOT revert.
*/
function maxDeposit(address receiver) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their deposit at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of Vault shares that would be minted in a deposit
* call in the same transaction. I.e. deposit should return the same or more shares as previewDeposit if called
* in the same transaction.
* - MUST NOT account for deposit limits like those returned from maxDeposit and should always act as though the
* deposit would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewDeposit SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewDeposit(uint256 assets) external view returns (uint256 shares);
/**
* @dev Mints shares Vault shares to receiver by depositing exactly amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* deposit execution, and are accounted for during deposit.
* - MUST revert if all of assets cannot be deposited (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function deposit(uint256 assets, address receiver) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of the Vault shares that can be minted for the receiver, through a mint call.
* - MUST return a limited value if receiver is subject to some mint limit.
* - MUST return 2 ** 256 - 1 if there is no limit on the maximum amount of shares that may be minted.
* - MUST NOT revert.
*/
function maxMint(address receiver) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their mint at the current block, given
* current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of assets that would be deposited in a mint call
* in the same transaction. I.e. mint should return the same or fewer assets as previewMint if called in the
* same transaction.
* - MUST NOT account for mint limits like those returned from maxMint and should always act as though the mint
* would be accepted, regardless if the user has enough tokens approved, etc.
* - MUST be inclusive of deposit fees. Integrators should be aware of the existence of deposit fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewMint SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by minting.
*/
function previewMint(uint256 shares) external view returns (uint256 assets);
/**
* @dev Mints exactly shares Vault shares to receiver by depositing amount of underlying tokens.
*
* - MUST emit the Deposit event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the mint
* execution, and are accounted for during mint.
* - MUST revert if all of shares cannot be minted (due to deposit limit being reached, slippage, the user not
* approving enough underlying tokens to the Vault contract, etc).
*
* NOTE: most implementations will require pre-approval of the Vault with the Vault’s underlying asset token.
*/
function mint(uint256 shares, address receiver) external returns (uint256 assets);
/**
* @dev Returns the maximum amount of the underlying asset that can be withdrawn from the owner balance in the
* Vault, through a withdraw call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxWithdraw(address owner) external view returns (uint256 maxAssets);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their withdrawal at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no fewer than the exact amount of Vault shares that would be burned in a withdraw
* call in the same transaction. I.e. withdraw should return the same or fewer shares as previewWithdraw if
* called
* in the same transaction.
* - MUST NOT account for withdrawal limits like those returned from maxWithdraw and should always act as though
* the withdrawal would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToShares and previewWithdraw SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by depositing.
*/
function previewWithdraw(uint256 assets) external view returns (uint256 shares);
/**
* @dev Burns shares from owner and sends exactly assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* withdraw execution, and are accounted for during withdraw.
* - MUST revert if all of assets cannot be withdrawn (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* Note that some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function withdraw(
uint256 assets,
address receiver,
address owner
) external returns (uint256 shares);
/**
* @dev Returns the maximum amount of Vault shares that can be redeemed from the owner balance in the Vault,
* through a redeem call.
*
* - MUST return a limited value if owner is subject to some withdrawal limit or timelock.
* - MUST return balanceOf(owner) if owner is not subject to any withdrawal limit or timelock.
* - MUST NOT revert.
*/
function maxRedeem(address owner) external view returns (uint256 maxShares);
/**
* @dev Allows an on-chain or off-chain user to simulate the effects of their redeemption at the current block,
* given current on-chain conditions.
*
* - MUST return as close to and no more than the exact amount of assets that would be withdrawn in a redeem call
* in the same transaction. I.e. redeem should return the same or more assets as previewRedeem if called in the
* same transaction.
* - MUST NOT account for redemption limits like those returned from maxRedeem and should always act as though the
* redemption would be accepted, regardless if the user has enough shares, etc.
* - MUST be inclusive of withdrawal fees. Integrators should be aware of the existence of withdrawal fees.
* - MUST NOT revert.
*
* NOTE: any unfavorable discrepancy between convertToAssets and previewRedeem SHOULD be considered slippage in
* share price or some other type of condition, meaning the depositor will lose assets by redeeming.
*/
function previewRedeem(uint256 shares) external view returns (uint256 assets);
/**
* @dev Burns exactly shares from owner and sends assets of underlying tokens to receiver.
*
* - MUST emit the Withdraw event.
* - MAY support an additional flow in which the underlying tokens are owned by the Vault contract before the
* redeem execution, and are accounted for during redeem.
* - MUST revert if all of shares cannot be redeemed (due to withdrawal limit being reached, slippage, the owner
* not having enough shares, etc).
*
* NOTE: some implementations will require pre-requesting to the Vault before a withdrawal may be performed.
* Those methods should be performed separately.
*/
function redeem(
uint256 shares,
address receiver,
address owner
) external returns (uint256 assets);
}// 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 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
pragma solidity ^0.8.24;
interface IOracle {
function latestAnswer() external view returns (int256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {IOracle} from "src/interfaces/IOracle.sol";
import {IERC20} from "openzeppelin-contracts/contracts/token/ERC20/IERC20.sol";
interface IAssetAdapter {
event Allocate(address indexed signer, uint256 amount, uint256 timestamp);
event Withdraw(address indexed signer, uint256 amount, uint256 timestamp);
event Deposit(address indexed signer, uint256 amount, uint256 timestamp);
event Redeem(address indexed signer, uint256 amount, uint256 timestamp);
event UnderlyingRiskWeightUpdate(uint256 riskWeight, uint256 timestamp);
event FundRiskWeightUpdate(uint256 riskWeight, uint256 timestamp);
function duration() external view returns (uint256);
function underlyingPriceOracle() external view returns (IOracle);
function fundPriceOracle() external view returns (IOracle);
function underlyingRiskWeight() external view returns (uint256);
function fundRiskWeight() external view returns (uint256);
//! function fund() external view returns (uint256); DIFFERS IN `ASSETADAPTER` AND MORPHO ADAPTERS
function underlying() external view returns (IERC20);
function allocate(uint256) external;
function withdraw(uint256) external;
function deposit(uint256) external;
function redeem(uint256) external;
function totalValue() external view returns (uint256);
function totalRiskValue() external view returns (uint256);
function underlyingTotalRiskValue() external view returns (uint256);
function underlyingRiskValue(uint256) external view returns (uint256);
function underlyingTotalValue() external view returns (uint256);
function underlyingValue(uint256) external view returns (uint256);
function underlyingBalance() external view returns (uint256);
function fundTotalRiskValue() external view returns (uint256);
function fundRiskValue(uint256) external view returns (uint256);
function fundTotalValue() external view returns (uint256);
function fundValue(uint256) external view returns (uint256);
function fundBalance() external view returns (uint256);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)
pragma solidity ^0.8.0;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
*
* `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
* {RoleAdminChanged} not being emitted signaling this.
*
* _Available since v3.1._
*/
event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);
/**
* @dev Emitted when `account` is granted `role`.
*
* `sender` is the account that originated the contract call, an admin role
* bearer except when using {AccessControl-_setupRole}.
*/
event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Emitted when `account` is revoked `role`.
*
* `sender` is the account that originated the contract call:
* - if using `revokeRole`, it is the admin role bearer
* - if using `renounceRole`, it is the role bearer (i.e. `account`)
*/
event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);
/**
* @dev Returns `true` if `account` has been granted `role`.
*/
function hasRole(bytes32 role, address account) external view returns (bool);
/**
* @dev Returns the admin role that controls `role`. See {grantRole} and
* {revokeRole}.
*
* To change a role's admin, use {AccessControl-_setRoleAdmin}.
*/
function getRoleAdmin(bytes32 role) external view returns (bytes32);
/**
* @dev Grants `role` to `account`.
*
* If `account` had not been already granted `role`, emits a {RoleGranted}
* event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function grantRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from `account`.
*
* If `account` had been granted `role`, emits a {RoleRevoked} event.
*
* Requirements:
*
* - the caller must have ``role``'s admin role.
*/
function revokeRole(bytes32 role, address account) external;
/**
* @dev Revokes `role` from the calling account.
*
* Roles are often managed via {grantRole} and {revokeRole}: this function's
* purpose is to provide a mechanism for accounts to lose their privileges
* if they are compromised (such as when a trusted device is misplaced).
*
* If the calling account had been granted `role`, emits a {RoleRevoked}
* event.
*
* Requirements:
*
* - the caller must be `account`.
*/
function renounceRole(bytes32 role, address account) external;
}// 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 (last updated v4.8.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _SYMBOLS = "0123456789abcdef";
uint8 private constant _ADDRESS_LENGTH = 20;
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
unchecked {
uint256 length = Math.log10(value) + 1;
string memory buffer = new string(length);
uint256 ptr;
/// @solidity memory-safe-assembly
assembly {
ptr := add(buffer, add(32, length))
}
while (true) {
ptr--;
/// @solidity memory-safe-assembly
assembly {
mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
}
value /= 10;
if (value == 0) break;
}
return buffer;
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
unchecked {
return toHexString(value, Math.log256(value) + 1);
}
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
/**
* @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation.
*/
function toHexString(address addr) internal pure returns (string memory) {
return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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. If 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)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
//
// This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
// → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
// → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
//
// Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
uint256 result = 1 << (log2(a) >> 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) {
unchecked {
uint256 result = sqrt(a);
return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
}
}
/**
* @dev Return the log in base 2, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 128;
}
if (value >> 64 > 0) {
value >>= 64;
result += 64;
}
if (value >> 32 > 0) {
value >>= 32;
result += 32;
}
if (value >> 16 > 0) {
value >>= 16;
result += 16;
}
if (value >> 8 > 0) {
value >>= 8;
result += 8;
}
if (value >> 4 > 0) {
value >>= 4;
result += 4;
}
if (value >> 2 > 0) {
value >>= 2;
result += 2;
}
if (value >> 1 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 2, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log2(value);
return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 10, rounded down, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >= 10**64) {
value /= 10**64;
result += 64;
}
if (value >= 10**32) {
value /= 10**32;
result += 32;
}
if (value >= 10**16) {
value /= 10**16;
result += 16;
}
if (value >= 10**8) {
value /= 10**8;
result += 8;
}
if (value >= 10**4) {
value /= 10**4;
result += 4;
}
if (value >= 10**2) {
value /= 10**2;
result += 2;
}
if (value >= 10**1) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log10(value);
return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
}
}
/**
* @dev Return the log in base 256, rounded down, of a positive value.
* Returns 0 if given 0.
*
* Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
*/
function log256(uint256 value) internal pure returns (uint256) {
uint256 result = 0;
unchecked {
if (value >> 128 > 0) {
value >>= 128;
result += 16;
}
if (value >> 64 > 0) {
value >>= 64;
result += 8;
}
if (value >> 32 > 0) {
value >>= 32;
result += 4;
}
if (value >> 16 > 0) {
value >>= 16;
result += 2;
}
if (value >> 8 > 0) {
result += 1;
}
}
return result;
}
/**
* @dev Return the log in base 10, following the selected rounding direction, of a positive value.
* Returns 0 if given 0.
*/
function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
unchecked {
uint256 result = log256(value);
return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"chainlink/=lib/chainlink/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/offchain-fund/lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"offchain-fund/=lib/offchain-fund/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "paris",
"viaIR": false,
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_admin","type":"address"},{"internalType":"address","name":"_underlyingAddr","type":"address"},{"internalType":"address","name":"_fundAddr","type":"address"},{"internalType":"address","name":"_underlyingPriceOracleAddr","type":"address"},{"internalType":"address","name":"_fundPriceOracleAddr","type":"address"},{"internalType":"uint256","name":"_duration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Allocate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"riskWeight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"FundRiskWeightUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Redeem","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"riskWeight","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"UnderlyingRiskWeightUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"CONTROLLER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DECIMAL_FACTOR","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MANAGER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"duration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fund","outputs":[{"internalType":"contract IERC4626","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundPriceOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fundRiskValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundRiskWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundTotalRiskValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fundTotalValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"fundValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_reciever","type":"address"}],"name":"recover","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_riskWeight","type":"uint256"}],"name":"setFundRiskWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_riskWeight","type":"uint256"}],"name":"setUnderlyingRiskWeight","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRiskValue","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalValue","outputs":[{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlying","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingPriceOracle","outputs":[{"internalType":"contract IOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"underlyingRiskValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingRiskWeight","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingTotalRiskValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"underlyingTotalValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"underlyingValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_assets","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x610140604052600060015560006002553480156200001c57600080fd5b5060405162001aec38038062001aec8339810160408190526200003f91620001ac565b6200004c600087620000ee565b6001600160a01b0380861661010081905290851660e05260808290526040805163313ce56760e01b8152905163313ce567916004808201926020929091908290030181865afa158015620000a4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000ca919062000224565b60ff1661012052506001600160a01b0391821660a0521660c0525062000250915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff166200018b576000828152602081815260408083206001600160a01b03851684529091529020805460ff191660011790556200014a3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b80516001600160a01b0381168114620001a757600080fd5b919050565b60008060008060008060c08789031215620001c657600080fd5b620001d1876200018f565b9550620001e1602088016200018f565b9450620001f1604088016200018f565b935062000201606088016200018f565b925062000211608088016200018f565b915060a087015190509295509295509295565b6000602082840312156200023757600080fd5b815160ff811681146200024957600080fd5b9392505050565b60805160a05160c05160e05161010051610120516117ff620002ed6000396000818161033801526110600152600081816103d5015281816106020152818161095901528181610aa90152610fef01526000818161045a01528181610a7a01528181610b3301528181610c930152610f3c01526000818161042b015261110201526000818161024e01526111a00152600061028d01526117ff6000f3fe608060405234801561001057600080fd5b506004361061021c5760003560e01c80636f307dc311610125578063d522af4e116100ad578063db006a751161007c578063db006a75146104cd578063e5118d1a146104e0578063e68eb989146104f3578063ee0ded62146104fc578063ee0fc1211461050f57600080fd5b8063d522af4e14610497578063d547741f1461049f578063d82933ee146104b2578063da842cb7146104ba57600080fd5b8063a1b8a98d116100f4578063a1b8a98d14610426578063a217fddf1461044d578063b60d428814610455578063b6b55f251461047c578063d4c3eea01461048f57600080fd5b80636f307dc3146103d0578063792350e0146103f757806390ca796b1461040057806391d148541461041357600080fd5b80632f2ff15d116101a85780633fd67fa8116101775780633fd67fa8146103875780634158deb21461038f578063452fa1a2146103a257806359356c5c146103b5578063648bf774146103bd57600080fd5b80632f2ff15d1461032057806333fdbbe51461033357806336568abe1461036c5780633c0679451461037f57600080fd5b80631b2df850116101ef5780631b2df850146102d0578063248a9ca3146102d8578063265a3a2a146102fb5780632df0f608146103035780632e1a7d4d1461030b57600080fd5b806301ffc9a71461022157806307285dc6146102495780630fb5a6b41461028857806314281c5b146102bd575b600080fd5b61023461022f3660046113b1565b610517565b60405190151581526020015b60405180910390f35b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b039091168152602001610240565b6102af7f000000000000000000000000000000000000000000000000000000000000000081565b604051908152602001610240565b6102af6102cb3660046113db565b61054e565b6102af610559565b6102af6102e63660046113db565b60009081526020819052604090206001015490565b6102af610581565b6102af6105ae565b61031e6103193660046113db565b6105b8565b005b61031e61032e366004611410565b6106b7565b61035a7f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff9091168152602001610240565b61031e61037a366004611410565b6106e1565b6102af610764565b6102af61076e565b6102af61039d3660046113db565b610778565b61031e6103b03660046113db565b610783565b6102af610815565b61031e6103cb36600461143c565b61081f565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6102af60025481565b61031e61040e3660046113db565b610937565b610234610421366004611410565b610a0c565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b6102af600081565b6102707f000000000000000000000000000000000000000000000000000000000000000081565b61031e61048a3660046113db565b610a35565b6102af610be0565b6102af610bfe565b61031e6104ad366004611410565b610c08565b6102af610c2d565b6102af6104c83660046113db565b610c37565b61031e6104db3660046113db565b610c42565b61031e6104ee3660046113db565b610d40565b6102af60015481565b6102af61050a3660046113db565b610dca565b6102af610dd5565b60006001600160e01b03198216637965db0b60e01b148061054857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061054882610de4565b60405160200161056890611466565b6040516020818303038152906040528051906020012081565b600061058b610e0a565b61059590826114ab565b905061059f610e1c565b6105a990826114ab565b905090565b60006105a9610e1c565b6040516020016105c7906114be565b604051602081830303815290604052805190602001206105e681610e2e565b60405163a9059cbb60e01b8152336004820152602481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610653573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067791906114f5565b506040805183815242602082015233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56891015b60405180910390a25050565b6000828152602081905260409020600101546106d281610e2e565b6106dc8383610e3b565b505050565b6001600160a01b03811633146107565760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107608282610ebf565b5050565b60006105a9610f24565b60006105a9610fb0565b600061054882610fbd565b60405160200161079290611466565b604051602081830303815290604052805190602001206107b181610e2e565b81620f4240116107d35760405162461bcd60e51b815260040161074d90611517565b6002829055604080518381524260208201527f89c57d41e9f45d6e6f24394a27778283c1834233bac1db5eb915616e46b0958291015b60405180910390a15050565b60006105a9610fd7565b60405160200161082e90611466565b6040516020818303038152906040528051906020012061084d81610e2e565b6040516370a0823160e01b815230600482015283906001600160a01b0382169063a9059cbb90859083906370a0823190602401602060405180830381865afa15801561089d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c1919061155c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561090c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093091906114f5565b5050505050565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906323b872dd906064016020604051808303816000875af11580156109aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ce91906114f5565b506040805182815242602082015233917fe2a6fbb55be829f7f41ce6980e5fc3057544b2788af2e168fbf7a3db02284e7b910160405180910390a250565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b604051602001610a44906114be565b60405160208183030381529060405280519060200120610a6381610e2e565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000081166004830152602482018490527f0000000000000000000000000000000000000000000000000000000000000000169063095ea7b3906044016020604051808303816000875af1158015610af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1691906114f5565b50604051636e553f6560e01b8152600481018390523060248201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690636e553f65906044016020604051808303816000875af1158015610b84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba8919061155c565b506040805183815242602082015233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1591016106ab565b6000610bea611026565b610bf490826114ab565b905061059f610fb0565b60006105a9611026565b600082815260208190526040902060010154610c2381610e2e565b6106dc8383610ebf565b60006105a9610e0a565b600061054882611038565b604051602001610c51906114be565b60405160208183030381529060405280519060200120610c7081610e2e565b604051635d043b2960e11b815260048101839052306024820181905260448201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ba087652906064016020604051808303816000875af1158015610ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d08919061155c565b506040805183815242602082015233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a92991016106ab565b604051602001610d4f90611466565b60405160208183030381529060405280519060200120610d6e81610e2e565b81620f424011610d905760405162461bcd60e51b815260040161074d90611517565b6001829055604080518381524260208201527fb0234275d06a5d9055875d8c18951c51d6e449058d44424be5986ba5fb00ae049101610809565b600061054882611054565b604051602001610568906114be565b6000620f4240610df383610fbd565b600254610e009190611575565b610548919061158c565b60006105a9610e17610fd7565b611038565b60006105a9610e29610f24565b610de4565b610e3881336110a4565b50565b610e458282610a0c565b610760576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610e7b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610ec98282610a0c565b15610760576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a08231906024015b602060405180830381865afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a9919061155c565b60006105a9610fbd610f24565b60006305f5e10082610fcd6110fd565b610e009190611575565b6040516370a0823160e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401610f6f565b60006105a9611033610fd7565b611054565b6000620f424061104783611054565b600154610e009190611575565b60006305f5e1006110867f000000000000000000000000000000000000000000000000000000000000000060126115ae565b61109190600a6116ab565b8361109a61119b565b610fcd9190611575565b6110ae8282610a0c565b610760576110bb816111fc565b6110c683602061120e565b6040516020016110d79291906116de565b60408051601f198184030181529082905262461bcd60e51b825261074d91600401611753565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611182919061155c565b905060008113611193576000611195565b805b91505090565b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115e573d6000803e3d6000fd5b60606105486001600160a01b03831660145b6060600061121d836002611575565b6112289060026114ab565b67ffffffffffffffff81111561124057611240611786565b6040519080825280601f01601f19166020018201604052801561126a576020820181803683370190505b509050600360fc1b816000815181106112855761128561179c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112b4576112b461179c565b60200101906001600160f81b031916908160001a90535060006112d8846002611575565b6112e39060016114ab565b90505b600181111561135b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113175761131761179c565b1a60f81b82828151811061132d5761132d61179c565b60200101906001600160f81b031916908160001a90535060049490941c93611354816117b2565b90506112e6565b5083156113aa5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161074d565b9392505050565b6000602082840312156113c357600080fd5b81356001600160e01b0319811681146113aa57600080fd5b6000602082840312156113ed57600080fd5b5035919050565b80356001600160a01b038116811461140b57600080fd5b919050565b6000806040838503121561142357600080fd5b82359150611433602084016113f4565b90509250929050565b6000806040838503121561144f57600080fd5b611458836113f4565b9150611433602084016113f4565b60208082526015908201527430b9b9b2ba1730b230b83a32b91736b0b730b3b2b960591b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561054857610548611495565b60208082526018908201527f61737365742e616461707465722e636f6e74726f6c6c65720000000000000000604082015260600190565b60006020828403121561150757600080fd5b815180151581146113aa57600080fd5b60208082526025908201527f46413a205269736b205765696768742063616e206e6f742062652061626f7665604082015264203130302560d81b606082015260800190565b60006020828403121561156e57600080fd5b5051919050565b808202811582820484141761054857610548611495565b6000826115a957634e487b7160e01b600052601260045260246000fd5b500490565b60ff828116828216039081111561054857610548611495565b600181815b808511156116025781600019048211156115e8576115e8611495565b808516156115f557918102915b93841c93908002906115cc565b509250929050565b60008261161957506001610548565b8161162657506000610548565b816001811461163c576002811461164657611662565b6001915050610548565b60ff84111561165757611657611495565b50506001821b610548565b5060208310610133831016604e8410600b8410161715611685575081810a610548565b61168f83836115c7565b80600019048211156116a3576116a3611495565b029392505050565b60006113aa60ff84168361160a565b60005b838110156116d55781810151838201526020016116bd565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117168160178501602088016116ba565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117478160288401602088016116ba565b01602801949350505050565b60208152600082518060208401526117728160408501602087016116ba565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816117c1576117c1611495565b50600019019056fea26469706673582212206009dd79083c899b37075ca48a94e865428462c1dfaa775a1983ffcafdd0b80964736f6c63430008180033000000000000000000000000b7570e32ded63b25163369d5eb4d8e89e70e5602000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc0000000000000000000000008fffffd4afb6115b954bd326cbe7b4ba576818f6000000000000000000000000c7ed1dd7dc9909aa39d5f67476971c53c2595c6a0000000000000000000000000000000000000000000000000000000000015180
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061021c5760003560e01c80636f307dc311610125578063d522af4e116100ad578063db006a751161007c578063db006a75146104cd578063e5118d1a146104e0578063e68eb989146104f3578063ee0ded62146104fc578063ee0fc1211461050f57600080fd5b8063d522af4e14610497578063d547741f1461049f578063d82933ee146104b2578063da842cb7146104ba57600080fd5b8063a1b8a98d116100f4578063a1b8a98d14610426578063a217fddf1461044d578063b60d428814610455578063b6b55f251461047c578063d4c3eea01461048f57600080fd5b80636f307dc3146103d0578063792350e0146103f757806390ca796b1461040057806391d148541461041357600080fd5b80632f2ff15d116101a85780633fd67fa8116101775780633fd67fa8146103875780634158deb21461038f578063452fa1a2146103a257806359356c5c146103b5578063648bf774146103bd57600080fd5b80632f2ff15d1461032057806333fdbbe51461033357806336568abe1461036c5780633c0679451461037f57600080fd5b80631b2df850116101ef5780631b2df850146102d0578063248a9ca3146102d8578063265a3a2a146102fb5780632df0f608146103035780632e1a7d4d1461030b57600080fd5b806301ffc9a71461022157806307285dc6146102495780630fb5a6b41461028857806314281c5b146102bd575b600080fd5b61023461022f3660046113b1565b610517565b60405190151581526020015b60405180910390f35b6102707f0000000000000000000000008fffffd4afb6115b954bd326cbe7b4ba576818f681565b6040516001600160a01b039091168152602001610240565b6102af7f000000000000000000000000000000000000000000000000000000000001518081565b604051908152602001610240565b6102af6102cb3660046113db565b61054e565b6102af610559565b6102af6102e63660046113db565b60009081526020819052604090206001015490565b6102af610581565b6102af6105ae565b61031e6103193660046113db565b6105b8565b005b61031e61032e366004611410565b6106b7565b61035a7f000000000000000000000000000000000000000000000000000000000000000681565b60405160ff9091168152602001610240565b61031e61037a366004611410565b6106e1565b6102af610764565b6102af61076e565b6102af61039d3660046113db565b610778565b61031e6103b03660046113db565b610783565b6102af610815565b61031e6103cb36600461143c565b61081f565b6102707f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb4881565b6102af60025481565b61031e61040e3660046113db565b610937565b610234610421366004611410565b610a0c565b6102707f000000000000000000000000c7ed1dd7dc9909aa39d5f67476971c53c2595c6a81565b6102af600081565b6102707f000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc81565b61031e61048a3660046113db565b610a35565b6102af610be0565b6102af610bfe565b61031e6104ad366004611410565b610c08565b6102af610c2d565b6102af6104c83660046113db565b610c37565b61031e6104db3660046113db565b610c42565b61031e6104ee3660046113db565b610d40565b6102af60015481565b6102af61050a3660046113db565b610dca565b6102af610dd5565b60006001600160e01b03198216637965db0b60e01b148061054857506301ffc9a760e01b6001600160e01b03198316145b92915050565b600061054882610de4565b60405160200161056890611466565b6040516020818303038152906040528051906020012081565b600061058b610e0a565b61059590826114ab565b905061059f610e1c565b6105a990826114ab565b905090565b60006105a9610e1c565b6040516020016105c7906114be565b604051602081830303815290604052805190602001206105e681610e2e565b60405163a9059cbb60e01b8152336004820152602481018390527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015610653573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067791906114f5565b506040805183815242602082015233917ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b56891015b60405180910390a25050565b6000828152602081905260409020600101546106d281610e2e565b6106dc8383610e3b565b505050565b6001600160a01b03811633146107565760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084015b60405180910390fd5b6107608282610ebf565b5050565b60006105a9610f24565b60006105a9610fb0565b600061054882610fbd565b60405160200161079290611466565b604051602081830303815290604052805190602001206107b181610e2e565b81620f4240116107d35760405162461bcd60e51b815260040161074d90611517565b6002829055604080518381524260208201527f89c57d41e9f45d6e6f24394a27778283c1834233bac1db5eb915616e46b0958291015b60405180910390a15050565b60006105a9610fd7565b60405160200161082e90611466565b6040516020818303038152906040528051906020012061084d81610e2e565b6040516370a0823160e01b815230600482015283906001600160a01b0382169063a9059cbb90859083906370a0823190602401602060405180830381865afa15801561089d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c1919061155c565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af115801561090c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093091906114f5565b5050505050565b6040516323b872dd60e01b8152336004820152306024820152604481018290527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906323b872dd906064016020604051808303816000875af11580156109aa573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ce91906114f5565b506040805182815242602082015233917fe2a6fbb55be829f7f41ce6980e5fc3057544b2788af2e168fbf7a3db02284e7b910160405180910390a250565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b604051602001610a44906114be565b60405160208183030381529060405280519060200120610a6381610e2e565b60405163095ea7b360e01b81526001600160a01b037f000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc81166004830152602482018490527f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48169063095ea7b3906044016020604051808303816000875af1158015610af2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b1691906114f5565b50604051636e553f6560e01b8152600481018390523060248201527f000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc6001600160a01b031690636e553f65906044016020604051808303816000875af1158015610b84573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba8919061155c565b506040805183815242602082015233917f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a1591016106ab565b6000610bea611026565b610bf490826114ab565b905061059f610fb0565b60006105a9611026565b600082815260208190526040902060010154610c2381610e2e565b6106dc8383610ebf565b60006105a9610e0a565b600061054882611038565b604051602001610c51906114be565b60405160208183030381529060405280519060200120610c7081610e2e565b604051635d043b2960e11b815260048101839052306024820181905260448201527f000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc6001600160a01b03169063ba087652906064016020604051808303816000875af1158015610ce4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d08919061155c565b506040805183815242602082015233917fe5b754fb1abb7f01b499791d0b820ae3b6af3424ac1c59768edb53f4ec31a92991016106ab565b604051602001610d4f90611466565b60405160208183030381529060405280519060200120610d6e81610e2e565b81620f424011610d905760405162461bcd60e51b815260040161074d90611517565b6001829055604080518381524260208201527fb0234275d06a5d9055875d8c18951c51d6e449058d44424be5986ba5fb00ae049101610809565b600061054882611054565b604051602001610568906114be565b6000620f4240610df383610fbd565b600254610e009190611575565b610548919061158c565b60006105a9610e17610fd7565b611038565b60006105a9610e29610f24565b610de4565b610e3881336110a4565b50565b610e458282610a0c565b610760576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055610e7b3390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b610ec98282610a0c565b15610760576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000beefff209270748ddd194831b3fa287a5386f5bc6001600160a01b0316906370a08231906024015b602060405180830381865afa158015610f8c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a9919061155c565b60006105a9610fbd610f24565b60006305f5e10082610fcd6110fd565b610e009190611575565b6040516370a0823160e01b81523060048201526000907f000000000000000000000000a0b86991c6218b36c1d19d4a2e9eb0ce3606eb486001600160a01b0316906370a0823190602401610f6f565b60006105a9611033610fd7565b611054565b6000620f424061104783611054565b600154610e009190611575565b60006305f5e1006110867f000000000000000000000000000000000000000000000000000000000000000660126115ae565b61109190600a6116ab565b8361109a61119b565b610fcd9190611575565b6110ae8282610a0c565b610760576110bb816111fc565b6110c683602061120e565b6040516020016110d79291906116de565b60408051601f198184030181529082905262461bcd60e51b825261074d91600401611753565b6000807f000000000000000000000000c7ed1dd7dc9909aa39d5f67476971c53c2595c6a6001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611182919061155c565b905060008113611193576000611195565b805b91505090565b6000807f0000000000000000000000008fffffd4afb6115b954bd326cbe7b4ba576818f66001600160a01b03166350d25bcd6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561115e573d6000803e3d6000fd5b60606105486001600160a01b03831660145b6060600061121d836002611575565b6112289060026114ab565b67ffffffffffffffff81111561124057611240611786565b6040519080825280601f01601f19166020018201604052801561126a576020820181803683370190505b509050600360fc1b816000815181106112855761128561179c565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106112b4576112b461179c565b60200101906001600160f81b031916908160001a90535060006112d8846002611575565b6112e39060016114ab565b90505b600181111561135b576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106113175761131761179c565b1a60f81b82828151811061132d5761132d61179c565b60200101906001600160f81b031916908160001a90535060049490941c93611354816117b2565b90506112e6565b5083156113aa5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161074d565b9392505050565b6000602082840312156113c357600080fd5b81356001600160e01b0319811681146113aa57600080fd5b6000602082840312156113ed57600080fd5b5035919050565b80356001600160a01b038116811461140b57600080fd5b919050565b6000806040838503121561142357600080fd5b82359150611433602084016113f4565b90509250929050565b6000806040838503121561144f57600080fd5b611458836113f4565b9150611433602084016113f4565b60208082526015908201527430b9b9b2ba1730b230b83a32b91736b0b730b3b2b960591b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561054857610548611495565b60208082526018908201527f61737365742e616461707465722e636f6e74726f6c6c65720000000000000000604082015260600190565b60006020828403121561150757600080fd5b815180151581146113aa57600080fd5b60208082526025908201527f46413a205269736b205765696768742063616e206e6f742062652061626f7665604082015264203130302560d81b606082015260800190565b60006020828403121561156e57600080fd5b5051919050565b808202811582820484141761054857610548611495565b6000826115a957634e487b7160e01b600052601260045260246000fd5b500490565b60ff828116828216039081111561054857610548611495565b600181815b808511156116025781600019048211156115e8576115e8611495565b808516156115f557918102915b93841c93908002906115cc565b509250929050565b60008261161957506001610548565b8161162657506000610548565b816001811461163c576002811461164657611662565b6001915050610548565b60ff84111561165757611657611495565b50506001821b610548565b5060208310610133831016604e8410600b8410161715611685575081810a610548565b61168f83836115c7565b80600019048211156116a3576116a3611495565b029392505050565b60006113aa60ff84168361160a565b60005b838110156116d55781810151838201526020016116bd565b50506000910152565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516117168160178501602088016116ba565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516117478160288401602088016116ba565b01602801949350505050565b60208152600082518060208401526117728160408501602087016116ba565b601f01601f19169190910160400192915050565b634e487b7160e01b600052604160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b6000816117c1576117c1611495565b50600019019056fea26469706673582212206009dd79083c899b37075ca48a94e865428462c1dfaa775a1983ffcafdd0b80964736f6c63430008180033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.