Source Code
Latest 25 from a total of 862 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Update Market Ma... | 271593292 | 445 days ago | IN | 0 ETH | 0.00000117 | ||||
| Update Market Ma... | 264808314 | 465 days ago | IN | 0 ETH | 0.00000185 | ||||
| Update Market Ma... | 221357044 | 591 days ago | IN | 0 ETH | 0.00000106 | ||||
| Update Market Ma... | 207102648 | 633 days ago | IN | 0 ETH | 0.00000102 | ||||
| Move Assets To P... | 204376185 | 641 days ago | IN | 0 ETH | 0.00000589 | ||||
| Move Assets To P... | 201989721 | 648 days ago | IN | 0 ETH | 0.00000371 | ||||
| Move Assets To P... | 201987911 | 648 days ago | IN | 0 ETH | 0.00000796 | ||||
| Move Assets To P... | 201987906 | 648 days ago | IN | 0 ETH | 0.00000801 | ||||
| Move Assets To P... | 201987901 | 648 days ago | IN | 0 ETH | 0.00000793 | ||||
| Move Assets To P... | 201987896 | 648 days ago | IN | 0 ETH | 0.00000799 | ||||
| Move Assets To P... | 201987874 | 648 days ago | IN | 0 ETH | 0.000008 | ||||
| Move Assets To P... | 201987868 | 648 days ago | IN | 0 ETH | 0.00000786 | ||||
| Move Assets To P... | 201987862 | 648 days ago | IN | 0 ETH | 0.00000796 | ||||
| Move Assets To P... | 201987857 | 648 days ago | IN | 0 ETH | 0.00000785 | ||||
| Move Assets To P... | 201987853 | 648 days ago | IN | 0 ETH | 0.00000794 | ||||
| Move Assets To P... | 201987848 | 648 days ago | IN | 0 ETH | 0.00000798 | ||||
| Move Assets To P... | 201987837 | 648 days ago | IN | 0 ETH | 0.00000794 | ||||
| Move Assets To P... | 201987832 | 648 days ago | IN | 0 ETH | 0.00000814 | ||||
| Move Assets To P... | 201987827 | 648 days ago | IN | 0 ETH | 0.00000812 | ||||
| Move Assets To P... | 201987819 | 648 days ago | IN | 0 ETH | 0.00000827 | ||||
| Move Assets To P... | 201987798 | 648 days ago | IN | 0 ETH | 0.00000843 | ||||
| Move Assets To P... | 201987792 | 648 days ago | IN | 0 ETH | 0.00000837 | ||||
| Move Assets To P... | 201987786 | 648 days ago | IN | 0 ETH | 0.00000832 | ||||
| Move Assets To P... | 199595032 | 655 days ago | IN | 0 ETH | 0.00000209 | ||||
| Move Assets To P... | 199595027 | 655 days ago | IN | 0 ETH | 0.00000204 |
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xb7963415...2b44C95f5 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
CegaState
Compiler Version
v0.8.17+commit.8df45f5f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import { AccessControl } from "@openzeppelin/contracts/access/AccessControl.sol";
import { IERC20 } from "@openzeppelin/contracts/interfaces/IERC20.sol";
import { IFCNProduct } from "./interfaces/IFCNProduct.sol";
contract CegaState is AccessControl {
// Create a new role identifier for the admin roles
bytes32 public constant OPERATOR_ADMIN_ROLE = keccak256("OPERATOR_ADMIN_ROLE");
bytes32 public constant TRADER_ADMIN_ROLE = keccak256("TRADER_ADMIN_ROLE");
bytes32 public constant SERVICE_ADMIN_ROLE = keccak256("SERVICE_ADMIN_ROLE");
event FCNProductViewerUpdated(address indexed fcnProductViewerAddress);
event OracleAdded(string indexed oracleName, address indexed oracleAddress);
event OracleRemoved(string indexed oracleName);
event ProductAdded(string indexed productName, address indexed productAddress);
event ProductRemoved(string indexed productName);
event MarketMakerPermissionUpdated(address indexed marketMaker, bool indexed allow);
event FeeRecipientUpdated(address indexed feeRecipient);
event AssetsMovedToProduct(string indexed productName, address indexed vaultAddress, uint256 amount);
mapping(address => bool) public marketMakerAllowList;
mapping(string => address) public products;
mapping(string => address) public oracleAddresses;
string[] public oracleNames;
string[] public productNames;
address public feeRecipient;
// Store this address for lookup on SDK side
address public fcnProductViewerAddress;
/**
* @notice CegaState contructor that sets up the admin roles
* @param _operatorAdmin is the address of the operator admin
* @param _traderAdmin is the address of the trader admin
* @param _serviceAdmin is the address of the service admin
*/
constructor(address _operatorAdmin, address _traderAdmin, address _serviceAdmin) {
_setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
_setupRole(OPERATOR_ADMIN_ROLE, _operatorAdmin);
_setupRole(TRADER_ADMIN_ROLE, _traderAdmin);
_setupRole(SERVICE_ADMIN_ROLE, _serviceAdmin);
}
/**
* @notice Only operator admin can set the viewer address. SDK uses this to lookup viewer address
* @param _fcnProductViewerAddress is the address of the viewer contract
*/
function setFCNProductViewerAddress(address _fcnProductViewerAddress) public onlyRole(OPERATOR_ADMIN_ROLE) {
fcnProductViewerAddress = _fcnProductViewerAddress;
emit FCNProductViewerUpdated(_fcnProductViewerAddress);
}
/**
* @notice Asserts whether the sender has the DEFAULT_ADMIN_ROLE
* @param sender is the address to be checked
*/
function isDefaultAdmin(address sender) public view returns (bool) {
return hasRole(DEFAULT_ADMIN_ROLE, sender);
}
/**
* @notice Asserts whether the sender has the TRADER_ADMIN_ROLE
* @param sender is the address to be checked
*/
function isTraderAdmin(address sender) public view returns (bool) {
return hasRole(TRADER_ADMIN_ROLE, sender);
}
/**
* @notice Asserts whether the sender has the OPERATOR_ADMIN_ROLE
* @param sender is the address to be checked
*/
function isOperatorAdmin(address sender) public view returns (bool) {
return hasRole(OPERATOR_ADMIN_ROLE, sender);
}
/**
* @notice Asserts whether the sender has the SERVICE_ADMIN_ROLE
* @param sender is the address of callee
*/
function isServiceAdmin(address sender) public view returns (bool) {
return hasRole(SERVICE_ADMIN_ROLE, sender);
}
/**
* @notice Returns all oracle names (ex: "BTC/USD,PYTH")
*/
function getOracleNames() public view returns (string[] memory) {
return oracleNames;
}
/**
* @notice Operator admin has ability to add a new oracle
* @param oracleName is the name of the new oracle (ex: "BTC/USD,PYTH")
* @param oracleAddress is the address of the oracle
*/
function addOracle(string memory oracleName, address oracleAddress) public onlyRole(OPERATOR_ADMIN_ROLE) {
require(oracleAddress != address(0), "400:IA");
if (oracleAddresses[oracleName] == address(0)) {
oracleNames.push(oracleName);
}
oracleAddresses[oracleName] = oracleAddress;
emit OracleAdded(oracleName, oracleAddress);
}
/**
* @notice Operator admin has ability to remove oracle
* @param oracleName is the name of the oracle to be removed
*/
function removeOracle(string memory oracleName) public onlyRole(OPERATOR_ADMIN_ROLE) {
bool found = false;
uint256 index = 0;
for (uint256 i = 0; i < oracleNames.length; i++) {
if (keccak256(abi.encodePacked(oracleNames[i])) == keccak256(abi.encodePacked(oracleName))) {
index = i;
found = true;
break;
}
}
if (found) {
// Swap last element with element at index, then pop to delete oracle
oracleNames[index] = oracleNames[oracleNames.length - 1];
oracleNames.pop();
delete oracleAddresses[oracleName];
emit OracleRemoved(oracleName);
}
}
/**
* @notice Returns all product names
*/
function getProductNames() public view returns (string[] memory) {
return productNames;
}
/**
* @notice Operator admin has the ability to create a new product
* @param productName is the name of the new product
* @param product is the address of the product
*/
function addProduct(string memory productName, address product) public onlyRole(OPERATOR_ADMIN_ROLE) {
require(product != address(0), "400:IA");
if (products[productName] == address(0)) {
productNames.push(productName);
}
products[productName] = product;
emit ProductAdded(productName, product);
}
/**
* @notice Operator admin has the ability to remove products
* @param productName is the name of the product to be removed
*/
function removeProduct(string memory productName) public onlyRole(OPERATOR_ADMIN_ROLE) {
bool found = false;
uint256 index = 0;
for (uint256 i = 0; i < productNames.length; i++) {
if (keccak256(abi.encodePacked(productNames[i])) == keccak256(abi.encodePacked(productName))) {
index = i;
found = true;
}
}
if (found) {
// Swap last element with element at index, then pop to delete product
productNames[index] = productNames[productNames.length - 1];
productNames.pop();
delete products[productName];
emit ProductRemoved(productName);
}
}
/**
* @notice Operator admin can toggle whether trade with market maker
* @param marketMaker is the address of the market maker
* @param allow is whether funds can be sent to that market maker
*/
function updateMarketMakerPermission(address marketMaker, bool allow) public onlyRole(OPERATOR_ADMIN_ROLE) {
require(marketMaker != address(0), "400:IA");
marketMakerAllowList[marketMaker] = allow;
emit MarketMakerPermissionUpdated(marketMaker, allow);
}
/**
* @notice Only default admin can set the fee recipient
* @param _feeRecipient is the address of the fee recipient
*/
function setFeeRecipient(address _feeRecipient) public onlyRole(DEFAULT_ADMIN_ROLE) {
require(_feeRecipient != address(0), "400:IA");
feeRecipient = _feeRecipient;
emit FeeRecipientUpdated(_feeRecipient);
}
/**
* @notice Moves assets to corresponding product and vault account
* @param productName is the name of the product
* @param vaultAddress is the address of the vault
*/
function moveAssetsToProduct(
string memory productName,
address vaultAddress,
uint256 amount
) public onlyRole(TRADER_ADMIN_ROLE) {
address productAddress = products[productName];
require(productAddress != address(0), "400:PN");
IFCNProduct fcnProduct = IFCNProduct(productAddress);
IERC20(fcnProduct.asset()).approve(productAddress, amount);
fcnProduct.receiveAssetsFromCegaState(vaultAddress, amount);
emit AssetsMovedToProduct(productName, vaultAddress, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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:
*
* ```solidity
* 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}:
*
* ```solidity
* 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. We recommend using {AccessControlDefaultAdminRules}
* to enforce additional security measures for this role.
*/
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 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 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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 (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.9.0) (utils/Strings.sol)
pragma solidity ^0.8.0;
import "./math/Math.sol";
import "./math/SignedMath.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 `int256` to its ASCII `string` decimal representation.
*/
function toString(int256 value) internal pure returns (string memory) {
return string(abi.encodePacked(value < 0 ? "-" : "", toString(SignedMath.abs(value))));
}
/**
* @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);
}
/**
* @dev Returns true if the two strings are equal.
*/
function equal(string memory a, string memory b) internal pure returns (bool) {
return keccak256(bytes(a)) == keccak256(bytes(b));
}
}// 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 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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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) {
// Solidity will revert if denominator == 0, unlike the div opcode on its own.
// The surrounding unchecked block does not change this fact.
// See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
return prod0 / denominator;
}
// Make sure the result is less than 2^256. Also prevents denominator == 0.
require(denominator > prod1, "Math: mulDiv overflow");
///////////////////////////////////////////////
// 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 256, 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 << 3) < value ? 1 : 0);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/SignedMath.sol)
pragma solidity ^0.8.0;
/**
* @dev Standard signed math utilities missing in the Solidity language.
*/
library SignedMath {
/**
* @dev Returns the largest of two signed numbers.
*/
function max(int256 a, int256 b) internal pure returns (int256) {
return a > b ? a : b;
}
/**
* @dev Returns the smallest of two signed numbers.
*/
function min(int256 a, int256 b) internal pure returns (int256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two signed numbers without overflow.
* The result is rounded towards zero.
*/
function average(int256 a, int256 b) internal pure returns (int256) {
// Formula from the book "Hacker's Delight"
int256 x = (a & b) + ((a ^ b) >> 1);
return x + (int256(uint256(x) >> 255) & (a ^ b));
}
/**
* @dev Returns the absolute unsigned value of a signed value.
*/
function abs(int256 n) internal pure returns (uint256) {
unchecked {
// must be unchecked in order to support `n = type(int256).min`
return uint256(n >= 0 ? n : -n);
}
}
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
enum OptionBarrierType {
None,
KnockIn
}
struct Deposit {
uint256 amount;
address receiver;
}
struct Withdrawal {
uint256 amountShares;
address receiver;
}
enum VaultStatus {
DepositsClosed,
DepositsOpen,
NotTraded,
Traded,
TradeExpired,
PayoffCalculated,
FeesCollected,
WithdrawalQueueProcessed,
Zombie
}
struct OptionBarrier {
uint256 barrierBps;
uint256 barrierAbsoluteValue;
uint256 strikeBps;
uint256 strikeAbsoluteValue;
string asset;
string oracleName;
OptionBarrierType barrierType;
}
struct FCNVaultMetadata {
uint256 vaultStart;
uint256 tradeDate;
uint256 tradeExpiry;
uint256 aprBps;
uint256 tenorInDays;
uint256 underlyingAmount; // This is how many assets were ever deposited into the vault
uint256 currentAssetAmount; // This is how many assets are currently allocated for the vault (not sent for trade)
uint256 totalCouponPayoff;
uint256 vaultFinalPayoff;
uint256 queuedWithdrawalsSharesAmount;
uint256 queuedWithdrawalsCount;
uint256 optionBarriersCount;
uint256 leverage;
address vaultAddress;
VaultStatus vaultStatus;
bool isKnockedIn;
OptionBarrier[] optionBarriers;
}
struct RoundData {
int256 answer;
uint256 startedAt;
uint256 updatedAt;
uint80 answeredInRound;
}
struct LeverageMetadata {
bool isAllowed;
bool isDepositQueueOpen;
uint256 maxDepositAmountLimit;
uint256 sumVaultUnderlyingAmounts;
uint256 queuedDepositsTotalAmount;
address[] vaultAddresses;
}
struct FCNVaultAssetInfo {
address vaultAddress;
uint256 totalAssets;
uint256 totalSupply;
uint256 inputAssets;
uint256 outputShares;
uint256 inputShares;
uint256 outputAssets;
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import { IProduct } from "./IProduct.sol";
import { Deposit } from "../Structs.sol";
interface IFCNProduct is IProduct {
// View functions
function calculateFees(
address vaultAddress
) external view returns (uint256 totalFee, uint256 managementFee, uint256 yieldFee);
function calculateKnockInRatio(address vaultAddress) external view returns (uint256 knockInRatio);
function depositQueue(uint256 index) external view returns (Deposit memory);
function getVaultAddresses() external view returns (address[] memory);
function isDepositQueueOpen() external view returns (bool);
function maxDepositAmountLimit() external view returns (uint256);
function queuedDepositsCount() external view returns (uint256);
function queuedDepositsTotalAmount() external view returns (uint256);
function sumVaultUnderlyingAmounts() external view returns (uint256);
function vaultAddresses(uint256 index) external view returns (address);
// External functions
function addToDepositQueue(uint256 amount) external;
function createVault(
string memory _tokenName,
string memory _tokenSymbol,
uint256 _vaultStart
) external returns (address vaultAddress);
}// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.17;
import { Deposit, FCNVaultMetadata, OptionBarrierType, OptionBarrier, VaultStatus, Withdrawal } from "../Structs.sol";
interface IProduct {
// View functions
function asset() external view returns (address);
function cegaState() external view returns (address);
function getVaultMetadata(address vaultAddress) external view returns (FCNVaultMetadata memory);
function managementFeeBps() external view returns (uint256);
function minDepositAmount() external view returns (uint256);
function minWithdrawalAmount() external view returns (uint256);
function name() external view returns (string memory);
function vaults(
address vaultAddress
)
external
view
returns (
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
uint256,
address,
VaultStatus,
bool
);
function withdrawalQueues(address vaultAddress, uint256 index) external view returns (Withdrawal memory);
function yieldFeeBps() external view returns (uint256);
// External functions
function addOptionBarrier(address vaultAddress, OptionBarrier calldata optionBarrier) external;
function addToWithdrawalQueue(address vaultAddress, uint256 amountShares, address receiver) external;
function calculateCurrentYield(address vaultAddress) external;
function calculateVaultFinalPayoff(address vaultAddress) external returns (uint256 vaultFinalPayoff);
function checkBarriers(address vaultAddress) external;
function collectFees(address vaultAddress) external;
function openVaultDeposits(address vaultAddress) external;
function processDepositQueue(address vaultAddress, uint256 maxProcessCount) external;
function processWithdrawalQueue(address vaultAddress, uint256 maxProcessCount) external;
function receiveAssetsFromCegaState(address vaultAddress, uint256 amount) external;
function removeOptionBarrier(address vaultAddress, uint256 index, string calldata _asset) external;
function removeVault(uint256 index) external;
function rolloverVault(address vaultAddress) external;
function sendAssetsToTrade(address vaultAddress, address receiver, uint256 amount) external;
function setIsDepositQueueOpen(bool _isDepositQueueOpen) external;
function setKnockInStatus(address vaultAddress, bool newState) external;
function setManagementFeeBps(uint256 _managementFeeBps) external;
function setMaxDepositAmountLimit(uint256 _maxDepositAmountLimit) external;
function setMinDepositAmount(uint256 _minDepositAmount) external;
function setMinWithdrawalAmount(uint256 _minWithdrawalAmount) external;
function setTradeData(
address vaultAddress,
uint256 _tradeDate,
uint256 _tradeExpiry,
uint256 _aprBps,
uint256 _tenorInDays
) external;
function setVaultMetadata(address vaultAddress, FCNVaultMetadata calldata metadata) external;
function setVaultStatus(address vaultAddress, VaultStatus _vaultStatus) external;
function setYieldFeeBps(uint256 _yieldFeeBps) external;
function updateOptionBarrier(
address vaultAddress,
uint256 index,
string calldata _asset,
uint256 _strikeAbsoluteValue,
uint256 _barrierAbsoluteValue
) external;
function updateOptionBarrierOracle(
address vaultAddress,
uint256 index,
string calldata _asset,
string memory newOracleName
) external;
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "none",
"useLiteralContent": true
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": [],
"viaIR": true,
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_operatorAdmin","type":"address"},{"internalType":"address","name":"_traderAdmin","type":"address"},{"internalType":"address","name":"_serviceAdmin","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"productName","type":"string"},{"indexed":true,"internalType":"address","name":"vaultAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AssetsMovedToProduct","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fcnProductViewerAddress","type":"address"}],"name":"FCNProductViewerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"feeRecipient","type":"address"}],"name":"FeeRecipientUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"marketMaker","type":"address"},{"indexed":true,"internalType":"bool","name":"allow","type":"bool"}],"name":"MarketMakerPermissionUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"oracleName","type":"string"},{"indexed":true,"internalType":"address","name":"oracleAddress","type":"address"}],"name":"OracleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"oracleName","type":"string"}],"name":"OracleRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"productName","type":"string"},{"indexed":true,"internalType":"address","name":"productAddress","type":"address"}],"name":"ProductAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"productName","type":"string"}],"name":"ProductRemoved","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"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"SERVICE_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRADER_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"oracleName","type":"string"},{"internalType":"address","name":"oracleAddress","type":"address"}],"name":"addOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"productName","type":"string"},{"internalType":"address","name":"product","type":"address"}],"name":"addProduct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fcnProductViewerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeRecipient","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOracleNames","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getProductNames","outputs":[{"internalType":"string[]","name":"","type":"string[]"}],"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":"sender","type":"address"}],"name":"isDefaultAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"isOperatorAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"isServiceAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"isTraderAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"marketMakerAllowList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"productName","type":"string"},{"internalType":"address","name":"vaultAddress","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"moveAssetsToProduct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"oracleAddresses","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"oracleNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"productNames","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"","type":"string"}],"name":"products","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"oracleName","type":"string"}],"name":"removeOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"productName","type":"string"}],"name":"removeProduct","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":"address","name":"_fcnProductViewerAddress","type":"address"}],"name":"setFCNProductViewerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_feeRecipient","type":"address"}],"name":"setFeeRecipient","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":[{"internalType":"address","name":"marketMaker","type":"address"},{"internalType":"bool","name":"allow","type":"bool"}],"name":"updateMarketMakerPermission","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x6080346200025157601f620024b438819003918201601f191683019291906001600160401b0384118385101762000256578160609284926040968752833981010312620002515762000051816200026c565b6020906200006e84620000668486016200026c565b94016200026c565b91600093848052848252858520338652825260ff86862054161562000219575b7fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee8086528583528686206001600160a01b039485168088529084528787205460ff1615620001e0575b50507f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd0249081865285835283878720911690818752835260ff878720541615620001a7575b50507f9a95e87c5af084bf5db8491c3a6515da9dd6da39b24b0eb0af08d7b9cd808d9191828552848252858520931692838552815260ff8585205416156200016d575b84516122129081620002828239f35b8184528381528484209083855252838320600160ff1982541617905560008051602062002494833981519152339380a4388080806200015e565b8186528583528686208187528352868620805460ff191660011790553391600080516020620024948339815191528780a438806200011b565b8187528684528787208188528452878720805460ff191660011790553391600080516020620024948339815191528880a43880620000d7565b8480528482528585203386528252858520600160ff19825416179055333386600080516020620024948339815191528180a46200008e565b600080fd5b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b0382168203620002515756fe6040608081526004908136101561001557600080fd5b600090813560e01c80630186a4231461178e57806301ffc9a71461173857806307f7c6db146116eb5780631fd40a7614611643578063248a9ca3146116195780632f2ff15d1461157057806336568abe146114df5780633774ecc41461147b5780633b9033c91461141757806346904840146113ef57806356229465146112345780635900c74d1461103d578063592aad4a14610ff957806373561c3b14610f9557806391d1485414610f4f5780639726dd1914610d7c578063a217fddf14610d62578063a54055e914610cfa578063a91091ef14610c77578063aa6a73f614610c4f578063b5716d7614610be7578063ba4fe16514610815578063bf6c5e9b1461076d578063c3f7fe2214610730578063c6134df2146106f6578063d09445c2146106bc578063d547741f1461067e578063dac500e314610644578063e5950282146105d7578063e74b981b146103875763f86736821461017657600080fd5b346103835760208060031936011261037f5783356001600160401b03811161037b576101a59036908601611848565b916101ae611b1e565b845483830191908580805b838110610304575b506101ca578680f35b600019918083019081116102f157906101ef6101e86101f5936118c6565b50916118c6565b906121e0565b865480156102dc5701610207816118c6565b6102c8579061025a96978261022261023b979695945461194a565b9081610289575b505055518093819286519283916118a3565b810160038152030190206001600160601b0360a01b815416905561203a565b7fa28dc34059cd4716d51da651406dc8ff96399e3cf46725143a7f2855c68cf3948280a2803880808080808680f35b81601f600093116001146102a15750555b3880610229565b8183528783206102bc91601f0160051c810190600101611fde565b8187812091555561029a565b600088634e487b7160e01b82525260246000fd5b603188634e487b7160e01b6000525260246000fd5b634e487b7160e01b885260118952602488fd5b61030d816118c6565b50855161032f816103218b8201809561207f565b03601f198101835282611827565b51902086865161035a8a828d61034d838301968792519283916118a3565b8101038084520182611827565b519020146103705761036b9061205a565b6101b9565b9150506001386101c1565b8380fd5b8280fd5b5080fd5b50823461037f576020908160031936011261037b576103a4611ac7565b9260008052600083528060002033600052835260ff81600020541615610414575050506001600160a01b03166103db811515611fa9565b600680546001600160a01b031916821790557f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc28280a280f35b61041d33611e9b565b6000825161042a816117f6565b604281528581019160603684378151156105c4576030835381516001908110156105b157607860218401536041905b8082116105445750506105035760486104d69385936104e5936104ff975196879376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8c8601526104ad8c82519283916037890191016118a3565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906118a3565b01036028810185520183611827565b5193849362461bcd60e51b85528401526024830190611a2a565b0390fd5b606485878087519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f8116601081101561059c576f181899199a1a9b1b9c1cb0b131b232b360811b901a6105738486611e8a565b53871c918015610587576000190190610459565b601188634e487b7160e01b6000525260246000fd5b603289634e487b7160e01b6000525260246000fd5b634e487b7160e01b825260328752602482fd5b634e487b7160e01b815260328652602490fd5b50823461037f57602036600319011261037f573591600554831015610641575061062a61063d9260056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001611984565b9051918291602083526020830190611a2a565b0390f35b80fd5b5034610383578160031936011261038357602090517fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee8152f35b5082903461037f578060031936011261037f576106b991356106b460016106a3611ab1565b938387528660205286200154611d0c565b611e16565b80f35b5034610383578160031936011261038357602090517f9a95e87c5af084bf5db8491c3a6515da9dd6da39b24b0eb0af08d7b9cd808d918152f35b5034610383578160031936011261038357602090517f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd0248152f35b50346103835760203660031901126103835760209160ff9082906001600160a01b0361075a611ac7565b1681526001855220541690519015158152f35b509134610383578160031936011261038357600554906001600160401b038211610802575082519160206107a6818460051b0185611827565b828452600582527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08185015b8484106107e65786518061063d8882611a4f565b60018381926107f485611984565b8152019201930192906107d2565b634e487b7160e01b835260419052602482fd5b5034610383576060366003190112610383576001600160401b0390833582811161037b576108469036908601611848565b9361084f611ab1565b92604435937f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd02492838752602093878552858820338952855260ff868920541615610ab5575084519288516108a68186888d016118a3565b840160028152848660018060a01b039687930301902054168015610a895786516338d52e0f60e01b815286818581855afa908115610a4357869188918c91610a4d575b50895163095ea7b360e01b81526001600160a01b038516878201908152602081018d9052909384929183918f9183906040015b0393165af18015610a4357610a0c575b50803b15610a0857865163a63c16bb60e01b81526001600160a01b038516848201908152602081018a90529092918a9184919082908490829060400103925af180156109fe576109b2575b5050506109a77ff08bd4877b5a59894b35ac969f29efa3be8fd5d609ed28e01ad234fea3034e5a9495969761203a565b94519586521693a380f35b8199989299116109eb5785529596506109a77ff08bd4877b5a59894b35ac969f29efa3be8fd5d609ed28e01ad234fea3034e5a38610977565b634e487b7160e01b825260418952602482fd5b87513d8b823e3d90fd5b8880fd5b8681813d8311610a3c575b610a218183611827565b81010312610a38575180151503610a08573861092c565b8980fd5b503d610a17565b88513d8c823e3d90fd5b92505081813d8311610a82575b610a648183611827565b81010312610a3857518581168103610a38578661091c8792906108e9565b503d610a5a565b865162461bcd60e51b815280840187905260066024820152651a18181d282760d11b6044820152606490fd5b9085859289610ac333611e9b565b91835190610ad0826117f6565b60428252868201926060368537825115610bd45760308453825190600191821015610bc15790607860218501536041915b818311610b56575050506105035760486104d69385936104e5936104ff975196879376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8c8601526104ad8c82519283916037890191016118a3565b909192600f81166010811015610bae576f181899199a1a9b1b9c1cb0b131b232b360811b901a610b868587611e8a565b53881c928015610b9b57600019019190610b01565b634e487b7160e01b825260118952602482fd5b634e487b7160e01b835260328a52602483fd5b634e487b7160e01b815260328852602490fd5b634e487b7160e01b815260328752602490fd5b509034610641576020366003190112610641578235906001600160401b0382116106415750602092610c1b91369101611848565b82610c2e835192838151938492016118a3565b6003908201908152819003830190205490516001600160a01b039091168152f35b503461038357816003193601126103835760075490516001600160a01b039091168152602090f35b5034610383578060031936011261038357610c90611ac7565b906024359182151580930361037b57610ca7611b1e565b6001600160a01b031690610cbc821515611fa9565b8184526001602052832060ff1981541660ff84161790557f57f98562c9f8bc4df2d505ef267a5a4a7782ada9b5e4660e2fe833510a33ecf18380a380f35b823461064157602036600319011261064157610d14611ac7565b610d1c611b1e565b600780546001600160a01b0319166001600160a01b039290921691821790557f10c7e41ec011086108a066b761fbe64a25de33c8aa43c41cc8ee40fbce3556338280a280f35b503461038357816003193601126103835751908152602090f35b50346103835760208060031936011261037f5783356001600160401b03811161037b57610dac9036908601611848565b91610db5611b1e565b60055483830191908580805b838110610ef15750610dd1578680f35b600019918083019081116102f157906101ef610def610df693611913565b5091611913565b6005548015610ede5701610e0981611913565b610ecc5786610e6097985081610e26610e4197969594935461194a565b80610e8f575b505050600555518093819286519283916118a3565b810160028152030190206001600160601b0360a01b815416905561203a565b7f1c40e49688e963884d475feda3ddb42c17aec5d2a82706904ba014ee7ce54a2a8280a2803880808080808680f35b601f8111600114610ea55750555b873880610e2c565b818352868320610ec091601f0160051c810190600101611fde565b81868120915555610e9d565b634e487b7160e01b8752868852602487fd5b634e487b7160e01b875260318852602487fd5b610efa81611913565b508551610f0e816103218b8201809561207f565b519020868651610f2c8a828d61034d838301968792519283916118a3565b51902014610f43575b610f3e9061205a565b610dc1565b91506001905081610f35565b50823461037f578160031936011261037f578160209360ff92610f70611ab1565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff81602093610fb5611ac7565b7fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee82528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff81602093611019611ac7565b8180528186528282206001600160a01b039091168252855220549151911615158152f35b50823461037f5761104d36611add565b611058929192611b1e565b6001600160a01b039081169361106f851515611fa9565b80519284519260209485818189019661108981838a6118a3565b810160038152030190205416156110fd575b50916110b5916110d69493518093819286519283916118a3565b81016003815203019020836001600160601b0360a01b82541617905561203a565b7f78cdb79fba1f42e6ca936bf7bd4be337a4a1734c57e4b9f68a1a465b4ac0d9b08380a380f35b805490600160401b8210156112215761111c60019283810183556118c6565b92909261120f578651916001600160401b0383116111fc575061114982611143855461194a565b85611ff5565b85601f8311600114611192579180806110b59795936110d69a9997958d93611187575b501b916000199060031b1c19161790555b919394509161109b565b8a015192508d61116c565b838a52868a2091929190601f1983168b5b8181106111e757509183916110b59896946110d69b9a989694106111ce575b5050811b01905561117d565b89015160001960f88460031b161c191690558b806111c2565b8a8301518455928501929189019189016111a3565b634e487b7160e01b8a5260419052602489fd5b634e487b7160e01b8952888252602489fd5b634e487b7160e01b885260419052602487fd5b50823461037f5761124436611add565b61124f929192611b1e565b6001600160a01b0390811693611266851515611fa9565b80519284519260209485818189019661128081838a6118a3565b810160028152030190205416156112f4575b50916112ac916112cd9493518093819286519283916118a3565b81016002815203019020836001600160601b0360a01b82541617905561203a565b7f4cc39cf92556f56ba17184d656cf1bbcfd5f8e8d7b1071d0e295017b9f70f41b8380a380f35b60055490600160401b82101561122157611315600192838101600555611913565b92909261120f578651916001600160401b0383116111fc575061133c82611143855461194a565b85601f8311600114611385579180806112ac9795936112cd9a9997958d9361137a575b501b916000199060031b1c19161790555b9193945091611292565b8a015192508d61135f565b838a52868a2091929190601f1983168b5b8181106113da57509183916112ac9896946112cd9b9a989694106113c1575b5050811b019055611370565b89015160001960f88460031b161c191690558b806113b5565b8a830151845592850192918901918901611396565b503461038357816003193601126103835760065490516001600160a01b039091168152602090f35b50346103835760203660031901126103835760ff81602093611437611ac7565b7f9a95e87c5af084bf5db8491c3a6515da9dd6da39b24b0eb0af08d7b9cd808d9182528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff8160209361149b611ac7565b7f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd02482528186528282206001600160a01b039091168252855220549151911615158152f35b5091346103835782600319360112610383576114f9611ab1565b90336001600160a01b0383160361151557906106b99135611e16565b608490602085519162461bcd60e51b8352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152fd5b50823461037f578160031936011261037f57359061158c611ab1565b90828452836020526115a360018286200154611d0c565b82845260208481528185206001600160a01b039093168086529290528084205460ff16156115cf578380f35b828452836020528084208285526020528320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a48180808380f35b50823461037f57602036600319011261037f57816020936001923581528085522001549051908152f35b509190346106415780600319360112610641578154906001600160401b0382116116d8579183519260209061167d828560051b0186611827565b8385529182527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8185015b8484106116bc5786518061063d8882611a4f565b60018381926116ca85611984565b8152019201930192906116a8565b634e487b7160e01b815260418352602490fd5b509034610641576020366003190112610641578235835481101561038357611712906118c6565b9390936117265761063d8361062a86611984565b634e487b7160e01b8252819052602490fd5b50823461037f57602036600319011261037f57359063ffffffff60e01b821680920361037f5760209250637965db0b60e01b821491821561177d575b50519015158152f35b6301ffc9a760e01b14915083611774565b509034610641576020366003190112610641578235906001600160401b03821161064157506020926117c291369101611848565b826117d5835192838151938492016118a3565b6002908201908152819003830190205490516001600160a01b039091168152f35b608081019081106001600160401b0382111761181157604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761181157604052565b81601f8201121561189e578035906001600160401b038211611811576040519261187c601f8401601f191660200185611827565b8284526020838301011161189e57816000926020809301838601378301015290565b600080fd5b60005b8381106118b65750506000910152565b81810151838201526020016118a6565b6004548110156118fd5760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b634e487b7160e01b600052603260045260246000fd5b6005548110156118fd5760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b90600182811c9216801561197a575b602083101461196457565b634e487b7160e01b600052602260045260246000fd5b91607f1691611959565b90604051918260008254926119988461194a565b908184526001948581169081600014611a0757506001146119c4575b50506119c292500383611827565b565b9093915060005260209081600020936000915b8183106119ef5750506119c2935082010138806119b4565b855488840185015294850194879450918301916119d7565b9150506119c294506020925060ff191682840152151560051b82010138806119b4565b90602091611a43815180928185528580860191016118a3565b601f01601f1916010190565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310611a835750505050505090565b9091929394958480611aa1600193603f198682030187528a51611a2a565b9801930193019194939290611a73565b602435906001600160a01b038216820361189e57565b600435906001600160a01b038216820361189e57565b604060031982011261189e57600435906001600160401b03821161189e57611b0791600401611848565b906024356001600160a01b038116810361189e5790565b3360009081527f480e10171e8c1b0a57efe6f81df1e97e2289bdec57e5e17ab313ec2b40d55d1a602090815260408083205490927fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee9160ff1615611b825750505050565b611b8b33611e9b565b91845190611b98826117f6565b60428252848201926060368537825115611cf85760308453825190600191821015611cf85790607860218501536041915b818311611c8a57505050611c485760486104ff938693611c2c93611c1d985198899376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a8601526104ad815180928c6037890191016118a3565b01036028810187520185611827565b5192839262461bcd60e51b845260048401526024830190611a2a565b60648486519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611ce4576f181899199a1a9b1b9c1cb0b131b232b360811b901a611cba8587611e8a565b5360041c928015611cd057600019019190611bc9565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b600090808252602090828252604092838120338252835260ff848220541615611d355750505050565b611d3e33611e9b565b91845190611d4b826117f6565b60428252848201926060368537825115611cf85760308453825190600191821015611cf85790607860218501536041915b818311611dd057505050611c485760486104ff938693611c2c93611c1d985198899376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a8601526104ad815180928c6037890191016118a3565b909192600f81166010811015611ce4576f181899199a1a9b1b9c1cb0b131b232b360811b901a611e008587611e8a565b5360041c928015611cd057600019019190611d7c565b9060009180835282602052604083209160018060a01b03169182845260205260ff604084205416611e4657505050565b80835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b9081518110156118fd570160200190565b60405190606082018281106001600160401b0382111761181157604052602a82526020820160403682378251156118fd576030905381516001908110156118fd57607860218401536029905b808211611f3b575050611ef75790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015611f94576f181899199a1a9b1b9c1cb0b131b232b360811b901a611f6a8486611e8a565b5360041c918015611f7f576000190190611ee7565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15611fb057565b60405162461bcd60e51b81526020600482015260066024820152653430303a494160d01b6044820152606490fd5b818110611fe9575050565b60008155600101611fde565b9190601f811161200457505050565b6119c2926000526020600020906020601f840160051c83019310612030575b601f0160051c0190611fde565b9091508190612023565b612052906020604051928284809451938492016118a3565b810103902090565b60001981146120695760010190565b634e487b7160e01b600052601160045260246000fd5b60009291815461208e8161194a565b926001918083169081156120e757506001146120ab575b50505050565b90919293945060005260209081600020906000915b8583106120d657505050500190388080806120a5565b8054858401529183019181016120c0565b60ff19168452505050811515909102019150388080806120a5565b908082146121dc57612114815461194a565b906001600160401b03821161181157819061213982612133865461194a565b86611ff5565b600090601f831160011461217057600092612165575b50508160011b916000199060031b1c1916179055565b01549050388061214f565b81526020808220858352818320935090601f1985169083905b8282106121c35750509084600195949392106121aa575b505050811b019055565b015460001960f88460031b161c191690553880806121a0565b8495819295850154815560018091019601940190612189565b5050565b91906121ef576119c291612102565b634e487b7160e01b600052600060045260246000fdfea164736f6c6343000811000a2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d00000000000000000000000088294e699819a6cfe35d254e3dd3c9825bf00b8c000000000000000000000000d0400ff307186eb0f62c85203e800b1e6a2e448100000000000000000000000017e51c32047ab323c57227b3f5a7b556add3e3ae
Deployed Bytecode
0x6040608081526004908136101561001557600080fd5b600090813560e01c80630186a4231461178e57806301ffc9a71461173857806307f7c6db146116eb5780631fd40a7614611643578063248a9ca3146116195780632f2ff15d1461157057806336568abe146114df5780633774ecc41461147b5780633b9033c91461141757806346904840146113ef57806356229465146112345780635900c74d1461103d578063592aad4a14610ff957806373561c3b14610f9557806391d1485414610f4f5780639726dd1914610d7c578063a217fddf14610d62578063a54055e914610cfa578063a91091ef14610c77578063aa6a73f614610c4f578063b5716d7614610be7578063ba4fe16514610815578063bf6c5e9b1461076d578063c3f7fe2214610730578063c6134df2146106f6578063d09445c2146106bc578063d547741f1461067e578063dac500e314610644578063e5950282146105d7578063e74b981b146103875763f86736821461017657600080fd5b346103835760208060031936011261037f5783356001600160401b03811161037b576101a59036908601611848565b916101ae611b1e565b845483830191908580805b838110610304575b506101ca578680f35b600019918083019081116102f157906101ef6101e86101f5936118c6565b50916118c6565b906121e0565b865480156102dc5701610207816118c6565b6102c8579061025a96978261022261023b979695945461194a565b9081610289575b505055518093819286519283916118a3565b810160038152030190206001600160601b0360a01b815416905561203a565b7fa28dc34059cd4716d51da651406dc8ff96399e3cf46725143a7f2855c68cf3948280a2803880808080808680f35b81601f600093116001146102a15750555b3880610229565b8183528783206102bc91601f0160051c810190600101611fde565b8187812091555561029a565b600088634e487b7160e01b82525260246000fd5b603188634e487b7160e01b6000525260246000fd5b634e487b7160e01b885260118952602488fd5b61030d816118c6565b50855161032f816103218b8201809561207f565b03601f198101835282611827565b51902086865161035a8a828d61034d838301968792519283916118a3565b8101038084520182611827565b519020146103705761036b9061205a565b6101b9565b9150506001386101c1565b8380fd5b8280fd5b5080fd5b50823461037f576020908160031936011261037b576103a4611ac7565b9260008052600083528060002033600052835260ff81600020541615610414575050506001600160a01b03166103db811515611fa9565b600680546001600160a01b031916821790557f7a7b5a0a132f9e0581eb8527f66eae9ee89c2a3e79d4ac7e41a1f1f4d48a7fc28280a280f35b61041d33611e9b565b6000825161042a816117f6565b604281528581019160603684378151156105c4576030835381516001908110156105b157607860218401536041905b8082116105445750506105035760486104d69385936104e5936104ff975196879376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8c8601526104ad8c82519283916037890191016118a3565b8401917001034b99036b4b9b9b4b733903937b6329607d1b6037840152518093868401906118a3565b01036028810185520183611827565b5193849362461bcd60e51b85528401526024830190611a2a565b0390fd5b606485878087519262461bcd60e51b845283015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f8116601081101561059c576f181899199a1a9b1b9c1cb0b131b232b360811b901a6105738486611e8a565b53871c918015610587576000190190610459565b601188634e487b7160e01b6000525260246000fd5b603289634e487b7160e01b6000525260246000fd5b634e487b7160e01b825260328752602482fd5b634e487b7160e01b815260328652602490fd5b50823461037f57602036600319011261037f573591600554831015610641575061062a61063d9260056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db001611984565b9051918291602083526020830190611a2a565b0390f35b80fd5b5034610383578160031936011261038357602090517fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee8152f35b5082903461037f578060031936011261037f576106b991356106b460016106a3611ab1565b938387528660205286200154611d0c565b611e16565b80f35b5034610383578160031936011261038357602090517f9a95e87c5af084bf5db8491c3a6515da9dd6da39b24b0eb0af08d7b9cd808d918152f35b5034610383578160031936011261038357602090517f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd0248152f35b50346103835760203660031901126103835760209160ff9082906001600160a01b0361075a611ac7565b1681526001855220541690519015158152f35b509134610383578160031936011261038357600554906001600160401b038211610802575082519160206107a6818460051b0185611827565b828452600582527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db08185015b8484106107e65786518061063d8882611a4f565b60018381926107f485611984565b8152019201930192906107d2565b634e487b7160e01b835260419052602482fd5b5034610383576060366003190112610383576001600160401b0390833582811161037b576108469036908601611848565b9361084f611ab1565b92604435937f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd02492838752602093878552858820338952855260ff868920541615610ab5575084519288516108a68186888d016118a3565b840160028152848660018060a01b039687930301902054168015610a895786516338d52e0f60e01b815286818581855afa908115610a4357869188918c91610a4d575b50895163095ea7b360e01b81526001600160a01b038516878201908152602081018d9052909384929183918f9183906040015b0393165af18015610a4357610a0c575b50803b15610a0857865163a63c16bb60e01b81526001600160a01b038516848201908152602081018a90529092918a9184919082908490829060400103925af180156109fe576109b2575b5050506109a77ff08bd4877b5a59894b35ac969f29efa3be8fd5d609ed28e01ad234fea3034e5a9495969761203a565b94519586521693a380f35b8199989299116109eb5785529596506109a77ff08bd4877b5a59894b35ac969f29efa3be8fd5d609ed28e01ad234fea3034e5a38610977565b634e487b7160e01b825260418952602482fd5b87513d8b823e3d90fd5b8880fd5b8681813d8311610a3c575b610a218183611827565b81010312610a38575180151503610a08573861092c565b8980fd5b503d610a17565b88513d8c823e3d90fd5b92505081813d8311610a82575b610a648183611827565b81010312610a3857518581168103610a38578661091c8792906108e9565b503d610a5a565b865162461bcd60e51b815280840187905260066024820152651a18181d282760d11b6044820152606490fd5b9085859289610ac333611e9b565b91835190610ad0826117f6565b60428252868201926060368537825115610bd45760308453825190600191821015610bc15790607860218501536041915b818311610b56575050506105035760486104d69385936104e5936104ff975196879376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8c8601526104ad8c82519283916037890191016118a3565b909192600f81166010811015610bae576f181899199a1a9b1b9c1cb0b131b232b360811b901a610b868587611e8a565b53881c928015610b9b57600019019190610b01565b634e487b7160e01b825260118952602482fd5b634e487b7160e01b835260328a52602483fd5b634e487b7160e01b815260328852602490fd5b634e487b7160e01b815260328752602490fd5b509034610641576020366003190112610641578235906001600160401b0382116106415750602092610c1b91369101611848565b82610c2e835192838151938492016118a3565b6003908201908152819003830190205490516001600160a01b039091168152f35b503461038357816003193601126103835760075490516001600160a01b039091168152602090f35b5034610383578060031936011261038357610c90611ac7565b906024359182151580930361037b57610ca7611b1e565b6001600160a01b031690610cbc821515611fa9565b8184526001602052832060ff1981541660ff84161790557f57f98562c9f8bc4df2d505ef267a5a4a7782ada9b5e4660e2fe833510a33ecf18380a380f35b823461064157602036600319011261064157610d14611ac7565b610d1c611b1e565b600780546001600160a01b0319166001600160a01b039290921691821790557f10c7e41ec011086108a066b761fbe64a25de33c8aa43c41cc8ee40fbce3556338280a280f35b503461038357816003193601126103835751908152602090f35b50346103835760208060031936011261037f5783356001600160401b03811161037b57610dac9036908601611848565b91610db5611b1e565b60055483830191908580805b838110610ef15750610dd1578680f35b600019918083019081116102f157906101ef610def610df693611913565b5091611913565b6005548015610ede5701610e0981611913565b610ecc5786610e6097985081610e26610e4197969594935461194a565b80610e8f575b505050600555518093819286519283916118a3565b810160028152030190206001600160601b0360a01b815416905561203a565b7f1c40e49688e963884d475feda3ddb42c17aec5d2a82706904ba014ee7ce54a2a8280a2803880808080808680f35b601f8111600114610ea55750555b873880610e2c565b818352868320610ec091601f0160051c810190600101611fde565b81868120915555610e9d565b634e487b7160e01b8752868852602487fd5b634e487b7160e01b875260318852602487fd5b610efa81611913565b508551610f0e816103218b8201809561207f565b519020868651610f2c8a828d61034d838301968792519283916118a3565b51902014610f43575b610f3e9061205a565b610dc1565b91506001905081610f35565b50823461037f578160031936011261037f578160209360ff92610f70611ab1565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff81602093610fb5611ac7565b7fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee82528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff81602093611019611ac7565b8180528186528282206001600160a01b039091168252855220549151911615158152f35b50823461037f5761104d36611add565b611058929192611b1e565b6001600160a01b039081169361106f851515611fa9565b80519284519260209485818189019661108981838a6118a3565b810160038152030190205416156110fd575b50916110b5916110d69493518093819286519283916118a3565b81016003815203019020836001600160601b0360a01b82541617905561203a565b7f78cdb79fba1f42e6ca936bf7bd4be337a4a1734c57e4b9f68a1a465b4ac0d9b08380a380f35b805490600160401b8210156112215761111c60019283810183556118c6565b92909261120f578651916001600160401b0383116111fc575061114982611143855461194a565b85611ff5565b85601f8311600114611192579180806110b59795936110d69a9997958d93611187575b501b916000199060031b1c19161790555b919394509161109b565b8a015192508d61116c565b838a52868a2091929190601f1983168b5b8181106111e757509183916110b59896946110d69b9a989694106111ce575b5050811b01905561117d565b89015160001960f88460031b161c191690558b806111c2565b8a8301518455928501929189019189016111a3565b634e487b7160e01b8a5260419052602489fd5b634e487b7160e01b8952888252602489fd5b634e487b7160e01b885260419052602487fd5b50823461037f5761124436611add565b61124f929192611b1e565b6001600160a01b0390811693611266851515611fa9565b80519284519260209485818189019661128081838a6118a3565b810160028152030190205416156112f4575b50916112ac916112cd9493518093819286519283916118a3565b81016002815203019020836001600160601b0360a01b82541617905561203a565b7f4cc39cf92556f56ba17184d656cf1bbcfd5f8e8d7b1071d0e295017b9f70f41b8380a380f35b60055490600160401b82101561122157611315600192838101600555611913565b92909261120f578651916001600160401b0383116111fc575061133c82611143855461194a565b85601f8311600114611385579180806112ac9795936112cd9a9997958d9361137a575b501b916000199060031b1c19161790555b9193945091611292565b8a015192508d61135f565b838a52868a2091929190601f1983168b5b8181106113da57509183916112ac9896946112cd9b9a989694106113c1575b5050811b019055611370565b89015160001960f88460031b161c191690558b806113b5565b8a830151845592850192918901918901611396565b503461038357816003193601126103835760065490516001600160a01b039091168152602090f35b50346103835760203660031901126103835760ff81602093611437611ac7565b7f9a95e87c5af084bf5db8491c3a6515da9dd6da39b24b0eb0af08d7b9cd808d9182528186528282206001600160a01b039091168252855220549151911615158152f35b50346103835760203660031901126103835760ff8160209361149b611ac7565b7f264001e901c3e181f17cd2c6cec22c2e23d9dd662da12dcafc2619e16b7cd02482528186528282206001600160a01b039091168252855220549151911615158152f35b5091346103835782600319360112610383576114f9611ab1565b90336001600160a01b0383160361151557906106b99135611e16565b608490602085519162461bcd60e51b8352820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152fd5b50823461037f578160031936011261037f57359061158c611ab1565b90828452836020526115a360018286200154611d0c565b82845260208481528185206001600160a01b039093168086529290528084205460ff16156115cf578380f35b828452836020528084208285526020528320600160ff1982541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a48180808380f35b50823461037f57602036600319011261037f57816020936001923581528085522001549051908152f35b509190346106415780600319360112610641578154906001600160401b0382116116d8579183519260209061167d828560051b0186611827565b8385529182527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b8185015b8484106116bc5786518061063d8882611a4f565b60018381926116ca85611984565b8152019201930192906116a8565b634e487b7160e01b815260418352602490fd5b509034610641576020366003190112610641578235835481101561038357611712906118c6565b9390936117265761063d8361062a86611984565b634e487b7160e01b8252819052602490fd5b50823461037f57602036600319011261037f57359063ffffffff60e01b821680920361037f5760209250637965db0b60e01b821491821561177d575b50519015158152f35b6301ffc9a760e01b14915083611774565b509034610641576020366003190112610641578235906001600160401b03821161064157506020926117c291369101611848565b826117d5835192838151938492016118a3565b6002908201908152819003830190205490516001600160a01b039091168152f35b608081019081106001600160401b0382111761181157604052565b634e487b7160e01b600052604160045260246000fd5b90601f801991011681019081106001600160401b0382111761181157604052565b81601f8201121561189e578035906001600160401b038211611811576040519261187c601f8401601f191660200185611827565b8284526020838301011161189e57816000926020809301838601378301015290565b600080fd5b60005b8381106118b65750506000910152565b81810151838201526020016118a6565b6004548110156118fd5760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b634e487b7160e01b600052603260045260246000fd5b6005548110156118fd5760056000527f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db00190600090565b90600182811c9216801561197a575b602083101461196457565b634e487b7160e01b600052602260045260246000fd5b91607f1691611959565b90604051918260008254926119988461194a565b908184526001948581169081600014611a0757506001146119c4575b50506119c292500383611827565b565b9093915060005260209081600020936000915b8183106119ef5750506119c2935082010138806119b4565b855488840185015294850194879450918301916119d7565b9150506119c294506020925060ff191682840152151560051b82010138806119b4565b90602091611a43815180928185528580860191016118a3565b601f01601f1916010190565b602080820190808352835180925260408301928160408460051b8301019501936000915b848310611a835750505050505090565b9091929394958480611aa1600193603f198682030187528a51611a2a565b9801930193019194939290611a73565b602435906001600160a01b038216820361189e57565b600435906001600160a01b038216820361189e57565b604060031982011261189e57600435906001600160401b03821161189e57611b0791600401611848565b906024356001600160a01b038116810361189e5790565b3360009081527f480e10171e8c1b0a57efe6f81df1e97e2289bdec57e5e17ab313ec2b40d55d1a602090815260408083205490927fa76ae24524824acbc21b351dd3e380dcc53874f0487c5ec4424767562c1192ee9160ff1615611b825750505050565b611b8b33611e9b565b91845190611b98826117f6565b60428252848201926060368537825115611cf85760308453825190600191821015611cf85790607860218501536041915b818311611c8a57505050611c485760486104ff938693611c2c93611c1d985198899376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a8601526104ad815180928c6037890191016118a3565b01036028810187520185611827565b5192839262461bcd60e51b845260048401526024830190611a2a565b60648486519062461bcd60e51b825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611ce4576f181899199a1a9b1b9c1cb0b131b232b360811b901a611cba8587611e8a565b5360041c928015611cd057600019019190611bc9565b634e487b7160e01b82526011600452602482fd5b634e487b7160e01b83526032600452602483fd5b634e487b7160e01b81526032600452602490fd5b600090808252602090828252604092838120338252835260ff848220541615611d355750505050565b611d3e33611e9b565b91845190611d4b826117f6565b60428252848201926060368537825115611cf85760308453825190600191821015611cf85790607860218501536041915b818311611dd057505050611c485760486104ff938693611c2c93611c1d985198899376020b1b1b2b9b9a1b7b73a3937b61d1030b1b1b7bab73a1604d1b8a8601526104ad815180928c6037890191016118a3565b909192600f81166010811015611ce4576f181899199a1a9b1b9c1cb0b131b232b360811b901a611e008587611e8a565b5360041c928015611cd057600019019190611d7c565b9060009180835282602052604083209160018060a01b03169182845260205260ff604084205416611e4657505050565b80835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b9081518110156118fd570160200190565b60405190606082018281106001600160401b0382111761181157604052602a82526020820160403682378251156118fd576030905381516001908110156118fd57607860218401536029905b808211611f3b575050611ef75790565b606460405162461bcd60e51b815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b9091600f81166010811015611f94576f181899199a1a9b1b9c1cb0b131b232b360811b901a611f6a8486611e8a565b5360041c918015611f7f576000190190611ee7565b60246000634e487b7160e01b81526011600452fd5b60246000634e487b7160e01b81526032600452fd5b15611fb057565b60405162461bcd60e51b81526020600482015260066024820152653430303a494160d01b6044820152606490fd5b818110611fe9575050565b60008155600101611fde565b9190601f811161200457505050565b6119c2926000526020600020906020601f840160051c83019310612030575b601f0160051c0190611fde565b9091508190612023565b612052906020604051928284809451938492016118a3565b810103902090565b60001981146120695760010190565b634e487b7160e01b600052601160045260246000fd5b60009291815461208e8161194a565b926001918083169081156120e757506001146120ab575b50505050565b90919293945060005260209081600020906000915b8583106120d657505050500190388080806120a5565b8054858401529183019181016120c0565b60ff19168452505050811515909102019150388080806120a5565b908082146121dc57612114815461194a565b906001600160401b03821161181157819061213982612133865461194a565b86611ff5565b600090601f831160011461217057600092612165575b50508160011b916000199060031b1c1916179055565b01549050388061214f565b81526020808220858352818320935090601f1985169083905b8282106121c35750509084600195949392106121aa575b505050811b019055565b015460001960f88460031b161c191690553880806121a0565b8495819295850154815560018091019601940190612189565b5050565b91906121ef576119c291612102565b634e487b7160e01b600052600060045260246000fdfea164736f6c6343000811000a
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.93
Net Worth in ETH
0.000325
Token Allocations
USDC
100.00%
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|---|---|---|---|---|
| ARB | 100.00% | $0.999592 | 0.9307 | $0.9303 |
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.