Source Code
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | ||||
|---|---|---|---|---|---|---|---|
| 15911704 | 360 days ago | 0 FRAX | |||||
| 15911704 | 360 days ago | 0 FRAX | |||||
| 15911704 | 360 days ago | 0 FRAX | |||||
| 15911704 | 360 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15889339 | 361 days ago | 0 FRAX | |||||
| 15887332 | 361 days ago | 0 FRAX | |||||
| 15887332 | 361 days ago | 0 FRAX | |||||
| 15887332 | 361 days ago | 0 FRAX | |||||
| 15887332 | 361 days ago | 0 FRAX | |||||
| 15886594 | 361 days ago | 0 FRAX | |||||
| 15886594 | 361 days ago | 0 FRAX | |||||
| 15886594 | 361 days ago | 0 FRAX | |||||
| 15886594 | 361 days ago | 0 FRAX | |||||
| 15886551 | 361 days ago | 0 FRAX |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
CurveAPI3CompositeWrapperWithThresholding
Compiler Version
v0.8.20+commit.a1b79de6
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import "./CurveOracleWrapper.sol";
import "./API3Wrapper.sol";
import "./ThresholdingUtils.sol";
/**
* @title CurveAPI3CompositeWrapperWithThresholding
* @notice Oracle wrapper that combines Curve pool prices with API3 prices and applies thresholding
* @dev Used when Curve pool prices need to be converted using another token's price from API3
*/
contract CurveAPI3CompositeWrapperWithThresholding is
CurveOracleWrapper,
ThresholdingUtils
{
/* Errors */
error API3InvalidPrice(address asset);
/* Types */
struct CompositeFeed {
address api3Asset; // Asset to get price from API3
address api3Wrapper; // API3 wrapper contract address
CompositeThresholdFeed thresholds;
}
/* State */
/// @notice Mapping from asset to composite feed configuration
mapping(address => CompositeFeed) public compositeFeeds;
/* Events */
event CompositeFeedSet(
address indexed asset,
address indexed api3Asset,
address indexed api3Wrapper,
uint256 curveLowerThresholdInBase,
uint256 curveFixedPriceInBase,
uint256 api3LowerThresholdInBase,
uint256 api3FixedPriceInBase
);
event CompositeFeedRemoved(address indexed asset);
constructor(
uint256 _baseCurrencyUnit
) CurveOracleWrapper(_baseCurrencyUnit) {}
/**
* @notice Set or update composite feed configuration for an asset
*/
function setCompositeFeed(
address asset,
address api3Asset,
address api3Wrapper,
uint256 curveLowerThresholdInBase,
uint256 curveFixedPriceInBase,
uint256 api3LowerThresholdInBase,
uint256 api3FixedPriceInBase
) external onlyRole(ORACLE_MANAGER_ROLE) {
// Verify the asset is configured in Curve wrapper
PoolConfig memory poolConfig = assetConfigs[asset];
if (address(poolConfig.pool) == address(0))
revert AssetNotConfigured(asset);
// Verify API3 wrapper can provide a price
(, bool isAlive) = API3Wrapper(api3Wrapper).getPriceInfo(api3Asset);
if (!isAlive) revert API3InvalidPrice(api3Asset);
compositeFeeds[asset] = CompositeFeed({
api3Asset: api3Asset,
api3Wrapper: api3Wrapper,
thresholds: CompositeThresholdFeed({
primary: ThresholdConfig({
lowerThresholdInBase: curveLowerThresholdInBase,
fixedPriceInBase: curveFixedPriceInBase
}),
secondary: ThresholdConfig({
lowerThresholdInBase: api3LowerThresholdInBase,
fixedPriceInBase: api3FixedPriceInBase
})
})
});
emit CompositeFeedSet(
asset,
api3Asset,
api3Wrapper,
curveLowerThresholdInBase,
curveFixedPriceInBase,
api3LowerThresholdInBase,
api3FixedPriceInBase
);
}
/**
* @notice Remove composite feed configuration for an asset
* @param asset Asset address
*/
function removeCompositeFeed(
address asset
) external onlyRole(ORACLE_MANAGER_ROLE) {
delete compositeFeeds[asset];
emit CompositeFeedRemoved(asset);
}
/**
* @notice Get the composite price info for an asset
*/
function getPriceInfo(
address asset
) public view override returns (uint256 price, bool isAlive) {
// Get Curve pool price
(uint256 curvePrice, bool curveAlive) = super.getPriceInfo(asset);
if (!curveAlive) return (0, false);
CompositeFeed memory feed = compositeFeeds[asset];
// Apply threshold to Curve price if threshold is configured
if (feed.thresholds.primary.lowerThresholdInBase > 0) {
curvePrice = _applyThreshold(curvePrice, feed.thresholds.primary);
}
// If no composite feed for API3, return Curve price
if (feed.api3Asset == address(0)) {
return (curvePrice, true);
}
// Get API3 price
(uint256 api3Price, bool api3Alive) = API3Wrapper(feed.api3Wrapper)
.getPriceInfo(feed.api3Asset);
if (!api3Alive) return (0, false);
// Apply threshold to API3 price if threshold is configured
if (feed.thresholds.secondary.lowerThresholdInBase > 0) {
api3Price = _applyThreshold(api3Price, feed.thresholds.secondary);
}
// Calculate composite price
return ((curvePrice * api3Price) / BASE_CURRENCY_UNIT, true);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/AccessControl.sol)
pragma solidity ^0.8.20;
import {IAccessControl} from "./IAccessControl.sol";
import {Context} from "../utils/Context.sol";
import {ERC165} from "../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 account => bool) hasRole;
bytes32 adminRole;
}
mapping(bytes32 role => RoleData) private _roles;
bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;
/**
* @dev Modifier that checks that an account has a specific role. Reverts
* with an {AccessControlUnauthorizedAccount} error including the required role.
*/
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 returns (bool) {
return _roles[role].hasRole[account];
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `_msgSender()`
* is missing `role`. Overriding this function changes the behavior of the {onlyRole} modifier.
*/
function _checkRole(bytes32 role) internal view virtual {
_checkRole(role, _msgSender());
}
/**
* @dev Reverts with an {AccessControlUnauthorizedAccount} error if `account`
* is missing `role`.
*/
function _checkRole(bytes32 role, address account) internal view virtual {
if (!hasRole(role, account)) {
revert AccessControlUnauthorizedAccount(account, role);
}
}
/**
* @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 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 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 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 `callerConfirmation`.
*
* May emit a {RoleRevoked} event.
*/
function renounceRole(bytes32 role, address callerConfirmation) public virtual {
if (callerConfirmation != _msgSender()) {
revert AccessControlBadConfirmation();
}
_revokeRole(role, callerConfirmation);
}
/**
* @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 Attempts to grant `role` to `account` and returns a boolean indicating if `role` was granted.
*
* Internal function without access restriction.
*
* May emit a {RoleGranted} event.
*/
function _grantRole(bytes32 role, address account) internal virtual returns (bool) {
if (!hasRole(role, account)) {
_roles[role].hasRole[account] = true;
emit RoleGranted(role, account, _msgSender());
return true;
} else {
return false;
}
}
/**
* @dev Attempts to revoke `role` to `account` and returns a boolean indicating if `role` was revoked.
*
* Internal function without access restriction.
*
* May emit a {RoleRevoked} event.
*/
function _revokeRole(bytes32 role, address account) internal virtual returns (bool) {
if (hasRole(role, account)) {
_roles[role].hasRole[account] = false;
emit RoleRevoked(role, account, _msgSender());
return true;
} else {
return false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC165 detection.
*/
interface IAccessControl {
/**
* @dev The `account` is missing a role.
*/
error AccessControlUnauthorizedAccount(address account, bytes32 neededRole);
/**
* @dev The caller of a function is not the expected one.
*
* NOTE: Don't confuse with {AccessControlUnauthorizedAccount}.
*/
error AccessControlBadConfirmation();
/**
* @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.
*/
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 `callerConfirmation`.
*/
function renounceRole(bytes32 role, address callerConfirmation) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/ERC165.sol)
pragma solidity ^0.8.20;
import {IERC165} from "./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);
* }
* ```
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @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: AGPL-3.0
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.0;
/**
* @title IPriceOracleGetter
* @author Aave
* @notice Interface for the Aave price oracle.
*/
interface IPriceOracleGetter {
/**
* @notice Returns the base currency address
* @dev Address 0x0 is reserved for USD as base currency.
* @return Returns the base currency address.
*/
function BASE_CURRENCY() external view returns (address);
/**
* @notice Returns the base currency unit
* @dev 1 ether for ETH, 1e8 for USD.
* @return Returns the base currency unit.
*/
function BASE_CURRENCY_UNIT() external view returns (uint256);
/**
* @notice Returns the asset price in the base currency
* @param asset The address of the asset
* @return The price of the asset
*/
function getAssetPrice(address asset) external view returns (uint256);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import "contracts/lending/core/interfaces/IPriceOracleGetter.sol";
/**
* @dev Interface for the individual oracle wrappers, to unify interface between Redstone and API3 for example
*/
interface IOracleWrapper is IPriceOracleGetter {
function getPriceInfo(
address asset
) external view returns (uint256 price, bool isAlive);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import "../IOracleWrapper.sol";
import "@openzeppelin/contracts-5/access/AccessControl.sol";
abstract contract IAPI3Wrapper is IOracleWrapper, AccessControl {
/* Core state */
uint256 public constant API3_BASE_CURRENCY_UNIT = 10 ** 18;
uint256 public constant API3_HEARTBEAT = 24 hours;
address public constant BASE_CURRENCY = address(0);
uint256 public immutable BASE_CURRENCY_UNIT;
uint256 public heartbeatStaleTimeLimit = 30 minutes;
/* Roles */
bytes32 public constant ORACLE_MANAGER_ROLE =
keccak256("ORACLE_MANAGER_ROLE");
/* Errors */
error PriceIsStale();
constructor(uint256 _baseCurrencyUnit) {
BASE_CURRENCY_UNIT = _baseCurrencyUnit;
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(ORACLE_MANAGER_ROLE, msg.sender);
}
function getPriceInfo(
address asset
) public view virtual override returns (uint256 price, bool isAlive);
function getAssetPrice(
address asset
) external view virtual override returns (uint256) {
(uint256 price, bool isAlive) = getPriceInfo(asset);
if (!isAlive) {
revert PriceIsStale();
}
return price;
}
function _convertToBaseCurrencyUnit(
uint256 price
) internal view returns (uint256) {
return (price * BASE_CURRENCY_UNIT) / API3_BASE_CURRENCY_UNIT;
}
function setHeartbeatStaleTimeLimit(
uint256 _newHeartbeatStaleTimeLimit
) external onlyRole(ORACLE_MANAGER_ROLE) {
heartbeatStaleTimeLimit = _newHeartbeatStaleTimeLimit;
}
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity ^0.8.0;
/// @dev See DapiProxy.sol for comments about usage
interface IProxy {
function read() external view returns (int224 value, uint32 timestamp);
function api3ServerV1() external view returns (address);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import "../IOracleWrapper.sol";
import "@openzeppelin/contracts-5/access/AccessControl.sol";
/**
* @title ICurveOracleWrapper
* @notice Interface for Curve pool oracle wrappers
*/
abstract contract ICurveOracleWrapper is IOracleWrapper, AccessControl {
/* Core state */
/// @notice Base currency unit (e.g. 1e18 for USD)
uint256 public immutable BASE_CURRENCY_UNIT;
uint256 public constant CURVE_BASE_CURRENCY_UNIT = 10 ** 18;
uint256 public constant CURVE_RATE_PRECISION = 10 ** 18;
/// @notice Base currency (address(0) for USD)
address public constant BASE_CURRENCY = address(0);
/* Events */
event AssetConfigSet(
address indexed asset,
address indexed pool,
uint256 tokenIndex
);
event AssetConfigRemoved(address indexed asset);
/* Errors */
error AssetNotConfigured(address asset);
error InvalidPool(address pool);
error InvalidTokenIndex(address pool, uint256 tokenIndex);
error PriceIsZero(address asset);
/* Roles */
bytes32 public constant ORACLE_MANAGER_ROLE =
keccak256("ORACLE_MANAGER_ROLE");
constructor(uint256 _baseCurrencyUnit) {
BASE_CURRENCY_UNIT = _baseCurrencyUnit;
_grantRole(DEFAULT_ADMIN_ROLE, msg.sender);
_grantRole(ORACLE_MANAGER_ROLE, msg.sender);
}
/**
* @notice Set or update configuration for an asset
* @param asset Asset address
* @param pool Curve pool address
*/
function setAssetConfig(address asset, address pool) external virtual;
/**
* @notice Remove configuration for an asset
* @param asset Asset address
*/
function removeAssetConfig(address asset) external virtual;
function getPriceInfo(
address asset
) public view virtual override returns (uint256 price, bool isAlive);
function getAssetPrice(
address asset
) external view virtual override returns (uint256) {
(uint256 price, bool isAlive) = getPriceInfo(asset);
if (!isAlive) revert PriceIsZero(asset);
return price;
}
function _convertToBaseCurrencyUnit(
uint256 price
) internal view returns (uint256) {
return (price * BASE_CURRENCY_UNIT) / CURVE_BASE_CURRENCY_UNIT;
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface ICurveStableNG {
// View functions
function price_oracle(uint256 i) external view returns (uint256);
function ema_price(uint256 i) external view returns (uint256);
function last_price(uint256 i) external view returns (uint256);
function get_p(uint256 i) external view returns (uint256);
function coins(uint256 i) external view returns (address);
function N_COINS() external view returns (uint256);
function get_virtual_price() external view returns (uint256);
function balances(uint256 i) external view returns (uint256);
function get_balances() external view returns (uint256[] memory);
function get_dx(
int128 i,
int128 j,
uint256 dy
) external view returns (uint256);
function get_dy(
int128 i,
int128 j,
uint256 dx
) external view returns (uint256);
function calc_token_amount(
uint256[] memory amounts,
bool is_deposit
) external view returns (uint256);
function calc_withdraw_one_coin(
uint256 burn_amount,
int128 i
) external view returns (uint256);
function D_oracle() external view returns (uint256);
function dynamic_fee(int128 i, int128 j) external view returns (uint256);
// State changing functions
function exchange(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy
) external returns (uint256);
function exchange(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy,
address receiver
) external returns (uint256);
function exchange_received(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy
) external returns (uint256);
function exchange_received(
int128 i,
int128 j,
uint256 dx,
uint256 min_dy,
address receiver
) external returns (uint256);
// Liquidity functions
function add_liquidity(
uint256[] memory amounts,
uint256 min_mint_amount
) external returns (uint256);
function add_liquidity(
uint256[] memory amounts,
uint256 min_mint_amount,
address receiver
) external returns (uint256);
function remove_liquidity(
uint256 burn_amount,
uint256[] memory min_amounts
) external returns (uint256[] memory);
function remove_liquidity(
uint256 burn_amount,
uint256[] memory min_amounts,
address receiver
) external returns (uint256[] memory);
function remove_liquidity(
uint256 burn_amount,
uint256[] memory min_amounts,
address receiver,
bool claim_admin_fees
) external returns (uint256[] memory);
function remove_liquidity_one_coin(
uint256 burn_amount,
int128 i,
uint256 min_received
) external returns (uint256);
function remove_liquidity_one_coin(
uint256 burn_amount,
int128 i,
uint256 min_received,
address receiver
) external returns (uint256);
function remove_liquidity_imbalance(
uint256[] memory amounts,
uint256 max_burn_amount
) external returns (uint256);
function remove_liquidity_imbalance(
uint256[] memory amounts,
uint256 max_burn_amount,
address receiver
) external returns (uint256);
// Admin functions
function ramp_A(uint256 future_A, uint256 future_time) external;
function stop_ramp_A() external;
function set_new_fee(
uint256 new_fee,
uint256 new_offpeg_fee_multiplier
) external;
function set_ma_exp_time(uint256 ma_exp_time, uint256 D_ma_time) external;
function withdraw_admin_fees() external;
// ERC20 functions
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(
address from,
address to,
uint256 value
) external returns (bool);
function approve(address spender, uint256 value) external returns (bool);
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function allowance(
address owner,
address spender
) external view returns (uint256);
function nonces(address owner) external view returns (uint256);
// Additional view functions
function version() external view returns (string memory);
function name() external view returns (string memory);
function symbol() external view returns (string memory);
function decimals() external view returns (uint8);
function fee() external view returns (uint256);
function offpeg_fee_multiplier() external view returns (uint256);
function admin_fee() external view returns (uint256);
function initial_A() external view returns (uint256);
function future_A() external view returns (uint256);
function initial_A_time() external view returns (uint256);
function future_A_time() external view returns (uint256);
function admin_balances(uint256 i) external view returns (uint256);
function ma_exp_time() external view returns (uint256);
function D_ma_time() external view returns (uint256);
function ma_last_time() external view returns (uint256);
function salt() external view returns (bytes32);
function A() external view returns (uint256);
function A_precise() external view returns (uint256);
function stored_rates() external view returns (uint256[] memory);
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import {IProxy} from "../interface/api3/IProxy.sol";
import "../interface/api3/IAPI3Wrapper.sol";
contract API3Wrapper is IAPI3Wrapper {
mapping(address => IProxy) public assetToProxy;
error ProxyNotSet(address asset);
constructor(uint256 _baseCurrencyUnit) IAPI3Wrapper(_baseCurrencyUnit) {}
function getPriceInfo(
address asset
) public view virtual override returns (uint256 price, bool isAlive) {
IProxy api3Proxy = assetToProxy[asset];
if (address(api3Proxy) == address(0)) {
revert ProxyNotSet(asset);
}
(int224 value, uint32 timestamp) = api3Proxy.read();
price = value > 0 ? uint256(uint224(value)) : 0;
isAlive =
price > 0 &&
block.timestamp - timestamp <=
API3_HEARTBEAT + heartbeatStaleTimeLimit;
price = _convertToBaseCurrencyUnit(price);
}
function setProxy(
address asset,
address proxy
) external onlyRole(ORACLE_MANAGER_ROLE) {
assetToProxy[asset] = IProxy(proxy);
}
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
import "../interface/curve/ICurveOracleWrapper.sol";
import "../interface/curve/ICurveStableNG.sol";
import "@openzeppelin/contracts-5/token/ERC20/extensions/IERC20Metadata.sol";
/**
* @title CurveOracleWrapper
* @notice Oracle wrapper for Curve pools
* @dev Uses get_dy to calculate the effective exchange rate between two tokens
*/
contract CurveOracleWrapper is ICurveOracleWrapper {
/* Constants */
uint256 private constant REQUIRED_N_COINS = 2; // Required number of coins in pool
/* Core state */
/// @notice Mapping from asset to pool and token index
mapping(address => PoolConfig) public assetConfigs;
struct PoolConfig {
address pool;
uint256 tokenIndex;
}
constructor(
uint256 _baseCurrencyUnit
) ICurveOracleWrapper(_baseCurrencyUnit) {}
function setAssetConfig(
address asset,
address pool
) external override onlyRole(ORACLE_MANAGER_ROLE) {
if (pool == address(0)) revert InvalidPool(pool);
ICurveStableNG curvePool = ICurveStableNG(pool);
try curvePool.N_COINS() returns (uint256 nCoins) {
if (nCoins != REQUIRED_N_COINS) revert InvalidPool(pool);
} catch {
revert InvalidPool(pool);
}
uint256 tokenIndex = type(uint256).max; // Invalid initial value
// Find the token index by iterating through coins
for (uint256 i = 0; i < REQUIRED_N_COINS; i++) {
if (curvePool.coins(i) == asset) {
tokenIndex = i;
break;
}
}
if (tokenIndex == type(uint256).max)
revert InvalidTokenIndex(pool, tokenIndex);
assetConfigs[asset] = PoolConfig({
pool: address(curvePool),
tokenIndex: tokenIndex
});
emit AssetConfigSet(asset, pool, tokenIndex);
}
function removeAssetConfig(
address asset
) external override onlyRole(ORACLE_MANAGER_ROLE) {
delete assetConfigs[asset];
emit AssetConfigRemoved(asset);
}
function getPriceInfo(
address asset
) public view virtual override returns (uint256 price, bool isAlive) {
PoolConfig memory config = assetConfigs[asset];
if (address(config.pool) == address(0))
revert AssetNotConfigured(asset);
ICurveStableNG curvePool = ICurveStableNG(config.pool);
uint256 unscaledPrice;
uint256 scaledPrice;
// Since we only support 2 coins now
// If tokenIndex is 0, get price against token1
// If tokenIndex is 1, get price against token0
uint256 otherTokenIndex = config.tokenIndex == 0 ? 1 : 0;
if (config.tokenIndex > 0) {
// price_oracle of coins[i] against coins[0]
unscaledPrice = curvePool.price_oracle(config.tokenIndex - 1);
} else {
// get the reverse EMA (price of coins[0] with regard to coins[i]):
unscaledPrice =
(CURVE_BASE_CURRENCY_UNIT * CURVE_BASE_CURRENCY_UNIT) /
curvePool.price_oracle(otherTokenIndex - 1);
}
// Get multiplier rate
uint256[] memory rates = curvePool.stored_rates();
if (rates.length <= config.tokenIndex) {
scaledPrice = unscaledPrice;
} else {
scaledPrice =
(rates[config.tokenIndex] * unscaledPrice) /
CURVE_RATE_PRECISION;
}
price = _convertToBaseCurrencyUnit(scaledPrice);
isAlive = price > 0;
return (price, isAlive);
}
}// SPDX-License-Identifier: MIT
/* ———————————————————————————————————————————————————————————————————————————————— *
* _____ ______ ______ __ __ __ __ ______ __ __ *
* /\ __-. /\__ _\ /\ == \ /\ \ /\ "-.\ \ /\ \ /\__ _\ /\ \_\ \ *
* \ \ \/\ \ \/_/\ \/ \ \ __< \ \ \ \ \ \-. \ \ \ \ \/_/\ \/ \ \____ \ *
* \ \____- \ \_\ \ \_\ \_\ \ \_\ \ \_\\"\_\ \ \_\ \ \_\ \/\_____\ *
* \/____/ \/_/ \/_/ /_/ \/_/ \/_/ \/_/ \/_/ \/_/ \/_____/ *
* *
* ————————————————————————————————— dtrinity.org ————————————————————————————————— *
* *
* ▲ *
* ▲ ▲ *
* *
* ———————————————————————————————————————————————————————————————————————————————— *
* dTRINITY Protocol: https://github.com/dtrinity *
* ———————————————————————————————————————————————————————————————————————————————— */
pragma solidity 0.8.20;
abstract contract ThresholdingUtils {
/* Types */
struct ThresholdConfig {
/// @notice The minimum price after which thresholding is applied. Not a price cap, but a trigger point.
/// @dev If lowerThresholdInBase == fixedPriceInBase: Acts as an upper threshold
/// @dev If lowerThresholdInBase < fixedPriceInBase: Acts as "price rounding up" (e.g. if USDC > 0.997 then round to 1)
/// @dev If lowerThresholdInBase > fixedPriceInBase: Acts as "price rounding down" (e.g. if USDC > 1.003 then round to 1)
uint256 lowerThresholdInBase;
uint256 fixedPriceInBase;
}
struct CompositeThresholdFeed {
ThresholdConfig primary; // Primary price source threshold config
ThresholdConfig secondary; // Secondary price source threshold config
}
/**
* @notice Apply threshold to a price value
* @param priceInBase The price to check against threshold
* @param thresholdConfig The threshold configuration
* @return The original price or fixed price based on threshold
*/
function _applyThreshold(
uint256 priceInBase,
ThresholdConfig memory thresholdConfig
) internal pure returns (uint256) {
if (priceInBase > thresholdConfig.lowerThresholdInBase) {
return thresholdConfig.fixedPriceInBase;
}
return priceInBase;
}
}{
"evmVersion": "london",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs",
"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":"uint256","name":"_baseCurrencyUnit","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"API3InvalidPrice","type":"error"},{"inputs":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"AssetNotConfigured","type":"error"},{"inputs":[{"internalType":"address","name":"pool","type":"address"}],"name":"InvalidPool","type":"error"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"name":"InvalidTokenIndex","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"PriceIsZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"AssetConfigRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"name":"AssetConfigSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"CompositeFeedRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":true,"internalType":"address","name":"api3Asset","type":"address"},{"indexed":true,"internalType":"address","name":"api3Wrapper","type":"address"},{"indexed":false,"internalType":"uint256","name":"curveLowerThresholdInBase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"curveFixedPriceInBase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"api3LowerThresholdInBase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"api3FixedPriceInBase","type":"uint256"}],"name":"CompositeFeedSet","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":"BASE_CURRENCY","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CURVE_BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CURVE_RATE_PRECISION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ORACLE_MANAGER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetConfigs","outputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"uint256","name":"tokenIndex","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"compositeFeeds","outputs":[{"internalType":"address","name":"api3Asset","type":"address"},{"internalType":"address","name":"api3Wrapper","type":"address"},{"components":[{"components":[{"internalType":"uint256","name":"lowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"fixedPriceInBase","type":"uint256"}],"internalType":"struct ThresholdingUtils.ThresholdConfig","name":"primary","type":"tuple"},{"components":[{"internalType":"uint256","name":"lowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"fixedPriceInBase","type":"uint256"}],"internalType":"struct ThresholdingUtils.ThresholdConfig","name":"secondary","type":"tuple"}],"internalType":"struct ThresholdingUtils.CompositeThresholdFeed","name":"thresholds","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getAssetPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"getPriceInfo","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bool","name":"isAlive","type":"bool"}],"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":"asset","type":"address"}],"name":"removeAssetConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"removeCompositeFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"callerConfirmation","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":"asset","type":"address"},{"internalType":"address","name":"pool","type":"address"}],"name":"setAssetConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"api3Asset","type":"address"},{"internalType":"address","name":"api3Wrapper","type":"address"},{"internalType":"uint256","name":"curveLowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"curveFixedPriceInBase","type":"uint256"},{"internalType":"uint256","name":"api3LowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"api3FixedPriceInBase","type":"uint256"}],"name":"setCompositeFeed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]Contract Creation Code
60a03461007557601f6112ec38819003918201601f19168301916001600160401b0383118484101761007a57808492602094604052833981010312610075575160805261004b33610090565b506100553361010e565b5060405161111d90816101af82396080518181816105c20152610d7d0152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b031660008181527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205490919060ff1661010a57818052816020526040822081835260205260408220600160ff1982541617905533916000805160206112cc8339815191528180a4600190565b5090565b6001600160a01b031660008181527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260408120549091907fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff166101a957808352826020526040832082845260205260408320600160ff198254161790556000805160206112cc833981519152339380a4600190565b50509056fe6080604081815260048036101561001557600080fd5b600090813560e01c93846301ffc9a7146109685750836322dd40ef14610102578363248a9ca31461093e5783632f2ff15d1461091657836336568abe146108d1578363519ffff1146108545783637609d7f6146107f457836381a69511146105e55783638c89b64f146105aa5783638edbf4361461057957836391d1485414610533578363a085a793146102ed578363a217fddf146102d2578363b3596f071461027b578363bfc69e1c14610240578363d547741f146101ff57508263e19f4700146101e5578263f667e42814610183578263f99256d51461010757505063fbc12e5c1461010257600080fd5b6109ba565b346101805760208060031936011261017c5780838160c09560018060a01b0395866101306109f8565b168152600283522091610150600287855416976001860154169401610a9c565b9281519687528287015282519081519087015201516060850152015180516080840152015160a0820152f35b5080fd5b80fd5b903461017c57602036600319011261017c578160016101a06109f8565b6101a8610ac8565b818060a01b03169283835281602052822082815501557fecd58386925932344b9d411955c289f1af8401c69c40aa31dfcab72b21759f458280a280f35b903461017c578160031936011261017c5751908152602090f35b823461023c578060031936011261023c57610238913561023360016102226109e2565b938387528660205286200154610b42565b610be6565b5080f35b8280fd5b50903461017c578160031936011261017c57602090517fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c188152f35b903461018057602036600319011261018057506102966109f8565b61029f81610ca3565b929092156102b1576020838551908152f35b83516349e1879f60e11b81526001600160a01b039092169082015260249150fd5b50903461017c578160031936011261017c5751908152602090f35b823461023c578060031936011261023c576103066109f8565b9061030f6109e2565b93610318610ac8565b6001600160a01b038581169390841561051c578351630293577560e41b815260209190828189818a5afa8591816104e9575b50610366578551630f4c971b60e21b8152808901889052602490fd5b939692949193600119016104d2579384169360001992875b6002811061042a575b5060001984146103fd5750907fe15adf635f0230f04a10c533ae4edc6ee52f6aab68fd00497903ec8ffac72e0a93929160018251916103c583610a0e565b88835285830190858252888b52828752848b209351166bffffffffffffffffffffffff60a01b8454161783555191015551908152a380f35b825163152a07eb60e11b81526001600160a01b038a16918101918252602082018590529081906040010390fd5b835163c661065760e01b815282810182905286816024818c5afa9081156104c857889185918c91610489575b50161461048157600019811461046e5760010161037e565b634e487b7160e01b895260118252602489fd5b935089610387565b925050508681813d83116104c1575b6104a28183610a5c565b810103126104bd575183811681036104bd578388918d610456565b8980fd5b503d610498565b85513d8c823e3d90fd5b8151630f4c971b60e21b8152808401879052602490fd5b9091508381813d8311610515575b6105018183610a5c565b810103126105115751908a61034a565b8580fd5b503d6104f7565b8351630f4c971b60e21b8152808701869052602490fd5b82903461023c578160031936011261023c578160209360ff926105546109e2565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b5034610180576020366003190112610180575061059c6105976109f8565b610ca3565b825191825215156020820152f35b50903461017c578160031936011261017c57602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b3461017c5760e036600319011261017c576105fe6109f8565b906106076109e2565b936044356001600160a01b038181169491859003610511576064359260843560a435928060c43595610637610ac8565b1696878a5260209160018352848b20855161065181610a0e565b84600184845416938484520154910152156107dd5780858b9c9d602482518094819363476dfa1b60e11b8352169e8f888301525afa9081156107d3578d916107a4575b501561078d57918960058286948f8f9c7f850d28bf2d8acb532d6827d537f97debaff0eca8e001f53619215543091448e79d8f998060809f9d849f9d958f9d8f839f8b998551996106e48b610a0e565b8a528a8a01528451916106f683610a0e565b82528982015283519761070889610a0e565b88528888015282519b61071a8d610a40565b8c52878c01958652828c0196875281526002875220985116906bffffffffffffffffffffffff60a01b91828a54161789556001890192511690825416179055518181518051600289015501516003870155015190815190850155015191015582519586528501528301526060820152a480f35b84516314de66af60e31b81528083018b9052602490fd5b6107c49150863d88116107cc575b6107bc8183610a5c565b810190610c5b565b90508d610694565b503d6107b2565b86513d8f823e3d90fd5b8451630f10d83760e11b81528083018a9052602490fd5b5034610180576020366003190112610180576001600160a01b0390610850906001908490846108216109f8565b16815282602052209283541692015492519283928360209093929193604081019460018060a01b031681520152565b0390f35b8193503461017c57602036600319011261017c57600590826108746109f8565b61087c610ac8565b60018060a01b031694858252600260205281209181835581600184015581600284015581600384015582015501557fdabc58d0456c50872fa82879bc9ce7f6a455b4372db632857a62de4abd0996918280a280f35b913461017c578060031936011261017c576108ea6109e2565b90336001600160a01b038316036109075750610238919235610be6565b5163334bd91960e11b81528390fd5b823461023c578060031936011261023c57610238913561093960016102226109e2565b610b68565b82903461023c57602036600319011261023c57816020936001923581528085522001549051908152f35b903461023c57602036600319011261023c573563ffffffff60e01b811680910361023c5760209250637965db0b60e01b81149081156109a9575b5015158152f35b6301ffc9a760e01b149050836109a2565b346109dd5760003660031901126109dd576020604051670de0b6b3a76400008152f35b600080fd5b602435906001600160a01b03821682036109dd57565b600435906001600160a01b03821682036109dd57565b6040810190811067ffffffffffffffff821117610a2a57604052565b634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff821117610a2a57604052565b90601f8019910116810190811067ffffffffffffffff821117610a2a57604052565b90604051610a8b81610a0e565b602060018294805484520154910152565b90604051610aa981610a0e565b6020610ac360028395610abb81610a7e565b855201610a7e565b910152565b3360009081527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260409020547fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff1615610b245750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff6040600020541615610b245750565b9060009180835282602052604083209160018060a01b03169182845260205260ff60408420541615600014610be157808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff604084205416600014610be15780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b91908260409103126109dd576020825192015180151581036109dd5790565b81810292918115918404141715610c8d57565b634e487b7160e01b600052601160045260246000fd5b9060018060a01b03809216600081815260019360209285845260408084208151610ccc81610a0e565b888583541692838352015491878201928352156110b9578490511690805115806000146110b15760ff8a5b16906110195750805160001981019190821161100557835191636872765360e01b835260048301528782602481865afa8015610fc55787908190610fcf575b60049350935b855163fd0684b160e01b815293849182905afa918215610fc5578792610f17575b508151905190818111610edb57505050945b670de0b6b3a7640000610da37f00000000000000000000000000000000000000000000000000000000000000008098610c7a565b04928315610e7e5785526002815281852093825190610dc182610a40565b808654168252610ddf6002828c890154169785850198895201610a9c565b9184810192808452518051610ec8575b50518116958615610ebb57908491511695602482518098819363476dfa1b60e11b835260048301525afa948515610eb15786938796610e8a575b5050829415610e7e575101518051610e4a94939290610e6b575b5050610c7a565b908215610e575750049190565b634e487b7160e01b81526012600452602490fd5b610e769293506110d1565b903880610e43565b50505050509250508190565b8091929650610ea6939450903d106107cc576107bc8183610a5c565b919091933880610e29565b83513d88823e3d90fd5b5050505050925050509190565b610ed4908392976110d1565b9590610def565b811015610f035760051b01860151670de0b6b3a764000091610efc91610c7a565b0494610d6f565b634e487b7160e01b87526032600452602487fd5b9091503d8088833e610f298183610a5c565b81018882820312610fc157815167ffffffffffffffff928382116104bd570181601f82011215610fbd578051928311610fa9578260051b90865193610f708c840186610a5c565b84528a808501928201019283116104bd578a809101915b838310610f9957505050509038610d5d565b82518152918101918b9101610f87565b634e487b7160e01b89526041600452602489fd5b8880fd5b8780fd5b84513d89823e3d90fd5b5050908781813d8311610ffe575b610fe78183610a5c565b81010312610ffa57908660049251610d36565b8680fd5b503d610fdd565b634e487b7160e01b87526011600452602487fd5b600019810190811161100557835190636872765360e01b825260048201528781602481865afa908115610fc5578791611084575b5080156110705790866004926ec097ce7bc90715b34b9f10000000000493610d3c565b634e487b7160e01b87526012600452602487fd5b90508781813d83116110aa575b61109b8183610a5c565b81010312610ffa57513861104d565b503d611091565b60ff87610cf7565b8251630f10d83760e11b815260048101859052602490fd5b90805182116110de575090565b6020915001519056fea26469706673582212202efa0856da573f8c76fffd6de82d33e2260cb5b7b4964b14ce432c0be34cd22464736f6c634300081400332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d0000000000000000000000000000000000000000000000000000000005f5e100
Deployed Bytecode
0x6080604081815260048036101561001557600080fd5b600090813560e01c93846301ffc9a7146109685750836322dd40ef14610102578363248a9ca31461093e5783632f2ff15d1461091657836336568abe146108d1578363519ffff1146108545783637609d7f6146107f457836381a69511146105e55783638c89b64f146105aa5783638edbf4361461057957836391d1485414610533578363a085a793146102ed578363a217fddf146102d2578363b3596f071461027b578363bfc69e1c14610240578363d547741f146101ff57508263e19f4700146101e5578263f667e42814610183578263f99256d51461010757505063fbc12e5c1461010257600080fd5b6109ba565b346101805760208060031936011261017c5780838160c09560018060a01b0395866101306109f8565b168152600283522091610150600287855416976001860154169401610a9c565b9281519687528287015282519081519087015201516060850152015180516080840152015160a0820152f35b5080fd5b80fd5b903461017c57602036600319011261017c578160016101a06109f8565b6101a8610ac8565b818060a01b03169283835281602052822082815501557fecd58386925932344b9d411955c289f1af8401c69c40aa31dfcab72b21759f458280a280f35b903461017c578160031936011261017c5751908152602090f35b823461023c578060031936011261023c57610238913561023360016102226109e2565b938387528660205286200154610b42565b610be6565b5080f35b8280fd5b50903461017c578160031936011261017c57602090517fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c188152f35b903461018057602036600319011261018057506102966109f8565b61029f81610ca3565b929092156102b1576020838551908152f35b83516349e1879f60e11b81526001600160a01b039092169082015260249150fd5b50903461017c578160031936011261017c5751908152602090f35b823461023c578060031936011261023c576103066109f8565b9061030f6109e2565b93610318610ac8565b6001600160a01b038581169390841561051c578351630293577560e41b815260209190828189818a5afa8591816104e9575b50610366578551630f4c971b60e21b8152808901889052602490fd5b939692949193600119016104d2579384169360001992875b6002811061042a575b5060001984146103fd5750907fe15adf635f0230f04a10c533ae4edc6ee52f6aab68fd00497903ec8ffac72e0a93929160018251916103c583610a0e565b88835285830190858252888b52828752848b209351166bffffffffffffffffffffffff60a01b8454161783555191015551908152a380f35b825163152a07eb60e11b81526001600160a01b038a16918101918252602082018590529081906040010390fd5b835163c661065760e01b815282810182905286816024818c5afa9081156104c857889185918c91610489575b50161461048157600019811461046e5760010161037e565b634e487b7160e01b895260118252602489fd5b935089610387565b925050508681813d83116104c1575b6104a28183610a5c565b810103126104bd575183811681036104bd578388918d610456565b8980fd5b503d610498565b85513d8c823e3d90fd5b8151630f4c971b60e21b8152808401879052602490fd5b9091508381813d8311610515575b6105018183610a5c565b810103126105115751908a61034a565b8580fd5b503d6104f7565b8351630f4c971b60e21b8152808701869052602490fd5b82903461023c578160031936011261023c578160209360ff926105546109e2565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b5034610180576020366003190112610180575061059c6105976109f8565b610ca3565b825191825215156020820152f35b50903461017c578160031936011261017c57602090517f0000000000000000000000000000000000000000000000000000000005f5e1008152f35b3461017c5760e036600319011261017c576105fe6109f8565b906106076109e2565b936044356001600160a01b038181169491859003610511576064359260843560a435928060c43595610637610ac8565b1696878a5260209160018352848b20855161065181610a0e565b84600184845416938484520154910152156107dd5780858b9c9d602482518094819363476dfa1b60e11b8352169e8f888301525afa9081156107d3578d916107a4575b501561078d57918960058286948f8f9c7f850d28bf2d8acb532d6827d537f97debaff0eca8e001f53619215543091448e79d8f998060809f9d849f9d958f9d8f839f8b998551996106e48b610a0e565b8a528a8a01528451916106f683610a0e565b82528982015283519761070889610a0e565b88528888015282519b61071a8d610a40565b8c52878c01958652828c0196875281526002875220985116906bffffffffffffffffffffffff60a01b91828a54161789556001890192511690825416179055518181518051600289015501516003870155015190815190850155015191015582519586528501528301526060820152a480f35b84516314de66af60e31b81528083018b9052602490fd5b6107c49150863d88116107cc575b6107bc8183610a5c565b810190610c5b565b90508d610694565b503d6107b2565b86513d8f823e3d90fd5b8451630f10d83760e11b81528083018a9052602490fd5b5034610180576020366003190112610180576001600160a01b0390610850906001908490846108216109f8565b16815282602052209283541692015492519283928360209093929193604081019460018060a01b031681520152565b0390f35b8193503461017c57602036600319011261017c57600590826108746109f8565b61087c610ac8565b60018060a01b031694858252600260205281209181835581600184015581600284015581600384015582015501557fdabc58d0456c50872fa82879bc9ce7f6a455b4372db632857a62de4abd0996918280a280f35b913461017c578060031936011261017c576108ea6109e2565b90336001600160a01b038316036109075750610238919235610be6565b5163334bd91960e11b81528390fd5b823461023c578060031936011261023c57610238913561093960016102226109e2565b610b68565b82903461023c57602036600319011261023c57816020936001923581528085522001549051908152f35b903461023c57602036600319011261023c573563ffffffff60e01b811680910361023c5760209250637965db0b60e01b81149081156109a9575b5015158152f35b6301ffc9a760e01b149050836109a2565b346109dd5760003660031901126109dd576020604051670de0b6b3a76400008152f35b600080fd5b602435906001600160a01b03821682036109dd57565b600435906001600160a01b03821682036109dd57565b6040810190811067ffffffffffffffff821117610a2a57604052565b634e487b7160e01b600052604160045260246000fd5b6060810190811067ffffffffffffffff821117610a2a57604052565b90601f8019910116810190811067ffffffffffffffff821117610a2a57604052565b90604051610a8b81610a0e565b602060018294805484520154910152565b90604051610aa981610a0e565b6020610ac360028395610abb81610a7e565b855201610a7e565b910152565b3360009081527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260409020547fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff1615610b245750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff6040600020541615610b245750565b9060009180835282602052604083209160018060a01b03169182845260205260ff60408420541615600014610be157808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff604084205416600014610be15780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b91908260409103126109dd576020825192015180151581036109dd5790565b81810292918115918404141715610c8d57565b634e487b7160e01b600052601160045260246000fd5b9060018060a01b03809216600081815260019360209285845260408084208151610ccc81610a0e565b888583541692838352015491878201928352156110b9578490511690805115806000146110b15760ff8a5b16906110195750805160001981019190821161100557835191636872765360e01b835260048301528782602481865afa8015610fc55787908190610fcf575b60049350935b855163fd0684b160e01b815293849182905afa918215610fc5578792610f17575b508151905190818111610edb57505050945b670de0b6b3a7640000610da37f0000000000000000000000000000000000000000000000000000000005f5e1008098610c7a565b04928315610e7e5785526002815281852093825190610dc182610a40565b808654168252610ddf6002828c890154169785850198895201610a9c565b9184810192808452518051610ec8575b50518116958615610ebb57908491511695602482518098819363476dfa1b60e11b835260048301525afa948515610eb15786938796610e8a575b5050829415610e7e575101518051610e4a94939290610e6b575b5050610c7a565b908215610e575750049190565b634e487b7160e01b81526012600452602490fd5b610e769293506110d1565b903880610e43565b50505050509250508190565b8091929650610ea6939450903d106107cc576107bc8183610a5c565b919091933880610e29565b83513d88823e3d90fd5b5050505050925050509190565b610ed4908392976110d1565b9590610def565b811015610f035760051b01860151670de0b6b3a764000091610efc91610c7a565b0494610d6f565b634e487b7160e01b87526032600452602487fd5b9091503d8088833e610f298183610a5c565b81018882820312610fc157815167ffffffffffffffff928382116104bd570181601f82011215610fbd578051928311610fa9578260051b90865193610f708c840186610a5c565b84528a808501928201019283116104bd578a809101915b838310610f9957505050509038610d5d565b82518152918101918b9101610f87565b634e487b7160e01b89526041600452602489fd5b8880fd5b8780fd5b84513d89823e3d90fd5b5050908781813d8311610ffe575b610fe78183610a5c565b81010312610ffa57908660049251610d36565b8680fd5b503d610fdd565b634e487b7160e01b87526011600452602487fd5b600019810190811161100557835190636872765360e01b825260048201528781602481865afa908115610fc5578791611084575b5080156110705790866004926ec097ce7bc90715b34b9f10000000000493610d3c565b634e487b7160e01b87526012600452602487fd5b90508781813d83116110aa575b61109b8183610a5c565b81010312610ffa57513861104d565b503d611091565b60ff87610cf7565b8251630f10d83760e11b815260048101859052602490fd5b90805182116110de575090565b6020915001519056fea26469706673582212202efa0856da573f8c76fffd6de82d33e2260cb5b7b4964b14ce432c0be34cd22464736f6c63430008140033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000000000000000000000000000000000005f5e100
-----Decoded View---------------
Arg [0] : _baseCurrencyUnit (uint256): 100000000
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000005f5e100
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in FRAX
0
Multichain Portfolio | 35 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.