Source Code
Latest 22 from a total of 22 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Revoke Role | 20128187 | 257 days ago | IN | 0 FRAX | 0.00000003 | ||||
| Grant Role | 20128184 | 257 days ago | IN | 0 FRAX | 0.00000006 | ||||
| Revoke Role | 20128181 | 257 days ago | IN | 0 FRAX | 0 | ||||
| Grant Role | 20128178 | 257 days ago | IN | 0 FRAX | 0.00000005 | ||||
| Set Threshold Co... | 16791287 | 334 days ago | IN | 0 FRAX | 0.00000007 | ||||
| Set Proxy | 16791284 | 334 days ago | IN | 0 FRAX | 0.00000007 | ||||
| Set Threshold Co... | 16791281 | 334 days ago | IN | 0 FRAX | 0.00000008 | ||||
| Set Proxy | 16791278 | 334 days ago | IN | 0 FRAX | 0.00000008 | ||||
| Set Threshold Co... | 16790739 | 334 days ago | IN | 0 FRAX | 0.00000012 | ||||
| Set Proxy | 16790736 | 334 days ago | IN | 0 FRAX | 0.0000001 | ||||
| Set Threshold Co... | 16790733 | 334 days ago | IN | 0 FRAX | 0.00000008 | ||||
| Set Proxy | 16790730 | 334 days ago | IN | 0 FRAX | 0.0000001 | ||||
| Set Threshold Co... | 15928404 | 354 days ago | IN | 0 FRAX | 0.00000027 | ||||
| Set Proxy | 15928401 | 354 days ago | IN | 0 FRAX | 0.00000025 | ||||
| Set Threshold Co... | 15928397 | 354 days ago | IN | 0 FRAX | 0.00000027 | ||||
| Set Proxy | 15928394 | 354 days ago | IN | 0 FRAX | 0.00000025 | ||||
| Set Threshold Co... | 15928391 | 354 days ago | IN | 0 FRAX | 0.00000027 | ||||
| Set Proxy | 15928388 | 354 days ago | IN | 0 FRAX | 0.00000024 | ||||
| Set Threshold Co... | 15928385 | 354 days ago | IN | 0 FRAX | 0.00000027 | ||||
| Set Proxy | 15928382 | 354 days ago | IN | 0 FRAX | 0.0000002 | ||||
| Set Threshold Co... | 15928379 | 354 days ago | IN | 0 FRAX | 0.0000002 | ||||
| Set Proxy | 15928376 | 354 days ago | IN | 0 FRAX | 0.0000002 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
API3WrapperWithThresholding
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 "./API3Wrapper.sol";
import "./ThresholdingUtils.sol";
import "@openzeppelin/contracts-5/access/Ownable.sol";
contract API3WrapperWithThresholding is API3Wrapper, ThresholdingUtils {
/* State */
mapping(address => ThresholdConfig) public assetThresholds;
/* Events */
event ThresholdConfigSet(
address indexed asset,
uint256 lowerThresholdInBase,
uint256 fixedPriceInBase
);
event ThresholdConfigRemoved(address indexed asset);
constructor(uint256 _baseCurrencyUnit) API3Wrapper(_baseCurrencyUnit) {}
function getPriceInfo(
address asset
) public view override returns (uint256 price, bool isAlive) {
(price, isAlive) = super.getPriceInfo(asset);
if (isAlive) {
ThresholdConfig memory config = assetThresholds[asset];
if (config.lowerThresholdInBase > 0) {
price = _applyThreshold(price, config);
}
}
}
function setThresholdConfig(
address asset,
uint256 lowerThresholdInBase,
uint256 fixedPriceInBase
) external onlyRole(ORACLE_MANAGER_ROLE) {
assetThresholds[asset] = ThresholdConfig({
lowerThresholdInBase: lowerThresholdInBase,
fixedPriceInBase: fixedPriceInBase
});
emit ThresholdConfigSet(asset, lowerThresholdInBase, fixedPriceInBase);
}
function removeThresholdConfig(
address asset
) external onlyRole(ORACLE_MANAGER_ROLE) {
delete assetThresholds[asset];
emit ThresholdConfigRemoved(asset);
}
}// 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) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated 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 {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 &&
timestamp + API3_HEARTBEAT + heartbeatStaleTimeLimit >
block.timestamp;
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;
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;
}
/**
* @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":[],"name":"AccessControlBadConfirmation","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bytes32","name":"neededRole","type":"bytes32"}],"name":"AccessControlUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PriceIsStale","type":"error"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"ProxyNotSet","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"}],"name":"ThresholdConfigRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"lowerThresholdInBase","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"fixedPriceInBase","type":"uint256"}],"name":"ThresholdConfigSet","type":"event"},{"inputs":[],"name":"API3_BASE_CURRENCY_UNIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"API3_HEARTBEAT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":"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":"assetThresholds","outputs":[{"internalType":"uint256","name":"lowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"fixedPriceInBase","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"assetToProxy","outputs":[{"internalType":"contract IProxy","name":"","type":"address"}],"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":[],"name":"heartbeatStaleTimeLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"}],"name":"removeThresholdConfig","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":"uint256","name":"_newHeartbeatStaleTimeLimit","type":"uint256"}],"name":"setHeartbeatStaleTimeLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"address","name":"proxy","type":"address"}],"name":"setProxy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"asset","type":"address"},{"internalType":"uint256","name":"lowerThresholdInBase","type":"uint256"},{"internalType":"uint256","name":"fixedPriceInBase","type":"uint256"}],"name":"setThresholdConfig","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
60a03461007b57601f610c1038819003918201601f19168301916001600160401b038311848410176100805780849260209460405283398101031261007b575161070860015560805261005133610096565b5061005b33610114565b50604051610a3b90816101b5823960805181818161041c01526108550152f35b600080fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b031660008181527fad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5602052604081205490919060ff1661011057818052816020526040822081835260205260408220600160ff198254161790553391600080516020610bf08339815191528180a4600190565b5090565b6001600160a01b031660008181527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260408120549091907fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff166101af57808352826020526040832082845260205260408320600160ff19825416179055600080516020610bf0833981519152339380a4600190565b50509056fe608060408181526004918236101561001657600080fd5b600092833560e01c91826301ffc9a71461059757508163042818f914610533578163248a9ca314610509578163276d9959146104ce5781632ecac6fc146104af5781632f2ff15d1461048557816336568abe1461043f5781638c89b64f146104045781638edbf436146103d75781638f7af4211461034b57816391d1485414610305578163a217fddf146102ea578163a794d152146102a8578163a9d4630c14610250578163b3596f0714610208578163bfc69e1c146101cd578163c5efe27c146101ab578163d547741f1461016857508063e19f47001461014e578063fbff771c1461012c5763ffceb4151461010c57600080fd5b3461012857816003193601126101285760209051620151808152f35b5080fd5b503461012857816003193601126101285760209051670de0b6b3a76400008152f35b503461012857816003193601126101285751908152602090f35b919050346101a757806003193601126101a7576101a3913561019e600161018d610605565b938387528660205286200154610695565b610739565b5080f35b8280fd5b839034610128576020366003190112610128576101c661061b565b3560015580f35b505034610128578160031936011261012857602090517fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c188152f35b82843461024d57602036600319011261024d575061022c6102276105ea565b6107e0565b9190911561023e576020925051908152f35b516342bc305b60e11b81529050fd5b80fd5b50503461012857806003193601126101285761026a6105ea565b610272610605565b9161027b61061b565b6001600160a01b0391821684526002602052832080546001600160a01b0319169290911691909117905580f35b505034610128576020366003190112610128579081906001600160a01b036102ce6105ea565b1681526003602052206001815491015482519182526020820152f35b50503461012857816003193601126101285751908152602090f35b9050346101a757816003193601126101a7578160209360ff92610326610605565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b505034610128576060366003190112610128577fc7f1785f536ea381a57caaf882172a5df51535dc45cf06657813919e3cf535e36103876105ea565b9160243560443561039661061b565b82516103a1816107ae565b82815260016020820196838852818060a01b0316968789526003602052858920925183555191015582519182526020820152a280f35b82843461024d57602036600319011261024d57506103f66102276105ea565b825191825215156020820152f35b505034610128578160031936011261012857602090517f00000000000000000000000000000000000000000000000000000000000000008152f35b838334610128578060031936011261012857610459610605565b90336001600160a01b0383160361047657506101a3919235610739565b5163334bd91960e11b81528390fd5b919050346101a757806003193601126101a7576101a391356104aa600161018d610605565b6106bb565b5050346101285781600319360112610128576020906001549051908152f35b505034610128576020366003190112610128576020916001600160a01b03908290826104f86105ea565b168152600285522054169051908152f35b9050346101a75760203660031901126101a757816020936001923581528085522001549051908152f35b505034610128576020366003190112610128578160016105516105ea565b61055961061b565b818060a01b0316928383526003602052822082815501557fe33ca422cb32fc509d95272b11d42c89c665a8968c21a483226b773e18c072f18280a280f35b8491346101a75760203660031901126101a7573563ffffffff60e01b81168091036101a75760209250637965db0b60e01b81149081156105d9575b5015158152f35b6301ffc9a760e01b149050836105d2565b600435906001600160a01b038216820361060057565b600080fd5b602435906001600160a01b038216820361060057565b3360009081527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260409020547fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff16156106775750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff60406000205416156106775750565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054161560001461073457808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054166000146107345780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b6040810190811067ffffffffffffffff8211176107ca57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0390811660008181526002602052604080822054909316939092909184156109d957816004958151968780926315f789a960e21b82525afa9485156109cf5784908596610950575b508481601b0b13600014610949576001600160e01b03165b8015801596876108f4575b507f00000000000000000000000000000000000000000000000000000000000000008083029283041417156108e057670de0b6b3a76400009004908594829661089c575b50505050565b839181526003602052209151916108b2836107ae565b6001815491828552015460208401526108cd575b8080610896565b6108d89294506109ef565b9138806108c6565b634e487b7160e01b85526011600452602485fd5b63ffffffff9197501662015180808201918281116109355760015401018091116109215742109538610852565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b88526011600452602488fd5b5083610847565b955050813d83116109c8575b601f8101601f1916860167ffffffffffffffff8111878210176109b457839187918352810103126109b05784519485601b0b86036109ac57602001519463ffffffff861686036109ac573861082f565b8480fd5b8380fd5b634e487b7160e01b86526041600452602486fd5b503d61095c565b82513d86823e3d90fd5b60249151906326a5df8d60e01b82526004820152fd5b90805182116109fc575090565b6020915001519056fea2646970667358221220d02908414c0a9f932ebbf01c97304284903e0a64c0f900bd6b6d2b849c09918164736f6c634300081400332f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d0000000000000000000000000000000000000000000000000000000005f5e100
Deployed Bytecode
0x608060408181526004918236101561001657600080fd5b600092833560e01c91826301ffc9a71461059757508163042818f914610533578163248a9ca314610509578163276d9959146104ce5781632ecac6fc146104af5781632f2ff15d1461048557816336568abe1461043f5781638c89b64f146104045781638edbf436146103d75781638f7af4211461034b57816391d1485414610305578163a217fddf146102ea578163a794d152146102a8578163a9d4630c14610250578163b3596f0714610208578163bfc69e1c146101cd578163c5efe27c146101ab578163d547741f1461016857508063e19f47001461014e578063fbff771c1461012c5763ffceb4151461010c57600080fd5b3461012857816003193601126101285760209051620151808152f35b5080fd5b503461012857816003193601126101285760209051670de0b6b3a76400008152f35b503461012857816003193601126101285751908152602090f35b919050346101a757806003193601126101a7576101a3913561019e600161018d610605565b938387528660205286200154610695565b610739565b5080f35b8280fd5b839034610128576020366003190112610128576101c661061b565b3560015580f35b505034610128578160031936011261012857602090517fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c188152f35b82843461024d57602036600319011261024d575061022c6102276105ea565b6107e0565b9190911561023e576020925051908152f35b516342bc305b60e11b81529050fd5b80fd5b50503461012857806003193601126101285761026a6105ea565b610272610605565b9161027b61061b565b6001600160a01b0391821684526002602052832080546001600160a01b0319169290911691909117905580f35b505034610128576020366003190112610128579081906001600160a01b036102ce6105ea565b1681526003602052206001815491015482519182526020820152f35b50503461012857816003193601126101285751908152602090f35b9050346101a757816003193601126101a7578160209360ff92610326610605565b903582528186528282206001600160a01b039091168252855220549151911615158152f35b505034610128576060366003190112610128577fc7f1785f536ea381a57caaf882172a5df51535dc45cf06657813919e3cf535e36103876105ea565b9160243560443561039661061b565b82516103a1816107ae565b82815260016020820196838852818060a01b0316968789526003602052858920925183555191015582519182526020820152a280f35b82843461024d57602036600319011261024d57506103f66102276105ea565b825191825215156020820152f35b505034610128578160031936011261012857602090517f0000000000000000000000000000000000000000000000000000000005f5e1008152f35b838334610128578060031936011261012857610459610605565b90336001600160a01b0383160361047657506101a3919235610739565b5163334bd91960e11b81528390fd5b919050346101a757806003193601126101a7576101a391356104aa600161018d610605565b6106bb565b5050346101285781600319360112610128576020906001549051908152f35b505034610128576020366003190112610128576020916001600160a01b03908290826104f86105ea565b168152600285522054169051908152f35b9050346101a75760203660031901126101a757816020936001923581528085522001549051908152f35b505034610128576020366003190112610128578160016105516105ea565b61055961061b565b818060a01b0316928383526003602052822082815501557fe33ca422cb32fc509d95272b11d42c89c665a8968c21a483226b773e18c072f18280a280f35b8491346101a75760203660031901126101a7573563ffffffff60e01b81168091036101a75760209250637965db0b60e01b81149081156105d9575b5015158152f35b6301ffc9a760e01b149050836105d2565b600435906001600160a01b038216820361060057565b600080fd5b602435906001600160a01b038216820361060057565b3360009081527ffb8036e0bab3828a1a1cce97396031bc7ea8a361699e1bc9c4844f3aeee78d6e60205260409020547fced6982f480260bdd8ad5cb18ff2854f0306d78d904ad6cc107e8f3a0f526c189060ff16156106775750565b6044906040519063e2517d3f60e01b82523360048301526024820152fd5b80600052600060205260406000203360005260205260ff60406000205416156106775750565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054161560001461073457808352826020526040832082845260205260408320600160ff198254161790557f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339380a4600190565b505090565b9060009180835282602052604083209160018060a01b03169182845260205260ff6040842054166000146107345780835282602052604083208284526020526040832060ff1981541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4600190565b6040810190811067ffffffffffffffff8211176107ca57604052565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0390811660008181526002602052604080822054909316939092909184156109d957816004958151968780926315f789a960e21b82525afa9485156109cf5784908596610950575b508481601b0b13600014610949576001600160e01b03165b8015801596876108f4575b507f0000000000000000000000000000000000000000000000000000000005f5e1008083029283041417156108e057670de0b6b3a76400009004908594829661089c575b50505050565b839181526003602052209151916108b2836107ae565b6001815491828552015460208401526108cd575b8080610896565b6108d89294506109ef565b9138806108c6565b634e487b7160e01b85526011600452602485fd5b63ffffffff9197501662015180808201918281116109355760015401018091116109215742109538610852565b634e487b7160e01b86526011600452602486fd5b634e487b7160e01b88526011600452602488fd5b5083610847565b955050813d83116109c8575b601f8101601f1916860167ffffffffffffffff8111878210176109b457839187918352810103126109b05784519485601b0b86036109ac57602001519463ffffffff861686036109ac573861082f565b8480fd5b8380fd5b634e487b7160e01b86526041600452602486fd5b503d61095c565b82513d86823e3d90fd5b60249151906326a5df8d60e01b82526004820152fd5b90805182116109fc575090565b6020915001519056fea2646970667358221220d02908414c0a9f932ebbf01c97304284903e0a64c0f900bd6b6d2b849c09918164736f6c63430008140033
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.