Source Code
Overview
ETH Balance
0 ETH
Token Holdings
More Info
ContractCreator
Multichain Info
N/A
Loading...
Loading
Contract Name:
DataStreamsVerifier
Compiler Version
v0.8.19+commit.7dd6d404
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {Common} from "@chainlink/contracts/src/v0.8/llo-feeds/libraries/Common.sol"; import {IRewardManager} from "@chainlink/contracts/src/v0.8/llo-feeds/interfaces/IRewardManager.sol"; import {IVerifierFeeManager} from "@chainlink/contracts/src/v0.8/llo-feeds/interfaces/IVerifierFeeManager.sol"; import {IERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/IERC20.sol"; import {SafeERC20} from "@chainlink/contracts-ccip/src/v0.8/vendor/openzeppelin-solidity/v4.8.3/contracts/token/ERC20/utils/SafeERC20.sol"; // import {AccessControl} from "@openzeppelin/contracts/access/AccessControl.sol"; using SafeERC20 for IERC20; /** * THIS IS AN EXAMPLE CONTRACT THAT USES UN-AUDITED CODE FOR DEMONSTRATION PURPOSES. * DO NOT USE THIS CODE IN PRODUCTION. */ // Custom interfaces for IVerifierProxy and IFeeManager interface IVerifierProxy { /** * @notice Verifies that the data encoded has been signed. * correctly by routing to the correct verifier, and bills the user if applicable. * @param payload The encoded data to be verified, including the signed * report. * @param parameterPayload Fee metadata for billing. In the current implementation, * this consists of the abi-encoded address of the ERC-20 token used for fees. * @return verifierResponse The encoded report from the verifier. */ function verify( bytes calldata payload, bytes calldata parameterPayload ) external payable returns (bytes memory verifierResponse); /** * @notice Verifies multiple reports in bulk, ensuring that each is signed correctly, * routes them to the appropriate verifier, and handles billing for the verification process. * @param payloads An array of encoded data to be verified, where each entry includes * the signed report. * @param parameterPayload Fee metadata for billing. In the current implementation, * this consists of the abi-encoded address of the ERC-20 token used for fees. * @return verifiedReports An array of encoded reports returned from the verifier. */ function verifyBulk( bytes[] calldata payloads, bytes calldata parameterPayload ) external payable returns (bytes[] memory verifiedReports); function s_feeManager() external view returns (IVerifierFeeManager); } interface IFeeManager { /** * @notice Calculates the fee and reward associated with verifying a report, including discounts for subscribers. * This function assesses the fee and reward for report verification, applying a discount for recognized subscriber addresses. * @param subscriber The address attempting to verify the report. A discount is applied if this address * is recognized as a subscriber. * @param unverifiedReport The report data awaiting verification. The content of this report is used to * determine the base fee and reward, before considering subscriber discounts. * @param quoteAddress The payment token address used for quoting fees and rewards. * @return fee The fee assessed for verifying the report, with subscriber discounts applied where applicable. * @return reward The reward allocated to the caller for successfully verifying the report. * @return totalDiscount The total discount amount deducted from the fee for subscribers. */ function getFeeAndReward( address subscriber, bytes memory unverifiedReport, address quoteAddress ) external returns (Common.Asset memory, Common.Asset memory, uint256); function i_linkAddress() external view returns (address); function i_nativeAddress() external view returns (address); function i_rewardManager() external view returns (address); } /** * @dev This contract implements functionality to verify Data Streams reports from * the Streams Direct API or WebSocket connection, with payment in LINK tokens. */ contract DataStreamsVerifier { error NothingToWithdraw(); // Thrown when a withdrawal attempt is made but the contract holds no tokens of the specified type. error NotOwner(address caller); // Thrown when a caller tries to execute a function that is restricted to the contract's owner. struct BasicReport { bytes32 feedId; // The feed ID the report has data for uint32 validFromTimestamp; // Earliest timestamp for which price is applicable uint32 observationsTimestamp; // Latest timestamp for which price is applicable uint192 nativeFee; // Base cost to validate a transaction using the report, denominated in the chain’s native token (WETH/ETH) uint192 linkFee; // Base cost to validate a transaction using the report, denominated in LINK uint32 expiresAt; // Latest timestamp where the report can be verified onchain int192 price; // DON consensus median price, carried to 8 decimal places } struct PremiumReport { bytes32 feedId; // The feed ID the report has data for uint32 validFromTimestamp; // Earliest timestamp for which price is applicable uint32 observationsTimestamp; // Latest timestamp for which price is applicable uint192 nativeFee; // Base cost to validate a transaction using the report, denominated in the chain’s native token (WETH/ETH) uint192 linkFee; // Base cost to validate a transaction using the report, denominated in LINK uint32 expiresAt; // Latest timestamp where the report can be verified onchain int192 price; // DON consensus median price, carried to 8 decimal places int192 bid; // Simulated price impact of a buy order up to the X% depth of liquidity utilisation int192 ask; // Simulated price impact of a sell order up to the X% depth of liquidity utilisation } mapping(uint8 => bytes32) public assetId; address private s_owner; IVerifierProxy public s_verifier; int192 public last_decoded_price; uint32 public last_validFromTimestamp; // bytes32 public constant DISTRIBUTOR_ROLE = keccak256("DISTRIBUTOR_ROLE"); event DecodedData(int192, bytes32); /** * You can find these addresses on https://docs.chain.link/data-streams/stream-ids */ constructor(address verifier) { s_owner = msg.sender; s_verifier = IVerifierProxy(verifier); } /// @notice Checks if the caller is the owner of the contract. modifier onlyOwner() { if (msg.sender != s_owner) revert NotOwner(msg.sender); _; } function verifyReportWithTimestamp( bytes memory unverifiedReport, uint8 feedNumber ) external returns (int192, uint32) { // Report verification fees IFeeManager feeManager = IFeeManager( address(s_verifier.s_feeManager()) ); IRewardManager rewardManager = IRewardManager( address(feeManager.i_rewardManager()) ); (, /* bytes32[3] reportContextData */ bytes memory reportData) = abi .decode(unverifiedReport, (bytes32[3], bytes)); address feeTokenAddress = feeManager.i_linkAddress(); (Common.Asset memory fee, , ) = feeManager.getFeeAndReward( address(this), reportData, feeTokenAddress ); // Approve rewardManager to spend this contract's balance in fees IERC20(feeTokenAddress).approve(address(rewardManager), fee.amount); // Verify the report bytes memory verifiedReportData = s_verifier.verify( unverifiedReport, abi.encode(feeTokenAddress) ); // Decode verified report data into BasicReport struct // If your report is a PremiumReport, you should decode it as a PremiumReport BasicReport memory verifiedReport = abi.decode( verifiedReportData, (BasicReport) ); require( verifiedReport.feedId == assetId[feedNumber], "Wrong feed number" ); // Log price from report emit DecodedData(verifiedReport.price, verifiedReport.feedId); // require(feedNumber == verifiedReport.feedNumber, "Wrong feed id"); last_decoded_price = verifiedReport.price; last_validFromTimestamp = verifiedReport.validFromTimestamp; return (verifiedReport.price, verifiedReport.validFromTimestamp); } function verifyReport( bytes memory unverifiedReport, uint8 feedNumber ) external returns (int192) { // Report verification fees IFeeManager feeManager = IFeeManager( address(s_verifier.s_feeManager()) ); IRewardManager rewardManager = IRewardManager( address(feeManager.i_rewardManager()) ); (, /* bytes32[3] reportContextData */ bytes memory reportData) = abi .decode(unverifiedReport, (bytes32[3], bytes)); address feeTokenAddress = feeManager.i_linkAddress(); (Common.Asset memory fee, , ) = feeManager.getFeeAndReward( address(this), reportData, feeTokenAddress ); // Approve rewardManager to spend this contract's balance in fees IERC20(feeTokenAddress).approve(address(rewardManager), fee.amount); // Verify the report bytes memory verifiedReportData = s_verifier.verify( unverifiedReport, abi.encode(feeTokenAddress) ); // Decode verified report data into BasicReport struct // If your report is a PremiumReport, you should decode it as a PremiumReport BasicReport memory verifiedReport = abi.decode( verifiedReportData, (BasicReport) ); require( verifiedReport.feedId == assetId[feedNumber], "Wrong feed number" ); // Log price from report emit DecodedData(verifiedReport.price, verifiedReport.feedId); // require(feedNumber == verifiedReport.feedNumber, "Wrong feed id"); last_decoded_price = verifiedReport.price; return verifiedReport.price; } function setfeedNumber( uint8 feedNumber, bytes32 _assetId ) public onlyOwner { assetId[feedNumber] = _assetId; } function setfeedNumberBatch(bytes32[] memory _assetIds) public onlyOwner { for (uint8 i; i < _assetIds.length; i++) { assetId[i] = _assetIds[i]; } } /** * @notice Withdraws all tokens of a specific ERC20 token type to a beneficiary address. * @dev Utilizes SafeERC20's safeTransfer for secure token transfer. Reverts if the contract's balance of the specified token is zero. * @param _beneficiary Address to which the tokens will be sent. Must not be the zero address. * @param _token Address of the ERC20 token to be withdrawn. Must be a valid ERC20 token contract. */ function withdrawToken( address _beneficiary, address _token // LINK token address on Arbitrum Sepolia: 0x779877A7B0D9E8603169DdbD7836e478b4624789 ) public onlyOwner { // Retrieve the balance of this contract uint256 amount = IERC20(_token).balanceOf(address(this)); // Revert if there is nothing to withdraw if (amount == 0) revert NothingToWithdraw(); IERC20(_token).safeTransfer(_beneficiary, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 amount) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../extensions/draft-IERC20Permit.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } function safePermit( IERC20Permit token, address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) internal { uint256 nonceBefore = token.nonces(owner); token.permit(owner, spender, value, deadline, v, r, s); uint256 nonceAfter = token.nonces(owner); require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed"); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; import {Common} from "../libraries/Common.sol"; interface IRewardManager is IERC165 { /** * @notice Record the fee received for a particular pool * @param payments array of structs containing pool id and amount * @param payee the user the funds should be retrieved from */ function onFeePaid(FeePayment[] calldata payments, address payee) external; /** * @notice Claims the rewards in a specific pool * @param poolIds array of poolIds to claim rewards for */ function claimRewards(bytes32[] calldata poolIds) external; /** * @notice Set the RewardRecipients and weights for a specific pool. This should only be called once per pool Id. Else updateRewardRecipients should be used. * @param poolId poolId to set RewardRecipients and weights for * @param rewardRecipientAndWeights array of each RewardRecipient and associated weight */ function setRewardRecipients(bytes32 poolId, Common.AddressAndWeight[] calldata rewardRecipientAndWeights) external; /** * @notice Updates a subset the reward recipients for a specific poolId. The collective weight of the recipients should add up to the recipients existing weights. Any recipients with a weight of 0 will be removed. * @param poolId the poolId to update * @param newRewardRecipients array of new reward recipients */ function updateRewardRecipients(bytes32 poolId, Common.AddressAndWeight[] calldata newRewardRecipients) external; /** * @notice Pays all the recipients for each of the pool ids * @param poolId the pool id to pay recipients for * @param recipients array of recipients to pay within the pool */ function payRecipients(bytes32 poolId, address[] calldata recipients) external; /** * @notice Sets the fee manager. This needs to be done post construction to prevent a circular dependency. * @param newFeeManager address of the new verifier proxy */ function setFeeManager(address newFeeManager) external; /** * @notice Gets a list of pool ids which have reward for a specific recipient. * @param recipient address of the recipient to get pool ids for * @param startIndex the index to start from * @param endIndex the index to stop at */ function getAvailableRewardPoolIds( address recipient, uint256 startIndex, uint256 endIndex ) external view returns (bytes32[] memory); /** * @notice The structure to hold a fee payment notice * @param poolId the poolId receiving the payment * @param amount the amount being paid */ struct FeePayment { bytes32 poolId; uint192 amount; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; import {IERC165} from "../../vendor/openzeppelin-solidity/v4.8.3/contracts/interfaces/IERC165.sol"; import {Common} from "../libraries/Common.sol"; interface IVerifierFeeManager is IERC165 { /** * @notice Handles fees for a report from the subscriber and manages rewards * @param payload report to process the fee for * @param parameterPayload fee payload * @param subscriber address of the fee will be applied */ function processFee(bytes calldata payload, bytes calldata parameterPayload, address subscriber) external payable; /** * @notice Processes the fees for each report in the payload, billing the subscriber and paying the reward manager * @param payloads reports to process * @param parameterPayload fee payload * @param subscriber address of the user to process fee for */ function processFeeBulk( bytes[] calldata payloads, bytes calldata parameterPayload, address subscriber ) external payable; /** * @notice Sets the fee recipients according to the fee manager * @param configDigest digest of the configuration * @param rewardRecipientAndWeights the address and weights of all the recipients to receive rewards */ function setFeeRecipients( bytes32 configDigest, Common.AddressAndWeight[] calldata rewardRecipientAndWeights ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.19; /* * @title Common * @author Michael Fletcher * @notice Common functions and structs */ library Common { // @notice The asset struct to hold the address of an asset and amount struct Asset { address assetAddress; uint256 amount; } // @notice Struct to hold the address and its associated weight struct AddressAndWeight { address addr; uint64 weight; } /** * @notice Checks if an array of AddressAndWeight has duplicate addresses * @param recipients The array of AddressAndWeight to check * @return bool True if there are duplicates, false otherwise */ function _hasDuplicateAddresses(Common.AddressAndWeight[] memory recipients) internal pure returns (bool) { for (uint256 i = 0; i < recipients.length; ) { for (uint256 j = i + 1; j < recipients.length; ) { if (recipients[i].addr == recipients[j].addr) { return true; } unchecked { ++j; } } unchecked { ++i; } } return false; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract ABI
API[{"inputs":[{"internalType":"address","name":"verifier","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"caller","type":"address"}],"name":"NotOwner","type":"error"},{"inputs":[],"name":"NothingToWithdraw","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"int192","name":"","type":"int192"},{"indexed":false,"internalType":"bytes32","name":"","type":"bytes32"}],"name":"DecodedData","type":"event"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"assetId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"last_decoded_price","outputs":[{"internalType":"int192","name":"","type":"int192"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"last_validFromTimestamp","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_verifier","outputs":[{"internalType":"contract IVerifierProxy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"feedNumber","type":"uint8"},{"internalType":"bytes32","name":"_assetId","type":"bytes32"}],"name":"setfeedNumber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"_assetIds","type":"bytes32[]"}],"name":"setfeedNumberBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"unverifiedReport","type":"bytes"},{"internalType":"uint8","name":"feedNumber","type":"uint8"}],"name":"verifyReport","outputs":[{"internalType":"int192","name":"","type":"int192"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes","name":"unverifiedReport","type":"bytes"},{"internalType":"uint8","name":"feedNumber","type":"uint8"}],"name":"verifyReportWithTimestamp","outputs":[{"internalType":"int192","name":"","type":"int192"},{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_beneficiary","type":"address"},{"internalType":"address","name":"_token","type":"address"}],"name":"withdrawToken","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161150938038061150983398101604081905261002f91610062565b60018054336001600160a01b031991821617909155600280549091166001600160a01b0392909216919091179055610092565b60006020828403121561007457600080fd5b81516001600160a01b038116811461008b57600080fd5b9392505050565b611468806100a16000396000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063c85abb2611610066578063c85abb2614610119578063d369dc6114610126578063da6771a714610158578063da7308361461016b578063e78ac61d1461019657600080fd5b80633aeac4e11461009857806342f18635146100ad578063ae82b5c9146100d8578063b25db11114610106575b600080fd5b6100ab6100a6366004610dd8565b6101c2565b005b6100c06100bb366004610ebf565b61029b565b60405160179190910b81526020015b60405180910390f35b6100f86100e6366004610f50565b60006020819052908152604090205481565b6040519081526020016100cf565b6100ab610114366004610f72565b61066b565b6003546100c09060170b81565b610139610134366004610ebf565b6106ae565b6040805160179390930b835263ffffffff9091166020830152016100cf565b6100ab610166366004610f9c565b610a9d565b60025461017e906001600160a01b031681565b6040516001600160a01b0390911681526020016100cf565b6003546101ad90600160c01b900463ffffffff1681565b60405163ffffffff90911681526020016100cf565b6001546001600160a01b031633146101f45760405163245aecd360e01b81523360048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561023b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025f9190611042565b90508060000361028257604051630686827b60e51b815260040160405180910390fd5b6102966001600160a01b0383168483610b23565b505050565b600080600260009054906101000a90046001600160a01b03166001600160a01b03166338416b5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610315919061105b565b90506000816001600160a01b0316633aa5ac076040518163ffffffff1660e01b8152600401602060405180830381865afa158015610357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037b919061105b565b905060008580602001905181019061039391906110e1565b9150506000836001600160a01b031663ea4b861b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa919061105b565b90506000846001600160a01b031663e03dab1a3085856040518463ffffffff1660e01b815260040161042e939291906111af565b60a0604051808303816000875af115801561044d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610471919061123f565b5050602081015160405163095ea7b360e01b81526001600160a01b038781166004830152602482019290925291925083169063095ea7b3906044016020604051808303816000875af11580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef919061127d565b50600254604080516001600160a01b038581166020830152600093169163f7e83aee918c91016040516020818303038152906040526040518363ffffffff1660e01b815260040161054192919061129f565b6000604051808303816000875af1158015610560573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261058891908101906112cd565b90506000818060200190518101906105a0919061132d565b60ff8a166000908152602081905260409020548151919250146105f95760405162461bcd60e51b81526020600482015260116024820152702bb937b733903332b2b210373ab6b132b960791b60448201526064016101eb565b60c081015181516040805160179390930b835260208301919091527f89a535fe8a1d9dab951a5dfa4f87c5af25521085a0ffe268fa9a88c6cf97d8bf910160405180910390a160c00151600380546001600160c01b0319166001600160c01b0383161790559998505050505050505050565b6001546001600160a01b031633146106985760405163245aecd360e01b81523360048201526024016101eb565b60ff909116600090815260208190526040902055565b6000806000600260009054906101000a90046001600160a01b03166001600160a01b03166338416b5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a919061105b565b90506000816001600160a01b0316633aa5ac076040518163ffffffff1660e01b8152600401602060405180830381865afa15801561076c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610790919061105b565b90506000868060200190518101906107a891906110e1565b9150506000836001600160a01b031663ea4b861b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080f919061105b565b90506000846001600160a01b031663e03dab1a3085856040518463ffffffff1660e01b8152600401610843939291906111af565b60a0604051808303816000875af1158015610862573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610886919061123f565b5050602081015160405163095ea7b360e01b81526001600160a01b038781166004830152602482019290925291925083169063095ea7b3906044016020604051808303816000875af11580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610904919061127d565b50600254604080516001600160a01b038581166020830152600093169163f7e83aee918d91016040516020818303038152906040526040518363ffffffff1660e01b815260040161095692919061129f565b6000604051808303816000875af1158015610975573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261099d91908101906112cd565b90506000818060200190518101906109b5919061132d565b60ff8b16600090815260208190526040902054815191925014610a0e5760405162461bcd60e51b81526020600482015260116024820152702bb937b733903332b2b210373ab6b132b960791b60448201526064016101eb565b60c081015181516040805160179390930b835260208301919091527f89a535fe8a1d9dab951a5dfa4f87c5af25521085a0ffe268fa9a88c6cf97d8bf910160405180910390a160c0810151600380546020909301516001600160c01b0383166001600160e01b031990941693909317600160c01b63ffffffff8516021790559b909a5098505050505050505050565b6001546001600160a01b03163314610aca5760405163245aecd360e01b81523360048201526024016101eb565b60005b81518160ff161015610b1f57818160ff1681518110610aee57610aee6113c0565b60209081029190910181015160ff831660009081529182905260409091205580610b17816113d6565b915050610acd565b5050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261029692869291600091610bb3918516908490610c30565b8051909150156102965780806020019051810190610bd1919061127d565b6102965760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101eb565b6060610c3f8484600085610c47565b949350505050565b606082471015610ca85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101eb565b600080866001600160a01b03168587604051610cc49190611403565b60006040518083038185875af1925050503d8060008114610d01576040519150601f19603f3d011682016040523d82523d6000602084013e610d06565b606091505b5091509150610d1787838387610d22565b979650505050505050565b60608315610d91578251600003610d8a576001600160a01b0385163b610d8a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101eb565b5081610c3f565b610c3f8383815115610da65781518083602001fd5b8060405162461bcd60e51b81526004016101eb919061141f565b6001600160a01b0381168114610dd557600080fd5b50565b60008060408385031215610deb57600080fd5b8235610df681610dc0565b91506020830135610e0681610dc0565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610e4a57610e4a610e11565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e7957610e79610e11565b604052919050565b600067ffffffffffffffff821115610e9b57610e9b610e11565b50601f01601f191660200190565b803560ff81168114610eba57600080fd5b919050565b60008060408385031215610ed257600080fd5b823567ffffffffffffffff811115610ee957600080fd5b8301601f81018513610efa57600080fd5b8035610f0d610f0882610e81565b610e50565b818152866020838501011115610f2257600080fd5b81602084016020830137600060208383010152809450505050610f4760208401610ea9565b90509250929050565b600060208284031215610f6257600080fd5b610f6b82610ea9565b9392505050565b60008060408385031215610f8557600080fd5b610f8e83610ea9565b946020939093013593505050565b60006020808385031215610faf57600080fd5b823567ffffffffffffffff80821115610fc757600080fd5b818501915085601f830112610fdb57600080fd5b813581811115610fed57610fed610e11565b8060051b9150610ffe848301610e50565b818152918301840191848101908884111561101857600080fd5b938501935b838510156110365784358252938501939085019061101d565b98975050505050505050565b60006020828403121561105457600080fd5b5051919050565b60006020828403121561106d57600080fd5b8151610f6b81610dc0565b60005b8381101561109357818101518382015260200161107b565b50506000910152565b600082601f8301126110ad57600080fd5b81516110bb610f0882610e81565b8181528460208386010111156110d057600080fd5b610c3f826020830160208701611078565b600080608083850312156110f457600080fd5b83601f84011261110357600080fd5b6040516060810167ffffffffffffffff828210818311171561112757611127610e11565b81604052829150606086018781111561113f57600080fd5b865b81811015611159578051845260209384019301611141565b50519294508083111561116b57600080fd5b50506111798582860161109c565b9150509250929050565b6000815180845261119b816020860160208601611078565b601f01601f19169290920160200192915050565b600060018060a01b038086168352606060208401526111d16060840186611183565b9150808416604084015250949350505050565b6000604082840312156111f657600080fd5b6040516040810181811067ffffffffffffffff8211171561121957611219610e11565b8060405250809150825161122c81610dc0565b8152602092830151920191909152919050565b600080600060a0848603121561125457600080fd5b61125e85856111e4565b925061126d85604086016111e4565b9150608084015190509250925092565b60006020828403121561128f57600080fd5b81518015158114610f6b57600080fd5b6040815260006112b26040830185611183565b82810360208401526112c48185611183565b95945050505050565b6000602082840312156112df57600080fd5b815167ffffffffffffffff8111156112f657600080fd5b610c3f8482850161109c565b805163ffffffff81168114610eba57600080fd5b80516001600160c01b0381168114610eba57600080fd5b600060e0828403121561133f57600080fd5b611347610e27565b8251815261135760208401611302565b602082015261136860408401611302565b604082015261137960608401611316565b606082015261138a60808401611316565b608082015261139b60a08401611302565b60a082015260c08301518060170b81146113b457600080fd5b60c08201529392505050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036113fa57634e487b7160e01b600052601160045260246000fd5b60010192915050565b60008251611415818460208701611078565b9190910192915050565b602081526000610f6b602083018461118356fea2646970667358221220cd8fa15088bbdab9435ed94f1fe1c49e0079dfc7833f912fd899cbb7718d0fa164736f6c634300081300330000000000000000000000002ff010debc1297f19579b4246cad07bd24f2488a
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063c85abb2611610066578063c85abb2614610119578063d369dc6114610126578063da6771a714610158578063da7308361461016b578063e78ac61d1461019657600080fd5b80633aeac4e11461009857806342f18635146100ad578063ae82b5c9146100d8578063b25db11114610106575b600080fd5b6100ab6100a6366004610dd8565b6101c2565b005b6100c06100bb366004610ebf565b61029b565b60405160179190910b81526020015b60405180910390f35b6100f86100e6366004610f50565b60006020819052908152604090205481565b6040519081526020016100cf565b6100ab610114366004610f72565b61066b565b6003546100c09060170b81565b610139610134366004610ebf565b6106ae565b6040805160179390930b835263ffffffff9091166020830152016100cf565b6100ab610166366004610f9c565b610a9d565b60025461017e906001600160a01b031681565b6040516001600160a01b0390911681526020016100cf565b6003546101ad90600160c01b900463ffffffff1681565b60405163ffffffff90911681526020016100cf565b6001546001600160a01b031633146101f45760405163245aecd360e01b81523360048201526024015b60405180910390fd5b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa15801561023b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061025f9190611042565b90508060000361028257604051630686827b60e51b815260040160405180910390fd5b6102966001600160a01b0383168483610b23565b505050565b600080600260009054906101000a90046001600160a01b03166001600160a01b03166338416b5b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156102f1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610315919061105b565b90506000816001600160a01b0316633aa5ac076040518163ffffffff1660e01b8152600401602060405180830381865afa158015610357573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061037b919061105b565b905060008580602001905181019061039391906110e1565b9150506000836001600160a01b031663ea4b861b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156103d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103fa919061105b565b90506000846001600160a01b031663e03dab1a3085856040518463ffffffff1660e01b815260040161042e939291906111af565b60a0604051808303816000875af115801561044d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610471919061123f565b5050602081015160405163095ea7b360e01b81526001600160a01b038781166004830152602482019290925291925083169063095ea7b3906044016020604051808303816000875af11580156104cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ef919061127d565b50600254604080516001600160a01b038581166020830152600093169163f7e83aee918c91016040516020818303038152906040526040518363ffffffff1660e01b815260040161054192919061129f565b6000604051808303816000875af1158015610560573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261058891908101906112cd565b90506000818060200190518101906105a0919061132d565b60ff8a166000908152602081905260409020548151919250146105f95760405162461bcd60e51b81526020600482015260116024820152702bb937b733903332b2b210373ab6b132b960791b60448201526064016101eb565b60c081015181516040805160179390930b835260208301919091527f89a535fe8a1d9dab951a5dfa4f87c5af25521085a0ffe268fa9a88c6cf97d8bf910160405180910390a160c00151600380546001600160c01b0319166001600160c01b0383161790559998505050505050505050565b6001546001600160a01b031633146106985760405163245aecd360e01b81523360048201526024016101eb565b60ff909116600090815260208190526040902055565b6000806000600260009054906101000a90046001600160a01b03166001600160a01b03166338416b5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610706573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061072a919061105b565b90506000816001600160a01b0316633aa5ac076040518163ffffffff1660e01b8152600401602060405180830381865afa15801561076c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610790919061105b565b90506000868060200190518101906107a891906110e1565b9150506000836001600160a01b031663ea4b861b6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156107eb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061080f919061105b565b90506000846001600160a01b031663e03dab1a3085856040518463ffffffff1660e01b8152600401610843939291906111af565b60a0604051808303816000875af1158015610862573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610886919061123f565b5050602081015160405163095ea7b360e01b81526001600160a01b038781166004830152602482019290925291925083169063095ea7b3906044016020604051808303816000875af11580156108e0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610904919061127d565b50600254604080516001600160a01b038581166020830152600093169163f7e83aee918d91016040516020818303038152906040526040518363ffffffff1660e01b815260040161095692919061129f565b6000604051808303816000875af1158015610975573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261099d91908101906112cd565b90506000818060200190518101906109b5919061132d565b60ff8b16600090815260208190526040902054815191925014610a0e5760405162461bcd60e51b81526020600482015260116024820152702bb937b733903332b2b210373ab6b132b960791b60448201526064016101eb565b60c081015181516040805160179390930b835260208301919091527f89a535fe8a1d9dab951a5dfa4f87c5af25521085a0ffe268fa9a88c6cf97d8bf910160405180910390a160c0810151600380546020909301516001600160c01b0383166001600160e01b031990941693909317600160c01b63ffffffff8516021790559b909a5098505050505050505050565b6001546001600160a01b03163314610aca5760405163245aecd360e01b81523360048201526024016101eb565b60005b81518160ff161015610b1f57818160ff1681518110610aee57610aee6113c0565b60209081029190910181015160ff831660009081529182905260409091205580610b17816113d6565b915050610acd565b5050565b604080516001600160a01b03848116602483015260448083018590528351808403909101815260649092018352602080830180516001600160e01b031663a9059cbb60e01b17905283518085019094528084527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65649084015261029692869291600091610bb3918516908490610c30565b8051909150156102965780806020019051810190610bd1919061127d565b6102965760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084016101eb565b6060610c3f8484600085610c47565b949350505050565b606082471015610ca85760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b60648201526084016101eb565b600080866001600160a01b03168587604051610cc49190611403565b60006040518083038185875af1925050503d8060008114610d01576040519150601f19603f3d011682016040523d82523d6000602084013e610d06565b606091505b5091509150610d1787838387610d22565b979650505050505050565b60608315610d91578251600003610d8a576001600160a01b0385163b610d8a5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016101eb565b5081610c3f565b610c3f8383815115610da65781518083602001fd5b8060405162461bcd60e51b81526004016101eb919061141f565b6001600160a01b0381168114610dd557600080fd5b50565b60008060408385031215610deb57600080fd5b8235610df681610dc0565b91506020830135610e0681610dc0565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60405160e0810167ffffffffffffffff81118282101715610e4a57610e4a610e11565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715610e7957610e79610e11565b604052919050565b600067ffffffffffffffff821115610e9b57610e9b610e11565b50601f01601f191660200190565b803560ff81168114610eba57600080fd5b919050565b60008060408385031215610ed257600080fd5b823567ffffffffffffffff811115610ee957600080fd5b8301601f81018513610efa57600080fd5b8035610f0d610f0882610e81565b610e50565b818152866020838501011115610f2257600080fd5b81602084016020830137600060208383010152809450505050610f4760208401610ea9565b90509250929050565b600060208284031215610f6257600080fd5b610f6b82610ea9565b9392505050565b60008060408385031215610f8557600080fd5b610f8e83610ea9565b946020939093013593505050565b60006020808385031215610faf57600080fd5b823567ffffffffffffffff80821115610fc757600080fd5b818501915085601f830112610fdb57600080fd5b813581811115610fed57610fed610e11565b8060051b9150610ffe848301610e50565b818152918301840191848101908884111561101857600080fd5b938501935b838510156110365784358252938501939085019061101d565b98975050505050505050565b60006020828403121561105457600080fd5b5051919050565b60006020828403121561106d57600080fd5b8151610f6b81610dc0565b60005b8381101561109357818101518382015260200161107b565b50506000910152565b600082601f8301126110ad57600080fd5b81516110bb610f0882610e81565b8181528460208386010111156110d057600080fd5b610c3f826020830160208701611078565b600080608083850312156110f457600080fd5b83601f84011261110357600080fd5b6040516060810167ffffffffffffffff828210818311171561112757611127610e11565b81604052829150606086018781111561113f57600080fd5b865b81811015611159578051845260209384019301611141565b50519294508083111561116b57600080fd5b50506111798582860161109c565b9150509250929050565b6000815180845261119b816020860160208601611078565b601f01601f19169290920160200192915050565b600060018060a01b038086168352606060208401526111d16060840186611183565b9150808416604084015250949350505050565b6000604082840312156111f657600080fd5b6040516040810181811067ffffffffffffffff8211171561121957611219610e11565b8060405250809150825161122c81610dc0565b8152602092830151920191909152919050565b600080600060a0848603121561125457600080fd5b61125e85856111e4565b925061126d85604086016111e4565b9150608084015190509250925092565b60006020828403121561128f57600080fd5b81518015158114610f6b57600080fd5b6040815260006112b26040830185611183565b82810360208401526112c48185611183565b95945050505050565b6000602082840312156112df57600080fd5b815167ffffffffffffffff8111156112f657600080fd5b610c3f8482850161109c565b805163ffffffff81168114610eba57600080fd5b80516001600160c01b0381168114610eba57600080fd5b600060e0828403121561133f57600080fd5b611347610e27565b8251815261135760208401611302565b602082015261136860408401611302565b604082015261137960608401611316565b606082015261138a60808401611316565b608082015261139b60a08401611302565b60a082015260c08301518060170b81146113b457600080fd5b60c08201529392505050565b634e487b7160e01b600052603260045260246000fd5b600060ff821660ff81036113fa57634e487b7160e01b600052601160045260246000fd5b60010192915050565b60008251611415818460208701611078565b9190910192915050565b602081526000610f6b602083018461118356fea2646970667358221220cd8fa15088bbdab9435ed94f1fe1c49e0079dfc7833f912fd899cbb7718d0fa164736f6c63430008130033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002ff010debc1297f19579b4246cad07bd24f2488a
-----Decoded View---------------
Arg [0] : verifier (address): 0x2ff010DEbC1297f19579B4246cad07bd24F2488A
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002ff010debc1297f19579b4246cad07bd24f2488a
Loading...
Loading
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.