Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x4eA4BBC0...add2F1E59 The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
PredicateProvider
Compiler Version
v0.8.30+commit.73712a01
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 {Ownable} from "@oz/access/Ownable.sol";
import {PredicateMessage} from "@predicate/interfaces/IPredicateClient.sol";
import {IPredicateClient} from "@predicate/interfaces/IPredicateClient.sol";
import {PredicateClient} from "@predicate/mixins/PredicateClient.sol";
import {IWhitelistProvider} from "./IWhitelistProvider.sol";
interface IPredicateProvider is IWhitelistProvider, IPredicateClient {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Events */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
event PolicySet(string indexed policyID);
event PredicateManagerSet(address indexed predicateManager);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Errors */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
error PredicateProvider__AuthorizationFailed();
}
interface IPredicateAction {
function predicateAttestation(address _provider, address _user) external;
}
contract PredicateProvider is IWhitelistProvider, IPredicateProvider, Ownable, PredicateClient {
/// @notice The consumer of the provider - the soulbound contract
address public consumer;
/**
* @notice Constructor
* @param _owner The owner of the contract
* @param _predicateManager The predicate manager address
* @param _policyID The policy ID
*
* @dev Ownable
* @dev PredicateClient
*/
constructor(address _owner, address _predicateManager, string memory _policyID) Ownable(_owner) {
_initPredicateClient(_predicateManager, _policyID);
}
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Verify Logic */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
/**
* @notice Verify the authentication data
*
* Check against the existing policy that the user has completed a sanctions check
*
* @param _user The address of the user to verify
* @param _auth The authentication data - PredicateMessage
* @return bool True if the authentication data is valid
*/
function verify(address _user, bytes memory _auth) external override(IWhitelistProvider) returns (bool) {
// The call must come from the expected consumer, such that _user field cannot be spoofed
require(msg.sender == consumer, WhitelistProvider__InvalidConsumer());
PredicateMessage memory predicateMessage = abi.decode(_auth, (PredicateMessage));
bytes memory encodedSigAndArgs =
abi.encodeWithSelector(IPredicateAction.predicateAttestation.selector, address(this), _user);
require(
_authorizeTransaction(predicateMessage, encodedSigAndArgs, _user, 0),
PredicateProvider__AuthorizationFailed()
);
return true;
}
/**
* @notice Set the consumer address
* @param _consumer The consumer address
*
* @dev onlyOwner
*/
function setConsumer(address _consumer) external override(IWhitelistProvider) onlyOwner {
consumer = _consumer;
emit ConsumerSet(_consumer);
}
/**
* @notice Set the policy ID
* @param _policyID The policy ID
*
* @dev onlyOwner
*/
function setPolicy(string memory _policyID) external override(IPredicateClient) onlyOwner {
_setPolicy(_policyID);
emit PolicySet(_policyID);
}
/**
* @notice Set the predicate manager address
* @param _predicateManager The predicate manager address
*
* @dev onlyOwner
*/
function setPredicateManager(address _predicateManager) external override(IPredicateClient) onlyOwner {
_setPredicateManager(_predicateManager);
emit PredicateManagerSet(_predicateManager);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* The initial owner is set to the address provided by the deployer. This can
* later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(initialOwner);
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import {IPredicateManager} from "../interfaces/IPredicateManager.sol";
/// @notice Struct that bundles together a task's parameters for validation
struct PredicateMessage {
// the unique identifier for the task
string taskId;
// the Timestamp expiry for the task
uint256 expireByTime;
// the operators that have signed the task
address[] signerAddresses;
// the signatures of the operators that have signed the task
bytes[] signatures;
}
/// @notice error type for unauthorized access
error PredicateClient__Unauthorized();
/// @notice Interface for a PredicateClient-type contract that enables clients to define execution rules or parameters for tasks they submit
interface IPredicateClient {
/**
* @notice Sets a policy for the calling address, associating it with a policy document stored on IPFS.
* @param _policyID A string representing the policyID from on chain.
* @dev This function enables clients to define execution rules or parameters for tasks they submit.
* The policy governs how tasks submitted by the caller are executed, ensuring compliance with predefined rules.
*/
function setPolicy(
string memory _policyID
) external;
/**
* @notice Retrieves the policy for the calling address.
* @return The policyID associated with the calling address.
*/
function getPolicy() external view returns (string memory);
/**
* @notice Function for setting the Predicate ServiceManager
* @param _predicateManager address of the service manager
*/
function setPredicateManager(
address _predicateManager
) external;
/**
* @notice Function for getting the Predicate ServiceManager
* @return address of the service manager
*/
function getPredicateManager() external view returns (address);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
import {IPredicateManager, Task} from "../interfaces/IPredicateManager.sol";
import "../interfaces/IPredicateClient.sol";
abstract contract PredicateClient is IPredicateClient {
/// @notice Struct to contain stateful values for PredicateClient-type contracts
/// @custom:storage-location erc7201:predicate.storage.PredicateClient
struct PredicateClientStorage {
IPredicateManager serviceManager;
string policyID;
}
/// @notice the storage slot for the PredicateClientStorage struct
/// @dev keccak256(abi.encode(uint256(keccak256("predicate.storage.PredicateClient")) - 1)) & ~bytes32(uint256(0xff))
bytes32 private constant _PREDICATE_CLIENT_STORAGE_SLOT =
0x804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b99300;
function _getPredicateClientStorage() private pure returns (PredicateClientStorage storage $) {
assembly {
$.slot := _PREDICATE_CLIENT_STORAGE_SLOT
}
}
function _initPredicateClient(address _serviceManagerAddress, string memory _policyID) internal {
PredicateClientStorage storage $ = _getPredicateClientStorage();
$.serviceManager = IPredicateManager(_serviceManagerAddress);
_setPolicy(_policyID);
}
function _setPolicy(
string memory _policyID
) internal {
PredicateClientStorage storage $ = _getPredicateClientStorage();
$.policyID = _policyID;
$.serviceManager.setPolicy(_policyID);
}
function getPolicy() external view override returns (string memory) {
return _getPolicy();
}
function _getPolicy() internal view returns (string memory) {
return _getPredicateClientStorage().policyID;
}
function _setPredicateManager(
address _predicateManager
) internal {
PredicateClientStorage storage $ = _getPredicateClientStorage();
$.serviceManager = IPredicateManager(_predicateManager);
}
function getPredicateManager() external view override returns (address) {
return _getPredicateManager();
}
function _getPredicateManager() internal view returns (address) {
return address(_getPredicateClientStorage().serviceManager);
}
modifier onlyPredicateServiceManager() {
if (msg.sender != address(_getPredicateClientStorage().serviceManager)) {
revert PredicateClient__Unauthorized();
}
_;
}
/**
*
* @notice Validates the transaction by checking the signatures of the operators.
*/
function _authorizeTransaction(
PredicateMessage memory _predicateMessage,
bytes memory _encodedSigAndArgs,
address _msgSender,
uint256 _value
) internal returns (bool) {
PredicateClientStorage storage $ = _getPredicateClientStorage();
Task memory task = Task({
msgSender: _msgSender,
target: address(this),
value: _value,
encodedSigAndArgs: _encodedSigAndArgs,
policyID: $.policyID,
quorumThresholdCount: uint32(_predicateMessage.signerAddresses.length),
taskId: _predicateMessage.taskId,
expireByTime: _predicateMessage.expireByTime
});
return
$.serviceManager.validateSignatures(task, _predicateMessage.signerAddresses, _predicateMessage.signatures);
}
}// SPDX-License-Identifier: Apache-2.0
pragma solidity ^0.8.27;
interface IWhitelistProvider {
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Events */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
event ConsumerSet(address indexed consumer);
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Errors */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
error WhitelistProvider__InvalidConsumer();
/*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/
/* Functions */
/*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/
function setConsumer(address _consumer) external;
/**
* @notice Verify the authentication data
* @param _user The address of the user to verify
* @param _auth The authentication data
* @return bool True if the authentication data is valid
*/
function verify(address _user, bytes memory _auth) external returns (bool);
}// 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
pragma solidity ^0.8.12;
/// @notice Struct that bundles together a task's parameters for validation
struct Task {
// the unique identifier for the task
string taskId;
// the address of the sender of the task
address msgSender;
// the address of the target contract for the task
address target;
// the value to send with the task
uint256 value;
// the encoded signature and arguments for the task
bytes encodedSigAndArgs;
// the policy ID associated with the task
string policyID;
// the number of signatures required to authorize the task
uint32 quorumThresholdCount;
// the timestamp by which the task must be executed
uint256 expireByTime;
}
/// @notice Struct that bundles together a signature, a salt for uniqueness, and an expiration time for the signature. Used primarily for stack management.
struct SignatureWithSaltAndExpiry {
// the signature itself, formatted as a single bytes object
bytes signature;
// the salt used to generate the signature
bytes32 salt;
// the expiration timestamp (UTC) of the signature
uint256 expiry;
}
/**
* @title Minimal interface for a ServiceManager-type contract that forms the single point for an AVS to push updates to EigenLayer
* @author Predicate Labs, Inc
*/
interface IPredicateManager {
/**
* @notice Sets the metadata URI for the AVS
* @param _metadataURI is the metadata URI for the AVS
*/
function setMetadataURI(
string memory _metadataURI
) external;
/**
* @notice Forwards a call to EigenLayer's DelegationManager contract to confirm operator registration with the AVS
* @param operatorSigningKey The address of the operator's signing key.
* @param operatorSignature The signature, salt, and expiry of the operator's signature.
*/
function registerOperatorToAVS(
address operatorSigningKey,
SignatureWithSaltAndExpiry memory operatorSignature
) external;
/**
* @notice Forwards a call to EigenLayer's DelegationManager contract to confirm operator deregistration from the AVS
* @param operator The address of the operator to deregister.
*/
function deregisterOperatorFromAVS(
address operator
) external;
/**
* @notice Returns the list of strategies that the operator has potentially restaked on the AVS
* @param operator The address of the operator to get restaked strategies for
* @dev This function is intended to be called off-chain
* @dev No guarantee is made on whether the operator has shares for a strategy in a quorum or uniqueness
* of each element in the returned array. The off-chain service should do that validation separately
*/
function getOperatorRestakedStrategies(
address operator
) external view returns (address[] memory);
/**
* @notice Returns the list of strategies that the AVS supports for restaking
* @dev This function is intended to be called off-chain
* @dev No guarantee is made on uniqueness of each element in the returned array.
* The off-chain service should do that validation separately
*/
function getRestakeableStrategies() external view returns (address[] memory);
/**
* @notice Sets a policy ID for the sender, defining execution rules or parameters for tasks
* @param policyID string pointing to the policy details
* @dev Only callable by client contracts or EOAs to associate a policy with their address
* @dev Emits a SetPolicy event upon successful association
*/
function setPolicy(
string memory policyID
) external;
/**
* @notice Deploys a policy with ID with execution rules or parameters for tasks
* @param _policyID string pointing to the policy details
* @param _policy string containing the policy details
* @param _quorumThreshold The number of signatures required to authorize a task
* @dev Only callable by service manager deployer
* @dev Emits a DeployedPolicy event upon successful deployment
*/
function deployPolicy(string memory _policyID, string memory _policy, uint256 _quorumThreshold) external;
/**
* @notice Gets array of deployed policies
*/
function getDeployedPolicies() external view returns (string[] memory);
/**
* @notice Verifies if a task is authorized by the required number of operators
* @param _task Parameters of the task including sender, target, function signature, arguments, quorum count, and expiry block
* @param signerAddresses Array of addresses of the operators who signed the task
* @param signatures Array of signatures from the operators authorizing the task
* @return isVerified Boolean indicating if the task has been verified by the required number of operators
* @dev This function checks the signatures against the hash of the task parameters to ensure task authenticity and authorization
*/
function validateSignatures(
Task memory _task,
address[] memory signerAddresses,
bytes[] memory signatures
) external returns (bool isVerified);
/**
* @notice Adds a new strategy to the Service Manager
* @dev Only callable by the contract owner. Adds a strategy that operators can stake on.
* @param _strategy The address of the strategy contract to add
* @param quorumNumber The quorum number associated with the strategy
* @param index The index of the strategy within the quorum
* @dev Emits a StrategyAdded event upon successful addition of the strategy
* @dev Reverts if the strategy does not exist or is already added
*/
function addStrategy(address _strategy, uint8 quorumNumber, uint256 index) external;
/**
* @notice Removes an existing strategy from the Service Manager
* @dev Only callable by the contract owner. Removes a strategy that operators are currently able to stake on.
* @param _strategy The address of the strategy contract to remove
* @dev Emits a StrategyRemoved event upon successful removal of the strategy
* @dev Reverts if the strategy is not currently added or if the address is invalid
*/
function removeStrategy(
address _strategy
) external;
/**
* @notice Enables the rotation of Predicate Signing Key for an operator
* @param _oldSigningKey address of the old signing key to remove
* @param _newSigningKey address of the new signing key to add
*/
function rotatePredicateSigningKey(address _oldSigningKey, address _newSigningKey) external;
}{
"remappings": [
"src/=src/",
"test/=test/",
"@aztec/=lib/l1-contracts/src/",
"@aztec-test/=lib/l1-contracts/test/",
"@openzeppelin/=lib/openzeppelin-contracts/",
"@oz/=lib/openzeppelin-contracts/contracts/",
"forge-std/=lib/forge-std/src/",
"@atp/=lib/teegeeee/src/",
"@atp-mock/=lib/teegeeee/src/test/mocks/",
"@zkpassport/=lib/circuits/src/solidity/src/",
"@splits/=lib/splits-contracts-monorepo/packages/splits-v2/src/",
"@predicate/=lib/predicate-contracts/src/",
"@teegeeee/=lib/teegeeee/src/",
"@twap-auction/=lib/liquidity-launcher/lib/continuous-clearing-auction/src/",
"@twap-auction-test/=lib/liquidity-launcher/lib/continuous-clearing-auction/test/",
"@launcher/=lib/liquidity-launcher/src/",
"@v4c/=lib/liquidity-launcher/lib/v4-core/src/",
"@v4p/=lib/liquidity-launcher/lib/v4-periphery/src/",
"@aztec-blob-lib/=lib/l1-contracts/src/core/libraries/rollup/",
"@ensdomains/=lib/liquidity-launcher/lib/v4-core/node_modules/@ensdomains/",
"@openzeppelin-latest/=lib/liquidity-launcher/lib/openzeppelin-contracts/",
"@openzeppelin-upgrades-v4.9.0/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"@openzeppelin-upgrades/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable/",
"@openzeppelin-v4.9.0/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
"@optimism/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/",
"@solady/=lib/liquidity-launcher/lib/solady/",
"@test/=lib/l1-contracts/test/",
"@uniswap/v4-core/=lib/liquidity-launcher/lib/v4-core/",
"@uniswap/v4-periphery/=lib/liquidity-launcher/lib/v4-periphery/",
"@zkpassport-test/=lib/l1-contracts/lib/circuits/src/solidity/test/",
"btt/=lib/liquidity-launcher/lib/continuous-clearing-auction/test/btt/",
"circuits/=lib/circuits/src/",
"continuous-clearing-auction/=lib/liquidity-launcher/lib/continuous-clearing-auction/",
"ds-test/=lib/predicate-contracts/lib/forge-std/lib/ds-test/src/",
"eigenlayer-contracts/=lib/predicate-contracts/lib/eigenlayer-contracts/",
"eigenlayer-middleware/=lib/predicate-contracts/lib/eigenlayer-middleware/",
"erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
"forge-gas-snapshot/=lib/liquidity-launcher/lib/continuous-clearing-auction/lib/forge-gas-snapshot/src/",
"halmos-cheatcodes/=lib/openzeppelin-contracts/lib/halmos-cheatcodes/src/",
"hardhat/=lib/liquidity-launcher/lib/v4-core/node_modules/hardhat/",
"kontrol-cheatcodes/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/lib/kontrol-cheatcodes/src/",
"l1-contracts/=lib/l1-contracts/src/",
"lib-keccak/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/",
"liquidity-launcher/=lib/liquidity-launcher/",
"merkle-distributor/=lib/liquidity-launcher/lib/merkle-distributor/",
"openzeppelin-contracts-4.7/=lib/liquidity-launcher/lib/openzeppelin-contracts-4.7/",
"openzeppelin-contracts-upgradeable-v4.9.0/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/",
"openzeppelin-contracts-upgradeable/=lib/predicate-contracts/lib/openzeppelin-contracts-upgradeable/",
"openzeppelin-contracts-v4.9.0/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-v4.9.0/",
"openzeppelin-contracts-v5/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/lib/openzeppelin-contracts-v5/",
"openzeppelin-contracts/=lib/openzeppelin-contracts/",
"openzeppelin-foundry-upgrades/=lib/predicate-contracts/lib/openzeppelin-foundry-upgrades/src/",
"openzeppelin-upgradeable/=lib/predicate-contracts/lib/openzeppelin-contracts-upgradeable/contracts/",
"openzeppelin/=lib/predicate-contracts/lib/eigenlayer-contracts/lib/openzeppelin-contracts-upgradeable-v4.9.0/contracts/",
"optimism/=lib/liquidity-launcher/lib/optimism/",
"permit2/=lib/liquidity-launcher/lib/permit2/",
"predicate-contracts/=lib/predicate-contracts/src/",
"safe-contracts/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/lib/safe-contracts/contracts/",
"solady-v0.0.245/=lib/liquidity-launcher/lib/optimism/packages/contracts-bedrock/lib/solady-v0.0.245/src/",
"solady/=lib/liquidity-launcher/lib/solady/src/",
"solmate/=lib/predicate-contracts/lib/solmate/src/",
"splits-contracts-monorepo/=lib/splits-contracts-monorepo/",
"teegeeee/=lib/teegeeee/src/",
"utils/=lib/predicate-contracts/lib/utils/",
"v4-core/=lib/liquidity-launcher/lib/v4-core/src/",
"v4-periphery/=lib/liquidity-launcher/lib/v4-periphery/",
"zkpassport-packages/=lib/zkpassport-packages/"
],
"optimizer": {
"enabled": true,
"runs": 200
},
"metadata": {
"useLiteralContent": false,
"bytecodeHash": "ipfs",
"appendCBOR": true
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"evmVersion": "prague",
"viaIR": false
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_predicateManager","type":"address"},{"internalType":"string","name":"_policyID","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"PredicateProvider__AuthorizationFailed","type":"error"},{"inputs":[],"name":"WhitelistProvider__InvalidConsumer","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"consumer","type":"address"}],"name":"ConsumerSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"policyID","type":"string"}],"name":"PolicySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"predicateManager","type":"address"}],"name":"PredicateManagerSet","type":"event"},{"inputs":[],"name":"consumer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPolicy","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPredicateManager","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_consumer","type":"address"}],"name":"setConsumer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_policyID","type":"string"}],"name":"setPolicy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_predicateManager","type":"address"}],"name":"setPredicateManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_user","type":"address"},{"internalType":"bytes","name":"_auth","type":"bytes"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
0x608060405234801561000f575f5ffd5b506040516112a43803806112a483398101604081905261002e916101c5565b826001600160a01b03811661005c57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b61006581610078565b5061007082826100c7565b505050610408565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f5160206112845f395f51905f5280546001600160a01b0319166001600160a01b0384161781556100f7826100fc565b505050565b5f5160206112845f395f51905f527f804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b993016101358382610319565b508054604051636b4c991b60e01b81526001600160a01b0390911690636b4c991b906101659085906004016103d3565b5f604051808303815f87803b15801561017c575f5ffd5b505af115801561018e573d5f5f3e3d5ffd5b505050505050565b80516001600160a01b03811681146101ac575f5ffd5b919050565b634e487b7160e01b5f52604160045260245ffd5b5f5f5f606084860312156101d7575f5ffd5b6101e084610196565b92506101ee60208501610196565b60408501519092506001600160401b03811115610209575f5ffd5b8401601f81018613610219575f5ffd5b80516001600160401b03811115610232576102326101b1565b604051601f8201601f19908116603f011681016001600160401b0381118282101715610260576102606101b1565b604052818152828201602001881015610277575f5ffd5b8160208401602083015e5f602083830101528093505050509250925092565b600181811c908216806102aa57607f821691505b6020821081036102c857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156100f757805f5260205f20601f840160051c810160208510156102f35750805b601f840160051c820191505b81811015610312575f81556001016102ff565b5050505050565b81516001600160401b03811115610332576103326101b1565b610346816103408454610296565b846102ce565b6020601f821160018114610378575f83156103615750848201515b5f19600385901b1c1916600184901b178455610312565b5f84815260208120601f198516915b828110156103a75787850151825560209485019460019092019101610387565b50848210156103c457868401515f19600387901b60f8161c191681555b50505050600190811b01905550565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b610e6f806104155f395ff3fe608060405234801561000f575f5ffd5b506004361061009b575f3560e01c8063a4b3bc0111610063578063a4b3bc011461011b578063b4fd729614610123578063ce1e462614610136578063e0a7704a1461014b578063f2fde38b1461015e575f5ffd5b80634a41d1ac1461009f57806363a579d5146100c75780636b4c991b146100dc578063715018a6146100ef5780638da5cb5b146100f7575b5f5ffd5b6100b26100ad3660046107d9565b610171565b60405190151581526020015b60405180910390f35b6100da6100d5366004610839565b610233565b005b6100da6100ea36600461085b565b610284565b6100da6102d5565b5f546001600160a01b03165b6040516001600160a01b0390911681526020016100be565b6101036102e8565b600154610103906001600160a01b031681565b61013e61030c565b6040516100be91906108d6565b6100da610159366004610839565b610316565b6100da61016c366004610839565b61037b565b6001545f906001600160a01b0316331461019e57604051635892569b60e11b815260040160405180910390fd5b5f828060200190518101906101b39190610a41565b604080513060248201526001600160a01b0387166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316630cdfc0d960e01b17905290915061020b8282875f6103bd565b61022857604051634eee8c5d60e01b815260040160405180910390fd5b506001949350505050565b61023b610541565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f7db69a2d299c904659420a4e27899c2ba105928ecdc1ba630100e95fe5010f83905f90a250565b61028c610541565b6102958161056d565b806040516102a39190610b20565b604051908190038120907f115a7076b27726a2ae5bd26756c4e4ec6b292eb6151f84772978a722b09271a5905f90a250565b6102dd610541565b6102e65f610607565b565b5f6103075f516020610e1a5f395f51905f52546001600160a01b031690565b905090565b6060610307610656565b61031e610541565b5f516020610e1a5f395f51905f5280546001600160a01b0319166001600160a01b0383161790556040516001600160a01b038216907f282797d873547dfc33f40236c7b1e0c8c816e2784b7ede18c24a90179446b026905f90a250565b610383610541565b6001600160a01b0381166103b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6103ba81610607565b50565b5f805f516020610e1a5f395f51905f5290505f604051806101000160405280885f01518152602001866001600160a01b03168152602001306001600160a01b0316815260200185815260200187815260200183600101805461041e90610b36565b80601f016020809104026020016040519081016040528092919081815260200182805461044a90610b36565b80156104955780601f1061046c57610100808354040283529160200191610495565b820191905f5260205f20905b81548152906001019060200180831161047857829003601f168201915b50505091835250506040808a0180515163ffffffff166020808501919091528b0151928201929092528454915160608b015191516318cea58d60e01b81529394506001600160a01b03909216926318cea58d926104f6928692600401610c0b565b6020604051808303815f875af1158015610512573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105369190610cf3565b979650505050505050565b5f546001600160a01b031633146102e65760405163118cdaa760e01b81523360048201526024016103a8565b5f516020610e1a5f395f51905f527f804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b993016105a68382610d5e565b508054604051636b4c991b60e01b81526001600160a01b0390911690636b4c991b906105d69085906004016108d6565b5f604051808303815f87803b1580156105ed575f5ffd5b505af11580156105ff573d5f5f3e3d5ffd5b505050505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60605f516020610e1a5f395f51905f52600101805461067490610b36565b80601f01602080910402602001604051908101604052809291908181526020018280546106a090610b36565b80156106eb5780601f106106c2576101008083540402835291602001916106eb565b820191905f5260205f20905b8154815290600101906020018083116106ce57829003601f168201915b5050505050905090565b6001600160a01b03811681146103ba575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040516080810167ffffffffffffffff8111828210171561074057610740610709565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561076f5761076f610709565b604052919050565b5f67ffffffffffffffff82111561079057610790610709565b50601f01601f191660200190565b5f6107b06107ab84610777565b610746565b90508281528383830111156107c3575f5ffd5b828260208301375f602084830101529392505050565b5f5f604083850312156107ea575f5ffd5b82356107f5816106f5565b9150602083013567ffffffffffffffff811115610810575f5ffd5b8301601f81018513610820575f5ffd5b61082f8582356020840161079e565b9150509250929050565b5f60208284031215610849575f5ffd5b8135610854816106f5565b9392505050565b5f6020828403121561086b575f5ffd5b813567ffffffffffffffff811115610881575f5ffd5b8201601f81018413610891575f5ffd5b6108a08482356020840161079e565b949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61085460208301846108a8565b5f6108f56107ab84610777565b9050828152838383011115610908575f5ffd5b8282602083015e5f602084830101529392505050565b5f67ffffffffffffffff82111561093757610937610709565b5060051b60200190565b5f82601f830112610950575f5ffd5b815161095e6107ab8261091e565b8082825260208201915060208360051b86010192508583111561097f575f5ffd5b602085015b838110156109a5578051610997816106f5565b835260209283019201610984565b5095945050505050565b5f82601f8301126109be575f5ffd5b81516109cc6107ab8261091e565b8082825260208201915060208360051b8601019250858311156109ed575f5ffd5b602085015b838110156109a557805167ffffffffffffffff811115610a10575f5ffd5b8601603f81018813610a20575f5ffd5b610a32886020830151604084016108e8565b845250602092830192016109f2565b5f60208284031215610a51575f5ffd5b815167ffffffffffffffff811115610a67575f5ffd5b820160808185031215610a78575f5ffd5b610a8061071d565b815167ffffffffffffffff811115610a96575f5ffd5b8201601f81018613610aa6575f5ffd5b610ab5868251602084016108e8565b82525060208281015190820152604082015167ffffffffffffffff811115610adb575f5ffd5b610ae786828501610941565b604083015250606082015167ffffffffffffffff811115610b06575f5ffd5b610b12868285016109af565b606083015250949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680610b4a57607f821691505b602082108103610b6857634e487b7160e01b5f52602260045260245ffd5b50919050565b5f8151808452602084019350602083015f5b82811015610ba75781516001600160a01b0316865260209586019590910190600101610b80565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015610bff57601f19858403018852610be98383516108a8565b6020988901989093509190910190600101610bcd565b50909695505050505050565b606081525f84516101006060840152610c286101608401826108a8565b90506020860151610c4460808501826001600160a01b03169052565b5060408601516001600160a01b031660a0840152606086015160c08401526080860151838203605f190160e0850152610c7d82826108a8565b91505060a0860151605f1984830301610100850152610c9c82826108a8565b91505060c0860151610cb761012085018263ffffffff169052565b5060e08601516101408401528281036020840152610cd58186610b6e565b90508281036040840152610ce98185610bb1565b9695505050505050565b5f60208284031215610d03575f5ffd5b81518015158114610854575f5ffd5b601f821115610d5957805f5260205f20601f840160051c81016020851015610d375750805b601f840160051c820191505b81811015610d56575f8155600101610d43565b50505b505050565b815167ffffffffffffffff811115610d7857610d78610709565b610d8c81610d868454610b36565b84610d12565b6020601f821160018114610dbe575f8315610da75750848201515b5f19600385901b1c1916600184901b178455610d56565b5f84815260208120601f198516915b82811015610ded5787850151825560209485019460019092019101610dcd565b5084821015610e0a57868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b99300a2646970667358221220634358e3fff6ffd70b409225e6e129e623df991c861cc42eddfa04e13a073ce064736f6c634300081e0033804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b9930000000000000000000000000085e51a78fe8fe21d881894206a9adbf54e3df8c3000000000000000000000000f6f4a30eef7cf51ed4ee1415fb3bfdaf3694b0d20000000000000000000000000000000000000000000000000000000000000060000000000000000000000000000000000000000000000000000000000000000f782d617a7465632d616d6c2d3030310000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561000f575f5ffd5b506004361061009b575f3560e01c8063a4b3bc0111610063578063a4b3bc011461011b578063b4fd729614610123578063ce1e462614610136578063e0a7704a1461014b578063f2fde38b1461015e575f5ffd5b80634a41d1ac1461009f57806363a579d5146100c75780636b4c991b146100dc578063715018a6146100ef5780638da5cb5b146100f7575b5f5ffd5b6100b26100ad3660046107d9565b610171565b60405190151581526020015b60405180910390f35b6100da6100d5366004610839565b610233565b005b6100da6100ea36600461085b565b610284565b6100da6102d5565b5f546001600160a01b03165b6040516001600160a01b0390911681526020016100be565b6101036102e8565b600154610103906001600160a01b031681565b61013e61030c565b6040516100be91906108d6565b6100da610159366004610839565b610316565b6100da61016c366004610839565b61037b565b6001545f906001600160a01b0316331461019e57604051635892569b60e11b815260040160405180910390fd5b5f828060200190518101906101b39190610a41565b604080513060248201526001600160a01b0387166044808301919091528251808303909101815260649091019091526020810180516001600160e01b0316630cdfc0d960e01b17905290915061020b8282875f6103bd565b61022857604051634eee8c5d60e01b815260040160405180910390fd5b506001949350505050565b61023b610541565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f7db69a2d299c904659420a4e27899c2ba105928ecdc1ba630100e95fe5010f83905f90a250565b61028c610541565b6102958161056d565b806040516102a39190610b20565b604051908190038120907f115a7076b27726a2ae5bd26756c4e4ec6b292eb6151f84772978a722b09271a5905f90a250565b6102dd610541565b6102e65f610607565b565b5f6103075f516020610e1a5f395f51905f52546001600160a01b031690565b905090565b6060610307610656565b61031e610541565b5f516020610e1a5f395f51905f5280546001600160a01b0319166001600160a01b0383161790556040516001600160a01b038216907f282797d873547dfc33f40236c7b1e0c8c816e2784b7ede18c24a90179446b026905f90a250565b610383610541565b6001600160a01b0381166103b157604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b6103ba81610607565b50565b5f805f516020610e1a5f395f51905f5290505f604051806101000160405280885f01518152602001866001600160a01b03168152602001306001600160a01b0316815260200185815260200187815260200183600101805461041e90610b36565b80601f016020809104026020016040519081016040528092919081815260200182805461044a90610b36565b80156104955780601f1061046c57610100808354040283529160200191610495565b820191905f5260205f20905b81548152906001019060200180831161047857829003601f168201915b50505091835250506040808a0180515163ffffffff166020808501919091528b0151928201929092528454915160608b015191516318cea58d60e01b81529394506001600160a01b03909216926318cea58d926104f6928692600401610c0b565b6020604051808303815f875af1158015610512573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906105369190610cf3565b979650505050505050565b5f546001600160a01b031633146102e65760405163118cdaa760e01b81523360048201526024016103a8565b5f516020610e1a5f395f51905f527f804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b993016105a68382610d5e565b508054604051636b4c991b60e01b81526001600160a01b0390911690636b4c991b906105d69085906004016108d6565b5f604051808303815f87803b1580156105ed575f5ffd5b505af11580156105ff573d5f5f3e3d5ffd5b505050505050565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60605f516020610e1a5f395f51905f52600101805461067490610b36565b80601f01602080910402602001604051908101604052809291908181526020018280546106a090610b36565b80156106eb5780601f106106c2576101008083540402835291602001916106eb565b820191905f5260205f20905b8154815290600101906020018083116106ce57829003601f168201915b5050505050905090565b6001600160a01b03811681146103ba575f5ffd5b634e487b7160e01b5f52604160045260245ffd5b6040516080810167ffffffffffffffff8111828210171561074057610740610709565b60405290565b604051601f8201601f1916810167ffffffffffffffff8111828210171561076f5761076f610709565b604052919050565b5f67ffffffffffffffff82111561079057610790610709565b50601f01601f191660200190565b5f6107b06107ab84610777565b610746565b90508281528383830111156107c3575f5ffd5b828260208301375f602084830101529392505050565b5f5f604083850312156107ea575f5ffd5b82356107f5816106f5565b9150602083013567ffffffffffffffff811115610810575f5ffd5b8301601f81018513610820575f5ffd5b61082f8582356020840161079e565b9150509250929050565b5f60208284031215610849575f5ffd5b8135610854816106f5565b9392505050565b5f6020828403121561086b575f5ffd5b813567ffffffffffffffff811115610881575f5ffd5b8201601f81018413610891575f5ffd5b6108a08482356020840161079e565b949350505050565b5f81518084528060208401602086015e5f602082860101526020601f19601f83011685010191505092915050565b602081525f61085460208301846108a8565b5f6108f56107ab84610777565b9050828152838383011115610908575f5ffd5b8282602083015e5f602084830101529392505050565b5f67ffffffffffffffff82111561093757610937610709565b5060051b60200190565b5f82601f830112610950575f5ffd5b815161095e6107ab8261091e565b8082825260208201915060208360051b86010192508583111561097f575f5ffd5b602085015b838110156109a5578051610997816106f5565b835260209283019201610984565b5095945050505050565b5f82601f8301126109be575f5ffd5b81516109cc6107ab8261091e565b8082825260208201915060208360051b8601019250858311156109ed575f5ffd5b602085015b838110156109a557805167ffffffffffffffff811115610a10575f5ffd5b8601603f81018813610a20575f5ffd5b610a32886020830151604084016108e8565b845250602092830192016109f2565b5f60208284031215610a51575f5ffd5b815167ffffffffffffffff811115610a67575f5ffd5b820160808185031215610a78575f5ffd5b610a8061071d565b815167ffffffffffffffff811115610a96575f5ffd5b8201601f81018613610aa6575f5ffd5b610ab5868251602084016108e8565b82525060208281015190820152604082015167ffffffffffffffff811115610adb575f5ffd5b610ae786828501610941565b604083015250606082015167ffffffffffffffff811115610b06575f5ffd5b610b12868285016109af565b606083015250949350505050565b5f82518060208501845e5f920191825250919050565b600181811c90821680610b4a57607f821691505b602082108103610b6857634e487b7160e01b5f52602260045260245ffd5b50919050565b5f8151808452602084019350602083015f5b82811015610ba75781516001600160a01b0316865260209586019590910190600101610b80565b5093949350505050565b5f82825180855260208501945060208160051b830101602085015f5b83811015610bff57601f19858403018852610be98383516108a8565b6020988901989093509190910190600101610bcd565b50909695505050505050565b606081525f84516101006060840152610c286101608401826108a8565b90506020860151610c4460808501826001600160a01b03169052565b5060408601516001600160a01b031660a0840152606086015160c08401526080860151838203605f190160e0850152610c7d82826108a8565b91505060a0860151605f1984830301610100850152610c9c82826108a8565b91505060c0860151610cb761012085018263ffffffff169052565b5060e08601516101408401528281036020840152610cd58186610b6e565b90508281036040840152610ce98185610bb1565b9695505050505050565b5f60208284031215610d03575f5ffd5b81518015158114610854575f5ffd5b601f821115610d5957805f5260205f20601f840160051c81016020851015610d375750805b601f840160051c820191505b81811015610d56575f8155600101610d43565b50505b505050565b815167ffffffffffffffff811115610d7857610d78610709565b610d8c81610d868454610b36565b84610d12565b6020601f821160018114610dbe575f8315610da75750848201515b5f19600385901b1c1916600184901b178455610d56565b5f84815260208120601f198516915b82811015610ded5787850151825560209485019460019092019101610dcd565b5084821015610e0a57868401515f19600387901b60f8161c191681555b50505050600190811b0190555056fe804776a84f3d03ad8442127b1451e2fbbb6a715c681d6a83c9e9fca787b99300a2646970667358221220634358e3fff6ffd70b409225e6e129e623df991c861cc42eddfa04e13a073ce064736f6c634300081e0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 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.