Source Code
Overview
HYPE Balance
HYPE Value
$0.00Latest 25 from a total of 41 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Propose Data | 13343458 | 142 days ago | IN | 0 HYPE | 0.00003045 | ||||
| Propose Data | 13343370 | 142 days ago | IN | 0 HYPE | 0.00008515 | ||||
| Propose Data | 13294412 | 143 days ago | IN | 0 HYPE | 0.00003112 | ||||
| Propose Data | 13261326 | 143 days ago | IN | 0 HYPE | 0.00001978 | ||||
| Propose Data | 13026626 | 146 days ago | IN | 0 HYPE | 0.00001766 | ||||
| Propose Data | 13016694 | 146 days ago | IN | 0 HYPE | 0.00001622 | ||||
| Grant Role | 13000115 | 146 days ago | IN | 0 HYPE | 0.00000511 | ||||
| Grant Role | 13000041 | 146 days ago | IN | 0 HYPE | 0.00000313 | ||||
| Grant Role | 12999922 | 146 days ago | IN | 0 HYPE | 0.00000613 | ||||
| Propose Data | 12854476 | 148 days ago | IN | 0 HYPE | 0.00052446 | ||||
| Propose Data | 12851641 | 148 days ago | IN | 0 HYPE | 0.00053397 | ||||
| Propose Data | 12851401 | 148 days ago | IN | 0 HYPE | 0.00031637 | ||||
| Propose Data | 12850947 | 148 days ago | IN | 0 HYPE | 0.00018845 | ||||
| Propose Data | 12752259 | 149 days ago | IN | 0 HYPE | 0.00001223 | ||||
| Grant Role | 11618843 | 162 days ago | IN | 0 HYPE | 0.00001658 | ||||
| Grant Role | 11618843 | 162 days ago | IN | 0 HYPE | 0.00000939 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534297 | 163 days ago | IN | 0 HYPE | 0.00000292 | ||||
| Grant Role | 11534236 | 163 days ago | IN | 0 HYPE | 0.00000296 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Oracle
Compiler Version
v0.8.27+commit.40a35a09
Optimization Enabled:
Yes with 200 runs
Other Settings:
prague EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
import {IOracle} from "src/interfaces/IOracle.sol";
import {IOracleRequester} from "src/interfaces/IOracleRequester.sol";
import {RequestStateTypeLib} from "src/libraries/types/RequestStateTypeLib.sol";
contract Oracle is IOracle, AccessControl, ReentrancyGuard {
using RequestStateTypeLib for RequestState;
using RequestStateTypeLib for uint8;
/*///////////////////////////////////////////////////////////////////
CONSTANTS
//////////////////////////////////////////////////////////////////*/
/// @notice Requester role
bytes32 public constant REQUESTER_ROLE = keccak256("REQUESTER_ROLE");
/// @notice Resolver role
bytes32 public constant RESOLVER_ROLE = keccak256("RESOLVER_ROLE");
/*///////////////////////////////////////////////////////////////////
STATE
//////////////////////////////////////////////////////////////////*/
/// @notice Mapping of requestId to Requests
mapping(bytes32 => RequestData) public requests;
constructor() {
_grantRole(DEFAULT_ADMIN_ROLE, _msgSender());
}
modifier onlyRequester() {
require(hasRole(REQUESTER_ROLE, _msgSender()), NotRequester());
_;
}
modifier onlyResolver() {
require(hasRole(RESOLVER_ROLE, _msgSender()), NotResolver());
_;
}
/*///////////////////////////////////////////////////////////////////
PUBLIC
//////////////////////////////////////////////////////////////////*/
/// @notice Request a new data
/// @param _questionId - Identifier used in the Oracle request
/// @param _timestamp - Timestamp used in the Oracle request
/// @param _ancillaryData - Data used to resolve a Request
function requestData(
bytes32 _questionId,
uint256 _timestamp,
bytes memory _ancillaryData
) external onlyRequester {
bytes32 requestId = keccak256(
abi.encodePacked(_msgSender(), _questionId)
);
requests[requestId] = RequestData({
state: RequestState.Requested,
timestamp: _timestamp,
ancillaryData: _ancillaryData,
callbackOnDataSettled: true,
result: 0
});
emit DataRequested(
_msgSender(),
_questionId,
_timestamp,
_ancillaryData
);
}
/// @notice Proposes a data for an existing data request
/// @param _questionId - Identifier used in the Oracle Request
/// @param _requester - Address of the requester
/// @param _result - The result of the Request
function proposeData(
bytes32 _questionId,
address _requester,
int256 _result
) external nonReentrant onlyResolver {
bytes32 requestId = keccak256(
abi.encodePacked(_requester, _questionId)
);
RequestData storage request = requests[requestId];
require(request.ancillaryData.length > 0, InvalidRequest());
int256 acceptedResult;
if (request.state.toUint8().toRequestStateType().isRequested()) {
request.state = RequestState.Settled;
request.result = _result;
acceptedResult = _result;
emit RequestSettled(
_requester,
_questionId,
_result,
request.ancillaryData
);
} else {
acceptedResult = request.result;
}
if (
address(_requester).code.length > 0 && request.callbackOnDataSettled
) {
IOracleRequester(_requester).dataSettled(
acceptedResult,
request.ancillaryData
);
}
}
/*///////////////////////////////////////////////////////////////////
VIEW FUNCTIONS
//////////////////////////////////////////////////////////////////*/
function getRequest(
address _requester,
bytes32 _questionId
) external view returns (RequestData memory) {
return requests[keccak256(abi.encodePacked(_requester, _questionId))];
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.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` from `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.1.0) (utils/ReentrancyGuard.sol)
pragma solidity ^0.8.20;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If EIP-1153 (transient storage) is available on the chain you're deploying at,
* consider using {ReentrancyGuardTransient} instead.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant NOT_ENTERED = 1;
uint256 private constant ENTERED = 2;
uint256 private _status;
/**
* @dev Unauthorized reentrant call.
*/
error ReentrancyGuardReentrantCall();
constructor() {
_status = NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be NOT_ENTERED
if (_status == ENTERED) {
revert ReentrancyGuardReentrantCall();
}
// Any calls to nonReentrant after this point will fail
_status = ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == ENTERED;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
interface IOracle {
/*///////////////////////////////////////////////////////////////////
ENUMS
//////////////////////////////////////////////////////////////////*/
enum RequestState {
// Set when Request is Created
Requested,
// Set when Request is Settled
Settled
}
/*///////////////////////////////////////////////////////////////////
STRUCT
//////////////////////////////////////////////////////////////////*/
struct RequestData {
// The state of the Request
RequestState state;
// Determines if callback should be executed
bool callbackOnDataSettled;
// The Oracle request timestamp
uint256 timestamp;
// The ancillary data for the Request
bytes ancillaryData;
// The result of the Request
int256 result;
}
/*///////////////////////////////////////////////////////////////////
EVENTS
//////////////////////////////////////////////////////////////////*/
/// @notice Emmited when data is requested
event DataRequested(
address indexed requester,
bytes32 indexed questionId,
uint256 timestamp,
bytes ancillaryData
);
/// @notice Emmited when request is settled
event RequestSettled(
address indexed requester,
bytes32 indexed questionId,
int256 result,
bytes ancillaryData
);
/*///////////////////////////////////////////////////////////////////
ERRORS
//////////////////////////////////////////////////////////////////*/
/// @notice Error when caller is not a requester
error NotRequester();
/// @notice Error when caller is not a resolver
error NotResolver();
/// @notice Error when request is invalid
error InvalidRequest();
/*///////////////////////////////////////////////////////////////////
FUNCTION SIGNATURES
//////////////////////////////////////////////////////////////////*/
/// @notice Request a new data
/// @param _questionId - Identifier used in the Oracle request
/// @param _timestamp - Timestamp used in the Oracle request
/// @param _ancillaryData - Data used to resolve a Request
function requestData(
bytes32 _questionId,
uint256 _timestamp,
bytes memory _ancillaryData
) external;
/// @notice Proposes a data for an existing data request
/// @param _questionId - Identifier used in the Oracle Request
/// @param _requester - Address of the requester
/// @param _result - The result of the Request
function proposeData(
bytes32 _questionId,
address _requester,
int256 _result
) external;
/// @notice Get the request
/// @param _requester - Address of the requester
/// @param _questionId - Identifier used in the Oracle request
function getRequest(
address _requester,
bytes32 _questionId
) external view returns (RequestData memory);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.27;
interface IOracleRequester {
/// @notice Callback to be executed on Oracle settlement
/// If the oracle request matches the Question and the Question is in a valid state,
/// this function settles the Question by retrieving the answer data
/// @param _data - Answer data of the request
/// @param _ancillaryData - Ancillary Data of the request
function dataSettled(int256 _data, bytes memory _ancillaryData) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.27;
import {IOracle} from "src/interfaces/IOracle.sol";
library RequestStateTypeLib {
function toUint8(
IOracle.RequestState status
) internal pure returns (uint8) {
return uint8(status);
}
function toRequestStateType(
uint8 value
) internal pure returns (IOracle.RequestState) {
return IOracle.RequestState(value);
}
function isRequested(
IOracle.RequestState status
) internal pure returns (bool) {
return status == IOracle.RequestState.Requested;
}
function isSettled(
IOracle.RequestState status
) internal pure returns (bool) {
return status == IOracle.RequestState.Settled;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (access/IAccessControl.sol)
pragma solidity ^0.8.20;
/**
* @dev External interface of AccessControl declared to support ERC-165 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 to signal 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. This account bears the admin role (for the granted role).
* Expected in cases where the role was granted using the internal {AccessControl-_grantRole}.
*/
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.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.1.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 ERC-165 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.1.0) (utils/introspection/IERC165.sol)
pragma solidity ^0.8.20;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* 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[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"remappings": [
"@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
"ds-test/=lib/[email protected]/lib/forge-std/lib/ds-test/src/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-std/=lib/forge-std/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"[email protected]/=lib/[email protected]/",
"openzeppelin/=lib/[email protected]/contracts/",
"[email protected]/=lib/[email protected]/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "prague",
"viaIR": true
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"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":"InvalidRequest","type":"error"},{"inputs":[],"name":"NotRequester","type":"error"},{"inputs":[],"name":"NotResolver","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":true,"internalType":"bytes32","name":"questionId","type":"bytes32"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"ancillaryData","type":"bytes"}],"name":"DataRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":true,"internalType":"bytes32","name":"questionId","type":"bytes32"},{"indexed":false,"internalType":"int256","name":"result","type":"int256"},{"indexed":false,"internalType":"bytes","name":"ancillaryData","type":"bytes"}],"name":"RequestSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"REQUESTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESOLVER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_requester","type":"address"},{"internalType":"bytes32","name":"_questionId","type":"bytes32"}],"name":"getRequest","outputs":[{"components":[{"internalType":"enum IOracle.RequestState","name":"state","type":"uint8"},{"internalType":"bool","name":"callbackOnDataSettled","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"internalType":"int256","name":"result","type":"int256"}],"internalType":"struct IOracle.RequestData","name":"","type":"tuple"}],"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":"bytes32","name":"_questionId","type":"bytes32"},{"internalType":"address","name":"_requester","type":"address"},{"internalType":"int256","name":"_result","type":"int256"}],"name":"proposeData","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":"_questionId","type":"bytes32"},{"internalType":"uint256","name":"_timestamp","type":"uint256"},{"internalType":"bytes","name":"_ancillaryData","type":"bytes"}],"name":"requestData","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"requests","outputs":[{"internalType":"enum IOracle.RequestState","name":"state","type":"uint8"},{"internalType":"bool","name":"callbackOnDataSettled","type":"bool"},{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes","name":"ancillaryData","type":"bytes"},{"internalType":"int256","name":"result","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","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
608060405234602357600180556013336027565b50604051610ce290816100b08239f35b5f80fd5b6001600160a01b0381165f9081525f516020610d925f395f51905f52602052604090205460ff1660aa576001600160a01b03165f8181525f516020610d925f395f51905f5260205260408120805460ff191660011790553391907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8180a4600190565b505f9056fe6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a71461092657508063248a9ca3146108f45780632f2ff15d146108b757806336568abe146108735780634430db7e1461083957806378fab260146107ff57806391d14854146107b75780639d8669851461073b578063a217fddf14610721578063be0edaed146105f2578063ca072bd7146102fa578063d547741f146102b65763e4c3fc3b146100ad575f80fd5b34610255576060366003190112610255576004356100c9610979565b604435906002600154146102a7576002600155335f9081527f40da0f42a661166d5434d4603ecbff423639c47e2526ad0538d7c3517a623890602052604090205460ff161561029857604051606082901b6bffffffffffffffffffffffff191660208201908152603482018590529061014f81605481015b03601f1981018352826109e3565b5190205f52600260205260405f20600281019361016c855461098f565b156102895760ff82541660028110156102755761026857815460ff19166001178255600382018490556040516001600160a01b038416907f9d93518a98d583f45ffb9b06cf54b1107e1abaf0924284c3a2511a42bf7b6d4090806101d1898983610ad6565b0390a35b813b15159081610259575b506101ee575b836001805580f35b6001600160a01b031691823b1561025557610221925f92836040518096819582946227018f60e41b845260048401610ad6565b03925af1801561024a57610237575b80806101e6565b61024391505f906109e3565b5f5f610230565b6040513d5f823e3d90fd5b5f80fd5b60ff91505460081c165f6101e0565b50600381015492506101d5565b634e487b7160e01b5f52602160045260245ffd5b6341abc80160e01b5f5260045ffd5b635d154fe160e11b5f5260045ffd5b633ee5aeb560e01b5f5260045ffd5b34610255576040366003190112610255576102f86004356102d5610979565b906102f36102ee825f525f602052600160405f20015490565b610b6c565b610c2c565b005b346102555760603660031901126102555760243560043560443567ffffffffffffffff8111610255573660238201121561025557806004013567ffffffffffffffff81116105cf576040519161035a601f8301601f1916602001846109e3565b818352366024838301011161025557815f926024602093018386013783010152335f9081527f3d345f69ce4cd4ee7817c30d36840ea4a12745339502018b706b68a4dd792961602052604090205460ff16156105e3576040513360601b6bffffffffffffffffffffffff19166020820190815260348201849052906103e28160548101610141565b519020926040516103f2816109c7565b5f815260208101946001865260408201838152606083019685885260808401925f84525f52600260205260405f2093516002811015610275578454915161ffff1990921660ff919091161790151560081b61ff001617835551600183015594518051909590600283019067ffffffffffffffff81116105cf57610475825461098f565b601f811161058a575b506020601f821160011461050257908060039493927f3d6c6d70e54c844886a07337a24835da177f581be93fde86943ae5630ef5b86898999a5f926104f7575b50508160011b915f1990861b1c19161790555b5191015560405190815260406020820152806104f233946040830190610ab2565b0390a3005b015190508a806104be565b601f19821698835f52815f20995f5b818110610572575099600192849260039796957f3d6c6d70e54c844886a07337a24835da177f581be93fde86943ae5630ef5b8689b9c9d1061055b575b505050811b0190556104d1565b01515f1983881b60f8161c191690558a808061054e565b838301518c556001909b019a60209384019301610511565b825f5260205f20601f830160051c810191602084106105c5575b601f0160051c01905b8181106105ba575061047e565b5f81556001016105ad565b90915081906105a4565b634e487b7160e01b5f52604160045260245ffd5b6371ced2cf60e11b5f5260045ffd5b34610255576040366003190112610255576004356001600160a01b0381168103610255575f6080604051610625816109c7565b8281528260208201528260408201526060808201520152604051610673816101416020820194602435908690916034926bffffffffffffffffffffffff199060601b16825260148201520190565b5190205f52600260205260405f2060405161068d816109c7565b815460ff81166002811015610275576106f69361071691845260ff602085019360081c161515835260018101546040850190815260036106cf60028401610a05565b92606087019384520154936080860194855260405196879660208852602088019051610aa5565b51151560408601525160608501525160a0608085015260c0840190610ab2565b905160a08301520390f35b34610255575f3660031901126102555760206040515f8152f35b34610255576020366003190112610255576004355f52600260205260ff60405f208054906107ad600182015491600361077660028301610a05565b91015492604051958561078c8883819916610aa5565b60081c1615156020860152604085015260a0606085015260a0840190610ab2565b9060808301520390f35b34610255576040366003190112610255576107d0610979565b6004355f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b34610255575f3660031901126102555760206040517f92a19c77d2ea87c7f81d50c74403cb2f401780f3ad919571121efe2bdb427eb18152f35b34610255575f3660031901126102555760206040517f61a3517f153a09154844ed8be639dabc6e78dc22315c2d9a91f7eddf9398c0028152f35b346102555760403660031901126102555761088c610979565b336001600160a01b038216036108a8576102f890600435610c2c565b63334bd91960e11b5f5260045ffd5b34610255576040366003190112610255576102f86004356108d6610979565b906108ef6102ee825f525f602052600160405f20015490565b610ba4565b3461025557602036600319011261025557602061091e6004355f525f602052600160405f20015490565b604051908152f35b34610255576020366003190112610255576004359063ffffffff60e01b821680920361025557602091637965db0b60e01b8114908115610968575b5015158152f35b6301ffc9a760e01b14905083610961565b602435906001600160a01b038216820361025557565b90600182811c921680156109bd575b60208310146109a957565b634e487b7160e01b5f52602260045260245ffd5b91607f169161099e565b60a0810190811067ffffffffffffffff8211176105cf57604052565b90601f8019910116810190811067ffffffffffffffff8211176105cf57604052565b9060405191825f825492610a188461098f565b8084529360018116908115610a835750600114610a3f575b50610a3d925003836109e3565b565b90505f9291925260205f20905f915b818310610a67575050906020610a3d928201015f610a30565b6020919350806001915483858901015201910190918492610a4e565b905060209250610a3d94915060ff191682840152151560051b8201015f610a30565b9060028210156102755752565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b91908252604060208301525f91815491610aef8361098f565b928360408401526001811690815f14610b4b5750600114610b11575b50505090565b5f90815260208120929350915b838310610b3457506060925001015f8080610b0b565b805460608484010152602090920191600101610b1e565b9150506060935060ff929192191683830152151560051b01015f8080610b0b565b5f8181526020818152604080832033845290915290205460ff1615610b8e5750565b63e2517d3f60e01b5f523360045260245260445ffd5b5f818152602081815260408083206001600160a01b038616845290915290205460ff16610c26575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b5f818152602081815260408083206001600160a01b038616845290915290205460ff1615610c26575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea2646970667358221220b7d5b595b5a66036c98b4ae521a8a2d2376be482da15e59e090a57a1d72e3e1864736f6c634300081b0033ad3228b676f7d3cd4284a5443f17f1962b36e491b30a40b2405849e597ba5fb5
Deployed Bytecode
0x6080806040526004361015610012575f80fd5b5f905f3560e01c90816301ffc9a71461092657508063248a9ca3146108f45780632f2ff15d146108b757806336568abe146108735780634430db7e1461083957806378fab260146107ff57806391d14854146107b75780639d8669851461073b578063a217fddf14610721578063be0edaed146105f2578063ca072bd7146102fa578063d547741f146102b65763e4c3fc3b146100ad575f80fd5b34610255576060366003190112610255576004356100c9610979565b604435906002600154146102a7576002600155335f9081527f40da0f42a661166d5434d4603ecbff423639c47e2526ad0538d7c3517a623890602052604090205460ff161561029857604051606082901b6bffffffffffffffffffffffff191660208201908152603482018590529061014f81605481015b03601f1981018352826109e3565b5190205f52600260205260405f20600281019361016c855461098f565b156102895760ff82541660028110156102755761026857815460ff19166001178255600382018490556040516001600160a01b038416907f9d93518a98d583f45ffb9b06cf54b1107e1abaf0924284c3a2511a42bf7b6d4090806101d1898983610ad6565b0390a35b813b15159081610259575b506101ee575b836001805580f35b6001600160a01b031691823b1561025557610221925f92836040518096819582946227018f60e41b845260048401610ad6565b03925af1801561024a57610237575b80806101e6565b61024391505f906109e3565b5f5f610230565b6040513d5f823e3d90fd5b5f80fd5b60ff91505460081c165f6101e0565b50600381015492506101d5565b634e487b7160e01b5f52602160045260245ffd5b6341abc80160e01b5f5260045ffd5b635d154fe160e11b5f5260045ffd5b633ee5aeb560e01b5f5260045ffd5b34610255576040366003190112610255576102f86004356102d5610979565b906102f36102ee825f525f602052600160405f20015490565b610b6c565b610c2c565b005b346102555760603660031901126102555760243560043560443567ffffffffffffffff8111610255573660238201121561025557806004013567ffffffffffffffff81116105cf576040519161035a601f8301601f1916602001846109e3565b818352366024838301011161025557815f926024602093018386013783010152335f9081527f3d345f69ce4cd4ee7817c30d36840ea4a12745339502018b706b68a4dd792961602052604090205460ff16156105e3576040513360601b6bffffffffffffffffffffffff19166020820190815260348201849052906103e28160548101610141565b519020926040516103f2816109c7565b5f815260208101946001865260408201838152606083019685885260808401925f84525f52600260205260405f2093516002811015610275578454915161ffff1990921660ff919091161790151560081b61ff001617835551600183015594518051909590600283019067ffffffffffffffff81116105cf57610475825461098f565b601f811161058a575b506020601f821160011461050257908060039493927f3d6c6d70e54c844886a07337a24835da177f581be93fde86943ae5630ef5b86898999a5f926104f7575b50508160011b915f1990861b1c19161790555b5191015560405190815260406020820152806104f233946040830190610ab2565b0390a3005b015190508a806104be565b601f19821698835f52815f20995f5b818110610572575099600192849260039796957f3d6c6d70e54c844886a07337a24835da177f581be93fde86943ae5630ef5b8689b9c9d1061055b575b505050811b0190556104d1565b01515f1983881b60f8161c191690558a808061054e565b838301518c556001909b019a60209384019301610511565b825f5260205f20601f830160051c810191602084106105c5575b601f0160051c01905b8181106105ba575061047e565b5f81556001016105ad565b90915081906105a4565b634e487b7160e01b5f52604160045260245ffd5b6371ced2cf60e11b5f5260045ffd5b34610255576040366003190112610255576004356001600160a01b0381168103610255575f6080604051610625816109c7565b8281528260208201528260408201526060808201520152604051610673816101416020820194602435908690916034926bffffffffffffffffffffffff199060601b16825260148201520190565b5190205f52600260205260405f2060405161068d816109c7565b815460ff81166002811015610275576106f69361071691845260ff602085019360081c161515835260018101546040850190815260036106cf60028401610a05565b92606087019384520154936080860194855260405196879660208852602088019051610aa5565b51151560408601525160608501525160a0608085015260c0840190610ab2565b905160a08301520390f35b34610255575f3660031901126102555760206040515f8152f35b34610255576020366003190112610255576004355f52600260205260ff60405f208054906107ad600182015491600361077660028301610a05565b91015492604051958561078c8883819916610aa5565b60081c1615156020860152604085015260a0606085015260a0840190610ab2565b9060808301520390f35b34610255576040366003190112610255576107d0610979565b6004355f525f60205260405f209060018060a01b03165f52602052602060ff60405f2054166040519015158152f35b34610255575f3660031901126102555760206040517f92a19c77d2ea87c7f81d50c74403cb2f401780f3ad919571121efe2bdb427eb18152f35b34610255575f3660031901126102555760206040517f61a3517f153a09154844ed8be639dabc6e78dc22315c2d9a91f7eddf9398c0028152f35b346102555760403660031901126102555761088c610979565b336001600160a01b038216036108a8576102f890600435610c2c565b63334bd91960e11b5f5260045ffd5b34610255576040366003190112610255576102f86004356108d6610979565b906108ef6102ee825f525f602052600160405f20015490565b610ba4565b3461025557602036600319011261025557602061091e6004355f525f602052600160405f20015490565b604051908152f35b34610255576020366003190112610255576004359063ffffffff60e01b821680920361025557602091637965db0b60e01b8114908115610968575b5015158152f35b6301ffc9a760e01b14905083610961565b602435906001600160a01b038216820361025557565b90600182811c921680156109bd575b60208310146109a957565b634e487b7160e01b5f52602260045260245ffd5b91607f169161099e565b60a0810190811067ffffffffffffffff8211176105cf57604052565b90601f8019910116810190811067ffffffffffffffff8211176105cf57604052565b9060405191825f825492610a188461098f565b8084529360018116908115610a835750600114610a3f575b50610a3d925003836109e3565b565b90505f9291925260205f20905f915b818310610a67575050906020610a3d928201015f610a30565b6020919350806001915483858901015201910190918492610a4e565b905060209250610a3d94915060ff191682840152151560051b8201015f610a30565b9060028210156102755752565b805180835260209291819084018484015e5f828201840152601f01601f1916010190565b91908252604060208301525f91815491610aef8361098f565b928360408401526001811690815f14610b4b5750600114610b11575b50505090565b5f90815260208120929350915b838310610b3457506060925001015f8080610b0b565b805460608484010152602090920191600101610b1e565b9150506060935060ff929192191683830152151560051b01015f8080610b0b565b5f8181526020818152604080832033845290915290205460ff1615610b8e5750565b63e2517d3f60e01b5f523360045260245260445ffd5b5f818152602081815260408083206001600160a01b038616845290915290205460ff16610c26575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19166001179055339291907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4600190565b50505f90565b5f818152602081815260408083206001600160a01b038616845290915290205460ff1615610c26575f818152602081815260408083206001600160a01b0395909516808452949091528120805460ff19169055339291907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9080a460019056fea2646970667358221220b7d5b595b5a66036c98b4ae521a8a2d2376be482da15e59e090a57a1d72e3e1864736f6c634300081b0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in HYPE
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.