Skip to content

BoundlessMarketLib

State Variables

EIP712_DOMAIN

string constant EIP712_DOMAIN = "IBoundlessMarket";

EIP712_DOMAIN_VERSION

string constant EIP712_DOMAIN_VERSION = "1";

PREDICATE_TYPE

string constant PREDICATE_TYPE = "Predicate(uint8 predicateType,bytes data)";

PREDICATE_TYPEHASH

bytes32 constant PREDICATE_TYPEHASH = keccak256(bytes(PREDICATE_TYPE));

INPUT_TYPE

string constant INPUT_TYPE = "Input(uint8 inputType,bytes data)";

INPUT_TYPEHASH

bytes32 constant INPUT_TYPEHASH = keccak256(bytes(INPUT_TYPE));

REQUIREMENTS_TYPE

string constant REQUIREMENTS_TYPE = "Requirements(bytes32 imageId,Predicate predicate)";

REQUIREMENTS_TYPEHASH

bytes32 constant REQUIREMENTS_TYPEHASH = keccak256(abi.encodePacked(REQUIREMENTS_TYPE, PREDICATE_TYPE));

OFFER_TYPE

string constant OFFER_TYPE =
    "Offer(uint256 minPrice,uint256 maxPrice,uint64 biddingStart,uint32 rampUpPeriod,uint32 timeout,uint256 lockinStake)";

OFFER_TYPEHASH

bytes32 constant OFFER_TYPEHASH = keccak256(abi.encodePacked(OFFER_TYPE));

PROOF_REQUEST_TYPE

string constant PROOF_REQUEST_TYPE =
    "ProofRequest(uint256 id,Requirements requirements,string imageUrl,Input input,Offer offer)";

PROOF_REQUEST_TYPEHASH

bytes32 constant PROOF_REQUEST_TYPEHASH =
    keccak256(abi.encodePacked(PROOF_REQUEST_TYPE, INPUT_TYPE, OFFER_TYPE, PREDICATE_TYPE, REQUIREMENTS_TYPE));

Functions

eip712Digest

function eip712Digest(ProofRequest memory request) internal pure returns (bytes32);

eip712Digest

function eip712Digest(Requirements memory requirements) internal pure returns (bytes32);

eip712Digest

function eip712Digest(Input memory input) internal pure returns (bytes32);

eip712Digest

function eip712Digest(Offer memory offer) internal pure returns (bytes32);

eip712Digest

function eip712Digest(Predicate memory predicate) internal pure returns (bytes32);

requestId

function requestId(address client, uint32 id) internal pure returns (uint256);

requestFrom

function requestFrom(uint256 id) internal pure returns (address);

requestIndex

function requestIndex(uint256 id) internal pure returns (uint32);

requireValid

function requireValid(Offer memory offer) internal pure;

blockAtPrice

function blockAtPrice(Offer memory offer, uint256 price) internal pure returns (uint64);

priceAtBlock

function priceAtBlock(Offer memory offer, uint64 _block) internal pure returns (uint256);

deadline

function deadline(Offer memory offer) internal pure returns (uint64);

createDigestMatchPredicate

function createDigestMatchPredicate(bytes32 hash) internal pure returns (Predicate memory);

createPrefixMatchPredicate

function createPrefixMatchPredicate(bytes memory prefix) internal pure returns (Predicate memory);

eval

function eval(Predicate memory predicate, bytes memory journal, bytes32 journalDigest) internal pure returns (bool);

startsWith

function startsWith(bytes memory journal, bytes memory prefix) internal pure returns (bool);

createInlineInput

function createInlineInput(bytes memory inlineData) internal pure returns (Input memory);

createUrlInput

function createUrlInput(string memory url) internal pure returns (Input memory);

encodeConstructorArgs

ABI encode the constructor args for this contract.

This function exists to provide a type-safe way to ABI-encode constructor args, for use in the deployment process with OpenZeppelin Upgrades. Must be kept in sync with the signature of the BoundlessMarket constructor.

function encodeConstructorArgs(IRiscZeroVerifier verifier, bytes32 assessorId) internal pure returns (bytes memory);